{"version":3,"sources":["jquery.js","bootstrap.min.js","flatpickr.js","intlTelInput.js","ion.rangeSlider.js","jquery.fancybox.min.js","jquery.mask.js","jquery.mCustomScrollbar.concat.min.js","jquery.validate.min.js","plyr.js","select2.js","slick.min.js","video.js","youtube.min.js"],"names":[],"mappings":"AAAA;AACA;ACDA;AACA;AACA;AACA;AACA;AACA;AACA;ACNA;AACA;ACDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AC7yCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACj5EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACZA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AC5lBA;AACA;AACA;AACA;AACA;ACJA;AACA;AACA;AACA;ACHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACpmSA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACvtLA;AACA;ACDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACvBA","file":"vendors.js","sourcesContent":["/*! jQuery v3.6.0 | (c) OpenJS Foundation and other contributors | jquery.org/license */\r\n!function(e,t){\"use strict\";\"object\"==typeof module&&\"object\"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error(\"jQuery requires a window with a document\");return t(e)}:t(e)}(\"undefined\"!=typeof window?window:this,function(C,e){\"use strict\";var t=[],r=Object.getPrototypeOf,s=t.slice,g=t.flat?function(e){return t.flat.call(e)}:function(e){return t.concat.apply([],e)},u=t.push,i=t.indexOf,n={},o=n.toString,v=n.hasOwnProperty,a=v.toString,l=a.call(Object),y={},m=function(e){return\"function\"==typeof e&&\"number\"!=typeof e.nodeType&&\"function\"!=typeof e.item},x=function(e){return null!=e&&e===e.window},E=C.document,c={type:!0,src:!0,nonce:!0,noModule:!0};function b(e,t,n){var r,i,o=(n=n||E).createElement(\"script\");if(o.text=e,t)for(r in c)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function w(e){return null==e?e+\"\":\"object\"==typeof e||\"function\"==typeof e?n[o.call(e)]||\"object\":typeof e}var f=\"3.6.0\",S=function(e,t){return new S.fn.init(e,t)};function p(e){var t=!!e&&\"length\"in e&&e.length,n=w(e);return!m(e)&&!x(e)&&(\"array\"===n||0===t||\"number\"==typeof t&&0<t&&t-1 in e)}S.fn=S.prototype={jquery:f,constructor:S,length:0,toArray:function(){return s.call(this)},get:function(e){return null==e?s.call(this):e<0?this[e+this.length]:this[e]},pushStack:function(e){var t=S.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return S.each(this,e)},map:function(n){return this.pushStack(S.map(this,function(e,t){return n.call(e,t,e)}))},slice:function(){return this.pushStack(s.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},even:function(){return this.pushStack(S.grep(this,function(e,t){return(t+1)%2}))},odd:function(){return this.pushStack(S.grep(this,function(e,t){return t%2}))},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(0<=n&&n<t?[this[n]]:[])},end:function(){return this.prevObject||this.constructor()},push:u,sort:t.sort,splice:t.splice},S.extend=S.fn.extend=function(){var e,t,n,r,i,o,a=arguments[0]||{},s=1,u=arguments.length,l=!1;for(\"boolean\"==typeof a&&(l=a,a=arguments[s]||{},s++),\"object\"==typeof a||m(a)||(a={}),s===u&&(a=this,s--);s<u;s++)if(null!=(e=arguments[s]))for(t in e)r=e[t],\"__proto__\"!==t&&a!==r&&(l&&r&&(S.isPlainObject(r)||(i=Array.isArray(r)))?(n=a[t],o=i&&!Array.isArray(n)?[]:i||S.isPlainObject(n)?n:{},i=!1,a[t]=S.extend(l,o,r)):void 0!==r&&(a[t]=r));return a},S.extend({expando:\"jQuery\"+(f+Math.random()).replace(/\\D/g,\"\"),isReady:!0,error:function(e){throw new Error(e)},noop:function(){},isPlainObject:function(e){var t,n;return!(!e||\"[object Object]\"!==o.call(e))&&(!(t=r(e))||\"function\"==typeof(n=v.call(t,\"constructor\")&&t.constructor)&&a.call(n)===l)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},globalEval:function(e,t,n){b(e,{nonce:t&&t.nonce},n)},each:function(e,t){var n,r=0;if(p(e)){for(n=e.length;r<n;r++)if(!1===t.call(e[r],r,e[r]))break}else for(r in e)if(!1===t.call(e[r],r,e[r]))break;return e},makeArray:function(e,t){var n=t||[];return null!=e&&(p(Object(e))?S.merge(n,\"string\"==typeof e?[e]:e):u.call(n,e)),n},inArray:function(e,t,n){return null==t?-1:i.call(t,e,n)},merge:function(e,t){for(var n=+t.length,r=0,i=e.length;r<n;r++)e[i++]=t[r];return e.length=i,e},grep:function(e,t,n){for(var r=[],i=0,o=e.length,a=!n;i<o;i++)!t(e[i],i)!==a&&r.push(e[i]);return r},map:function(e,t,n){var r,i,o=0,a=[];if(p(e))for(r=e.length;o<r;o++)null!=(i=t(e[o],o,n))&&a.push(i);else for(o in e)null!=(i=t(e[o],o,n))&&a.push(i);return g(a)},guid:1,support:y}),\"function\"==typeof Symbol&&(S.fn[Symbol.iterator]=t[Symbol.iterator]),S.each(\"Boolean Number String Function Array Date RegExp Object Error Symbol\".split(\" \"),function(e,t){n[\"[object \"+t+\"]\"]=t.toLowerCase()});var d=function(n){var e,d,b,o,i,h,f,g,w,u,l,T,C,a,E,v,s,c,y,S=\"sizzle\"+1*new Date,p=n.document,k=0,r=0,m=ue(),x=ue(),A=ue(),N=ue(),j=function(e,t){return e===t&&(l=!0),0},D={}.hasOwnProperty,t=[],q=t.pop,L=t.push,H=t.push,O=t.slice,P=function(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1},R=\"checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped\",M=\"[\\\\x20\\\\t\\\\r\\\\n\\\\f]\",I=\"(?:\\\\\\\\[\\\\da-fA-F]{1,6}\"+M+\"?|\\\\\\\\[^\\\\r\\\\n\\\\f]|[\\\\w-]|[^\\0-\\\\x7f])+\",W=\"\\\\[\"+M+\"*(\"+I+\")(?:\"+M+\"*([*^$|!~]?=)\"+M+\"*(?:'((?:\\\\\\\\.|[^\\\\\\\\'])*)'|\\\"((?:\\\\\\\\.|[^\\\\\\\\\\\"])*)\\\"|(\"+I+\"))|)\"+M+\"*\\\\]\",F=\":(\"+I+\")(?:\\\\((('((?:\\\\\\\\.|[^\\\\\\\\'])*)'|\\\"((?:\\\\\\\\.|[^\\\\\\\\\\\"])*)\\\")|((?:\\\\\\\\.|[^\\\\\\\\()[\\\\]]|\"+W+\")*)|.*)\\\\)|)\",B=new RegExp(M+\"+\",\"g\"),$=new RegExp(\"^\"+M+\"+|((?:^|[^\\\\\\\\])(?:\\\\\\\\.)*)\"+M+\"+$\",\"g\"),_=new RegExp(\"^\"+M+\"*,\"+M+\"*\"),z=new RegExp(\"^\"+M+\"*([>+~]|\"+M+\")\"+M+\"*\"),U=new RegExp(M+\"|>\"),X=new RegExp(F),V=new RegExp(\"^\"+I+\"$\"),G={ID:new RegExp(\"^#(\"+I+\")\"),CLASS:new RegExp(\"^\\\\.(\"+I+\")\"),TAG:new RegExp(\"^(\"+I+\"|[*])\"),ATTR:new RegExp(\"^\"+W),PSEUDO:new RegExp(\"^\"+F),CHILD:new RegExp(\"^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\\\(\"+M+\"*(even|odd|(([+-]|)(\\\\d*)n|)\"+M+\"*(?:([+-]|)\"+M+\"*(\\\\d+)|))\"+M+\"*\\\\)|)\",\"i\"),bool:new RegExp(\"^(?:\"+R+\")$\",\"i\"),needsContext:new RegExp(\"^\"+M+\"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\\\(\"+M+\"*((?:-\\\\d)?\\\\d*)\"+M+\"*\\\\)|)(?=[^-]|$)\",\"i\")},Y=/HTML$/i,Q=/^(?:input|select|textarea|button)$/i,J=/^h\\d$/i,K=/^[^{]+\\{\\s*\\[native \\w/,Z=/^(?:#([\\w-]+)|(\\w+)|\\.([\\w-]+))$/,ee=/[+~]/,te=new RegExp(\"\\\\\\\\[\\\\da-fA-F]{1,6}\"+M+\"?|\\\\\\\\([^\\\\r\\\\n\\\\f])\",\"g\"),ne=function(e,t){var n=\"0x\"+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},re=/([\\0-\\x1f\\x7f]|^-?\\d)|^-$|[^\\0-\\x1f\\x7f-\\uFFFF\\w-]/g,ie=function(e,t){return t?\"\\0\"===e?\"\\ufffd\":e.slice(0,-1)+\"\\\\\"+e.charCodeAt(e.length-1).toString(16)+\" \":\"\\\\\"+e},oe=function(){T()},ae=be(function(e){return!0===e.disabled&&\"fieldset\"===e.nodeName.toLowerCase()},{dir:\"parentNode\",next:\"legend\"});try{H.apply(t=O.call(p.childNodes),p.childNodes),t[p.childNodes.length].nodeType}catch(e){H={apply:t.length?function(e,t){L.apply(e,O.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function se(t,e,n,r){var i,o,a,s,u,l,c,f=e&&e.ownerDocument,p=e?e.nodeType:9;if(n=n||[],\"string\"!=typeof t||!t||1!==p&&9!==p&&11!==p)return n;if(!r&&(T(e),e=e||C,E)){if(11!==p&&(u=Z.exec(t)))if(i=u[1]){if(9===p){if(!(a=e.getElementById(i)))return n;if(a.id===i)return n.push(a),n}else if(f&&(a=f.getElementById(i))&&y(e,a)&&a.id===i)return n.push(a),n}else{if(u[2])return H.apply(n,e.getElementsByTagName(t)),n;if((i=u[3])&&d.getElementsByClassName&&e.getElementsByClassName)return H.apply(n,e.getElementsByClassName(i)),n}if(d.qsa&&!N[t+\" \"]&&(!v||!v.test(t))&&(1!==p||\"object\"!==e.nodeName.toLowerCase())){if(c=t,f=e,1===p&&(U.test(t)||z.test(t))){(f=ee.test(t)&&ye(e.parentNode)||e)===e&&d.scope||((s=e.getAttribute(\"id\"))?s=s.replace(re,ie):e.setAttribute(\"id\",s=S)),o=(l=h(t)).length;while(o--)l[o]=(s?\"#\"+s:\":scope\")+\" \"+xe(l[o]);c=l.join(\",\")}try{return H.apply(n,f.querySelectorAll(c)),n}catch(e){N(t,!0)}finally{s===S&&e.removeAttribute(\"id\")}}}return g(t.replace($,\"$1\"),e,n,r)}function ue(){var r=[];return function e(t,n){return r.push(t+\" \")>b.cacheLength&&delete e[r.shift()],e[t+\" \"]=n}}function le(e){return e[S]=!0,e}function ce(e){var t=C.createElement(\"fieldset\");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function fe(e,t){var n=e.split(\"|\"),r=n.length;while(r--)b.attrHandle[n[r]]=t}function pe(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function de(t){return function(e){return\"input\"===e.nodeName.toLowerCase()&&e.type===t}}function he(n){return function(e){var t=e.nodeName.toLowerCase();return(\"input\"===t||\"button\"===t)&&e.type===n}}function ge(t){return function(e){return\"form\"in e?e.parentNode&&!1===e.disabled?\"label\"in e?\"label\"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&ae(e)===t:e.disabled===t:\"label\"in e&&e.disabled===t}}function ve(a){return le(function(o){return o=+o,le(function(e,t){var n,r=a([],e.length,o),i=r.length;while(i--)e[n=r[i]]&&(e[n]=!(t[n]=e[n]))})})}function ye(e){return e&&\"undefined\"!=typeof e.getElementsByTagName&&e}for(e in d=se.support={},i=se.isXML=function(e){var t=e&&e.namespaceURI,n=e&&(e.ownerDocument||e).documentElement;return!Y.test(t||n&&n.nodeName||\"HTML\")},T=se.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:p;return r!=C&&9===r.nodeType&&r.documentElement&&(a=(C=r).documentElement,E=!i(C),p!=C&&(n=C.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener(\"unload\",oe,!1):n.attachEvent&&n.attachEvent(\"onunload\",oe)),d.scope=ce(function(e){return a.appendChild(e).appendChild(C.createElement(\"div\")),\"undefined\"!=typeof e.querySelectorAll&&!e.querySelectorAll(\":scope fieldset div\").length}),d.attributes=ce(function(e){return e.className=\"i\",!e.getAttribute(\"className\")}),d.getElementsByTagName=ce(function(e){return e.appendChild(C.createComment(\"\")),!e.getElementsByTagName(\"*\").length}),d.getElementsByClassName=K.test(C.getElementsByClassName),d.getById=ce(function(e){return a.appendChild(e).id=S,!C.getElementsByName||!C.getElementsByName(S).length}),d.getById?(b.filter.ID=function(e){var t=e.replace(te,ne);return function(e){return e.getAttribute(\"id\")===t}},b.find.ID=function(e,t){if(\"undefined\"!=typeof t.getElementById&&E){var n=t.getElementById(e);return n?[n]:[]}}):(b.filter.ID=function(e){var n=e.replace(te,ne);return function(e){var t=\"undefined\"!=typeof e.getAttributeNode&&e.getAttributeNode(\"id\");return t&&t.value===n}},b.find.ID=function(e,t){if(\"undefined\"!=typeof t.getElementById&&E){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode(\"id\"))&&n.value===e)return[o];i=t.getElementsByName(e),r=0;while(o=i[r++])if((n=o.getAttributeNode(\"id\"))&&n.value===e)return[o]}return[]}}),b.find.TAG=d.getElementsByTagName?function(e,t){return\"undefined\"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):d.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if(\"*\"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},b.find.CLASS=d.getElementsByClassName&&function(e,t){if(\"undefined\"!=typeof t.getElementsByClassName&&E)return t.getElementsByClassName(e)},s=[],v=[],(d.qsa=K.test(C.querySelectorAll))&&(ce(function(e){var t;a.appendChild(e).innerHTML=\"<a id='\"+S+\"'></a><select id='\"+S+\"-\\r\\\\' msallowcapture=''><option selected=''></option></select>\",e.querySelectorAll(\"[msallowcapture^='']\").length&&v.push(\"[*^$]=\"+M+\"*(?:''|\\\"\\\")\"),e.querySelectorAll(\"[selected]\").length||v.push(\"\\\\[\"+M+\"*(?:value|\"+R+\")\"),e.querySelectorAll(\"[id~=\"+S+\"-]\").length||v.push(\"~=\"),(t=C.createElement(\"input\")).setAttribute(\"name\",\"\"),e.appendChild(t),e.querySelectorAll(\"[name='']\").length||v.push(\"\\\\[\"+M+\"*name\"+M+\"*=\"+M+\"*(?:''|\\\"\\\")\"),e.querySelectorAll(\":checked\").length||v.push(\":checked\"),e.querySelectorAll(\"a#\"+S+\"+*\").length||v.push(\".#.+[+~]\"),e.querySelectorAll(\"\\\\\\f\"),v.push(\"[\\\\r\\\\n\\\\f]\")}),ce(function(e){e.innerHTML=\"<a href='' disabled='disabled'></a><select disabled='disabled'><option/></select>\";var t=C.createElement(\"input\");t.setAttribute(\"type\",\"hidden\"),e.appendChild(t).setAttribute(\"name\",\"D\"),e.querySelectorAll(\"[name=d]\").length&&v.push(\"name\"+M+\"*[*^$|!~]?=\"),2!==e.querySelectorAll(\":enabled\").length&&v.push(\":enabled\",\":disabled\"),a.appendChild(e).disabled=!0,2!==e.querySelectorAll(\":disabled\").length&&v.push(\":enabled\",\":disabled\"),e.querySelectorAll(\"*,:x\"),v.push(\",.*:\")})),(d.matchesSelector=K.test(c=a.matches||a.webkitMatchesSelector||a.mozMatchesSelector||a.oMatchesSelector||a.msMatchesSelector))&&ce(function(e){d.disconnectedMatch=c.call(e,\"*\"),c.call(e,\"[s!='']:x\"),s.push(\"!=\",F)}),v=v.length&&new RegExp(v.join(\"|\")),s=s.length&&new RegExp(s.join(\"|\")),t=K.test(a.compareDocumentPosition),y=t||K.test(a.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},j=t?function(e,t){if(e===t)return l=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!d.sortDetached&&t.compareDocumentPosition(e)===n?e==C||e.ownerDocument==p&&y(p,e)?-1:t==C||t.ownerDocument==p&&y(p,t)?1:u?P(u,e)-P(u,t):0:4&n?-1:1)}:function(e,t){if(e===t)return l=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],s=[t];if(!i||!o)return e==C?-1:t==C?1:i?-1:o?1:u?P(u,e)-P(u,t):0;if(i===o)return pe(e,t);n=e;while(n=n.parentNode)a.unshift(n);n=t;while(n=n.parentNode)s.unshift(n);while(a[r]===s[r])r++;return r?pe(a[r],s[r]):a[r]==p?-1:s[r]==p?1:0}),C},se.matches=function(e,t){return se(e,null,null,t)},se.matchesSelector=function(e,t){if(T(e),d.matchesSelector&&E&&!N[t+\" \"]&&(!s||!s.test(t))&&(!v||!v.test(t)))try{var n=c.call(e,t);if(n||d.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){N(t,!0)}return 0<se(t,C,null,[e]).length},se.contains=function(e,t){return(e.ownerDocument||e)!=C&&T(e),y(e,t)},se.attr=function(e,t){(e.ownerDocument||e)!=C&&T(e);var n=b.attrHandle[t.toLowerCase()],r=n&&D.call(b.attrHandle,t.toLowerCase())?n(e,t,!E):void 0;return void 0!==r?r:d.attributes||!E?e.getAttribute(t):(r=e.getAttributeNode(t))&&r.specified?r.value:null},se.escape=function(e){return(e+\"\").replace(re,ie)},se.error=function(e){throw new Error(\"Syntax error, unrecognized expression: \"+e)},se.uniqueSort=function(e){var t,n=[],r=0,i=0;if(l=!d.detectDuplicates,u=!d.sortStable&&e.slice(0),e.sort(j),l){while(t=e[i++])t===e[i]&&(r=n.push(i));while(r--)e.splice(n[r],1)}return u=null,e},o=se.getText=function(e){var t,n=\"\",r=0,i=e.nodeType;if(i){if(1===i||9===i||11===i){if(\"string\"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=o(e)}else if(3===i||4===i)return e.nodeValue}else while(t=e[r++])n+=o(t);return n},(b=se.selectors={cacheLength:50,createPseudo:le,match:G,attrHandle:{},find:{},relative:{\">\":{dir:\"parentNode\",first:!0},\" \":{dir:\"parentNode\"},\"+\":{dir:\"previousSibling\",first:!0},\"~\":{dir:\"previousSibling\"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(te,ne),e[3]=(e[3]||e[4]||e[5]||\"\").replace(te,ne),\"~=\"===e[2]&&(e[3]=\" \"+e[3]+\" \"),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),\"nth\"===e[1].slice(0,3)?(e[3]||se.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*(\"even\"===e[3]||\"odd\"===e[3])),e[5]=+(e[7]+e[8]||\"odd\"===e[3])):e[3]&&se.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return G.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||\"\":n&&X.test(n)&&(t=h(n,!0))&&(t=n.indexOf(\")\",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(te,ne).toLowerCase();return\"*\"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=m[e+\" \"];return t||(t=new RegExp(\"(^|\"+M+\")\"+e+\"(\"+M+\"|$)\"))&&m(e,function(e){return t.test(\"string\"==typeof e.className&&e.className||\"undefined\"!=typeof e.getAttribute&&e.getAttribute(\"class\")||\"\")})},ATTR:function(n,r,i){return function(e){var t=se.attr(e,n);return null==t?\"!=\"===r:!r||(t+=\"\",\"=\"===r?t===i:\"!=\"===r?t!==i:\"^=\"===r?i&&0===t.indexOf(i):\"*=\"===r?i&&-1<t.indexOf(i):\"$=\"===r?i&&t.slice(-i.length)===i:\"~=\"===r?-1<(\" \"+t.replace(B,\" \")+\" \").indexOf(i):\"|=\"===r&&(t===i||t.slice(0,i.length+1)===i+\"-\"))}},CHILD:function(h,e,t,g,v){var y=\"nth\"!==h.slice(0,3),m=\"last\"!==h.slice(-4),x=\"of-type\"===e;return 1===g&&0===v?function(e){return!!e.parentNode}:function(e,t,n){var r,i,o,a,s,u,l=y!==m?\"nextSibling\":\"previousSibling\",c=e.parentNode,f=x&&e.nodeName.toLowerCase(),p=!n&&!x,d=!1;if(c){if(y){while(l){a=e;while(a=a[l])if(x?a.nodeName.toLowerCase()===f:1===a.nodeType)return!1;u=l=\"only\"===h&&!u&&\"nextSibling\"}return!0}if(u=[m?c.firstChild:c.lastChild],m&&p){d=(s=(r=(i=(o=(a=c)[S]||(a[S]={}))[a.uniqueID]||(o[a.uniqueID]={}))[h]||[])[0]===k&&r[1])&&r[2],a=s&&c.childNodes[s];while(a=++s&&a&&a[l]||(d=s=0)||u.pop())if(1===a.nodeType&&++d&&a===e){i[h]=[k,s,d];break}}else if(p&&(d=s=(r=(i=(o=(a=e)[S]||(a[S]={}))[a.uniqueID]||(o[a.uniqueID]={}))[h]||[])[0]===k&&r[1]),!1===d)while(a=++s&&a&&a[l]||(d=s=0)||u.pop())if((x?a.nodeName.toLowerCase()===f:1===a.nodeType)&&++d&&(p&&((i=(o=a[S]||(a[S]={}))[a.uniqueID]||(o[a.uniqueID]={}))[h]=[k,d]),a===e))break;return(d-=v)===g||d%g==0&&0<=d/g}}},PSEUDO:function(e,o){var t,a=b.pseudos[e]||b.setFilters[e.toLowerCase()]||se.error(\"unsupported pseudo: \"+e);return a[S]?a(o):1<a.length?(t=[e,e,\"\",o],b.setFilters.hasOwnProperty(e.toLowerCase())?le(function(e,t){var n,r=a(e,o),i=r.length;while(i--)e[n=P(e,r[i])]=!(t[n]=r[i])}):function(e){return a(e,0,t)}):a}},pseudos:{not:le(function(e){var r=[],i=[],s=f(e.replace($,\"$1\"));return s[S]?le(function(e,t,n,r){var i,o=s(e,null,r,[]),a=e.length;while(a--)(i=o[a])&&(e[a]=!(t[a]=i))}):function(e,t,n){return r[0]=e,s(r,null,n,i),r[0]=null,!i.pop()}}),has:le(function(t){return function(e){return 0<se(t,e).length}}),contains:le(function(t){return t=t.replace(te,ne),function(e){return-1<(e.textContent||o(e)).indexOf(t)}}),lang:le(function(n){return V.test(n||\"\")||se.error(\"unsupported lang: \"+n),n=n.replace(te,ne).toLowerCase(),function(e){var t;do{if(t=E?e.lang:e.getAttribute(\"xml:lang\")||e.getAttribute(\"lang\"))return(t=t.toLowerCase())===n||0===t.indexOf(n+\"-\")}while((e=e.parentNode)&&1===e.nodeType);return!1}}),target:function(e){var t=n.location&&n.location.hash;return t&&t.slice(1)===e.id},root:function(e){return e===a},focus:function(e){return e===C.activeElement&&(!C.hasFocus||C.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:ge(!1),disabled:ge(!0),checked:function(e){var t=e.nodeName.toLowerCase();return\"input\"===t&&!!e.checked||\"option\"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!b.pseudos.empty(e)},header:function(e){return J.test(e.nodeName)},input:function(e){return Q.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return\"input\"===t&&\"button\"===e.type||\"button\"===t},text:function(e){var t;return\"input\"===e.nodeName.toLowerCase()&&\"text\"===e.type&&(null==(t=e.getAttribute(\"type\"))||\"text\"===t.toLowerCase())},first:ve(function(){return[0]}),last:ve(function(e,t){return[t-1]}),eq:ve(function(e,t,n){return[n<0?n+t:n]}),even:ve(function(e,t){for(var n=0;n<t;n+=2)e.push(n);return e}),odd:ve(function(e,t){for(var n=1;n<t;n+=2)e.push(n);return e}),lt:ve(function(e,t,n){for(var r=n<0?n+t:t<n?t:n;0<=--r;)e.push(r);return e}),gt:ve(function(e,t,n){for(var r=n<0?n+t:n;++r<t;)e.push(r);return e})}}).pseudos.nth=b.pseudos.eq,{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})b.pseudos[e]=de(e);for(e in{submit:!0,reset:!0})b.pseudos[e]=he(e);function me(){}function xe(e){for(var t=0,n=e.length,r=\"\";t<n;t++)r+=e[t].value;return r}function be(s,e,t){var u=e.dir,l=e.next,c=l||u,f=t&&\"parentNode\"===c,p=r++;return e.first?function(e,t,n){while(e=e[u])if(1===e.nodeType||f)return s(e,t,n);return!1}:function(e,t,n){var r,i,o,a=[k,p];if(n){while(e=e[u])if((1===e.nodeType||f)&&s(e,t,n))return!0}else while(e=e[u])if(1===e.nodeType||f)if(i=(o=e[S]||(e[S]={}))[e.uniqueID]||(o[e.uniqueID]={}),l&&l===e.nodeName.toLowerCase())e=e[u]||e;else{if((r=i[c])&&r[0]===k&&r[1]===p)return a[2]=r[2];if((i[c]=a)[2]=s(e,t,n))return!0}return!1}}function we(i){return 1<i.length?function(e,t,n){var r=i.length;while(r--)if(!i[r](e,t,n))return!1;return!0}:i[0]}function Te(e,t,n,r,i){for(var o,a=[],s=0,u=e.length,l=null!=t;s<u;s++)(o=e[s])&&(n&&!n(o,r,i)||(a.push(o),l&&t.push(s)));return a}function Ce(d,h,g,v,y,e){return v&&!v[S]&&(v=Ce(v)),y&&!y[S]&&(y=Ce(y,e)),le(function(e,t,n,r){var i,o,a,s=[],u=[],l=t.length,c=e||function(e,t,n){for(var r=0,i=t.length;r<i;r++)se(e,t[r],n);return n}(h||\"*\",n.nodeType?[n]:n,[]),f=!d||!e&&h?c:Te(c,s,d,n,r),p=g?y||(e?d:l||v)?[]:t:f;if(g&&g(f,p,n,r),v){i=Te(p,u),v(i,[],n,r),o=i.length;while(o--)(a=i[o])&&(p[u[o]]=!(f[u[o]]=a))}if(e){if(y||d){if(y){i=[],o=p.length;while(o--)(a=p[o])&&i.push(f[o]=a);y(null,p=[],i,r)}o=p.length;while(o--)(a=p[o])&&-1<(i=y?P(e,a):s[o])&&(e[i]=!(t[i]=a))}}else p=Te(p===t?p.splice(l,p.length):p),y?y(null,t,p,r):H.apply(t,p)})}function Ee(e){for(var i,t,n,r=e.length,o=b.relative[e[0].type],a=o||b.relative[\" \"],s=o?1:0,u=be(function(e){return e===i},a,!0),l=be(function(e){return-1<P(i,e)},a,!0),c=[function(e,t,n){var r=!o&&(n||t!==w)||((i=t).nodeType?u(e,t,n):l(e,t,n));return i=null,r}];s<r;s++)if(t=b.relative[e[s].type])c=[be(we(c),t)];else{if((t=b.filter[e[s].type].apply(null,e[s].matches))[S]){for(n=++s;n<r;n++)if(b.relative[e[n].type])break;return Ce(1<s&&we(c),1<s&&xe(e.slice(0,s-1).concat({value:\" \"===e[s-2].type?\"*\":\"\"})).replace($,\"$1\"),t,s<n&&Ee(e.slice(s,n)),n<r&&Ee(e=e.slice(n)),n<r&&xe(e))}c.push(t)}return we(c)}return me.prototype=b.filters=b.pseudos,b.setFilters=new me,h=se.tokenize=function(e,t){var n,r,i,o,a,s,u,l=x[e+\" \"];if(l)return t?0:l.slice(0);a=e,s=[],u=b.preFilter;while(a){for(o in n&&!(r=_.exec(a))||(r&&(a=a.slice(r[0].length)||a),s.push(i=[])),n=!1,(r=z.exec(a))&&(n=r.shift(),i.push({value:n,type:r[0].replace($,\" \")}),a=a.slice(n.length)),b.filter)!(r=G[o].exec(a))||u[o]&&!(r=u[o](r))||(n=r.shift(),i.push({value:n,type:o,matches:r}),a=a.slice(n.length));if(!n)break}return t?a.length:a?se.error(e):x(e,s).slice(0)},f=se.compile=function(e,t){var n,v,y,m,x,r,i=[],o=[],a=A[e+\" \"];if(!a){t||(t=h(e)),n=t.length;while(n--)(a=Ee(t[n]))[S]?i.push(a):o.push(a);(a=A(e,(v=o,m=0<(y=i).length,x=0<v.length,r=function(e,t,n,r,i){var o,a,s,u=0,l=\"0\",c=e&&[],f=[],p=w,d=e||x&&b.find.TAG(\"*\",i),h=k+=null==p?1:Math.random()||.1,g=d.length;for(i&&(w=t==C||t||i);l!==g&&null!=(o=d[l]);l++){if(x&&o){a=0,t||o.ownerDocument==C||(T(o),n=!E);while(s=v[a++])if(s(o,t||C,n)){r.push(o);break}i&&(k=h)}m&&((o=!s&&o)&&u--,e&&c.push(o))}if(u+=l,m&&l!==u){a=0;while(s=y[a++])s(c,f,t,n);if(e){if(0<u)while(l--)c[l]||f[l]||(f[l]=q.call(r));f=Te(f)}H.apply(r,f),i&&!e&&0<f.length&&1<u+y.length&&se.uniqueSort(r)}return i&&(k=h,w=p),c},m?le(r):r))).selector=e}return a},g=se.select=function(e,t,n,r){var i,o,a,s,u,l=\"function\"==typeof e&&e,c=!r&&h(e=l.selector||e);if(n=n||[],1===c.length){if(2<(o=c[0]=c[0].slice(0)).length&&\"ID\"===(a=o[0]).type&&9===t.nodeType&&E&&b.relative[o[1].type]){if(!(t=(b.find.ID(a.matches[0].replace(te,ne),t)||[])[0]))return n;l&&(t=t.parentNode),e=e.slice(o.shift().value.length)}i=G.needsContext.test(e)?0:o.length;while(i--){if(a=o[i],b.relative[s=a.type])break;if((u=b.find[s])&&(r=u(a.matches[0].replace(te,ne),ee.test(o[0].type)&&ye(t.parentNode)||t))){if(o.splice(i,1),!(e=r.length&&xe(o)))return H.apply(n,r),n;break}}}return(l||f(e,c))(r,t,!E,n,!t||ee.test(e)&&ye(t.parentNode)||t),n},d.sortStable=S.split(\"\").sort(j).join(\"\")===S,d.detectDuplicates=!!l,T(),d.sortDetached=ce(function(e){return 1&e.compareDocumentPosition(C.createElement(\"fieldset\"))}),ce(function(e){return e.innerHTML=\"<a href='#'></a>\",\"#\"===e.firstChild.getAttribute(\"href\")})||fe(\"type|href|height|width\",function(e,t,n){if(!n)return e.getAttribute(t,\"type\"===t.toLowerCase()?1:2)}),d.attributes&&ce(function(e){return e.innerHTML=\"<input/>\",e.firstChild.setAttribute(\"value\",\"\"),\"\"===e.firstChild.getAttribute(\"value\")})||fe(\"value\",function(e,t,n){if(!n&&\"input\"===e.nodeName.toLowerCase())return e.defaultValue}),ce(function(e){return null==e.getAttribute(\"disabled\")})||fe(R,function(e,t,n){var r;if(!n)return!0===e[t]?t.toLowerCase():(r=e.getAttributeNode(t))&&r.specified?r.value:null}),se}(C);S.find=d,S.expr=d.selectors,S.expr[\":\"]=S.expr.pseudos,S.uniqueSort=S.unique=d.uniqueSort,S.text=d.getText,S.isXMLDoc=d.isXML,S.contains=d.contains,S.escapeSelector=d.escape;var h=function(e,t,n){var r=[],i=void 0!==n;while((e=e[t])&&9!==e.nodeType)if(1===e.nodeType){if(i&&S(e).is(n))break;r.push(e)}return r},T=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},k=S.expr.match.needsContext;function A(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}var N=/^<([a-z][^\\/\\0>:\\x20\\t\\r\\n\\f]*)[\\x20\\t\\r\\n\\f]*\\/?>(?:<\\/\\1>|)$/i;function j(e,n,r){return m(n)?S.grep(e,function(e,t){return!!n.call(e,t,e)!==r}):n.nodeType?S.grep(e,function(e){return e===n!==r}):\"string\"!=typeof n?S.grep(e,function(e){return-1<i.call(n,e)!==r}):S.filter(n,e,r)}S.filter=function(e,t,n){var r=t[0];return n&&(e=\":not(\"+e+\")\"),1===t.length&&1===r.nodeType?S.find.matchesSelector(r,e)?[r]:[]:S.find.matches(e,S.grep(t,function(e){return 1===e.nodeType}))},S.fn.extend({find:function(e){var t,n,r=this.length,i=this;if(\"string\"!=typeof e)return this.pushStack(S(e).filter(function(){for(t=0;t<r;t++)if(S.contains(i[t],this))return!0}));for(n=this.pushStack([]),t=0;t<r;t++)S.find(e,i[t],n);return 1<r?S.uniqueSort(n):n},filter:function(e){return this.pushStack(j(this,e||[],!1))},not:function(e){return this.pushStack(j(this,e||[],!0))},is:function(e){return!!j(this,\"string\"==typeof e&&k.test(e)?S(e):e||[],!1).length}});var D,q=/^(?:\\s*(<[\\w\\W]+>)[^>]*|#([\\w-]+))$/;(S.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||D,\"string\"==typeof e){if(!(r=\"<\"===e[0]&&\">\"===e[e.length-1]&&3<=e.length?[null,e,null]:q.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof S?t[0]:t,S.merge(this,S.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:E,!0)),N.test(r[1])&&S.isPlainObject(t))for(r in t)m(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=E.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):m(e)?void 0!==n.ready?n.ready(e):e(S):S.makeArray(e,this)}).prototype=S.fn,D=S(E);var L=/^(?:parents|prev(?:Until|All))/,H={children:!0,contents:!0,next:!0,prev:!0};function O(e,t){while((e=e[t])&&1!==e.nodeType);return e}S.fn.extend({has:function(e){var t=S(e,this),n=t.length;return this.filter(function(){for(var e=0;e<n;e++)if(S.contains(this,t[e]))return!0})},closest:function(e,t){var n,r=0,i=this.length,o=[],a=\"string\"!=typeof e&&S(e);if(!k.test(e))for(;r<i;r++)for(n=this[r];n&&n!==t;n=n.parentNode)if(n.nodeType<11&&(a?-1<a.index(n):1===n.nodeType&&S.find.matchesSelector(n,e))){o.push(n);break}return this.pushStack(1<o.length?S.uniqueSort(o):o)},index:function(e){return e?\"string\"==typeof e?i.call(S(e),this[0]):i.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(S.uniqueSort(S.merge(this.get(),S(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),S.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return h(e,\"parentNode\")},parentsUntil:function(e,t,n){return h(e,\"parentNode\",n)},next:function(e){return O(e,\"nextSibling\")},prev:function(e){return O(e,\"previousSibling\")},nextAll:function(e){return h(e,\"nextSibling\")},prevAll:function(e){return h(e,\"previousSibling\")},nextUntil:function(e,t,n){return h(e,\"nextSibling\",n)},prevUntil:function(e,t,n){return h(e,\"previousSibling\",n)},siblings:function(e){return T((e.parentNode||{}).firstChild,e)},children:function(e){return T(e.firstChild)},contents:function(e){return null!=e.contentDocument&&r(e.contentDocument)?e.contentDocument:(A(e,\"template\")&&(e=e.content||e),S.merge([],e.childNodes))}},function(r,i){S.fn[r]=function(e,t){var n=S.map(this,i,e);return\"Until\"!==r.slice(-5)&&(t=e),t&&\"string\"==typeof t&&(n=S.filter(t,n)),1<this.length&&(H[r]||S.uniqueSort(n),L.test(r)&&n.reverse()),this.pushStack(n)}});var P=/[^\\x20\\t\\r\\n\\f]+/g;function R(e){return e}function M(e){throw e}function I(e,t,n,r){var i;try{e&&m(i=e.promise)?i.call(e).done(t).fail(n):e&&m(i=e.then)?i.call(e,t,n):t.apply(void 0,[e].slice(r))}catch(e){n.apply(void 0,[e])}}S.Callbacks=function(r){var e,n;r=\"string\"==typeof r?(e=r,n={},S.each(e.match(P)||[],function(e,t){n[t]=!0}),n):S.extend({},r);var i,t,o,a,s=[],u=[],l=-1,c=function(){for(a=a||r.once,o=i=!0;u.length;l=-1){t=u.shift();while(++l<s.length)!1===s[l].apply(t[0],t[1])&&r.stopOnFalse&&(l=s.length,t=!1)}r.memory||(t=!1),i=!1,a&&(s=t?[]:\"\")},f={add:function(){return s&&(t&&!i&&(l=s.length-1,u.push(t)),function n(e){S.each(e,function(e,t){m(t)?r.unique&&f.has(t)||s.push(t):t&&t.length&&\"string\"!==w(t)&&n(t)})}(arguments),t&&!i&&c()),this},remove:function(){return S.each(arguments,function(e,t){var n;while(-1<(n=S.inArray(t,s,n)))s.splice(n,1),n<=l&&l--}),this},has:function(e){return e?-1<S.inArray(e,s):0<s.length},empty:function(){return s&&(s=[]),this},disable:function(){return a=u=[],s=t=\"\",this},disabled:function(){return!s},lock:function(){return a=u=[],t||i||(s=t=\"\"),this},locked:function(){return!!a},fireWith:function(e,t){return a||(t=[e,(t=t||[]).slice?t.slice():t],u.push(t),i||c()),this},fire:function(){return f.fireWith(this,arguments),this},fired:function(){return!!o}};return f},S.extend({Deferred:function(e){var o=[[\"notify\",\"progress\",S.Callbacks(\"memory\"),S.Callbacks(\"memory\"),2],[\"resolve\",\"done\",S.Callbacks(\"once memory\"),S.Callbacks(\"once memory\"),0,\"resolved\"],[\"reject\",\"fail\",S.Callbacks(\"once memory\"),S.Callbacks(\"once memory\"),1,\"rejected\"]],i=\"pending\",a={state:function(){return i},always:function(){return s.done(arguments).fail(arguments),this},\"catch\":function(e){return a.then(null,e)},pipe:function(){var i=arguments;return S.Deferred(function(r){S.each(o,function(e,t){var n=m(i[t[4]])&&i[t[4]];s[t[1]](function(){var e=n&&n.apply(this,arguments);e&&m(e.promise)?e.promise().progress(r.notify).done(r.resolve).fail(r.reject):r[t[0]+\"With\"](this,n?[e]:arguments)})}),i=null}).promise()},then:function(t,n,r){var u=0;function l(i,o,a,s){return function(){var n=this,r=arguments,e=function(){var e,t;if(!(i<u)){if((e=a.apply(n,r))===o.promise())throw new TypeError(\"Thenable self-resolution\");t=e&&(\"object\"==typeof e||\"function\"==typeof e)&&e.then,m(t)?s?t.call(e,l(u,o,R,s),l(u,o,M,s)):(u++,t.call(e,l(u,o,R,s),l(u,o,M,s),l(u,o,R,o.notifyWith))):(a!==R&&(n=void 0,r=[e]),(s||o.resolveWith)(n,r))}},t=s?e:function(){try{e()}catch(e){S.Deferred.exceptionHook&&S.Deferred.exceptionHook(e,t.stackTrace),u<=i+1&&(a!==M&&(n=void 0,r=[e]),o.rejectWith(n,r))}};i?t():(S.Deferred.getStackHook&&(t.stackTrace=S.Deferred.getStackHook()),C.setTimeout(t))}}return S.Deferred(function(e){o[0][3].add(l(0,e,m(r)?r:R,e.notifyWith)),o[1][3].add(l(0,e,m(t)?t:R)),o[2][3].add(l(0,e,m(n)?n:M))}).promise()},promise:function(e){return null!=e?S.extend(e,a):a}},s={};return S.each(o,function(e,t){var n=t[2],r=t[5];a[t[1]]=n.add,r&&n.add(function(){i=r},o[3-e][2].disable,o[3-e][3].disable,o[0][2].lock,o[0][3].lock),n.add(t[3].fire),s[t[0]]=function(){return s[t[0]+\"With\"](this===s?void 0:this,arguments),this},s[t[0]+\"With\"]=n.fireWith}),a.promise(s),e&&e.call(s,s),s},when:function(e){var n=arguments.length,t=n,r=Array(t),i=s.call(arguments),o=S.Deferred(),a=function(t){return function(e){r[t]=this,i[t]=1<arguments.length?s.call(arguments):e,--n||o.resolveWith(r,i)}};if(n<=1&&(I(e,o.done(a(t)).resolve,o.reject,!n),\"pending\"===o.state()||m(i[t]&&i[t].then)))return o.then();while(t--)I(i[t],a(t),o.reject);return o.promise()}});var W=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;S.Deferred.exceptionHook=function(e,t){C.console&&C.console.warn&&e&&W.test(e.name)&&C.console.warn(\"jQuery.Deferred exception: \"+e.message,e.stack,t)},S.readyException=function(e){C.setTimeout(function(){throw e})};var F=S.Deferred();function B(){E.removeEventListener(\"DOMContentLoaded\",B),C.removeEventListener(\"load\",B),S.ready()}S.fn.ready=function(e){return F.then(e)[\"catch\"](function(e){S.readyException(e)}),this},S.extend({isReady:!1,readyWait:1,ready:function(e){(!0===e?--S.readyWait:S.isReady)||(S.isReady=!0)!==e&&0<--S.readyWait||F.resolveWith(E,[S])}}),S.ready.then=F.then,\"complete\"===E.readyState||\"loading\"!==E.readyState&&!E.documentElement.doScroll?C.setTimeout(S.ready):(E.addEventListener(\"DOMContentLoaded\",B),C.addEventListener(\"load\",B));var $=function(e,t,n,r,i,o,a){var s=0,u=e.length,l=null==n;if(\"object\"===w(n))for(s in i=!0,n)$(e,t,s,n[s],!0,o,a);else if(void 0!==r&&(i=!0,m(r)||(a=!0),l&&(a?(t.call(e,r),t=null):(l=t,t=function(e,t,n){return l.call(S(e),n)})),t))for(;s<u;s++)t(e[s],n,a?r:r.call(e[s],s,t(e[s],n)));return i?e:l?t.call(e):u?t(e[0],n):o},_=/^-ms-/,z=/-([a-z])/g;function U(e,t){return t.toUpperCase()}function X(e){return e.replace(_,\"ms-\").replace(z,U)}var V=function(e){return 1===e.nodeType||9===e.nodeType||!+e.nodeType};function G(){this.expando=S.expando+G.uid++}G.uid=1,G.prototype={cache:function(e){var t=e[this.expando];return t||(t={},V(e)&&(e.nodeType?e[this.expando]=t:Object.defineProperty(e,this.expando,{value:t,configurable:!0}))),t},set:function(e,t,n){var r,i=this.cache(e);if(\"string\"==typeof t)i[X(t)]=n;else for(r in t)i[X(r)]=t[r];return i},get:function(e,t){return void 0===t?this.cache(e):e[this.expando]&&e[this.expando][X(t)]},access:function(e,t,n){return void 0===t||t&&\"string\"==typeof t&&void 0===n?this.get(e,t):(this.set(e,t,n),void 0!==n?n:t)},remove:function(e,t){var n,r=e[this.expando];if(void 0!==r){if(void 0!==t){n=(t=Array.isArray(t)?t.map(X):(t=X(t))in r?[t]:t.match(P)||[]).length;while(n--)delete r[t[n]]}(void 0===t||S.isEmptyObject(r))&&(e.nodeType?e[this.expando]=void 0:delete e[this.expando])}},hasData:function(e){var t=e[this.expando];return void 0!==t&&!S.isEmptyObject(t)}};var Y=new G,Q=new G,J=/^(?:\\{[\\w\\W]*\\}|\\[[\\w\\W]*\\])$/,K=/[A-Z]/g;function Z(e,t,n){var r,i;if(void 0===n&&1===e.nodeType)if(r=\"data-\"+t.replace(K,\"-$&\").toLowerCase(),\"string\"==typeof(n=e.getAttribute(r))){try{n=\"true\"===(i=n)||\"false\"!==i&&(\"null\"===i?null:i===+i+\"\"?+i:J.test(i)?JSON.parse(i):i)}catch(e){}Q.set(e,t,n)}else n=void 0;return n}S.extend({hasData:function(e){return Q.hasData(e)||Y.hasData(e)},data:function(e,t,n){return Q.access(e,t,n)},removeData:function(e,t){Q.remove(e,t)},_data:function(e,t,n){return Y.access(e,t,n)},_removeData:function(e,t){Y.remove(e,t)}}),S.fn.extend({data:function(n,e){var t,r,i,o=this[0],a=o&&o.attributes;if(void 0===n){if(this.length&&(i=Q.get(o),1===o.nodeType&&!Y.get(o,\"hasDataAttrs\"))){t=a.length;while(t--)a[t]&&0===(r=a[t].name).indexOf(\"data-\")&&(r=X(r.slice(5)),Z(o,r,i[r]));Y.set(o,\"hasDataAttrs\",!0)}return i}return\"object\"==typeof n?this.each(function(){Q.set(this,n)}):$(this,function(e){var t;if(o&&void 0===e)return void 0!==(t=Q.get(o,n))?t:void 0!==(t=Z(o,n))?t:void 0;this.each(function(){Q.set(this,n,e)})},null,e,1<arguments.length,null,!0)},removeData:function(e){return this.each(function(){Q.remove(this,e)})}}),S.extend({queue:function(e,t,n){var r;if(e)return t=(t||\"fx\")+\"queue\",r=Y.get(e,t),n&&(!r||Array.isArray(n)?r=Y.access(e,t,S.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||\"fx\";var n=S.queue(e,t),r=n.length,i=n.shift(),o=S._queueHooks(e,t);\"inprogress\"===i&&(i=n.shift(),r--),i&&(\"fx\"===t&&n.unshift(\"inprogress\"),delete o.stop,i.call(e,function(){S.dequeue(e,t)},o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+\"queueHooks\";return Y.get(e,n)||Y.access(e,n,{empty:S.Callbacks(\"once memory\").add(function(){Y.remove(e,[t+\"queue\",n])})})}}),S.fn.extend({queue:function(t,n){var e=2;return\"string\"!=typeof t&&(n=t,t=\"fx\",e--),arguments.length<e?S.queue(this[0],t):void 0===n?this:this.each(function(){var e=S.queue(this,t,n);S._queueHooks(this,t),\"fx\"===t&&\"inprogress\"!==e[0]&&S.dequeue(this,t)})},dequeue:function(e){return this.each(function(){S.dequeue(this,e)})},clearQueue:function(e){return this.queue(e||\"fx\",[])},promise:function(e,t){var n,r=1,i=S.Deferred(),o=this,a=this.length,s=function(){--r||i.resolveWith(o,[o])};\"string\"!=typeof e&&(t=e,e=void 0),e=e||\"fx\";while(a--)(n=Y.get(o[a],e+\"queueHooks\"))&&n.empty&&(r++,n.empty.add(s));return s(),i.promise(t)}});var ee=/[+-]?(?:\\d*\\.|)\\d+(?:[eE][+-]?\\d+|)/.source,te=new RegExp(\"^(?:([+-])=|)(\"+ee+\")([a-z%]*)$\",\"i\"),ne=[\"Top\",\"Right\",\"Bottom\",\"Left\"],re=E.documentElement,ie=function(e){return S.contains(e.ownerDocument,e)},oe={composed:!0};re.getRootNode&&(ie=function(e){return S.contains(e.ownerDocument,e)||e.getRootNode(oe)===e.ownerDocument});var ae=function(e,t){return\"none\"===(e=t||e).style.display||\"\"===e.style.display&&ie(e)&&\"none\"===S.css(e,\"display\")};function se(e,t,n,r){var i,o,a=20,s=r?function(){return r.cur()}:function(){return S.css(e,t,\"\")},u=s(),l=n&&n[3]||(S.cssNumber[t]?\"\":\"px\"),c=e.nodeType&&(S.cssNumber[t]||\"px\"!==l&&+u)&&te.exec(S.css(e,t));if(c&&c[3]!==l){u/=2,l=l||c[3],c=+u||1;while(a--)S.style(e,t,c+l),(1-o)*(1-(o=s()/u||.5))<=0&&(a=0),c/=o;c*=2,S.style(e,t,c+l),n=n||[]}return n&&(c=+c||+u||0,i=n[1]?c+(n[1]+1)*n[2]:+n[2],r&&(r.unit=l,r.start=c,r.end=i)),i}var ue={};function le(e,t){for(var n,r,i,o,a,s,u,l=[],c=0,f=e.length;c<f;c++)(r=e[c]).style&&(n=r.style.display,t?(\"none\"===n&&(l[c]=Y.get(r,\"display\")||null,l[c]||(r.style.display=\"\")),\"\"===r.style.display&&ae(r)&&(l[c]=(u=a=o=void 0,a=(i=r).ownerDocument,s=i.nodeName,(u=ue[s])||(o=a.body.appendChild(a.createElement(s)),u=S.css(o,\"display\"),o.parentNode.removeChild(o),\"none\"===u&&(u=\"block\"),ue[s]=u)))):\"none\"!==n&&(l[c]=\"none\",Y.set(r,\"display\",n)));for(c=0;c<f;c++)null!=l[c]&&(e[c].style.display=l[c]);return e}S.fn.extend({show:function(){return le(this,!0)},hide:function(){return le(this)},toggle:function(e){return\"boolean\"==typeof e?e?this.show():this.hide():this.each(function(){ae(this)?S(this).show():S(this).hide()})}});var ce,fe,pe=/^(?:checkbox|radio)$/i,de=/<([a-z][^\\/\\0>\\x20\\t\\r\\n\\f]*)/i,he=/^$|^module$|\\/(?:java|ecma)script/i;ce=E.createDocumentFragment().appendChild(E.createElement(\"div\")),(fe=E.createElement(\"input\")).setAttribute(\"type\",\"radio\"),fe.setAttribute(\"checked\",\"checked\"),fe.setAttribute(\"name\",\"t\"),ce.appendChild(fe),y.checkClone=ce.cloneNode(!0).cloneNode(!0).lastChild.checked,ce.innerHTML=\"<textarea>x</textarea>\",y.noCloneChecked=!!ce.cloneNode(!0).lastChild.defaultValue,ce.innerHTML=\"<option></option>\",y.option=!!ce.lastChild;var ge={thead:[1,\"<table>\",\"</table>\"],col:[2,\"<table><colgroup>\",\"</colgroup></table>\"],tr:[2,\"<table><tbody>\",\"</tbody></table>\"],td:[3,\"<table><tbody><tr>\",\"</tr></tbody></table>\"],_default:[0,\"\",\"\"]};function ve(e,t){var n;return n=\"undefined\"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||\"*\"):\"undefined\"!=typeof e.querySelectorAll?e.querySelectorAll(t||\"*\"):[],void 0===t||t&&A(e,t)?S.merge([e],n):n}function ye(e,t){for(var n=0,r=e.length;n<r;n++)Y.set(e[n],\"globalEval\",!t||Y.get(t[n],\"globalEval\"))}ge.tbody=ge.tfoot=ge.colgroup=ge.caption=ge.thead,ge.th=ge.td,y.option||(ge.optgroup=ge.option=[1,\"<select multiple='multiple'>\",\"</select>\"]);var me=/<|&#?\\w+;/;function xe(e,t,n,r,i){for(var o,a,s,u,l,c,f=t.createDocumentFragment(),p=[],d=0,h=e.length;d<h;d++)if((o=e[d])||0===o)if(\"object\"===w(o))S.merge(p,o.nodeType?[o]:o);else if(me.test(o)){a=a||f.appendChild(t.createElement(\"div\")),s=(de.exec(o)||[\"\",\"\"])[1].toLowerCase(),u=ge[s]||ge._default,a.innerHTML=u[1]+S.htmlPrefilter(o)+u[2],c=u[0];while(c--)a=a.lastChild;S.merge(p,a.childNodes),(a=f.firstChild).textContent=\"\"}else p.push(t.createTextNode(o));f.textContent=\"\",d=0;while(o=p[d++])if(r&&-1<S.inArray(o,r))i&&i.push(o);else if(l=ie(o),a=ve(f.appendChild(o),\"script\"),l&&ye(a),n){c=0;while(o=a[c++])he.test(o.type||\"\")&&n.push(o)}return f}var be=/^([^.]*)(?:\\.(.+)|)/;function we(){return!0}function Te(){return!1}function Ce(e,t){return e===function(){try{return E.activeElement}catch(e){}}()==(\"focus\"===t)}function Ee(e,t,n,r,i,o){var a,s;if(\"object\"==typeof t){for(s in\"string\"!=typeof n&&(r=r||n,n=void 0),t)Ee(e,s,n,r,t[s],o);return e}if(null==r&&null==i?(i=n,r=n=void 0):null==i&&(\"string\"==typeof n?(i=r,r=void 0):(i=r,r=n,n=void 0)),!1===i)i=Te;else if(!i)return e;return 1===o&&(a=i,(i=function(e){return S().off(e),a.apply(this,arguments)}).guid=a.guid||(a.guid=S.guid++)),e.each(function(){S.event.add(this,t,i,r,n)})}function Se(e,i,o){o?(Y.set(e,i,!1),S.event.add(e,i,{namespace:!1,handler:function(e){var t,n,r=Y.get(this,i);if(1&e.isTrigger&&this[i]){if(r.length)(S.event.special[i]||{}).delegateType&&e.stopPropagation();else if(r=s.call(arguments),Y.set(this,i,r),t=o(this,i),this[i](),r!==(n=Y.get(this,i))||t?Y.set(this,i,!1):n={},r!==n)return e.stopImmediatePropagation(),e.preventDefault(),n&&n.value}else r.length&&(Y.set(this,i,{value:S.event.trigger(S.extend(r[0],S.Event.prototype),r.slice(1),this)}),e.stopImmediatePropagation())}})):void 0===Y.get(e,i)&&S.event.add(e,i,we)}S.event={global:{},add:function(t,e,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,v=Y.get(t);if(V(t)){n.handler&&(n=(o=n).handler,i=o.selector),i&&S.find.matchesSelector(re,i),n.guid||(n.guid=S.guid++),(u=v.events)||(u=v.events=Object.create(null)),(a=v.handle)||(a=v.handle=function(e){return\"undefined\"!=typeof S&&S.event.triggered!==e.type?S.event.dispatch.apply(t,arguments):void 0}),l=(e=(e||\"\").match(P)||[\"\"]).length;while(l--)d=g=(s=be.exec(e[l])||[])[1],h=(s[2]||\"\").split(\".\").sort(),d&&(f=S.event.special[d]||{},d=(i?f.delegateType:f.bindType)||d,f=S.event.special[d]||{},c=S.extend({type:d,origType:g,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&S.expr.match.needsContext.test(i),namespace:h.join(\".\")},o),(p=u[d])||((p=u[d]=[]).delegateCount=0,f.setup&&!1!==f.setup.call(t,r,h,a)||t.addEventListener&&t.addEventListener(d,a)),f.add&&(f.add.call(t,c),c.handler.guid||(c.handler.guid=n.guid)),i?p.splice(p.delegateCount++,0,c):p.push(c),S.event.global[d]=!0)}},remove:function(e,t,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,v=Y.hasData(e)&&Y.get(e);if(v&&(u=v.events)){l=(t=(t||\"\").match(P)||[\"\"]).length;while(l--)if(d=g=(s=be.exec(t[l])||[])[1],h=(s[2]||\"\").split(\".\").sort(),d){f=S.event.special[d]||{},p=u[d=(r?f.delegateType:f.bindType)||d]||[],s=s[2]&&new RegExp(\"(^|\\\\.)\"+h.join(\"\\\\.(?:.*\\\\.|)\")+\"(\\\\.|$)\"),a=o=p.length;while(o--)c=p[o],!i&&g!==c.origType||n&&n.guid!==c.guid||s&&!s.test(c.namespace)||r&&r!==c.selector&&(\"**\"!==r||!c.selector)||(p.splice(o,1),c.selector&&p.delegateCount--,f.remove&&f.remove.call(e,c));a&&!p.length&&(f.teardown&&!1!==f.teardown.call(e,h,v.handle)||S.removeEvent(e,d,v.handle),delete u[d])}else for(d in u)S.event.remove(e,d+t[l],n,r,!0);S.isEmptyObject(u)&&Y.remove(e,\"handle events\")}},dispatch:function(e){var t,n,r,i,o,a,s=new Array(arguments.length),u=S.event.fix(e),l=(Y.get(this,\"events\")||Object.create(null))[u.type]||[],c=S.event.special[u.type]||{};for(s[0]=u,t=1;t<arguments.length;t++)s[t]=arguments[t];if(u.delegateTarget=this,!c.preDispatch||!1!==c.preDispatch.call(this,u)){a=S.event.handlers.call(this,u,l),t=0;while((i=a[t++])&&!u.isPropagationStopped()){u.currentTarget=i.elem,n=0;while((o=i.handlers[n++])&&!u.isImmediatePropagationStopped())u.rnamespace&&!1!==o.namespace&&!u.rnamespace.test(o.namespace)||(u.handleObj=o,u.data=o.data,void 0!==(r=((S.event.special[o.origType]||{}).handle||o.handler).apply(i.elem,s))&&!1===(u.result=r)&&(u.preventDefault(),u.stopPropagation()))}return c.postDispatch&&c.postDispatch.call(this,u),u.result}},handlers:function(e,t){var n,r,i,o,a,s=[],u=t.delegateCount,l=e.target;if(u&&l.nodeType&&!(\"click\"===e.type&&1<=e.button))for(;l!==this;l=l.parentNode||this)if(1===l.nodeType&&(\"click\"!==e.type||!0!==l.disabled)){for(o=[],a={},n=0;n<u;n++)void 0===a[i=(r=t[n]).selector+\" \"]&&(a[i]=r.needsContext?-1<S(i,this).index(l):S.find(i,this,null,[l]).length),a[i]&&o.push(r);o.length&&s.push({elem:l,handlers:o})}return l=this,u<t.length&&s.push({elem:l,handlers:t.slice(u)}),s},addProp:function(t,e){Object.defineProperty(S.Event.prototype,t,{enumerable:!0,configurable:!0,get:m(e)?function(){if(this.originalEvent)return e(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[t]},set:function(e){Object.defineProperty(this,t,{enumerable:!0,configurable:!0,writable:!0,value:e})}})},fix:function(e){return e[S.expando]?e:new S.Event(e)},special:{load:{noBubble:!0},click:{setup:function(e){var t=this||e;return pe.test(t.type)&&t.click&&A(t,\"input\")&&Se(t,\"click\",we),!1},trigger:function(e){var t=this||e;return pe.test(t.type)&&t.click&&A(t,\"input\")&&Se(t,\"click\"),!0},_default:function(e){var t=e.target;return pe.test(t.type)&&t.click&&A(t,\"input\")&&Y.get(t,\"click\")||A(t,\"a\")}},beforeunload:{postDispatch:function(e){void 0!==e.result&&e.originalEvent&&(e.originalEvent.returnValue=e.result)}}}},S.removeEvent=function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n)},S.Event=function(e,t){if(!(this instanceof S.Event))return new S.Event(e,t);e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||void 0===e.defaultPrevented&&!1===e.returnValue?we:Te,this.target=e.target&&3===e.target.nodeType?e.target.parentNode:e.target,this.currentTarget=e.currentTarget,this.relatedTarget=e.relatedTarget):this.type=e,t&&S.extend(this,t),this.timeStamp=e&&e.timeStamp||Date.now(),this[S.expando]=!0},S.Event.prototype={constructor:S.Event,isDefaultPrevented:Te,isPropagationStopped:Te,isImmediatePropagationStopped:Te,isSimulated:!1,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=we,e&&!this.isSimulated&&e.preventDefault()},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=we,e&&!this.isSimulated&&e.stopPropagation()},stopImmediatePropagation:function(){var e=this.originalEvent;this.isImmediatePropagationStopped=we,e&&!this.isSimulated&&e.stopImmediatePropagation(),this.stopPropagation()}},S.each({altKey:!0,bubbles:!0,cancelable:!0,changedTouches:!0,ctrlKey:!0,detail:!0,eventPhase:!0,metaKey:!0,pageX:!0,pageY:!0,shiftKey:!0,view:!0,\"char\":!0,code:!0,charCode:!0,key:!0,keyCode:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pointerId:!0,pointerType:!0,screenX:!0,screenY:!0,targetTouches:!0,toElement:!0,touches:!0,which:!0},S.event.addProp),S.each({focus:\"focusin\",blur:\"focusout\"},function(e,t){S.event.special[e]={setup:function(){return Se(this,e,Ce),!1},trigger:function(){return Se(this,e),!0},_default:function(){return!0},delegateType:t}}),S.each({mouseenter:\"mouseover\",mouseleave:\"mouseout\",pointerenter:\"pointerover\",pointerleave:\"pointerout\"},function(e,i){S.event.special[e]={delegateType:i,bindType:i,handle:function(e){var t,n=e.relatedTarget,r=e.handleObj;return n&&(n===this||S.contains(this,n))||(e.type=r.origType,t=r.handler.apply(this,arguments),e.type=i),t}}}),S.fn.extend({on:function(e,t,n,r){return Ee(this,e,t,n,r)},one:function(e,t,n,r){return Ee(this,e,t,n,r,1)},off:function(e,t,n){var r,i;if(e&&e.preventDefault&&e.handleObj)return r=e.handleObj,S(e.delegateTarget).off(r.namespace?r.origType+\".\"+r.namespace:r.origType,r.selector,r.handler),this;if(\"object\"==typeof e){for(i in e)this.off(i,t,e[i]);return this}return!1!==t&&\"function\"!=typeof t||(n=t,t=void 0),!1===n&&(n=Te),this.each(function(){S.event.remove(this,e,n,t)})}});var ke=/<script|<style|<link/i,Ae=/checked\\s*(?:[^=]|=\\s*.checked.)/i,Ne=/^\\s*<!(?:\\[CDATA\\[|--)|(?:\\]\\]|--)>\\s*$/g;function je(e,t){return A(e,\"table\")&&A(11!==t.nodeType?t:t.firstChild,\"tr\")&&S(e).children(\"tbody\")[0]||e}function De(e){return e.type=(null!==e.getAttribute(\"type\"))+\"/\"+e.type,e}function qe(e){return\"true/\"===(e.type||\"\").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute(\"type\"),e}function Le(e,t){var n,r,i,o,a,s;if(1===t.nodeType){if(Y.hasData(e)&&(s=Y.get(e).events))for(i in Y.remove(t,\"handle events\"),s)for(n=0,r=s[i].length;n<r;n++)S.event.add(t,i,s[i][n]);Q.hasData(e)&&(o=Q.access(e),a=S.extend({},o),Q.set(t,a))}}function He(n,r,i,o){r=g(r);var e,t,a,s,u,l,c=0,f=n.length,p=f-1,d=r[0],h=m(d);if(h||1<f&&\"string\"==typeof d&&!y.checkClone&&Ae.test(d))return n.each(function(e){var t=n.eq(e);h&&(r[0]=d.call(this,e,t.html())),He(t,r,i,o)});if(f&&(t=(e=xe(r,n[0].ownerDocument,!1,n,o)).firstChild,1===e.childNodes.length&&(e=t),t||o)){for(s=(a=S.map(ve(e,\"script\"),De)).length;c<f;c++)u=e,c!==p&&(u=S.clone(u,!0,!0),s&&S.merge(a,ve(u,\"script\"))),i.call(n[c],u,c);if(s)for(l=a[a.length-1].ownerDocument,S.map(a,qe),c=0;c<s;c++)u=a[c],he.test(u.type||\"\")&&!Y.access(u,\"globalEval\")&&S.contains(l,u)&&(u.src&&\"module\"!==(u.type||\"\").toLowerCase()?S._evalUrl&&!u.noModule&&S._evalUrl(u.src,{nonce:u.nonce||u.getAttribute(\"nonce\")},l):b(u.textContent.replace(Ne,\"\"),u,l))}return n}function Oe(e,t,n){for(var r,i=t?S.filter(t,e):e,o=0;null!=(r=i[o]);o++)n||1!==r.nodeType||S.cleanData(ve(r)),r.parentNode&&(n&&ie(r)&&ye(ve(r,\"script\")),r.parentNode.removeChild(r));return e}S.extend({htmlPrefilter:function(e){return e},clone:function(e,t,n){var r,i,o,a,s,u,l,c=e.cloneNode(!0),f=ie(e);if(!(y.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||S.isXMLDoc(e)))for(a=ve(c),r=0,i=(o=ve(e)).length;r<i;r++)s=o[r],u=a[r],void 0,\"input\"===(l=u.nodeName.toLowerCase())&&pe.test(s.type)?u.checked=s.checked:\"input\"!==l&&\"textarea\"!==l||(u.defaultValue=s.defaultValue);if(t)if(n)for(o=o||ve(e),a=a||ve(c),r=0,i=o.length;r<i;r++)Le(o[r],a[r]);else Le(e,c);return 0<(a=ve(c,\"script\")).length&&ye(a,!f&&ve(e,\"script\")),c},cleanData:function(e){for(var t,n,r,i=S.event.special,o=0;void 0!==(n=e[o]);o++)if(V(n)){if(t=n[Y.expando]){if(t.events)for(r in t.events)i[r]?S.event.remove(n,r):S.removeEvent(n,r,t.handle);n[Y.expando]=void 0}n[Q.expando]&&(n[Q.expando]=void 0)}}}),S.fn.extend({detach:function(e){return Oe(this,e,!0)},remove:function(e){return Oe(this,e)},text:function(e){return $(this,function(e){return void 0===e?S.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=e)})},null,e,arguments.length)},append:function(){return He(this,arguments,function(e){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||je(this,e).appendChild(e)})},prepend:function(){return He(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=je(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return He(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return He(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(S.cleanData(ve(e,!1)),e.textContent=\"\");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map(function(){return S.clone(this,e,t)})},html:function(e){return $(this,function(e){var t=this[0]||{},n=0,r=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if(\"string\"==typeof e&&!ke.test(e)&&!ge[(de.exec(e)||[\"\",\"\"])[1].toLowerCase()]){e=S.htmlPrefilter(e);try{for(;n<r;n++)1===(t=this[n]||{}).nodeType&&(S.cleanData(ve(t,!1)),t.innerHTML=e);t=0}catch(e){}}t&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var n=[];return He(this,arguments,function(e){var t=this.parentNode;S.inArray(this,n)<0&&(S.cleanData(ve(this)),t&&t.replaceChild(e,this))},n)}}),S.each({appendTo:\"append\",prependTo:\"prepend\",insertBefore:\"before\",insertAfter:\"after\",replaceAll:\"replaceWith\"},function(e,a){S.fn[e]=function(e){for(var t,n=[],r=S(e),i=r.length-1,o=0;o<=i;o++)t=o===i?this:this.clone(!0),S(r[o])[a](t),u.apply(n,t.get());return this.pushStack(n)}});var Pe=new RegExp(\"^(\"+ee+\")(?!px)[a-z%]+$\",\"i\"),Re=function(e){var t=e.ownerDocument.defaultView;return t&&t.opener||(t=C),t.getComputedStyle(e)},Me=function(e,t,n){var r,i,o={};for(i in t)o[i]=e.style[i],e.style[i]=t[i];for(i in r=n.call(e),t)e.style[i]=o[i];return r},Ie=new RegExp(ne.join(\"|\"),\"i\");function We(e,t,n){var r,i,o,a,s=e.style;return(n=n||Re(e))&&(\"\"!==(a=n.getPropertyValue(t)||n[t])||ie(e)||(a=S.style(e,t)),!y.pixelBoxStyles()&&Pe.test(a)&&Ie.test(t)&&(r=s.width,i=s.minWidth,o=s.maxWidth,s.minWidth=s.maxWidth=s.width=a,a=n.width,s.width=r,s.minWidth=i,s.maxWidth=o)),void 0!==a?a+\"\":a}function Fe(e,t){return{get:function(){if(!e())return(this.get=t).apply(this,arguments);delete this.get}}}!function(){function e(){if(l){u.style.cssText=\"position:absolute;left:-11111px;width:60px;margin-top:1px;padding:0;border:0\",l.style.cssText=\"position:relative;display:block;box-sizing:border-box;overflow:scroll;margin:auto;border:1px;padding:1px;width:60%;top:1%\",re.appendChild(u).appendChild(l);var e=C.getComputedStyle(l);n=\"1%\"!==e.top,s=12===t(e.marginLeft),l.style.right=\"60%\",o=36===t(e.right),r=36===t(e.width),l.style.position=\"absolute\",i=12===t(l.offsetWidth/3),re.removeChild(u),l=null}}function t(e){return Math.round(parseFloat(e))}var n,r,i,o,a,s,u=E.createElement(\"div\"),l=E.createElement(\"div\");l.style&&(l.style.backgroundClip=\"content-box\",l.cloneNode(!0).style.backgroundClip=\"\",y.clearCloneStyle=\"content-box\"===l.style.backgroundClip,S.extend(y,{boxSizingReliable:function(){return e(),r},pixelBoxStyles:function(){return e(),o},pixelPosition:function(){return e(),n},reliableMarginLeft:function(){return e(),s},scrollboxSize:function(){return e(),i},reliableTrDimensions:function(){var e,t,n,r;return null==a&&(e=E.createElement(\"table\"),t=E.createElement(\"tr\"),n=E.createElement(\"div\"),e.style.cssText=\"position:absolute;left:-11111px;border-collapse:separate\",t.style.cssText=\"border:1px solid\",t.style.height=\"1px\",n.style.height=\"9px\",n.style.display=\"block\",re.appendChild(e).appendChild(t).appendChild(n),r=C.getComputedStyle(t),a=parseInt(r.height,10)+parseInt(r.borderTopWidth,10)+parseInt(r.borderBottomWidth,10)===t.offsetHeight,re.removeChild(e)),a}}))}();var Be=[\"Webkit\",\"Moz\",\"ms\"],$e=E.createElement(\"div\").style,_e={};function ze(e){var t=S.cssProps[e]||_e[e];return t||(e in $e?e:_e[e]=function(e){var t=e[0].toUpperCase()+e.slice(1),n=Be.length;while(n--)if((e=Be[n]+t)in $e)return e}(e)||e)}var Ue=/^(none|table(?!-c[ea]).+)/,Xe=/^--/,Ve={position:\"absolute\",visibility:\"hidden\",display:\"block\"},Ge={letterSpacing:\"0\",fontWeight:\"400\"};function Ye(e,t,n){var r=te.exec(t);return r?Math.max(0,r[2]-(n||0))+(r[3]||\"px\"):t}function Qe(e,t,n,r,i,o){var a=\"width\"===t?1:0,s=0,u=0;if(n===(r?\"border\":\"content\"))return 0;for(;a<4;a+=2)\"margin\"===n&&(u+=S.css(e,n+ne[a],!0,i)),r?(\"content\"===n&&(u-=S.css(e,\"padding\"+ne[a],!0,i)),\"margin\"!==n&&(u-=S.css(e,\"border\"+ne[a]+\"Width\",!0,i))):(u+=S.css(e,\"padding\"+ne[a],!0,i),\"padding\"!==n?u+=S.css(e,\"border\"+ne[a]+\"Width\",!0,i):s+=S.css(e,\"border\"+ne[a]+\"Width\",!0,i));return!r&&0<=o&&(u+=Math.max(0,Math.ceil(e[\"offset\"+t[0].toUpperCase()+t.slice(1)]-o-u-s-.5))||0),u}function Je(e,t,n){var r=Re(e),i=(!y.boxSizingReliable()||n)&&\"border-box\"===S.css(e,\"boxSizing\",!1,r),o=i,a=We(e,t,r),s=\"offset\"+t[0].toUpperCase()+t.slice(1);if(Pe.test(a)){if(!n)return a;a=\"auto\"}return(!y.boxSizingReliable()&&i||!y.reliableTrDimensions()&&A(e,\"tr\")||\"auto\"===a||!parseFloat(a)&&\"inline\"===S.css(e,\"display\",!1,r))&&e.getClientRects().length&&(i=\"border-box\"===S.css(e,\"boxSizing\",!1,r),(o=s in e)&&(a=e[s])),(a=parseFloat(a)||0)+Qe(e,t,n||(i?\"border\":\"content\"),o,r,a)+\"px\"}function Ke(e,t,n,r,i){return new Ke.prototype.init(e,t,n,r,i)}S.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=We(e,\"opacity\");return\"\"===n?\"1\":n}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{},style:function(e,t,n,r){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var i,o,a,s=X(t),u=Xe.test(t),l=e.style;if(u||(t=ze(s)),a=S.cssHooks[t]||S.cssHooks[s],void 0===n)return a&&\"get\"in a&&void 0!==(i=a.get(e,!1,r))?i:l[t];\"string\"===(o=typeof n)&&(i=te.exec(n))&&i[1]&&(n=se(e,t,i),o=\"number\"),null!=n&&n==n&&(\"number\"!==o||u||(n+=i&&i[3]||(S.cssNumber[s]?\"\":\"px\")),y.clearCloneStyle||\"\"!==n||0!==t.indexOf(\"background\")||(l[t]=\"inherit\"),a&&\"set\"in a&&void 0===(n=a.set(e,n,r))||(u?l.setProperty(t,n):l[t]=n))}},css:function(e,t,n,r){var i,o,a,s=X(t);return Xe.test(t)||(t=ze(s)),(a=S.cssHooks[t]||S.cssHooks[s])&&\"get\"in a&&(i=a.get(e,!0,n)),void 0===i&&(i=We(e,t,r)),\"normal\"===i&&t in Ge&&(i=Ge[t]),\"\"===n||n?(o=parseFloat(i),!0===n||isFinite(o)?o||0:i):i}}),S.each([\"height\",\"width\"],function(e,u){S.cssHooks[u]={get:function(e,t,n){if(t)return!Ue.test(S.css(e,\"display\"))||e.getClientRects().length&&e.getBoundingClientRect().width?Je(e,u,n):Me(e,Ve,function(){return Je(e,u,n)})},set:function(e,t,n){var r,i=Re(e),o=!y.scrollboxSize()&&\"absolute\"===i.position,a=(o||n)&&\"border-box\"===S.css(e,\"boxSizing\",!1,i),s=n?Qe(e,u,n,a,i):0;return a&&o&&(s-=Math.ceil(e[\"offset\"+u[0].toUpperCase()+u.slice(1)]-parseFloat(i[u])-Qe(e,u,\"border\",!1,i)-.5)),s&&(r=te.exec(t))&&\"px\"!==(r[3]||\"px\")&&(e.style[u]=t,t=S.css(e,u)),Ye(0,t,s)}}}),S.cssHooks.marginLeft=Fe(y.reliableMarginLeft,function(e,t){if(t)return(parseFloat(We(e,\"marginLeft\"))||e.getBoundingClientRect().left-Me(e,{marginLeft:0},function(){return e.getBoundingClientRect().left}))+\"px\"}),S.each({margin:\"\",padding:\"\",border:\"Width\"},function(i,o){S.cssHooks[i+o]={expand:function(e){for(var t=0,n={},r=\"string\"==typeof e?e.split(\" \"):[e];t<4;t++)n[i+ne[t]+o]=r[t]||r[t-2]||r[0];return n}},\"margin\"!==i&&(S.cssHooks[i+o].set=Ye)}),S.fn.extend({css:function(e,t){return $(this,function(e,t,n){var r,i,o={},a=0;if(Array.isArray(t)){for(r=Re(e),i=t.length;a<i;a++)o[t[a]]=S.css(e,t[a],!1,r);return o}return void 0!==n?S.style(e,t,n):S.css(e,t)},e,t,1<arguments.length)}}),((S.Tween=Ke).prototype={constructor:Ke,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||S.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(S.cssNumber[n]?\"\":\"px\")},cur:function(){var e=Ke.propHooks[this.prop];return e&&e.get?e.get(this):Ke.propHooks._default.get(this)},run:function(e){var t,n=Ke.propHooks[this.prop];return this.options.duration?this.pos=t=S.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):Ke.propHooks._default.set(this),this}}).init.prototype=Ke.prototype,(Ke.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=S.css(e.elem,e.prop,\"\"))&&\"auto\"!==t?t:0},set:function(e){S.fx.step[e.prop]?S.fx.step[e.prop](e):1!==e.elem.nodeType||!S.cssHooks[e.prop]&&null==e.elem.style[ze(e.prop)]?e.elem[e.prop]=e.now:S.style(e.elem,e.prop,e.now+e.unit)}}}).scrollTop=Ke.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},S.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:\"swing\"},S.fx=Ke.prototype.init,S.fx.step={};var Ze,et,tt,nt,rt=/^(?:toggle|show|hide)$/,it=/queueHooks$/;function ot(){et&&(!1===E.hidden&&C.requestAnimationFrame?C.requestAnimationFrame(ot):C.setTimeout(ot,S.fx.interval),S.fx.tick())}function at(){return C.setTimeout(function(){Ze=void 0}),Ze=Date.now()}function st(e,t){var n,r=0,i={height:e};for(t=t?1:0;r<4;r+=2-t)i[\"margin\"+(n=ne[r])]=i[\"padding\"+n]=e;return t&&(i.opacity=i.width=e),i}function ut(e,t,n){for(var r,i=(lt.tweeners[t]||[]).concat(lt.tweeners[\"*\"]),o=0,a=i.length;o<a;o++)if(r=i[o].call(n,t,e))return r}function lt(o,e,t){var n,a,r=0,i=lt.prefilters.length,s=S.Deferred().always(function(){delete u.elem}),u=function(){if(a)return!1;for(var e=Ze||at(),t=Math.max(0,l.startTime+l.duration-e),n=1-(t/l.duration||0),r=0,i=l.tweens.length;r<i;r++)l.tweens[r].run(n);return s.notifyWith(o,[l,n,t]),n<1&&i?t:(i||s.notifyWith(o,[l,1,0]),s.resolveWith(o,[l]),!1)},l=s.promise({elem:o,props:S.extend({},e),opts:S.extend(!0,{specialEasing:{},easing:S.easing._default},t),originalProperties:e,originalOptions:t,startTime:Ze||at(),duration:t.duration,tweens:[],createTween:function(e,t){var n=S.Tween(o,l.opts,e,t,l.opts.specialEasing[e]||l.opts.easing);return l.tweens.push(n),n},stop:function(e){var t=0,n=e?l.tweens.length:0;if(a)return this;for(a=!0;t<n;t++)l.tweens[t].run(1);return e?(s.notifyWith(o,[l,1,0]),s.resolveWith(o,[l,e])):s.rejectWith(o,[l,e]),this}}),c=l.props;for(!function(e,t){var n,r,i,o,a;for(n in e)if(i=t[r=X(n)],o=e[n],Array.isArray(o)&&(i=o[1],o=e[n]=o[0]),n!==r&&(e[r]=o,delete e[n]),(a=S.cssHooks[r])&&\"expand\"in a)for(n in o=a.expand(o),delete e[r],o)n in e||(e[n]=o[n],t[n]=i);else t[r]=i}(c,l.opts.specialEasing);r<i;r++)if(n=lt.prefilters[r].call(l,o,c,l.opts))return m(n.stop)&&(S._queueHooks(l.elem,l.opts.queue).stop=n.stop.bind(n)),n;return S.map(c,ut,l),m(l.opts.start)&&l.opts.start.call(o,l),l.progress(l.opts.progress).done(l.opts.done,l.opts.complete).fail(l.opts.fail).always(l.opts.always),S.fx.timer(S.extend(u,{elem:o,anim:l,queue:l.opts.queue})),l}S.Animation=S.extend(lt,{tweeners:{\"*\":[function(e,t){var n=this.createTween(e,t);return se(n.elem,e,te.exec(t),n),n}]},tweener:function(e,t){m(e)?(t=e,e=[\"*\"]):e=e.match(P);for(var n,r=0,i=e.length;r<i;r++)n=e[r],lt.tweeners[n]=lt.tweeners[n]||[],lt.tweeners[n].unshift(t)},prefilters:[function(e,t,n){var r,i,o,a,s,u,l,c,f=\"width\"in t||\"height\"in t,p=this,d={},h=e.style,g=e.nodeType&&ae(e),v=Y.get(e,\"fxshow\");for(r in n.queue||(null==(a=S._queueHooks(e,\"fx\")).unqueued&&(a.unqueued=0,s=a.empty.fire,a.empty.fire=function(){a.unqueued||s()}),a.unqueued++,p.always(function(){p.always(function(){a.unqueued--,S.queue(e,\"fx\").length||a.empty.fire()})})),t)if(i=t[r],rt.test(i)){if(delete t[r],o=o||\"toggle\"===i,i===(g?\"hide\":\"show\")){if(\"show\"!==i||!v||void 0===v[r])continue;g=!0}d[r]=v&&v[r]||S.style(e,r)}if((u=!S.isEmptyObject(t))||!S.isEmptyObject(d))for(r in f&&1===e.nodeType&&(n.overflow=[h.overflow,h.overflowX,h.overflowY],null==(l=v&&v.display)&&(l=Y.get(e,\"display\")),\"none\"===(c=S.css(e,\"display\"))&&(l?c=l:(le([e],!0),l=e.style.display||l,c=S.css(e,\"display\"),le([e]))),(\"inline\"===c||\"inline-block\"===c&&null!=l)&&\"none\"===S.css(e,\"float\")&&(u||(p.done(function(){h.display=l}),null==l&&(c=h.display,l=\"none\"===c?\"\":c)),h.display=\"inline-block\")),n.overflow&&(h.overflow=\"hidden\",p.always(function(){h.overflow=n.overflow[0],h.overflowX=n.overflow[1],h.overflowY=n.overflow[2]})),u=!1,d)u||(v?\"hidden\"in v&&(g=v.hidden):v=Y.access(e,\"fxshow\",{display:l}),o&&(v.hidden=!g),g&&le([e],!0),p.done(function(){for(r in g||le([e]),Y.remove(e,\"fxshow\"),d)S.style(e,r,d[r])})),u=ut(g?v[r]:0,r,p),r in v||(v[r]=u.start,g&&(u.end=u.start,u.start=0))}],prefilter:function(e,t){t?lt.prefilters.unshift(e):lt.prefilters.push(e)}}),S.speed=function(e,t,n){var r=e&&\"object\"==typeof e?S.extend({},e):{complete:n||!n&&t||m(e)&&e,duration:e,easing:n&&t||t&&!m(t)&&t};return S.fx.off?r.duration=0:\"number\"!=typeof r.duration&&(r.duration in S.fx.speeds?r.duration=S.fx.speeds[r.duration]:r.duration=S.fx.speeds._default),null!=r.queue&&!0!==r.queue||(r.queue=\"fx\"),r.old=r.complete,r.complete=function(){m(r.old)&&r.old.call(this),r.queue&&S.dequeue(this,r.queue)},r},S.fn.extend({fadeTo:function(e,t,n,r){return this.filter(ae).css(\"opacity\",0).show().end().animate({opacity:t},e,n,r)},animate:function(t,e,n,r){var i=S.isEmptyObject(t),o=S.speed(e,n,r),a=function(){var e=lt(this,S.extend({},t),o);(i||Y.get(this,\"finish\"))&&e.stop(!0)};return a.finish=a,i||!1===o.queue?this.each(a):this.queue(o.queue,a)},stop:function(i,e,o){var a=function(e){var t=e.stop;delete e.stop,t(o)};return\"string\"!=typeof i&&(o=e,e=i,i=void 0),e&&this.queue(i||\"fx\",[]),this.each(function(){var e=!0,t=null!=i&&i+\"queueHooks\",n=S.timers,r=Y.get(this);if(t)r[t]&&r[t].stop&&a(r[t]);else for(t in r)r[t]&&r[t].stop&&it.test(t)&&a(r[t]);for(t=n.length;t--;)n[t].elem!==this||null!=i&&n[t].queue!==i||(n[t].anim.stop(o),e=!1,n.splice(t,1));!e&&o||S.dequeue(this,i)})},finish:function(a){return!1!==a&&(a=a||\"fx\"),this.each(function(){var e,t=Y.get(this),n=t[a+\"queue\"],r=t[a+\"queueHooks\"],i=S.timers,o=n?n.length:0;for(t.finish=!0,S.queue(this,a,[]),r&&r.stop&&r.stop.call(this,!0),e=i.length;e--;)i[e].elem===this&&i[e].queue===a&&(i[e].anim.stop(!0),i.splice(e,1));for(e=0;e<o;e++)n[e]&&n[e].finish&&n[e].finish.call(this);delete t.finish})}}),S.each([\"toggle\",\"show\",\"hide\"],function(e,r){var i=S.fn[r];S.fn[r]=function(e,t,n){return null==e||\"boolean\"==typeof e?i.apply(this,arguments):this.animate(st(r,!0),e,t,n)}}),S.each({slideDown:st(\"show\"),slideUp:st(\"hide\"),slideToggle:st(\"toggle\"),fadeIn:{opacity:\"show\"},fadeOut:{opacity:\"hide\"},fadeToggle:{opacity:\"toggle\"}},function(e,r){S.fn[e]=function(e,t,n){return this.animate(r,e,t,n)}}),S.timers=[],S.fx.tick=function(){var e,t=0,n=S.timers;for(Ze=Date.now();t<n.length;t++)(e=n[t])()||n[t]!==e||n.splice(t--,1);n.length||S.fx.stop(),Ze=void 0},S.fx.timer=function(e){S.timers.push(e),S.fx.start()},S.fx.interval=13,S.fx.start=function(){et||(et=!0,ot())},S.fx.stop=function(){et=null},S.fx.speeds={slow:600,fast:200,_default:400},S.fn.delay=function(r,e){return r=S.fx&&S.fx.speeds[r]||r,e=e||\"fx\",this.queue(e,function(e,t){var n=C.setTimeout(e,r);t.stop=function(){C.clearTimeout(n)}})},tt=E.createElement(\"input\"),nt=E.createElement(\"select\").appendChild(E.createElement(\"option\")),tt.type=\"checkbox\",y.checkOn=\"\"!==tt.value,y.optSelected=nt.selected,(tt=E.createElement(\"input\")).value=\"t\",tt.type=\"radio\",y.radioValue=\"t\"===tt.value;var ct,ft=S.expr.attrHandle;S.fn.extend({attr:function(e,t){return $(this,S.attr,e,t,1<arguments.length)},removeAttr:function(e){return this.each(function(){S.removeAttr(this,e)})}}),S.extend({attr:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return\"undefined\"==typeof e.getAttribute?S.prop(e,t,n):(1===o&&S.isXMLDoc(e)||(i=S.attrHooks[t.toLowerCase()]||(S.expr.match.bool.test(t)?ct:void 0)),void 0!==n?null===n?void S.removeAttr(e,t):i&&\"set\"in i&&void 0!==(r=i.set(e,n,t))?r:(e.setAttribute(t,n+\"\"),n):i&&\"get\"in i&&null!==(r=i.get(e,t))?r:null==(r=S.find.attr(e,t))?void 0:r)},attrHooks:{type:{set:function(e,t){if(!y.radioValue&&\"radio\"===t&&A(e,\"input\")){var n=e.value;return e.setAttribute(\"type\",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,r=0,i=t&&t.match(P);if(i&&1===e.nodeType)while(n=i[r++])e.removeAttribute(n)}}),ct={set:function(e,t,n){return!1===t?S.removeAttr(e,n):e.setAttribute(n,n),n}},S.each(S.expr.match.bool.source.match(/\\w+/g),function(e,t){var a=ft[t]||S.find.attr;ft[t]=function(e,t,n){var r,i,o=t.toLowerCase();return n||(i=ft[o],ft[o]=r,r=null!=a(e,t,n)?o:null,ft[o]=i),r}});var pt=/^(?:input|select|textarea|button)$/i,dt=/^(?:a|area)$/i;function ht(e){return(e.match(P)||[]).join(\" \")}function gt(e){return e.getAttribute&&e.getAttribute(\"class\")||\"\"}function vt(e){return Array.isArray(e)?e:\"string\"==typeof e&&e.match(P)||[]}S.fn.extend({prop:function(e,t){return $(this,S.prop,e,t,1<arguments.length)},removeProp:function(e){return this.each(function(){delete this[S.propFix[e]||e]})}}),S.extend({prop:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&S.isXMLDoc(e)||(t=S.propFix[t]||t,i=S.propHooks[t]),void 0!==n?i&&\"set\"in i&&void 0!==(r=i.set(e,n,t))?r:e[t]=n:i&&\"get\"in i&&null!==(r=i.get(e,t))?r:e[t]},propHooks:{tabIndex:{get:function(e){var t=S.find.attr(e,\"tabindex\");return t?parseInt(t,10):pt.test(e.nodeName)||dt.test(e.nodeName)&&e.href?0:-1}}},propFix:{\"for\":\"htmlFor\",\"class\":\"className\"}}),y.optSelected||(S.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),S.each([\"tabIndex\",\"readOnly\",\"maxLength\",\"cellSpacing\",\"cellPadding\",\"rowSpan\",\"colSpan\",\"useMap\",\"frameBorder\",\"contentEditable\"],function(){S.propFix[this.toLowerCase()]=this}),S.fn.extend({addClass:function(t){var e,n,r,i,o,a,s,u=0;if(m(t))return this.each(function(e){S(this).addClass(t.call(this,e,gt(this)))});if((e=vt(t)).length)while(n=this[u++])if(i=gt(n),r=1===n.nodeType&&\" \"+ht(i)+\" \"){a=0;while(o=e[a++])r.indexOf(\" \"+o+\" \")<0&&(r+=o+\" \");i!==(s=ht(r))&&n.setAttribute(\"class\",s)}return this},removeClass:function(t){var e,n,r,i,o,a,s,u=0;if(m(t))return this.each(function(e){S(this).removeClass(t.call(this,e,gt(this)))});if(!arguments.length)return this.attr(\"class\",\"\");if((e=vt(t)).length)while(n=this[u++])if(i=gt(n),r=1===n.nodeType&&\" \"+ht(i)+\" \"){a=0;while(o=e[a++])while(-1<r.indexOf(\" \"+o+\" \"))r=r.replace(\" \"+o+\" \",\" \");i!==(s=ht(r))&&n.setAttribute(\"class\",s)}return this},toggleClass:function(i,t){var o=typeof i,a=\"string\"===o||Array.isArray(i);return\"boolean\"==typeof t&&a?t?this.addClass(i):this.removeClass(i):m(i)?this.each(function(e){S(this).toggleClass(i.call(this,e,gt(this),t),t)}):this.each(function(){var e,t,n,r;if(a){t=0,n=S(this),r=vt(i);while(e=r[t++])n.hasClass(e)?n.removeClass(e):n.addClass(e)}else void 0!==i&&\"boolean\"!==o||((e=gt(this))&&Y.set(this,\"__className__\",e),this.setAttribute&&this.setAttribute(\"class\",e||!1===i?\"\":Y.get(this,\"__className__\")||\"\"))})},hasClass:function(e){var t,n,r=0;t=\" \"+e+\" \";while(n=this[r++])if(1===n.nodeType&&-1<(\" \"+ht(gt(n))+\" \").indexOf(t))return!0;return!1}});var yt=/\\r/g;S.fn.extend({val:function(n){var r,e,i,t=this[0];return arguments.length?(i=m(n),this.each(function(e){var t;1===this.nodeType&&(null==(t=i?n.call(this,e,S(this).val()):n)?t=\"\":\"number\"==typeof t?t+=\"\":Array.isArray(t)&&(t=S.map(t,function(e){return null==e?\"\":e+\"\"})),(r=S.valHooks[this.type]||S.valHooks[this.nodeName.toLowerCase()])&&\"set\"in r&&void 0!==r.set(this,t,\"value\")||(this.value=t))})):t?(r=S.valHooks[t.type]||S.valHooks[t.nodeName.toLowerCase()])&&\"get\"in r&&void 0!==(e=r.get(t,\"value\"))?e:\"string\"==typeof(e=t.value)?e.replace(yt,\"\"):null==e?\"\":e:void 0}}),S.extend({valHooks:{option:{get:function(e){var t=S.find.attr(e,\"value\");return null!=t?t:ht(S.text(e))}},select:{get:function(e){var t,n,r,i=e.options,o=e.selectedIndex,a=\"select-one\"===e.type,s=a?null:[],u=a?o+1:i.length;for(r=o<0?u:a?o:0;r<u;r++)if(((n=i[r]).selected||r===o)&&!n.disabled&&(!n.parentNode.disabled||!A(n.parentNode,\"optgroup\"))){if(t=S(n).val(),a)return t;s.push(t)}return s},set:function(e,t){var n,r,i=e.options,o=S.makeArray(t),a=i.length;while(a--)((r=i[a]).selected=-1<S.inArray(S.valHooks.option.get(r),o))&&(n=!0);return n||(e.selectedIndex=-1),o}}}}),S.each([\"radio\",\"checkbox\"],function(){S.valHooks[this]={set:function(e,t){if(Array.isArray(t))return e.checked=-1<S.inArray(S(e).val(),t)}},y.checkOn||(S.valHooks[this].get=function(e){return null===e.getAttribute(\"value\")?\"on\":e.value})}),y.focusin=\"onfocusin\"in C;var mt=/^(?:focusinfocus|focusoutblur)$/,xt=function(e){e.stopPropagation()};S.extend(S.event,{trigger:function(e,t,n,r){var i,o,a,s,u,l,c,f,p=[n||E],d=v.call(e,\"type\")?e.type:e,h=v.call(e,\"namespace\")?e.namespace.split(\".\"):[];if(o=f=a=n=n||E,3!==n.nodeType&&8!==n.nodeType&&!mt.test(d+S.event.triggered)&&(-1<d.indexOf(\".\")&&(d=(h=d.split(\".\")).shift(),h.sort()),u=d.indexOf(\":\")<0&&\"on\"+d,(e=e[S.expando]?e:new S.Event(d,\"object\"==typeof e&&e)).isTrigger=r?2:3,e.namespace=h.join(\".\"),e.rnamespace=e.namespace?new RegExp(\"(^|\\\\.)\"+h.join(\"\\\\.(?:.*\\\\.|)\")+\"(\\\\.|$)\"):null,e.result=void 0,e.target||(e.target=n),t=null==t?[e]:S.makeArray(t,[e]),c=S.event.special[d]||{},r||!c.trigger||!1!==c.trigger.apply(n,t))){if(!r&&!c.noBubble&&!x(n)){for(s=c.delegateType||d,mt.test(s+d)||(o=o.parentNode);o;o=o.parentNode)p.push(o),a=o;a===(n.ownerDocument||E)&&p.push(a.defaultView||a.parentWindow||C)}i=0;while((o=p[i++])&&!e.isPropagationStopped())f=o,e.type=1<i?s:c.bindType||d,(l=(Y.get(o,\"events\")||Object.create(null))[e.type]&&Y.get(o,\"handle\"))&&l.apply(o,t),(l=u&&o[u])&&l.apply&&V(o)&&(e.result=l.apply(o,t),!1===e.result&&e.preventDefault());return e.type=d,r||e.isDefaultPrevented()||c._default&&!1!==c._default.apply(p.pop(),t)||!V(n)||u&&m(n[d])&&!x(n)&&((a=n[u])&&(n[u]=null),S.event.triggered=d,e.isPropagationStopped()&&f.addEventListener(d,xt),n[d](),e.isPropagationStopped()&&f.removeEventListener(d,xt),S.event.triggered=void 0,a&&(n[u]=a)),e.result}},simulate:function(e,t,n){var r=S.extend(new S.Event,n,{type:e,isSimulated:!0});S.event.trigger(r,null,t)}}),S.fn.extend({trigger:function(e,t){return this.each(function(){S.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=this[0];if(n)return S.event.trigger(e,t,n,!0)}}),y.focusin||S.each({focus:\"focusin\",blur:\"focusout\"},function(n,r){var i=function(e){S.event.simulate(r,e.target,S.event.fix(e))};S.event.special[r]={setup:function(){var e=this.ownerDocument||this.document||this,t=Y.access(e,r);t||e.addEventListener(n,i,!0),Y.access(e,r,(t||0)+1)},teardown:function(){var e=this.ownerDocument||this.document||this,t=Y.access(e,r)-1;t?Y.access(e,r,t):(e.removeEventListener(n,i,!0),Y.remove(e,r))}}});var bt=C.location,wt={guid:Date.now()},Tt=/\\?/;S.parseXML=function(e){var t,n;if(!e||\"string\"!=typeof e)return null;try{t=(new C.DOMParser).parseFromString(e,\"text/xml\")}catch(e){}return n=t&&t.getElementsByTagName(\"parsererror\")[0],t&&!n||S.error(\"Invalid XML: \"+(n?S.map(n.childNodes,function(e){return e.textContent}).join(\"\\n\"):e)),t};var Ct=/\\[\\]$/,Et=/\\r?\\n/g,St=/^(?:submit|button|image|reset|file)$/i,kt=/^(?:input|select|textarea|keygen)/i;function At(n,e,r,i){var t;if(Array.isArray(e))S.each(e,function(e,t){r||Ct.test(n)?i(n,t):At(n+\"[\"+(\"object\"==typeof t&&null!=t?e:\"\")+\"]\",t,r,i)});else if(r||\"object\"!==w(e))i(n,e);else for(t in e)At(n+\"[\"+t+\"]\",e[t],r,i)}S.param=function(e,t){var n,r=[],i=function(e,t){var n=m(t)?t():t;r[r.length]=encodeURIComponent(e)+\"=\"+encodeURIComponent(null==n?\"\":n)};if(null==e)return\"\";if(Array.isArray(e)||e.jquery&&!S.isPlainObject(e))S.each(e,function(){i(this.name,this.value)});else for(n in e)At(n,e[n],t,i);return r.join(\"&\")},S.fn.extend({serialize:function(){return S.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=S.prop(this,\"elements\");return e?S.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!S(this).is(\":disabled\")&&kt.test(this.nodeName)&&!St.test(e)&&(this.checked||!pe.test(e))}).map(function(e,t){var n=S(this).val();return null==n?null:Array.isArray(n)?S.map(n,function(e){return{name:t.name,value:e.replace(Et,\"\\r\\n\")}}):{name:t.name,value:n.replace(Et,\"\\r\\n\")}}).get()}});var Nt=/%20/g,jt=/#.*$/,Dt=/([?&])_=[^&]*/,qt=/^(.*?):[ \\t]*([^\\r\\n]*)$/gm,Lt=/^(?:GET|HEAD)$/,Ht=/^\\/\\//,Ot={},Pt={},Rt=\"*/\".concat(\"*\"),Mt=E.createElement(\"a\");function It(o){return function(e,t){\"string\"!=typeof e&&(t=e,e=\"*\");var n,r=0,i=e.toLowerCase().match(P)||[];if(m(t))while(n=i[r++])\"+\"===n[0]?(n=n.slice(1)||\"*\",(o[n]=o[n]||[]).unshift(t)):(o[n]=o[n]||[]).push(t)}}function Wt(t,i,o,a){var s={},u=t===Pt;function l(e){var r;return s[e]=!0,S.each(t[e]||[],function(e,t){var n=t(i,o,a);return\"string\"!=typeof n||u||s[n]?u?!(r=n):void 0:(i.dataTypes.unshift(n),l(n),!1)}),r}return l(i.dataTypes[0])||!s[\"*\"]&&l(\"*\")}function Ft(e,t){var n,r,i=S.ajaxSettings.flatOptions||{};for(n in t)void 0!==t[n]&&((i[n]?e:r||(r={}))[n]=t[n]);return r&&S.extend(!0,e,r),e}Mt.href=bt.href,S.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:bt.href,type:\"GET\",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(bt.protocol),global:!0,processData:!0,async:!0,contentType:\"application/x-www-form-urlencoded; charset=UTF-8\",accepts:{\"*\":Rt,text:\"text/plain\",html:\"text/html\",xml:\"application/xml, text/xml\",json:\"application/json, text/javascript\"},contents:{xml:/\\bxml\\b/,html:/\\bhtml/,json:/\\bjson\\b/},responseFields:{xml:\"responseXML\",text:\"responseText\",json:\"responseJSON\"},converters:{\"* text\":String,\"text html\":!0,\"text json\":JSON.parse,\"text xml\":S.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?Ft(Ft(e,S.ajaxSettings),t):Ft(S.ajaxSettings,e)},ajaxPrefilter:It(Ot),ajaxTransport:It(Pt),ajax:function(e,t){\"object\"==typeof e&&(t=e,e=void 0),t=t||{};var c,f,p,n,d,r,h,g,i,o,v=S.ajaxSetup({},t),y=v.context||v,m=v.context&&(y.nodeType||y.jquery)?S(y):S.event,x=S.Deferred(),b=S.Callbacks(\"once memory\"),w=v.statusCode||{},a={},s={},u=\"canceled\",T={readyState:0,getResponseHeader:function(e){var t;if(h){if(!n){n={};while(t=qt.exec(p))n[t[1].toLowerCase()+\" \"]=(n[t[1].toLowerCase()+\" \"]||[]).concat(t[2])}t=n[e.toLowerCase()+\" \"]}return null==t?null:t.join(\", \")},getAllResponseHeaders:function(){return h?p:null},setRequestHeader:function(e,t){return null==h&&(e=s[e.toLowerCase()]=s[e.toLowerCase()]||e,a[e]=t),this},overrideMimeType:function(e){return null==h&&(v.mimeType=e),this},statusCode:function(e){var t;if(e)if(h)T.always(e[T.status]);else for(t in e)w[t]=[w[t],e[t]];return this},abort:function(e){var t=e||u;return c&&c.abort(t),l(0,t),this}};if(x.promise(T),v.url=((e||v.url||bt.href)+\"\").replace(Ht,bt.protocol+\"//\"),v.type=t.method||t.type||v.method||v.type,v.dataTypes=(v.dataType||\"*\").toLowerCase().match(P)||[\"\"],null==v.crossDomain){r=E.createElement(\"a\");try{r.href=v.url,r.href=r.href,v.crossDomain=Mt.protocol+\"//\"+Mt.host!=r.protocol+\"//\"+r.host}catch(e){v.crossDomain=!0}}if(v.data&&v.processData&&\"string\"!=typeof v.data&&(v.data=S.param(v.data,v.traditional)),Wt(Ot,v,t,T),h)return T;for(i in(g=S.event&&v.global)&&0==S.active++&&S.event.trigger(\"ajaxStart\"),v.type=v.type.toUpperCase(),v.hasContent=!Lt.test(v.type),f=v.url.replace(jt,\"\"),v.hasContent?v.data&&v.processData&&0===(v.contentType||\"\").indexOf(\"application/x-www-form-urlencoded\")&&(v.data=v.data.replace(Nt,\"+\")):(o=v.url.slice(f.length),v.data&&(v.processData||\"string\"==typeof v.data)&&(f+=(Tt.test(f)?\"&\":\"?\")+v.data,delete v.data),!1===v.cache&&(f=f.replace(Dt,\"$1\"),o=(Tt.test(f)?\"&\":\"?\")+\"_=\"+wt.guid+++o),v.url=f+o),v.ifModified&&(S.lastModified[f]&&T.setRequestHeader(\"If-Modified-Since\",S.lastModified[f]),S.etag[f]&&T.setRequestHeader(\"If-None-Match\",S.etag[f])),(v.data&&v.hasContent&&!1!==v.contentType||t.contentType)&&T.setRequestHeader(\"Content-Type\",v.contentType),T.setRequestHeader(\"Accept\",v.dataTypes[0]&&v.accepts[v.dataTypes[0]]?v.accepts[v.dataTypes[0]]+(\"*\"!==v.dataTypes[0]?\", \"+Rt+\"; q=0.01\":\"\"):v.accepts[\"*\"]),v.headers)T.setRequestHeader(i,v.headers[i]);if(v.beforeSend&&(!1===v.beforeSend.call(y,T,v)||h))return T.abort();if(u=\"abort\",b.add(v.complete),T.done(v.success),T.fail(v.error),c=Wt(Pt,v,t,T)){if(T.readyState=1,g&&m.trigger(\"ajaxSend\",[T,v]),h)return T;v.async&&0<v.timeout&&(d=C.setTimeout(function(){T.abort(\"timeout\")},v.timeout));try{h=!1,c.send(a,l)}catch(e){if(h)throw e;l(-1,e)}}else l(-1,\"No Transport\");function l(e,t,n,r){var i,o,a,s,u,l=t;h||(h=!0,d&&C.clearTimeout(d),c=void 0,p=r||\"\",T.readyState=0<e?4:0,i=200<=e&&e<300||304===e,n&&(s=function(e,t,n){var r,i,o,a,s=e.contents,u=e.dataTypes;while(\"*\"===u[0])u.shift(),void 0===r&&(r=e.mimeType||t.getResponseHeader(\"Content-Type\"));if(r)for(i in s)if(s[i]&&s[i].test(r)){u.unshift(i);break}if(u[0]in n)o=u[0];else{for(i in n){if(!u[0]||e.converters[i+\" \"+u[0]]){o=i;break}a||(a=i)}o=o||a}if(o)return o!==u[0]&&u.unshift(o),n[o]}(v,T,n)),!i&&-1<S.inArray(\"script\",v.dataTypes)&&S.inArray(\"json\",v.dataTypes)<0&&(v.converters[\"text script\"]=function(){}),s=function(e,t,n,r){var i,o,a,s,u,l={},c=e.dataTypes.slice();if(c[1])for(a in e.converters)l[a.toLowerCase()]=e.converters[a];o=c.shift();while(o)if(e.responseFields[o]&&(n[e.responseFields[o]]=t),!u&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),u=o,o=c.shift())if(\"*\"===o)o=u;else if(\"*\"!==u&&u!==o){if(!(a=l[u+\" \"+o]||l[\"* \"+o]))for(i in l)if((s=i.split(\" \"))[1]===o&&(a=l[u+\" \"+s[0]]||l[\"* \"+s[0]])){!0===a?a=l[i]:!0!==l[i]&&(o=s[0],c.unshift(s[1]));break}if(!0!==a)if(a&&e[\"throws\"])t=a(t);else try{t=a(t)}catch(e){return{state:\"parsererror\",error:a?e:\"No conversion from \"+u+\" to \"+o}}}return{state:\"success\",data:t}}(v,s,T,i),i?(v.ifModified&&((u=T.getResponseHeader(\"Last-Modified\"))&&(S.lastModified[f]=u),(u=T.getResponseHeader(\"etag\"))&&(S.etag[f]=u)),204===e||\"HEAD\"===v.type?l=\"nocontent\":304===e?l=\"notmodified\":(l=s.state,o=s.data,i=!(a=s.error))):(a=l,!e&&l||(l=\"error\",e<0&&(e=0))),T.status=e,T.statusText=(t||l)+\"\",i?x.resolveWith(y,[o,l,T]):x.rejectWith(y,[T,l,a]),T.statusCode(w),w=void 0,g&&m.trigger(i?\"ajaxSuccess\":\"ajaxError\",[T,v,i?o:a]),b.fireWith(y,[T,l]),g&&(m.trigger(\"ajaxComplete\",[T,v]),--S.active||S.event.trigger(\"ajaxStop\")))}return T},getJSON:function(e,t,n){return S.get(e,t,n,\"json\")},getScript:function(e,t){return S.get(e,void 0,t,\"script\")}}),S.each([\"get\",\"post\"],function(e,i){S[i]=function(e,t,n,r){return m(t)&&(r=r||n,n=t,t=void 0),S.ajax(S.extend({url:e,type:i,dataType:r,data:t,success:n},S.isPlainObject(e)&&e))}}),S.ajaxPrefilter(function(e){var t;for(t in e.headers)\"content-type\"===t.toLowerCase()&&(e.contentType=e.headers[t]||\"\")}),S._evalUrl=function(e,t,n){return S.ajax({url:e,type:\"GET\",dataType:\"script\",cache:!0,async:!1,global:!1,converters:{\"text script\":function(){}},dataFilter:function(e){S.globalEval(e,t,n)}})},S.fn.extend({wrapAll:function(e){var t;return this[0]&&(m(e)&&(e=e.call(this[0])),t=S(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){var e=this;while(e.firstElementChild)e=e.firstElementChild;return e}).append(this)),this},wrapInner:function(n){return m(n)?this.each(function(e){S(this).wrapInner(n.call(this,e))}):this.each(function(){var e=S(this),t=e.contents();t.length?t.wrapAll(n):e.append(n)})},wrap:function(t){var n=m(t);return this.each(function(e){S(this).wrapAll(n?t.call(this,e):t)})},unwrap:function(e){return this.parent(e).not(\"body\").each(function(){S(this).replaceWith(this.childNodes)}),this}}),S.expr.pseudos.hidden=function(e){return!S.expr.pseudos.visible(e)},S.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},S.ajaxSettings.xhr=function(){try{return new C.XMLHttpRequest}catch(e){}};var Bt={0:200,1223:204},$t=S.ajaxSettings.xhr();y.cors=!!$t&&\"withCredentials\"in $t,y.ajax=$t=!!$t,S.ajaxTransport(function(i){var o,a;if(y.cors||$t&&!i.crossDomain)return{send:function(e,t){var n,r=i.xhr();if(r.open(i.type,i.url,i.async,i.username,i.password),i.xhrFields)for(n in i.xhrFields)r[n]=i.xhrFields[n];for(n in i.mimeType&&r.overrideMimeType&&r.overrideMimeType(i.mimeType),i.crossDomain||e[\"X-Requested-With\"]||(e[\"X-Requested-With\"]=\"XMLHttpRequest\"),e)r.setRequestHeader(n,e[n]);o=function(e){return function(){o&&(o=a=r.onload=r.onerror=r.onabort=r.ontimeout=r.onreadystatechange=null,\"abort\"===e?r.abort():\"error\"===e?\"number\"!=typeof r.status?t(0,\"error\"):t(r.status,r.statusText):t(Bt[r.status]||r.status,r.statusText,\"text\"!==(r.responseType||\"text\")||\"string\"!=typeof r.responseText?{binary:r.response}:{text:r.responseText},r.getAllResponseHeaders()))}},r.onload=o(),a=r.onerror=r.ontimeout=o(\"error\"),void 0!==r.onabort?r.onabort=a:r.onreadystatechange=function(){4===r.readyState&&C.setTimeout(function(){o&&a()})},o=o(\"abort\");try{r.send(i.hasContent&&i.data||null)}catch(e){if(o)throw e}},abort:function(){o&&o()}}}),S.ajaxPrefilter(function(e){e.crossDomain&&(e.contents.script=!1)}),S.ajaxSetup({accepts:{script:\"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript\"},contents:{script:/\\b(?:java|ecma)script\\b/},converters:{\"text script\":function(e){return S.globalEval(e),e}}}),S.ajaxPrefilter(\"script\",function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type=\"GET\")}),S.ajaxTransport(\"script\",function(n){var r,i;if(n.crossDomain||n.scriptAttrs)return{send:function(e,t){r=S(\"<script>\").attr(n.scriptAttrs||{}).prop({charset:n.scriptCharset,src:n.url}).on(\"load error\",i=function(e){r.remove(),i=null,e&&t(\"error\"===e.type?404:200,e.type)}),E.head.appendChild(r[0])},abort:function(){i&&i()}}});var _t,zt=[],Ut=/(=)\\?(?=&|$)|\\?\\?/;S.ajaxSetup({jsonp:\"callback\",jsonpCallback:function(){var e=zt.pop()||S.expando+\"_\"+wt.guid++;return this[e]=!0,e}}),S.ajaxPrefilter(\"json jsonp\",function(e,t,n){var r,i,o,a=!1!==e.jsonp&&(Ut.test(e.url)?\"url\":\"string\"==typeof e.data&&0===(e.contentType||\"\").indexOf(\"application/x-www-form-urlencoded\")&&Ut.test(e.data)&&\"data\");if(a||\"jsonp\"===e.dataTypes[0])return r=e.jsonpCallback=m(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Ut,\"$1\"+r):!1!==e.jsonp&&(e.url+=(Tt.test(e.url)?\"&\":\"?\")+e.jsonp+\"=\"+r),e.converters[\"script json\"]=function(){return o||S.error(r+\" was not called\"),o[0]},e.dataTypes[0]=\"json\",i=C[r],C[r]=function(){o=arguments},n.always(function(){void 0===i?S(C).removeProp(r):C[r]=i,e[r]&&(e.jsonpCallback=t.jsonpCallback,zt.push(r)),o&&m(i)&&i(o[0]),o=i=void 0}),\"script\"}),y.createHTMLDocument=((_t=E.implementation.createHTMLDocument(\"\").body).innerHTML=\"<form></form><form></form>\",2===_t.childNodes.length),S.parseHTML=function(e,t,n){return\"string\"!=typeof e?[]:(\"boolean\"==typeof t&&(n=t,t=!1),t||(y.createHTMLDocument?((r=(t=E.implementation.createHTMLDocument(\"\")).createElement(\"base\")).href=E.location.href,t.head.appendChild(r)):t=E),o=!n&&[],(i=N.exec(e))?[t.createElement(i[1])]:(i=xe([e],t,o),o&&o.length&&S(o).remove(),S.merge([],i.childNodes)));var r,i,o},S.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(\" \");return-1<s&&(r=ht(e.slice(s)),e=e.slice(0,s)),m(t)?(n=t,t=void 0):t&&\"object\"==typeof t&&(i=\"POST\"),0<a.length&&S.ajax({url:e,type:i||\"GET\",dataType:\"html\",data:t}).done(function(e){o=arguments,a.html(r?S(\"<div>\").append(S.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},S.expr.pseudos.animated=function(t){return S.grep(S.timers,function(e){return t===e.elem}).length},S.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l=S.css(e,\"position\"),c=S(e),f={};\"static\"===l&&(e.style.position=\"relative\"),s=c.offset(),o=S.css(e,\"top\"),u=S.css(e,\"left\"),(\"absolute\"===l||\"fixed\"===l)&&-1<(o+u).indexOf(\"auto\")?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),m(t)&&(t=t.call(e,n,S.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+i),\"using\"in t?t.using.call(e,f):c.css(f)}},S.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){S.offset.setOffset(this,t,e)});var e,n,r=this[0];return r?r.getClientRects().length?(e=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if(\"fixed\"===S.css(r,\"position\"))t=r.getBoundingClientRect();else{t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;while(e&&(e===n.body||e===n.documentElement)&&\"static\"===S.css(e,\"position\"))e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=S(e).offset()).top+=S.css(e,\"borderTopWidth\",!0),i.left+=S.css(e,\"borderLeftWidth\",!0))}return{top:t.top-i.top-S.css(r,\"marginTop\",!0),left:t.left-i.left-S.css(r,\"marginLeft\",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent;while(e&&\"static\"===S.css(e,\"position\"))e=e.offsetParent;return e||re})}}),S.each({scrollLeft:\"pageXOffset\",scrollTop:\"pageYOffset\"},function(t,i){var o=\"pageYOffset\"===i;S.fn[t]=function(e){return $(this,function(e,t,n){var r;if(x(e)?r=e:9===e.nodeType&&(r=e.defaultView),void 0===n)return r?r[i]:e[t];r?r.scrollTo(o?r.pageXOffset:n,o?n:r.pageYOffset):e[t]=n},t,e,arguments.length)}}),S.each([\"top\",\"left\"],function(e,n){S.cssHooks[n]=Fe(y.pixelPosition,function(e,t){if(t)return t=We(e,n),Pe.test(t)?S(e).position()[n]+\"px\":t})}),S.each({Height:\"height\",Width:\"width\"},function(a,s){S.each({padding:\"inner\"+a,content:s,\"\":\"outer\"+a},function(r,o){S.fn[o]=function(e,t){var n=arguments.length&&(r||\"boolean\"!=typeof e),i=r||(!0===e||!0===t?\"margin\":\"border\");return $(this,function(e,t,n){var r;return x(e)?0===o.indexOf(\"outer\")?e[\"inner\"+a]:e.document.documentElement[\"client\"+a]:9===e.nodeType?(r=e.documentElement,Math.max(e.body[\"scroll\"+a],r[\"scroll\"+a],e.body[\"offset\"+a],r[\"offset\"+a],r[\"client\"+a])):void 0===n?S.css(e,t,i):S.style(e,t,n,i)},s,n?e:void 0,n)}})}),S.each([\"ajaxStart\",\"ajaxStop\",\"ajaxComplete\",\"ajaxError\",\"ajaxSuccess\",\"ajaxSend\"],function(e,t){S.fn[t]=function(e){return this.on(t,e)}}),S.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,\"**\"):this.off(t,e||\"**\",n)},hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),S.each(\"blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu\".split(\" \"),function(e,n){S.fn[n]=function(e,t){return 0<arguments.length?this.on(n,null,e,t):this.trigger(n)}});var Xt=/^[\\s\\uFEFF\\xA0]+|[\\s\\uFEFF\\xA0]+$/g;S.proxy=function(e,t){var n,r,i;if(\"string\"==typeof t&&(n=e[t],t=e,e=n),m(e))return r=s.call(arguments,2),(i=function(){return e.apply(t||this,r.concat(s.call(arguments)))}).guid=e.guid=e.guid||S.guid++,i},S.holdReady=function(e){e?S.readyWait++:S.ready(!0)},S.isArray=Array.isArray,S.parseJSON=JSON.parse,S.nodeName=A,S.isFunction=m,S.isWindow=x,S.camelCase=X,S.type=w,S.now=Date.now,S.isNumeric=function(e){var t=S.type(e);return(\"number\"===t||\"string\"===t)&&!isNaN(e-parseFloat(e))},S.trim=function(e){return null==e?\"\":(e+\"\").replace(Xt,\"\")},\"function\"==typeof define&&define.amd&&define(\"jquery\",[],function(){return S});var Vt=C.jQuery,Gt=C.$;return S.noConflict=function(e){return C.$===S&&(C.$=Gt),e&&C.jQuery===S&&(C.jQuery=Vt),S},\"undefined\"==typeof e&&(C.jQuery=C.$=S),S});","/*!\r\n  * Bootstrap v4.4.1 (https://getbootstrap.com/)\r\n  * Copyright 2011-2019 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)\r\n  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\r\n  */\r\n!function(t,e){\"object\"==typeof exports&&\"undefined\"!=typeof module?e(exports,require(\"jquery\"),require(\"popper.js\")):\"function\"==typeof define&&define.amd?define([\"exports\",\"jquery\",\"popper.js\"],e):e((t=t||self).bootstrap={},t.jQuery,t.Popper)}(this,function(t,g,u){\"use strict\";function i(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,\"value\"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function s(t,e,n){return e&&i(t.prototype,e),n&&i(t,n),t}function e(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,i)}return n}function l(o){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?e(Object(r),!0).forEach(function(t){var e,n,i;e=o,i=r[n=t],n in e?Object.defineProperty(e,n,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[n]=i}):Object.getOwnPropertyDescriptors?Object.defineProperties(o,Object.getOwnPropertyDescriptors(r)):e(Object(r)).forEach(function(t){Object.defineProperty(o,t,Object.getOwnPropertyDescriptor(r,t))})}return o}g=g&&g.hasOwnProperty(\"default\")?g.default:g,u=u&&u.hasOwnProperty(\"default\")?u.default:u;var n=\"transitionend\";function o(t){var e=this,n=!1;return g(this).one(_.TRANSITION_END,function(){n=!0}),setTimeout(function(){n||_.triggerTransitionEnd(e)},t),this}var _={TRANSITION_END:\"bsTransitionEnd\",getUID:function(t){for(;t+=~~(1e6*Math.random()),document.getElementById(t););return t},getSelectorFromElement:function(t){var e=t.getAttribute(\"data-target\");if(!e||\"#\"===e){var n=t.getAttribute(\"href\");e=n&&\"#\"!==n?n.trim():\"\"}try{return document.querySelector(e)?e:null}catch(t){return null}},getTransitionDurationFromElement:function(t){if(!t)return 0;var e=g(t).css(\"transition-duration\"),n=g(t).css(\"transition-delay\"),i=parseFloat(e),o=parseFloat(n);return i||o?(e=e.split(\",\")[0],n=n.split(\",\")[0],1e3*(parseFloat(e)+parseFloat(n))):0},reflow:function(t){return t.offsetHeight},triggerTransitionEnd:function(t){g(t).trigger(n)},supportsTransitionEnd:function(){return Boolean(n)},isElement:function(t){return(t[0]||t).nodeType},typeCheckConfig:function(t,e,n){for(var i in n)if(Object.prototype.hasOwnProperty.call(n,i)){var o=n[i],r=e[i],s=r&&_.isElement(r)?\"element\":(a=r,{}.toString.call(a).match(/\\s([a-z]+)/i)[1].toLowerCase());if(!new RegExp(o).test(s))throw new Error(t.toUpperCase()+': Option \"'+i+'\" provided type \"'+s+'\" but expected type \"'+o+'\".')}var a},findShadowRoot:function(t){if(!document.documentElement.attachShadow)return null;if(\"function\"!=typeof t.getRootNode)return t instanceof ShadowRoot?t:t.parentNode?_.findShadowRoot(t.parentNode):null;var e=t.getRootNode();return e instanceof ShadowRoot?e:null},jQueryDetection:function(){if(\"undefined\"==typeof g)throw new TypeError(\"Bootstrap's JavaScript requires jQuery. jQuery must be included before Bootstrap's JavaScript.\");var t=g.fn.jquery.split(\" \")[0].split(\".\");if(t[0]<2&&t[1]<9||1===t[0]&&9===t[1]&&t[2]<1||4<=t[0])throw new Error(\"Bootstrap's JavaScript requires at least jQuery v1.9.1 but less than v4.0.0\")}};_.jQueryDetection(),g.fn.emulateTransitionEnd=o,g.event.special[_.TRANSITION_END]={bindType:n,delegateType:n,handle:function(t){if(g(t.target).is(this))return t.handleObj.handler.apply(this,arguments)}};var r=\"alert\",a=\"bs.alert\",c=\".\"+a,h=g.fn[r],f={CLOSE:\"close\"+c,CLOSED:\"closed\"+c,CLICK_DATA_API:\"click\"+c+\".data-api\"},d=\"alert\",m=\"fade\",p=\"show\",v=function(){function i(t){this._element=t}var t=i.prototype;return t.close=function(t){var e=this._element;t&&(e=this._getRootElement(t)),this._triggerCloseEvent(e).isDefaultPrevented()||this._removeElement(e)},t.dispose=function(){g.removeData(this._element,a),this._element=null},t._getRootElement=function(t){var e=_.getSelectorFromElement(t),n=!1;return e&&(n=document.querySelector(e)),n=n||g(t).closest(\".\"+d)[0]},t._triggerCloseEvent=function(t){var e=g.Event(f.CLOSE);return g(t).trigger(e),e},t._removeElement=function(e){var n=this;if(g(e).removeClass(p),g(e).hasClass(m)){var t=_.getTransitionDurationFromElement(e);g(e).one(_.TRANSITION_END,function(t){return n._destroyElement(e,t)}).emulateTransitionEnd(t)}else this._destroyElement(e)},t._destroyElement=function(t){g(t).detach().trigger(f.CLOSED).remove()},i._jQueryInterface=function(n){return this.each(function(){var t=g(this),e=t.data(a);e||(e=new i(this),t.data(a,e)),\"close\"===n&&e[n](this)})},i._handleDismiss=function(e){return function(t){t&&t.preventDefault(),e.close(this)}},s(i,null,[{key:\"VERSION\",get:function(){return\"4.4.1\"}}]),i}();g(document).on(f.CLICK_DATA_API,'[data-dismiss=\"alert\"]',v._handleDismiss(new v)),g.fn[r]=v._jQueryInterface,g.fn[r].Constructor=v,g.fn[r].noConflict=function(){return g.fn[r]=h,v._jQueryInterface};var y=\"button\",E=\"bs.button\",C=\".\"+E,T=\".data-api\",b=g.fn[y],S=\"active\",D=\"btn\",I=\"focus\",w='[data-toggle^=\"button\"]',A='[data-toggle=\"buttons\"]',N='[data-toggle=\"button\"]',O='[data-toggle=\"buttons\"] .btn',k='input:not([type=\"hidden\"])',P=\".active\",L=\".btn\",j={CLICK_DATA_API:\"click\"+C+T,FOCUS_BLUR_DATA_API:\"focus\"+C+T+\" blur\"+C+T,LOAD_DATA_API:\"load\"+C+T},H=function(){function n(t){this._element=t}var t=n.prototype;return t.toggle=function(){var t=!0,e=!0,n=g(this._element).closest(A)[0];if(n){var i=this._element.querySelector(k);if(i){if(\"radio\"===i.type)if(i.checked&&this._element.classList.contains(S))t=!1;else{var o=n.querySelector(P);o&&g(o).removeClass(S)}else\"checkbox\"===i.type?\"LABEL\"===this._element.tagName&&i.checked===this._element.classList.contains(S)&&(t=!1):t=!1;t&&(i.checked=!this._element.classList.contains(S),g(i).trigger(\"change\")),i.focus(),e=!1}}this._element.hasAttribute(\"disabled\")||this._element.classList.contains(\"disabled\")||(e&&this._element.setAttribute(\"aria-pressed\",!this._element.classList.contains(S)),t&&g(this._element).toggleClass(S))},t.dispose=function(){g.removeData(this._element,E),this._element=null},n._jQueryInterface=function(e){return this.each(function(){var t=g(this).data(E);t||(t=new n(this),g(this).data(E,t)),\"toggle\"===e&&t[e]()})},s(n,null,[{key:\"VERSION\",get:function(){return\"4.4.1\"}}]),n}();g(document).on(j.CLICK_DATA_API,w,function(t){var e=t.target;if(g(e).hasClass(D)||(e=g(e).closest(L)[0]),!e||e.hasAttribute(\"disabled\")||e.classList.contains(\"disabled\"))t.preventDefault();else{var n=e.querySelector(k);if(n&&(n.hasAttribute(\"disabled\")||n.classList.contains(\"disabled\")))return void t.preventDefault();H._jQueryInterface.call(g(e),\"toggle\")}}).on(j.FOCUS_BLUR_DATA_API,w,function(t){var e=g(t.target).closest(L)[0];g(e).toggleClass(I,/^focus(in)?$/.test(t.type))}),g(window).on(j.LOAD_DATA_API,function(){for(var t=[].slice.call(document.querySelectorAll(O)),e=0,n=t.length;e<n;e++){var i=t[e],o=i.querySelector(k);o.checked||o.hasAttribute(\"checked\")?i.classList.add(S):i.classList.remove(S)}for(var r=0,s=(t=[].slice.call(document.querySelectorAll(N))).length;r<s;r++){var a=t[r];\"true\"===a.getAttribute(\"aria-pressed\")?a.classList.add(S):a.classList.remove(S)}}),g.fn[y]=H._jQueryInterface,g.fn[y].Constructor=H,g.fn[y].noConflict=function(){return g.fn[y]=b,H._jQueryInterface};var R=\"carousel\",x=\"bs.carousel\",F=\".\"+x,U=\".data-api\",W=g.fn[R],q={interval:5e3,keyboard:!0,slide:!1,pause:\"hover\",wrap:!0,touch:!0},M={interval:\"(number|boolean)\",keyboard:\"boolean\",slide:\"(boolean|string)\",pause:\"(string|boolean)\",wrap:\"boolean\",touch:\"boolean\"},K=\"next\",Q=\"prev\",B=\"left\",V=\"right\",Y={SLIDE:\"slide\"+F,SLID:\"slid\"+F,KEYDOWN:\"keydown\"+F,MOUSEENTER:\"mouseenter\"+F,MOUSELEAVE:\"mouseleave\"+F,TOUCHSTART:\"touchstart\"+F,TOUCHMOVE:\"touchmove\"+F,TOUCHEND:\"touchend\"+F,POINTERDOWN:\"pointerdown\"+F,POINTERUP:\"pointerup\"+F,DRAG_START:\"dragstart\"+F,LOAD_DATA_API:\"load\"+F+U,CLICK_DATA_API:\"click\"+F+U},z=\"carousel\",X=\"active\",$=\"slide\",G=\"carousel-item-right\",J=\"carousel-item-left\",Z=\"carousel-item-next\",tt=\"carousel-item-prev\",et=\"pointer-event\",nt=\".active\",it=\".active.carousel-item\",ot=\".carousel-item\",rt=\".carousel-item img\",st=\".carousel-item-next, .carousel-item-prev\",at=\".carousel-indicators\",lt=\"[data-slide], [data-slide-to]\",ct='[data-ride=\"carousel\"]',ht={TOUCH:\"touch\",PEN:\"pen\"},ut=function(){function r(t,e){this._items=null,this._interval=null,this._activeElement=null,this._isPaused=!1,this._isSliding=!1,this.touchTimeout=null,this.touchStartX=0,this.touchDeltaX=0,this._config=this._getConfig(e),this._element=t,this._indicatorsElement=this._element.querySelector(at),this._touchSupported=\"ontouchstart\"in document.documentElement||0<navigator.maxTouchPoints,this._pointerEvent=Boolean(window.PointerEvent||window.MSPointerEvent),this._addEventListeners()}var t=r.prototype;return t.next=function(){this._isSliding||this._slide(K)},t.nextWhenVisible=function(){!document.hidden&&g(this._element).is(\":visible\")&&\"hidden\"!==g(this._element).css(\"visibility\")&&this.next()},t.prev=function(){this._isSliding||this._slide(Q)},t.pause=function(t){t||(this._isPaused=!0),this._element.querySelector(st)&&(_.triggerTransitionEnd(this._element),this.cycle(!0)),clearInterval(this._interval),this._interval=null},t.cycle=function(t){t||(this._isPaused=!1),this._interval&&(clearInterval(this._interval),this._interval=null),this._config.interval&&!this._isPaused&&(this._interval=setInterval((document.visibilityState?this.nextWhenVisible:this.next).bind(this),this._config.interval))},t.to=function(t){var e=this;this._activeElement=this._element.querySelector(it);var n=this._getItemIndex(this._activeElement);if(!(t>this._items.length-1||t<0))if(this._isSliding)g(this._element).one(Y.SLID,function(){return e.to(t)});else{if(n===t)return this.pause(),void this.cycle();var i=n<t?K:Q;this._slide(i,this._items[t])}},t.dispose=function(){g(this._element).off(F),g.removeData(this._element,x),this._items=null,this._config=null,this._element=null,this._interval=null,this._isPaused=null,this._isSliding=null,this._activeElement=null,this._indicatorsElement=null},t._getConfig=function(t){return t=l({},q,{},t),_.typeCheckConfig(R,t,M),t},t._handleSwipe=function(){var t=Math.abs(this.touchDeltaX);if(!(t<=40)){var e=t/this.touchDeltaX;(this.touchDeltaX=0)<e&&this.prev(),e<0&&this.next()}},t._addEventListeners=function(){var e=this;this._config.keyboard&&g(this._element).on(Y.KEYDOWN,function(t){return e._keydown(t)}),\"hover\"===this._config.pause&&g(this._element).on(Y.MOUSEENTER,function(t){return e.pause(t)}).on(Y.MOUSELEAVE,function(t){return e.cycle(t)}),this._config.touch&&this._addTouchEventListeners()},t._addTouchEventListeners=function(){var e=this;if(this._touchSupported){var n=function(t){e._pointerEvent&&ht[t.originalEvent.pointerType.toUpperCase()]?e.touchStartX=t.originalEvent.clientX:e._pointerEvent||(e.touchStartX=t.originalEvent.touches[0].clientX)},i=function(t){e._pointerEvent&&ht[t.originalEvent.pointerType.toUpperCase()]&&(e.touchDeltaX=t.originalEvent.clientX-e.touchStartX),e._handleSwipe(),\"hover\"===e._config.pause&&(e.pause(),e.touchTimeout&&clearTimeout(e.touchTimeout),e.touchTimeout=setTimeout(function(t){return e.cycle(t)},500+e._config.interval))};g(this._element.querySelectorAll(rt)).on(Y.DRAG_START,function(t){return t.preventDefault()}),this._pointerEvent?(g(this._element).on(Y.POINTERDOWN,function(t){return n(t)}),g(this._element).on(Y.POINTERUP,function(t){return i(t)}),this._element.classList.add(et)):(g(this._element).on(Y.TOUCHSTART,function(t){return n(t)}),g(this._element).on(Y.TOUCHMOVE,function(t){return function(t){t.originalEvent.touches&&1<t.originalEvent.touches.length?e.touchDeltaX=0:e.touchDeltaX=t.originalEvent.touches[0].clientX-e.touchStartX}(t)}),g(this._element).on(Y.TOUCHEND,function(t){return i(t)}))}},t._keydown=function(t){if(!/input|textarea/i.test(t.target.tagName))switch(t.which){case 37:t.preventDefault(),this.prev();break;case 39:t.preventDefault(),this.next()}},t._getItemIndex=function(t){return this._items=t&&t.parentNode?[].slice.call(t.parentNode.querySelectorAll(ot)):[],this._items.indexOf(t)},t._getItemByDirection=function(t,e){var n=t===K,i=t===Q,o=this._getItemIndex(e),r=this._items.length-1;if((i&&0===o||n&&o===r)&&!this._config.wrap)return e;var s=(o+(t===Q?-1:1))%this._items.length;return-1==s?this._items[this._items.length-1]:this._items[s]},t._triggerSlideEvent=function(t,e){var n=this._getItemIndex(t),i=this._getItemIndex(this._element.querySelector(it)),o=g.Event(Y.SLIDE,{relatedTarget:t,direction:e,from:i,to:n});return g(this._element).trigger(o),o},t._setActiveIndicatorElement=function(t){if(this._indicatorsElement){var e=[].slice.call(this._indicatorsElement.querySelectorAll(nt));g(e).removeClass(X);var n=this._indicatorsElement.children[this._getItemIndex(t)];n&&g(n).addClass(X)}},t._slide=function(t,e){var n,i,o,r=this,s=this._element.querySelector(it),a=this._getItemIndex(s),l=e||s&&this._getItemByDirection(t,s),c=this._getItemIndex(l),h=Boolean(this._interval);if(o=t===K?(n=J,i=Z,B):(n=G,i=tt,V),l&&g(l).hasClass(X))this._isSliding=!1;else if(!this._triggerSlideEvent(l,o).isDefaultPrevented()&&s&&l){this._isSliding=!0,h&&this.pause(),this._setActiveIndicatorElement(l);var u=g.Event(Y.SLID,{relatedTarget:l,direction:o,from:a,to:c});if(g(this._element).hasClass($)){g(l).addClass(i),_.reflow(l),g(s).addClass(n),g(l).addClass(n);var f=parseInt(l.getAttribute(\"data-interval\"),10);f?(this._config.defaultInterval=this._config.defaultInterval||this._config.interval,this._config.interval=f):this._config.interval=this._config.defaultInterval||this._config.interval;var d=_.getTransitionDurationFromElement(s);g(s).one(_.TRANSITION_END,function(){g(l).removeClass(n+\" \"+i).addClass(X),g(s).removeClass(X+\" \"+i+\" \"+n),r._isSliding=!1,setTimeout(function(){return g(r._element).trigger(u)},0)}).emulateTransitionEnd(d)}else g(s).removeClass(X),g(l).addClass(X),this._isSliding=!1,g(this._element).trigger(u);h&&this.cycle()}},r._jQueryInterface=function(i){return this.each(function(){var t=g(this).data(x),e=l({},q,{},g(this).data());\"object\"==typeof i&&(e=l({},e,{},i));var n=\"string\"==typeof i?i:e.slide;if(t||(t=new r(this,e),g(this).data(x,t)),\"number\"==typeof i)t.to(i);else if(\"string\"==typeof n){if(\"undefined\"==typeof t[n])throw new TypeError('No method named \"'+n+'\"');t[n]()}else e.interval&&e.ride&&(t.pause(),t.cycle())})},r._dataApiClickHandler=function(t){var e=_.getSelectorFromElement(this);if(e){var n=g(e)[0];if(n&&g(n).hasClass(z)){var i=l({},g(n).data(),{},g(this).data()),o=this.getAttribute(\"data-slide-to\");o&&(i.interval=!1),r._jQueryInterface.call(g(n),i),o&&g(n).data(x).to(o),t.preventDefault()}}},s(r,null,[{key:\"VERSION\",get:function(){return\"4.4.1\"}},{key:\"Default\",get:function(){return q}}]),r}();g(document).on(Y.CLICK_DATA_API,lt,ut._dataApiClickHandler),g(window).on(Y.LOAD_DATA_API,function(){for(var t=[].slice.call(document.querySelectorAll(ct)),e=0,n=t.length;e<n;e++){var i=g(t[e]);ut._jQueryInterface.call(i,i.data())}}),g.fn[R]=ut._jQueryInterface,g.fn[R].Constructor=ut,g.fn[R].noConflict=function(){return g.fn[R]=W,ut._jQueryInterface};var ft=\"collapse\",dt=\"bs.collapse\",gt=\".\"+dt,_t=g.fn[ft],mt={toggle:!0,parent:\"\"},pt={toggle:\"boolean\",parent:\"(string|element)\"},vt={SHOW:\"show\"+gt,SHOWN:\"shown\"+gt,HIDE:\"hide\"+gt,HIDDEN:\"hidden\"+gt,CLICK_DATA_API:\"click\"+gt+\".data-api\"},yt=\"show\",Et=\"collapse\",Ct=\"collapsing\",Tt=\"collapsed\",bt=\"width\",St=\"height\",Dt=\".show, .collapsing\",It='[data-toggle=\"collapse\"]',wt=function(){function a(e,t){this._isTransitioning=!1,this._element=e,this._config=this._getConfig(t),this._triggerArray=[].slice.call(document.querySelectorAll('[data-toggle=\"collapse\"][href=\"#'+e.id+'\"],[data-toggle=\"collapse\"][data-target=\"#'+e.id+'\"]'));for(var n=[].slice.call(document.querySelectorAll(It)),i=0,o=n.length;i<o;i++){var r=n[i],s=_.getSelectorFromElement(r),a=[].slice.call(document.querySelectorAll(s)).filter(function(t){return t===e});null!==s&&0<a.length&&(this._selector=s,this._triggerArray.push(r))}this._parent=this._config.parent?this._getParent():null,this._config.parent||this._addAriaAndCollapsedClass(this._element,this._triggerArray),this._config.toggle&&this.toggle()}var t=a.prototype;return t.toggle=function(){g(this._element).hasClass(yt)?this.hide():this.show()},t.show=function(){var t,e,n=this;if(!this._isTransitioning&&!g(this._element).hasClass(yt)&&(this._parent&&0===(t=[].slice.call(this._parent.querySelectorAll(Dt)).filter(function(t){return\"string\"==typeof n._config.parent?t.getAttribute(\"data-parent\")===n._config.parent:t.classList.contains(Et)})).length&&(t=null),!(t&&(e=g(t).not(this._selector).data(dt))&&e._isTransitioning))){var i=g.Event(vt.SHOW);if(g(this._element).trigger(i),!i.isDefaultPrevented()){t&&(a._jQueryInterface.call(g(t).not(this._selector),\"hide\"),e||g(t).data(dt,null));var o=this._getDimension();g(this._element).removeClass(Et).addClass(Ct),this._element.style[o]=0,this._triggerArray.length&&g(this._triggerArray).removeClass(Tt).attr(\"aria-expanded\",!0),this.setTransitioning(!0);var r=\"scroll\"+(o[0].toUpperCase()+o.slice(1)),s=_.getTransitionDurationFromElement(this._element);g(this._element).one(_.TRANSITION_END,function(){g(n._element).removeClass(Ct).addClass(Et).addClass(yt),n._element.style[o]=\"\",n.setTransitioning(!1),g(n._element).trigger(vt.SHOWN)}).emulateTransitionEnd(s),this._element.style[o]=this._element[r]+\"px\"}}},t.hide=function(){var t=this;if(!this._isTransitioning&&g(this._element).hasClass(yt)){var e=g.Event(vt.HIDE);if(g(this._element).trigger(e),!e.isDefaultPrevented()){var n=this._getDimension();this._element.style[n]=this._element.getBoundingClientRect()[n]+\"px\",_.reflow(this._element),g(this._element).addClass(Ct).removeClass(Et).removeClass(yt);var i=this._triggerArray.length;if(0<i)for(var o=0;o<i;o++){var r=this._triggerArray[o],s=_.getSelectorFromElement(r);if(null!==s)g([].slice.call(document.querySelectorAll(s))).hasClass(yt)||g(r).addClass(Tt).attr(\"aria-expanded\",!1)}this.setTransitioning(!0);this._element.style[n]=\"\";var a=_.getTransitionDurationFromElement(this._element);g(this._element).one(_.TRANSITION_END,function(){t.setTransitioning(!1),g(t._element).removeClass(Ct).addClass(Et).trigger(vt.HIDDEN)}).emulateTransitionEnd(a)}}},t.setTransitioning=function(t){this._isTransitioning=t},t.dispose=function(){g.removeData(this._element,dt),this._config=null,this._parent=null,this._element=null,this._triggerArray=null,this._isTransitioning=null},t._getConfig=function(t){return(t=l({},mt,{},t)).toggle=Boolean(t.toggle),_.typeCheckConfig(ft,t,pt),t},t._getDimension=function(){return g(this._element).hasClass(bt)?bt:St},t._getParent=function(){var t,n=this;_.isElement(this._config.parent)?(t=this._config.parent,\"undefined\"!=typeof this._config.parent.jquery&&(t=this._config.parent[0])):t=document.querySelector(this._config.parent);var e='[data-toggle=\"collapse\"][data-parent=\"'+this._config.parent+'\"]',i=[].slice.call(t.querySelectorAll(e));return g(i).each(function(t,e){n._addAriaAndCollapsedClass(a._getTargetFromElement(e),[e])}),t},t._addAriaAndCollapsedClass=function(t,e){var n=g(t).hasClass(yt);e.length&&g(e).toggleClass(Tt,!n).attr(\"aria-expanded\",n)},a._getTargetFromElement=function(t){var e=_.getSelectorFromElement(t);return e?document.querySelector(e):null},a._jQueryInterface=function(i){return this.each(function(){var t=g(this),e=t.data(dt),n=l({},mt,{},t.data(),{},\"object\"==typeof i&&i?i:{});if(!e&&n.toggle&&/show|hide/.test(i)&&(n.toggle=!1),e||(e=new a(this,n),t.data(dt,e)),\"string\"==typeof i){if(\"undefined\"==typeof e[i])throw new TypeError('No method named \"'+i+'\"');e[i]()}})},s(a,null,[{key:\"VERSION\",get:function(){return\"4.4.1\"}},{key:\"Default\",get:function(){return mt}}]),a}();g(document).on(vt.CLICK_DATA_API,It,function(t){\"A\"===t.currentTarget.tagName&&t.preventDefault();var n=g(this),e=_.getSelectorFromElement(this),i=[].slice.call(document.querySelectorAll(e));g(i).each(function(){var t=g(this),e=t.data(dt)?\"toggle\":n.data();wt._jQueryInterface.call(t,e)})}),g.fn[ft]=wt._jQueryInterface,g.fn[ft].Constructor=wt,g.fn[ft].noConflict=function(){return g.fn[ft]=_t,wt._jQueryInterface};var At=\"dropdown\",Nt=\"bs.dropdown\",Ot=\".\"+Nt,kt=\".data-api\",Pt=g.fn[At],Lt=new RegExp(\"38|40|27\"),jt={HIDE:\"hide\"+Ot,HIDDEN:\"hidden\"+Ot,SHOW:\"show\"+Ot,SHOWN:\"shown\"+Ot,CLICK:\"click\"+Ot,CLICK_DATA_API:\"click\"+Ot+kt,KEYDOWN_DATA_API:\"keydown\"+Ot+kt,KEYUP_DATA_API:\"keyup\"+Ot+kt},Ht=\"disabled\",Rt=\"show\",xt=\"dropup\",Ft=\"dropright\",Ut=\"dropleft\",Wt=\"dropdown-menu-right\",qt=\"position-static\",Mt='[data-toggle=\"dropdown\"]',Kt=\".dropdown form\",Qt=\".dropdown-menu\",Bt=\".navbar-nav\",Vt=\".dropdown-menu .dropdown-item:not(.disabled):not(:disabled)\",Yt=\"top-start\",zt=\"top-end\",Xt=\"bottom-start\",$t=\"bottom-end\",Gt=\"right-start\",Jt=\"left-start\",Zt={offset:0,flip:!0,boundary:\"scrollParent\",reference:\"toggle\",display:\"dynamic\",popperConfig:null},te={offset:\"(number|string|function)\",flip:\"boolean\",boundary:\"(string|element)\",reference:\"(string|element)\",display:\"string\",popperConfig:\"(null|object)\"},ee=function(){function c(t,e){this._element=t,this._popper=null,this._config=this._getConfig(e),this._menu=this._getMenuElement(),this._inNavbar=this._detectNavbar(),this._addEventListeners()}var t=c.prototype;return t.toggle=function(){if(!this._element.disabled&&!g(this._element).hasClass(Ht)){var t=g(this._menu).hasClass(Rt);c._clearMenus(),t||this.show(!0)}},t.show=function(t){if(void 0===t&&(t=!1),!(this._element.disabled||g(this._element).hasClass(Ht)||g(this._menu).hasClass(Rt))){var e={relatedTarget:this._element},n=g.Event(jt.SHOW,e),i=c._getParentFromElement(this._element);if(g(i).trigger(n),!n.isDefaultPrevented()){if(!this._inNavbar&&t){if(\"undefined\"==typeof u)throw new TypeError(\"Bootstrap's dropdowns require Popper.js (https://popper.js.org/)\");var o=this._element;\"parent\"===this._config.reference?o=i:_.isElement(this._config.reference)&&(o=this._config.reference,\"undefined\"!=typeof this._config.reference.jquery&&(o=this._config.reference[0])),\"scrollParent\"!==this._config.boundary&&g(i).addClass(qt),this._popper=new u(o,this._menu,this._getPopperConfig())}\"ontouchstart\"in document.documentElement&&0===g(i).closest(Bt).length&&g(document.body).children().on(\"mouseover\",null,g.noop),this._element.focus(),this._element.setAttribute(\"aria-expanded\",!0),g(this._menu).toggleClass(Rt),g(i).toggleClass(Rt).trigger(g.Event(jt.SHOWN,e))}}},t.hide=function(){if(!this._element.disabled&&!g(this._element).hasClass(Ht)&&g(this._menu).hasClass(Rt)){var t={relatedTarget:this._element},e=g.Event(jt.HIDE,t),n=c._getParentFromElement(this._element);g(n).trigger(e),e.isDefaultPrevented()||(this._popper&&this._popper.destroy(),g(this._menu).toggleClass(Rt),g(n).toggleClass(Rt).trigger(g.Event(jt.HIDDEN,t)))}},t.dispose=function(){g.removeData(this._element,Nt),g(this._element).off(Ot),this._element=null,(this._menu=null)!==this._popper&&(this._popper.destroy(),this._popper=null)},t.update=function(){this._inNavbar=this._detectNavbar(),null!==this._popper&&this._popper.scheduleUpdate()},t._addEventListeners=function(){var e=this;g(this._element).on(jt.CLICK,function(t){t.preventDefault(),t.stopPropagation(),e.toggle()})},t._getConfig=function(t){return t=l({},this.constructor.Default,{},g(this._element).data(),{},t),_.typeCheckConfig(At,t,this.constructor.DefaultType),t},t._getMenuElement=function(){if(!this._menu){var t=c._getParentFromElement(this._element);t&&(this._menu=t.querySelector(Qt))}return this._menu},t._getPlacement=function(){var t=g(this._element.parentNode),e=Xt;return t.hasClass(xt)?(e=Yt,g(this._menu).hasClass(Wt)&&(e=zt)):t.hasClass(Ft)?e=Gt:t.hasClass(Ut)?e=Jt:g(this._menu).hasClass(Wt)&&(e=$t),e},t._detectNavbar=function(){return 0<g(this._element).closest(\".navbar\").length},t._getOffset=function(){var e=this,t={};return\"function\"==typeof this._config.offset?t.fn=function(t){return t.offsets=l({},t.offsets,{},e._config.offset(t.offsets,e._element)||{}),t}:t.offset=this._config.offset,t},t._getPopperConfig=function(){var t={placement:this._getPlacement(),modifiers:{offset:this._getOffset(),flip:{enabled:this._config.flip},preventOverflow:{boundariesElement:this._config.boundary}}};return\"static\"===this._config.display&&(t.modifiers.applyStyle={enabled:!1}),l({},t,{},this._config.popperConfig)},c._jQueryInterface=function(e){return this.each(function(){var t=g(this).data(Nt);if(t||(t=new c(this,\"object\"==typeof e?e:null),g(this).data(Nt,t)),\"string\"==typeof e){if(\"undefined\"==typeof t[e])throw new TypeError('No method named \"'+e+'\"');t[e]()}})},c._clearMenus=function(t){if(!t||3!==t.which&&(\"keyup\"!==t.type||9===t.which))for(var e=[].slice.call(document.querySelectorAll(Mt)),n=0,i=e.length;n<i;n++){var o=c._getParentFromElement(e[n]),r=g(e[n]).data(Nt),s={relatedTarget:e[n]};if(t&&\"click\"===t.type&&(s.clickEvent=t),r){var a=r._menu;if(g(o).hasClass(Rt)&&!(t&&(\"click\"===t.type&&/input|textarea/i.test(t.target.tagName)||\"keyup\"===t.type&&9===t.which)&&g.contains(o,t.target))){var l=g.Event(jt.HIDE,s);g(o).trigger(l),l.isDefaultPrevented()||(\"ontouchstart\"in document.documentElement&&g(document.body).children().off(\"mouseover\",null,g.noop),e[n].setAttribute(\"aria-expanded\",\"false\"),r._popper&&r._popper.destroy(),g(a).removeClass(Rt),g(o).removeClass(Rt).trigger(g.Event(jt.HIDDEN,s)))}}}},c._getParentFromElement=function(t){var e,n=_.getSelectorFromElement(t);return n&&(e=document.querySelector(n)),e||t.parentNode},c._dataApiKeydownHandler=function(t){if((/input|textarea/i.test(t.target.tagName)?!(32===t.which||27!==t.which&&(40!==t.which&&38!==t.which||g(t.target).closest(Qt).length)):Lt.test(t.which))&&(t.preventDefault(),t.stopPropagation(),!this.disabled&&!g(this).hasClass(Ht))){var e=c._getParentFromElement(this),n=g(e).hasClass(Rt);if(n||27!==t.which)if(n&&(!n||27!==t.which&&32!==t.which)){var i=[].slice.call(e.querySelectorAll(Vt)).filter(function(t){return g(t).is(\":visible\")});if(0!==i.length){var o=i.indexOf(t.target);38===t.which&&0<o&&o--,40===t.which&&o<i.length-1&&o++,o<0&&(o=0),i[o].focus()}}else{if(27===t.which){var r=e.querySelector(Mt);g(r).trigger(\"focus\")}g(this).trigger(\"click\")}}},s(c,null,[{key:\"VERSION\",get:function(){return\"4.4.1\"}},{key:\"Default\",get:function(){return Zt}},{key:\"DefaultType\",get:function(){return te}}]),c}();g(document).on(jt.KEYDOWN_DATA_API,Mt,ee._dataApiKeydownHandler).on(jt.KEYDOWN_DATA_API,Qt,ee._dataApiKeydownHandler).on(jt.CLICK_DATA_API+\" \"+jt.KEYUP_DATA_API,ee._clearMenus).on(jt.CLICK_DATA_API,Mt,function(t){t.preventDefault(),t.stopPropagation(),ee._jQueryInterface.call(g(this),\"toggle\")}).on(jt.CLICK_DATA_API,Kt,function(t){t.stopPropagation()}),g.fn[At]=ee._jQueryInterface,g.fn[At].Constructor=ee,g.fn[At].noConflict=function(){return g.fn[At]=Pt,ee._jQueryInterface};var ne=\"modal\",ie=\"bs.modal\",oe=\".\"+ie,re=g.fn[ne],se={backdrop:!0,keyboard:!0,focus:!0,show:!0},ae={backdrop:\"(boolean|string)\",keyboard:\"boolean\",focus:\"boolean\",show:\"boolean\"},le={HIDE:\"hide\"+oe,HIDE_PREVENTED:\"hidePrevented\"+oe,HIDDEN:\"hidden\"+oe,SHOW:\"show\"+oe,SHOWN:\"shown\"+oe,FOCUSIN:\"focusin\"+oe,RESIZE:\"resize\"+oe,CLICK_DISMISS:\"click.dismiss\"+oe,KEYDOWN_DISMISS:\"keydown.dismiss\"+oe,MOUSEUP_DISMISS:\"mouseup.dismiss\"+oe,MOUSEDOWN_DISMISS:\"mousedown.dismiss\"+oe,CLICK_DATA_API:\"click\"+oe+\".data-api\"},ce=\"modal-dialog-scrollable\",he=\"modal-scrollbar-measure\",ue=\"modal-backdrop\",fe=\"modal-open\",de=\"fade\",ge=\"show\",_e=\"modal-static\",me=\".modal-dialog\",pe=\".modal-body\",ve='[data-toggle=\"modal\"]',ye='[data-dismiss=\"modal\"]',Ee=\".fixed-top, .fixed-bottom, .is-fixed, .sticky-top\",Ce=\".sticky-top\",Te=function(){function o(t,e){this._config=this._getConfig(e),this._element=t,this._dialog=t.querySelector(me),this._backdrop=null,this._isShown=!1,this._isBodyOverflowing=!1,this._ignoreBackdropClick=!1,this._isTransitioning=!1,this._scrollbarWidth=0}var t=o.prototype;return t.toggle=function(t){return this._isShown?this.hide():this.show(t)},t.show=function(t){var e=this;if(!this._isShown&&!this._isTransitioning){g(this._element).hasClass(de)&&(this._isTransitioning=!0);var n=g.Event(le.SHOW,{relatedTarget:t});g(this._element).trigger(n),this._isShown||n.isDefaultPrevented()||(this._isShown=!0,this._checkScrollbar(),this._setScrollbar(),this._adjustDialog(),this._setEscapeEvent(),this._setResizeEvent(),g(this._element).on(le.CLICK_DISMISS,ye,function(t){return e.hide(t)}),g(this._dialog).on(le.MOUSEDOWN_DISMISS,function(){g(e._element).one(le.MOUSEUP_DISMISS,function(t){g(t.target).is(e._element)&&(e._ignoreBackdropClick=!0)})}),this._showBackdrop(function(){return e._showElement(t)}))}},t.hide=function(t){var e=this;if(t&&t.preventDefault(),this._isShown&&!this._isTransitioning){var n=g.Event(le.HIDE);if(g(this._element).trigger(n),this._isShown&&!n.isDefaultPrevented()){this._isShown=!1;var i=g(this._element).hasClass(de);if(i&&(this._isTransitioning=!0),this._setEscapeEvent(),this._setResizeEvent(),g(document).off(le.FOCUSIN),g(this._element).removeClass(ge),g(this._element).off(le.CLICK_DISMISS),g(this._dialog).off(le.MOUSEDOWN_DISMISS),i){var o=_.getTransitionDurationFromElement(this._element);g(this._element).one(_.TRANSITION_END,function(t){return e._hideModal(t)}).emulateTransitionEnd(o)}else this._hideModal()}}},t.dispose=function(){[window,this._element,this._dialog].forEach(function(t){return g(t).off(oe)}),g(document).off(le.FOCUSIN),g.removeData(this._element,ie),this._config=null,this._element=null,this._dialog=null,this._backdrop=null,this._isShown=null,this._isBodyOverflowing=null,this._ignoreBackdropClick=null,this._isTransitioning=null,this._scrollbarWidth=null},t.handleUpdate=function(){this._adjustDialog()},t._getConfig=function(t){return t=l({},se,{},t),_.typeCheckConfig(ne,t,ae),t},t._triggerBackdropTransition=function(){var t=this;if(\"static\"===this._config.backdrop){var e=g.Event(le.HIDE_PREVENTED);if(g(this._element).trigger(e),e.defaultPrevented)return;this._element.classList.add(_e);var n=_.getTransitionDurationFromElement(this._element);g(this._element).one(_.TRANSITION_END,function(){t._element.classList.remove(_e)}).emulateTransitionEnd(n),this._element.focus()}else this.hide()},t._showElement=function(t){var e=this,n=g(this._element).hasClass(de),i=this._dialog?this._dialog.querySelector(pe):null;this._element.parentNode&&this._element.parentNode.nodeType===Node.ELEMENT_NODE||document.body.appendChild(this._element),this._element.style.display=\"block\",this._element.removeAttribute(\"aria-hidden\"),this._element.setAttribute(\"aria-modal\",!0),g(this._dialog).hasClass(ce)&&i?i.scrollTop=0:this._element.scrollTop=0,n&&_.reflow(this._element),g(this._element).addClass(ge),this._config.focus&&this._enforceFocus();function o(){e._config.focus&&e._element.focus(),e._isTransitioning=!1,g(e._element).trigger(r)}var r=g.Event(le.SHOWN,{relatedTarget:t});if(n){var s=_.getTransitionDurationFromElement(this._dialog);g(this._dialog).one(_.TRANSITION_END,o).emulateTransitionEnd(s)}else o()},t._enforceFocus=function(){var e=this;g(document).off(le.FOCUSIN).on(le.FOCUSIN,function(t){document!==t.target&&e._element!==t.target&&0===g(e._element).has(t.target).length&&e._element.focus()})},t._setEscapeEvent=function(){var e=this;this._isShown&&this._config.keyboard?g(this._element).on(le.KEYDOWN_DISMISS,function(t){27===t.which&&e._triggerBackdropTransition()}):this._isShown||g(this._element).off(le.KEYDOWN_DISMISS)},t._setResizeEvent=function(){var e=this;this._isShown?g(window).on(le.RESIZE,function(t){return e.handleUpdate(t)}):g(window).off(le.RESIZE)},t._hideModal=function(){var t=this;this._element.style.display=\"none\",this._element.setAttribute(\"aria-hidden\",!0),this._element.removeAttribute(\"aria-modal\"),this._isTransitioning=!1,this._showBackdrop(function(){g(document.body).removeClass(fe),t._resetAdjustments(),t._resetScrollbar(),g(t._element).trigger(le.HIDDEN)})},t._removeBackdrop=function(){this._backdrop&&(g(this._backdrop).remove(),this._backdrop=null)},t._showBackdrop=function(t){var e=this,n=g(this._element).hasClass(de)?de:\"\";if(this._isShown&&this._config.backdrop){if(this._backdrop=document.createElement(\"div\"),this._backdrop.className=ue,n&&this._backdrop.classList.add(n),g(this._backdrop).appendTo(document.body),g(this._element).on(le.CLICK_DISMISS,function(t){e._ignoreBackdropClick?e._ignoreBackdropClick=!1:t.target===t.currentTarget&&e._triggerBackdropTransition()}),n&&_.reflow(this._backdrop),g(this._backdrop).addClass(ge),!t)return;if(!n)return void t();var i=_.getTransitionDurationFromElement(this._backdrop);g(this._backdrop).one(_.TRANSITION_END,t).emulateTransitionEnd(i)}else if(!this._isShown&&this._backdrop){g(this._backdrop).removeClass(ge);var o=function(){e._removeBackdrop(),t&&t()};if(g(this._element).hasClass(de)){var r=_.getTransitionDurationFromElement(this._backdrop);g(this._backdrop).one(_.TRANSITION_END,o).emulateTransitionEnd(r)}else o()}else t&&t()},t._adjustDialog=function(){var t=this._element.scrollHeight>document.documentElement.clientHeight;!this._isBodyOverflowing&&t&&(this._element.style.paddingLeft=this._scrollbarWidth+\"px\"),this._isBodyOverflowing&&!t&&(this._element.style.paddingRight=this._scrollbarWidth+\"px\")},t._resetAdjustments=function(){this._element.style.paddingLeft=\"\",this._element.style.paddingRight=\"\"},t._checkScrollbar=function(){var t=document.body.getBoundingClientRect();this._isBodyOverflowing=t.left+t.right<window.innerWidth,this._scrollbarWidth=this._getScrollbarWidth()},t._setScrollbar=function(){var o=this;if(this._isBodyOverflowing){var t=[].slice.call(document.querySelectorAll(Ee)),e=[].slice.call(document.querySelectorAll(Ce));g(t).each(function(t,e){var n=e.style.paddingRight,i=g(e).css(\"padding-right\");g(e).data(\"padding-right\",n).css(\"padding-right\",parseFloat(i)+o._scrollbarWidth+\"px\")}),g(e).each(function(t,e){var n=e.style.marginRight,i=g(e).css(\"margin-right\");g(e).data(\"margin-right\",n).css(\"margin-right\",parseFloat(i)-o._scrollbarWidth+\"px\")});var n=document.body.style.paddingRight,i=g(document.body).css(\"padding-right\");g(document.body).data(\"padding-right\",n).css(\"padding-right\",parseFloat(i)+this._scrollbarWidth+\"px\")}g(document.body).addClass(fe)},t._resetScrollbar=function(){var t=[].slice.call(document.querySelectorAll(Ee));g(t).each(function(t,e){var n=g(e).data(\"padding-right\");g(e).removeData(\"padding-right\"),e.style.paddingRight=n||\"\"});var e=[].slice.call(document.querySelectorAll(\"\"+Ce));g(e).each(function(t,e){var n=g(e).data(\"margin-right\");\"undefined\"!=typeof n&&g(e).css(\"margin-right\",n).removeData(\"margin-right\")});var n=g(document.body).data(\"padding-right\");g(document.body).removeData(\"padding-right\"),document.body.style.paddingRight=n||\"\"},t._getScrollbarWidth=function(){var t=document.createElement(\"div\");t.className=he,document.body.appendChild(t);var e=t.getBoundingClientRect().width-t.clientWidth;return document.body.removeChild(t),e},o._jQueryInterface=function(n,i){return this.each(function(){var t=g(this).data(ie),e=l({},se,{},g(this).data(),{},\"object\"==typeof n&&n?n:{});if(t||(t=new o(this,e),g(this).data(ie,t)),\"string\"==typeof n){if(\"undefined\"==typeof t[n])throw new TypeError('No method named \"'+n+'\"');t[n](i)}else e.show&&t.show(i)})},s(o,null,[{key:\"VERSION\",get:function(){return\"4.4.1\"}},{key:\"Default\",get:function(){return se}}]),o}();g(document).on(le.CLICK_DATA_API,ve,function(t){var e,n=this,i=_.getSelectorFromElement(this);i&&(e=document.querySelector(i));var o=g(e).data(ie)?\"toggle\":l({},g(e).data(),{},g(this).data());\"A\"!==this.tagName&&\"AREA\"!==this.tagName||t.preventDefault();var r=g(e).one(le.SHOW,function(t){t.isDefaultPrevented()||r.one(le.HIDDEN,function(){g(n).is(\":visible\")&&n.focus()})});Te._jQueryInterface.call(g(e),o,this)}),g.fn[ne]=Te._jQueryInterface,g.fn[ne].Constructor=Te,g.fn[ne].noConflict=function(){return g.fn[ne]=re,Te._jQueryInterface};var be=[\"background\",\"cite\",\"href\",\"itemtype\",\"longdesc\",\"poster\",\"src\",\"xlink:href\"],Se={\"*\":[\"class\",\"dir\",\"id\",\"lang\",\"role\",/^aria-[\\w-]*$/i],a:[\"target\",\"href\",\"title\",\"rel\"],area:[],b:[],br:[],col:[],code:[],div:[],em:[],hr:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],i:[],img:[\"src\",\"alt\",\"title\",\"width\",\"height\"],li:[],ol:[],p:[],pre:[],s:[],small:[],span:[],sub:[],sup:[],strong:[],u:[],ul:[]},De=/^(?:(?:https?|mailto|ftp|tel|file):|[^&:/?#]*(?:[/?#]|$))/gi,Ie=/^data:(?:image\\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\\/(?:mpeg|mp4|ogg|webm)|audio\\/(?:mp3|oga|ogg|opus));base64,[a-z0-9+/]+=*$/i;function we(t,r,e){if(0===t.length)return t;if(e&&\"function\"==typeof e)return e(t);for(var n=(new window.DOMParser).parseFromString(t,\"text/html\"),s=Object.keys(r),a=[].slice.call(n.body.querySelectorAll(\"*\")),i=function(t){var e=a[t],n=e.nodeName.toLowerCase();if(-1===s.indexOf(e.nodeName.toLowerCase()))return e.parentNode.removeChild(e),\"continue\";var i=[].slice.call(e.attributes),o=[].concat(r[\"*\"]||[],r[n]||[]);i.forEach(function(t){!function(t,e){var n=t.nodeName.toLowerCase();if(-1!==e.indexOf(n))return-1===be.indexOf(n)||Boolean(t.nodeValue.match(De)||t.nodeValue.match(Ie));for(var i=e.filter(function(t){return t instanceof RegExp}),o=0,r=i.length;o<r;o++)if(n.match(i[o]))return!0;return!1}(t,o)&&e.removeAttribute(t.nodeName)})},o=0,l=a.length;o<l;o++)i(o);return n.body.innerHTML}var Ae=\"tooltip\",Ne=\"bs.tooltip\",Oe=\".\"+Ne,ke=g.fn[Ae],Pe=\"bs-tooltip\",Le=new RegExp(\"(^|\\\\s)\"+Pe+\"\\\\S+\",\"g\"),je=[\"sanitize\",\"whiteList\",\"sanitizeFn\"],He={animation:\"boolean\",template:\"string\",title:\"(string|element|function)\",trigger:\"string\",delay:\"(number|object)\",html:\"boolean\",selector:\"(string|boolean)\",placement:\"(string|function)\",offset:\"(number|string|function)\",container:\"(string|element|boolean)\",fallbackPlacement:\"(string|array)\",boundary:\"(string|element)\",sanitize:\"boolean\",sanitizeFn:\"(null|function)\",whiteList:\"object\",popperConfig:\"(null|object)\"},Re={AUTO:\"auto\",TOP:\"top\",RIGHT:\"right\",BOTTOM:\"bottom\",LEFT:\"left\"},xe={animation:!0,template:'<div class=\"tooltip\" role=\"tooltip\"><div class=\"arrow\"></div><div class=\"tooltip-inner\"></div></div>',trigger:\"hover focus\",title:\"\",delay:0,html:!1,selector:!1,placement:\"top\",offset:0,container:!1,fallbackPlacement:\"flip\",boundary:\"scrollParent\",sanitize:!0,sanitizeFn:null,whiteList:Se,popperConfig:null},Fe=\"show\",Ue=\"out\",We={HIDE:\"hide\"+Oe,HIDDEN:\"hidden\"+Oe,SHOW:\"show\"+Oe,SHOWN:\"shown\"+Oe,INSERTED:\"inserted\"+Oe,CLICK:\"click\"+Oe,FOCUSIN:\"focusin\"+Oe,FOCUSOUT:\"focusout\"+Oe,MOUSEENTER:\"mouseenter\"+Oe,MOUSELEAVE:\"mouseleave\"+Oe},qe=\"fade\",Me=\"show\",Ke=\".tooltip-inner\",Qe=\".arrow\",Be=\"hover\",Ve=\"focus\",Ye=\"click\",ze=\"manual\",Xe=function(){function i(t,e){if(\"undefined\"==typeof u)throw new TypeError(\"Bootstrap's tooltips require Popper.js (https://popper.js.org/)\");this._isEnabled=!0,this._timeout=0,this._hoverState=\"\",this._activeTrigger={},this._popper=null,this.element=t,this.config=this._getConfig(e),this.tip=null,this._setListeners()}var t=i.prototype;return t.enable=function(){this._isEnabled=!0},t.disable=function(){this._isEnabled=!1},t.toggleEnabled=function(){this._isEnabled=!this._isEnabled},t.toggle=function(t){if(this._isEnabled)if(t){var e=this.constructor.DATA_KEY,n=g(t.currentTarget).data(e);n||(n=new this.constructor(t.currentTarget,this._getDelegateConfig()),g(t.currentTarget).data(e,n)),n._activeTrigger.click=!n._activeTrigger.click,n._isWithActiveTrigger()?n._enter(null,n):n._leave(null,n)}else{if(g(this.getTipElement()).hasClass(Me))return void this._leave(null,this);this._enter(null,this)}},t.dispose=function(){clearTimeout(this._timeout),g.removeData(this.element,this.constructor.DATA_KEY),g(this.element).off(this.constructor.EVENT_KEY),g(this.element).closest(\".modal\").off(\"hide.bs.modal\",this._hideModalHandler),this.tip&&g(this.tip).remove(),this._isEnabled=null,this._timeout=null,this._hoverState=null,this._activeTrigger=null,this._popper&&this._popper.destroy(),this._popper=null,this.element=null,this.config=null,this.tip=null},t.show=function(){var e=this;if(\"none\"===g(this.element).css(\"display\"))throw new Error(\"Please use show on visible elements\");var t=g.Event(this.constructor.Event.SHOW);if(this.isWithContent()&&this._isEnabled){g(this.element).trigger(t);var n=_.findShadowRoot(this.element),i=g.contains(null!==n?n:this.element.ownerDocument.documentElement,this.element);if(t.isDefaultPrevented()||!i)return;var o=this.getTipElement(),r=_.getUID(this.constructor.NAME);o.setAttribute(\"id\",r),this.element.setAttribute(\"aria-describedby\",r),this.setContent(),this.config.animation&&g(o).addClass(qe);var s=\"function\"==typeof this.config.placement?this.config.placement.call(this,o,this.element):this.config.placement,a=this._getAttachment(s);this.addAttachmentClass(a);var l=this._getContainer();g(o).data(this.constructor.DATA_KEY,this),g.contains(this.element.ownerDocument.documentElement,this.tip)||g(o).appendTo(l),g(this.element).trigger(this.constructor.Event.INSERTED),this._popper=new u(this.element,o,this._getPopperConfig(a)),g(o).addClass(Me),\"ontouchstart\"in document.documentElement&&g(document.body).children().on(\"mouseover\",null,g.noop);var c=function(){e.config.animation&&e._fixTransition();var t=e._hoverState;e._hoverState=null,g(e.element).trigger(e.constructor.Event.SHOWN),t===Ue&&e._leave(null,e)};if(g(this.tip).hasClass(qe)){var h=_.getTransitionDurationFromElement(this.tip);g(this.tip).one(_.TRANSITION_END,c).emulateTransitionEnd(h)}else c()}},t.hide=function(t){function e(){n._hoverState!==Fe&&i.parentNode&&i.parentNode.removeChild(i),n._cleanTipClass(),n.element.removeAttribute(\"aria-describedby\"),g(n.element).trigger(n.constructor.Event.HIDDEN),null!==n._popper&&n._popper.destroy(),t&&t()}var n=this,i=this.getTipElement(),o=g.Event(this.constructor.Event.HIDE);if(g(this.element).trigger(o),!o.isDefaultPrevented()){if(g(i).removeClass(Me),\"ontouchstart\"in document.documentElement&&g(document.body).children().off(\"mouseover\",null,g.noop),this._activeTrigger[Ye]=!1,this._activeTrigger[Ve]=!1,this._activeTrigger[Be]=!1,g(this.tip).hasClass(qe)){var r=_.getTransitionDurationFromElement(i);g(i).one(_.TRANSITION_END,e).emulateTransitionEnd(r)}else e();this._hoverState=\"\"}},t.update=function(){null!==this._popper&&this._popper.scheduleUpdate()},t.isWithContent=function(){return Boolean(this.getTitle())},t.addAttachmentClass=function(t){g(this.getTipElement()).addClass(Pe+\"-\"+t)},t.getTipElement=function(){return this.tip=this.tip||g(this.config.template)[0],this.tip},t.setContent=function(){var t=this.getTipElement();this.setElementContent(g(t.querySelectorAll(Ke)),this.getTitle()),g(t).removeClass(qe+\" \"+Me)},t.setElementContent=function(t,e){\"object\"!=typeof e||!e.nodeType&&!e.jquery?this.config.html?(this.config.sanitize&&(e=we(e,this.config.whiteList,this.config.sanitizeFn)),t.html(e)):t.text(e):this.config.html?g(e).parent().is(t)||t.empty().append(e):t.text(g(e).text())},t.getTitle=function(){var t=this.element.getAttribute(\"data-original-title\");return t=t||(\"function\"==typeof this.config.title?this.config.title.call(this.element):this.config.title)},t._getPopperConfig=function(t){var e=this;return l({},{placement:t,modifiers:{offset:this._getOffset(),flip:{behavior:this.config.fallbackPlacement},arrow:{element:Qe},preventOverflow:{boundariesElement:this.config.boundary}},onCreate:function(t){t.originalPlacement!==t.placement&&e._handlePopperPlacementChange(t)},onUpdate:function(t){return e._handlePopperPlacementChange(t)}},{},this.config.popperConfig)},t._getOffset=function(){var e=this,t={};return\"function\"==typeof this.config.offset?t.fn=function(t){return t.offsets=l({},t.offsets,{},e.config.offset(t.offsets,e.element)||{}),t}:t.offset=this.config.offset,t},t._getContainer=function(){return!1===this.config.container?document.body:_.isElement(this.config.container)?g(this.config.container):g(document).find(this.config.container)},t._getAttachment=function(t){return Re[t.toUpperCase()]},t._setListeners=function(){var i=this;this.config.trigger.split(\" \").forEach(function(t){if(\"click\"===t)g(i.element).on(i.constructor.Event.CLICK,i.config.selector,function(t){return i.toggle(t)});else if(t!==ze){var e=t===Be?i.constructor.Event.MOUSEENTER:i.constructor.Event.FOCUSIN,n=t===Be?i.constructor.Event.MOUSELEAVE:i.constructor.Event.FOCUSOUT;g(i.element).on(e,i.config.selector,function(t){return i._enter(t)}).on(n,i.config.selector,function(t){return i._leave(t)})}}),this._hideModalHandler=function(){i.element&&i.hide()},g(this.element).closest(\".modal\").on(\"hide.bs.modal\",this._hideModalHandler),this.config.selector?this.config=l({},this.config,{trigger:\"manual\",selector:\"\"}):this._fixTitle()},t._fixTitle=function(){var t=typeof this.element.getAttribute(\"data-original-title\");!this.element.getAttribute(\"title\")&&\"string\"==t||(this.element.setAttribute(\"data-original-title\",this.element.getAttribute(\"title\")||\"\"),this.element.setAttribute(\"title\",\"\"))},t._enter=function(t,e){var n=this.constructor.DATA_KEY;(e=e||g(t.currentTarget).data(n))||(e=new this.constructor(t.currentTarget,this._getDelegateConfig()),g(t.currentTarget).data(n,e)),t&&(e._activeTrigger[\"focusin\"===t.type?Ve:Be]=!0),g(e.getTipElement()).hasClass(Me)||e._hoverState===Fe?e._hoverState=Fe:(clearTimeout(e._timeout),e._hoverState=Fe,e.config.delay&&e.config.delay.show?e._timeout=setTimeout(function(){e._hoverState===Fe&&e.show()},e.config.delay.show):e.show())},t._leave=function(t,e){var n=this.constructor.DATA_KEY;(e=e||g(t.currentTarget).data(n))||(e=new this.constructor(t.currentTarget,this._getDelegateConfig()),g(t.currentTarget).data(n,e)),t&&(e._activeTrigger[\"focusout\"===t.type?Ve:Be]=!1),e._isWithActiveTrigger()||(clearTimeout(e._timeout),e._hoverState=Ue,e.config.delay&&e.config.delay.hide?e._timeout=setTimeout(function(){e._hoverState===Ue&&e.hide()},e.config.delay.hide):e.hide())},t._isWithActiveTrigger=function(){for(var t in this._activeTrigger)if(this._activeTrigger[t])return!0;return!1},t._getConfig=function(t){var e=g(this.element).data();return Object.keys(e).forEach(function(t){-1!==je.indexOf(t)&&delete e[t]}),\"number\"==typeof(t=l({},this.constructor.Default,{},e,{},\"object\"==typeof t&&t?t:{})).delay&&(t.delay={show:t.delay,hide:t.delay}),\"number\"==typeof t.title&&(t.title=t.title.toString()),\"number\"==typeof t.content&&(t.content=t.content.toString()),_.typeCheckConfig(Ae,t,this.constructor.DefaultType),t.sanitize&&(t.template=we(t.template,t.whiteList,t.sanitizeFn)),t},t._getDelegateConfig=function(){var t={};if(this.config)for(var e in this.config)this.constructor.Default[e]!==this.config[e]&&(t[e]=this.config[e]);return t},t._cleanTipClass=function(){var t=g(this.getTipElement()),e=t.attr(\"class\").match(Le);null!==e&&e.length&&t.removeClass(e.join(\"\"))},t._handlePopperPlacementChange=function(t){var e=t.instance;this.tip=e.popper,this._cleanTipClass(),this.addAttachmentClass(this._getAttachment(t.placement))},t._fixTransition=function(){var t=this.getTipElement(),e=this.config.animation;null===t.getAttribute(\"x-placement\")&&(g(t).removeClass(qe),this.config.animation=!1,this.hide(),this.show(),this.config.animation=e)},i._jQueryInterface=function(n){return this.each(function(){var t=g(this).data(Ne),e=\"object\"==typeof n&&n;if((t||!/dispose|hide/.test(n))&&(t||(t=new i(this,e),g(this).data(Ne,t)),\"string\"==typeof n)){if(\"undefined\"==typeof t[n])throw new TypeError('No method named \"'+n+'\"');t[n]()}})},s(i,null,[{key:\"VERSION\",get:function(){return\"4.4.1\"}},{key:\"Default\",get:function(){return xe}},{key:\"NAME\",get:function(){return Ae}},{key:\"DATA_KEY\",get:function(){return Ne}},{key:\"Event\",get:function(){return We}},{key:\"EVENT_KEY\",get:function(){return Oe}},{key:\"DefaultType\",get:function(){return He}}]),i}();g.fn[Ae]=Xe._jQueryInterface,g.fn[Ae].Constructor=Xe,g.fn[Ae].noConflict=function(){return g.fn[Ae]=ke,Xe._jQueryInterface};var $e=\"popover\",Ge=\"bs.popover\",Je=\".\"+Ge,Ze=g.fn[$e],tn=\"bs-popover\",en=new RegExp(\"(^|\\\\s)\"+tn+\"\\\\S+\",\"g\"),nn=l({},Xe.Default,{placement:\"right\",trigger:\"click\",content:\"\",template:'<div class=\"popover\" role=\"tooltip\"><div class=\"arrow\"></div><h3 class=\"popover-header\"></h3><div class=\"popover-body\"></div></div>'}),on=l({},Xe.DefaultType,{content:\"(string|element|function)\"}),rn=\"fade\",sn=\"show\",an=\".popover-header\",ln=\".popover-body\",cn={HIDE:\"hide\"+Je,HIDDEN:\"hidden\"+Je,SHOW:\"show\"+Je,SHOWN:\"shown\"+Je,INSERTED:\"inserted\"+Je,CLICK:\"click\"+Je,FOCUSIN:\"focusin\"+Je,FOCUSOUT:\"focusout\"+Je,MOUSEENTER:\"mouseenter\"+Je,MOUSELEAVE:\"mouseleave\"+Je},hn=function(t){function i(){return t.apply(this,arguments)||this}!function(t,e){t.prototype=Object.create(e.prototype),(t.prototype.constructor=t).__proto__=e}(i,t);var e=i.prototype;return e.isWithContent=function(){return this.getTitle()||this._getContent()},e.addAttachmentClass=function(t){g(this.getTipElement()).addClass(tn+\"-\"+t)},e.getTipElement=function(){return this.tip=this.tip||g(this.config.template)[0],this.tip},e.setContent=function(){var t=g(this.getTipElement());this.setElementContent(t.find(an),this.getTitle());var e=this._getContent();\"function\"==typeof e&&(e=e.call(this.element)),this.setElementContent(t.find(ln),e),t.removeClass(rn+\" \"+sn)},e._getContent=function(){return this.element.getAttribute(\"data-content\")||this.config.content},e._cleanTipClass=function(){var t=g(this.getTipElement()),e=t.attr(\"class\").match(en);null!==e&&0<e.length&&t.removeClass(e.join(\"\"))},i._jQueryInterface=function(n){return this.each(function(){var t=g(this).data(Ge),e=\"object\"==typeof n?n:null;if((t||!/dispose|hide/.test(n))&&(t||(t=new i(this,e),g(this).data(Ge,t)),\"string\"==typeof n)){if(\"undefined\"==typeof t[n])throw new TypeError('No method named \"'+n+'\"');t[n]()}})},s(i,null,[{key:\"VERSION\",get:function(){return\"4.4.1\"}},{key:\"Default\",get:function(){return nn}},{key:\"NAME\",get:function(){return $e}},{key:\"DATA_KEY\",get:function(){return Ge}},{key:\"Event\",get:function(){return cn}},{key:\"EVENT_KEY\",get:function(){return Je}},{key:\"DefaultType\",get:function(){return on}}]),i}(Xe);g.fn[$e]=hn._jQueryInterface,g.fn[$e].Constructor=hn,g.fn[$e].noConflict=function(){return g.fn[$e]=Ze,hn._jQueryInterface};var un=\"scrollspy\",fn=\"bs.scrollspy\",dn=\".\"+fn,gn=g.fn[un],_n={offset:10,method:\"auto\",target:\"\"},mn={offset:\"number\",method:\"string\",target:\"(string|element)\"},pn={ACTIVATE:\"activate\"+dn,SCROLL:\"scroll\"+dn,LOAD_DATA_API:\"load\"+dn+\".data-api\"},vn=\"dropdown-item\",yn=\"active\",En='[data-spy=\"scroll\"]',Cn=\".nav, .list-group\",Tn=\".nav-link\",bn=\".nav-item\",Sn=\".list-group-item\",Dn=\".dropdown\",In=\".dropdown-item\",wn=\".dropdown-toggle\",An=\"offset\",Nn=\"position\",On=function(){function n(t,e){var n=this;this._element=t,this._scrollElement=\"BODY\"===t.tagName?window:t,this._config=this._getConfig(e),this._selector=this._config.target+\" \"+Tn+\",\"+this._config.target+\" \"+Sn+\",\"+this._config.target+\" \"+In,this._offsets=[],this._targets=[],this._activeTarget=null,this._scrollHeight=0,g(this._scrollElement).on(pn.SCROLL,function(t){return n._process(t)}),this.refresh(),this._process()}var t=n.prototype;return t.refresh=function(){var e=this,t=this._scrollElement===this._scrollElement.window?An:Nn,o=\"auto\"===this._config.method?t:this._config.method,r=o===Nn?this._getScrollTop():0;this._offsets=[],this._targets=[],this._scrollHeight=this._getScrollHeight(),[].slice.call(document.querySelectorAll(this._selector)).map(function(t){var e,n=_.getSelectorFromElement(t);if(n&&(e=document.querySelector(n)),e){var i=e.getBoundingClientRect();if(i.width||i.height)return[g(e)[o]().top+r,n]}return null}).filter(function(t){return t}).sort(function(t,e){return t[0]-e[0]}).forEach(function(t){e._offsets.push(t[0]),e._targets.push(t[1])})},t.dispose=function(){g.removeData(this._element,fn),g(this._scrollElement).off(dn),this._element=null,this._scrollElement=null,this._config=null,this._selector=null,this._offsets=null,this._targets=null,this._activeTarget=null,this._scrollHeight=null},t._getConfig=function(t){if(\"string\"!=typeof(t=l({},_n,{},\"object\"==typeof t&&t?t:{})).target){var e=g(t.target).attr(\"id\");e||(e=_.getUID(un),g(t.target).attr(\"id\",e)),t.target=\"#\"+e}return _.typeCheckConfig(un,t,mn),t},t._getScrollTop=function(){return this._scrollElement===window?this._scrollElement.pageYOffset:this._scrollElement.scrollTop},t._getScrollHeight=function(){return this._scrollElement.scrollHeight||Math.max(document.body.scrollHeight,document.documentElement.scrollHeight)},t._getOffsetHeight=function(){return this._scrollElement===window?window.innerHeight:this._scrollElement.getBoundingClientRect().height},t._process=function(){var t=this._getScrollTop()+this._config.offset,e=this._getScrollHeight(),n=this._config.offset+e-this._getOffsetHeight();if(this._scrollHeight!==e&&this.refresh(),n<=t){var i=this._targets[this._targets.length-1];this._activeTarget!==i&&this._activate(i)}else{if(this._activeTarget&&t<this._offsets[0]&&0<this._offsets[0])return this._activeTarget=null,void this._clear();for(var o=this._offsets.length;o--;){this._activeTarget!==this._targets[o]&&t>=this._offsets[o]&&(\"undefined\"==typeof this._offsets[o+1]||t<this._offsets[o+1])&&this._activate(this._targets[o])}}},t._activate=function(e){this._activeTarget=e,this._clear();var t=this._selector.split(\",\").map(function(t){return t+'[data-target=\"'+e+'\"],'+t+'[href=\"'+e+'\"]'}),n=g([].slice.call(document.querySelectorAll(t.join(\",\"))));n.hasClass(vn)?(n.closest(Dn).find(wn).addClass(yn),n.addClass(yn)):(n.addClass(yn),n.parents(Cn).prev(Tn+\", \"+Sn).addClass(yn),n.parents(Cn).prev(bn).children(Tn).addClass(yn)),g(this._scrollElement).trigger(pn.ACTIVATE,{relatedTarget:e})},t._clear=function(){[].slice.call(document.querySelectorAll(this._selector)).filter(function(t){return t.classList.contains(yn)}).forEach(function(t){return t.classList.remove(yn)})},n._jQueryInterface=function(e){return this.each(function(){var t=g(this).data(fn);if(t||(t=new n(this,\"object\"==typeof e&&e),g(this).data(fn,t)),\"string\"==typeof e){if(\"undefined\"==typeof t[e])throw new TypeError('No method named \"'+e+'\"');t[e]()}})},s(n,null,[{key:\"VERSION\",get:function(){return\"4.4.1\"}},{key:\"Default\",get:function(){return _n}}]),n}();g(window).on(pn.LOAD_DATA_API,function(){for(var t=[].slice.call(document.querySelectorAll(En)),e=t.length;e--;){var n=g(t[e]);On._jQueryInterface.call(n,n.data())}}),g.fn[un]=On._jQueryInterface,g.fn[un].Constructor=On,g.fn[un].noConflict=function(){return g.fn[un]=gn,On._jQueryInterface};var kn=\"bs.tab\",Pn=\".\"+kn,Ln=g.fn.tab,jn={HIDE:\"hide\"+Pn,HIDDEN:\"hidden\"+Pn,SHOW:\"show\"+Pn,SHOWN:\"shown\"+Pn,CLICK_DATA_API:\"click\"+Pn+\".data-api\"},Hn=\"dropdown-menu\",Rn=\"active\",xn=\"disabled\",Fn=\"fade\",Un=\"show\",Wn=\".dropdown\",qn=\".nav, .list-group\",Mn=\".active\",Kn=\"> li > .active\",Qn='[data-toggle=\"tab\"], [data-toggle=\"pill\"], [data-toggle=\"list\"]',Bn=\".dropdown-toggle\",Vn=\"> .dropdown-menu .active\",Yn=function(){function i(t){this._element=t}var t=i.prototype;return t.show=function(){var n=this;if(!(this._element.parentNode&&this._element.parentNode.nodeType===Node.ELEMENT_NODE&&g(this._element).hasClass(Rn)||g(this._element).hasClass(xn))){var t,i,e=g(this._element).closest(qn)[0],o=_.getSelectorFromElement(this._element);if(e){var r=\"UL\"===e.nodeName||\"OL\"===e.nodeName?Kn:Mn;i=(i=g.makeArray(g(e).find(r)))[i.length-1]}var s=g.Event(jn.HIDE,{relatedTarget:this._element}),a=g.Event(jn.SHOW,{relatedTarget:i});if(i&&g(i).trigger(s),g(this._element).trigger(a),!a.isDefaultPrevented()&&!s.isDefaultPrevented()){o&&(t=document.querySelector(o)),this._activate(this._element,e);var l=function(){var t=g.Event(jn.HIDDEN,{relatedTarget:n._element}),e=g.Event(jn.SHOWN,{relatedTarget:i});g(i).trigger(t),g(n._element).trigger(e)};t?this._activate(t,t.parentNode,l):l()}}},t.dispose=function(){g.removeData(this._element,kn),this._element=null},t._activate=function(t,e,n){function i(){return o._transitionComplete(t,r,n)}var o=this,r=(!e||\"UL\"!==e.nodeName&&\"OL\"!==e.nodeName?g(e).children(Mn):g(e).find(Kn))[0],s=n&&r&&g(r).hasClass(Fn);if(r&&s){var a=_.getTransitionDurationFromElement(r);g(r).removeClass(Un).one(_.TRANSITION_END,i).emulateTransitionEnd(a)}else i()},t._transitionComplete=function(t,e,n){if(e){g(e).removeClass(Rn);var i=g(e.parentNode).find(Vn)[0];i&&g(i).removeClass(Rn),\"tab\"===e.getAttribute(\"role\")&&e.setAttribute(\"aria-selected\",!1)}if(g(t).addClass(Rn),\"tab\"===t.getAttribute(\"role\")&&t.setAttribute(\"aria-selected\",!0),_.reflow(t),t.classList.contains(Fn)&&t.classList.add(Un),t.parentNode&&g(t.parentNode).hasClass(Hn)){var o=g(t).closest(Wn)[0];if(o){var r=[].slice.call(o.querySelectorAll(Bn));g(r).addClass(Rn)}t.setAttribute(\"aria-expanded\",!0)}n&&n()},i._jQueryInterface=function(n){return this.each(function(){var t=g(this),e=t.data(kn);if(e||(e=new i(this),t.data(kn,e)),\"string\"==typeof n){if(\"undefined\"==typeof e[n])throw new TypeError('No method named \"'+n+'\"');e[n]()}})},s(i,null,[{key:\"VERSION\",get:function(){return\"4.4.1\"}}]),i}();g(document).on(jn.CLICK_DATA_API,Qn,function(t){t.preventDefault(),Yn._jQueryInterface.call(g(this),\"show\")}),g.fn.tab=Yn._jQueryInterface,g.fn.tab.Constructor=Yn,g.fn.tab.noConflict=function(){return g.fn.tab=Ln,Yn._jQueryInterface};var zn=\"toast\",Xn=\"bs.toast\",$n=\".\"+Xn,Gn=g.fn[zn],Jn={CLICK_DISMISS:\"click.dismiss\"+$n,HIDE:\"hide\"+$n,HIDDEN:\"hidden\"+$n,SHOW:\"show\"+$n,SHOWN:\"shown\"+$n},Zn=\"fade\",ti=\"hide\",ei=\"show\",ni=\"showing\",ii={animation:\"boolean\",autohide:\"boolean\",delay:\"number\"},oi={animation:!0,autohide:!0,delay:500},ri='[data-dismiss=\"toast\"]',si=function(){function i(t,e){this._element=t,this._config=this._getConfig(e),this._timeout=null,this._setListeners()}var t=i.prototype;return t.show=function(){var t=this,e=g.Event(Jn.SHOW);if(g(this._element).trigger(e),!e.isDefaultPrevented()){this._config.animation&&this._element.classList.add(Zn);var n=function(){t._element.classList.remove(ni),t._element.classList.add(ei),g(t._element).trigger(Jn.SHOWN),t._config.autohide&&(t._timeout=setTimeout(function(){t.hide()},t._config.delay))};if(this._element.classList.remove(ti),_.reflow(this._element),this._element.classList.add(ni),this._config.animation){var i=_.getTransitionDurationFromElement(this._element);g(this._element).one(_.TRANSITION_END,n).emulateTransitionEnd(i)}else n()}},t.hide=function(){if(this._element.classList.contains(ei)){var t=g.Event(Jn.HIDE);g(this._element).trigger(t),t.isDefaultPrevented()||this._close()}},t.dispose=function(){clearTimeout(this._timeout),this._timeout=null,this._element.classList.contains(ei)&&this._element.classList.remove(ei),g(this._element).off(Jn.CLICK_DISMISS),g.removeData(this._element,Xn),this._element=null,this._config=null},t._getConfig=function(t){return t=l({},oi,{},g(this._element).data(),{},\"object\"==typeof t&&t?t:{}),_.typeCheckConfig(zn,t,this.constructor.DefaultType),t},t._setListeners=function(){var t=this;g(this._element).on(Jn.CLICK_DISMISS,ri,function(){return t.hide()})},t._close=function(){function t(){e._element.classList.add(ti),g(e._element).trigger(Jn.HIDDEN)}var e=this;if(this._element.classList.remove(ei),this._config.animation){var n=_.getTransitionDurationFromElement(this._element);g(this._element).one(_.TRANSITION_END,t).emulateTransitionEnd(n)}else t()},i._jQueryInterface=function(n){return this.each(function(){var t=g(this),e=t.data(Xn);if(e||(e=new i(this,\"object\"==typeof n&&n),t.data(Xn,e)),\"string\"==typeof n){if(\"undefined\"==typeof e[n])throw new TypeError('No method named \"'+n+'\"');e[n](this)}})},s(i,null,[{key:\"VERSION\",get:function(){return\"4.4.1\"}},{key:\"DefaultType\",get:function(){return ii}},{key:\"Default\",get:function(){return oi}}]),i}();g.fn[zn]=si._jQueryInterface,g.fn[zn].Constructor=si,g.fn[zn].noConflict=function(){return g.fn[zn]=Gn,si._jQueryInterface},t.Alert=v,t.Button=H,t.Carousel=ut,t.Collapse=wt,t.Dropdown=ee,t.Modal=Te,t.Popover=hn,t.Scrollspy=On,t.Tab=Yn,t.Toast=si,t.Tooltip=Xe,t.Util=_,Object.defineProperty(t,\"__esModule\",{value:!0})});\r\n//# sourceMappingURL=bootstrap.min.js.map","/* flatpickr v4.6.3,, @license MIT */\r\n!function(e,t){\"object\"==typeof exports&&\"undefined\"!=typeof module?module.exports=t():\"function\"==typeof define&&define.amd?define(t):(e=e||self).flatpickr=t()}(this,function(){\"use strict\";var e=function(){return(e=Object.assign||function(e){for(var t,n=1,a=arguments.length;n<a;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},t=[\"onChange\",\"onClose\",\"onDayCreate\",\"onDestroy\",\"onKeyDown\",\"onMonthChange\",\"onOpen\",\"onParseConfig\",\"onReady\",\"onValueUpdate\",\"onYearChange\",\"onPreCalendarPosition\"],n={_disable:[],_enable:[],allowInput:!1,altFormat:\"F j, Y\",altInput:!1,altInputClass:\"form-control input\",animate:\"object\"==typeof window&&-1===window.navigator.userAgent.indexOf(\"MSIE\"),ariaDateFormat:\"F j, Y\",clickOpens:!0,closeOnSelect:!0,conjunction:\", \",dateFormat:\"Y-m-d\",defaultHour:12,defaultMinute:0,defaultSeconds:0,disable:[],disableMobile:!1,enable:[],enableSeconds:!1,enableTime:!1,errorHandler:function(e){return\"undefined\"!=typeof console&&console.warn(e)},getWeek:function(e){var t=new Date(e.getTime());t.setHours(0,0,0,0),t.setDate(t.getDate()+3-(t.getDay()+6)%7);var n=new Date(t.getFullYear(),0,4);return 1+Math.round(((t.getTime()-n.getTime())/864e5-3+(n.getDay()+6)%7)/7)},hourIncrement:1,ignoredFocusElements:[],inline:!1,locale:\"default\",minuteIncrement:5,mode:\"single\",monthSelectorType:\"dropdown\",nextArrow:\"<svg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 17 17'><g></g><path d='M13.207 8.472l-7.854 7.854-0.707-0.707 7.146-7.146-7.146-7.148 0.707-0.707 7.854 7.854z' /></svg>\",noCalendar:!1,now:new Date,onChange:[],onClose:[],onDayCreate:[],onDestroy:[],onKeyDown:[],onMonthChange:[],onOpen:[],onParseConfig:[],onReady:[],onValueUpdate:[],onYearChange:[],onPreCalendarPosition:[],plugins:[],position:\"auto\",positionElement:void 0,prevArrow:\"<svg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 17 17'><g></g><path d='M5.207 8.471l7.146 7.147-0.707 0.707-7.853-7.854 7.854-7.853 0.707 0.707-7.147 7.146z' /></svg>\",shorthandCurrentMonth:!1,showMonths:1,static:!1,time_24hr:!1,weekNumbers:!1,wrap:!1},a={weekdays:{shorthand:[\"Sun\",\"Mon\",\"Tue\",\"Wed\",\"Thu\",\"Fri\",\"Sat\"],longhand:[\"Sunday\",\"Monday\",\"Tuesday\",\"Wednesday\",\"Thursday\",\"Friday\",\"Saturday\"]},months:{shorthand:[\"Jan\",\"Feb\",\"Mar\",\"Apr\",\"May\",\"Jun\",\"Jul\",\"Aug\",\"Sep\",\"Oct\",\"Nov\",\"Dec\"],longhand:[\"January\",\"February\",\"March\",\"April\",\"May\",\"June\",\"July\",\"August\",\"September\",\"October\",\"November\",\"December\"]},daysInMonth:[31,28,31,30,31,30,31,31,30,31,30,31],firstDayOfWeek:0,ordinal:function(e){var t=e%100;if(t>3&&t<21)return\"th\";switch(t%10){case 1:return\"st\";case 2:return\"nd\";case 3:return\"rd\";default:return\"th\"}},rangeSeparator:\" to \",weekAbbreviation:\"Wk\",scrollTitle:\"Scroll to increment\",toggleTitle:\"Click to toggle\",amPM:[\"AM\",\"PM\"],yearAriaLabel:\"Year\",hourAriaLabel:\"Hour\",minuteAriaLabel:\"Minute\",time_24hr:!1},i=function(e){return(\"0\"+e).slice(-2)},o=function(e){return!0===e?1:0};function r(e,t,n){var a;return void 0===n&&(n=!1),function(){var i=this,o=arguments;null!==a&&clearTimeout(a),a=window.setTimeout(function(){a=null,n||e.apply(i,o)},t),n&&!a&&e.apply(i,o)}}var l=function(e){return e instanceof Array?e:[e]};function c(e,t,n){if(!0===n)return e.classList.add(t);e.classList.remove(t)}function d(e,t,n){var a=window.document.createElement(e);return t=t||\"\",n=n||\"\",a.className=t,void 0!==n&&(a.textContent=n),a}function s(e){for(;e.firstChild;)e.removeChild(e.firstChild)}function u(e,t){var n=d(\"div\",\"numInputWrapper\"),a=d(\"input\",\"numInput \"+e),i=d(\"span\",\"arrowUp\"),o=d(\"span\",\"arrowDown\");if(-1===navigator.userAgent.indexOf(\"MSIE 9.0\")?a.type=\"number\":(a.type=\"text\",a.pattern=\"\\\\d*\"),void 0!==t)for(var r in t)a.setAttribute(r,t[r]);return n.appendChild(a),n.appendChild(i),n.appendChild(o),n}var f=function(){},m=function(e,t,n){return n.months[t?\"shorthand\":\"longhand\"][e]},g={D:f,F:function(e,t,n){e.setMonth(n.months.longhand.indexOf(t))},G:function(e,t){e.setHours(parseFloat(t))},H:function(e,t){e.setHours(parseFloat(t))},J:function(e,t){e.setDate(parseFloat(t))},K:function(e,t,n){e.setHours(e.getHours()%12+12*o(new RegExp(n.amPM[1],\"i\").test(t)))},M:function(e,t,n){e.setMonth(n.months.shorthand.indexOf(t))},S:function(e,t){e.setSeconds(parseFloat(t))},U:function(e,t){return new Date(1e3*parseFloat(t))},W:function(e,t,n){var a=parseInt(t),i=new Date(e.getFullYear(),0,2+7*(a-1),0,0,0,0);return i.setDate(i.getDate()-i.getDay()+n.firstDayOfWeek),i},Y:function(e,t){e.setFullYear(parseFloat(t))},Z:function(e,t){return new Date(t)},d:function(e,t){e.setDate(parseFloat(t))},h:function(e,t){e.setHours(parseFloat(t))},i:function(e,t){e.setMinutes(parseFloat(t))},j:function(e,t){e.setDate(parseFloat(t))},l:f,m:function(e,t){e.setMonth(parseFloat(t)-1)},n:function(e,t){e.setMonth(parseFloat(t)-1)},s:function(e,t){e.setSeconds(parseFloat(t))},u:function(e,t){return new Date(parseFloat(t))},w:f,y:function(e,t){e.setFullYear(2e3+parseFloat(t))}},p={D:\"(\\\\w+)\",F:\"(\\\\w+)\",G:\"(\\\\d\\\\d|\\\\d)\",H:\"(\\\\d\\\\d|\\\\d)\",J:\"(\\\\d\\\\d|\\\\d)\\\\w+\",K:\"\",M:\"(\\\\w+)\",S:\"(\\\\d\\\\d|\\\\d)\",U:\"(.+)\",W:\"(\\\\d\\\\d|\\\\d)\",Y:\"(\\\\d{4})\",Z:\"(.+)\",d:\"(\\\\d\\\\d|\\\\d)\",h:\"(\\\\d\\\\d|\\\\d)\",i:\"(\\\\d\\\\d|\\\\d)\",j:\"(\\\\d\\\\d|\\\\d)\",l:\"(\\\\w+)\",m:\"(\\\\d\\\\d|\\\\d)\",n:\"(\\\\d\\\\d|\\\\d)\",s:\"(\\\\d\\\\d|\\\\d)\",u:\"(.+)\",w:\"(\\\\d\\\\d|\\\\d)\",y:\"(\\\\d{2})\"},h={Z:function(e){return e.toISOString()},D:function(e,t,n){return t.weekdays.shorthand[h.w(e,t,n)]},F:function(e,t,n){return m(h.n(e,t,n)-1,!1,t)},G:function(e,t,n){return i(h.h(e,t,n))},H:function(e){return i(e.getHours())},J:function(e,t){return void 0!==t.ordinal?e.getDate()+t.ordinal(e.getDate()):e.getDate()},K:function(e,t){return t.amPM[o(e.getHours()>11)]},M:function(e,t){return m(e.getMonth(),!0,t)},S:function(e){return i(e.getSeconds())},U:function(e){return e.getTime()/1e3},W:function(e,t,n){return n.getWeek(e)},Y:function(e){return e.getFullYear()},d:function(e){return i(e.getDate())},h:function(e){return e.getHours()%12?e.getHours()%12:12},i:function(e){return i(e.getMinutes())},j:function(e){return e.getDate()},l:function(e,t){return t.weekdays.longhand[e.getDay()]},m:function(e){return i(e.getMonth()+1)},n:function(e){return e.getMonth()+1},s:function(e){return e.getSeconds()},u:function(e){return e.getTime()},w:function(e){return e.getDay()},y:function(e){return String(e.getFullYear()).substring(2)}},v=function(e){var t=e.config,i=void 0===t?n:t,o=e.l10n,r=void 0===o?a:o;return function(e,t,n){var a=n||r;return void 0!==i.formatDate?i.formatDate(e,t,a):t.split(\"\").map(function(t,n,o){return h[t]&&\"\\\\\"!==o[n-1]?h[t](e,a,i):\"\\\\\"!==t?t:\"\"}).join(\"\")}},D=function(e){var t=e.config,i=void 0===t?n:t,o=e.l10n,r=void 0===o?a:o;return function(e,t,a,o){if(0===e||e){var l,c=o||r,d=e;if(e instanceof Date)l=new Date(e.getTime());else if(\"string\"!=typeof e&&void 0!==e.toFixed)l=new Date(e);else if(\"string\"==typeof e){var s=t||(i||n).dateFormat,u=String(e).trim();if(\"today\"===u)l=new Date,a=!0;else if(/Z$/.test(u)||/GMT$/.test(u))l=new Date(e);else if(i&&i.parseDate)l=i.parseDate(e,s);else{l=i&&i.noCalendar?new Date((new Date).setHours(0,0,0,0)):new Date((new Date).getFullYear(),0,1,0,0,0,0);for(var f=void 0,m=[],h=0,v=0,D=\"\";h<s.length;h++){var w=s[h],b=\"\\\\\"===w,C=\"\\\\\"===s[h-1]||b;if(p[w]&&!C){D+=p[w];var M=new RegExp(D).exec(e);M&&(f=!0)&&m[\"Y\"!==w?\"push\":\"unshift\"]({fn:g[w],val:M[++v]})}else b||(D+=\".\");m.forEach(function(e){var t=e.fn,n=e.val;return l=t(l,n,c)||l})}l=f?l:void 0}}if(l instanceof Date&&!isNaN(l.getTime()))return!0===a&&l.setHours(0,0,0,0),l;i.errorHandler(new Error(\"Invalid date provided: \"+d))}}};function w(e,t,n){return void 0===n&&(n=!0),!1!==n?new Date(e.getTime()).setHours(0,0,0,0)-new Date(t.getTime()).setHours(0,0,0,0):e.getTime()-t.getTime()}var b=function(e,t,n){return e>Math.min(t,n)&&e<Math.max(t,n)},C={DAY:864e5};\"function\"!=typeof Object.assign&&(Object.assign=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];if(!e)throw TypeError(\"Cannot convert undefined or null to object\");for(var a=function(t){t&&Object.keys(t).forEach(function(n){return e[n]=t[n]})},i=0,o=t;i<o.length;i++){a(o[i])}return e});var M=300;function y(f,g){var h={config:e({},n,E.defaultConfig),l10n:a};function y(e){return e.bind(h)}function x(){var e=h.config;!1===e.weekNumbers&&1===e.showMonths||!0!==e.noCalendar&&window.requestAnimationFrame(function(){if(void 0!==h.calendarContainer&&(h.calendarContainer.style.visibility=\"hidden\",h.calendarContainer.style.display=\"block\"),void 0!==h.daysContainer){var t=(h.days.offsetWidth+1)*e.showMonths;h.daysContainer.style.width=t+\"px\",h.calendarContainer.style.width=t+(void 0!==h.weekWrapper?h.weekWrapper.offsetWidth:0)+\"px\",h.calendarContainer.style.removeProperty(\"visibility\"),h.calendarContainer.style.removeProperty(\"display\")}})}function T(e){0===h.selectedDates.length&&ie(),void 0!==e&&\"blur\"!==e.type&&function(e){e.preventDefault();var t=\"keydown\"===e.type,n=e.target;void 0!==h.amPM&&e.target===h.amPM&&(h.amPM.textContent=h.l10n.amPM[o(h.amPM.textContent===h.l10n.amPM[0])]);var a=parseFloat(n.getAttribute(\"min\")),r=parseFloat(n.getAttribute(\"max\")),l=parseFloat(n.getAttribute(\"step\")),c=parseInt(n.value,10),d=e.delta||(t?38===e.which?1:-1:0),s=c+l*d;if(void 0!==n.value&&2===n.value.length){var u=n===h.hourElement,f=n===h.minuteElement;s<a?(s=r+s+o(!u)+(o(u)&&o(!h.amPM)),f&&j(void 0,-1,h.hourElement)):s>r&&(s=n===h.hourElement?s-r-o(!h.amPM):a,f&&j(void 0,1,h.hourElement)),h.amPM&&u&&(1===l?s+c===23:Math.abs(s-c)>l)&&(h.amPM.textContent=h.l10n.amPM[o(h.amPM.textContent===h.l10n.amPM[0])]),n.value=i(s)}}(e);var t=h._input.value;k(),we(),h._input.value!==t&&h._debouncedChange()}function k(){if(void 0!==h.hourElement&&void 0!==h.minuteElement){var e,t,n=(parseInt(h.hourElement.value.slice(-2),10)||0)%24,a=(parseInt(h.minuteElement.value,10)||0)%60,i=void 0!==h.secondElement?(parseInt(h.secondElement.value,10)||0)%60:0;void 0!==h.amPM&&(e=n,t=h.amPM.textContent,n=e%12+12*o(t===h.l10n.amPM[1]));var r=void 0!==h.config.minTime||h.config.minDate&&h.minDateHasTime&&h.latestSelectedDateObj&&0===w(h.latestSelectedDateObj,h.config.minDate,!0);if(void 0!==h.config.maxTime||h.config.maxDate&&h.maxDateHasTime&&h.latestSelectedDateObj&&0===w(h.latestSelectedDateObj,h.config.maxDate,!0)){var l=void 0!==h.config.maxTime?h.config.maxTime:h.config.maxDate;(n=Math.min(n,l.getHours()))===l.getHours()&&(a=Math.min(a,l.getMinutes())),a===l.getMinutes()&&(i=Math.min(i,l.getSeconds()))}if(r){var c=void 0!==h.config.minTime?h.config.minTime:h.config.minDate;(n=Math.max(n,c.getHours()))===c.getHours()&&(a=Math.max(a,c.getMinutes())),a===c.getMinutes()&&(i=Math.max(i,c.getSeconds()))}O(n,a,i)}}function I(e){var t=e||h.latestSelectedDateObj;t&&O(t.getHours(),t.getMinutes(),t.getSeconds())}function S(){var e=h.config.defaultHour,t=h.config.defaultMinute,n=h.config.defaultSeconds;if(void 0!==h.config.minDate){var a=h.config.minDate.getHours(),i=h.config.minDate.getMinutes();(e=Math.max(e,a))===a&&(t=Math.max(i,t)),e===a&&t===i&&(n=h.config.minDate.getSeconds())}if(void 0!==h.config.maxDate){var o=h.config.maxDate.getHours(),r=h.config.maxDate.getMinutes();(e=Math.min(e,o))===o&&(t=Math.min(r,t)),e===o&&t===r&&(n=h.config.maxDate.getSeconds())}O(e,t,n)}function O(e,t,n){void 0!==h.latestSelectedDateObj&&h.latestSelectedDateObj.setHours(e%24,t,n||0,0),h.hourElement&&h.minuteElement&&!h.isMobile&&(h.hourElement.value=i(h.config.time_24hr?e:(12+e)%12+12*o(e%12==0)),h.minuteElement.value=i(t),void 0!==h.amPM&&(h.amPM.textContent=h.l10n.amPM[o(e>=12)]),void 0!==h.secondElement&&(h.secondElement.value=i(n)))}function _(e){var t=parseInt(e.target.value)+(e.delta||0);(t/1e3>1||\"Enter\"===e.key&&!/[^\\d]/.test(t.toString()))&&Q(t)}function F(e,t,n,a){return t instanceof Array?t.forEach(function(t){return F(e,t,n,a)}):e instanceof Array?e.forEach(function(e){return F(e,t,n,a)}):(e.addEventListener(t,n,a),void h._handlers.push({element:e,event:t,handler:n,options:a}))}function N(e){return function(t){1===t.which&&e(t)}}function Y(){ge(\"onChange\")}function A(e,t){var n=void 0!==e?h.parseDate(e):h.latestSelectedDateObj||(h.config.minDate&&h.config.minDate>h.now?h.config.minDate:h.config.maxDate&&h.config.maxDate<h.now?h.config.maxDate:h.now),a=h.currentYear,i=h.currentMonth;try{void 0!==n&&(h.currentYear=n.getFullYear(),h.currentMonth=n.getMonth())}catch(e){e.message=\"Invalid date supplied: \"+n,h.config.errorHandler(e)}t&&h.currentYear!==a&&(ge(\"onYearChange\"),K()),!t||h.currentYear===a&&h.currentMonth===i||ge(\"onMonthChange\"),h.redraw()}function P(e){~e.target.className.indexOf(\"arrow\")&&j(e,e.target.classList.contains(\"arrowUp\")?1:-1)}function j(e,t,n){var a=e&&e.target,i=n||a&&a.parentNode&&a.parentNode.firstChild,o=pe(\"increment\");o.delta=t,i&&i.dispatchEvent(o)}function H(e,t,n,a){var i=X(t,!0),o=d(\"span\",\"flatpickr-day \"+e,t.getDate().toString());return o.dateObj=t,o.$i=a,o.setAttribute(\"aria-label\",h.formatDate(t,h.config.ariaDateFormat)),-1===e.indexOf(\"hidden\")&&0===w(t,h.now)&&(h.todayDateElem=o,o.classList.add(\"today\"),o.setAttribute(\"aria-current\",\"date\")),i?(o.tabIndex=-1,he(t)&&(o.classList.add(\"selected\"),h.selectedDateElem=o,\"range\"===h.config.mode&&(c(o,\"startRange\",h.selectedDates[0]&&0===w(t,h.selectedDates[0],!0)),c(o,\"endRange\",h.selectedDates[1]&&0===w(t,h.selectedDates[1],!0)),\"nextMonthDay\"===e&&o.classList.add(\"inRange\")))):o.classList.add(\"flatpickr-disabled\"),\"range\"===h.config.mode&&function(e){return!(\"range\"!==h.config.mode||h.selectedDates.length<2)&&w(e,h.selectedDates[0])>=0&&w(e,h.selectedDates[1])<=0}(t)&&!he(t)&&o.classList.add(\"inRange\"),h.weekNumbers&&1===h.config.showMonths&&\"prevMonthDay\"!==e&&n%7==1&&h.weekNumbers.insertAdjacentHTML(\"beforeend\",\"<span class='flatpickr-day'>\"+h.config.getWeek(t)+\"</span>\"),ge(\"onDayCreate\",o),o}function L(e){e.focus(),\"range\"===h.config.mode&&ne(e)}function W(e){for(var t=e>0?0:h.config.showMonths-1,n=e>0?h.config.showMonths:-1,a=t;a!=n;a+=e)for(var i=h.daysContainer.children[a],o=e>0?0:i.children.length-1,r=e>0?i.children.length:-1,l=o;l!=r;l+=e){var c=i.children[l];if(-1===c.className.indexOf(\"hidden\")&&X(c.dateObj))return c}}function R(e,t){var n=ee(document.activeElement||document.body),a=void 0!==e?e:n?document.activeElement:void 0!==h.selectedDateElem&&ee(h.selectedDateElem)?h.selectedDateElem:void 0!==h.todayDateElem&&ee(h.todayDateElem)?h.todayDateElem:W(t>0?1:-1);return void 0===a?h._input.focus():n?void function(e,t){for(var n=-1===e.className.indexOf(\"Month\")?e.dateObj.getMonth():h.currentMonth,a=t>0?h.config.showMonths:-1,i=t>0?1:-1,o=n-h.currentMonth;o!=a;o+=i)for(var r=h.daysContainer.children[o],l=n-h.currentMonth===o?e.$i+t:t<0?r.children.length-1:0,c=r.children.length,d=l;d>=0&&d<c&&d!=(t>0?c:-1);d+=i){var s=r.children[d];if(-1===s.className.indexOf(\"hidden\")&&X(s.dateObj)&&Math.abs(e.$i-d)>=Math.abs(t))return L(s)}h.changeMonth(i),R(W(i),0)}(a,t):L(a)}function B(e,t){for(var n=(new Date(e,t,1).getDay()-h.l10n.firstDayOfWeek+7)%7,a=h.utils.getDaysInMonth((t-1+12)%12),i=h.utils.getDaysInMonth(t),o=window.document.createDocumentFragment(),r=h.config.showMonths>1,l=r?\"prevMonthDay hidden\":\"prevMonthDay\",c=r?\"nextMonthDay hidden\":\"nextMonthDay\",s=a+1-n,u=0;s<=a;s++,u++)o.appendChild(H(l,new Date(e,t-1,s),s,u));for(s=1;s<=i;s++,u++)o.appendChild(H(\"\",new Date(e,t,s),s,u));for(var f=i+1;f<=42-n&&(1===h.config.showMonths||u%7!=0);f++,u++)o.appendChild(H(c,new Date(e,t+1,f%i),f,u));var m=d(\"div\",\"dayContainer\");return m.appendChild(o),m}function J(){if(void 0!==h.daysContainer){s(h.daysContainer),h.weekNumbers&&s(h.weekNumbers);for(var e=document.createDocumentFragment(),t=0;t<h.config.showMonths;t++){var n=new Date(h.currentYear,h.currentMonth,1);n.setMonth(h.currentMonth+t),e.appendChild(B(n.getFullYear(),n.getMonth()))}h.daysContainer.appendChild(e),h.days=h.daysContainer.firstChild,\"range\"===h.config.mode&&1===h.selectedDates.length&&ne()}}function K(){if(!(h.config.showMonths>1||\"dropdown\"!==h.config.monthSelectorType)){var e=function(e){return!(void 0!==h.config.minDate&&h.currentYear===h.config.minDate.getFullYear()&&e<h.config.minDate.getMonth())&&!(void 0!==h.config.maxDate&&h.currentYear===h.config.maxDate.getFullYear()&&e>h.config.maxDate.getMonth())};h.monthsDropdownContainer.tabIndex=-1,h.monthsDropdownContainer.innerHTML=\"\";for(var t=0;t<12;t++)if(e(t)){var n=d(\"option\",\"flatpickr-monthDropdown-month\");n.value=new Date(h.currentYear,t).getMonth().toString(),n.textContent=m(t,h.config.shorthandCurrentMonth,h.l10n),n.tabIndex=-1,h.currentMonth===t&&(n.selected=!0),h.monthsDropdownContainer.appendChild(n)}}}function U(){var e,t=d(\"div\",\"flatpickr-month\"),n=window.document.createDocumentFragment();h.config.showMonths>1||\"static\"===h.config.monthSelectorType?e=d(\"span\",\"cur-month\"):(h.monthsDropdownContainer=d(\"select\",\"flatpickr-monthDropdown-months\"),F(h.monthsDropdownContainer,\"change\",function(e){var t=e.target,n=parseInt(t.value,10);h.changeMonth(n-h.currentMonth),ge(\"onMonthChange\")}),K(),e=h.monthsDropdownContainer);var a=u(\"cur-year\",{tabindex:\"-1\"}),i=a.getElementsByTagName(\"input\")[0];i.setAttribute(\"aria-label\",h.l10n.yearAriaLabel),h.config.minDate&&i.setAttribute(\"min\",h.config.minDate.getFullYear().toString()),h.config.maxDate&&(i.setAttribute(\"max\",h.config.maxDate.getFullYear().toString()),i.disabled=!!h.config.minDate&&h.config.minDate.getFullYear()===h.config.maxDate.getFullYear());var o=d(\"div\",\"flatpickr-current-month\");return o.appendChild(e),o.appendChild(a),n.appendChild(o),t.appendChild(n),{container:t,yearElement:i,monthElement:e}}function q(){s(h.monthNav),h.monthNav.appendChild(h.prevMonthNav),h.config.showMonths&&(h.yearElements=[],h.monthElements=[]);for(var e=h.config.showMonths;e--;){var t=U();h.yearElements.push(t.yearElement),h.monthElements.push(t.monthElement),h.monthNav.appendChild(t.container)}h.monthNav.appendChild(h.nextMonthNav)}function $(){h.weekdayContainer?s(h.weekdayContainer):h.weekdayContainer=d(\"div\",\"flatpickr-weekdays\");for(var e=h.config.showMonths;e--;){var t=d(\"div\",\"flatpickr-weekdaycontainer\");h.weekdayContainer.appendChild(t)}return z(),h.weekdayContainer}function z(){if(h.weekdayContainer){var e=h.l10n.firstDayOfWeek,t=h.l10n.weekdays.shorthand.slice();e>0&&e<t.length&&(t=t.splice(e,t.length).concat(t.splice(0,e)));for(var n=h.config.showMonths;n--;)h.weekdayContainer.children[n].innerHTML=\"\\n      <span class='flatpickr-weekday'>\\n        \"+t.join(\"</span><span class='flatpickr-weekday'>\")+\"\\n      </span>\\n      \"}}function G(e,t){void 0===t&&(t=!0);var n=t?e:e-h.currentMonth;n<0&&!0===h._hidePrevMonthArrow||n>0&&!0===h._hideNextMonthArrow||(h.currentMonth+=n,(h.currentMonth<0||h.currentMonth>11)&&(h.currentYear+=h.currentMonth>11?1:-1,h.currentMonth=(h.currentMonth+12)%12,ge(\"onYearChange\"),K()),J(),ge(\"onMonthChange\"),ve())}function V(e){return!(!h.config.appendTo||!h.config.appendTo.contains(e))||h.calendarContainer.contains(e)}function Z(e){if(h.isOpen&&!h.config.inline){var t=\"function\"==typeof(r=e).composedPath?r.composedPath()[0]:r.target,n=V(t),a=t===h.input||t===h.altInput||h.element.contains(t)||e.path&&e.path.indexOf&&(~e.path.indexOf(h.input)||~e.path.indexOf(h.altInput)),i=\"blur\"===e.type?a&&e.relatedTarget&&!V(e.relatedTarget):!a&&!n&&!V(e.relatedTarget),o=!h.config.ignoredFocusElements.some(function(e){return e.contains(t)});i&&o&&(void 0!==h.timeContainer&&void 0!==h.minuteElement&&void 0!==h.hourElement&&T(),h.close(),\"range\"===h.config.mode&&1===h.selectedDates.length&&(h.clear(!1),h.redraw()))}var r}function Q(e){if(!(!e||h.config.minDate&&e<h.config.minDate.getFullYear()||h.config.maxDate&&e>h.config.maxDate.getFullYear())){var t=e,n=h.currentYear!==t;h.currentYear=t||h.currentYear,h.config.maxDate&&h.currentYear===h.config.maxDate.getFullYear()?h.currentMonth=Math.min(h.config.maxDate.getMonth(),h.currentMonth):h.config.minDate&&h.currentYear===h.config.minDate.getFullYear()&&(h.currentMonth=Math.max(h.config.minDate.getMonth(),h.currentMonth)),n&&(h.redraw(),ge(\"onYearChange\"),K())}}function X(e,t){void 0===t&&(t=!0);var n=h.parseDate(e,void 0,t);if(h.config.minDate&&n&&w(n,h.config.minDate,void 0!==t?t:!h.minDateHasTime)<0||h.config.maxDate&&n&&w(n,h.config.maxDate,void 0!==t?t:!h.maxDateHasTime)>0)return!1;if(0===h.config.enable.length&&0===h.config.disable.length)return!0;if(void 0===n)return!1;for(var a=h.config.enable.length>0,i=a?h.config.enable:h.config.disable,o=0,r=void 0;o<i.length;o++){if(\"function\"==typeof(r=i[o])&&r(n))return a;if(r instanceof Date&&void 0!==n&&r.getTime()===n.getTime())return a;if(\"string\"==typeof r&&void 0!==n){var l=h.parseDate(r,void 0,!0);return l&&l.getTime()===n.getTime()?a:!a}if(\"object\"==typeof r&&void 0!==n&&r.from&&r.to&&n.getTime()>=r.from.getTime()&&n.getTime()<=r.to.getTime())return a}return!a}function ee(e){return void 0!==h.daysContainer&&(-1===e.className.indexOf(\"hidden\")&&h.daysContainer.contains(e))}function te(e){var t=e.target===h._input,n=h.config.allowInput,a=h.isOpen&&(!n||!t),i=h.config.inline&&t&&!n;if(13===e.keyCode&&t){if(n)return h.setDate(h._input.value,!0,e.target===h.altInput?h.config.altFormat:h.config.dateFormat),e.target.blur();h.open()}else if(V(e.target)||a||i){var o=!!h.timeContainer&&h.timeContainer.contains(e.target);switch(e.keyCode){case 13:o?(e.preventDefault(),T(),de()):se(e);break;case 27:e.preventDefault(),de();break;case 8:case 46:t&&!h.config.allowInput&&(e.preventDefault(),h.clear());break;case 37:case 39:if(o||t)h.hourElement&&h.hourElement.focus();else if(e.preventDefault(),void 0!==h.daysContainer&&(!1===n||document.activeElement&&ee(document.activeElement))){var r=39===e.keyCode?1:-1;e.ctrlKey?(e.stopPropagation(),G(r),R(W(1),0)):R(void 0,r)}break;case 38:case 40:e.preventDefault();var l=40===e.keyCode?1:-1;h.daysContainer&&void 0!==e.target.$i||e.target===h.input||e.target===h.altInput?e.ctrlKey?(e.stopPropagation(),Q(h.currentYear-l),R(W(1),0)):o||R(void 0,7*l):e.target===h.currentYearElement?Q(h.currentYear-l):h.config.enableTime&&(!o&&h.hourElement&&h.hourElement.focus(),T(e),h._debouncedChange());break;case 9:if(o){var c=[h.hourElement,h.minuteElement,h.secondElement,h.amPM].concat(h.pluginElements).filter(function(e){return e}),d=c.indexOf(e.target);if(-1!==d){var s=c[d+(e.shiftKey?-1:1)];e.preventDefault(),(s||h._input).focus()}}else!h.config.noCalendar&&h.daysContainer&&h.daysContainer.contains(e.target)&&e.shiftKey&&(e.preventDefault(),h._input.focus())}}if(void 0!==h.amPM&&e.target===h.amPM)switch(e.key){case h.l10n.amPM[0].charAt(0):case h.l10n.amPM[0].charAt(0).toLowerCase():h.amPM.textContent=h.l10n.amPM[0],k(),we();break;case h.l10n.amPM[1].charAt(0):case h.l10n.amPM[1].charAt(0).toLowerCase():h.amPM.textContent=h.l10n.amPM[1],k(),we()}(t||V(e.target))&&ge(\"onKeyDown\",e)}function ne(e){if(1===h.selectedDates.length&&(!e||e.classList.contains(\"flatpickr-day\")&&!e.classList.contains(\"flatpickr-disabled\"))){for(var t=e?e.dateObj.getTime():h.days.firstElementChild.dateObj.getTime(),n=h.parseDate(h.selectedDates[0],void 0,!0).getTime(),a=Math.min(t,h.selectedDates[0].getTime()),i=Math.max(t,h.selectedDates[0].getTime()),o=!1,r=0,l=0,c=a;c<i;c+=C.DAY)X(new Date(c),!0)||(o=o||c>a&&c<i,c<n&&(!r||c>r)?r=c:c>n&&(!l||c<l)&&(l=c));for(var d=0;d<h.config.showMonths;d++)for(var s=h.daysContainer.children[d],u=function(a,i){var c=s.children[a],d=c.dateObj.getTime(),u=r>0&&d<r||l>0&&d>l;return u?(c.classList.add(\"notAllowed\"),[\"inRange\",\"startRange\",\"endRange\"].forEach(function(e){c.classList.remove(e)}),\"continue\"):o&&!u?\"continue\":([\"startRange\",\"inRange\",\"endRange\",\"notAllowed\"].forEach(function(e){c.classList.remove(e)}),void(void 0!==e&&(e.classList.add(t<=h.selectedDates[0].getTime()?\"startRange\":\"endRange\"),n<t&&d===n?c.classList.add(\"startRange\"):n>t&&d===n&&c.classList.add(\"endRange\"),d>=r&&(0===l||d<=l)&&b(d,n,t)&&c.classList.add(\"inRange\"))))},f=0,m=s.children.length;f<m;f++)u(f)}}function ae(){!h.isOpen||h.config.static||h.config.inline||le()}function ie(){h.setDate(void 0!==h.config.minDate?new Date(h.config.minDate.getTime()):new Date,!0),S(),we()}function oe(e){return function(t){var n=h.config[\"_\"+e+\"Date\"]=h.parseDate(t,h.config.dateFormat),a=h.config[\"_\"+(\"min\"===e?\"max\":\"min\")+\"Date\"];void 0!==n&&(h[\"min\"===e?\"minDateHasTime\":\"maxDateHasTime\"]=n.getHours()>0||n.getMinutes()>0||n.getSeconds()>0),h.selectedDates&&(h.selectedDates=h.selectedDates.filter(function(e){return X(e)}),h.selectedDates.length||\"min\"!==e||I(n),we()),h.daysContainer&&(ce(),void 0!==n?h.currentYearElement[e]=n.getFullYear().toString():h.currentYearElement.removeAttribute(e),h.currentYearElement.disabled=!!a&&void 0!==n&&a.getFullYear()===n.getFullYear())}}function re(){\"object\"!=typeof h.config.locale&&void 0===E.l10ns[h.config.locale]&&h.config.errorHandler(new Error(\"flatpickr: invalid locale \"+h.config.locale)),h.l10n=e({},E.l10ns.default,\"object\"==typeof h.config.locale?h.config.locale:\"default\"!==h.config.locale?E.l10ns[h.config.locale]:void 0),p.K=\"(\"+h.l10n.amPM[0]+\"|\"+h.l10n.amPM[1]+\"|\"+h.l10n.amPM[0].toLowerCase()+\"|\"+h.l10n.amPM[1].toLowerCase()+\")\",void 0===e({},g,JSON.parse(JSON.stringify(f.dataset||{}))).time_24hr&&void 0===E.defaultConfig.time_24hr&&(h.config.time_24hr=h.l10n.time_24hr),h.formatDate=v(h),h.parseDate=D({config:h.config,l10n:h.l10n})}function le(e){if(void 0!==h.calendarContainer){ge(\"onPreCalendarPosition\");var t=e||h._positionElement,n=Array.prototype.reduce.call(h.calendarContainer.children,function(e,t){return e+t.offsetHeight},0),a=h.calendarContainer.offsetWidth,i=h.config.position.split(\" \"),o=i[0],r=i.length>1?i[1]:null,l=t.getBoundingClientRect(),d=window.innerHeight-l.bottom,s=\"above\"===o||\"below\"!==o&&d<n&&l.top>n,u=window.pageYOffset+l.top+(s?-n-2:t.offsetHeight+2);if(c(h.calendarContainer,\"arrowTop\",!s),c(h.calendarContainer,\"arrowBottom\",s),!h.config.inline){var f=window.pageXOffset+l.left-(null!=r&&\"center\"===r?(a-l.width)/2:0),m=window.document.body.offsetWidth-(window.pageXOffset+l.right),g=f+a>window.document.body.offsetWidth,p=m+a>window.document.body.offsetWidth;if(c(h.calendarContainer,\"rightMost\",g),!h.config.static)if(h.calendarContainer.style.top=u+\"px\",g)if(p){var v=document.styleSheets[0];if(void 0===v)return;var D=window.document.body.offsetWidth,w=Math.max(0,D/2-a/2),b=v.cssRules.length,C=\"{left:\"+l.left+\"px;right:auto;}\";c(h.calendarContainer,\"rightMost\",!1),c(h.calendarContainer,\"centerMost\",!0),v.insertRule(\".flatpickr-calendar.centerMost:before,.flatpickr-calendar.centerMost:after\"+C,b),h.calendarContainer.style.left=w+\"px\",h.calendarContainer.style.right=\"auto\"}else h.calendarContainer.style.left=\"auto\",h.calendarContainer.style.right=m+\"px\";else h.calendarContainer.style.left=f+\"px\",h.calendarContainer.style.right=\"auto\"}}}function ce(){h.config.noCalendar||h.isMobile||(ve(),J())}function de(){h._input.focus(),-1!==window.navigator.userAgent.indexOf(\"MSIE\")||void 0!==navigator.msMaxTouchPoints?setTimeout(h.close,0):h.close()}function se(e){e.preventDefault(),e.stopPropagation();var t=function e(t,n){return n(t)?t:t.parentNode?e(t.parentNode,n):void 0}(e.target,function(e){return e.classList&&e.classList.contains(\"flatpickr-day\")&&!e.classList.contains(\"flatpickr-disabled\")&&!e.classList.contains(\"notAllowed\")});if(void 0!==t){var n=t,a=h.latestSelectedDateObj=new Date(n.dateObj.getTime()),i=(a.getMonth()<h.currentMonth||a.getMonth()>h.currentMonth+h.config.showMonths-1)&&\"range\"!==h.config.mode;if(h.selectedDateElem=n,\"single\"===h.config.mode)h.selectedDates=[a];else if(\"multiple\"===h.config.mode){var o=he(a);o?h.selectedDates.splice(parseInt(o),1):h.selectedDates.push(a)}else\"range\"===h.config.mode&&(2===h.selectedDates.length&&h.clear(!1,!1),h.latestSelectedDateObj=a,h.selectedDates.push(a),0!==w(a,h.selectedDates[0],!0)&&h.selectedDates.sort(function(e,t){return e.getTime()-t.getTime()}));if(k(),i){var r=h.currentYear!==a.getFullYear();h.currentYear=a.getFullYear(),h.currentMonth=a.getMonth(),r&&(ge(\"onYearChange\"),K()),ge(\"onMonthChange\")}if(ve(),J(),we(),h.config.enableTime&&setTimeout(function(){return h.showTimeInput=!0},50),i||\"range\"===h.config.mode||1!==h.config.showMonths?void 0!==h.selectedDateElem&&void 0===h.hourElement&&h.selectedDateElem&&h.selectedDateElem.focus():L(n),void 0!==h.hourElement&&void 0!==h.hourElement&&h.hourElement.focus(),h.config.closeOnSelect){var l=\"single\"===h.config.mode&&!h.config.enableTime,c=\"range\"===h.config.mode&&2===h.selectedDates.length&&!h.config.enableTime;(l||c)&&de()}Y()}}h.parseDate=D({config:h.config,l10n:h.l10n}),h._handlers=[],h.pluginElements=[],h.loadedPlugins=[],h._bind=F,h._setHoursFromDate=I,h._positionCalendar=le,h.changeMonth=G,h.changeYear=Q,h.clear=function(e,t){void 0===e&&(e=!0);void 0===t&&(t=!0);h.input.value=\"\",void 0!==h.altInput&&(h.altInput.value=\"\");void 0!==h.mobileInput&&(h.mobileInput.value=\"\");h.selectedDates=[],h.latestSelectedDateObj=void 0,!0===t&&(h.currentYear=h._initialDate.getFullYear(),h.currentMonth=h._initialDate.getMonth());h.showTimeInput=!1,!0===h.config.enableTime&&S();h.redraw(),e&&ge(\"onChange\")},h.close=function(){h.isOpen=!1,h.isMobile||(void 0!==h.calendarContainer&&h.calendarContainer.classList.remove(\"open\"),void 0!==h._input&&h._input.classList.remove(\"active\"));ge(\"onClose\")},h._createElement=d,h.destroy=function(){void 0!==h.config&&ge(\"onDestroy\");for(var e=h._handlers.length;e--;){var t=h._handlers[e];t.element.removeEventListener(t.event,t.handler,t.options)}if(h._handlers=[],h.mobileInput)h.mobileInput.parentNode&&h.mobileInput.parentNode.removeChild(h.mobileInput),h.mobileInput=void 0;else if(h.calendarContainer&&h.calendarContainer.parentNode)if(h.config.static&&h.calendarContainer.parentNode){var n=h.calendarContainer.parentNode;if(n.lastChild&&n.removeChild(n.lastChild),n.parentNode){for(;n.firstChild;)n.parentNode.insertBefore(n.firstChild,n);n.parentNode.removeChild(n)}}else h.calendarContainer.parentNode.removeChild(h.calendarContainer);h.altInput&&(h.input.type=\"text\",h.altInput.parentNode&&h.altInput.parentNode.removeChild(h.altInput),delete h.altInput);h.input&&(h.input.type=h.input._type,h.input.classList.remove(\"flatpickr-input\"),h.input.removeAttribute(\"readonly\"),h.input.value=\"\");[\"_showTimeInput\",\"latestSelectedDateObj\",\"_hideNextMonthArrow\",\"_hidePrevMonthArrow\",\"__hideNextMonthArrow\",\"__hidePrevMonthArrow\",\"isMobile\",\"isOpen\",\"selectedDateElem\",\"minDateHasTime\",\"maxDateHasTime\",\"days\",\"daysContainer\",\"_input\",\"_positionElement\",\"innerContainer\",\"rContainer\",\"monthNav\",\"todayDateElem\",\"calendarContainer\",\"weekdayContainer\",\"prevMonthNav\",\"nextMonthNav\",\"monthsDropdownContainer\",\"currentMonthElement\",\"currentYearElement\",\"navigationCurrentMonth\",\"selectedDateElem\",\"config\"].forEach(function(e){try{delete h[e]}catch(e){}})},h.isEnabled=X,h.jumpToDate=A,h.open=function(e,t){void 0===t&&(t=h._positionElement);if(!0===h.isMobile)return e&&(e.preventDefault(),e.target&&e.target.blur()),void 0!==h.mobileInput&&(h.mobileInput.focus(),h.mobileInput.click()),void ge(\"onOpen\");if(h._input.disabled||h.config.inline)return;var n=h.isOpen;h.isOpen=!0,n||(h.calendarContainer.classList.add(\"open\"),h._input.classList.add(\"active\"),ge(\"onOpen\"),le(t));!0===h.config.enableTime&&!0===h.config.noCalendar&&(0===h.selectedDates.length&&ie(),!1!==h.config.allowInput||void 0!==e&&h.timeContainer.contains(e.relatedTarget)||setTimeout(function(){return h.hourElement.select()},50))},h.redraw=ce,h.set=function(e,n){if(null!==e&&\"object\"==typeof e)for(var a in Object.assign(h.config,e),e)void 0!==ue[a]&&ue[a].forEach(function(e){return e()});else h.config[e]=n,void 0!==ue[e]?ue[e].forEach(function(e){return e()}):t.indexOf(e)>-1&&(h.config[e]=l(n));h.redraw(),we(!1)},h.setDate=function(e,t,n){void 0===t&&(t=!1);void 0===n&&(n=h.config.dateFormat);if(0!==e&&!e||e instanceof Array&&0===e.length)return h.clear(t);fe(e,n),h.showTimeInput=h.selectedDates.length>0,h.latestSelectedDateObj=h.selectedDates[h.selectedDates.length-1],h.redraw(),A(),I(),0===h.selectedDates.length&&h.clear(!1);we(t),t&&ge(\"onChange\")},h.toggle=function(e){if(!0===h.isOpen)return h.close();h.open(e)};var ue={locale:[re,z],showMonths:[q,x,$],minDate:[A],maxDate:[A]};function fe(e,t){var n=[];if(e instanceof Array)n=e.map(function(e){return h.parseDate(e,t)});else if(e instanceof Date||\"number\"==typeof e)n=[h.parseDate(e,t)];else if(\"string\"==typeof e)switch(h.config.mode){case\"single\":case\"time\":n=[h.parseDate(e,t)];break;case\"multiple\":n=e.split(h.config.conjunction).map(function(e){return h.parseDate(e,t)});break;case\"range\":n=e.split(h.l10n.rangeSeparator).map(function(e){return h.parseDate(e,t)})}else h.config.errorHandler(new Error(\"Invalid date supplied: \"+JSON.stringify(e)));h.selectedDates=n.filter(function(e){return e instanceof Date&&X(e,!1)}),\"range\"===h.config.mode&&h.selectedDates.sort(function(e,t){return e.getTime()-t.getTime()})}function me(e){return e.slice().map(function(e){return\"string\"==typeof e||\"number\"==typeof e||e instanceof Date?h.parseDate(e,void 0,!0):e&&\"object\"==typeof e&&e.from&&e.to?{from:h.parseDate(e.from,void 0),to:h.parseDate(e.to,void 0)}:e}).filter(function(e){return e})}function ge(e,t){if(void 0!==h.config){var n=h.config[e];if(void 0!==n&&n.length>0)for(var a=0;n[a]&&a<n.length;a++)n[a](h.selectedDates,h.input.value,h,t);\"onChange\"===e&&(h.input.dispatchEvent(pe(\"change\")),h.input.dispatchEvent(pe(\"input\")))}}function pe(e){var t=document.createEvent(\"Event\");return t.initEvent(e,!0,!0),t}function he(e){for(var t=0;t<h.selectedDates.length;t++)if(0===w(h.selectedDates[t],e))return\"\"+t;return!1}function ve(){h.config.noCalendar||h.isMobile||!h.monthNav||(h.yearElements.forEach(function(e,t){var n=new Date(h.currentYear,h.currentMonth,1);n.setMonth(h.currentMonth+t),h.config.showMonths>1||\"static\"===h.config.monthSelectorType?h.monthElements[t].textContent=m(n.getMonth(),h.config.shorthandCurrentMonth,h.l10n)+\" \":h.monthsDropdownContainer.value=n.getMonth().toString(),e.value=n.getFullYear().toString()}),h._hidePrevMonthArrow=void 0!==h.config.minDate&&(h.currentYear===h.config.minDate.getFullYear()?h.currentMonth<=h.config.minDate.getMonth():h.currentYear<h.config.minDate.getFullYear()),h._hideNextMonthArrow=void 0!==h.config.maxDate&&(h.currentYear===h.config.maxDate.getFullYear()?h.currentMonth+1>h.config.maxDate.getMonth():h.currentYear>h.config.maxDate.getFullYear()))}function De(e){return h.selectedDates.map(function(t){return h.formatDate(t,e)}).filter(function(e,t,n){return\"range\"!==h.config.mode||h.config.enableTime||n.indexOf(e)===t}).join(\"range\"!==h.config.mode?h.config.conjunction:h.l10n.rangeSeparator)}function we(e){void 0===e&&(e=!0),void 0!==h.mobileInput&&h.mobileFormatStr&&(h.mobileInput.value=void 0!==h.latestSelectedDateObj?h.formatDate(h.latestSelectedDateObj,h.mobileFormatStr):\"\"),h.input.value=De(h.config.dateFormat),void 0!==h.altInput&&(h.altInput.value=De(h.config.altFormat)),!1!==e&&ge(\"onValueUpdate\")}function be(e){var t=h.prevMonthNav.contains(e.target),n=h.nextMonthNav.contains(e.target);t||n?G(t?-1:1):h.yearElements.indexOf(e.target)>=0?e.target.select():e.target.classList.contains(\"arrowUp\")?h.changeYear(h.currentYear+1):e.target.classList.contains(\"arrowDown\")&&h.changeYear(h.currentYear-1)}return function(){h.element=h.input=f,h.isOpen=!1,function(){var a=[\"wrap\",\"weekNumbers\",\"allowInput\",\"clickOpens\",\"time_24hr\",\"enableTime\",\"noCalendar\",\"altInput\",\"shorthandCurrentMonth\",\"inline\",\"static\",\"enableSeconds\",\"disableMobile\"],i=e({},g,JSON.parse(JSON.stringify(f.dataset||{}))),o={};h.config.parseDate=i.parseDate,h.config.formatDate=i.formatDate,Object.defineProperty(h.config,\"enable\",{get:function(){return h.config._enable},set:function(e){h.config._enable=me(e)}}),Object.defineProperty(h.config,\"disable\",{get:function(){return h.config._disable},set:function(e){h.config._disable=me(e)}});var r=\"time\"===i.mode;if(!i.dateFormat&&(i.enableTime||r)){var c=E.defaultConfig.dateFormat||n.dateFormat;o.dateFormat=i.noCalendar||r?\"H:i\"+(i.enableSeconds?\":S\":\"\"):c+\" H:i\"+(i.enableSeconds?\":S\":\"\")}if(i.altInput&&(i.enableTime||r)&&!i.altFormat){var d=E.defaultConfig.altFormat||n.altFormat;o.altFormat=i.noCalendar||r?\"h:i\"+(i.enableSeconds?\":S K\":\" K\"):d+\" h:i\"+(i.enableSeconds?\":S\":\"\")+\" K\"}i.altInputClass||(h.config.altInputClass=h.input.className+\" \"+h.config.altInputClass),Object.defineProperty(h.config,\"minDate\",{get:function(){return h.config._minDate},set:oe(\"min\")}),Object.defineProperty(h.config,\"maxDate\",{get:function(){return h.config._maxDate},set:oe(\"max\")});var s=function(e){return function(t){h.config[\"min\"===e?\"_minTime\":\"_maxTime\"]=h.parseDate(t,\"H:i:S\")}};Object.defineProperty(h.config,\"minTime\",{get:function(){return h.config._minTime},set:s(\"min\")}),Object.defineProperty(h.config,\"maxTime\",{get:function(){return h.config._maxTime},set:s(\"max\")}),\"time\"===i.mode&&(h.config.noCalendar=!0,h.config.enableTime=!0),Object.assign(h.config,o,i);for(var u=0;u<a.length;u++)h.config[a[u]]=!0===h.config[a[u]]||\"true\"===h.config[a[u]];t.filter(function(e){return void 0!==h.config[e]}).forEach(function(e){h.config[e]=l(h.config[e]||[]).map(y)}),h.isMobile=!h.config.disableMobile&&!h.config.inline&&\"single\"===h.config.mode&&!h.config.disable.length&&!h.config.enable.length&&!h.config.weekNumbers&&/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);for(var u=0;u<h.config.plugins.length;u++){var m=h.config.plugins[u](h)||{};for(var p in m)t.indexOf(p)>-1?h.config[p]=l(m[p]).map(y).concat(h.config[p]):void 0===i[p]&&(h.config[p]=m[p])}ge(\"onParseConfig\")}(),re(),h.input=h.config.wrap?f.querySelector(\"[data-input]\"):f,h.input?(h.input._type=h.input.type,h.input.type=\"text\",h.input.classList.add(\"flatpickr-input\"),h._input=h.input,h.config.altInput&&(h.altInput=d(h.input.nodeName,h.config.altInputClass),h._input=h.altInput,h.altInput.placeholder=h.input.placeholder,h.altInput.disabled=h.input.disabled,h.altInput.required=h.input.required,h.altInput.tabIndex=h.input.tabIndex,h.altInput.type=\"text\",h.input.setAttribute(\"type\",\"hidden\"),!h.config.static&&h.input.parentNode&&h.input.parentNode.insertBefore(h.altInput,h.input.nextSibling)),h.config.allowInput||h._input.setAttribute(\"readonly\",\"readonly\"),h._positionElement=h.config.positionElement||h._input):h.config.errorHandler(new Error(\"Invalid input element specified\")),function(){h.selectedDates=[],h.now=h.parseDate(h.config.now)||new Date;var e=h.config.defaultDate||(\"INPUT\"!==h.input.nodeName&&\"TEXTAREA\"!==h.input.nodeName||!h.input.placeholder||h.input.value!==h.input.placeholder?h.input.value:null);e&&fe(e,h.config.dateFormat),h._initialDate=h.selectedDates.length>0?h.selectedDates[0]:h.config.minDate&&h.config.minDate.getTime()>h.now.getTime()?h.config.minDate:h.config.maxDate&&h.config.maxDate.getTime()<h.now.getTime()?h.config.maxDate:h.now,h.currentYear=h._initialDate.getFullYear(),h.currentMonth=h._initialDate.getMonth(),h.selectedDates.length>0&&(h.latestSelectedDateObj=h.selectedDates[0]),void 0!==h.config.minTime&&(h.config.minTime=h.parseDate(h.config.minTime,\"H:i\")),void 0!==h.config.maxTime&&(h.config.maxTime=h.parseDate(h.config.maxTime,\"H:i\")),h.minDateHasTime=!!h.config.minDate&&(h.config.minDate.getHours()>0||h.config.minDate.getMinutes()>0||h.config.minDate.getSeconds()>0),h.maxDateHasTime=!!h.config.maxDate&&(h.config.maxDate.getHours()>0||h.config.maxDate.getMinutes()>0||h.config.maxDate.getSeconds()>0),Object.defineProperty(h,\"showTimeInput\",{get:function(){return h._showTimeInput},set:function(e){h._showTimeInput=e,h.calendarContainer&&c(h.calendarContainer,\"showTimeInput\",e),h.isOpen&&le()}})}(),h.utils={getDaysInMonth:function(e,t){return void 0===e&&(e=h.currentMonth),void 0===t&&(t=h.currentYear),1===e&&(t%4==0&&t%100!=0||t%400==0)?29:h.l10n.daysInMonth[e]}},h.isMobile||function(){var e=window.document.createDocumentFragment();if(h.calendarContainer=d(\"div\",\"flatpickr-calendar\"),h.calendarContainer.tabIndex=-1,!h.config.noCalendar){if(e.appendChild((h.monthNav=d(\"div\",\"flatpickr-months\"),h.yearElements=[],h.monthElements=[],h.prevMonthNav=d(\"span\",\"flatpickr-prev-month\"),h.prevMonthNav.innerHTML=h.config.prevArrow,h.nextMonthNav=d(\"span\",\"flatpickr-next-month\"),h.nextMonthNav.innerHTML=h.config.nextArrow,q(),Object.defineProperty(h,\"_hidePrevMonthArrow\",{get:function(){return h.__hidePrevMonthArrow},set:function(e){h.__hidePrevMonthArrow!==e&&(c(h.prevMonthNav,\"flatpickr-disabled\",e),h.__hidePrevMonthArrow=e)}}),Object.defineProperty(h,\"_hideNextMonthArrow\",{get:function(){return h.__hideNextMonthArrow},set:function(e){h.__hideNextMonthArrow!==e&&(c(h.nextMonthNav,\"flatpickr-disabled\",e),h.__hideNextMonthArrow=e)}}),h.currentYearElement=h.yearElements[0],ve(),h.monthNav)),h.innerContainer=d(\"div\",\"flatpickr-innerContainer\"),h.config.weekNumbers){var t=function(){h.calendarContainer.classList.add(\"hasWeeks\");var e=d(\"div\",\"flatpickr-weekwrapper\");e.appendChild(d(\"span\",\"flatpickr-weekday\",h.l10n.weekAbbreviation));var t=d(\"div\",\"flatpickr-weeks\");return e.appendChild(t),{weekWrapper:e,weekNumbers:t}}(),n=t.weekWrapper,a=t.weekNumbers;h.innerContainer.appendChild(n),h.weekNumbers=a,h.weekWrapper=n}h.rContainer=d(\"div\",\"flatpickr-rContainer\"),h.rContainer.appendChild($()),h.daysContainer||(h.daysContainer=d(\"div\",\"flatpickr-days\"),h.daysContainer.tabIndex=-1),J(),h.rContainer.appendChild(h.daysContainer),h.innerContainer.appendChild(h.rContainer),e.appendChild(h.innerContainer)}h.config.enableTime&&e.appendChild(function(){h.calendarContainer.classList.add(\"hasTime\"),h.config.noCalendar&&h.calendarContainer.classList.add(\"noCalendar\"),h.timeContainer=d(\"div\",\"flatpickr-time\"),h.timeContainer.tabIndex=-1;var e=d(\"span\",\"flatpickr-time-separator\",\":\"),t=u(\"flatpickr-hour\",{\"aria-label\":h.l10n.hourAriaLabel});h.hourElement=t.getElementsByTagName(\"input\")[0];var n=u(\"flatpickr-minute\",{\"aria-label\":h.l10n.minuteAriaLabel});if(h.minuteElement=n.getElementsByTagName(\"input\")[0],h.hourElement.tabIndex=h.minuteElement.tabIndex=-1,h.hourElement.value=i(h.latestSelectedDateObj?h.latestSelectedDateObj.getHours():h.config.time_24hr?h.config.defaultHour:function(e){switch(e%24){case 0:case 12:return 12;default:return e%12}}(h.config.defaultHour)),h.minuteElement.value=i(h.latestSelectedDateObj?h.latestSelectedDateObj.getMinutes():h.config.defaultMinute),h.hourElement.setAttribute(\"step\",h.config.hourIncrement.toString()),h.minuteElement.setAttribute(\"step\",h.config.minuteIncrement.toString()),h.hourElement.setAttribute(\"min\",h.config.time_24hr?\"0\":\"1\"),h.hourElement.setAttribute(\"max\",h.config.time_24hr?\"23\":\"12\"),h.minuteElement.setAttribute(\"min\",\"0\"),h.minuteElement.setAttribute(\"max\",\"59\"),h.timeContainer.appendChild(t),h.timeContainer.appendChild(e),h.timeContainer.appendChild(n),h.config.time_24hr&&h.timeContainer.classList.add(\"time24hr\"),h.config.enableSeconds){h.timeContainer.classList.add(\"hasSeconds\");var a=u(\"flatpickr-second\");h.secondElement=a.getElementsByTagName(\"input\")[0],h.secondElement.value=i(h.latestSelectedDateObj?h.latestSelectedDateObj.getSeconds():h.config.defaultSeconds),h.secondElement.setAttribute(\"step\",h.minuteElement.getAttribute(\"step\")),h.secondElement.setAttribute(\"min\",\"0\"),h.secondElement.setAttribute(\"max\",\"59\"),h.timeContainer.appendChild(d(\"span\",\"flatpickr-time-separator\",\":\")),h.timeContainer.appendChild(a)}return h.config.time_24hr||(h.amPM=d(\"span\",\"flatpickr-am-pm\",h.l10n.amPM[o((h.latestSelectedDateObj?h.hourElement.value:h.config.defaultHour)>11)]),h.amPM.title=h.l10n.toggleTitle,h.amPM.tabIndex=-1,h.timeContainer.appendChild(h.amPM)),h.timeContainer}()),c(h.calendarContainer,\"rangeMode\",\"range\"===h.config.mode),c(h.calendarContainer,\"animate\",!0===h.config.animate),c(h.calendarContainer,\"multiMonth\",h.config.showMonths>1),h.calendarContainer.appendChild(e);var r=void 0!==h.config.appendTo&&void 0!==h.config.appendTo.nodeType;if((h.config.inline||h.config.static)&&(h.calendarContainer.classList.add(h.config.inline?\"inline\":\"static\"),h.config.inline&&(!r&&h.element.parentNode?h.element.parentNode.insertBefore(h.calendarContainer,h._input.nextSibling):void 0!==h.config.appendTo&&h.config.appendTo.appendChild(h.calendarContainer)),h.config.static)){var l=d(\"div\",\"flatpickr-wrapper\");h.element.parentNode&&h.element.parentNode.insertBefore(l,h.element),l.appendChild(h.element),h.altInput&&l.appendChild(h.altInput),l.appendChild(h.calendarContainer)}h.config.static||h.config.inline||(void 0!==h.config.appendTo?h.config.appendTo:window.document.body).appendChild(h.calendarContainer)}(),function(){if(h.config.wrap&&[\"open\",\"close\",\"toggle\",\"clear\"].forEach(function(e){Array.prototype.forEach.call(h.element.querySelectorAll(\"[data-\"+e+\"]\"),function(t){return F(t,\"click\",h[e])})}),h.isMobile)!function(){var e=h.config.enableTime?h.config.noCalendar?\"time\":\"datetime-local\":\"date\";h.mobileInput=d(\"input\",h.input.className+\" flatpickr-mobile\"),h.mobileInput.step=h.input.getAttribute(\"step\")||\"any\",h.mobileInput.tabIndex=1,h.mobileInput.type=e,h.mobileInput.disabled=h.input.disabled,h.mobileInput.required=h.input.required,h.mobileInput.placeholder=h.input.placeholder,h.mobileFormatStr=\"datetime-local\"===e?\"Y-m-d\\\\TH:i:S\":\"date\"===e?\"Y-m-d\":\"H:i:S\",h.selectedDates.length>0&&(h.mobileInput.defaultValue=h.mobileInput.value=h.formatDate(h.selectedDates[0],h.mobileFormatStr)),h.config.minDate&&(h.mobileInput.min=h.formatDate(h.config.minDate,\"Y-m-d\")),h.config.maxDate&&(h.mobileInput.max=h.formatDate(h.config.maxDate,\"Y-m-d\")),h.input.type=\"hidden\",void 0!==h.altInput&&(h.altInput.type=\"hidden\");try{h.input.parentNode&&h.input.parentNode.insertBefore(h.mobileInput,h.input.nextSibling)}catch(e){}F(h.mobileInput,\"change\",function(e){h.setDate(e.target.value,!1,h.mobileFormatStr),ge(\"onChange\"),ge(\"onClose\")})}();else{var e=r(ae,50);h._debouncedChange=r(Y,M),h.daysContainer&&!/iPhone|iPad|iPod/i.test(navigator.userAgent)&&F(h.daysContainer,\"mouseover\",function(e){\"range\"===h.config.mode&&ne(e.target)}),F(window.document.body,\"keydown\",te),h.config.inline||h.config.static||F(window,\"resize\",e),void 0!==window.ontouchstart?F(window.document,\"touchstart\",Z):F(window.document,\"mousedown\",N(Z)),F(window.document,\"focus\",Z,{capture:!0}),!0===h.config.clickOpens&&(F(h._input,\"focus\",h.open),F(h._input,\"mousedown\",N(h.open))),void 0!==h.daysContainer&&(F(h.monthNav,\"mousedown\",N(be)),F(h.monthNav,[\"keyup\",\"increment\"],_),F(h.daysContainer,\"mousedown\",N(se))),void 0!==h.timeContainer&&void 0!==h.minuteElement&&void 0!==h.hourElement&&(F(h.timeContainer,[\"increment\"],T),F(h.timeContainer,\"blur\",T,{capture:!0}),F(h.timeContainer,\"mousedown\",N(P)),F([h.hourElement,h.minuteElement],[\"focus\",\"click\"],function(e){return e.target.select()}),void 0!==h.secondElement&&F(h.secondElement,\"focus\",function(){return h.secondElement&&h.secondElement.select()}),void 0!==h.amPM&&F(h.amPM,\"mousedown\",N(function(e){T(e),Y()})))}}(),(h.selectedDates.length||h.config.noCalendar)&&(h.config.enableTime&&I(h.config.noCalendar?h.latestSelectedDateObj||h.config.minDate:void 0),we(!1)),x(),h.showTimeInput=h.selectedDates.length>0||h.config.noCalendar;var a=/^((?!chrome|android).)*safari/i.test(navigator.userAgent);!h.isMobile&&a&&le(),ge(\"onReady\")}(),h}function x(e,t){for(var n=Array.prototype.slice.call(e).filter(function(e){return e instanceof HTMLElement}),a=[],i=0;i<n.length;i++){var o=n[i];try{if(null!==o.getAttribute(\"data-fp-omit\"))continue;void 0!==o._flatpickr&&(o._flatpickr.destroy(),o._flatpickr=void 0),o._flatpickr=y(o,t||{}),a.push(o._flatpickr)}catch(e){console.error(e)}}return 1===a.length?a[0]:a}\"undefined\"!=typeof HTMLElement&&\"undefined\"!=typeof HTMLCollection&&\"undefined\"!=typeof NodeList&&(HTMLCollection.prototype.flatpickr=NodeList.prototype.flatpickr=function(e){return x(this,e)},HTMLElement.prototype.flatpickr=function(e){return x([this],e)});var E=function(e,t){return\"string\"==typeof e?x(window.document.querySelectorAll(e),t):e instanceof Node?x([e],t):x(e,t)};return E.defaultConfig={},E.l10ns={en:e({},a),default:e({},a)},E.localize=function(t){E.l10ns.default=e({},E.l10ns.default,t)},E.setDefaults=function(t){E.defaultConfig=e({},E.defaultConfig,t)},E.parseDate=D({}),E.formatDate=v({}),E.compareDates=w,\"undefined\"!=typeof jQuery&&void 0!==jQuery.fn&&(jQuery.fn.flatpickr=function(e){return x(this,e)}),Date.prototype.fp_incr=function(e){return new Date(this.getFullYear(),this.getMonth(),this.getDate()+(\"string\"==typeof e?parseInt(e,10):e))},\"undefined\"!=typeof window&&(window.flatpickr=E),E});","/*\r\n * International Telephone Input v16.0.0\r\n * https://github.com/jackocnr/intl-tel-input.git\r\n * Licensed under the MIT license\r\n */\r\n\r\n// wrap in UMD\r\n(function(factory) {\r\n    var intlTelInput = factory(window, document);\r\n    if (typeof module === \"object\" && module.exports) module.exports = intlTelInput; else window.intlTelInput = intlTelInput;\r\n})(function(window, document, undefined) {\r\n    \"use strict\";\r\n    return function() {\r\n        // Array of country objects for the flag dropdown.\r\n        // Here is the criteria for the plugin to support a given country/territory\r\n        // - It has an iso2 code: https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2\r\n        // - It has it's own country calling code (it is not a sub-region of another country): https://en.wikipedia.org/wiki/List_of_country_calling_codes\r\n        // - It has a flag in the region-flags project: https://github.com/behdad/region-flags/tree/gh-pages/png\r\n        // - It is supported by libphonenumber (it must be listed on this page): https://github.com/googlei18n/libphonenumber/blob/master/resources/ShortNumberMetadata.xml\r\n        // Each country array has the following information:\r\n        // [\r\n        //    Country name,\r\n        //    iso2 code,\r\n        //    International dial code,\r\n        //    Order (if >1 country with same dial code),\r\n        //    Area codes\r\n        // ]\r\n        var allCountries = [ [ \"Afghanistan (‫افغانستان‬‎)\", \"af\", \"93\" ], [ \"Albania (Shqipëri)\", \"al\", \"355\" ], [ \"Algeria (‫الجزائر‬‎)\", \"dz\", \"213\" ], [ \"American Samoa\", \"as\", \"1\", 5, [ \"684\" ] ], [ \"Andorra\", \"ad\", \"376\" ], [ \"Angola\", \"ao\", \"244\" ], [ \"Anguilla\", \"ai\", \"1\", 6, [ \"264\" ] ], [ \"Antigua and Barbuda\", \"ag\", \"1\", 7, [ \"268\" ] ], [ \"Argentina\", \"ar\", \"54\" ], [ \"Armenia (Հայաստան)\", \"am\", \"374\" ], [ \"Aruba\", \"aw\", \"297\" ], [ \"Australia\", \"au\", \"61\", 0 ], [ \"Austria (Österreich)\", \"at\", \"43\" ], [ \"Azerbaijan (Azərbaycan)\", \"az\", \"994\" ], [ \"Bahamas\", \"bs\", \"1\", 8, [ \"242\" ] ], [ \"Bahrain (‫البحرين‬‎)\", \"bh\", \"973\" ], [ \"Bangladesh (বাংলাদেশ)\", \"bd\", \"880\" ], [ \"Barbados\", \"bb\", \"1\", 9, [ \"246\" ] ], [ \"Belarus (Беларусь)\", \"by\", \"375\" ], [ \"Belgium (België)\", \"be\", \"32\" ], [ \"Belize\", \"bz\", \"501\" ], [ \"Benin (Bénin)\", \"bj\", \"229\" ], [ \"Bermuda\", \"bm\", \"1\", 10, [ \"441\" ] ], [ \"Bhutan (འབྲུག)\", \"bt\", \"975\" ], [ \"Bolivia\", \"bo\", \"591\" ], [ \"Bosnia and Herzegovina (Босна и Херцеговина)\", \"ba\", \"387\" ], [ \"Botswana\", \"bw\", \"267\" ], [ \"Brazil (Brasil)\", \"br\", \"55\" ], [ \"British Indian Ocean Territory\", \"io\", \"246\" ], [ \"British Virgin Islands\", \"vg\", \"1\", 11, [ \"284\" ] ], [ \"Brunei\", \"bn\", \"673\" ], [ \"Bulgaria (България)\", \"bg\", \"359\" ], [ \"Burkina Faso\", \"bf\", \"226\" ], [ \"Burundi (Uburundi)\", \"bi\", \"257\" ], [ \"Cambodia (កម្ពុជា)\", \"kh\", \"855\" ], [ \"Cameroon (Cameroun)\", \"cm\", \"237\" ], [ \"Canada\", \"ca\", \"1\", 1, [ \"204\", \"226\", \"236\", \"249\", \"250\", \"289\", \"306\", \"343\", \"365\", \"387\", \"403\", \"416\", \"418\", \"431\", \"437\", \"438\", \"450\", \"506\", \"514\", \"519\", \"548\", \"579\", \"581\", \"587\", \"604\", \"613\", \"639\", \"647\", \"672\", \"705\", \"709\", \"742\", \"778\", \"780\", \"782\", \"807\", \"819\", \"825\", \"867\", \"873\", \"902\", \"905\" ] ], [ \"Cape Verde (Kabu Verdi)\", \"cv\", \"238\" ], [ \"Caribbean Netherlands\", \"bq\", \"599\", 1, [ \"3\", \"4\", \"7\" ] ], [ \"Cayman Islands\", \"ky\", \"1\", 12, [ \"345\" ] ], [ \"Central African Republic (République centrafricaine)\", \"cf\", \"236\" ], [ \"Chad (Tchad)\", \"td\", \"235\" ], [ \"Chile\", \"cl\", \"56\" ], [ \"China (中国)\", \"cn\", \"86\" ], [ \"Christmas Island\", \"cx\", \"61\", 2 ], [ \"Cocos (Keeling) Islands\", \"cc\", \"61\", 1 ], [ \"Colombia\", \"co\", \"57\" ], [ \"Comoros (‫جزر القمر‬‎)\", \"km\", \"269\" ], [ \"Congo (DRC) (Jamhuri ya Kidemokrasia ya Kongo)\", \"cd\", \"243\" ], [ \"Congo (Republic) (Congo-Brazzaville)\", \"cg\", \"242\" ], [ \"Cook Islands\", \"ck\", \"682\" ], [ \"Costa Rica\", \"cr\", \"506\" ], [ \"Côte d’Ivoire\", \"ci\", \"225\" ], [ \"Croatia (Hrvatska)\", \"hr\", \"385\" ], [ \"Cuba\", \"cu\", \"53\" ], [ \"Curaçao\", \"cw\", \"599\", 0 ], [ \"Cyprus (Κύπρος)\", \"cy\", \"357\" ], [ \"Czech Republic (Česká republika)\", \"cz\", \"420\" ], [ \"Denmark (Danmark)\", \"dk\", \"45\" ], [ \"Djibouti\", \"dj\", \"253\" ], [ \"Dominica\", \"dm\", \"1\", 13, [ \"767\" ] ], [ \"Dominican Republic (República Dominicana)\", \"do\", \"1\", 2, [ \"809\", \"829\", \"849\" ] ], [ \"Ecuador\", \"ec\", \"593\" ], [ \"Egypt (‫مصر‬‎)\", \"eg\", \"20\" ], [ \"El Salvador\", \"sv\", \"503\" ], [ \"Equatorial Guinea (Guinea Ecuatorial)\", \"gq\", \"240\" ], [ \"Eritrea\", \"er\", \"291\" ], [ \"Estonia (Eesti)\", \"ee\", \"372\" ], [ \"Ethiopia\", \"et\", \"251\" ], [ \"Falkland Islands (Islas Malvinas)\", \"fk\", \"500\" ], [ \"Faroe Islands (Føroyar)\", \"fo\", \"298\" ], [ \"Fiji\", \"fj\", \"679\" ], [ \"Finland (Suomi)\", \"fi\", \"358\", 0 ], [ \"France\", \"fr\", \"33\" ], [ \"French Guiana (Guyane française)\", \"gf\", \"594\" ], [ \"French Polynesia (Polynésie française)\", \"pf\", \"689\" ], [ \"Gabon\", \"ga\", \"241\" ], [ \"Gambia\", \"gm\", \"220\" ], [ \"Georgia (საქართველო)\", \"ge\", \"995\" ], [ \"Germany (Deutschland)\", \"de\", \"49\" ], [ \"Ghana (Gaana)\", \"gh\", \"233\" ], [ \"Gibraltar\", \"gi\", \"350\" ], [ \"Greece (Ελλάδα)\", \"gr\", \"30\" ], [ \"Greenland (Kalaallit Nunaat)\", \"gl\", \"299\" ], [ \"Grenada\", \"gd\", \"1\", 14, [ \"473\" ] ], [ \"Guadeloupe\", \"gp\", \"590\", 0 ], [ \"Guam\", \"gu\", \"1\", 15, [ \"671\" ] ], [ \"Guatemala\", \"gt\", \"502\" ], [ \"Guernsey\", \"gg\", \"44\", 1, [ \"1481\", \"7781\", \"7839\", \"7911\" ] ], [ \"Guinea (Guinée)\", \"gn\", \"224\" ], [ \"Guinea-Bissau (Guiné Bissau)\", \"gw\", \"245\" ], [ \"Guyana\", \"gy\", \"592\" ], [ \"Haiti\", \"ht\", \"509\" ], [ \"Honduras\", \"hn\", \"504\" ], [ \"Hong Kong (香港)\", \"hk\", \"852\" ], [ \"Hungary (Magyarország)\", \"hu\", \"36\" ], [ \"Iceland (Ísland)\", \"is\", \"354\" ], [ \"India (भारत)\", \"in\", \"91\" ], [ \"Indonesia\", \"id\", \"62\" ], [ \"Iran (‫ایران‬‎)\", \"ir\", \"98\" ], [ \"Iraq (‫العراق‬‎)\", \"iq\", \"964\" ], [ \"Ireland\", \"ie\", \"353\" ], [ \"Isle of Man\", \"im\", \"44\", 2, [ \"1624\", \"74576\", \"7524\", \"7924\", \"7624\" ] ], [ \"Israel (‫ישראל‬‎)\", \"il\", \"972\" ], [ \"Italy (Italia)\", \"it\", \"39\", 0 ], [ \"Jamaica\", \"jm\", \"1\", 4, [ \"876\", \"658\" ] ], [ \"Japan (日本)\", \"jp\", \"81\" ], [ \"Jersey\", \"je\", \"44\", 3, [ \"1534\", \"7509\", \"7700\", \"7797\", \"7829\", \"7937\" ] ], [ \"Jordan (‫الأردن‬‎)\", \"jo\", \"962\" ], [ \"Kazakhstan (Казахстан)\", \"kz\", \"7\", 1, [ \"33\", \"7\" ] ], [ \"Kenya\", \"ke\", \"254\" ], [ \"Kiribati\", \"ki\", \"686\" ], [ \"Kosovo\", \"xk\", \"383\" ], [ \"Kuwait (‫الكويت‬‎)\", \"kw\", \"965\" ], [ \"Kyrgyzstan (Кыргызстан)\", \"kg\", \"996\" ], [ \"Laos (ລາວ)\", \"la\", \"856\" ], [ \"Latvia (Latvija)\", \"lv\", \"371\" ], [ \"Lebanon (‫لبنان‬‎)\", \"lb\", \"961\" ], [ \"Lesotho\", \"ls\", \"266\" ], [ \"Liberia\", \"lr\", \"231\" ], [ \"Libya (‫ليبيا‬‎)\", \"ly\", \"218\" ], [ \"Liechtenstein\", \"li\", \"423\" ], [ \"Lithuania (Lietuva)\", \"lt\", \"370\" ], [ \"Luxembourg\", \"lu\", \"352\" ], [ \"Macau (澳門)\", \"mo\", \"853\" ], [ \"Macedonia (FYROM) (Македонија)\", \"mk\", \"389\" ], [ \"Madagascar (Madagasikara)\", \"mg\", \"261\" ], [ \"Malawi\", \"mw\", \"265\" ], [ \"Malaysia\", \"my\", \"60\" ], [ \"Maldives\", \"mv\", \"960\" ], [ \"Mali\", \"ml\", \"223\" ], [ \"Malta\", \"mt\", \"356\" ], [ \"Marshall Islands\", \"mh\", \"692\" ], [ \"Martinique\", \"mq\", \"596\" ], [ \"Mauritania (‫موريتانيا‬‎)\", \"mr\", \"222\" ], [ \"Mauritius (Moris)\", \"mu\", \"230\" ], [ \"Mayotte\", \"yt\", \"262\", 1, [ \"269\", \"639\" ] ], [ \"Mexico (México)\", \"mx\", \"52\" ], [ \"Micronesia\", \"fm\", \"691\" ], [ \"Moldova (Republica Moldova)\", \"md\", \"373\" ], [ \"Monaco\", \"mc\", \"377\" ], [ \"Mongolia (Монгол)\", \"mn\", \"976\" ], [ \"Montenegro (Crna Gora)\", \"me\", \"382\" ], [ \"Montserrat\", \"ms\", \"1\", 16, [ \"664\" ] ], [ \"Morocco (‫المغرب‬‎)\", \"ma\", \"212\", 0 ], [ \"Mozambique (Moçambique)\", \"mz\", \"258\" ], [ \"Myanmar (Burma) (မြန်မာ)\", \"mm\", \"95\" ], [ \"Namibia (Namibië)\", \"na\", \"264\" ], [ \"Nauru\", \"nr\", \"674\" ], [ \"Nepal (नेपाल)\", \"np\", \"977\" ], [ \"Netherlands (Nederland)\", \"nl\", \"31\" ], [ \"New Caledonia (Nouvelle-Calédonie)\", \"nc\", \"687\" ], [ \"New Zealand\", \"nz\", \"64\" ], [ \"Nicaragua\", \"ni\", \"505\" ], [ \"Niger (Nijar)\", \"ne\", \"227\" ], [ \"Nigeria\", \"ng\", \"234\" ], [ \"Niue\", \"nu\", \"683\" ], [ \"Norfolk Island\", \"nf\", \"672\" ], [ \"North Korea (조선 민주주의 인민 공화국)\", \"kp\", \"850\" ], [ \"Northern Mariana Islands\", \"mp\", \"1\", 17, [ \"670\" ] ], [ \"Norway (Norge)\", \"no\", \"47\", 0 ], [ \"Oman (‫عُمان‬‎)\", \"om\", \"968\" ], [ \"Pakistan (‫پاکستان‬‎)\", \"pk\", \"92\" ], [ \"Palau\", \"pw\", \"680\" ], [ \"Palestine (‫فلسطين‬‎)\", \"ps\", \"970\" ], [ \"Panama (Panamá)\", \"pa\", \"507\" ], [ \"Papua New Guinea\", \"pg\", \"675\" ], [ \"Paraguay\", \"py\", \"595\" ], [ \"Peru (Perú)\", \"pe\", \"51\" ], [ \"Philippines\", \"ph\", \"63\" ], [ \"Poland (Polska)\", \"pl\", \"48\" ], [ \"Portugal\", \"pt\", \"351\" ], [ \"Puerto Rico\", \"pr\", \"1\", 3, [ \"787\", \"939\" ] ], [ \"Qatar (‫قطر‬‎)\", \"qa\", \"974\" ], [ \"Réunion (La Réunion)\", \"re\", \"262\", 0 ], [ \"Romania (România)\", \"ro\", \"40\" ], [ \"Russia (Россия)\", \"ru\", \"7\", 0 ], [ \"Rwanda\", \"rw\", \"250\" ], [ \"Saint Barthélemy\", \"bl\", \"590\", 1 ], [ \"Saint Helena\", \"sh\", \"290\" ], [ \"Saint Kitts and Nevis\", \"kn\", \"1\", 18, [ \"869\" ] ], [ \"Saint Lucia\", \"lc\", \"1\", 19, [ \"758\" ] ], [ \"Saint Martin (Saint-Martin (partie française))\", \"mf\", \"590\", 2 ], [ \"Saint Pierre and Miquelon (Saint-Pierre-et-Miquelon)\", \"pm\", \"508\" ], [ \"Saint Vincent and the Grenadines\", \"vc\", \"1\", 20, [ \"784\" ] ], [ \"Samoa\", \"ws\", \"685\" ], [ \"San Marino\", \"sm\", \"378\" ], [ \"São Tomé and Príncipe (São Tomé e Príncipe)\", \"st\", \"239\" ], [ \"Saudi Arabia (‫المملكة العربية السعودية‬‎)\", \"sa\", \"966\" ], [ \"Senegal (Sénégal)\", \"sn\", \"221\" ], [ \"Serbia (Србија)\", \"rs\", \"381\" ], [ \"Seychelles\", \"sc\", \"248\" ], [ \"Sierra Leone\", \"sl\", \"232\" ], [ \"Singapore\", \"sg\", \"65\" ], [ \"Sint Maarten\", \"sx\", \"1\", 21, [ \"721\" ] ], [ \"Slovakia (Slovensko)\", \"sk\", \"421\" ], [ \"Slovenia (Slovenija)\", \"si\", \"386\" ], [ \"Solomon Islands\", \"sb\", \"677\" ], [ \"Somalia (Soomaaliya)\", \"so\", \"252\" ], [ \"South Africa\", \"za\", \"27\" ], [ \"South Korea (대한민국)\", \"kr\", \"82\" ], [ \"South Sudan (‫جنوب السودان‬‎)\", \"ss\", \"211\" ], [ \"Spain (España)\", \"es\", \"34\" ], [ \"Sri Lanka (ශ්‍රී ලංකාව)\", \"lk\", \"94\" ], [ \"Sudan (‫السودان‬‎)\", \"sd\", \"249\" ], [ \"Suriname\", \"sr\", \"597\" ], [ \"Svalbard and Jan Mayen\", \"sj\", \"47\", 1, [ \"79\" ] ], [ \"Swaziland\", \"sz\", \"268\" ], [ \"Sweden (Sverige)\", \"se\", \"46\" ], [ \"Switzerland (Schweiz)\", \"ch\", \"41\" ], [ \"Syria (‫سوريا‬‎)\", \"sy\", \"963\" ], [ \"Taiwan (台灣)\", \"tw\", \"886\" ], [ \"Tajikistan\", \"tj\", \"992\" ], [ \"Tanzania\", \"tz\", \"255\" ], [ \"Thailand (ไทย)\", \"th\", \"66\" ], [ \"Timor-Leste\", \"tl\", \"670\" ], [ \"Togo\", \"tg\", \"228\" ], [ \"Tokelau\", \"tk\", \"690\" ], [ \"Tonga\", \"to\", \"676\" ], [ \"Trinidad and Tobago\", \"tt\", \"1\", 22, [ \"868\" ] ], [ \"Tunisia (‫تونس‬‎)\", \"tn\", \"216\" ], [ \"Turkey (Türkiye)\", \"tr\", \"90\" ], [ \"Turkmenistan\", \"tm\", \"993\" ], [ \"Turks and Caicos Islands\", \"tc\", \"1\", 23, [ \"649\" ] ], [ \"Tuvalu\", \"tv\", \"688\" ], [ \"U.S. Virgin Islands\", \"vi\", \"1\", 24, [ \"340\" ] ], [ \"Uganda\", \"ug\", \"256\" ], [ \"Ukraine (Україна)\", \"ua\", \"380\" ], [ \"United Arab Emirates (‫الإمارات العربية المتحدة‬‎)\", \"ae\", \"971\" ], [ \"United Kingdom\", \"gb\", \"44\", 0 ], [ \"United States\", \"us\", \"1\", 0 ], [ \"Uruguay\", \"uy\", \"598\" ], [ \"Uzbekistan (Oʻzbekiston)\", \"uz\", \"998\" ], [ \"Vanuatu\", \"vu\", \"678\" ], [ \"Vatican City (Città del Vaticano)\", \"va\", \"39\", 1, [ \"06698\" ] ], [ \"Venezuela\", \"ve\", \"58\" ], [ \"Vietnam (Việt Nam)\", \"vn\", \"84\" ], [ \"Wallis and Futuna (Wallis-et-Futuna)\", \"wf\", \"681\" ], [ \"Western Sahara (‫الصحراء الغربية‬‎)\", \"eh\", \"212\", 1, [ \"5288\", \"5289\" ] ], [ \"Yemen (‫اليمن‬‎)\", \"ye\", \"967\" ], [ \"Zambia\", \"zm\", \"260\" ], [ \"Zimbabwe\", \"zw\", \"263\" ], [ \"Åland Islands\", \"ax\", \"358\", 1, [ \"18\" ] ] ];\r\n        // loop over all of the countries above, restructuring the data to be objects with named keys\r\n        for (var i = 0; i < allCountries.length; i++) {\r\n            var c = allCountries[i];\r\n            allCountries[i] = {\r\n                name: c[0],\r\n                iso2: c[1],\r\n                dialCode: c[2],\r\n                priority: c[3] || 0,\r\n                areaCodes: c[4] || null\r\n            };\r\n        }\r\n        \"use strict\";\r\n        function _classCallCheck(instance, Constructor) {\r\n            if (!(instance instanceof Constructor)) {\r\n                throw new TypeError(\"Cannot call a class as a function\");\r\n            }\r\n        }\r\n        function _defineProperties(target, props) {\r\n            for (var i = 0; i < props.length; i++) {\r\n                var descriptor = props[i];\r\n                descriptor.enumerable = descriptor.enumerable || false;\r\n                descriptor.configurable = true;\r\n                if (\"value\" in descriptor) descriptor.writable = true;\r\n                Object.defineProperty(target, descriptor.key, descriptor);\r\n            }\r\n        }\r\n        function _createClass(Constructor, protoProps, staticProps) {\r\n            if (protoProps) _defineProperties(Constructor.prototype, protoProps);\r\n            if (staticProps) _defineProperties(Constructor, staticProps);\r\n            return Constructor;\r\n        }\r\n        window.intlTelInputGlobals = {\r\n            getInstance: function getInstance(input) {\r\n                var id = input.getAttribute(\"data-intl-tel-input-id\");\r\n                return window.intlTelInputGlobals.instances[id];\r\n            },\r\n            instances: {}\r\n        };\r\n        // these vars persist through all instances of the plugin\r\n        var id = 0;\r\n        var defaults = {\r\n            // whether or not to allow the dropdown\r\n            allowDropdown: true,\r\n            // if there is just a dial code in the input: remove it on blur\r\n            autoHideDialCode: true,\r\n            // add a placeholder in the input with an example number for the selected country\r\n            autoPlaceholder: \"polite\",\r\n            // modify the parentClass\r\n            customContainer: \"\",\r\n            // modify the auto placeholder\r\n            customPlaceholder: null,\r\n            // append menu to specified element\r\n            dropdownContainer: null,\r\n            // don't display these countries\r\n            excludeCountries: [],\r\n            // format the input value during initialisation and on setNumber\r\n            formatOnDisplay: true,\r\n            // geoIp lookup function\r\n            geoIpLookup: null,\r\n            // inject a hidden input with this name, and on submit, populate it with the result of getNumber\r\n            hiddenInput: \"\",\r\n            // initial country\r\n            initialCountry: \"\",\r\n            // localized country names e.g. { 'de': 'Deutschland' }\r\n            localizedCountries: null,\r\n            // don't insert international dial codes\r\n            nationalMode: true,\r\n            // display only these countries\r\n            onlyCountries: [],\r\n            // number type to use for placeholders\r\n            placeholderNumberType: \"MOBILE\",\r\n            // the countries at the top of the list. defaults to united states and united kingdom\r\n            preferredCountries: [ \"us\", \"gb\" ],\r\n            // display the country dial code next to the selected flag so it's not part of the typed number\r\n            separateDialCode: false,\r\n            // specify the path to the libphonenumber script to enable validation/formatting\r\n            utilsScript: \"\"\r\n        };\r\n        // https://en.wikipedia.org/wiki/List_of_North_American_Numbering_Plan_area_codes#Non-geographic_area_codes\r\n        var regionlessNanpNumbers = [ \"800\", \"822\", \"833\", \"844\", \"855\", \"866\", \"877\", \"880\", \"881\", \"882\", \"883\", \"884\", \"885\", \"886\", \"887\", \"888\", \"889\" ];\r\n        // keep track of if the window.load event has fired as impossible to check after the fact\r\n        window.addEventListener(\"load\", function() {\r\n            // UPDATE: use a public static field so we can fudge it in the tests\r\n            window.intlTelInputGlobals.windowLoaded = true;\r\n        });\r\n        // utility function to iterate over an object. can't use Object.entries or native forEach because\r\n        // of IE11\r\n        var forEachProp = function forEachProp(obj, callback) {\r\n            var keys = Object.keys(obj);\r\n            for (var i = 0; i < keys.length; i++) {\r\n                callback(keys[i], obj[keys[i]]);\r\n            }\r\n        };\r\n        // run a method on each instance of the plugin\r\n        var forEachInstance = function forEachInstance(method) {\r\n            forEachProp(window.intlTelInputGlobals.instances, function(key) {\r\n                window.intlTelInputGlobals.instances[key][method]();\r\n            });\r\n        };\r\n        // this is our plugin class that we will create an instance of\r\n        // eslint-disable-next-line no-unused-vars\r\n        var Iti = /*#__PURE__*/\r\n        function() {\r\n            function Iti(input, options) {\r\n                var _this = this;\r\n                _classCallCheck(this, Iti);\r\n                this.id = id++;\r\n                this.telInput = input;\r\n                this.activeItem = null;\r\n                this.highlightedItem = null;\r\n                // process specified options / defaults\r\n                // alternative to Object.assign, which isn't supported by IE11\r\n                var customOptions = options || {};\r\n                this.options = {};\r\n                forEachProp(defaults, function(key, value) {\r\n                    _this.options[key] = customOptions.hasOwnProperty(key) ? customOptions[key] : value;\r\n                });\r\n                this.hadInitialPlaceholder = Boolean(input.getAttribute(\"placeholder\"));\r\n            }\r\n            _createClass(Iti, [ {\r\n                key: \"_init\",\r\n                value: function _init() {\r\n                    var _this2 = this;\r\n                    // if in nationalMode, disable options relating to dial codes\r\n                    if (this.options.nationalMode) this.options.autoHideDialCode = false;\r\n                    // if separateDialCode then doesn't make sense to A) insert dial code into input\r\n                    // (autoHideDialCode), and B) display national numbers (because we're displaying the country\r\n                    // dial code next to them)\r\n                    if (this.options.separateDialCode) {\r\n                        this.options.autoHideDialCode = this.options.nationalMode = false;\r\n                    }\r\n                    // we cannot just test screen size as some smartphones/website meta tags will report desktop\r\n                    // resolutions\r\n                    // Note: for some reason jasmine breaks if you put this in the main Plugin function with the\r\n                    // rest of these declarations\r\n                    // Note: to target Android Mobiles (and not Tablets), we must find 'Android' and 'Mobile'\r\n                    this.isMobile = /Android.+Mobile|webOS|iPhone|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);\r\n                    if (this.isMobile) {\r\n                        // trigger the mobile dropdown css\r\n                        document.body.classList.add(\"iti-mobile\");\r\n                        // on mobile, we want a full screen dropdown, so we must append it to the body\r\n                        if (!this.options.dropdownContainer) this.options.dropdownContainer = document.body;\r\n                    }\r\n                    // these promises get resolved when their individual requests complete\r\n                    // this way the dev can do something like iti.promise.then(...) to know when all requests are\r\n                    // complete\r\n                    if (typeof Promise !== \"undefined\") {\r\n                        var autoCountryPromise = new Promise(function(resolve, reject) {\r\n                            _this2.resolveAutoCountryPromise = resolve;\r\n                            _this2.rejectAutoCountryPromise = reject;\r\n                        });\r\n                        var utilsScriptPromise = new Promise(function(resolve, reject) {\r\n                            _this2.resolveUtilsScriptPromise = resolve;\r\n                            _this2.rejectUtilsScriptPromise = reject;\r\n                        });\r\n                        this.promise = Promise.all([ autoCountryPromise, utilsScriptPromise ]);\r\n                    } else {\r\n                        // prevent errors when Promise doesn't exist\r\n                        this.resolveAutoCountryPromise = this.rejectAutoCountryPromise = function() {};\r\n                        this.resolveUtilsScriptPromise = this.rejectUtilsScriptPromise = function() {};\r\n                    }\r\n                    // in various situations there could be no country selected initially, but we need to be able\r\n                    // to assume this variable exists\r\n                    this.selectedCountryData = {};\r\n                    // process all the data: onlyCountries, excludeCountries, preferredCountries etc\r\n                    this._processCountryData();\r\n                    // generate the markup\r\n                    this._generateMarkup();\r\n                    // set the initial state of the input value and the selected flag\r\n                    this._setInitialState();\r\n                    // start all of the event listeners: autoHideDialCode, input keydown, selectedFlag click\r\n                    this._initListeners();\r\n                    // utils script, and auto country\r\n                    this._initRequests();\r\n                }\r\n            }, {\r\n                key: \"_processCountryData\",\r\n                value: function _processCountryData() {\r\n                    // process onlyCountries or excludeCountries array if present\r\n                    this._processAllCountries();\r\n                    // process the countryCodes map\r\n                    this._processCountryCodes();\r\n                    // process the preferredCountries\r\n                    this._processPreferredCountries();\r\n                    // translate countries according to localizedCountries option\r\n                    if (this.options.localizedCountries) this._translateCountriesByLocale();\r\n                    // sort countries by name\r\n                    if (this.options.onlyCountries.length || this.options.localizedCountries) {\r\n                        this.countries.sort(this._countryNameSort);\r\n                    }\r\n                }\r\n            }, {\r\n                key: \"_addCountryCode\",\r\n                value: function _addCountryCode(iso2, dialCode, priority) {\r\n                    if (dialCode.length > this.dialCodeMaxLen) {\r\n                        this.dialCodeMaxLen = dialCode.length;\r\n                    }\r\n                    if (!this.countryCodes.hasOwnProperty(dialCode)) {\r\n                        this.countryCodes[dialCode] = [];\r\n                    }\r\n                    // bail if we already have this country for this dialCode\r\n                    for (var i = 0; i < this.countryCodes[dialCode].length; i++) {\r\n                        if (this.countryCodes[dialCode][i] === iso2) return;\r\n                    }\r\n                    // check for undefined as 0 is falsy\r\n                    var index = priority !== undefined ? priority : this.countryCodes[dialCode].length;\r\n                    this.countryCodes[dialCode][index] = iso2;\r\n                }\r\n            }, {\r\n                key: \"_processAllCountries\",\r\n                value: function _processAllCountries() {\r\n                    if (this.options.onlyCountries.length) {\r\n                        var lowerCaseOnlyCountries = this.options.onlyCountries.map(function(country) {\r\n                            return country.toLowerCase();\r\n                        });\r\n                        this.countries = allCountries.filter(function(country) {\r\n                            return lowerCaseOnlyCountries.indexOf(country.iso2) > -1;\r\n                        });\r\n                    } else if (this.options.excludeCountries.length) {\r\n                        var lowerCaseExcludeCountries = this.options.excludeCountries.map(function(country) {\r\n                            return country.toLowerCase();\r\n                        });\r\n                        this.countries = allCountries.filter(function(country) {\r\n                            return lowerCaseExcludeCountries.indexOf(country.iso2) === -1;\r\n                        });\r\n                    } else {\r\n                        this.countries = allCountries;\r\n                    }\r\n                }\r\n            }, {\r\n                key: \"_translateCountriesByLocale\",\r\n                value: function _translateCountriesByLocale() {\r\n                    for (var i = 0; i < this.countries.length; i++) {\r\n                        var iso = this.countries[i].iso2.toLowerCase();\r\n                        if (this.options.localizedCountries.hasOwnProperty(iso)) {\r\n                            this.countries[i].name = this.options.localizedCountries[iso];\r\n                        }\r\n                    }\r\n                }\r\n            }, {\r\n                key: \"_countryNameSort\",\r\n                value: function _countryNameSort(a, b) {\r\n                    return a.name.localeCompare(b.name);\r\n                }\r\n            }, {\r\n                key: \"_processCountryCodes\",\r\n                value: function _processCountryCodes() {\r\n                    this.dialCodeMaxLen = 0;\r\n                    this.countryCodes = {};\r\n                    // first: add dial codes\r\n                    for (var i = 0; i < this.countries.length; i++) {\r\n                        var c = this.countries[i];\r\n                        this._addCountryCode(c.iso2, c.dialCode, c.priority);\r\n                    }\r\n                    // next: add area codes\r\n                    // this is a second loop over countries, to make sure we have all of the \"root\" countries\r\n                    // already in the map, so that we can access them, as each time we add an area code substring\r\n                    // to the map, we also need to include the \"root\" country's code, as that also matches\r\n                    for (var _i = 0; _i < this.countries.length; _i++) {\r\n                        var _c = this.countries[_i];\r\n                        // area codes\r\n                        if (_c.areaCodes) {\r\n                            var rootCountryCode = this.countryCodes[_c.dialCode][0];\r\n                            // for each area code\r\n                            for (var j = 0; j < _c.areaCodes.length; j++) {\r\n                                var areaCode = _c.areaCodes[j];\r\n                                // for each digit in the area code to add all partial matches as well\r\n                                for (var k = 1; k < areaCode.length; k++) {\r\n                                    var partialDialCode = _c.dialCode + areaCode.substr(0, k);\r\n                                    // start with the root country, as that also matches this dial code\r\n                                    this._addCountryCode(rootCountryCode, partialDialCode);\r\n                                    this._addCountryCode(_c.iso2, partialDialCode);\r\n                                }\r\n                                // add the full area code\r\n                                this._addCountryCode(_c.iso2, _c.dialCode + areaCode);\r\n                            }\r\n                        }\r\n                    }\r\n                }\r\n            }, {\r\n                key: \"_processPreferredCountries\",\r\n                value: function _processPreferredCountries() {\r\n                    this.preferredCountries = [];\r\n                    for (var i = 0; i < this.options.preferredCountries.length; i++) {\r\n                        var countryCode = this.options.preferredCountries[i].toLowerCase();\r\n                        var countryData = this._getCountryData(countryCode, false, true);\r\n                        if (countryData) this.preferredCountries.push(countryData);\r\n                    }\r\n                }\r\n            }, {\r\n                key: \"_createEl\",\r\n                value: function _createEl(name, attrs, container) {\r\n                    var el = document.createElement(name);\r\n                    if (attrs) forEachProp(attrs, function(key, value) {\r\n                        return el.setAttribute(key, value);\r\n                    });\r\n                    if (container) container.appendChild(el);\r\n                    return el;\r\n                }\r\n            }, {\r\n                key: \"_generateMarkup\",\r\n                value: function _generateMarkup() {\r\n                    // prevent autocomplete as there's no safe, cross-browser event we can react to, so it can\r\n                    // easily put the plugin in an inconsistent state e.g. the wrong flag selected for the\r\n                    // autocompleted number, which on submit could mean wrong number is saved (esp in nationalMode)\r\n                    this.telInput.setAttribute(\"autocomplete\", \"off\");\r\n                    // containers (mostly for positioning)\r\n                    var parentClass = \"iti\";\r\n                    if (this.options.allowDropdown) parentClass += \" iti--allow-dropdown\";\r\n                    if (this.options.separateDialCode) parentClass += \" iti--separate-dial-code\";\r\n                    if (this.options.customContainer) {\r\n                        parentClass += \" \";\r\n                        parentClass += this.options.customContainer;\r\n                    }\r\n                    var wrapper = this._createEl(\"div\", {\r\n                        \"class\": parentClass\r\n                    });\r\n                    this.telInput.parentNode.insertBefore(wrapper, this.telInput);\r\n                    this.flagsContainer = this._createEl(\"div\", {\r\n                        \"class\": \"iti__flag-container\"\r\n                    }, wrapper);\r\n                    wrapper.appendChild(this.telInput);\r\n                    // selected flag (displayed to left of input)\r\n                    this.selectedFlag = this._createEl(\"div\", {\r\n                        \"class\": \"iti__selected-flag\",\r\n                        role: \"combobox\",\r\n                        \"aria-owns\": \"country-listbox\"\r\n                    }, this.flagsContainer);\r\n                    this.selectedFlagInner = this._createEl(\"div\", {\r\n                        \"class\": \"iti__flag\"\r\n                    }, this.selectedFlag);\r\n                    if (this.options.separateDialCode) {\r\n                        this.selectedDialCode = this._createEl(\"div\", {\r\n                            \"class\": \"iti__selected-dial-code\"\r\n                        }, this.selectedFlag);\r\n                    }\r\n                    if (this.options.allowDropdown) {\r\n                        // make element focusable and tab navigable\r\n                        this.selectedFlag.setAttribute(\"tabindex\", \"0\");\r\n                        this.dropdownArrow = this._createEl(\"div\", {\r\n                            \"class\": \"iti__arrow\"\r\n                        }, this.selectedFlag);\r\n                        // country dropdown: preferred countries, then divider, then all countries\r\n                        this.countryList = this._createEl(\"ul\", {\r\n                            \"class\": \"iti__country-list iti__hide\",\r\n                            id: \"country-listbox\",\r\n                            \"aria-expanded\": \"false\",\r\n                            role: \"listbox\"\r\n                        });\r\n                        if (this.preferredCountries.length) {\r\n                            this._appendListItems(this.preferredCountries, \"iti__preferred\");\r\n                            this._createEl(\"li\", {\r\n                                \"class\": \"iti__divider\",\r\n                                role: \"separator\",\r\n                                \"aria-disabled\": \"true\"\r\n                            }, this.countryList);\r\n                        }\r\n                        this._appendListItems(this.countries, \"iti__standard\");\r\n                        // create dropdownContainer markup\r\n                        if (this.options.dropdownContainer) {\r\n                            this.dropdown = this._createEl(\"div\", {\r\n                                \"class\": \"iti iti--container\"\r\n                            });\r\n                            this.dropdown.appendChild(this.countryList);\r\n                        } else {\r\n                            this.flagsContainer.appendChild(this.countryList);\r\n                        }\r\n                    }\r\n                    if (this.options.hiddenInput) {\r\n                        var hiddenInputName = this.options.hiddenInput;\r\n                        var name = this.telInput.getAttribute(\"name\");\r\n                        if (name) {\r\n                            var i = name.lastIndexOf(\"[\");\r\n                            // if input name contains square brackets, then give the hidden input the same name,\r\n                            // replacing the contents of the last set of brackets with the given hiddenInput name\r\n                            if (i !== -1) hiddenInputName = \"\".concat(name.substr(0, i), \"[\").concat(hiddenInputName, \"]\");\r\n                        }\r\n                        this.hiddenInput = this._createEl(\"input\", {\r\n                            type: \"hidden\",\r\n                            name: hiddenInputName\r\n                        });\r\n                        wrapper.appendChild(this.hiddenInput);\r\n                    }\r\n                }\r\n            }, {\r\n                key: \"_appendListItems\",\r\n                value: function _appendListItems(countries, className) {\r\n                    // we create so many DOM elements, it is faster to build a temp string\r\n                    // and then add everything to the DOM in one go at the end\r\n                    var tmp = \"\";\r\n                    // for each country\r\n                    for (var i = 0; i < countries.length; i++) {\r\n                        var c = countries[i];\r\n                        // open the list item\r\n                        tmp += \"<li class='iti__country \".concat(className, \"' tabIndex='-1' id='iti-item-\").concat(c.iso2, \"' role='option' data-dial-code='\").concat(c.dialCode, \"' data-country-code='\").concat(c.iso2, \"'>\");\r\n                        // add the flag\r\n                        tmp += \"<div class='iti__flag-box'><div class='iti__flag iti__\".concat(c.iso2, \"'></div></div>\");\r\n                        // and the country name and dial code\r\n                        tmp += \"<span class='iti__country-name'>\".concat(c.name, \"</span>\");\r\n                        tmp += \"<span class='iti__dial-code'>+\".concat(c.dialCode, \"</span>\");\r\n                        // close the list item\r\n                        tmp += \"</li>\";\r\n                    }\r\n                    this.countryList.insertAdjacentHTML(\"beforeend\", tmp);\r\n                }\r\n            }, {\r\n                key: \"_setInitialState\",\r\n                value: function _setInitialState() {\r\n                    var val = this.telInput.value;\r\n                    var dialCode = this._getDialCode(val);\r\n                    var isRegionlessNanp = this._isRegionlessNanp(val);\r\n                    var _this$options = this.options, initialCountry = _this$options.initialCountry, nationalMode = _this$options.nationalMode, autoHideDialCode = _this$options.autoHideDialCode, separateDialCode = _this$options.separateDialCode;\r\n                    // if we already have a dial code, and it's not a regionlessNanp, we can go ahead and set the\r\n                    // flag, else fall back to the default country\r\n                    if (dialCode && !isRegionlessNanp) {\r\n                        this._updateFlagFromNumber(val);\r\n                    } else if (initialCountry !== \"auto\") {\r\n                        // see if we should select a flag\r\n                        if (initialCountry) {\r\n                            this._setFlag(initialCountry.toLowerCase());\r\n                        } else {\r\n                            if (dialCode && isRegionlessNanp) {\r\n                                // has intl dial code, is regionless nanp, and no initialCountry, so default to US\r\n                                this._setFlag(\"us\");\r\n                            } else {\r\n                                // no dial code and no initialCountry, so default to first in list\r\n                                this.defaultCountry = this.preferredCountries.length ? this.preferredCountries[0].iso2 : this.countries[0].iso2;\r\n                                if (!val) {\r\n                                    this._setFlag(this.defaultCountry);\r\n                                }\r\n                            }\r\n                        }\r\n                        // if empty and no nationalMode and no autoHideDialCode then insert the default dial code\r\n                        if (!val && !nationalMode && !autoHideDialCode && !separateDialCode) {\r\n                            this.telInput.value = \"+\".concat(this.selectedCountryData.dialCode);\r\n                        }\r\n                    }\r\n                    // NOTE: if initialCountry is set to auto, that will be handled separately\r\n                    // format - note this wont be run after _updateDialCode as that's only called if no val\r\n                    if (val) this._updateValFromNumber(val);\r\n                }\r\n            }, {\r\n                key: \"_initListeners\",\r\n                value: function _initListeners() {\r\n                    this._initKeyListeners();\r\n                    if (this.options.autoHideDialCode) this._initBlurListeners();\r\n                    if (this.options.allowDropdown) this._initDropdownListeners();\r\n                    if (this.hiddenInput) this._initHiddenInputListener();\r\n                }\r\n            }, {\r\n                key: \"_initHiddenInputListener\",\r\n                value: function _initHiddenInputListener() {\r\n                    var _this3 = this;\r\n                    this._handleHiddenInputSubmit = function() {\r\n                        _this3.hiddenInput.value = _this3.getNumber();\r\n                    };\r\n                    if (this.telInput.form) this.telInput.form.addEventListener(\"submit\", this._handleHiddenInputSubmit);\r\n                }\r\n            }, {\r\n                key: \"_getClosestLabel\",\r\n                value: function _getClosestLabel() {\r\n                    var el = this.telInput;\r\n                    while (el && el.tagName !== \"LABEL\") {\r\n                        el = el.parentNode;\r\n                    }\r\n                    return el;\r\n                }\r\n            }, {\r\n                key: \"_initDropdownListeners\",\r\n                value: function _initDropdownListeners() {\r\n                    var _this4 = this;\r\n                    // hack for input nested inside label (which is valid markup): clicking the selected-flag to\r\n                    // open the dropdown would then automatically trigger a 2nd click on the input which would\r\n                    // close it again\r\n                    this._handleLabelClick = function(e) {\r\n                        // if the dropdown is closed, then focus the input, else ignore the click\r\n                        if (_this4.countryList.classList.contains(\"iti__hide\")) _this4.telInput.focus(); else e.preventDefault();\r\n                    };\r\n                    var label = this._getClosestLabel();\r\n                    if (label) label.addEventListener(\"click\", this._handleLabelClick);\r\n                    // toggle country dropdown on click\r\n                    this._handleClickSelectedFlag = function() {\r\n                        // only intercept this event if we're opening the dropdown\r\n                        // else let it bubble up to the top (\"click-off-to-close\" listener)\r\n                        // we cannot just stopPropagation as it may be needed to close another instance\r\n                        if (_this4.countryList.classList.contains(\"iti__hide\") && !_this4.telInput.disabled && !_this4.telInput.readOnly) {\r\n                            _this4._showDropdown();\r\n                        }\r\n                    };\r\n                    this.selectedFlag.addEventListener(\"click\", this._handleClickSelectedFlag);\r\n                    // open dropdown list if currently focused\r\n                    this._handleFlagsContainerKeydown = function(e) {\r\n                        var isDropdownHidden = _this4.countryList.classList.contains(\"iti__hide\");\r\n                        if (isDropdownHidden && [ \"ArrowUp\", \"ArrowDown\", \" \", \"Enter\" ].indexOf(e.key) !== -1) {\r\n                            // prevent form from being submitted if \"ENTER\" was pressed\r\n                            e.preventDefault();\r\n                            // prevent event from being handled again by document\r\n                            e.stopPropagation();\r\n                            _this4._showDropdown();\r\n                        }\r\n                        // allow navigation from dropdown to input on TAB\r\n                        if (e.key === \"Tab\") _this4._closeDropdown();\r\n                    };\r\n                    this.flagsContainer.addEventListener(\"keydown\", this._handleFlagsContainerKeydown);\r\n                }\r\n            }, {\r\n                key: \"_initRequests\",\r\n                value: function _initRequests() {\r\n                    var _this5 = this;\r\n                    // if the user has specified the path to the utils script, fetch it on window.load, else resolve\r\n                    if (this.options.utilsScript && !window.intlTelInputUtils) {\r\n                        // if the plugin is being initialised after the window.load event has already been fired\r\n                        if (window.intlTelInputGlobals.windowLoaded) {\r\n                            window.intlTelInputGlobals.loadUtils(this.options.utilsScript);\r\n                        } else {\r\n                            // wait until the load event so we don't block any other requests e.g. the flags image\r\n                            window.addEventListener(\"load\", function() {\r\n                                window.intlTelInputGlobals.loadUtils(_this5.options.utilsScript);\r\n                            });\r\n                        }\r\n                    } else this.resolveUtilsScriptPromise();\r\n                    if (this.options.initialCountry === \"auto\") this._loadAutoCountry(); else this.resolveAutoCountryPromise();\r\n                }\r\n            }, {\r\n                key: \"_loadAutoCountry\",\r\n                value: function _loadAutoCountry() {\r\n                    // 3 options:\r\n                    // 1) already loaded (we're done)\r\n                    // 2) not already started loading (start)\r\n                    // 3) already started loading (do nothing - just wait for loading callback to fire)\r\n                    if (window.intlTelInputGlobals.autoCountry) {\r\n                        this.handleAutoCountry();\r\n                    } else if (!window.intlTelInputGlobals.startedLoadingAutoCountry) {\r\n                        // don't do this twice!\r\n                        window.intlTelInputGlobals.startedLoadingAutoCountry = true;\r\n                        if (typeof this.options.geoIpLookup === \"function\") {\r\n                            this.options.geoIpLookup(function(countryCode) {\r\n                                window.intlTelInputGlobals.autoCountry = countryCode.toLowerCase();\r\n                                // tell all instances the auto country is ready\r\n                                // TODO: this should just be the current instances\r\n                                // UPDATE: use setTimeout in case their geoIpLookup function calls this callback straight\r\n                                // away (e.g. if they have already done the geo ip lookup somewhere else). Using\r\n                                // setTimeout means that the current thread of execution will finish before executing\r\n                                // this, which allows the plugin to finish initialising.\r\n                                setTimeout(function() {\r\n                                    return forEachInstance(\"handleAutoCountry\");\r\n                                });\r\n                            }, function() {\r\n                                return forEachInstance(\"rejectAutoCountryPromise\");\r\n                            });\r\n                        }\r\n                    }\r\n                }\r\n            }, {\r\n                key: \"_initKeyListeners\",\r\n                value: function _initKeyListeners() {\r\n                    var _this6 = this;\r\n                    // update flag on keyup\r\n                    this._handleKeyupEvent = function() {\r\n                        if (_this6._updateFlagFromNumber(_this6.telInput.value)) {\r\n                            _this6._triggerCountryChange();\r\n                        }\r\n                    };\r\n                    this.telInput.addEventListener(\"keyup\", this._handleKeyupEvent);\r\n                    // update flag on cut/paste events (now supported in all major browsers)\r\n                    this._handleClipboardEvent = function() {\r\n                        // hack because \"paste\" event is fired before input is updated\r\n                        setTimeout(_this6._handleKeyupEvent);\r\n                    };\r\n                    this.telInput.addEventListener(\"cut\", this._handleClipboardEvent);\r\n                    this.telInput.addEventListener(\"paste\", this._handleClipboardEvent);\r\n                }\r\n            }, {\r\n                key: \"_cap\",\r\n                value: function _cap(number) {\r\n                    var max = this.telInput.getAttribute(\"maxlength\");\r\n                    return max && number.length > max ? number.substr(0, max) : number;\r\n                }\r\n            }, {\r\n                key: \"_initBlurListeners\",\r\n                value: function _initBlurListeners() {\r\n                    var _this7 = this;\r\n                    // on blur or form submit: if just a dial code then remove it\r\n                    this._handleSubmitOrBlurEvent = function() {\r\n                        _this7._removeEmptyDialCode();\r\n                    };\r\n                    if (this.telInput.form) this.telInput.form.addEventListener(\"submit\", this._handleSubmitOrBlurEvent);\r\n                    this.telInput.addEventListener(\"blur\", this._handleSubmitOrBlurEvent);\r\n                }\r\n            }, {\r\n                key: \"_removeEmptyDialCode\",\r\n                value: function _removeEmptyDialCode() {\r\n                    if (this.telInput.value.charAt(0) === \"+\") {\r\n                        var numeric = this._getNumeric(this.telInput.value);\r\n                        // if just a plus, or if just a dial code\r\n                        if (!numeric || this.selectedCountryData.dialCode === numeric) {\r\n                            this.telInput.value = \"\";\r\n                        }\r\n                    }\r\n                }\r\n            }, {\r\n                key: \"_getNumeric\",\r\n                value: function _getNumeric(s) {\r\n                    return s.replace(/\\D/g, \"\");\r\n                }\r\n            }, {\r\n                key: \"_trigger\",\r\n                value: function _trigger(name) {\r\n                    // have to use old school document.createEvent as IE11 doesn't support `new Event()` syntax\r\n                    var e = document.createEvent(\"Event\");\r\n                    e.initEvent(name, true, true);\r\n                    // can bubble, and is cancellable\r\n                    this.telInput.dispatchEvent(e);\r\n                }\r\n            }, {\r\n                key: \"_showDropdown\",\r\n                value: function _showDropdown() {\r\n                    this.countryList.classList.remove(\"iti__hide\");\r\n                    this.countryList.setAttribute(\"aria-expanded\", \"true\");\r\n                    this._setDropdownPosition();\r\n                    // update highlighting and scroll to active list item\r\n                    if (this.activeItem) {\r\n                        this._highlightListItem(this.activeItem, false);\r\n                        this._scrollTo(this.activeItem, true);\r\n                    }\r\n                    // bind all the dropdown-related listeners: mouseover, click, click-off, keydown\r\n                    this._bindDropdownListeners();\r\n                    // update the arrow\r\n                    this.dropdownArrow.classList.add(\"iti__arrow--up\");\r\n                    this._trigger(\"open:countrydropdown\");\r\n                }\r\n            }, {\r\n                key: \"_toggleClass\",\r\n                value: function _toggleClass(el, className, shouldHaveClass) {\r\n                    if (shouldHaveClass && !el.classList.contains(className)) el.classList.add(className); else if (!shouldHaveClass && el.classList.contains(className)) el.classList.remove(className);\r\n                }\r\n            }, {\r\n                key: \"_setDropdownPosition\",\r\n                value: function _setDropdownPosition() {\r\n                    var _this8 = this;\r\n                    if (this.options.dropdownContainer) {\r\n                        this.options.dropdownContainer.appendChild(this.dropdown);\r\n                    }\r\n                    if (!this.isMobile) {\r\n                        var pos = this.telInput.getBoundingClientRect();\r\n                        // windowTop from https://stackoverflow.com/a/14384091/217866\r\n                        var windowTop = window.pageYOffset || document.documentElement.scrollTop;\r\n                        var inputTop = pos.top + windowTop;\r\n                        var dropdownHeight = this.countryList.offsetHeight;\r\n                        // dropdownFitsBelow = (dropdownBottom < windowBottom)\r\n                        var dropdownFitsBelow = inputTop + this.telInput.offsetHeight + dropdownHeight < windowTop + window.innerHeight;\r\n                        var dropdownFitsAbove = inputTop - dropdownHeight > windowTop;\r\n                        // by default, the dropdown will be below the input. If we want to position it above the\r\n                        // input, we add the dropup class.\r\n                        this._toggleClass(this.countryList, \"iti__country-list--dropup\", !dropdownFitsBelow && dropdownFitsAbove);\r\n                        // if dropdownContainer is enabled, calculate postion\r\n                        if (this.options.dropdownContainer) {\r\n                            // by default the dropdown will be directly over the input because it's not in the flow.\r\n                            // If we want to position it below, we need to add some extra top value.\r\n                            var extraTop = !dropdownFitsBelow && dropdownFitsAbove ? 0 : this.telInput.offsetHeight;\r\n                            // calculate placement\r\n                            this.dropdown.style.top = \"\".concat(inputTop + extraTop, \"px\");\r\n                            this.dropdown.style.left = \"\".concat(pos.left + document.body.scrollLeft, \"px\");\r\n                            // close menu on window scroll\r\n                            this._handleWindowScroll = function() {\r\n                                return _this8._closeDropdown();\r\n                            };\r\n                            window.addEventListener(\"scroll\", this._handleWindowScroll);\r\n                        }\r\n                    }\r\n                }\r\n            }, {\r\n                key: \"_getClosestListItem\",\r\n                value: function _getClosestListItem(target) {\r\n                    var el = target;\r\n                    while (el && el !== this.countryList && !el.classList.contains(\"iti__country\")) {\r\n                        el = el.parentNode;\r\n                    }\r\n                    // if we reached the countryList element, then return null\r\n                    return el === this.countryList ? null : el;\r\n                }\r\n            }, {\r\n                key: \"_bindDropdownListeners\",\r\n                value: function _bindDropdownListeners() {\r\n                    var _this9 = this;\r\n                    // when mouse over a list item, just highlight that one\r\n                    // we add the class \"highlight\", so if they hit \"enter\" we know which one to select\r\n                    this._handleMouseoverCountryList = function(e) {\r\n                        // handle event delegation, as we're listening for this event on the countryList\r\n                        var listItem = _this9._getClosestListItem(e.target);\r\n                        if (listItem) _this9._highlightListItem(listItem, false);\r\n                    };\r\n                    this.countryList.addEventListener(\"mouseover\", this._handleMouseoverCountryList);\r\n                    // listen for country selection\r\n                    this._handleClickCountryList = function(e) {\r\n                        var listItem = _this9._getClosestListItem(e.target);\r\n                        if (listItem) _this9._selectListItem(listItem);\r\n                    };\r\n                    this.countryList.addEventListener(\"click\", this._handleClickCountryList);\r\n                    // click off to close\r\n                    // (except when this initial opening click is bubbling up)\r\n                    // we cannot just stopPropagation as it may be needed to close another instance\r\n                    var isOpening = true;\r\n                    this._handleClickOffToClose = function() {\r\n                        if (!isOpening) _this9._closeDropdown();\r\n                        isOpening = false;\r\n                    };\r\n                    document.documentElement.addEventListener(\"click\", this._handleClickOffToClose);\r\n                    // listen for up/down scrolling, enter to select, or letters to jump to country name.\r\n                    // use keydown as keypress doesn't fire for non-char keys and we want to catch if they\r\n                    // just hit down and hold it to scroll down (no keyup event).\r\n                    // listen on the document because that's where key events are triggered if no input has focus\r\n                    var query = \"\";\r\n                    var queryTimer = null;\r\n                    this._handleKeydownOnDropdown = function(e) {\r\n                        // prevent down key from scrolling the whole page,\r\n                        // and enter key from submitting a form etc\r\n                        e.preventDefault();\r\n                        // up and down to navigate\r\n                        if (e.key === \"ArrowUp\" || e.key === \"ArrowDown\") _this9._handleUpDownKey(e.key); else if (e.key === \"Enter\") _this9._handleEnterKey(); else if (e.key === \"Escape\") _this9._closeDropdown(); else if (/^[a-zA-ZÀ-ÿ ]$/.test(e.key)) {\r\n                            // jump to countries that start with the query string\r\n                            if (queryTimer) clearTimeout(queryTimer);\r\n                            query += e.key.toLowerCase();\r\n                            _this9._searchForCountry(query);\r\n                            // if the timer hits 1 second, reset the query\r\n                            queryTimer = setTimeout(function() {\r\n                                query = \"\";\r\n                            }, 1e3);\r\n                        }\r\n                    };\r\n                    document.addEventListener(\"keydown\", this._handleKeydownOnDropdown);\r\n                }\r\n            }, {\r\n                key: \"_handleUpDownKey\",\r\n                value: function _handleUpDownKey(key) {\r\n                    var next = key === \"ArrowUp\" ? this.highlightedItem.previousElementSibling : this.highlightedItem.nextElementSibling;\r\n                    if (next) {\r\n                        // skip the divider\r\n                        if (next.classList.contains(\"iti__divider\")) {\r\n                            next = key === \"ArrowUp\" ? next.previousElementSibling : next.nextElementSibling;\r\n                        }\r\n                        this._highlightListItem(next, true);\r\n                    }\r\n                }\r\n            }, {\r\n                key: \"_handleEnterKey\",\r\n                value: function _handleEnterKey() {\r\n                    if (this.highlightedItem) this._selectListItem(this.highlightedItem);\r\n                }\r\n            }, {\r\n                key: \"_searchForCountry\",\r\n                value: function _searchForCountry(query) {\r\n                    for (var i = 0; i < this.countries.length; i++) {\r\n                        if (this._startsWith(this.countries[i].name, query)) {\r\n                            var listItem = this.countryList.querySelector(\"#iti-item-\".concat(this.countries[i].iso2));\r\n                            // update highlighting and scroll\r\n                            this._highlightListItem(listItem, false);\r\n                            this._scrollTo(listItem, true);\r\n                            break;\r\n                        }\r\n                    }\r\n                }\r\n            }, {\r\n                key: \"_startsWith\",\r\n                value: function _startsWith(a, b) {\r\n                    return a.substr(0, b.length).toLowerCase() === b;\r\n                }\r\n            }, {\r\n                key: \"_updateValFromNumber\",\r\n                value: function _updateValFromNumber(originalNumber) {\r\n                    var number = originalNumber;\r\n                    if (this.options.formatOnDisplay && window.intlTelInputUtils && this.selectedCountryData) {\r\n                        var useNational = !this.options.separateDialCode && (this.options.nationalMode || number.charAt(0) !== \"+\");\r\n                        var _intlTelInputUtils$nu = intlTelInputUtils.numberFormat, NATIONAL = _intlTelInputUtils$nu.NATIONAL, INTERNATIONAL = _intlTelInputUtils$nu.INTERNATIONAL;\r\n                        var format = useNational ? NATIONAL : INTERNATIONAL;\r\n                        number = intlTelInputUtils.formatNumber(number, this.selectedCountryData.iso2, format);\r\n                    }\r\n                    number = this._beforeSetNumber(number);\r\n                    this.telInput.value = number;\r\n                }\r\n            }, {\r\n                key: \"_updateFlagFromNumber\",\r\n                value: function _updateFlagFromNumber(originalNumber) {\r\n                    // if we're in nationalMode and we already have US/Canada selected, make sure the number starts\r\n                    // with a +1 so _getDialCode will be able to extract the area code\r\n                    // update: if we dont yet have selectedCountryData, but we're here (trying to update the flag\r\n                    // from the number), that means we're initialising the plugin with a number that already has a\r\n                    // dial code, so fine to ignore this bit\r\n                    var number = originalNumber;\r\n                    var selectedDialCode = this.selectedCountryData.dialCode;\r\n                    var isNanp = selectedDialCode === \"1\";\r\n                    if (number && this.options.nationalMode && isNanp && number.charAt(0) !== \"+\") {\r\n                        if (number.charAt(0) !== \"1\") number = \"1\".concat(number);\r\n                        number = \"+\".concat(number);\r\n                    }\r\n                    // update flag if user types area code for another country\r\n                    if (this.options.separateDialCode && selectedDialCode && number.charAt(0) !== \"+\") {\r\n                        number = \"+\".concat(selectedDialCode).concat(number);\r\n                    }\r\n                    // try and extract valid dial code from input\r\n                    var dialCode = this._getDialCode(number);\r\n                    var numeric = this._getNumeric(number);\r\n                    var countryCode = null;\r\n                    if (dialCode) {\r\n                        var countryCodes = this.countryCodes[this._getNumeric(dialCode)];\r\n                        // check if the right country is already selected. this should be false if the number is\r\n                        // longer than the matched dial code because in this case we need to make sure that if\r\n                        // there are multiple country matches, that the first one is selected (note: we could\r\n                        // just check that here, but it requires the same loop that we already have later)\r\n                        var alreadySelected = countryCodes.indexOf(this.selectedCountryData.iso2) !== -1 && numeric.length <= dialCode.length - 1;\r\n                        var isRegionlessNanpNumber = selectedDialCode === \"1\" && this._isRegionlessNanp(numeric);\r\n                        // only update the flag if:\r\n                        // A) NOT (we currently have a NANP flag selected, and the number is a regionlessNanp)\r\n                        // AND\r\n                        // B) the right country is not already selected\r\n                        if (!isRegionlessNanpNumber && !alreadySelected) {\r\n                            // if using onlyCountries option, countryCodes[0] may be empty, so we must find the first\r\n                            // non-empty index\r\n                            for (var j = 0; j < countryCodes.length; j++) {\r\n                                if (countryCodes[j]) {\r\n                                    countryCode = countryCodes[j];\r\n                                    break;\r\n                                }\r\n                            }\r\n                        }\r\n                    } else if (number.charAt(0) === \"+\" && numeric.length) {\r\n                        // invalid dial code, so empty\r\n                        // Note: use getNumeric here because the number has not been formatted yet, so could contain\r\n                        // bad chars\r\n                        countryCode = \"\";\r\n                    } else if (!number || number === \"+\") {\r\n                        // empty, or just a plus, so default\r\n                        countryCode = this.defaultCountry;\r\n                    }\r\n                    if (countryCode !== null) {\r\n                        return this._setFlag(countryCode);\r\n                    }\r\n                    return false;\r\n                }\r\n            }, {\r\n                key: \"_isRegionlessNanp\",\r\n                value: function _isRegionlessNanp(number) {\r\n                    var numeric = this._getNumeric(number);\r\n                    if (numeric.charAt(0) === \"1\") {\r\n                        var areaCode = numeric.substr(1, 3);\r\n                        return regionlessNanpNumbers.indexOf(areaCode) !== -1;\r\n                    }\r\n                    return false;\r\n                }\r\n            }, {\r\n                key: \"_highlightListItem\",\r\n                value: function _highlightListItem(listItem, shouldFocus) {\r\n                    var prevItem = this.highlightedItem;\r\n                    if (prevItem) prevItem.classList.remove(\"iti__highlight\");\r\n                    this.highlightedItem = listItem;\r\n                    this.highlightedItem.classList.add(\"iti__highlight\");\r\n                    if (shouldFocus) this.highlightedItem.focus();\r\n                }\r\n            }, {\r\n                key: \"_getCountryData\",\r\n                value: function _getCountryData(countryCode, ignoreOnlyCountriesOption, allowFail) {\r\n                    var countryList = ignoreOnlyCountriesOption ? allCountries : this.countries;\r\n                    for (var i = 0; i < countryList.length; i++) {\r\n                        if (countryList[i].iso2 === countryCode) {\r\n                            return countryList[i];\r\n                        }\r\n                    }\r\n                    if (allowFail) {\r\n                        return null;\r\n                    }\r\n                    throw new Error(\"No country data for '\".concat(countryCode, \"'\"));\r\n                }\r\n            }, {\r\n                key: \"_setFlag\",\r\n                value: function _setFlag(countryCode) {\r\n                    var prevCountry = this.selectedCountryData.iso2 ? this.selectedCountryData : {};\r\n                    // do this first as it will throw an error and stop if countryCode is invalid\r\n                    this.selectedCountryData = countryCode ? this._getCountryData(countryCode, false, false) : {};\r\n                    // update the defaultCountry - we only need the iso2 from now on, so just store that\r\n                    if (this.selectedCountryData.iso2) {\r\n                        this.defaultCountry = this.selectedCountryData.iso2;\r\n                    }\r\n                    this.selectedFlagInner.setAttribute(\"class\", \"iti__flag iti__\".concat(countryCode));\r\n                    // update the selected country's title attribute\r\n                    var title = countryCode ? \"\".concat(this.selectedCountryData.name, \": +\").concat(this.selectedCountryData.dialCode) : \"Unknown\";\r\n                    this.selectedFlag.setAttribute(\"title\", title);\r\n                    if (this.options.separateDialCode) {\r\n                        var dialCode = this.selectedCountryData.dialCode ? \"+\".concat(this.selectedCountryData.dialCode) : \"\";\r\n                        this.selectedDialCode.innerHTML = dialCode;\r\n                        // offsetWidth is zero if input is in a hidden container during initialisation\r\n                        var selectedFlagWidth = this.selectedFlag.offsetWidth || this._getHiddenSelectedFlagWidth();\r\n                        // add 6px of padding after the grey selected-dial-code box, as this is what we use in the css\r\n                        this.telInput.style.paddingLeft = \"\".concat(selectedFlagWidth + 6, \"px\");\r\n                    }\r\n                    // and the input's placeholder\r\n                    this._updatePlaceholder();\r\n                    // update the active list item\r\n                    if (this.options.allowDropdown) {\r\n                        var prevItem = this.activeItem;\r\n                        if (prevItem) {\r\n                            prevItem.classList.remove(\"iti__active\");\r\n                            prevItem.setAttribute(\"aria-selected\", \"false\");\r\n                        }\r\n                        if (countryCode) {\r\n                            var nextItem = this.countryList.querySelector(\"#iti-item-\".concat(countryCode));\r\n                            nextItem.setAttribute(\"aria-selected\", \"true\");\r\n                            nextItem.classList.add(\"iti__active\");\r\n                            this.activeItem = nextItem;\r\n                            this.countryList.setAttribute(\"aria-activedescendant\", nextItem.getAttribute(\"id\"));\r\n                        }\r\n                    }\r\n                    // return if the flag has changed or not\r\n                    return prevCountry.iso2 !== countryCode;\r\n                }\r\n            }, {\r\n                key: \"_getHiddenSelectedFlagWidth\",\r\n                value: function _getHiddenSelectedFlagWidth() {\r\n                    // to get the right styling to apply, all we need is a shallow clone of the container,\r\n                    // and then to inject a deep clone of the selectedFlag element\r\n                    var containerClone = this.telInput.parentNode.cloneNode();\r\n                    containerClone.style.visibility = \"hidden\";\r\n                    document.body.appendChild(containerClone);\r\n                    var selectedFlagClone = this.selectedFlag.cloneNode(true);\r\n                    containerClone.appendChild(selectedFlagClone);\r\n                    var width = selectedFlagClone.offsetWidth;\r\n                    containerClone.remove();\r\n                    return width;\r\n                }\r\n            }, {\r\n                key: \"_updatePlaceholder\",\r\n                value: function _updatePlaceholder() {\r\n                    var shouldSetPlaceholder = this.options.autoPlaceholder === \"aggressive\" || !this.hadInitialPlaceholder && this.options.autoPlaceholder === \"polite\";\r\n                    if (window.intlTelInputUtils && shouldSetPlaceholder) {\r\n                        var numberType = intlTelInputUtils.numberType[this.options.placeholderNumberType];\r\n                        var placeholder = this.selectedCountryData.iso2 ? intlTelInputUtils.getExampleNumber(this.selectedCountryData.iso2, this.options.nationalMode, numberType) : \"\";\r\n                        placeholder = this._beforeSetNumber(placeholder);\r\n                        if (typeof this.options.customPlaceholder === \"function\") {\r\n                            placeholder = this.options.customPlaceholder(placeholder, this.selectedCountryData);\r\n                        }\r\n                        this.telInput.setAttribute(\"placeholder\", placeholder);\r\n                    }\r\n                }\r\n            }, {\r\n                key: \"_selectListItem\",\r\n                value: function _selectListItem(listItem) {\r\n                    // update selected flag and active list item\r\n                    var flagChanged = this._setFlag(listItem.getAttribute(\"data-country-code\"));\r\n                    this._closeDropdown();\r\n                    this._updateDialCode(listItem.getAttribute(\"data-dial-code\"), true);\r\n                    // focus the input\r\n                    this.telInput.focus();\r\n                    // put cursor at end - this fix is required for FF and IE11 (with nationalMode=false i.e. auto\r\n                    // inserting dial code), who try to put the cursor at the beginning the first time\r\n                    var len = this.telInput.value.length;\r\n                    this.telInput.setSelectionRange(len, len);\r\n                    if (flagChanged) {\r\n                        this._triggerCountryChange();\r\n                    }\r\n                }\r\n            }, {\r\n                key: \"_closeDropdown\",\r\n                value: function _closeDropdown() {\r\n                    this.countryList.classList.add(\"iti__hide\");\r\n                    this.countryList.setAttribute(\"aria-expanded\", \"false\");\r\n                    // update the arrow\r\n                    this.dropdownArrow.classList.remove(\"iti__arrow--up\");\r\n                    // unbind key events\r\n                    document.removeEventListener(\"keydown\", this._handleKeydownOnDropdown);\r\n                    document.documentElement.removeEventListener(\"click\", this._handleClickOffToClose);\r\n                    this.countryList.removeEventListener(\"mouseover\", this._handleMouseoverCountryList);\r\n                    this.countryList.removeEventListener(\"click\", this._handleClickCountryList);\r\n                    // remove menu from container\r\n                    if (this.options.dropdownContainer) {\r\n                        if (!this.isMobile) window.removeEventListener(\"scroll\", this._handleWindowScroll);\r\n                        if (this.dropdown.parentNode) this.dropdown.parentNode.removeChild(this.dropdown);\r\n                    }\r\n                    this._trigger(\"close:countrydropdown\");\r\n                }\r\n            }, {\r\n                key: \"_scrollTo\",\r\n                value: function _scrollTo(element, middle) {\r\n                    var container = this.countryList;\r\n                    // windowTop from https://stackoverflow.com/a/14384091/217866\r\n                    var windowTop = window.pageYOffset || document.documentElement.scrollTop;\r\n                    var containerHeight = container.offsetHeight;\r\n                    var containerTop = container.getBoundingClientRect().top + windowTop;\r\n                    var containerBottom = containerTop + containerHeight;\r\n                    var elementHeight = element.offsetHeight;\r\n                    var elementTop = element.getBoundingClientRect().top + windowTop;\r\n                    var elementBottom = elementTop + elementHeight;\r\n                    var newScrollTop = elementTop - containerTop + container.scrollTop;\r\n                    var middleOffset = containerHeight / 2 - elementHeight / 2;\r\n                    if (elementTop < containerTop) {\r\n                        // scroll up\r\n                        if (middle) newScrollTop -= middleOffset;\r\n                        container.scrollTop = newScrollTop;\r\n                    } else if (elementBottom > containerBottom) {\r\n                        // scroll down\r\n                        if (middle) newScrollTop += middleOffset;\r\n                        var heightDifference = containerHeight - elementHeight;\r\n                        container.scrollTop = newScrollTop - heightDifference;\r\n                    }\r\n                }\r\n            }, {\r\n                key: \"_updateDialCode\",\r\n                value: function _updateDialCode(newDialCodeBare, hasSelectedListItem) {\r\n                    var inputVal = this.telInput.value;\r\n                    // save having to pass this every time\r\n                    var newDialCode = \"+\".concat(newDialCodeBare);\r\n                    var newNumber;\r\n                    if (inputVal.charAt(0) === \"+\") {\r\n                        // there's a plus so we're dealing with a replacement (doesn't matter if nationalMode or not)\r\n                        var prevDialCode = this._getDialCode(inputVal);\r\n                        if (prevDialCode) {\r\n                            // current number contains a valid dial code, so replace it\r\n                            newNumber = inputVal.replace(prevDialCode, newDialCode);\r\n                        } else {\r\n                            // current number contains an invalid dial code, so ditch it\r\n                            // (no way to determine where the invalid dial code ends and the rest of the number begins)\r\n                            newNumber = newDialCode;\r\n                        }\r\n                    } else if (this.options.nationalMode || this.options.separateDialCode) {\r\n                        // don't do anything\r\n                        return;\r\n                    } else {\r\n                        // nationalMode is disabled\r\n                        if (inputVal) {\r\n                            // there is an existing value with no dial code: prefix the new dial code\r\n                            newNumber = newDialCode + inputVal;\r\n                        } else if (hasSelectedListItem || !this.options.autoHideDialCode) {\r\n                            // no existing value and either they've just selected a list item, or autoHideDialCode is\r\n                            // disabled: insert new dial code\r\n                            newNumber = newDialCode;\r\n                        } else {\r\n                            return;\r\n                        }\r\n                    }\r\n                    this.telInput.value = newNumber;\r\n                }\r\n            }, {\r\n                key: \"_getDialCode\",\r\n                value: function _getDialCode(number) {\r\n                    var dialCode = \"\";\r\n                    // only interested in international numbers (starting with a plus)\r\n                    if (number.charAt(0) === \"+\") {\r\n                        var numericChars = \"\";\r\n                        // iterate over chars\r\n                        for (var i = 0; i < number.length; i++) {\r\n                            var c = number.charAt(i);\r\n                            // if char is number (https://stackoverflow.com/a/8935649/217866)\r\n                            if (!isNaN(parseInt(c, 10))) {\r\n                                numericChars += c;\r\n                                // if current numericChars make a valid dial code\r\n                                if (this.countryCodes[numericChars]) {\r\n                                    // store the actual raw string (useful for matching later)\r\n                                    dialCode = number.substr(0, i + 1);\r\n                                }\r\n                                if (numericChars.length === this.dialCodeMaxLen) {\r\n                                    break;\r\n                                }\r\n                            }\r\n                        }\r\n                    }\r\n                    return dialCode;\r\n                }\r\n            }, {\r\n                key: \"_getFullNumber\",\r\n                value: function _getFullNumber() {\r\n                    var val = this.telInput.value.trim();\r\n                    var dialCode = this.selectedCountryData.dialCode;\r\n                    var prefix;\r\n                    var numericVal = this._getNumeric(val);\r\n                    if (this.options.separateDialCode && val.charAt(0) !== \"+\" && dialCode && numericVal) {\r\n                        // when using separateDialCode, it is visible so is effectively part of the typed number\r\n                        prefix = \"+\".concat(dialCode);\r\n                    } else {\r\n                        prefix = \"\";\r\n                    }\r\n                    return prefix + val;\r\n                }\r\n            }, {\r\n                key: \"_beforeSetNumber\",\r\n                value: function _beforeSetNumber(originalNumber) {\r\n                    var number = originalNumber;\r\n                    if (this.options.separateDialCode) {\r\n                        var dialCode = this._getDialCode(number);\r\n                        // if there is a valid dial code\r\n                        if (dialCode) {\r\n                            // in case _getDialCode returned an area code as well\r\n                            dialCode = \"+\".concat(this.selectedCountryData.dialCode);\r\n                            // a lot of numbers will have a space separating the dial code and the main number, and\r\n                            // some NANP numbers will have a hyphen e.g. +1 684-733-1234 - in both cases we want to get\r\n                            // rid of it\r\n                            // NOTE: don't just trim all non-numerics as may want to preserve an open parenthesis etc\r\n                            var start = number[dialCode.length] === \" \" || number[dialCode.length] === \"-\" ? dialCode.length + 1 : dialCode.length;\r\n                            number = number.substr(start);\r\n                        }\r\n                    }\r\n                    return this._cap(number);\r\n                }\r\n            }, {\r\n                key: \"_triggerCountryChange\",\r\n                value: function _triggerCountryChange() {\r\n                    this._trigger(\"countrychange\");\r\n                }\r\n            }, {\r\n                key: \"handleAutoCountry\",\r\n                value: function handleAutoCountry() {\r\n                    if (this.options.initialCountry === \"auto\") {\r\n                        // we must set this even if there is an initial val in the input: in case the initial val is\r\n                        // invalid and they delete it - they should see their auto country\r\n                        this.defaultCountry = window.intlTelInputGlobals.autoCountry;\r\n                        // if there's no initial value in the input, then update the flag\r\n                        if (!this.telInput.value) {\r\n                            this.setCountry(this.defaultCountry);\r\n                        }\r\n                        this.resolveAutoCountryPromise();\r\n                    }\r\n                }\r\n            }, {\r\n                key: \"handleUtils\",\r\n                value: function handleUtils() {\r\n                    // if the request was successful\r\n                    if (window.intlTelInputUtils) {\r\n                        // if there's an initial value in the input, then format it\r\n                        if (this.telInput.value) {\r\n                            this._updateValFromNumber(this.telInput.value);\r\n                        }\r\n                        this._updatePlaceholder();\r\n                    }\r\n                    this.resolveUtilsScriptPromise();\r\n                }\r\n            }, {\r\n                key: \"destroy\",\r\n                value: function destroy() {\r\n                    var form = this.telInput.form;\r\n                    if (this.options.allowDropdown) {\r\n                        // make sure the dropdown is closed (and unbind listeners)\r\n                        this._closeDropdown();\r\n                        this.selectedFlag.removeEventListener(\"click\", this._handleClickSelectedFlag);\r\n                        this.flagsContainer.removeEventListener(\"keydown\", this._handleFlagsContainerKeydown);\r\n                        // label click hack\r\n                        var label = this._getClosestLabel();\r\n                        if (label) label.removeEventListener(\"click\", this._handleLabelClick);\r\n                    }\r\n                    // unbind hiddenInput listeners\r\n                    if (this.hiddenInput && form) form.removeEventListener(\"submit\", this._handleHiddenInputSubmit);\r\n                    // unbind autoHideDialCode listeners\r\n                    if (this.options.autoHideDialCode) {\r\n                        if (form) form.removeEventListener(\"submit\", this._handleSubmitOrBlurEvent);\r\n                        this.telInput.removeEventListener(\"blur\", this._handleSubmitOrBlurEvent);\r\n                    }\r\n                    // unbind key events, and cut/paste events\r\n                    this.telInput.removeEventListener(\"keyup\", this._handleKeyupEvent);\r\n                    this.telInput.removeEventListener(\"cut\", this._handleClipboardEvent);\r\n                    this.telInput.removeEventListener(\"paste\", this._handleClipboardEvent);\r\n                    // remove attribute of id instance: data-intl-tel-input-id\r\n                    this.telInput.removeAttribute(\"data-intl-tel-input-id\");\r\n                    // remove markup (but leave the original input)\r\n                    var wrapper = this.telInput.parentNode;\r\n                    wrapper.parentNode.insertBefore(this.telInput, wrapper);\r\n                    wrapper.parentNode.removeChild(wrapper);\r\n                    delete window.intlTelInputGlobals.instances[this.id];\r\n                }\r\n            }, {\r\n                key: \"getExtension\",\r\n                value: function getExtension() {\r\n                    if (window.intlTelInputUtils) {\r\n                        return intlTelInputUtils.getExtension(this._getFullNumber(), this.selectedCountryData.iso2);\r\n                    }\r\n                    return \"\";\r\n                }\r\n            }, {\r\n                key: \"getNumber\",\r\n                value: function getNumber(format) {\r\n                    if (window.intlTelInputUtils) {\r\n                        var iso2 = this.selectedCountryData.iso2;\r\n                        return intlTelInputUtils.formatNumber(this._getFullNumber(), iso2, format);\r\n                    }\r\n                    return \"\";\r\n                }\r\n            }, {\r\n                key: \"getNumberType\",\r\n                value: function getNumberType() {\r\n                    if (window.intlTelInputUtils) {\r\n                        return intlTelInputUtils.getNumberType(this._getFullNumber(), this.selectedCountryData.iso2);\r\n                    }\r\n                    return -99;\r\n                }\r\n            }, {\r\n                key: \"getSelectedCountryData\",\r\n                value: function getSelectedCountryData() {\r\n                    return this.selectedCountryData;\r\n                }\r\n            }, {\r\n                key: \"getValidationError\",\r\n                value: function getValidationError() {\r\n                    if (window.intlTelInputUtils) {\r\n                        var iso2 = this.selectedCountryData.iso2;\r\n                        return intlTelInputUtils.getValidationError(this._getFullNumber(), iso2);\r\n                    }\r\n                    return -99;\r\n                }\r\n            }, {\r\n                key: \"isValidNumber\",\r\n                value: function isValidNumber() {\r\n                    var val = this._getFullNumber().trim();\r\n                    var countryCode = this.options.nationalMode ? this.selectedCountryData.iso2 : \"\";\r\n                    return window.intlTelInputUtils ? intlTelInputUtils.isValidNumber(val, countryCode) : null;\r\n                }\r\n            }, {\r\n                key: \"setCountry\",\r\n                value: function setCountry(originalCountryCode) {\r\n                    var countryCode = originalCountryCode.toLowerCase();\r\n                    // check if already selected\r\n                    if (!this.selectedFlagInner.classList.contains(\"iti__\".concat(countryCode))) {\r\n                        this._setFlag(countryCode);\r\n                        this._updateDialCode(this.selectedCountryData.dialCode, false);\r\n                        this._triggerCountryChange();\r\n                    }\r\n                }\r\n            }, {\r\n                key: \"setNumber\",\r\n                value: function setNumber(number) {\r\n                    // we must update the flag first, which updates this.selectedCountryData, which is used for\r\n                    // formatting the number before displaying it\r\n                    var flagChanged = this._updateFlagFromNumber(number);\r\n                    this._updateValFromNumber(number);\r\n                    if (flagChanged) {\r\n                        this._triggerCountryChange();\r\n                    }\r\n                }\r\n            }, {\r\n                key: \"setPlaceholderNumberType\",\r\n                value: function setPlaceholderNumberType(type) {\r\n                    this.options.placeholderNumberType = type;\r\n                    this._updatePlaceholder();\r\n                }\r\n            } ]);\r\n            return Iti;\r\n        }();\r\n        /********************\r\n *  STATIC METHODS\r\n ********************/\r\n        // get the country data object\r\n        window.intlTelInputGlobals.getCountryData = function() {\r\n            return allCountries;\r\n        };\r\n        // inject a <script> element to load utils.js\r\n        var injectScript = function injectScript(path, handleSuccess, handleFailure) {\r\n            // inject a new script element into the page\r\n            var script = document.createElement(\"script\");\r\n            script.onload = function() {\r\n                forEachInstance(\"handleUtils\");\r\n                if (handleSuccess) handleSuccess();\r\n            };\r\n            script.onerror = function() {\r\n                forEachInstance(\"rejectUtilsScriptPromise\");\r\n                if (handleFailure) handleFailure();\r\n            };\r\n            script.className = \"iti-load-utils\";\r\n            script.async = true;\r\n            script.src = path;\r\n            document.body.appendChild(script);\r\n        };\r\n        // load the utils script\r\n        window.intlTelInputGlobals.loadUtils = function(path) {\r\n            // 2 options:\r\n            // 1) not already started loading (start)\r\n            // 2) already started loading (do nothing - just wait for the onload callback to fire, which will\r\n            // trigger handleUtils on all instances, invoking their resolveUtilsScriptPromise functions)\r\n            if (!window.intlTelInputUtils && !window.intlTelInputGlobals.startedLoadingUtilsScript) {\r\n                // only do this once\r\n                window.intlTelInputGlobals.startedLoadingUtilsScript = true;\r\n                // if we have promises, then return a promise\r\n                if (typeof Promise !== \"undefined\") {\r\n                    return new Promise(function(resolve, reject) {\r\n                        return injectScript(path, resolve, reject);\r\n                    });\r\n                }\r\n                injectScript(path);\r\n            }\r\n            return null;\r\n        };\r\n        // default options\r\n        window.intlTelInputGlobals.defaults = defaults;\r\n        // version\r\n        window.intlTelInputGlobals.version = \"16.0.0\";\r\n        // convenience wrapper\r\n        return function(input, options) {\r\n            var iti = new Iti(input, options);\r\n            iti._init();\r\n            input.setAttribute(\"data-intl-tel-input-id\", iti.id);\r\n            window.intlTelInputGlobals.instances[iti.id] = iti;\r\n            return iti;\r\n        };\r\n    }();\r\n});","// Ion.RangeSlider\r\n// version 2.3.1 Build: 382\r\n// © Denis Ineshin, 2019\r\n// https://github.com/IonDen\r\n//\r\n// Project page:    http://ionden.com/a/plugins/ion.rangeSlider/en.html\r\n// GitHub page:     https://github.com/IonDen/ion.rangeSlider\r\n//\r\n// Released under MIT licence:\r\n// http://ionden.com/a/plugins/licence-en.html\r\n// =====================================================================================================================\r\n\r\n;(function(factory) {\r\n    if ((typeof jQuery === 'undefined' || !jQuery) && typeof define === \"function\" && define.amd) {\r\n        define([\"jquery\"], function (jQuery) {\r\n            return factory(jQuery, document, window, navigator);\r\n        });\r\n    } else if ((typeof jQuery === 'undefined' || !jQuery) && typeof exports === \"object\") {\r\n        factory(require(\"jquery\"), document, window, navigator);\r\n    } else {\r\n        factory(jQuery, document, window, navigator);\r\n    }\r\n} (function ($, document, window, navigator, undefined) {\r\n    \"use strict\";\r\n\r\n    // =================================================================================================================\r\n    // Service\r\n\r\n    var plugin_count = 0;\r\n\r\n    // IE8 fix\r\n    var is_old_ie = (function () {\r\n        var n = navigator.userAgent,\r\n            r = /msie\\s\\d+/i,\r\n            v;\r\n        if (n.search(r) > 0) {\r\n            v = r.exec(n).toString();\r\n            v = v.split(\" \")[1];\r\n            if (v < 9) {\r\n                $(\"html\").addClass(\"lt-ie9\");\r\n                return true;\r\n            }\r\n        }\r\n        return false;\r\n    } ());\r\n    if (!Function.prototype.bind) {\r\n        Function.prototype.bind = function bind(that) {\r\n\r\n            var target = this;\r\n            var slice = [].slice;\r\n\r\n            if (typeof target != \"function\") {\r\n                throw new TypeError();\r\n            }\r\n\r\n            var args = slice.call(arguments, 1),\r\n                bound = function () {\r\n\r\n                    if (this instanceof bound) {\r\n\r\n                        var F = function(){};\r\n                        F.prototype = target.prototype;\r\n                        var self = new F();\r\n\r\n                        var result = target.apply(\r\n                            self,\r\n                            args.concat(slice.call(arguments))\r\n                        );\r\n                        if (Object(result) === result) {\r\n                            return result;\r\n                        }\r\n                        return self;\r\n\r\n                    } else {\r\n\r\n                        return target.apply(\r\n                            that,\r\n                            args.concat(slice.call(arguments))\r\n                        );\r\n\r\n                    }\r\n\r\n                };\r\n\r\n            return bound;\r\n        };\r\n    }\r\n    if (!Array.prototype.indexOf) {\r\n        Array.prototype.indexOf = function(searchElement, fromIndex) {\r\n            var k;\r\n            if (this == null) {\r\n                throw new TypeError('\"this\" is null or not defined');\r\n            }\r\n            var O = Object(this);\r\n            var len = O.length >>> 0;\r\n            if (len === 0) {\r\n                return -1;\r\n            }\r\n            var n = +fromIndex || 0;\r\n            if (Math.abs(n) === Infinity) {\r\n                n = 0;\r\n            }\r\n            if (n >= len) {\r\n                return -1;\r\n            }\r\n            k = Math.max(n >= 0 ? n : len - Math.abs(n), 0);\r\n            while (k < len) {\r\n                if (k in O && O[k] === searchElement) {\r\n                    return k;\r\n                }\r\n                k++;\r\n            }\r\n            return -1;\r\n        };\r\n    }\r\n\r\n\r\n\r\n    // =================================================================================================================\r\n    // Template\r\n\r\n    var base_html =\r\n        '<span class=\"irs\">' +\r\n        '<span class=\"irs-line\" tabindex=\"0\"></span>' +\r\n        '<span class=\"irs-min\">0</span><span class=\"irs-max\">1</span>' +\r\n        '<span class=\"irs-from\">0</span><span class=\"irs-to\">0</span><span class=\"irs-single\">0</span>' +\r\n        '</span>' +\r\n        '<span class=\"irs-grid\"></span>';\r\n\r\n    var single_html =\r\n        '<span class=\"irs-bar irs-bar--single\"></span>' +\r\n        '<span class=\"irs-shadow shadow-single\"></span>' +\r\n        '<span class=\"irs-handle single\"><i></i><i></i><i></i></span>';\r\n\r\n    var double_html =\r\n        '<span class=\"irs-bar\"></span>' +\r\n        '<span class=\"irs-shadow shadow-from\"></span>' +\r\n        '<span class=\"irs-shadow shadow-to\"></span>' +\r\n        '<span class=\"irs-handle from\"><i></i><i></i><i></i></span>' +\r\n        '<span class=\"irs-handle to\"><i></i><i></i><i></i></span>';\r\n\r\n    var disable_html =\r\n        '<span class=\"irs-disable-mask\"></span>';\r\n\r\n\r\n\r\n    // =================================================================================================================\r\n    // Core\r\n\r\n    /**\r\n     * Main plugin constructor\r\n     *\r\n     * @param input {Object} link to base input element\r\n     * @param options {Object} slider config\r\n     * @param plugin_count {Number}\r\n     * @constructor\r\n     */\r\n    var IonRangeSlider = function (input, options, plugin_count) {\r\n        this.VERSION = \"2.3.1\";\r\n        this.input = input;\r\n        this.plugin_count = plugin_count;\r\n        this.current_plugin = 0;\r\n        this.calc_count = 0;\r\n        this.update_tm = 0;\r\n        this.old_from = 0;\r\n        this.old_to = 0;\r\n        this.old_min_interval = null;\r\n        this.raf_id = null;\r\n        this.dragging = false;\r\n        this.force_redraw = false;\r\n        this.no_diapason = false;\r\n        this.has_tab_index = true;\r\n        this.is_key = false;\r\n        this.is_update = false;\r\n        this.is_start = true;\r\n        this.is_finish = false;\r\n        this.is_active = false;\r\n        this.is_resize = false;\r\n        this.is_click = false;\r\n\r\n        options = options || {};\r\n\r\n        // cache for links to all DOM elements\r\n        this.$cache = {\r\n            win: $(window),\r\n            body: $(document.body),\r\n            input: $(input),\r\n            cont: null,\r\n            rs: null,\r\n            min: null,\r\n            max: null,\r\n            from: null,\r\n            to: null,\r\n            single: null,\r\n            bar: null,\r\n            line: null,\r\n            s_single: null,\r\n            s_from: null,\r\n            s_to: null,\r\n            shad_single: null,\r\n            shad_from: null,\r\n            shad_to: null,\r\n            edge: null,\r\n            grid: null,\r\n            grid_labels: []\r\n        };\r\n\r\n        // storage for measure variables\r\n        this.coords = {\r\n            // left\r\n            x_gap: 0,\r\n            x_pointer: 0,\r\n\r\n            // width\r\n            w_rs: 0,\r\n            w_rs_old: 0,\r\n            w_handle: 0,\r\n\r\n            // percents\r\n            p_gap: 0,\r\n            p_gap_left: 0,\r\n            p_gap_right: 0,\r\n            p_step: 0,\r\n            p_pointer: 0,\r\n            p_handle: 0,\r\n            p_single_fake: 0,\r\n            p_single_real: 0,\r\n            p_from_fake: 0,\r\n            p_from_real: 0,\r\n            p_to_fake: 0,\r\n            p_to_real: 0,\r\n            p_bar_x: 0,\r\n            p_bar_w: 0,\r\n\r\n            // grid\r\n            grid_gap: 0,\r\n            big_num: 0,\r\n            big: [],\r\n            big_w: [],\r\n            big_p: [],\r\n            big_x: []\r\n        };\r\n\r\n        // storage for labels measure variables\r\n        this.labels = {\r\n            // width\r\n            w_min: 0,\r\n            w_max: 0,\r\n            w_from: 0,\r\n            w_to: 0,\r\n            w_single: 0,\r\n\r\n            // percents\r\n            p_min: 0,\r\n            p_max: 0,\r\n            p_from_fake: 0,\r\n            p_from_left: 0,\r\n            p_to_fake: 0,\r\n            p_to_left: 0,\r\n            p_single_fake: 0,\r\n            p_single_left: 0\r\n        };\r\n\r\n\r\n\r\n        /**\r\n         * get and validate config\r\n         */\r\n        var $inp = this.$cache.input,\r\n            val = $inp.prop(\"value\"),\r\n            config, config_from_data, prop;\r\n\r\n        // default config\r\n        config = {\r\n            skin: \"flat\",\r\n            type: \"single\",\r\n\r\n            min: 10,\r\n            max: 100,\r\n            from: null,\r\n            to: null,\r\n            step: 1,\r\n\r\n            min_interval: 0,\r\n            max_interval: 0,\r\n            drag_interval: false,\r\n\r\n            values: [],\r\n            p_values: [],\r\n\r\n            from_fixed: false,\r\n            from_min: null,\r\n            from_max: null,\r\n            from_shadow: false,\r\n\r\n            to_fixed: false,\r\n            to_min: null,\r\n            to_max: null,\r\n            to_shadow: false,\r\n\r\n            prettify_enabled: true,\r\n            prettify_separator: \" \",\r\n            prettify: null,\r\n\r\n            force_edges: false,\r\n\r\n            keyboard: true,\r\n\r\n            grid: false,\r\n            grid_margin: true,\r\n            grid_num: 4,\r\n            grid_snap: false,\r\n\r\n            hide_min_max: false,\r\n            hide_from_to: false,\r\n\r\n            prefix: \"\",\r\n            postfix: \"\",\r\n            max_postfix: \"\",\r\n            decorate_both: true,\r\n            values_separator: \" — \",\r\n\r\n            input_values_separator: \";\",\r\n\r\n            disable: false,\r\n            block: false,\r\n\r\n            extra_classes: \"\",\r\n\r\n            scope: null,\r\n            onStart: null,\r\n            onChange: null,\r\n            onFinish: null,\r\n            onUpdate: null\r\n        };\r\n\r\n\r\n        // check if base element is input\r\n        if ($inp[0].nodeName !== \"INPUT\") {\r\n            console && console.warn && console.warn(\"Base element should be <input>!\", $inp[0]);\r\n        }\r\n\r\n\r\n        // config from data-attributes extends js config\r\n        config_from_data = {\r\n            skin: $inp.data(\"skin\"),\r\n            type: $inp.data(\"type\"),\r\n\r\n            min: $inp.data(\"min\"),\r\n            max: $inp.data(\"max\"),\r\n            from: $inp.data(\"from\"),\r\n            to: $inp.data(\"to\"),\r\n            step: $inp.data(\"step\"),\r\n\r\n            min_interval: $inp.data(\"minInterval\"),\r\n            max_interval: $inp.data(\"maxInterval\"),\r\n            drag_interval: $inp.data(\"dragInterval\"),\r\n\r\n            values: $inp.data(\"values\"),\r\n\r\n            from_fixed: $inp.data(\"fromFixed\"),\r\n            from_min: $inp.data(\"fromMin\"),\r\n            from_max: $inp.data(\"fromMax\"),\r\n            from_shadow: $inp.data(\"fromShadow\"),\r\n\r\n            to_fixed: $inp.data(\"toFixed\"),\r\n            to_min: $inp.data(\"toMin\"),\r\n            to_max: $inp.data(\"toMax\"),\r\n            to_shadow: $inp.data(\"toShadow\"),\r\n\r\n            prettify_enabled: $inp.data(\"prettifyEnabled\"),\r\n            prettify_separator: $inp.data(\"prettifySeparator\"),\r\n\r\n            force_edges: $inp.data(\"forceEdges\"),\r\n\r\n            keyboard: $inp.data(\"keyboard\"),\r\n\r\n            grid: $inp.data(\"grid\"),\r\n            grid_margin: $inp.data(\"gridMargin\"),\r\n            grid_num: $inp.data(\"gridNum\"),\r\n            grid_snap: $inp.data(\"gridSnap\"),\r\n\r\n            hide_min_max: $inp.data(\"hideMinMax\"),\r\n            hide_from_to: $inp.data(\"hideFromTo\"),\r\n\r\n            prefix: $inp.data(\"prefix\"),\r\n            postfix: $inp.data(\"postfix\"),\r\n            max_postfix: $inp.data(\"maxPostfix\"),\r\n            decorate_both: $inp.data(\"decorateBoth\"),\r\n            values_separator: $inp.data(\"valuesSeparator\"),\r\n\r\n            input_values_separator: $inp.data(\"inputValuesSeparator\"),\r\n\r\n            disable: $inp.data(\"disable\"),\r\n            block: $inp.data(\"block\"),\r\n\r\n            extra_classes: $inp.data(\"extraClasses\"),\r\n        };\r\n        config_from_data.values = config_from_data.values && config_from_data.values.split(\",\");\r\n\r\n        for (prop in config_from_data) {\r\n            if (config_from_data.hasOwnProperty(prop)) {\r\n                if (config_from_data[prop] === undefined || config_from_data[prop] === \"\") {\r\n                    delete config_from_data[prop];\r\n                }\r\n            }\r\n        }\r\n\r\n\r\n        // input value extends default config\r\n        if (val !== undefined && val !== \"\") {\r\n            val = val.split(config_from_data.input_values_separator || options.input_values_separator || \";\");\r\n\r\n            if (val[0] && val[0] == +val[0]) {\r\n                val[0] = +val[0];\r\n            }\r\n            if (val[1] && val[1] == +val[1]) {\r\n                val[1] = +val[1];\r\n            }\r\n\r\n            if (options && options.values && options.values.length) {\r\n                config.from = val[0] && options.values.indexOf(val[0]);\r\n                config.to = val[1] && options.values.indexOf(val[1]);\r\n            } else {\r\n                config.from = val[0] && +val[0];\r\n                config.to = val[1] && +val[1];\r\n            }\r\n        }\r\n\r\n\r\n\r\n        // js config extends default config\r\n        $.extend(config, options);\r\n\r\n\r\n        // data config extends config\r\n        $.extend(config, config_from_data);\r\n        this.options = config;\r\n\r\n\r\n\r\n        // validate config, to be sure that all data types are correct\r\n        this.update_check = {};\r\n        this.validate();\r\n\r\n\r\n\r\n        // default result object, returned to callbacks\r\n        this.result = {\r\n            input: this.$cache.input,\r\n            slider: null,\r\n\r\n            min: this.options.min,\r\n            max: this.options.max,\r\n\r\n            from: this.options.from,\r\n            from_percent: 0,\r\n            from_value: null,\r\n\r\n            to: this.options.to,\r\n            to_percent: 0,\r\n            to_value: null\r\n        };\r\n\r\n\r\n\r\n        this.init();\r\n    };\r\n\r\n    IonRangeSlider.prototype = {\r\n\r\n        /**\r\n         * Starts or updates the plugin instance\r\n         *\r\n         * @param [is_update] {boolean}\r\n         */\r\n        init: function (is_update) {\r\n            this.no_diapason = false;\r\n            this.coords.p_step = this.convertToPercent(this.options.step, true);\r\n\r\n            this.target = \"base\";\r\n\r\n            this.toggleInput();\r\n            this.append();\r\n            this.setMinMax();\r\n\r\n            if (is_update) {\r\n                this.force_redraw = true;\r\n                this.calc(true);\r\n\r\n                // callbacks called\r\n                this.callOnUpdate();\r\n            } else {\r\n                this.force_redraw = true;\r\n                this.calc(true);\r\n\r\n                // callbacks called\r\n                this.callOnStart();\r\n            }\r\n\r\n            this.updateScene();\r\n        },\r\n\r\n        /**\r\n         * Appends slider template to a DOM\r\n         */\r\n        append: function () {\r\n            var container_html = '<span class=\"irs irs--' + this.options.skin + ' js-irs-' + this.plugin_count + ' ' + this.options.extra_classes + '\"></span>';\r\n            this.$cache.input.before(container_html);\r\n            this.$cache.input.prop(\"readonly\", true);\r\n            this.$cache.cont = this.$cache.input.prev();\r\n            this.result.slider = this.$cache.cont;\r\n\r\n            this.$cache.cont.html(base_html);\r\n            this.$cache.rs = this.$cache.cont.find(\".irs\");\r\n            this.$cache.min = this.$cache.cont.find(\".irs-min\");\r\n            this.$cache.max = this.$cache.cont.find(\".irs-max\");\r\n            this.$cache.from = this.$cache.cont.find(\".irs-from\");\r\n            this.$cache.to = this.$cache.cont.find(\".irs-to\");\r\n            this.$cache.single = this.$cache.cont.find(\".irs-single\");\r\n            this.$cache.line = this.$cache.cont.find(\".irs-line\");\r\n            this.$cache.grid = this.$cache.cont.find(\".irs-grid\");\r\n\r\n            if (this.options.type === \"single\") {\r\n                this.$cache.cont.append(single_html);\r\n                this.$cache.bar = this.$cache.cont.find(\".irs-bar\");\r\n                this.$cache.edge = this.$cache.cont.find(\".irs-bar-edge\");\r\n                this.$cache.s_single = this.$cache.cont.find(\".single\");\r\n                this.$cache.from[0].style.visibility = \"hidden\";\r\n                this.$cache.to[0].style.visibility = \"hidden\";\r\n                this.$cache.shad_single = this.$cache.cont.find(\".shadow-single\");\r\n            } else {\r\n                this.$cache.cont.append(double_html);\r\n                this.$cache.bar = this.$cache.cont.find(\".irs-bar\");\r\n                this.$cache.s_from = this.$cache.cont.find(\".from\");\r\n                this.$cache.s_to = this.$cache.cont.find(\".to\");\r\n                this.$cache.shad_from = this.$cache.cont.find(\".shadow-from\");\r\n                this.$cache.shad_to = this.$cache.cont.find(\".shadow-to\");\r\n\r\n                this.setTopHandler();\r\n            }\r\n\r\n            if (this.options.hide_from_to) {\r\n                this.$cache.from[0].style.display = \"none\";\r\n                this.$cache.to[0].style.display = \"none\";\r\n                this.$cache.single[0].style.display = \"none\";\r\n            }\r\n\r\n            this.appendGrid();\r\n\r\n            if (this.options.disable) {\r\n                this.appendDisableMask();\r\n                this.$cache.input[0].disabled = true;\r\n            } else {\r\n                this.$cache.input[0].disabled = false;\r\n                this.removeDisableMask();\r\n                this.bindEvents();\r\n            }\r\n\r\n            // block only if not disabled\r\n            if (!this.options.disable) {\r\n                if (this.options.block) {\r\n                    this.appendDisableMask();\r\n                } else {\r\n                    this.removeDisableMask();\r\n                }\r\n            }\r\n\r\n            if (this.options.drag_interval) {\r\n                this.$cache.bar[0].style.cursor = \"ew-resize\";\r\n            }\r\n        },\r\n\r\n        /**\r\n         * Determine which handler has a priority\r\n         * works only for double slider type\r\n         */\r\n        setTopHandler: function () {\r\n            var min = this.options.min,\r\n                max = this.options.max,\r\n                from = this.options.from,\r\n                to = this.options.to;\r\n\r\n            if (from > min && to === max) {\r\n                this.$cache.s_from.addClass(\"type_last\");\r\n            } else if (to < max) {\r\n                this.$cache.s_to.addClass(\"type_last\");\r\n            }\r\n        },\r\n\r\n        /**\r\n         * Determine which handles was clicked last\r\n         * and which handler should have hover effect\r\n         *\r\n         * @param target {String}\r\n         */\r\n        changeLevel: function (target) {\r\n            switch (target) {\r\n                case \"single\":\r\n                    this.coords.p_gap = this.toFixed(this.coords.p_pointer - this.coords.p_single_fake);\r\n                    this.$cache.s_single.addClass(\"state_hover\");\r\n                    break;\r\n                case \"from\":\r\n                    this.coords.p_gap = this.toFixed(this.coords.p_pointer - this.coords.p_from_fake);\r\n                    this.$cache.s_from.addClass(\"state_hover\");\r\n                    this.$cache.s_from.addClass(\"type_last\");\r\n                    this.$cache.s_to.removeClass(\"type_last\");\r\n                    break;\r\n                case \"to\":\r\n                    this.coords.p_gap = this.toFixed(this.coords.p_pointer - this.coords.p_to_fake);\r\n                    this.$cache.s_to.addClass(\"state_hover\");\r\n                    this.$cache.s_to.addClass(\"type_last\");\r\n                    this.$cache.s_from.removeClass(\"type_last\");\r\n                    break;\r\n                case \"both\":\r\n                    this.coords.p_gap_left = this.toFixed(this.coords.p_pointer - this.coords.p_from_fake);\r\n                    this.coords.p_gap_right = this.toFixed(this.coords.p_to_fake - this.coords.p_pointer);\r\n                    this.$cache.s_to.removeClass(\"type_last\");\r\n                    this.$cache.s_from.removeClass(\"type_last\");\r\n                    break;\r\n            }\r\n        },\r\n\r\n        /**\r\n         * Then slider is disabled\r\n         * appends extra layer with opacity\r\n         */\r\n        appendDisableMask: function () {\r\n            this.$cache.cont.append(disable_html);\r\n            this.$cache.cont.addClass(\"irs-disabled\");\r\n        },\r\n\r\n        /**\r\n         * Then slider is not disabled\r\n         * remove disable mask\r\n         */\r\n        removeDisableMask: function () {\r\n            this.$cache.cont.remove(\".irs-disable-mask\");\r\n            this.$cache.cont.removeClass(\"irs-disabled\");\r\n        },\r\n\r\n        /**\r\n         * Remove slider instance\r\n         * and unbind all events\r\n         */\r\n        remove: function () {\r\n            this.$cache.cont.remove();\r\n            this.$cache.cont = null;\r\n\r\n            this.$cache.line.off(\"keydown.irs_\" + this.plugin_count);\r\n\r\n            this.$cache.body.off(\"touchmove.irs_\" + this.plugin_count);\r\n            this.$cache.body.off(\"mousemove.irs_\" + this.plugin_count);\r\n\r\n            this.$cache.win.off(\"touchend.irs_\" + this.plugin_count);\r\n            this.$cache.win.off(\"mouseup.irs_\" + this.plugin_count);\r\n\r\n            if (is_old_ie) {\r\n                this.$cache.body.off(\"mouseup.irs_\" + this.plugin_count);\r\n                this.$cache.body.off(\"mouseleave.irs_\" + this.plugin_count);\r\n            }\r\n\r\n            this.$cache.grid_labels = [];\r\n            this.coords.big = [];\r\n            this.coords.big_w = [];\r\n            this.coords.big_p = [];\r\n            this.coords.big_x = [];\r\n\r\n            cancelAnimationFrame(this.raf_id);\r\n        },\r\n\r\n        /**\r\n         * bind all slider events\r\n         */\r\n        bindEvents: function () {\r\n            if (this.no_diapason) {\r\n                return;\r\n            }\r\n\r\n            this.$cache.body.on(\"touchmove.irs_\" + this.plugin_count, this.pointerMove.bind(this));\r\n            this.$cache.body.on(\"mousemove.irs_\" + this.plugin_count, this.pointerMove.bind(this));\r\n\r\n            this.$cache.win.on(\"touchend.irs_\" + this.plugin_count, this.pointerUp.bind(this));\r\n            this.$cache.win.on(\"mouseup.irs_\" + this.plugin_count, this.pointerUp.bind(this));\r\n\r\n            this.$cache.line.on(\"touchstart.irs_\" + this.plugin_count, this.pointerClick.bind(this, \"click\"));\r\n            this.$cache.line.on(\"mousedown.irs_\" + this.plugin_count, this.pointerClick.bind(this, \"click\"));\r\n\r\n            this.$cache.line.on(\"focus.irs_\" + this.plugin_count, this.pointerFocus.bind(this));\r\n\r\n            if (this.options.drag_interval && this.options.type === \"double\") {\r\n                this.$cache.bar.on(\"touchstart.irs_\" + this.plugin_count, this.pointerDown.bind(this, \"both\"));\r\n                this.$cache.bar.on(\"mousedown.irs_\" + this.plugin_count, this.pointerDown.bind(this, \"both\"));\r\n            } else {\r\n                this.$cache.bar.on(\"touchstart.irs_\" + this.plugin_count, this.pointerClick.bind(this, \"click\"));\r\n                this.$cache.bar.on(\"mousedown.irs_\" + this.plugin_count, this.pointerClick.bind(this, \"click\"));\r\n            }\r\n\r\n            if (this.options.type === \"single\") {\r\n                this.$cache.single.on(\"touchstart.irs_\" + this.plugin_count, this.pointerDown.bind(this, \"single\"));\r\n                this.$cache.s_single.on(\"touchstart.irs_\" + this.plugin_count, this.pointerDown.bind(this, \"single\"));\r\n                this.$cache.shad_single.on(\"touchstart.irs_\" + this.plugin_count, this.pointerClick.bind(this, \"click\"));\r\n\r\n                this.$cache.single.on(\"mousedown.irs_\" + this.plugin_count, this.pointerDown.bind(this, \"single\"));\r\n                this.$cache.s_single.on(\"mousedown.irs_\" + this.plugin_count, this.pointerDown.bind(this, \"single\"));\r\n                this.$cache.edge.on(\"mousedown.irs_\" + this.plugin_count, this.pointerClick.bind(this, \"click\"));\r\n                this.$cache.shad_single.on(\"mousedown.irs_\" + this.plugin_count, this.pointerClick.bind(this, \"click\"));\r\n            } else {\r\n                this.$cache.single.on(\"touchstart.irs_\" + this.plugin_count, this.pointerDown.bind(this, null));\r\n                this.$cache.single.on(\"mousedown.irs_\" + this.plugin_count, this.pointerDown.bind(this, null));\r\n\r\n                this.$cache.from.on(\"touchstart.irs_\" + this.plugin_count, this.pointerDown.bind(this, \"from\"));\r\n                this.$cache.s_from.on(\"touchstart.irs_\" + this.plugin_count, this.pointerDown.bind(this, \"from\"));\r\n                this.$cache.to.on(\"touchstart.irs_\" + this.plugin_count, this.pointerDown.bind(this, \"to\"));\r\n                this.$cache.s_to.on(\"touchstart.irs_\" + this.plugin_count, this.pointerDown.bind(this, \"to\"));\r\n                this.$cache.shad_from.on(\"touchstart.irs_\" + this.plugin_count, this.pointerClick.bind(this, \"click\"));\r\n                this.$cache.shad_to.on(\"touchstart.irs_\" + this.plugin_count, this.pointerClick.bind(this, \"click\"));\r\n\r\n                this.$cache.from.on(\"mousedown.irs_\" + this.plugin_count, this.pointerDown.bind(this, \"from\"));\r\n                this.$cache.s_from.on(\"mousedown.irs_\" + this.plugin_count, this.pointerDown.bind(this, \"from\"));\r\n                this.$cache.to.on(\"mousedown.irs_\" + this.plugin_count, this.pointerDown.bind(this, \"to\"));\r\n                this.$cache.s_to.on(\"mousedown.irs_\" + this.plugin_count, this.pointerDown.bind(this, \"to\"));\r\n                this.$cache.shad_from.on(\"mousedown.irs_\" + this.plugin_count, this.pointerClick.bind(this, \"click\"));\r\n                this.$cache.shad_to.on(\"mousedown.irs_\" + this.plugin_count, this.pointerClick.bind(this, \"click\"));\r\n            }\r\n\r\n            if (this.options.keyboard) {\r\n                this.$cache.line.on(\"keydown.irs_\" + this.plugin_count, this.key.bind(this, \"keyboard\"));\r\n            }\r\n\r\n            if (is_old_ie) {\r\n                this.$cache.body.on(\"mouseup.irs_\" + this.plugin_count, this.pointerUp.bind(this));\r\n                this.$cache.body.on(\"mouseleave.irs_\" + this.plugin_count, this.pointerUp.bind(this));\r\n            }\r\n        },\r\n\r\n        /**\r\n         * Focus with tabIndex\r\n         *\r\n         * @param e {Object} event object\r\n         */\r\n        pointerFocus: function (e) {\r\n            if (!this.target) {\r\n                var x;\r\n                var $handle;\r\n\r\n                if (this.options.type === \"single\") {\r\n                    $handle = this.$cache.single;\r\n                } else {\r\n                    $handle = this.$cache.from;\r\n                }\r\n\r\n                x = $handle.offset().left;\r\n                x += ($handle.width() / 2) - 1;\r\n\r\n                this.pointerClick(\"single\", {preventDefault: function () {}, pageX: x});\r\n            }\r\n        },\r\n\r\n        /**\r\n         * Mousemove or touchmove\r\n         * only for handlers\r\n         *\r\n         * @param e {Object} event object\r\n         */\r\n        pointerMove: function (e) {\r\n            if (!this.dragging) {\r\n                return;\r\n            }\r\n\r\n            var x = e.pageX || e.originalEvent.touches && e.originalEvent.touches[0].pageX;\r\n            this.coords.x_pointer = x - this.coords.x_gap;\r\n\r\n            this.calc();\r\n        },\r\n\r\n        /**\r\n         * Mouseup or touchend\r\n         * only for handlers\r\n         *\r\n         * @param e {Object} event object\r\n         */\r\n        pointerUp: function (e) {\r\n            if (this.current_plugin !== this.plugin_count) {\r\n                return;\r\n            }\r\n\r\n            if (this.is_active) {\r\n                this.is_active = false;\r\n            } else {\r\n                return;\r\n            }\r\n\r\n            this.$cache.cont.find(\".state_hover\").removeClass(\"state_hover\");\r\n\r\n            this.force_redraw = true;\r\n\r\n            if (is_old_ie) {\r\n                $(\"*\").prop(\"unselectable\", false);\r\n            }\r\n\r\n            this.updateScene();\r\n            this.restoreOriginalMinInterval();\r\n\r\n            // callbacks call\r\n            if ($.contains(this.$cache.cont[0], e.target) || this.dragging) {\r\n                this.callOnFinish();\r\n            }\r\n\r\n            this.dragging = false;\r\n        },\r\n\r\n        /**\r\n         * Mousedown or touchstart\r\n         * only for handlers\r\n         *\r\n         * @param target {String|null}\r\n         * @param e {Object} event object\r\n         */\r\n        pointerDown: function (target, e) {\r\n            e.preventDefault();\r\n            var x = e.pageX || e.originalEvent.touches && e.originalEvent.touches[0].pageX;\r\n            if (e.button === 2) {\r\n                return;\r\n            }\r\n\r\n            if (target === \"both\") {\r\n                this.setTempMinInterval();\r\n            }\r\n\r\n            if (!target) {\r\n                target = this.target || \"from\";\r\n            }\r\n\r\n            this.current_plugin = this.plugin_count;\r\n            this.target = target;\r\n\r\n            this.is_active = true;\r\n            this.dragging = true;\r\n\r\n            this.coords.x_gap = this.$cache.rs.offset().left;\r\n            this.coords.x_pointer = x - this.coords.x_gap;\r\n\r\n            this.calcPointerPercent();\r\n            this.changeLevel(target);\r\n\r\n            if (is_old_ie) {\r\n                $(\"*\").prop(\"unselectable\", true);\r\n            }\r\n\r\n            this.$cache.line.trigger(\"focus\");\r\n\r\n            this.updateScene();\r\n        },\r\n\r\n        /**\r\n         * Mousedown or touchstart\r\n         * for other slider elements, like diapason line\r\n         *\r\n         * @param target {String}\r\n         * @param e {Object} event object\r\n         */\r\n        pointerClick: function (target, e) {\r\n            e.preventDefault();\r\n            var x = e.pageX || e.originalEvent.touches && e.originalEvent.touches[0].pageX;\r\n            if (e.button === 2) {\r\n                return;\r\n            }\r\n\r\n            this.current_plugin = this.plugin_count;\r\n            this.target = target;\r\n\r\n            this.is_click = true;\r\n            this.coords.x_gap = this.$cache.rs.offset().left;\r\n            this.coords.x_pointer = +(x - this.coords.x_gap).toFixed();\r\n\r\n            this.force_redraw = true;\r\n            this.calc();\r\n\r\n            this.$cache.line.trigger(\"focus\");\r\n        },\r\n\r\n        /**\r\n         * Keyborard controls for focused slider\r\n         *\r\n         * @param target {String}\r\n         * @param e {Object} event object\r\n         * @returns {boolean|undefined}\r\n         */\r\n        key: function (target, e) {\r\n            if (this.current_plugin !== this.plugin_count || e.altKey || e.ctrlKey || e.shiftKey || e.metaKey) {\r\n                return;\r\n            }\r\n\r\n            switch (e.which) {\r\n                case 83: // W\r\n                case 65: // A\r\n                case 40: // DOWN\r\n                case 37: // LEFT\r\n                    e.preventDefault();\r\n                    this.moveByKey(false);\r\n                    break;\r\n\r\n                case 87: // S\r\n                case 68: // D\r\n                case 38: // UP\r\n                case 39: // RIGHT\r\n                    e.preventDefault();\r\n                    this.moveByKey(true);\r\n                    break;\r\n            }\r\n\r\n            return true;\r\n        },\r\n\r\n        /**\r\n         * Move by key\r\n         *\r\n         * @param right {boolean} direction to move\r\n         */\r\n        moveByKey: function (right) {\r\n            var p = this.coords.p_pointer;\r\n            var p_step = (this.options.max - this.options.min) / 100;\r\n            p_step = this.options.step / p_step;\r\n\r\n            if (right) {\r\n                p += p_step;\r\n            } else {\r\n                p -= p_step;\r\n            }\r\n\r\n            this.coords.x_pointer = this.toFixed(this.coords.w_rs / 100 * p);\r\n            this.is_key = true;\r\n            this.calc();\r\n        },\r\n\r\n        /**\r\n         * Set visibility and content\r\n         * of Min and Max labels\r\n         */\r\n        setMinMax: function () {\r\n            if (!this.options) {\r\n                return;\r\n            }\r\n\r\n            if (this.options.hide_min_max) {\r\n                this.$cache.min[0].style.display = \"none\";\r\n                this.$cache.max[0].style.display = \"none\";\r\n                return;\r\n            }\r\n\r\n            if (this.options.values.length) {\r\n                this.$cache.min.html(this.decorate(this.options.p_values[this.options.min]));\r\n                this.$cache.max.html(this.decorate(this.options.p_values[this.options.max]));\r\n            } else {\r\n                var min_pretty = this._prettify(this.options.min);\r\n                var max_pretty = this._prettify(this.options.max);\r\n\r\n                this.result.min_pretty = min_pretty;\r\n                this.result.max_pretty = max_pretty;\r\n\r\n                this.$cache.min.html(this.decorate(min_pretty, this.options.min));\r\n                this.$cache.max.html(this.decorate(max_pretty, this.options.max));\r\n            }\r\n\r\n            this.labels.w_min = this.$cache.min.outerWidth(false);\r\n            this.labels.w_max = this.$cache.max.outerWidth(false);\r\n        },\r\n\r\n        /**\r\n         * Then dragging interval, prevent interval collapsing\r\n         * using min_interval option\r\n         */\r\n        setTempMinInterval: function () {\r\n            var interval = this.result.to - this.result.from;\r\n\r\n            if (this.old_min_interval === null) {\r\n                this.old_min_interval = this.options.min_interval;\r\n            }\r\n\r\n            this.options.min_interval = interval;\r\n        },\r\n\r\n        /**\r\n         * Restore min_interval option to original\r\n         */\r\n        restoreOriginalMinInterval: function () {\r\n            if (this.old_min_interval !== null) {\r\n                this.options.min_interval = this.old_min_interval;\r\n                this.old_min_interval = null;\r\n            }\r\n        },\r\n\r\n\r\n\r\n        // =============================================================================================================\r\n        // Calculations\r\n\r\n        /**\r\n         * All calculations and measures start here\r\n         *\r\n         * @param update {boolean=}\r\n         */\r\n        calc: function (update) {\r\n            if (!this.options) {\r\n                return;\r\n            }\r\n\r\n            this.calc_count++;\r\n\r\n            if (this.calc_count === 10 || update) {\r\n                this.calc_count = 0;\r\n                this.coords.w_rs = this.$cache.rs.outerWidth(false);\r\n\r\n                this.calcHandlePercent();\r\n            }\r\n\r\n            if (!this.coords.w_rs) {\r\n                return;\r\n            }\r\n\r\n            this.calcPointerPercent();\r\n            var handle_x = this.getHandleX();\r\n\r\n\r\n            if (this.target === \"both\") {\r\n                this.coords.p_gap = 0;\r\n                handle_x = this.getHandleX();\r\n            }\r\n\r\n            if (this.target === \"click\") {\r\n                this.coords.p_gap = this.coords.p_handle / 2;\r\n                handle_x = this.getHandleX();\r\n\r\n                if (this.options.drag_interval) {\r\n                    this.target = \"both_one\";\r\n                } else {\r\n                    this.target = this.chooseHandle(handle_x);\r\n                }\r\n            }\r\n\r\n            switch (this.target) {\r\n                case \"base\":\r\n                    var w = (this.options.max - this.options.min) / 100,\r\n                        f = (this.result.from - this.options.min) / w,\r\n                        t = (this.result.to - this.options.min) / w;\r\n\r\n                    this.coords.p_single_real = this.toFixed(f);\r\n                    this.coords.p_from_real = this.toFixed(f);\r\n                    this.coords.p_to_real = this.toFixed(t);\r\n\r\n                    this.coords.p_single_real = this.checkDiapason(this.coords.p_single_real, this.options.from_min, this.options.from_max);\r\n                    this.coords.p_from_real = this.checkDiapason(this.coords.p_from_real, this.options.from_min, this.options.from_max);\r\n                    this.coords.p_to_real = this.checkDiapason(this.coords.p_to_real, this.options.to_min, this.options.to_max);\r\n\r\n                    this.coords.p_single_fake = this.convertToFakePercent(this.coords.p_single_real);\r\n                    this.coords.p_from_fake = this.convertToFakePercent(this.coords.p_from_real);\r\n                    this.coords.p_to_fake = this.convertToFakePercent(this.coords.p_to_real);\r\n\r\n                    this.target = null;\r\n\r\n                    break;\r\n\r\n                case \"single\":\r\n                    if (this.options.from_fixed) {\r\n                        break;\r\n                    }\r\n\r\n                    this.coords.p_single_real = this.convertToRealPercent(handle_x);\r\n                    this.coords.p_single_real = this.calcWithStep(this.coords.p_single_real);\r\n                    this.coords.p_single_real = this.checkDiapason(this.coords.p_single_real, this.options.from_min, this.options.from_max);\r\n\r\n                    this.coords.p_single_fake = this.convertToFakePercent(this.coords.p_single_real);\r\n\r\n                    break;\r\n\r\n                case \"from\":\r\n                    if (this.options.from_fixed) {\r\n                        break;\r\n                    }\r\n\r\n                    this.coords.p_from_real = this.convertToRealPercent(handle_x);\r\n                    this.coords.p_from_real = this.calcWithStep(this.coords.p_from_real);\r\n                    if (this.coords.p_from_real > this.coords.p_to_real) {\r\n                        this.coords.p_from_real = this.coords.p_to_real;\r\n                    }\r\n                    this.coords.p_from_real = this.checkDiapason(this.coords.p_from_real, this.options.from_min, this.options.from_max);\r\n                    this.coords.p_from_real = this.checkMinInterval(this.coords.p_from_real, this.coords.p_to_real, \"from\");\r\n                    this.coords.p_from_real = this.checkMaxInterval(this.coords.p_from_real, this.coords.p_to_real, \"from\");\r\n\r\n                    this.coords.p_from_fake = this.convertToFakePercent(this.coords.p_from_real);\r\n\r\n                    break;\r\n\r\n                case \"to\":\r\n                    if (this.options.to_fixed) {\r\n                        break;\r\n                    }\r\n\r\n                    this.coords.p_to_real = this.convertToRealPercent(handle_x);\r\n                    this.coords.p_to_real = this.calcWithStep(this.coords.p_to_real);\r\n                    if (this.coords.p_to_real < this.coords.p_from_real) {\r\n                        this.coords.p_to_real = this.coords.p_from_real;\r\n                    }\r\n                    this.coords.p_to_real = this.checkDiapason(this.coords.p_to_real, this.options.to_min, this.options.to_max);\r\n                    this.coords.p_to_real = this.checkMinInterval(this.coords.p_to_real, this.coords.p_from_real, \"to\");\r\n                    this.coords.p_to_real = this.checkMaxInterval(this.coords.p_to_real, this.coords.p_from_real, \"to\");\r\n\r\n                    this.coords.p_to_fake = this.convertToFakePercent(this.coords.p_to_real);\r\n\r\n                    break;\r\n\r\n                case \"both\":\r\n                    if (this.options.from_fixed || this.options.to_fixed) {\r\n                        break;\r\n                    }\r\n\r\n                    handle_x = this.toFixed(handle_x + (this.coords.p_handle * 0.001));\r\n\r\n                    this.coords.p_from_real = this.convertToRealPercent(handle_x) - this.coords.p_gap_left;\r\n                    this.coords.p_from_real = this.calcWithStep(this.coords.p_from_real);\r\n                    this.coords.p_from_real = this.checkDiapason(this.coords.p_from_real, this.options.from_min, this.options.from_max);\r\n                    this.coords.p_from_real = this.checkMinInterval(this.coords.p_from_real, this.coords.p_to_real, \"from\");\r\n                    this.coords.p_from_fake = this.convertToFakePercent(this.coords.p_from_real);\r\n\r\n                    this.coords.p_to_real = this.convertToRealPercent(handle_x) + this.coords.p_gap_right;\r\n                    this.coords.p_to_real = this.calcWithStep(this.coords.p_to_real);\r\n                    this.coords.p_to_real = this.checkDiapason(this.coords.p_to_real, this.options.to_min, this.options.to_max);\r\n                    this.coords.p_to_real = this.checkMinInterval(this.coords.p_to_real, this.coords.p_from_real, \"to\");\r\n                    this.coords.p_to_fake = this.convertToFakePercent(this.coords.p_to_real);\r\n\r\n                    break;\r\n\r\n                case \"both_one\":\r\n                    if (this.options.from_fixed || this.options.to_fixed) {\r\n                        break;\r\n                    }\r\n\r\n                    var real_x = this.convertToRealPercent(handle_x),\r\n                        from = this.result.from_percent,\r\n                        to = this.result.to_percent,\r\n                        full = to - from,\r\n                        half = full / 2,\r\n                        new_from = real_x - half,\r\n                        new_to = real_x + half;\r\n\r\n                    if (new_from < 0) {\r\n                        new_from = 0;\r\n                        new_to = new_from + full;\r\n                    }\r\n\r\n                    if (new_to > 100) {\r\n                        new_to = 100;\r\n                        new_from = new_to - full;\r\n                    }\r\n\r\n                    this.coords.p_from_real = this.calcWithStep(new_from);\r\n                    this.coords.p_from_real = this.checkDiapason(this.coords.p_from_real, this.options.from_min, this.options.from_max);\r\n                    this.coords.p_from_fake = this.convertToFakePercent(this.coords.p_from_real);\r\n\r\n                    this.coords.p_to_real = this.calcWithStep(new_to);\r\n                    this.coords.p_to_real = this.checkDiapason(this.coords.p_to_real, this.options.to_min, this.options.to_max);\r\n                    this.coords.p_to_fake = this.convertToFakePercent(this.coords.p_to_real);\r\n\r\n                    break;\r\n            }\r\n\r\n            if (this.options.type === \"single\") {\r\n                this.coords.p_bar_x = (this.coords.p_handle / 2);\r\n                this.coords.p_bar_w = this.coords.p_single_fake;\r\n\r\n                this.result.from_percent = this.coords.p_single_real;\r\n                this.result.from = this.convertToValue(this.coords.p_single_real);\r\n                this.result.from_pretty = this._prettify(this.result.from);\r\n\r\n                if (this.options.values.length) {\r\n                    this.result.from_value = this.options.values[this.result.from];\r\n                }\r\n            } else {\r\n                this.coords.p_bar_x = this.toFixed(this.coords.p_from_fake + (this.coords.p_handle / 2));\r\n                this.coords.p_bar_w = this.toFixed(this.coords.p_to_fake - this.coords.p_from_fake);\r\n\r\n                this.result.from_percent = this.coords.p_from_real;\r\n                this.result.from = this.convertToValue(this.coords.p_from_real);\r\n                this.result.from_pretty = this._prettify(this.result.from);\r\n                this.result.to_percent = this.coords.p_to_real;\r\n                this.result.to = this.convertToValue(this.coords.p_to_real);\r\n                this.result.to_pretty = this._prettify(this.result.to);\r\n\r\n                if (this.options.values.length) {\r\n                    this.result.from_value = this.options.values[this.result.from];\r\n                    this.result.to_value = this.options.values[this.result.to];\r\n                }\r\n            }\r\n\r\n            this.calcMinMax();\r\n            this.calcLabels();\r\n        },\r\n\r\n\r\n        /**\r\n         * calculates pointer X in percent\r\n         */\r\n        calcPointerPercent: function () {\r\n            if (!this.coords.w_rs) {\r\n                this.coords.p_pointer = 0;\r\n                return;\r\n            }\r\n\r\n            if (this.coords.x_pointer < 0 || isNaN(this.coords.x_pointer)  ) {\r\n                this.coords.x_pointer = 0;\r\n            } else if (this.coords.x_pointer > this.coords.w_rs) {\r\n                this.coords.x_pointer = this.coords.w_rs;\r\n            }\r\n\r\n            this.coords.p_pointer = this.toFixed(this.coords.x_pointer / this.coords.w_rs * 100);\r\n        },\r\n\r\n        convertToRealPercent: function (fake) {\r\n            var full = 100 - this.coords.p_handle;\r\n            return fake / full * 100;\r\n        },\r\n\r\n        convertToFakePercent: function (real) {\r\n            var full = 100 - this.coords.p_handle;\r\n            return real / 100 * full;\r\n        },\r\n\r\n        getHandleX: function () {\r\n            var max = 100 - this.coords.p_handle,\r\n                x = this.toFixed(this.coords.p_pointer - this.coords.p_gap);\r\n\r\n            if (x < 0) {\r\n                x = 0;\r\n            } else if (x > max) {\r\n                x = max;\r\n            }\r\n\r\n            return x;\r\n        },\r\n\r\n        calcHandlePercent: function () {\r\n            if (this.options.type === \"single\") {\r\n                this.coords.w_handle = this.$cache.s_single.outerWidth(false);\r\n            } else {\r\n                this.coords.w_handle = this.$cache.s_from.outerWidth(false);\r\n            }\r\n\r\n            this.coords.p_handle = this.toFixed(this.coords.w_handle / this.coords.w_rs * 100);\r\n        },\r\n\r\n        /**\r\n         * Find closest handle to pointer click\r\n         *\r\n         * @param real_x {Number}\r\n         * @returns {String}\r\n         */\r\n        chooseHandle: function (real_x) {\r\n            if (this.options.type === \"single\") {\r\n                return \"single\";\r\n            } else {\r\n                var m_point = this.coords.p_from_real + ((this.coords.p_to_real - this.coords.p_from_real) / 2);\r\n                if (real_x >= m_point) {\r\n                    return this.options.to_fixed ? \"from\" : \"to\";\r\n                } else {\r\n                    return this.options.from_fixed ? \"to\" : \"from\";\r\n                }\r\n            }\r\n        },\r\n\r\n        /**\r\n         * Measure Min and Max labels width in percent\r\n         */\r\n        calcMinMax: function () {\r\n            if (!this.coords.w_rs) {\r\n                return;\r\n            }\r\n\r\n            this.labels.p_min = this.labels.w_min / this.coords.w_rs * 100;\r\n            this.labels.p_max = this.labels.w_max / this.coords.w_rs * 100;\r\n        },\r\n\r\n        /**\r\n         * Measure labels width and X in percent\r\n         */\r\n        calcLabels: function () {\r\n            if (!this.coords.w_rs || this.options.hide_from_to) {\r\n                return;\r\n            }\r\n\r\n            if (this.options.type === \"single\") {\r\n\r\n                this.labels.w_single = this.$cache.single.outerWidth(false);\r\n                this.labels.p_single_fake = this.labels.w_single / this.coords.w_rs * 100;\r\n                this.labels.p_single_left = this.coords.p_single_fake + (this.coords.p_handle / 2) - (this.labels.p_single_fake / 2);\r\n                this.labels.p_single_left = this.checkEdges(this.labels.p_single_left, this.labels.p_single_fake);\r\n\r\n            } else {\r\n\r\n                this.labels.w_from = this.$cache.from.outerWidth(false);\r\n                this.labels.p_from_fake = this.labels.w_from / this.coords.w_rs * 100;\r\n                this.labels.p_from_left = this.coords.p_from_fake + (this.coords.p_handle / 2) - (this.labels.p_from_fake / 2);\r\n                this.labels.p_from_left = this.toFixed(this.labels.p_from_left);\r\n                this.labels.p_from_left = this.checkEdges(this.labels.p_from_left, this.labels.p_from_fake);\r\n\r\n                this.labels.w_to = this.$cache.to.outerWidth(false);\r\n                this.labels.p_to_fake = this.labels.w_to / this.coords.w_rs * 100;\r\n                this.labels.p_to_left = this.coords.p_to_fake + (this.coords.p_handle / 2) - (this.labels.p_to_fake / 2);\r\n                this.labels.p_to_left = this.toFixed(this.labels.p_to_left);\r\n                this.labels.p_to_left = this.checkEdges(this.labels.p_to_left, this.labels.p_to_fake);\r\n\r\n                this.labels.w_single = this.$cache.single.outerWidth(false);\r\n                this.labels.p_single_fake = this.labels.w_single / this.coords.w_rs * 100;\r\n                this.labels.p_single_left = ((this.labels.p_from_left + this.labels.p_to_left + this.labels.p_to_fake) / 2) - (this.labels.p_single_fake / 2);\r\n                this.labels.p_single_left = this.toFixed(this.labels.p_single_left);\r\n                this.labels.p_single_left = this.checkEdges(this.labels.p_single_left, this.labels.p_single_fake);\r\n\r\n            }\r\n        },\r\n\r\n\r\n\r\n        // =============================================================================================================\r\n        // Drawings\r\n\r\n        /**\r\n         * Main function called in request animation frame\r\n         * to update everything\r\n         */\r\n        updateScene: function () {\r\n            if (this.raf_id) {\r\n                cancelAnimationFrame(this.raf_id);\r\n                this.raf_id = null;\r\n            }\r\n\r\n            clearTimeout(this.update_tm);\r\n            this.update_tm = null;\r\n\r\n            if (!this.options) {\r\n                return;\r\n            }\r\n\r\n            this.drawHandles();\r\n\r\n            if (this.is_active) {\r\n                this.raf_id = requestAnimationFrame(this.updateScene.bind(this));\r\n            } else {\r\n                this.update_tm = setTimeout(this.updateScene.bind(this), 300);\r\n            }\r\n        },\r\n\r\n        /**\r\n         * Draw handles\r\n         */\r\n        drawHandles: function () {\r\n            this.coords.w_rs = this.$cache.rs.outerWidth(false);\r\n\r\n            if (!this.coords.w_rs) {\r\n                return;\r\n            }\r\n\r\n            if (this.coords.w_rs !== this.coords.w_rs_old) {\r\n                this.target = \"base\";\r\n                this.is_resize = true;\r\n            }\r\n\r\n            if (this.coords.w_rs !== this.coords.w_rs_old || this.force_redraw) {\r\n                this.setMinMax();\r\n                this.calc(true);\r\n                this.drawLabels();\r\n                if (this.options.grid) {\r\n                    this.calcGridMargin();\r\n                    this.calcGridLabels();\r\n                }\r\n                this.force_redraw = true;\r\n                this.coords.w_rs_old = this.coords.w_rs;\r\n                this.drawShadow();\r\n            }\r\n\r\n            if (!this.coords.w_rs) {\r\n                return;\r\n            }\r\n\r\n            if (!this.dragging && !this.force_redraw && !this.is_key) {\r\n                return;\r\n            }\r\n\r\n            if (this.old_from !== this.result.from || this.old_to !== this.result.to || this.force_redraw || this.is_key) {\r\n\r\n                this.drawLabels();\r\n\r\n                this.$cache.bar[0].style.left = this.coords.p_bar_x + \"%\";\r\n                this.$cache.bar[0].style.width = this.coords.p_bar_w + \"%\";\r\n\r\n                if (this.options.type === \"single\") {\r\n                    this.$cache.bar[0].style.left = 0;\r\n                    this.$cache.bar[0].style.width = this.coords.p_bar_w + this.coords.p_bar_x + \"%\";\r\n\r\n                    this.$cache.s_single[0].style.left = this.coords.p_single_fake + \"%\";\r\n\r\n                    this.$cache.single[0].style.left = this.labels.p_single_left + \"%\";\r\n                } else {\r\n                    this.$cache.s_from[0].style.left = this.coords.p_from_fake + \"%\";\r\n                    this.$cache.s_to[0].style.left = this.coords.p_to_fake + \"%\";\r\n\r\n                    if (this.old_from !== this.result.from || this.force_redraw) {\r\n                        this.$cache.from[0].style.left = this.labels.p_from_left + \"%\";\r\n                    }\r\n                    if (this.old_to !== this.result.to || this.force_redraw) {\r\n                        this.$cache.to[0].style.left = this.labels.p_to_left + \"%\";\r\n                    }\r\n\r\n                    this.$cache.single[0].style.left = this.labels.p_single_left + \"%\";\r\n                }\r\n\r\n                this.writeToInput();\r\n\r\n                if ((this.old_from !== this.result.from || this.old_to !== this.result.to) && !this.is_start) {\r\n                    this.$cache.input.trigger(\"change\");\r\n                    this.$cache.input.trigger(\"input\");\r\n                }\r\n\r\n                this.old_from = this.result.from;\r\n                this.old_to = this.result.to;\r\n\r\n                // callbacks call\r\n                if (!this.is_resize && !this.is_update && !this.is_start && !this.is_finish) {\r\n                    this.callOnChange();\r\n                }\r\n                if (this.is_key || this.is_click) {\r\n                    this.is_key = false;\r\n                    this.is_click = false;\r\n                    this.callOnFinish();\r\n                }\r\n\r\n                this.is_update = false;\r\n                this.is_resize = false;\r\n                this.is_finish = false;\r\n            }\r\n\r\n            this.is_start = false;\r\n            this.is_key = false;\r\n            this.is_click = false;\r\n            this.force_redraw = false;\r\n        },\r\n\r\n        /**\r\n         * Draw labels\r\n         * measure labels collisions\r\n         * collapse close labels\r\n         */\r\n        drawLabels: function () {\r\n            if (!this.options) {\r\n                return;\r\n            }\r\n\r\n            var values_num = this.options.values.length;\r\n            var p_values = this.options.p_values;\r\n            var text_single;\r\n            var text_from;\r\n            var text_to;\r\n            var from_pretty;\r\n            var to_pretty;\r\n\r\n            if (this.options.hide_from_to) {\r\n                return;\r\n            }\r\n\r\n            if (this.options.type === \"single\") {\r\n\r\n                if (values_num) {\r\n                    text_single = this.decorate(p_values[this.result.from]);\r\n                    this.$cache.single.html(text_single);\r\n                } else {\r\n                    from_pretty = this._prettify(this.result.from);\r\n\r\n                    text_single = this.decorate(from_pretty, this.result.from);\r\n                    this.$cache.single.html(text_single);\r\n                }\r\n\r\n                this.calcLabels();\r\n\r\n                if (this.labels.p_single_left < this.labels.p_min + 1) {\r\n                    this.$cache.min[0].style.visibility = \"hidden\";\r\n                } else {\r\n                    this.$cache.min[0].style.visibility = \"visible\";\r\n                }\r\n\r\n                if (this.labels.p_single_left + this.labels.p_single_fake > 100 - this.labels.p_max - 1) {\r\n                    this.$cache.max[0].style.visibility = \"hidden\";\r\n                } else {\r\n                    this.$cache.max[0].style.visibility = \"visible\";\r\n                }\r\n\r\n            } else {\r\n\r\n                if (values_num) {\r\n\r\n                    if (this.options.decorate_both) {\r\n                        text_single = this.decorate(p_values[this.result.from]);\r\n                        text_single += this.options.values_separator;\r\n                        text_single += this.decorate(p_values[this.result.to]);\r\n                    } else {\r\n                        text_single = this.decorate(p_values[this.result.from] + this.options.values_separator + p_values[this.result.to]);\r\n                    }\r\n                    text_from = this.decorate(p_values[this.result.from]);\r\n                    text_to = this.decorate(p_values[this.result.to]);\r\n\r\n                    this.$cache.single.html(text_single);\r\n                    this.$cache.from.html(text_from);\r\n                    this.$cache.to.html(text_to);\r\n\r\n                } else {\r\n                    from_pretty = this._prettify(this.result.from);\r\n                    to_pretty = this._prettify(this.result.to);\r\n\r\n                    if (this.options.decorate_both) {\r\n                        text_single = this.decorate(from_pretty, this.result.from);\r\n                        text_single += this.options.values_separator;\r\n                        text_single += this.decorate(to_pretty, this.result.to);\r\n                    } else {\r\n                        text_single = this.decorate(from_pretty + this.options.values_separator + to_pretty, this.result.to);\r\n                    }\r\n                    text_from = this.decorate(from_pretty, this.result.from);\r\n                    text_to = this.decorate(to_pretty, this.result.to);\r\n\r\n                    this.$cache.single.html(text_single);\r\n                    this.$cache.from.html(text_from);\r\n                    this.$cache.to.html(text_to);\r\n\r\n                }\r\n\r\n                this.calcLabels();\r\n\r\n                var min = Math.min(this.labels.p_single_left, this.labels.p_from_left),\r\n                    single_left = this.labels.p_single_left + this.labels.p_single_fake,\r\n                    to_left = this.labels.p_to_left + this.labels.p_to_fake,\r\n                    max = Math.max(single_left, to_left);\r\n\r\n                if (this.labels.p_from_left + this.labels.p_from_fake >= this.labels.p_to_left) {\r\n                    this.$cache.from[0].style.visibility = \"hidden\";\r\n                    this.$cache.to[0].style.visibility = \"hidden\";\r\n                    this.$cache.single[0].style.visibility = \"visible\";\r\n\r\n                    if (this.result.from === this.result.to) {\r\n                        if (this.target === \"from\") {\r\n                            this.$cache.from[0].style.visibility = \"visible\";\r\n                        } else if (this.target === \"to\") {\r\n                            this.$cache.to[0].style.visibility = \"visible\";\r\n                        } else if (!this.target) {\r\n                            this.$cache.from[0].style.visibility = \"visible\";\r\n                        }\r\n                        this.$cache.single[0].style.visibility = \"hidden\";\r\n                        max = to_left;\r\n                    } else {\r\n                        this.$cache.from[0].style.visibility = \"hidden\";\r\n                        this.$cache.to[0].style.visibility = \"hidden\";\r\n                        this.$cache.single[0].style.visibility = \"visible\";\r\n                        max = Math.max(single_left, to_left);\r\n                    }\r\n                } else {\r\n                    this.$cache.from[0].style.visibility = \"visible\";\r\n                    this.$cache.to[0].style.visibility = \"visible\";\r\n                    this.$cache.single[0].style.visibility = \"hidden\";\r\n                }\r\n\r\n                if (min < this.labels.p_min + 1) {\r\n                    this.$cache.min[0].style.visibility = \"hidden\";\r\n                } else {\r\n                    this.$cache.min[0].style.visibility = \"visible\";\r\n                }\r\n\r\n                if (max > 100 - this.labels.p_max - 1) {\r\n                    this.$cache.max[0].style.visibility = \"hidden\";\r\n                } else {\r\n                    this.$cache.max[0].style.visibility = \"visible\";\r\n                }\r\n\r\n            }\r\n        },\r\n\r\n        /**\r\n         * Draw shadow intervals\r\n         */\r\n        drawShadow: function () {\r\n            var o = this.options,\r\n                c = this.$cache,\r\n\r\n                is_from_min = typeof o.from_min === \"number\" && !isNaN(o.from_min),\r\n                is_from_max = typeof o.from_max === \"number\" && !isNaN(o.from_max),\r\n                is_to_min = typeof o.to_min === \"number\" && !isNaN(o.to_min),\r\n                is_to_max = typeof o.to_max === \"number\" && !isNaN(o.to_max),\r\n\r\n                from_min,\r\n                from_max,\r\n                to_min,\r\n                to_max;\r\n\r\n            if (o.type === \"single\") {\r\n                if (o.from_shadow && (is_from_min || is_from_max)) {\r\n                    from_min = this.convertToPercent(is_from_min ? o.from_min : o.min);\r\n                    from_max = this.convertToPercent(is_from_max ? o.from_max : o.max) - from_min;\r\n                    from_min = this.toFixed(from_min - (this.coords.p_handle / 100 * from_min));\r\n                    from_max = this.toFixed(from_max - (this.coords.p_handle / 100 * from_max));\r\n                    from_min = from_min + (this.coords.p_handle / 2);\r\n\r\n                    c.shad_single[0].style.display = \"block\";\r\n                    c.shad_single[0].style.left = from_min + \"%\";\r\n                    c.shad_single[0].style.width = from_max + \"%\";\r\n                } else {\r\n                    c.shad_single[0].style.display = \"none\";\r\n                }\r\n            } else {\r\n                if (o.from_shadow && (is_from_min || is_from_max)) {\r\n                    from_min = this.convertToPercent(is_from_min ? o.from_min : o.min);\r\n                    from_max = this.convertToPercent(is_from_max ? o.from_max : o.max) - from_min;\r\n                    from_min = this.toFixed(from_min - (this.coords.p_handle / 100 * from_min));\r\n                    from_max = this.toFixed(from_max - (this.coords.p_handle / 100 * from_max));\r\n                    from_min = from_min + (this.coords.p_handle / 2);\r\n\r\n                    c.shad_from[0].style.display = \"block\";\r\n                    c.shad_from[0].style.left = from_min + \"%\";\r\n                    c.shad_from[0].style.width = from_max + \"%\";\r\n                } else {\r\n                    c.shad_from[0].style.display = \"none\";\r\n                }\r\n\r\n                if (o.to_shadow && (is_to_min || is_to_max)) {\r\n                    to_min = this.convertToPercent(is_to_min ? o.to_min : o.min);\r\n                    to_max = this.convertToPercent(is_to_max ? o.to_max : o.max) - to_min;\r\n                    to_min = this.toFixed(to_min - (this.coords.p_handle / 100 * to_min));\r\n                    to_max = this.toFixed(to_max - (this.coords.p_handle / 100 * to_max));\r\n                    to_min = to_min + (this.coords.p_handle / 2);\r\n\r\n                    c.shad_to[0].style.display = \"block\";\r\n                    c.shad_to[0].style.left = to_min + \"%\";\r\n                    c.shad_to[0].style.width = to_max + \"%\";\r\n                } else {\r\n                    c.shad_to[0].style.display = \"none\";\r\n                }\r\n            }\r\n        },\r\n\r\n\r\n\r\n        /**\r\n         * Write values to input element\r\n         */\r\n        writeToInput: function () {\r\n            if (this.options.type === \"single\") {\r\n                if (this.options.values.length) {\r\n                    this.$cache.input.prop(\"value\", this.result.from_value);\r\n                } else {\r\n                    this.$cache.input.prop(\"value\", this.result.from);\r\n                }\r\n                this.$cache.input.data(\"from\", this.result.from);\r\n            } else {\r\n                if (this.options.values.length) {\r\n                    this.$cache.input.prop(\"value\", this.result.from_value + this.options.input_values_separator + this.result.to_value);\r\n                } else {\r\n                    this.$cache.input.prop(\"value\", this.result.from + this.options.input_values_separator + this.result.to);\r\n                }\r\n                this.$cache.input.data(\"from\", this.result.from);\r\n                this.$cache.input.data(\"to\", this.result.to);\r\n            }\r\n        },\r\n\r\n\r\n\r\n        // =============================================================================================================\r\n        // Callbacks\r\n\r\n        callOnStart: function () {\r\n            this.writeToInput();\r\n\r\n            if (this.options.onStart && typeof this.options.onStart === \"function\") {\r\n                if (this.options.scope) {\r\n                    this.options.onStart.call(this.options.scope, this.result);\r\n                } else {\r\n                    this.options.onStart(this.result);\r\n                }\r\n            }\r\n        },\r\n        callOnChange: function () {\r\n            this.writeToInput();\r\n\r\n            if (this.options.onChange && typeof this.options.onChange === \"function\") {\r\n                if (this.options.scope) {\r\n                    this.options.onChange.call(this.options.scope, this.result);\r\n                } else {\r\n                    this.options.onChange(this.result);\r\n                }\r\n            }\r\n        },\r\n        callOnFinish: function () {\r\n            this.writeToInput();\r\n\r\n            if (this.options.onFinish && typeof this.options.onFinish === \"function\") {\r\n                if (this.options.scope) {\r\n                    this.options.onFinish.call(this.options.scope, this.result);\r\n                } else {\r\n                    this.options.onFinish(this.result);\r\n                }\r\n            }\r\n        },\r\n        callOnUpdate: function () {\r\n            this.writeToInput();\r\n\r\n            if (this.options.onUpdate && typeof this.options.onUpdate === \"function\") {\r\n                if (this.options.scope) {\r\n                    this.options.onUpdate.call(this.options.scope, this.result);\r\n                } else {\r\n                    this.options.onUpdate(this.result);\r\n                }\r\n            }\r\n        },\r\n\r\n\r\n\r\n\r\n        // =============================================================================================================\r\n        // Service methods\r\n\r\n        toggleInput: function () {\r\n            this.$cache.input.toggleClass(\"irs-hidden-input\");\r\n\r\n            if (this.has_tab_index) {\r\n                this.$cache.input.prop(\"tabindex\", -1);\r\n            } else {\r\n                this.$cache.input.removeProp(\"tabindex\");\r\n            }\r\n\r\n            this.has_tab_index = !this.has_tab_index;\r\n        },\r\n\r\n        /**\r\n         * Convert real value to percent\r\n         *\r\n         * @param value {Number} X in real\r\n         * @param no_min {boolean=} don't use min value\r\n         * @returns {Number} X in percent\r\n         */\r\n        convertToPercent: function (value, no_min) {\r\n            var diapason = this.options.max - this.options.min,\r\n                one_percent = diapason / 100,\r\n                val, percent;\r\n\r\n            if (!diapason) {\r\n                this.no_diapason = true;\r\n                return 0;\r\n            }\r\n\r\n            if (no_min) {\r\n                val = value;\r\n            } else {\r\n                val = value - this.options.min;\r\n            }\r\n\r\n            percent = val / one_percent;\r\n\r\n            return this.toFixed(percent);\r\n        },\r\n\r\n        /**\r\n         * Convert percent to real values\r\n         *\r\n         * @param percent {Number} X in percent\r\n         * @returns {Number} X in real\r\n         */\r\n        convertToValue: function (percent) {\r\n            var min = this.options.min,\r\n                max = this.options.max,\r\n                min_decimals = min.toString().split(\".\")[1],\r\n                max_decimals = max.toString().split(\".\")[1],\r\n                min_length, max_length,\r\n                avg_decimals = 0,\r\n                abs = 0;\r\n\r\n            if (percent === 0) {\r\n                return this.options.min;\r\n            }\r\n            if (percent === 100) {\r\n                return this.options.max;\r\n            }\r\n\r\n\r\n            if (min_decimals) {\r\n                min_length = min_decimals.length;\r\n                avg_decimals = min_length;\r\n            }\r\n            if (max_decimals) {\r\n                max_length = max_decimals.length;\r\n                avg_decimals = max_length;\r\n            }\r\n            if (min_length && max_length) {\r\n                avg_decimals = (min_length >= max_length) ? min_length : max_length;\r\n            }\r\n\r\n            if (min < 0) {\r\n                abs = Math.abs(min);\r\n                min = +(min + abs).toFixed(avg_decimals);\r\n                max = +(max + abs).toFixed(avg_decimals);\r\n            }\r\n\r\n            var number = ((max - min) / 100 * percent) + min,\r\n                string = this.options.step.toString().split(\".\")[1],\r\n                result;\r\n\r\n            if (string) {\r\n                number = +number.toFixed(string.length);\r\n            } else {\r\n                number = number / this.options.step;\r\n                number = number * this.options.step;\r\n\r\n                number = +number.toFixed(0);\r\n            }\r\n\r\n            if (abs) {\r\n                number -= abs;\r\n            }\r\n\r\n            if (string) {\r\n                result = +number.toFixed(string.length);\r\n            } else {\r\n                result = this.toFixed(number);\r\n            }\r\n\r\n            if (result < this.options.min) {\r\n                result = this.options.min;\r\n            } else if (result > this.options.max) {\r\n                result = this.options.max;\r\n            }\r\n\r\n            return result;\r\n        },\r\n\r\n        /**\r\n         * Round percent value with step\r\n         *\r\n         * @param percent {Number}\r\n         * @returns percent {Number} rounded\r\n         */\r\n        calcWithStep: function (percent) {\r\n            var rounded = Math.round(percent / this.coords.p_step) * this.coords.p_step;\r\n\r\n            if (rounded > 100) {\r\n                rounded = 100;\r\n            }\r\n            if (percent === 100) {\r\n                rounded = 100;\r\n            }\r\n\r\n            return this.toFixed(rounded);\r\n        },\r\n\r\n        checkMinInterval: function (p_current, p_next, type) {\r\n            var o = this.options,\r\n                current,\r\n                next;\r\n\r\n            if (!o.min_interval) {\r\n                return p_current;\r\n            }\r\n\r\n            current = this.convertToValue(p_current);\r\n            next = this.convertToValue(p_next);\r\n\r\n            if (type === \"from\") {\r\n\r\n                if (next - current < o.min_interval) {\r\n                    current = next - o.min_interval;\r\n                }\r\n\r\n            } else {\r\n\r\n                if (current - next < o.min_interval) {\r\n                    current = next + o.min_interval;\r\n                }\r\n\r\n            }\r\n\r\n            return this.convertToPercent(current);\r\n        },\r\n\r\n        checkMaxInterval: function (p_current, p_next, type) {\r\n            var o = this.options,\r\n                current,\r\n                next;\r\n\r\n            if (!o.max_interval) {\r\n                return p_current;\r\n            }\r\n\r\n            current = this.convertToValue(p_current);\r\n            next = this.convertToValue(p_next);\r\n\r\n            if (type === \"from\") {\r\n\r\n                if (next - current > o.max_interval) {\r\n                    current = next - o.max_interval;\r\n                }\r\n\r\n            } else {\r\n\r\n                if (current - next > o.max_interval) {\r\n                    current = next + o.max_interval;\r\n                }\r\n\r\n            }\r\n\r\n            return this.convertToPercent(current);\r\n        },\r\n\r\n        checkDiapason: function (p_num, min, max) {\r\n            var num = this.convertToValue(p_num),\r\n                o = this.options;\r\n\r\n            if (typeof min !== \"number\") {\r\n                min = o.min;\r\n            }\r\n\r\n            if (typeof max !== \"number\") {\r\n                max = o.max;\r\n            }\r\n\r\n            if (num < min) {\r\n                num = min;\r\n            }\r\n\r\n            if (num > max) {\r\n                num = max;\r\n            }\r\n\r\n            return this.convertToPercent(num);\r\n        },\r\n\r\n        toFixed: function (num) {\r\n            num = num.toFixed(20);\r\n            return +num;\r\n        },\r\n\r\n        _prettify: function (num) {\r\n            if (!this.options.prettify_enabled) {\r\n                return num;\r\n            }\r\n\r\n            if (this.options.prettify && typeof this.options.prettify === \"function\") {\r\n                return this.options.prettify(num);\r\n            } else {\r\n                return this.prettify(num);\r\n            }\r\n        },\r\n\r\n        prettify: function (num) {\r\n            var n = num.toString();\r\n            return n.replace(/(\\d{1,3}(?=(?:\\d\\d\\d)+(?!\\d)))/g, \"$1\" + this.options.prettify_separator);\r\n        },\r\n\r\n        checkEdges: function (left, width) {\r\n            if (!this.options.force_edges) {\r\n                return this.toFixed(left);\r\n            }\r\n\r\n            if (left < 0) {\r\n                left = 0;\r\n            } else if (left > 100 - width) {\r\n                left = 100 - width;\r\n            }\r\n\r\n            return this.toFixed(left);\r\n        },\r\n\r\n        validate: function () {\r\n            var o = this.options,\r\n                r = this.result,\r\n                v = o.values,\r\n                vl = v.length,\r\n                value,\r\n                i;\r\n\r\n            if (typeof o.min === \"string\") o.min = +o.min;\r\n            if (typeof o.max === \"string\") o.max = +o.max;\r\n            if (typeof o.from === \"string\") o.from = +o.from;\r\n            if (typeof o.to === \"string\") o.to = +o.to;\r\n            if (typeof o.step === \"string\") o.step = +o.step;\r\n\r\n            if (typeof o.from_min === \"string\") o.from_min = +o.from_min;\r\n            if (typeof o.from_max === \"string\") o.from_max = +o.from_max;\r\n            if (typeof o.to_min === \"string\") o.to_min = +o.to_min;\r\n            if (typeof o.to_max === \"string\") o.to_max = +o.to_max;\r\n\r\n            if (typeof o.grid_num === \"string\") o.grid_num = +o.grid_num;\r\n\r\n            if (o.max < o.min) {\r\n                o.max = o.min;\r\n            }\r\n\r\n            if (vl) {\r\n                o.p_values = [];\r\n                o.min = 0;\r\n                o.max = vl - 1;\r\n                o.step = 1;\r\n                o.grid_num = o.max;\r\n                o.grid_snap = true;\r\n\r\n                for (i = 0; i < vl; i++) {\r\n                    value = +v[i];\r\n\r\n                    if (!isNaN(value)) {\r\n                        v[i] = value;\r\n                        value = this._prettify(value);\r\n                    } else {\r\n                        value = v[i];\r\n                    }\r\n\r\n                    o.p_values.push(value);\r\n                }\r\n            }\r\n\r\n            if (typeof o.from !== \"number\" || isNaN(o.from)) {\r\n                o.from = o.min;\r\n            }\r\n\r\n            if (typeof o.to !== \"number\" || isNaN(o.to)) {\r\n                o.to = o.max;\r\n            }\r\n\r\n            if (o.type === \"single\") {\r\n\r\n                if (o.from < o.min) o.from = o.min;\r\n                if (o.from > o.max) o.from = o.max;\r\n\r\n            } else {\r\n\r\n                if (o.from < o.min) o.from = o.min;\r\n                if (o.from > o.max) o.from = o.max;\r\n\r\n                if (o.to < o.min) o.to = o.min;\r\n                if (o.to > o.max) o.to = o.max;\r\n\r\n                if (this.update_check.from) {\r\n\r\n                    if (this.update_check.from !== o.from) {\r\n                        if (o.from > o.to) o.from = o.to;\r\n                    }\r\n                    if (this.update_check.to !== o.to) {\r\n                        if (o.to < o.from) o.to = o.from;\r\n                    }\r\n\r\n                }\r\n\r\n                if (o.from > o.to) o.from = o.to;\r\n                if (o.to < o.from) o.to = o.from;\r\n\r\n            }\r\n\r\n            if (typeof o.step !== \"number\" || isNaN(o.step) || !o.step || o.step < 0) {\r\n                o.step = 1;\r\n            }\r\n\r\n            if (typeof o.from_min === \"number\" && o.from < o.from_min) {\r\n                o.from = o.from_min;\r\n            }\r\n\r\n            if (typeof o.from_max === \"number\" && o.from > o.from_max) {\r\n                o.from = o.from_max;\r\n            }\r\n\r\n            if (typeof o.to_min === \"number\" && o.to < o.to_min) {\r\n                o.to = o.to_min;\r\n            }\r\n\r\n            if (typeof o.to_max === \"number\" && o.from > o.to_max) {\r\n                o.to = o.to_max;\r\n            }\r\n\r\n            if (r) {\r\n                if (r.min !== o.min) {\r\n                    r.min = o.min;\r\n                }\r\n\r\n                if (r.max !== o.max) {\r\n                    r.max = o.max;\r\n                }\r\n\r\n                if (r.from < r.min || r.from > r.max) {\r\n                    r.from = o.from;\r\n                }\r\n\r\n                if (r.to < r.min || r.to > r.max) {\r\n                    r.to = o.to;\r\n                }\r\n            }\r\n\r\n            if (typeof o.min_interval !== \"number\" || isNaN(o.min_interval) || !o.min_interval || o.min_interval < 0) {\r\n                o.min_interval = 0;\r\n            }\r\n\r\n            if (typeof o.max_interval !== \"number\" || isNaN(o.max_interval) || !o.max_interval || o.max_interval < 0) {\r\n                o.max_interval = 0;\r\n            }\r\n\r\n            if (o.min_interval && o.min_interval > o.max - o.min) {\r\n                o.min_interval = o.max - o.min;\r\n            }\r\n\r\n            if (o.max_interval && o.max_interval > o.max - o.min) {\r\n                o.max_interval = o.max - o.min;\r\n            }\r\n        },\r\n\r\n        decorate: function (num, original) {\r\n            var decorated = \"\",\r\n                o = this.options;\r\n\r\n            if (o.prefix) {\r\n                decorated += o.prefix;\r\n            }\r\n\r\n            decorated += num;\r\n\r\n            if (o.max_postfix) {\r\n                if (o.values.length && num === o.p_values[o.max]) {\r\n                    decorated += o.max_postfix;\r\n                    if (o.postfix) {\r\n                        decorated += \" \";\r\n                    }\r\n                } else if (original === o.max) {\r\n                    decorated += o.max_postfix;\r\n                    if (o.postfix) {\r\n                        decorated += \" \";\r\n                    }\r\n                }\r\n            }\r\n\r\n            if (o.postfix) {\r\n                decorated += o.postfix;\r\n            }\r\n\r\n            return decorated;\r\n        },\r\n\r\n        updateFrom: function () {\r\n            this.result.from = this.options.from;\r\n            this.result.from_percent = this.convertToPercent(this.result.from);\r\n            this.result.from_pretty = this._prettify(this.result.from);\r\n            if (this.options.values) {\r\n                this.result.from_value = this.options.values[this.result.from];\r\n            }\r\n        },\r\n\r\n        updateTo: function () {\r\n            this.result.to = this.options.to;\r\n            this.result.to_percent = this.convertToPercent(this.result.to);\r\n            this.result.to_pretty = this._prettify(this.result.to);\r\n            if (this.options.values) {\r\n                this.result.to_value = this.options.values[this.result.to];\r\n            }\r\n        },\r\n\r\n        updateResult: function () {\r\n            this.result.min = this.options.min;\r\n            this.result.max = this.options.max;\r\n            this.updateFrom();\r\n            this.updateTo();\r\n        },\r\n\r\n\r\n        // =============================================================================================================\r\n        // Grid\r\n\r\n        appendGrid: function () {\r\n            if (!this.options.grid) {\r\n                return;\r\n            }\r\n\r\n            var o = this.options,\r\n                i, z,\r\n\r\n                total = o.max - o.min,\r\n                big_num = o.grid_num,\r\n                big_p = 0,\r\n                big_w = 0,\r\n\r\n                small_max = 4,\r\n                local_small_max,\r\n                small_p,\r\n                small_w = 0,\r\n\r\n                result,\r\n                html = '';\r\n\r\n\r\n\r\n            this.calcGridMargin();\r\n\r\n            if (o.grid_snap) {\r\n                big_num = total / o.step;\r\n            }\r\n\r\n            if (big_num > 50) big_num = 50;\r\n            big_p = this.toFixed(100 / big_num);\r\n\r\n            if (big_num > 4) {\r\n                small_max = 3;\r\n            }\r\n            if (big_num > 7) {\r\n                small_max = 2;\r\n            }\r\n            if (big_num > 14) {\r\n                small_max = 1;\r\n            }\r\n            if (big_num > 28) {\r\n                small_max = 0;\r\n            }\r\n\r\n            for (i = 0; i < big_num + 1; i++) {\r\n                local_small_max = small_max;\r\n\r\n                big_w = this.toFixed(big_p * i);\r\n\r\n                if (big_w > 100) {\r\n                    big_w = 100;\r\n                }\r\n                this.coords.big[i] = big_w;\r\n\r\n                small_p = (big_w - (big_p * (i - 1))) / (local_small_max + 1);\r\n\r\n                for (z = 1; z <= local_small_max; z++) {\r\n                    if (big_w === 0) {\r\n                        break;\r\n                    }\r\n\r\n                    small_w = this.toFixed(big_w - (small_p * z));\r\n\r\n                    html += '<span class=\"irs-grid-pol small\" style=\"left: ' + small_w + '%\"></span>';\r\n                }\r\n\r\n                html += '<span class=\"irs-grid-pol\" style=\"left: ' + big_w + '%\"></span>';\r\n\r\n                result = this.convertToValue(big_w);\r\n                if (o.values.length) {\r\n                    result = o.p_values[result];\r\n                } else {\r\n                    result = this._prettify(result);\r\n                }\r\n\r\n                html += '<span class=\"irs-grid-text js-grid-text-' + i + '\" style=\"left: ' + big_w + '%\">' + result + '</span>';\r\n            }\r\n            this.coords.big_num = Math.ceil(big_num + 1);\r\n\r\n\r\n\r\n            this.$cache.cont.addClass(\"irs-with-grid\");\r\n            this.$cache.grid.html(html);\r\n            this.cacheGridLabels();\r\n        },\r\n\r\n        cacheGridLabels: function () {\r\n            var $label, i,\r\n                num = this.coords.big_num;\r\n\r\n            for (i = 0; i < num; i++) {\r\n                $label = this.$cache.grid.find(\".js-grid-text-\" + i);\r\n                this.$cache.grid_labels.push($label);\r\n            }\r\n\r\n            this.calcGridLabels();\r\n        },\r\n\r\n        calcGridLabels: function () {\r\n            var i, label, start = [], finish = [],\r\n                num = this.coords.big_num;\r\n\r\n            for (i = 0; i < num; i++) {\r\n                this.coords.big_w[i] = this.$cache.grid_labels[i].outerWidth(false);\r\n                this.coords.big_p[i] = this.toFixed(this.coords.big_w[i] / this.coords.w_rs * 100);\r\n                this.coords.big_x[i] = this.toFixed(this.coords.big_p[i] / 2);\r\n\r\n                start[i] = this.toFixed(this.coords.big[i] - this.coords.big_x[i]);\r\n                finish[i] = this.toFixed(start[i] + this.coords.big_p[i]);\r\n            }\r\n\r\n            if (this.options.force_edges) {\r\n                if (start[0] < -this.coords.grid_gap) {\r\n                    start[0] = -this.coords.grid_gap;\r\n                    finish[0] = this.toFixed(start[0] + this.coords.big_p[0]);\r\n\r\n                    this.coords.big_x[0] = this.coords.grid_gap;\r\n                }\r\n\r\n                if (finish[num - 1] > 100 + this.coords.grid_gap) {\r\n                    finish[num - 1] = 100 + this.coords.grid_gap;\r\n                    start[num - 1] = this.toFixed(finish[num - 1] - this.coords.big_p[num - 1]);\r\n\r\n                    this.coords.big_x[num - 1] = this.toFixed(this.coords.big_p[num - 1] - this.coords.grid_gap);\r\n                }\r\n            }\r\n\r\n            this.calcGridCollision(2, start, finish);\r\n            this.calcGridCollision(4, start, finish);\r\n\r\n            for (i = 0; i < num; i++) {\r\n                label = this.$cache.grid_labels[i][0];\r\n\r\n                if (this.coords.big_x[i] !== Number.POSITIVE_INFINITY) {\r\n                    label.style.marginLeft = -this.coords.big_x[i] + \"%\";\r\n                }\r\n            }\r\n        },\r\n\r\n        // Collisions Calc Beta\r\n        // TODO: Refactor then have plenty of time\r\n        calcGridCollision: function (step, start, finish) {\r\n            var i, next_i, label,\r\n                num = this.coords.big_num;\r\n\r\n            for (i = 0; i < num; i += step) {\r\n                next_i = i + (step / 2);\r\n                if (next_i >= num) {\r\n                    break;\r\n                }\r\n\r\n                label = this.$cache.grid_labels[next_i][0];\r\n\r\n                if (finish[i] <= start[next_i]) {\r\n                    label.style.visibility = \"visible\";\r\n                } else {\r\n                    label.style.visibility = \"hidden\";\r\n                }\r\n            }\r\n        },\r\n\r\n        calcGridMargin: function () {\r\n            if (!this.options.grid_margin) {\r\n                return;\r\n            }\r\n\r\n            this.coords.w_rs = this.$cache.rs.outerWidth(false);\r\n            if (!this.coords.w_rs) {\r\n                return;\r\n            }\r\n\r\n            if (this.options.type === \"single\") {\r\n                this.coords.w_handle = this.$cache.s_single.outerWidth(false);\r\n            } else {\r\n                this.coords.w_handle = this.$cache.s_from.outerWidth(false);\r\n            }\r\n            this.coords.p_handle = this.toFixed(this.coords.w_handle  / this.coords.w_rs * 100);\r\n            this.coords.grid_gap = this.toFixed((this.coords.p_handle / 2) - 0.1);\r\n\r\n            this.$cache.grid[0].style.width = this.toFixed(100 - this.coords.p_handle) + \"%\";\r\n            this.$cache.grid[0].style.left = this.coords.grid_gap + \"%\";\r\n        },\r\n\r\n\r\n\r\n        // =============================================================================================================\r\n        // Public methods\r\n\r\n        update: function (options) {\r\n            if (!this.input) {\r\n                return;\r\n            }\r\n\r\n            this.is_update = true;\r\n\r\n            this.options.from = this.result.from;\r\n            this.options.to = this.result.to;\r\n            this.update_check.from = this.result.from;\r\n            this.update_check.to = this.result.to;\r\n\r\n            this.options = $.extend(this.options, options);\r\n            this.validate();\r\n            this.updateResult(options);\r\n\r\n            this.toggleInput();\r\n            this.remove();\r\n            this.init(true);\r\n        },\r\n\r\n        reset: function () {\r\n            if (!this.input) {\r\n                return;\r\n            }\r\n\r\n            this.updateResult();\r\n            this.update();\r\n        },\r\n\r\n        destroy: function () {\r\n            if (!this.input) {\r\n                return;\r\n            }\r\n\r\n            this.toggleInput();\r\n            this.$cache.input.prop(\"readonly\", false);\r\n            $.data(this.input, \"ionRangeSlider\", null);\r\n\r\n            this.remove();\r\n            this.input = null;\r\n            this.options = null;\r\n        }\r\n    };\r\n\r\n    $.fn.ionRangeSlider = function (options) {\r\n        return this.each(function() {\r\n            if (!$.data(this, \"ionRangeSlider\")) {\r\n                $.data(this, \"ionRangeSlider\", new IonRangeSlider(this, options, plugin_count++));\r\n            }\r\n        });\r\n    };\r\n\r\n\r\n\r\n    // =================================================================================================================\r\n    // http://paulirish.com/2011/requestanimationframe-for-smart-animating/\r\n    // http://my.opera.com/emoller/blog/2011/12/20/requestanimationframe-for-smart-er-animating\r\n\r\n    // requestAnimationFrame polyfill by Erik Möller. fixes from Paul Irish and Tino Zijdel\r\n\r\n    // MIT license\r\n\r\n    (function() {\r\n        var lastTime = 0;\r\n        var vendors = ['ms', 'moz', 'webkit', 'o'];\r\n        for(var x = 0; x < vendors.length && !window.requestAnimationFrame; ++x) {\r\n            window.requestAnimationFrame = window[vendors[x]+'RequestAnimationFrame'];\r\n            window.cancelAnimationFrame = window[vendors[x]+'CancelAnimationFrame']\r\n                || window[vendors[x]+'CancelRequestAnimationFrame'];\r\n        }\r\n\r\n        if (!window.requestAnimationFrame)\r\n            window.requestAnimationFrame = function(callback, element) {\r\n                var currTime = new Date().getTime();\r\n                var timeToCall = Math.max(0, 16 - (currTime - lastTime));\r\n                var id = window.setTimeout(function() { callback(currTime + timeToCall); },\r\n                    timeToCall);\r\n                lastTime = currTime + timeToCall;\r\n                return id;\r\n            };\r\n\r\n        if (!window.cancelAnimationFrame)\r\n            window.cancelAnimationFrame = function(id) {\r\n                clearTimeout(id);\r\n            };\r\n    }());\r\n\r\n}));\r\n","// ==================================================\r\n// fancyBox v3.5.7\r\n//\r\n// Licensed GPLv3 for open source use\r\n// or fancyBox Commercial License for commercial use\r\n//\r\n// http://fancyapps.com/fancybox/\r\n// Copyright 2019 fancyApps\r\n//\r\n// ==================================================\r\n!function(t,e,n,o){\"use strict\";function i(t,e){var o,i,a,s=[],r=0;t&&t.isDefaultPrevented()||(t.preventDefault(),e=e||{},t&&t.data&&(e=h(t.data.options,e)),o=e.$target||n(t.currentTarget).trigger(\"blur\"),(a=n.fancybox.getInstance())&&a.$trigger&&a.$trigger.is(o)||(e.selector?s=n(e.selector):(i=o.attr(\"data-fancybox\")||\"\",i?(s=t.data?t.data.items:[],s=s.length?s.filter('[data-fancybox=\"'+i+'\"]'):n('[data-fancybox=\"'+i+'\"]')):s=[o]),r=n(s).index(o),r<0&&(r=0),a=n.fancybox.open(s,e,r),a.$trigger=o))}if(t.console=t.console||{info:function(t){}},n){if(n.fn.fancybox)return void console.info(\"fancyBox already initialized\");var a={closeExisting:!1,loop:!1,gutter:50,keyboard:!0,preventCaptionOverlap:!0,arrows:!0,infobar:!0,smallBtn:\"auto\",toolbar:\"auto\",buttons:[\"zoom\",\"slideShow\",\"thumbs\",\"close\"],idleTime:3,protect:!1,modal:!1,image:{preload:!1},ajax:{settings:{data:{fancybox:!0}}},iframe:{tpl:'<iframe id=\"fancybox-frame{rnd}\" name=\"fancybox-frame{rnd}\" class=\"fancybox-iframe\" allowfullscreen=\"allowfullscreen\" allow=\"autoplay; fullscreen\" src=\"\"></iframe>',preload:!0,css:{},attr:{scrolling:\"auto\"}},video:{tpl:'<video class=\"fancybox-video\" controls controlsList=\"nodownload\" poster=\"{{poster}}\"><source src=\"{{src}}\" type=\"{{format}}\" />Sorry, your browser doesn\\'t support embedded videos, <a href=\"{{src}}\">download</a> and watch with your favorite video player!</video>',format:\"\",autoStart:!0},defaultType:\"image\",animationEffect:\"zoom\",animationDuration:366,zoomOpacity:\"auto\",transitionEffect:\"fade\",transitionDuration:366,slideClass:\"\",baseClass:\"\",baseTpl:'<div class=\"fancybox-container\" role=\"dialog\" tabindex=\"-1\"><div class=\"fancybox-bg\"></div><div class=\"fancybox-inner\"><div class=\"fancybox-infobar\"><span data-fancybox-index></span>&nbsp;/&nbsp;<span data-fancybox-count></span></div><div class=\"fancybox-toolbar\">{{buttons}}</div><div class=\"fancybox-navigation\">{{arrows}}</div><div class=\"fancybox-stage\"></div><div class=\"fancybox-caption\"><div class=\"fancybox-caption__body\"></div></div></div></div>',spinnerTpl:'<div class=\"fancybox-loading\"></div>',errorTpl:'<div class=\"fancybox-error\"><p>{{ERROR}}</p></div>',btnTpl:{download:'<a download data-fancybox-download class=\"fancybox-button fancybox-button--download\" title=\"{{DOWNLOAD}}\" href=\"javascript:;\"><svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><path d=\"M18.62 17.09V19H5.38v-1.91zm-2.97-6.96L17 11.45l-5 4.87-5-4.87 1.36-1.32 2.68 2.64V5h1.92v7.77z\"/></svg></a>',zoom:'<button data-fancybox-zoom class=\"fancybox-button fancybox-button--zoom\" title=\"{{ZOOM}}\"><svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><path d=\"M18.7 17.3l-3-3a5.9 5.9 0 0 0-.6-7.6 5.9 5.9 0 0 0-8.4 0 5.9 5.9 0 0 0 0 8.4 5.9 5.9 0 0 0 7.7.7l3 3a1 1 0 0 0 1.3 0c.4-.5.4-1 0-1.5zM8.1 13.8a4 4 0 0 1 0-5.7 4 4 0 0 1 5.7 0 4 4 0 0 1 0 5.7 4 4 0 0 1-5.7 0z\"/></svg></button>',close:'<button data-fancybox-close class=\"fancybox-button fancybox-button--close\" title=\"{{CLOSE}}\"><svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><path d=\"M12 10.6L6.6 5.2 5.2 6.6l5.4 5.4-5.4 5.4 1.4 1.4 5.4-5.4 5.4 5.4 1.4-1.4-5.4-5.4 5.4-5.4-1.4-1.4-5.4 5.4z\"/></svg></button>',arrowLeft:'<button data-fancybox-prev class=\"fancybox-button fancybox-button--arrow_left\" title=\"{{PREV}}\"><div><svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><path d=\"M11.28 15.7l-1.34 1.37L5 12l4.94-5.07 1.34 1.38-2.68 2.72H19v1.94H8.6z\"/></svg></div></button>',arrowRight:'<button data-fancybox-next class=\"fancybox-button fancybox-button--arrow_right\" title=\"{{NEXT}}\"><div><svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><path d=\"M15.4 12.97l-2.68 2.72 1.34 1.38L19 12l-4.94-5.07-1.34 1.38 2.68 2.72H5v1.94z\"/></svg></div></button>',smallBtn:'<button type=\"button\" data-fancybox-close class=\"fancybox-button fancybox-close-small\" title=\"{{CLOSE}}\"><svg xmlns=\"http://www.w3.org/2000/svg\" version=\"1\" viewBox=\"0 0 24 24\"><path d=\"M13 12l5-5-1-1-5 5-5-5-1 1 5 5-5 5 1 1 5-5 5 5 1-1z\"/></svg></button>'},parentEl:\"body\",hideScrollbar:!0,autoFocus:!0,backFocus:!0,trapFocus:!0,fullScreen:{autoStart:!1},touch:{vertical:!0,momentum:!0},hash:null,media:{},slideShow:{autoStart:!1,speed:3e3},thumbs:{autoStart:!1,hideOnClose:!0,parentEl:\".fancybox-container\",axis:\"y\"},wheel:\"auto\",onInit:n.noop,beforeLoad:n.noop,afterLoad:n.noop,beforeShow:n.noop,afterShow:n.noop,beforeClose:n.noop,afterClose:n.noop,onActivate:n.noop,onDeactivate:n.noop,clickContent:function(t,e){return\"image\"===t.type&&\"zoom\"},clickSlide:\"close\",clickOutside:\"close\",dblclickContent:!1,dblclickSlide:!1,dblclickOutside:!1,mobile:{preventCaptionOverlap:!1,idleTime:!1,clickContent:function(t,e){return\"image\"===t.type&&\"toggleControls\"},clickSlide:function(t,e){return\"image\"===t.type?\"toggleControls\":\"close\"},dblclickContent:function(t,e){return\"image\"===t.type&&\"zoom\"},dblclickSlide:function(t,e){return\"image\"===t.type&&\"zoom\"}},lang:\"en\",i18n:{en:{CLOSE:\"Close\",NEXT:\"Next\",PREV:\"Previous\",ERROR:\"The requested content cannot be loaded. <br/> Please try again later.\",PLAY_START:\"Start slideshow\",PLAY_STOP:\"Pause slideshow\",FULL_SCREEN:\"Full screen\",THUMBS:\"Thumbnails\",DOWNLOAD:\"Download\",SHARE:\"Share\",ZOOM:\"Zoom\"},de:{CLOSE:\"Schlie&szlig;en\",NEXT:\"Weiter\",PREV:\"Zur&uuml;ck\",ERROR:\"Die angeforderten Daten konnten nicht geladen werden. <br/> Bitte versuchen Sie es sp&auml;ter nochmal.\",PLAY_START:\"Diaschau starten\",PLAY_STOP:\"Diaschau beenden\",FULL_SCREEN:\"Vollbild\",THUMBS:\"Vorschaubilder\",DOWNLOAD:\"Herunterladen\",SHARE:\"Teilen\",ZOOM:\"Vergr&ouml;&szlig;ern\"}}},s=n(t),r=n(e),c=0,l=function(t){return t&&t.hasOwnProperty&&t instanceof n},d=function(){return t.requestAnimationFrame||t.webkitRequestAnimationFrame||t.mozRequestAnimationFrame||t.oRequestAnimationFrame||function(e){return t.setTimeout(e,1e3/60)}}(),u=function(){return t.cancelAnimationFrame||t.webkitCancelAnimationFrame||t.mozCancelAnimationFrame||t.oCancelAnimationFrame||function(e){t.clearTimeout(e)}}(),f=function(){var t,n=e.createElement(\"fakeelement\"),o={transition:\"transitionend\",OTransition:\"oTransitionEnd\",MozTransition:\"transitionend\",WebkitTransition:\"webkitTransitionEnd\"};for(t in o)if(void 0!==n.style[t])return o[t];return\"transitionend\"}(),p=function(t){return t&&t.length&&t[0].offsetHeight},h=function(t,e){var o=n.extend(!0,{},t,e);return n.each(e,function(t,e){n.isArray(e)&&(o[t]=e)}),o},g=function(t){var o,i;return!(!t||t.ownerDocument!==e)&&(n(\".fancybox-container\").css(\"pointer-events\",\"none\"),o={x:t.getBoundingClientRect().left+t.offsetWidth/2,y:t.getBoundingClientRect().top+t.offsetHeight/2},i=e.elementFromPoint(o.x,o.y)===t,n(\".fancybox-container\").css(\"pointer-events\",\"\"),i)},b=function(t,e,o){var i=this;i.opts=h({index:o},n.fancybox.defaults),n.isPlainObject(e)&&(i.opts=h(i.opts,e)),n.fancybox.isMobile&&(i.opts=h(i.opts,i.opts.mobile)),i.id=i.opts.id||++c,i.currIndex=parseInt(i.opts.index,10)||0,i.prevIndex=null,i.prevPos=null,i.currPos=0,i.firstRun=!0,i.group=[],i.slides={},i.addContent(t),i.group.length&&i.init()};n.extend(b.prototype,{init:function(){var o,i,a=this,s=a.group[a.currIndex],r=s.opts;r.closeExisting&&n.fancybox.close(!0),n(\"body\").addClass(\"fancybox-active\"),!n.fancybox.getInstance()&&!1!==r.hideScrollbar&&!n.fancybox.isMobile&&e.body.scrollHeight>t.innerHeight&&(n(\"head\").append('<style id=\"fancybox-style-noscroll\" type=\"text/css\">.compensate-for-scrollbar{margin-right:'+(t.innerWidth-e.documentElement.clientWidth)+\"px;}</style>\"),n(\"body\").addClass(\"compensate-for-scrollbar\")),i=\"\",n.each(r.buttons,function(t,e){i+=r.btnTpl[e]||\"\"}),o=n(a.translate(a,r.baseTpl.replace(\"{{buttons}}\",i).replace(\"{{arrows}}\",r.btnTpl.arrowLeft+r.btnTpl.arrowRight))).attr(\"id\",\"fancybox-container-\"+a.id).addClass(r.baseClass).data(\"FancyBox\",a).appendTo(r.parentEl),a.$refs={container:o},[\"bg\",\"inner\",\"infobar\",\"toolbar\",\"stage\",\"caption\",\"navigation\"].forEach(function(t){a.$refs[t]=o.find(\".fancybox-\"+t)}),a.trigger(\"onInit\"),a.activate(),a.jumpTo(a.currIndex)},translate:function(t,e){var n=t.opts.i18n[t.opts.lang]||t.opts.i18n.en;return e.replace(/\\{\\{(\\w+)\\}\\}/g,function(t,e){return void 0===n[e]?t:n[e]})},addContent:function(t){var e,o=this,i=n.makeArray(t);n.each(i,function(t,e){var i,a,s,r,c,l={},d={};n.isPlainObject(e)?(l=e,d=e.opts||e):\"object\"===n.type(e)&&n(e).length?(i=n(e),d=i.data()||{},d=n.extend(!0,{},d,d.options),d.$orig=i,l.src=o.opts.src||d.src||i.attr(\"href\"),l.type||l.src||(l.type=\"inline\",l.src=e)):l={type:\"html\",src:e+\"\"},l.opts=n.extend(!0,{},o.opts,d),n.isArray(d.buttons)&&(l.opts.buttons=d.buttons),n.fancybox.isMobile&&l.opts.mobile&&(l.opts=h(l.opts,l.opts.mobile)),a=l.type||l.opts.type,r=l.src||\"\",!a&&r&&((s=r.match(/\\.(mp4|mov|ogv|webm)((\\?|#).*)?$/i))?(a=\"video\",l.opts.video.format||(l.opts.video.format=\"video/\"+(\"ogv\"===s[1]?\"ogg\":s[1]))):r.match(/(^data:image\\/[a-z0-9+\\/=]*,)|(\\.(jp(e|g|eg)|gif|png|bmp|webp|svg|ico)((\\?|#).*)?$)/i)?a=\"image\":r.match(/\\.(pdf)((\\?|#).*)?$/i)?(a=\"iframe\",l=n.extend(!0,l,{contentType:\"pdf\",opts:{iframe:{preload:!1}}})):\"#\"===r.charAt(0)&&(a=\"inline\")),a?l.type=a:o.trigger(\"objectNeedsType\",l),l.contentType||(l.contentType=n.inArray(l.type,[\"html\",\"inline\",\"ajax\"])>-1?\"html\":l.type),l.index=o.group.length,\"auto\"==l.opts.smallBtn&&(l.opts.smallBtn=n.inArray(l.type,[\"html\",\"inline\",\"ajax\"])>-1),\"auto\"===l.opts.toolbar&&(l.opts.toolbar=!l.opts.smallBtn),l.$thumb=l.opts.$thumb||null,l.opts.$trigger&&l.index===o.opts.index&&(l.$thumb=l.opts.$trigger.find(\"img:first\"),l.$thumb.length&&(l.opts.$orig=l.opts.$trigger)),l.$thumb&&l.$thumb.length||!l.opts.$orig||(l.$thumb=l.opts.$orig.find(\"img:first\")),l.$thumb&&!l.$thumb.length&&(l.$thumb=null),l.thumb=l.opts.thumb||(l.$thumb?l.$thumb[0].src:null),\"function\"===n.type(l.opts.caption)&&(l.opts.caption=l.opts.caption.apply(e,[o,l])),\"function\"===n.type(o.opts.caption)&&(l.opts.caption=o.opts.caption.apply(e,[o,l])),l.opts.caption instanceof n||(l.opts.caption=void 0===l.opts.caption?\"\":l.opts.caption+\"\"),\"ajax\"===l.type&&(c=r.split(/\\s+/,2),c.length>1&&(l.src=c.shift(),l.opts.filter=c.shift())),l.opts.modal&&(l.opts=n.extend(!0,l.opts,{trapFocus:!0,infobar:0,toolbar:0,smallBtn:0,keyboard:0,slideShow:0,fullScreen:0,thumbs:0,touch:0,clickContent:!1,clickSlide:!1,clickOutside:!1,dblclickContent:!1,dblclickSlide:!1,dblclickOutside:!1})),o.group.push(l)}),Object.keys(o.slides).length&&(o.updateControls(),(e=o.Thumbs)&&e.isActive&&(e.create(),e.focus()))},addEvents:function(){var e=this;e.removeEvents(),e.$refs.container.on(\"click.fb-close\",\"[data-fancybox-close]\",function(t){t.stopPropagation(),t.preventDefault(),e.close(t)}).on(\"touchstart.fb-prev click.fb-prev\",\"[data-fancybox-prev]\",function(t){t.stopPropagation(),t.preventDefault(),e.previous()}).on(\"touchstart.fb-next click.fb-next\",\"[data-fancybox-next]\",function(t){t.stopPropagation(),t.preventDefault(),e.next()}).on(\"click.fb\",\"[data-fancybox-zoom]\",function(t){e[e.isScaledDown()?\"scaleToActual\":\"scaleToFit\"]()}),s.on(\"orientationchange.fb resize.fb\",function(t){t&&t.originalEvent&&\"resize\"===t.originalEvent.type?(e.requestId&&u(e.requestId),e.requestId=d(function(){e.update(t)})):(e.current&&\"iframe\"===e.current.type&&e.$refs.stage.hide(),setTimeout(function(){e.$refs.stage.show(),e.update(t)},n.fancybox.isMobile?600:250))}),r.on(\"keydown.fb\",function(t){var o=n.fancybox?n.fancybox.getInstance():null,i=o.current,a=t.keyCode||t.which;if(9==a)return void(i.opts.trapFocus&&e.focus(t));if(!(!i.opts.keyboard||t.ctrlKey||t.altKey||t.shiftKey||n(t.target).is(\"input,textarea,video,audio,select\")))return 8===a||27===a?(t.preventDefault(),void e.close(t)):37===a||38===a?(t.preventDefault(),void e.previous()):39===a||40===a?(t.preventDefault(),void e.next()):void e.trigger(\"afterKeydown\",t,a)}),e.group[e.currIndex].opts.idleTime&&(e.idleSecondsCounter=0,r.on(\"mousemove.fb-idle mouseleave.fb-idle mousedown.fb-idle touchstart.fb-idle touchmove.fb-idle scroll.fb-idle keydown.fb-idle\",function(t){e.idleSecondsCounter=0,e.isIdle&&e.showControls(),e.isIdle=!1}),e.idleInterval=t.setInterval(function(){++e.idleSecondsCounter>=e.group[e.currIndex].opts.idleTime&&!e.isDragging&&(e.isIdle=!0,e.idleSecondsCounter=0,e.hideControls())},1e3))},removeEvents:function(){var e=this;s.off(\"orientationchange.fb resize.fb\"),r.off(\"keydown.fb .fb-idle\"),this.$refs.container.off(\".fb-close .fb-prev .fb-next\"),e.idleInterval&&(t.clearInterval(e.idleInterval),e.idleInterval=null)},previous:function(t){return this.jumpTo(this.currPos-1,t)},next:function(t){return this.jumpTo(this.currPos+1,t)},jumpTo:function(t,e){var o,i,a,s,r,c,l,d,u,f=this,h=f.group.length;if(!(f.isDragging||f.isClosing||f.isAnimating&&f.firstRun)){if(t=parseInt(t,10),!(a=f.current?f.current.opts.loop:f.opts.loop)&&(t<0||t>=h))return!1;if(o=f.firstRun=!Object.keys(f.slides).length,r=f.current,f.prevIndex=f.currIndex,f.prevPos=f.currPos,s=f.createSlide(t),h>1&&((a||s.index<h-1)&&f.createSlide(t+1),(a||s.index>0)&&f.createSlide(t-1)),f.current=s,f.currIndex=s.index,f.currPos=s.pos,f.trigger(\"beforeShow\",o),f.updateControls(),s.forcedDuration=void 0,n.isNumeric(e)?s.forcedDuration=e:e=s.opts[o?\"animationDuration\":\"transitionDuration\"],e=parseInt(e,10),i=f.isMoved(s),s.$slide.addClass(\"fancybox-slide--current\"),o)return s.opts.animationEffect&&e&&f.$refs.container.css(\"transition-duration\",e+\"ms\"),f.$refs.container.addClass(\"fancybox-is-open\").trigger(\"focus\"),f.loadSlide(s),void f.preload(\"image\");c=n.fancybox.getTranslate(r.$slide),l=n.fancybox.getTranslate(f.$refs.stage),n.each(f.slides,function(t,e){n.fancybox.stop(e.$slide,!0)}),r.pos!==s.pos&&(r.isComplete=!1),r.$slide.removeClass(\"fancybox-slide--complete fancybox-slide--current\"),i?(u=c.left-(r.pos*c.width+r.pos*r.opts.gutter),n.each(f.slides,function(t,o){o.$slide.removeClass(\"fancybox-animated\").removeClass(function(t,e){return(e.match(/(^|\\s)fancybox-fx-\\S+/g)||[]).join(\" \")});var i=o.pos*c.width+o.pos*o.opts.gutter;n.fancybox.setTranslate(o.$slide,{top:0,left:i-l.left+u}),o.pos!==s.pos&&o.$slide.addClass(\"fancybox-slide--\"+(o.pos>s.pos?\"next\":\"previous\")),p(o.$slide),n.fancybox.animate(o.$slide,{top:0,left:(o.pos-s.pos)*c.width+(o.pos-s.pos)*o.opts.gutter},e,function(){o.$slide.css({transform:\"\",opacity:\"\"}).removeClass(\"fancybox-slide--next fancybox-slide--previous\"),o.pos===f.currPos&&f.complete()})})):e&&s.opts.transitionEffect&&(d=\"fancybox-animated fancybox-fx-\"+s.opts.transitionEffect,r.$slide.addClass(\"fancybox-slide--\"+(r.pos>s.pos?\"next\":\"previous\")),n.fancybox.animate(r.$slide,d,e,function(){r.$slide.removeClass(d).removeClass(\"fancybox-slide--next fancybox-slide--previous\")},!1)),s.isLoaded?f.revealContent(s):f.loadSlide(s),f.preload(\"image\")}},createSlide:function(t){var e,o,i=this;return o=t%i.group.length,o=o<0?i.group.length+o:o,!i.slides[t]&&i.group[o]&&(e=n('<div class=\"fancybox-slide\"></div>').appendTo(i.$refs.stage),i.slides[t]=n.extend(!0,{},i.group[o],{pos:t,$slide:e,isLoaded:!1}),i.updateSlide(i.slides[t])),i.slides[t]},scaleToActual:function(t,e,o){var i,a,s,r,c,l=this,d=l.current,u=d.$content,f=n.fancybox.getTranslate(d.$slide).width,p=n.fancybox.getTranslate(d.$slide).height,h=d.width,g=d.height;l.isAnimating||l.isMoved()||!u||\"image\"!=d.type||!d.isLoaded||d.hasError||(l.isAnimating=!0,n.fancybox.stop(u),t=void 0===t?.5*f:t,e=void 0===e?.5*p:e,i=n.fancybox.getTranslate(u),i.top-=n.fancybox.getTranslate(d.$slide).top,i.left-=n.fancybox.getTranslate(d.$slide).left,r=h/i.width,c=g/i.height,a=.5*f-.5*h,s=.5*p-.5*g,h>f&&(a=i.left*r-(t*r-t),a>0&&(a=0),a<f-h&&(a=f-h)),g>p&&(s=i.top*c-(e*c-e),s>0&&(s=0),s<p-g&&(s=p-g)),l.updateCursor(h,g),n.fancybox.animate(u,{top:s,left:a,scaleX:r,scaleY:c},o||366,function(){l.isAnimating=!1}),l.SlideShow&&l.SlideShow.isActive&&l.SlideShow.stop())},scaleToFit:function(t){var e,o=this,i=o.current,a=i.$content;o.isAnimating||o.isMoved()||!a||\"image\"!=i.type||!i.isLoaded||i.hasError||(o.isAnimating=!0,n.fancybox.stop(a),e=o.getFitPos(i),o.updateCursor(e.width,e.height),n.fancybox.animate(a,{top:e.top,left:e.left,scaleX:e.width/a.width(),scaleY:e.height/a.height()},t||366,function(){o.isAnimating=!1}))},getFitPos:function(t){var e,o,i,a,s=this,r=t.$content,c=t.$slide,l=t.width||t.opts.width,d=t.height||t.opts.height,u={};return!!(t.isLoaded&&r&&r.length)&&(e=n.fancybox.getTranslate(s.$refs.stage).width,o=n.fancybox.getTranslate(s.$refs.stage).height,e-=parseFloat(c.css(\"paddingLeft\"))+parseFloat(c.css(\"paddingRight\"))+parseFloat(r.css(\"marginLeft\"))+parseFloat(r.css(\"marginRight\")),o-=parseFloat(c.css(\"paddingTop\"))+parseFloat(c.css(\"paddingBottom\"))+parseFloat(r.css(\"marginTop\"))+parseFloat(r.css(\"marginBottom\")),l&&d||(l=e,d=o),i=Math.min(1,e/l,o/d),l*=i,d*=i,l>e-.5&&(l=e),d>o-.5&&(d=o),\"image\"===t.type?(u.top=Math.floor(.5*(o-d))+parseFloat(c.css(\"paddingTop\")),u.left=Math.floor(.5*(e-l))+parseFloat(c.css(\"paddingLeft\"))):\"video\"===t.contentType&&(a=t.opts.width&&t.opts.height?l/d:t.opts.ratio||16/9,d>l/a?d=l/a:l>d*a&&(l=d*a)),u.width=l,u.height=d,u)},update:function(t){var e=this;n.each(e.slides,function(n,o){e.updateSlide(o,t)})},updateSlide:function(t,e){var o=this,i=t&&t.$content,a=t.width||t.opts.width,s=t.height||t.opts.height,r=t.$slide;o.adjustCaption(t),i&&(a||s||\"video\"===t.contentType)&&!t.hasError&&(n.fancybox.stop(i),n.fancybox.setTranslate(i,o.getFitPos(t)),t.pos===o.currPos&&(o.isAnimating=!1,o.updateCursor())),o.adjustLayout(t),r.length&&(r.trigger(\"refresh\"),t.pos===o.currPos&&o.$refs.toolbar.add(o.$refs.navigation.find(\".fancybox-button--arrow_right\")).toggleClass(\"compensate-for-scrollbar\",r.get(0).scrollHeight>r.get(0).clientHeight)),o.trigger(\"onUpdate\",t,e)},centerSlide:function(t){var e=this,o=e.current,i=o.$slide;!e.isClosing&&o&&(i.siblings().css({transform:\"\",opacity:\"\"}),i.parent().children().removeClass(\"fancybox-slide--previous fancybox-slide--next\"),n.fancybox.animate(i,{top:0,left:0,opacity:1},void 0===t?0:t,function(){i.css({transform:\"\",opacity:\"\"}),o.isComplete||e.complete()},!1))},isMoved:function(t){var e,o,i=t||this.current;return!!i&&(o=n.fancybox.getTranslate(this.$refs.stage),e=n.fancybox.getTranslate(i.$slide),!i.$slide.hasClass(\"fancybox-animated\")&&(Math.abs(e.top-o.top)>.5||Math.abs(e.left-o.left)>.5))},updateCursor:function(t,e){var o,i,a=this,s=a.current,r=a.$refs.container;s&&!a.isClosing&&a.Guestures&&(r.removeClass(\"fancybox-is-zoomable fancybox-can-zoomIn fancybox-can-zoomOut fancybox-can-swipe fancybox-can-pan\"),o=a.canPan(t,e),i=!!o||a.isZoomable(),r.toggleClass(\"fancybox-is-zoomable\",i),n(\"[data-fancybox-zoom]\").prop(\"disabled\",!i),o?r.addClass(\"fancybox-can-pan\"):i&&(\"zoom\"===s.opts.clickContent||n.isFunction(s.opts.clickContent)&&\"zoom\"==s.opts.clickContent(s))?r.addClass(\"fancybox-can-zoomIn\"):s.opts.touch&&(s.opts.touch.vertical||a.group.length>1)&&\"video\"!==s.contentType&&r.addClass(\"fancybox-can-swipe\"))},isZoomable:function(){var t,e=this,n=e.current;if(n&&!e.isClosing&&\"image\"===n.type&&!n.hasError){if(!n.isLoaded)return!0;if((t=e.getFitPos(n))&&(n.width>t.width||n.height>t.height))return!0}return!1},isScaledDown:function(t,e){var o=this,i=!1,a=o.current,s=a.$content;return void 0!==t&&void 0!==e?i=t<a.width&&e<a.height:s&&(i=n.fancybox.getTranslate(s),i=i.width<a.width&&i.height<a.height),i},canPan:function(t,e){var o=this,i=o.current,a=null,s=!1;return\"image\"===i.type&&(i.isComplete||t&&e)&&!i.hasError&&(s=o.getFitPos(i),void 0!==t&&void 0!==e?a={width:t,height:e}:i.isComplete&&(a=n.fancybox.getTranslate(i.$content)),a&&s&&(s=Math.abs(a.width-s.width)>1.5||Math.abs(a.height-s.height)>1.5)),s},loadSlide:function(t){var e,o,i,a=this;if(!t.isLoading&&!t.isLoaded){if(t.isLoading=!0,!1===a.trigger(\"beforeLoad\",t))return t.isLoading=!1,!1;switch(e=t.type,o=t.$slide,o.off(\"refresh\").trigger(\"onReset\").addClass(t.opts.slideClass),e){case\"image\":a.setImage(t);break;case\"iframe\":a.setIframe(t);break;case\"html\":a.setContent(t,t.src||t.content);break;case\"video\":a.setContent(t,t.opts.video.tpl.replace(/\\{\\{src\\}\\}/gi,t.src).replace(\"{{format}}\",t.opts.videoFormat||t.opts.video.format||\"\").replace(\"{{poster}}\",t.thumb||\"\"));break;case\"inline\":n(t.src).length?a.setContent(t,n(t.src)):a.setError(t);break;case\"ajax\":a.showLoading(t),i=n.ajax(n.extend({},t.opts.ajax.settings,{url:t.src,success:function(e,n){\"success\"===n&&a.setContent(t,e)},error:function(e,n){e&&\"abort\"!==n&&a.setError(t)}})),o.one(\"onReset\",function(){i.abort()});break;default:a.setError(t)}return!0}},setImage:function(t){var o,i=this;setTimeout(function(){var e=t.$image;i.isClosing||!t.isLoading||e&&e.length&&e[0].complete||t.hasError||i.showLoading(t)},50),i.checkSrcset(t),t.$content=n('<div class=\"fancybox-content\"></div>').addClass(\"fancybox-is-hidden\").appendTo(t.$slide.addClass(\"fancybox-slide--image\")),!1!==t.opts.preload&&t.opts.width&&t.opts.height&&t.thumb&&(t.width=t.opts.width,t.height=t.opts.height,o=e.createElement(\"img\"),o.onerror=function(){n(this).remove(),t.$ghost=null},o.onload=function(){i.afterLoad(t)},t.$ghost=n(o).addClass(\"fancybox-image\").appendTo(t.$content).attr(\"src\",t.thumb)),i.setBigImage(t)},checkSrcset:function(e){var n,o,i,a,s=e.opts.srcset||e.opts.image.srcset;if(s){i=t.devicePixelRatio||1,a=t.innerWidth*i,o=s.split(\",\").map(function(t){var e={};return t.trim().split(/\\s+/).forEach(function(t,n){var o=parseInt(t.substring(0,t.length-1),10);if(0===n)return e.url=t;o&&(e.value=o,e.postfix=t[t.length-1])}),e}),o.sort(function(t,e){return t.value-e.value});for(var r=0;r<o.length;r++){var c=o[r];if(\"w\"===c.postfix&&c.value>=a||\"x\"===c.postfix&&c.value>=i){n=c;break}}!n&&o.length&&(n=o[o.length-1]),n&&(e.src=n.url,e.width&&e.height&&\"w\"==n.postfix&&(e.height=e.width/e.height*n.value,e.width=n.value),e.opts.srcset=s)}},setBigImage:function(t){var o=this,i=e.createElement(\"img\"),a=n(i);t.$image=a.one(\"error\",function(){o.setError(t)}).one(\"load\",function(){var e;t.$ghost||(o.resolveImageSlideSize(t,this.naturalWidth,this.naturalHeight),o.afterLoad(t)),o.isClosing||(t.opts.srcset&&(e=t.opts.sizes,e&&\"auto\"!==e||(e=(t.width/t.height>1&&s.width()/s.height()>1?\"100\":Math.round(t.width/t.height*100))+\"vw\"),a.attr(\"sizes\",e).attr(\"srcset\",t.opts.srcset)),t.$ghost&&setTimeout(function(){t.$ghost&&!o.isClosing&&t.$ghost.hide()},Math.min(300,Math.max(1e3,t.height/1600))),o.hideLoading(t))}).addClass(\"fancybox-image\").attr(\"src\",t.src).appendTo(t.$content),(i.complete||\"complete\"==i.readyState)&&a.naturalWidth&&a.naturalHeight?a.trigger(\"load\"):i.error&&a.trigger(\"error\")},resolveImageSlideSize:function(t,e,n){var o=parseInt(t.opts.width,10),i=parseInt(t.opts.height,10);t.width=e,t.height=n,o>0&&(t.width=o,t.height=Math.floor(o*n/e)),i>0&&(t.width=Math.floor(i*e/n),t.height=i)},setIframe:function(t){var e,o=this,i=t.opts.iframe,a=t.$slide;t.$content=n('<div class=\"fancybox-content'+(i.preload?\" fancybox-is-hidden\":\"\")+'\"></div>').css(i.css).appendTo(a),a.addClass(\"fancybox-slide--\"+t.contentType),t.$iframe=e=n(i.tpl.replace(/\\{rnd\\}/g,(new Date).getTime())).attr(i.attr).appendTo(t.$content),i.preload?(o.showLoading(t),e.on(\"load.fb error.fb\",function(e){this.isReady=1,t.$slide.trigger(\"refresh\"),o.afterLoad(t)}),a.on(\"refresh.fb\",function(){var n,o,s=t.$content,r=i.css.width,c=i.css.height;if(1===e[0].isReady){try{n=e.contents(),o=n.find(\"body\")}catch(t){}o&&o.length&&o.children().length&&(a.css(\"overflow\",\"visible\"),s.css({width:\"100%\",\"max-width\":\"100%\",height:\"9999px\"}),void 0===r&&(r=Math.ceil(Math.max(o[0].clientWidth,o.outerWidth(!0)))),s.css(\"width\",r||\"\").css(\"max-width\",\"\"),void 0===c&&(c=Math.ceil(Math.max(o[0].clientHeight,o.outerHeight(!0)))),s.css(\"height\",c||\"\"),a.css(\"overflow\",\"auto\")),s.removeClass(\"fancybox-is-hidden\")}})):o.afterLoad(t),e.attr(\"src\",t.src),a.one(\"onReset\",function(){try{n(this).find(\"iframe\").hide().unbind().attr(\"src\",\"//about:blank\")}catch(t){}n(this).off(\"refresh.fb\").empty(),t.isLoaded=!1,t.isRevealed=!1})},setContent:function(t,e){var o=this;o.isClosing||(o.hideLoading(t),t.$content&&n.fancybox.stop(t.$content),t.$slide.empty(),l(e)&&e.parent().length?((e.hasClass(\"fancybox-content\")||e.parent().hasClass(\"fancybox-content\"))&&e.parents(\".fancybox-slide\").trigger(\"onReset\"),t.$placeholder=n(\"<div>\").hide().insertAfter(e),e.css(\"display\",\"inline-block\")):t.hasError||(\"string\"===n.type(e)&&(e=n(\"<div>\").append(n.trim(e)).contents()),t.opts.filter&&(e=n(\"<div>\").html(e).find(t.opts.filter))),t.$slide.one(\"onReset\",function(){n(this).find(\"video,audio\").trigger(\"pause\"),t.$placeholder&&(t.$placeholder.after(e.removeClass(\"fancybox-content\").hide()).remove(),t.$placeholder=null),t.$smallBtn&&(t.$smallBtn.remove(),t.$smallBtn=null),t.hasError||(n(this).empty(),t.isLoaded=!1,t.isRevealed=!1)}),n(e).appendTo(t.$slide),n(e).is(\"video,audio\")&&(n(e).addClass(\"fancybox-video\"),n(e).wrap(\"<div></div>\"),t.contentType=\"video\",t.opts.width=t.opts.width||n(e).attr(\"width\"),t.opts.height=t.opts.height||n(e).attr(\"height\")),t.$content=t.$slide.children().filter(\"div,form,main,video,audio,article,.fancybox-content\").first(),t.$content.siblings().hide(),t.$content.length||(t.$content=t.$slide.wrapInner(\"<div></div>\").children().first()),t.$content.addClass(\"fancybox-content\"),t.$slide.addClass(\"fancybox-slide--\"+t.contentType),o.afterLoad(t))},setError:function(t){t.hasError=!0,t.$slide.trigger(\"onReset\").removeClass(\"fancybox-slide--\"+t.contentType).addClass(\"fancybox-slide--error\"),t.contentType=\"html\",this.setContent(t,this.translate(t,t.opts.errorTpl)),t.pos===this.currPos&&(this.isAnimating=!1)},showLoading:function(t){var e=this;(t=t||e.current)&&!t.$spinner&&(t.$spinner=n(e.translate(e,e.opts.spinnerTpl)).appendTo(t.$slide).hide().fadeIn(\"fast\"))},hideLoading:function(t){var e=this;(t=t||e.current)&&t.$spinner&&(t.$spinner.stop().remove(),delete t.$spinner)},afterLoad:function(t){var e=this;e.isClosing||(t.isLoading=!1,t.isLoaded=!0,e.trigger(\"afterLoad\",t),e.hideLoading(t),!t.opts.smallBtn||t.$smallBtn&&t.$smallBtn.length||(t.$smallBtn=n(e.translate(t,t.opts.btnTpl.smallBtn)).appendTo(t.$content)),t.opts.protect&&t.$content&&!t.hasError&&(t.$content.on(\"contextmenu.fb\",function(t){return 2==t.button&&t.preventDefault(),!0}),\"image\"===t.type&&n('<div class=\"fancybox-spaceball\"></div>').appendTo(t.$content)),e.adjustCaption(t),e.adjustLayout(t),t.pos===e.currPos&&e.updateCursor(),e.revealContent(t))},adjustCaption:function(t){var e,n=this,o=t||n.current,i=o.opts.caption,a=o.opts.preventCaptionOverlap,s=n.$refs.caption,r=!1;s.toggleClass(\"fancybox-caption--separate\",a),a&&i&&i.length&&(o.pos!==n.currPos?(e=s.clone().appendTo(s.parent()),e.children().eq(0).empty().html(i),r=e.outerHeight(!0),e.empty().remove()):n.$caption&&(r=n.$caption.outerHeight(!0)),o.$slide.css(\"padding-bottom\",r||\"\"))},adjustLayout:function(t){var e,n,o,i,a=this,s=t||a.current;s.isLoaded&&!0!==s.opts.disableLayoutFix&&(s.$content.css(\"margin-bottom\",\"\"),s.$content.outerHeight()>s.$slide.height()+.5&&(o=s.$slide[0].style[\"padding-bottom\"],i=s.$slide.css(\"padding-bottom\"),parseFloat(i)>0&&(e=s.$slide[0].scrollHeight,s.$slide.css(\"padding-bottom\",0),Math.abs(e-s.$slide[0].scrollHeight)<1&&(n=i),s.$slide.css(\"padding-bottom\",o))),s.$content.css(\"margin-bottom\",n))},revealContent:function(t){var e,o,i,a,s=this,r=t.$slide,c=!1,l=!1,d=s.isMoved(t),u=t.isRevealed;return t.isRevealed=!0,e=t.opts[s.firstRun?\"animationEffect\":\"transitionEffect\"],i=t.opts[s.firstRun?\"animationDuration\":\"transitionDuration\"],i=parseInt(void 0===t.forcedDuration?i:t.forcedDuration,10),!d&&t.pos===s.currPos&&i||(e=!1),\"zoom\"===e&&(t.pos===s.currPos&&i&&\"image\"===t.type&&!t.hasError&&(l=s.getThumbPos(t))?c=s.getFitPos(t):e=\"fade\"),\"zoom\"===e?(s.isAnimating=!0,c.scaleX=c.width/l.width,c.scaleY=c.height/l.height,a=t.opts.zoomOpacity,\"auto\"==a&&(a=Math.abs(t.width/t.height-l.width/l.height)>.1),a&&(l.opacity=.1,c.opacity=1),n.fancybox.setTranslate(t.$content.removeClass(\"fancybox-is-hidden\"),l),p(t.$content),void n.fancybox.animate(t.$content,c,i,function(){s.isAnimating=!1,s.complete()})):(s.updateSlide(t),e?(n.fancybox.stop(r),o=\"fancybox-slide--\"+(t.pos>=s.prevPos?\"next\":\"previous\")+\" fancybox-animated fancybox-fx-\"+e,r.addClass(o).removeClass(\"fancybox-slide--current\"),t.$content.removeClass(\"fancybox-is-hidden\"),p(r),\"image\"!==t.type&&t.$content.hide().show(0),void n.fancybox.animate(r,\"fancybox-slide--current\",i,function(){r.removeClass(o).css({transform:\"\",opacity:\"\"}),t.pos===s.currPos&&s.complete()},!0)):(t.$content.removeClass(\"fancybox-is-hidden\"),u||!d||\"image\"!==t.type||t.hasError||t.$content.hide().fadeIn(\"fast\"),void(t.pos===s.currPos&&s.complete())))},getThumbPos:function(t){var e,o,i,a,s,r=!1,c=t.$thumb;return!(!c||!g(c[0]))&&(e=n.fancybox.getTranslate(c),o=parseFloat(c.css(\"border-top-width\")||0),i=parseFloat(c.css(\"border-right-width\")||0),a=parseFloat(c.css(\"border-bottom-width\")||0),s=parseFloat(c.css(\"border-left-width\")||0),r={top:e.top+o,left:e.left+s,width:e.width-i-s,height:e.height-o-a,scaleX:1,scaleY:1},e.width>0&&e.height>0&&r)},complete:function(){var t,e=this,o=e.current,i={};!e.isMoved()&&o.isLoaded&&(o.isComplete||(o.isComplete=!0,o.$slide.siblings().trigger(\"onReset\"),e.preload(\"inline\"),p(o.$slide),o.$slide.addClass(\"fancybox-slide--complete\"),n.each(e.slides,function(t,o){o.pos>=e.currPos-1&&o.pos<=e.currPos+1?i[o.pos]=o:o&&(n.fancybox.stop(o.$slide),o.$slide.off().remove())}),e.slides=i),e.isAnimating=!1,e.updateCursor(),e.trigger(\"afterShow\"),o.opts.video.autoStart&&o.$slide.find(\"video,audio\").filter(\":visible:first\").trigger(\"play\").one(\"ended\",function(){Document.exitFullscreen?Document.exitFullscreen():this.webkitExitFullscreen&&this.webkitExitFullscreen(),e.next()}),o.opts.autoFocus&&\"html\"===o.contentType&&(t=o.$content.find(\"input[autofocus]:enabled:visible:first\"),t.length?t.trigger(\"focus\"):e.focus(null,!0)),o.$slide.scrollTop(0).scrollLeft(0))},preload:function(t){var e,n,o=this;o.group.length<2||(n=o.slides[o.currPos+1],e=o.slides[o.currPos-1],e&&e.type===t&&o.loadSlide(e),n&&n.type===t&&o.loadSlide(n))},focus:function(t,o){var i,a,s=this,r=[\"a[href]\",\"area[href]\",'input:not([disabled]):not([type=\"hidden\"]):not([aria-hidden])',\"select:not([disabled]):not([aria-hidden])\",\"textarea:not([disabled]):not([aria-hidden])\",\"button:not([disabled]):not([aria-hidden])\",\"iframe\",\"object\",\"embed\",\"video\",\"audio\",\"[contenteditable]\",'[tabindex]:not([tabindex^=\"-\"])'].join(\",\");s.isClosing||(i=!t&&s.current&&s.current.isComplete?s.current.$slide.find(\"*:visible\"+(o?\":not(.fancybox-close-small)\":\"\")):s.$refs.container.find(\"*:visible\"),i=i.filter(r).filter(function(){return\"hidden\"!==n(this).css(\"visibility\")&&!n(this).hasClass(\"disabled\")}),i.length?(a=i.index(e.activeElement),t&&t.shiftKey?(a<0||0==a)&&(t.preventDefault(),i.eq(i.length-1).trigger(\"focus\")):(a<0||a==i.length-1)&&(t&&t.preventDefault(),i.eq(0).trigger(\"focus\"))):s.$refs.container.trigger(\"focus\"))},activate:function(){var t=this;n(\".fancybox-container\").each(function(){var e=n(this).data(\"FancyBox\");e&&e.id!==t.id&&!e.isClosing&&(e.trigger(\"onDeactivate\"),e.removeEvents(),e.isVisible=!1)}),t.isVisible=!0,(t.current||t.isIdle)&&(t.update(),t.updateControls()),t.trigger(\"onActivate\"),t.addEvents()},close:function(t,e){var o,i,a,s,r,c,l,u=this,f=u.current,h=function(){u.cleanUp(t)};return!u.isClosing&&(u.isClosing=!0,!1===u.trigger(\"beforeClose\",t)?(u.isClosing=!1,d(function(){u.update()}),!1):(u.removeEvents(),a=f.$content,o=f.opts.animationEffect,i=n.isNumeric(e)?e:o?f.opts.animationDuration:0,f.$slide.removeClass(\"fancybox-slide--complete fancybox-slide--next fancybox-slide--previous fancybox-animated\"),!0!==t?n.fancybox.stop(f.$slide):o=!1,f.$slide.siblings().trigger(\"onReset\").remove(),i&&u.$refs.container.removeClass(\"fancybox-is-open\").addClass(\"fancybox-is-closing\").css(\"transition-duration\",i+\"ms\"),u.hideLoading(f),u.hideControls(!0),u.updateCursor(),\"zoom\"!==o||a&&i&&\"image\"===f.type&&!u.isMoved()&&!f.hasError&&(l=u.getThumbPos(f))||(o=\"fade\"),\"zoom\"===o?(n.fancybox.stop(a),s=n.fancybox.getTranslate(a),c={top:s.top,left:s.left,scaleX:s.width/l.width,scaleY:s.height/l.height,width:l.width,height:l.height},r=f.opts.zoomOpacity,\r\n\"auto\"==r&&(r=Math.abs(f.width/f.height-l.width/l.height)>.1),r&&(l.opacity=0),n.fancybox.setTranslate(a,c),p(a),n.fancybox.animate(a,l,i,h),!0):(o&&i?n.fancybox.animate(f.$slide.addClass(\"fancybox-slide--previous\").removeClass(\"fancybox-slide--current\"),\"fancybox-animated fancybox-fx-\"+o,i,h):!0===t?setTimeout(h,i):h(),!0)))},cleanUp:function(e){var o,i,a,s=this,r=s.current.opts.$orig;s.current.$slide.trigger(\"onReset\"),s.$refs.container.empty().remove(),s.trigger(\"afterClose\",e),s.current.opts.backFocus&&(r&&r.length&&r.is(\":visible\")||(r=s.$trigger),r&&r.length&&(i=t.scrollX,a=t.scrollY,r.trigger(\"focus\"),n(\"html, body\").scrollTop(a).scrollLeft(i))),s.current=null,o=n.fancybox.getInstance(),o?o.activate():(n(\"body\").removeClass(\"fancybox-active compensate-for-scrollbar\"),n(\"#fancybox-style-noscroll\").remove())},trigger:function(t,e){var o,i=Array.prototype.slice.call(arguments,1),a=this,s=e&&e.opts?e:a.current;if(s?i.unshift(s):s=a,i.unshift(a),n.isFunction(s.opts[t])&&(o=s.opts[t].apply(s,i)),!1===o)return o;\"afterClose\"!==t&&a.$refs?a.$refs.container.trigger(t+\".fb\",i):r.trigger(t+\".fb\",i)},updateControls:function(){var t=this,o=t.current,i=o.index,a=t.$refs.container,s=t.$refs.caption,r=o.opts.caption;o.$slide.trigger(\"refresh\"),r&&r.length?(t.$caption=s,s.children().eq(0).html(r)):t.$caption=null,t.hasHiddenControls||t.isIdle||t.showControls(),a.find(\"[data-fancybox-count]\").html(t.group.length),a.find(\"[data-fancybox-index]\").html(i+1),a.find(\"[data-fancybox-prev]\").prop(\"disabled\",!o.opts.loop&&i<=0),a.find(\"[data-fancybox-next]\").prop(\"disabled\",!o.opts.loop&&i>=t.group.length-1),\"image\"===o.type?a.find(\"[data-fancybox-zoom]\").show().end().find(\"[data-fancybox-download]\").attr(\"href\",o.opts.image.src||o.src).show():o.opts.toolbar&&a.find(\"[data-fancybox-download],[data-fancybox-zoom]\").hide(),n(e.activeElement).is(\":hidden,[disabled]\")&&t.$refs.container.trigger(\"focus\")},hideControls:function(t){var e=this,n=[\"infobar\",\"toolbar\",\"nav\"];!t&&e.current.opts.preventCaptionOverlap||n.push(\"caption\"),this.$refs.container.removeClass(n.map(function(t){return\"fancybox-show-\"+t}).join(\" \")),this.hasHiddenControls=!0},showControls:function(){var t=this,e=t.current?t.current.opts:t.opts,n=t.$refs.container;t.hasHiddenControls=!1,t.idleSecondsCounter=0,n.toggleClass(\"fancybox-show-toolbar\",!(!e.toolbar||!e.buttons)).toggleClass(\"fancybox-show-infobar\",!!(e.infobar&&t.group.length>1)).toggleClass(\"fancybox-show-caption\",!!t.$caption).toggleClass(\"fancybox-show-nav\",!!(e.arrows&&t.group.length>1)).toggleClass(\"fancybox-is-modal\",!!e.modal)},toggleControls:function(){this.hasHiddenControls?this.showControls():this.hideControls()}}),n.fancybox={version:\"3.5.7\",defaults:a,getInstance:function(t){var e=n('.fancybox-container:not(\".fancybox-is-closing\"):last').data(\"FancyBox\"),o=Array.prototype.slice.call(arguments,1);return e instanceof b&&(\"string\"===n.type(t)?e[t].apply(e,o):\"function\"===n.type(t)&&t.apply(e,o),e)},open:function(t,e,n){return new b(t,e,n)},close:function(t){var e=this.getInstance();e&&(e.close(),!0===t&&this.close(t))},destroy:function(){this.close(!0),r.add(\"body\").off(\"click.fb-start\",\"**\")},isMobile:/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent),use3d:function(){var n=e.createElement(\"div\");return t.getComputedStyle&&t.getComputedStyle(n)&&t.getComputedStyle(n).getPropertyValue(\"transform\")&&!(e.documentMode&&e.documentMode<11)}(),getTranslate:function(t){var e;return!(!t||!t.length)&&(e=t[0].getBoundingClientRect(),{top:e.top||0,left:e.left||0,width:e.width,height:e.height,opacity:parseFloat(t.css(\"opacity\"))})},setTranslate:function(t,e){var n=\"\",o={};if(t&&e)return void 0===e.left&&void 0===e.top||(n=(void 0===e.left?t.position().left:e.left)+\"px, \"+(void 0===e.top?t.position().top:e.top)+\"px\",n=this.use3d?\"translate3d(\"+n+\", 0px)\":\"translate(\"+n+\")\"),void 0!==e.scaleX&&void 0!==e.scaleY?n+=\" scale(\"+e.scaleX+\", \"+e.scaleY+\")\":void 0!==e.scaleX&&(n+=\" scaleX(\"+e.scaleX+\")\"),n.length&&(o.transform=n),void 0!==e.opacity&&(o.opacity=e.opacity),void 0!==e.width&&(o.width=e.width),void 0!==e.height&&(o.height=e.height),t.css(o)},animate:function(t,e,o,i,a){var s,r=this;n.isFunction(o)&&(i=o,o=null),r.stop(t),s=r.getTranslate(t),t.on(f,function(c){(!c||!c.originalEvent||t.is(c.originalEvent.target)&&\"z-index\"!=c.originalEvent.propertyName)&&(r.stop(t),n.isNumeric(o)&&t.css(\"transition-duration\",\"\"),n.isPlainObject(e)?void 0!==e.scaleX&&void 0!==e.scaleY&&r.setTranslate(t,{top:e.top,left:e.left,width:s.width*e.scaleX,height:s.height*e.scaleY,scaleX:1,scaleY:1}):!0!==a&&t.removeClass(e),n.isFunction(i)&&i(c))}),n.isNumeric(o)&&t.css(\"transition-duration\",o+\"ms\"),n.isPlainObject(e)?(void 0!==e.scaleX&&void 0!==e.scaleY&&(delete e.width,delete e.height,t.parent().hasClass(\"fancybox-slide--image\")&&t.parent().addClass(\"fancybox-is-scaling\")),n.fancybox.setTranslate(t,e)):t.addClass(e),t.data(\"timer\",setTimeout(function(){t.trigger(f)},o+33))},stop:function(t,e){t&&t.length&&(clearTimeout(t.data(\"timer\")),e&&t.trigger(f),t.off(f).css(\"transition-duration\",\"\"),t.parent().removeClass(\"fancybox-is-scaling\"))}},n.fn.fancybox=function(t){var e;return t=t||{},e=t.selector||!1,e?n(\"body\").off(\"click.fb-start\",e).on(\"click.fb-start\",e,{options:t},i):this.off(\"click.fb-start\").on(\"click.fb-start\",{items:this,options:t},i),this},r.on(\"click.fb-start\",\"[data-fancybox]\",i),r.on(\"click.fb-start\",\"[data-fancybox-trigger]\",function(t){n('[data-fancybox=\"'+n(this).attr(\"data-fancybox-trigger\")+'\"]').eq(n(this).attr(\"data-fancybox-index\")||0).trigger(\"click.fb-start\",{$trigger:n(this)})}),function(){var t=null;r.on(\"mousedown mouseup focus blur\",\".fancybox-button\",function(e){switch(e.type){case\"mousedown\":t=n(this);break;case\"mouseup\":t=null;break;case\"focusin\":n(\".fancybox-button\").removeClass(\"fancybox-focus\"),n(this).is(t)||n(this).is(\"[disabled]\")||n(this).addClass(\"fancybox-focus\");break;case\"focusout\":n(\".fancybox-button\").removeClass(\"fancybox-focus\")}})}()}}(window,document,jQuery),function(t){\"use strict\";var e={youtube:{matcher:/(youtube\\.com|youtu\\.be|youtube\\-nocookie\\.com)\\/(watch\\?(.*&)?v=|v\\/|u\\/|embed\\/?)?(videoseries\\?list=(.*)|[\\w-]{11}|\\?listType=(.*)&list=(.*))(.*)/i,params:{autoplay:1,autohide:1,fs:1,rel:0,hd:1,wmode:\"transparent\",enablejsapi:1,html5:1},paramPlace:8,type:\"iframe\",url:\"https://www.youtube-nocookie.com/embed/$4\",thumb:\"https://img.youtube.com/vi/$4/hqdefault.jpg\"},vimeo:{matcher:/^.+vimeo.com\\/(.*\\/)?([\\d]+)(.*)?/,params:{autoplay:1,hd:1,show_title:1,show_byline:1,show_portrait:0,fullscreen:1},paramPlace:3,type:\"iframe\",url:\"//player.vimeo.com/video/$2\"},instagram:{matcher:/(instagr\\.am|instagram\\.com)\\/p\\/([a-zA-Z0-9_\\-]+)\\/?/i,type:\"image\",url:\"//$1/p/$2/media/?size=l\"},gmap_place:{matcher:/(maps\\.)?google\\.([a-z]{2,3}(\\.[a-z]{2})?)\\/(((maps\\/(place\\/(.*)\\/)?\\@(.*),(\\d+.?\\d+?)z))|(\\?ll=))(.*)?/i,type:\"iframe\",url:function(t){return\"//maps.google.\"+t[2]+\"/?ll=\"+(t[9]?t[9]+\"&z=\"+Math.floor(t[10])+(t[12]?t[12].replace(/^\\//,\"&\"):\"\"):t[12]+\"\").replace(/\\?/,\"&\")+\"&output=\"+(t[12]&&t[12].indexOf(\"layer=c\")>0?\"svembed\":\"embed\")}},gmap_search:{matcher:/(maps\\.)?google\\.([a-z]{2,3}(\\.[a-z]{2})?)\\/(maps\\/search\\/)(.*)/i,type:\"iframe\",url:function(t){return\"//maps.google.\"+t[2]+\"/maps?q=\"+t[5].replace(\"query=\",\"q=\").replace(\"api=1\",\"\")+\"&output=embed\"}}},n=function(e,n,o){if(e)return o=o||\"\",\"object\"===t.type(o)&&(o=t.param(o,!0)),t.each(n,function(t,n){e=e.replace(\"$\"+t,n||\"\")}),o.length&&(e+=(e.indexOf(\"?\")>0?\"&\":\"?\")+o),e};t(document).on(\"objectNeedsType.fb\",function(o,i,a){var s,r,c,l,d,u,f,p=a.src||\"\",h=!1;s=t.extend(!0,{},e,a.opts.media),t.each(s,function(e,o){if(c=p.match(o.matcher)){if(h=o.type,f=e,u={},o.paramPlace&&c[o.paramPlace]){d=c[o.paramPlace],\"?\"==d[0]&&(d=d.substring(1)),d=d.split(\"&\");for(var i=0;i<d.length;++i){var s=d[i].split(\"=\",2);2==s.length&&(u[s[0]]=decodeURIComponent(s[1].replace(/\\+/g,\" \")))}}return l=t.extend(!0,{},o.params,a.opts[e],u),p=\"function\"===t.type(o.url)?o.url.call(this,c,l,a):n(o.url,c,l),r=\"function\"===t.type(o.thumb)?o.thumb.call(this,c,l,a):n(o.thumb,c),\"youtube\"===e?p=p.replace(/&t=((\\d+)m)?(\\d+)s/,function(t,e,n,o){return\"&start=\"+((n?60*parseInt(n,10):0)+parseInt(o,10))}):\"vimeo\"===e&&(p=p.replace(\"&%23\",\"#\")),!1}}),h?(a.opts.thumb||a.opts.$thumb&&a.opts.$thumb.length||(a.opts.thumb=r),\"iframe\"===h&&(a.opts=t.extend(!0,a.opts,{iframe:{preload:!1,attr:{scrolling:\"no\"}}})),t.extend(a,{type:h,src:p,origSrc:a.src,contentSource:f,contentType:\"image\"===h?\"image\":\"gmap_place\"==f||\"gmap_search\"==f?\"map\":\"video\"})):p&&(a.type=a.opts.defaultType)});var o={youtube:{src:\"https://www.youtube.com/iframe_api\",class:\"YT\",loading:!1,loaded:!1},vimeo:{src:\"https://player.vimeo.com/api/player.js\",class:\"Vimeo\",loading:!1,loaded:!1},load:function(t){var e,n=this;if(this[t].loaded)return void setTimeout(function(){n.done(t)});this[t].loading||(this[t].loading=!0,e=document.createElement(\"script\"),e.type=\"text/javascript\",e.src=this[t].src,\"youtube\"===t?window.onYouTubeIframeAPIReady=function(){n[t].loaded=!0,n.done(t)}:e.onload=function(){n[t].loaded=!0,n.done(t)},document.body.appendChild(e))},done:function(e){var n,o,i;\"youtube\"===e&&delete window.onYouTubeIframeAPIReady,(n=t.fancybox.getInstance())&&(o=n.current.$content.find(\"iframe\"),\"youtube\"===e&&void 0!==YT&&YT?i=new YT.Player(o.attr(\"id\"),{events:{onStateChange:function(t){0==t.data&&n.next()}}}):\"vimeo\"===e&&void 0!==Vimeo&&Vimeo&&(i=new Vimeo.Player(o),i.on(\"ended\",function(){n.next()})))}};t(document).on({\"afterShow.fb\":function(t,e,n){e.group.length>1&&(\"youtube\"===n.contentSource||\"vimeo\"===n.contentSource)&&o.load(n.contentSource)}})}(jQuery),function(t,e,n){\"use strict\";var o=function(){return t.requestAnimationFrame||t.webkitRequestAnimationFrame||t.mozRequestAnimationFrame||t.oRequestAnimationFrame||function(e){return t.setTimeout(e,1e3/60)}}(),i=function(){return t.cancelAnimationFrame||t.webkitCancelAnimationFrame||t.mozCancelAnimationFrame||t.oCancelAnimationFrame||function(e){t.clearTimeout(e)}}(),a=function(e){var n=[];e=e.originalEvent||e||t.e,e=e.touches&&e.touches.length?e.touches:e.changedTouches&&e.changedTouches.length?e.changedTouches:[e];for(var o in e)e[o].pageX?n.push({x:e[o].pageX,y:e[o].pageY}):e[o].clientX&&n.push({x:e[o].clientX,y:e[o].clientY});return n},s=function(t,e,n){return e&&t?\"x\"===n?t.x-e.x:\"y\"===n?t.y-e.y:Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2)):0},r=function(t){if(t.is('a,area,button,[role=\"button\"],input,label,select,summary,textarea,video,audio,iframe')||n.isFunction(t.get(0).onclick)||t.data(\"selectable\"))return!0;for(var e=0,o=t[0].attributes,i=o.length;e<i;e++)if(\"data-fancybox-\"===o[e].nodeName.substr(0,14))return!0;return!1},c=function(e){var n=t.getComputedStyle(e)[\"overflow-y\"],o=t.getComputedStyle(e)[\"overflow-x\"],i=(\"scroll\"===n||\"auto\"===n)&&e.scrollHeight>e.clientHeight,a=(\"scroll\"===o||\"auto\"===o)&&e.scrollWidth>e.clientWidth;return i||a},l=function(t){for(var e=!1;;){if(e=c(t.get(0)))break;if(t=t.parent(),!t.length||t.hasClass(\"fancybox-stage\")||t.is(\"body\"))break}return e},d=function(t){var e=this;e.instance=t,e.$bg=t.$refs.bg,e.$stage=t.$refs.stage,e.$container=t.$refs.container,e.destroy(),e.$container.on(\"touchstart.fb.touch mousedown.fb.touch\",n.proxy(e,\"ontouchstart\"))};d.prototype.destroy=function(){var t=this;t.$container.off(\".fb.touch\"),n(e).off(\".fb.touch\"),t.requestId&&(i(t.requestId),t.requestId=null),t.tapped&&(clearTimeout(t.tapped),t.tapped=null)},d.prototype.ontouchstart=function(o){var i=this,c=n(o.target),d=i.instance,u=d.current,f=u.$slide,p=u.$content,h=\"touchstart\"==o.type;if(h&&i.$container.off(\"mousedown.fb.touch\"),(!o.originalEvent||2!=o.originalEvent.button)&&f.length&&c.length&&!r(c)&&!r(c.parent())&&(c.is(\"img\")||!(o.originalEvent.clientX>c[0].clientWidth+c.offset().left))){if(!u||d.isAnimating||u.$slide.hasClass(\"fancybox-animated\"))return o.stopPropagation(),void o.preventDefault();i.realPoints=i.startPoints=a(o),i.startPoints.length&&(u.touch&&o.stopPropagation(),i.startEvent=o,i.canTap=!0,i.$target=c,i.$content=p,i.opts=u.opts.touch,i.isPanning=!1,i.isSwiping=!1,i.isZooming=!1,i.isScrolling=!1,i.canPan=d.canPan(),i.startTime=(new Date).getTime(),i.distanceX=i.distanceY=i.distance=0,i.canvasWidth=Math.round(f[0].clientWidth),i.canvasHeight=Math.round(f[0].clientHeight),i.contentLastPos=null,i.contentStartPos=n.fancybox.getTranslate(i.$content)||{top:0,left:0},i.sliderStartPos=n.fancybox.getTranslate(f),i.stagePos=n.fancybox.getTranslate(d.$refs.stage),i.sliderStartPos.top-=i.stagePos.top,i.sliderStartPos.left-=i.stagePos.left,i.contentStartPos.top-=i.stagePos.top,i.contentStartPos.left-=i.stagePos.left,n(e).off(\".fb.touch\").on(h?\"touchend.fb.touch touchcancel.fb.touch\":\"mouseup.fb.touch mouseleave.fb.touch\",n.proxy(i,\"ontouchend\")).on(h?\"touchmove.fb.touch\":\"mousemove.fb.touch\",n.proxy(i,\"ontouchmove\")),n.fancybox.isMobile&&e.addEventListener(\"scroll\",i.onscroll,!0),((i.opts||i.canPan)&&(c.is(i.$stage)||i.$stage.find(c).length)||(c.is(\".fancybox-image\")&&o.preventDefault(),n.fancybox.isMobile&&c.parents(\".fancybox-caption\").length))&&(i.isScrollable=l(c)||l(c.parent()),n.fancybox.isMobile&&i.isScrollable||o.preventDefault(),(1===i.startPoints.length||u.hasError)&&(i.canPan?(n.fancybox.stop(i.$content),i.isPanning=!0):i.isSwiping=!0,i.$container.addClass(\"fancybox-is-grabbing\")),2===i.startPoints.length&&\"image\"===u.type&&(u.isLoaded||u.$ghost)&&(i.canTap=!1,i.isSwiping=!1,i.isPanning=!1,i.isZooming=!0,n.fancybox.stop(i.$content),i.centerPointStartX=.5*(i.startPoints[0].x+i.startPoints[1].x)-n(t).scrollLeft(),i.centerPointStartY=.5*(i.startPoints[0].y+i.startPoints[1].y)-n(t).scrollTop(),i.percentageOfImageAtPinchPointX=(i.centerPointStartX-i.contentStartPos.left)/i.contentStartPos.width,i.percentageOfImageAtPinchPointY=(i.centerPointStartY-i.contentStartPos.top)/i.contentStartPos.height,i.startDistanceBetweenFingers=s(i.startPoints[0],i.startPoints[1]))))}},d.prototype.onscroll=function(t){var n=this;n.isScrolling=!0,e.removeEventListener(\"scroll\",n.onscroll,!0)},d.prototype.ontouchmove=function(t){var e=this;return void 0!==t.originalEvent.buttons&&0===t.originalEvent.buttons?void e.ontouchend(t):e.isScrolling?void(e.canTap=!1):(e.newPoints=a(t),void((e.opts||e.canPan)&&e.newPoints.length&&e.newPoints.length&&(e.isSwiping&&!0===e.isSwiping||t.preventDefault(),e.distanceX=s(e.newPoints[0],e.startPoints[0],\"x\"),e.distanceY=s(e.newPoints[0],e.startPoints[0],\"y\"),e.distance=s(e.newPoints[0],e.startPoints[0]),e.distance>0&&(e.isSwiping?e.onSwipe(t):e.isPanning?e.onPan():e.isZooming&&e.onZoom()))))},d.prototype.onSwipe=function(e){var a,s=this,r=s.instance,c=s.isSwiping,l=s.sliderStartPos.left||0;if(!0!==c)\"x\"==c&&(s.distanceX>0&&(s.instance.group.length<2||0===s.instance.current.index&&!s.instance.current.opts.loop)?l+=Math.pow(s.distanceX,.8):s.distanceX<0&&(s.instance.group.length<2||s.instance.current.index===s.instance.group.length-1&&!s.instance.current.opts.loop)?l-=Math.pow(-s.distanceX,.8):l+=s.distanceX),s.sliderLastPos={top:\"x\"==c?0:s.sliderStartPos.top+s.distanceY,left:l},s.requestId&&(i(s.requestId),s.requestId=null),s.requestId=o(function(){s.sliderLastPos&&(n.each(s.instance.slides,function(t,e){var o=e.pos-s.instance.currPos;n.fancybox.setTranslate(e.$slide,{top:s.sliderLastPos.top,left:s.sliderLastPos.left+o*s.canvasWidth+o*e.opts.gutter})}),s.$container.addClass(\"fancybox-is-sliding\"))});else if(Math.abs(s.distance)>10){if(s.canTap=!1,r.group.length<2&&s.opts.vertical?s.isSwiping=\"y\":r.isDragging||!1===s.opts.vertical||\"auto\"===s.opts.vertical&&n(t).width()>800?s.isSwiping=\"x\":(a=Math.abs(180*Math.atan2(s.distanceY,s.distanceX)/Math.PI),s.isSwiping=a>45&&a<135?\"y\":\"x\"),\"y\"===s.isSwiping&&n.fancybox.isMobile&&s.isScrollable)return void(s.isScrolling=!0);r.isDragging=s.isSwiping,s.startPoints=s.newPoints,n.each(r.slides,function(t,e){var o,i;n.fancybox.stop(e.$slide),o=n.fancybox.getTranslate(e.$slide),i=n.fancybox.getTranslate(r.$refs.stage),e.$slide.css({transform:\"\",opacity:\"\",\"transition-duration\":\"\"}).removeClass(\"fancybox-animated\").removeClass(function(t,e){return(e.match(/(^|\\s)fancybox-fx-\\S+/g)||[]).join(\" \")}),e.pos===r.current.pos&&(s.sliderStartPos.top=o.top-i.top,s.sliderStartPos.left=o.left-i.left),n.fancybox.setTranslate(e.$slide,{top:o.top-i.top,left:o.left-i.left})}),r.SlideShow&&r.SlideShow.isActive&&r.SlideShow.stop()}},d.prototype.onPan=function(){var t=this;if(s(t.newPoints[0],t.realPoints[0])<(n.fancybox.isMobile?10:5))return void(t.startPoints=t.newPoints);t.canTap=!1,t.contentLastPos=t.limitMovement(),t.requestId&&i(t.requestId),t.requestId=o(function(){n.fancybox.setTranslate(t.$content,t.contentLastPos)})},d.prototype.limitMovement=function(){var t,e,n,o,i,a,s=this,r=s.canvasWidth,c=s.canvasHeight,l=s.distanceX,d=s.distanceY,u=s.contentStartPos,f=u.left,p=u.top,h=u.width,g=u.height;return i=h>r?f+l:f,a=p+d,t=Math.max(0,.5*r-.5*h),e=Math.max(0,.5*c-.5*g),n=Math.min(r-h,.5*r-.5*h),o=Math.min(c-g,.5*c-.5*g),l>0&&i>t&&(i=t-1+Math.pow(-t+f+l,.8)||0),l<0&&i<n&&(i=n+1-Math.pow(n-f-l,.8)||0),d>0&&a>e&&(a=e-1+Math.pow(-e+p+d,.8)||0),d<0&&a<o&&(a=o+1-Math.pow(o-p-d,.8)||0),{top:a,left:i}},d.prototype.limitPosition=function(t,e,n,o){var i=this,a=i.canvasWidth,s=i.canvasHeight;return n>a?(t=t>0?0:t,t=t<a-n?a-n:t):t=Math.max(0,a/2-n/2),o>s?(e=e>0?0:e,e=e<s-o?s-o:e):e=Math.max(0,s/2-o/2),{top:e,left:t}},d.prototype.onZoom=function(){var e=this,a=e.contentStartPos,r=a.width,c=a.height,l=a.left,d=a.top,u=s(e.newPoints[0],e.newPoints[1]),f=u/e.startDistanceBetweenFingers,p=Math.floor(r*f),h=Math.floor(c*f),g=(r-p)*e.percentageOfImageAtPinchPointX,b=(c-h)*e.percentageOfImageAtPinchPointY,m=(e.newPoints[0].x+e.newPoints[1].x)/2-n(t).scrollLeft(),v=(e.newPoints[0].y+e.newPoints[1].y)/2-n(t).scrollTop(),y=m-e.centerPointStartX,x=v-e.centerPointStartY,w=l+(g+y),$=d+(b+x),S={top:$,left:w,scaleX:f,scaleY:f};e.canTap=!1,e.newWidth=p,e.newHeight=h,e.contentLastPos=S,e.requestId&&i(e.requestId),e.requestId=o(function(){n.fancybox.setTranslate(e.$content,e.contentLastPos)})},d.prototype.ontouchend=function(t){var o=this,s=o.isSwiping,r=o.isPanning,c=o.isZooming,l=o.isScrolling;if(o.endPoints=a(t),o.dMs=Math.max((new Date).getTime()-o.startTime,1),o.$container.removeClass(\"fancybox-is-grabbing\"),n(e).off(\".fb.touch\"),e.removeEventListener(\"scroll\",o.onscroll,!0),o.requestId&&(i(o.requestId),o.requestId=null),o.isSwiping=!1,o.isPanning=!1,o.isZooming=!1,o.isScrolling=!1,o.instance.isDragging=!1,o.canTap)return o.onTap(t);o.speed=100,o.velocityX=o.distanceX/o.dMs*.5,o.velocityY=o.distanceY/o.dMs*.5,r?o.endPanning():c?o.endZooming():o.endSwiping(s,l)},d.prototype.endSwiping=function(t,e){var o=this,i=!1,a=o.instance.group.length,s=Math.abs(o.distanceX),r=\"x\"==t&&a>1&&(o.dMs>130&&s>10||s>50);o.sliderLastPos=null,\"y\"==t&&!e&&Math.abs(o.distanceY)>50?(n.fancybox.animate(o.instance.current.$slide,{top:o.sliderStartPos.top+o.distanceY+150*o.velocityY,opacity:0},200),i=o.instance.close(!0,250)):r&&o.distanceX>0?i=o.instance.previous(300):r&&o.distanceX<0&&(i=o.instance.next(300)),!1!==i||\"x\"!=t&&\"y\"!=t||o.instance.centerSlide(200),o.$container.removeClass(\"fancybox-is-sliding\")},d.prototype.endPanning=function(){var t,e,o,i=this;i.contentLastPos&&(!1===i.opts.momentum||i.dMs>350?(t=i.contentLastPos.left,e=i.contentLastPos.top):(t=i.contentLastPos.left+500*i.velocityX,e=i.contentLastPos.top+500*i.velocityY),o=i.limitPosition(t,e,i.contentStartPos.width,i.contentStartPos.height),o.width=i.contentStartPos.width,o.height=i.contentStartPos.height,n.fancybox.animate(i.$content,o,366))},d.prototype.endZooming=function(){var t,e,o,i,a=this,s=a.instance.current,r=a.newWidth,c=a.newHeight;a.contentLastPos&&(t=a.contentLastPos.left,e=a.contentLastPos.top,i={top:e,left:t,width:r,height:c,scaleX:1,scaleY:1},n.fancybox.setTranslate(a.$content,i),r<a.canvasWidth&&c<a.canvasHeight?a.instance.scaleToFit(150):r>s.width||c>s.height?a.instance.scaleToActual(a.centerPointStartX,a.centerPointStartY,150):(o=a.limitPosition(t,e,r,c),n.fancybox.animate(a.$content,o,150)))},d.prototype.onTap=function(e){var o,i=this,s=n(e.target),r=i.instance,c=r.current,l=e&&a(e)||i.startPoints,d=l[0]?l[0].x-n(t).scrollLeft()-i.stagePos.left:0,u=l[0]?l[0].y-n(t).scrollTop()-i.stagePos.top:0,f=function(t){var o=c.opts[t];if(n.isFunction(o)&&(o=o.apply(r,[c,e])),o)switch(o){case\"close\":r.close(i.startEvent);break;case\"toggleControls\":r.toggleControls();break;case\"next\":r.next();break;case\"nextOrClose\":r.group.length>1?r.next():r.close(i.startEvent);break;case\"zoom\":\"image\"==c.type&&(c.isLoaded||c.$ghost)&&(r.canPan()?r.scaleToFit():r.isScaledDown()?r.scaleToActual(d,u):r.group.length<2&&r.close(i.startEvent))}};if((!e.originalEvent||2!=e.originalEvent.button)&&(s.is(\"img\")||!(d>s[0].clientWidth+s.offset().left))){if(s.is(\".fancybox-bg,.fancybox-inner,.fancybox-outer,.fancybox-container\"))o=\"Outside\";else if(s.is(\".fancybox-slide\"))o=\"Slide\";else{if(!r.current.$content||!r.current.$content.find(s).addBack().filter(s).length)return;o=\"Content\"}if(i.tapped){if(clearTimeout(i.tapped),i.tapped=null,Math.abs(d-i.tapX)>50||Math.abs(u-i.tapY)>50)return this;f(\"dblclick\"+o)}else i.tapX=d,i.tapY=u,c.opts[\"dblclick\"+o]&&c.opts[\"dblclick\"+o]!==c.opts[\"click\"+o]?i.tapped=setTimeout(function(){i.tapped=null,r.isAnimating||f(\"click\"+o)},500):f(\"click\"+o);return this}},n(e).on(\"onActivate.fb\",function(t,e){e&&!e.Guestures&&(e.Guestures=new d(e))}).on(\"beforeClose.fb\",function(t,e){e&&e.Guestures&&e.Guestures.destroy()})}(window,document,jQuery),function(t,e){\"use strict\";e.extend(!0,e.fancybox.defaults,{btnTpl:{slideShow:'<button data-fancybox-play class=\"fancybox-button fancybox-button--play\" title=\"{{PLAY_START}}\"><svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><path d=\"M6.5 5.4v13.2l11-6.6z\"/></svg><svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><path d=\"M8.33 5.75h2.2v12.5h-2.2V5.75zm5.15 0h2.2v12.5h-2.2V5.75z\"/></svg></button>'},slideShow:{autoStart:!1,speed:3e3,progress:!0}});var n=function(t){this.instance=t,this.init()};e.extend(n.prototype,{timer:null,isActive:!1,$button:null,init:function(){var t=this,n=t.instance,o=n.group[n.currIndex].opts.slideShow;t.$button=n.$refs.toolbar.find(\"[data-fancybox-play]\").on(\"click\",function(){t.toggle()}),n.group.length<2||!o?t.$button.hide():o.progress&&(t.$progress=e('<div class=\"fancybox-progress\"></div>').appendTo(n.$refs.inner))},set:function(t){var n=this,o=n.instance,i=o.current;i&&(!0===t||i.opts.loop||o.currIndex<o.group.length-1)?n.isActive&&\"video\"!==i.contentType&&(n.$progress&&e.fancybox.animate(n.$progress.show(),{scaleX:1},i.opts.slideShow.speed),n.timer=setTimeout(function(){o.current.opts.loop||o.current.index!=o.group.length-1?o.next():o.jumpTo(0)},i.opts.slideShow.speed)):(n.stop(),o.idleSecondsCounter=0,o.showControls())},clear:function(){var t=this;clearTimeout(t.timer),t.timer=null,t.$progress&&t.$progress.removeAttr(\"style\").hide()},start:function(){var t=this,e=t.instance.current;e&&(t.$button.attr(\"title\",(e.opts.i18n[e.opts.lang]||e.opts.i18n.en).PLAY_STOP).removeClass(\"fancybox-button--play\").addClass(\"fancybox-button--pause\"),t.isActive=!0,e.isComplete&&t.set(!0),t.instance.trigger(\"onSlideShowChange\",!0))},stop:function(){var t=this,e=t.instance.current;t.clear(),t.$button.attr(\"title\",(e.opts.i18n[e.opts.lang]||e.opts.i18n.en).PLAY_START).removeClass(\"fancybox-button--pause\").addClass(\"fancybox-button--play\"),t.isActive=!1,t.instance.trigger(\"onSlideShowChange\",!1),t.$progress&&t.$progress.removeAttr(\"style\").hide()},toggle:function(){var t=this;t.isActive?t.stop():t.start()}}),e(t).on({\"onInit.fb\":function(t,e){e&&!e.SlideShow&&(e.SlideShow=new n(e))},\"beforeShow.fb\":function(t,e,n,o){var i=e&&e.SlideShow;o?i&&n.opts.slideShow.autoStart&&i.start():i&&i.isActive&&i.clear()},\"afterShow.fb\":function(t,e,n){var o=e&&e.SlideShow;o&&o.isActive&&o.set()},\"afterKeydown.fb\":function(n,o,i,a,s){var r=o&&o.SlideShow;!r||!i.opts.slideShow||80!==s&&32!==s||e(t.activeElement).is(\"button,a,input\")||(a.preventDefault(),r.toggle())},\"beforeClose.fb onDeactivate.fb\":function(t,e){var n=e&&e.SlideShow;n&&n.stop()}}),e(t).on(\"visibilitychange\",function(){var n=e.fancybox.getInstance(),o=n&&n.SlideShow;o&&o.isActive&&(t.hidden?o.clear():o.set())})}(document,jQuery),function(t,e){\"use strict\";var n=function(){for(var e=[[\"requestFullscreen\",\"exitFullscreen\",\"fullscreenElement\",\"fullscreenEnabled\",\"fullscreenchange\",\"fullscreenerror\"],[\"webkitRequestFullscreen\",\"webkitExitFullscreen\",\"webkitFullscreenElement\",\"webkitFullscreenEnabled\",\"webkitfullscreenchange\",\"webkitfullscreenerror\"],[\"webkitRequestFullScreen\",\"webkitCancelFullScreen\",\"webkitCurrentFullScreenElement\",\"webkitCancelFullScreen\",\"webkitfullscreenchange\",\"webkitfullscreenerror\"],[\"mozRequestFullScreen\",\"mozCancelFullScreen\",\"mozFullScreenElement\",\"mozFullScreenEnabled\",\"mozfullscreenchange\",\"mozfullscreenerror\"],[\"msRequestFullscreen\",\"msExitFullscreen\",\"msFullscreenElement\",\"msFullscreenEnabled\",\"MSFullscreenChange\",\"MSFullscreenError\"]],n={},o=0;o<e.length;o++){var i=e[o];if(i&&i[1]in t){for(var a=0;a<i.length;a++)n[e[0][a]]=i[a];return n}}return!1}();if(n){var o={request:function(e){e=e||t.documentElement,e[n.requestFullscreen](e.ALLOW_KEYBOARD_INPUT)},exit:function(){t[n.exitFullscreen]()},toggle:function(e){e=e||t.documentElement,this.isFullscreen()?this.exit():this.request(e)},isFullscreen:function(){return Boolean(t[n.fullscreenElement])},enabled:function(){return Boolean(t[n.fullscreenEnabled])}};e.extend(!0,e.fancybox.defaults,{btnTpl:{fullScreen:'<button data-fancybox-fullscreen class=\"fancybox-button fancybox-button--fsenter\" title=\"{{FULL_SCREEN}}\"><svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><path d=\"M7 14H5v5h5v-2H7v-3zm-2-4h2V7h3V5H5v5zm12 7h-3v2h5v-5h-2v3zM14 5v2h3v3h2V5h-5z\"/></svg><svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><path d=\"M5 16h3v3h2v-5H5zm3-8H5v2h5V5H8zm6 11h2v-3h3v-2h-5zm2-11V5h-2v5h5V8z\"/></svg></button>'},fullScreen:{autoStart:!1}}),e(t).on(n.fullscreenchange,function(){var t=o.isFullscreen(),n=e.fancybox.getInstance();n&&(n.current&&\"image\"===n.current.type&&n.isAnimating&&(n.isAnimating=!1,n.update(!0,!0,0),n.isComplete||n.complete()),n.trigger(\"onFullscreenChange\",t),n.$refs.container.toggleClass(\"fancybox-is-fullscreen\",t),n.$refs.toolbar.find(\"[data-fancybox-fullscreen]\").toggleClass(\"fancybox-button--fsenter\",!t).toggleClass(\"fancybox-button--fsexit\",t))})}e(t).on({\"onInit.fb\":function(t,e){var i;if(!n)return void e.$refs.toolbar.find(\"[data-fancybox-fullscreen]\").remove();e&&e.group[e.currIndex].opts.fullScreen?(i=e.$refs.container,i.on(\"click.fb-fullscreen\",\"[data-fancybox-fullscreen]\",function(t){t.stopPropagation(),t.preventDefault(),o.toggle()}),e.opts.fullScreen&&!0===e.opts.fullScreen.autoStart&&o.request(),e.FullScreen=o):e&&e.$refs.toolbar.find(\"[data-fancybox-fullscreen]\").hide()},\"afterKeydown.fb\":function(t,e,n,o,i){e&&e.FullScreen&&70===i&&(o.preventDefault(),e.FullScreen.toggle())},\"beforeClose.fb\":function(t,e){e&&e.FullScreen&&e.$refs.container.hasClass(\"fancybox-is-fullscreen\")&&o.exit()}})}(document,jQuery),function(t,e){\"use strict\";var n=\"fancybox-thumbs\";e.fancybox.defaults=e.extend(!0,{btnTpl:{thumbs:'<button data-fancybox-thumbs class=\"fancybox-button fancybox-button--thumbs\" title=\"{{THUMBS}}\"><svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><path d=\"M14.59 14.59h3.76v3.76h-3.76v-3.76zm-4.47 0h3.76v3.76h-3.76v-3.76zm-4.47 0h3.76v3.76H5.65v-3.76zm8.94-4.47h3.76v3.76h-3.76v-3.76zm-4.47 0h3.76v3.76h-3.76v-3.76zm-4.47 0h3.76v3.76H5.65v-3.76zm8.94-4.47h3.76v3.76h-3.76V5.65zm-4.47 0h3.76v3.76h-3.76V5.65zm-4.47 0h3.76v3.76H5.65V5.65z\"/></svg></button>'},thumbs:{autoStart:!1,hideOnClose:!0,parentEl:\".fancybox-container\",axis:\"y\"}},e.fancybox.defaults);var o=function(t){this.init(t)};e.extend(o.prototype,{$button:null,$grid:null,$list:null,isVisible:!1,isActive:!1,init:function(t){var e=this,n=t.group,o=0;e.instance=t,e.opts=n[t.currIndex].opts.thumbs,t.Thumbs=e,e.$button=t.$refs.toolbar.find(\"[data-fancybox-thumbs]\");for(var i=0,a=n.length;i<a&&(n[i].thumb&&o++,!(o>1));i++);o>1&&e.opts?(e.$button.removeAttr(\"style\").on(\"click\",function(){e.toggle()}),e.isActive=!0):e.$button.hide()},create:function(){var t,o=this,i=o.instance,a=o.opts.parentEl,s=[];o.$grid||(o.$grid=e('<div class=\"'+n+\" \"+n+\"-\"+o.opts.axis+'\"></div>').appendTo(i.$refs.container.find(a).addBack().filter(a)),o.$grid.on(\"click\",\"a\",function(){i.jumpTo(e(this).attr(\"data-index\"))})),o.$list||(o.$list=e('<div class=\"'+n+'__list\">').appendTo(o.$grid)),e.each(i.group,function(e,n){t=n.thumb,t||\"image\"!==n.type||(t=n.src),s.push('<a href=\"javascript:;\" tabindex=\"0\" data-index=\"'+e+'\"'+(t&&t.length?' style=\"background-image:url('+t+')\"':'class=\"fancybox-thumbs-missing\"')+\"></a>\")}),o.$list[0].innerHTML=s.join(\"\"),\"x\"===o.opts.axis&&o.$list.width(parseInt(o.$grid.css(\"padding-right\"),10)+i.group.length*o.$list.children().eq(0).outerWidth(!0))},focus:function(t){var e,n,o=this,i=o.$list,a=o.$grid;o.instance.current&&(e=i.children().removeClass(\"fancybox-thumbs-active\").filter('[data-index=\"'+o.instance.current.index+'\"]').addClass(\"fancybox-thumbs-active\"),n=e.position(),\"y\"===o.opts.axis&&(n.top<0||n.top>i.height()-e.outerHeight())?i.stop().animate({scrollTop:i.scrollTop()+n.top},t):\"x\"===o.opts.axis&&(n.left<a.scrollLeft()||n.left>a.scrollLeft()+(a.width()-e.outerWidth()))&&i.parent().stop().animate({scrollLeft:n.left},t))},update:function(){var t=this;t.instance.$refs.container.toggleClass(\"fancybox-show-thumbs\",this.isVisible),t.isVisible?(t.$grid||t.create(),t.instance.trigger(\"onThumbsShow\"),t.focus(0)):t.$grid&&t.instance.trigger(\"onThumbsHide\"),t.instance.update()},hide:function(){this.isVisible=!1,this.update()},show:function(){this.isVisible=!0,this.update()},toggle:function(){this.isVisible=!this.isVisible,this.update()}}),e(t).on({\"onInit.fb\":function(t,e){var n;e&&!e.Thumbs&&(n=new o(e),n.isActive&&!0===n.opts.autoStart&&n.show())},\"beforeShow.fb\":function(t,e,n,o){var i=e&&e.Thumbs;i&&i.isVisible&&i.focus(o?0:250)},\"afterKeydown.fb\":function(t,e,n,o,i){var a=e&&e.Thumbs;a&&a.isActive&&71===i&&(o.preventDefault(),a.toggle())},\"beforeClose.fb\":function(t,e){var n=e&&e.Thumbs;n&&n.isVisible&&!1!==n.opts.hideOnClose&&n.$grid.hide()}})}(document,jQuery),function(t,e){\"use strict\";function n(t){var e={\"&\":\"&amp;\",\"<\":\"&lt;\",\">\":\"&gt;\",'\"':\"&quot;\",\"'\":\"&#39;\",\"/\":\"&#x2F;\",\"`\":\"&#x60;\",\"=\":\"&#x3D;\"};return String(t).replace(/[&<>\"'`=\\/]/g,function(t){return e[t]})}e.extend(!0,e.fancybox.defaults,{btnTpl:{share:'<button data-fancybox-share class=\"fancybox-button fancybox-button--share\" title=\"{{SHARE}}\"><svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><path d=\"M2.55 19c1.4-8.4 9.1-9.8 11.9-9.8V5l7 7-7 6.3v-3.5c-2.8 0-10.5 2.1-11.9 4.2z\"/></svg></button>'},share:{url:function(t,e){return!t.currentHash&&\"inline\"!==e.type&&\"html\"!==e.type&&(e.origSrc||e.src)||window.location},\r\ntpl:'<div class=\"fancybox-share\"><h1>{{SHARE}}</h1><p><a class=\"fancybox-share__button fancybox-share__button--fb\" href=\"https://www.facebook.com/sharer/sharer.php?u={{url}}\"><svg viewBox=\"0 0 512 512\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"m287 456v-299c0-21 6-35 35-35h38v-63c-7-1-29-3-55-3-54 0-91 33-91 94v306m143-254h-205v72h196\" /></svg><span>Facebook</span></a><a class=\"fancybox-share__button fancybox-share__button--tw\" href=\"https://twitter.com/intent/tweet?url={{url}}&text={{descr}}\"><svg viewBox=\"0 0 512 512\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"m456 133c-14 7-31 11-47 13 17-10 30-27 37-46-15 10-34 16-52 20-61-62-157-7-141 75-68-3-129-35-169-85-22 37-11 86 26 109-13 0-26-4-37-9 0 39 28 72 65 80-12 3-25 4-37 2 10 33 41 57 77 57-42 30-77 38-122 34 170 111 378-32 359-208 16-11 30-25 41-42z\" /></svg><span>Twitter</span></a><a class=\"fancybox-share__button fancybox-share__button--pt\" href=\"https://www.pinterest.com/pin/create/button/?url={{url}}&description={{descr}}&media={{media}}\"><svg viewBox=\"0 0 512 512\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"m265 56c-109 0-164 78-164 144 0 39 15 74 47 87 5 2 10 0 12-5l4-19c2-6 1-8-3-13-9-11-15-25-15-45 0-58 43-110 113-110 62 0 96 38 96 88 0 67-30 122-73 122-24 0-42-19-36-44 6-29 20-60 20-81 0-19-10-35-31-35-25 0-44 26-44 60 0 21 7 36 7 36l-30 125c-8 37-1 83 0 87 0 3 4 4 5 2 2-3 32-39 42-75l16-64c8 16 31 29 56 29 74 0 124-67 124-157 0-69-58-132-146-132z\" fill=\"#fff\"/></svg><span>Pinterest</span></a></p><p><input class=\"fancybox-share__input\" type=\"text\" value=\"{{url_raw}}\" onclick=\"select()\" /></p></div>'}}),e(t).on(\"click\",\"[data-fancybox-share]\",function(){var t,o,i=e.fancybox.getInstance(),a=i.current||null;a&&(\"function\"===e.type(a.opts.share.url)&&(t=a.opts.share.url.apply(a,[i,a])),o=a.opts.share.tpl.replace(/\\{\\{media\\}\\}/g,\"image\"===a.type?encodeURIComponent(a.src):\"\").replace(/\\{\\{url\\}\\}/g,encodeURIComponent(t)).replace(/\\{\\{url_raw\\}\\}/g,n(t)).replace(/\\{\\{descr\\}\\}/g,i.$caption?encodeURIComponent(i.$caption.text()):\"\"),e.fancybox.open({src:i.translate(i,o),type:\"html\",opts:{touch:!1,animationEffect:!1,afterLoad:function(t,e){i.$refs.container.one(\"beforeClose.fb\",function(){t.close(null,0)}),e.$content.find(\".fancybox-share__button\").click(function(){return window.open(this.href,\"Share\",\"width=550, height=450\"),!1})},mobile:{autoFocus:!1}}}))})}(document,jQuery),function(t,e,n){\"use strict\";function o(){var e=t.location.hash.substr(1),n=e.split(\"-\"),o=n.length>1&&/^\\+?\\d+$/.test(n[n.length-1])?parseInt(n.pop(-1),10)||1:1,i=n.join(\"-\");return{hash:e,index:o<1?1:o,gallery:i}}function i(t){\"\"!==t.gallery&&n(\"[data-fancybox='\"+n.escapeSelector(t.gallery)+\"']\").eq(t.index-1).focus().trigger(\"click.fb-start\")}function a(t){var e,n;return!!t&&(e=t.current?t.current.opts:t.opts,\"\"!==(n=e.hash||(e.$orig?e.$orig.data(\"fancybox\")||e.$orig.data(\"fancybox-trigger\"):\"\"))&&n)}n.escapeSelector||(n.escapeSelector=function(t){return(t+\"\").replace(/([\\0-\\x1f\\x7f]|^-?\\d)|^-$|[^\\x80-\\uFFFF\\w-]/g,function(t,e){return e?\"\\0\"===t?\"�\":t.slice(0,-1)+\"\\\\\"+t.charCodeAt(t.length-1).toString(16)+\" \":\"\\\\\"+t})}),n(function(){!1!==n.fancybox.defaults.hash&&(n(e).on({\"onInit.fb\":function(t,e){var n,i;!1!==e.group[e.currIndex].opts.hash&&(n=o(),(i=a(e))&&n.gallery&&i==n.gallery&&(e.currIndex=n.index-1))},\"beforeShow.fb\":function(n,o,i,s){var r;i&&!1!==i.opts.hash&&(r=a(o))&&(o.currentHash=r+(o.group.length>1?\"-\"+(i.index+1):\"\"),t.location.hash!==\"#\"+o.currentHash&&(s&&!o.origHash&&(o.origHash=t.location.hash),o.hashTimer&&clearTimeout(o.hashTimer),o.hashTimer=setTimeout(function(){\"replaceState\"in t.history?(t.history[s?\"pushState\":\"replaceState\"]({},e.title,t.location.pathname+t.location.search+\"#\"+o.currentHash),s&&(o.hasCreatedHistory=!0)):t.location.hash=o.currentHash,o.hashTimer=null},300)))},\"beforeClose.fb\":function(n,o,i){i&&!1!==i.opts.hash&&(clearTimeout(o.hashTimer),o.currentHash&&o.hasCreatedHistory?t.history.back():o.currentHash&&(\"replaceState\"in t.history?t.history.replaceState({},e.title,t.location.pathname+t.location.search+(o.origHash||\"\")):t.location.hash=o.origHash),o.currentHash=null)}}),n(t).on(\"hashchange.fb\",function(){var t=o(),e=null;n.each(n(\".fancybox-container\").get().reverse(),function(t,o){var i=n(o).data(\"FancyBox\");if(i&&i.currentHash)return e=i,!1}),e?e.currentHash===t.gallery+\"-\"+t.index||1===t.index&&e.currentHash==t.gallery||(e.currentHash=null,e.close()):\"\"!==t.gallery&&i(t)}),setTimeout(function(){n.fancybox.getInstance()||i(o())},50))})}(window,document,jQuery),function(t,e){\"use strict\";var n=(new Date).getTime();e(t).on({\"onInit.fb\":function(t,e,o){e.$refs.stage.on(\"mousewheel DOMMouseScroll wheel MozMousePixelScroll\",function(t){var o=e.current,i=(new Date).getTime();e.group.length<2||!1===o.opts.wheel||\"auto\"===o.opts.wheel&&\"image\"!==o.type||(t.preventDefault(),t.stopPropagation(),o.$slide.hasClass(\"fancybox-animated\")||(t=t.originalEvent||t,i-n<250||(n=i,e[(-t.deltaY||-t.deltaX||t.wheelDelta||-t.detail)<0?\"next\":\"previous\"]())))})}})}(document,jQuery);","/**\r\n * jquery.mask.js\r\n * @version: v1.14.16\r\n * @author: Igor Escobar\r\n *\r\n * Created by Igor Escobar on 2012-03-10. Please report any bug at github.com/igorescobar/jQuery-Mask-Plugin\r\n *\r\n * Copyright (c) 2012 Igor Escobar http://igorescobar.com\r\n *\r\n * The MIT License (http://www.opensource.org/licenses/mit-license.php)\r\n *\r\n * Permission is hereby granted, free of charge, to any person\r\n * obtaining a copy of this software and associated documentation\r\n * files (the \"Software\"), to deal in the Software without\r\n * restriction, including without limitation the rights to use,\r\n * copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n * copies of the Software, and to permit persons to whom the\r\n * Software is furnished to do so, subject to the following\r\n * conditions:\r\n *\r\n * The above copyright notice and this permission notice shall be\r\n * included in all copies or substantial portions of the Software.\r\n *\r\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\r\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\r\n * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\r\n * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\r\n * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\r\n * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\r\n * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\r\n * OTHER DEALINGS IN THE SOFTWARE.\r\n */\r\n\r\n/* jshint laxbreak: true */\r\n/* jshint maxcomplexity:17 */\r\n/* global define */\r\n\r\n// UMD (Universal Module Definition) patterns for JavaScript modules that work everywhere.\r\n// https://github.com/umdjs/umd/blob/master/templates/jqueryPlugin.js\r\n(function (factory, jQuery, Zepto) {\r\n\r\n    if (typeof define === 'function' && define.amd) {\r\n        define(['jquery'], factory);\r\n    } else if (typeof exports === 'object' && typeof Meteor === 'undefined') {\r\n        module.exports = factory(require('jquery'));\r\n    } else {\r\n        factory(jQuery || Zepto);\r\n    }\r\n\r\n}(function ($) {\r\n    'use strict';\r\n\r\n    var Mask = function (el, mask, options) {\r\n\r\n        var p = {\r\n            invalid: [],\r\n            getCaret: function () {\r\n                try {\r\n                    var sel,\r\n                        pos = 0,\r\n                        ctrl = el.get(0),\r\n                        dSel = document.selection,\r\n                        cSelStart = ctrl.selectionStart;\r\n\r\n                    // IE Support\r\n                    if (dSel && navigator.appVersion.indexOf('MSIE 10') === -1) {\r\n                        sel = dSel.createRange();\r\n                        sel.moveStart('character', -p.val().length);\r\n                        pos = sel.text.length;\r\n                    }\r\n                    // Firefox support\r\n                    else if (cSelStart || cSelStart === '0') {\r\n                        pos = cSelStart;\r\n                    }\r\n\r\n                    return pos;\r\n                } catch (e) {}\r\n            },\r\n            setCaret: function(pos) {\r\n                try {\r\n                    if (el.is(':focus')) {\r\n                        var range, ctrl = el.get(0);\r\n\r\n                        // Firefox, WebKit, etc..\r\n                        if (ctrl.setSelectionRange) {\r\n                            ctrl.setSelectionRange(pos, pos);\r\n                        } else { // IE\r\n                            range = ctrl.createTextRange();\r\n                            range.collapse(true);\r\n                            range.moveEnd('character', pos);\r\n                            range.moveStart('character', pos);\r\n                            range.select();\r\n                        }\r\n                    }\r\n                } catch (e) {}\r\n            },\r\n            events: function() {\r\n                el\r\n                .on('keydown.mask', function(e) {\r\n                    el.data('mask-keycode', e.keyCode || e.which);\r\n                    el.data('mask-previus-value', el.val());\r\n                    el.data('mask-previus-caret-pos', p.getCaret());\r\n                    p.maskDigitPosMapOld = p.maskDigitPosMap;\r\n                })\r\n                .on($.jMaskGlobals.useInput ? 'input.mask' : 'keyup.mask', p.behaviour)\r\n                .on('paste.mask drop.mask', function() {\r\n                    setTimeout(function() {\r\n                        el.keydown().keyup();\r\n                    }, 100);\r\n                })\r\n                .on('change.mask', function(){\r\n                    el.data('changed', true);\r\n                })\r\n                .on('blur.mask', function(){\r\n                    if (oldValue !== p.val() && !el.data('changed')) {\r\n                        el.trigger('change');\r\n                    }\r\n                    el.data('changed', false);\r\n                })\r\n                // it's very important that this callback remains in this position\r\n                // otherwhise oldValue it's going to work buggy\r\n                .on('blur.mask', function() {\r\n                    oldValue = p.val();\r\n                })\r\n                // select all text on focus\r\n                .on('focus.mask', function (e) {\r\n                    if (options.selectOnFocus === true) {\r\n                        $(e.target).select();\r\n                    }\r\n                })\r\n                // clear the value if it not complete the mask\r\n                .on('focusout.mask', function() {\r\n                    if (options.clearIfNotMatch && !regexMask.test(p.val())) {\r\n                       p.val('');\r\n                   }\r\n                });\r\n            },\r\n            getRegexMask: function() {\r\n                var maskChunks = [], translation, pattern, optional, recursive, oRecursive, r;\r\n\r\n                for (var i = 0; i < mask.length; i++) {\r\n                    translation = jMask.translation[mask.charAt(i)];\r\n\r\n                    if (translation) {\r\n\r\n                        pattern = translation.pattern.toString().replace(/.{1}$|^.{1}/g, '');\r\n                        optional = translation.optional;\r\n                        recursive = translation.recursive;\r\n\r\n                        if (recursive) {\r\n                            maskChunks.push(mask.charAt(i));\r\n                            oRecursive = {digit: mask.charAt(i), pattern: pattern};\r\n                        } else {\r\n                            maskChunks.push(!optional && !recursive ? pattern : (pattern + '?'));\r\n                        }\r\n\r\n                    } else {\r\n                        maskChunks.push(mask.charAt(i).replace(/[-\\/\\\\^$*+?.()|[\\]{}]/g, '\\\\$&'));\r\n                    }\r\n                }\r\n\r\n                r = maskChunks.join('');\r\n\r\n                if (oRecursive) {\r\n                    r = r.replace(new RegExp('(' + oRecursive.digit + '(.*' + oRecursive.digit + ')?)'), '($1)?')\r\n                         .replace(new RegExp(oRecursive.digit, 'g'), oRecursive.pattern);\r\n                }\r\n\r\n                return new RegExp(r);\r\n            },\r\n            destroyEvents: function() {\r\n                el.off(['input', 'keydown', 'keyup', 'paste', 'drop', 'blur', 'focusout', ''].join('.mask '));\r\n            },\r\n            val: function(v) {\r\n                var isInput = el.is('input'),\r\n                    method = isInput ? 'val' : 'text',\r\n                    r;\r\n\r\n                if (arguments.length > 0) {\r\n                    if (el[method]() !== v) {\r\n                        el[method](v);\r\n                    }\r\n                    r = el;\r\n                } else {\r\n                    r = el[method]();\r\n                }\r\n\r\n                return r;\r\n            },\r\n            calculateCaretPosition: function(oldVal) {\r\n                var newVal = p.getMasked(),\r\n                    caretPosNew = p.getCaret();\r\n                if (oldVal !== newVal) {\r\n                    var caretPosOld = el.data('mask-previus-caret-pos') || 0,\r\n                        newValL = newVal.length,\r\n                        oldValL = oldVal.length,\r\n                        maskDigitsBeforeCaret = 0,\r\n                        maskDigitsAfterCaret = 0,\r\n                        maskDigitsBeforeCaretAll = 0,\r\n                        maskDigitsBeforeCaretAllOld = 0,\r\n                        i = 0;\r\n\r\n                    for (i = caretPosNew; i < newValL; i++) {\r\n                        if (!p.maskDigitPosMap[i]) {\r\n                            break;\r\n                        }\r\n                        maskDigitsAfterCaret++;\r\n                    }\r\n\r\n                    for (i = caretPosNew - 1; i >= 0; i--) {\r\n                        if (!p.maskDigitPosMap[i]) {\r\n                            break;\r\n                        }\r\n                        maskDigitsBeforeCaret++;\r\n                    }\r\n\r\n                    for (i = caretPosNew - 1; i >= 0; i--) {\r\n                        if (p.maskDigitPosMap[i]) {\r\n                            maskDigitsBeforeCaretAll++;\r\n                        }\r\n                    }\r\n\r\n                    for (i = caretPosOld - 1; i >= 0; i--) {\r\n                        if (p.maskDigitPosMapOld[i]) {\r\n                            maskDigitsBeforeCaretAllOld++;\r\n                        }\r\n                    }\r\n\r\n                    // if the cursor is at the end keep it there\r\n                    if (caretPosNew > oldValL) {\r\n                      caretPosNew = newValL * 10;\r\n                    } else if (caretPosOld >= caretPosNew && caretPosOld !== oldValL) {\r\n                        if (!p.maskDigitPosMapOld[caretPosNew])  {\r\n                          var caretPos = caretPosNew;\r\n                          caretPosNew -= maskDigitsBeforeCaretAllOld - maskDigitsBeforeCaretAll;\r\n                          caretPosNew -= maskDigitsBeforeCaret;\r\n                          if (p.maskDigitPosMap[caretPosNew])  {\r\n                            caretPosNew = caretPos;\r\n                          }\r\n                        }\r\n                    }\r\n                    else if (caretPosNew > caretPosOld) {\r\n                        caretPosNew += maskDigitsBeforeCaretAll - maskDigitsBeforeCaretAllOld;\r\n                        caretPosNew += maskDigitsAfterCaret;\r\n                    }\r\n                }\r\n                return caretPosNew;\r\n            },\r\n            behaviour: function(e) {\r\n                e = e || window.event;\r\n                p.invalid = [];\r\n\r\n                var keyCode = el.data('mask-keycode');\r\n\r\n                if ($.inArray(keyCode, jMask.byPassKeys) === -1) {\r\n                    var newVal = p.getMasked(),\r\n                        caretPos = p.getCaret(),\r\n                        oldVal = el.data('mask-previus-value') || '';\r\n\r\n                    // this is a compensation to devices/browsers that don't compensate\r\n                    // caret positioning the right way\r\n                    setTimeout(function() {\r\n                      p.setCaret(p.calculateCaretPosition(oldVal));\r\n                    }, $.jMaskGlobals.keyStrokeCompensation);\r\n\r\n                    p.val(newVal);\r\n                    p.setCaret(caretPos);\r\n                    return p.callbacks(e);\r\n                }\r\n            },\r\n            getMasked: function(skipMaskChars, val) {\r\n                var buf = [],\r\n                    value = val === undefined ? p.val() : val + '',\r\n                    m = 0, maskLen = mask.length,\r\n                    v = 0, valLen = value.length,\r\n                    offset = 1, addMethod = 'push',\r\n                    resetPos = -1,\r\n                    maskDigitCount = 0,\r\n                    maskDigitPosArr = [],\r\n                    lastMaskChar,\r\n                    check;\r\n\r\n                if (options.reverse) {\r\n                    addMethod = 'unshift';\r\n                    offset = -1;\r\n                    lastMaskChar = 0;\r\n                    m = maskLen - 1;\r\n                    v = valLen - 1;\r\n                    check = function () {\r\n                        return m > -1 && v > -1;\r\n                    };\r\n                } else {\r\n                    lastMaskChar = maskLen - 1;\r\n                    check = function () {\r\n                        return m < maskLen && v < valLen;\r\n                    };\r\n                }\r\n\r\n                var lastUntranslatedMaskChar;\r\n                while (check()) {\r\n                    var maskDigit = mask.charAt(m),\r\n                        valDigit = value.charAt(v),\r\n                        translation = jMask.translation[maskDigit];\r\n\r\n                    if (translation) {\r\n                        if (valDigit.match(translation.pattern)) {\r\n                            buf[addMethod](valDigit);\r\n                             if (translation.recursive) {\r\n                                if (resetPos === -1) {\r\n                                    resetPos = m;\r\n                                } else if (m === lastMaskChar && m !== resetPos) {\r\n                                    m = resetPos - offset;\r\n                                }\r\n\r\n                                if (lastMaskChar === resetPos) {\r\n                                    m -= offset;\r\n                                }\r\n                            }\r\n                            m += offset;\r\n                        } else if (valDigit === lastUntranslatedMaskChar) {\r\n                            // matched the last untranslated (raw) mask character that we encountered\r\n                            // likely an insert offset the mask character from the last entry; fall\r\n                            // through and only increment v\r\n                            maskDigitCount--;\r\n                            lastUntranslatedMaskChar = undefined;\r\n                        } else if (translation.optional) {\r\n                            m += offset;\r\n                            v -= offset;\r\n                        } else if (translation.fallback) {\r\n                            buf[addMethod](translation.fallback);\r\n                            m += offset;\r\n                            v -= offset;\r\n                        } else {\r\n                          p.invalid.push({p: v, v: valDigit, e: translation.pattern});\r\n                        }\r\n                        v += offset;\r\n                    } else {\r\n                        if (!skipMaskChars) {\r\n                            buf[addMethod](maskDigit);\r\n                        }\r\n\r\n                        if (valDigit === maskDigit) {\r\n                            maskDigitPosArr.push(v);\r\n                            v += offset;\r\n                        } else {\r\n                            lastUntranslatedMaskChar = maskDigit;\r\n                            maskDigitPosArr.push(v + maskDigitCount);\r\n                            maskDigitCount++;\r\n                        }\r\n\r\n                        m += offset;\r\n                    }\r\n                }\r\n\r\n                var lastMaskCharDigit = mask.charAt(lastMaskChar);\r\n                if (maskLen === valLen + 1 && !jMask.translation[lastMaskCharDigit]) {\r\n                    buf.push(lastMaskCharDigit);\r\n                }\r\n\r\n                var newVal = buf.join('');\r\n                p.mapMaskdigitPositions(newVal, maskDigitPosArr, valLen);\r\n                return newVal;\r\n            },\r\n            mapMaskdigitPositions: function(newVal, maskDigitPosArr, valLen) {\r\n              var maskDiff = options.reverse ? newVal.length - valLen : 0;\r\n              p.maskDigitPosMap = {};\r\n              for (var i = 0; i < maskDigitPosArr.length; i++) {\r\n                p.maskDigitPosMap[maskDigitPosArr[i] + maskDiff] = 1;\r\n              }\r\n            },\r\n            callbacks: function (e) {\r\n                var val = p.val(),\r\n                    changed = val !== oldValue,\r\n                    defaultArgs = [val, e, el, options],\r\n                    callback = function(name, criteria, args) {\r\n                        if (typeof options[name] === 'function' && criteria) {\r\n                            options[name].apply(this, args);\r\n                        }\r\n                    };\r\n\r\n                callback('onChange', changed === true, defaultArgs);\r\n                callback('onKeyPress', changed === true, defaultArgs);\r\n                callback('onComplete', val.length === mask.length, defaultArgs);\r\n                callback('onInvalid', p.invalid.length > 0, [val, e, el, p.invalid, options]);\r\n            }\r\n        };\r\n\r\n        el = $(el);\r\n        var jMask = this, oldValue = p.val(), regexMask;\r\n\r\n        mask = typeof mask === 'function' ? mask(p.val(), undefined, el,  options) : mask;\r\n\r\n        // public methods\r\n        jMask.mask = mask;\r\n        jMask.options = options;\r\n        jMask.remove = function() {\r\n            var caret = p.getCaret();\r\n            if (jMask.options.placeholder) {\r\n                el.removeAttr('placeholder');\r\n            }\r\n            if (el.data('mask-maxlength')) {\r\n                el.removeAttr('maxlength');\r\n            }\r\n            p.destroyEvents();\r\n            p.val(jMask.getCleanVal());\r\n            p.setCaret(caret);\r\n            return el;\r\n        };\r\n\r\n        // get value without mask\r\n        jMask.getCleanVal = function() {\r\n           return p.getMasked(true);\r\n        };\r\n\r\n        // get masked value without the value being in the input or element\r\n        jMask.getMaskedVal = function(val) {\r\n           return p.getMasked(false, val);\r\n        };\r\n\r\n       jMask.init = function(onlyMask) {\r\n            onlyMask = onlyMask || false;\r\n            options = options || {};\r\n\r\n            jMask.clearIfNotMatch  = $.jMaskGlobals.clearIfNotMatch;\r\n            jMask.byPassKeys       = $.jMaskGlobals.byPassKeys;\r\n            jMask.translation      = $.extend({}, $.jMaskGlobals.translation, options.translation);\r\n\r\n            jMask = $.extend(true, {}, jMask, options);\r\n\r\n            regexMask = p.getRegexMask();\r\n\r\n            if (onlyMask) {\r\n                p.events();\r\n                p.val(p.getMasked());\r\n            } else {\r\n                if (options.placeholder) {\r\n                    el.attr('placeholder' , options.placeholder);\r\n                }\r\n\r\n                // this is necessary, otherwise if the user submit the form\r\n                // and then press the \"back\" button, the autocomplete will erase\r\n                // the data. Works fine on IE9+, FF, Opera, Safari.\r\n                if (el.data('mask')) {\r\n                  el.attr('autocomplete', 'off');\r\n                }\r\n\r\n                // detect if is necessary let the user type freely.\r\n                // for is a lot faster than forEach.\r\n                for (var i = 0, maxlength = true; i < mask.length; i++) {\r\n                    var translation = jMask.translation[mask.charAt(i)];\r\n                    if (translation && translation.recursive) {\r\n                        maxlength = false;\r\n                        break;\r\n                    }\r\n                }\r\n\r\n                if (maxlength) {\r\n                    el.attr('maxlength', mask.length).data('mask-maxlength', true);\r\n                }\r\n\r\n                p.destroyEvents();\r\n                p.events();\r\n\r\n                var caret = p.getCaret();\r\n                p.val(p.getMasked());\r\n                p.setCaret(caret);\r\n            }\r\n        };\r\n\r\n        jMask.init(!el.is('input'));\r\n    };\r\n\r\n    $.maskWatchers = {};\r\n    var HTMLAttributes = function () {\r\n        var input = $(this),\r\n            options = {},\r\n            prefix = 'data-mask-',\r\n            mask = input.attr('data-mask');\r\n\r\n        if (input.attr(prefix + 'reverse')) {\r\n            options.reverse = true;\r\n        }\r\n\r\n        if (input.attr(prefix + 'clearifnotmatch')) {\r\n            options.clearIfNotMatch = true;\r\n        }\r\n\r\n        if (input.attr(prefix + 'selectonfocus') === 'true') {\r\n           options.selectOnFocus = true;\r\n        }\r\n\r\n        if (notSameMaskObject(input, mask, options)) {\r\n            return input.data('mask', new Mask(this, mask, options));\r\n        }\r\n    },\r\n    notSameMaskObject = function(field, mask, options) {\r\n        options = options || {};\r\n        var maskObject = $(field).data('mask'),\r\n            stringify = JSON.stringify,\r\n            value = $(field).val() || $(field).text();\r\n        try {\r\n            if (typeof mask === 'function') {\r\n                mask = mask(value);\r\n            }\r\n            return typeof maskObject !== 'object' || stringify(maskObject.options) !== stringify(options) || maskObject.mask !== mask;\r\n        } catch (e) {}\r\n    },\r\n    eventSupported = function(eventName) {\r\n        var el = document.createElement('div'), isSupported;\r\n\r\n        eventName = 'on' + eventName;\r\n        isSupported = (eventName in el);\r\n\r\n        if ( !isSupported ) {\r\n            el.setAttribute(eventName, 'return;');\r\n            isSupported = typeof el[eventName] === 'function';\r\n        }\r\n        el = null;\r\n\r\n        return isSupported;\r\n    };\r\n\r\n    $.fn.mask = function(mask, options) {\r\n        options = options || {};\r\n        var selector = this.selector,\r\n            globals = $.jMaskGlobals,\r\n            interval = globals.watchInterval,\r\n            watchInputs = options.watchInputs || globals.watchInputs,\r\n            maskFunction = function() {\r\n                if (notSameMaskObject(this, mask, options)) {\r\n                    return $(this).data('mask', new Mask(this, mask, options));\r\n                }\r\n            };\r\n\r\n        $(this).each(maskFunction);\r\n\r\n        if (selector && selector !== '' && watchInputs) {\r\n            clearInterval($.maskWatchers[selector]);\r\n            $.maskWatchers[selector] = setInterval(function(){\r\n                $(document).find(selector).each(maskFunction);\r\n            }, interval);\r\n        }\r\n        return this;\r\n    };\r\n\r\n    $.fn.masked = function(val) {\r\n        return this.data('mask').getMaskedVal(val);\r\n    };\r\n\r\n    $.fn.unmask = function() {\r\n        clearInterval($.maskWatchers[this.selector]);\r\n        delete $.maskWatchers[this.selector];\r\n        return this.each(function() {\r\n            var dataMask = $(this).data('mask');\r\n            if (dataMask) {\r\n                dataMask.remove().removeData('mask');\r\n            }\r\n        });\r\n    };\r\n\r\n    $.fn.cleanVal = function() {\r\n        return this.data('mask').getCleanVal();\r\n    };\r\n\r\n    $.applyDataMask = function(selector) {\r\n        selector = selector || $.jMaskGlobals.maskElements;\r\n        var $selector = (selector instanceof $) ? selector : $(selector);\r\n        $selector.filter($.jMaskGlobals.dataMaskAttr).each(HTMLAttributes);\r\n    };\r\n\r\n    var globals = {\r\n        maskElements: 'input,td,span,div',\r\n        dataMaskAttr: '*[data-mask]',\r\n        dataMask: true,\r\n        watchInterval: 300,\r\n        watchInputs: true,\r\n        keyStrokeCompensation: 10,\r\n        // old versions of chrome dont work great with input event\r\n        useInput: !/Chrome\\/[2-4][0-9]|SamsungBrowser/.test(window.navigator.userAgent) && eventSupported('input'),\r\n        watchDataMask: false,\r\n        byPassKeys: [9, 16, 17, 18, 36, 37, 38, 39, 40, 91],\r\n        translation: {\r\n            '0': {pattern: /\\d/},\r\n            '9': {pattern: /\\d/, optional: true},\r\n            '#': {pattern: /\\d/, recursive: true},\r\n            'A': {pattern: /[a-zA-Z0-9]/},\r\n            'S': {pattern: /[a-zA-Z]/}\r\n        }\r\n    };\r\n\r\n    $.jMaskGlobals = $.jMaskGlobals || {};\r\n    globals = $.jMaskGlobals = $.extend(true, {}, globals, $.jMaskGlobals);\r\n\r\n    // looking for inputs with data-mask attribute\r\n    if (globals.dataMask) {\r\n        $.applyDataMask();\r\n    }\r\n\r\n    setInterval(function() {\r\n        if ($.jMaskGlobals.watchDataMask) {\r\n            $.applyDataMask();\r\n        }\r\n    }, globals.watchInterval);\r\n}, window.jQuery, window.Zepto));\r\n","/* == jquery mousewheel plugin == Version: 3.1.13, License: MIT License (MIT) */\r\n!function(a){\"function\"==typeof define&&define.amd?define([\"jquery\"],a):\"object\"==typeof exports?module.exports=a:a(jQuery)}(function(a){function b(b){var g=b||window.event,h=i.call(arguments,1),j=0,l=0,m=0,n=0,o=0,p=0;if(b=a.event.fix(g),b.type=\"mousewheel\",\"detail\"in g&&(m=-1*g.detail),\"wheelDelta\"in g&&(m=g.wheelDelta),\"wheelDeltaY\"in g&&(m=g.wheelDeltaY),\"wheelDeltaX\"in g&&(l=-1*g.wheelDeltaX),\"axis\"in g&&g.axis===g.HORIZONTAL_AXIS&&(l=-1*m,m=0),j=0===m?l:m,\"deltaY\"in g&&(m=-1*g.deltaY,j=m),\"deltaX\"in g&&(l=g.deltaX,0===m&&(j=-1*l)),0!==m||0!==l){if(1===g.deltaMode){var q=a.data(this,\"mousewheel-line-height\");j*=q,m*=q,l*=q}else if(2===g.deltaMode){var r=a.data(this,\"mousewheel-page-height\");j*=r,m*=r,l*=r}if(n=Math.max(Math.abs(m),Math.abs(l)),(!f||f>n)&&(f=n,d(g,n)&&(f/=40)),d(g,n)&&(j/=40,l/=40,m/=40),j=Math[j>=1?\"floor\":\"ceil\"](j/f),l=Math[l>=1?\"floor\":\"ceil\"](l/f),m=Math[m>=1?\"floor\":\"ceil\"](m/f),k.settings.normalizeOffset&&this.getBoundingClientRect){var s=this.getBoundingClientRect();o=b.clientX-s.left,p=b.clientY-s.top}return b.deltaX=l,b.deltaY=m,b.deltaFactor=f,b.offsetX=o,b.offsetY=p,b.deltaMode=0,h.unshift(b,j,l,m),e&&clearTimeout(e),e=setTimeout(c,200),(a.event.dispatch||a.event.handle).apply(this,h)}}function c(){f=null}function d(a,b){return k.settings.adjustOldDeltas&&\"mousewheel\"===a.type&&b%120===0}var e,f,g=[\"wheel\",\"mousewheel\",\"DOMMouseScroll\",\"MozMousePixelScroll\"],h=\"onwheel\"in document||document.documentMode>=9?[\"wheel\"]:[\"mousewheel\",\"DomMouseScroll\",\"MozMousePixelScroll\"],i=Array.prototype.slice;if(a.event.fixHooks)for(var j=g.length;j;)a.event.fixHooks[g[--j]]=a.event.mouseHooks;var k=a.event.special.mousewheel={version:\"3.1.12\",setup:function(){if(this.addEventListener)for(var c=h.length;c;)this.addEventListener(h[--c],b,!1);else this.onmousewheel=b;a.data(this,\"mousewheel-line-height\",k.getLineHeight(this)),a.data(this,\"mousewheel-page-height\",k.getPageHeight(this))},teardown:function(){if(this.removeEventListener)for(var c=h.length;c;)this.removeEventListener(h[--c],b,!1);else this.onmousewheel=null;a.removeData(this,\"mousewheel-line-height\"),a.removeData(this,\"mousewheel-page-height\")},getLineHeight:function(b){var c=a(b),d=c[\"offsetParent\"in a.fn?\"offsetParent\":\"parent\"]();return d.length||(d=a(\"body\")),parseInt(d.css(\"fontSize\"),10)||parseInt(c.css(\"fontSize\"),10)||16},getPageHeight:function(b){return a(b).height()},settings:{adjustOldDeltas:!0,normalizeOffset:!0}};a.fn.extend({mousewheel:function(a){return a?this.bind(\"mousewheel\",a):this.trigger(\"mousewheel\")},unmousewheel:function(a){return this.unbind(\"mousewheel\",a)}})});!function(a){\"function\"==typeof define&&define.amd?define([\"jquery\"],a):\"object\"==typeof exports?module.exports=a:a(jQuery)}(function(a){function b(b){var g=b||window.event,h=i.call(arguments,1),j=0,l=0,m=0,n=0,o=0,p=0;if(b=a.event.fix(g),b.type=\"mousewheel\",\"detail\"in g&&(m=-1*g.detail),\"wheelDelta\"in g&&(m=g.wheelDelta),\"wheelDeltaY\"in g&&(m=g.wheelDeltaY),\"wheelDeltaX\"in g&&(l=-1*g.wheelDeltaX),\"axis\"in g&&g.axis===g.HORIZONTAL_AXIS&&(l=-1*m,m=0),j=0===m?l:m,\"deltaY\"in g&&(m=-1*g.deltaY,j=m),\"deltaX\"in g&&(l=g.deltaX,0===m&&(j=-1*l)),0!==m||0!==l){if(1===g.deltaMode){var q=a.data(this,\"mousewheel-line-height\");j*=q,m*=q,l*=q}else if(2===g.deltaMode){var r=a.data(this,\"mousewheel-page-height\");j*=r,m*=r,l*=r}if(n=Math.max(Math.abs(m),Math.abs(l)),(!f||f>n)&&(f=n,d(g,n)&&(f/=40)),d(g,n)&&(j/=40,l/=40,m/=40),j=Math[j>=1?\"floor\":\"ceil\"](j/f),l=Math[l>=1?\"floor\":\"ceil\"](l/f),m=Math[m>=1?\"floor\":\"ceil\"](m/f),k.settings.normalizeOffset&&this.getBoundingClientRect){var s=this.getBoundingClientRect();o=b.clientX-s.left,p=b.clientY-s.top}return b.deltaX=l,b.deltaY=m,b.deltaFactor=f,b.offsetX=o,b.offsetY=p,b.deltaMode=0,h.unshift(b,j,l,m),e&&clearTimeout(e),e=setTimeout(c,200),(a.event.dispatch||a.event.handle).apply(this,h)}}function c(){f=null}function d(a,b){return k.settings.adjustOldDeltas&&\"mousewheel\"===a.type&&b%120===0}var e,f,g=[\"wheel\",\"mousewheel\",\"DOMMouseScroll\",\"MozMousePixelScroll\"],h=\"onwheel\"in document||document.documentMode>=9?[\"wheel\"]:[\"mousewheel\",\"DomMouseScroll\",\"MozMousePixelScroll\"],i=Array.prototype.slice;if(a.event.fixHooks)for(var j=g.length;j;)a.event.fixHooks[g[--j]]=a.event.mouseHooks;var k=a.event.special.mousewheel={version:\"3.1.12\",setup:function(){if(this.addEventListener)for(var c=h.length;c;)this.addEventListener(h[--c],b,!1);else this.onmousewheel=b;a.data(this,\"mousewheel-line-height\",k.getLineHeight(this)),a.data(this,\"mousewheel-page-height\",k.getPageHeight(this))},teardown:function(){if(this.removeEventListener)for(var c=h.length;c;)this.removeEventListener(h[--c],b,!1);else this.onmousewheel=null;a.removeData(this,\"mousewheel-line-height\"),a.removeData(this,\"mousewheel-page-height\")},getLineHeight:function(b){var c=a(b),d=c[\"offsetParent\"in a.fn?\"offsetParent\":\"parent\"]();return d.length||(d=a(\"body\")),parseInt(d.css(\"fontSize\"),10)||parseInt(c.css(\"fontSize\"),10)||16},getPageHeight:function(b){return a(b).height()},settings:{adjustOldDeltas:!0,normalizeOffset:!0}};a.fn.extend({mousewheel:function(a){return a?this.bind(\"mousewheel\",a):this.trigger(\"mousewheel\")},unmousewheel:function(a){return this.unbind(\"mousewheel\",a)}})});\r\n/* == malihu jquery custom scrollbar plugin == Version: 3.1.5, License: MIT License (MIT) */\r\n!function(e){\"function\"==typeof define&&define.amd?define([\"jquery\"],e):\"undefined\"!=typeof module&&module.exports?module.exports=e:e(jQuery,window,document)}(function(e){!function(t){var o=\"function\"==typeof define&&define.amd,a=\"undefined\"!=typeof module&&module.exports,n=\"https:\"==document.location.protocol?\"https:\":\"http:\",i=\"cdnjs.cloudflare.com/ajax/libs/jquery-mousewheel/3.1.13/jquery.mousewheel.min.js\";o||(a?require(\"jquery-mousewheel\")(e):e.event.special.mousewheel||e(\"head\").append(decodeURI(\"%3Cscript src=\"+n+\"//\"+i+\"%3E%3C/script%3E\"))),t()}(function(){var t,o=\"mCustomScrollbar\",a=\"mCS\",n=\".mCustomScrollbar\",i={setTop:0,setLeft:0,axis:\"y\",scrollbarPosition:\"inside\",scrollInertia:950,autoDraggerLength:!0,alwaysShowScrollbar:0,snapOffset:0,mouseWheel:{enable:!0,scrollAmount:\"auto\",axis:\"y\",deltaFactor:\"auto\",disableOver:[\"select\",\"option\",\"keygen\",\"datalist\",\"textarea\"]},scrollButtons:{scrollType:\"stepless\",scrollAmount:\"auto\"},keyboard:{enable:!0,scrollType:\"stepless\",scrollAmount:\"auto\"},contentTouchScroll:25,documentTouchScroll:!0,advanced:{autoScrollOnFocus:\"input,textarea,select,button,datalist,keygen,a[tabindex],area,object,[contenteditable='true']\",updateOnContentResize:!0,updateOnImageLoad:\"auto\",autoUpdateTimeout:60},theme:\"light\",callbacks:{onTotalScrollOffset:0,onTotalScrollBackOffset:0,alwaysTriggerOffsets:!0}},r=0,l={},s=window.attachEvent&&!window.addEventListener?1:0,c=!1,d=[\"mCSB_dragger_onDrag\",\"mCSB_scrollTools_onDrag\",\"mCS_img_loaded\",\"mCS_disabled\",\"mCS_destroyed\",\"mCS_no_scrollbar\",\"mCS-autoHide\",\"mCS-dir-rtl\",\"mCS_no_scrollbar_y\",\"mCS_no_scrollbar_x\",\"mCS_y_hidden\",\"mCS_x_hidden\",\"mCSB_draggerContainer\",\"mCSB_buttonUp\",\"mCSB_buttonDown\",\"mCSB_buttonLeft\",\"mCSB_buttonRight\"],u={init:function(t){var t=e.extend(!0,{},i,t),o=f.call(this);if(t.live){var s=t.liveSelector||this.selector||n,c=e(s);if(\"off\"===t.live)return void m(s);l[s]=setTimeout(function(){c.mCustomScrollbar(t),\"once\"===t.live&&c.length&&m(s)},500)}else m(s);return t.setWidth=t.set_width?t.set_width:t.setWidth,t.setHeight=t.set_height?t.set_height:t.setHeight,t.axis=t.horizontalScroll?\"x\":p(t.axis),t.scrollInertia=t.scrollInertia>0&&t.scrollInertia<17?17:t.scrollInertia,\"object\"!=typeof t.mouseWheel&&1==t.mouseWheel&&(t.mouseWheel={enable:!0,scrollAmount:\"auto\",axis:\"y\",preventDefault:!1,deltaFactor:\"auto\",normalizeDelta:!1,invert:!1}),t.mouseWheel.scrollAmount=t.mouseWheelPixels?t.mouseWheelPixels:t.mouseWheel.scrollAmount,t.mouseWheel.normalizeDelta=t.advanced.normalizeMouseWheelDelta?t.advanced.normalizeMouseWheelDelta:t.mouseWheel.normalizeDelta,t.scrollButtons.scrollType=g(t.scrollButtons.scrollType),h(t),e(o).each(function(){var o=e(this);if(!o.data(a)){o.data(a,{idx:++r,opt:t,scrollRatio:{y:null,x:null},overflowed:null,contentReset:{y:null,x:null},bindEvents:!1,tweenRunning:!1,sequential:{},langDir:o.css(\"direction\"),cbOffsets:null,trigger:null,poll:{size:{o:0,n:0},img:{o:0,n:0},change:{o:0,n:0}}});var n=o.data(a),i=n.opt,l=o.data(\"mcs-axis\"),s=o.data(\"mcs-scrollbar-position\"),c=o.data(\"mcs-theme\");l&&(i.axis=l),s&&(i.scrollbarPosition=s),c&&(i.theme=c,h(i)),v.call(this),n&&i.callbacks.onCreate&&\"function\"==typeof i.callbacks.onCreate&&i.callbacks.onCreate.call(this),e(\"#mCSB_\"+n.idx+\"_container img:not(.\"+d[2]+\")\").addClass(d[2]),u.update.call(null,o)}})},update:function(t,o){var n=t||f.call(this);return e(n).each(function(){var t=e(this);if(t.data(a)){var n=t.data(a),i=n.opt,r=e(\"#mCSB_\"+n.idx+\"_container\"),l=e(\"#mCSB_\"+n.idx),s=[e(\"#mCSB_\"+n.idx+\"_dragger_vertical\"),e(\"#mCSB_\"+n.idx+\"_dragger_horizontal\")];if(!r.length)return;n.tweenRunning&&Q(t),o&&n&&i.callbacks.onBeforeUpdate&&\"function\"==typeof i.callbacks.onBeforeUpdate&&i.callbacks.onBeforeUpdate.call(this),t.hasClass(d[3])&&t.removeClass(d[3]),t.hasClass(d[4])&&t.removeClass(d[4]),l.css(\"max-height\",\"none\"),l.height()!==t.height()&&l.css(\"max-height\",t.height()),_.call(this),\"y\"===i.axis||i.advanced.autoExpandHorizontalScroll||r.css(\"width\",x(r)),n.overflowed=y.call(this),M.call(this),i.autoDraggerLength&&S.call(this),b.call(this),T.call(this);var c=[Math.abs(r[0].offsetTop),Math.abs(r[0].offsetLeft)];\"x\"!==i.axis&&(n.overflowed[0]?s[0].height()>s[0].parent().height()?B.call(this):(G(t,c[0].toString(),{dir:\"y\",dur:0,overwrite:\"none\"}),n.contentReset.y=null):(B.call(this),\"y\"===i.axis?k.call(this):\"yx\"===i.axis&&n.overflowed[1]&&G(t,c[1].toString(),{dir:\"x\",dur:0,overwrite:\"none\"}))),\"y\"!==i.axis&&(n.overflowed[1]?s[1].width()>s[1].parent().width()?B.call(this):(G(t,c[1].toString(),{dir:\"x\",dur:0,overwrite:\"none\"}),n.contentReset.x=null):(B.call(this),\"x\"===i.axis?k.call(this):\"yx\"===i.axis&&n.overflowed[0]&&G(t,c[0].toString(),{dir:\"y\",dur:0,overwrite:\"none\"}))),o&&n&&(2===o&&i.callbacks.onImageLoad&&\"function\"==typeof i.callbacks.onImageLoad?i.callbacks.onImageLoad.call(this):3===o&&i.callbacks.onSelectorChange&&\"function\"==typeof i.callbacks.onSelectorChange?i.callbacks.onSelectorChange.call(this):i.callbacks.onUpdate&&\"function\"==typeof i.callbacks.onUpdate&&i.callbacks.onUpdate.call(this)),N.call(this)}})},scrollTo:function(t,o){if(\"undefined\"!=typeof t&&null!=t){var n=f.call(this);return e(n).each(function(){var n=e(this);if(n.data(a)){var i=n.data(a),r=i.opt,l={trigger:\"external\",scrollInertia:r.scrollInertia,scrollEasing:\"mcsEaseInOut\",moveDragger:!1,timeout:60,callbacks:!0,onStart:!0,onUpdate:!0,onComplete:!0},s=e.extend(!0,{},l,o),c=Y.call(this,t),d=s.scrollInertia>0&&s.scrollInertia<17?17:s.scrollInertia;c[0]=X.call(this,c[0],\"y\"),c[1]=X.call(this,c[1],\"x\"),s.moveDragger&&(c[0]*=i.scrollRatio.y,c[1]*=i.scrollRatio.x),s.dur=ne()?0:d,setTimeout(function(){null!==c[0]&&\"undefined\"!=typeof c[0]&&\"x\"!==r.axis&&i.overflowed[0]&&(s.dir=\"y\",s.overwrite=\"all\",G(n,c[0].toString(),s)),null!==c[1]&&\"undefined\"!=typeof c[1]&&\"y\"!==r.axis&&i.overflowed[1]&&(s.dir=\"x\",s.overwrite=\"none\",G(n,c[1].toString(),s))},s.timeout)}})}},stop:function(){var t=f.call(this);return e(t).each(function(){var t=e(this);t.data(a)&&Q(t)})},disable:function(t){var o=f.call(this);return e(o).each(function(){var o=e(this);if(o.data(a)){o.data(a);N.call(this,\"remove\"),k.call(this),t&&B.call(this),M.call(this,!0),o.addClass(d[3])}})},destroy:function(){var t=f.call(this);return e(t).each(function(){var n=e(this);if(n.data(a)){var i=n.data(a),r=i.opt,l=e(\"#mCSB_\"+i.idx),s=e(\"#mCSB_\"+i.idx+\"_container\"),c=e(\".mCSB_\"+i.idx+\"_scrollbar\");r.live&&m(r.liveSelector||e(t).selector),N.call(this,\"remove\"),k.call(this),B.call(this),n.removeData(a),$(this,\"mcs\"),c.remove(),s.find(\"img.\"+d[2]).removeClass(d[2]),l.replaceWith(s.contents()),n.removeClass(o+\" _\"+a+\"_\"+i.idx+\" \"+d[6]+\" \"+d[7]+\" \"+d[5]+\" \"+d[3]).addClass(d[4])}})}},f=function(){return\"object\"!=typeof e(this)||e(this).length<1?n:this},h=function(t){var o=[\"rounded\",\"rounded-dark\",\"rounded-dots\",\"rounded-dots-dark\"],a=[\"rounded-dots\",\"rounded-dots-dark\",\"3d\",\"3d-dark\",\"3d-thick\",\"3d-thick-dark\",\"inset\",\"inset-dark\",\"inset-2\",\"inset-2-dark\",\"inset-3\",\"inset-3-dark\"],n=[\"minimal\",\"minimal-dark\"],i=[\"minimal\",\"minimal-dark\"],r=[\"minimal\",\"minimal-dark\"];t.autoDraggerLength=e.inArray(t.theme,o)>-1?!1:t.autoDraggerLength,t.autoExpandScrollbar=e.inArray(t.theme,a)>-1?!1:t.autoExpandScrollbar,t.scrollButtons.enable=e.inArray(t.theme,n)>-1?!1:t.scrollButtons.enable,t.autoHideScrollbar=e.inArray(t.theme,i)>-1?!0:t.autoHideScrollbar,t.scrollbarPosition=e.inArray(t.theme,r)>-1?\"outside\":t.scrollbarPosition},m=function(e){l[e]&&(clearTimeout(l[e]),$(l,e))},p=function(e){return\"yx\"===e||\"xy\"===e||\"auto\"===e?\"yx\":\"x\"===e||\"horizontal\"===e?\"x\":\"y\"},g=function(e){return\"stepped\"===e||\"pixels\"===e||\"step\"===e||\"click\"===e?\"stepped\":\"stepless\"},v=function(){var t=e(this),n=t.data(a),i=n.opt,r=i.autoExpandScrollbar?\" \"+d[1]+\"_expand\":\"\",l=[\"<div id='mCSB_\"+n.idx+\"_scrollbar_vertical' class='mCSB_scrollTools mCSB_\"+n.idx+\"_scrollbar mCS-\"+i.theme+\" mCSB_scrollTools_vertical\"+r+\"'><div class='\"+d[12]+\"'><div id='mCSB_\"+n.idx+\"_dragger_vertical' class='mCSB_dragger' style='position:absolute;'><div class='mCSB_dragger_bar' /></div><div class='mCSB_draggerRail' /></div></div>\",\"<div id='mCSB_\"+n.idx+\"_scrollbar_horizontal' class='mCSB_scrollTools mCSB_\"+n.idx+\"_scrollbar mCS-\"+i.theme+\" mCSB_scrollTools_horizontal\"+r+\"'><div class='\"+d[12]+\"'><div id='mCSB_\"+n.idx+\"_dragger_horizontal' class='mCSB_dragger' style='position:absolute;'><div class='mCSB_dragger_bar' /></div><div class='mCSB_draggerRail' /></div></div>\"],s=\"yx\"===i.axis?\"mCSB_vertical_horizontal\":\"x\"===i.axis?\"mCSB_horizontal\":\"mCSB_vertical\",c=\"yx\"===i.axis?l[0]+l[1]:\"x\"===i.axis?l[1]:l[0],u=\"yx\"===i.axis?\"<div id='mCSB_\"+n.idx+\"_container_wrapper' class='mCSB_container_wrapper' />\":\"\",f=i.autoHideScrollbar?\" \"+d[6]:\"\",h=\"x\"!==i.axis&&\"rtl\"===n.langDir?\" \"+d[7]:\"\";i.setWidth&&t.css(\"width\",i.setWidth),i.setHeight&&t.css(\"height\",i.setHeight),i.setLeft=\"y\"!==i.axis&&\"rtl\"===n.langDir?\"989999px\":i.setLeft,t.addClass(o+\" _\"+a+\"_\"+n.idx+f+h).wrapInner(\"<div id='mCSB_\"+n.idx+\"' class='mCustomScrollBox mCS-\"+i.theme+\" \"+s+\"'><div id='mCSB_\"+n.idx+\"_container' class='mCSB_container' style='position:relative; top:\"+i.setTop+\"; left:\"+i.setLeft+\";' dir='\"+n.langDir+\"' /></div>\");var m=e(\"#mCSB_\"+n.idx),p=e(\"#mCSB_\"+n.idx+\"_container\");\"y\"===i.axis||i.advanced.autoExpandHorizontalScroll||p.css(\"width\",x(p)),\"outside\"===i.scrollbarPosition?(\"static\"===t.css(\"position\")&&t.css(\"position\",\"relative\"),t.css(\"overflow\",\"visible\"),m.addClass(\"mCSB_outside\").after(c)):(m.addClass(\"mCSB_inside\").append(c),p.wrap(u)),w.call(this);var g=[e(\"#mCSB_\"+n.idx+\"_dragger_vertical\"),e(\"#mCSB_\"+n.idx+\"_dragger_horizontal\")];g[0].css(\"min-height\",g[0].height()),g[1].css(\"min-width\",g[1].width())},x=function(t){var o=[t[0].scrollWidth,Math.max.apply(Math,t.children().map(function(){return e(this).outerWidth(!0)}).get())],a=t.parent().width();return o[0]>a?o[0]:o[1]>a?o[1]:\"100%\"},_=function(){var t=e(this),o=t.data(a),n=o.opt,i=e(\"#mCSB_\"+o.idx+\"_container\");if(n.advanced.autoExpandHorizontalScroll&&\"y\"!==n.axis){i.css({width:\"auto\",\"min-width\":0,\"overflow-x\":\"scroll\"});var r=Math.ceil(i[0].scrollWidth);3===n.advanced.autoExpandHorizontalScroll||2!==n.advanced.autoExpandHorizontalScroll&&r>i.parent().width()?i.css({width:r,\"min-width\":\"100%\",\"overflow-x\":\"inherit\"}):i.css({\"overflow-x\":\"inherit\",position:\"absolute\"}).wrap(\"<div class='mCSB_h_wrapper' style='position:relative; left:0; width:999999px;' />\").css({width:Math.ceil(i[0].getBoundingClientRect().right+.4)-Math.floor(i[0].getBoundingClientRect().left),\"min-width\":\"100%\",position:\"relative\"}).unwrap()}},w=function(){var t=e(this),o=t.data(a),n=o.opt,i=e(\".mCSB_\"+o.idx+\"_scrollbar:first\"),r=oe(n.scrollButtons.tabindex)?\"tabindex='\"+n.scrollButtons.tabindex+\"'\":\"\",l=[\"<a href='#' class='\"+d[13]+\"' \"+r+\" />\",\"<a href='#' class='\"+d[14]+\"' \"+r+\" />\",\"<a href='#' class='\"+d[15]+\"' \"+r+\" />\",\"<a href='#' class='\"+d[16]+\"' \"+r+\" />\"],s=[\"x\"===n.axis?l[2]:l[0],\"x\"===n.axis?l[3]:l[1],l[2],l[3]];n.scrollButtons.enable&&i.prepend(s[0]).append(s[1]).next(\".mCSB_scrollTools\").prepend(s[2]).append(s[3])},S=function(){var t=e(this),o=t.data(a),n=e(\"#mCSB_\"+o.idx),i=e(\"#mCSB_\"+o.idx+\"_container\"),r=[e(\"#mCSB_\"+o.idx+\"_dragger_vertical\"),e(\"#mCSB_\"+o.idx+\"_dragger_horizontal\")],l=[n.height()/i.outerHeight(!1),n.width()/i.outerWidth(!1)],c=[parseInt(r[0].css(\"min-height\")),Math.round(l[0]*r[0].parent().height()),parseInt(r[1].css(\"min-width\")),Math.round(l[1]*r[1].parent().width())],d=s&&c[1]<c[0]?c[0]:c[1],u=s&&c[3]<c[2]?c[2]:c[3];r[0].css({height:d,\"max-height\":r[0].parent().height()-10}).find(\".mCSB_dragger_bar\").css({\"line-height\":c[0]+\"px\"}),r[1].css({width:u,\"max-width\":r[1].parent().width()-10})},b=function(){var t=e(this),o=t.data(a),n=e(\"#mCSB_\"+o.idx),i=e(\"#mCSB_\"+o.idx+\"_container\"),r=[e(\"#mCSB_\"+o.idx+\"_dragger_vertical\"),e(\"#mCSB_\"+o.idx+\"_dragger_horizontal\")],l=[i.outerHeight(!1)-n.height(),i.outerWidth(!1)-n.width()],s=[l[0]/(r[0].parent().height()-r[0].height()),l[1]/(r[1].parent().width()-r[1].width())];o.scrollRatio={y:s[0],x:s[1]}},C=function(e,t,o){var a=o?d[0]+\"_expanded\":\"\",n=e.closest(\".mCSB_scrollTools\");\"active\"===t?(e.toggleClass(d[0]+\" \"+a),n.toggleClass(d[1]),e[0]._draggable=e[0]._draggable?0:1):e[0]._draggable||(\"hide\"===t?(e.removeClass(d[0]),n.removeClass(d[1])):(e.addClass(d[0]),n.addClass(d[1])))},y=function(){var t=e(this),o=t.data(a),n=e(\"#mCSB_\"+o.idx),i=e(\"#mCSB_\"+o.idx+\"_container\"),r=null==o.overflowed?i.height():i.outerHeight(!1),l=null==o.overflowed?i.width():i.outerWidth(!1),s=i[0].scrollHeight,c=i[0].scrollWidth;return s>r&&(r=s),c>l&&(l=c),[r>n.height(),l>n.width()]},B=function(){var t=e(this),o=t.data(a),n=o.opt,i=e(\"#mCSB_\"+o.idx),r=e(\"#mCSB_\"+o.idx+\"_container\"),l=[e(\"#mCSB_\"+o.idx+\"_dragger_vertical\"),e(\"#mCSB_\"+o.idx+\"_dragger_horizontal\")];if(Q(t),(\"x\"!==n.axis&&!o.overflowed[0]||\"y\"===n.axis&&o.overflowed[0])&&(l[0].add(r).css(\"top\",0),G(t,\"_resetY\")),\"y\"!==n.axis&&!o.overflowed[1]||\"x\"===n.axis&&o.overflowed[1]){var s=dx=0;\"rtl\"===o.langDir&&(s=i.width()-r.outerWidth(!1),dx=Math.abs(s/o.scrollRatio.x)),r.css(\"left\",s),l[1].css(\"left\",dx),G(t,\"_resetX\")}},T=function(){function t(){r=setTimeout(function(){e.event.special.mousewheel?(clearTimeout(r),W.call(o[0])):t()},100)}var o=e(this),n=o.data(a),i=n.opt;if(!n.bindEvents){if(I.call(this),i.contentTouchScroll&&D.call(this),E.call(this),i.mouseWheel.enable){var r;t()}P.call(this),U.call(this),i.advanced.autoScrollOnFocus&&H.call(this),i.scrollButtons.enable&&F.call(this),i.keyboard.enable&&q.call(this),n.bindEvents=!0}},k=function(){var t=e(this),o=t.data(a),n=o.opt,i=a+\"_\"+o.idx,r=\".mCSB_\"+o.idx+\"_scrollbar\",l=e(\"#mCSB_\"+o.idx+\",#mCSB_\"+o.idx+\"_container,#mCSB_\"+o.idx+\"_container_wrapper,\"+r+\" .\"+d[12]+\",#mCSB_\"+o.idx+\"_dragger_vertical,#mCSB_\"+o.idx+\"_dragger_horizontal,\"+r+\">a\"),s=e(\"#mCSB_\"+o.idx+\"_container\");n.advanced.releaseDraggableSelectors&&l.add(e(n.advanced.releaseDraggableSelectors)),n.advanced.extraDraggableSelectors&&l.add(e(n.advanced.extraDraggableSelectors)),o.bindEvents&&(e(document).add(e(!A()||top.document)).unbind(\".\"+i),l.each(function(){e(this).unbind(\".\"+i)}),clearTimeout(t[0]._focusTimeout),$(t[0],\"_focusTimeout\"),clearTimeout(o.sequential.step),$(o.sequential,\"step\"),clearTimeout(s[0].onCompleteTimeout),$(s[0],\"onCompleteTimeout\"),o.bindEvents=!1)},M=function(t){var o=e(this),n=o.data(a),i=n.opt,r=e(\"#mCSB_\"+n.idx+\"_container_wrapper\"),l=r.length?r:e(\"#mCSB_\"+n.idx+\"_container\"),s=[e(\"#mCSB_\"+n.idx+\"_scrollbar_vertical\"),e(\"#mCSB_\"+n.idx+\"_scrollbar_horizontal\")],c=[s[0].find(\".mCSB_dragger\"),s[1].find(\".mCSB_dragger\")];\"x\"!==i.axis&&(n.overflowed[0]&&!t?(s[0].add(c[0]).add(s[0].children(\"a\")).css(\"display\",\"block\"),l.removeClass(d[8]+\" \"+d[10])):(i.alwaysShowScrollbar?(2!==i.alwaysShowScrollbar&&c[0].css(\"display\",\"none\"),l.removeClass(d[10])):(s[0].css(\"display\",\"none\"),l.addClass(d[10])),l.addClass(d[8]))),\"y\"!==i.axis&&(n.overflowed[1]&&!t?(s[1].add(c[1]).add(s[1].children(\"a\")).css(\"display\",\"block\"),l.removeClass(d[9]+\" \"+d[11])):(i.alwaysShowScrollbar?(2!==i.alwaysShowScrollbar&&c[1].css(\"display\",\"none\"),l.removeClass(d[11])):(s[1].css(\"display\",\"none\"),l.addClass(d[11])),l.addClass(d[9]))),n.overflowed[0]||n.overflowed[1]?o.removeClass(d[5]):o.addClass(d[5])},O=function(t){var o=t.type,a=t.target.ownerDocument!==document&&null!==frameElement?[e(frameElement).offset().top,e(frameElement).offset().left]:null,n=A()&&t.target.ownerDocument!==top.document&&null!==frameElement?[e(t.view.frameElement).offset().top,e(t.view.frameElement).offset().left]:[0,0];switch(o){case\"pointerdown\":case\"MSPointerDown\":case\"pointermove\":case\"MSPointerMove\":case\"pointerup\":case\"MSPointerUp\":return a?[t.originalEvent.pageY-a[0]+n[0],t.originalEvent.pageX-a[1]+n[1],!1]:[t.originalEvent.pageY,t.originalEvent.pageX,!1];case\"touchstart\":case\"touchmove\":case\"touchend\":var i=t.originalEvent.touches[0]||t.originalEvent.changedTouches[0],r=t.originalEvent.touches.length||t.originalEvent.changedTouches.length;return t.target.ownerDocument!==document?[i.screenY,i.screenX,r>1]:[i.pageY,i.pageX,r>1];default:return a?[t.pageY-a[0]+n[0],t.pageX-a[1]+n[1],!1]:[t.pageY,t.pageX,!1]}},I=function(){function t(e,t,a,n){if(h[0].idleTimer=d.scrollInertia<233?250:0,o.attr(\"id\")===f[1])var i=\"x\",s=(o[0].offsetLeft-t+n)*l.scrollRatio.x;else var i=\"y\",s=(o[0].offsetTop-e+a)*l.scrollRatio.y;G(r,s.toString(),{dir:i,drag:!0})}var o,n,i,r=e(this),l=r.data(a),d=l.opt,u=a+\"_\"+l.idx,f=[\"mCSB_\"+l.idx+\"_dragger_vertical\",\"mCSB_\"+l.idx+\"_dragger_horizontal\"],h=e(\"#mCSB_\"+l.idx+\"_container\"),m=e(\"#\"+f[0]+\",#\"+f[1]),p=d.advanced.releaseDraggableSelectors?m.add(e(d.advanced.releaseDraggableSelectors)):m,g=d.advanced.extraDraggableSelectors?e(!A()||top.document).add(e(d.advanced.extraDraggableSelectors)):e(!A()||top.document);m.bind(\"contextmenu.\"+u,function(e){e.preventDefault()}).bind(\"mousedown.\"+u+\" touchstart.\"+u+\" pointerdown.\"+u+\" MSPointerDown.\"+u,function(t){if(t.stopImmediatePropagation(),t.preventDefault(),ee(t)){c=!0,s&&(document.onselectstart=function(){return!1}),L.call(h,!1),Q(r),o=e(this);var a=o.offset(),l=O(t)[0]-a.top,u=O(t)[1]-a.left,f=o.height()+a.top,m=o.width()+a.left;f>l&&l>0&&m>u&&u>0&&(n=l,i=u),C(o,\"active\",d.autoExpandScrollbar)}}).bind(\"touchmove.\"+u,function(e){e.stopImmediatePropagation(),e.preventDefault();var a=o.offset(),r=O(e)[0]-a.top,l=O(e)[1]-a.left;t(n,i,r,l)}),e(document).add(g).bind(\"mousemove.\"+u+\" pointermove.\"+u+\" MSPointerMove.\"+u,function(e){if(o){var a=o.offset(),r=O(e)[0]-a.top,l=O(e)[1]-a.left;if(n===r&&i===l)return;t(n,i,r,l)}}).add(p).bind(\"mouseup.\"+u+\" touchend.\"+u+\" pointerup.\"+u+\" MSPointerUp.\"+u,function(){o&&(C(o,\"active\",d.autoExpandScrollbar),o=null),c=!1,s&&(document.onselectstart=null),L.call(h,!0)})},D=function(){function o(e){if(!te(e)||c||O(e)[2])return void(t=0);t=1,b=0,C=0,d=1,y.removeClass(\"mCS_touch_action\");var o=I.offset();u=O(e)[0]-o.top,f=O(e)[1]-o.left,z=[O(e)[0],O(e)[1]]}function n(e){if(te(e)&&!c&&!O(e)[2]&&(T.documentTouchScroll||e.preventDefault(),e.stopImmediatePropagation(),(!C||b)&&d)){g=K();var t=M.offset(),o=O(e)[0]-t.top,a=O(e)[1]-t.left,n=\"mcsLinearOut\";if(E.push(o),W.push(a),z[2]=Math.abs(O(e)[0]-z[0]),z[3]=Math.abs(O(e)[1]-z[1]),B.overflowed[0])var i=D[0].parent().height()-D[0].height(),r=u-o>0&&o-u>-(i*B.scrollRatio.y)&&(2*z[3]<z[2]||\"yx\"===T.axis);if(B.overflowed[1])var l=D[1].parent().width()-D[1].width(),h=f-a>0&&a-f>-(l*B.scrollRatio.x)&&(2*z[2]<z[3]||\"yx\"===T.axis);r||h?(U||e.preventDefault(),b=1):(C=1,y.addClass(\"mCS_touch_action\")),U&&e.preventDefault(),w=\"yx\"===T.axis?[u-o,f-a]:\"x\"===T.axis?[null,f-a]:[u-o,null],I[0].idleTimer=250,B.overflowed[0]&&s(w[0],R,n,\"y\",\"all\",!0),B.overflowed[1]&&s(w[1],R,n,\"x\",L,!0)}}function i(e){if(!te(e)||c||O(e)[2])return void(t=0);t=1,e.stopImmediatePropagation(),Q(y),p=K();var o=M.offset();h=O(e)[0]-o.top,m=O(e)[1]-o.left,E=[],W=[]}function r(e){if(te(e)&&!c&&!O(e)[2]){d=0,e.stopImmediatePropagation(),b=0,C=0,v=K();var t=M.offset(),o=O(e)[0]-t.top,a=O(e)[1]-t.left;if(!(v-g>30)){_=1e3/(v-p);var n=\"mcsEaseOut\",i=2.5>_,r=i?[E[E.length-2],W[W.length-2]]:[0,0];x=i?[o-r[0],a-r[1]]:[o-h,a-m];var u=[Math.abs(x[0]),Math.abs(x[1])];_=i?[Math.abs(x[0]/4),Math.abs(x[1]/4)]:[_,_];var f=[Math.abs(I[0].offsetTop)-x[0]*l(u[0]/_[0],_[0]),Math.abs(I[0].offsetLeft)-x[1]*l(u[1]/_[1],_[1])];w=\"yx\"===T.axis?[f[0],f[1]]:\"x\"===T.axis?[null,f[1]]:[f[0],null],S=[4*u[0]+T.scrollInertia,4*u[1]+T.scrollInertia];var y=parseInt(T.contentTouchScroll)||0;w[0]=u[0]>y?w[0]:0,w[1]=u[1]>y?w[1]:0,B.overflowed[0]&&s(w[0],S[0],n,\"y\",L,!1),B.overflowed[1]&&s(w[1],S[1],n,\"x\",L,!1)}}}function l(e,t){var o=[1.5*t,2*t,t/1.5,t/2];return e>90?t>4?o[0]:o[3]:e>60?t>3?o[3]:o[2]:e>30?t>8?o[1]:t>6?o[0]:t>4?t:o[2]:t>8?t:o[3]}function s(e,t,o,a,n,i){e&&G(y,e.toString(),{dur:t,scrollEasing:o,dir:a,overwrite:n,drag:i})}var d,u,f,h,m,p,g,v,x,_,w,S,b,C,y=e(this),B=y.data(a),T=B.opt,k=a+\"_\"+B.idx,M=e(\"#mCSB_\"+B.idx),I=e(\"#mCSB_\"+B.idx+\"_container\"),D=[e(\"#mCSB_\"+B.idx+\"_dragger_vertical\"),e(\"#mCSB_\"+B.idx+\"_dragger_horizontal\")],E=[],W=[],R=0,L=\"yx\"===T.axis?\"none\":\"all\",z=[],P=I.find(\"iframe\"),H=[\"touchstart.\"+k+\" pointerdown.\"+k+\" MSPointerDown.\"+k,\"touchmove.\"+k+\" pointermove.\"+k+\" MSPointerMove.\"+k,\"touchend.\"+k+\" pointerup.\"+k+\" MSPointerUp.\"+k],U=void 0!==document.body.style.touchAction&&\"\"!==document.body.style.touchAction;I.bind(H[0],function(e){o(e)}).bind(H[1],function(e){n(e)}),M.bind(H[0],function(e){i(e)}).bind(H[2],function(e){r(e)}),P.length&&P.each(function(){e(this).bind(\"load\",function(){A(this)&&e(this.contentDocument||this.contentWindow.document).bind(H[0],function(e){o(e),i(e)}).bind(H[1],function(e){n(e)}).bind(H[2],function(e){r(e)})})})},E=function(){function o(){return window.getSelection?window.getSelection().toString():document.selection&&\"Control\"!=document.selection.type?document.selection.createRange().text:0}function n(e,t,o){d.type=o&&i?\"stepped\":\"stepless\",d.scrollAmount=10,j(r,e,t,\"mcsLinearOut\",o?60:null)}var i,r=e(this),l=r.data(a),s=l.opt,d=l.sequential,u=a+\"_\"+l.idx,f=e(\"#mCSB_\"+l.idx+\"_container\"),h=f.parent();f.bind(\"mousedown.\"+u,function(){t||i||(i=1,c=!0)}).add(document).bind(\"mousemove.\"+u,function(e){if(!t&&i&&o()){var a=f.offset(),r=O(e)[0]-a.top+f[0].offsetTop,c=O(e)[1]-a.left+f[0].offsetLeft;r>0&&r<h.height()&&c>0&&c<h.width()?d.step&&n(\"off\",null,\"stepped\"):(\"x\"!==s.axis&&l.overflowed[0]&&(0>r?n(\"on\",38):r>h.height()&&n(\"on\",40)),\"y\"!==s.axis&&l.overflowed[1]&&(0>c?n(\"on\",37):c>h.width()&&n(\"on\",39)))}}).bind(\"mouseup.\"+u+\" dragend.\"+u,function(){t||(i&&(i=0,n(\"off\",null)),c=!1)})},W=function(){function t(t,a){if(Q(o),!z(o,t.target)){var r=\"auto\"!==i.mouseWheel.deltaFactor?parseInt(i.mouseWheel.deltaFactor):s&&t.deltaFactor<100?100:t.deltaFactor||100,d=i.scrollInertia;if(\"x\"===i.axis||\"x\"===i.mouseWheel.axis)var u=\"x\",f=[Math.round(r*n.scrollRatio.x),parseInt(i.mouseWheel.scrollAmount)],h=\"auto\"!==i.mouseWheel.scrollAmount?f[1]:f[0]>=l.width()?.9*l.width():f[0],m=Math.abs(e(\"#mCSB_\"+n.idx+\"_container\")[0].offsetLeft),p=c[1][0].offsetLeft,g=c[1].parent().width()-c[1].width(),v=\"y\"===i.mouseWheel.axis?t.deltaY||a:t.deltaX;else var u=\"y\",f=[Math.round(r*n.scrollRatio.y),parseInt(i.mouseWheel.scrollAmount)],h=\"auto\"!==i.mouseWheel.scrollAmount?f[1]:f[0]>=l.height()?.9*l.height():f[0],m=Math.abs(e(\"#mCSB_\"+n.idx+\"_container\")[0].offsetTop),p=c[0][0].offsetTop,g=c[0].parent().height()-c[0].height(),v=t.deltaY||a;\"y\"===u&&!n.overflowed[0]||\"x\"===u&&!n.overflowed[1]||((i.mouseWheel.invert||t.webkitDirectionInvertedFromDevice)&&(v=-v),i.mouseWheel.normalizeDelta&&(v=0>v?-1:1),(v>0&&0!==p||0>v&&p!==g||i.mouseWheel.preventDefault)&&(t.stopImmediatePropagation(),t.preventDefault()),t.deltaFactor<5&&!i.mouseWheel.normalizeDelta&&(h=t.deltaFactor,d=17),G(o,(m-v*h).toString(),{dir:u,dur:d}))}}if(e(this).data(a)){var o=e(this),n=o.data(a),i=n.opt,r=a+\"_\"+n.idx,l=e(\"#mCSB_\"+n.idx),c=[e(\"#mCSB_\"+n.idx+\"_dragger_vertical\"),e(\"#mCSB_\"+n.idx+\"_dragger_horizontal\")],d=e(\"#mCSB_\"+n.idx+\"_container\").find(\"iframe\");d.length&&d.each(function(){e(this).bind(\"load\",function(){A(this)&&e(this.contentDocument||this.contentWindow.document).bind(\"mousewheel.\"+r,function(e,o){t(e,o)})})}),l.bind(\"mousewheel.\"+r,function(e,o){t(e,o)})}},R=new Object,A=function(t){var o=!1,a=!1,n=null;if(void 0===t?a=\"#empty\":void 0!==e(t).attr(\"id\")&&(a=e(t).attr(\"id\")),a!==!1&&void 0!==R[a])return R[a];if(t){try{var i=t.contentDocument||t.contentWindow.document;n=i.body.innerHTML}catch(r){}o=null!==n}else{try{var i=top.document;n=i.body.innerHTML}catch(r){}o=null!==n}return a!==!1&&(R[a]=o),o},L=function(e){var t=this.find(\"iframe\");if(t.length){var o=e?\"auto\":\"none\";t.css(\"pointer-events\",o)}},z=function(t,o){var n=o.nodeName.toLowerCase(),i=t.data(a).opt.mouseWheel.disableOver,r=[\"select\",\"textarea\"];return e.inArray(n,i)>-1&&!(e.inArray(n,r)>-1&&!e(o).is(\":focus\"))},P=function(){var t,o=e(this),n=o.data(a),i=a+\"_\"+n.idx,r=e(\"#mCSB_\"+n.idx+\"_container\"),l=r.parent(),s=e(\".mCSB_\"+n.idx+\"_scrollbar .\"+d[12]);s.bind(\"mousedown.\"+i+\" touchstart.\"+i+\" pointerdown.\"+i+\" MSPointerDown.\"+i,function(o){c=!0,e(o.target).hasClass(\"mCSB_dragger\")||(t=1)}).bind(\"touchend.\"+i+\" pointerup.\"+i+\" MSPointerUp.\"+i,function(){c=!1}).bind(\"click.\"+i,function(a){if(t&&(t=0,e(a.target).hasClass(d[12])||e(a.target).hasClass(\"mCSB_draggerRail\"))){Q(o);var i=e(this),s=i.find(\".mCSB_dragger\");if(i.parent(\".mCSB_scrollTools_horizontal\").length>0){if(!n.overflowed[1])return;var c=\"x\",u=a.pageX>s.offset().left?-1:1,f=Math.abs(r[0].offsetLeft)-u*(.9*l.width())}else{if(!n.overflowed[0])return;var c=\"y\",u=a.pageY>s.offset().top?-1:1,f=Math.abs(r[0].offsetTop)-u*(.9*l.height())}G(o,f.toString(),{dir:c,scrollEasing:\"mcsEaseInOut\"})}})},H=function(){var t=e(this),o=t.data(a),n=o.opt,i=a+\"_\"+o.idx,r=e(\"#mCSB_\"+o.idx+\"_container\"),l=r.parent();r.bind(\"focusin.\"+i,function(){var o=e(document.activeElement),a=r.find(\".mCustomScrollBox\").length,i=0;o.is(n.advanced.autoScrollOnFocus)&&(Q(t),clearTimeout(t[0]._focusTimeout),t[0]._focusTimer=a?(i+17)*a:0,t[0]._focusTimeout=setTimeout(function(){var e=[ae(o)[0],ae(o)[1]],a=[r[0].offsetTop,r[0].offsetLeft],s=[a[0]+e[0]>=0&&a[0]+e[0]<l.height()-o.outerHeight(!1),a[1]+e[1]>=0&&a[0]+e[1]<l.width()-o.outerWidth(!1)],c=\"yx\"!==n.axis||s[0]||s[1]?\"all\":\"none\";\"x\"===n.axis||s[0]||G(t,e[0].toString(),{dir:\"y\",scrollEasing:\"mcsEaseInOut\",overwrite:c,dur:i}),\"y\"===n.axis||s[1]||G(t,e[1].toString(),{dir:\"x\",scrollEasing:\"mcsEaseInOut\",overwrite:c,dur:i})},t[0]._focusTimer))})},U=function(){var t=e(this),o=t.data(a),n=a+\"_\"+o.idx,i=e(\"#mCSB_\"+o.idx+\"_container\").parent();i.bind(\"scroll.\"+n,function(){0===i.scrollTop()&&0===i.scrollLeft()||e(\".mCSB_\"+o.idx+\"_scrollbar\").css(\"visibility\",\"hidden\")})},F=function(){var t=e(this),o=t.data(a),n=o.opt,i=o.sequential,r=a+\"_\"+o.idx,l=\".mCSB_\"+o.idx+\"_scrollbar\",s=e(l+\">a\");s.bind(\"contextmenu.\"+r,function(e){e.preventDefault()}).bind(\"mousedown.\"+r+\" touchstart.\"+r+\" pointerdown.\"+r+\" MSPointerDown.\"+r+\" mouseup.\"+r+\" touchend.\"+r+\" pointerup.\"+r+\" MSPointerUp.\"+r+\" mouseout.\"+r+\" pointerout.\"+r+\" MSPointerOut.\"+r+\" click.\"+r,function(a){function r(e,o){i.scrollAmount=n.scrollButtons.scrollAmount,j(t,e,o)}if(a.preventDefault(),ee(a)){var l=e(this).attr(\"class\");switch(i.type=n.scrollButtons.scrollType,a.type){case\"mousedown\":case\"touchstart\":case\"pointerdown\":case\"MSPointerDown\":if(\"stepped\"===i.type)return;c=!0,o.tweenRunning=!1,r(\"on\",l);break;case\"mouseup\":case\"touchend\":case\"pointerup\":case\"MSPointerUp\":case\"mouseout\":case\"pointerout\":case\"MSPointerOut\":if(\"stepped\"===i.type)return;c=!1,i.dir&&r(\"off\",l);break;case\"click\":if(\"stepped\"!==i.type||o.tweenRunning)return;r(\"on\",l)}}})},q=function(){function t(t){function a(e,t){r.type=i.keyboard.scrollType,r.scrollAmount=i.keyboard.scrollAmount,\"stepped\"===r.type&&n.tweenRunning||j(o,e,t)}switch(t.type){case\"blur\":n.tweenRunning&&r.dir&&a(\"off\",null);break;case\"keydown\":case\"keyup\":var l=t.keyCode?t.keyCode:t.which,s=\"on\";if(\"x\"!==i.axis&&(38===l||40===l)||\"y\"!==i.axis&&(37===l||39===l)){if((38===l||40===l)&&!n.overflowed[0]||(37===l||39===l)&&!n.overflowed[1])return;\"keyup\"===t.type&&(s=\"off\"),e(document.activeElement).is(u)||(t.preventDefault(),t.stopImmediatePropagation(),a(s,l))}else if(33===l||34===l){if((n.overflowed[0]||n.overflowed[1])&&(t.preventDefault(),t.stopImmediatePropagation()),\"keyup\"===t.type){Q(o);var f=34===l?-1:1;if(\"x\"===i.axis||\"yx\"===i.axis&&n.overflowed[1]&&!n.overflowed[0])var h=\"x\",m=Math.abs(c[0].offsetLeft)-f*(.9*d.width());else var h=\"y\",m=Math.abs(c[0].offsetTop)-f*(.9*d.height());G(o,m.toString(),{dir:h,scrollEasing:\"mcsEaseInOut\"})}}else if((35===l||36===l)&&!e(document.activeElement).is(u)&&((n.overflowed[0]||n.overflowed[1])&&(t.preventDefault(),t.stopImmediatePropagation()),\"keyup\"===t.type)){if(\"x\"===i.axis||\"yx\"===i.axis&&n.overflowed[1]&&!n.overflowed[0])var h=\"x\",m=35===l?Math.abs(d.width()-c.outerWidth(!1)):0;else var h=\"y\",m=35===l?Math.abs(d.height()-c.outerHeight(!1)):0;G(o,m.toString(),{dir:h,scrollEasing:\"mcsEaseInOut\"})}}}var o=e(this),n=o.data(a),i=n.opt,r=n.sequential,l=a+\"_\"+n.idx,s=e(\"#mCSB_\"+n.idx),c=e(\"#mCSB_\"+n.idx+\"_container\"),d=c.parent(),u=\"input,textarea,select,datalist,keygen,[contenteditable='true']\",f=c.find(\"iframe\"),h=[\"blur.\"+l+\" keydown.\"+l+\" keyup.\"+l];f.length&&f.each(function(){e(this).bind(\"load\",function(){A(this)&&e(this.contentDocument||this.contentWindow.document).bind(h[0],function(e){t(e)})})}),s.attr(\"tabindex\",\"0\").bind(h[0],function(e){t(e)})},j=function(t,o,n,i,r){function l(e){u.snapAmount&&(f.scrollAmount=u.snapAmount instanceof Array?\"x\"===f.dir[0]?u.snapAmount[1]:u.snapAmount[0]:u.snapAmount);var o=\"stepped\"!==f.type,a=r?r:e?o?p/1.5:g:1e3/60,n=e?o?7.5:40:2.5,s=[Math.abs(h[0].offsetTop),Math.abs(h[0].offsetLeft)],d=[c.scrollRatio.y>10?10:c.scrollRatio.y,c.scrollRatio.x>10?10:c.scrollRatio.x],m=\"x\"===f.dir[0]?s[1]+f.dir[1]*(d[1]*n):s[0]+f.dir[1]*(d[0]*n),v=\"x\"===f.dir[0]?s[1]+f.dir[1]*parseInt(f.scrollAmount):s[0]+f.dir[1]*parseInt(f.scrollAmount),x=\"auto\"!==f.scrollAmount?v:m,_=i?i:e?o?\"mcsLinearOut\":\"mcsEaseInOut\":\"mcsLinear\",w=!!e;return e&&17>a&&(x=\"x\"===f.dir[0]?s[1]:s[0]),G(t,x.toString(),{dir:f.dir[0],scrollEasing:_,dur:a,onComplete:w}),e?void(f.dir=!1):(clearTimeout(f.step),void(f.step=setTimeout(function(){l()},a)))}function s(){clearTimeout(f.step),$(f,\"step\"),Q(t)}var c=t.data(a),u=c.opt,f=c.sequential,h=e(\"#mCSB_\"+c.idx+\"_container\"),m=\"stepped\"===f.type,p=u.scrollInertia<26?26:u.scrollInertia,g=u.scrollInertia<1?17:u.scrollInertia;switch(o){case\"on\":if(f.dir=[n===d[16]||n===d[15]||39===n||37===n?\"x\":\"y\",n===d[13]||n===d[15]||38===n||37===n?-1:1],Q(t),oe(n)&&\"stepped\"===f.type)return;l(m);break;case\"off\":s(),(m||c.tweenRunning&&f.dir)&&l(!0)}},Y=function(t){var o=e(this).data(a).opt,n=[];return\"function\"==typeof t&&(t=t()),t instanceof Array?n=t.length>1?[t[0],t[1]]:\"x\"===o.axis?[null,t[0]]:[t[0],null]:(n[0]=t.y?t.y:t.x||\"x\"===o.axis?null:t,n[1]=t.x?t.x:t.y||\"y\"===o.axis?null:t),\"function\"==typeof n[0]&&(n[0]=n[0]()),\"function\"==typeof n[1]&&(n[1]=n[1]()),n},X=function(t,o){if(null!=t&&\"undefined\"!=typeof t){var n=e(this),i=n.data(a),r=i.opt,l=e(\"#mCSB_\"+i.idx+\"_container\"),s=l.parent(),c=typeof t;o||(o=\"x\"===r.axis?\"x\":\"y\");var d=\"x\"===o?l.outerWidth(!1)-s.width():l.outerHeight(!1)-s.height(),f=\"x\"===o?l[0].offsetLeft:l[0].offsetTop,h=\"x\"===o?\"left\":\"top\";switch(c){case\"function\":return t();case\"object\":var m=t.jquery?t:e(t);if(!m.length)return;return\"x\"===o?ae(m)[1]:ae(m)[0];case\"string\":case\"number\":if(oe(t))return Math.abs(t);if(-1!==t.indexOf(\"%\"))return Math.abs(d*parseInt(t)/100);if(-1!==t.indexOf(\"-=\"))return Math.abs(f-parseInt(t.split(\"-=\")[1]));if(-1!==t.indexOf(\"+=\")){var p=f+parseInt(t.split(\"+=\")[1]);return p>=0?0:Math.abs(p)}if(-1!==t.indexOf(\"px\")&&oe(t.split(\"px\")[0]))return Math.abs(t.split(\"px\")[0]);if(\"top\"===t||\"left\"===t)return 0;if(\"bottom\"===t)return Math.abs(s.height()-l.outerHeight(!1));if(\"right\"===t)return Math.abs(s.width()-l.outerWidth(!1));if(\"first\"===t||\"last\"===t){var m=l.find(\":\"+t);return\"x\"===o?ae(m)[1]:ae(m)[0]}return e(t).length?\"x\"===o?ae(e(t))[1]:ae(e(t))[0]:(l.css(h,t),void u.update.call(null,n[0]))}}},N=function(t){function o(){return clearTimeout(f[0].autoUpdate),0===l.parents(\"html\").length?void(l=null):void(f[0].autoUpdate=setTimeout(function(){return c.advanced.updateOnSelectorChange&&(s.poll.change.n=i(),s.poll.change.n!==s.poll.change.o)?(s.poll.change.o=s.poll.change.n,void r(3)):c.advanced.updateOnContentResize&&(s.poll.size.n=l[0].scrollHeight+l[0].scrollWidth+f[0].offsetHeight+l[0].offsetHeight+l[0].offsetWidth,s.poll.size.n!==s.poll.size.o)?(s.poll.size.o=s.poll.size.n,void r(1)):!c.advanced.updateOnImageLoad||\"auto\"===c.advanced.updateOnImageLoad&&\"y\"===c.axis||(s.poll.img.n=f.find(\"img\").length,s.poll.img.n===s.poll.img.o)?void((c.advanced.updateOnSelectorChange||c.advanced.updateOnContentResize||c.advanced.updateOnImageLoad)&&o()):(s.poll.img.o=s.poll.img.n,void f.find(\"img\").each(function(){n(this)}))},c.advanced.autoUpdateTimeout))}function n(t){function o(e,t){return function(){\r\nreturn t.apply(e,arguments)}}function a(){this.onload=null,e(t).addClass(d[2]),r(2)}if(e(t).hasClass(d[2]))return void r();var n=new Image;n.onload=o(n,a),n.src=t.src}function i(){c.advanced.updateOnSelectorChange===!0&&(c.advanced.updateOnSelectorChange=\"*\");var e=0,t=f.find(c.advanced.updateOnSelectorChange);return c.advanced.updateOnSelectorChange&&t.length>0&&t.each(function(){e+=this.offsetHeight+this.offsetWidth}),e}function r(e){clearTimeout(f[0].autoUpdate),u.update.call(null,l[0],e)}var l=e(this),s=l.data(a),c=s.opt,f=e(\"#mCSB_\"+s.idx+\"_container\");return t?(clearTimeout(f[0].autoUpdate),void $(f[0],\"autoUpdate\")):void o()},V=function(e,t,o){return Math.round(e/t)*t-o},Q=function(t){var o=t.data(a),n=e(\"#mCSB_\"+o.idx+\"_container,#mCSB_\"+o.idx+\"_container_wrapper,#mCSB_\"+o.idx+\"_dragger_vertical,#mCSB_\"+o.idx+\"_dragger_horizontal\");n.each(function(){Z.call(this)})},G=function(t,o,n){function i(e){return s&&c.callbacks[e]&&\"function\"==typeof c.callbacks[e]}function r(){return[c.callbacks.alwaysTriggerOffsets||w>=S[0]+y,c.callbacks.alwaysTriggerOffsets||-B>=w]}function l(){var e=[h[0].offsetTop,h[0].offsetLeft],o=[x[0].offsetTop,x[0].offsetLeft],a=[h.outerHeight(!1),h.outerWidth(!1)],i=[f.height(),f.width()];t[0].mcs={content:h,top:e[0],left:e[1],draggerTop:o[0],draggerLeft:o[1],topPct:Math.round(100*Math.abs(e[0])/(Math.abs(a[0])-i[0])),leftPct:Math.round(100*Math.abs(e[1])/(Math.abs(a[1])-i[1])),direction:n.dir}}var s=t.data(a),c=s.opt,d={trigger:\"internal\",dir:\"y\",scrollEasing:\"mcsEaseOut\",drag:!1,dur:c.scrollInertia,overwrite:\"all\",callbacks:!0,onStart:!0,onUpdate:!0,onComplete:!0},n=e.extend(d,n),u=[n.dur,n.drag?0:n.dur],f=e(\"#mCSB_\"+s.idx),h=e(\"#mCSB_\"+s.idx+\"_container\"),m=h.parent(),p=c.callbacks.onTotalScrollOffset?Y.call(t,c.callbacks.onTotalScrollOffset):[0,0],g=c.callbacks.onTotalScrollBackOffset?Y.call(t,c.callbacks.onTotalScrollBackOffset):[0,0];if(s.trigger=n.trigger,0===m.scrollTop()&&0===m.scrollLeft()||(e(\".mCSB_\"+s.idx+\"_scrollbar\").css(\"visibility\",\"visible\"),m.scrollTop(0).scrollLeft(0)),\"_resetY\"!==o||s.contentReset.y||(i(\"onOverflowYNone\")&&c.callbacks.onOverflowYNone.call(t[0]),s.contentReset.y=1),\"_resetX\"!==o||s.contentReset.x||(i(\"onOverflowXNone\")&&c.callbacks.onOverflowXNone.call(t[0]),s.contentReset.x=1),\"_resetY\"!==o&&\"_resetX\"!==o){if(!s.contentReset.y&&t[0].mcs||!s.overflowed[0]||(i(\"onOverflowY\")&&c.callbacks.onOverflowY.call(t[0]),s.contentReset.x=null),!s.contentReset.x&&t[0].mcs||!s.overflowed[1]||(i(\"onOverflowX\")&&c.callbacks.onOverflowX.call(t[0]),s.contentReset.x=null),c.snapAmount){var v=c.snapAmount instanceof Array?\"x\"===n.dir?c.snapAmount[1]:c.snapAmount[0]:c.snapAmount;o=V(o,v,c.snapOffset)}switch(n.dir){case\"x\":var x=e(\"#mCSB_\"+s.idx+\"_dragger_horizontal\"),_=\"left\",w=h[0].offsetLeft,S=[f.width()-h.outerWidth(!1),x.parent().width()-x.width()],b=[o,0===o?0:o/s.scrollRatio.x],y=p[1],B=g[1],T=y>0?y/s.scrollRatio.x:0,k=B>0?B/s.scrollRatio.x:0;break;case\"y\":var x=e(\"#mCSB_\"+s.idx+\"_dragger_vertical\"),_=\"top\",w=h[0].offsetTop,S=[f.height()-h.outerHeight(!1),x.parent().height()-x.height()],b=[o,0===o?0:o/s.scrollRatio.y],y=p[0],B=g[0],T=y>0?y/s.scrollRatio.y:0,k=B>0?B/s.scrollRatio.y:0}b[1]<0||0===b[0]&&0===b[1]?b=[0,0]:b[1]>=S[1]?b=[S[0],S[1]]:b[0]=-b[0],t[0].mcs||(l(),i(\"onInit\")&&c.callbacks.onInit.call(t[0])),clearTimeout(h[0].onCompleteTimeout),J(x[0],_,Math.round(b[1]),u[1],n.scrollEasing),!s.tweenRunning&&(0===w&&b[0]>=0||w===S[0]&&b[0]<=S[0])||J(h[0],_,Math.round(b[0]),u[0],n.scrollEasing,n.overwrite,{onStart:function(){n.callbacks&&n.onStart&&!s.tweenRunning&&(i(\"onScrollStart\")&&(l(),c.callbacks.onScrollStart.call(t[0])),s.tweenRunning=!0,C(x),s.cbOffsets=r())},onUpdate:function(){n.callbacks&&n.onUpdate&&i(\"whileScrolling\")&&(l(),c.callbacks.whileScrolling.call(t[0]))},onComplete:function(){if(n.callbacks&&n.onComplete){\"yx\"===c.axis&&clearTimeout(h[0].onCompleteTimeout);var e=h[0].idleTimer||0;h[0].onCompleteTimeout=setTimeout(function(){i(\"onScroll\")&&(l(),c.callbacks.onScroll.call(t[0])),i(\"onTotalScroll\")&&b[1]>=S[1]-T&&s.cbOffsets[0]&&(l(),c.callbacks.onTotalScroll.call(t[0])),i(\"onTotalScrollBack\")&&b[1]<=k&&s.cbOffsets[1]&&(l(),c.callbacks.onTotalScrollBack.call(t[0])),s.tweenRunning=!1,h[0].idleTimer=0,C(x,\"hide\")},e)}}})}},J=function(e,t,o,a,n,i,r){function l(){S.stop||(x||m.call(),x=K()-v,s(),x>=S.time&&(S.time=x>S.time?x+f-(x-S.time):x+f-1,S.time<x+1&&(S.time=x+1)),S.time<a?S.id=h(l):g.call())}function s(){a>0?(S.currVal=u(S.time,_,b,a,n),w[t]=Math.round(S.currVal)+\"px\"):w[t]=o+\"px\",p.call()}function c(){f=1e3/60,S.time=x+f,h=window.requestAnimationFrame?window.requestAnimationFrame:function(e){return s(),setTimeout(e,.01)},S.id=h(l)}function d(){null!=S.id&&(window.requestAnimationFrame?window.cancelAnimationFrame(S.id):clearTimeout(S.id),S.id=null)}function u(e,t,o,a,n){switch(n){case\"linear\":case\"mcsLinear\":return o*e/a+t;case\"mcsLinearOut\":return e/=a,e--,o*Math.sqrt(1-e*e)+t;case\"easeInOutSmooth\":return e/=a/2,1>e?o/2*e*e+t:(e--,-o/2*(e*(e-2)-1)+t);case\"easeInOutStrong\":return e/=a/2,1>e?o/2*Math.pow(2,10*(e-1))+t:(e--,o/2*(-Math.pow(2,-10*e)+2)+t);case\"easeInOut\":case\"mcsEaseInOut\":return e/=a/2,1>e?o/2*e*e*e+t:(e-=2,o/2*(e*e*e+2)+t);case\"easeOutSmooth\":return e/=a,e--,-o*(e*e*e*e-1)+t;case\"easeOutStrong\":return o*(-Math.pow(2,-10*e/a)+1)+t;case\"easeOut\":case\"mcsEaseOut\":default:var i=(e/=a)*e,r=i*e;return t+o*(.499999999999997*r*i+-2.5*i*i+5.5*r+-6.5*i+4*e)}}e._mTween||(e._mTween={top:{},left:{}});var f,h,r=r||{},m=r.onStart||function(){},p=r.onUpdate||function(){},g=r.onComplete||function(){},v=K(),x=0,_=e.offsetTop,w=e.style,S=e._mTween[t];\"left\"===t&&(_=e.offsetLeft);var b=o-_;S.stop=0,\"none\"!==i&&d(),c()},K=function(){return window.performance&&window.performance.now?window.performance.now():window.performance&&window.performance.webkitNow?window.performance.webkitNow():Date.now?Date.now():(new Date).getTime()},Z=function(){var e=this;e._mTween||(e._mTween={top:{},left:{}});for(var t=[\"top\",\"left\"],o=0;o<t.length;o++){var a=t[o];e._mTween[a].id&&(window.requestAnimationFrame?window.cancelAnimationFrame(e._mTween[a].id):clearTimeout(e._mTween[a].id),e._mTween[a].id=null,e._mTween[a].stop=1)}},$=function(e,t){try{delete e[t]}catch(o){e[t]=null}},ee=function(e){return!(e.which&&1!==e.which)},te=function(e){var t=e.originalEvent.pointerType;return!(t&&\"touch\"!==t&&2!==t)},oe=function(e){return!isNaN(parseFloat(e))&&isFinite(e)},ae=function(e){var t=e.parents(\".mCSB_container\");return[e.offset().top-t.offset().top,e.offset().left-t.offset().left]},ne=function(){function e(){var e=[\"webkit\",\"moz\",\"ms\",\"o\"];if(\"hidden\"in document)return\"hidden\";for(var t=0;t<e.length;t++)if(e[t]+\"Hidden\"in document)return e[t]+\"Hidden\";return null}var t=e();return t?document[t]:!1};e.fn[o]=function(t){return u[t]?u[t].apply(this,Array.prototype.slice.call(arguments,1)):\"object\"!=typeof t&&t?void e.error(\"Method \"+t+\" does not exist\"):u.init.apply(this,arguments)},e[o]=function(t){return u[t]?u[t].apply(this,Array.prototype.slice.call(arguments,1)):\"object\"!=typeof t&&t?void e.error(\"Method \"+t+\" does not exist\"):u.init.apply(this,arguments)},e[o].defaults=i,window[o]=!0,e(window).bind(\"load\",function(){e(n)[o](),e.extend(e.expr[\":\"],{mcsInView:e.expr[\":\"].mcsInView||function(t){var o,a,n=e(t),i=n.parents(\".mCSB_container\");if(i.length)return o=i.parent(),a=[i[0].offsetTop,i[0].offsetLeft],a[0]+ae(n)[0]>=0&&a[0]+ae(n)[0]<o.height()-n.outerHeight(!1)&&a[1]+ae(n)[1]>=0&&a[1]+ae(n)[1]<o.width()-n.outerWidth(!1)},mcsInSight:e.expr[\":\"].mcsInSight||function(t,o,a){var n,i,r,l,s=e(t),c=s.parents(\".mCSB_container\"),d=\"exact\"===a[3]?[[1,0],[1,0]]:[[.9,.1],[.6,.4]];if(c.length)return n=[s.outerHeight(!1),s.outerWidth(!1)],r=[c[0].offsetTop+ae(s)[0],c[0].offsetLeft+ae(s)[1]],i=[c.parent()[0].offsetHeight,c.parent()[0].offsetWidth],l=[n[0]<i[0]?d[0]:d[1],n[1]<i[1]?d[0]:d[1]],r[0]-i[0]*l[0][0]<0&&r[0]+n[0]-i[0]*l[0][1]>=0&&r[1]-i[1]*l[1][0]<0&&r[1]+n[1]-i[1]*l[1][1]>=0},mcsOverflow:e.expr[\":\"].mcsOverflow||function(t){var o=e(t).data(a);if(o)return o.overflowed[0]||o.overflowed[1]}})})})});","/*! jQuery Validation Plugin - v1.19.3 - 1/9/2021\r\n * https://jqueryvalidation.org/\r\n * Copyright (c) 2021 Jörn Zaefferer; Licensed MIT */\r\n!function(a){\"function\"==typeof define&&define.amd?define([\"jquery\"],a):\"object\"==typeof module&&module.exports?module.exports=a(require(\"jquery\")):a(jQuery)}(function(a){a.extend(a.fn,{validate:function(b){if(!this.length)return void(b&&b.debug&&window.console&&console.warn(\"Nothing selected, can't validate, returning nothing.\"));var c=a.data(this[0],\"validator\");return c?c:(this.attr(\"novalidate\",\"novalidate\"),c=new a.validator(b,this[0]),a.data(this[0],\"validator\",c),c.settings.onsubmit&&(this.on(\"click.validate\",\":submit\",function(b){c.submitButton=b.currentTarget,a(this).hasClass(\"cancel\")&&(c.cancelSubmit=!0),void 0!==a(this).attr(\"formnovalidate\")&&(c.cancelSubmit=!0)}),this.on(\"submit.validate\",function(b){function d(){var d,e;return c.submitButton&&(c.settings.submitHandler||c.formSubmitted)&&(d=a(\"<input type='hidden'/>\").attr(\"name\",c.submitButton.name).val(a(c.submitButton).val()).appendTo(c.currentForm)),!(c.settings.submitHandler&&!c.settings.debug)||(e=c.settings.submitHandler.call(c,c.currentForm,b),d&&d.remove(),void 0!==e&&e)}return c.settings.debug&&b.preventDefault(),c.cancelSubmit?(c.cancelSubmit=!1,d()):c.form()?c.pendingRequest?(c.formSubmitted=!0,!1):d():(c.focusInvalid(),!1)})),c)},valid:function(){var b,c,d;return a(this[0]).is(\"form\")?b=this.validate().form():(d=[],b=!0,c=a(this[0].form).validate(),this.each(function(){b=c.element(this)&&b,b||(d=d.concat(c.errorList))}),c.errorList=d),b},rules:function(b,c){var d,e,f,g,h,i,j=this[0],k=\"undefined\"!=typeof this.attr(\"contenteditable\")&&\"false\"!==this.attr(\"contenteditable\");if(null!=j&&(!j.form&&k&&(j.form=this.closest(\"form\")[0],j.name=this.attr(\"name\")),null!=j.form)){if(b)switch(d=a.data(j.form,\"validator\").settings,e=d.rules,f=a.validator.staticRules(j),b){case\"add\":a.extend(f,a.validator.normalizeRule(c)),delete f.messages,e[j.name]=f,c.messages&&(d.messages[j.name]=a.extend(d.messages[j.name],c.messages));break;case\"remove\":return c?(i={},a.each(c.split(/\\s/),function(a,b){i[b]=f[b],delete f[b]}),i):(delete e[j.name],f)}return g=a.validator.normalizeRules(a.extend({},a.validator.classRules(j),a.validator.attributeRules(j),a.validator.dataRules(j),a.validator.staticRules(j)),j),g.required&&(h=g.required,delete g.required,g=a.extend({required:h},g)),g.remote&&(h=g.remote,delete g.remote,g=a.extend(g,{remote:h})),g}}});var b=function(a){return a.replace(/^[\\s\\uFEFF\\xA0]+|[\\s\\uFEFF\\xA0]+$/g,\"\")};a.extend(a.expr.pseudos||a.expr[\":\"],{blank:function(c){return!b(\"\"+a(c).val())},filled:function(c){var d=a(c).val();return null!==d&&!!b(\"\"+d)},unchecked:function(b){return!a(b).prop(\"checked\")}}),a.validator=function(b,c){this.settings=a.extend(!0,{},a.validator.defaults,b),this.currentForm=c,this.init()},a.validator.format=function(b,c){return 1===arguments.length?function(){var c=a.makeArray(arguments);return c.unshift(b),a.validator.format.apply(this,c)}:void 0===c?b:(arguments.length>2&&c.constructor!==Array&&(c=a.makeArray(arguments).slice(1)),c.constructor!==Array&&(c=[c]),a.each(c,function(a,c){b=b.replace(new RegExp(\"\\\\{\"+a+\"\\\\}\",\"g\"),function(){return c})}),b)},a.extend(a.validator,{defaults:{messages:{},groups:{},rules:{},errorClass:\"error\",pendingClass:\"pending\",validClass:\"valid\",errorElement:\"label\",focusCleanup:!1,focusInvalid:!0,errorContainer:a([]),errorLabelContainer:a([]),onsubmit:!0,ignore:\":hidden\",ignoreTitle:!1,onfocusin:function(a){this.lastActive=a,this.settings.focusCleanup&&(this.settings.unhighlight&&this.settings.unhighlight.call(this,a,this.settings.errorClass,this.settings.validClass),this.hideThese(this.errorsFor(a)))},onfocusout:function(a){this.checkable(a)||!(a.name in this.submitted)&&this.optional(a)||this.element(a)},onkeyup:function(b,c){var d=[16,17,18,20,35,36,37,38,39,40,45,144,225];9===c.which&&\"\"===this.elementValue(b)||a.inArray(c.keyCode,d)!==-1||(b.name in this.submitted||b.name in this.invalid)&&this.element(b)},onclick:function(a){a.name in this.submitted?this.element(a):a.parentNode.name in this.submitted&&this.element(a.parentNode)},highlight:function(b,c,d){\"radio\"===b.type?this.findByName(b.name).addClass(c).removeClass(d):a(b).addClass(c).removeClass(d)},unhighlight:function(b,c,d){\"radio\"===b.type?this.findByName(b.name).removeClass(c).addClass(d):a(b).removeClass(c).addClass(d)}},setDefaults:function(b){a.extend(a.validator.defaults,b)},messages:{required:\"This field is required.\",remote:\"Please fix this field.\",email:\"Please enter a valid email address.\",url:\"Please enter a valid URL.\",date:\"Please enter a valid date.\",dateISO:\"Please enter a valid date (ISO).\",number:\"Please enter a valid number.\",digits:\"Please enter only digits.\",equalTo:\"Please enter the same value again.\",maxlength:a.validator.format(\"Please enter no more than {0} characters.\"),minlength:a.validator.format(\"Please enter at least {0} characters.\"),rangelength:a.validator.format(\"Please enter a value between {0} and {1} characters long.\"),range:a.validator.format(\"Please enter a value between {0} and {1}.\"),max:a.validator.format(\"Please enter a value less than or equal to {0}.\"),min:a.validator.format(\"Please enter a value greater than or equal to {0}.\"),step:a.validator.format(\"Please enter a multiple of {0}.\")},autoCreateRanges:!1,prototype:{init:function(){function b(b){var c=\"undefined\"!=typeof a(this).attr(\"contenteditable\")&&\"false\"!==a(this).attr(\"contenteditable\");if(!this.form&&c&&(this.form=a(this).closest(\"form\")[0],this.name=a(this).attr(\"name\")),d===this.form){var e=a.data(this.form,\"validator\"),f=\"on\"+b.type.replace(/^validate/,\"\"),g=e.settings;g[f]&&!a(this).is(g.ignore)&&g[f].call(e,this,b)}}this.labelContainer=a(this.settings.errorLabelContainer),this.errorContext=this.labelContainer.length&&this.labelContainer||a(this.currentForm),this.containers=a(this.settings.errorContainer).add(this.settings.errorLabelContainer),this.submitted={},this.valueCache={},this.pendingRequest=0,this.pending={},this.invalid={},this.reset();var c,d=this.currentForm,e=this.groups={};a.each(this.settings.groups,function(b,c){\"string\"==typeof c&&(c=c.split(/\\s/)),a.each(c,function(a,c){e[c]=b})}),c=this.settings.rules,a.each(c,function(b,d){c[b]=a.validator.normalizeRule(d)}),a(this.currentForm).on(\"focusin.validate focusout.validate keyup.validate\",\":text, [type='password'], [type='file'], select, textarea, [type='number'], [type='search'], [type='tel'], [type='url'], [type='email'], [type='datetime'], [type='date'], [type='month'], [type='week'], [type='time'], [type='datetime-local'], [type='range'], [type='color'], [type='radio'], [type='checkbox'], [contenteditable], [type='button']\",b).on(\"click.validate\",\"select, option, [type='radio'], [type='checkbox']\",b),this.settings.invalidHandler&&a(this.currentForm).on(\"invalid-form.validate\",this.settings.invalidHandler)},form:function(){return this.checkForm(),a.extend(this.submitted,this.errorMap),this.invalid=a.extend({},this.errorMap),this.valid()||a(this.currentForm).triggerHandler(\"invalid-form\",[this]),this.showErrors(),this.valid()},checkForm:function(){this.prepareForm();for(var a=0,b=this.currentElements=this.elements();b[a];a++)this.check(b[a]);return this.valid()},element:function(b){var c,d,e=this.clean(b),f=this.validationTargetFor(e),g=this,h=!0;return void 0===f?delete this.invalid[e.name]:(this.prepareElement(f),this.currentElements=a(f),d=this.groups[f.name],d&&a.each(this.groups,function(a,b){b===d&&a!==f.name&&(e=g.validationTargetFor(g.clean(g.findByName(a))),e&&e.name in g.invalid&&(g.currentElements.push(e),h=g.check(e)&&h))}),c=this.check(f)!==!1,h=h&&c,c?this.invalid[f.name]=!1:this.invalid[f.name]=!0,this.numberOfInvalids()||(this.toHide=this.toHide.add(this.containers)),this.showErrors(),a(b).attr(\"aria-invalid\",!c)),h},showErrors:function(b){if(b){var c=this;a.extend(this.errorMap,b),this.errorList=a.map(this.errorMap,function(a,b){return{message:a,element:c.findByName(b)[0]}}),this.successList=a.grep(this.successList,function(a){return!(a.name in b)})}this.settings.showErrors?this.settings.showErrors.call(this,this.errorMap,this.errorList):this.defaultShowErrors()},resetForm:function(){a.fn.resetForm&&a(this.currentForm).resetForm(),this.invalid={},this.submitted={},this.prepareForm(),this.hideErrors();var b=this.elements().removeData(\"previousValue\").removeAttr(\"aria-invalid\");this.resetElements(b)},resetElements:function(a){var b;if(this.settings.unhighlight)for(b=0;a[b];b++)this.settings.unhighlight.call(this,a[b],this.settings.errorClass,\"\"),this.findByName(a[b].name).removeClass(this.settings.validClass);else a.removeClass(this.settings.errorClass).removeClass(this.settings.validClass)},numberOfInvalids:function(){return this.objectLength(this.invalid)},objectLength:function(a){var b,c=0;for(b in a)void 0!==a[b]&&null!==a[b]&&a[b]!==!1&&c++;return c},hideErrors:function(){this.hideThese(this.toHide)},hideThese:function(a){a.not(this.containers).text(\"\"),this.addWrapper(a).hide()},valid:function(){return 0===this.size()},size:function(){return this.errorList.length},focusInvalid:function(){if(this.settings.focusInvalid)try{a(this.findLastActive()||this.errorList.length&&this.errorList[0].element||[]).filter(\":visible\").trigger(\"focus\").trigger(\"focusin\")}catch(b){}},findLastActive:function(){var b=this.lastActive;return b&&1===a.grep(this.errorList,function(a){return a.element.name===b.name}).length&&b},elements:function(){var b=this,c={};return a(this.currentForm).find(\"input, select, textarea, [contenteditable]\").not(\":submit, :reset, :image, :disabled\").not(this.settings.ignore).filter(function(){var d=this.name||a(this).attr(\"name\"),e=\"undefined\"!=typeof a(this).attr(\"contenteditable\")&&\"false\"!==a(this).attr(\"contenteditable\");return!d&&b.settings.debug&&window.console&&console.error(\"%o has no name assigned\",this),e&&(this.form=a(this).closest(\"form\")[0],this.name=d),this.form===b.currentForm&&(!(d in c||!b.objectLength(a(this).rules()))&&(c[d]=!0,!0))})},clean:function(b){return a(b)[0]},errors:function(){var b=this.settings.errorClass.split(\" \").join(\".\");return a(this.settings.errorElement+\".\"+b,this.errorContext)},resetInternals:function(){this.successList=[],this.errorList=[],this.errorMap={},this.toShow=a([]),this.toHide=a([])},reset:function(){this.resetInternals(),this.currentElements=a([])},prepareForm:function(){this.reset(),this.toHide=this.errors().add(this.containers)},prepareElement:function(a){this.reset(),this.toHide=this.errorsFor(a)},elementValue:function(b){var c,d,e=a(b),f=b.type,g=\"undefined\"!=typeof e.attr(\"contenteditable\")&&\"false\"!==e.attr(\"contenteditable\");return\"radio\"===f||\"checkbox\"===f?this.findByName(b.name).filter(\":checked\").val():\"number\"===f&&\"undefined\"!=typeof b.validity?b.validity.badInput?\"NaN\":e.val():(c=g?e.text():e.val(),\"file\"===f?\"C:\\\\fakepath\\\\\"===c.substr(0,12)?c.substr(12):(d=c.lastIndexOf(\"/\"),d>=0?c.substr(d+1):(d=c.lastIndexOf(\"\\\\\"),d>=0?c.substr(d+1):c)):\"string\"==typeof c?c.replace(/\\r/g,\"\"):c)},check:function(b){b=this.validationTargetFor(this.clean(b));var c,d,e,f,g=a(b).rules(),h=a.map(g,function(a,b){return b}).length,i=!1,j=this.elementValue(b);\"function\"==typeof g.normalizer?f=g.normalizer:\"function\"==typeof this.settings.normalizer&&(f=this.settings.normalizer),f&&(j=f.call(b,j),delete g.normalizer);for(d in g){e={method:d,parameters:g[d]};try{if(c=a.validator.methods[d].call(this,j,b,e.parameters),\"dependency-mismatch\"===c&&1===h){i=!0;continue}if(i=!1,\"pending\"===c)return void(this.toHide=this.toHide.not(this.errorsFor(b)));if(!c)return this.formatAndAdd(b,e),!1}catch(k){throw this.settings.debug&&window.console&&console.log(\"Exception occurred when checking element \"+b.id+\", check the '\"+e.method+\"' method.\",k),k instanceof TypeError&&(k.message+=\".  Exception occurred when checking element \"+b.id+\", check the '\"+e.method+\"' method.\"),k}}if(!i)return this.objectLength(g)&&this.successList.push(b),!0},customDataMessage:function(b,c){return a(b).data(\"msg\"+c.charAt(0).toUpperCase()+c.substring(1).toLowerCase())||a(b).data(\"msg\")},customMessage:function(a,b){var c=this.settings.messages[a];return c&&(c.constructor===String?c:c[b])},findDefined:function(){for(var a=0;a<arguments.length;a++)if(void 0!==arguments[a])return arguments[a]},defaultMessage:function(b,c){\"string\"==typeof c&&(c={method:c});var d=this.findDefined(this.customMessage(b.name,c.method),this.customDataMessage(b,c.method),!this.settings.ignoreTitle&&b.title||void 0,a.validator.messages[c.method],\"<strong>Warning: No message defined for \"+b.name+\"</strong>\"),e=/\\$?\\{(\\d+)\\}/g;return\"function\"==typeof d?d=d.call(this,c.parameters,b):e.test(d)&&(d=a.validator.format(d.replace(e,\"{$1}\"),c.parameters)),d},formatAndAdd:function(a,b){var c=this.defaultMessage(a,b);this.errorList.push({message:c,element:a,method:b.method}),this.errorMap[a.name]=c,this.submitted[a.name]=c},addWrapper:function(a){return this.settings.wrapper&&(a=a.add(a.parent(this.settings.wrapper))),a},defaultShowErrors:function(){var a,b,c;for(a=0;this.errorList[a];a++)c=this.errorList[a],this.settings.highlight&&this.settings.highlight.call(this,c.element,this.settings.errorClass,this.settings.validClass),this.showLabel(c.element,c.message);if(this.errorList.length&&(this.toShow=this.toShow.add(this.containers)),this.settings.success)for(a=0;this.successList[a];a++)this.showLabel(this.successList[a]);if(this.settings.unhighlight)for(a=0,b=this.validElements();b[a];a++)this.settings.unhighlight.call(this,b[a],this.settings.errorClass,this.settings.validClass);this.toHide=this.toHide.not(this.toShow),this.hideErrors(),this.addWrapper(this.toShow).show()},validElements:function(){return this.currentElements.not(this.invalidElements())},invalidElements:function(){return a(this.errorList).map(function(){return this.element})},showLabel:function(b,c){var d,e,f,g,h=this.errorsFor(b),i=this.idOrName(b),j=a(b).attr(\"aria-describedby\");h.length?(h.removeClass(this.settings.validClass).addClass(this.settings.errorClass),h.html(c)):(h=a(\"<\"+this.settings.errorElement+\">\").attr(\"id\",i+\"-error\").addClass(this.settings.errorClass).html(c||\"\"),d=h,this.settings.wrapper&&(d=h.hide().show().wrap(\"<\"+this.settings.wrapper+\"/>\").parent()),this.labelContainer.length?this.labelContainer.append(d):this.settings.errorPlacement?this.settings.errorPlacement.call(this,d,a(b)):d.insertAfter(b),h.is(\"label\")?h.attr(\"for\",i):0===h.parents(\"label[for='\"+this.escapeCssMeta(i)+\"']\").length&&(f=h.attr(\"id\"),j?j.match(new RegExp(\"\\\\b\"+this.escapeCssMeta(f)+\"\\\\b\"))||(j+=\" \"+f):j=f,a(b).attr(\"aria-describedby\",j),e=this.groups[b.name],e&&(g=this,a.each(g.groups,function(b,c){c===e&&a(\"[name='\"+g.escapeCssMeta(b)+\"']\",g.currentForm).attr(\"aria-describedby\",h.attr(\"id\"))})))),!c&&this.settings.success&&(h.text(\"\"),\"string\"==typeof this.settings.success?h.addClass(this.settings.success):this.settings.success(h,b)),this.toShow=this.toShow.add(h)},errorsFor:function(b){var c=this.escapeCssMeta(this.idOrName(b)),d=a(b).attr(\"aria-describedby\"),e=\"label[for='\"+c+\"'], label[for='\"+c+\"'] *\";return d&&(e=e+\", #\"+this.escapeCssMeta(d).replace(/\\s+/g,\", #\")),this.errors().filter(e)},escapeCssMeta:function(a){return a.replace(/([\\\\!\"#$%&'()*+,.\\/:;<=>?@\\[\\]^`{|}~])/g,\"\\\\$1\")},idOrName:function(a){return this.groups[a.name]||(this.checkable(a)?a.name:a.id||a.name)},validationTargetFor:function(b){return this.checkable(b)&&(b=this.findByName(b.name)),a(b).not(this.settings.ignore)[0]},checkable:function(a){return/radio|checkbox/i.test(a.type)},findByName:function(b){return a(this.currentForm).find(\"[name='\"+this.escapeCssMeta(b)+\"']\")},getLength:function(b,c){switch(c.nodeName.toLowerCase()){case\"select\":return a(\"option:selected\",c).length;case\"input\":if(this.checkable(c))return this.findByName(c.name).filter(\":checked\").length}return b.length},depend:function(a,b){return!this.dependTypes[typeof a]||this.dependTypes[typeof a](a,b)},dependTypes:{\"boolean\":function(a){return a},string:function(b,c){return!!a(b,c.form).length},\"function\":function(a,b){return a(b)}},optional:function(b){var c=this.elementValue(b);return!a.validator.methods.required.call(this,c,b)&&\"dependency-mismatch\"},startRequest:function(b){this.pending[b.name]||(this.pendingRequest++,a(b).addClass(this.settings.pendingClass),this.pending[b.name]=!0)},stopRequest:function(b,c){this.pendingRequest--,this.pendingRequest<0&&(this.pendingRequest=0),delete this.pending[b.name],a(b).removeClass(this.settings.pendingClass),c&&0===this.pendingRequest&&this.formSubmitted&&this.form()?(a(this.currentForm).submit(),this.submitButton&&a(\"input:hidden[name='\"+this.submitButton.name+\"']\",this.currentForm).remove(),this.formSubmitted=!1):!c&&0===this.pendingRequest&&this.formSubmitted&&(a(this.currentForm).triggerHandler(\"invalid-form\",[this]),this.formSubmitted=!1)},previousValue:function(b,c){return c=\"string\"==typeof c&&c||\"remote\",a.data(b,\"previousValue\")||a.data(b,\"previousValue\",{old:null,valid:!0,message:this.defaultMessage(b,{method:c})})},destroy:function(){this.resetForm(),a(this.currentForm).off(\".validate\").removeData(\"validator\").find(\".validate-equalTo-blur\").off(\".validate-equalTo\").removeClass(\"validate-equalTo-blur\").find(\".validate-lessThan-blur\").off(\".validate-lessThan\").removeClass(\"validate-lessThan-blur\").find(\".validate-lessThanEqual-blur\").off(\".validate-lessThanEqual\").removeClass(\"validate-lessThanEqual-blur\").find(\".validate-greaterThanEqual-blur\").off(\".validate-greaterThanEqual\").removeClass(\"validate-greaterThanEqual-blur\").find(\".validate-greaterThan-blur\").off(\".validate-greaterThan\").removeClass(\"validate-greaterThan-blur\")}},classRuleSettings:{required:{required:!0},email:{email:!0},url:{url:!0},date:{date:!0},dateISO:{dateISO:!0},number:{number:!0},digits:{digits:!0},creditcard:{creditcard:!0}},addClassRules:function(b,c){b.constructor===String?this.classRuleSettings[b]=c:a.extend(this.classRuleSettings,b)},classRules:function(b){var c={},d=a(b).attr(\"class\");return d&&a.each(d.split(\" \"),function(){this in a.validator.classRuleSettings&&a.extend(c,a.validator.classRuleSettings[this])}),c},normalizeAttributeRule:function(a,b,c,d){/min|max|step/.test(c)&&(null===b||/number|range|text/.test(b))&&(d=Number(d),isNaN(d)&&(d=void 0)),d||0===d?a[c]=d:b===c&&\"range\"!==b&&(a[c]=!0)},attributeRules:function(b){var c,d,e={},f=a(b),g=b.getAttribute(\"type\");for(c in a.validator.methods)\"required\"===c?(d=b.getAttribute(c),\"\"===d&&(d=!0),d=!!d):d=f.attr(c),this.normalizeAttributeRule(e,g,c,d);return e.maxlength&&/-1|2147483647|524288/.test(e.maxlength)&&delete e.maxlength,e},dataRules:function(b){var c,d,e={},f=a(b),g=b.getAttribute(\"type\");for(c in a.validator.methods)d=f.data(\"rule\"+c.charAt(0).toUpperCase()+c.substring(1).toLowerCase()),\"\"===d&&(d=!0),this.normalizeAttributeRule(e,g,c,d);return e},staticRules:function(b){var c={},d=a.data(b.form,\"validator\");return d.settings.rules&&(c=a.validator.normalizeRule(d.settings.rules[b.name])||{}),c},normalizeRules:function(b,c){return a.each(b,function(d,e){if(e===!1)return void delete b[d];if(e.param||e.depends){var f=!0;switch(typeof e.depends){case\"string\":f=!!a(e.depends,c.form).length;break;case\"function\":f=e.depends.call(c,c)}f?b[d]=void 0===e.param||e.param:(a.data(c.form,\"validator\").resetElements(a(c)),delete b[d])}}),a.each(b,function(a,d){b[a]=\"function\"==typeof d&&\"normalizer\"!==a?d(c):d}),a.each([\"minlength\",\"maxlength\"],function(){b[this]&&(b[this]=Number(b[this]))}),a.each([\"rangelength\",\"range\"],function(){var a;b[this]&&(Array.isArray(b[this])?b[this]=[Number(b[this][0]),Number(b[this][1])]:\"string\"==typeof b[this]&&(a=b[this].replace(/[\\[\\]]/g,\"\").split(/[\\s,]+/),b[this]=[Number(a[0]),Number(a[1])]))}),a.validator.autoCreateRanges&&(null!=b.min&&null!=b.max&&(b.range=[b.min,b.max],delete b.min,delete b.max),null!=b.minlength&&null!=b.maxlength&&(b.rangelength=[b.minlength,b.maxlength],delete b.minlength,delete b.maxlength)),b},normalizeRule:function(b){if(\"string\"==typeof b){var c={};a.each(b.split(/\\s/),function(){c[this]=!0}),b=c}return b},addMethod:function(b,c,d){a.validator.methods[b]=c,a.validator.messages[b]=void 0!==d?d:a.validator.messages[b],c.length<3&&a.validator.addClassRules(b,a.validator.normalizeRule(b))},methods:{required:function(b,c,d){if(!this.depend(d,c))return\"dependency-mismatch\";if(\"select\"===c.nodeName.toLowerCase()){var e=a(c).val();return e&&e.length>0}return this.checkable(c)?this.getLength(b,c)>0:void 0!==b&&null!==b&&b.length>0},email:function(a,b){return this.optional(b)||/^[a-zA-Z0-9.!#$%&'*+\\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/.test(a)},url:function(a,b){return this.optional(b)||/^(?:(?:(?:https?|ftp):)?\\/\\/)(?:\\S+(?::\\S*)?@)?(?:(?!(?:10|127)(?:\\.\\d{1,3}){3})(?!(?:169\\.254|192\\.168)(?:\\.\\d{1,3}){2})(?!172\\.(?:1[6-9]|2\\d|3[0-1])(?:\\.\\d{1,3}){2})(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[1-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z0-9\\u00a1-\\uffff][a-z0-9\\u00a1-\\uffff_-]{0,62})?[a-z0-9\\u00a1-\\uffff]\\.)+(?:[a-z\\u00a1-\\uffff]{2,}\\.?))(?::\\d{2,5})?(?:[\\/?#]\\S*)?$/i.test(a)},date:function(){var a=!1;return function(b,c){return a||(a=!0,this.settings.debug&&window.console&&console.warn(\"The `date` method is deprecated and will be removed in version '2.0.0'.\\nPlease don't use it, since it relies on the Date constructor, which\\nbehaves very differently across browsers and locales. Use `dateISO`\\ninstead or one of the locale specific methods in `localizations/`\\nand `additional-methods.js`.\")),this.optional(c)||!/Invalid|NaN/.test(new Date(b).toString())}}(),dateISO:function(a,b){return this.optional(b)||/^\\d{4}[\\/\\-](0?[1-9]|1[012])[\\/\\-](0?[1-9]|[12][0-9]|3[01])$/.test(a)},number:function(a,b){return this.optional(b)||/^(?:-?\\d+|-?\\d{1,3}(?:,\\d{3})+)?(?:\\.\\d+)?$/.test(a)},digits:function(a,b){return this.optional(b)||/^\\d+$/.test(a)},minlength:function(a,b,c){var d=Array.isArray(a)?a.length:this.getLength(a,b);return this.optional(b)||d>=c},maxlength:function(a,b,c){var d=Array.isArray(a)?a.length:this.getLength(a,b);return this.optional(b)||d<=c},rangelength:function(a,b,c){var d=Array.isArray(a)?a.length:this.getLength(a,b);return this.optional(b)||d>=c[0]&&d<=c[1]},min:function(a,b,c){return this.optional(b)||a>=c},max:function(a,b,c){return this.optional(b)||a<=c},range:function(a,b,c){return this.optional(b)||a>=c[0]&&a<=c[1]},step:function(b,c,d){var e,f=a(c).attr(\"type\"),g=\"Step attribute on input type \"+f+\" is not supported.\",h=[\"text\",\"number\",\"range\"],i=new RegExp(\"\\\\b\"+f+\"\\\\b\"),j=f&&!i.test(h.join()),k=function(a){var b=(\"\"+a).match(/(?:\\.(\\d+))?$/);return b&&b[1]?b[1].length:0},l=function(a){return Math.round(a*Math.pow(10,e))},m=!0;if(j)throw new Error(g);return e=k(d),(k(b)>e||l(b)%l(d)!==0)&&(m=!1),this.optional(c)||m},equalTo:function(b,c,d){var e=a(d);return this.settings.onfocusout&&e.not(\".validate-equalTo-blur\").length&&e.addClass(\"validate-equalTo-blur\").on(\"blur.validate-equalTo\",function(){a(c).valid()}),b===e.val()},remote:function(b,c,d,e){if(this.optional(c))return\"dependency-mismatch\";e=\"string\"==typeof e&&e||\"remote\";var f,g,h,i=this.previousValue(c,e);return this.settings.messages[c.name]||(this.settings.messages[c.name]={}),i.originalMessage=i.originalMessage||this.settings.messages[c.name][e],this.settings.messages[c.name][e]=i.message,d=\"string\"==typeof d&&{url:d}||d,h=a.param(a.extend({data:b},d.data)),i.old===h?i.valid:(i.old=h,f=this,this.startRequest(c),g={},g[c.name]=b,a.ajax(a.extend(!0,{mode:\"abort\",port:\"validate\"+c.name,dataType:\"json\",data:g,context:f.currentForm,success:function(a){var d,g,h,j=a===!0||\"true\"===a;f.settings.messages[c.name][e]=i.originalMessage,j?(h=f.formSubmitted,f.resetInternals(),f.toHide=f.errorsFor(c),f.formSubmitted=h,f.successList.push(c),f.invalid[c.name]=!1,f.showErrors()):(d={},g=a||f.defaultMessage(c,{method:e,parameters:b}),d[c.name]=i.message=g,f.invalid[c.name]=!0,f.showErrors(d)),i.valid=j,f.stopRequest(c,j)}},d)),\"pending\")}}});var c,d={};return a.ajaxPrefilter?a.ajaxPrefilter(function(a,b,c){var e=a.port;\"abort\"===a.mode&&(d[e]&&d[e].abort(),d[e]=c)}):(c=a.ajax,a.ajax=function(b){var e=(\"mode\"in b?b:a.ajaxSettings).mode,f=(\"port\"in b?b:a.ajaxSettings).port;return\"abort\"===e?(d[f]&&d[f].abort(),d[f]=c.apply(this,arguments),d[f]):c.apply(this,arguments)}),a});","typeof navigator === \"object\" && (function (global, factory) {\r\n  typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :\r\n  typeof define === 'function' && define.amd ? define('Plyr', factory) :\r\n  (global = global || self, global.Plyr = factory());\r\n}(this, (function () { 'use strict';\r\n\r\n  function _classCallCheck(instance, Constructor) {\r\n    if (!(instance instanceof Constructor)) {\r\n      throw new TypeError(\"Cannot call a class as a function\");\r\n    }\r\n  }\r\n\r\n  function _defineProperties(target, props) {\r\n    for (var i = 0; i < props.length; i++) {\r\n      var descriptor = props[i];\r\n      descriptor.enumerable = descriptor.enumerable || false;\r\n      descriptor.configurable = true;\r\n      if (\"value\" in descriptor) descriptor.writable = true;\r\n      Object.defineProperty(target, descriptor.key, descriptor);\r\n    }\r\n  }\r\n\r\n  function _createClass(Constructor, protoProps, staticProps) {\r\n    if (protoProps) _defineProperties(Constructor.prototype, protoProps);\r\n    if (staticProps) _defineProperties(Constructor, staticProps);\r\n    return Constructor;\r\n  }\r\n\r\n  function _defineProperty(obj, key, value) {\r\n    if (key in obj) {\r\n      Object.defineProperty(obj, key, {\r\n        value: value,\r\n        enumerable: true,\r\n        configurable: true,\r\n        writable: true\r\n      });\r\n    } else {\r\n      obj[key] = value;\r\n    }\r\n\r\n    return obj;\r\n  }\r\n\r\n  function ownKeys(object, enumerableOnly) {\r\n    var keys = Object.keys(object);\r\n\r\n    if (Object.getOwnPropertySymbols) {\r\n      var symbols = Object.getOwnPropertySymbols(object);\r\n      if (enumerableOnly) symbols = symbols.filter(function (sym) {\r\n        return Object.getOwnPropertyDescriptor(object, sym).enumerable;\r\n      });\r\n      keys.push.apply(keys, symbols);\r\n    }\r\n\r\n    return keys;\r\n  }\r\n\r\n  function _objectSpread2(target) {\r\n    for (var i = 1; i < arguments.length; i++) {\r\n      var source = arguments[i] != null ? arguments[i] : {};\r\n\r\n      if (i % 2) {\r\n        ownKeys(Object(source), true).forEach(function (key) {\r\n          _defineProperty(target, key, source[key]);\r\n        });\r\n      } else if (Object.getOwnPropertyDescriptors) {\r\n        Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));\r\n      } else {\r\n        ownKeys(Object(source)).forEach(function (key) {\r\n          Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\r\n        });\r\n      }\r\n    }\r\n\r\n    return target;\r\n  }\r\n\r\n  function _objectWithoutPropertiesLoose(source, excluded) {\r\n    if (source == null) return {};\r\n    var target = {};\r\n    var sourceKeys = Object.keys(source);\r\n    var key, i;\r\n\r\n    for (i = 0; i < sourceKeys.length; i++) {\r\n      key = sourceKeys[i];\r\n      if (excluded.indexOf(key) >= 0) continue;\r\n      target[key] = source[key];\r\n    }\r\n\r\n    return target;\r\n  }\r\n\r\n  function _objectWithoutProperties(source, excluded) {\r\n    if (source == null) return {};\r\n\r\n    var target = _objectWithoutPropertiesLoose(source, excluded);\r\n\r\n    var key, i;\r\n\r\n    if (Object.getOwnPropertySymbols) {\r\n      var sourceSymbolKeys = Object.getOwnPropertySymbols(source);\r\n\r\n      for (i = 0; i < sourceSymbolKeys.length; i++) {\r\n        key = sourceSymbolKeys[i];\r\n        if (excluded.indexOf(key) >= 0) continue;\r\n        if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;\r\n        target[key] = source[key];\r\n      }\r\n    }\r\n\r\n    return target;\r\n  }\r\n\r\n  function _slicedToArray(arr, i) {\r\n    return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();\r\n  }\r\n\r\n  function _toConsumableArray(arr) {\r\n    return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();\r\n  }\r\n\r\n  function _arrayWithoutHoles(arr) {\r\n    if (Array.isArray(arr)) return _arrayLikeToArray(arr);\r\n  }\r\n\r\n  function _arrayWithHoles(arr) {\r\n    if (Array.isArray(arr)) return arr;\r\n  }\r\n\r\n  function _iterableToArray(iter) {\r\n    if (typeof Symbol !== \"undefined\" && Symbol.iterator in Object(iter)) return Array.from(iter);\r\n  }\r\n\r\n  function _iterableToArrayLimit(arr, i) {\r\n    if (typeof Symbol === \"undefined\" || !(Symbol.iterator in Object(arr))) return;\r\n    var _arr = [];\r\n    var _n = true;\r\n    var _d = false;\r\n    var _e = undefined;\r\n\r\n    try {\r\n      for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {\r\n        _arr.push(_s.value);\r\n\r\n        if (i && _arr.length === i) break;\r\n      }\r\n    } catch (err) {\r\n      _d = true;\r\n      _e = err;\r\n    } finally {\r\n      try {\r\n        if (!_n && _i[\"return\"] != null) _i[\"return\"]();\r\n      } finally {\r\n        if (_d) throw _e;\r\n      }\r\n    }\r\n\r\n    return _arr;\r\n  }\r\n\r\n  function _unsupportedIterableToArray(o, minLen) {\r\n    if (!o) return;\r\n    if (typeof o === \"string\") return _arrayLikeToArray(o, minLen);\r\n    var n = Object.prototype.toString.call(o).slice(8, -1);\r\n    if (n === \"Object\" && o.constructor) n = o.constructor.name;\r\n    if (n === \"Map\" || n === \"Set\") return Array.from(o);\r\n    if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);\r\n  }\r\n\r\n  function _arrayLikeToArray(arr, len) {\r\n    if (len == null || len > arr.length) len = arr.length;\r\n\r\n    for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];\r\n\r\n    return arr2;\r\n  }\r\n\r\n  function _nonIterableSpread() {\r\n    throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\r\n  }\r\n\r\n  function _nonIterableRest() {\r\n    throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\r\n  }\r\n\r\n  function _classCallCheck$1(e, t) {\r\n    if (!(e instanceof t)) throw new TypeError(\"Cannot call a class as a function\");\r\n  }\r\n\r\n  function _defineProperties$1(e, t) {\r\n    for (var n = 0; n < t.length; n++) {\r\n      var r = t[n];\r\n      r.enumerable = r.enumerable || !1, r.configurable = !0, \"value\" in r && (r.writable = !0), Object.defineProperty(e, r.key, r);\r\n    }\r\n  }\r\n\r\n  function _createClass$1(e, t, n) {\r\n    return t && _defineProperties$1(e.prototype, t), n && _defineProperties$1(e, n), e;\r\n  }\r\n\r\n  function _defineProperty$1(e, t, n) {\r\n    return t in e ? Object.defineProperty(e, t, {\r\n      value: n,\r\n      enumerable: !0,\r\n      configurable: !0,\r\n      writable: !0\r\n    }) : e[t] = n, e;\r\n  }\r\n\r\n  function ownKeys$1(e, t) {\r\n    var n = Object.keys(e);\r\n\r\n    if (Object.getOwnPropertySymbols) {\r\n      var r = Object.getOwnPropertySymbols(e);\r\n      t && (r = r.filter(function (t) {\r\n        return Object.getOwnPropertyDescriptor(e, t).enumerable;\r\n      })), n.push.apply(n, r);\r\n    }\r\n\r\n    return n;\r\n  }\r\n\r\n  function _objectSpread2$1(e) {\r\n    for (var t = 1; t < arguments.length; t++) {\r\n      var n = null != arguments[t] ? arguments[t] : {};\r\n      t % 2 ? ownKeys$1(Object(n), !0).forEach(function (t) {\r\n        _defineProperty$1(e, t, n[t]);\r\n      }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : ownKeys$1(Object(n)).forEach(function (t) {\r\n        Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));\r\n      });\r\n    }\r\n\r\n    return e;\r\n  }\r\n\r\n  var defaults = {\r\n    addCSS: !0,\r\n    thumbWidth: 15,\r\n    watch: !0\r\n  };\r\n\r\n  function matches(e, t) {\r\n    return function () {\r\n      return Array.from(document.querySelectorAll(t)).includes(this);\r\n    }.call(e, t);\r\n  }\r\n\r\n  function trigger(e, t) {\r\n    if (e && t) {\r\n      var n = new Event(t, {\r\n        bubbles: !0\r\n      });\r\n      e.dispatchEvent(n);\r\n    }\r\n  }\r\n\r\n  var getConstructor = function getConstructor(e) {\r\n    return null != e ? e.constructor : null;\r\n  },\r\n      instanceOf = function instanceOf(e, t) {\r\n    return !!(e && t && e instanceof t);\r\n  },\r\n      isNullOrUndefined = function isNullOrUndefined(e) {\r\n    return null == e;\r\n  },\r\n      isObject = function isObject(e) {\r\n    return getConstructor(e) === Object;\r\n  },\r\n      isNumber = function isNumber(e) {\r\n    return getConstructor(e) === Number && !Number.isNaN(e);\r\n  },\r\n      isString = function isString(e) {\r\n    return getConstructor(e) === String;\r\n  },\r\n      isBoolean = function isBoolean(e) {\r\n    return getConstructor(e) === Boolean;\r\n  },\r\n      isFunction = function isFunction(e) {\r\n    return getConstructor(e) === Function;\r\n  },\r\n      isArray = function isArray(e) {\r\n    return Array.isArray(e);\r\n  },\r\n      isNodeList = function isNodeList(e) {\r\n    return instanceOf(e, NodeList);\r\n  },\r\n      isElement = function isElement(e) {\r\n    return instanceOf(e, Element);\r\n  },\r\n      isEvent = function isEvent(e) {\r\n    return instanceOf(e, Event);\r\n  },\r\n      isEmpty = function isEmpty(e) {\r\n    return isNullOrUndefined(e) || (isString(e) || isArray(e) || isNodeList(e)) && !e.length || isObject(e) && !Object.keys(e).length;\r\n  },\r\n      is = {\r\n    nullOrUndefined: isNullOrUndefined,\r\n    object: isObject,\r\n    number: isNumber,\r\n    string: isString,\r\n    boolean: isBoolean,\r\n    function: isFunction,\r\n    array: isArray,\r\n    nodeList: isNodeList,\r\n    element: isElement,\r\n    event: isEvent,\r\n    empty: isEmpty\r\n  };\r\n\r\n  function getDecimalPlaces(e) {\r\n    var t = \"\".concat(e).match(/(?:\\.(\\d+))?(?:[eE]([+-]?\\d+))?$/);\r\n    return t ? Math.max(0, (t[1] ? t[1].length : 0) - (t[2] ? +t[2] : 0)) : 0;\r\n  }\r\n\r\n  function round(e, t) {\r\n    if (1 > t) {\r\n      var n = getDecimalPlaces(t);\r\n      return parseFloat(e.toFixed(n));\r\n    }\r\n\r\n    return Math.round(e / t) * t;\r\n  }\r\n\r\n  var RangeTouch = function () {\r\n    function e(t, n) {\r\n      _classCallCheck$1(this, e), is.element(t) ? this.element = t : is.string(t) && (this.element = document.querySelector(t)), is.element(this.element) && is.empty(this.element.rangeTouch) && (this.config = _objectSpread2$1({}, defaults, {}, n), this.init());\r\n    }\r\n\r\n    return _createClass$1(e, [{\r\n      key: \"init\",\r\n      value: function value() {\r\n        e.enabled && (this.config.addCSS && (this.element.style.userSelect = \"none\", this.element.style.webKitUserSelect = \"none\", this.element.style.touchAction = \"manipulation\"), this.listeners(!0), this.element.rangeTouch = this);\r\n      }\r\n    }, {\r\n      key: \"destroy\",\r\n      value: function value() {\r\n        e.enabled && (this.config.addCSS && (this.element.style.userSelect = \"\", this.element.style.webKitUserSelect = \"\", this.element.style.touchAction = \"\"), this.listeners(!1), this.element.rangeTouch = null);\r\n      }\r\n    }, {\r\n      key: \"listeners\",\r\n      value: function value(e) {\r\n        var t = this,\r\n            n = e ? \"addEventListener\" : \"removeEventListener\";\r\n        [\"touchstart\", \"touchmove\", \"touchend\"].forEach(function (e) {\r\n          t.element[n](e, function (e) {\r\n            return t.set(e);\r\n          }, !1);\r\n        });\r\n      }\r\n    }, {\r\n      key: \"get\",\r\n      value: function value(t) {\r\n        if (!e.enabled || !is.event(t)) return null;\r\n        var n,\r\n            r = t.target,\r\n            i = t.changedTouches[0],\r\n            o = parseFloat(r.getAttribute(\"min\")) || 0,\r\n            s = parseFloat(r.getAttribute(\"max\")) || 100,\r\n            u = parseFloat(r.getAttribute(\"step\")) || 1,\r\n            c = r.getBoundingClientRect(),\r\n            a = 100 / c.width * (this.config.thumbWidth / 2) / 100;\r\n        return 0 > (n = 100 / c.width * (i.clientX - c.left)) ? n = 0 : 100 < n && (n = 100), 50 > n ? n -= (100 - 2 * n) * a : 50 < n && (n += 2 * (n - 50) * a), o + round(n / 100 * (s - o), u);\r\n      }\r\n    }, {\r\n      key: \"set\",\r\n      value: function value(t) {\r\n        e.enabled && is.event(t) && !t.target.disabled && (t.preventDefault(), t.target.value = this.get(t), trigger(t.target, \"touchend\" === t.type ? \"change\" : \"input\"));\r\n      }\r\n    }], [{\r\n      key: \"setup\",\r\n      value: function value(t) {\r\n        var n = 1 < arguments.length && void 0 !== arguments[1] ? arguments[1] : {},\r\n            r = null;\r\n        if (is.empty(t) || is.string(t) ? r = Array.from(document.querySelectorAll(is.string(t) ? t : 'input[type=\"range\"]')) : is.element(t) ? r = [t] : is.nodeList(t) ? r = Array.from(t) : is.array(t) && (r = t.filter(is.element)), is.empty(r)) return null;\r\n\r\n        var i = _objectSpread2$1({}, defaults, {}, n);\r\n\r\n        if (is.string(t) && i.watch) {\r\n          var o = new MutationObserver(function (n) {\r\n            Array.from(n).forEach(function (n) {\r\n              Array.from(n.addedNodes).forEach(function (n) {\r\n                is.element(n) && matches(n, t) && new e(n, i);\r\n              });\r\n            });\r\n          });\r\n          o.observe(document.body, {\r\n            childList: !0,\r\n            subtree: !0\r\n          });\r\n        }\r\n\r\n        return r.map(function (t) {\r\n          return new e(t, n);\r\n        });\r\n      }\r\n    }, {\r\n      key: \"enabled\",\r\n      get: function get() {\r\n        return \"ontouchstart\" in document.documentElement;\r\n      }\r\n    }]), e;\r\n  }();\r\n\r\n  // ==========================================================================\r\n  // Type checking utils\r\n  // ==========================================================================\r\n  var getConstructor$1 = function getConstructor(input) {\r\n    return input !== null && typeof input !== 'undefined' ? input.constructor : null;\r\n  };\r\n\r\n  var instanceOf$1 = function instanceOf(input, constructor) {\r\n    return Boolean(input && constructor && input instanceof constructor);\r\n  };\r\n\r\n  var isNullOrUndefined$1 = function isNullOrUndefined(input) {\r\n    return input === null || typeof input === 'undefined';\r\n  };\r\n\r\n  var isObject$1 = function isObject(input) {\r\n    return getConstructor$1(input) === Object;\r\n  };\r\n\r\n  var isNumber$1 = function isNumber(input) {\r\n    return getConstructor$1(input) === Number && !Number.isNaN(input);\r\n  };\r\n\r\n  var isString$1 = function isString(input) {\r\n    return getConstructor$1(input) === String;\r\n  };\r\n\r\n  var isBoolean$1 = function isBoolean(input) {\r\n    return getConstructor$1(input) === Boolean;\r\n  };\r\n\r\n  var isFunction$1 = function isFunction(input) {\r\n    return getConstructor$1(input) === Function;\r\n  };\r\n\r\n  var isArray$1 = function isArray(input) {\r\n    return Array.isArray(input);\r\n  };\r\n\r\n  var isWeakMap = function isWeakMap(input) {\r\n    return instanceOf$1(input, WeakMap);\r\n  };\r\n\r\n  var isNodeList$1 = function isNodeList(input) {\r\n    return instanceOf$1(input, NodeList);\r\n  };\r\n\r\n  var isElement$1 = function isElement(input) {\r\n    return instanceOf$1(input, Element);\r\n  };\r\n\r\n  var isTextNode = function isTextNode(input) {\r\n    return getConstructor$1(input) === Text;\r\n  };\r\n\r\n  var isEvent$1 = function isEvent(input) {\r\n    return instanceOf$1(input, Event);\r\n  };\r\n\r\n  var isKeyboardEvent = function isKeyboardEvent(input) {\r\n    return instanceOf$1(input, KeyboardEvent);\r\n  };\r\n\r\n  var isCue = function isCue(input) {\r\n    return instanceOf$1(input, window.TextTrackCue) || instanceOf$1(input, window.VTTCue);\r\n  };\r\n\r\n  var isTrack = function isTrack(input) {\r\n    return instanceOf$1(input, TextTrack) || !isNullOrUndefined$1(input) && isString$1(input.kind);\r\n  };\r\n\r\n  var isPromise = function isPromise(input) {\r\n    return instanceOf$1(input, Promise) && isFunction$1(input.then);\r\n  };\r\n\r\n  var isEmpty$1 = function isEmpty(input) {\r\n    return isNullOrUndefined$1(input) || (isString$1(input) || isArray$1(input) || isNodeList$1(input)) && !input.length || isObject$1(input) && !Object.keys(input).length;\r\n  };\r\n\r\n  var isUrl = function isUrl(input) {\r\n    // Accept a URL object\r\n    if (instanceOf$1(input, window.URL)) {\r\n      return true;\r\n    } // Must be string from here\r\n\r\n\r\n    if (!isString$1(input)) {\r\n      return false;\r\n    } // Add the protocol if required\r\n\r\n\r\n    var string = input;\r\n\r\n    if (!input.startsWith('http://') || !input.startsWith('https://')) {\r\n      string = \"http://\".concat(input);\r\n    }\r\n\r\n    try {\r\n      return !isEmpty$1(new URL(string).hostname);\r\n    } catch (e) {\r\n      return false;\r\n    }\r\n  };\r\n\r\n  var is$1 = {\r\n    nullOrUndefined: isNullOrUndefined$1,\r\n    object: isObject$1,\r\n    number: isNumber$1,\r\n    string: isString$1,\r\n    boolean: isBoolean$1,\r\n    function: isFunction$1,\r\n    array: isArray$1,\r\n    weakMap: isWeakMap,\r\n    nodeList: isNodeList$1,\r\n    element: isElement$1,\r\n    textNode: isTextNode,\r\n    event: isEvent$1,\r\n    keyboardEvent: isKeyboardEvent,\r\n    cue: isCue,\r\n    track: isTrack,\r\n    promise: isPromise,\r\n    url: isUrl,\r\n    empty: isEmpty$1\r\n  };\r\n\r\n  // ==========================================================================\r\n  var transitionEndEvent = function () {\r\n    var element = document.createElement('span');\r\n    var events = {\r\n      WebkitTransition: 'webkitTransitionEnd',\r\n      MozTransition: 'transitionend',\r\n      OTransition: 'oTransitionEnd otransitionend',\r\n      transition: 'transitionend'\r\n    };\r\n    var type = Object.keys(events).find(function (event) {\r\n      return element.style[event] !== undefined;\r\n    });\r\n    return is$1.string(type) ? events[type] : false;\r\n  }(); // Force repaint of element\r\n\r\n  function repaint(element, delay) {\r\n    setTimeout(function () {\r\n      try {\r\n        // eslint-disable-next-line no-param-reassign\r\n        element.hidden = true; // eslint-disable-next-line no-unused-expressions\r\n\r\n        element.offsetHeight; // eslint-disable-next-line no-param-reassign\r\n\r\n        element.hidden = false;\r\n      } catch (e) {// Do nothing\r\n      }\r\n    }, delay);\r\n  }\r\n\r\n  // ==========================================================================\r\n  // Browser sniffing\r\n  // Unfortunately, due to mixed support, UA sniffing is required\r\n  // ==========================================================================\r\n  var browser = {\r\n    isIE:\r\n    /* @cc_on!@ */\r\n     !!document.documentMode,\r\n    isEdge: window.navigator.userAgent.includes('Edge'),\r\n    isWebkit: 'WebkitAppearance' in document.documentElement.style && !/Edge/.test(navigator.userAgent),\r\n    isIPhone: /(iPhone|iPod)/gi.test(navigator.platform),\r\n    isIos: /(iPad|iPhone|iPod)/gi.test(navigator.platform)\r\n  };\r\n\r\n  function cloneDeep(object) {\r\n    return JSON.parse(JSON.stringify(object));\r\n  } // Get a nested value in an object\r\n\r\n  function getDeep(object, path) {\r\n    return path.split('.').reduce(function (obj, key) {\r\n      return obj && obj[key];\r\n    }, object);\r\n  } // Deep extend destination object with N more objects\r\n\r\n  function extend() {\r\n    var target = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\r\n\r\n    for (var _len = arguments.length, sources = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\r\n      sources[_key - 1] = arguments[_key];\r\n    }\r\n\r\n    if (!sources.length) {\r\n      return target;\r\n    }\r\n\r\n    var source = sources.shift();\r\n\r\n    if (!is$1.object(source)) {\r\n      return target;\r\n    }\r\n\r\n    Object.keys(source).forEach(function (key) {\r\n      if (is$1.object(source[key])) {\r\n        if (!Object.keys(target).includes(key)) {\r\n          Object.assign(target, _defineProperty({}, key, {}));\r\n        }\r\n\r\n        extend(target[key], source[key]);\r\n      } else {\r\n        Object.assign(target, _defineProperty({}, key, source[key]));\r\n      }\r\n    });\r\n    return extend.apply(void 0, [target].concat(sources));\r\n  }\r\n\r\n  function wrap(elements, wrapper) {\r\n    // Convert `elements` to an array, if necessary.\r\n    var targets = elements.length ? elements : [elements]; // Loops backwards to prevent having to clone the wrapper on the\r\n    // first element (see `child` below).\r\n\r\n    Array.from(targets).reverse().forEach(function (element, index) {\r\n      var child = index > 0 ? wrapper.cloneNode(true) : wrapper; // Cache the current parent and sibling.\r\n\r\n      var parent = element.parentNode;\r\n      var sibling = element.nextSibling; // Wrap the element (is automatically removed from its current\r\n      // parent).\r\n\r\n      child.appendChild(element); // If the element had a sibling, insert the wrapper before\r\n      // the sibling to maintain the HTML structure; otherwise, just\r\n      // append it to the parent.\r\n\r\n      if (sibling) {\r\n        parent.insertBefore(child, sibling);\r\n      } else {\r\n        parent.appendChild(child);\r\n      }\r\n    });\r\n  } // Set attributes\r\n\r\n  function setAttributes(element, attributes) {\r\n    if (!is$1.element(element) || is$1.empty(attributes)) {\r\n      return;\r\n    } // Assume null and undefined attributes should be left out,\r\n    // Setting them would otherwise convert them to \"null\" and \"undefined\"\r\n\r\n\r\n    Object.entries(attributes).filter(function (_ref) {\r\n      var _ref2 = _slicedToArray(_ref, 2),\r\n          value = _ref2[1];\r\n\r\n      return !is$1.nullOrUndefined(value);\r\n    }).forEach(function (_ref3) {\r\n      var _ref4 = _slicedToArray(_ref3, 2),\r\n          key = _ref4[0],\r\n          value = _ref4[1];\r\n\r\n      return element.setAttribute(key, value);\r\n    });\r\n  } // Create a DocumentFragment\r\n\r\n  function createElement(type, attributes, text) {\r\n    // Create a new <element>\r\n    var element = document.createElement(type); // Set all passed attributes\r\n\r\n    if (is$1.object(attributes)) {\r\n      setAttributes(element, attributes);\r\n    } // Add text node\r\n\r\n\r\n    if (is$1.string(text)) {\r\n      element.innerText = text;\r\n    } // Return built element\r\n\r\n\r\n    return element;\r\n  } // Inaert an element after another\r\n\r\n  function insertAfter(element, target) {\r\n    if (!is$1.element(element) || !is$1.element(target)) {\r\n      return;\r\n    }\r\n\r\n    target.parentNode.insertBefore(element, target.nextSibling);\r\n  } // Insert a DocumentFragment\r\n\r\n  function insertElement(type, parent, attributes, text) {\r\n    if (!is$1.element(parent)) {\r\n      return;\r\n    }\r\n\r\n    parent.appendChild(createElement(type, attributes, text));\r\n  } // Remove element(s)\r\n\r\n  function removeElement(element) {\r\n    if (is$1.nodeList(element) || is$1.array(element)) {\r\n      Array.from(element).forEach(removeElement);\r\n      return;\r\n    }\r\n\r\n    if (!is$1.element(element) || !is$1.element(element.parentNode)) {\r\n      return;\r\n    }\r\n\r\n    element.parentNode.removeChild(element);\r\n  } // Remove all child elements\r\n\r\n  function emptyElement(element) {\r\n    if (!is$1.element(element)) {\r\n      return;\r\n    }\r\n\r\n    var length = element.childNodes.length;\r\n\r\n    while (length > 0) {\r\n      element.removeChild(element.lastChild);\r\n      length -= 1;\r\n    }\r\n  } // Replace element\r\n\r\n  function replaceElement(newChild, oldChild) {\r\n    if (!is$1.element(oldChild) || !is$1.element(oldChild.parentNode) || !is$1.element(newChild)) {\r\n      return null;\r\n    }\r\n\r\n    oldChild.parentNode.replaceChild(newChild, oldChild);\r\n    return newChild;\r\n  } // Get an attribute object from a string selector\r\n\r\n  function getAttributesFromSelector(sel, existingAttributes) {\r\n    // For example:\r\n    // '.test' to { class: 'test' }\r\n    // '#test' to { id: 'test' }\r\n    // '[data-test=\"test\"]' to { 'data-test': 'test' }\r\n    if (!is$1.string(sel) || is$1.empty(sel)) {\r\n      return {};\r\n    }\r\n\r\n    var attributes = {};\r\n    var existing = extend({}, existingAttributes);\r\n    sel.split(',').forEach(function (s) {\r\n      // Remove whitespace\r\n      var selector = s.trim();\r\n      var className = selector.replace('.', '');\r\n      var stripped = selector.replace(/[[\\]]/g, ''); // Get the parts and value\r\n\r\n      var parts = stripped.split('=');\r\n\r\n      var _parts = _slicedToArray(parts, 1),\r\n          key = _parts[0];\r\n\r\n      var value = parts.length > 1 ? parts[1].replace(/[\"']/g, '') : ''; // Get the first character\r\n\r\n      var start = selector.charAt(0);\r\n\r\n      switch (start) {\r\n        case '.':\r\n          // Add to existing classname\r\n          if (is$1.string(existing.class)) {\r\n            attributes.class = \"\".concat(existing.class, \" \").concat(className);\r\n          } else {\r\n            attributes.class = className;\r\n          }\r\n\r\n          break;\r\n\r\n        case '#':\r\n          // ID selector\r\n          attributes.id = selector.replace('#', '');\r\n          break;\r\n\r\n        case '[':\r\n          // Attribute selector\r\n          attributes[key] = value;\r\n          break;\r\n      }\r\n    });\r\n    return extend(existing, attributes);\r\n  } // Toggle hidden\r\n\r\n  function toggleHidden(element, hidden) {\r\n    if (!is$1.element(element)) {\r\n      return;\r\n    }\r\n\r\n    var hide = hidden;\r\n\r\n    if (!is$1.boolean(hide)) {\r\n      hide = !element.hidden;\r\n    } // eslint-disable-next-line no-param-reassign\r\n\r\n\r\n    element.hidden = hide;\r\n  } // Mirror Element.classList.toggle, with IE compatibility for \"force\" argument\r\n\r\n  function toggleClass(element, className, force) {\r\n    if (is$1.nodeList(element)) {\r\n      return Array.from(element).map(function (e) {\r\n        return toggleClass(e, className, force);\r\n      });\r\n    }\r\n\r\n    if (is$1.element(element)) {\r\n      var method = 'toggle';\r\n\r\n      if (typeof force !== 'undefined') {\r\n        method = force ? 'add' : 'remove';\r\n      }\r\n\r\n      element.classList[method](className);\r\n      return element.classList.contains(className);\r\n    }\r\n\r\n    return false;\r\n  } // Has class name\r\n\r\n  function hasClass(element, className) {\r\n    return is$1.element(element) && element.classList.contains(className);\r\n  } // Element matches selector\r\n\r\n  function matches$1(element, selector) {\r\n    var _Element = Element,\r\n        prototype = _Element.prototype;\r\n\r\n    function match() {\r\n      return Array.from(document.querySelectorAll(selector)).includes(this);\r\n    }\r\n\r\n    var method = prototype.matches || prototype.webkitMatchesSelector || prototype.mozMatchesSelector || prototype.msMatchesSelector || match;\r\n    return method.call(element, selector);\r\n  } // Closest ancestor element matching selector (also tests element itself)\r\n\r\n  function closest(element, selector) {\r\n    var _Element2 = Element,\r\n        prototype = _Element2.prototype; // https://developer.mozilla.org/en-US/docs/Web/API/Element/closest#Polyfill\r\n\r\n    function closestElement() {\r\n      var el = this;\r\n\r\n      do {\r\n        if (matches$1.matches(el, selector)) return el;\r\n        el = el.parentElement || el.parentNode;\r\n      } while (el !== null && el.nodeType === 1);\r\n\r\n      return null;\r\n    }\r\n\r\n    var method = prototype.closest || closestElement;\r\n    return method.call(element, selector);\r\n  } // Find all elements\r\n\r\n  function getElements(selector) {\r\n    return this.elements.container.querySelectorAll(selector);\r\n  } // Find a single element\r\n\r\n  function getElement(selector) {\r\n    return this.elements.container.querySelector(selector);\r\n  } // Set focus and tab focus class\r\n\r\n  function setFocus() {\r\n    var element = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;\r\n    var tabFocus = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\r\n\r\n    if (!is$1.element(element)) {\r\n      return;\r\n    } // Set regular focus\r\n\r\n\r\n    element.focus({\r\n      preventScroll: true\r\n    }); // If we want to mimic keyboard focus via tab\r\n\r\n    if (tabFocus) {\r\n      toggleClass(element, this.config.classNames.tabFocus);\r\n    }\r\n  }\r\n\r\n  var defaultCodecs = {\r\n    'audio/ogg': 'vorbis',\r\n    'audio/wav': '1',\r\n    'video/webm': 'vp8, vorbis',\r\n    'video/mp4': 'avc1.42E01E, mp4a.40.2',\r\n    'video/ogg': 'theora'\r\n  }; // Check for feature support\r\n\r\n  var support = {\r\n    // Basic support\r\n    audio: 'canPlayType' in document.createElement('audio'),\r\n    video: 'canPlayType' in document.createElement('video'),\r\n    // Check for support\r\n    // Basic functionality vs full UI\r\n    check: function check(type, provider, playsinline) {\r\n      var canPlayInline = browser.isIPhone && playsinline && support.playsinline;\r\n      var api = support[type] || provider !== 'html5';\r\n      var ui = api && support.rangeInput && (type !== 'video' || !browser.isIPhone || canPlayInline);\r\n      return {\r\n        api: api,\r\n        ui: ui\r\n      };\r\n    },\r\n    // Picture-in-picture support\r\n    // Safari & Chrome only currently\r\n    pip: function () {\r\n      if (browser.isIPhone) {\r\n        return false;\r\n      } // Safari\r\n      // https://developer.apple.com/documentation/webkitjs/adding_picture_in_picture_to_your_safari_media_controls\r\n\r\n\r\n      if (is$1.function(createElement('video').webkitSetPresentationMode)) {\r\n        return true;\r\n      } // Chrome\r\n      // https://developers.google.com/web/updates/2018/10/watch-video-using-picture-in-picture\r\n\r\n\r\n      if (document.pictureInPictureEnabled && !createElement('video').disablePictureInPicture) {\r\n        return true;\r\n      }\r\n\r\n      return false;\r\n    }(),\r\n    // Airplay support\r\n    // Safari only currently\r\n    airplay: is$1.function(window.WebKitPlaybackTargetAvailabilityEvent),\r\n    // Inline playback support\r\n    // https://webkit.org/blog/6784/new-video-policies-for-ios/\r\n    playsinline: 'playsInline' in document.createElement('video'),\r\n    // Check for mime type support against a player instance\r\n    // Credits: http://diveintohtml5.info/everything.html\r\n    // Related: http://www.leanbackplayer.com/test/h5mt.html\r\n    mime: function mime(input) {\r\n      if (is$1.empty(input)) {\r\n        return false;\r\n      }\r\n\r\n      var _input$split = input.split('/'),\r\n          _input$split2 = _slicedToArray(_input$split, 1),\r\n          mediaType = _input$split2[0];\r\n\r\n      var type = input; // Verify we're using HTML5 and there's no media type mismatch\r\n\r\n      if (!this.isHTML5 || mediaType !== this.type) {\r\n        return false;\r\n      } // Add codec if required\r\n\r\n\r\n      if (Object.keys(defaultCodecs).includes(type)) {\r\n        type += \"; codecs=\\\"\".concat(defaultCodecs[input], \"\\\"\");\r\n      }\r\n\r\n      try {\r\n        return Boolean(type && this.media.canPlayType(type).replace(/no/, ''));\r\n      } catch (e) {\r\n        return false;\r\n      }\r\n    },\r\n    // Check for textTracks support\r\n    textTracks: 'textTracks' in document.createElement('video'),\r\n    // <input type=\"range\"> Sliders\r\n    rangeInput: function () {\r\n      var range = document.createElement('input');\r\n      range.type = 'range';\r\n      return range.type === 'range';\r\n    }(),\r\n    // Touch\r\n    // NOTE: Remember a device can be mouse + touch enabled so we check on first touch event\r\n    touch: 'ontouchstart' in document.documentElement,\r\n    // Detect transitions support\r\n    transitions: transitionEndEvent !== false,\r\n    // Reduced motion iOS & MacOS setting\r\n    // https://webkit.org/blog/7551/responsive-design-for-motion/\r\n    reducedMotion: 'matchMedia' in window && window.matchMedia('(prefers-reduced-motion)').matches\r\n  };\r\n\r\n  // https://github.com/WICG/EventListenerOptions/blob/gh-pages/explainer.md\r\n  // https://www.youtube.com/watch?v=NPM6172J22g\r\n\r\n  var supportsPassiveListeners = function () {\r\n    // Test via a getter in the options object to see if the passive property is accessed\r\n    var supported = false;\r\n\r\n    try {\r\n      var options = Object.defineProperty({}, 'passive', {\r\n        get: function get() {\r\n          supported = true;\r\n          return null;\r\n        }\r\n      });\r\n      window.addEventListener('test', null, options);\r\n      window.removeEventListener('test', null, options);\r\n    } catch (e) {// Do nothing\r\n    }\r\n\r\n    return supported;\r\n  }(); // Toggle event listener\r\n\r\n\r\n  function toggleListener(element, event, callback) {\r\n    var _this = this;\r\n\r\n    var toggle = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;\r\n    var passive = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : true;\r\n    var capture = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : false;\r\n\r\n    // Bail if no element, event, or callback\r\n    if (!element || !('addEventListener' in element) || is$1.empty(event) || !is$1.function(callback)) {\r\n      return;\r\n    } // Allow multiple events\r\n\r\n\r\n    var events = event.split(' '); // Build options\r\n    // Default to just the capture boolean for browsers with no passive listener support\r\n\r\n    var options = capture; // If passive events listeners are supported\r\n\r\n    if (supportsPassiveListeners) {\r\n      options = {\r\n        // Whether the listener can be passive (i.e. default never prevented)\r\n        passive: passive,\r\n        // Whether the listener is a capturing listener or not\r\n        capture: capture\r\n      };\r\n    } // If a single node is passed, bind the event listener\r\n\r\n\r\n    events.forEach(function (type) {\r\n      if (_this && _this.eventListeners && toggle) {\r\n        // Cache event listener\r\n        _this.eventListeners.push({\r\n          element: element,\r\n          type: type,\r\n          callback: callback,\r\n          options: options\r\n        });\r\n      }\r\n\r\n      element[toggle ? 'addEventListener' : 'removeEventListener'](type, callback, options);\r\n    });\r\n  } // Bind event handler\r\n\r\n  function on(element) {\r\n    var events = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';\r\n    var callback = arguments.length > 2 ? arguments[2] : undefined;\r\n    var passive = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : true;\r\n    var capture = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;\r\n    toggleListener.call(this, element, events, callback, true, passive, capture);\r\n  } // Unbind event handler\r\n\r\n  function off(element) {\r\n    var events = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';\r\n    var callback = arguments.length > 2 ? arguments[2] : undefined;\r\n    var passive = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : true;\r\n    var capture = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;\r\n    toggleListener.call(this, element, events, callback, false, passive, capture);\r\n  } // Bind once-only event handler\r\n\r\n  function once(element) {\r\n    var _this2 = this;\r\n\r\n    var events = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';\r\n    var callback = arguments.length > 2 ? arguments[2] : undefined;\r\n    var passive = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : true;\r\n    var capture = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;\r\n\r\n    var onceCallback = function onceCallback() {\r\n      off(element, events, onceCallback, passive, capture);\r\n\r\n      for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\r\n        args[_key] = arguments[_key];\r\n      }\r\n\r\n      callback.apply(_this2, args);\r\n    };\r\n\r\n    toggleListener.call(this, element, events, onceCallback, true, passive, capture);\r\n  } // Trigger event\r\n\r\n  function triggerEvent(element) {\r\n    var type = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';\r\n    var bubbles = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\r\n    var detail = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};\r\n\r\n    // Bail if no element\r\n    if (!is$1.element(element) || is$1.empty(type)) {\r\n      return;\r\n    } // Create and dispatch the event\r\n\r\n\r\n    var event = new CustomEvent(type, {\r\n      bubbles: bubbles,\r\n      detail: _objectSpread2(_objectSpread2({}, detail), {}, {\r\n        plyr: this\r\n      })\r\n    }); // Dispatch the event\r\n\r\n    element.dispatchEvent(event);\r\n  } // Unbind all cached event listeners\r\n\r\n  function unbindListeners() {\r\n    if (this && this.eventListeners) {\r\n      this.eventListeners.forEach(function (item) {\r\n        var element = item.element,\r\n            type = item.type,\r\n            callback = item.callback,\r\n            options = item.options;\r\n        element.removeEventListener(type, callback, options);\r\n      });\r\n      this.eventListeners = [];\r\n    }\r\n  } // Run method when / if player is ready\r\n\r\n  function ready() {\r\n    var _this3 = this;\r\n\r\n    return new Promise(function (resolve) {\r\n      return _this3.ready ? setTimeout(resolve, 0) : on.call(_this3, _this3.elements.container, 'ready', resolve);\r\n    }).then(function () {});\r\n  }\r\n\r\n  /**\r\n   * Silence a Promise-like object.\r\n   * This is useful for avoiding non-harmful, but potentially confusing \"uncaught\r\n   * play promise\" rejection error messages.\r\n   * @param  {Object} value An object that may or may not be `Promise`-like.\r\n   */\r\n\r\n  function silencePromise(value) {\r\n    if (is$1.promise(value)) {\r\n      value.then(null, function () {});\r\n    }\r\n  }\r\n\r\n  function validateRatio(input) {\r\n    if (!is$1.array(input) && (!is$1.string(input) || !input.includes(':'))) {\r\n      return false;\r\n    }\r\n\r\n    var ratio = is$1.array(input) ? input : input.split(':');\r\n    return ratio.map(Number).every(is$1.number);\r\n  }\r\n  function reduceAspectRatio(ratio) {\r\n    if (!is$1.array(ratio) || !ratio.every(is$1.number)) {\r\n      return null;\r\n    }\r\n\r\n    var _ratio = _slicedToArray(ratio, 2),\r\n        width = _ratio[0],\r\n        height = _ratio[1];\r\n\r\n    var getDivider = function getDivider(w, h) {\r\n      return h === 0 ? w : getDivider(h, w % h);\r\n    };\r\n\r\n    var divider = getDivider(width, height);\r\n    return [width / divider, height / divider];\r\n  }\r\n  function getAspectRatio(input) {\r\n    var parse = function parse(ratio) {\r\n      return validateRatio(ratio) ? ratio.split(':').map(Number) : null;\r\n    }; // Try provided ratio\r\n\r\n\r\n    var ratio = parse(input); // Get from config\r\n\r\n    if (ratio === null) {\r\n      ratio = parse(this.config.ratio);\r\n    } // Get from embed\r\n\r\n\r\n    if (ratio === null && !is$1.empty(this.embed) && is$1.array(this.embed.ratio)) {\r\n      ratio = this.embed.ratio;\r\n    } // Get from HTML5 video\r\n\r\n\r\n    if (ratio === null && this.isHTML5) {\r\n      var _this$media = this.media,\r\n          videoWidth = _this$media.videoWidth,\r\n          videoHeight = _this$media.videoHeight;\r\n      ratio = reduceAspectRatio([videoWidth, videoHeight]);\r\n    }\r\n\r\n    return ratio;\r\n  } // Set aspect ratio for responsive container\r\n\r\n  function setAspectRatio(input) {\r\n    if (!this.isVideo) {\r\n      return {};\r\n    }\r\n\r\n    var wrapper = this.elements.wrapper;\r\n    var ratio = getAspectRatio.call(this, input);\r\n\r\n    var _ref = is$1.array(ratio) ? ratio : [0, 0],\r\n        _ref2 = _slicedToArray(_ref, 2),\r\n        w = _ref2[0],\r\n        h = _ref2[1];\r\n\r\n    var padding = 100 / w * h;\r\n    wrapper.style.paddingBottom = \"\".concat(padding, \"%\"); // For Vimeo we have an extra <div> to hide the standard controls and UI\r\n\r\n    if (this.isVimeo && !this.config.vimeo.premium && this.supported.ui) {\r\n      var height = 100 / this.media.offsetWidth * parseInt(window.getComputedStyle(this.media).paddingBottom, 10);\r\n      var offset = (height - padding) / (height / 50);\r\n      this.media.style.transform = \"translateY(-\".concat(offset, \"%)\");\r\n    } else if (this.isHTML5) {\r\n      wrapper.classList.toggle(this.config.classNames.videoFixedRatio, ratio !== null);\r\n    }\r\n\r\n    return {\r\n      padding: padding,\r\n      ratio: ratio\r\n    };\r\n  }\r\n\r\n  // ==========================================================================\r\n  var html5 = {\r\n    getSources: function getSources() {\r\n      var _this = this;\r\n\r\n      if (!this.isHTML5) {\r\n        return [];\r\n      }\r\n\r\n      var sources = Array.from(this.media.querySelectorAll('source')); // Filter out unsupported sources (if type is specified)\r\n\r\n      return sources.filter(function (source) {\r\n        var type = source.getAttribute('type');\r\n\r\n        if (is$1.empty(type)) {\r\n          return true;\r\n        }\r\n\r\n        return support.mime.call(_this, type);\r\n      });\r\n    },\r\n    // Get quality levels\r\n    getQualityOptions: function getQualityOptions() {\r\n      // Whether we're forcing all options (e.g. for streaming)\r\n      if (this.config.quality.forced) {\r\n        return this.config.quality.options;\r\n      } // Get sizes from <source> elements\r\n\r\n\r\n      return html5.getSources.call(this).map(function (source) {\r\n        return Number(source.getAttribute('size'));\r\n      }).filter(Boolean);\r\n    },\r\n    setup: function setup() {\r\n      if (!this.isHTML5) {\r\n        return;\r\n      }\r\n\r\n      var player = this; // Set speed options from config\r\n\r\n      player.options.speed = player.config.speed.options; // Set aspect ratio if fixed\r\n\r\n      if (!is$1.empty(this.config.ratio)) {\r\n        setAspectRatio.call(player);\r\n      } // Quality\r\n\r\n\r\n      Object.defineProperty(player.media, 'quality', {\r\n        get: function get() {\r\n          // Get sources\r\n          var sources = html5.getSources.call(player);\r\n          var source = sources.find(function (s) {\r\n            return s.getAttribute('src') === player.source;\r\n          }); // Return size, if match is found\r\n\r\n          return source && Number(source.getAttribute('size'));\r\n        },\r\n        set: function set(input) {\r\n          if (player.quality === input) {\r\n            return;\r\n          } // If we're using an an external handler...\r\n\r\n\r\n          if (player.config.quality.forced && is$1.function(player.config.quality.onChange)) {\r\n            player.config.quality.onChange(input);\r\n          } else {\r\n            // Get sources\r\n            var sources = html5.getSources.call(player); // Get first match for requested size\r\n\r\n            var source = sources.find(function (s) {\r\n              return Number(s.getAttribute('size')) === input;\r\n            }); // No matching source found\r\n\r\n            if (!source) {\r\n              return;\r\n            } // Get current state\r\n\r\n\r\n            var _player$media = player.media,\r\n                currentTime = _player$media.currentTime,\r\n                paused = _player$media.paused,\r\n                preload = _player$media.preload,\r\n                readyState = _player$media.readyState,\r\n                playbackRate = _player$media.playbackRate; // Set new source\r\n\r\n            player.media.src = source.getAttribute('src'); // Prevent loading if preload=\"none\" and the current source isn't loaded (#1044)\r\n\r\n            if (preload !== 'none' || readyState) {\r\n              // Restore time\r\n              player.once('loadedmetadata', function () {\r\n                player.speed = playbackRate;\r\n                player.currentTime = currentTime; // Resume playing\r\n\r\n                if (!paused) {\r\n                  silencePromise(player.play());\r\n                }\r\n              }); // Load new source\r\n\r\n              player.media.load();\r\n            }\r\n          } // Trigger change event\r\n\r\n\r\n          triggerEvent.call(player, player.media, 'qualitychange', false, {\r\n            quality: input\r\n          });\r\n        }\r\n      });\r\n    },\r\n    // Cancel current network requests\r\n    // See https://github.com/sampotts/plyr/issues/174\r\n    cancelRequests: function cancelRequests() {\r\n      if (!this.isHTML5) {\r\n        return;\r\n      } // Remove child sources\r\n\r\n\r\n      removeElement(html5.getSources.call(this)); // Set blank video src attribute\r\n      // This is to prevent a MEDIA_ERR_SRC_NOT_SUPPORTED error\r\n      // Info: http://stackoverflow.com/questions/32231579/how-to-properly-dispose-of-an-html5-video-and-close-socket-or-connection\r\n\r\n      this.media.setAttribute('src', this.config.blankVideo); // Load the new empty source\r\n      // This will cancel existing requests\r\n      // See https://github.com/sampotts/plyr/issues/174\r\n\r\n      this.media.load(); // Debugging\r\n\r\n      this.debug.log('Cancelled network requests');\r\n    }\r\n  };\r\n\r\n  // ==========================================================================\r\n\r\n  function dedupe(array) {\r\n    if (!is$1.array(array)) {\r\n      return array;\r\n    }\r\n\r\n    return array.filter(function (item, index) {\r\n      return array.indexOf(item) === index;\r\n    });\r\n  } // Get the closest value in an array\r\n\r\n  function closest$1(array, value) {\r\n    if (!is$1.array(array) || !array.length) {\r\n      return null;\r\n    }\r\n\r\n    return array.reduce(function (prev, curr) {\r\n      return Math.abs(curr - value) < Math.abs(prev - value) ? curr : prev;\r\n    });\r\n  }\r\n\r\n  // ==========================================================================\r\n\r\n  function generateId(prefix) {\r\n    return \"\".concat(prefix, \"-\").concat(Math.floor(Math.random() * 10000));\r\n  } // Format string\r\n\r\n  function format(input) {\r\n    for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\r\n      args[_key - 1] = arguments[_key];\r\n    }\r\n\r\n    if (is$1.empty(input)) {\r\n      return input;\r\n    }\r\n\r\n    return input.toString().replace(/{(\\d+)}/g, function (match, i) {\r\n      return args[i].toString();\r\n    });\r\n  } // Get percentage\r\n\r\n  function getPercentage(current, max) {\r\n    if (current === 0 || max === 0 || Number.isNaN(current) || Number.isNaN(max)) {\r\n      return 0;\r\n    }\r\n\r\n    return (current / max * 100).toFixed(2);\r\n  } // Replace all occurances of a string in a string\r\n\r\n  var replaceAll = function replaceAll() {\r\n    var input = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';\r\n    var find = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';\r\n    var replace = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '';\r\n    return input.replace(new RegExp(find.toString().replace(/([.*+?^=!:${}()|[\\]/\\\\])/g, '\\\\$1'), 'g'), replace.toString());\r\n  }; // Convert to title case\r\n\r\n  var toTitleCase = function toTitleCase() {\r\n    var input = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';\r\n    return input.toString().replace(/\\w\\S*/g, function (text) {\r\n      return text.charAt(0).toUpperCase() + text.substr(1).toLowerCase();\r\n    });\r\n  }; // Convert string to pascalCase\r\n\r\n  function toPascalCase() {\r\n    var input = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';\r\n    var string = input.toString(); // Convert kebab case\r\n\r\n    string = replaceAll(string, '-', ' '); // Convert snake case\r\n\r\n    string = replaceAll(string, '_', ' '); // Convert to title case\r\n\r\n    string = toTitleCase(string); // Convert to pascal case\r\n\r\n    return replaceAll(string, ' ', '');\r\n  } // Convert string to pascalCase\r\n\r\n  function toCamelCase() {\r\n    var input = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';\r\n    var string = input.toString(); // Convert to pascal case\r\n\r\n    string = toPascalCase(string); // Convert first character to lowercase\r\n\r\n    return string.charAt(0).toLowerCase() + string.slice(1);\r\n  } // Remove HTML from a string\r\n\r\n  function stripHTML(source) {\r\n    var fragment = document.createDocumentFragment();\r\n    var element = document.createElement('div');\r\n    fragment.appendChild(element);\r\n    element.innerHTML = source;\r\n    return fragment.firstChild.innerText;\r\n  } // Like outerHTML, but also works for DocumentFragment\r\n\r\n  function getHTML(element) {\r\n    var wrapper = document.createElement('div');\r\n    wrapper.appendChild(element);\r\n    return wrapper.innerHTML;\r\n  }\r\n\r\n  var resources = {\r\n    pip: 'PIP',\r\n    airplay: 'AirPlay',\r\n    html5: 'HTML5',\r\n    vimeo: 'Vimeo',\r\n    youtube: 'YouTube'\r\n  };\r\n  var i18n = {\r\n    get: function get() {\r\n      var key = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';\r\n      var config = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\r\n\r\n      if (is$1.empty(key) || is$1.empty(config)) {\r\n        return '';\r\n      }\r\n\r\n      var string = getDeep(config.i18n, key);\r\n\r\n      if (is$1.empty(string)) {\r\n        if (Object.keys(resources).includes(key)) {\r\n          return resources[key];\r\n        }\r\n\r\n        return '';\r\n      }\r\n\r\n      var replace = {\r\n        '{seektime}': config.seekTime,\r\n        '{title}': config.title\r\n      };\r\n      Object.entries(replace).forEach(function (_ref) {\r\n        var _ref2 = _slicedToArray(_ref, 2),\r\n            k = _ref2[0],\r\n            v = _ref2[1];\r\n\r\n        string = replaceAll(string, k, v);\r\n      });\r\n      return string;\r\n    }\r\n  };\r\n\r\n  var Storage = /*#__PURE__*/function () {\r\n    function Storage(player) {\r\n      _classCallCheck(this, Storage);\r\n\r\n      this.enabled = player.config.storage.enabled;\r\n      this.key = player.config.storage.key;\r\n    } // Check for actual support (see if we can use it)\r\n\r\n\r\n    _createClass(Storage, [{\r\n      key: \"get\",\r\n      value: function get(key) {\r\n        if (!Storage.supported || !this.enabled) {\r\n          return null;\r\n        }\r\n\r\n        var store = window.localStorage.getItem(this.key);\r\n\r\n        if (is$1.empty(store)) {\r\n          return null;\r\n        }\r\n\r\n        var json = JSON.parse(store);\r\n        return is$1.string(key) && key.length ? json[key] : json;\r\n      }\r\n    }, {\r\n      key: \"set\",\r\n      value: function set(object) {\r\n        // Bail if we don't have localStorage support or it's disabled\r\n        if (!Storage.supported || !this.enabled) {\r\n          return;\r\n        } // Can only store objectst\r\n\r\n\r\n        if (!is$1.object(object)) {\r\n          return;\r\n        } // Get current storage\r\n\r\n\r\n        var storage = this.get(); // Default to empty object\r\n\r\n        if (is$1.empty(storage)) {\r\n          storage = {};\r\n        } // Update the working copy of the values\r\n\r\n\r\n        extend(storage, object); // Update storage\r\n\r\n        window.localStorage.setItem(this.key, JSON.stringify(storage));\r\n      }\r\n    }], [{\r\n      key: \"supported\",\r\n      get: function get() {\r\n        try {\r\n          if (!('localStorage' in window)) {\r\n            return false;\r\n          }\r\n\r\n          var test = '___test'; // Try to use it (it might be disabled, e.g. user is in private mode)\r\n          // see: https://github.com/sampotts/plyr/issues/131\r\n\r\n          window.localStorage.setItem(test, test);\r\n          window.localStorage.removeItem(test);\r\n          return true;\r\n        } catch (e) {\r\n          return false;\r\n        }\r\n      }\r\n    }]);\r\n\r\n    return Storage;\r\n  }();\r\n\r\n  // ==========================================================================\r\n  // Fetch wrapper\r\n  // Using XHR to avoid issues with older browsers\r\n  // ==========================================================================\r\n  function fetch(url) {\r\n    var responseType = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'text';\r\n    return new Promise(function (resolve, reject) {\r\n      try {\r\n        var request = new XMLHttpRequest(); // Check for CORS support\r\n\r\n        if (!('withCredentials' in request)) {\r\n          return;\r\n        }\r\n\r\n        request.addEventListener('load', function () {\r\n          if (responseType === 'text') {\r\n            try {\r\n              resolve(JSON.parse(request.responseText));\r\n            } catch (e) {\r\n              resolve(request.responseText);\r\n            }\r\n          } else {\r\n            resolve(request.response);\r\n          }\r\n        });\r\n        request.addEventListener('error', function () {\r\n          throw new Error(request.status);\r\n        });\r\n        request.open('GET', url, true); // Set the required response type\r\n\r\n        request.responseType = responseType;\r\n        request.send();\r\n      } catch (e) {\r\n        reject(e);\r\n      }\r\n    });\r\n  }\r\n\r\n  // ==========================================================================\r\n\r\n  function loadSprite(url, id) {\r\n    if (!is$1.string(url)) {\r\n      return;\r\n    }\r\n\r\n    var prefix = 'cache';\r\n    var hasId = is$1.string(id);\r\n    var isCached = false;\r\n\r\n    var exists = function exists() {\r\n      return document.getElementById(id) !== null;\r\n    };\r\n\r\n    var update = function update(container, data) {\r\n      // eslint-disable-next-line no-param-reassign\r\n      container.innerHTML = data; // Check again incase of race condition\r\n\r\n      if (hasId && exists()) {\r\n        return;\r\n      } // Inject the SVG to the body\r\n\r\n\r\n      document.body.insertAdjacentElement('afterbegin', container);\r\n    }; // Only load once if ID set\r\n\r\n\r\n    if (!hasId || !exists()) {\r\n      var useStorage = Storage.supported; // Create container\r\n\r\n      var container = document.createElement('div');\r\n      container.setAttribute('hidden', '');\r\n\r\n      if (hasId) {\r\n        container.setAttribute('id', id);\r\n      } // Check in cache\r\n\r\n\r\n      if (useStorage) {\r\n        var cached = window.localStorage.getItem(\"\".concat(prefix, \"-\").concat(id));\r\n        isCached = cached !== null;\r\n\r\n        if (isCached) {\r\n          var data = JSON.parse(cached);\r\n          update(container, data.content);\r\n        }\r\n      } // Get the sprite\r\n\r\n\r\n      fetch(url).then(function (result) {\r\n        if (is$1.empty(result)) {\r\n          return;\r\n        }\r\n\r\n        if (useStorage) {\r\n          window.localStorage.setItem(\"\".concat(prefix, \"-\").concat(id), JSON.stringify({\r\n            content: result\r\n          }));\r\n        }\r\n\r\n        update(container, result);\r\n      }).catch(function () {});\r\n    }\r\n  }\r\n\r\n  // ==========================================================================\r\n\r\n  var getHours = function getHours(value) {\r\n    return Math.trunc(value / 60 / 60 % 60, 10);\r\n  };\r\n  var getMinutes = function getMinutes(value) {\r\n    return Math.trunc(value / 60 % 60, 10);\r\n  };\r\n  var getSeconds = function getSeconds(value) {\r\n    return Math.trunc(value % 60, 10);\r\n  }; // Format time to UI friendly string\r\n\r\n  function formatTime() {\r\n    var time = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;\r\n    var displayHours = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\r\n    var inverted = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\r\n\r\n    // Bail if the value isn't a number\r\n    if (!is$1.number(time)) {\r\n      return formatTime(undefined, displayHours, inverted);\r\n    } // Format time component to add leading zero\r\n\r\n\r\n    var format = function format(value) {\r\n      return \"0\".concat(value).slice(-2);\r\n    }; // Breakdown to hours, mins, secs\r\n\r\n\r\n    var hours = getHours(time);\r\n    var mins = getMinutes(time);\r\n    var secs = getSeconds(time); // Do we need to display hours?\r\n\r\n    if (displayHours || hours > 0) {\r\n      hours = \"\".concat(hours, \":\");\r\n    } else {\r\n      hours = '';\r\n    } // Render\r\n\r\n\r\n    return \"\".concat(inverted && time > 0 ? '-' : '').concat(hours).concat(format(mins), \":\").concat(format(secs));\r\n  }\r\n\r\n  var controls = {\r\n    // Get icon URL\r\n    getIconUrl: function getIconUrl() {\r\n      var url = new URL(this.config.iconUrl, window.location);\r\n      var cors = url.host !== window.location.host || browser.isIE && !window.svg4everybody;\r\n      return {\r\n        url: this.config.iconUrl,\r\n        cors: cors\r\n      };\r\n    },\r\n    // Find the UI controls\r\n    findElements: function findElements() {\r\n      try {\r\n        this.elements.controls = getElement.call(this, this.config.selectors.controls.wrapper); // Buttons\r\n\r\n        this.elements.buttons = {\r\n          play: getElements.call(this, this.config.selectors.buttons.play),\r\n          pause: getElement.call(this, this.config.selectors.buttons.pause),\r\n          restart: getElement.call(this, this.config.selectors.buttons.restart),\r\n          rewind: getElement.call(this, this.config.selectors.buttons.rewind),\r\n          fastForward: getElement.call(this, this.config.selectors.buttons.fastForward),\r\n          mute: getElement.call(this, this.config.selectors.buttons.mute),\r\n          pip: getElement.call(this, this.config.selectors.buttons.pip),\r\n          airplay: getElement.call(this, this.config.selectors.buttons.airplay),\r\n          settings: getElement.call(this, this.config.selectors.buttons.settings),\r\n          captions: getElement.call(this, this.config.selectors.buttons.captions),\r\n          fullscreen: getElement.call(this, this.config.selectors.buttons.fullscreen)\r\n        }; // Progress\r\n\r\n        this.elements.progress = getElement.call(this, this.config.selectors.progress); // Inputs\r\n\r\n        this.elements.inputs = {\r\n          seek: getElement.call(this, this.config.selectors.inputs.seek),\r\n          volume: getElement.call(this, this.config.selectors.inputs.volume)\r\n        }; // Display\r\n\r\n        this.elements.display = {\r\n          buffer: getElement.call(this, this.config.selectors.display.buffer),\r\n          currentTime: getElement.call(this, this.config.selectors.display.currentTime),\r\n          duration: getElement.call(this, this.config.selectors.display.duration)\r\n        }; // Seek tooltip\r\n\r\n        if (is$1.element(this.elements.progress)) {\r\n          this.elements.display.seekTooltip = this.elements.progress.querySelector(\".\".concat(this.config.classNames.tooltip));\r\n        }\r\n\r\n        return true;\r\n      } catch (error) {\r\n        // Log it\r\n        this.debug.warn('It looks like there is a problem with your custom controls HTML', error); // Restore native video controls\r\n\r\n        this.toggleNativeControls(true);\r\n        return false;\r\n      }\r\n    },\r\n    // Create <svg> icon\r\n    createIcon: function createIcon(type, attributes) {\r\n      var namespace = 'http://www.w3.org/2000/svg';\r\n      var iconUrl = controls.getIconUrl.call(this);\r\n      var iconPath = \"\".concat(!iconUrl.cors ? iconUrl.url : '', \"#\").concat(this.config.iconPrefix); // Create <svg>\r\n\r\n      var icon = document.createElementNS(namespace, 'svg');\r\n      setAttributes(icon, extend(attributes, {\r\n        'aria-hidden': 'true',\r\n        focusable: 'false'\r\n      })); // Create the <use> to reference sprite\r\n\r\n      var use = document.createElementNS(namespace, 'use');\r\n      var path = \"\".concat(iconPath, \"-\").concat(type); // Set `href` attributes\r\n      // https://github.com/sampotts/plyr/issues/460\r\n      // https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/xlink:href\r\n\r\n      if ('href' in use) {\r\n        use.setAttributeNS('http://www.w3.org/1999/xlink', 'href', path);\r\n      } // Always set the older attribute even though it's \"deprecated\" (it'll be around for ages)\r\n\r\n\r\n      use.setAttributeNS('http://www.w3.org/1999/xlink', 'xlink:href', path); // Add <use> to <svg>\r\n\r\n      icon.appendChild(use);\r\n      return icon;\r\n    },\r\n    // Create hidden text label\r\n    createLabel: function createLabel(key) {\r\n      var attr = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\r\n      var text = i18n.get(key, this.config);\r\n\r\n      var attributes = _objectSpread2(_objectSpread2({}, attr), {}, {\r\n        class: [attr.class, this.config.classNames.hidden].filter(Boolean).join(' ')\r\n      });\r\n\r\n      return createElement('span', attributes, text);\r\n    },\r\n    // Create a badge\r\n    createBadge: function createBadge(text) {\r\n      if (is$1.empty(text)) {\r\n        return null;\r\n      }\r\n\r\n      var badge = createElement('span', {\r\n        class: this.config.classNames.menu.value\r\n      });\r\n      badge.appendChild(createElement('span', {\r\n        class: this.config.classNames.menu.badge\r\n      }, text));\r\n      return badge;\r\n    },\r\n    // Create a <button>\r\n    createButton: function createButton(buttonType, attr) {\r\n      var _this = this;\r\n\r\n      var attributes = extend({}, attr);\r\n      var type = toCamelCase(buttonType);\r\n      var props = {\r\n        element: 'button',\r\n        toggle: false,\r\n        label: null,\r\n        icon: null,\r\n        labelPressed: null,\r\n        iconPressed: null\r\n      };\r\n      ['element', 'icon', 'label'].forEach(function (key) {\r\n        if (Object.keys(attributes).includes(key)) {\r\n          props[key] = attributes[key];\r\n          delete attributes[key];\r\n        }\r\n      }); // Default to 'button' type to prevent form submission\r\n\r\n      if (props.element === 'button' && !Object.keys(attributes).includes('type')) {\r\n        attributes.type = 'button';\r\n      } // Set class name\r\n\r\n\r\n      if (Object.keys(attributes).includes('class')) {\r\n        if (!attributes.class.split(' ').some(function (c) {\r\n          return c === _this.config.classNames.control;\r\n        })) {\r\n          extend(attributes, {\r\n            class: \"\".concat(attributes.class, \" \").concat(this.config.classNames.control)\r\n          });\r\n        }\r\n      } else {\r\n        attributes.class = this.config.classNames.control;\r\n      } // Large play button\r\n\r\n\r\n      switch (buttonType) {\r\n        case 'play':\r\n          props.toggle = true;\r\n          props.label = 'play';\r\n          props.labelPressed = 'pause';\r\n          props.icon = 'play';\r\n          props.iconPressed = 'pause';\r\n          break;\r\n\r\n        case 'mute':\r\n          props.toggle = true;\r\n          props.label = 'mute';\r\n          props.labelPressed = 'unmute';\r\n          props.icon = 'volume';\r\n          props.iconPressed = 'muted';\r\n          break;\r\n\r\n        case 'captions':\r\n          props.toggle = true;\r\n          props.label = 'enableCaptions';\r\n          props.labelPressed = 'disableCaptions';\r\n          props.icon = 'captions-off';\r\n          props.iconPressed = 'captions-on';\r\n          break;\r\n\r\n        case 'fullscreen':\r\n          props.toggle = true;\r\n          props.label = 'enterFullscreen';\r\n          props.labelPressed = 'exitFullscreen';\r\n          props.icon = 'enter-fullscreen';\r\n          props.iconPressed = 'exit-fullscreen';\r\n          break;\r\n\r\n        case 'play-large':\r\n          attributes.class += \" \".concat(this.config.classNames.control, \"--overlaid\");\r\n          type = 'play';\r\n          props.label = 'play';\r\n          props.icon = 'play';\r\n          break;\r\n\r\n        default:\r\n          if (is$1.empty(props.label)) {\r\n            props.label = type;\r\n          }\r\n\r\n          if (is$1.empty(props.icon)) {\r\n            props.icon = buttonType;\r\n          }\r\n\r\n      }\r\n\r\n      var button = createElement(props.element); // Setup toggle icon and labels\r\n\r\n      if (props.toggle) {\r\n        // Icon\r\n        button.appendChild(controls.createIcon.call(this, props.iconPressed, {\r\n          class: 'icon--pressed'\r\n        }));\r\n        button.appendChild(controls.createIcon.call(this, props.icon, {\r\n          class: 'icon--not-pressed'\r\n        })); // Label/Tooltip\r\n\r\n        button.appendChild(controls.createLabel.call(this, props.labelPressed, {\r\n          class: 'label--pressed'\r\n        }));\r\n        button.appendChild(controls.createLabel.call(this, props.label, {\r\n          class: 'label--not-pressed'\r\n        }));\r\n      } else {\r\n        button.appendChild(controls.createIcon.call(this, props.icon));\r\n        button.appendChild(controls.createLabel.call(this, props.label));\r\n      } // Merge and set attributes\r\n\r\n\r\n      extend(attributes, getAttributesFromSelector(this.config.selectors.buttons[type], attributes));\r\n      setAttributes(button, attributes); // We have multiple play buttons\r\n\r\n      if (type === 'play') {\r\n        if (!is$1.array(this.elements.buttons[type])) {\r\n          this.elements.buttons[type] = [];\r\n        }\r\n\r\n        this.elements.buttons[type].push(button);\r\n      } else {\r\n        this.elements.buttons[type] = button;\r\n      }\r\n\r\n      return button;\r\n    },\r\n    // Create an <input type='range'>\r\n    createRange: function createRange(type, attributes) {\r\n      // Seek input\r\n      var input = createElement('input', extend(getAttributesFromSelector(this.config.selectors.inputs[type]), {\r\n        type: 'range',\r\n        min: 0,\r\n        max: 100,\r\n        step: 0.01,\r\n        value: 0,\r\n        autocomplete: 'off',\r\n        // A11y fixes for https://github.com/sampotts/plyr/issues/905\r\n        role: 'slider',\r\n        'aria-label': i18n.get(type, this.config),\r\n        'aria-valuemin': 0,\r\n        'aria-valuemax': 100,\r\n        'aria-valuenow': 0\r\n      }, attributes));\r\n      this.elements.inputs[type] = input; // Set the fill for webkit now\r\n\r\n      controls.updateRangeFill.call(this, input); // Improve support on touch devices\r\n\r\n      RangeTouch.setup(input);\r\n      return input;\r\n    },\r\n    // Create a <progress>\r\n    createProgress: function createProgress(type, attributes) {\r\n      var progress = createElement('progress', extend(getAttributesFromSelector(this.config.selectors.display[type]), {\r\n        min: 0,\r\n        max: 100,\r\n        value: 0,\r\n        role: 'progressbar',\r\n        'aria-hidden': true\r\n      }, attributes)); // Create the label inside\r\n\r\n      if (type !== 'volume') {\r\n        progress.appendChild(createElement('span', null, '0'));\r\n        var suffixKey = {\r\n          played: 'played',\r\n          buffer: 'buffered'\r\n        }[type];\r\n        var suffix = suffixKey ? i18n.get(suffixKey, this.config) : '';\r\n        progress.innerText = \"% \".concat(suffix.toLowerCase());\r\n      }\r\n\r\n      this.elements.display[type] = progress;\r\n      return progress;\r\n    },\r\n    // Create time display\r\n    createTime: function createTime(type, attrs) {\r\n      var attributes = getAttributesFromSelector(this.config.selectors.display[type], attrs);\r\n      var container = createElement('div', extend(attributes, {\r\n        class: \"\".concat(attributes.class ? attributes.class : '', \" \").concat(this.config.classNames.display.time, \" \").trim(),\r\n        'aria-label': i18n.get(type, this.config)\r\n      }), '00:00'); // Reference for updates\r\n\r\n      this.elements.display[type] = container;\r\n      return container;\r\n    },\r\n    // Bind keyboard shortcuts for a menu item\r\n    // We have to bind to keyup otherwise Firefox triggers a click when a keydown event handler shifts focus\r\n    // https://bugzilla.mozilla.org/show_bug.cgi?id=1220143\r\n    bindMenuItemShortcuts: function bindMenuItemShortcuts(menuItem, type) {\r\n      var _this2 = this;\r\n\r\n      // Navigate through menus via arrow keys and space\r\n      on.call(this, menuItem, 'keydown keyup', function (event) {\r\n        // We only care about space and ⬆️ ⬇️️ ➡️\r\n        if (![32, 38, 39, 40].includes(event.which)) {\r\n          return;\r\n        } // Prevent play / seek\r\n\r\n\r\n        event.preventDefault();\r\n        event.stopPropagation(); // We're just here to prevent the keydown bubbling\r\n\r\n        if (event.type === 'keydown') {\r\n          return;\r\n        }\r\n\r\n        var isRadioButton = matches$1(menuItem, '[role=\"menuitemradio\"]'); // Show the respective menu\r\n\r\n        if (!isRadioButton && [32, 39].includes(event.which)) {\r\n          controls.showMenuPanel.call(_this2, type, true);\r\n        } else {\r\n          var target;\r\n\r\n          if (event.which !== 32) {\r\n            if (event.which === 40 || isRadioButton && event.which === 39) {\r\n              target = menuItem.nextElementSibling;\r\n\r\n              if (!is$1.element(target)) {\r\n                target = menuItem.parentNode.firstElementChild;\r\n              }\r\n            } else {\r\n              target = menuItem.previousElementSibling;\r\n\r\n              if (!is$1.element(target)) {\r\n                target = menuItem.parentNode.lastElementChild;\r\n              }\r\n            }\r\n\r\n            setFocus.call(_this2, target, true);\r\n          }\r\n        }\r\n      }, false); // Enter will fire a `click` event but we still need to manage focus\r\n      // So we bind to keyup which fires after and set focus here\r\n\r\n      on.call(this, menuItem, 'keyup', function (event) {\r\n        if (event.which !== 13) {\r\n          return;\r\n        }\r\n\r\n        controls.focusFirstMenuItem.call(_this2, null, true);\r\n      });\r\n    },\r\n    // Create a settings menu item\r\n    createMenuItem: function createMenuItem(_ref) {\r\n      var _this3 = this;\r\n\r\n      var value = _ref.value,\r\n          list = _ref.list,\r\n          type = _ref.type,\r\n          title = _ref.title,\r\n          _ref$badge = _ref.badge,\r\n          badge = _ref$badge === void 0 ? null : _ref$badge,\r\n          _ref$checked = _ref.checked,\r\n          checked = _ref$checked === void 0 ? false : _ref$checked;\r\n      var attributes = getAttributesFromSelector(this.config.selectors.inputs[type]);\r\n      var menuItem = createElement('button', extend(attributes, {\r\n        type: 'button',\r\n        role: 'menuitemradio',\r\n        class: \"\".concat(this.config.classNames.control, \" \").concat(attributes.class ? attributes.class : '').trim(),\r\n        'aria-checked': checked,\r\n        value: value\r\n      }));\r\n      var flex = createElement('span'); // We have to set as HTML incase of special characters\r\n\r\n      flex.innerHTML = title;\r\n\r\n      if (is$1.element(badge)) {\r\n        flex.appendChild(badge);\r\n      }\r\n\r\n      menuItem.appendChild(flex); // Replicate radio button behaviour\r\n\r\n      Object.defineProperty(menuItem, 'checked', {\r\n        enumerable: true,\r\n        get: function get() {\r\n          return menuItem.getAttribute('aria-checked') === 'true';\r\n        },\r\n        set: function set(check) {\r\n          // Ensure exclusivity\r\n          if (check) {\r\n            Array.from(menuItem.parentNode.children).filter(function (node) {\r\n              return matches$1(node, '[role=\"menuitemradio\"]');\r\n            }).forEach(function (node) {\r\n              return node.setAttribute('aria-checked', 'false');\r\n            });\r\n          }\r\n\r\n          menuItem.setAttribute('aria-checked', check ? 'true' : 'false');\r\n        }\r\n      });\r\n      this.listeners.bind(menuItem, 'click keyup', function (event) {\r\n        if (is$1.keyboardEvent(event) && event.which !== 32) {\r\n          return;\r\n        }\r\n\r\n        event.preventDefault();\r\n        event.stopPropagation();\r\n        menuItem.checked = true;\r\n\r\n        switch (type) {\r\n          case 'language':\r\n            _this3.currentTrack = Number(value);\r\n            break;\r\n\r\n          case 'quality':\r\n            _this3.quality = value;\r\n            break;\r\n\r\n          case 'speed':\r\n            _this3.speed = parseFloat(value);\r\n            break;\r\n        }\r\n\r\n        controls.showMenuPanel.call(_this3, 'home', is$1.keyboardEvent(event));\r\n      }, type, false);\r\n      controls.bindMenuItemShortcuts.call(this, menuItem, type);\r\n      list.appendChild(menuItem);\r\n    },\r\n    // Format a time for display\r\n    formatTime: function formatTime$1() {\r\n      var time = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;\r\n      var inverted = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\r\n\r\n      // Bail if the value isn't a number\r\n      if (!is$1.number(time)) {\r\n        return time;\r\n      } // Always display hours if duration is over an hour\r\n\r\n\r\n      var forceHours = getHours(this.duration) > 0;\r\n      return formatTime(time, forceHours, inverted);\r\n    },\r\n    // Update the displayed time\r\n    updateTimeDisplay: function updateTimeDisplay() {\r\n      var target = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;\r\n      var time = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\r\n      var inverted = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\r\n\r\n      // Bail if there's no element to display or the value isn't a number\r\n      if (!is$1.element(target) || !is$1.number(time)) {\r\n        return;\r\n      } // eslint-disable-next-line no-param-reassign\r\n\r\n\r\n      target.innerText = controls.formatTime(time, inverted);\r\n    },\r\n    // Update volume UI and storage\r\n    updateVolume: function updateVolume() {\r\n      if (!this.supported.ui) {\r\n        return;\r\n      } // Update range\r\n\r\n\r\n      if (is$1.element(this.elements.inputs.volume)) {\r\n        controls.setRange.call(this, this.elements.inputs.volume, this.muted ? 0 : this.volume);\r\n      } // Update mute state\r\n\r\n\r\n      if (is$1.element(this.elements.buttons.mute)) {\r\n        this.elements.buttons.mute.pressed = this.muted || this.volume === 0;\r\n      }\r\n    },\r\n    // Update seek value and lower fill\r\n    setRange: function setRange(target) {\r\n      var value = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\r\n\r\n      if (!is$1.element(target)) {\r\n        return;\r\n      } // eslint-disable-next-line\r\n\r\n\r\n      target.value = value; // Webkit range fill\r\n\r\n      controls.updateRangeFill.call(this, target);\r\n    },\r\n    // Update <progress> elements\r\n    updateProgress: function updateProgress(event) {\r\n      var _this4 = this;\r\n\r\n      if (!this.supported.ui || !is$1.event(event)) {\r\n        return;\r\n      }\r\n\r\n      var value = 0;\r\n\r\n      var setProgress = function setProgress(target, input) {\r\n        var val = is$1.number(input) ? input : 0;\r\n        var progress = is$1.element(target) ? target : _this4.elements.display.buffer; // Update value and label\r\n\r\n        if (is$1.element(progress)) {\r\n          progress.value = val; // Update text label inside\r\n\r\n          var label = progress.getElementsByTagName('span')[0];\r\n\r\n          if (is$1.element(label)) {\r\n            label.childNodes[0].nodeValue = val;\r\n          }\r\n        }\r\n      };\r\n\r\n      if (event) {\r\n        switch (event.type) {\r\n          // Video playing\r\n          case 'timeupdate':\r\n          case 'seeking':\r\n          case 'seeked':\r\n            value = getPercentage(this.currentTime, this.duration); // Set seek range value only if it's a 'natural' time event\r\n\r\n            if (event.type === 'timeupdate') {\r\n              controls.setRange.call(this, this.elements.inputs.seek, value);\r\n            }\r\n\r\n            break;\r\n          // Check buffer status\r\n\r\n          case 'playing':\r\n          case 'progress':\r\n            setProgress(this.elements.display.buffer, this.buffered * 100);\r\n            break;\r\n        }\r\n      }\r\n    },\r\n    // Webkit polyfill for lower fill range\r\n    updateRangeFill: function updateRangeFill(target) {\r\n      // Get range from event if event passed\r\n      var range = is$1.event(target) ? target.target : target; // Needs to be a valid <input type='range'>\r\n\r\n      if (!is$1.element(range) || range.getAttribute('type') !== 'range') {\r\n        return;\r\n      } // Set aria values for https://github.com/sampotts/plyr/issues/905\r\n\r\n\r\n      if (matches$1(range, this.config.selectors.inputs.seek)) {\r\n        range.setAttribute('aria-valuenow', this.currentTime);\r\n        var currentTime = controls.formatTime(this.currentTime);\r\n        var duration = controls.formatTime(this.duration);\r\n        var format = i18n.get('seekLabel', this.config);\r\n        range.setAttribute('aria-valuetext', format.replace('{currentTime}', currentTime).replace('{duration}', duration));\r\n      } else if (matches$1(range, this.config.selectors.inputs.volume)) {\r\n        var percent = range.value * 100;\r\n        range.setAttribute('aria-valuenow', percent);\r\n        range.setAttribute('aria-valuetext', \"\".concat(percent.toFixed(1), \"%\"));\r\n      } else {\r\n        range.setAttribute('aria-valuenow', range.value);\r\n      } // WebKit only\r\n\r\n\r\n      if (!browser.isWebkit) {\r\n        return;\r\n      } // Set CSS custom property\r\n\r\n\r\n      range.style.setProperty('--value', \"\".concat(range.value / range.max * 100, \"%\"));\r\n    },\r\n    // Update hover tooltip for seeking\r\n    updateSeekTooltip: function updateSeekTooltip(event) {\r\n      var _this5 = this;\r\n\r\n      // Bail if setting not true\r\n      if (!this.config.tooltips.seek || !is$1.element(this.elements.inputs.seek) || !is$1.element(this.elements.display.seekTooltip) || this.duration === 0) {\r\n        return;\r\n      }\r\n\r\n      var visible = \"\".concat(this.config.classNames.tooltip, \"--visible\");\r\n\r\n      var toggle = function toggle(show) {\r\n        return toggleClass(_this5.elements.display.seekTooltip, visible, show);\r\n      }; // Hide on touch\r\n\r\n\r\n      if (this.touch) {\r\n        toggle(false);\r\n        return;\r\n      } // Determine percentage, if already visible\r\n\r\n\r\n      var percent = 0;\r\n      var clientRect = this.elements.progress.getBoundingClientRect();\r\n\r\n      if (is$1.event(event)) {\r\n        percent = 100 / clientRect.width * (event.pageX - clientRect.left);\r\n      } else if (hasClass(this.elements.display.seekTooltip, visible)) {\r\n        percent = parseFloat(this.elements.display.seekTooltip.style.left, 10);\r\n      } else {\r\n        return;\r\n      } // Set bounds\r\n\r\n\r\n      if (percent < 0) {\r\n        percent = 0;\r\n      } else if (percent > 100) {\r\n        percent = 100;\r\n      } // Display the time a click would seek to\r\n\r\n\r\n      controls.updateTimeDisplay.call(this, this.elements.display.seekTooltip, this.duration / 100 * percent); // Set position\r\n\r\n      this.elements.display.seekTooltip.style.left = \"\".concat(percent, \"%\"); // Show/hide the tooltip\r\n      // If the event is a moues in/out and percentage is inside bounds\r\n\r\n      if (is$1.event(event) && ['mouseenter', 'mouseleave'].includes(event.type)) {\r\n        toggle(event.type === 'mouseenter');\r\n      }\r\n    },\r\n    // Handle time change event\r\n    timeUpdate: function timeUpdate(event) {\r\n      // Only invert if only one time element is displayed and used for both duration and currentTime\r\n      var invert = !is$1.element(this.elements.display.duration) && this.config.invertTime; // Duration\r\n\r\n      controls.updateTimeDisplay.call(this, this.elements.display.currentTime, invert ? this.duration - this.currentTime : this.currentTime, invert); // Ignore updates while seeking\r\n\r\n      if (event && event.type === 'timeupdate' && this.media.seeking) {\r\n        return;\r\n      } // Playing progress\r\n\r\n\r\n      controls.updateProgress.call(this, event);\r\n    },\r\n    // Show the duration on metadataloaded or durationchange events\r\n    durationUpdate: function durationUpdate() {\r\n      // Bail if no UI or durationchange event triggered after playing/seek when invertTime is false\r\n      if (!this.supported.ui || !this.config.invertTime && this.currentTime) {\r\n        return;\r\n      } // If duration is the 2**32 (shaka), Infinity (HLS), DASH-IF (Number.MAX_SAFE_INTEGER || Number.MAX_VALUE) indicating live we hide the currentTime and progressbar.\r\n      // https://github.com/video-dev/hls.js/blob/5820d29d3c4c8a46e8b75f1e3afa3e68c1a9a2db/src/controller/buffer-controller.js#L415\r\n      // https://github.com/google/shaka-player/blob/4d889054631f4e1cf0fbd80ddd2b71887c02e232/lib/media/streaming_engine.js#L1062\r\n      // https://github.com/Dash-Industry-Forum/dash.js/blob/69859f51b969645b234666800d4cb596d89c602d/src/dash/models/DashManifestModel.js#L338\r\n\r\n\r\n      if (this.duration >= Math.pow(2, 32)) {\r\n        toggleHidden(this.elements.display.currentTime, true);\r\n        toggleHidden(this.elements.progress, true);\r\n        return;\r\n      } // Update ARIA values\r\n\r\n\r\n      if (is$1.element(this.elements.inputs.seek)) {\r\n        this.elements.inputs.seek.setAttribute('aria-valuemax', this.duration);\r\n      } // If there's a spot to display duration\r\n\r\n\r\n      var hasDuration = is$1.element(this.elements.display.duration); // If there's only one time display, display duration there\r\n\r\n      if (!hasDuration && this.config.displayDuration && this.paused) {\r\n        controls.updateTimeDisplay.call(this, this.elements.display.currentTime, this.duration);\r\n      } // If there's a duration element, update content\r\n\r\n\r\n      if (hasDuration) {\r\n        controls.updateTimeDisplay.call(this, this.elements.display.duration, this.duration);\r\n      } // Update the tooltip (if visible)\r\n\r\n\r\n      controls.updateSeekTooltip.call(this);\r\n    },\r\n    // Hide/show a tab\r\n    toggleMenuButton: function toggleMenuButton(setting, toggle) {\r\n      toggleHidden(this.elements.settings.buttons[setting], !toggle);\r\n    },\r\n    // Update the selected setting\r\n    updateSetting: function updateSetting(setting, container, input) {\r\n      var pane = this.elements.settings.panels[setting];\r\n      var value = null;\r\n      var list = container;\r\n\r\n      if (setting === 'captions') {\r\n        value = this.currentTrack;\r\n      } else {\r\n        value = !is$1.empty(input) ? input : this[setting]; // Get default\r\n\r\n        if (is$1.empty(value)) {\r\n          value = this.config[setting].default;\r\n        } // Unsupported value\r\n\r\n\r\n        if (!is$1.empty(this.options[setting]) && !this.options[setting].includes(value)) {\r\n          this.debug.warn(\"Unsupported value of '\".concat(value, \"' for \").concat(setting));\r\n          return;\r\n        } // Disabled value\r\n\r\n\r\n        if (!this.config[setting].options.includes(value)) {\r\n          this.debug.warn(\"Disabled value of '\".concat(value, \"' for \").concat(setting));\r\n          return;\r\n        }\r\n      } // Get the list if we need to\r\n\r\n\r\n      if (!is$1.element(list)) {\r\n        list = pane && pane.querySelector('[role=\"menu\"]');\r\n      } // If there's no list it means it's not been rendered...\r\n\r\n\r\n      if (!is$1.element(list)) {\r\n        return;\r\n      } // Update the label\r\n\r\n\r\n      var label = this.elements.settings.buttons[setting].querySelector(\".\".concat(this.config.classNames.menu.value));\r\n      label.innerHTML = controls.getLabel.call(this, setting, value); // Find the radio option and check it\r\n\r\n      var target = list && list.querySelector(\"[value=\\\"\".concat(value, \"\\\"]\"));\r\n\r\n      if (is$1.element(target)) {\r\n        target.checked = true;\r\n      }\r\n    },\r\n    // Translate a value into a nice label\r\n    getLabel: function getLabel(setting, value) {\r\n      switch (setting) {\r\n        case 'speed':\r\n          return value === 1 ? i18n.get('normal', this.config) : \"\".concat(value, \"&times;\");\r\n\r\n        case 'quality':\r\n          if (is$1.number(value)) {\r\n            var label = i18n.get(\"qualityLabel.\".concat(value), this.config);\r\n\r\n            if (!label.length) {\r\n              return \"\".concat(value, \"p\");\r\n            }\r\n\r\n            return label;\r\n          }\r\n\r\n          return toTitleCase(value);\r\n\r\n        case 'captions':\r\n          return captions.getLabel.call(this);\r\n\r\n        default:\r\n          return null;\r\n      }\r\n    },\r\n    // Set the quality menu\r\n    setQualityMenu: function setQualityMenu(options) {\r\n      var _this6 = this;\r\n\r\n      // Menu required\r\n      if (!is$1.element(this.elements.settings.panels.quality)) {\r\n        return;\r\n      }\r\n\r\n      var type = 'quality';\r\n      var list = this.elements.settings.panels.quality.querySelector('[role=\"menu\"]'); // Set options if passed and filter based on uniqueness and config\r\n\r\n      if (is$1.array(options)) {\r\n        this.options.quality = dedupe(options).filter(function (quality) {\r\n          return _this6.config.quality.options.includes(quality);\r\n        });\r\n      } // Toggle the pane and tab\r\n\r\n\r\n      var toggle = !is$1.empty(this.options.quality) && this.options.quality.length > 1;\r\n      controls.toggleMenuButton.call(this, type, toggle); // Empty the menu\r\n\r\n      emptyElement(list); // Check if we need to toggle the parent\r\n\r\n      controls.checkMenu.call(this); // If we're hiding, nothing more to do\r\n\r\n      if (!toggle) {\r\n        return;\r\n      } // Get the badge HTML for HD, 4K etc\r\n\r\n\r\n      var getBadge = function getBadge(quality) {\r\n        var label = i18n.get(\"qualityBadge.\".concat(quality), _this6.config);\r\n\r\n        if (!label.length) {\r\n          return null;\r\n        }\r\n\r\n        return controls.createBadge.call(_this6, label);\r\n      }; // Sort options by the config and then render options\r\n\r\n\r\n      this.options.quality.sort(function (a, b) {\r\n        var sorting = _this6.config.quality.options;\r\n        return sorting.indexOf(a) > sorting.indexOf(b) ? 1 : -1;\r\n      }).forEach(function (quality) {\r\n        controls.createMenuItem.call(_this6, {\r\n          value: quality,\r\n          list: list,\r\n          type: type,\r\n          title: controls.getLabel.call(_this6, 'quality', quality),\r\n          badge: getBadge(quality)\r\n        });\r\n      });\r\n      controls.updateSetting.call(this, type, list);\r\n    },\r\n    // Set the looping options\r\n\r\n    /* setLoopMenu() {\r\n          // Menu required\r\n          if (!is.element(this.elements.settings.panels.loop)) {\r\n              return;\r\n          }\r\n           const options = ['start', 'end', 'all', 'reset'];\r\n          const list = this.elements.settings.panels.loop.querySelector('[role=\"menu\"]');\r\n           // Show the pane and tab\r\n          toggleHidden(this.elements.settings.buttons.loop, false);\r\n          toggleHidden(this.elements.settings.panels.loop, false);\r\n           // Toggle the pane and tab\r\n          const toggle = !is.empty(this.loop.options);\r\n          controls.toggleMenuButton.call(this, 'loop', toggle);\r\n           // Empty the menu\r\n          emptyElement(list);\r\n           options.forEach(option => {\r\n              const item = createElement('li');\r\n               const button = createElement(\r\n                  'button',\r\n                  extend(getAttributesFromSelector(this.config.selectors.buttons.loop), {\r\n                      type: 'button',\r\n                      class: this.config.classNames.control,\r\n                      'data-plyr-loop-action': option,\r\n                  }),\r\n                  i18n.get(option, this.config)\r\n              );\r\n               if (['start', 'end'].includes(option)) {\r\n                  const badge = controls.createBadge.call(this, '00:00');\r\n                  button.appendChild(badge);\r\n              }\r\n               item.appendChild(button);\r\n              list.appendChild(item);\r\n          });\r\n      }, */\r\n    // Get current selected caption language\r\n    // TODO: rework this to user the getter in the API?\r\n    // Set a list of available captions languages\r\n    setCaptionsMenu: function setCaptionsMenu() {\r\n      var _this7 = this;\r\n\r\n      // Menu required\r\n      if (!is$1.element(this.elements.settings.panels.captions)) {\r\n        return;\r\n      } // TODO: Captions or language? Currently it's mixed\r\n\r\n\r\n      var type = 'captions';\r\n      var list = this.elements.settings.panels.captions.querySelector('[role=\"menu\"]');\r\n      var tracks = captions.getTracks.call(this);\r\n      var toggle = Boolean(tracks.length); // Toggle the pane and tab\r\n\r\n      controls.toggleMenuButton.call(this, type, toggle); // Empty the menu\r\n\r\n      emptyElement(list); // Check if we need to toggle the parent\r\n\r\n      controls.checkMenu.call(this); // If there's no captions, bail\r\n\r\n      if (!toggle) {\r\n        return;\r\n      } // Generate options data\r\n\r\n\r\n      var options = tracks.map(function (track, value) {\r\n        return {\r\n          value: value,\r\n          checked: _this7.captions.toggled && _this7.currentTrack === value,\r\n          title: captions.getLabel.call(_this7, track),\r\n          badge: track.language && controls.createBadge.call(_this7, track.language.toUpperCase()),\r\n          list: list,\r\n          type: 'language'\r\n        };\r\n      }); // Add the \"Disabled\" option to turn off captions\r\n\r\n      options.unshift({\r\n        value: -1,\r\n        checked: !this.captions.toggled,\r\n        title: i18n.get('disabled', this.config),\r\n        list: list,\r\n        type: 'language'\r\n      }); // Generate options\r\n\r\n      options.forEach(controls.createMenuItem.bind(this));\r\n      controls.updateSetting.call(this, type, list);\r\n    },\r\n    // Set a list of available captions languages\r\n    setSpeedMenu: function setSpeedMenu() {\r\n      var _this8 = this;\r\n\r\n      // Menu required\r\n      if (!is$1.element(this.elements.settings.panels.speed)) {\r\n        return;\r\n      }\r\n\r\n      var type = 'speed';\r\n      var list = this.elements.settings.panels.speed.querySelector('[role=\"menu\"]'); // Filter out invalid speeds\r\n\r\n      this.options.speed = this.options.speed.filter(function (o) {\r\n        return o >= _this8.minimumSpeed && o <= _this8.maximumSpeed;\r\n      }); // Toggle the pane and tab\r\n\r\n      var toggle = !is$1.empty(this.options.speed) && this.options.speed.length > 1;\r\n      controls.toggleMenuButton.call(this, type, toggle); // Empty the menu\r\n\r\n      emptyElement(list); // Check if we need to toggle the parent\r\n\r\n      controls.checkMenu.call(this); // If we're hiding, nothing more to do\r\n\r\n      if (!toggle) {\r\n        return;\r\n      } // Create items\r\n\r\n\r\n      this.options.speed.forEach(function (speed) {\r\n        controls.createMenuItem.call(_this8, {\r\n          value: speed,\r\n          list: list,\r\n          type: type,\r\n          title: controls.getLabel.call(_this8, 'speed', speed)\r\n        });\r\n      });\r\n      controls.updateSetting.call(this, type, list);\r\n    },\r\n    // Check if we need to hide/show the settings menu\r\n    checkMenu: function checkMenu() {\r\n      var buttons = this.elements.settings.buttons;\r\n      var visible = !is$1.empty(buttons) && Object.values(buttons).some(function (button) {\r\n        return !button.hidden;\r\n      });\r\n      toggleHidden(this.elements.settings.menu, !visible);\r\n    },\r\n    // Focus the first menu item in a given (or visible) menu\r\n    focusFirstMenuItem: function focusFirstMenuItem(pane) {\r\n      var tabFocus = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\r\n\r\n      if (this.elements.settings.popup.hidden) {\r\n        return;\r\n      }\r\n\r\n      var target = pane;\r\n\r\n      if (!is$1.element(target)) {\r\n        target = Object.values(this.elements.settings.panels).find(function (p) {\r\n          return !p.hidden;\r\n        });\r\n      }\r\n\r\n      var firstItem = target.querySelector('[role^=\"menuitem\"]');\r\n      setFocus.call(this, firstItem, tabFocus);\r\n    },\r\n    // Show/hide menu\r\n    toggleMenu: function toggleMenu(input) {\r\n      var popup = this.elements.settings.popup;\r\n      var button = this.elements.buttons.settings; // Menu and button are required\r\n\r\n      if (!is$1.element(popup) || !is$1.element(button)) {\r\n        return;\r\n      } // True toggle by default\r\n\r\n\r\n      var hidden = popup.hidden;\r\n      var show = hidden;\r\n\r\n      if (is$1.boolean(input)) {\r\n        show = input;\r\n      } else if (is$1.keyboardEvent(input) && input.which === 27) {\r\n        show = false;\r\n      } else if (is$1.event(input)) {\r\n        // If Plyr is in a shadowDOM, the event target is set to the component, instead of the\r\n        // Element in the shadowDOM. The path, if available, is complete.\r\n        var target = is$1.function(input.composedPath) ? input.composedPath()[0] : input.target;\r\n        var isMenuItem = popup.contains(target); // If the click was inside the menu or if the click\r\n        // wasn't the button or menu item and we're trying to\r\n        // show the menu (a doc click shouldn't show the menu)\r\n\r\n        if (isMenuItem || !isMenuItem && input.target !== button && show) {\r\n          return;\r\n        }\r\n      } // Set button attributes\r\n\r\n\r\n      button.setAttribute('aria-expanded', show); // Show the actual popup\r\n\r\n      toggleHidden(popup, !show); // Add class hook\r\n\r\n      toggleClass(this.elements.container, this.config.classNames.menu.open, show); // Focus the first item if key interaction\r\n\r\n      if (show && is$1.keyboardEvent(input)) {\r\n        controls.focusFirstMenuItem.call(this, null, true);\r\n      } else if (!show && !hidden) {\r\n        // If closing, re-focus the button\r\n        setFocus.call(this, button, is$1.keyboardEvent(input));\r\n      }\r\n    },\r\n    // Get the natural size of a menu panel\r\n    getMenuSize: function getMenuSize(tab) {\r\n      var clone = tab.cloneNode(true);\r\n      clone.style.position = 'absolute';\r\n      clone.style.opacity = 0;\r\n      clone.removeAttribute('hidden'); // Append to parent so we get the \"real\" size\r\n\r\n      tab.parentNode.appendChild(clone); // Get the sizes before we remove\r\n\r\n      var width = clone.scrollWidth;\r\n      var height = clone.scrollHeight; // Remove from the DOM\r\n\r\n      removeElement(clone);\r\n      return {\r\n        width: width,\r\n        height: height\r\n      };\r\n    },\r\n    // Show a panel in the menu\r\n    showMenuPanel: function showMenuPanel() {\r\n      var _this9 = this;\r\n\r\n      var type = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';\r\n      var tabFocus = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\r\n      var target = this.elements.container.querySelector(\"#plyr-settings-\".concat(this.id, \"-\").concat(type)); // Nothing to show, bail\r\n\r\n      if (!is$1.element(target)) {\r\n        return;\r\n      } // Hide all other panels\r\n\r\n\r\n      var container = target.parentNode;\r\n      var current = Array.from(container.children).find(function (node) {\r\n        return !node.hidden;\r\n      }); // If we can do fancy animations, we'll animate the height/width\r\n\r\n      if (support.transitions && !support.reducedMotion) {\r\n        // Set the current width as a base\r\n        container.style.width = \"\".concat(current.scrollWidth, \"px\");\r\n        container.style.height = \"\".concat(current.scrollHeight, \"px\"); // Get potential sizes\r\n\r\n        var size = controls.getMenuSize.call(this, target); // Restore auto height/width\r\n\r\n        var restore = function restore(event) {\r\n          // We're only bothered about height and width on the container\r\n          if (event.target !== container || !['width', 'height'].includes(event.propertyName)) {\r\n            return;\r\n          } // Revert back to auto\r\n\r\n\r\n          container.style.width = '';\r\n          container.style.height = ''; // Only listen once\r\n\r\n          off.call(_this9, container, transitionEndEvent, restore);\r\n        }; // Listen for the transition finishing and restore auto height/width\r\n\r\n\r\n        on.call(this, container, transitionEndEvent, restore); // Set dimensions to target\r\n\r\n        container.style.width = \"\".concat(size.width, \"px\");\r\n        container.style.height = \"\".concat(size.height, \"px\");\r\n      } // Set attributes on current tab\r\n\r\n\r\n      toggleHidden(current, true); // Set attributes on target\r\n\r\n      toggleHidden(target, false); // Focus the first item\r\n\r\n      controls.focusFirstMenuItem.call(this, target, tabFocus);\r\n    },\r\n    // Set the download URL\r\n    setDownloadUrl: function setDownloadUrl() {\r\n      var button = this.elements.buttons.download; // Bail if no button\r\n\r\n      if (!is$1.element(button)) {\r\n        return;\r\n      } // Set attribute\r\n\r\n\r\n      button.setAttribute('href', this.download);\r\n    },\r\n    // Build the default HTML\r\n    create: function create(data) {\r\n      var _this10 = this;\r\n\r\n      var bindMenuItemShortcuts = controls.bindMenuItemShortcuts,\r\n          createButton = controls.createButton,\r\n          createProgress = controls.createProgress,\r\n          createRange = controls.createRange,\r\n          createTime = controls.createTime,\r\n          setQualityMenu = controls.setQualityMenu,\r\n          setSpeedMenu = controls.setSpeedMenu,\r\n          showMenuPanel = controls.showMenuPanel;\r\n      this.elements.controls = null; // Larger overlaid play button\r\n\r\n      if (is$1.array(this.config.controls) && this.config.controls.includes('play-large')) {\r\n        this.elements.container.appendChild(createButton.call(this, 'play-large'));\r\n      } // Create the container\r\n\r\n\r\n      var container = createElement('div', getAttributesFromSelector(this.config.selectors.controls.wrapper));\r\n      this.elements.controls = container; // Default item attributes\r\n\r\n      var defaultAttributes = {\r\n        class: 'plyr__controls__item'\r\n      }; // Loop through controls in order\r\n\r\n      dedupe(is$1.array(this.config.controls) ? this.config.controls : []).forEach(function (control) {\r\n        // Restart button\r\n        if (control === 'restart') {\r\n          container.appendChild(createButton.call(_this10, 'restart', defaultAttributes));\r\n        } // Rewind button\r\n\r\n\r\n        if (control === 'rewind') {\r\n          container.appendChild(createButton.call(_this10, 'rewind', defaultAttributes));\r\n        } // Play/Pause button\r\n\r\n\r\n        if (control === 'play') {\r\n          container.appendChild(createButton.call(_this10, 'play', defaultAttributes));\r\n        } // Fast forward button\r\n\r\n\r\n        if (control === 'fast-forward') {\r\n          container.appendChild(createButton.call(_this10, 'fast-forward', defaultAttributes));\r\n        } // Progress\r\n\r\n\r\n        if (control === 'progress') {\r\n          var progressContainer = createElement('div', {\r\n            class: \"\".concat(defaultAttributes.class, \" plyr__progress__container\")\r\n          });\r\n          var progress = createElement('div', getAttributesFromSelector(_this10.config.selectors.progress)); // Seek range slider\r\n\r\n          progress.appendChild(createRange.call(_this10, 'seek', {\r\n            id: \"plyr-seek-\".concat(data.id)\r\n          })); // Buffer progress\r\n\r\n          progress.appendChild(createProgress.call(_this10, 'buffer')); // TODO: Add loop display indicator\r\n          // Seek tooltip\r\n\r\n          if (_this10.config.tooltips.seek) {\r\n            var tooltip = createElement('span', {\r\n              class: _this10.config.classNames.tooltip\r\n            }, '00:00');\r\n            progress.appendChild(tooltip);\r\n            _this10.elements.display.seekTooltip = tooltip;\r\n          }\r\n\r\n          _this10.elements.progress = progress;\r\n          progressContainer.appendChild(_this10.elements.progress);\r\n          container.appendChild(progressContainer);\r\n        } // Media current time display\r\n\r\n\r\n        if (control === 'current-time') {\r\n          container.appendChild(createTime.call(_this10, 'currentTime', defaultAttributes));\r\n        } // Media duration display\r\n\r\n\r\n        if (control === 'duration') {\r\n          container.appendChild(createTime.call(_this10, 'duration', defaultAttributes));\r\n        } // Volume controls\r\n\r\n\r\n        if (control === 'mute' || control === 'volume') {\r\n          var volume = _this10.elements.volume; // Create the volume container if needed\r\n\r\n          if (!is$1.element(volume) || !container.contains(volume)) {\r\n            volume = createElement('div', extend({}, defaultAttributes, {\r\n              class: \"\".concat(defaultAttributes.class, \" plyr__volume\").trim()\r\n            }));\r\n            _this10.elements.volume = volume;\r\n            container.appendChild(volume);\r\n          } // Toggle mute button\r\n\r\n\r\n          if (control === 'mute') {\r\n            volume.appendChild(createButton.call(_this10, 'mute'));\r\n          } // Volume range control\r\n          // Ignored on iOS as it's handled globally\r\n          // https://developer.apple.com/library/safari/documentation/AudioVideo/Conceptual/Using_HTML5_Audio_Video/Device-SpecificConsiderations/Device-SpecificConsiderations.html\r\n\r\n\r\n          if (control === 'volume' && !browser.isIos) {\r\n            // Set the attributes\r\n            var attributes = {\r\n              max: 1,\r\n              step: 0.05,\r\n              value: _this10.config.volume\r\n            }; // Create the volume range slider\r\n\r\n            volume.appendChild(createRange.call(_this10, 'volume', extend(attributes, {\r\n              id: \"plyr-volume-\".concat(data.id)\r\n            })));\r\n          }\r\n        } // Toggle captions button\r\n\r\n\r\n        if (control === 'captions') {\r\n          container.appendChild(createButton.call(_this10, 'captions', defaultAttributes));\r\n        } // Settings button / menu\r\n\r\n\r\n        if (control === 'settings' && !is$1.empty(_this10.config.settings)) {\r\n          var wrapper = createElement('div', extend({}, defaultAttributes, {\r\n            class: \"\".concat(defaultAttributes.class, \" plyr__menu\").trim(),\r\n            hidden: ''\r\n          }));\r\n          wrapper.appendChild(createButton.call(_this10, 'settings', {\r\n            'aria-haspopup': true,\r\n            'aria-controls': \"plyr-settings-\".concat(data.id),\r\n            'aria-expanded': false\r\n          }));\r\n          var popup = createElement('div', {\r\n            class: 'plyr__menu__container',\r\n            id: \"plyr-settings-\".concat(data.id),\r\n            hidden: ''\r\n          });\r\n          var inner = createElement('div');\r\n          var home = createElement('div', {\r\n            id: \"plyr-settings-\".concat(data.id, \"-home\")\r\n          }); // Create the menu\r\n\r\n          var menu = createElement('div', {\r\n            role: 'menu'\r\n          });\r\n          home.appendChild(menu);\r\n          inner.appendChild(home);\r\n          _this10.elements.settings.panels.home = home; // Build the menu items\r\n\r\n          _this10.config.settings.forEach(function (type) {\r\n            // TODO: bundle this with the createMenuItem helper and bindings\r\n            var menuItem = createElement('button', extend(getAttributesFromSelector(_this10.config.selectors.buttons.settings), {\r\n              type: 'button',\r\n              class: \"\".concat(_this10.config.classNames.control, \" \").concat(_this10.config.classNames.control, \"--forward\"),\r\n              role: 'menuitem',\r\n              'aria-haspopup': true,\r\n              hidden: ''\r\n            })); // Bind menu shortcuts for keyboard users\r\n\r\n            bindMenuItemShortcuts.call(_this10, menuItem, type); // Show menu on click\r\n\r\n            on.call(_this10, menuItem, 'click', function () {\r\n              showMenuPanel.call(_this10, type, false);\r\n            });\r\n            var flex = createElement('span', null, i18n.get(type, _this10.config));\r\n            var value = createElement('span', {\r\n              class: _this10.config.classNames.menu.value\r\n            }); // Speed contains HTML entities\r\n\r\n            value.innerHTML = data[type];\r\n            flex.appendChild(value);\r\n            menuItem.appendChild(flex);\r\n            menu.appendChild(menuItem); // Build the panes\r\n\r\n            var pane = createElement('div', {\r\n              id: \"plyr-settings-\".concat(data.id, \"-\").concat(type),\r\n              hidden: ''\r\n            }); // Back button\r\n\r\n            var backButton = createElement('button', {\r\n              type: 'button',\r\n              class: \"\".concat(_this10.config.classNames.control, \" \").concat(_this10.config.classNames.control, \"--back\")\r\n            }); // Visible label\r\n\r\n            backButton.appendChild(createElement('span', {\r\n              'aria-hidden': true\r\n            }, i18n.get(type, _this10.config))); // Screen reader label\r\n\r\n            backButton.appendChild(createElement('span', {\r\n              class: _this10.config.classNames.hidden\r\n            }, i18n.get('menuBack', _this10.config))); // Go back via keyboard\r\n\r\n            on.call(_this10, pane, 'keydown', function (event) {\r\n              // We only care about <-\r\n              if (event.which !== 37) {\r\n                return;\r\n              } // Prevent seek\r\n\r\n\r\n              event.preventDefault();\r\n              event.stopPropagation(); // Show the respective menu\r\n\r\n              showMenuPanel.call(_this10, 'home', true);\r\n            }, false); // Go back via button click\r\n\r\n            on.call(_this10, backButton, 'click', function () {\r\n              showMenuPanel.call(_this10, 'home', false);\r\n            }); // Add to pane\r\n\r\n            pane.appendChild(backButton); // Menu\r\n\r\n            pane.appendChild(createElement('div', {\r\n              role: 'menu'\r\n            }));\r\n            inner.appendChild(pane);\r\n            _this10.elements.settings.buttons[type] = menuItem;\r\n            _this10.elements.settings.panels[type] = pane;\r\n          });\r\n\r\n          popup.appendChild(inner);\r\n          wrapper.appendChild(popup);\r\n          container.appendChild(wrapper);\r\n          _this10.elements.settings.popup = popup;\r\n          _this10.elements.settings.menu = wrapper;\r\n        } // Picture in picture button\r\n\r\n\r\n        if (control === 'pip' && support.pip) {\r\n          container.appendChild(createButton.call(_this10, 'pip', defaultAttributes));\r\n        } // Airplay button\r\n\r\n\r\n        if (control === 'airplay' && support.airplay) {\r\n          container.appendChild(createButton.call(_this10, 'airplay', defaultAttributes));\r\n        } // Download button\r\n\r\n\r\n        if (control === 'download') {\r\n          var _attributes = extend({}, defaultAttributes, {\r\n            element: 'a',\r\n            href: _this10.download,\r\n            target: '_blank'\r\n          }); // Set download attribute for HTML5 only\r\n\r\n\r\n          if (_this10.isHTML5) {\r\n            _attributes.download = '';\r\n          }\r\n\r\n          var download = _this10.config.urls.download;\r\n\r\n          if (!is$1.url(download) && _this10.isEmbed) {\r\n            extend(_attributes, {\r\n              icon: \"logo-\".concat(_this10.provider),\r\n              label: _this10.provider\r\n            });\r\n          }\r\n\r\n          container.appendChild(createButton.call(_this10, 'download', _attributes));\r\n        } // Toggle fullscreen button\r\n\r\n\r\n        if (control === 'fullscreen') {\r\n          container.appendChild(createButton.call(_this10, 'fullscreen', defaultAttributes));\r\n        }\r\n      }); // Set available quality levels\r\n\r\n      if (this.isHTML5) {\r\n        setQualityMenu.call(this, html5.getQualityOptions.call(this));\r\n      }\r\n\r\n      setSpeedMenu.call(this);\r\n      return container;\r\n    },\r\n    // Insert controls\r\n    inject: function inject() {\r\n      var _this11 = this;\r\n\r\n      // Sprite\r\n      if (this.config.loadSprite) {\r\n        var icon = controls.getIconUrl.call(this); // Only load external sprite using AJAX\r\n\r\n        if (icon.cors) {\r\n          loadSprite(icon.url, 'sprite-plyr');\r\n        }\r\n      } // Create a unique ID\r\n\r\n\r\n      this.id = Math.floor(Math.random() * 10000); // Null by default\r\n\r\n      var container = null;\r\n      this.elements.controls = null; // Set template properties\r\n\r\n      var props = {\r\n        id: this.id,\r\n        seektime: this.config.seekTime,\r\n        title: this.config.title\r\n      };\r\n      var update = true; // If function, run it and use output\r\n\r\n      if (is$1.function(this.config.controls)) {\r\n        this.config.controls = this.config.controls.call(this, props);\r\n      } // Convert falsy controls to empty array (primarily for empty strings)\r\n\r\n\r\n      if (!this.config.controls) {\r\n        this.config.controls = [];\r\n      }\r\n\r\n      if (is$1.element(this.config.controls) || is$1.string(this.config.controls)) {\r\n        // HTMLElement or Non-empty string passed as the option\r\n        container = this.config.controls;\r\n      } else {\r\n        // Create controls\r\n        container = controls.create.call(this, {\r\n          id: this.id,\r\n          seektime: this.config.seekTime,\r\n          speed: this.speed,\r\n          quality: this.quality,\r\n          captions: captions.getLabel.call(this) // TODO: Looping\r\n          // loop: 'None',\r\n\r\n        });\r\n        update = false;\r\n      } // Replace props with their value\r\n\r\n\r\n      var replace = function replace(input) {\r\n        var result = input;\r\n        Object.entries(props).forEach(function (_ref2) {\r\n          var _ref3 = _slicedToArray(_ref2, 2),\r\n              key = _ref3[0],\r\n              value = _ref3[1];\r\n\r\n          result = replaceAll(result, \"{\".concat(key, \"}\"), value);\r\n        });\r\n        return result;\r\n      }; // Update markup\r\n\r\n\r\n      if (update) {\r\n        if (is$1.string(this.config.controls)) {\r\n          container = replace(container);\r\n        }\r\n      } // Controls container\r\n\r\n\r\n      var target; // Inject to custom location\r\n\r\n      if (is$1.string(this.config.selectors.controls.container)) {\r\n        target = document.querySelector(this.config.selectors.controls.container);\r\n      } // Inject into the container by default\r\n\r\n\r\n      if (!is$1.element(target)) {\r\n        target = this.elements.container;\r\n      } // Inject controls HTML (needs to be before captions, hence \"afterbegin\")\r\n\r\n\r\n      var insertMethod = is$1.element(container) ? 'insertAdjacentElement' : 'insertAdjacentHTML';\r\n      target[insertMethod]('afterbegin', container); // Find the elements if need be\r\n\r\n      if (!is$1.element(this.elements.controls)) {\r\n        controls.findElements.call(this);\r\n      } // Add pressed property to buttons\r\n\r\n\r\n      if (!is$1.empty(this.elements.buttons)) {\r\n        var addProperty = function addProperty(button) {\r\n          var className = _this11.config.classNames.controlPressed;\r\n          Object.defineProperty(button, 'pressed', {\r\n            enumerable: true,\r\n            get: function get() {\r\n              return hasClass(button, className);\r\n            },\r\n            set: function set() {\r\n              var pressed = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\r\n              toggleClass(button, className, pressed);\r\n            }\r\n          });\r\n        }; // Toggle classname when pressed property is set\r\n\r\n\r\n        Object.values(this.elements.buttons).filter(Boolean).forEach(function (button) {\r\n          if (is$1.array(button) || is$1.nodeList(button)) {\r\n            Array.from(button).filter(Boolean).forEach(addProperty);\r\n          } else {\r\n            addProperty(button);\r\n          }\r\n        });\r\n      } // Edge sometimes doesn't finish the paint so force a repaint\r\n\r\n\r\n      if (browser.isEdge) {\r\n        repaint(target);\r\n      } // Setup tooltips\r\n\r\n\r\n      if (this.config.tooltips.controls) {\r\n        var _this$config = this.config,\r\n            classNames = _this$config.classNames,\r\n            selectors = _this$config.selectors;\r\n        var selector = \"\".concat(selectors.controls.wrapper, \" \").concat(selectors.labels, \" .\").concat(classNames.hidden);\r\n        var labels = getElements.call(this, selector);\r\n        Array.from(labels).forEach(function (label) {\r\n          toggleClass(label, _this11.config.classNames.hidden, false);\r\n          toggleClass(label, _this11.config.classNames.tooltip, true);\r\n        });\r\n      }\r\n    }\r\n  };\r\n\r\n  /**\r\n   * Parse a string to a URL object\r\n   * @param {String} input - the URL to be parsed\r\n   * @param {Boolean} safe - failsafe parsing\r\n   */\r\n\r\n  function parseUrl(input) {\r\n    var safe = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\r\n    var url = input;\r\n\r\n    if (safe) {\r\n      var parser = document.createElement('a');\r\n      parser.href = url;\r\n      url = parser.href;\r\n    }\r\n\r\n    try {\r\n      return new URL(url);\r\n    } catch (e) {\r\n      return null;\r\n    }\r\n  } // Convert object to URLSearchParams\r\n\r\n  function buildUrlParams(input) {\r\n    var params = new URLSearchParams();\r\n\r\n    if (is$1.object(input)) {\r\n      Object.entries(input).forEach(function (_ref) {\r\n        var _ref2 = _slicedToArray(_ref, 2),\r\n            key = _ref2[0],\r\n            value = _ref2[1];\r\n\r\n        params.set(key, value);\r\n      });\r\n    }\r\n\r\n    return params;\r\n  }\r\n\r\n  var captions = {\r\n    // Setup captions\r\n    setup: function setup() {\r\n      // Requires UI support\r\n      if (!this.supported.ui) {\r\n        return;\r\n      } // Only Vimeo and HTML5 video supported at this point\r\n\r\n\r\n      if (!this.isVideo || this.isYouTube || this.isHTML5 && !support.textTracks) {\r\n        // Clear menu and hide\r\n        if (is$1.array(this.config.controls) && this.config.controls.includes('settings') && this.config.settings.includes('captions')) {\r\n          controls.setCaptionsMenu.call(this);\r\n        }\r\n\r\n        return;\r\n      } // Inject the container\r\n\r\n\r\n      if (!is$1.element(this.elements.captions)) {\r\n        this.elements.captions = createElement('div', getAttributesFromSelector(this.config.selectors.captions));\r\n        insertAfter(this.elements.captions, this.elements.wrapper);\r\n      } // Fix IE captions if CORS is used\r\n      // Fetch captions and inject as blobs instead (data URIs not supported!)\r\n\r\n\r\n      if (browser.isIE && window.URL) {\r\n        var elements = this.media.querySelectorAll('track');\r\n        Array.from(elements).forEach(function (track) {\r\n          var src = track.getAttribute('src');\r\n          var url = parseUrl(src);\r\n\r\n          if (url !== null && url.hostname !== window.location.href.hostname && ['http:', 'https:'].includes(url.protocol)) {\r\n            fetch(src, 'blob').then(function (blob) {\r\n              track.setAttribute('src', window.URL.createObjectURL(blob));\r\n            }).catch(function () {\r\n              removeElement(track);\r\n            });\r\n          }\r\n        });\r\n      } // Get and set initial data\r\n      // The \"preferred\" options are not realized unless / until the wanted language has a match\r\n      // * languages: Array of user's browser languages.\r\n      // * language:  The language preferred by user settings or config\r\n      // * active:    The state preferred by user settings or config\r\n      // * toggled:   The real captions state\r\n\r\n\r\n      var browserLanguages = navigator.languages || [navigator.language || navigator.userLanguage || 'en'];\r\n      var languages = dedupe(browserLanguages.map(function (language) {\r\n        return language.split('-')[0];\r\n      }));\r\n      var language = (this.storage.get('language') || this.config.captions.language || 'auto').toLowerCase(); // Use first browser language when language is 'auto'\r\n\r\n      if (language === 'auto') {\r\n        var _languages = _slicedToArray(languages, 1);\r\n\r\n        language = _languages[0];\r\n      }\r\n\r\n      var active = this.storage.get('captions');\r\n\r\n      if (!is$1.boolean(active)) {\r\n        active = this.config.captions.active;\r\n      }\r\n\r\n      Object.assign(this.captions, {\r\n        toggled: false,\r\n        active: active,\r\n        language: language,\r\n        languages: languages\r\n      }); // Watch changes to textTracks and update captions menu\r\n\r\n      if (this.isHTML5) {\r\n        var trackEvents = this.config.captions.update ? 'addtrack removetrack' : 'removetrack';\r\n        on.call(this, this.media.textTracks, trackEvents, captions.update.bind(this));\r\n      } // Update available languages in list next tick (the event must not be triggered before the listeners)\r\n\r\n\r\n      setTimeout(captions.update.bind(this), 0);\r\n    },\r\n    // Update available language options in settings based on tracks\r\n    update: function update() {\r\n      var _this = this;\r\n\r\n      var tracks = captions.getTracks.call(this, true); // Get the wanted language\r\n\r\n      var _this$captions = this.captions,\r\n          active = _this$captions.active,\r\n          language = _this$captions.language,\r\n          meta = _this$captions.meta,\r\n          currentTrackNode = _this$captions.currentTrackNode;\r\n      var languageExists = Boolean(tracks.find(function (track) {\r\n        return track.language === language;\r\n      })); // Handle tracks (add event listener and \"pseudo\"-default)\r\n\r\n      if (this.isHTML5 && this.isVideo) {\r\n        tracks.filter(function (track) {\r\n          return !meta.get(track);\r\n        }).forEach(function (track) {\r\n          _this.debug.log('Track added', track); // Attempt to store if the original dom element was \"default\"\r\n\r\n\r\n          meta.set(track, {\r\n            default: track.mode === 'showing'\r\n          }); // Turn off native caption rendering to avoid double captions\r\n          // Note: mode='hidden' forces a track to download. To ensure every track\r\n          // isn't downloaded at once, only 'showing' tracks should be reassigned\r\n          // eslint-disable-next-line no-param-reassign\r\n\r\n          if (track.mode === 'showing') {\r\n            // eslint-disable-next-line no-param-reassign\r\n            track.mode = 'hidden';\r\n          } // Add event listener for cue changes\r\n\r\n\r\n          on.call(_this, track, 'cuechange', function () {\r\n            return captions.updateCues.call(_this);\r\n          });\r\n        });\r\n      } // Update language first time it matches, or if the previous matching track was removed\r\n\r\n\r\n      if (languageExists && this.language !== language || !tracks.includes(currentTrackNode)) {\r\n        captions.setLanguage.call(this, language);\r\n        captions.toggle.call(this, active && languageExists);\r\n      } // Enable or disable captions based on track length\r\n\r\n\r\n      toggleClass(this.elements.container, this.config.classNames.captions.enabled, !is$1.empty(tracks)); // Update available languages in list\r\n\r\n      if (is$1.array(this.config.controls) && this.config.controls.includes('settings') && this.config.settings.includes('captions')) {\r\n        controls.setCaptionsMenu.call(this);\r\n      }\r\n    },\r\n    // Toggle captions display\r\n    // Used internally for the toggleCaptions method, with the passive option forced to false\r\n    toggle: function toggle(input) {\r\n      var _this2 = this;\r\n\r\n      var passive = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\r\n\r\n      // If there's no full support\r\n      if (!this.supported.ui) {\r\n        return;\r\n      }\r\n\r\n      var toggled = this.captions.toggled; // Current state\r\n\r\n      var activeClass = this.config.classNames.captions.active; // Get the next state\r\n      // If the method is called without parameter, toggle based on current value\r\n\r\n      var active = is$1.nullOrUndefined(input) ? !toggled : input; // Update state and trigger event\r\n\r\n      if (active !== toggled) {\r\n        // When passive, don't override user preferences\r\n        if (!passive) {\r\n          this.captions.active = active;\r\n          this.storage.set({\r\n            captions: active\r\n          });\r\n        } // Force language if the call isn't passive and there is no matching language to toggle to\r\n\r\n\r\n        if (!this.language && active && !passive) {\r\n          var tracks = captions.getTracks.call(this);\r\n          var track = captions.findTrack.call(this, [this.captions.language].concat(_toConsumableArray(this.captions.languages)), true); // Override user preferences to avoid switching languages if a matching track is added\r\n\r\n          this.captions.language = track.language; // Set caption, but don't store in localStorage as user preference\r\n\r\n          captions.set.call(this, tracks.indexOf(track));\r\n          return;\r\n        } // Toggle button if it's enabled\r\n\r\n\r\n        if (this.elements.buttons.captions) {\r\n          this.elements.buttons.captions.pressed = active;\r\n        } // Add class hook\r\n\r\n\r\n        toggleClass(this.elements.container, activeClass, active);\r\n        this.captions.toggled = active; // Update settings menu\r\n\r\n        controls.updateSetting.call(this, 'captions'); // Trigger event (not used internally)\r\n\r\n        triggerEvent.call(this, this.media, active ? 'captionsenabled' : 'captionsdisabled');\r\n      } // Wait for the call stack to clear before setting mode='hidden'\r\n      // on the active track - forcing the browser to download it\r\n\r\n\r\n      setTimeout(function () {\r\n        if (active && _this2.captions.toggled) {\r\n          _this2.captions.currentTrackNode.mode = 'hidden';\r\n        }\r\n      });\r\n    },\r\n    // Set captions by track index\r\n    // Used internally for the currentTrack setter with the passive option forced to false\r\n    set: function set(index) {\r\n      var passive = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\r\n      var tracks = captions.getTracks.call(this); // Disable captions if setting to -1\r\n\r\n      if (index === -1) {\r\n        captions.toggle.call(this, false, passive);\r\n        return;\r\n      }\r\n\r\n      if (!is$1.number(index)) {\r\n        this.debug.warn('Invalid caption argument', index);\r\n        return;\r\n      }\r\n\r\n      if (!(index in tracks)) {\r\n        this.debug.warn('Track not found', index);\r\n        return;\r\n      }\r\n\r\n      if (this.captions.currentTrack !== index) {\r\n        this.captions.currentTrack = index;\r\n        var track = tracks[index];\r\n\r\n        var _ref = track || {},\r\n            language = _ref.language; // Store reference to node for invalidation on remove\r\n\r\n\r\n        this.captions.currentTrackNode = track; // Update settings menu\r\n\r\n        controls.updateSetting.call(this, 'captions'); // When passive, don't override user preferences\r\n\r\n        if (!passive) {\r\n          this.captions.language = language;\r\n          this.storage.set({\r\n            language: language\r\n          });\r\n        } // Handle Vimeo captions\r\n\r\n\r\n        if (this.isVimeo) {\r\n          this.embed.enableTextTrack(language);\r\n        } // Trigger event\r\n\r\n\r\n        triggerEvent.call(this, this.media, 'languagechange');\r\n      } // Show captions\r\n\r\n\r\n      captions.toggle.call(this, true, passive);\r\n\r\n      if (this.isHTML5 && this.isVideo) {\r\n        // If we change the active track while a cue is already displayed we need to update it\r\n        captions.updateCues.call(this);\r\n      }\r\n    },\r\n    // Set captions by language\r\n    // Used internally for the language setter with the passive option forced to false\r\n    setLanguage: function setLanguage(input) {\r\n      var passive = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\r\n\r\n      if (!is$1.string(input)) {\r\n        this.debug.warn('Invalid language argument', input);\r\n        return;\r\n      } // Normalize\r\n\r\n\r\n      var language = input.toLowerCase();\r\n      this.captions.language = language; // Set currentTrack\r\n\r\n      var tracks = captions.getTracks.call(this);\r\n      var track = captions.findTrack.call(this, [language]);\r\n      captions.set.call(this, tracks.indexOf(track), passive);\r\n    },\r\n    // Get current valid caption tracks\r\n    // If update is false it will also ignore tracks without metadata\r\n    // This is used to \"freeze\" the language options when captions.update is false\r\n    getTracks: function getTracks() {\r\n      var _this3 = this;\r\n\r\n      var update = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\r\n      // Handle media or textTracks missing or null\r\n      var tracks = Array.from((this.media || {}).textTracks || []); // For HTML5, use cache instead of current tracks when it exists (if captions.update is false)\r\n      // Filter out removed tracks and tracks that aren't captions/subtitles (for example metadata)\r\n\r\n      return tracks.filter(function (track) {\r\n        return !_this3.isHTML5 || update || _this3.captions.meta.has(track);\r\n      }).filter(function (track) {\r\n        return ['captions', 'subtitles'].includes(track.kind);\r\n      });\r\n    },\r\n    // Match tracks based on languages and get the first\r\n    findTrack: function findTrack(languages) {\r\n      var _this4 = this;\r\n\r\n      var force = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\r\n      var tracks = captions.getTracks.call(this);\r\n\r\n      var sortIsDefault = function sortIsDefault(track) {\r\n        return Number((_this4.captions.meta.get(track) || {}).default);\r\n      };\r\n\r\n      var sorted = Array.from(tracks).sort(function (a, b) {\r\n        return sortIsDefault(b) - sortIsDefault(a);\r\n      });\r\n      var track;\r\n      languages.every(function (language) {\r\n        track = sorted.find(function (t) {\r\n          return t.language === language;\r\n        });\r\n        return !track; // Break iteration if there is a match\r\n      }); // If no match is found but is required, get first\r\n\r\n      return track || (force ? sorted[0] : undefined);\r\n    },\r\n    // Get the current track\r\n    getCurrentTrack: function getCurrentTrack() {\r\n      return captions.getTracks.call(this)[this.currentTrack];\r\n    },\r\n    // Get UI label for track\r\n    getLabel: function getLabel(track) {\r\n      var currentTrack = track;\r\n\r\n      if (!is$1.track(currentTrack) && support.textTracks && this.captions.toggled) {\r\n        currentTrack = captions.getCurrentTrack.call(this);\r\n      }\r\n\r\n      if (is$1.track(currentTrack)) {\r\n        if (!is$1.empty(currentTrack.label)) {\r\n          return currentTrack.label;\r\n        }\r\n\r\n        if (!is$1.empty(currentTrack.language)) {\r\n          return track.language.toUpperCase();\r\n        }\r\n\r\n        return i18n.get('enabled', this.config);\r\n      }\r\n\r\n      return i18n.get('disabled', this.config);\r\n    },\r\n    // Update captions using current track's active cues\r\n    // Also optional array argument in case there isn't any track (ex: vimeo)\r\n    updateCues: function updateCues(input) {\r\n      // Requires UI\r\n      if (!this.supported.ui) {\r\n        return;\r\n      }\r\n\r\n      if (!is$1.element(this.elements.captions)) {\r\n        this.debug.warn('No captions element to render to');\r\n        return;\r\n      } // Only accept array or empty input\r\n\r\n\r\n      if (!is$1.nullOrUndefined(input) && !Array.isArray(input)) {\r\n        this.debug.warn('updateCues: Invalid input', input);\r\n        return;\r\n      }\r\n\r\n      var cues = input; // Get cues from track\r\n\r\n      if (!cues) {\r\n        var track = captions.getCurrentTrack.call(this);\r\n        cues = Array.from((track || {}).activeCues || []).map(function (cue) {\r\n          return cue.getCueAsHTML();\r\n        }).map(getHTML);\r\n      } // Set new caption text\r\n\r\n\r\n      var content = cues.map(function (cueText) {\r\n        return cueText.trim();\r\n      }).join('\\n');\r\n      var changed = content !== this.elements.captions.innerHTML;\r\n\r\n      if (changed) {\r\n        // Empty the container and create a new child element\r\n        emptyElement(this.elements.captions);\r\n        var caption = createElement('span', getAttributesFromSelector(this.config.selectors.caption));\r\n        caption.innerHTML = content;\r\n        this.elements.captions.appendChild(caption); // Trigger event\r\n\r\n        triggerEvent.call(this, this.media, 'cuechange');\r\n      }\r\n    }\r\n  };\r\n\r\n  // ==========================================================================\r\n  // Plyr default config\r\n  // ==========================================================================\r\n  var defaults$1 = {\r\n    // Disable\r\n    enabled: true,\r\n    // Custom media title\r\n    title: '',\r\n    // Logging to console\r\n    debug: false,\r\n    // Auto play (if supported)\r\n    autoplay: false,\r\n    // Only allow one media playing at once (vimeo only)\r\n    autopause: true,\r\n    // Allow inline playback on iOS (this effects YouTube/Vimeo - HTML5 requires the attribute present)\r\n    // TODO: Remove iosNative fullscreen option in favour of this (logic needs work)\r\n    playsinline: true,\r\n    // Default time to skip when rewind/fast forward\r\n    seekTime: 10,\r\n    // Default volume\r\n    volume: 1,\r\n    muted: false,\r\n    // Pass a custom duration\r\n    duration: null,\r\n    // Display the media duration on load in the current time position\r\n    // If you have opted to display both duration and currentTime, this is ignored\r\n    displayDuration: true,\r\n    // Invert the current time to be a countdown\r\n    invertTime: true,\r\n    // Clicking the currentTime inverts it's value to show time left rather than elapsed\r\n    toggleInvert: true,\r\n    // Force an aspect ratio\r\n    // The format must be `'w:h'` (e.g. `'16:9'`)\r\n    ratio: null,\r\n    // Click video container to play/pause\r\n    clickToPlay: true,\r\n    // Auto hide the controls\r\n    hideControls: true,\r\n    // Reset to start when playback ended\r\n    resetOnEnd: false,\r\n    // Disable the standard context menu\r\n    disableContextMenu: true,\r\n    // Sprite (for icons)\r\n    loadSprite: true,\r\n    iconPrefix: 'plyr',\r\n    iconUrl: 'https://cdn.plyr.io/3.6.2/plyr.svg',\r\n    // Blank video (used to prevent errors on source change)\r\n    blankVideo: 'https://cdn.plyr.io/static/blank.mp4',\r\n    // Quality default\r\n    quality: {\r\n      default: 576,\r\n      // The options to display in the UI, if available for the source media\r\n      options: [4320, 2880, 2160, 1440, 1080, 720, 576, 480, 360, 240],\r\n      forced: false,\r\n      onChange: null\r\n    },\r\n    // Set loops\r\n    loop: {\r\n      active: false // start: null,\r\n      // end: null,\r\n\r\n    },\r\n    // Speed default and options to display\r\n    speed: {\r\n      selected: 1,\r\n      // The options to display in the UI, if available for the source media (e.g. Vimeo and YouTube only support 0.5x-4x)\r\n      options: [0.5, 0.75, 1, 1.25, 1.5, 1.75, 2, 4]\r\n    },\r\n    // Keyboard shortcut settings\r\n    keyboard: {\r\n      focused: true,\r\n      global: false\r\n    },\r\n    // Display tooltips\r\n    tooltips: {\r\n      controls: false,\r\n      seek: true\r\n    },\r\n    // Captions settings\r\n    captions: {\r\n      active: false,\r\n      language: 'auto',\r\n      // Listen to new tracks added after Plyr is initialized.\r\n      // This is needed for streaming captions, but may result in unselectable options\r\n      update: false\r\n    },\r\n    // Fullscreen settings\r\n    fullscreen: {\r\n      enabled: true,\r\n      // Allow fullscreen?\r\n      fallback: true,\r\n      // Fallback using full viewport/window\r\n      iosNative: false // Use the native fullscreen in iOS (disables custom controls)\r\n      // Selector for the fullscreen container so contextual / non-player content can remain visible in fullscreen mode\r\n      // Non-ancestors of the player element will be ignored\r\n      // container: null, // defaults to the player element\r\n\r\n    },\r\n    // Local storage\r\n    storage: {\r\n      enabled: true,\r\n      key: 'plyr'\r\n    },\r\n    // Default controls\r\n    controls: ['play-large', // 'restart',\r\n    // 'rewind',\r\n    'play', // 'fast-forward',\r\n    'progress', 'current-time', // 'duration',\r\n    'mute', 'volume', 'captions', 'settings', 'pip', 'airplay', // 'download',\r\n    'fullscreen'],\r\n    settings: ['captions', 'quality', 'speed'],\r\n    // Localisation\r\n    i18n: {\r\n      restart: 'Restart',\r\n      rewind: 'Rewind {seektime}s',\r\n      play: 'Play',\r\n      pause: 'Pause',\r\n      fastForward: 'Forward {seektime}s',\r\n      seek: 'Seek',\r\n      seekLabel: '{currentTime} of {duration}',\r\n      played: 'Played',\r\n      buffered: 'Buffered',\r\n      currentTime: 'Current time',\r\n      duration: 'Duration',\r\n      volume: 'Volume',\r\n      mute: 'Mute',\r\n      unmute: 'Unmute',\r\n      enableCaptions: 'Enable captions',\r\n      disableCaptions: 'Disable captions',\r\n      download: 'Download',\r\n      enterFullscreen: 'Enter fullscreen',\r\n      exitFullscreen: 'Exit fullscreen',\r\n      frameTitle: 'Player for {title}',\r\n      captions: 'Captions',\r\n      settings: 'Settings',\r\n      pip: 'PIP',\r\n      menuBack: 'Go back to previous menu',\r\n      speed: 'Speed',\r\n      normal: 'Normal',\r\n      quality: 'Quality',\r\n      loop: 'Loop',\r\n      start: 'Start',\r\n      end: 'End',\r\n      all: 'All',\r\n      reset: 'Reset',\r\n      disabled: 'Disabled',\r\n      enabled: 'Enabled',\r\n      advertisement: 'Ad',\r\n      qualityBadge: {\r\n        2160: '4K',\r\n        1440: 'HD',\r\n        1080: 'HD',\r\n        720: 'HD',\r\n        576: 'SD',\r\n        480: 'SD'\r\n      }\r\n    },\r\n    // URLs\r\n    urls: {\r\n      download: null,\r\n      vimeo: {\r\n        sdk: 'https://player.vimeo.com/api/player.js',\r\n        iframe: 'https://player.vimeo.com/video/{0}?{1}',\r\n        api: 'https://vimeo.com/api/v2/video/{0}.json'\r\n      },\r\n      youtube: {\r\n        sdk: 'https://www.youtube.com/iframe_api',\r\n        api: 'https://noembed.com/embed?url=https://www.youtube.com/watch?v={0}'\r\n      },\r\n      googleIMA: {\r\n        sdk: 'https://imasdk.googleapis.com/js/sdkloader/ima3.js'\r\n      }\r\n    },\r\n    // Custom control listeners\r\n    listeners: {\r\n      seek: null,\r\n      play: null,\r\n      pause: null,\r\n      restart: null,\r\n      rewind: null,\r\n      fastForward: null,\r\n      mute: null,\r\n      volume: null,\r\n      captions: null,\r\n      download: null,\r\n      fullscreen: null,\r\n      pip: null,\r\n      airplay: null,\r\n      speed: null,\r\n      quality: null,\r\n      loop: null,\r\n      language: null\r\n    },\r\n    // Events to watch and bubble\r\n    events: [// Events to watch on HTML5 media elements and bubble\r\n    // https://developer.mozilla.org/en/docs/Web/Guide/Events/Media_events\r\n    'ended', 'progress', 'stalled', 'playing', 'waiting', 'canplay', 'canplaythrough', 'loadstart', 'loadeddata', 'loadedmetadata', 'timeupdate', 'volumechange', 'play', 'pause', 'error', 'seeking', 'seeked', 'emptied', 'ratechange', 'cuechange', // Custom events\r\n    'download', 'enterfullscreen', 'exitfullscreen', 'captionsenabled', 'captionsdisabled', 'languagechange', 'controlshidden', 'controlsshown', 'ready', // YouTube\r\n    'statechange', // Quality\r\n    'qualitychange', // Ads\r\n    'adsloaded', 'adscontentpause', 'adscontentresume', 'adstarted', 'adsmidpoint', 'adscomplete', 'adsallcomplete', 'adsimpression', 'adsclick'],\r\n    // Selectors\r\n    // Change these to match your template if using custom HTML\r\n    selectors: {\r\n      editable: 'input, textarea, select, [contenteditable]',\r\n      container: '.plyr',\r\n      controls: {\r\n        container: null,\r\n        wrapper: '.plyr__controls'\r\n      },\r\n      labels: '[data-plyr]',\r\n      buttons: {\r\n        play: '[data-plyr=\"play\"]',\r\n        pause: '[data-plyr=\"pause\"]',\r\n        restart: '[data-plyr=\"restart\"]',\r\n        rewind: '[data-plyr=\"rewind\"]',\r\n        fastForward: '[data-plyr=\"fast-forward\"]',\r\n        mute: '[data-plyr=\"mute\"]',\r\n        captions: '[data-plyr=\"captions\"]',\r\n        download: '[data-plyr=\"download\"]',\r\n        fullscreen: '[data-plyr=\"fullscreen\"]',\r\n        pip: '[data-plyr=\"pip\"]',\r\n        airplay: '[data-plyr=\"airplay\"]',\r\n        settings: '[data-plyr=\"settings\"]',\r\n        loop: '[data-plyr=\"loop\"]'\r\n      },\r\n      inputs: {\r\n        seek: '[data-plyr=\"seek\"]',\r\n        volume: '[data-plyr=\"volume\"]',\r\n        speed: '[data-plyr=\"speed\"]',\r\n        language: '[data-plyr=\"language\"]',\r\n        quality: '[data-plyr=\"quality\"]'\r\n      },\r\n      display: {\r\n        currentTime: '.plyr__time--current',\r\n        duration: '.plyr__time--duration',\r\n        buffer: '.plyr__progress__buffer',\r\n        loop: '.plyr__progress__loop',\r\n        // Used later\r\n        volume: '.plyr__volume--display'\r\n      },\r\n      progress: '.plyr__progress',\r\n      captions: '.plyr__captions',\r\n      caption: '.plyr__caption'\r\n    },\r\n    // Class hooks added to the player in different states\r\n    classNames: {\r\n      type: 'plyr--{0}',\r\n      provider: 'plyr--{0}',\r\n      video: 'plyr__video-wrapper',\r\n      embed: 'plyr__video-embed',\r\n      videoFixedRatio: 'plyr__video-wrapper--fixed-ratio',\r\n      embedContainer: 'plyr__video-embed__container',\r\n      poster: 'plyr__poster',\r\n      posterEnabled: 'plyr__poster-enabled',\r\n      ads: 'plyr__ads',\r\n      control: 'plyr__control',\r\n      controlPressed: 'plyr__control--pressed',\r\n      playing: 'plyr--playing',\r\n      paused: 'plyr--paused',\r\n      stopped: 'plyr--stopped',\r\n      loading: 'plyr--loading',\r\n      hover: 'plyr--hover',\r\n      tooltip: 'plyr__tooltip',\r\n      cues: 'plyr__cues',\r\n      hidden: 'plyr__sr-only',\r\n      hideControls: 'plyr--hide-controls',\r\n      isIos: 'plyr--is-ios',\r\n      isTouch: 'plyr--is-touch',\r\n      uiSupported: 'plyr--full-ui',\r\n      noTransition: 'plyr--no-transition',\r\n      display: {\r\n        time: 'plyr__time'\r\n      },\r\n      menu: {\r\n        value: 'plyr__menu__value',\r\n        badge: 'plyr__badge',\r\n        open: 'plyr--menu-open'\r\n      },\r\n      captions: {\r\n        enabled: 'plyr--captions-enabled',\r\n        active: 'plyr--captions-active'\r\n      },\r\n      fullscreen: {\r\n        enabled: 'plyr--fullscreen-enabled',\r\n        fallback: 'plyr--fullscreen-fallback'\r\n      },\r\n      pip: {\r\n        supported: 'plyr--pip-supported',\r\n        active: 'plyr--pip-active'\r\n      },\r\n      airplay: {\r\n        supported: 'plyr--airplay-supported',\r\n        active: 'plyr--airplay-active'\r\n      },\r\n      tabFocus: 'plyr__tab-focus',\r\n      previewThumbnails: {\r\n        // Tooltip thumbs\r\n        thumbContainer: 'plyr__preview-thumb',\r\n        thumbContainerShown: 'plyr__preview-thumb--is-shown',\r\n        imageContainer: 'plyr__preview-thumb__image-container',\r\n        timeContainer: 'plyr__preview-thumb__time-container',\r\n        // Scrubbing\r\n        scrubbingContainer: 'plyr__preview-scrubbing',\r\n        scrubbingContainerShown: 'plyr__preview-scrubbing--is-shown'\r\n      }\r\n    },\r\n    // Embed attributes\r\n    attributes: {\r\n      embed: {\r\n        provider: 'data-plyr-provider',\r\n        id: 'data-plyr-embed-id'\r\n      }\r\n    },\r\n    // Advertisements plugin\r\n    // Register for an account here: http://vi.ai/publisher-video-monetization/?aid=plyrio\r\n    ads: {\r\n      enabled: false,\r\n      publisherId: '',\r\n      tagUrl: ''\r\n    },\r\n    // Preview Thumbnails plugin\r\n    previewThumbnails: {\r\n      enabled: false,\r\n      src: ''\r\n    },\r\n    // Vimeo plugin\r\n    vimeo: {\r\n      byline: false,\r\n      portrait: false,\r\n      title: false,\r\n      speed: true,\r\n      transparent: false,\r\n      // Whether the owner of the video has a Pro or Business account\r\n      // (which allows us to properly hide controls without CSS hacks, etc)\r\n      premium: false,\r\n      // Custom settings from Plyr\r\n      referrerPolicy: null // https://developer.mozilla.org/en-US/docs/Web/API/HTMLIFrameElement/referrerPolicy\r\n\r\n    },\r\n    // YouTube plugin\r\n    youtube: {\r\n      noCookie: true,\r\n      // Whether to use an alternative version of YouTube without cookies\r\n      rel: 0,\r\n      // No related vids\r\n      showinfo: 0,\r\n      // Hide info\r\n      iv_load_policy: 3,\r\n      // Hide annotations\r\n      modestbranding: 1 // Hide logos as much as possible (they still show one in the corner when paused)\r\n\r\n    }\r\n  };\r\n\r\n  // ==========================================================================\r\n  // Plyr states\r\n  // ==========================================================================\r\n  var pip = {\r\n    active: 'picture-in-picture',\r\n    inactive: 'inline'\r\n  };\r\n\r\n  // ==========================================================================\r\n  // Plyr supported types and providers\r\n  // ==========================================================================\r\n  var providers = {\r\n    html5: 'html5',\r\n    youtube: 'youtube',\r\n    vimeo: 'vimeo'\r\n  };\r\n  var types = {\r\n    audio: 'audio',\r\n    video: 'video'\r\n  };\r\n  /**\r\n   * Get provider by URL\r\n   * @param {String} url\r\n   */\r\n\r\n  function getProviderByUrl(url) {\r\n    // YouTube\r\n    if (/^(https?:\\/\\/)?(www\\.)?(youtube\\.com|youtube-nocookie\\.com|youtu\\.?be)\\/.+$/.test(url)) {\r\n      return providers.youtube;\r\n    } // Vimeo\r\n\r\n\r\n    if (/^https?:\\/\\/player.vimeo.com\\/video\\/\\d{0,9}(?=\\b|\\/)/.test(url)) {\r\n      return providers.vimeo;\r\n    }\r\n\r\n    return null;\r\n  }\r\n\r\n  // ==========================================================================\r\n  // Console wrapper\r\n  // ==========================================================================\r\n  var noop = function noop() {};\r\n\r\n  var Console = /*#__PURE__*/function () {\r\n    function Console() {\r\n      var enabled = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\r\n\r\n      _classCallCheck(this, Console);\r\n\r\n      this.enabled = window.console && enabled;\r\n\r\n      if (this.enabled) {\r\n        this.log('Debugging enabled');\r\n      }\r\n    }\r\n\r\n    _createClass(Console, [{\r\n      key: \"log\",\r\n      get: function get() {\r\n        // eslint-disable-next-line no-console\r\n        return this.enabled ? Function.prototype.bind.call(console.log, console) : noop;\r\n      }\r\n    }, {\r\n      key: \"warn\",\r\n      get: function get() {\r\n        // eslint-disable-next-line no-console\r\n        return this.enabled ? Function.prototype.bind.call(console.warn, console) : noop;\r\n      }\r\n    }, {\r\n      key: \"error\",\r\n      get: function get() {\r\n        // eslint-disable-next-line no-console\r\n        return this.enabled ? Function.prototype.bind.call(console.error, console) : noop;\r\n      }\r\n    }]);\r\n\r\n    return Console;\r\n  }();\r\n\r\n  var Fullscreen = /*#__PURE__*/function () {\r\n    function Fullscreen(player) {\r\n      var _this = this;\r\n\r\n      _classCallCheck(this, Fullscreen);\r\n\r\n      // Keep reference to parent\r\n      this.player = player; // Get prefix\r\n\r\n      this.prefix = Fullscreen.prefix;\r\n      this.property = Fullscreen.property; // Scroll position\r\n\r\n      this.scrollPosition = {\r\n        x: 0,\r\n        y: 0\r\n      }; // Force the use of 'full window/browser' rather than fullscreen\r\n\r\n      this.forceFallback = player.config.fullscreen.fallback === 'force'; // Get the fullscreen element\r\n      // Checks container is an ancestor, defaults to null\r\n\r\n      this.player.elements.fullscreen = player.config.fullscreen.container && closest(this.player.elements.container, player.config.fullscreen.container); // Register event listeners\r\n      // Handle event (incase user presses escape etc)\r\n\r\n      on.call(this.player, document, this.prefix === 'ms' ? 'MSFullscreenChange' : \"\".concat(this.prefix, \"fullscreenchange\"), function () {\r\n        // TODO: Filter for target??\r\n        _this.onChange();\r\n      }); // Fullscreen toggle on double click\r\n\r\n      on.call(this.player, this.player.elements.container, 'dblclick', function (event) {\r\n        // Ignore double click in controls\r\n        if (is$1.element(_this.player.elements.controls) && _this.player.elements.controls.contains(event.target)) {\r\n          return;\r\n        }\r\n\r\n        _this.toggle();\r\n      }); // Tap focus when in fullscreen\r\n\r\n      on.call(this, this.player.elements.container, 'keydown', function (event) {\r\n        return _this.trapFocus(event);\r\n      }); // Update the UI\r\n\r\n      this.update();\r\n    } // Determine if native supported\r\n\r\n\r\n    _createClass(Fullscreen, [{\r\n      key: \"onChange\",\r\n      value: function onChange() {\r\n        if (!this.enabled) {\r\n          return;\r\n        } // Update toggle button\r\n\r\n\r\n        var button = this.player.elements.buttons.fullscreen;\r\n\r\n        if (is$1.element(button)) {\r\n          button.pressed = this.active;\r\n        } // Trigger an event\r\n\r\n\r\n        triggerEvent.call(this.player, this.target, this.active ? 'enterfullscreen' : 'exitfullscreen', true);\r\n      }\r\n    }, {\r\n      key: \"toggleFallback\",\r\n      value: function toggleFallback() {\r\n        var toggle = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\r\n\r\n        // Store or restore scroll position\r\n        if (toggle) {\r\n          this.scrollPosition = {\r\n            x: window.scrollX || 0,\r\n            y: window.scrollY || 0\r\n          };\r\n        } else {\r\n          window.scrollTo(this.scrollPosition.x, this.scrollPosition.y);\r\n        } // Toggle scroll\r\n\r\n\r\n        document.body.style.overflow = toggle ? 'hidden' : ''; // Toggle class hook\r\n\r\n        toggleClass(this.target, this.player.config.classNames.fullscreen.fallback, toggle); // Force full viewport on iPhone X+\r\n\r\n        if (browser.isIos) {\r\n          var viewport = document.head.querySelector('meta[name=\"viewport\"]');\r\n          var property = 'viewport-fit=cover'; // Inject the viewport meta if required\r\n\r\n          if (!viewport) {\r\n            viewport = document.createElement('meta');\r\n            viewport.setAttribute('name', 'viewport');\r\n          } // Check if the property already exists\r\n\r\n\r\n          var hasProperty = is$1.string(viewport.content) && viewport.content.includes(property);\r\n\r\n          if (toggle) {\r\n            this.cleanupViewport = !hasProperty;\r\n\r\n            if (!hasProperty) {\r\n              viewport.content += \",\".concat(property);\r\n            }\r\n          } else if (this.cleanupViewport) {\r\n            viewport.content = viewport.content.split(',').filter(function (part) {\r\n              return part.trim() !== property;\r\n            }).join(',');\r\n          }\r\n        } // Toggle button and fire events\r\n\r\n\r\n        this.onChange();\r\n      } // Trap focus inside container\r\n\r\n    }, {\r\n      key: \"trapFocus\",\r\n      value: function trapFocus(event) {\r\n        // Bail if iOS, not active, not the tab key\r\n        if (browser.isIos || !this.active || event.key !== 'Tab' || event.keyCode !== 9) {\r\n          return;\r\n        } // Get the current focused element\r\n\r\n\r\n        var focused = document.activeElement;\r\n        var focusable = getElements.call(this.player, 'a[href], button:not(:disabled), input:not(:disabled), [tabindex]');\r\n\r\n        var _focusable = _slicedToArray(focusable, 1),\r\n            first = _focusable[0];\r\n\r\n        var last = focusable[focusable.length - 1];\r\n\r\n        if (focused === last && !event.shiftKey) {\r\n          // Move focus to first element that can be tabbed if Shift isn't used\r\n          first.focus();\r\n          event.preventDefault();\r\n        } else if (focused === first && event.shiftKey) {\r\n          // Move focus to last element that can be tabbed if Shift is used\r\n          last.focus();\r\n          event.preventDefault();\r\n        }\r\n      } // Update UI\r\n\r\n    }, {\r\n      key: \"update\",\r\n      value: function update() {\r\n        if (this.enabled) {\r\n          var mode;\r\n\r\n          if (this.forceFallback) {\r\n            mode = 'Fallback (forced)';\r\n          } else if (Fullscreen.native) {\r\n            mode = 'Native';\r\n          } else {\r\n            mode = 'Fallback';\r\n          }\r\n\r\n          this.player.debug.log(\"\".concat(mode, \" fullscreen enabled\"));\r\n        } else {\r\n          this.player.debug.log('Fullscreen not supported and fallback disabled');\r\n        } // Add styling hook to show button\r\n\r\n\r\n        toggleClass(this.player.elements.container, this.player.config.classNames.fullscreen.enabled, this.enabled);\r\n      } // Make an element fullscreen\r\n\r\n    }, {\r\n      key: \"enter\",\r\n      value: function enter() {\r\n        if (!this.enabled) {\r\n          return;\r\n        } // iOS native fullscreen doesn't need the request step\r\n\r\n\r\n        if (browser.isIos && this.player.config.fullscreen.iosNative) {\r\n          this.target.webkitEnterFullscreen();\r\n        } else if (!Fullscreen.native || this.forceFallback) {\r\n          this.toggleFallback(true);\r\n        } else if (!this.prefix) {\r\n          this.target.requestFullscreen({\r\n            navigationUI: 'hide'\r\n          });\r\n        } else if (!is$1.empty(this.prefix)) {\r\n          this.target[\"\".concat(this.prefix, \"Request\").concat(this.property)]();\r\n        }\r\n      } // Bail from fullscreen\r\n\r\n    }, {\r\n      key: \"exit\",\r\n      value: function exit() {\r\n        if (!this.enabled) {\r\n          return;\r\n        } // iOS native fullscreen\r\n\r\n\r\n        if (browser.isIos && this.player.config.fullscreen.iosNative) {\r\n          this.target.webkitExitFullscreen();\r\n          silencePromise(this.player.play());\r\n        } else if (!Fullscreen.native || this.forceFallback) {\r\n          this.toggleFallback(false);\r\n        } else if (!this.prefix) {\r\n          (document.cancelFullScreen || document.exitFullscreen).call(document);\r\n        } else if (!is$1.empty(this.prefix)) {\r\n          var action = this.prefix === 'moz' ? 'Cancel' : 'Exit';\r\n          document[\"\".concat(this.prefix).concat(action).concat(this.property)]();\r\n        }\r\n      } // Toggle state\r\n\r\n    }, {\r\n      key: \"toggle\",\r\n      value: function toggle() {\r\n        if (!this.active) {\r\n          this.enter();\r\n        } else {\r\n          this.exit();\r\n        }\r\n      }\r\n    }, {\r\n      key: \"usingNative\",\r\n      // If we're actually using native\r\n      get: function get() {\r\n        return Fullscreen.native && !this.forceFallback;\r\n      } // Get the prefix for handlers\r\n\r\n    }, {\r\n      key: \"enabled\",\r\n      // Determine if fullscreen is enabled\r\n      get: function get() {\r\n        return (Fullscreen.native || this.player.config.fullscreen.fallback) && this.player.config.fullscreen.enabled && this.player.supported.ui && this.player.isVideo;\r\n      } // Get active state\r\n\r\n    }, {\r\n      key: \"active\",\r\n      get: function get() {\r\n        if (!this.enabled) {\r\n          return false;\r\n        } // Fallback using classname\r\n\r\n\r\n        if (!Fullscreen.native || this.forceFallback) {\r\n          return hasClass(this.target, this.player.config.classNames.fullscreen.fallback);\r\n        }\r\n\r\n        var element = !this.prefix ? document.fullscreenElement : document[\"\".concat(this.prefix).concat(this.property, \"Element\")];\r\n        return element && element.shadowRoot ? element === this.target.getRootNode().host : element === this.target;\r\n      } // Get target element\r\n\r\n    }, {\r\n      key: \"target\",\r\n      get: function get() {\r\n        return browser.isIos && this.player.config.fullscreen.iosNative ? this.player.media : this.player.elements.fullscreen || this.player.elements.container;\r\n      }\r\n    }], [{\r\n      key: \"native\",\r\n      get: function get() {\r\n        return !!(document.fullscreenEnabled || document.webkitFullscreenEnabled || document.mozFullScreenEnabled || document.msFullscreenEnabled);\r\n      }\r\n    }, {\r\n      key: \"prefix\",\r\n      get: function get() {\r\n        // No prefix\r\n        if (is$1.function(document.exitFullscreen)) {\r\n          return '';\r\n        } // Check for fullscreen support by vendor prefix\r\n\r\n\r\n        var value = '';\r\n        var prefixes = ['webkit', 'moz', 'ms'];\r\n        prefixes.some(function (pre) {\r\n          if (is$1.function(document[\"\".concat(pre, \"ExitFullscreen\")]) || is$1.function(document[\"\".concat(pre, \"CancelFullScreen\")])) {\r\n            value = pre;\r\n            return true;\r\n          }\r\n\r\n          return false;\r\n        });\r\n        return value;\r\n      }\r\n    }, {\r\n      key: \"property\",\r\n      get: function get() {\r\n        return this.prefix === 'moz' ? 'FullScreen' : 'Fullscreen';\r\n      }\r\n    }]);\r\n\r\n    return Fullscreen;\r\n  }();\r\n\r\n  // ==========================================================================\r\n  // Load image avoiding xhr/fetch CORS issues\r\n  // Server status can't be obtained this way unfortunately, so this uses \"naturalWidth\" to determine if the image has loaded\r\n  // By default it checks if it is at least 1px, but you can add a second argument to change this\r\n  // ==========================================================================\r\n  function loadImage(src) {\r\n    var minWidth = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;\r\n    return new Promise(function (resolve, reject) {\r\n      var image = new Image();\r\n\r\n      var handler = function handler() {\r\n        delete image.onload;\r\n        delete image.onerror;\r\n        (image.naturalWidth >= minWidth ? resolve : reject)(image);\r\n      };\r\n\r\n      Object.assign(image, {\r\n        onload: handler,\r\n        onerror: handler,\r\n        src: src\r\n      });\r\n    });\r\n  }\r\n\r\n  var ui = {\r\n    addStyleHook: function addStyleHook() {\r\n      toggleClass(this.elements.container, this.config.selectors.container.replace('.', ''), true);\r\n      toggleClass(this.elements.container, this.config.classNames.uiSupported, this.supported.ui);\r\n    },\r\n    // Toggle native HTML5 media controls\r\n    toggleNativeControls: function toggleNativeControls() {\r\n      var toggle = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\r\n\r\n      if (toggle && this.isHTML5) {\r\n        this.media.setAttribute('controls', '');\r\n      } else {\r\n        this.media.removeAttribute('controls');\r\n      }\r\n    },\r\n    // Setup the UI\r\n    build: function build() {\r\n      var _this = this;\r\n\r\n      // Re-attach media element listeners\r\n      // TODO: Use event bubbling?\r\n      this.listeners.media(); // Don't setup interface if no support\r\n\r\n      if (!this.supported.ui) {\r\n        this.debug.warn(\"Basic support only for \".concat(this.provider, \" \").concat(this.type)); // Restore native controls\r\n\r\n        ui.toggleNativeControls.call(this, true); // Bail\r\n\r\n        return;\r\n      } // Inject custom controls if not present\r\n\r\n\r\n      if (!is$1.element(this.elements.controls)) {\r\n        // Inject custom controls\r\n        controls.inject.call(this); // Re-attach control listeners\r\n\r\n        this.listeners.controls();\r\n      } // Remove native controls\r\n\r\n\r\n      ui.toggleNativeControls.call(this); // Setup captions for HTML5\r\n\r\n      if (this.isHTML5) {\r\n        captions.setup.call(this);\r\n      } // Reset volume\r\n\r\n\r\n      this.volume = null; // Reset mute state\r\n\r\n      this.muted = null; // Reset loop state\r\n\r\n      this.loop = null; // Reset quality setting\r\n\r\n      this.quality = null; // Reset speed\r\n\r\n      this.speed = null; // Reset volume display\r\n\r\n      controls.updateVolume.call(this); // Reset time display\r\n\r\n      controls.timeUpdate.call(this); // Update the UI\r\n\r\n      ui.checkPlaying.call(this); // Check for picture-in-picture support\r\n\r\n      toggleClass(this.elements.container, this.config.classNames.pip.supported, support.pip && this.isHTML5 && this.isVideo); // Check for airplay support\r\n\r\n      toggleClass(this.elements.container, this.config.classNames.airplay.supported, support.airplay && this.isHTML5); // Add iOS class\r\n\r\n      toggleClass(this.elements.container, this.config.classNames.isIos, browser.isIos); // Add touch class\r\n\r\n      toggleClass(this.elements.container, this.config.classNames.isTouch, this.touch); // Ready for API calls\r\n\r\n      this.ready = true; // Ready event at end of execution stack\r\n\r\n      setTimeout(function () {\r\n        triggerEvent.call(_this, _this.media, 'ready');\r\n      }, 0); // Set the title\r\n\r\n      ui.setTitle.call(this); // Assure the poster image is set, if the property was added before the element was created\r\n\r\n      if (this.poster) {\r\n        ui.setPoster.call(this, this.poster, false).catch(function () {});\r\n      } // Manually set the duration if user has overridden it.\r\n      // The event listeners for it doesn't get called if preload is disabled (#701)\r\n\r\n\r\n      if (this.config.duration) {\r\n        controls.durationUpdate.call(this);\r\n      }\r\n    },\r\n    // Setup aria attribute for play and iframe title\r\n    setTitle: function setTitle() {\r\n      // Find the current text\r\n      var label = i18n.get('play', this.config); // If there's a media title set, use that for the label\r\n\r\n      if (is$1.string(this.config.title) && !is$1.empty(this.config.title)) {\r\n        label += \", \".concat(this.config.title);\r\n      } // If there's a play button, set label\r\n\r\n\r\n      Array.from(this.elements.buttons.play || []).forEach(function (button) {\r\n        button.setAttribute('aria-label', label);\r\n      }); // Set iframe title\r\n      // https://github.com/sampotts/plyr/issues/124\r\n\r\n      if (this.isEmbed) {\r\n        var iframe = getElement.call(this, 'iframe');\r\n\r\n        if (!is$1.element(iframe)) {\r\n          return;\r\n        } // Default to media type\r\n\r\n\r\n        var title = !is$1.empty(this.config.title) ? this.config.title : 'video';\r\n        var format = i18n.get('frameTitle', this.config);\r\n        iframe.setAttribute('title', format.replace('{title}', title));\r\n      }\r\n    },\r\n    // Toggle poster\r\n    togglePoster: function togglePoster(enable) {\r\n      toggleClass(this.elements.container, this.config.classNames.posterEnabled, enable);\r\n    },\r\n    // Set the poster image (async)\r\n    // Used internally for the poster setter, with the passive option forced to false\r\n    setPoster: function setPoster(poster) {\r\n      var _this2 = this;\r\n\r\n      var passive = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\r\n\r\n      // Don't override if call is passive\r\n      if (passive && this.poster) {\r\n        return Promise.reject(new Error('Poster already set'));\r\n      } // Set property synchronously to respect the call order\r\n\r\n\r\n      this.media.setAttribute('data-poster', poster); // Wait until ui is ready\r\n\r\n      return ready.call(this) // Load image\r\n      .then(function () {\r\n        return loadImage(poster);\r\n      }).catch(function (err) {\r\n        // Hide poster on error unless it's been set by another call\r\n        if (poster === _this2.poster) {\r\n          ui.togglePoster.call(_this2, false);\r\n        } // Rethrow\r\n\r\n\r\n        throw err;\r\n      }).then(function () {\r\n        // Prevent race conditions\r\n        if (poster !== _this2.poster) {\r\n          throw new Error('setPoster cancelled by later call to setPoster');\r\n        }\r\n      }).then(function () {\r\n        Object.assign(_this2.elements.poster.style, {\r\n          backgroundImage: \"url('\".concat(poster, \"')\"),\r\n          // Reset backgroundSize as well (since it can be set to \"cover\" for padded thumbnails for youtube)\r\n          backgroundSize: ''\r\n        });\r\n        ui.togglePoster.call(_this2, true);\r\n        return poster;\r\n      });\r\n    },\r\n    // Check playing state\r\n    checkPlaying: function checkPlaying(event) {\r\n      var _this3 = this;\r\n\r\n      // Class hooks\r\n      toggleClass(this.elements.container, this.config.classNames.playing, this.playing);\r\n      toggleClass(this.elements.container, this.config.classNames.paused, this.paused);\r\n      toggleClass(this.elements.container, this.config.classNames.stopped, this.stopped); // Set state\r\n\r\n      Array.from(this.elements.buttons.play || []).forEach(function (target) {\r\n        Object.assign(target, {\r\n          pressed: _this3.playing\r\n        });\r\n        target.setAttribute('aria-label', i18n.get(_this3.playing ? 'pause' : 'play', _this3.config));\r\n      }); // Only update controls on non timeupdate events\r\n\r\n      if (is$1.event(event) && event.type === 'timeupdate') {\r\n        return;\r\n      } // Toggle controls\r\n\r\n\r\n      ui.toggleControls.call(this);\r\n    },\r\n    // Check if media is loading\r\n    checkLoading: function checkLoading(event) {\r\n      var _this4 = this;\r\n\r\n      this.loading = ['stalled', 'waiting'].includes(event.type); // Clear timer\r\n\r\n      clearTimeout(this.timers.loading); // Timer to prevent flicker when seeking\r\n\r\n      this.timers.loading = setTimeout(function () {\r\n        // Update progress bar loading class state\r\n        toggleClass(_this4.elements.container, _this4.config.classNames.loading, _this4.loading); // Update controls visibility\r\n\r\n        ui.toggleControls.call(_this4);\r\n      }, this.loading ? 250 : 0);\r\n    },\r\n    // Toggle controls based on state and `force` argument\r\n    toggleControls: function toggleControls(force) {\r\n      var controlsElement = this.elements.controls;\r\n\r\n      if (controlsElement && this.config.hideControls) {\r\n        // Don't hide controls if a touch-device user recently seeked. (Must be limited to touch devices, or it occasionally prevents desktop controls from hiding.)\r\n        var recentTouchSeek = this.touch && this.lastSeekTime + 2000 > Date.now(); // Show controls if force, loading, paused, button interaction, or recent seek, otherwise hide\r\n\r\n        this.toggleControls(Boolean(force || this.loading || this.paused || controlsElement.pressed || controlsElement.hover || recentTouchSeek));\r\n      }\r\n    },\r\n    // Migrate any custom properties from the media to the parent\r\n    migrateStyles: function migrateStyles() {\r\n      var _this5 = this;\r\n\r\n      // Loop through values (as they are the keys when the object is spread 🤔)\r\n      Object.values(_objectSpread2({}, this.media.style)) // We're only fussed about Plyr specific properties\r\n      .filter(function (key) {\r\n        return !is$1.empty(key) && key.startsWith('--plyr');\r\n      }).forEach(function (key) {\r\n        // Set on the container\r\n        _this5.elements.container.style.setProperty(key, _this5.media.style.getPropertyValue(key)); // Clean up from media element\r\n\r\n\r\n        _this5.media.style.removeProperty(key);\r\n      }); // Remove attribute if empty\r\n\r\n      if (is$1.empty(this.media.style)) {\r\n        this.media.removeAttribute('style');\r\n      }\r\n    }\r\n  };\r\n\r\n  var Listeners = /*#__PURE__*/function () {\r\n    function Listeners(player) {\r\n      _classCallCheck(this, Listeners);\r\n\r\n      this.player = player;\r\n      this.lastKey = null;\r\n      this.focusTimer = null;\r\n      this.lastKeyDown = null;\r\n      this.handleKey = this.handleKey.bind(this);\r\n      this.toggleMenu = this.toggleMenu.bind(this);\r\n      this.setTabFocus = this.setTabFocus.bind(this);\r\n      this.firstTouch = this.firstTouch.bind(this);\r\n    } // Handle key presses\r\n\r\n\r\n    _createClass(Listeners, [{\r\n      key: \"handleKey\",\r\n      value: function handleKey(event) {\r\n        var player = this.player;\r\n        var elements = player.elements;\r\n        var code = event.keyCode ? event.keyCode : event.which;\r\n        var pressed = event.type === 'keydown';\r\n        var repeat = pressed && code === this.lastKey; // Bail if a modifier key is set\r\n\r\n        if (event.altKey || event.ctrlKey || event.metaKey || event.shiftKey) {\r\n          return;\r\n        } // If the event is bubbled from the media element\r\n        // Firefox doesn't get the keycode for whatever reason\r\n\r\n\r\n        if (!is$1.number(code)) {\r\n          return;\r\n        } // Seek by the number keys\r\n\r\n\r\n        var seekByKey = function seekByKey() {\r\n          // Divide the max duration into 10th's and times by the number value\r\n          player.currentTime = player.duration / 10 * (code - 48);\r\n        }; // Handle the key on keydown\r\n        // Reset on keyup\r\n\r\n\r\n        if (pressed) {\r\n          // Check focused element\r\n          // and if the focused element is not editable (e.g. text input)\r\n          // and any that accept key input http://webaim.org/techniques/keyboard/\r\n          var focused = document.activeElement;\r\n\r\n          if (is$1.element(focused)) {\r\n            var editable = player.config.selectors.editable;\r\n            var seek = elements.inputs.seek;\r\n\r\n            if (focused !== seek && matches$1(focused, editable)) {\r\n              return;\r\n            }\r\n\r\n            if (event.which === 32 && matches$1(focused, 'button, [role^=\"menuitem\"]')) {\r\n              return;\r\n            }\r\n          } // Which keycodes should we prevent default\r\n\r\n\r\n          var preventDefault = [32, 37, 38, 39, 40, 48, 49, 50, 51, 52, 53, 54, 56, 57, 67, 70, 73, 75, 76, 77, 79]; // If the code is found prevent default (e.g. prevent scrolling for arrows)\r\n\r\n          if (preventDefault.includes(code)) {\r\n            event.preventDefault();\r\n            event.stopPropagation();\r\n          }\r\n\r\n          switch (code) {\r\n            case 48:\r\n            case 49:\r\n            case 50:\r\n            case 51:\r\n            case 52:\r\n            case 53:\r\n            case 54:\r\n            case 55:\r\n            case 56:\r\n            case 57:\r\n              // 0-9\r\n              if (!repeat) {\r\n                seekByKey();\r\n              }\r\n\r\n              break;\r\n\r\n            case 32:\r\n            case 75:\r\n              // Space and K key\r\n              if (!repeat) {\r\n                silencePromise(player.togglePlay());\r\n              }\r\n\r\n              break;\r\n\r\n            case 38:\r\n              // Arrow up\r\n              player.increaseVolume(0.1);\r\n              break;\r\n\r\n            case 40:\r\n              // Arrow down\r\n              player.decreaseVolume(0.1);\r\n              break;\r\n\r\n            case 77:\r\n              // M key\r\n              if (!repeat) {\r\n                player.muted = !player.muted;\r\n              }\r\n\r\n              break;\r\n\r\n            case 39:\r\n              // Arrow forward\r\n              player.forward();\r\n              break;\r\n\r\n            case 37:\r\n              // Arrow back\r\n              player.rewind();\r\n              break;\r\n\r\n            case 70:\r\n              // F key\r\n              player.fullscreen.toggle();\r\n              break;\r\n\r\n            case 67:\r\n              // C key\r\n              if (!repeat) {\r\n                player.toggleCaptions();\r\n              }\r\n\r\n              break;\r\n\r\n            case 76:\r\n              // L key\r\n              player.loop = !player.loop;\r\n              break;\r\n          } // Escape is handle natively when in full screen\r\n          // So we only need to worry about non native\r\n\r\n\r\n          if (code === 27 && !player.fullscreen.usingNative && player.fullscreen.active) {\r\n            player.fullscreen.toggle();\r\n          } // Store last code for next cycle\r\n\r\n\r\n          this.lastKey = code;\r\n        } else {\r\n          this.lastKey = null;\r\n        }\r\n      } // Toggle menu\r\n\r\n    }, {\r\n      key: \"toggleMenu\",\r\n      value: function toggleMenu(event) {\r\n        controls.toggleMenu.call(this.player, event);\r\n      } // Device is touch enabled\r\n\r\n    }, {\r\n      key: \"firstTouch\",\r\n      value: function firstTouch() {\r\n        var player = this.player;\r\n        var elements = player.elements;\r\n        player.touch = true; // Add touch class\r\n\r\n        toggleClass(elements.container, player.config.classNames.isTouch, true);\r\n      }\r\n    }, {\r\n      key: \"setTabFocus\",\r\n      value: function setTabFocus(event) {\r\n        var player = this.player;\r\n        var elements = player.elements;\r\n        clearTimeout(this.focusTimer); // Ignore any key other than tab\r\n\r\n        if (event.type === 'keydown' && event.which !== 9) {\r\n          return;\r\n        } // Store reference to event timeStamp\r\n\r\n\r\n        if (event.type === 'keydown') {\r\n          this.lastKeyDown = event.timeStamp;\r\n        } // Remove current classes\r\n\r\n\r\n        var removeCurrent = function removeCurrent() {\r\n          var className = player.config.classNames.tabFocus;\r\n          var current = getElements.call(player, \".\".concat(className));\r\n          toggleClass(current, className, false);\r\n        }; // Determine if a key was pressed to trigger this event\r\n\r\n\r\n        var wasKeyDown = event.timeStamp - this.lastKeyDown <= 20; // Ignore focus events if a key was pressed prior\r\n\r\n        if (event.type === 'focus' && !wasKeyDown) {\r\n          return;\r\n        } // Remove all current\r\n\r\n\r\n        removeCurrent(); // Delay the adding of classname until the focus has changed\r\n        // This event fires before the focusin event\r\n\r\n        if (event.type !== 'focusout') {\r\n          this.focusTimer = setTimeout(function () {\r\n            var focused = document.activeElement; // Ignore if current focus element isn't inside the player\r\n\r\n            if (!elements.container.contains(focused)) {\r\n              return;\r\n            }\r\n\r\n            toggleClass(document.activeElement, player.config.classNames.tabFocus, true);\r\n          }, 10);\r\n        }\r\n      } // Global window & document listeners\r\n\r\n    }, {\r\n      key: \"global\",\r\n      value: function global() {\r\n        var toggle = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;\r\n        var player = this.player; // Keyboard shortcuts\r\n\r\n        if (player.config.keyboard.global) {\r\n          toggleListener.call(player, window, 'keydown keyup', this.handleKey, toggle, false);\r\n        } // Click anywhere closes menu\r\n\r\n\r\n        toggleListener.call(player, document.body, 'click', this.toggleMenu, toggle); // Detect touch by events\r\n\r\n        once.call(player, document.body, 'touchstart', this.firstTouch); // Tab focus detection\r\n\r\n        toggleListener.call(player, document.body, 'keydown focus blur focusout', this.setTabFocus, toggle, false, true);\r\n      } // Container listeners\r\n\r\n    }, {\r\n      key: \"container\",\r\n      value: function container() {\r\n        var player = this.player;\r\n        var config = player.config,\r\n            elements = player.elements,\r\n            timers = player.timers; // Keyboard shortcuts\r\n\r\n        if (!config.keyboard.global && config.keyboard.focused) {\r\n          on.call(player, elements.container, 'keydown keyup', this.handleKey, false);\r\n        } // Toggle controls on mouse events and entering fullscreen\r\n\r\n\r\n        on.call(player, elements.container, 'mousemove mouseleave touchstart touchmove enterfullscreen exitfullscreen', function (event) {\r\n          var controlsElement = elements.controls; // Remove button states for fullscreen\r\n\r\n          if (controlsElement && event.type === 'enterfullscreen') {\r\n            controlsElement.pressed = false;\r\n            controlsElement.hover = false;\r\n          } // Show, then hide after a timeout unless another control event occurs\r\n\r\n\r\n          var show = ['touchstart', 'touchmove', 'mousemove'].includes(event.type);\r\n          var delay = 0;\r\n\r\n          if (show) {\r\n            ui.toggleControls.call(player, true); // Use longer timeout for touch devices\r\n\r\n            delay = player.touch ? 3000 : 2000;\r\n          } // Clear timer\r\n\r\n\r\n          clearTimeout(timers.controls); // Set new timer to prevent flicker when seeking\r\n\r\n          timers.controls = setTimeout(function () {\r\n            return ui.toggleControls.call(player, false);\r\n          }, delay);\r\n        }); // Set a gutter for Vimeo\r\n\r\n        var setGutter = function setGutter(ratio, padding, toggle) {\r\n          if (!player.isVimeo || player.config.vimeo.premium) {\r\n            return;\r\n          }\r\n\r\n          var target = player.elements.wrapper.firstChild;\r\n\r\n          var _ratio = _slicedToArray(ratio, 2),\r\n              y = _ratio[1];\r\n\r\n          var _getAspectRatio$call = getAspectRatio.call(player),\r\n              _getAspectRatio$call2 = _slicedToArray(_getAspectRatio$call, 2),\r\n              videoX = _getAspectRatio$call2[0],\r\n              videoY = _getAspectRatio$call2[1];\r\n\r\n          target.style.maxWidth = toggle ? \"\".concat(y / videoY * videoX, \"px\") : null;\r\n          target.style.margin = toggle ? '0 auto' : null;\r\n        }; // Resize on fullscreen change\r\n\r\n\r\n        var setPlayerSize = function setPlayerSize(measure) {\r\n          // If we don't need to measure the viewport\r\n          if (!measure) {\r\n            return setAspectRatio.call(player);\r\n          }\r\n\r\n          var rect = elements.container.getBoundingClientRect();\r\n          var width = rect.width,\r\n              height = rect.height;\r\n          return setAspectRatio.call(player, \"\".concat(width, \":\").concat(height));\r\n        };\r\n\r\n        var resized = function resized() {\r\n          clearTimeout(timers.resized);\r\n          timers.resized = setTimeout(setPlayerSize, 50);\r\n        };\r\n\r\n        on.call(player, elements.container, 'enterfullscreen exitfullscreen', function (event) {\r\n          var _player$fullscreen = player.fullscreen,\r\n              target = _player$fullscreen.target,\r\n              usingNative = _player$fullscreen.usingNative; // Ignore events not from target\r\n\r\n          if (target !== elements.container) {\r\n            return;\r\n          } // If it's not an embed and no ratio specified\r\n\r\n\r\n          if (!player.isEmbed && is$1.empty(player.config.ratio)) {\r\n            return;\r\n          }\r\n\r\n          var isEnter = event.type === 'enterfullscreen'; // Set the player size when entering fullscreen to viewport size\r\n\r\n          var _setPlayerSize = setPlayerSize(isEnter),\r\n              padding = _setPlayerSize.padding,\r\n              ratio = _setPlayerSize.ratio; // Set Vimeo gutter\r\n\r\n\r\n          setGutter(ratio, padding, isEnter); // If not using native browser fullscreen API, we need to check for resizes of viewport\r\n\r\n          if (!usingNative) {\r\n            if (isEnter) {\r\n              on.call(player, window, 'resize', resized);\r\n            } else {\r\n              off.call(player, window, 'resize', resized);\r\n            }\r\n          }\r\n        });\r\n      } // Listen for media events\r\n\r\n    }, {\r\n      key: \"media\",\r\n      value: function media() {\r\n        var _this = this;\r\n\r\n        var player = this.player;\r\n        var elements = player.elements; // Time change on media\r\n\r\n        on.call(player, player.media, 'timeupdate seeking seeked', function (event) {\r\n          return controls.timeUpdate.call(player, event);\r\n        }); // Display duration\r\n\r\n        on.call(player, player.media, 'durationchange loadeddata loadedmetadata', function (event) {\r\n          return controls.durationUpdate.call(player, event);\r\n        }); // Handle the media finishing\r\n\r\n        on.call(player, player.media, 'ended', function () {\r\n          // Show poster on end\r\n          if (player.isHTML5 && player.isVideo && player.config.resetOnEnd) {\r\n            // Restart\r\n            player.restart(); // Call pause otherwise IE11 will start playing the video again\r\n\r\n            player.pause();\r\n          }\r\n        }); // Check for buffer progress\r\n\r\n        on.call(player, player.media, 'progress playing seeking seeked', function (event) {\r\n          return controls.updateProgress.call(player, event);\r\n        }); // Handle volume changes\r\n\r\n        on.call(player, player.media, 'volumechange', function (event) {\r\n          return controls.updateVolume.call(player, event);\r\n        }); // Handle play/pause\r\n\r\n        on.call(player, player.media, 'playing play pause ended emptied timeupdate', function (event) {\r\n          return ui.checkPlaying.call(player, event);\r\n        }); // Loading state\r\n\r\n        on.call(player, player.media, 'waiting canplay seeked playing', function (event) {\r\n          return ui.checkLoading.call(player, event);\r\n        }); // Click video\r\n\r\n        if (player.supported.ui && player.config.clickToPlay && !player.isAudio) {\r\n          // Re-fetch the wrapper\r\n          var wrapper = getElement.call(player, \".\".concat(player.config.classNames.video)); // Bail if there's no wrapper (this should never happen)\r\n\r\n          if (!is$1.element(wrapper)) {\r\n            return;\r\n          } // On click play, pause or restart\r\n\r\n\r\n          on.call(player, elements.container, 'click', function (event) {\r\n            var targets = [elements.container, wrapper]; // Ignore if click if not container or in video wrapper\r\n\r\n            if (!targets.includes(event.target) && !wrapper.contains(event.target)) {\r\n              return;\r\n            } // Touch devices will just show controls (if hidden)\r\n\r\n\r\n            if (player.touch && player.config.hideControls) {\r\n              return;\r\n            }\r\n\r\n            if (player.ended) {\r\n              _this.proxy(event, player.restart, 'restart');\r\n\r\n              _this.proxy(event, function () {\r\n                silencePromise(player.play());\r\n              }, 'play');\r\n            } else {\r\n              _this.proxy(event, function () {\r\n                silencePromise(player.togglePlay());\r\n              }, 'play');\r\n            }\r\n          });\r\n        } // Disable right click\r\n\r\n\r\n        if (player.supported.ui && player.config.disableContextMenu) {\r\n          on.call(player, elements.wrapper, 'contextmenu', function (event) {\r\n            event.preventDefault();\r\n          }, false);\r\n        } // Volume change\r\n\r\n\r\n        on.call(player, player.media, 'volumechange', function () {\r\n          // Save to storage\r\n          player.storage.set({\r\n            volume: player.volume,\r\n            muted: player.muted\r\n          });\r\n        }); // Speed change\r\n\r\n        on.call(player, player.media, 'ratechange', function () {\r\n          // Update UI\r\n          controls.updateSetting.call(player, 'speed'); // Save to storage\r\n\r\n\r\n          player.storage.set({\r\n            speed: player.speed\r\n          });\r\n        }); // Quality change\r\n\r\n        on.call(player, player.media, 'qualitychange', function (event) {\r\n          // Update UI\r\n          controls.updateSetting.call(player, 'quality', null, event.detail.quality);\r\n        }); // Update download link when ready and if quality changes\r\n\r\n        on.call(player, player.media, 'ready qualitychange', function () {\r\n          controls.setDownloadUrl.call(player);\r\n        }); // Proxy events to container\r\n        // Bubble up key events for Edge\r\n\r\n        var proxyEvents = player.config.events.concat(['keyup', 'keydown']).join(' ');\r\n        on.call(player, player.media, proxyEvents, function (event) {\r\n          var _event$detail = event.detail,\r\n              detail = _event$detail === void 0 ? {} : _event$detail; // Get error details from media\r\n\r\n          if (event.type === 'error') {\r\n            detail = player.media.error;\r\n          }\r\n\r\n          triggerEvent.call(player, elements.container, event.type, true, detail);\r\n        });\r\n      } // Run default and custom handlers\r\n\r\n    }, {\r\n      key: \"proxy\",\r\n      value: function proxy(event, defaultHandler, customHandlerKey) {\r\n        var player = this.player;\r\n        var customHandler = player.config.listeners[customHandlerKey];\r\n        var hasCustomHandler = is$1.function(customHandler);\r\n        var returned = true; // Execute custom handler\r\n\r\n        if (hasCustomHandler) {\r\n          returned = customHandler.call(player, event);\r\n        } // Only call default handler if not prevented in custom handler\r\n\r\n\r\n        if (returned !== false && is$1.function(defaultHandler)) {\r\n          defaultHandler.call(player, event);\r\n        }\r\n      } // Trigger custom and default handlers\r\n\r\n    }, {\r\n      key: \"bind\",\r\n      value: function bind(element, type, defaultHandler, customHandlerKey) {\r\n        var _this2 = this;\r\n\r\n        var passive = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : true;\r\n        var player = this.player;\r\n        var customHandler = player.config.listeners[customHandlerKey];\r\n        var hasCustomHandler = is$1.function(customHandler);\r\n        on.call(player, element, type, function (event) {\r\n          return _this2.proxy(event, defaultHandler, customHandlerKey);\r\n        }, passive && !hasCustomHandler);\r\n      } // Listen for control events\r\n\r\n    }, {\r\n      key: \"controls\",\r\n      value: function controls$1() {\r\n        var _this3 = this;\r\n\r\n        var player = this.player;\r\n        var elements = player.elements; // IE doesn't support input event, so we fallback to change\r\n\r\n        var inputEvent = browser.isIE ? 'change' : 'input'; // Play/pause toggle\r\n\r\n        if (elements.buttons.play) {\r\n          Array.from(elements.buttons.play).forEach(function (button) {\r\n            _this3.bind(button, 'click', function () {\r\n              silencePromise(player.togglePlay());\r\n            }, 'play');\r\n          });\r\n        } // Pause\r\n\r\n\r\n        this.bind(elements.buttons.restart, 'click', player.restart, 'restart'); // Rewind\r\n\r\n        this.bind(elements.buttons.rewind, 'click', player.rewind, 'rewind'); // Rewind\r\n\r\n        this.bind(elements.buttons.fastForward, 'click', player.forward, 'fastForward'); // Mute toggle\r\n\r\n        this.bind(elements.buttons.mute, 'click', function () {\r\n          player.muted = !player.muted;\r\n        }, 'mute'); // Captions toggle\r\n\r\n        this.bind(elements.buttons.captions, 'click', function () {\r\n          return player.toggleCaptions();\r\n        }); // Download\r\n\r\n        this.bind(elements.buttons.download, 'click', function () {\r\n          triggerEvent.call(player, player.media, 'download');\r\n        }, 'download'); // Fullscreen toggle\r\n\r\n        this.bind(elements.buttons.fullscreen, 'click', function () {\r\n          player.fullscreen.toggle();\r\n        }, 'fullscreen'); // Picture-in-Picture\r\n\r\n        this.bind(elements.buttons.pip, 'click', function () {\r\n          player.pip = 'toggle';\r\n        }, 'pip'); // Airplay\r\n\r\n        this.bind(elements.buttons.airplay, 'click', player.airplay, 'airplay'); // Settings menu - click toggle\r\n\r\n        this.bind(elements.buttons.settings, 'click', function (event) {\r\n          // Prevent the document click listener closing the menu\r\n          event.stopPropagation();\r\n          event.preventDefault();\r\n\r\n          controls.toggleMenu.call(player, event);\r\n        }, null, false); // Can't be passive as we're preventing default\r\n        // Settings menu - keyboard toggle\r\n        // We have to bind to keyup otherwise Firefox triggers a click when a keydown event handler shifts focus\r\n        // https://bugzilla.mozilla.org/show_bug.cgi?id=1220143\r\n\r\n        this.bind(elements.buttons.settings, 'keyup', function (event) {\r\n          var code = event.which; // We only care about space and return\r\n\r\n          if (![13, 32].includes(code)) {\r\n            return;\r\n          } // Because return triggers a click anyway, all we need to do is set focus\r\n\r\n\r\n          if (code === 13) {\r\n            controls.focusFirstMenuItem.call(player, null, true);\r\n\r\n            return;\r\n          } // Prevent scroll\r\n\r\n\r\n          event.preventDefault(); // Prevent playing video (Firefox)\r\n\r\n          event.stopPropagation(); // Toggle menu\r\n\r\n          controls.toggleMenu.call(player, event);\r\n        }, null, false // Can't be passive as we're preventing default\r\n        ); // Escape closes menu\r\n\r\n        this.bind(elements.settings.menu, 'keydown', function (event) {\r\n          if (event.which === 27) {\r\n            controls.toggleMenu.call(player, event);\r\n          }\r\n        }); // Set range input alternative \"value\", which matches the tooltip time (#954)\r\n\r\n        this.bind(elements.inputs.seek, 'mousedown mousemove', function (event) {\r\n          var rect = elements.progress.getBoundingClientRect();\r\n          var percent = 100 / rect.width * (event.pageX - rect.left);\r\n          event.currentTarget.setAttribute('seek-value', percent);\r\n        }); // Pause while seeking\r\n\r\n        this.bind(elements.inputs.seek, 'mousedown mouseup keydown keyup touchstart touchend', function (event) {\r\n          var seek = event.currentTarget;\r\n          var code = event.keyCode ? event.keyCode : event.which;\r\n          var attribute = 'play-on-seeked';\r\n\r\n          if (is$1.keyboardEvent(event) && code !== 39 && code !== 37) {\r\n            return;\r\n          } // Record seek time so we can prevent hiding controls for a few seconds after seek\r\n\r\n\r\n          player.lastSeekTime = Date.now(); // Was playing before?\r\n\r\n          var play = seek.hasAttribute(attribute); // Done seeking\r\n\r\n          var done = ['mouseup', 'touchend', 'keyup'].includes(event.type); // If we're done seeking and it was playing, resume playback\r\n\r\n          if (play && done) {\r\n            seek.removeAttribute(attribute);\r\n            silencePromise(player.play());\r\n          } else if (!done && player.playing) {\r\n            seek.setAttribute(attribute, '');\r\n            player.pause();\r\n          }\r\n        }); // Fix range inputs on iOS\r\n        // Super weird iOS bug where after you interact with an <input type=\"range\">,\r\n        // it takes over further interactions on the page. This is a hack\r\n\r\n        if (browser.isIos) {\r\n          var inputs = getElements.call(player, 'input[type=\"range\"]');\r\n          Array.from(inputs).forEach(function (input) {\r\n            return _this3.bind(input, inputEvent, function (event) {\r\n              return repaint(event.target);\r\n            });\r\n          });\r\n        } // Seek\r\n\r\n\r\n        this.bind(elements.inputs.seek, inputEvent, function (event) {\r\n          var seek = event.currentTarget; // If it exists, use seek-value instead of \"value\" for consistency with tooltip time (#954)\r\n\r\n          var seekTo = seek.getAttribute('seek-value');\r\n\r\n          if (is$1.empty(seekTo)) {\r\n            seekTo = seek.value;\r\n          }\r\n\r\n          seek.removeAttribute('seek-value');\r\n          player.currentTime = seekTo / seek.max * player.duration;\r\n        }, 'seek'); // Seek tooltip\r\n\r\n        this.bind(elements.progress, 'mouseenter mouseleave mousemove', function (event) {\r\n          return controls.updateSeekTooltip.call(player, event);\r\n        }); // Preview thumbnails plugin\r\n        // TODO: Really need to work on some sort of plug-in wide event bus or pub-sub for this\r\n\r\n        this.bind(elements.progress, 'mousemove touchmove', function (event) {\r\n          var previewThumbnails = player.previewThumbnails;\r\n\r\n          if (previewThumbnails && previewThumbnails.loaded) {\r\n            previewThumbnails.startMove(event);\r\n          }\r\n        }); // Hide thumbnail preview - on mouse click, mouse leave, and video play/seek. All four are required, e.g., for buffering\r\n\r\n        this.bind(elements.progress, 'mouseleave touchend click', function () {\r\n          var previewThumbnails = player.previewThumbnails;\r\n\r\n          if (previewThumbnails && previewThumbnails.loaded) {\r\n            previewThumbnails.endMove(false, true);\r\n          }\r\n        }); // Show scrubbing preview\r\n\r\n        this.bind(elements.progress, 'mousedown touchstart', function (event) {\r\n          var previewThumbnails = player.previewThumbnails;\r\n\r\n          if (previewThumbnails && previewThumbnails.loaded) {\r\n            previewThumbnails.startScrubbing(event);\r\n          }\r\n        });\r\n        this.bind(elements.progress, 'mouseup touchend', function (event) {\r\n          var previewThumbnails = player.previewThumbnails;\r\n\r\n          if (previewThumbnails && previewThumbnails.loaded) {\r\n            previewThumbnails.endScrubbing(event);\r\n          }\r\n        }); // Polyfill for lower fill in <input type=\"range\"> for webkit\r\n\r\n        if (browser.isWebkit) {\r\n          Array.from(getElements.call(player, 'input[type=\"range\"]')).forEach(function (element) {\r\n            _this3.bind(element, 'input', function (event) {\r\n              return controls.updateRangeFill.call(player, event.target);\r\n            });\r\n          });\r\n        } // Current time invert\r\n        // Only if one time element is used for both currentTime and duration\r\n\r\n\r\n        if (player.config.toggleInvert && !is$1.element(elements.display.duration)) {\r\n          this.bind(elements.display.currentTime, 'click', function () {\r\n            // Do nothing if we're at the start\r\n            if (player.currentTime === 0) {\r\n              return;\r\n            }\r\n\r\n            player.config.invertTime = !player.config.invertTime;\r\n\r\n            controls.timeUpdate.call(player);\r\n          });\r\n        } // Volume\r\n\r\n\r\n        this.bind(elements.inputs.volume, inputEvent, function (event) {\r\n          player.volume = event.target.value;\r\n        }, 'volume'); // Update controls.hover state (used for ui.toggleControls to avoid hiding when interacting)\r\n\r\n        this.bind(elements.controls, 'mouseenter mouseleave', function (event) {\r\n          elements.controls.hover = !player.touch && event.type === 'mouseenter';\r\n        }); // Also update controls.hover state for any non-player children of fullscreen element (as above)\r\n\r\n        if (elements.fullscreen) {\r\n          Array.from(elements.fullscreen.children).filter(function (c) {\r\n            return !c.contains(elements.container);\r\n          }).forEach(function (child) {\r\n            _this3.bind(child, 'mouseenter mouseleave', function (event) {\r\n              elements.controls.hover = !player.touch && event.type === 'mouseenter';\r\n            });\r\n          });\r\n        } // Update controls.pressed state (used for ui.toggleControls to avoid hiding when interacting)\r\n\r\n\r\n        this.bind(elements.controls, 'mousedown mouseup touchstart touchend touchcancel', function (event) {\r\n          elements.controls.pressed = ['mousedown', 'touchstart'].includes(event.type);\r\n        }); // Show controls when they receive focus (e.g., when using keyboard tab key)\r\n\r\n        this.bind(elements.controls, 'focusin', function () {\r\n          var config = player.config,\r\n              timers = player.timers; // Skip transition to prevent focus from scrolling the parent element\r\n\r\n          toggleClass(elements.controls, config.classNames.noTransition, true); // Toggle\r\n\r\n          ui.toggleControls.call(player, true); // Restore transition\r\n\r\n          setTimeout(function () {\r\n            toggleClass(elements.controls, config.classNames.noTransition, false);\r\n          }, 0); // Delay a little more for mouse users\r\n\r\n          var delay = _this3.touch ? 3000 : 4000; // Clear timer\r\n\r\n          clearTimeout(timers.controls); // Hide again after delay\r\n\r\n          timers.controls = setTimeout(function () {\r\n            return ui.toggleControls.call(player, false);\r\n          }, delay);\r\n        }); // Mouse wheel for volume\r\n\r\n        this.bind(elements.inputs.volume, 'wheel', function (event) {\r\n          // Detect \"natural\" scroll - suppored on OS X Safari only\r\n          // Other browsers on OS X will be inverted until support improves\r\n          var inverted = event.webkitDirectionInvertedFromDevice; // Get delta from event. Invert if `inverted` is true\r\n\r\n          var _map = [event.deltaX, -event.deltaY].map(function (value) {\r\n            return inverted ? -value : value;\r\n          }),\r\n              _map2 = _slicedToArray(_map, 2),\r\n              x = _map2[0],\r\n              y = _map2[1]; // Using the biggest delta, normalize to 1 or -1 (or 0 if no delta)\r\n\r\n\r\n          var direction = Math.sign(Math.abs(x) > Math.abs(y) ? x : y); // Change the volume by 2%\r\n\r\n          player.increaseVolume(direction / 50); // Don't break page scrolling at max and min\r\n\r\n          var volume = player.media.volume;\r\n\r\n          if (direction === 1 && volume < 1 || direction === -1 && volume > 0) {\r\n            event.preventDefault();\r\n          }\r\n        }, 'volume', false);\r\n      }\r\n    }]);\r\n\r\n    return Listeners;\r\n  }();\r\n\r\n  var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};\r\n\r\n  function createCommonjsModule(fn, module) {\r\n  \treturn module = { exports: {} }, fn(module, module.exports), module.exports;\r\n  }\r\n\r\n  var loadjs_umd = createCommonjsModule(function (module, exports) {\r\n    (function (root, factory) {\r\n      {\r\n        module.exports = factory();\r\n      }\r\n    })(commonjsGlobal, function () {\r\n      /**\r\n       * Global dependencies.\r\n       * @global {Object} document - DOM\r\n       */\r\n      var devnull = function devnull() {},\r\n          bundleIdCache = {},\r\n          bundleResultCache = {},\r\n          bundleCallbackQueue = {};\r\n      /**\r\n       * Subscribe to bundle load event.\r\n       * @param {string[]} bundleIds - Bundle ids\r\n       * @param {Function} callbackFn - The callback function\r\n       */\r\n\r\n\r\n      function subscribe(bundleIds, callbackFn) {\r\n        // listify\r\n        bundleIds = bundleIds.push ? bundleIds : [bundleIds];\r\n        var depsNotFound = [],\r\n            i = bundleIds.length,\r\n            numWaiting = i,\r\n            fn,\r\n            bundleId,\r\n            r,\r\n            q; // define callback function\r\n\r\n        fn = function fn(bundleId, pathsNotFound) {\r\n          if (pathsNotFound.length) depsNotFound.push(bundleId);\r\n          numWaiting--;\r\n          if (!numWaiting) callbackFn(depsNotFound);\r\n        }; // register callback\r\n\r\n\r\n        while (i--) {\r\n          bundleId = bundleIds[i]; // execute callback if in result cache\r\n\r\n          r = bundleResultCache[bundleId];\r\n\r\n          if (r) {\r\n            fn(bundleId, r);\r\n            continue;\r\n          } // add to callback queue\r\n\r\n\r\n          q = bundleCallbackQueue[bundleId] = bundleCallbackQueue[bundleId] || [];\r\n          q.push(fn);\r\n        }\r\n      }\r\n      /**\r\n       * Publish bundle load event.\r\n       * @param {string} bundleId - Bundle id\r\n       * @param {string[]} pathsNotFound - List of files not found\r\n       */\r\n\r\n\r\n      function publish(bundleId, pathsNotFound) {\r\n        // exit if id isn't defined\r\n        if (!bundleId) return;\r\n        var q = bundleCallbackQueue[bundleId]; // cache result\r\n\r\n        bundleResultCache[bundleId] = pathsNotFound; // exit if queue is empty\r\n\r\n        if (!q) return; // empty callback queue\r\n\r\n        while (q.length) {\r\n          q[0](bundleId, pathsNotFound);\r\n          q.splice(0, 1);\r\n        }\r\n      }\r\n      /**\r\n       * Execute callbacks.\r\n       * @param {Object or Function} args - The callback args\r\n       * @param {string[]} depsNotFound - List of dependencies not found\r\n       */\r\n\r\n\r\n      function executeCallbacks(args, depsNotFound) {\r\n        // accept function as argument\r\n        if (args.call) args = {\r\n          success: args\r\n        }; // success and error callbacks\r\n\r\n        if (depsNotFound.length) (args.error || devnull)(depsNotFound);else (args.success || devnull)(args);\r\n      }\r\n      /**\r\n       * Load individual file.\r\n       * @param {string} path - The file path\r\n       * @param {Function} callbackFn - The callback function\r\n       */\r\n\r\n\r\n      function loadFile(path, callbackFn, args, numTries) {\r\n        var doc = document,\r\n            async = args.async,\r\n            maxTries = (args.numRetries || 0) + 1,\r\n            beforeCallbackFn = args.before || devnull,\r\n            pathname = path.replace(/[\\?|#].*$/, ''),\r\n            pathStripped = path.replace(/^(css|img)!/, ''),\r\n            isLegacyIECss,\r\n            e;\r\n        numTries = numTries || 0;\r\n\r\n        if (/(^css!|\\.css$)/.test(pathname)) {\r\n          // css\r\n          e = doc.createElement('link');\r\n          e.rel = 'stylesheet';\r\n          e.href = pathStripped; // tag IE9+\r\n\r\n          isLegacyIECss = 'hideFocus' in e; // use preload in IE Edge (to detect load errors)\r\n\r\n          if (isLegacyIECss && e.relList) {\r\n            isLegacyIECss = 0;\r\n            e.rel = 'preload';\r\n            e.as = 'style';\r\n          }\r\n        } else if (/(^img!|\\.(png|gif|jpg|svg|webp)$)/.test(pathname)) {\r\n          // image\r\n          e = doc.createElement('img');\r\n          e.src = pathStripped;\r\n        } else {\r\n          // javascript\r\n          e = doc.createElement('script');\r\n          e.src = path;\r\n          e.async = async === undefined ? true : async;\r\n        }\r\n\r\n        e.onload = e.onerror = e.onbeforeload = function (ev) {\r\n          var result = ev.type[0]; // treat empty stylesheets as failures to get around lack of onerror\r\n          // support in IE9-11\r\n\r\n          if (isLegacyIECss) {\r\n            try {\r\n              if (!e.sheet.cssText.length) result = 'e';\r\n            } catch (x) {\r\n              // sheets objects created from load errors don't allow access to\r\n              // `cssText` (unless error is Code:18 SecurityError)\r\n              if (x.code != 18) result = 'e';\r\n            }\r\n          } // handle retries in case of load failure\r\n\r\n\r\n          if (result == 'e') {\r\n            // increment counter\r\n            numTries += 1; // exit function and try again\r\n\r\n            if (numTries < maxTries) {\r\n              return loadFile(path, callbackFn, args, numTries);\r\n            }\r\n          } else if (e.rel == 'preload' && e.as == 'style') {\r\n            // activate preloaded stylesheets\r\n            return e.rel = 'stylesheet'; // jshint ignore:line\r\n          } // execute callback\r\n\r\n\r\n          callbackFn(path, result, ev.defaultPrevented);\r\n        }; // add to document (unless callback returns `false`)\r\n\r\n\r\n        if (beforeCallbackFn(path, e) !== false) doc.head.appendChild(e);\r\n      }\r\n      /**\r\n       * Load multiple files.\r\n       * @param {string[]} paths - The file paths\r\n       * @param {Function} callbackFn - The callback function\r\n       */\r\n\r\n\r\n      function loadFiles(paths, callbackFn, args) {\r\n        // listify paths\r\n        paths = paths.push ? paths : [paths];\r\n        var numWaiting = paths.length,\r\n            x = numWaiting,\r\n            pathsNotFound = [],\r\n            fn,\r\n            i; // define callback function\r\n\r\n        fn = function fn(path, result, defaultPrevented) {\r\n          // handle error\r\n          if (result == 'e') pathsNotFound.push(path); // handle beforeload event. If defaultPrevented then that means the load\r\n          // will be blocked (ex. Ghostery/ABP on Safari)\r\n\r\n          if (result == 'b') {\r\n            if (defaultPrevented) pathsNotFound.push(path);else return;\r\n          }\r\n\r\n          numWaiting--;\r\n          if (!numWaiting) callbackFn(pathsNotFound);\r\n        }; // load scripts\r\n\r\n\r\n        for (i = 0; i < x; i++) {\r\n          loadFile(paths[i], fn, args);\r\n        }\r\n      }\r\n      /**\r\n       * Initiate script load and register bundle.\r\n       * @param {(string|string[])} paths - The file paths\r\n       * @param {(string|Function|Object)} [arg1] - The (1) bundleId or (2) success\r\n       *   callback or (3) object literal with success/error arguments, numRetries,\r\n       *   etc.\r\n       * @param {(Function|Object)} [arg2] - The (1) success callback or (2) object\r\n       *   literal with success/error arguments, numRetries, etc.\r\n       */\r\n\r\n\r\n      function loadjs(paths, arg1, arg2) {\r\n        var bundleId, args; // bundleId (if string)\r\n\r\n        if (arg1 && arg1.trim) bundleId = arg1; // args (default is {})\r\n\r\n        args = (bundleId ? arg2 : arg1) || {}; // throw error if bundle is already defined\r\n\r\n        if (bundleId) {\r\n          if (bundleId in bundleIdCache) {\r\n            throw \"LoadJS\";\r\n          } else {\r\n            bundleIdCache[bundleId] = true;\r\n          }\r\n        }\r\n\r\n        function loadFn(resolve, reject) {\r\n          loadFiles(paths, function (pathsNotFound) {\r\n            // execute callbacks\r\n            executeCallbacks(args, pathsNotFound); // resolve Promise\r\n\r\n            if (resolve) {\r\n              executeCallbacks({\r\n                success: resolve,\r\n                error: reject\r\n              }, pathsNotFound);\r\n            } // publish bundle load event\r\n\r\n\r\n            publish(bundleId, pathsNotFound);\r\n          }, args);\r\n        }\r\n\r\n        if (args.returnPromise) return new Promise(loadFn);else loadFn();\r\n      }\r\n      /**\r\n       * Execute callbacks when dependencies have been satisfied.\r\n       * @param {(string|string[])} deps - List of bundle ids\r\n       * @param {Object} args - success/error arguments\r\n       */\r\n\r\n\r\n      loadjs.ready = function ready(deps, args) {\r\n        // subscribe to bundle load event\r\n        subscribe(deps, function (depsNotFound) {\r\n          // execute callbacks\r\n          executeCallbacks(args, depsNotFound);\r\n        });\r\n        return loadjs;\r\n      };\r\n      /**\r\n       * Manually satisfy bundle dependencies.\r\n       * @param {string} bundleId - The bundle id\r\n       */\r\n\r\n\r\n      loadjs.done = function done(bundleId) {\r\n        publish(bundleId, []);\r\n      };\r\n      /**\r\n       * Reset loadjs dependencies statuses\r\n       */\r\n\r\n\r\n      loadjs.reset = function reset() {\r\n        bundleIdCache = {};\r\n        bundleResultCache = {};\r\n        bundleCallbackQueue = {};\r\n      };\r\n      /**\r\n       * Determine if bundle has already been defined\r\n       * @param String} bundleId - The bundle id\r\n       */\r\n\r\n\r\n      loadjs.isDefined = function isDefined(bundleId) {\r\n        return bundleId in bundleIdCache;\r\n      }; // export\r\n\r\n\r\n      return loadjs;\r\n    });\r\n  });\r\n\r\n  // ==========================================================================\r\n  function loadScript(url) {\r\n    return new Promise(function (resolve, reject) {\r\n      loadjs_umd(url, {\r\n        success: resolve,\r\n        error: reject\r\n      });\r\n    });\r\n  }\r\n\r\n  function parseId(url) {\r\n    if (is$1.empty(url)) {\r\n      return null;\r\n    }\r\n\r\n    if (is$1.number(Number(url))) {\r\n      return url;\r\n    }\r\n\r\n    var regex = /^.*(vimeo.com\\/|video\\/)(\\d+).*/;\r\n    return url.match(regex) ? RegExp.$2 : url;\r\n  } // Set playback state and trigger change (only on actual change)\r\n\r\n\r\n  function assurePlaybackState(play) {\r\n    if (play && !this.embed.hasPlayed) {\r\n      this.embed.hasPlayed = true;\r\n    }\r\n\r\n    if (this.media.paused === play) {\r\n      this.media.paused = !play;\r\n      triggerEvent.call(this, this.media, play ? 'play' : 'pause');\r\n    }\r\n  }\r\n\r\n  var vimeo = {\r\n    setup: function setup() {\r\n      var player = this; // Add embed class for responsive\r\n\r\n      toggleClass(player.elements.wrapper, player.config.classNames.embed, true); // Set speed options from config\r\n\r\n      player.options.speed = player.config.speed.options; // Set intial ratio\r\n\r\n      setAspectRatio.call(player); // Load the SDK if not already\r\n\r\n      if (!is$1.object(window.Vimeo)) {\r\n        loadScript(player.config.urls.vimeo.sdk).then(function () {\r\n          vimeo.ready.call(player);\r\n        }).catch(function (error) {\r\n          player.debug.warn('Vimeo SDK (player.js) failed to load', error);\r\n        });\r\n      } else {\r\n        vimeo.ready.call(player);\r\n      }\r\n    },\r\n    // API Ready\r\n    ready: function ready() {\r\n      var _this = this;\r\n\r\n      var player = this;\r\n      var config = player.config.vimeo;\r\n\r\n      var premium = config.premium,\r\n          referrerPolicy = config.referrerPolicy,\r\n          frameParams = _objectWithoutProperties(config, [\"premium\", \"referrerPolicy\"]); // If the owner has a pro or premium account then we can hide controls etc\r\n\r\n\r\n      if (premium) {\r\n        Object.assign(frameParams, {\r\n          controls: false,\r\n          sidedock: false\r\n        });\r\n      } // Get Vimeo params for the iframe\r\n\r\n\r\n      var params = buildUrlParams(_objectSpread2({\r\n        loop: player.config.loop.active,\r\n        autoplay: player.autoplay,\r\n        muted: player.muted,\r\n        gesture: 'media',\r\n        playsinline: !this.config.fullscreen.iosNative\r\n      }, frameParams)); // Get the source URL or ID\r\n\r\n      var source = player.media.getAttribute('src'); // Get from <div> if needed\r\n\r\n      if (is$1.empty(source)) {\r\n        source = player.media.getAttribute(player.config.attributes.embed.id);\r\n      }\r\n\r\n      var id = parseId(source); // Build an iframe\r\n\r\n      var iframe = createElement('iframe');\r\n      var src = format(player.config.urls.vimeo.iframe, id, params);\r\n      iframe.setAttribute('src', src);\r\n      iframe.setAttribute('allowfullscreen', '');\r\n      iframe.setAttribute('allow', 'autoplay,fullscreen,picture-in-picture'); // Set the referrer policy if required\r\n\r\n      if (!is$1.empty(referrerPolicy)) {\r\n        iframe.setAttribute('referrerPolicy', referrerPolicy);\r\n      } // Inject the package\r\n\r\n\r\n      var poster = player.poster;\r\n\r\n      if (premium) {\r\n        iframe.setAttribute('data-poster', poster);\r\n        player.media = replaceElement(iframe, player.media);\r\n      } else {\r\n        var wrapper = createElement('div', {\r\n          class: player.config.classNames.embedContainer,\r\n          'data-poster': poster\r\n        });\r\n        wrapper.appendChild(iframe);\r\n        player.media = replaceElement(wrapper, player.media);\r\n      } // Get poster image\r\n\r\n\r\n      fetch(format(player.config.urls.vimeo.api, id), 'json').then(function (response) {\r\n        if (is$1.empty(response)) {\r\n          return;\r\n        } // Get the URL for thumbnail\r\n\r\n\r\n        var url = new URL(response[0].thumbnail_large); // Get original image\r\n\r\n        url.pathname = \"\".concat(url.pathname.split('_')[0], \".jpg\"); // Set and show poster\r\n\r\n        ui.setPoster.call(player, url.href).catch(function () {});\r\n      }); // Setup instance\r\n      // https://github.com/vimeo/player.js\r\n\r\n      player.embed = new window.Vimeo.Player(iframe, {\r\n        autopause: player.config.autopause,\r\n        muted: player.muted\r\n      });\r\n      player.media.paused = true;\r\n      player.media.currentTime = 0; // Disable native text track rendering\r\n\r\n      if (player.supported.ui) {\r\n        player.embed.disableTextTrack();\r\n      } // Create a faux HTML5 API using the Vimeo API\r\n\r\n\r\n      player.media.play = function () {\r\n        assurePlaybackState.call(player, true);\r\n        return player.embed.play();\r\n      };\r\n\r\n      player.media.pause = function () {\r\n        assurePlaybackState.call(player, false);\r\n        return player.embed.pause();\r\n      };\r\n\r\n      player.media.stop = function () {\r\n        player.pause();\r\n        player.currentTime = 0;\r\n      }; // Seeking\r\n\r\n\r\n      var currentTime = player.media.currentTime;\r\n      Object.defineProperty(player.media, 'currentTime', {\r\n        get: function get() {\r\n          return currentTime;\r\n        },\r\n        set: function set(time) {\r\n          // Vimeo will automatically play on seek if the video hasn't been played before\r\n          // Get current paused state and volume etc\r\n          var embed = player.embed,\r\n              media = player.media,\r\n              paused = player.paused,\r\n              volume = player.volume;\r\n          var restorePause = paused && !embed.hasPlayed; // Set seeking state and trigger event\r\n\r\n          media.seeking = true;\r\n          triggerEvent.call(player, media, 'seeking'); // If paused, mute until seek is complete\r\n\r\n          Promise.resolve(restorePause && embed.setVolume(0)) // Seek\r\n          .then(function () {\r\n            return embed.setCurrentTime(time);\r\n          }) // Restore paused\r\n          .then(function () {\r\n            return restorePause && embed.pause();\r\n          }) // Restore volume\r\n          .then(function () {\r\n            return restorePause && embed.setVolume(volume);\r\n          }).catch(function () {// Do nothing\r\n          });\r\n        }\r\n      }); // Playback speed\r\n\r\n      var speed = player.config.speed.selected;\r\n      Object.defineProperty(player.media, 'playbackRate', {\r\n        get: function get() {\r\n          return speed;\r\n        },\r\n        set: function set(input) {\r\n          player.embed.setPlaybackRate(input).then(function () {\r\n            speed = input;\r\n            triggerEvent.call(player, player.media, 'ratechange');\r\n          }).catch(function () {\r\n            // Cannot set Playback Rate, Video is probably not on Pro account\r\n            player.options.speed = [1];\r\n          });\r\n        }\r\n      }); // Volume\r\n\r\n      var volume = player.config.volume;\r\n      Object.defineProperty(player.media, 'volume', {\r\n        get: function get() {\r\n          return volume;\r\n        },\r\n        set: function set(input) {\r\n          player.embed.setVolume(input).then(function () {\r\n            volume = input;\r\n            triggerEvent.call(player, player.media, 'volumechange');\r\n          });\r\n        }\r\n      }); // Muted\r\n\r\n      var muted = player.config.muted;\r\n      Object.defineProperty(player.media, 'muted', {\r\n        get: function get() {\r\n          return muted;\r\n        },\r\n        set: function set(input) {\r\n          var toggle = is$1.boolean(input) ? input : false;\r\n          player.embed.setVolume(toggle ? 0 : player.config.volume).then(function () {\r\n            muted = toggle;\r\n            triggerEvent.call(player, player.media, 'volumechange');\r\n          });\r\n        }\r\n      }); // Loop\r\n\r\n      var loop = player.config.loop;\r\n      Object.defineProperty(player.media, 'loop', {\r\n        get: function get() {\r\n          return loop;\r\n        },\r\n        set: function set(input) {\r\n          var toggle = is$1.boolean(input) ? input : player.config.loop.active;\r\n          player.embed.setLoop(toggle).then(function () {\r\n            loop = toggle;\r\n          });\r\n        }\r\n      }); // Source\r\n\r\n      var currentSrc;\r\n      player.embed.getVideoUrl().then(function (value) {\r\n        currentSrc = value;\r\n        controls.setDownloadUrl.call(player);\r\n      }).catch(function (error) {\r\n        _this.debug.warn(error);\r\n      });\r\n      Object.defineProperty(player.media, 'currentSrc', {\r\n        get: function get() {\r\n          return currentSrc;\r\n        }\r\n      }); // Ended\r\n\r\n      Object.defineProperty(player.media, 'ended', {\r\n        get: function get() {\r\n          return player.currentTime === player.duration;\r\n        }\r\n      }); // Set aspect ratio based on video size\r\n\r\n      Promise.all([player.embed.getVideoWidth(), player.embed.getVideoHeight()]).then(function (dimensions) {\r\n        var _dimensions = _slicedToArray(dimensions, 2),\r\n            width = _dimensions[0],\r\n            height = _dimensions[1];\r\n\r\n        player.embed.ratio = [width, height];\r\n        setAspectRatio.call(_this);\r\n      }); // Set autopause\r\n\r\n      player.embed.setAutopause(player.config.autopause).then(function (state) {\r\n        player.config.autopause = state;\r\n      }); // Get title\r\n\r\n      player.embed.getVideoTitle().then(function (title) {\r\n        player.config.title = title;\r\n        ui.setTitle.call(_this);\r\n      }); // Get current time\r\n\r\n      player.embed.getCurrentTime().then(function (value) {\r\n        currentTime = value;\r\n        triggerEvent.call(player, player.media, 'timeupdate');\r\n      }); // Get duration\r\n\r\n      player.embed.getDuration().then(function (value) {\r\n        player.media.duration = value;\r\n        triggerEvent.call(player, player.media, 'durationchange');\r\n      }); // Get captions\r\n\r\n      player.embed.getTextTracks().then(function (tracks) {\r\n        player.media.textTracks = tracks;\r\n        captions.setup.call(player);\r\n      });\r\n      player.embed.on('cuechange', function (_ref) {\r\n        var _ref$cues = _ref.cues,\r\n            cues = _ref$cues === void 0 ? [] : _ref$cues;\r\n        var strippedCues = cues.map(function (cue) {\r\n          return stripHTML(cue.text);\r\n        });\r\n        captions.updateCues.call(player, strippedCues);\r\n      });\r\n      player.embed.on('loaded', function () {\r\n        // Assure state and events are updated on autoplay\r\n        player.embed.getPaused().then(function (paused) {\r\n          assurePlaybackState.call(player, !paused);\r\n\r\n          if (!paused) {\r\n            triggerEvent.call(player, player.media, 'playing');\r\n          }\r\n        });\r\n\r\n        if (is$1.element(player.embed.element) && player.supported.ui) {\r\n          var frame = player.embed.element; // Fix keyboard focus issues\r\n          // https://github.com/sampotts/plyr/issues/317\r\n\r\n          frame.setAttribute('tabindex', -1);\r\n        }\r\n      });\r\n      player.embed.on('bufferstart', function () {\r\n        triggerEvent.call(player, player.media, 'waiting');\r\n      });\r\n      player.embed.on('bufferend', function () {\r\n        triggerEvent.call(player, player.media, 'playing');\r\n      });\r\n      player.embed.on('play', function () {\r\n        assurePlaybackState.call(player, true);\r\n        triggerEvent.call(player, player.media, 'playing');\r\n      });\r\n      player.embed.on('pause', function () {\r\n        assurePlaybackState.call(player, false);\r\n      });\r\n      player.embed.on('timeupdate', function (data) {\r\n        player.media.seeking = false;\r\n        currentTime = data.seconds;\r\n        triggerEvent.call(player, player.media, 'timeupdate');\r\n      });\r\n      player.embed.on('progress', function (data) {\r\n        player.media.buffered = data.percent;\r\n        triggerEvent.call(player, player.media, 'progress'); // Check all loaded\r\n\r\n        if (parseInt(data.percent, 10) === 1) {\r\n          triggerEvent.call(player, player.media, 'canplaythrough');\r\n        } // Get duration as if we do it before load, it gives an incorrect value\r\n        // https://github.com/sampotts/plyr/issues/891\r\n\r\n\r\n        player.embed.getDuration().then(function (value) {\r\n          if (value !== player.media.duration) {\r\n            player.media.duration = value;\r\n            triggerEvent.call(player, player.media, 'durationchange');\r\n          }\r\n        });\r\n      });\r\n      player.embed.on('seeked', function () {\r\n        player.media.seeking = false;\r\n        triggerEvent.call(player, player.media, 'seeked');\r\n      });\r\n      player.embed.on('ended', function () {\r\n        player.media.paused = true;\r\n        triggerEvent.call(player, player.media, 'ended');\r\n      });\r\n      player.embed.on('error', function (detail) {\r\n        player.media.error = detail;\r\n        triggerEvent.call(player, player.media, 'error');\r\n      }); // Rebuild UI\r\n\r\n      setTimeout(function () {\r\n        return ui.build.call(player);\r\n      }, 0);\r\n    }\r\n  };\r\n\r\n  // ==========================================================================\r\n\r\n  function parseId$1(url) {\r\n    if (is$1.empty(url)) {\r\n      return null;\r\n    }\r\n\r\n    var regex = /^.*(youtu.be\\/|v\\/|u\\/\\w\\/|embed\\/|watch\\?v=|&v=)([^#&?]*).*/;\r\n    return url.match(regex) ? RegExp.$2 : url;\r\n  } // Set playback state and trigger change (only on actual change)\r\n\r\n\r\n  function assurePlaybackState$1(play) {\r\n    if (play && !this.embed.hasPlayed) {\r\n      this.embed.hasPlayed = true;\r\n    }\r\n\r\n    if (this.media.paused === play) {\r\n      this.media.paused = !play;\r\n      triggerEvent.call(this, this.media, play ? 'play' : 'pause');\r\n    }\r\n  }\r\n\r\n  function getHost(config) {\r\n    if (config.noCookie) {\r\n      return 'https://www.youtube-nocookie.com';\r\n    }\r\n\r\n    if (window.location.protocol === 'http:') {\r\n      return 'http://www.youtube.com';\r\n    } // Use YouTube's default\r\n\r\n\r\n    return undefined;\r\n  }\r\n\r\n  var youtube = {\r\n    setup: function setup() {\r\n      var _this = this;\r\n\r\n      // Add embed class for responsive\r\n      toggleClass(this.elements.wrapper, this.config.classNames.embed, true); // Setup API\r\n\r\n      if (is$1.object(window.YT) && is$1.function(window.YT.Player)) {\r\n        youtube.ready.call(this);\r\n      } else {\r\n        // Reference current global callback\r\n        var callback = window.onYouTubeIframeAPIReady; // Set callback to process queue\r\n\r\n        window.onYouTubeIframeAPIReady = function () {\r\n          // Call global callback if set\r\n          if (is$1.function(callback)) {\r\n            callback();\r\n          }\r\n\r\n          youtube.ready.call(_this);\r\n        }; // Load the SDK\r\n\r\n\r\n        loadScript(this.config.urls.youtube.sdk).catch(function (error) {\r\n          _this.debug.warn('YouTube API failed to load', error);\r\n        });\r\n      }\r\n    },\r\n    // Get the media title\r\n    getTitle: function getTitle(videoId) {\r\n      var _this2 = this;\r\n\r\n      var url = format(this.config.urls.youtube.api, videoId);\r\n      fetch(url).then(function (data) {\r\n        if (is$1.object(data)) {\r\n          var title = data.title,\r\n              height = data.height,\r\n              width = data.width; // Set title\r\n\r\n          _this2.config.title = title;\r\n          ui.setTitle.call(_this2); // Set aspect ratio\r\n\r\n          _this2.embed.ratio = [width, height];\r\n        }\r\n\r\n        setAspectRatio.call(_this2);\r\n      }).catch(function () {\r\n        // Set aspect ratio\r\n        setAspectRatio.call(_this2);\r\n      });\r\n    },\r\n    // API ready\r\n    ready: function ready() {\r\n      var player = this; // Ignore already setup (race condition)\r\n\r\n      var currentId = player.media && player.media.getAttribute('id');\r\n\r\n      if (!is$1.empty(currentId) && currentId.startsWith('youtube-')) {\r\n        return;\r\n      } // Get the source URL or ID\r\n\r\n\r\n      var source = player.media.getAttribute('src'); // Get from <div> if needed\r\n\r\n      if (is$1.empty(source)) {\r\n        source = player.media.getAttribute(this.config.attributes.embed.id);\r\n      } // Replace the <iframe> with a <div> due to YouTube API issues\r\n\r\n\r\n      var videoId = parseId$1(source);\r\n      var id = generateId(player.provider); // Get poster, if already set\r\n\r\n      var poster = player.poster; // Replace media element\r\n\r\n      var container = createElement('div', {\r\n        id: id,\r\n        'data-poster': poster\r\n      });\r\n      player.media = replaceElement(container, player.media); // Id to poster wrapper\r\n\r\n      var posterSrc = function posterSrc(s) {\r\n        return \"https://i.ytimg.com/vi/\".concat(videoId, \"/\").concat(s, \"default.jpg\");\r\n      }; // Check thumbnail images in order of quality, but reject fallback thumbnails (120px wide)\r\n\r\n\r\n      loadImage(posterSrc('maxres'), 121) // Higest quality and unpadded\r\n      .catch(function () {\r\n        return loadImage(posterSrc('sd'), 121);\r\n      }) // 480p padded 4:3\r\n      .catch(function () {\r\n        return loadImage(posterSrc('hq'));\r\n      }) // 360p padded 4:3. Always exists\r\n      .then(function (image) {\r\n        return ui.setPoster.call(player, image.src);\r\n      }).then(function (src) {\r\n        // If the image is padded, use background-size \"cover\" instead (like youtube does too with their posters)\r\n        if (!src.includes('maxres')) {\r\n          player.elements.poster.style.backgroundSize = 'cover';\r\n        }\r\n      }).catch(function () {});\r\n      var config = player.config.youtube; // Setup instance\r\n      // https://developers.google.com/youtube/iframe_api_reference\r\n\r\n      player.embed = new window.YT.Player(id, {\r\n        videoId: videoId,\r\n        host: getHost(config),\r\n        playerVars: extend({}, {\r\n          autoplay: player.config.autoplay ? 1 : 0,\r\n          // Autoplay\r\n          hl: player.config.hl,\r\n          // iframe interface language\r\n          controls: player.supported.ui ? 0 : 1,\r\n          // Only show controls if not fully supported\r\n          disablekb: 1,\r\n          // Disable keyboard as we handle it\r\n          playsinline: !player.config.fullscreen.iosNative ? 1 : 0,\r\n          // Allow iOS inline playback\r\n          // Captions are flaky on YouTube\r\n          cc_load_policy: player.captions.active ? 1 : 0,\r\n          cc_lang_pref: player.config.captions.language,\r\n          // Tracking for stats\r\n          widget_referrer: window ? window.location.href : null\r\n        }, config),\r\n        events: {\r\n          onError: function onError(event) {\r\n            // YouTube may fire onError twice, so only handle it once\r\n            if (!player.media.error) {\r\n              var code = event.data; // Messages copied from https://developers.google.com/youtube/iframe_api_reference#onError\r\n\r\n              var message = {\r\n                2: 'The request contains an invalid parameter value. For example, this error occurs if you specify a video ID that does not have 11 characters, or if the video ID contains invalid characters, such as exclamation points or asterisks.',\r\n                5: 'The requested content cannot be played in an HTML5 player or another error related to the HTML5 player has occurred.',\r\n                100: 'The video requested was not found. This error occurs when a video has been removed (for any reason) or has been marked as private.',\r\n                101: 'The owner of the requested video does not allow it to be played in embedded players.',\r\n                150: 'The owner of the requested video does not allow it to be played in embedded players.'\r\n              }[code] || 'An unknown error occured';\r\n              player.media.error = {\r\n                code: code,\r\n                message: message\r\n              };\r\n              triggerEvent.call(player, player.media, 'error');\r\n            }\r\n          },\r\n          onPlaybackRateChange: function onPlaybackRateChange(event) {\r\n            // Get the instance\r\n            var instance = event.target; // Get current speed\r\n\r\n            player.media.playbackRate = instance.getPlaybackRate();\r\n            triggerEvent.call(player, player.media, 'ratechange');\r\n          },\r\n          onReady: function onReady(event) {\r\n            // Bail if onReady has already been called. See issue #1108\r\n            if (is$1.function(player.media.play)) {\r\n              return;\r\n            } // Get the instance\r\n\r\n\r\n            var instance = event.target; // Get the title\r\n\r\n            youtube.getTitle.call(player, videoId); // Create a faux HTML5 API using the YouTube API\r\n\r\n            player.media.play = function () {\r\n              assurePlaybackState$1.call(player, true);\r\n              instance.playVideo();\r\n            };\r\n\r\n            player.media.pause = function () {\r\n              assurePlaybackState$1.call(player, false);\r\n              instance.pauseVideo();\r\n            };\r\n\r\n            player.media.stop = function () {\r\n              instance.stopVideo();\r\n            };\r\n\r\n            player.media.duration = instance.getDuration();\r\n            player.media.paused = true; // Seeking\r\n\r\n            player.media.currentTime = 0;\r\n            Object.defineProperty(player.media, 'currentTime', {\r\n              get: function get() {\r\n                return Number(instance.getCurrentTime());\r\n              },\r\n              set: function set(time) {\r\n                // If paused and never played, mute audio preventively (YouTube starts playing on seek if the video hasn't been played yet).\r\n                if (player.paused && !player.embed.hasPlayed) {\r\n                  player.embed.mute();\r\n                } // Set seeking state and trigger event\r\n\r\n\r\n                player.media.seeking = true;\r\n                triggerEvent.call(player, player.media, 'seeking'); // Seek after events sent\r\n\r\n                instance.seekTo(time);\r\n              }\r\n            }); // Playback speed\r\n\r\n            Object.defineProperty(player.media, 'playbackRate', {\r\n              get: function get() {\r\n                return instance.getPlaybackRate();\r\n              },\r\n              set: function set(input) {\r\n                instance.setPlaybackRate(input);\r\n              }\r\n            }); // Volume\r\n\r\n            var volume = player.config.volume;\r\n            Object.defineProperty(player.media, 'volume', {\r\n              get: function get() {\r\n                return volume;\r\n              },\r\n              set: function set(input) {\r\n                volume = input;\r\n                instance.setVolume(volume * 100);\r\n                triggerEvent.call(player, player.media, 'volumechange');\r\n              }\r\n            }); // Muted\r\n\r\n            var muted = player.config.muted;\r\n            Object.defineProperty(player.media, 'muted', {\r\n              get: function get() {\r\n                return muted;\r\n              },\r\n              set: function set(input) {\r\n                var toggle = is$1.boolean(input) ? input : muted;\r\n                muted = toggle;\r\n                instance[toggle ? 'mute' : 'unMute']();\r\n                triggerEvent.call(player, player.media, 'volumechange');\r\n              }\r\n            }); // Source\r\n\r\n            Object.defineProperty(player.media, 'currentSrc', {\r\n              get: function get() {\r\n                return instance.getVideoUrl();\r\n              }\r\n            }); // Ended\r\n\r\n            Object.defineProperty(player.media, 'ended', {\r\n              get: function get() {\r\n                return player.currentTime === player.duration;\r\n              }\r\n            }); // Get available speeds\r\n\r\n            var speeds = instance.getAvailablePlaybackRates(); // Filter based on config\r\n\r\n            player.options.speed = speeds.filter(function (s) {\r\n              return player.config.speed.options.includes(s);\r\n            }); // Set the tabindex to avoid focus entering iframe\r\n\r\n            if (player.supported.ui) {\r\n              player.media.setAttribute('tabindex', -1);\r\n            }\r\n\r\n            triggerEvent.call(player, player.media, 'timeupdate');\r\n            triggerEvent.call(player, player.media, 'durationchange'); // Reset timer\r\n\r\n            clearInterval(player.timers.buffering); // Setup buffering\r\n\r\n            player.timers.buffering = setInterval(function () {\r\n              // Get loaded % from YouTube\r\n              player.media.buffered = instance.getVideoLoadedFraction(); // Trigger progress only when we actually buffer something\r\n\r\n              if (player.media.lastBuffered === null || player.media.lastBuffered < player.media.buffered) {\r\n                triggerEvent.call(player, player.media, 'progress');\r\n              } // Set last buffer point\r\n\r\n\r\n              player.media.lastBuffered = player.media.buffered; // Bail if we're at 100%\r\n\r\n              if (player.media.buffered === 1) {\r\n                clearInterval(player.timers.buffering); // Trigger event\r\n\r\n                triggerEvent.call(player, player.media, 'canplaythrough');\r\n              }\r\n            }, 200); // Rebuild UI\r\n\r\n            setTimeout(function () {\r\n              return ui.build.call(player);\r\n            }, 50);\r\n          },\r\n          onStateChange: function onStateChange(event) {\r\n            // Get the instance\r\n            var instance = event.target; // Reset timer\r\n\r\n            clearInterval(player.timers.playing);\r\n            var seeked = player.media.seeking && [1, 2].includes(event.data);\r\n\r\n            if (seeked) {\r\n              // Unset seeking and fire seeked event\r\n              player.media.seeking = false;\r\n              triggerEvent.call(player, player.media, 'seeked');\r\n            } // Handle events\r\n            // -1   Unstarted\r\n            // 0    Ended\r\n            // 1    Playing\r\n            // 2    Paused\r\n            // 3    Buffering\r\n            // 5    Video cued\r\n\r\n\r\n            switch (event.data) {\r\n              case -1:\r\n                // Update scrubber\r\n                triggerEvent.call(player, player.media, 'timeupdate'); // Get loaded % from YouTube\r\n\r\n                player.media.buffered = instance.getVideoLoadedFraction();\r\n                triggerEvent.call(player, player.media, 'progress');\r\n                break;\r\n\r\n              case 0:\r\n                assurePlaybackState$1.call(player, false); // YouTube doesn't support loop for a single video, so mimick it.\r\n\r\n                if (player.media.loop) {\r\n                  // YouTube needs a call to `stopVideo` before playing again\r\n                  instance.stopVideo();\r\n                  instance.playVideo();\r\n                } else {\r\n                  triggerEvent.call(player, player.media, 'ended');\r\n                }\r\n\r\n                break;\r\n\r\n              case 1:\r\n                // Restore paused state (YouTube starts playing on seek if the video hasn't been played yet)\r\n                if (!player.config.autoplay && player.media.paused && !player.embed.hasPlayed) {\r\n                  player.media.pause();\r\n                } else {\r\n                  assurePlaybackState$1.call(player, true);\r\n                  triggerEvent.call(player, player.media, 'playing'); // Poll to get playback progress\r\n\r\n                  player.timers.playing = setInterval(function () {\r\n                    triggerEvent.call(player, player.media, 'timeupdate');\r\n                  }, 50); // Check duration again due to YouTube bug\r\n                  // https://github.com/sampotts/plyr/issues/374\r\n                  // https://code.google.com/p/gdata-issues/issues/detail?id=8690\r\n\r\n                  if (player.media.duration !== instance.getDuration()) {\r\n                    player.media.duration = instance.getDuration();\r\n                    triggerEvent.call(player, player.media, 'durationchange');\r\n                  }\r\n                }\r\n\r\n                break;\r\n\r\n              case 2:\r\n                // Restore audio (YouTube starts playing on seek if the video hasn't been played yet)\r\n                if (!player.muted) {\r\n                  player.embed.unMute();\r\n                }\r\n\r\n                assurePlaybackState$1.call(player, false);\r\n                break;\r\n\r\n              case 3:\r\n                // Trigger waiting event to add loading classes to container as the video buffers.\r\n                triggerEvent.call(player, player.media, 'waiting');\r\n                break;\r\n            }\r\n\r\n            triggerEvent.call(player, player.elements.container, 'statechange', false, {\r\n              code: event.data\r\n            });\r\n          }\r\n        }\r\n      });\r\n    }\r\n  };\r\n\r\n  // ==========================================================================\r\n  var media = {\r\n    // Setup media\r\n    setup: function setup() {\r\n      // If there's no media, bail\r\n      if (!this.media) {\r\n        this.debug.warn('No media element found!');\r\n        return;\r\n      } // Add type class\r\n\r\n\r\n      toggleClass(this.elements.container, this.config.classNames.type.replace('{0}', this.type), true); // Add provider class\r\n\r\n      toggleClass(this.elements.container, this.config.classNames.provider.replace('{0}', this.provider), true); // Add video class for embeds\r\n      // This will require changes if audio embeds are added\r\n\r\n      if (this.isEmbed) {\r\n        toggleClass(this.elements.container, this.config.classNames.type.replace('{0}', 'video'), true);\r\n      } // Inject the player wrapper\r\n\r\n\r\n      if (this.isVideo) {\r\n        // Create the wrapper div\r\n        this.elements.wrapper = createElement('div', {\r\n          class: this.config.classNames.video\r\n        }); // Wrap the video in a container\r\n\r\n        wrap(this.media, this.elements.wrapper); // Poster image container\r\n\r\n        this.elements.poster = createElement('div', {\r\n          class: this.config.classNames.poster\r\n        });\r\n        this.elements.wrapper.appendChild(this.elements.poster);\r\n      }\r\n\r\n      if (this.isHTML5) {\r\n        html5.setup.call(this);\r\n      } else if (this.isYouTube) {\r\n        youtube.setup.call(this);\r\n      } else if (this.isVimeo) {\r\n        vimeo.setup.call(this);\r\n      }\r\n    }\r\n  };\r\n\r\n  var destroy = function destroy(instance) {\r\n    // Destroy our adsManager\r\n    if (instance.manager) {\r\n      instance.manager.destroy();\r\n    } // Destroy our adsManager\r\n\r\n\r\n    if (instance.elements.displayContainer) {\r\n      instance.elements.displayContainer.destroy();\r\n    }\r\n\r\n    instance.elements.container.remove();\r\n  };\r\n\r\n  var Ads = /*#__PURE__*/function () {\r\n    /**\r\n     * Ads constructor.\r\n     * @param {Object} player\r\n     * @return {Ads}\r\n     */\r\n    function Ads(player) {\r\n      var _this = this;\r\n\r\n      _classCallCheck(this, Ads);\r\n\r\n      this.player = player;\r\n      this.config = player.config.ads;\r\n      this.playing = false;\r\n      this.initialized = false;\r\n      this.elements = {\r\n        container: null,\r\n        displayContainer: null\r\n      };\r\n      this.manager = null;\r\n      this.loader = null;\r\n      this.cuePoints = null;\r\n      this.events = {};\r\n      this.safetyTimer = null;\r\n      this.countdownTimer = null; // Setup a promise to resolve when the IMA manager is ready\r\n\r\n      this.managerPromise = new Promise(function (resolve, reject) {\r\n        // The ad is loaded and ready\r\n        _this.on('loaded', resolve); // Ads failed\r\n\r\n\r\n        _this.on('error', reject);\r\n      });\r\n      this.load();\r\n    }\r\n\r\n    _createClass(Ads, [{\r\n      key: \"load\",\r\n\r\n      /**\r\n       * Load the IMA SDK\r\n       */\r\n      value: function load() {\r\n        var _this2 = this;\r\n\r\n        if (!this.enabled) {\r\n          return;\r\n        } // Check if the Google IMA3 SDK is loaded or load it ourselves\r\n\r\n\r\n        if (!is$1.object(window.google) || !is$1.object(window.google.ima)) {\r\n          loadScript(this.player.config.urls.googleIMA.sdk).then(function () {\r\n            _this2.ready();\r\n          }).catch(function () {\r\n            // Script failed to load or is blocked\r\n            _this2.trigger('error', new Error('Google IMA SDK failed to load'));\r\n          });\r\n        } else {\r\n          this.ready();\r\n        }\r\n      }\r\n      /**\r\n       * Get the ads instance ready\r\n       */\r\n\r\n    }, {\r\n      key: \"ready\",\r\n      value: function ready() {\r\n        var _this3 = this;\r\n\r\n        // Double check we're enabled\r\n        if (!this.enabled) {\r\n          destroy(this);\r\n        } // Start ticking our safety timer. If the whole advertisement\r\n        // thing doesn't resolve within our set time; we bail\r\n\r\n\r\n        this.startSafetyTimer(12000, 'ready()'); // Clear the safety timer\r\n\r\n        this.managerPromise.then(function () {\r\n          _this3.clearSafetyTimer('onAdsManagerLoaded()');\r\n        }); // Set listeners on the Plyr instance\r\n\r\n        this.listeners(); // Setup the IMA SDK\r\n\r\n        this.setupIMA();\r\n      } // Build the tag URL\r\n\r\n    }, {\r\n      key: \"setupIMA\",\r\n\r\n      /**\r\n       * In order for the SDK to display ads for our video, we need to tell it where to put them,\r\n       * so here we define our ad container. This div is set up to render on top of the video player.\r\n       * Using the code below, we tell the SDK to render ads within that div. We also provide a\r\n       * handle to the content video player - the SDK will poll the current time of our player to\r\n       * properly place mid-rolls. After we create the ad display container, we initialize it. On\r\n       * mobile devices, this initialization is done as the result of a user action.\r\n       */\r\n      value: function setupIMA() {\r\n        var _this4 = this;\r\n\r\n        // Create the container for our advertisements\r\n        this.elements.container = createElement('div', {\r\n          class: this.player.config.classNames.ads\r\n        });\r\n        this.player.elements.container.appendChild(this.elements.container); // So we can run VPAID2\r\n\r\n        google.ima.settings.setVpaidMode(google.ima.ImaSdkSettings.VpaidMode.ENABLED); // Set language\r\n\r\n        google.ima.settings.setLocale(this.player.config.ads.language); // Set playback for iOS10+\r\n\r\n        google.ima.settings.setDisableCustomPlaybackForIOS10Plus(this.player.config.playsinline); // We assume the adContainer is the video container of the plyr element that will house the ads\r\n\r\n        this.elements.displayContainer = new google.ima.AdDisplayContainer(this.elements.container, this.player.media); // Create ads loader\r\n\r\n        this.loader = new google.ima.AdsLoader(this.elements.displayContainer); // Listen and respond to ads loaded and error events\r\n\r\n        this.loader.addEventListener(google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED, function (event) {\r\n          return _this4.onAdsManagerLoaded(event);\r\n        }, false);\r\n        this.loader.addEventListener(google.ima.AdErrorEvent.Type.AD_ERROR, function (error) {\r\n          return _this4.onAdError(error);\r\n        }, false); // Request video ads to be pre-loaded\r\n\r\n        this.requestAds();\r\n      }\r\n      /**\r\n       * Request advertisements\r\n       */\r\n\r\n    }, {\r\n      key: \"requestAds\",\r\n      value: function requestAds() {\r\n        var container = this.player.elements.container;\r\n\r\n        try {\r\n          // Request video ads\r\n          var request = new google.ima.AdsRequest();\r\n          request.adTagUrl = this.tagUrl; // Specify the linear and nonlinear slot sizes. This helps the SDK\r\n          // to select the correct creative if multiple are returned\r\n\r\n          request.linearAdSlotWidth = container.offsetWidth;\r\n          request.linearAdSlotHeight = container.offsetHeight;\r\n          request.nonLinearAdSlotWidth = container.offsetWidth;\r\n          request.nonLinearAdSlotHeight = container.offsetHeight; // We only overlay ads as we only support video.\r\n\r\n          request.forceNonLinearFullSlot = false; // Mute based on current state\r\n\r\n          request.setAdWillPlayMuted(!this.player.muted);\r\n          this.loader.requestAds(request);\r\n        } catch (e) {\r\n          this.onAdError(e);\r\n        }\r\n      }\r\n      /**\r\n       * Update the ad countdown\r\n       * @param {Boolean} start\r\n       */\r\n\r\n    }, {\r\n      key: \"pollCountdown\",\r\n      value: function pollCountdown() {\r\n        var _this5 = this;\r\n\r\n        var start = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\r\n\r\n        if (!start) {\r\n          clearInterval(this.countdownTimer);\r\n          this.elements.container.removeAttribute('data-badge-text');\r\n          return;\r\n        }\r\n\r\n        var update = function update() {\r\n          var time = formatTime(Math.max(_this5.manager.getRemainingTime(), 0));\r\n          var label = \"\".concat(i18n.get('advertisement', _this5.player.config), \" - \").concat(time);\r\n\r\n          _this5.elements.container.setAttribute('data-badge-text', label);\r\n        };\r\n\r\n        this.countdownTimer = setInterval(update, 100);\r\n      }\r\n      /**\r\n       * This method is called whenever the ads are ready inside the AdDisplayContainer\r\n       * @param {Event} adsManagerLoadedEvent\r\n       */\r\n\r\n    }, {\r\n      key: \"onAdsManagerLoaded\",\r\n      value: function onAdsManagerLoaded(event) {\r\n        var _this6 = this;\r\n\r\n        // Load could occur after a source change (race condition)\r\n        if (!this.enabled) {\r\n          return;\r\n        } // Get the ads manager\r\n\r\n\r\n        var settings = new google.ima.AdsRenderingSettings(); // Tell the SDK to save and restore content video state on our behalf\r\n\r\n        settings.restoreCustomPlaybackStateOnAdBreakComplete = true;\r\n        settings.enablePreloading = true; // The SDK is polling currentTime on the contentPlayback. And needs a duration\r\n        // so it can determine when to start the mid- and post-roll\r\n\r\n        this.manager = event.getAdsManager(this.player, settings); // Get the cue points for any mid-rolls by filtering out the pre- and post-roll\r\n\r\n        this.cuePoints = this.manager.getCuePoints(); // Add listeners to the required events\r\n        // Advertisement error events\r\n\r\n        this.manager.addEventListener(google.ima.AdErrorEvent.Type.AD_ERROR, function (error) {\r\n          return _this6.onAdError(error);\r\n        }); // Advertisement regular events\r\n\r\n        Object.keys(google.ima.AdEvent.Type).forEach(function (type) {\r\n          _this6.manager.addEventListener(google.ima.AdEvent.Type[type], function (e) {\r\n            return _this6.onAdEvent(e);\r\n          });\r\n        }); // Resolve our adsManager\r\n\r\n        this.trigger('loaded');\r\n      }\r\n    }, {\r\n      key: \"addCuePoints\",\r\n      value: function addCuePoints() {\r\n        var _this7 = this;\r\n\r\n        // Add advertisement cue's within the time line if available\r\n        if (!is$1.empty(this.cuePoints)) {\r\n          this.cuePoints.forEach(function (cuePoint) {\r\n            if (cuePoint !== 0 && cuePoint !== -1 && cuePoint < _this7.player.duration) {\r\n              var seekElement = _this7.player.elements.progress;\r\n\r\n              if (is$1.element(seekElement)) {\r\n                var cuePercentage = 100 / _this7.player.duration * cuePoint;\r\n                var cue = createElement('span', {\r\n                  class: _this7.player.config.classNames.cues\r\n                });\r\n                cue.style.left = \"\".concat(cuePercentage.toString(), \"%\");\r\n                seekElement.appendChild(cue);\r\n              }\r\n            }\r\n          });\r\n        }\r\n      }\r\n      /**\r\n       * This is where all the event handling takes place. Retrieve the ad from the event. Some\r\n       * events (e.g. ALL_ADS_COMPLETED) don't have the ad object associated\r\n       * https://developers.google.com/interactive-media-ads/docs/sdks/html5/v3/apis#ima.AdEvent.Type\r\n       * @param {Event} event\r\n       */\r\n\r\n    }, {\r\n      key: \"onAdEvent\",\r\n      value: function onAdEvent(event) {\r\n        var _this8 = this;\r\n\r\n        var container = this.player.elements.container; // Retrieve the ad from the event. Some events (e.g. ALL_ADS_COMPLETED)\r\n        // don't have ad object associated\r\n\r\n        var ad = event.getAd();\r\n        var adData = event.getAdData(); // Proxy event\r\n\r\n        var dispatchEvent = function dispatchEvent(type) {\r\n          triggerEvent.call(_this8.player, _this8.player.media, \"ads\".concat(type.replace(/_/g, '').toLowerCase()));\r\n        }; // Bubble the event\r\n\r\n\r\n        dispatchEvent(event.type);\r\n\r\n        switch (event.type) {\r\n          case google.ima.AdEvent.Type.LOADED:\r\n            // This is the first event sent for an ad - it is possible to determine whether the\r\n            // ad is a video ad or an overlay\r\n            this.trigger('loaded'); // Start countdown\r\n\r\n            this.pollCountdown(true);\r\n\r\n            if (!ad.isLinear()) {\r\n              // Position AdDisplayContainer correctly for overlay\r\n              ad.width = container.offsetWidth;\r\n              ad.height = container.offsetHeight;\r\n            } // console.info('Ad type: ' + event.getAd().getAdPodInfo().getPodIndex());\r\n            // console.info('Ad time: ' + event.getAd().getAdPodInfo().getTimeOffset());\r\n\r\n\r\n            break;\r\n\r\n          case google.ima.AdEvent.Type.STARTED:\r\n            // Set volume to match player\r\n            this.manager.setVolume(this.player.volume);\r\n            break;\r\n\r\n          case google.ima.AdEvent.Type.ALL_ADS_COMPLETED:\r\n            // All ads for the current videos are done. We can now request new advertisements\r\n            // in case the video is re-played\r\n            // TODO: Example for what happens when a next video in a playlist would be loaded.\r\n            // So here we load a new video when all ads are done.\r\n            // Then we load new ads within a new adsManager. When the video\r\n            // Is started - after - the ads are loaded, then we get ads.\r\n            // You can also easily test cancelling and reloading by running\r\n            // player.ads.cancel() and player.ads.play from the console I guess.\r\n            // this.player.source = {\r\n            //     type: 'video',\r\n            //     title: 'View From A Blue Moon',\r\n            //     sources: [{\r\n            //         src:\r\n            // 'https://cdn.plyr.io/static/demo/View_From_A_Blue_Moon_Trailer-HD.mp4', type:\r\n            // 'video/mp4', }], poster:\r\n            // 'https://cdn.plyr.io/static/demo/View_From_A_Blue_Moon_Trailer-HD.jpg', tracks:\r\n            // [ { kind: 'captions', label: 'English', srclang: 'en', src:\r\n            // 'https://cdn.plyr.io/static/demo/View_From_A_Blue_Moon_Trailer-HD.en.vtt',\r\n            // default: true, }, { kind: 'captions', label: 'French', srclang: 'fr', src:\r\n            // 'https://cdn.plyr.io/static/demo/View_From_A_Blue_Moon_Trailer-HD.fr.vtt', }, ],\r\n            // };\r\n            // TODO: So there is still this thing where a video should only be allowed to start\r\n            // playing when the IMA SDK is ready or has failed\r\n            if (this.player.ended) {\r\n              this.loadAds();\r\n            } else {\r\n              // The SDK won't allow new ads to be called without receiving a contentComplete()\r\n              this.loader.contentComplete();\r\n            }\r\n\r\n            break;\r\n\r\n          case google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED:\r\n            // This event indicates the ad has started - the video player can adjust the UI,\r\n            // for example display a pause button and remaining time. Fired when content should\r\n            // be paused. This usually happens right before an ad is about to cover the content\r\n            this.pauseContent();\r\n            break;\r\n\r\n          case google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED:\r\n            // This event indicates the ad has finished - the video player can perform\r\n            // appropriate UI actions, such as removing the timer for remaining time detection.\r\n            // Fired when content should be resumed. This usually happens when an ad finishes\r\n            // or collapses\r\n            this.pollCountdown();\r\n            this.resumeContent();\r\n            break;\r\n\r\n          case google.ima.AdEvent.Type.LOG:\r\n            if (adData.adError) {\r\n              this.player.debug.warn(\"Non-fatal ad error: \".concat(adData.adError.getMessage()));\r\n            }\r\n\r\n            break;\r\n        }\r\n      }\r\n      /**\r\n       * Any ad error handling comes through here\r\n       * @param {Event} event\r\n       */\r\n\r\n    }, {\r\n      key: \"onAdError\",\r\n      value: function onAdError(event) {\r\n        this.cancel();\r\n        this.player.debug.warn('Ads error', event);\r\n      }\r\n      /**\r\n       * Setup hooks for Plyr and window events. This ensures\r\n       * the mid- and post-roll launch at the correct time. And\r\n       * resize the advertisement when the player resizes\r\n       */\r\n\r\n    }, {\r\n      key: \"listeners\",\r\n      value: function listeners() {\r\n        var _this9 = this;\r\n\r\n        var container = this.player.elements.container;\r\n        var time;\r\n        this.player.on('canplay', function () {\r\n          _this9.addCuePoints();\r\n        });\r\n        this.player.on('ended', function () {\r\n          _this9.loader.contentComplete();\r\n        });\r\n        this.player.on('timeupdate', function () {\r\n          time = _this9.player.currentTime;\r\n        });\r\n        this.player.on('seeked', function () {\r\n          var seekedTime = _this9.player.currentTime;\r\n\r\n          if (is$1.empty(_this9.cuePoints)) {\r\n            return;\r\n          }\r\n\r\n          _this9.cuePoints.forEach(function (cuePoint, index) {\r\n            if (time < cuePoint && cuePoint < seekedTime) {\r\n              _this9.manager.discardAdBreak();\r\n\r\n              _this9.cuePoints.splice(index, 1);\r\n            }\r\n          });\r\n        }); // Listen to the resizing of the window. And resize ad accordingly\r\n        // TODO: eventually implement ResizeObserver\r\n\r\n        window.addEventListener('resize', function () {\r\n          if (_this9.manager) {\r\n            _this9.manager.resize(container.offsetWidth, container.offsetHeight, google.ima.ViewMode.NORMAL);\r\n          }\r\n        });\r\n      }\r\n      /**\r\n       * Initialize the adsManager and start playing advertisements\r\n       */\r\n\r\n    }, {\r\n      key: \"play\",\r\n      value: function play() {\r\n        var _this10 = this;\r\n\r\n        var container = this.player.elements.container;\r\n\r\n        if (!this.managerPromise) {\r\n          this.resumeContent();\r\n        } // Play the requested advertisement whenever the adsManager is ready\r\n\r\n\r\n        this.managerPromise.then(function () {\r\n          // Set volume to match player\r\n          _this10.manager.setVolume(_this10.player.volume); // Initialize the container. Must be done via a user action on mobile devices\r\n\r\n\r\n          _this10.elements.displayContainer.initialize();\r\n\r\n          try {\r\n            if (!_this10.initialized) {\r\n              // Initialize the ads manager. Ad rules playlist will start at this time\r\n              _this10.manager.init(container.offsetWidth, container.offsetHeight, google.ima.ViewMode.NORMAL); // Call play to start showing the ad. Single video and overlay ads will\r\n              // start at this time; the call will be ignored for ad rules\r\n\r\n\r\n              _this10.manager.start();\r\n            }\r\n\r\n            _this10.initialized = true;\r\n          } catch (adError) {\r\n            // An error may be thrown if there was a problem with the\r\n            // VAST response\r\n            _this10.onAdError(adError);\r\n          }\r\n        }).catch(function () {});\r\n      }\r\n      /**\r\n       * Resume our video\r\n       */\r\n\r\n    }, {\r\n      key: \"resumeContent\",\r\n      value: function resumeContent() {\r\n        // Hide the advertisement container\r\n        this.elements.container.style.zIndex = ''; // Ad is stopped\r\n\r\n        this.playing = false; // Play video\r\n\r\n        silencePromise(this.player.media.play());\r\n      }\r\n      /**\r\n       * Pause our video\r\n       */\r\n\r\n    }, {\r\n      key: \"pauseContent\",\r\n      value: function pauseContent() {\r\n        // Show the advertisement container\r\n        this.elements.container.style.zIndex = 3; // Ad is playing\r\n\r\n        this.playing = true; // Pause our video.\r\n\r\n        this.player.media.pause();\r\n      }\r\n      /**\r\n       * Destroy the adsManager so we can grab new ads after this. If we don't then we're not\r\n       * allowed to call new ads based on google policies, as they interpret this as an accidental\r\n       * video requests. https://developers.google.com/interactive-\r\n       * media-ads/docs/sdks/android/faq#8\r\n       */\r\n\r\n    }, {\r\n      key: \"cancel\",\r\n      value: function cancel() {\r\n        // Pause our video\r\n        if (this.initialized) {\r\n          this.resumeContent();\r\n        } // Tell our instance that we're done for now\r\n\r\n\r\n        this.trigger('error'); // Re-create our adsManager\r\n\r\n        this.loadAds();\r\n      }\r\n      /**\r\n       * Re-create our adsManager\r\n       */\r\n\r\n    }, {\r\n      key: \"loadAds\",\r\n      value: function loadAds() {\r\n        var _this11 = this;\r\n\r\n        // Tell our adsManager to go bye bye\r\n        this.managerPromise.then(function () {\r\n          // Destroy our adsManager\r\n          if (_this11.manager) {\r\n            _this11.manager.destroy();\r\n          } // Re-set our adsManager promises\r\n\r\n\r\n          _this11.managerPromise = new Promise(function (resolve) {\r\n            _this11.on('loaded', resolve);\r\n\r\n            _this11.player.debug.log(_this11.manager);\r\n          }); // Now that the manager has been destroyed set it to also be un-initialized\r\n\r\n          _this11.initialized = false; // Now request some new advertisements\r\n\r\n          _this11.requestAds();\r\n        }).catch(function () {});\r\n      }\r\n      /**\r\n       * Handles callbacks after an ad event was invoked\r\n       * @param {String} event - Event type\r\n       */\r\n\r\n    }, {\r\n      key: \"trigger\",\r\n      value: function trigger(event) {\r\n        var _this12 = this;\r\n\r\n        for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\r\n          args[_key - 1] = arguments[_key];\r\n        }\r\n\r\n        var handlers = this.events[event];\r\n\r\n        if (is$1.array(handlers)) {\r\n          handlers.forEach(function (handler) {\r\n            if (is$1.function(handler)) {\r\n              handler.apply(_this12, args);\r\n            }\r\n          });\r\n        }\r\n      }\r\n      /**\r\n       * Add event listeners\r\n       * @param {String} event - Event type\r\n       * @param {Function} callback - Callback for when event occurs\r\n       * @return {Ads}\r\n       */\r\n\r\n    }, {\r\n      key: \"on\",\r\n      value: function on(event, callback) {\r\n        if (!is$1.array(this.events[event])) {\r\n          this.events[event] = [];\r\n        }\r\n\r\n        this.events[event].push(callback);\r\n        return this;\r\n      }\r\n      /**\r\n       * Setup a safety timer for when the ad network doesn't respond for whatever reason.\r\n       * The advertisement has 12 seconds to get its things together. We stop this timer when the\r\n       * advertisement is playing, or when a user action is required to start, then we clear the\r\n       * timer on ad ready\r\n       * @param {Number} time\r\n       * @param {String} from\r\n       */\r\n\r\n    }, {\r\n      key: \"startSafetyTimer\",\r\n      value: function startSafetyTimer(time, from) {\r\n        var _this13 = this;\r\n\r\n        this.player.debug.log(\"Safety timer invoked from: \".concat(from));\r\n        this.safetyTimer = setTimeout(function () {\r\n          _this13.cancel();\r\n\r\n          _this13.clearSafetyTimer('startSafetyTimer()');\r\n        }, time);\r\n      }\r\n      /**\r\n       * Clear our safety timer(s)\r\n       * @param {String} from\r\n       */\r\n\r\n    }, {\r\n      key: \"clearSafetyTimer\",\r\n      value: function clearSafetyTimer(from) {\r\n        if (!is$1.nullOrUndefined(this.safetyTimer)) {\r\n          this.player.debug.log(\"Safety timer cleared from: \".concat(from));\r\n          clearTimeout(this.safetyTimer);\r\n          this.safetyTimer = null;\r\n        }\r\n      }\r\n    }, {\r\n      key: \"enabled\",\r\n      get: function get() {\r\n        var config = this.config;\r\n        return this.player.isHTML5 && this.player.isVideo && config.enabled && (!is$1.empty(config.publisherId) || is$1.url(config.tagUrl));\r\n      }\r\n    }, {\r\n      key: \"tagUrl\",\r\n      get: function get() {\r\n        var config = this.config;\r\n\r\n        if (is$1.url(config.tagUrl)) {\r\n          return config.tagUrl;\r\n        }\r\n\r\n        var params = {\r\n          AV_PUBLISHERID: '58c25bb0073ef448b1087ad6',\r\n          AV_CHANNELID: '5a0458dc28a06145e4519d21',\r\n          AV_URL: window.location.hostname,\r\n          cb: Date.now(),\r\n          AV_WIDTH: 640,\r\n          AV_HEIGHT: 480,\r\n          AV_CDIM2: config.publisherId\r\n        };\r\n        var base = 'https://go.aniview.com/api/adserver6/vast/';\r\n        return \"\".concat(base, \"?\").concat(buildUrlParams(params));\r\n      }\r\n    }]);\r\n\r\n    return Ads;\r\n  }();\r\n\r\n  var parseVtt = function parseVtt(vttDataString) {\r\n    var processedList = [];\r\n    var frames = vttDataString.split(/\\r\\n\\r\\n|\\n\\n|\\r\\r/);\r\n    frames.forEach(function (frame) {\r\n      var result = {};\r\n      var lines = frame.split(/\\r\\n|\\n|\\r/);\r\n      lines.forEach(function (line) {\r\n        if (!is$1.number(result.startTime)) {\r\n          // The line with start and end times on it is the first line of interest\r\n          var matchTimes = line.match(/([0-9]{2})?:?([0-9]{2}):([0-9]{2}).([0-9]{2,3})( ?--> ?)([0-9]{2})?:?([0-9]{2}):([0-9]{2}).([0-9]{2,3})/); // Note that this currently ignores caption formatting directives that are optionally on the end of this line - fine for non-captions VTT\r\n\r\n          if (matchTimes) {\r\n            result.startTime = Number(matchTimes[1] || 0) * 60 * 60 + Number(matchTimes[2]) * 60 + Number(matchTimes[3]) + Number(\"0.\".concat(matchTimes[4]));\r\n            result.endTime = Number(matchTimes[6] || 0) * 60 * 60 + Number(matchTimes[7]) * 60 + Number(matchTimes[8]) + Number(\"0.\".concat(matchTimes[9]));\r\n          }\r\n        } else if (!is$1.empty(line.trim()) && is$1.empty(result.text)) {\r\n          // If we already have the startTime, then we're definitely up to the text line(s)\r\n          var lineSplit = line.trim().split('#xywh=');\r\n\r\n          var _lineSplit = _slicedToArray(lineSplit, 1);\r\n\r\n          result.text = _lineSplit[0];\r\n\r\n          // If there's content in lineSplit[1], then we have sprites. If not, then it's just one frame per image\r\n          if (lineSplit[1]) {\r\n            var _lineSplit$1$split = lineSplit[1].split(',');\r\n\r\n            var _lineSplit$1$split2 = _slicedToArray(_lineSplit$1$split, 4);\r\n\r\n            result.x = _lineSplit$1$split2[0];\r\n            result.y = _lineSplit$1$split2[1];\r\n            result.w = _lineSplit$1$split2[2];\r\n            result.h = _lineSplit$1$split2[3];\r\n          }\r\n        }\r\n      });\r\n\r\n      if (result.text) {\r\n        processedList.push(result);\r\n      }\r\n    });\r\n    return processedList;\r\n  };\r\n  /**\r\n   * Preview thumbnails for seek hover and scrubbing\r\n   * Seeking: Hover over the seek bar (desktop only): shows a small preview container above the seek bar\r\n   * Scrubbing: Click and drag the seek bar (desktop and mobile): shows the preview image over the entire video, as if the video is scrubbing at very high speed\r\n   *\r\n   * Notes:\r\n   * - Thumbs are set via JS settings on Plyr init, not HTML5 'track' property. Using the track property would be a bit gross, because it doesn't support custom 'kinds'. kind=metadata might be used for something else, and we want to allow multiple thumbnails tracks. Tracks must have a unique combination of 'kind' and 'label'. We would have to do something like kind=metadata,label=thumbnails1 / kind=metadata,label=thumbnails2. Square peg, round hole\r\n   * - VTT info: the image URL is relative to the VTT, not the current document. But if the url starts with a slash, it will naturally be relative to the current domain. https://support.jwplayer.com/articles/how-to-add-preview-thumbnails\r\n   * - This implementation uses multiple separate img elements. Other implementations use background-image on one element. This would be nice and simple, but Firefox and Safari have flickering issues with replacing backgrounds of larger images. It seems that YouTube perhaps only avoids this because they don't have the option for high-res previews (even the fullscreen ones, when mousedown/seeking). Images appear over the top of each other, and previous ones are discarded once the new ones have been rendered\r\n   */\r\n\r\n\r\n  var fitRatio = function fitRatio(ratio, outer) {\r\n    var targetRatio = outer.width / outer.height;\r\n    var result = {};\r\n\r\n    if (ratio > targetRatio) {\r\n      result.width = outer.width;\r\n      result.height = 1 / ratio * outer.width;\r\n    } else {\r\n      result.height = outer.height;\r\n      result.width = ratio * outer.height;\r\n    }\r\n\r\n    return result;\r\n  };\r\n\r\n  var PreviewThumbnails = /*#__PURE__*/function () {\r\n    /**\r\n     * PreviewThumbnails constructor.\r\n     * @param {Plyr} player\r\n     * @return {PreviewThumbnails}\r\n     */\r\n    function PreviewThumbnails(player) {\r\n      _classCallCheck(this, PreviewThumbnails);\r\n\r\n      this.player = player;\r\n      this.thumbnails = [];\r\n      this.loaded = false;\r\n      this.lastMouseMoveTime = Date.now();\r\n      this.mouseDown = false;\r\n      this.loadedImages = [];\r\n      this.elements = {\r\n        thumb: {},\r\n        scrubbing: {}\r\n      };\r\n      this.load();\r\n    }\r\n\r\n    _createClass(PreviewThumbnails, [{\r\n      key: \"load\",\r\n      value: function load() {\r\n        var _this = this;\r\n\r\n        // Toggle the regular seek tooltip\r\n        if (this.player.elements.display.seekTooltip) {\r\n          this.player.elements.display.seekTooltip.hidden = this.enabled;\r\n        }\r\n\r\n        if (!this.enabled) {\r\n          return;\r\n        }\r\n\r\n        this.getThumbnails().then(function () {\r\n          if (!_this.enabled) {\r\n            return;\r\n          } // Render DOM elements\r\n\r\n\r\n          _this.render(); // Check to see if thumb container size was specified manually in CSS\r\n\r\n\r\n          _this.determineContainerAutoSizing();\r\n\r\n          _this.loaded = true;\r\n        });\r\n      } // Download VTT files and parse them\r\n\r\n    }, {\r\n      key: \"getThumbnails\",\r\n      value: function getThumbnails() {\r\n        var _this2 = this;\r\n\r\n        return new Promise(function (resolve) {\r\n          var src = _this2.player.config.previewThumbnails.src;\r\n\r\n          if (is$1.empty(src)) {\r\n            throw new Error('Missing previewThumbnails.src config attribute');\r\n          } // Resolve promise\r\n\r\n\r\n          var sortAndResolve = function sortAndResolve() {\r\n            // Sort smallest to biggest (e.g., [120p, 480p, 1080p])\r\n            _this2.thumbnails.sort(function (x, y) {\r\n              return x.height - y.height;\r\n            });\r\n\r\n            _this2.player.debug.log('Preview thumbnails', _this2.thumbnails);\r\n\r\n            resolve();\r\n          }; // Via callback()\r\n\r\n\r\n          if (is$1.function(src)) {\r\n            src(function (thumbnails) {\r\n              _this2.thumbnails = thumbnails;\r\n              sortAndResolve();\r\n            });\r\n          } // VTT urls\r\n          else {\r\n              // If string, convert into single-element list\r\n              var urls = is$1.string(src) ? [src] : src; // Loop through each src URL. Download and process the VTT file, storing the resulting data in this.thumbnails\r\n\r\n              var promises = urls.map(function (u) {\r\n                return _this2.getThumbnail(u);\r\n              }); // Resolve\r\n\r\n              Promise.all(promises).then(sortAndResolve);\r\n            }\r\n        });\r\n      } // Process individual VTT file\r\n\r\n    }, {\r\n      key: \"getThumbnail\",\r\n      value: function getThumbnail(url) {\r\n        var _this3 = this;\r\n\r\n        return new Promise(function (resolve) {\r\n          fetch(url).then(function (response) {\r\n            var thumbnail = {\r\n              frames: parseVtt(response),\r\n              height: null,\r\n              urlPrefix: ''\r\n            }; // If the URLs don't start with '/', then we need to set their relative path to be the location of the VTT file\r\n            // If the URLs do start with '/', then they obviously don't need a prefix, so it will remain blank\r\n            // If the thumbnail URLs start with with none of '/', 'http://' or 'https://', then we need to set their relative path to be the location of the VTT file\r\n\r\n            if (!thumbnail.frames[0].text.startsWith('/') && !thumbnail.frames[0].text.startsWith('http://') && !thumbnail.frames[0].text.startsWith('https://')) {\r\n              thumbnail.urlPrefix = url.substring(0, url.lastIndexOf('/') + 1);\r\n            } // Download the first frame, so that we can determine/set the height of this thumbnailsDef\r\n\r\n\r\n            var tempImage = new Image();\r\n\r\n            tempImage.onload = function () {\r\n              thumbnail.height = tempImage.naturalHeight;\r\n              thumbnail.width = tempImage.naturalWidth;\r\n\r\n              _this3.thumbnails.push(thumbnail);\r\n\r\n              resolve();\r\n            };\r\n\r\n            tempImage.src = thumbnail.urlPrefix + thumbnail.frames[0].text;\r\n          });\r\n        });\r\n      }\r\n    }, {\r\n      key: \"startMove\",\r\n      value: function startMove(event) {\r\n        if (!this.loaded) {\r\n          return;\r\n        }\r\n\r\n        if (!is$1.event(event) || !['touchmove', 'mousemove'].includes(event.type)) {\r\n          return;\r\n        } // Wait until media has a duration\r\n\r\n\r\n        if (!this.player.media.duration) {\r\n          return;\r\n        }\r\n\r\n        if (event.type === 'touchmove') {\r\n          // Calculate seek hover position as approx video seconds\r\n          this.seekTime = this.player.media.duration * (this.player.elements.inputs.seek.value / 100);\r\n        } else {\r\n          // Calculate seek hover position as approx video seconds\r\n          var clientRect = this.player.elements.progress.getBoundingClientRect();\r\n          var percentage = 100 / clientRect.width * (event.pageX - clientRect.left);\r\n          this.seekTime = this.player.media.duration * (percentage / 100);\r\n\r\n          if (this.seekTime < 0) {\r\n            // The mousemove fires for 10+px out to the left\r\n            this.seekTime = 0;\r\n          }\r\n\r\n          if (this.seekTime > this.player.media.duration - 1) {\r\n            // Took 1 second off the duration for safety, because different players can disagree on the real duration of a video\r\n            this.seekTime = this.player.media.duration - 1;\r\n          }\r\n\r\n          this.mousePosX = event.pageX; // Set time text inside image container\r\n\r\n          this.elements.thumb.time.innerText = formatTime(this.seekTime);\r\n        } // Download and show image\r\n\r\n\r\n        this.showImageAtCurrentTime();\r\n      }\r\n    }, {\r\n      key: \"endMove\",\r\n      value: function endMove() {\r\n        this.toggleThumbContainer(false, true);\r\n      }\r\n    }, {\r\n      key: \"startScrubbing\",\r\n      value: function startScrubbing(event) {\r\n        // Only act on left mouse button (0), or touch device (event.button does not exist or is false)\r\n        if (is$1.nullOrUndefined(event.button) || event.button === false || event.button === 0) {\r\n          this.mouseDown = true; // Wait until media has a duration\r\n\r\n          if (this.player.media.duration) {\r\n            this.toggleScrubbingContainer(true);\r\n            this.toggleThumbContainer(false, true); // Download and show image\r\n\r\n            this.showImageAtCurrentTime();\r\n          }\r\n        }\r\n      }\r\n    }, {\r\n      key: \"endScrubbing\",\r\n      value: function endScrubbing() {\r\n        var _this4 = this;\r\n\r\n        this.mouseDown = false; // Hide scrubbing preview. But wait until the video has successfully seeked before hiding the scrubbing preview\r\n\r\n        if (Math.ceil(this.lastTime) === Math.ceil(this.player.media.currentTime)) {\r\n          // The video was already seeked/loaded at the chosen time - hide immediately\r\n          this.toggleScrubbingContainer(false);\r\n        } else {\r\n          // The video hasn't seeked yet. Wait for that\r\n          once.call(this.player, this.player.media, 'timeupdate', function () {\r\n            // Re-check mousedown - we might have already started scrubbing again\r\n            if (!_this4.mouseDown) {\r\n              _this4.toggleScrubbingContainer(false);\r\n            }\r\n          });\r\n        }\r\n      }\r\n      /**\r\n       * Setup hooks for Plyr and window events\r\n       */\r\n\r\n    }, {\r\n      key: \"listeners\",\r\n      value: function listeners() {\r\n        var _this5 = this;\r\n\r\n        // Hide thumbnail preview - on mouse click, mouse leave (in listeners.js for now), and video play/seek. All four are required, e.g., for buffering\r\n        this.player.on('play', function () {\r\n          _this5.toggleThumbContainer(false, true);\r\n        });\r\n        this.player.on('seeked', function () {\r\n          _this5.toggleThumbContainer(false);\r\n        });\r\n        this.player.on('timeupdate', function () {\r\n          _this5.lastTime = _this5.player.media.currentTime;\r\n        });\r\n      }\r\n      /**\r\n       * Create HTML elements for image containers\r\n       */\r\n\r\n    }, {\r\n      key: \"render\",\r\n      value: function render() {\r\n        // Create HTML element: plyr__preview-thumbnail-container\r\n        this.elements.thumb.container = createElement('div', {\r\n          class: this.player.config.classNames.previewThumbnails.thumbContainer\r\n        }); // Wrapper for the image for styling\r\n\r\n        this.elements.thumb.imageContainer = createElement('div', {\r\n          class: this.player.config.classNames.previewThumbnails.imageContainer\r\n        });\r\n        this.elements.thumb.container.appendChild(this.elements.thumb.imageContainer); // Create HTML element, parent+span: time text (e.g., 01:32:00)\r\n\r\n        var timeContainer = createElement('div', {\r\n          class: this.player.config.classNames.previewThumbnails.timeContainer\r\n        });\r\n        this.elements.thumb.time = createElement('span', {}, '00:00');\r\n        timeContainer.appendChild(this.elements.thumb.time);\r\n        this.elements.thumb.container.appendChild(timeContainer); // Inject the whole thumb\r\n\r\n        if (is$1.element(this.player.elements.progress)) {\r\n          this.player.elements.progress.appendChild(this.elements.thumb.container);\r\n        } // Create HTML element: plyr__preview-scrubbing-container\r\n\r\n\r\n        this.elements.scrubbing.container = createElement('div', {\r\n          class: this.player.config.classNames.previewThumbnails.scrubbingContainer\r\n        });\r\n        this.player.elements.wrapper.appendChild(this.elements.scrubbing.container);\r\n      }\r\n    }, {\r\n      key: \"destroy\",\r\n      value: function destroy() {\r\n        if (this.elements.thumb.container) {\r\n          this.elements.thumb.container.remove();\r\n        }\r\n\r\n        if (this.elements.scrubbing.container) {\r\n          this.elements.scrubbing.container.remove();\r\n        }\r\n      }\r\n    }, {\r\n      key: \"showImageAtCurrentTime\",\r\n      value: function showImageAtCurrentTime() {\r\n        var _this6 = this;\r\n\r\n        if (this.mouseDown) {\r\n          this.setScrubbingContainerSize();\r\n        } else {\r\n          this.setThumbContainerSizeAndPos();\r\n        } // Find the desired thumbnail index\r\n        // TODO: Handle a video longer than the thumbs where thumbNum is null\r\n\r\n\r\n        var thumbNum = this.thumbnails[0].frames.findIndex(function (frame) {\r\n          return _this6.seekTime >= frame.startTime && _this6.seekTime <= frame.endTime;\r\n        });\r\n        var hasThumb = thumbNum >= 0;\r\n        var qualityIndex = 0; // Show the thumb container if we're not scrubbing\r\n\r\n        if (!this.mouseDown) {\r\n          this.toggleThumbContainer(hasThumb);\r\n        } // No matching thumb found\r\n\r\n\r\n        if (!hasThumb) {\r\n          return;\r\n        } // Check to see if we've already downloaded higher quality versions of this image\r\n\r\n\r\n        this.thumbnails.forEach(function (thumbnail, index) {\r\n          if (_this6.loadedImages.includes(thumbnail.frames[thumbNum].text)) {\r\n            qualityIndex = index;\r\n          }\r\n        }); // Only proceed if either thumbnum or thumbfilename has changed\r\n\r\n        if (thumbNum !== this.showingThumb) {\r\n          this.showingThumb = thumbNum;\r\n          this.loadImage(qualityIndex);\r\n        }\r\n      } // Show the image that's currently specified in this.showingThumb\r\n\r\n    }, {\r\n      key: \"loadImage\",\r\n      value: function loadImage() {\r\n        var _this7 = this;\r\n\r\n        var qualityIndex = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;\r\n        var thumbNum = this.showingThumb;\r\n        var thumbnail = this.thumbnails[qualityIndex];\r\n        var urlPrefix = thumbnail.urlPrefix;\r\n        var frame = thumbnail.frames[thumbNum];\r\n        var thumbFilename = thumbnail.frames[thumbNum].text;\r\n        var thumbUrl = urlPrefix + thumbFilename;\r\n\r\n        if (!this.currentImageElement || this.currentImageElement.dataset.filename !== thumbFilename) {\r\n          // If we're already loading a previous image, remove its onload handler - we don't want it to load after this one\r\n          // Only do this if not using sprites. Without sprites we really want to show as many images as possible, as a best-effort\r\n          if (this.loadingImage && this.usingSprites) {\r\n            this.loadingImage.onload = null;\r\n          } // We're building and adding a new image. In other implementations of similar functionality (YouTube), background image\r\n          // is instead used. But this causes issues with larger images in Firefox and Safari - switching between background\r\n          // images causes a flicker. Putting a new image over the top does not\r\n\r\n\r\n          var previewImage = new Image();\r\n          previewImage.src = thumbUrl;\r\n          previewImage.dataset.index = thumbNum;\r\n          previewImage.dataset.filename = thumbFilename;\r\n          this.showingThumbFilename = thumbFilename;\r\n          this.player.debug.log(\"Loading image: \".concat(thumbUrl)); // For some reason, passing the named function directly causes it to execute immediately. So I've wrapped it in an anonymous function...\r\n\r\n          previewImage.onload = function () {\r\n            return _this7.showImage(previewImage, frame, qualityIndex, thumbNum, thumbFilename, true);\r\n          };\r\n\r\n          this.loadingImage = previewImage;\r\n          this.removeOldImages(previewImage);\r\n        } else {\r\n          // Update the existing image\r\n          this.showImage(this.currentImageElement, frame, qualityIndex, thumbNum, thumbFilename, false);\r\n          this.currentImageElement.dataset.index = thumbNum;\r\n          this.removeOldImages(this.currentImageElement);\r\n        }\r\n      }\r\n    }, {\r\n      key: \"showImage\",\r\n      value: function showImage(previewImage, frame, qualityIndex, thumbNum, thumbFilename) {\r\n        var newImage = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : true;\r\n        this.player.debug.log(\"Showing thumb: \".concat(thumbFilename, \". num: \").concat(thumbNum, \". qual: \").concat(qualityIndex, \". newimg: \").concat(newImage));\r\n        this.setImageSizeAndOffset(previewImage, frame);\r\n\r\n        if (newImage) {\r\n          this.currentImageContainer.appendChild(previewImage);\r\n          this.currentImageElement = previewImage;\r\n\r\n          if (!this.loadedImages.includes(thumbFilename)) {\r\n            this.loadedImages.push(thumbFilename);\r\n          }\r\n        } // Preload images before and after the current one\r\n        // Show higher quality of the same frame\r\n        // Each step here has a short time delay, and only continues if still hovering/seeking the same spot. This is to protect slow connections from overloading\r\n\r\n\r\n        this.preloadNearby(thumbNum, true).then(this.preloadNearby(thumbNum, false)).then(this.getHigherQuality(qualityIndex, previewImage, frame, thumbFilename));\r\n      } // Remove all preview images that aren't the designated current image\r\n\r\n    }, {\r\n      key: \"removeOldImages\",\r\n      value: function removeOldImages(currentImage) {\r\n        var _this8 = this;\r\n\r\n        // Get a list of all images, convert it from a DOM list to an array\r\n        Array.from(this.currentImageContainer.children).forEach(function (image) {\r\n          if (image.tagName.toLowerCase() !== 'img') {\r\n            return;\r\n          }\r\n\r\n          var removeDelay = _this8.usingSprites ? 500 : 1000;\r\n\r\n          if (image.dataset.index !== currentImage.dataset.index && !image.dataset.deleting) {\r\n            // Wait 200ms, as the new image can take some time to show on certain browsers (even though it was downloaded before showing). This will prevent flicker, and show some generosity towards slower clients\r\n            // First set attribute 'deleting' to prevent multi-handling of this on repeat firing of this function\r\n            // eslint-disable-next-line no-param-reassign\r\n            image.dataset.deleting = true; // This has to be set before the timeout - to prevent issues switching between hover and scrub\r\n\r\n            var currentImageContainer = _this8.currentImageContainer;\r\n            setTimeout(function () {\r\n              currentImageContainer.removeChild(image);\r\n\r\n              _this8.player.debug.log(\"Removing thumb: \".concat(image.dataset.filename));\r\n            }, removeDelay);\r\n          }\r\n        });\r\n      } // Preload images before and after the current one. Only if the user is still hovering/seeking the same frame\r\n      // This will only preload the lowest quality\r\n\r\n    }, {\r\n      key: \"preloadNearby\",\r\n      value: function preloadNearby(thumbNum) {\r\n        var _this9 = this;\r\n\r\n        var forward = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\r\n        return new Promise(function (resolve) {\r\n          setTimeout(function () {\r\n            var oldThumbFilename = _this9.thumbnails[0].frames[thumbNum].text;\r\n\r\n            if (_this9.showingThumbFilename === oldThumbFilename) {\r\n              // Find the nearest thumbs with different filenames. Sometimes it'll be the next index, but in the case of sprites, it might be 100+ away\r\n              var thumbnailsClone;\r\n\r\n              if (forward) {\r\n                thumbnailsClone = _this9.thumbnails[0].frames.slice(thumbNum);\r\n              } else {\r\n                thumbnailsClone = _this9.thumbnails[0].frames.slice(0, thumbNum).reverse();\r\n              }\r\n\r\n              var foundOne = false;\r\n              thumbnailsClone.forEach(function (frame) {\r\n                var newThumbFilename = frame.text;\r\n\r\n                if (newThumbFilename !== oldThumbFilename) {\r\n                  // Found one with a different filename. Make sure it hasn't already been loaded on this page visit\r\n                  if (!_this9.loadedImages.includes(newThumbFilename)) {\r\n                    foundOne = true;\r\n\r\n                    _this9.player.debug.log(\"Preloading thumb filename: \".concat(newThumbFilename));\r\n\r\n                    var urlPrefix = _this9.thumbnails[0].urlPrefix;\r\n                    var thumbURL = urlPrefix + newThumbFilename;\r\n                    var previewImage = new Image();\r\n                    previewImage.src = thumbURL;\r\n\r\n                    previewImage.onload = function () {\r\n                      _this9.player.debug.log(\"Preloaded thumb filename: \".concat(newThumbFilename));\r\n\r\n                      if (!_this9.loadedImages.includes(newThumbFilename)) _this9.loadedImages.push(newThumbFilename); // We don't resolve until the thumb is loaded\r\n\r\n                      resolve();\r\n                    };\r\n                  }\r\n                }\r\n              }); // If there are none to preload then we want to resolve immediately\r\n\r\n              if (!foundOne) {\r\n                resolve();\r\n              }\r\n            }\r\n          }, 300);\r\n        });\r\n      } // If user has been hovering current image for half a second, look for a higher quality one\r\n\r\n    }, {\r\n      key: \"getHigherQuality\",\r\n      value: function getHigherQuality(currentQualityIndex, previewImage, frame, thumbFilename) {\r\n        var _this10 = this;\r\n\r\n        if (currentQualityIndex < this.thumbnails.length - 1) {\r\n          // Only use the higher quality version if it's going to look any better - if the current thumb is of a lower pixel density than the thumbnail container\r\n          var previewImageHeight = previewImage.naturalHeight;\r\n\r\n          if (this.usingSprites) {\r\n            previewImageHeight = frame.h;\r\n          }\r\n\r\n          if (previewImageHeight < this.thumbContainerHeight) {\r\n            // Recurse back to the loadImage function - show a higher quality one, but only if the viewer is on this frame for a while\r\n            setTimeout(function () {\r\n              // Make sure the mouse hasn't already moved on and started hovering at another image\r\n              if (_this10.showingThumbFilename === thumbFilename) {\r\n                _this10.player.debug.log(\"Showing higher quality thumb for: \".concat(thumbFilename));\r\n\r\n                _this10.loadImage(currentQualityIndex + 1);\r\n              }\r\n            }, 300);\r\n          }\r\n        }\r\n      }\r\n    }, {\r\n      key: \"toggleThumbContainer\",\r\n      value: function toggleThumbContainer() {\r\n        var toggle = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\r\n        var clearShowing = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\r\n        var className = this.player.config.classNames.previewThumbnails.thumbContainerShown;\r\n        this.elements.thumb.container.classList.toggle(className, toggle);\r\n\r\n        if (!toggle && clearShowing) {\r\n          this.showingThumb = null;\r\n          this.showingThumbFilename = null;\r\n        }\r\n      }\r\n    }, {\r\n      key: \"toggleScrubbingContainer\",\r\n      value: function toggleScrubbingContainer() {\r\n        var toggle = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\r\n        var className = this.player.config.classNames.previewThumbnails.scrubbingContainerShown;\r\n        this.elements.scrubbing.container.classList.toggle(className, toggle);\r\n\r\n        if (!toggle) {\r\n          this.showingThumb = null;\r\n          this.showingThumbFilename = null;\r\n        }\r\n      }\r\n    }, {\r\n      key: \"determineContainerAutoSizing\",\r\n      value: function determineContainerAutoSizing() {\r\n        if (this.elements.thumb.imageContainer.clientHeight > 20 || this.elements.thumb.imageContainer.clientWidth > 20) {\r\n          // This will prevent auto sizing in this.setThumbContainerSizeAndPos()\r\n          this.sizeSpecifiedInCSS = true;\r\n        }\r\n      } // Set the size to be about a quarter of the size of video. Unless option dynamicSize === false, in which case it needs to be set in CSS\r\n\r\n    }, {\r\n      key: \"setThumbContainerSizeAndPos\",\r\n      value: function setThumbContainerSizeAndPos() {\r\n        if (!this.sizeSpecifiedInCSS) {\r\n          var thumbWidth = Math.floor(this.thumbContainerHeight * this.thumbAspectRatio);\r\n          this.elements.thumb.imageContainer.style.height = \"\".concat(this.thumbContainerHeight, \"px\");\r\n          this.elements.thumb.imageContainer.style.width = \"\".concat(thumbWidth, \"px\");\r\n        } else if (this.elements.thumb.imageContainer.clientHeight > 20 && this.elements.thumb.imageContainer.clientWidth < 20) {\r\n          var _thumbWidth = Math.floor(this.elements.thumb.imageContainer.clientHeight * this.thumbAspectRatio);\r\n\r\n          this.elements.thumb.imageContainer.style.width = \"\".concat(_thumbWidth, \"px\");\r\n        } else if (this.elements.thumb.imageContainer.clientHeight < 20 && this.elements.thumb.imageContainer.clientWidth > 20) {\r\n          var thumbHeight = Math.floor(this.elements.thumb.imageContainer.clientWidth / this.thumbAspectRatio);\r\n          this.elements.thumb.imageContainer.style.height = \"\".concat(thumbHeight, \"px\");\r\n        }\r\n\r\n        this.setThumbContainerPos();\r\n      }\r\n    }, {\r\n      key: \"setThumbContainerPos\",\r\n      value: function setThumbContainerPos() {\r\n        var seekbarRect = this.player.elements.progress.getBoundingClientRect();\r\n        var plyrRect = this.player.elements.container.getBoundingClientRect();\r\n        var container = this.elements.thumb.container; // Find the lowest and highest desired left-position, so we don't slide out the side of the video container\r\n\r\n        var minVal = plyrRect.left - seekbarRect.left + 10;\r\n        var maxVal = plyrRect.right - seekbarRect.left - container.clientWidth - 10; // Set preview container position to: mousepos, minus seekbar.left, minus half of previewContainer.clientWidth\r\n\r\n        var previewPos = this.mousePosX - seekbarRect.left - container.clientWidth / 2;\r\n\r\n        if (previewPos < minVal) {\r\n          previewPos = minVal;\r\n        }\r\n\r\n        if (previewPos > maxVal) {\r\n          previewPos = maxVal;\r\n        }\r\n\r\n        container.style.left = \"\".concat(previewPos, \"px\");\r\n      } // Can't use 100% width, in case the video is a different aspect ratio to the video container\r\n\r\n    }, {\r\n      key: \"setScrubbingContainerSize\",\r\n      value: function setScrubbingContainerSize() {\r\n        var _fitRatio = fitRatio(this.thumbAspectRatio, {\r\n          width: this.player.media.clientWidth,\r\n          height: this.player.media.clientHeight\r\n        }),\r\n            width = _fitRatio.width,\r\n            height = _fitRatio.height;\r\n\r\n        this.elements.scrubbing.container.style.width = \"\".concat(width, \"px\");\r\n        this.elements.scrubbing.container.style.height = \"\".concat(height, \"px\");\r\n      } // Sprites need to be offset to the correct location\r\n\r\n    }, {\r\n      key: \"setImageSizeAndOffset\",\r\n      value: function setImageSizeAndOffset(previewImage, frame) {\r\n        if (!this.usingSprites) {\r\n          return;\r\n        } // Find difference between height and preview container height\r\n\r\n\r\n        var multiplier = this.thumbContainerHeight / frame.h; // eslint-disable-next-line no-param-reassign\r\n\r\n        previewImage.style.height = \"\".concat(previewImage.naturalHeight * multiplier, \"px\"); // eslint-disable-next-line no-param-reassign\r\n\r\n        previewImage.style.width = \"\".concat(previewImage.naturalWidth * multiplier, \"px\"); // eslint-disable-next-line no-param-reassign\r\n\r\n        previewImage.style.left = \"-\".concat(frame.x * multiplier, \"px\"); // eslint-disable-next-line no-param-reassign\r\n\r\n        previewImage.style.top = \"-\".concat(frame.y * multiplier, \"px\");\r\n      }\r\n    }, {\r\n      key: \"enabled\",\r\n      get: function get() {\r\n        return this.player.isHTML5 && this.player.isVideo && this.player.config.previewThumbnails.enabled;\r\n      }\r\n    }, {\r\n      key: \"currentImageContainer\",\r\n      get: function get() {\r\n        if (this.mouseDown) {\r\n          return this.elements.scrubbing.container;\r\n        }\r\n\r\n        return this.elements.thumb.imageContainer;\r\n      }\r\n    }, {\r\n      key: \"usingSprites\",\r\n      get: function get() {\r\n        return Object.keys(this.thumbnails[0].frames[0]).includes('w');\r\n      }\r\n    }, {\r\n      key: \"thumbAspectRatio\",\r\n      get: function get() {\r\n        if (this.usingSprites) {\r\n          return this.thumbnails[0].frames[0].w / this.thumbnails[0].frames[0].h;\r\n        }\r\n\r\n        return this.thumbnails[0].width / this.thumbnails[0].height;\r\n      }\r\n    }, {\r\n      key: \"thumbContainerHeight\",\r\n      get: function get() {\r\n        if (this.mouseDown) {\r\n          var _fitRatio2 = fitRatio(this.thumbAspectRatio, {\r\n            width: this.player.media.clientWidth,\r\n            height: this.player.media.clientHeight\r\n          }),\r\n              height = _fitRatio2.height;\r\n\r\n          return height;\r\n        } // If css is used this needs to return the css height for sprites to work (see setImageSizeAndOffset)\r\n\r\n\r\n        if (this.sizeSpecifiedInCSS) {\r\n          return this.elements.thumb.imageContainer.clientHeight;\r\n        }\r\n\r\n        return Math.floor(this.player.media.clientWidth / this.thumbAspectRatio / 4);\r\n      }\r\n    }, {\r\n      key: \"currentImageElement\",\r\n      get: function get() {\r\n        if (this.mouseDown) {\r\n          return this.currentScrubbingImageElement;\r\n        }\r\n\r\n        return this.currentThumbnailImageElement;\r\n      },\r\n      set: function set(element) {\r\n        if (this.mouseDown) {\r\n          this.currentScrubbingImageElement = element;\r\n        } else {\r\n          this.currentThumbnailImageElement = element;\r\n        }\r\n      }\r\n    }]);\r\n\r\n    return PreviewThumbnails;\r\n  }();\r\n\r\n  var source = {\r\n    // Add elements to HTML5 media (source, tracks, etc)\r\n    insertElements: function insertElements(type, attributes) {\r\n      var _this = this;\r\n\r\n      if (is$1.string(attributes)) {\r\n        insertElement(type, this.media, {\r\n          src: attributes\r\n        });\r\n      } else if (is$1.array(attributes)) {\r\n        attributes.forEach(function (attribute) {\r\n          insertElement(type, _this.media, attribute);\r\n        });\r\n      }\r\n    },\r\n    // Update source\r\n    // Sources are not checked for support so be careful\r\n    change: function change(input) {\r\n      var _this2 = this;\r\n\r\n      if (!getDeep(input, 'sources.length')) {\r\n        this.debug.warn('Invalid source format');\r\n        return;\r\n      } // Cancel current network requests\r\n\r\n\r\n      html5.cancelRequests.call(this); // Destroy instance and re-setup\r\n\r\n      this.destroy.call(this, function () {\r\n        // Reset quality options\r\n        _this2.options.quality = []; // Remove elements\r\n\r\n        removeElement(_this2.media);\r\n        _this2.media = null; // Reset class name\r\n\r\n        if (is$1.element(_this2.elements.container)) {\r\n          _this2.elements.container.removeAttribute('class');\r\n        } // Set the type and provider\r\n\r\n\r\n        var sources = input.sources,\r\n            type = input.type;\r\n\r\n        var _sources = _slicedToArray(sources, 1),\r\n            _sources$ = _sources[0],\r\n            _sources$$provider = _sources$.provider,\r\n            provider = _sources$$provider === void 0 ? providers.html5 : _sources$$provider,\r\n            src = _sources$.src;\r\n\r\n        var tagName = provider === 'html5' ? type : 'div';\r\n        var attributes = provider === 'html5' ? {} : {\r\n          src: src\r\n        };\r\n        Object.assign(_this2, {\r\n          provider: provider,\r\n          type: type,\r\n          // Check for support\r\n          supported: support.check(type, provider, _this2.config.playsinline),\r\n          // Create new element\r\n          media: createElement(tagName, attributes)\r\n        }); // Inject the new element\r\n\r\n        _this2.elements.container.appendChild(_this2.media); // Autoplay the new source?\r\n\r\n\r\n        if (is$1.boolean(input.autoplay)) {\r\n          _this2.config.autoplay = input.autoplay;\r\n        } // Set attributes for audio and video\r\n\r\n\r\n        if (_this2.isHTML5) {\r\n          if (_this2.config.crossorigin) {\r\n            _this2.media.setAttribute('crossorigin', '');\r\n          }\r\n\r\n          if (_this2.config.autoplay) {\r\n            _this2.media.setAttribute('autoplay', '');\r\n          }\r\n\r\n          if (!is$1.empty(input.poster)) {\r\n            _this2.poster = input.poster;\r\n          }\r\n\r\n          if (_this2.config.loop.active) {\r\n            _this2.media.setAttribute('loop', '');\r\n          }\r\n\r\n          if (_this2.config.muted) {\r\n            _this2.media.setAttribute('muted', '');\r\n          }\r\n\r\n          if (_this2.config.playsinline) {\r\n            _this2.media.setAttribute('playsinline', '');\r\n          }\r\n        } // Restore class hook\r\n\r\n\r\n        ui.addStyleHook.call(_this2); // Set new sources for html5\r\n\r\n        if (_this2.isHTML5) {\r\n          source.insertElements.call(_this2, 'source', sources);\r\n        } // Set video title\r\n\r\n\r\n        _this2.config.title = input.title; // Set up from scratch\r\n\r\n        media.setup.call(_this2); // HTML5 stuff\r\n\r\n        if (_this2.isHTML5) {\r\n          // Setup captions\r\n          if (Object.keys(input).includes('tracks')) {\r\n            source.insertElements.call(_this2, 'track', input.tracks);\r\n          }\r\n        } // If HTML5 or embed but not fully supported, setupInterface and call ready now\r\n\r\n\r\n        if (_this2.isHTML5 || _this2.isEmbed && !_this2.supported.ui) {\r\n          // Setup interface\r\n          ui.build.call(_this2);\r\n        } // Load HTML5 sources\r\n\r\n\r\n        if (_this2.isHTML5) {\r\n          _this2.media.load();\r\n        } // Update previewThumbnails config & reload plugin\r\n\r\n\r\n        if (!is$1.empty(input.previewThumbnails)) {\r\n          Object.assign(_this2.config.previewThumbnails, input.previewThumbnails); // Cleanup previewThumbnails plugin if it was loaded\r\n\r\n          if (_this2.previewThumbnails && _this2.previewThumbnails.loaded) {\r\n            _this2.previewThumbnails.destroy();\r\n\r\n            _this2.previewThumbnails = null;\r\n          } // Create new instance if it is still enabled\r\n\r\n\r\n          if (_this2.config.previewThumbnails.enabled) {\r\n            _this2.previewThumbnails = new PreviewThumbnails(_this2);\r\n          }\r\n        } // Update the fullscreen support\r\n\r\n\r\n        _this2.fullscreen.update();\r\n      }, true);\r\n    }\r\n  };\r\n\r\n  /**\r\n   * Returns a number whose value is limited to the given range.\r\n   *\r\n   * Example: limit the output of this computation to between 0 and 255\r\n   * (x * 255).clamp(0, 255)\r\n   *\r\n   * @param {Number} input\r\n   * @param {Number} min The lower boundary of the output range\r\n   * @param {Number} max The upper boundary of the output range\r\n   * @returns A number in the range [min, max]\r\n   * @type Number\r\n   */\r\n  function clamp() {\r\n    var input = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;\r\n    var min = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\r\n    var max = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 255;\r\n    return Math.min(Math.max(input, min), max);\r\n  }\r\n\r\n  // TODO: Use a WeakMap for private globals\r\n  // const globals = new WeakMap();\r\n  // Plyr instance\r\n\r\n  var Plyr = /*#__PURE__*/function () {\r\n    function Plyr(target, options) {\r\n      var _this = this;\r\n\r\n      _classCallCheck(this, Plyr);\r\n\r\n      this.timers = {}; // State\r\n\r\n      this.ready = false;\r\n      this.loading = false;\r\n      this.failed = false; // Touch device\r\n\r\n      this.touch = support.touch; // Set the media element\r\n\r\n      this.media = target; // String selector passed\r\n\r\n      if (is$1.string(this.media)) {\r\n        this.media = document.querySelectorAll(this.media);\r\n      } // jQuery, NodeList or Array passed, use first element\r\n\r\n\r\n      if (window.jQuery && this.media instanceof jQuery || is$1.nodeList(this.media) || is$1.array(this.media)) {\r\n        // eslint-disable-next-line\r\n        this.media = this.media[0];\r\n      } // Set config\r\n\r\n\r\n      this.config = extend({}, defaults$1, Plyr.defaults, options || {}, function () {\r\n        try {\r\n          return JSON.parse(_this.media.getAttribute('data-plyr-config'));\r\n        } catch (e) {\r\n          return {};\r\n        }\r\n      }()); // Elements cache\r\n\r\n      this.elements = {\r\n        container: null,\r\n        fullscreen: null,\r\n        captions: null,\r\n        buttons: {},\r\n        display: {},\r\n        progress: {},\r\n        inputs: {},\r\n        settings: {\r\n          popup: null,\r\n          menu: null,\r\n          panels: {},\r\n          buttons: {}\r\n        }\r\n      }; // Captions\r\n\r\n      this.captions = {\r\n        active: null,\r\n        currentTrack: -1,\r\n        meta: new WeakMap()\r\n      }; // Fullscreen\r\n\r\n      this.fullscreen = {\r\n        active: false\r\n      }; // Options\r\n\r\n      this.options = {\r\n        speed: [],\r\n        quality: []\r\n      }; // Debugging\r\n      // TODO: move to globals\r\n\r\n      this.debug = new Console(this.config.debug); // Log config options and support\r\n\r\n      this.debug.log('Config', this.config);\r\n      this.debug.log('Support', support); // We need an element to setup\r\n\r\n      if (is$1.nullOrUndefined(this.media) || !is$1.element(this.media)) {\r\n        this.debug.error('Setup failed: no suitable element passed');\r\n        return;\r\n      } // Bail if the element is initialized\r\n\r\n\r\n      if (this.media.plyr) {\r\n        this.debug.warn('Target already setup');\r\n        return;\r\n      } // Bail if not enabled\r\n\r\n\r\n      if (!this.config.enabled) {\r\n        this.debug.error('Setup failed: disabled by config');\r\n        return;\r\n      } // Bail if disabled or no basic support\r\n      // You may want to disable certain UAs etc\r\n\r\n\r\n      if (!support.check().api) {\r\n        this.debug.error('Setup failed: no support');\r\n        return;\r\n      } // Cache original element state for .destroy()\r\n\r\n\r\n      var clone = this.media.cloneNode(true);\r\n      clone.autoplay = false;\r\n      this.elements.original = clone; // Set media type based on tag or data attribute\r\n      // Supported: video, audio, vimeo, youtube\r\n\r\n      var type = this.media.tagName.toLowerCase(); // Embed properties\r\n\r\n      var iframe = null;\r\n      var url = null; // Different setup based on type\r\n\r\n      switch (type) {\r\n        case 'div':\r\n          // Find the frame\r\n          iframe = this.media.querySelector('iframe'); // <iframe> type\r\n\r\n          if (is$1.element(iframe)) {\r\n            // Detect provider\r\n            url = parseUrl(iframe.getAttribute('src'));\r\n            this.provider = getProviderByUrl(url.toString()); // Rework elements\r\n\r\n            this.elements.container = this.media;\r\n            this.media = iframe; // Reset classname\r\n\r\n            this.elements.container.className = ''; // Get attributes from URL and set config\r\n\r\n            if (url.search.length) {\r\n              var truthy = ['1', 'true'];\r\n\r\n              if (truthy.includes(url.searchParams.get('autoplay'))) {\r\n                this.config.autoplay = true;\r\n              }\r\n\r\n              if (truthy.includes(url.searchParams.get('loop'))) {\r\n                this.config.loop.active = true;\r\n              } // TODO: replace fullscreen.iosNative with this playsinline config option\r\n              // YouTube requires the playsinline in the URL\r\n\r\n\r\n              if (this.isYouTube) {\r\n                this.config.playsinline = truthy.includes(url.searchParams.get('playsinline'));\r\n                this.config.youtube.hl = url.searchParams.get('hl'); // TODO: Should this be setting language?\r\n              } else {\r\n                this.config.playsinline = true;\r\n              }\r\n            }\r\n          } else {\r\n            // <div> with attributes\r\n            this.provider = this.media.getAttribute(this.config.attributes.embed.provider); // Remove attribute\r\n\r\n            this.media.removeAttribute(this.config.attributes.embed.provider);\r\n          } // Unsupported or missing provider\r\n\r\n\r\n          if (is$1.empty(this.provider) || !Object.keys(providers).includes(this.provider)) {\r\n            this.debug.error('Setup failed: Invalid provider');\r\n            return;\r\n          } // Audio will come later for external providers\r\n\r\n\r\n          this.type = types.video;\r\n          break;\r\n\r\n        case 'video':\r\n        case 'audio':\r\n          this.type = type;\r\n          this.provider = providers.html5; // Get config from attributes\r\n\r\n          if (this.media.hasAttribute('crossorigin')) {\r\n            this.config.crossorigin = true;\r\n          }\r\n\r\n          if (this.media.hasAttribute('autoplay')) {\r\n            this.config.autoplay = true;\r\n          }\r\n\r\n          if (this.media.hasAttribute('playsinline') || this.media.hasAttribute('webkit-playsinline')) {\r\n            this.config.playsinline = true;\r\n          }\r\n\r\n          if (this.media.hasAttribute('muted')) {\r\n            this.config.muted = true;\r\n          }\r\n\r\n          if (this.media.hasAttribute('loop')) {\r\n            this.config.loop.active = true;\r\n          }\r\n\r\n          break;\r\n\r\n        default:\r\n          this.debug.error('Setup failed: unsupported type');\r\n          return;\r\n      } // Check for support again but with type\r\n\r\n\r\n      this.supported = support.check(this.type, this.provider, this.config.playsinline); // If no support for even API, bail\r\n\r\n      if (!this.supported.api) {\r\n        this.debug.error('Setup failed: no support');\r\n        return;\r\n      }\r\n\r\n      this.eventListeners = []; // Create listeners\r\n\r\n      this.listeners = new Listeners(this); // Setup local storage for user settings\r\n\r\n      this.storage = new Storage(this); // Store reference\r\n\r\n      this.media.plyr = this; // Wrap media\r\n\r\n      if (!is$1.element(this.elements.container)) {\r\n        this.elements.container = createElement('div', {\r\n          tabindex: 0\r\n        });\r\n        wrap(this.media, this.elements.container);\r\n      } // Migrate custom properties from media to container (so they work 😉)\r\n\r\n\r\n      ui.migrateStyles.call(this); // Add style hook\r\n\r\n      ui.addStyleHook.call(this); // Setup media\r\n\r\n      media.setup.call(this); // Listen for events if debugging\r\n\r\n      if (this.config.debug) {\r\n        on.call(this, this.elements.container, this.config.events.join(' '), function (event) {\r\n          _this.debug.log(\"event: \".concat(event.type));\r\n        });\r\n      } // Setup fullscreen\r\n\r\n\r\n      this.fullscreen = new Fullscreen(this); // Setup interface\r\n      // If embed but not fully supported, build interface now to avoid flash of controls\r\n\r\n      if (this.isHTML5 || this.isEmbed && !this.supported.ui) {\r\n        ui.build.call(this);\r\n      } // Container listeners\r\n\r\n\r\n      this.listeners.container(); // Global listeners\r\n\r\n      this.listeners.global(); // Setup ads if provided\r\n\r\n      if (this.config.ads.enabled) {\r\n        this.ads = new Ads(this);\r\n      } // Autoplay if required\r\n\r\n\r\n      if (this.isHTML5 && this.config.autoplay) {\r\n        setTimeout(function () {\r\n          return silencePromise(_this.play());\r\n        }, 10);\r\n      } // Seek time will be recorded (in listeners.js) so we can prevent hiding controls for a few seconds after seek\r\n\r\n\r\n      this.lastSeekTime = 0; // Setup preview thumbnails if enabled\r\n\r\n      if (this.config.previewThumbnails.enabled) {\r\n        this.previewThumbnails = new PreviewThumbnails(this);\r\n      }\r\n    } // ---------------------------------------\r\n    // API\r\n    // ---------------------------------------\r\n\r\n    /**\r\n     * Types and provider helpers\r\n     */\r\n\r\n\r\n    _createClass(Plyr, [{\r\n      key: \"play\",\r\n\r\n      /**\r\n       * Play the media, or play the advertisement (if they are not blocked)\r\n       */\r\n      value: function play() {\r\n        var _this2 = this;\r\n\r\n        if (!is$1.function(this.media.play)) {\r\n          return null;\r\n        } // Intecept play with ads\r\n\r\n\r\n        if (this.ads && this.ads.enabled) {\r\n          this.ads.managerPromise.then(function () {\r\n            return _this2.ads.play();\r\n          }).catch(function () {\r\n            return silencePromise(_this2.media.play());\r\n          });\r\n        } // Return the promise (for HTML5)\r\n\r\n\r\n        return this.media.play();\r\n      }\r\n      /**\r\n       * Pause the media\r\n       */\r\n\r\n    }, {\r\n      key: \"pause\",\r\n      value: function pause() {\r\n        if (!this.playing || !is$1.function(this.media.pause)) {\r\n          return null;\r\n        }\r\n\r\n        return this.media.pause();\r\n      }\r\n      /**\r\n       * Get playing state\r\n       */\r\n\r\n    }, {\r\n      key: \"togglePlay\",\r\n\r\n      /**\r\n       * Toggle playback based on current status\r\n       * @param {Boolean} input\r\n       */\r\n      value: function togglePlay(input) {\r\n        // Toggle based on current state if nothing passed\r\n        var toggle = is$1.boolean(input) ? input : !this.playing;\r\n\r\n        if (toggle) {\r\n          return this.play();\r\n        }\r\n\r\n        return this.pause();\r\n      }\r\n      /**\r\n       * Stop playback\r\n       */\r\n\r\n    }, {\r\n      key: \"stop\",\r\n      value: function stop() {\r\n        if (this.isHTML5) {\r\n          this.pause();\r\n          this.restart();\r\n        } else if (is$1.function(this.media.stop)) {\r\n          this.media.stop();\r\n        }\r\n      }\r\n      /**\r\n       * Restart playback\r\n       */\r\n\r\n    }, {\r\n      key: \"restart\",\r\n      value: function restart() {\r\n        this.currentTime = 0;\r\n      }\r\n      /**\r\n       * Rewind\r\n       * @param {Number} seekTime - how far to rewind in seconds. Defaults to the config.seekTime\r\n       */\r\n\r\n    }, {\r\n      key: \"rewind\",\r\n      value: function rewind(seekTime) {\r\n        this.currentTime -= is$1.number(seekTime) ? seekTime : this.config.seekTime;\r\n      }\r\n      /**\r\n       * Fast forward\r\n       * @param {Number} seekTime - how far to fast forward in seconds. Defaults to the config.seekTime\r\n       */\r\n\r\n    }, {\r\n      key: \"forward\",\r\n      value: function forward(seekTime) {\r\n        this.currentTime += is$1.number(seekTime) ? seekTime : this.config.seekTime;\r\n      }\r\n      /**\r\n       * Seek to a time\r\n       * @param {Number} input - where to seek to in seconds. Defaults to 0 (the start)\r\n       */\r\n\r\n    }, {\r\n      key: \"increaseVolume\",\r\n\r\n      /**\r\n       * Increase volume\r\n       * @param {Boolean} step - How much to decrease by (between 0 and 1)\r\n       */\r\n      value: function increaseVolume(step) {\r\n        var volume = this.media.muted ? 0 : this.volume;\r\n        this.volume = volume + (is$1.number(step) ? step : 0);\r\n      }\r\n      /**\r\n       * Decrease volume\r\n       * @param {Boolean} step - How much to decrease by (between 0 and 1)\r\n       */\r\n\r\n    }, {\r\n      key: \"decreaseVolume\",\r\n      value: function decreaseVolume(step) {\r\n        this.increaseVolume(-step);\r\n      }\r\n      /**\r\n       * Set muted state\r\n       * @param {Boolean} mute\r\n       */\r\n\r\n    }, {\r\n      key: \"toggleCaptions\",\r\n\r\n      /**\r\n       * Toggle captions\r\n       * @param {Boolean} input - Whether to enable captions\r\n       */\r\n      value: function toggleCaptions(input) {\r\n        captions.toggle.call(this, input, false);\r\n      }\r\n      /**\r\n       * Set the caption track by index\r\n       * @param {Number} - Caption index\r\n       */\r\n\r\n    }, {\r\n      key: \"airplay\",\r\n\r\n      /**\r\n       * Trigger the airplay dialog\r\n       * TODO: update player with state, support, enabled\r\n       */\r\n      value: function airplay() {\r\n        // Show dialog if supported\r\n        if (support.airplay) {\r\n          this.media.webkitShowPlaybackTargetPicker();\r\n        }\r\n      }\r\n      /**\r\n       * Toggle the player controls\r\n       * @param {Boolean} [toggle] - Whether to show the controls\r\n       */\r\n\r\n    }, {\r\n      key: \"toggleControls\",\r\n      value: function toggleControls(toggle) {\r\n        // Don't toggle if missing UI support or if it's audio\r\n        if (this.supported.ui && !this.isAudio) {\r\n          // Get state before change\r\n          var isHidden = hasClass(this.elements.container, this.config.classNames.hideControls); // Negate the argument if not undefined since adding the class to hides the controls\r\n\r\n          var force = typeof toggle === 'undefined' ? undefined : !toggle; // Apply and get updated state\r\n\r\n          var hiding = toggleClass(this.elements.container, this.config.classNames.hideControls, force); // Close menu\r\n\r\n          if (hiding && is$1.array(this.config.controls) && this.config.controls.includes('settings') && !is$1.empty(this.config.settings)) {\r\n            controls.toggleMenu.call(this, false);\r\n          } // Trigger event on change\r\n\r\n\r\n          if (hiding !== isHidden) {\r\n            var eventName = hiding ? 'controlshidden' : 'controlsshown';\r\n            triggerEvent.call(this, this.media, eventName);\r\n          }\r\n\r\n          return !hiding;\r\n        }\r\n\r\n        return false;\r\n      }\r\n      /**\r\n       * Add event listeners\r\n       * @param {String} event - Event type\r\n       * @param {Function} callback - Callback for when event occurs\r\n       */\r\n\r\n    }, {\r\n      key: \"on\",\r\n      value: function on$1(event, callback) {\r\n        on.call(this, this.elements.container, event, callback);\r\n      }\r\n      /**\r\n       * Add event listeners once\r\n       * @param {String} event - Event type\r\n       * @param {Function} callback - Callback for when event occurs\r\n       */\r\n\r\n    }, {\r\n      key: \"once\",\r\n      value: function once$1(event, callback) {\r\n        once.call(this, this.elements.container, event, callback);\r\n      }\r\n      /**\r\n       * Remove event listeners\r\n       * @param {String} event - Event type\r\n       * @param {Function} callback - Callback for when event occurs\r\n       */\r\n\r\n    }, {\r\n      key: \"off\",\r\n      value: function off$1(event, callback) {\r\n        off(this.elements.container, event, callback);\r\n      }\r\n      /**\r\n       * Destroy an instance\r\n       * Event listeners are removed when elements are removed\r\n       * http://stackoverflow.com/questions/12528049/if-a-dom-element-is-removed-are-its-listeners-also-removed-from-memory\r\n       * @param {Function} callback - Callback for when destroy is complete\r\n       * @param {Boolean} soft - Whether it's a soft destroy (for source changes etc)\r\n       */\r\n\r\n    }, {\r\n      key: \"destroy\",\r\n      value: function destroy(callback) {\r\n        var _this3 = this;\r\n\r\n        var soft = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\r\n\r\n        if (!this.ready) {\r\n          return;\r\n        }\r\n\r\n        var done = function done() {\r\n          // Reset overflow (incase destroyed while in fullscreen)\r\n          document.body.style.overflow = ''; // GC for embed\r\n\r\n          _this3.embed = null; // If it's a soft destroy, make minimal changes\r\n\r\n          if (soft) {\r\n            if (Object.keys(_this3.elements).length) {\r\n              // Remove elements\r\n              removeElement(_this3.elements.buttons.play);\r\n              removeElement(_this3.elements.captions);\r\n              removeElement(_this3.elements.controls);\r\n              removeElement(_this3.elements.wrapper); // Clear for GC\r\n\r\n              _this3.elements.buttons.play = null;\r\n              _this3.elements.captions = null;\r\n              _this3.elements.controls = null;\r\n              _this3.elements.wrapper = null;\r\n            } // Callback\r\n\r\n\r\n            if (is$1.function(callback)) {\r\n              callback();\r\n            }\r\n          } else {\r\n            // Unbind listeners\r\n            unbindListeners.call(_this3); // Replace the container with the original element provided\r\n\r\n            replaceElement(_this3.elements.original, _this3.elements.container); // Event\r\n\r\n            triggerEvent.call(_this3, _this3.elements.original, 'destroyed', true); // Callback\r\n\r\n            if (is$1.function(callback)) {\r\n              callback.call(_this3.elements.original);\r\n            } // Reset state\r\n\r\n\r\n            _this3.ready = false; // Clear for garbage collection\r\n\r\n            setTimeout(function () {\r\n              _this3.elements = null;\r\n              _this3.media = null;\r\n            }, 200);\r\n          }\r\n        }; // Stop playback\r\n\r\n\r\n        this.stop(); // Clear timeouts\r\n\r\n        clearTimeout(this.timers.loading);\r\n        clearTimeout(this.timers.controls);\r\n        clearTimeout(this.timers.resized); // Provider specific stuff\r\n\r\n        if (this.isHTML5) {\r\n          // Restore native video controls\r\n          ui.toggleNativeControls.call(this, true); // Clean up\r\n\r\n          done();\r\n        } else if (this.isYouTube) {\r\n          // Clear timers\r\n          clearInterval(this.timers.buffering);\r\n          clearInterval(this.timers.playing); // Destroy YouTube API\r\n\r\n          if (this.embed !== null && is$1.function(this.embed.destroy)) {\r\n            this.embed.destroy();\r\n          } // Clean up\r\n\r\n\r\n          done();\r\n        } else if (this.isVimeo) {\r\n          // Destroy Vimeo API\r\n          // then clean up (wait, to prevent postmessage errors)\r\n          if (this.embed !== null) {\r\n            this.embed.unload().then(done);\r\n          } // Vimeo does not always return\r\n\r\n\r\n          setTimeout(done, 200);\r\n        }\r\n      }\r\n      /**\r\n       * Check for support for a mime type (HTML5 only)\r\n       * @param {String} type - Mime type\r\n       */\r\n\r\n    }, {\r\n      key: \"supports\",\r\n      value: function supports(type) {\r\n        return support.mime.call(this, type);\r\n      }\r\n      /**\r\n       * Check for support\r\n       * @param {String} type - Player type (audio/video)\r\n       * @param {String} provider - Provider (html5/youtube/vimeo)\r\n       * @param {Boolean} inline - Where player has `playsinline` sttribute\r\n       */\r\n\r\n    }, {\r\n      key: \"isHTML5\",\r\n      get: function get() {\r\n        return this.provider === providers.html5;\r\n      }\r\n    }, {\r\n      key: \"isEmbed\",\r\n      get: function get() {\r\n        return this.isYouTube || this.isVimeo;\r\n      }\r\n    }, {\r\n      key: \"isYouTube\",\r\n      get: function get() {\r\n        return this.provider === providers.youtube;\r\n      }\r\n    }, {\r\n      key: \"isVimeo\",\r\n      get: function get() {\r\n        return this.provider === providers.vimeo;\r\n      }\r\n    }, {\r\n      key: \"isVideo\",\r\n      get: function get() {\r\n        return this.type === types.video;\r\n      }\r\n    }, {\r\n      key: \"isAudio\",\r\n      get: function get() {\r\n        return this.type === types.audio;\r\n      }\r\n    }, {\r\n      key: \"playing\",\r\n      get: function get() {\r\n        return Boolean(this.ready && !this.paused && !this.ended);\r\n      }\r\n      /**\r\n       * Get paused state\r\n       */\r\n\r\n    }, {\r\n      key: \"paused\",\r\n      get: function get() {\r\n        return Boolean(this.media.paused);\r\n      }\r\n      /**\r\n       * Get stopped state\r\n       */\r\n\r\n    }, {\r\n      key: \"stopped\",\r\n      get: function get() {\r\n        return Boolean(this.paused && this.currentTime === 0);\r\n      }\r\n      /**\r\n       * Get ended state\r\n       */\r\n\r\n    }, {\r\n      key: \"ended\",\r\n      get: function get() {\r\n        return Boolean(this.media.ended);\r\n      }\r\n    }, {\r\n      key: \"currentTime\",\r\n      set: function set(input) {\r\n        // Bail if media duration isn't available yet\r\n        if (!this.duration) {\r\n          return;\r\n        } // Validate input\r\n\r\n\r\n        var inputIsValid = is$1.number(input) && input > 0; // Set\r\n\r\n        this.media.currentTime = inputIsValid ? Math.min(input, this.duration) : 0; // Logging\r\n\r\n        this.debug.log(\"Seeking to \".concat(this.currentTime, \" seconds\"));\r\n      }\r\n      /**\r\n       * Get current time\r\n       */\r\n      ,\r\n      get: function get() {\r\n        return Number(this.media.currentTime);\r\n      }\r\n      /**\r\n       * Get buffered\r\n       */\r\n\r\n    }, {\r\n      key: \"buffered\",\r\n      get: function get() {\r\n        var buffered = this.media.buffered; // YouTube / Vimeo return a float between 0-1\r\n\r\n        if (is$1.number(buffered)) {\r\n          return buffered;\r\n        } // HTML5\r\n        // TODO: Handle buffered chunks of the media\r\n        // (i.e. seek to another section buffers only that section)\r\n\r\n\r\n        if (buffered && buffered.length && this.duration > 0) {\r\n          return buffered.end(0) / this.duration;\r\n        }\r\n\r\n        return 0;\r\n      }\r\n      /**\r\n       * Get seeking status\r\n       */\r\n\r\n    }, {\r\n      key: \"seeking\",\r\n      get: function get() {\r\n        return Boolean(this.media.seeking);\r\n      }\r\n      /**\r\n       * Get the duration of the current media\r\n       */\r\n\r\n    }, {\r\n      key: \"duration\",\r\n      get: function get() {\r\n        // Faux duration set via config\r\n        var fauxDuration = parseFloat(this.config.duration); // Media duration can be NaN or Infinity before the media has loaded\r\n\r\n        var realDuration = (this.media || {}).duration;\r\n        var duration = !is$1.number(realDuration) || realDuration === Infinity ? 0 : realDuration; // If config duration is funky, use regular duration\r\n\r\n        return fauxDuration || duration;\r\n      }\r\n      /**\r\n       * Set the player volume\r\n       * @param {Number} value - must be between 0 and 1. Defaults to the value from local storage and config.volume if not set in storage\r\n       */\r\n\r\n    }, {\r\n      key: \"volume\",\r\n      set: function set(value) {\r\n        var volume = value;\r\n        var max = 1;\r\n        var min = 0;\r\n\r\n        if (is$1.string(volume)) {\r\n          volume = Number(volume);\r\n        } // Load volume from storage if no value specified\r\n\r\n\r\n        if (!is$1.number(volume)) {\r\n          volume = this.storage.get('volume');\r\n        } // Use config if all else fails\r\n\r\n\r\n        if (!is$1.number(volume)) {\r\n          volume = this.config.volume;\r\n        } // Maximum is volumeMax\r\n\r\n\r\n        if (volume > max) {\r\n          volume = max;\r\n        } // Minimum is volumeMin\r\n\r\n\r\n        if (volume < min) {\r\n          volume = min;\r\n        } // Update config\r\n\r\n\r\n        this.config.volume = volume; // Set the player volume\r\n\r\n        this.media.volume = volume; // If muted, and we're increasing volume manually, reset muted state\r\n\r\n        if (!is$1.empty(value) && this.muted && volume > 0) {\r\n          this.muted = false;\r\n        }\r\n      }\r\n      /**\r\n       * Get the current player volume\r\n       */\r\n      ,\r\n      get: function get() {\r\n        return Number(this.media.volume);\r\n      }\r\n    }, {\r\n      key: \"muted\",\r\n      set: function set(mute) {\r\n        var toggle = mute; // Load muted state from storage\r\n\r\n        if (!is$1.boolean(toggle)) {\r\n          toggle = this.storage.get('muted');\r\n        } // Use config if all else fails\r\n\r\n\r\n        if (!is$1.boolean(toggle)) {\r\n          toggle = this.config.muted;\r\n        } // Update config\r\n\r\n\r\n        this.config.muted = toggle; // Set mute on the player\r\n\r\n        this.media.muted = toggle;\r\n      }\r\n      /**\r\n       * Get current muted state\r\n       */\r\n      ,\r\n      get: function get() {\r\n        return Boolean(this.media.muted);\r\n      }\r\n      /**\r\n       * Check if the media has audio\r\n       */\r\n\r\n    }, {\r\n      key: \"hasAudio\",\r\n      get: function get() {\r\n        // Assume yes for all non HTML5 (as we can't tell...)\r\n        if (!this.isHTML5) {\r\n          return true;\r\n        }\r\n\r\n        if (this.isAudio) {\r\n          return true;\r\n        } // Get audio tracks\r\n\r\n\r\n        return Boolean(this.media.mozHasAudio) || Boolean(this.media.webkitAudioDecodedByteCount) || Boolean(this.media.audioTracks && this.media.audioTracks.length);\r\n      }\r\n      /**\r\n       * Set playback speed\r\n       * @param {Number} speed - the speed of playback (0.5-2.0)\r\n       */\r\n\r\n    }, {\r\n      key: \"speed\",\r\n      set: function set(input) {\r\n        var _this4 = this;\r\n\r\n        var speed = null;\r\n\r\n        if (is$1.number(input)) {\r\n          speed = input;\r\n        }\r\n\r\n        if (!is$1.number(speed)) {\r\n          speed = this.storage.get('speed');\r\n        }\r\n\r\n        if (!is$1.number(speed)) {\r\n          speed = this.config.speed.selected;\r\n        } // Clamp to min/max\r\n\r\n\r\n        var min = this.minimumSpeed,\r\n            max = this.maximumSpeed;\r\n        speed = clamp(speed, min, max); // Update config\r\n\r\n        this.config.speed.selected = speed; // Set media speed\r\n\r\n        setTimeout(function () {\r\n          _this4.media.playbackRate = speed;\r\n        }, 0);\r\n      }\r\n      /**\r\n       * Get current playback speed\r\n       */\r\n      ,\r\n      get: function get() {\r\n        return Number(this.media.playbackRate);\r\n      }\r\n      /**\r\n       * Get the minimum allowed speed\r\n       */\r\n\r\n    }, {\r\n      key: \"minimumSpeed\",\r\n      get: function get() {\r\n        if (this.isYouTube) {\r\n          // https://developers.google.com/youtube/iframe_api_reference#setPlaybackRate\r\n          return Math.min.apply(Math, _toConsumableArray(this.options.speed));\r\n        }\r\n\r\n        if (this.isVimeo) {\r\n          // https://github.com/vimeo/player.js/#setplaybackrateplaybackrate-number-promisenumber-rangeerrorerror\r\n          return 0.5;\r\n        } // https://stackoverflow.com/a/32320020/1191319\r\n\r\n\r\n        return 0.0625;\r\n      }\r\n      /**\r\n       * Get the maximum allowed speed\r\n       */\r\n\r\n    }, {\r\n      key: \"maximumSpeed\",\r\n      get: function get() {\r\n        if (this.isYouTube) {\r\n          // https://developers.google.com/youtube/iframe_api_reference#setPlaybackRate\r\n          return Math.max.apply(Math, _toConsumableArray(this.options.speed));\r\n        }\r\n\r\n        if (this.isVimeo) {\r\n          // https://github.com/vimeo/player.js/#setplaybackrateplaybackrate-number-promisenumber-rangeerrorerror\r\n          return 2;\r\n        } // https://stackoverflow.com/a/32320020/1191319\r\n\r\n\r\n        return 16;\r\n      }\r\n      /**\r\n       * Set playback quality\r\n       * Currently HTML5 & YouTube only\r\n       * @param {Number} input - Quality level\r\n       */\r\n\r\n    }, {\r\n      key: \"quality\",\r\n      set: function set(input) {\r\n        var config = this.config.quality;\r\n        var options = this.options.quality;\r\n\r\n        if (!options.length) {\r\n          return;\r\n        }\r\n\r\n        var quality = [!is$1.empty(input) && Number(input), this.storage.get('quality'), config.selected, config.default].find(is$1.number);\r\n        var updateStorage = true;\r\n\r\n        if (!options.includes(quality)) {\r\n          var value = closest$1(options, quality);\r\n          this.debug.warn(\"Unsupported quality option: \".concat(quality, \", using \").concat(value, \" instead\"));\r\n          quality = value; // Don't update storage if quality is not supported\r\n\r\n          updateStorage = false;\r\n        } // Update config\r\n\r\n\r\n        config.selected = quality; // Set quality\r\n\r\n        this.media.quality = quality; // Save to storage\r\n\r\n        if (updateStorage) {\r\n          this.storage.set({\r\n            quality: quality\r\n          });\r\n        }\r\n      }\r\n      /**\r\n       * Get current quality level\r\n       */\r\n      ,\r\n      get: function get() {\r\n        return this.media.quality;\r\n      }\r\n      /**\r\n       * Toggle loop\r\n       * TODO: Finish fancy new logic. Set the indicator on load as user may pass loop as config\r\n       * @param {Boolean} input - Whether to loop or not\r\n       */\r\n\r\n    }, {\r\n      key: \"loop\",\r\n      set: function set(input) {\r\n        var toggle = is$1.boolean(input) ? input : this.config.loop.active;\r\n        this.config.loop.active = toggle;\r\n        this.media.loop = toggle; // Set default to be a true toggle\r\n\r\n        /* const type = ['start', 'end', 'all', 'none', 'toggle'].includes(input) ? input : 'toggle';\r\n             switch (type) {\r\n                case 'start':\r\n                    if (this.config.loop.end && this.config.loop.end <= this.currentTime) {\r\n                        this.config.loop.end = null;\r\n                    }\r\n                    this.config.loop.start = this.currentTime;\r\n                    // this.config.loop.indicator.start = this.elements.display.played.value;\r\n                    break;\r\n                 case 'end':\r\n                    if (this.config.loop.start >= this.currentTime) {\r\n                        return this;\r\n                    }\r\n                    this.config.loop.end = this.currentTime;\r\n                    // this.config.loop.indicator.end = this.elements.display.played.value;\r\n                    break;\r\n                 case 'all':\r\n                    this.config.loop.start = 0;\r\n                    this.config.loop.end = this.duration - 2;\r\n                    this.config.loop.indicator.start = 0;\r\n                    this.config.loop.indicator.end = 100;\r\n                    break;\r\n                 case 'toggle':\r\n                    if (this.config.loop.active) {\r\n                        this.config.loop.start = 0;\r\n                        this.config.loop.end = null;\r\n                    } else {\r\n                        this.config.loop.start = 0;\r\n                        this.config.loop.end = this.duration - 2;\r\n                    }\r\n                    break;\r\n                 default:\r\n                    this.config.loop.start = 0;\r\n                    this.config.loop.end = null;\r\n                    break;\r\n            } */\r\n      }\r\n      /**\r\n       * Get current loop state\r\n       */\r\n      ,\r\n      get: function get() {\r\n        return Boolean(this.media.loop);\r\n      }\r\n      /**\r\n       * Set new media source\r\n       * @param {Object} input - The new source object (see docs)\r\n       */\r\n\r\n    }, {\r\n      key: \"source\",\r\n      set: function set(input) {\r\n        source.change.call(this, input);\r\n      }\r\n      /**\r\n       * Get current source\r\n       */\r\n      ,\r\n      get: function get() {\r\n        return this.media.currentSrc;\r\n      }\r\n      /**\r\n       * Get a download URL (either source or custom)\r\n       */\r\n\r\n    }, {\r\n      key: \"download\",\r\n      get: function get() {\r\n        var download = this.config.urls.download;\r\n        return is$1.url(download) ? download : this.source;\r\n      }\r\n      /**\r\n       * Set the download URL\r\n       */\r\n      ,\r\n      set: function set(input) {\r\n        if (!is$1.url(input)) {\r\n          return;\r\n        }\r\n\r\n        this.config.urls.download = input;\r\n        controls.setDownloadUrl.call(this);\r\n      }\r\n      /**\r\n       * Set the poster image for a video\r\n       * @param {String} input - the URL for the new poster image\r\n       */\r\n\r\n    }, {\r\n      key: \"poster\",\r\n      set: function set(input) {\r\n        if (!this.isVideo) {\r\n          this.debug.warn('Poster can only be set for video');\r\n          return;\r\n        }\r\n\r\n        ui.setPoster.call(this, input, false).catch(function () {});\r\n      }\r\n      /**\r\n       * Get the current poster image\r\n       */\r\n      ,\r\n      get: function get() {\r\n        if (!this.isVideo) {\r\n          return null;\r\n        }\r\n\r\n        return this.media.getAttribute('poster') || this.media.getAttribute('data-poster');\r\n      }\r\n      /**\r\n       * Get the current aspect ratio in use\r\n       */\r\n\r\n    }, {\r\n      key: \"ratio\",\r\n      get: function get() {\r\n        if (!this.isVideo) {\r\n          return null;\r\n        }\r\n\r\n        var ratio = reduceAspectRatio(getAspectRatio.call(this));\r\n        return is$1.array(ratio) ? ratio.join(':') : ratio;\r\n      }\r\n      /**\r\n       * Set video aspect ratio\r\n       */\r\n      ,\r\n      set: function set(input) {\r\n        if (!this.isVideo) {\r\n          this.debug.warn('Aspect ratio can only be set for video');\r\n          return;\r\n        }\r\n\r\n        if (!is$1.string(input) || !validateRatio(input)) {\r\n          this.debug.error(\"Invalid aspect ratio specified (\".concat(input, \")\"));\r\n          return;\r\n        }\r\n\r\n        this.config.ratio = input;\r\n        setAspectRatio.call(this);\r\n      }\r\n      /**\r\n       * Set the autoplay state\r\n       * @param {Boolean} input - Whether to autoplay or not\r\n       */\r\n\r\n    }, {\r\n      key: \"autoplay\",\r\n      set: function set(input) {\r\n        var toggle = is$1.boolean(input) ? input : this.config.autoplay;\r\n        this.config.autoplay = toggle;\r\n      }\r\n      /**\r\n       * Get the current autoplay state\r\n       */\r\n      ,\r\n      get: function get() {\r\n        return Boolean(this.config.autoplay);\r\n      }\r\n    }, {\r\n      key: \"currentTrack\",\r\n      set: function set(input) {\r\n        captions.set.call(this, input, false);\r\n      }\r\n      /**\r\n       * Get the current caption track index (-1 if disabled)\r\n       */\r\n      ,\r\n      get: function get() {\r\n        var _this$captions = this.captions,\r\n            toggled = _this$captions.toggled,\r\n            currentTrack = _this$captions.currentTrack;\r\n        return toggled ? currentTrack : -1;\r\n      }\r\n      /**\r\n       * Set the wanted language for captions\r\n       * Since tracks can be added later it won't update the actual caption track until there is a matching track\r\n       * @param {String} - Two character ISO language code (e.g. EN, FR, PT, etc)\r\n       */\r\n\r\n    }, {\r\n      key: \"language\",\r\n      set: function set(input) {\r\n        captions.setLanguage.call(this, input, false);\r\n      }\r\n      /**\r\n       * Get the current track's language\r\n       */\r\n      ,\r\n      get: function get() {\r\n        return (captions.getCurrentTrack.call(this) || {}).language;\r\n      }\r\n      /**\r\n       * Toggle picture-in-picture playback on WebKit/MacOS\r\n       * TODO: update player with state, support, enabled\r\n       * TODO: detect outside changes\r\n       */\r\n\r\n    }, {\r\n      key: \"pip\",\r\n      set: function set(input) {\r\n        // Bail if no support\r\n        if (!support.pip) {\r\n          return;\r\n        } // Toggle based on current state if not passed\r\n\r\n\r\n        var toggle = is$1.boolean(input) ? input : !this.pip; // Toggle based on current state\r\n        // Safari\r\n\r\n        if (is$1.function(this.media.webkitSetPresentationMode)) {\r\n          this.media.webkitSetPresentationMode(toggle ? pip.active : pip.inactive);\r\n        } // Chrome\r\n\r\n\r\n        if (is$1.function(this.media.requestPictureInPicture)) {\r\n          if (!this.pip && toggle) {\r\n            this.media.requestPictureInPicture();\r\n          } else if (this.pip && !toggle) {\r\n            document.exitPictureInPicture();\r\n          }\r\n        }\r\n      }\r\n      /**\r\n       * Get the current picture-in-picture state\r\n       */\r\n      ,\r\n      get: function get() {\r\n        if (!support.pip) {\r\n          return null;\r\n        } // Safari\r\n\r\n\r\n        if (!is$1.empty(this.media.webkitPresentationMode)) {\r\n          return this.media.webkitPresentationMode === pip.active;\r\n        } // Chrome\r\n\r\n\r\n        return this.media === document.pictureInPictureElement;\r\n      }\r\n    }], [{\r\n      key: \"supported\",\r\n      value: function supported(type, provider, inline) {\r\n        return support.check(type, provider, inline);\r\n      }\r\n      /**\r\n       * Load an SVG sprite into the page\r\n       * @param {String} url - URL for the SVG sprite\r\n       * @param {String} [id] - Unique ID\r\n       */\r\n\r\n    }, {\r\n      key: \"loadSprite\",\r\n      value: function loadSprite$1(url, id) {\r\n        return loadSprite(url, id);\r\n      }\r\n      /**\r\n       * Setup multiple instances\r\n       * @param {*} selector\r\n       * @param {Object} options\r\n       */\r\n\r\n    }, {\r\n      key: \"setup\",\r\n      value: function setup(selector) {\r\n        var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\r\n        var targets = null;\r\n\r\n        if (is$1.string(selector)) {\r\n          targets = Array.from(document.querySelectorAll(selector));\r\n        } else if (is$1.nodeList(selector)) {\r\n          targets = Array.from(selector);\r\n        } else if (is$1.array(selector)) {\r\n          targets = selector.filter(is$1.element);\r\n        }\r\n\r\n        if (is$1.empty(targets)) {\r\n          return null;\r\n        }\r\n\r\n        return targets.map(function (t) {\r\n          return new Plyr(t, options);\r\n        });\r\n      }\r\n    }]);\r\n\r\n    return Plyr;\r\n  }();\r\n\r\n  Plyr.defaults = cloneDeep(defaults$1);\r\n\r\n  return Plyr;\r\n\r\n})));\r\n","/*!\r\n * Select2 4.0.6-rc.1\r\n * https://select2.github.io\r\n *\r\n * Released under the MIT license\r\n * https://github.com/select2/select2/blob/master/LICENSE.md\r\n */\r\n;(function (factory) {\r\n  if (typeof define === 'function' && define.amd) {\r\n    // AMD. Register as an anonymous module.\r\n    define(['jquery'], factory);\r\n  } else if (typeof module === 'object' && module.exports) {\r\n    // Node/CommonJS\r\n    module.exports = function (root, jQuery) {\r\n      if (jQuery === undefined) {\r\n        // require('jQuery') returns a factory that requires window to\r\n        // build a jQuery instance, we normalize how we use modules\r\n        // that require this pattern but the window provided is a noop\r\n        // if it's defined (how jquery works)\r\n        if (typeof window !== 'undefined') {\r\n          jQuery = require('jquery');\r\n        }\r\n        else {\r\n          jQuery = require('jquery')(root);\r\n        }\r\n      }\r\n      factory(jQuery);\r\n      return jQuery;\r\n    };\r\n  } else {\r\n    // Browser globals\r\n    factory(jQuery);\r\n  }\r\n} (function (jQuery) {\r\n  // This is needed so we can catch the AMD loader configuration and use it\r\n  // The inner file should be wrapped (by `banner.start.js`) in a function that\r\n  // returns the AMD loader references.\r\n  var S2 =(function () {\r\n  // Restore the Select2 AMD loader so it can be used\r\n  // Needed mostly in the language files, where the loader is not inserted\r\n  if (jQuery && jQuery.fn && jQuery.fn.select2 && jQuery.fn.select2.amd) {\r\n    var S2 = jQuery.fn.select2.amd;\r\n  }\r\nvar S2;(function () { if (!S2 || !S2.requirejs) {\r\nif (!S2) { S2 = {}; } else { require = S2; }\r\n/**\r\n * @license almond 0.3.3 Copyright jQuery Foundation and other contributors.\r\n * Released under MIT license, http://github.com/requirejs/almond/LICENSE\r\n */\r\n//Going sloppy to avoid 'use strict' string cost, but strict practices should\r\n//be followed.\r\n/*global setTimeout: false */\r\n\r\nvar requirejs, require, define;\r\n(function (undef) {\r\n    var main, req, makeMap, handlers,\r\n        defined = {},\r\n        waiting = {},\r\n        config = {},\r\n        defining = {},\r\n        hasOwn = Object.prototype.hasOwnProperty,\r\n        aps = [].slice,\r\n        jsSuffixRegExp = /\\.js$/;\r\n\r\n    function hasProp(obj, prop) {\r\n        return hasOwn.call(obj, prop);\r\n    }\r\n\r\n    /**\r\n     * Given a relative module name, like ./something, normalize it to\r\n     * a real name that can be mapped to a path.\r\n     * @param {String} name the relative name\r\n     * @param {String} baseName a real name that the name arg is relative\r\n     * to.\r\n     * @returns {String} normalized name\r\n     */\r\n    function normalize(name, baseName) {\r\n        var nameParts, nameSegment, mapValue, foundMap, lastIndex,\r\n            foundI, foundStarMap, starI, i, j, part, normalizedBaseParts,\r\n            baseParts = baseName && baseName.split(\"/\"),\r\n            map = config.map,\r\n            starMap = (map && map['*']) || {};\r\n\r\n        //Adjust any relative paths.\r\n        if (name) {\r\n            name = name.split('/');\r\n            lastIndex = name.length - 1;\r\n\r\n            // If wanting node ID compatibility, strip .js from end\r\n            // of IDs. Have to do this here, and not in nameToUrl\r\n            // because node allows either .js or non .js to map\r\n            // to same file.\r\n            if (config.nodeIdCompat && jsSuffixRegExp.test(name[lastIndex])) {\r\n                name[lastIndex] = name[lastIndex].replace(jsSuffixRegExp, '');\r\n            }\r\n\r\n            // Starts with a '.' so need the baseName\r\n            if (name[0].charAt(0) === '.' && baseParts) {\r\n                //Convert baseName to array, and lop off the last part,\r\n                //so that . matches that 'directory' and not name of the baseName's\r\n                //module. For instance, baseName of 'one/two/three', maps to\r\n                //'one/two/three.js', but we want the directory, 'one/two' for\r\n                //this normalization.\r\n                normalizedBaseParts = baseParts.slice(0, baseParts.length - 1);\r\n                name = normalizedBaseParts.concat(name);\r\n            }\r\n\r\n            //start trimDots\r\n            for (i = 0; i < name.length; i++) {\r\n                part = name[i];\r\n                if (part === '.') {\r\n                    name.splice(i, 1);\r\n                    i -= 1;\r\n                } else if (part === '..') {\r\n                    // If at the start, or previous value is still ..,\r\n                    // keep them so that when converted to a path it may\r\n                    // still work when converted to a path, even though\r\n                    // as an ID it is less than ideal. In larger point\r\n                    // releases, may be better to just kick out an error.\r\n                    if (i === 0 || (i === 1 && name[2] === '..') || name[i - 1] === '..') {\r\n                        continue;\r\n                    } else if (i > 0) {\r\n                        name.splice(i - 1, 2);\r\n                        i -= 2;\r\n                    }\r\n                }\r\n            }\r\n            //end trimDots\r\n\r\n            name = name.join('/');\r\n        }\r\n\r\n        //Apply map config if available.\r\n        if ((baseParts || starMap) && map) {\r\n            nameParts = name.split('/');\r\n\r\n            for (i = nameParts.length; i > 0; i -= 1) {\r\n                nameSegment = nameParts.slice(0, i).join(\"/\");\r\n\r\n                if (baseParts) {\r\n                    //Find the longest baseName segment match in the config.\r\n                    //So, do joins on the biggest to smallest lengths of baseParts.\r\n                    for (j = baseParts.length; j > 0; j -= 1) {\r\n                        mapValue = map[baseParts.slice(0, j).join('/')];\r\n\r\n                        //baseName segment has  config, find if it has one for\r\n                        //this name.\r\n                        if (mapValue) {\r\n                            mapValue = mapValue[nameSegment];\r\n                            if (mapValue) {\r\n                                //Match, update name to the new value.\r\n                                foundMap = mapValue;\r\n                                foundI = i;\r\n                                break;\r\n                            }\r\n                        }\r\n                    }\r\n                }\r\n\r\n                if (foundMap) {\r\n                    break;\r\n                }\r\n\r\n                //Check for a star map match, but just hold on to it,\r\n                //if there is a shorter segment match later in a matching\r\n                //config, then favor over this star map.\r\n                if (!foundStarMap && starMap && starMap[nameSegment]) {\r\n                    foundStarMap = starMap[nameSegment];\r\n                    starI = i;\r\n                }\r\n            }\r\n\r\n            if (!foundMap && foundStarMap) {\r\n                foundMap = foundStarMap;\r\n                foundI = starI;\r\n            }\r\n\r\n            if (foundMap) {\r\n                nameParts.splice(0, foundI, foundMap);\r\n                name = nameParts.join('/');\r\n            }\r\n        }\r\n\r\n        return name;\r\n    }\r\n\r\n    function makeRequire(relName, forceSync) {\r\n        return function () {\r\n            //A version of a require function that passes a moduleName\r\n            //value for items that may need to\r\n            //look up paths relative to the moduleName\r\n            var args = aps.call(arguments, 0);\r\n\r\n            //If first arg is not require('string'), and there is only\r\n            //one arg, it is the array form without a callback. Insert\r\n            //a null so that the following concat is correct.\r\n            if (typeof args[0] !== 'string' && args.length === 1) {\r\n                args.push(null);\r\n            }\r\n            return req.apply(undef, args.concat([relName, forceSync]));\r\n        };\r\n    }\r\n\r\n    function makeNormalize(relName) {\r\n        return function (name) {\r\n            return normalize(name, relName);\r\n        };\r\n    }\r\n\r\n    function makeLoad(depName) {\r\n        return function (value) {\r\n            defined[depName] = value;\r\n        };\r\n    }\r\n\r\n    function callDep(name) {\r\n        if (hasProp(waiting, name)) {\r\n            var args = waiting[name];\r\n            delete waiting[name];\r\n            defining[name] = true;\r\n            main.apply(undef, args);\r\n        }\r\n\r\n        if (!hasProp(defined, name) && !hasProp(defining, name)) {\r\n            throw new Error('No ' + name);\r\n        }\r\n        return defined[name];\r\n    }\r\n\r\n    //Turns a plugin!resource to [plugin, resource]\r\n    //with the plugin being undefined if the name\r\n    //did not have a plugin prefix.\r\n    function splitPrefix(name) {\r\n        var prefix,\r\n            index = name ? name.indexOf('!') : -1;\r\n        if (index > -1) {\r\n            prefix = name.substring(0, index);\r\n            name = name.substring(index + 1, name.length);\r\n        }\r\n        return [prefix, name];\r\n    }\r\n\r\n    //Creates a parts array for a relName where first part is plugin ID,\r\n    //second part is resource ID. Assumes relName has already been normalized.\r\n    function makeRelParts(relName) {\r\n        return relName ? splitPrefix(relName) : [];\r\n    }\r\n\r\n    /**\r\n     * Makes a name map, normalizing the name, and using a plugin\r\n     * for normalization if necessary. Grabs a ref to plugin\r\n     * too, as an optimization.\r\n     */\r\n    makeMap = function (name, relParts) {\r\n        var plugin,\r\n            parts = splitPrefix(name),\r\n            prefix = parts[0],\r\n            relResourceName = relParts[1];\r\n\r\n        name = parts[1];\r\n\r\n        if (prefix) {\r\n            prefix = normalize(prefix, relResourceName);\r\n            plugin = callDep(prefix);\r\n        }\r\n\r\n        //Normalize according\r\n        if (prefix) {\r\n            if (plugin && plugin.normalize) {\r\n                name = plugin.normalize(name, makeNormalize(relResourceName));\r\n            } else {\r\n                name = normalize(name, relResourceName);\r\n            }\r\n        } else {\r\n            name = normalize(name, relResourceName);\r\n            parts = splitPrefix(name);\r\n            prefix = parts[0];\r\n            name = parts[1];\r\n            if (prefix) {\r\n                plugin = callDep(prefix);\r\n            }\r\n        }\r\n\r\n        //Using ridiculous property names for space reasons\r\n        return {\r\n            f: prefix ? prefix + '!' + name : name, //fullName\r\n            n: name,\r\n            pr: prefix,\r\n            p: plugin\r\n        };\r\n    };\r\n\r\n    function makeConfig(name) {\r\n        return function () {\r\n            return (config && config.config && config.config[name]) || {};\r\n        };\r\n    }\r\n\r\n    handlers = {\r\n        require: function (name) {\r\n            return makeRequire(name);\r\n        },\r\n        exports: function (name) {\r\n            var e = defined[name];\r\n            if (typeof e !== 'undefined') {\r\n                return e;\r\n            } else {\r\n                return (defined[name] = {});\r\n            }\r\n        },\r\n        module: function (name) {\r\n            return {\r\n                id: name,\r\n                uri: '',\r\n                exports: defined[name],\r\n                config: makeConfig(name)\r\n            };\r\n        }\r\n    };\r\n\r\n    main = function (name, deps, callback, relName) {\r\n        var cjsModule, depName, ret, map, i, relParts,\r\n            args = [],\r\n            callbackType = typeof callback,\r\n            usingExports;\r\n\r\n        //Use name if no relName\r\n        relName = relName || name;\r\n        relParts = makeRelParts(relName);\r\n\r\n        //Call the callback to define the module, if necessary.\r\n        if (callbackType === 'undefined' || callbackType === 'function') {\r\n            //Pull out the defined dependencies and pass the ordered\r\n            //values to the callback.\r\n            //Default to [require, exports, module] if no deps\r\n            deps = !deps.length && callback.length ? ['require', 'exports', 'module'] : deps;\r\n            for (i = 0; i < deps.length; i += 1) {\r\n                map = makeMap(deps[i], relParts);\r\n                depName = map.f;\r\n\r\n                //Fast path CommonJS standard dependencies.\r\n                if (depName === \"require\") {\r\n                    args[i] = handlers.require(name);\r\n                } else if (depName === \"exports\") {\r\n                    //CommonJS module spec 1.1\r\n                    args[i] = handlers.exports(name);\r\n                    usingExports = true;\r\n                } else if (depName === \"module\") {\r\n                    //CommonJS module spec 1.1\r\n                    cjsModule = args[i] = handlers.module(name);\r\n                } else if (hasProp(defined, depName) ||\r\n                           hasProp(waiting, depName) ||\r\n                           hasProp(defining, depName)) {\r\n                    args[i] = callDep(depName);\r\n                } else if (map.p) {\r\n                    map.p.load(map.n, makeRequire(relName, true), makeLoad(depName), {});\r\n                    args[i] = defined[depName];\r\n                } else {\r\n                    throw new Error(name + ' missing ' + depName);\r\n                }\r\n            }\r\n\r\n            ret = callback ? callback.apply(defined[name], args) : undefined;\r\n\r\n            if (name) {\r\n                //If setting exports via \"module\" is in play,\r\n                //favor that over return value and exports. After that,\r\n                //favor a non-undefined return value over exports use.\r\n                if (cjsModule && cjsModule.exports !== undef &&\r\n                        cjsModule.exports !== defined[name]) {\r\n                    defined[name] = cjsModule.exports;\r\n                } else if (ret !== undef || !usingExports) {\r\n                    //Use the return value from the function.\r\n                    defined[name] = ret;\r\n                }\r\n            }\r\n        } else if (name) {\r\n            //May just be an object definition for the module. Only\r\n            //worry about defining if have a module name.\r\n            defined[name] = callback;\r\n        }\r\n    };\r\n\r\n    requirejs = require = req = function (deps, callback, relName, forceSync, alt) {\r\n        if (typeof deps === \"string\") {\r\n            if (handlers[deps]) {\r\n                //callback in this case is really relName\r\n                return handlers[deps](callback);\r\n            }\r\n            //Just return the module wanted. In this scenario, the\r\n            //deps arg is the module name, and second arg (if passed)\r\n            //is just the relName.\r\n            //Normalize module name, if it contains . or ..\r\n            return callDep(makeMap(deps, makeRelParts(callback)).f);\r\n        } else if (!deps.splice) {\r\n            //deps is a config object, not an array.\r\n            config = deps;\r\n            if (config.deps) {\r\n                req(config.deps, config.callback);\r\n            }\r\n            if (!callback) {\r\n                return;\r\n            }\r\n\r\n            if (callback.splice) {\r\n                //callback is an array, which means it is a dependency list.\r\n                //Adjust args if there are dependencies\r\n                deps = callback;\r\n                callback = relName;\r\n                relName = null;\r\n            } else {\r\n                deps = undef;\r\n            }\r\n        }\r\n\r\n        //Support require(['a'])\r\n        callback = callback || function () {};\r\n\r\n        //If relName is a function, it is an errback handler,\r\n        //so remove it.\r\n        if (typeof relName === 'function') {\r\n            relName = forceSync;\r\n            forceSync = alt;\r\n        }\r\n\r\n        //Simulate async callback;\r\n        if (forceSync) {\r\n            main(undef, deps, callback, relName);\r\n        } else {\r\n            //Using a non-zero value because of concern for what old browsers\r\n            //do, and latest browsers \"upgrade\" to 4 if lower value is used:\r\n            //http://www.whatwg.org/specs/web-apps/current-work/multipage/timers.html#dom-windowtimers-settimeout:\r\n            //If want a value immediately, use require('id') instead -- something\r\n            //that works in almond on the global level, but not guaranteed and\r\n            //unlikely to work in other AMD implementations.\r\n            setTimeout(function () {\r\n                main(undef, deps, callback, relName);\r\n            }, 4);\r\n        }\r\n\r\n        return req;\r\n    };\r\n\r\n    /**\r\n     * Just drops the config on the floor, but returns req in case\r\n     * the config return value is used.\r\n     */\r\n    req.config = function (cfg) {\r\n        return req(cfg);\r\n    };\r\n\r\n    /**\r\n     * Expose module registry for debugging and tooling\r\n     */\r\n    requirejs._defined = defined;\r\n\r\n    define = function (name, deps, callback) {\r\n        if (typeof name !== 'string') {\r\n            throw new Error('See almond README: incorrect module build, no module name');\r\n        }\r\n\r\n        //This module may not have dependencies\r\n        if (!deps.splice) {\r\n            //deps is not an array, so probably means\r\n            //an object literal or factory function for\r\n            //the value. Adjust args.\r\n            callback = deps;\r\n            deps = [];\r\n        }\r\n\r\n        if (!hasProp(defined, name) && !hasProp(waiting, name)) {\r\n            waiting[name] = [name, deps, callback];\r\n        }\r\n    };\r\n\r\n    define.amd = {\r\n        jQuery: true\r\n    };\r\n}());\r\n\r\nS2.requirejs = requirejs;S2.require = require;S2.define = define;\r\n}\r\n}());\r\nS2.define(\"almond\", function(){});\r\n\r\n/* global jQuery:false, $:false */\r\nS2.define('jquery',[],function () {\r\n  var _$ = jQuery || $;\r\n\r\n  if (_$ == null && console && console.error) {\r\n    console.error(\r\n      'Select2: An instance of jQuery or a jQuery-compatible library was not ' +\r\n      'found. Make sure that you are including jQuery before Select2 on your ' +\r\n      'web page.'\r\n    );\r\n  }\r\n\r\n  return _$;\r\n});\r\n\r\nS2.define('select2/utils',[\r\n  'jquery'\r\n], function ($) {\r\n  var Utils = {};\r\n\r\n  Utils.Extend = function (ChildClass, SuperClass) {\r\n    var __hasProp = {}.hasOwnProperty;\r\n\r\n    function BaseConstructor () {\r\n      this.constructor = ChildClass;\r\n    }\r\n\r\n    for (var key in SuperClass) {\r\n      if (__hasProp.call(SuperClass, key)) {\r\n        ChildClass[key] = SuperClass[key];\r\n      }\r\n    }\r\n\r\n    BaseConstructor.prototype = SuperClass.prototype;\r\n    ChildClass.prototype = new BaseConstructor();\r\n    ChildClass.__super__ = SuperClass.prototype;\r\n\r\n    return ChildClass;\r\n  };\r\n\r\n  function getMethods (theClass) {\r\n    var proto = theClass.prototype;\r\n\r\n    var methods = [];\r\n\r\n    for (var methodName in proto) {\r\n      var m = proto[methodName];\r\n\r\n      if (typeof m !== 'function') {\r\n        continue;\r\n      }\r\n\r\n      if (methodName === 'constructor') {\r\n        continue;\r\n      }\r\n\r\n      methods.push(methodName);\r\n    }\r\n\r\n    return methods;\r\n  }\r\n\r\n  Utils.Decorate = function (SuperClass, DecoratorClass) {\r\n    var decoratedMethods = getMethods(DecoratorClass);\r\n    var superMethods = getMethods(SuperClass);\r\n\r\n    function DecoratedClass () {\r\n      var unshift = Array.prototype.unshift;\r\n\r\n      var argCount = DecoratorClass.prototype.constructor.length;\r\n\r\n      var calledConstructor = SuperClass.prototype.constructor;\r\n\r\n      if (argCount > 0) {\r\n        unshift.call(arguments, SuperClass.prototype.constructor);\r\n\r\n        calledConstructor = DecoratorClass.prototype.constructor;\r\n      }\r\n\r\n      calledConstructor.apply(this, arguments);\r\n    }\r\n\r\n    DecoratorClass.displayName = SuperClass.displayName;\r\n\r\n    function ctr () {\r\n      this.constructor = DecoratedClass;\r\n    }\r\n\r\n    DecoratedClass.prototype = new ctr();\r\n\r\n    for (var m = 0; m < superMethods.length; m++) {\r\n      var superMethod = superMethods[m];\r\n\r\n      DecoratedClass.prototype[superMethod] =\r\n        SuperClass.prototype[superMethod];\r\n    }\r\n\r\n    var calledMethod = function (methodName) {\r\n      // Stub out the original method if it's not decorating an actual method\r\n      var originalMethod = function () {};\r\n\r\n      if (methodName in DecoratedClass.prototype) {\r\n        originalMethod = DecoratedClass.prototype[methodName];\r\n      }\r\n\r\n      var decoratedMethod = DecoratorClass.prototype[methodName];\r\n\r\n      return function () {\r\n        var unshift = Array.prototype.unshift;\r\n\r\n        unshift.call(arguments, originalMethod);\r\n\r\n        return decoratedMethod.apply(this, arguments);\r\n      };\r\n    };\r\n\r\n    for (var d = 0; d < decoratedMethods.length; d++) {\r\n      var decoratedMethod = decoratedMethods[d];\r\n\r\n      DecoratedClass.prototype[decoratedMethod] = calledMethod(decoratedMethod);\r\n    }\r\n\r\n    return DecoratedClass;\r\n  };\r\n\r\n  var Observable = function () {\r\n    this.listeners = {};\r\n  };\r\n\r\n  Observable.prototype.on = function (event, callback) {\r\n    this.listeners = this.listeners || {};\r\n\r\n    if (event in this.listeners) {\r\n      this.listeners[event].push(callback);\r\n    } else {\r\n      this.listeners[event] = [callback];\r\n    }\r\n  };\r\n\r\n  Observable.prototype.trigger = function (event) {\r\n    var slice = Array.prototype.slice;\r\n    var params = slice.call(arguments, 1);\r\n\r\n    this.listeners = this.listeners || {};\r\n\r\n    // Params should always come in as an array\r\n    if (params == null) {\r\n      params = [];\r\n    }\r\n\r\n    // If there are no arguments to the event, use a temporary object\r\n    if (params.length === 0) {\r\n      params.push({});\r\n    }\r\n\r\n    // Set the `_type` of the first object to the event\r\n    params[0]._type = event;\r\n\r\n    if (event in this.listeners) {\r\n      this.invoke(this.listeners[event], slice.call(arguments, 1));\r\n    }\r\n\r\n    if ('*' in this.listeners) {\r\n      this.invoke(this.listeners['*'], arguments);\r\n    }\r\n  };\r\n\r\n  Observable.prototype.invoke = function (listeners, params) {\r\n    for (var i = 0, len = listeners.length; i < len; i++) {\r\n      listeners[i].apply(this, params);\r\n    }\r\n  };\r\n\r\n  Utils.Observable = Observable;\r\n\r\n  Utils.generateChars = function (length) {\r\n    var chars = '';\r\n\r\n    for (var i = 0; i < length; i++) {\r\n      var randomChar = Math.floor(Math.random() * 36);\r\n      chars += randomChar.toString(36);\r\n    }\r\n\r\n    return chars;\r\n  };\r\n\r\n  Utils.bind = function (func, context) {\r\n    return function () {\r\n      func.apply(context, arguments);\r\n    };\r\n  };\r\n\r\n  Utils._convertData = function (data) {\r\n    for (var originalKey in data) {\r\n      var keys = originalKey.split('-');\r\n\r\n      var dataLevel = data;\r\n\r\n      if (keys.length === 1) {\r\n        continue;\r\n      }\r\n\r\n      for (var k = 0; k < keys.length; k++) {\r\n        var key = keys[k];\r\n\r\n        // Lowercase the first letter\r\n        // By default, dash-separated becomes camelCase\r\n        key = key.substring(0, 1).toLowerCase() + key.substring(1);\r\n\r\n        if (!(key in dataLevel)) {\r\n          dataLevel[key] = {};\r\n        }\r\n\r\n        if (k == keys.length - 1) {\r\n          dataLevel[key] = data[originalKey];\r\n        }\r\n\r\n        dataLevel = dataLevel[key];\r\n      }\r\n\r\n      delete data[originalKey];\r\n    }\r\n\r\n    return data;\r\n  };\r\n\r\n  Utils.hasScroll = function (index, el) {\r\n    // Adapted from the function created by @ShadowScripter\r\n    // and adapted by @BillBarry on the Stack Exchange Code Review website.\r\n    // The original code can be found at\r\n    // http://codereview.stackexchange.com/q/13338\r\n    // and was designed to be used with the Sizzle selector engine.\r\n\r\n    var $el = $(el);\r\n    var overflowX = el.style.overflowX;\r\n    var overflowY = el.style.overflowY;\r\n\r\n    //Check both x and y declarations\r\n    if (overflowX === overflowY &&\r\n        (overflowY === 'hidden' || overflowY === 'visible')) {\r\n      return false;\r\n    }\r\n\r\n    if (overflowX === 'scroll' || overflowY === 'scroll') {\r\n      return true;\r\n    }\r\n\r\n    return ($el.innerHeight() < el.scrollHeight ||\r\n      $el.innerWidth() < el.scrollWidth);\r\n  };\r\n\r\n  Utils.escapeMarkup = function (markup) {\r\n    var replaceMap = {\r\n      '\\\\': '&#92;',\r\n      '&': '&amp;',\r\n      '<': '&lt;',\r\n      '>': '&gt;',\r\n      '\"': '&quot;',\r\n      '\\'': '&#39;',\r\n      '/': '&#47;'\r\n    };\r\n\r\n    // Do not try to escape the markup if it's not a string\r\n    if (typeof markup !== 'string') {\r\n      return markup;\r\n    }\r\n\r\n    return String(markup).replace(/[&<>\"'\\/\\\\]/g, function (match) {\r\n      return replaceMap[match];\r\n    });\r\n  };\r\n\r\n  // Append an array of jQuery nodes to a given element.\r\n  Utils.appendMany = function ($element, $nodes) {\r\n    // jQuery 1.7.x does not support $.fn.append() with an array\r\n    // Fall back to a jQuery object collection using $.fn.add()\r\n    if ($.fn.jquery.substr(0, 3) === '1.7') {\r\n      var $jqNodes = $();\r\n\r\n      $.map($nodes, function (node) {\r\n        $jqNodes = $jqNodes.add(node);\r\n      });\r\n\r\n      $nodes = $jqNodes;\r\n    }\r\n\r\n    $element.append($nodes);\r\n  };\r\n\r\n  // Cache objects in Utils.__cache instead of $.data (see #4346)\r\n  Utils.__cache = {};\r\n\r\n  var id = 0;\r\n  Utils.GetUniqueElementId = function (element) {\r\n    // Get a unique element Id. If element has no id, \r\n    // creates a new unique number, stores it in the id \r\n    // attribute and returns the new id. \r\n    // If an id already exists, it simply returns it.\r\n\r\n    var select2Id = element.getAttribute('data-select2-id');\r\n    if (select2Id == null) {\r\n      // If element has id, use it.\r\n      if (element.id) {\r\n        select2Id = element.id;\r\n        element.setAttribute('data-select2-id', select2Id);\r\n      } else {\r\n        element.setAttribute('data-select2-id', ++id);\r\n        select2Id = id.toString();\r\n      }\r\n    }\r\n    return select2Id;\r\n  };\r\n\r\n  Utils.StoreData = function (element, name, value) {\r\n    // Stores an item in the cache for a specified element.\r\n    // name is the cache key.    \r\n    var id = Utils.GetUniqueElementId(element);\r\n    if (!Utils.__cache[id]) {\r\n      Utils.__cache[id] = {};\r\n    }\r\n\r\n    Utils.__cache[id][name] = value;\r\n  };\r\n\r\n  Utils.GetData = function (element, name) {\r\n    // Retrieves a value from the cache by its key (name)\r\n    // name is optional. If no name specified, return \r\n    // all cache items for the specified element.\r\n    // and for a specified element.\r\n    var id = Utils.GetUniqueElementId(element);\r\n    if (name) {\r\n      if (Utils.__cache[id]) {\r\n        return Utils.__cache[id][name] != null ? \r\n\t      Utils.__cache[id][name]:\r\n\t      $(element).data(name); // Fallback to HTML5 data attribs.\r\n      }\r\n      return $(element).data(name); // Fallback to HTML5 data attribs.\r\n    } else {\r\n      return Utils.__cache[id];\t\t\t   \r\n    }\r\n  };\r\n\r\n  Utils.RemoveData = function (element) {\r\n    // Removes all cached items for a specified element.\r\n    var id = Utils.GetUniqueElementId(element);\r\n    if (Utils.__cache[id] != null) {\r\n      delete Utils.__cache[id];\r\n    }\r\n  };\r\n\r\n  return Utils;\r\n});\r\n\r\nS2.define('select2/results',[\r\n  'jquery',\r\n  './utils'\r\n], function ($, Utils) {\r\n  function Results ($element, options, dataAdapter) {\r\n    this.$element = $element;\r\n    this.data = dataAdapter;\r\n    this.options = options;\r\n\r\n    Results.__super__.constructor.call(this);\r\n  }\r\n\r\n  Utils.Extend(Results, Utils.Observable);\r\n\r\n  Results.prototype.render = function () {\r\n    var $results = $(\r\n      '<ul class=\"select2-results__options\" role=\"tree\"></ul>'\r\n    );\r\n\r\n    if (this.options.get('multiple')) {\r\n      $results.attr('aria-multiselectable', 'true');\r\n    }\r\n\r\n    this.$results = $results;\r\n\r\n    return $results;\r\n  };\r\n\r\n  Results.prototype.clear = function () {\r\n    this.$results.empty();\r\n  };\r\n\r\n  Results.prototype.displayMessage = function (params) {\r\n    var escapeMarkup = this.options.get('escapeMarkup');\r\n\r\n    this.clear();\r\n    this.hideLoading();\r\n\r\n    var $message = $(\r\n      '<li role=\"treeitem\" aria-live=\"assertive\"' +\r\n      ' class=\"select2-results__option\"></li>'\r\n    );\r\n\r\n    var message = this.options.get('translations').get(params.message);\r\n\r\n    $message.append(\r\n      escapeMarkup(\r\n        message(params.args)\r\n      )\r\n    );\r\n\r\n    $message[0].className += ' select2-results__message';\r\n\r\n    this.$results.append($message);\r\n  };\r\n\r\n  Results.prototype.hideMessages = function () {\r\n    this.$results.find('.select2-results__message').remove();\r\n  };\r\n\r\n  Results.prototype.append = function (data) {\r\n    this.hideLoading();\r\n\r\n    var $options = [];\r\n\r\n    if (data.results == null || data.results.length === 0) {\r\n      if (this.$results.children().length === 0) {\r\n        this.trigger('results:message', {\r\n          message: 'noResults'\r\n        });\r\n      }\r\n\r\n      return;\r\n    }\r\n\r\n    data.results = this.sort(data.results);\r\n\r\n    for (var d = 0; d < data.results.length; d++) {\r\n      var item = data.results[d];\r\n\r\n      var $option = this.option(item);\r\n\r\n      $options.push($option);\r\n    }\r\n\r\n    this.$results.append($options);\r\n  };\r\n\r\n  Results.prototype.position = function ($results, $dropdown) {\r\n    var $resultsContainer = $dropdown.find('.select2-results');\r\n    $resultsContainer.append($results);\r\n  };\r\n\r\n  Results.prototype.sort = function (data) {\r\n    var sorter = this.options.get('sorter');\r\n\r\n    return sorter(data);\r\n  };\r\n\r\n  Results.prototype.highlightFirstItem = function () {\r\n    var $options = this.$results\r\n      .find('.select2-results__option[aria-selected]');\r\n\r\n    var $selected = $options.filter('[aria-selected=true]');\r\n\r\n    // Check if there are any selected options\r\n    if ($selected.length > 0) {\r\n      // If there are selected options, highlight the first\r\n      $selected.first().trigger('mouseenter');\r\n    } else {\r\n      // If there are no selected options, highlight the first option\r\n      // in the dropdown\r\n      $options.first().trigger('mouseenter');\r\n    }\r\n\r\n    this.ensureHighlightVisible();\r\n  };\r\n\r\n  Results.prototype.setClasses = function () {\r\n    var self = this;\r\n\r\n    this.data.current(function (selected) {\r\n      var selectedIds = $.map(selected, function (s) {\r\n        return s.id.toString();\r\n      });\r\n\r\n      var $options = self.$results\r\n        .find('.select2-results__option[aria-selected]');\r\n\r\n      $options.each(function () {\r\n        var $option = $(this);\r\n\r\n        var item = Utils.GetData(this, 'data');\r\n\r\n        // id needs to be converted to a string when comparing\r\n        var id = '' + item.id;\r\n\r\n        if ((item.element != null && item.element.selected) ||\r\n            (item.element == null && $.inArray(id, selectedIds) > -1)) {\r\n          $option.attr('aria-selected', 'true');\r\n        } else {\r\n          $option.attr('aria-selected', 'false');\r\n        }\r\n      });\r\n\r\n    });\r\n  };\r\n\r\n  Results.prototype.showLoading = function (params) {\r\n    this.hideLoading();\r\n\r\n    var loadingMore = this.options.get('translations').get('searching');\r\n\r\n    var loading = {\r\n      disabled: true,\r\n      loading: true,\r\n      text: loadingMore(params)\r\n    };\r\n    var $loading = this.option(loading);\r\n    $loading.className += ' loading-results';\r\n\r\n    this.$results.prepend($loading);\r\n  };\r\n\r\n  Results.prototype.hideLoading = function () {\r\n    this.$results.find('.loading-results').remove();\r\n  };\r\n\r\n  Results.prototype.option = function (data) {\r\n    var option = document.createElement('li');\r\n    option.className = 'select2-results__option';\r\n\r\n    var attrs = {\r\n      'role': 'treeitem',\r\n      'aria-selected': 'false'\r\n    };\r\n\r\n    if (data.disabled) {\r\n      delete attrs['aria-selected'];\r\n      attrs['aria-disabled'] = 'true';\r\n    }\r\n\r\n    if (data.id == null) {\r\n      delete attrs['aria-selected'];\r\n    }\r\n\r\n    if (data._resultId != null) {\r\n      option.id = data._resultId;\r\n    }\r\n\r\n    if (data.title) {\r\n      option.title = data.title;\r\n    }\r\n\r\n    if (data.children) {\r\n      attrs.role = 'group';\r\n      attrs['aria-label'] = data.text;\r\n      delete attrs['aria-selected'];\r\n    }\r\n\r\n    for (var attr in attrs) {\r\n      var val = attrs[attr];\r\n\r\n      option.setAttribute(attr, val);\r\n    }\r\n\r\n    if (data.children) {\r\n      var $option = $(option);\r\n\r\n      var label = document.createElement('strong');\r\n      label.className = 'select2-results__group';\r\n\r\n      var $label = $(label);\r\n      this.template(data, label);\r\n\r\n      var $children = [];\r\n\r\n      for (var c = 0; c < data.children.length; c++) {\r\n        var child = data.children[c];\r\n\r\n        var $child = this.option(child);\r\n\r\n        $children.push($child);\r\n      }\r\n\r\n      var $childrenContainer = $('<ul></ul>', {\r\n        'class': 'select2-results__options select2-results__options--nested'\r\n      });\r\n\r\n      $childrenContainer.append($children);\r\n\r\n      $option.append(label);\r\n      $option.append($childrenContainer);\r\n    } else {\r\n      this.template(data, option);\r\n    }\r\n\r\n    Utils.StoreData(option, 'data', data);\r\n\r\n    return option;\r\n  };\r\n\r\n  Results.prototype.bind = function (container, $container) {\r\n    var self = this;\r\n\r\n    var id = container.id + '-results';\r\n\r\n    this.$results.attr('id', id);\r\n\r\n    container.on('results:all', function (params) {\r\n      self.clear();\r\n      self.append(params.data);\r\n\r\n      if (container.isOpen()) {\r\n        self.setClasses();\r\n        self.highlightFirstItem();\r\n      }\r\n    });\r\n\r\n    container.on('results:append', function (params) {\r\n      self.append(params.data);\r\n\r\n      if (container.isOpen()) {\r\n        self.setClasses();\r\n      }\r\n    });\r\n\r\n    container.on('query', function (params) {\r\n      self.hideMessages();\r\n      self.showLoading(params);\r\n    });\r\n\r\n    container.on('select', function () {\r\n      if (!container.isOpen()) {\r\n        return;\r\n      }\r\n\r\n      self.setClasses();\r\n      self.highlightFirstItem();\r\n    });\r\n\r\n    container.on('unselect', function () {\r\n      if (!container.isOpen()) {\r\n        return;\r\n      }\r\n\r\n      self.setClasses();\r\n      self.highlightFirstItem();\r\n    });\r\n\r\n    container.on('open', function () {\r\n      // When the dropdown is open, aria-expended=\"true\"\r\n      self.$results.attr('aria-expanded', 'true');\r\n      self.$results.attr('aria-hidden', 'false');\r\n\r\n      self.setClasses();\r\n      self.ensureHighlightVisible();\r\n    });\r\n\r\n    container.on('close', function () {\r\n      // When the dropdown is closed, aria-expended=\"false\"\r\n      self.$results.attr('aria-expanded', 'false');\r\n      self.$results.attr('aria-hidden', 'true');\r\n      self.$results.removeAttr('aria-activedescendant');\r\n    });\r\n\r\n    container.on('results:toggle', function () {\r\n      var $highlighted = self.getHighlightedResults();\r\n\r\n      if ($highlighted.length === 0) {\r\n        return;\r\n      }\r\n\r\n      $highlighted.trigger('mouseup');\r\n    });\r\n\r\n    container.on('results:select', function () {\r\n      var $highlighted = self.getHighlightedResults();\r\n\r\n      if ($highlighted.length === 0) {\r\n        return;\r\n      }\r\n\r\n      var data = Utils.GetData($highlighted[0], 'data');\r\n\r\n      if ($highlighted.attr('aria-selected') == 'true') {\r\n        self.trigger('close', {});\r\n      } else {\r\n        self.trigger('select', {\r\n          data: data\r\n        });\r\n      }\r\n    });\r\n\r\n    container.on('results:previous', function () {\r\n      var $highlighted = self.getHighlightedResults();\r\n\r\n      var $options = self.$results.find('[aria-selected]');\r\n\r\n      var currentIndex = $options.index($highlighted);\r\n\r\n      // If we are already at te top, don't move further\r\n      // If no options, currentIndex will be -1\r\n      if (currentIndex <= 0) {\r\n        return;\r\n      }\r\n\r\n      var nextIndex = currentIndex - 1;\r\n\r\n      // If none are highlighted, highlight the first\r\n      if ($highlighted.length === 0) {\r\n        nextIndex = 0;\r\n      }\r\n\r\n      var $next = $options.eq(nextIndex);\r\n\r\n      $next.trigger('mouseenter');\r\n\r\n      var currentOffset = self.$results.offset().top;\r\n      var nextTop = $next.offset().top;\r\n      var nextOffset = self.$results.scrollTop() + (nextTop - currentOffset);\r\n\r\n      if (nextIndex === 0) {\r\n        self.$results.scrollTop(0);\r\n      } else if (nextTop - currentOffset < 0) {\r\n        self.$results.scrollTop(nextOffset);\r\n      }\r\n    });\r\n\r\n    container.on('results:next', function () {\r\n      var $highlighted = self.getHighlightedResults();\r\n\r\n      var $options = self.$results.find('[aria-selected]');\r\n\r\n      var currentIndex = $options.index($highlighted);\r\n\r\n      var nextIndex = currentIndex + 1;\r\n\r\n      // If we are at the last option, stay there\r\n      if (nextIndex >= $options.length) {\r\n        return;\r\n      }\r\n\r\n      var $next = $options.eq(nextIndex);\r\n\r\n      $next.trigger('mouseenter');\r\n\r\n      var currentOffset = self.$results.offset().top +\r\n        self.$results.outerHeight(false);\r\n      var nextBottom = $next.offset().top + $next.outerHeight(false);\r\n      var nextOffset = self.$results.scrollTop() + nextBottom - currentOffset;\r\n\r\n      if (nextIndex === 0) {\r\n        self.$results.scrollTop(0);\r\n      } else if (nextBottom > currentOffset) {\r\n        self.$results.scrollTop(nextOffset);\r\n      }\r\n    });\r\n\r\n    container.on('results:focus', function (params) {\r\n      params.element.addClass('select2-results__option--highlighted');\r\n    });\r\n\r\n    container.on('results:message', function (params) {\r\n      self.displayMessage(params);\r\n    });\r\n\r\n    if ($.fn.mousewheel) {\r\n      this.$results.on('mousewheel', function (e) {\r\n        var top = self.$results.scrollTop();\r\n\r\n        var bottom = self.$results.get(0).scrollHeight - top + e.deltaY;\r\n\r\n        var isAtTop = e.deltaY > 0 && top - e.deltaY <= 0;\r\n        var isAtBottom = e.deltaY < 0 && bottom <= self.$results.height();\r\n\r\n        if (isAtTop) {\r\n          self.$results.scrollTop(0);\r\n\r\n          e.preventDefault();\r\n          e.stopPropagation();\r\n        } else if (isAtBottom) {\r\n          self.$results.scrollTop(\r\n            self.$results.get(0).scrollHeight - self.$results.height()\r\n          );\r\n\r\n          e.preventDefault();\r\n          e.stopPropagation();\r\n        }\r\n      });\r\n    }\r\n\r\n    this.$results.on('mouseup', '.select2-results__option[aria-selected]',\r\n      function (evt) {\r\n      var $this = $(this);\r\n\r\n      var data = Utils.GetData(this, 'data');\r\n\r\n      if ($this.attr('aria-selected') === 'true') {\r\n        if (self.options.get('multiple')) {\r\n          self.trigger('unselect', {\r\n            originalEvent: evt,\r\n            data: data\r\n          });\r\n        } else {\r\n          self.trigger('close', {});\r\n        }\r\n\r\n        return;\r\n      }\r\n\r\n      self.trigger('select', {\r\n        originalEvent: evt,\r\n        data: data\r\n      });\r\n    });\r\n\r\n    this.$results.on('mouseenter', '.select2-results__option[aria-selected]',\r\n      function (evt) {\r\n      var data = Utils.GetData(this, 'data');\r\n\r\n      self.getHighlightedResults()\r\n          .removeClass('select2-results__option--highlighted');\r\n\r\n      self.trigger('results:focus', {\r\n        data: data,\r\n        element: $(this)\r\n      });\r\n    });\r\n  };\r\n\r\n  Results.prototype.getHighlightedResults = function () {\r\n    var $highlighted = this.$results\r\n    .find('.select2-results__option--highlighted');\r\n\r\n    return $highlighted;\r\n  };\r\n\r\n  Results.prototype.destroy = function () {\r\n    this.$results.remove();\r\n  };\r\n\r\n  Results.prototype.ensureHighlightVisible = function () {\r\n    var $highlighted = this.getHighlightedResults();\r\n\r\n    if ($highlighted.length === 0) {\r\n      return;\r\n    }\r\n\r\n    var $options = this.$results.find('[aria-selected]');\r\n\r\n    var currentIndex = $options.index($highlighted);\r\n\r\n    var currentOffset = this.$results.offset().top;\r\n    var nextTop = $highlighted.offset().top;\r\n    var nextOffset = this.$results.scrollTop() + (nextTop - currentOffset);\r\n\r\n    var offsetDelta = nextTop - currentOffset;\r\n    nextOffset -= $highlighted.outerHeight(false) * 2;\r\n\r\n    if (currentIndex <= 2) {\r\n      this.$results.scrollTop(0);\r\n    } else if (offsetDelta > this.$results.outerHeight() || offsetDelta < 0) {\r\n      this.$results.scrollTop(nextOffset);\r\n    }\r\n  };\r\n\r\n  Results.prototype.template = function (result, container) {\r\n    var template = this.options.get('templateResult');\r\n    var escapeMarkup = this.options.get('escapeMarkup');\r\n\r\n    var content = template(result, container);\r\n\r\n    if (content == null) {\r\n      container.style.display = 'none';\r\n    } else if (typeof content === 'string') {\r\n      container.innerHTML = escapeMarkup(content);\r\n    } else {\r\n      $(container).append(content);\r\n    }\r\n  };\r\n\r\n  return Results;\r\n});\r\n\r\nS2.define('select2/keys',[\r\n\r\n], function () {\r\n  var KEYS = {\r\n    BACKSPACE: 8,\r\n    TAB: 9,\r\n    ENTER: 13,\r\n    SHIFT: 16,\r\n    CTRL: 17,\r\n    ALT: 18,\r\n    ESC: 27,\r\n    SPACE: 32,\r\n    PAGE_UP: 33,\r\n    PAGE_DOWN: 34,\r\n    END: 35,\r\n    HOME: 36,\r\n    LEFT: 37,\r\n    UP: 38,\r\n    RIGHT: 39,\r\n    DOWN: 40,\r\n    DELETE: 46\r\n  };\r\n\r\n  return KEYS;\r\n});\r\n\r\nS2.define('select2/selection/base',[\r\n  'jquery',\r\n  '../utils',\r\n  '../keys'\r\n], function ($, Utils, KEYS) {\r\n  function BaseSelection ($element, options) {\r\n    this.$element = $element;\r\n    this.options = options;\r\n\r\n    BaseSelection.__super__.constructor.call(this);\r\n  }\r\n\r\n  Utils.Extend(BaseSelection, Utils.Observable);\r\n\r\n  BaseSelection.prototype.render = function () {\r\n    var $selection = $(\r\n      '<span class=\"select2-selection\" role=\"combobox\" ' +\r\n      ' aria-haspopup=\"true\" aria-expanded=\"false\">' +\r\n      '</span>'\r\n    );\r\n\r\n    this._tabindex = 0;\r\n\r\n    if (Utils.GetData(this.$element[0], 'old-tabindex') != null) {\r\n      this._tabindex = Utils.GetData(this.$element[0], 'old-tabindex');\r\n    } else if (this.$element.attr('tabindex') != null) {\r\n      this._tabindex = this.$element.attr('tabindex');\r\n    }\r\n\r\n    $selection.attr('title', this.$element.attr('title'));\r\n    $selection.attr('tabindex', this._tabindex);\r\n\r\n    this.$selection = $selection;\r\n\r\n    return $selection;\r\n  };\r\n\r\n  BaseSelection.prototype.bind = function (container, $container) {\r\n    var self = this;\r\n\r\n    var id = container.id + '-container';\r\n    var resultsId = container.id + '-results';\r\n\r\n    this.container = container;\r\n\r\n    this.$selection.on('focus', function (evt) {\r\n      self.trigger('focus', evt);\r\n    });\r\n\r\n    this.$selection.on('blur', function (evt) {\r\n      self._handleBlur(evt);\r\n    });\r\n\r\n    this.$selection.on('keydown', function (evt) {\r\n      self.trigger('keypress', evt);\r\n\r\n      if (evt.which === KEYS.SPACE) {\r\n        evt.preventDefault();\r\n      }\r\n    });\r\n\r\n    container.on('results:focus', function (params) {\r\n      self.$selection.attr('aria-activedescendant', params.data._resultId);\r\n    });\r\n\r\n    container.on('selection:update', function (params) {\r\n      self.update(params.data);\r\n    });\r\n\r\n    container.on('open', function () {\r\n      // When the dropdown is open, aria-expanded=\"true\"\r\n      self.$selection.attr('aria-expanded', 'true');\r\n      self.$selection.attr('aria-owns', resultsId);\r\n\r\n      self._attachCloseHandler(container);\r\n    });\r\n\r\n    container.on('close', function () {\r\n      // When the dropdown is closed, aria-expanded=\"false\"\r\n      self.$selection.attr('aria-expanded', 'false');\r\n      self.$selection.removeAttr('aria-activedescendant');\r\n      self.$selection.removeAttr('aria-owns');\r\n\r\n      self.$selection.focus();\r\n      window.setTimeout(function () {\r\n        self.$selection.focus();\r\n      }, 0);\r\n\r\n      self._detachCloseHandler(container);\r\n    });\r\n\r\n    container.on('enable', function () {\r\n      self.$selection.attr('tabindex', self._tabindex);\r\n    });\r\n\r\n    container.on('disable', function () {\r\n      self.$selection.attr('tabindex', '-1');\r\n    });\r\n  };\r\n\r\n  BaseSelection.prototype._handleBlur = function (evt) {\r\n    var self = this;\r\n\r\n    // This needs to be delayed as the active element is the body when the tab\r\n    // key is pressed, possibly along with others.\r\n    window.setTimeout(function () {\r\n      // Don't trigger `blur` if the focus is still in the selection\r\n      if (\r\n        (document.activeElement == self.$selection[0]) ||\r\n        ($.contains(self.$selection[0], document.activeElement))\r\n      ) {\r\n        return;\r\n      }\r\n\r\n      self.trigger('blur', evt);\r\n    }, 1);\r\n  };\r\n\r\n  BaseSelection.prototype._attachCloseHandler = function (container) {\r\n    var self = this;\r\n\r\n    $(document.body).on('mousedown.select2.' + container.id, function (e) {\r\n      var $target = $(e.target);\r\n\r\n      var $select = $target.closest('.select2');\r\n\r\n      var $all = $('.select2.select2-container--open');\r\n\r\n      $all.each(function () {\r\n        var $this = $(this);\r\n\r\n        if (this == $select[0]) {\r\n          return;\r\n        }\r\n\r\n        var $element = Utils.GetData(this, 'element');\r\n\r\n        $element.select2('close');\r\n      });\r\n    });\r\n  };\r\n\r\n  BaseSelection.prototype._detachCloseHandler = function (container) {\r\n    $(document.body).off('mousedown.select2.' + container.id);\r\n  };\r\n\r\n  BaseSelection.prototype.position = function ($selection, $container) {\r\n    var $selectionContainer = $container.find('.selection');\r\n    $selectionContainer.append($selection);\r\n  };\r\n\r\n  BaseSelection.prototype.destroy = function () {\r\n    this._detachCloseHandler(this.container);\r\n  };\r\n\r\n  BaseSelection.prototype.update = function (data) {\r\n    throw new Error('The `update` method must be defined in child classes.');\r\n  };\r\n\r\n  return BaseSelection;\r\n});\r\n\r\nS2.define('select2/selection/single',[\r\n  'jquery',\r\n  './base',\r\n  '../utils',\r\n  '../keys'\r\n], function ($, BaseSelection, Utils, KEYS) {\r\n  function SingleSelection () {\r\n    SingleSelection.__super__.constructor.apply(this, arguments);\r\n  }\r\n\r\n  Utils.Extend(SingleSelection, BaseSelection);\r\n\r\n  SingleSelection.prototype.render = function () {\r\n    var $selection = SingleSelection.__super__.render.call(this);\r\n\r\n    $selection.addClass('select2-selection--single');\r\n\r\n    $selection.html(\r\n      '<span class=\"select2-selection__rendered\"></span>' +\r\n      '<span class=\"select2-selection__arrow\" role=\"presentation\">' +\r\n        '<b role=\"presentation\"></b>' +\r\n      '</span>'\r\n    );\r\n\r\n    return $selection;\r\n  };\r\n\r\n  SingleSelection.prototype.bind = function (container, $container) {\r\n    var self = this;\r\n\r\n    SingleSelection.__super__.bind.apply(this, arguments);\r\n\r\n    var id = container.id + '-container';\r\n\r\n    this.$selection.find('.select2-selection__rendered')\r\n      .attr('id', id)\r\n      .attr('role', 'textbox')\r\n      .attr('aria-readonly', 'true');\r\n    this.$selection.attr('aria-labelledby', id);\r\n\r\n    this.$selection.on('mousedown', function (evt) {\r\n      // Only respond to left clicks\r\n      if (evt.which !== 1) {\r\n        return;\r\n      }\r\n\r\n      self.trigger('toggle', {\r\n        originalEvent: evt\r\n      });\r\n    });\r\n\r\n    this.$selection.on('focus', function (evt) {\r\n      // User focuses on the container\r\n    });\r\n\r\n    this.$selection.on('blur', function (evt) {\r\n      // User exits the container\r\n    });\r\n\r\n    container.on('focus', function (evt) {\r\n      if (!container.isOpen()) {\r\n        self.$selection.focus();\r\n      }\r\n    });\r\n  };\r\n\r\n  SingleSelection.prototype.clear = function () {\r\n    var $rendered = this.$selection.find('.select2-selection__rendered');\r\n    $rendered.empty();\r\n    $rendered.removeAttr('title'); // clear tooltip on empty\r\n  };\r\n\r\n  SingleSelection.prototype.display = function (data, container) {\r\n    var template = this.options.get('templateSelection');\r\n    var escapeMarkup = this.options.get('escapeMarkup');\r\n\r\n    return escapeMarkup(template(data, container));\r\n  };\r\n\r\n  SingleSelection.prototype.selectionContainer = function () {\r\n    return $('<span></span>');\r\n  };\r\n\r\n  SingleSelection.prototype.update = function (data) {\r\n    if (data.length === 0) {\r\n      this.clear();\r\n      return;\r\n    }\r\n\r\n    var selection = data[0];\r\n\r\n    var $rendered = this.$selection.find('.select2-selection__rendered');\r\n    var formatted = this.display(selection, $rendered);\r\n\r\n    $rendered.empty().append(formatted);\r\n    $rendered.attr('title', selection.title || selection.text);\r\n  };\r\n\r\n  return SingleSelection;\r\n});\r\n\r\nS2.define('select2/selection/multiple',[\r\n  'jquery',\r\n  './base',\r\n  '../utils'\r\n], function ($, BaseSelection, Utils) {\r\n  function MultipleSelection ($element, options) {\r\n    MultipleSelection.__super__.constructor.apply(this, arguments);\r\n  }\r\n\r\n  Utils.Extend(MultipleSelection, BaseSelection);\r\n\r\n  MultipleSelection.prototype.render = function () {\r\n    var $selection = MultipleSelection.__super__.render.call(this);\r\n\r\n    $selection.addClass('select2-selection--multiple');\r\n\r\n    $selection.html(\r\n      '<ul class=\"select2-selection__rendered\"></ul>'\r\n    );\r\n\r\n    return $selection;\r\n  };\r\n\r\n  MultipleSelection.prototype.bind = function (container, $container) {\r\n    var self = this;\r\n\r\n    MultipleSelection.__super__.bind.apply(this, arguments);\r\n\r\n    this.$selection.on('click', function (evt) {\r\n      self.trigger('toggle', {\r\n        originalEvent: evt\r\n      });\r\n    });\r\n\r\n    this.$selection.on(\r\n      'click',\r\n      '.select2-selection__choice__remove',\r\n      function (evt) {\r\n        // Ignore the event if it is disabled\r\n        if (self.options.get('disabled')) {\r\n          return;\r\n        }\r\n\r\n        var $remove = $(this);\r\n        var $selection = $remove.parent();\r\n\r\n        var data = Utils.GetData($selection[0], 'data');\r\n\r\n        self.trigger('unselect', {\r\n          originalEvent: evt,\r\n          data: data\r\n        });\r\n      }\r\n    );\r\n  };\r\n\r\n  MultipleSelection.prototype.clear = function () {\r\n    var $rendered = this.$selection.find('.select2-selection__rendered');\r\n    $rendered.empty();\r\n    $rendered.removeAttr('title');\r\n  };\r\n\r\n  MultipleSelection.prototype.display = function (data, container) {\r\n    var template = this.options.get('templateSelection');\r\n    var escapeMarkup = this.options.get('escapeMarkup');\r\n\r\n    return escapeMarkup(template(data, container));\r\n  };\r\n\r\n  MultipleSelection.prototype.selectionContainer = function () {\r\n    var $container = $(\r\n      '<li class=\"select2-selection__choice\">' +\r\n        '<span class=\"select2-selection__choice__remove\" role=\"presentation\">' +\r\n          '&times;' +\r\n        '</span>' +\r\n      '</li>'\r\n    );\r\n\r\n    return $container;\r\n  };\r\n\r\n  MultipleSelection.prototype.update = function (data) {\r\n    this.clear();\r\n\r\n    if (data.length === 0) {\r\n      return;\r\n    }\r\n\r\n    var $selections = [];\r\n\r\n    for (var d = 0; d < data.length; d++) {\r\n      var selection = data[d];\r\n\r\n      var $selection = this.selectionContainer();\r\n      var formatted = this.display(selection, $selection);\r\n\r\n      $selection.append(formatted);\r\n      $selection.attr('title', selection.title || selection.text);\r\n\r\n      Utils.StoreData($selection[0], 'data', selection);\r\n\r\n      $selections.push($selection);\r\n    }\r\n\r\n    var $rendered = this.$selection.find('.select2-selection__rendered');\r\n\r\n    Utils.appendMany($rendered, $selections);\r\n  };\r\n\r\n  return MultipleSelection;\r\n});\r\n\r\nS2.define('select2/selection/placeholder',[\r\n  '../utils'\r\n], function (Utils) {\r\n  function Placeholder (decorated, $element, options) {\r\n    this.placeholder = this.normalizePlaceholder(options.get('placeholder'));\r\n\r\n    decorated.call(this, $element, options);\r\n  }\r\n\r\n  Placeholder.prototype.normalizePlaceholder = function (_, placeholder) {\r\n    if (typeof placeholder === 'string') {\r\n      placeholder = {\r\n        id: '',\r\n        text: placeholder\r\n      };\r\n    }\r\n\r\n    return placeholder;\r\n  };\r\n\r\n  Placeholder.prototype.createPlaceholder = function (decorated, placeholder) {\r\n    var $placeholder = this.selectionContainer();\r\n\r\n    $placeholder.html(this.display(placeholder));\r\n    $placeholder.addClass('select2-selection__placeholder')\r\n                .removeClass('select2-selection__choice');\r\n\r\n    return $placeholder;\r\n  };\r\n\r\n  Placeholder.prototype.update = function (decorated, data) {\r\n    var singlePlaceholder = (\r\n      data.length == 1 && data[0].id != this.placeholder.id\r\n    );\r\n    var multipleSelections = data.length > 1;\r\n\r\n    if (multipleSelections || singlePlaceholder) {\r\n      return decorated.call(this, data);\r\n    }\r\n\r\n    this.clear();\r\n\r\n    var $placeholder = this.createPlaceholder(this.placeholder);\r\n\r\n    this.$selection.find('.select2-selection__rendered').append($placeholder);\r\n  };\r\n\r\n  return Placeholder;\r\n});\r\n\r\nS2.define('select2/selection/allowClear',[\r\n  'jquery',\r\n  '../keys',\r\n  '../utils'\r\n], function ($, KEYS, Utils) {\r\n  function AllowClear () { }\r\n\r\n  AllowClear.prototype.bind = function (decorated, container, $container) {\r\n    var self = this;\r\n\r\n    decorated.call(this, container, $container);\r\n\r\n    if (this.placeholder == null) {\r\n      if (this.options.get('debug') && window.console && console.error) {\r\n        console.error(\r\n          'Select2: The `allowClear` option should be used in combination ' +\r\n          'with the `placeholder` option.'\r\n        );\r\n      }\r\n    }\r\n\r\n    this.$selection.on('mousedown', '.select2-selection__clear',\r\n      function (evt) {\r\n        self._handleClear(evt);\r\n    });\r\n\r\n    container.on('keypress', function (evt) {\r\n      self._handleKeyboardClear(evt, container);\r\n    });\r\n  };\r\n\r\n  AllowClear.prototype._handleClear = function (_, evt) {\r\n    // Ignore the event if it is disabled\r\n    if (this.options.get('disabled')) {\r\n      return;\r\n    }\r\n\r\n    var $clear = this.$selection.find('.select2-selection__clear');\r\n\r\n    // Ignore the event if nothing has been selected\r\n    if ($clear.length === 0) {\r\n      return;\r\n    }\r\n\r\n    evt.stopPropagation();\r\n\r\n    var data = Utils.GetData($clear[0], 'data');\r\n\r\n    var previousVal = this.$element.val();\r\n    this.$element.val(this.placeholder.id);\r\n\r\n    var unselectData = {\r\n      data: data\r\n    };\r\n    this.trigger('clear', unselectData);\r\n    if (unselectData.prevented) {\r\n      this.$element.val(previousVal);\r\n      return;\r\n    }\r\n\r\n    for (var d = 0; d < data.length; d++) {\r\n      unselectData = {\r\n        data: data[d]\r\n      };\r\n\r\n      // Trigger the `unselect` event, so people can prevent it from being\r\n      // cleared.\r\n      this.trigger('unselect', unselectData);\r\n\r\n      // If the event was prevented, don't clear it out.\r\n      if (unselectData.prevented) {\r\n        this.$element.val(previousVal);\r\n        return;\r\n      }\r\n    }\r\n\r\n    this.$element.trigger('change');\r\n\r\n    this.trigger('toggle', {});\r\n  };\r\n\r\n  AllowClear.prototype._handleKeyboardClear = function (_, evt, container) {\r\n    if (container.isOpen()) {\r\n      return;\r\n    }\r\n\r\n    if (evt.which == KEYS.DELETE || evt.which == KEYS.BACKSPACE) {\r\n      this._handleClear(evt);\r\n    }\r\n  };\r\n\r\n  AllowClear.prototype.update = function (decorated, data) {\r\n    decorated.call(this, data);\r\n\r\n    if (this.$selection.find('.select2-selection__placeholder').length > 0 ||\r\n        data.length === 0) {\r\n      return;\r\n    }\r\n\r\n    var $remove = $(\r\n      '<span class=\"select2-selection__clear\">' +\r\n        '&times;' +\r\n      '</span>'\r\n    );\r\n    Utils.StoreData($remove[0], 'data', data);\r\n\r\n    this.$selection.find('.select2-selection__rendered').prepend($remove);\r\n  };\r\n\r\n  return AllowClear;\r\n});\r\n\r\nS2.define('select2/selection/search',[\r\n  'jquery',\r\n  '../utils',\r\n  '../keys'\r\n], function ($, Utils, KEYS) {\r\n  function Search (decorated, $element, options) {\r\n    decorated.call(this, $element, options);\r\n  }\r\n\r\n  Search.prototype.render = function (decorated) {\r\n    var $search = $(\r\n      '<li class=\"select2-search select2-search--inline\">' +\r\n        '<input class=\"select2-search__field\" type=\"search\" tabindex=\"-1\"' +\r\n        ' autocomplete=\"off\" autocorrect=\"off\" autocapitalize=\"none\"' +\r\n        ' spellcheck=\"false\" role=\"textbox\" aria-autocomplete=\"list\" />' +\r\n      '</li>'\r\n    );\r\n\r\n    this.$searchContainer = $search;\r\n    this.$search = $search.find('input');\r\n\r\n    var $rendered = decorated.call(this);\r\n\r\n    this._transferTabIndex();\r\n\r\n    return $rendered;\r\n  };\r\n\r\n  Search.prototype.bind = function (decorated, container, $container) {\r\n    var self = this;\r\n\r\n    decorated.call(this, container, $container);\r\n\r\n    container.on('open', function () {\r\n      self.$search.trigger('focus');\r\n    });\r\n\r\n    container.on('close', function () {\r\n      self.$search.val('');\r\n      self.$search.removeAttr('aria-activedescendant');\r\n      self.$search.trigger('focus');\r\n    });\r\n\r\n    container.on('enable', function () {\r\n      self.$search.prop('disabled', false);\r\n\r\n      self._transferTabIndex();\r\n    });\r\n\r\n    container.on('disable', function () {\r\n      self.$search.prop('disabled', true);\r\n    });\r\n\r\n    container.on('focus', function (evt) {\r\n      self.$search.trigger('focus');\r\n    });\r\n\r\n    container.on('results:focus', function (params) {\r\n      self.$search.attr('aria-activedescendant', params.id);\r\n    });\r\n\r\n    this.$selection.on('focusin', '.select2-search--inline', function (evt) {\r\n      self.trigger('focus', evt);\r\n    });\r\n\r\n    this.$selection.on('focusout', '.select2-search--inline', function (evt) {\r\n      self._handleBlur(evt);\r\n    });\r\n\r\n    this.$selection.on('keydown', '.select2-search--inline', function (evt) {\r\n      evt.stopPropagation();\r\n\r\n      self.trigger('keypress', evt);\r\n\r\n      self._keyUpPrevented = evt.isDefaultPrevented();\r\n\r\n      var key = evt.which;\r\n\r\n      if (key === KEYS.BACKSPACE && self.$search.val() === '') {\r\n        var $previousChoice = self.$searchContainer\r\n          .prev('.select2-selection__choice');\r\n\r\n        if ($previousChoice.length > 0) {\r\n          var item = Utils.GetData($previousChoice[0], 'data');\r\n\r\n          self.searchRemoveChoice(item);\r\n\r\n          evt.preventDefault();\r\n        }\r\n      }\r\n    });\r\n\r\n    // Try to detect the IE version should the `documentMode` property that\r\n    // is stored on the document. This is only implemented in IE and is\r\n    // slightly cleaner than doing a user agent check.\r\n    // This property is not available in Edge, but Edge also doesn't have\r\n    // this bug.\r\n    var msie = document.documentMode;\r\n    var disableInputEvents = msie && msie <= 11;\r\n\r\n    // Workaround for browsers which do not support the `input` event\r\n    // This will prevent double-triggering of events for browsers which support\r\n    // both the `keyup` and `input` events.\r\n    this.$selection.on(\r\n      'input.searchcheck',\r\n      '.select2-search--inline',\r\n      function (evt) {\r\n        // IE will trigger the `input` event when a placeholder is used on a\r\n        // search box. To get around this issue, we are forced to ignore all\r\n        // `input` events in IE and keep using `keyup`.\r\n        if (disableInputEvents) {\r\n          self.$selection.off('input.search input.searchcheck');\r\n          return;\r\n        }\r\n\r\n        // Unbind the duplicated `keyup` event\r\n        self.$selection.off('keyup.search');\r\n      }\r\n    );\r\n\r\n    this.$selection.on(\r\n      'keyup.search input.search',\r\n      '.select2-search--inline',\r\n      function (evt) {\r\n        // IE will trigger the `input` event when a placeholder is used on a\r\n        // search box. To get around this issue, we are forced to ignore all\r\n        // `input` events in IE and keep using `keyup`.\r\n        if (disableInputEvents && evt.type === 'input') {\r\n          self.$selection.off('input.search input.searchcheck');\r\n          return;\r\n        }\r\n\r\n        var key = evt.which;\r\n\r\n        // We can freely ignore events from modifier keys\r\n        if (key == KEYS.SHIFT || key == KEYS.CTRL || key == KEYS.ALT) {\r\n          return;\r\n        }\r\n\r\n        // Tabbing will be handled during the `keydown` phase\r\n        if (key == KEYS.TAB) {\r\n          return;\r\n        }\r\n\r\n        self.handleSearch(evt);\r\n      }\r\n    );\r\n  };\r\n\r\n  /**\r\n   * This method will transfer the tabindex attribute from the rendered\r\n   * selection to the search box. This allows for the search box to be used as\r\n   * the primary focus instead of the selection container.\r\n   *\r\n   * @private\r\n   */\r\n  Search.prototype._transferTabIndex = function (decorated) {\r\n    this.$search.attr('tabindex', this.$selection.attr('tabindex'));\r\n    this.$selection.attr('tabindex', '-1');\r\n  };\r\n\r\n  Search.prototype.createPlaceholder = function (decorated, placeholder) {\r\n    this.$search.attr('placeholder', placeholder.text);\r\n  };\r\n\r\n  Search.prototype.update = function (decorated, data) {\r\n    var searchHadFocus = this.$search[0] == document.activeElement;\r\n\r\n    this.$search.attr('placeholder', '');\r\n\r\n    decorated.call(this, data);\r\n\r\n    this.$selection.find('.select2-selection__rendered')\r\n                   .append(this.$searchContainer);\r\n\r\n    this.resizeSearch();\r\n    if (searchHadFocus) {\r\n      var isTagInput = this.$element.find('[data-select2-tag]').length;\r\n      if (isTagInput) {\r\n        // fix IE11 bug where tag input lost focus\r\n        this.$element.focus();\r\n      } else {\r\n        this.$search.focus();\r\n      }\r\n    }\r\n  };\r\n\r\n  Search.prototype.handleSearch = function () {\r\n    this.resizeSearch();\r\n\r\n    if (!this._keyUpPrevented) {\r\n      var input = this.$search.val();\r\n\r\n      this.trigger('query', {\r\n        term: input\r\n      });\r\n    }\r\n\r\n    this._keyUpPrevented = false;\r\n  };\r\n\r\n  Search.prototype.searchRemoveChoice = function (decorated, item) {\r\n    this.trigger('unselect', {\r\n      data: item\r\n    });\r\n\r\n    this.$search.val(item.text);\r\n    this.handleSearch();\r\n  };\r\n\r\n  Search.prototype.resizeSearch = function () {\r\n    this.$search.css('width', '25px');\r\n\r\n    var width = '';\r\n\r\n    if (this.$search.attr('placeholder') !== '') {\r\n      width = this.$selection.find('.select2-selection__rendered').innerWidth();\r\n    } else {\r\n      var minimumWidth = this.$search.val().length + 1;\r\n\r\n      width = (minimumWidth * 0.75) + 'em';\r\n    }\r\n\r\n    this.$search.css('width', width);\r\n  };\r\n\r\n  return Search;\r\n});\r\n\r\nS2.define('select2/selection/eventRelay',[\r\n  'jquery'\r\n], function ($) {\r\n  function EventRelay () { }\r\n\r\n  EventRelay.prototype.bind = function (decorated, container, $container) {\r\n    var self = this;\r\n    var relayEvents = [\r\n      'open', 'opening',\r\n      'close', 'closing',\r\n      'select', 'selecting',\r\n      'unselect', 'unselecting',\r\n      'clear', 'clearing'\r\n    ];\r\n\r\n    var preventableEvents = [\r\n      'opening', 'closing', 'selecting', 'unselecting', 'clearing'\r\n    ];\r\n\r\n    decorated.call(this, container, $container);\r\n\r\n    container.on('*', function (name, params) {\r\n      // Ignore events that should not be relayed\r\n      if ($.inArray(name, relayEvents) === -1) {\r\n        return;\r\n      }\r\n\r\n      // The parameters should always be an object\r\n      params = params || {};\r\n\r\n      // Generate the jQuery event for the Select2 event\r\n      var evt = $.Event('select2:' + name, {\r\n        params: params\r\n      });\r\n\r\n      self.$element.trigger(evt);\r\n\r\n      // Only handle preventable events if it was one\r\n      if ($.inArray(name, preventableEvents) === -1) {\r\n        return;\r\n      }\r\n\r\n      params.prevented = evt.isDefaultPrevented();\r\n    });\r\n  };\r\n\r\n  return EventRelay;\r\n});\r\n\r\nS2.define('select2/translation',[\r\n  'jquery',\r\n  'require'\r\n], function ($, require) {\r\n  function Translation (dict) {\r\n    this.dict = dict || {};\r\n  }\r\n\r\n  Translation.prototype.all = function () {\r\n    return this.dict;\r\n  };\r\n\r\n  Translation.prototype.get = function (key) {\r\n    return this.dict[key];\r\n  };\r\n\r\n  Translation.prototype.extend = function (translation) {\r\n    this.dict = $.extend({}, translation.all(), this.dict);\r\n  };\r\n\r\n  // Static functions\r\n\r\n  Translation._cache = {};\r\n\r\n  Translation.loadPath = function (path) {\r\n    if (!(path in Translation._cache)) {\r\n      var translations = require(path);\r\n\r\n      Translation._cache[path] = translations;\r\n    }\r\n\r\n    return new Translation(Translation._cache[path]);\r\n  };\r\n\r\n  return Translation;\r\n});\r\n\r\nS2.define('select2/diacritics',[\r\n\r\n], function () {\r\n  var diacritics = {\r\n    '\\u24B6': 'A',\r\n    '\\uFF21': 'A',\r\n    '\\u00C0': 'A',\r\n    '\\u00C1': 'A',\r\n    '\\u00C2': 'A',\r\n    '\\u1EA6': 'A',\r\n    '\\u1EA4': 'A',\r\n    '\\u1EAA': 'A',\r\n    '\\u1EA8': 'A',\r\n    '\\u00C3': 'A',\r\n    '\\u0100': 'A',\r\n    '\\u0102': 'A',\r\n    '\\u1EB0': 'A',\r\n    '\\u1EAE': 'A',\r\n    '\\u1EB4': 'A',\r\n    '\\u1EB2': 'A',\r\n    '\\u0226': 'A',\r\n    '\\u01E0': 'A',\r\n    '\\u00C4': 'A',\r\n    '\\u01DE': 'A',\r\n    '\\u1EA2': 'A',\r\n    '\\u00C5': 'A',\r\n    '\\u01FA': 'A',\r\n    '\\u01CD': 'A',\r\n    '\\u0200': 'A',\r\n    '\\u0202': 'A',\r\n    '\\u1EA0': 'A',\r\n    '\\u1EAC': 'A',\r\n    '\\u1EB6': 'A',\r\n    '\\u1E00': 'A',\r\n    '\\u0104': 'A',\r\n    '\\u023A': 'A',\r\n    '\\u2C6F': 'A',\r\n    '\\uA732': 'AA',\r\n    '\\u00C6': 'AE',\r\n    '\\u01FC': 'AE',\r\n    '\\u01E2': 'AE',\r\n    '\\uA734': 'AO',\r\n    '\\uA736': 'AU',\r\n    '\\uA738': 'AV',\r\n    '\\uA73A': 'AV',\r\n    '\\uA73C': 'AY',\r\n    '\\u24B7': 'B',\r\n    '\\uFF22': 'B',\r\n    '\\u1E02': 'B',\r\n    '\\u1E04': 'B',\r\n    '\\u1E06': 'B',\r\n    '\\u0243': 'B',\r\n    '\\u0182': 'B',\r\n    '\\u0181': 'B',\r\n    '\\u24B8': 'C',\r\n    '\\uFF23': 'C',\r\n    '\\u0106': 'C',\r\n    '\\u0108': 'C',\r\n    '\\u010A': 'C',\r\n    '\\u010C': 'C',\r\n    '\\u00C7': 'C',\r\n    '\\u1E08': 'C',\r\n    '\\u0187': 'C',\r\n    '\\u023B': 'C',\r\n    '\\uA73E': 'C',\r\n    '\\u24B9': 'D',\r\n    '\\uFF24': 'D',\r\n    '\\u1E0A': 'D',\r\n    '\\u010E': 'D',\r\n    '\\u1E0C': 'D',\r\n    '\\u1E10': 'D',\r\n    '\\u1E12': 'D',\r\n    '\\u1E0E': 'D',\r\n    '\\u0110': 'D',\r\n    '\\u018B': 'D',\r\n    '\\u018A': 'D',\r\n    '\\u0189': 'D',\r\n    '\\uA779': 'D',\r\n    '\\u01F1': 'DZ',\r\n    '\\u01C4': 'DZ',\r\n    '\\u01F2': 'Dz',\r\n    '\\u01C5': 'Dz',\r\n    '\\u24BA': 'E',\r\n    '\\uFF25': 'E',\r\n    '\\u00C8': 'E',\r\n    '\\u00C9': 'E',\r\n    '\\u00CA': 'E',\r\n    '\\u1EC0': 'E',\r\n    '\\u1EBE': 'E',\r\n    '\\u1EC4': 'E',\r\n    '\\u1EC2': 'E',\r\n    '\\u1EBC': 'E',\r\n    '\\u0112': 'E',\r\n    '\\u1E14': 'E',\r\n    '\\u1E16': 'E',\r\n    '\\u0114': 'E',\r\n    '\\u0116': 'E',\r\n    '\\u00CB': 'E',\r\n    '\\u1EBA': 'E',\r\n    '\\u011A': 'E',\r\n    '\\u0204': 'E',\r\n    '\\u0206': 'E',\r\n    '\\u1EB8': 'E',\r\n    '\\u1EC6': 'E',\r\n    '\\u0228': 'E',\r\n    '\\u1E1C': 'E',\r\n    '\\u0118': 'E',\r\n    '\\u1E18': 'E',\r\n    '\\u1E1A': 'E',\r\n    '\\u0190': 'E',\r\n    '\\u018E': 'E',\r\n    '\\u24BB': 'F',\r\n    '\\uFF26': 'F',\r\n    '\\u1E1E': 'F',\r\n    '\\u0191': 'F',\r\n    '\\uA77B': 'F',\r\n    '\\u24BC': 'G',\r\n    '\\uFF27': 'G',\r\n    '\\u01F4': 'G',\r\n    '\\u011C': 'G',\r\n    '\\u1E20': 'G',\r\n    '\\u011E': 'G',\r\n    '\\u0120': 'G',\r\n    '\\u01E6': 'G',\r\n    '\\u0122': 'G',\r\n    '\\u01E4': 'G',\r\n    '\\u0193': 'G',\r\n    '\\uA7A0': 'G',\r\n    '\\uA77D': 'G',\r\n    '\\uA77E': 'G',\r\n    '\\u24BD': 'H',\r\n    '\\uFF28': 'H',\r\n    '\\u0124': 'H',\r\n    '\\u1E22': 'H',\r\n    '\\u1E26': 'H',\r\n    '\\u021E': 'H',\r\n    '\\u1E24': 'H',\r\n    '\\u1E28': 'H',\r\n    '\\u1E2A': 'H',\r\n    '\\u0126': 'H',\r\n    '\\u2C67': 'H',\r\n    '\\u2C75': 'H',\r\n    '\\uA78D': 'H',\r\n    '\\u24BE': 'I',\r\n    '\\uFF29': 'I',\r\n    '\\u00CC': 'I',\r\n    '\\u00CD': 'I',\r\n    '\\u00CE': 'I',\r\n    '\\u0128': 'I',\r\n    '\\u012A': 'I',\r\n    '\\u012C': 'I',\r\n    '\\u0130': 'I',\r\n    '\\u00CF': 'I',\r\n    '\\u1E2E': 'I',\r\n    '\\u1EC8': 'I',\r\n    '\\u01CF': 'I',\r\n    '\\u0208': 'I',\r\n    '\\u020A': 'I',\r\n    '\\u1ECA': 'I',\r\n    '\\u012E': 'I',\r\n    '\\u1E2C': 'I',\r\n    '\\u0197': 'I',\r\n    '\\u24BF': 'J',\r\n    '\\uFF2A': 'J',\r\n    '\\u0134': 'J',\r\n    '\\u0248': 'J',\r\n    '\\u24C0': 'K',\r\n    '\\uFF2B': 'K',\r\n    '\\u1E30': 'K',\r\n    '\\u01E8': 'K',\r\n    '\\u1E32': 'K',\r\n    '\\u0136': 'K',\r\n    '\\u1E34': 'K',\r\n    '\\u0198': 'K',\r\n    '\\u2C69': 'K',\r\n    '\\uA740': 'K',\r\n    '\\uA742': 'K',\r\n    '\\uA744': 'K',\r\n    '\\uA7A2': 'K',\r\n    '\\u24C1': 'L',\r\n    '\\uFF2C': 'L',\r\n    '\\u013F': 'L',\r\n    '\\u0139': 'L',\r\n    '\\u013D': 'L',\r\n    '\\u1E36': 'L',\r\n    '\\u1E38': 'L',\r\n    '\\u013B': 'L',\r\n    '\\u1E3C': 'L',\r\n    '\\u1E3A': 'L',\r\n    '\\u0141': 'L',\r\n    '\\u023D': 'L',\r\n    '\\u2C62': 'L',\r\n    '\\u2C60': 'L',\r\n    '\\uA748': 'L',\r\n    '\\uA746': 'L',\r\n    '\\uA780': 'L',\r\n    '\\u01C7': 'LJ',\r\n    '\\u01C8': 'Lj',\r\n    '\\u24C2': 'M',\r\n    '\\uFF2D': 'M',\r\n    '\\u1E3E': 'M',\r\n    '\\u1E40': 'M',\r\n    '\\u1E42': 'M',\r\n    '\\u2C6E': 'M',\r\n    '\\u019C': 'M',\r\n    '\\u24C3': 'N',\r\n    '\\uFF2E': 'N',\r\n    '\\u01F8': 'N',\r\n    '\\u0143': 'N',\r\n    '\\u00D1': 'N',\r\n    '\\u1E44': 'N',\r\n    '\\u0147': 'N',\r\n    '\\u1E46': 'N',\r\n    '\\u0145': 'N',\r\n    '\\u1E4A': 'N',\r\n    '\\u1E48': 'N',\r\n    '\\u0220': 'N',\r\n    '\\u019D': 'N',\r\n    '\\uA790': 'N',\r\n    '\\uA7A4': 'N',\r\n    '\\u01CA': 'NJ',\r\n    '\\u01CB': 'Nj',\r\n    '\\u24C4': 'O',\r\n    '\\uFF2F': 'O',\r\n    '\\u00D2': 'O',\r\n    '\\u00D3': 'O',\r\n    '\\u00D4': 'O',\r\n    '\\u1ED2': 'O',\r\n    '\\u1ED0': 'O',\r\n    '\\u1ED6': 'O',\r\n    '\\u1ED4': 'O',\r\n    '\\u00D5': 'O',\r\n    '\\u1E4C': 'O',\r\n    '\\u022C': 'O',\r\n    '\\u1E4E': 'O',\r\n    '\\u014C': 'O',\r\n    '\\u1E50': 'O',\r\n    '\\u1E52': 'O',\r\n    '\\u014E': 'O',\r\n    '\\u022E': 'O',\r\n    '\\u0230': 'O',\r\n    '\\u00D6': 'O',\r\n    '\\u022A': 'O',\r\n    '\\u1ECE': 'O',\r\n    '\\u0150': 'O',\r\n    '\\u01D1': 'O',\r\n    '\\u020C': 'O',\r\n    '\\u020E': 'O',\r\n    '\\u01A0': 'O',\r\n    '\\u1EDC': 'O',\r\n    '\\u1EDA': 'O',\r\n    '\\u1EE0': 'O',\r\n    '\\u1EDE': 'O',\r\n    '\\u1EE2': 'O',\r\n    '\\u1ECC': 'O',\r\n    '\\u1ED8': 'O',\r\n    '\\u01EA': 'O',\r\n    '\\u01EC': 'O',\r\n    '\\u00D8': 'O',\r\n    '\\u01FE': 'O',\r\n    '\\u0186': 'O',\r\n    '\\u019F': 'O',\r\n    '\\uA74A': 'O',\r\n    '\\uA74C': 'O',\r\n    '\\u01A2': 'OI',\r\n    '\\uA74E': 'OO',\r\n    '\\u0222': 'OU',\r\n    '\\u24C5': 'P',\r\n    '\\uFF30': 'P',\r\n    '\\u1E54': 'P',\r\n    '\\u1E56': 'P',\r\n    '\\u01A4': 'P',\r\n    '\\u2C63': 'P',\r\n    '\\uA750': 'P',\r\n    '\\uA752': 'P',\r\n    '\\uA754': 'P',\r\n    '\\u24C6': 'Q',\r\n    '\\uFF31': 'Q',\r\n    '\\uA756': 'Q',\r\n    '\\uA758': 'Q',\r\n    '\\u024A': 'Q',\r\n    '\\u24C7': 'R',\r\n    '\\uFF32': 'R',\r\n    '\\u0154': 'R',\r\n    '\\u1E58': 'R',\r\n    '\\u0158': 'R',\r\n    '\\u0210': 'R',\r\n    '\\u0212': 'R',\r\n    '\\u1E5A': 'R',\r\n    '\\u1E5C': 'R',\r\n    '\\u0156': 'R',\r\n    '\\u1E5E': 'R',\r\n    '\\u024C': 'R',\r\n    '\\u2C64': 'R',\r\n    '\\uA75A': 'R',\r\n    '\\uA7A6': 'R',\r\n    '\\uA782': 'R',\r\n    '\\u24C8': 'S',\r\n    '\\uFF33': 'S',\r\n    '\\u1E9E': 'S',\r\n    '\\u015A': 'S',\r\n    '\\u1E64': 'S',\r\n    '\\u015C': 'S',\r\n    '\\u1E60': 'S',\r\n    '\\u0160': 'S',\r\n    '\\u1E66': 'S',\r\n    '\\u1E62': 'S',\r\n    '\\u1E68': 'S',\r\n    '\\u0218': 'S',\r\n    '\\u015E': 'S',\r\n    '\\u2C7E': 'S',\r\n    '\\uA7A8': 'S',\r\n    '\\uA784': 'S',\r\n    '\\u24C9': 'T',\r\n    '\\uFF34': 'T',\r\n    '\\u1E6A': 'T',\r\n    '\\u0164': 'T',\r\n    '\\u1E6C': 'T',\r\n    '\\u021A': 'T',\r\n    '\\u0162': 'T',\r\n    '\\u1E70': 'T',\r\n    '\\u1E6E': 'T',\r\n    '\\u0166': 'T',\r\n    '\\u01AC': 'T',\r\n    '\\u01AE': 'T',\r\n    '\\u023E': 'T',\r\n    '\\uA786': 'T',\r\n    '\\uA728': 'TZ',\r\n    '\\u24CA': 'U',\r\n    '\\uFF35': 'U',\r\n    '\\u00D9': 'U',\r\n    '\\u00DA': 'U',\r\n    '\\u00DB': 'U',\r\n    '\\u0168': 'U',\r\n    '\\u1E78': 'U',\r\n    '\\u016A': 'U',\r\n    '\\u1E7A': 'U',\r\n    '\\u016C': 'U',\r\n    '\\u00DC': 'U',\r\n    '\\u01DB': 'U',\r\n    '\\u01D7': 'U',\r\n    '\\u01D5': 'U',\r\n    '\\u01D9': 'U',\r\n    '\\u1EE6': 'U',\r\n    '\\u016E': 'U',\r\n    '\\u0170': 'U',\r\n    '\\u01D3': 'U',\r\n    '\\u0214': 'U',\r\n    '\\u0216': 'U',\r\n    '\\u01AF': 'U',\r\n    '\\u1EEA': 'U',\r\n    '\\u1EE8': 'U',\r\n    '\\u1EEE': 'U',\r\n    '\\u1EEC': 'U',\r\n    '\\u1EF0': 'U',\r\n    '\\u1EE4': 'U',\r\n    '\\u1E72': 'U',\r\n    '\\u0172': 'U',\r\n    '\\u1E76': 'U',\r\n    '\\u1E74': 'U',\r\n    '\\u0244': 'U',\r\n    '\\u24CB': 'V',\r\n    '\\uFF36': 'V',\r\n    '\\u1E7C': 'V',\r\n    '\\u1E7E': 'V',\r\n    '\\u01B2': 'V',\r\n    '\\uA75E': 'V',\r\n    '\\u0245': 'V',\r\n    '\\uA760': 'VY',\r\n    '\\u24CC': 'W',\r\n    '\\uFF37': 'W',\r\n    '\\u1E80': 'W',\r\n    '\\u1E82': 'W',\r\n    '\\u0174': 'W',\r\n    '\\u1E86': 'W',\r\n    '\\u1E84': 'W',\r\n    '\\u1E88': 'W',\r\n    '\\u2C72': 'W',\r\n    '\\u24CD': 'X',\r\n    '\\uFF38': 'X',\r\n    '\\u1E8A': 'X',\r\n    '\\u1E8C': 'X',\r\n    '\\u24CE': 'Y',\r\n    '\\uFF39': 'Y',\r\n    '\\u1EF2': 'Y',\r\n    '\\u00DD': 'Y',\r\n    '\\u0176': 'Y',\r\n    '\\u1EF8': 'Y',\r\n    '\\u0232': 'Y',\r\n    '\\u1E8E': 'Y',\r\n    '\\u0178': 'Y',\r\n    '\\u1EF6': 'Y',\r\n    '\\u1EF4': 'Y',\r\n    '\\u01B3': 'Y',\r\n    '\\u024E': 'Y',\r\n    '\\u1EFE': 'Y',\r\n    '\\u24CF': 'Z',\r\n    '\\uFF3A': 'Z',\r\n    '\\u0179': 'Z',\r\n    '\\u1E90': 'Z',\r\n    '\\u017B': 'Z',\r\n    '\\u017D': 'Z',\r\n    '\\u1E92': 'Z',\r\n    '\\u1E94': 'Z',\r\n    '\\u01B5': 'Z',\r\n    '\\u0224': 'Z',\r\n    '\\u2C7F': 'Z',\r\n    '\\u2C6B': 'Z',\r\n    '\\uA762': 'Z',\r\n    '\\u24D0': 'a',\r\n    '\\uFF41': 'a',\r\n    '\\u1E9A': 'a',\r\n    '\\u00E0': 'a',\r\n    '\\u00E1': 'a',\r\n    '\\u00E2': 'a',\r\n    '\\u1EA7': 'a',\r\n    '\\u1EA5': 'a',\r\n    '\\u1EAB': 'a',\r\n    '\\u1EA9': 'a',\r\n    '\\u00E3': 'a',\r\n    '\\u0101': 'a',\r\n    '\\u0103': 'a',\r\n    '\\u1EB1': 'a',\r\n    '\\u1EAF': 'a',\r\n    '\\u1EB5': 'a',\r\n    '\\u1EB3': 'a',\r\n    '\\u0227': 'a',\r\n    '\\u01E1': 'a',\r\n    '\\u00E4': 'a',\r\n    '\\u01DF': 'a',\r\n    '\\u1EA3': 'a',\r\n    '\\u00E5': 'a',\r\n    '\\u01FB': 'a',\r\n    '\\u01CE': 'a',\r\n    '\\u0201': 'a',\r\n    '\\u0203': 'a',\r\n    '\\u1EA1': 'a',\r\n    '\\u1EAD': 'a',\r\n    '\\u1EB7': 'a',\r\n    '\\u1E01': 'a',\r\n    '\\u0105': 'a',\r\n    '\\u2C65': 'a',\r\n    '\\u0250': 'a',\r\n    '\\uA733': 'aa',\r\n    '\\u00E6': 'ae',\r\n    '\\u01FD': 'ae',\r\n    '\\u01E3': 'ae',\r\n    '\\uA735': 'ao',\r\n    '\\uA737': 'au',\r\n    '\\uA739': 'av',\r\n    '\\uA73B': 'av',\r\n    '\\uA73D': 'ay',\r\n    '\\u24D1': 'b',\r\n    '\\uFF42': 'b',\r\n    '\\u1E03': 'b',\r\n    '\\u1E05': 'b',\r\n    '\\u1E07': 'b',\r\n    '\\u0180': 'b',\r\n    '\\u0183': 'b',\r\n    '\\u0253': 'b',\r\n    '\\u24D2': 'c',\r\n    '\\uFF43': 'c',\r\n    '\\u0107': 'c',\r\n    '\\u0109': 'c',\r\n    '\\u010B': 'c',\r\n    '\\u010D': 'c',\r\n    '\\u00E7': 'c',\r\n    '\\u1E09': 'c',\r\n    '\\u0188': 'c',\r\n    '\\u023C': 'c',\r\n    '\\uA73F': 'c',\r\n    '\\u2184': 'c',\r\n    '\\u24D3': 'd',\r\n    '\\uFF44': 'd',\r\n    '\\u1E0B': 'd',\r\n    '\\u010F': 'd',\r\n    '\\u1E0D': 'd',\r\n    '\\u1E11': 'd',\r\n    '\\u1E13': 'd',\r\n    '\\u1E0F': 'd',\r\n    '\\u0111': 'd',\r\n    '\\u018C': 'd',\r\n    '\\u0256': 'd',\r\n    '\\u0257': 'd',\r\n    '\\uA77A': 'd',\r\n    '\\u01F3': 'dz',\r\n    '\\u01C6': 'dz',\r\n    '\\u24D4': 'e',\r\n    '\\uFF45': 'e',\r\n    '\\u00E8': 'e',\r\n    '\\u00E9': 'e',\r\n    '\\u00EA': 'e',\r\n    '\\u1EC1': 'e',\r\n    '\\u1EBF': 'e',\r\n    '\\u1EC5': 'e',\r\n    '\\u1EC3': 'e',\r\n    '\\u1EBD': 'e',\r\n    '\\u0113': 'e',\r\n    '\\u1E15': 'e',\r\n    '\\u1E17': 'e',\r\n    '\\u0115': 'e',\r\n    '\\u0117': 'e',\r\n    '\\u00EB': 'e',\r\n    '\\u1EBB': 'e',\r\n    '\\u011B': 'e',\r\n    '\\u0205': 'e',\r\n    '\\u0207': 'e',\r\n    '\\u1EB9': 'e',\r\n    '\\u1EC7': 'e',\r\n    '\\u0229': 'e',\r\n    '\\u1E1D': 'e',\r\n    '\\u0119': 'e',\r\n    '\\u1E19': 'e',\r\n    '\\u1E1B': 'e',\r\n    '\\u0247': 'e',\r\n    '\\u025B': 'e',\r\n    '\\u01DD': 'e',\r\n    '\\u24D5': 'f',\r\n    '\\uFF46': 'f',\r\n    '\\u1E1F': 'f',\r\n    '\\u0192': 'f',\r\n    '\\uA77C': 'f',\r\n    '\\u24D6': 'g',\r\n    '\\uFF47': 'g',\r\n    '\\u01F5': 'g',\r\n    '\\u011D': 'g',\r\n    '\\u1E21': 'g',\r\n    '\\u011F': 'g',\r\n    '\\u0121': 'g',\r\n    '\\u01E7': 'g',\r\n    '\\u0123': 'g',\r\n    '\\u01E5': 'g',\r\n    '\\u0260': 'g',\r\n    '\\uA7A1': 'g',\r\n    '\\u1D79': 'g',\r\n    '\\uA77F': 'g',\r\n    '\\u24D7': 'h',\r\n    '\\uFF48': 'h',\r\n    '\\u0125': 'h',\r\n    '\\u1E23': 'h',\r\n    '\\u1E27': 'h',\r\n    '\\u021F': 'h',\r\n    '\\u1E25': 'h',\r\n    '\\u1E29': 'h',\r\n    '\\u1E2B': 'h',\r\n    '\\u1E96': 'h',\r\n    '\\u0127': 'h',\r\n    '\\u2C68': 'h',\r\n    '\\u2C76': 'h',\r\n    '\\u0265': 'h',\r\n    '\\u0195': 'hv',\r\n    '\\u24D8': 'i',\r\n    '\\uFF49': 'i',\r\n    '\\u00EC': 'i',\r\n    '\\u00ED': 'i',\r\n    '\\u00EE': 'i',\r\n    '\\u0129': 'i',\r\n    '\\u012B': 'i',\r\n    '\\u012D': 'i',\r\n    '\\u00EF': 'i',\r\n    '\\u1E2F': 'i',\r\n    '\\u1EC9': 'i',\r\n    '\\u01D0': 'i',\r\n    '\\u0209': 'i',\r\n    '\\u020B': 'i',\r\n    '\\u1ECB': 'i',\r\n    '\\u012F': 'i',\r\n    '\\u1E2D': 'i',\r\n    '\\u0268': 'i',\r\n    '\\u0131': 'i',\r\n    '\\u24D9': 'j',\r\n    '\\uFF4A': 'j',\r\n    '\\u0135': 'j',\r\n    '\\u01F0': 'j',\r\n    '\\u0249': 'j',\r\n    '\\u24DA': 'k',\r\n    '\\uFF4B': 'k',\r\n    '\\u1E31': 'k',\r\n    '\\u01E9': 'k',\r\n    '\\u1E33': 'k',\r\n    '\\u0137': 'k',\r\n    '\\u1E35': 'k',\r\n    '\\u0199': 'k',\r\n    '\\u2C6A': 'k',\r\n    '\\uA741': 'k',\r\n    '\\uA743': 'k',\r\n    '\\uA745': 'k',\r\n    '\\uA7A3': 'k',\r\n    '\\u24DB': 'l',\r\n    '\\uFF4C': 'l',\r\n    '\\u0140': 'l',\r\n    '\\u013A': 'l',\r\n    '\\u013E': 'l',\r\n    '\\u1E37': 'l',\r\n    '\\u1E39': 'l',\r\n    '\\u013C': 'l',\r\n    '\\u1E3D': 'l',\r\n    '\\u1E3B': 'l',\r\n    '\\u017F': 'l',\r\n    '\\u0142': 'l',\r\n    '\\u019A': 'l',\r\n    '\\u026B': 'l',\r\n    '\\u2C61': 'l',\r\n    '\\uA749': 'l',\r\n    '\\uA781': 'l',\r\n    '\\uA747': 'l',\r\n    '\\u01C9': 'lj',\r\n    '\\u24DC': 'm',\r\n    '\\uFF4D': 'm',\r\n    '\\u1E3F': 'm',\r\n    '\\u1E41': 'm',\r\n    '\\u1E43': 'm',\r\n    '\\u0271': 'm',\r\n    '\\u026F': 'm',\r\n    '\\u24DD': 'n',\r\n    '\\uFF4E': 'n',\r\n    '\\u01F9': 'n',\r\n    '\\u0144': 'n',\r\n    '\\u00F1': 'n',\r\n    '\\u1E45': 'n',\r\n    '\\u0148': 'n',\r\n    '\\u1E47': 'n',\r\n    '\\u0146': 'n',\r\n    '\\u1E4B': 'n',\r\n    '\\u1E49': 'n',\r\n    '\\u019E': 'n',\r\n    '\\u0272': 'n',\r\n    '\\u0149': 'n',\r\n    '\\uA791': 'n',\r\n    '\\uA7A5': 'n',\r\n    '\\u01CC': 'nj',\r\n    '\\u24DE': 'o',\r\n    '\\uFF4F': 'o',\r\n    '\\u00F2': 'o',\r\n    '\\u00F3': 'o',\r\n    '\\u00F4': 'o',\r\n    '\\u1ED3': 'o',\r\n    '\\u1ED1': 'o',\r\n    '\\u1ED7': 'o',\r\n    '\\u1ED5': 'o',\r\n    '\\u00F5': 'o',\r\n    '\\u1E4D': 'o',\r\n    '\\u022D': 'o',\r\n    '\\u1E4F': 'o',\r\n    '\\u014D': 'o',\r\n    '\\u1E51': 'o',\r\n    '\\u1E53': 'o',\r\n    '\\u014F': 'o',\r\n    '\\u022F': 'o',\r\n    '\\u0231': 'o',\r\n    '\\u00F6': 'o',\r\n    '\\u022B': 'o',\r\n    '\\u1ECF': 'o',\r\n    '\\u0151': 'o',\r\n    '\\u01D2': 'o',\r\n    '\\u020D': 'o',\r\n    '\\u020F': 'o',\r\n    '\\u01A1': 'o',\r\n    '\\u1EDD': 'o',\r\n    '\\u1EDB': 'o',\r\n    '\\u1EE1': 'o',\r\n    '\\u1EDF': 'o',\r\n    '\\u1EE3': 'o',\r\n    '\\u1ECD': 'o',\r\n    '\\u1ED9': 'o',\r\n    '\\u01EB': 'o',\r\n    '\\u01ED': 'o',\r\n    '\\u00F8': 'o',\r\n    '\\u01FF': 'o',\r\n    '\\u0254': 'o',\r\n    '\\uA74B': 'o',\r\n    '\\uA74D': 'o',\r\n    '\\u0275': 'o',\r\n    '\\u01A3': 'oi',\r\n    '\\u0223': 'ou',\r\n    '\\uA74F': 'oo',\r\n    '\\u24DF': 'p',\r\n    '\\uFF50': 'p',\r\n    '\\u1E55': 'p',\r\n    '\\u1E57': 'p',\r\n    '\\u01A5': 'p',\r\n    '\\u1D7D': 'p',\r\n    '\\uA751': 'p',\r\n    '\\uA753': 'p',\r\n    '\\uA755': 'p',\r\n    '\\u24E0': 'q',\r\n    '\\uFF51': 'q',\r\n    '\\u024B': 'q',\r\n    '\\uA757': 'q',\r\n    '\\uA759': 'q',\r\n    '\\u24E1': 'r',\r\n    '\\uFF52': 'r',\r\n    '\\u0155': 'r',\r\n    '\\u1E59': 'r',\r\n    '\\u0159': 'r',\r\n    '\\u0211': 'r',\r\n    '\\u0213': 'r',\r\n    '\\u1E5B': 'r',\r\n    '\\u1E5D': 'r',\r\n    '\\u0157': 'r',\r\n    '\\u1E5F': 'r',\r\n    '\\u024D': 'r',\r\n    '\\u027D': 'r',\r\n    '\\uA75B': 'r',\r\n    '\\uA7A7': 'r',\r\n    '\\uA783': 'r',\r\n    '\\u24E2': 's',\r\n    '\\uFF53': 's',\r\n    '\\u00DF': 's',\r\n    '\\u015B': 's',\r\n    '\\u1E65': 's',\r\n    '\\u015D': 's',\r\n    '\\u1E61': 's',\r\n    '\\u0161': 's',\r\n    '\\u1E67': 's',\r\n    '\\u1E63': 's',\r\n    '\\u1E69': 's',\r\n    '\\u0219': 's',\r\n    '\\u015F': 's',\r\n    '\\u023F': 's',\r\n    '\\uA7A9': 's',\r\n    '\\uA785': 's',\r\n    '\\u1E9B': 's',\r\n    '\\u24E3': 't',\r\n    '\\uFF54': 't',\r\n    '\\u1E6B': 't',\r\n    '\\u1E97': 't',\r\n    '\\u0165': 't',\r\n    '\\u1E6D': 't',\r\n    '\\u021B': 't',\r\n    '\\u0163': 't',\r\n    '\\u1E71': 't',\r\n    '\\u1E6F': 't',\r\n    '\\u0167': 't',\r\n    '\\u01AD': 't',\r\n    '\\u0288': 't',\r\n    '\\u2C66': 't',\r\n    '\\uA787': 't',\r\n    '\\uA729': 'tz',\r\n    '\\u24E4': 'u',\r\n    '\\uFF55': 'u',\r\n    '\\u00F9': 'u',\r\n    '\\u00FA': 'u',\r\n    '\\u00FB': 'u',\r\n    '\\u0169': 'u',\r\n    '\\u1E79': 'u',\r\n    '\\u016B': 'u',\r\n    '\\u1E7B': 'u',\r\n    '\\u016D': 'u',\r\n    '\\u00FC': 'u',\r\n    '\\u01DC': 'u',\r\n    '\\u01D8': 'u',\r\n    '\\u01D6': 'u',\r\n    '\\u01DA': 'u',\r\n    '\\u1EE7': 'u',\r\n    '\\u016F': 'u',\r\n    '\\u0171': 'u',\r\n    '\\u01D4': 'u',\r\n    '\\u0215': 'u',\r\n    '\\u0217': 'u',\r\n    '\\u01B0': 'u',\r\n    '\\u1EEB': 'u',\r\n    '\\u1EE9': 'u',\r\n    '\\u1EEF': 'u',\r\n    '\\u1EED': 'u',\r\n    '\\u1EF1': 'u',\r\n    '\\u1EE5': 'u',\r\n    '\\u1E73': 'u',\r\n    '\\u0173': 'u',\r\n    '\\u1E77': 'u',\r\n    '\\u1E75': 'u',\r\n    '\\u0289': 'u',\r\n    '\\u24E5': 'v',\r\n    '\\uFF56': 'v',\r\n    '\\u1E7D': 'v',\r\n    '\\u1E7F': 'v',\r\n    '\\u028B': 'v',\r\n    '\\uA75F': 'v',\r\n    '\\u028C': 'v',\r\n    '\\uA761': 'vy',\r\n    '\\u24E6': 'w',\r\n    '\\uFF57': 'w',\r\n    '\\u1E81': 'w',\r\n    '\\u1E83': 'w',\r\n    '\\u0175': 'w',\r\n    '\\u1E87': 'w',\r\n    '\\u1E85': 'w',\r\n    '\\u1E98': 'w',\r\n    '\\u1E89': 'w',\r\n    '\\u2C73': 'w',\r\n    '\\u24E7': 'x',\r\n    '\\uFF58': 'x',\r\n    '\\u1E8B': 'x',\r\n    '\\u1E8D': 'x',\r\n    '\\u24E8': 'y',\r\n    '\\uFF59': 'y',\r\n    '\\u1EF3': 'y',\r\n    '\\u00FD': 'y',\r\n    '\\u0177': 'y',\r\n    '\\u1EF9': 'y',\r\n    '\\u0233': 'y',\r\n    '\\u1E8F': 'y',\r\n    '\\u00FF': 'y',\r\n    '\\u1EF7': 'y',\r\n    '\\u1E99': 'y',\r\n    '\\u1EF5': 'y',\r\n    '\\u01B4': 'y',\r\n    '\\u024F': 'y',\r\n    '\\u1EFF': 'y',\r\n    '\\u24E9': 'z',\r\n    '\\uFF5A': 'z',\r\n    '\\u017A': 'z',\r\n    '\\u1E91': 'z',\r\n    '\\u017C': 'z',\r\n    '\\u017E': 'z',\r\n    '\\u1E93': 'z',\r\n    '\\u1E95': 'z',\r\n    '\\u01B6': 'z',\r\n    '\\u0225': 'z',\r\n    '\\u0240': 'z',\r\n    '\\u2C6C': 'z',\r\n    '\\uA763': 'z',\r\n    '\\u0386': '\\u0391',\r\n    '\\u0388': '\\u0395',\r\n    '\\u0389': '\\u0397',\r\n    '\\u038A': '\\u0399',\r\n    '\\u03AA': '\\u0399',\r\n    '\\u038C': '\\u039F',\r\n    '\\u038E': '\\u03A5',\r\n    '\\u03AB': '\\u03A5',\r\n    '\\u038F': '\\u03A9',\r\n    '\\u03AC': '\\u03B1',\r\n    '\\u03AD': '\\u03B5',\r\n    '\\u03AE': '\\u03B7',\r\n    '\\u03AF': '\\u03B9',\r\n    '\\u03CA': '\\u03B9',\r\n    '\\u0390': '\\u03B9',\r\n    '\\u03CC': '\\u03BF',\r\n    '\\u03CD': '\\u03C5',\r\n    '\\u03CB': '\\u03C5',\r\n    '\\u03B0': '\\u03C5',\r\n    '\\u03C9': '\\u03C9',\r\n    '\\u03C2': '\\u03C3'\r\n  };\r\n\r\n  return diacritics;\r\n});\r\n\r\nS2.define('select2/data/base',[\r\n  '../utils'\r\n], function (Utils) {\r\n  function BaseAdapter ($element, options) {\r\n    BaseAdapter.__super__.constructor.call(this);\r\n  }\r\n\r\n  Utils.Extend(BaseAdapter, Utils.Observable);\r\n\r\n  BaseAdapter.prototype.current = function (callback) {\r\n    throw new Error('The `current` method must be defined in child classes.');\r\n  };\r\n\r\n  BaseAdapter.prototype.query = function (params, callback) {\r\n    throw new Error('The `query` method must be defined in child classes.');\r\n  };\r\n\r\n  BaseAdapter.prototype.bind = function (container, $container) {\r\n    // Can be implemented in subclasses\r\n  };\r\n\r\n  BaseAdapter.prototype.destroy = function () {\r\n    // Can be implemented in subclasses\r\n  };\r\n\r\n  BaseAdapter.prototype.generateResultId = function (container, data) {\r\n    var id = container.id + '-result-';\r\n\r\n    id += Utils.generateChars(4);\r\n\r\n    if (data.id != null) {\r\n      id += '-' + data.id.toString();\r\n    } else {\r\n      id += '-' + Utils.generateChars(4);\r\n    }\r\n    return id;\r\n  };\r\n\r\n  return BaseAdapter;\r\n});\r\n\r\nS2.define('select2/data/select',[\r\n  './base',\r\n  '../utils',\r\n  'jquery'\r\n], function (BaseAdapter, Utils, $) {\r\n  function SelectAdapter ($element, options) {\r\n    this.$element = $element;\r\n    this.options = options;\r\n\r\n    SelectAdapter.__super__.constructor.call(this);\r\n  }\r\n\r\n  Utils.Extend(SelectAdapter, BaseAdapter);\r\n\r\n  SelectAdapter.prototype.current = function (callback) {\r\n    var data = [];\r\n    var self = this;\r\n\r\n    this.$element.find(':selected').each(function () {\r\n      var $option = $(this);\r\n\r\n      var option = self.item($option);\r\n\r\n      data.push(option);\r\n    });\r\n\r\n    callback(data);\r\n  };\r\n\r\n  SelectAdapter.prototype.select = function (data) {\r\n    var self = this;\r\n\r\n    data.selected = true;\r\n\r\n    // If data.element is a DOM node, use it instead\r\n    if ($(data.element).is('option')) {\r\n      data.element.selected = true;\r\n\r\n      this.$element.trigger('change');\r\n\r\n      return;\r\n    }\r\n\r\n    if (this.$element.prop('multiple')) {\r\n      this.current(function (currentData) {\r\n        var val = [];\r\n\r\n        data = [data];\r\n        data.push.apply(data, currentData);\r\n\r\n        for (var d = 0; d < data.length; d++) {\r\n          var id = data[d].id;\r\n\r\n          if ($.inArray(id, val) === -1) {\r\n            val.push(id);\r\n          }\r\n        }\r\n\r\n        self.$element.val(val);\r\n        self.$element.trigger('change');\r\n      });\r\n    } else {\r\n      var val = data.id;\r\n\r\n      this.$element.val(val);\r\n      this.$element.trigger('change');\r\n    }\r\n  };\r\n\r\n  SelectAdapter.prototype.unselect = function (data) {\r\n    var self = this;\r\n\r\n    if (!this.$element.prop('multiple')) {\r\n      return;\r\n    }\r\n\r\n    data.selected = false;\r\n\r\n    if ($(data.element).is('option')) {\r\n      data.element.selected = false;\r\n\r\n      this.$element.trigger('change');\r\n\r\n      return;\r\n    }\r\n\r\n    this.current(function (currentData) {\r\n      var val = [];\r\n\r\n      for (var d = 0; d < currentData.length; d++) {\r\n        var id = currentData[d].id;\r\n\r\n        if (id !== data.id && $.inArray(id, val) === -1) {\r\n          val.push(id);\r\n        }\r\n      }\r\n\r\n      self.$element.val(val);\r\n\r\n      self.$element.trigger('change');\r\n    });\r\n  };\r\n\r\n  SelectAdapter.prototype.bind = function (container, $container) {\r\n    var self = this;\r\n\r\n    this.container = container;\r\n\r\n    container.on('select', function (params) {\r\n      self.select(params.data);\r\n    });\r\n\r\n    container.on('unselect', function (params) {\r\n      self.unselect(params.data);\r\n    });\r\n  };\r\n\r\n  SelectAdapter.prototype.destroy = function () {\r\n    // Remove anything added to child elements\r\n    this.$element.find('*').each(function () {\r\n      // Remove any custom data set by Select2\r\n      Utils.RemoveData(this);\r\n    });\r\n  };\r\n\r\n  SelectAdapter.prototype.query = function (params, callback) {\r\n    var data = [];\r\n    var self = this;\r\n\r\n    var $options = this.$element.children();\r\n\r\n    $options.each(function () {\r\n      var $option = $(this);\r\n\r\n      if (!$option.is('option') && !$option.is('optgroup')) {\r\n        return;\r\n      }\r\n\r\n      var option = self.item($option);\r\n\r\n      var matches = self.matches(params, option);\r\n\r\n      if (matches !== null) {\r\n        data.push(matches);\r\n      }\r\n    });\r\n\r\n    callback({\r\n      results: data\r\n    });\r\n  };\r\n\r\n  SelectAdapter.prototype.addOptions = function ($options) {\r\n    Utils.appendMany(this.$element, $options);\r\n  };\r\n\r\n  SelectAdapter.prototype.option = function (data) {\r\n    var option;\r\n\r\n    if (data.children) {\r\n      option = document.createElement('optgroup');\r\n      option.label = data.text;\r\n    } else {\r\n      option = document.createElement('option');\r\n\r\n      if (option.textContent !== undefined) {\r\n        option.textContent = data.text;\r\n      } else {\r\n        option.innerText = data.text;\r\n      }\r\n    }\r\n\r\n    if (data.id !== undefined) {\r\n      option.value = data.id;\r\n    }\r\n\r\n    if (data.disabled) {\r\n      option.disabled = true;\r\n    }\r\n\r\n    if (data.selected) {\r\n      option.selected = true;\r\n    }\r\n\r\n    if (data.title) {\r\n      option.title = data.title;\r\n    }\r\n\r\n    var $option = $(option);\r\n\r\n    var normalizedData = this._normalizeItem(data);\r\n    normalizedData.element = option;\r\n\r\n    // Override the option's data with the combined data\r\n    Utils.StoreData(option, 'data', normalizedData);\r\n\r\n    return $option;\r\n  };\r\n\r\n  SelectAdapter.prototype.item = function ($option) {\r\n    var data = {};\r\n\r\n    data = Utils.GetData($option[0], 'data');\r\n\r\n    if (data != null) {\r\n      return data;\r\n    }\r\n\r\n    if ($option.is('option')) {\r\n      data = {\r\n        id: $option.val(),\r\n        text: $option.text(),\r\n        disabled: $option.prop('disabled'),\r\n        selected: $option.prop('selected'),\r\n        title: $option.prop('title')\r\n      };\r\n    } else if ($option.is('optgroup')) {\r\n      data = {\r\n        text: $option.prop('label'),\r\n        children: [],\r\n        title: $option.prop('title')\r\n      };\r\n\r\n      var $children = $option.children('option');\r\n      var children = [];\r\n\r\n      for (var c = 0; c < $children.length; c++) {\r\n        var $child = $($children[c]);\r\n\r\n        var child = this.item($child);\r\n\r\n        children.push(child);\r\n      }\r\n\r\n      data.children = children;\r\n    }\r\n\r\n    data = this._normalizeItem(data);\r\n    data.element = $option[0];\r\n\r\n    Utils.StoreData($option[0], 'data', data);\r\n\r\n    return data;\r\n  };\r\n\r\n  SelectAdapter.prototype._normalizeItem = function (item) {\r\n    if (item !== Object(item)) {\r\n      item = {\r\n        id: item,\r\n        text: item\r\n      };\r\n    }\r\n\r\n    item = $.extend({}, {\r\n      text: ''\r\n    }, item);\r\n\r\n    var defaults = {\r\n      selected: false,\r\n      disabled: false\r\n    };\r\n\r\n    if (item.id != null) {\r\n      item.id = item.id.toString();\r\n    }\r\n\r\n    if (item.text != null) {\r\n      item.text = item.text.toString();\r\n    }\r\n\r\n    if (item._resultId == null && item.id && this.container != null) {\r\n      item._resultId = this.generateResultId(this.container, item);\r\n    }\r\n\r\n    return $.extend({}, defaults, item);\r\n  };\r\n\r\n  SelectAdapter.prototype.matches = function (params, data) {\r\n    var matcher = this.options.get('matcher');\r\n\r\n    return matcher(params, data);\r\n  };\r\n\r\n  return SelectAdapter;\r\n});\r\n\r\nS2.define('select2/data/array',[\r\n  './select',\r\n  '../utils',\r\n  'jquery'\r\n], function (SelectAdapter, Utils, $) {\r\n  function ArrayAdapter ($element, options) {\r\n    var data = options.get('data') || [];\r\n\r\n    ArrayAdapter.__super__.constructor.call(this, $element, options);\r\n\r\n    this.addOptions(this.convertToOptions(data));\r\n  }\r\n\r\n  Utils.Extend(ArrayAdapter, SelectAdapter);\r\n\r\n  ArrayAdapter.prototype.select = function (data) {\r\n    var $option = this.$element.find('option').filter(function (i, elm) {\r\n      return elm.value == data.id.toString();\r\n    });\r\n\r\n    if ($option.length === 0) {\r\n      $option = this.option(data);\r\n\r\n      this.addOptions($option);\r\n    }\r\n\r\n    ArrayAdapter.__super__.select.call(this, data);\r\n  };\r\n\r\n  ArrayAdapter.prototype.convertToOptions = function (data) {\r\n    var self = this;\r\n\r\n    var $existing = this.$element.find('option');\r\n    var existingIds = $existing.map(function () {\r\n      return self.item($(this)).id;\r\n    }).get();\r\n\r\n    var $options = [];\r\n\r\n    // Filter out all items except for the one passed in the argument\r\n    function onlyItem (item) {\r\n      return function () {\r\n        return $(this).val() == item.id;\r\n      };\r\n    }\r\n\r\n    for (var d = 0; d < data.length; d++) {\r\n      var item = this._normalizeItem(data[d]);\r\n\r\n      // Skip items which were pre-loaded, only merge the data\r\n      if ($.inArray(item.id, existingIds) >= 0) {\r\n        var $existingOption = $existing.filter(onlyItem(item));\r\n\r\n        var existingData = this.item($existingOption);\r\n        var newData = $.extend(true, {}, item, existingData);\r\n\r\n        var $newOption = this.option(newData);\r\n\r\n        $existingOption.replaceWith($newOption);\r\n\r\n        continue;\r\n      }\r\n\r\n      var $option = this.option(item);\r\n\r\n      if (item.children) {\r\n        var $children = this.convertToOptions(item.children);\r\n\r\n        Utils.appendMany($option, $children);\r\n      }\r\n\r\n      $options.push($option);\r\n    }\r\n\r\n    return $options;\r\n  };\r\n\r\n  return ArrayAdapter;\r\n});\r\n\r\nS2.define('select2/data/ajax',[\r\n  './array',\r\n  '../utils',\r\n  'jquery'\r\n], function (ArrayAdapter, Utils, $) {\r\n  function AjaxAdapter ($element, options) {\r\n    this.ajaxOptions = this._applyDefaults(options.get('ajax'));\r\n\r\n    if (this.ajaxOptions.processResults != null) {\r\n      this.processResults = this.ajaxOptions.processResults;\r\n    }\r\n\r\n    AjaxAdapter.__super__.constructor.call(this, $element, options);\r\n  }\r\n\r\n  Utils.Extend(AjaxAdapter, ArrayAdapter);\r\n\r\n  AjaxAdapter.prototype._applyDefaults = function (options) {\r\n    var defaults = {\r\n      data: function (params) {\r\n        return $.extend({}, params, {\r\n          q: params.term\r\n        });\r\n      },\r\n      transport: function (params, success, failure) {\r\n        var $request = $.ajax(params);\r\n\r\n        $request.then(success);\r\n        $request.fail(failure);\r\n\r\n        return $request;\r\n      }\r\n    };\r\n\r\n    return $.extend({}, defaults, options, true);\r\n  };\r\n\r\n  AjaxAdapter.prototype.processResults = function (results) {\r\n    return results;\r\n  };\r\n\r\n  AjaxAdapter.prototype.query = function (params, callback) {\r\n    var matches = [];\r\n    var self = this;\r\n\r\n    if (this._request != null) {\r\n      // JSONP requests cannot always be aborted\r\n      if ($.isFunction(this._request.abort)) {\r\n        this._request.abort();\r\n      }\r\n\r\n      this._request = null;\r\n    }\r\n\r\n    var options = $.extend({\r\n      type: 'GET'\r\n    }, this.ajaxOptions);\r\n\r\n    if (typeof options.url === 'function') {\r\n      options.url = options.url.call(this.$element, params);\r\n    }\r\n\r\n    if (typeof options.data === 'function') {\r\n      options.data = options.data.call(this.$element, params);\r\n    }\r\n\r\n    function request () {\r\n      var $request = options.transport(options, function (data) {\r\n        var results = self.processResults(data, params);\r\n\r\n        if (self.options.get('debug') && window.console && console.error) {\r\n          // Check to make sure that the response included a `results` key.\r\n          if (!results || !results.results || !$.isArray(results.results)) {\r\n            console.error(\r\n              'Select2: The AJAX results did not return an array in the ' +\r\n              '`results` key of the response.'\r\n            );\r\n          }\r\n        }\r\n\r\n        callback(results);\r\n      }, function () {\r\n        // Attempt to detect if a request was aborted\r\n        // Only works if the transport exposes a status property\r\n        if ('status' in $request &&\r\n            ($request.status === 0 || $request.status === '0')) {\r\n          return;\r\n        }\r\n\r\n        self.trigger('results:message', {\r\n          message: 'errorLoading'\r\n        });\r\n      });\r\n\r\n      self._request = $request;\r\n    }\r\n\r\n    if (this.ajaxOptions.delay && params.term != null) {\r\n      if (this._queryTimeout) {\r\n        window.clearTimeout(this._queryTimeout);\r\n      }\r\n\r\n      this._queryTimeout = window.setTimeout(request, this.ajaxOptions.delay);\r\n    } else {\r\n      request();\r\n    }\r\n  };\r\n\r\n  return AjaxAdapter;\r\n});\r\n\r\nS2.define('select2/data/tags',[\r\n  'jquery'\r\n], function ($) {\r\n  function Tags (decorated, $element, options) {\r\n    var tags = options.get('tags');\r\n\r\n    var createTag = options.get('createTag');\r\n\r\n    if (createTag !== undefined) {\r\n      this.createTag = createTag;\r\n    }\r\n\r\n    var insertTag = options.get('insertTag');\r\n\r\n    if (insertTag !== undefined) {\r\n        this.insertTag = insertTag;\r\n    }\r\n\r\n    decorated.call(this, $element, options);\r\n\r\n    if ($.isArray(tags)) {\r\n      for (var t = 0; t < tags.length; t++) {\r\n        var tag = tags[t];\r\n        var item = this._normalizeItem(tag);\r\n\r\n        var $option = this.option(item);\r\n\r\n        this.$element.append($option);\r\n      }\r\n    }\r\n  }\r\n\r\n  Tags.prototype.query = function (decorated, params, callback) {\r\n    var self = this;\r\n\r\n    this._removeOldTags();\r\n\r\n    if (params.term == null || params.page != null) {\r\n      decorated.call(this, params, callback);\r\n      return;\r\n    }\r\n\r\n    function wrapper (obj, child) {\r\n      var data = obj.results;\r\n\r\n      for (var i = 0; i < data.length; i++) {\r\n        var option = data[i];\r\n\r\n        var checkChildren = (\r\n          option.children != null &&\r\n          !wrapper({\r\n            results: option.children\r\n          }, true)\r\n        );\r\n\r\n        var optionText = (option.text || '').toUpperCase();\r\n        var paramsTerm = (params.term || '').toUpperCase();\r\n\r\n        var checkText = optionText === paramsTerm;\r\n\r\n        if (checkText || checkChildren) {\r\n          if (child) {\r\n            return false;\r\n          }\r\n\r\n          obj.data = data;\r\n          callback(obj);\r\n\r\n          return;\r\n        }\r\n      }\r\n\r\n      if (child) {\r\n        return true;\r\n      }\r\n\r\n      var tag = self.createTag(params);\r\n\r\n      if (tag != null) {\r\n        var $option = self.option(tag);\r\n        $option.attr('data-select2-tag', true);\r\n\r\n        self.addOptions([$option]);\r\n\r\n        self.insertTag(data, tag);\r\n      }\r\n\r\n      obj.results = data;\r\n\r\n      callback(obj);\r\n    }\r\n\r\n    decorated.call(this, params, wrapper);\r\n  };\r\n\r\n  Tags.prototype.createTag = function (decorated, params) {\r\n    var term = $.trim(params.term);\r\n\r\n    if (term === '') {\r\n      return null;\r\n    }\r\n\r\n    return {\r\n      id: term,\r\n      text: term\r\n    };\r\n  };\r\n\r\n  Tags.prototype.insertTag = function (_, data, tag) {\r\n    data.unshift(tag);\r\n  };\r\n\r\n  Tags.prototype._removeOldTags = function (_) {\r\n    var tag = this._lastTag;\r\n\r\n    var $options = this.$element.find('option[data-select2-tag]');\r\n\r\n    $options.each(function () {\r\n      if (this.selected) {\r\n        return;\r\n      }\r\n\r\n      $(this).remove();\r\n    });\r\n  };\r\n\r\n  return Tags;\r\n});\r\n\r\nS2.define('select2/data/tokenizer',[\r\n  'jquery'\r\n], function ($) {\r\n  function Tokenizer (decorated, $element, options) {\r\n    var tokenizer = options.get('tokenizer');\r\n\r\n    if (tokenizer !== undefined) {\r\n      this.tokenizer = tokenizer;\r\n    }\r\n\r\n    decorated.call(this, $element, options);\r\n  }\r\n\r\n  Tokenizer.prototype.bind = function (decorated, container, $container) {\r\n    decorated.call(this, container, $container);\r\n\r\n    this.$search =  container.dropdown.$search || container.selection.$search ||\r\n      $container.find('.select2-search__field');\r\n  };\r\n\r\n  Tokenizer.prototype.query = function (decorated, params, callback) {\r\n    var self = this;\r\n\r\n    function createAndSelect (data) {\r\n      // Normalize the data object so we can use it for checks\r\n      var item = self._normalizeItem(data);\r\n\r\n      // Check if the data object already exists as a tag\r\n      // Select it if it doesn't\r\n      var $existingOptions = self.$element.find('option').filter(function () {\r\n        return $(this).val() === item.id;\r\n      });\r\n\r\n      // If an existing option wasn't found for it, create the option\r\n      if (!$existingOptions.length) {\r\n        var $option = self.option(item);\r\n        $option.attr('data-select2-tag', true);\r\n\r\n        self._removeOldTags();\r\n        self.addOptions([$option]);\r\n      }\r\n\r\n      // Select the item, now that we know there is an option for it\r\n      select(item);\r\n    }\r\n\r\n    function select (data) {\r\n      self.trigger('select', {\r\n        data: data\r\n      });\r\n    }\r\n\r\n    params.term = params.term || '';\r\n\r\n    var tokenData = this.tokenizer(params, this.options, createAndSelect);\r\n\r\n    if (tokenData.term !== params.term) {\r\n      // Replace the search term if we have the search box\r\n      if (this.$search.length) {\r\n        this.$search.val(tokenData.term);\r\n        this.$search.focus();\r\n      }\r\n\r\n      params.term = tokenData.term;\r\n    }\r\n\r\n    decorated.call(this, params, callback);\r\n  };\r\n\r\n  Tokenizer.prototype.tokenizer = function (_, params, options, callback) {\r\n    var separators = options.get('tokenSeparators') || [];\r\n    var term = params.term;\r\n    var i = 0;\r\n\r\n    var createTag = this.createTag || function (params) {\r\n      return {\r\n        id: params.term,\r\n        text: params.term\r\n      };\r\n    };\r\n\r\n    while (i < term.length) {\r\n      var termChar = term[i];\r\n\r\n      if ($.inArray(termChar, separators) === -1) {\r\n        i++;\r\n\r\n        continue;\r\n      }\r\n\r\n      var part = term.substr(0, i);\r\n      var partParams = $.extend({}, params, {\r\n        term: part\r\n      });\r\n\r\n      var data = createTag(partParams);\r\n\r\n      if (data == null) {\r\n        i++;\r\n        continue;\r\n      }\r\n\r\n      callback(data);\r\n\r\n      // Reset the term to not include the tokenized portion\r\n      term = term.substr(i + 1) || '';\r\n      i = 0;\r\n    }\r\n\r\n    return {\r\n      term: term\r\n    };\r\n  };\r\n\r\n  return Tokenizer;\r\n});\r\n\r\nS2.define('select2/data/minimumInputLength',[\r\n\r\n], function () {\r\n  function MinimumInputLength (decorated, $e, options) {\r\n    this.minimumInputLength = options.get('minimumInputLength');\r\n\r\n    decorated.call(this, $e, options);\r\n  }\r\n\r\n  MinimumInputLength.prototype.query = function (decorated, params, callback) {\r\n    params.term = params.term || '';\r\n\r\n    if (params.term.length < this.minimumInputLength) {\r\n      this.trigger('results:message', {\r\n        message: 'inputTooShort',\r\n        args: {\r\n          minimum: this.minimumInputLength,\r\n          input: params.term,\r\n          params: params\r\n        }\r\n      });\r\n\r\n      return;\r\n    }\r\n\r\n    decorated.call(this, params, callback);\r\n  };\r\n\r\n  return MinimumInputLength;\r\n});\r\n\r\nS2.define('select2/data/maximumInputLength',[\r\n\r\n], function () {\r\n  function MaximumInputLength (decorated, $e, options) {\r\n    this.maximumInputLength = options.get('maximumInputLength');\r\n\r\n    decorated.call(this, $e, options);\r\n  }\r\n\r\n  MaximumInputLength.prototype.query = function (decorated, params, callback) {\r\n    params.term = params.term || '';\r\n\r\n    if (this.maximumInputLength > 0 &&\r\n        params.term.length > this.maximumInputLength) {\r\n      this.trigger('results:message', {\r\n        message: 'inputTooLong',\r\n        args: {\r\n          maximum: this.maximumInputLength,\r\n          input: params.term,\r\n          params: params\r\n        }\r\n      });\r\n\r\n      return;\r\n    }\r\n\r\n    decorated.call(this, params, callback);\r\n  };\r\n\r\n  return MaximumInputLength;\r\n});\r\n\r\nS2.define('select2/data/maximumSelectionLength',[\r\n\r\n], function (){\r\n  function MaximumSelectionLength (decorated, $e, options) {\r\n    this.maximumSelectionLength = options.get('maximumSelectionLength');\r\n\r\n    decorated.call(this, $e, options);\r\n  }\r\n\r\n  MaximumSelectionLength.prototype.query =\r\n    function (decorated, params, callback) {\r\n      var self = this;\r\n\r\n      this.current(function (currentData) {\r\n        var count = currentData != null ? currentData.length : 0;\r\n        if (self.maximumSelectionLength > 0 &&\r\n          count >= self.maximumSelectionLength) {\r\n          self.trigger('results:message', {\r\n            message: 'maximumSelected',\r\n            args: {\r\n              maximum: self.maximumSelectionLength\r\n            }\r\n          });\r\n          return;\r\n        }\r\n        decorated.call(self, params, callback);\r\n      });\r\n  };\r\n\r\n  return MaximumSelectionLength;\r\n});\r\n\r\nS2.define('select2/dropdown',[\r\n  'jquery',\r\n  './utils'\r\n], function ($, Utils) {\r\n  function Dropdown ($element, options) {\r\n    this.$element = $element;\r\n    this.options = options;\r\n\r\n    Dropdown.__super__.constructor.call(this);\r\n  }\r\n\r\n  Utils.Extend(Dropdown, Utils.Observable);\r\n\r\n  Dropdown.prototype.render = function () {\r\n    var $dropdown = $(\r\n      '<span class=\"select2-dropdown\">' +\r\n        '<span class=\"select2-results\"></span>' +\r\n      '</span>'\r\n    );\r\n\r\n    $dropdown.attr('dir', this.options.get('dir'));\r\n\r\n    this.$dropdown = $dropdown;\r\n\r\n    return $dropdown;\r\n  };\r\n\r\n  Dropdown.prototype.bind = function () {\r\n    // Should be implemented in subclasses\r\n  };\r\n\r\n  Dropdown.prototype.position = function ($dropdown, $container) {\r\n    // Should be implmented in subclasses\r\n  };\r\n\r\n  Dropdown.prototype.destroy = function () {\r\n    // Remove the dropdown from the DOM\r\n    this.$dropdown.remove();\r\n  };\r\n\r\n  return Dropdown;\r\n});\r\n\r\nS2.define('select2/dropdown/search',[\r\n  'jquery',\r\n  '../utils'\r\n], function ($, Utils) {\r\n  function Search () { }\r\n\r\n  Search.prototype.render = function (decorated) {\r\n    var $rendered = decorated.call(this);\r\n\r\n    var $search = $(\r\n      '<span class=\"select2-search select2-search--dropdown\">' +\r\n        '<input class=\"select2-search__field\" type=\"search\" tabindex=\"-1\"' +\r\n        ' autocomplete=\"off\" autocorrect=\"off\" autocapitalize=\"none\"' +\r\n        ' spellcheck=\"false\" role=\"textbox\" />' +\r\n      '</span>'\r\n    );\r\n\r\n    this.$searchContainer = $search;\r\n    this.$search = $search.find('input');\r\n\r\n    $rendered.prepend($search);\r\n\r\n    return $rendered;\r\n  };\r\n\r\n  Search.prototype.bind = function (decorated, container, $container) {\r\n    var self = this;\r\n\r\n    decorated.call(this, container, $container);\r\n\r\n    this.$search.on('keydown', function (evt) {\r\n      self.trigger('keypress', evt);\r\n\r\n      self._keyUpPrevented = evt.isDefaultPrevented();\r\n    });\r\n\r\n    // Workaround for browsers which do not support the `input` event\r\n    // This will prevent double-triggering of events for browsers which support\r\n    // both the `keyup` and `input` events.\r\n    this.$search.on('input', function (evt) {\r\n      // Unbind the duplicated `keyup` event\r\n      $(this).off('keyup');\r\n    });\r\n\r\n    this.$search.on('keyup input', function (evt) {\r\n      self.handleSearch(evt);\r\n    });\r\n\r\n    container.on('open', function () {\r\n      self.$search.attr('tabindex', 0);\r\n\r\n      self.$search.focus();\r\n\r\n      window.setTimeout(function () {\r\n        self.$search.focus();\r\n      }, 0);\r\n    });\r\n\r\n    container.on('close', function () {\r\n      self.$search.attr('tabindex', -1);\r\n\r\n      self.$search.val('');\r\n      self.$search.blur();\r\n    });\r\n\r\n    container.on('focus', function () {\r\n      if (!container.isOpen()) {\r\n        self.$search.focus();\r\n      }\r\n    });\r\n\r\n    container.on('results:all', function (params) {\r\n      if (params.query.term == null || params.query.term === '') {\r\n        var showSearch = self.showSearch(params);\r\n\r\n        if (showSearch) {\r\n          self.$searchContainer.removeClass('select2-search--hide');\r\n        } else {\r\n          self.$searchContainer.addClass('select2-search--hide');\r\n        }\r\n      }\r\n    });\r\n  };\r\n\r\n  Search.prototype.handleSearch = function (evt) {\r\n    if (!this._keyUpPrevented) {\r\n      var input = this.$search.val();\r\n\r\n      this.trigger('query', {\r\n        term: input\r\n      });\r\n    }\r\n\r\n    this._keyUpPrevented = false;\r\n  };\r\n\r\n  Search.prototype.showSearch = function (_, params) {\r\n    return true;\r\n  };\r\n\r\n  return Search;\r\n});\r\n\r\nS2.define('select2/dropdown/hidePlaceholder',[\r\n\r\n], function () {\r\n  function HidePlaceholder (decorated, $element, options, dataAdapter) {\r\n    this.placeholder = this.normalizePlaceholder(options.get('placeholder'));\r\n\r\n    decorated.call(this, $element, options, dataAdapter);\r\n  }\r\n\r\n  HidePlaceholder.prototype.append = function (decorated, data) {\r\n    data.results = this.removePlaceholder(data.results);\r\n\r\n    decorated.call(this, data);\r\n  };\r\n\r\n  HidePlaceholder.prototype.normalizePlaceholder = function (_, placeholder) {\r\n    if (typeof placeholder === 'string') {\r\n      placeholder = {\r\n        id: '',\r\n        text: placeholder\r\n      };\r\n    }\r\n\r\n    return placeholder;\r\n  };\r\n\r\n  HidePlaceholder.prototype.removePlaceholder = function (_, data) {\r\n    var modifiedData = data.slice(0);\r\n\r\n    for (var d = data.length - 1; d >= 0; d--) {\r\n      var item = data[d];\r\n\r\n      if (this.placeholder.id === item.id) {\r\n        modifiedData.splice(d, 1);\r\n      }\r\n    }\r\n\r\n    return modifiedData;\r\n  };\r\n\r\n  return HidePlaceholder;\r\n});\r\n\r\nS2.define('select2/dropdown/infiniteScroll',[\r\n  'jquery'\r\n], function ($) {\r\n  function InfiniteScroll (decorated, $element, options, dataAdapter) {\r\n    this.lastParams = {};\r\n\r\n    decorated.call(this, $element, options, dataAdapter);\r\n\r\n    this.$loadingMore = this.createLoadingMore();\r\n    this.loading = false;\r\n  }\r\n\r\n  InfiniteScroll.prototype.append = function (decorated, data) {\r\n    this.$loadingMore.remove();\r\n    this.loading = false;\r\n\r\n    decorated.call(this, data);\r\n\r\n    if (this.showLoadingMore(data)) {\r\n      this.$results.append(this.$loadingMore);\r\n    }\r\n  };\r\n\r\n  InfiniteScroll.prototype.bind = function (decorated, container, $container) {\r\n    var self = this;\r\n\r\n    decorated.call(this, container, $container);\r\n\r\n    container.on('query', function (params) {\r\n      self.lastParams = params;\r\n      self.loading = true;\r\n    });\r\n\r\n    container.on('query:append', function (params) {\r\n      self.lastParams = params;\r\n      self.loading = true;\r\n    });\r\n\r\n    this.$results.on('scroll', function () {\r\n      var isLoadMoreVisible = $.contains(\r\n        document.documentElement,\r\n        self.$loadingMore[0]\r\n      );\r\n\r\n      if (self.loading || !isLoadMoreVisible) {\r\n        return;\r\n      }\r\n\r\n      var currentOffset = self.$results.offset().top +\r\n        self.$results.outerHeight(false);\r\n      var loadingMoreOffset = self.$loadingMore.offset().top +\r\n        self.$loadingMore.outerHeight(false);\r\n\r\n      if (currentOffset + 50 >= loadingMoreOffset) {\r\n        self.loadMore();\r\n      }\r\n    });\r\n  };\r\n\r\n  InfiniteScroll.prototype.loadMore = function () {\r\n    this.loading = true;\r\n\r\n    var params = $.extend({}, {page: 1}, this.lastParams);\r\n\r\n    params.page++;\r\n\r\n    this.trigger('query:append', params);\r\n  };\r\n\r\n  InfiniteScroll.prototype.showLoadingMore = function (_, data) {\r\n    return data.pagination && data.pagination.more;\r\n  };\r\n\r\n  InfiniteScroll.prototype.createLoadingMore = function () {\r\n    var $option = $(\r\n      '<li ' +\r\n      'class=\"select2-results__option select2-results__option--load-more\"' +\r\n      'role=\"treeitem\" aria-disabled=\"true\"></li>'\r\n    );\r\n\r\n    var message = this.options.get('translations').get('loadingMore');\r\n\r\n    $option.html(message(this.lastParams));\r\n\r\n    return $option;\r\n  };\r\n\r\n  return InfiniteScroll;\r\n});\r\n\r\nS2.define('select2/dropdown/attachBody',[\r\n  'jquery',\r\n  '../utils'\r\n], function ($, Utils) {\r\n  function AttachBody (decorated, $element, options) {\r\n    this.$dropdownParent = options.get('dropdownParent') || $(document.body);\r\n\r\n    decorated.call(this, $element, options);\r\n  }\r\n\r\n  AttachBody.prototype.bind = function (decorated, container, $container) {\r\n    var self = this;\r\n\r\n    var setupResultsEvents = false;\r\n\r\n    decorated.call(this, container, $container);\r\n\r\n    container.on('open', function () {\r\n      self._showDropdown();\r\n      self._attachPositioningHandler(container);\r\n\r\n      if (!setupResultsEvents) {\r\n        setupResultsEvents = true;\r\n\r\n        container.on('results:all', function () {\r\n          self._positionDropdown();\r\n          self._resizeDropdown();\r\n        });\r\n\r\n        container.on('results:append', function () {\r\n          self._positionDropdown();\r\n          self._resizeDropdown();\r\n        });\r\n      }\r\n    });\r\n\r\n    container.on('close', function () {\r\n      self._hideDropdown();\r\n      self._detachPositioningHandler(container);\r\n    });\r\n\r\n    this.$dropdownContainer.on('mousedown', function (evt) {\r\n      evt.stopPropagation();\r\n    });\r\n  };\r\n\r\n  AttachBody.prototype.destroy = function (decorated) {\r\n    decorated.call(this);\r\n\r\n    this.$dropdownContainer.remove();\r\n  };\r\n\r\n  AttachBody.prototype.position = function (decorated, $dropdown, $container) {\r\n    // Clone all of the container classes\r\n    $dropdown.attr('class', $container.attr('class'));\r\n\r\n    $dropdown.removeClass('select2');\r\n    $dropdown.addClass('select2-container--open');\r\n\r\n    $dropdown.css({\r\n      position: 'absolute',\r\n      top: -999999\r\n    });\r\n\r\n    this.$container = $container;\r\n  };\r\n\r\n  AttachBody.prototype.render = function (decorated) {\r\n    var $container = $('<span></span>');\r\n\r\n    var $dropdown = decorated.call(this);\r\n    $container.append($dropdown);\r\n\r\n    this.$dropdownContainer = $container;\r\n\r\n    return $container;\r\n  };\r\n\r\n  AttachBody.prototype._hideDropdown = function (decorated) {\r\n    this.$dropdownContainer.detach();\r\n  };\r\n\r\n  AttachBody.prototype._attachPositioningHandler =\r\n      function (decorated, container) {\r\n    var self = this;\r\n\r\n    var scrollEvent = 'scroll.select2.' + container.id;\r\n    var resizeEvent = 'resize.select2.' + container.id;\r\n    var orientationEvent = 'orientationchange.select2.' + container.id;\r\n\r\n    var $watchers = this.$container.parents().filter(Utils.hasScroll);\r\n    $watchers.each(function () {\r\n      Utils.StoreData(this, 'select2-scroll-position', {\r\n        x: $(this).scrollLeft(),\r\n        y: $(this).scrollTop()\r\n      });\r\n    });\r\n\r\n    $watchers.on(scrollEvent, function (ev) {\r\n      var position = Utils.GetData(this, 'select2-scroll-position');\r\n      $(this).scrollTop(position.y);\r\n    });\r\n\r\n    $(window).on(scrollEvent + ' ' + resizeEvent + ' ' + orientationEvent,\r\n      function (e) {\r\n      self._positionDropdown();\r\n      self._resizeDropdown();\r\n    });\r\n  };\r\n\r\n  AttachBody.prototype._detachPositioningHandler =\r\n      function (decorated, container) {\r\n    var scrollEvent = 'scroll.select2.' + container.id;\r\n    var resizeEvent = 'resize.select2.' + container.id;\r\n    var orientationEvent = 'orientationchange.select2.' + container.id;\r\n\r\n    var $watchers = this.$container.parents().filter(Utils.hasScroll);\r\n    $watchers.off(scrollEvent);\r\n\r\n    $(window).off(scrollEvent + ' ' + resizeEvent + ' ' + orientationEvent);\r\n  };\r\n\r\n  AttachBody.prototype._positionDropdown = function () {\r\n    var $window = $(window);\r\n\r\n    var isCurrentlyAbove = this.$dropdown.hasClass('select2-dropdown--above');\r\n    var isCurrentlyBelow = this.$dropdown.hasClass('select2-dropdown--below');\r\n\r\n    var newDirection = null;\r\n\r\n    var offset = this.$container.offset();\r\n\r\n    offset.bottom = offset.top + this.$container.outerHeight(false);\r\n\r\n    var container = {\r\n      height: this.$container.outerHeight(false)\r\n    };\r\n\r\n    container.top = offset.top;\r\n    container.bottom = offset.top + container.height;\r\n\r\n    var dropdown = {\r\n      height: this.$dropdown.outerHeight(false)\r\n    };\r\n\r\n    var viewport = {\r\n      top: $window.scrollTop(),\r\n      bottom: $window.scrollTop() + $window.height()\r\n    };\r\n\r\n    var enoughRoomAbove = viewport.top < (offset.top - dropdown.height);\r\n    var enoughRoomBelow = viewport.bottom > (offset.bottom + dropdown.height);\r\n\r\n    var css = {\r\n      left: offset.left,\r\n      top: container.bottom\r\n    };\r\n\r\n    // Determine what the parent element is to use for calciulating the offset\r\n    var $offsetParent = this.$dropdownParent;\r\n\r\n    // For statically positoned elements, we need to get the element\r\n    // that is determining the offset\r\n    if ($offsetParent.css('position') === 'static') {\r\n      $offsetParent = $offsetParent.offsetParent();\r\n    }\r\n\r\n    var parentOffset = $offsetParent.offset();\r\n\r\n    css.top -= parentOffset.top;\r\n    css.left -= parentOffset.left;\r\n\r\n    if (!isCurrentlyAbove && !isCurrentlyBelow) {\r\n      newDirection = 'below';\r\n    }\r\n\r\n    if (!enoughRoomBelow && enoughRoomAbove && !isCurrentlyAbove) {\r\n      newDirection = 'above';\r\n    } else if (!enoughRoomAbove && enoughRoomBelow && isCurrentlyAbove) {\r\n      newDirection = 'below';\r\n    }\r\n\r\n    if (newDirection == 'above' ||\r\n      (isCurrentlyAbove && newDirection !== 'below')) {\r\n      css.top = container.top - parentOffset.top - dropdown.height;\r\n    }\r\n\r\n    if (newDirection != null) {\r\n      this.$dropdown\r\n        .removeClass('select2-dropdown--below select2-dropdown--above')\r\n        .addClass('select2-dropdown--' + newDirection);\r\n      this.$container\r\n        .removeClass('select2-container--below select2-container--above')\r\n        .addClass('select2-container--' + newDirection);\r\n    }\r\n\r\n    this.$dropdownContainer.css(css);\r\n  };\r\n\r\n  AttachBody.prototype._resizeDropdown = function () {\r\n    var css = {\r\n      width: this.$container.outerWidth(false) + 'px'\r\n    };\r\n\r\n    if (this.options.get('dropdownAutoWidth')) {\r\n      css.minWidth = css.width;\r\n      css.position = 'relative';\r\n      css.width = 'auto';\r\n    }\r\n\r\n    this.$dropdown.css(css);\r\n  };\r\n\r\n  AttachBody.prototype._showDropdown = function (decorated) {\r\n    this.$dropdownContainer.appendTo(this.$dropdownParent);\r\n\r\n    this._positionDropdown();\r\n    this._resizeDropdown();\r\n  };\r\n\r\n  return AttachBody;\r\n});\r\n\r\nS2.define('select2/dropdown/minimumResultsForSearch',[\r\n\r\n], function () {\r\n  function countResults (data) {\r\n    var count = 0;\r\n\r\n    for (var d = 0; d < data.length; d++) {\r\n      var item = data[d];\r\n\r\n      if (item.children) {\r\n        count += countResults(item.children);\r\n      } else {\r\n        count++;\r\n      }\r\n    }\r\n\r\n    return count;\r\n  }\r\n\r\n  function MinimumResultsForSearch (decorated, $element, options, dataAdapter) {\r\n    this.minimumResultsForSearch = options.get('minimumResultsForSearch');\r\n\r\n    if (this.minimumResultsForSearch < 0) {\r\n      this.minimumResultsForSearch = Infinity;\r\n    }\r\n\r\n    decorated.call(this, $element, options, dataAdapter);\r\n  }\r\n\r\n  MinimumResultsForSearch.prototype.showSearch = function (decorated, params) {\r\n    if (countResults(params.data.results) < this.minimumResultsForSearch) {\r\n      return false;\r\n    }\r\n\r\n    return decorated.call(this, params);\r\n  };\r\n\r\n  return MinimumResultsForSearch;\r\n});\r\n\r\nS2.define('select2/dropdown/selectOnClose',[\r\n  '../utils'\r\n], function (Utils) {\r\n  function SelectOnClose () { }\r\n\r\n  SelectOnClose.prototype.bind = function (decorated, container, $container) {\r\n    var self = this;\r\n\r\n    decorated.call(this, container, $container);\r\n\r\n    container.on('close', function (params) {\r\n      self._handleSelectOnClose(params);\r\n    });\r\n  };\r\n\r\n  SelectOnClose.prototype._handleSelectOnClose = function (_, params) {\r\n    if (params && params.originalSelect2Event != null) {\r\n      var event = params.originalSelect2Event;\r\n\r\n      // Don't select an item if the close event was triggered from a select or\r\n      // unselect event\r\n      if (event._type === 'select' || event._type === 'unselect') {\r\n        return;\r\n      }\r\n    }\r\n\r\n    var $highlightedResults = this.getHighlightedResults();\r\n\r\n    // Only select highlighted results\r\n    if ($highlightedResults.length < 1) {\r\n      return;\r\n    }\r\n\r\n    var data = Utils.GetData($highlightedResults[0], 'data');\r\n\r\n    // Don't re-select already selected resulte\r\n    if (\r\n      (data.element != null && data.element.selected) ||\r\n      (data.element == null && data.selected)\r\n    ) {\r\n      return;\r\n    }\r\n\r\n    this.trigger('select', {\r\n        data: data\r\n    });\r\n  };\r\n\r\n  return SelectOnClose;\r\n});\r\n\r\nS2.define('select2/dropdown/closeOnSelect',[\r\n\r\n], function () {\r\n  function CloseOnSelect () { }\r\n\r\n  CloseOnSelect.prototype.bind = function (decorated, container, $container) {\r\n    var self = this;\r\n\r\n    decorated.call(this, container, $container);\r\n\r\n    container.on('select', function (evt) {\r\n      self._selectTriggered(evt);\r\n    });\r\n\r\n    container.on('unselect', function (evt) {\r\n      self._selectTriggered(evt);\r\n    });\r\n  };\r\n\r\n  CloseOnSelect.prototype._selectTriggered = function (_, evt) {\r\n    var originalEvent = evt.originalEvent;\r\n\r\n    // Don't close if the control key is being held\r\n    if (originalEvent && originalEvent.ctrlKey) {\r\n      return;\r\n    }\r\n\r\n    this.trigger('close', {\r\n      originalEvent: originalEvent,\r\n      originalSelect2Event: evt\r\n    });\r\n  };\r\n\r\n  return CloseOnSelect;\r\n});\r\n\r\nS2.define('select2/i18n/en',[],function () {\r\n  // English\r\n  return {\r\n    errorLoading: function () {\r\n      return 'The results could not be loaded.';\r\n    },\r\n    inputTooLong: function (args) {\r\n      var overChars = args.input.length - args.maximum;\r\n\r\n      var message = 'Please delete ' + overChars + ' character';\r\n\r\n      if (overChars != 1) {\r\n        message += 's';\r\n      }\r\n\r\n      return message;\r\n    },\r\n    inputTooShort: function (args) {\r\n      var remainingChars = args.minimum - args.input.length;\r\n\r\n      var message = 'Please enter ' + remainingChars + ' or more characters';\r\n\r\n      return message;\r\n    },\r\n    loadingMore: function () {\r\n      return 'Loading more results…';\r\n    },\r\n    maximumSelected: function (args) {\r\n      var message = 'You can only select ' + args.maximum + ' item';\r\n\r\n      if (args.maximum != 1) {\r\n        message += 's';\r\n      }\r\n\r\n      return message;\r\n    },\r\n    noResults: function () {\r\n      return 'No results found';\r\n    },\r\n    searching: function () {\r\n      return 'Searching…';\r\n    }\r\n  };\r\n});\r\n\r\nS2.define('select2/defaults',[\r\n  'jquery',\r\n  'require',\r\n\r\n  './results',\r\n\r\n  './selection/single',\r\n  './selection/multiple',\r\n  './selection/placeholder',\r\n  './selection/allowClear',\r\n  './selection/search',\r\n  './selection/eventRelay',\r\n\r\n  './utils',\r\n  './translation',\r\n  './diacritics',\r\n\r\n  './data/select',\r\n  './data/array',\r\n  './data/ajax',\r\n  './data/tags',\r\n  './data/tokenizer',\r\n  './data/minimumInputLength',\r\n  './data/maximumInputLength',\r\n  './data/maximumSelectionLength',\r\n\r\n  './dropdown',\r\n  './dropdown/search',\r\n  './dropdown/hidePlaceholder',\r\n  './dropdown/infiniteScroll',\r\n  './dropdown/attachBody',\r\n  './dropdown/minimumResultsForSearch',\r\n  './dropdown/selectOnClose',\r\n  './dropdown/closeOnSelect',\r\n\r\n  './i18n/en'\r\n], function ($, require,\r\n\r\n             ResultsList,\r\n\r\n             SingleSelection, MultipleSelection, Placeholder, AllowClear,\r\n             SelectionSearch, EventRelay,\r\n\r\n             Utils, Translation, DIACRITICS,\r\n\r\n             SelectData, ArrayData, AjaxData, Tags, Tokenizer,\r\n             MinimumInputLength, MaximumInputLength, MaximumSelectionLength,\r\n\r\n             Dropdown, DropdownSearch, HidePlaceholder, InfiniteScroll,\r\n             AttachBody, MinimumResultsForSearch, SelectOnClose, CloseOnSelect,\r\n\r\n             EnglishTranslation) {\r\n  function Defaults () {\r\n    this.reset();\r\n  }\r\n\r\n  Defaults.prototype.apply = function (options) {\r\n    options = $.extend(true, {}, this.defaults, options);\r\n\r\n    if (options.dataAdapter == null) {\r\n      if (options.ajax != null) {\r\n        options.dataAdapter = AjaxData;\r\n      } else if (options.data != null) {\r\n        options.dataAdapter = ArrayData;\r\n      } else {\r\n        options.dataAdapter = SelectData;\r\n      }\r\n\r\n      if (options.minimumInputLength > 0) {\r\n        options.dataAdapter = Utils.Decorate(\r\n          options.dataAdapter,\r\n          MinimumInputLength\r\n        );\r\n      }\r\n\r\n      if (options.maximumInputLength > 0) {\r\n        options.dataAdapter = Utils.Decorate(\r\n          options.dataAdapter,\r\n          MaximumInputLength\r\n        );\r\n      }\r\n\r\n      if (options.maximumSelectionLength > 0) {\r\n        options.dataAdapter = Utils.Decorate(\r\n          options.dataAdapter,\r\n          MaximumSelectionLength\r\n        );\r\n      }\r\n\r\n      if (options.tags) {\r\n        options.dataAdapter = Utils.Decorate(options.dataAdapter, Tags);\r\n      }\r\n\r\n      if (options.tokenSeparators != null || options.tokenizer != null) {\r\n        options.dataAdapter = Utils.Decorate(\r\n          options.dataAdapter,\r\n          Tokenizer\r\n        );\r\n      }\r\n\r\n      if (options.query != null) {\r\n        var Query = require(options.amdBase + 'compat/query');\r\n\r\n        options.dataAdapter = Utils.Decorate(\r\n          options.dataAdapter,\r\n          Query\r\n        );\r\n      }\r\n\r\n      if (options.initSelection != null) {\r\n        var InitSelection = require(options.amdBase + 'compat/initSelection');\r\n\r\n        options.dataAdapter = Utils.Decorate(\r\n          options.dataAdapter,\r\n          InitSelection\r\n        );\r\n      }\r\n    }\r\n\r\n    if (options.resultsAdapter == null) {\r\n      options.resultsAdapter = ResultsList;\r\n\r\n      if (options.ajax != null) {\r\n        options.resultsAdapter = Utils.Decorate(\r\n          options.resultsAdapter,\r\n          InfiniteScroll\r\n        );\r\n      }\r\n\r\n      if (options.placeholder != null) {\r\n        options.resultsAdapter = Utils.Decorate(\r\n          options.resultsAdapter,\r\n          HidePlaceholder\r\n        );\r\n      }\r\n\r\n      if (options.selectOnClose) {\r\n        options.resultsAdapter = Utils.Decorate(\r\n          options.resultsAdapter,\r\n          SelectOnClose\r\n        );\r\n      }\r\n    }\r\n\r\n    if (options.dropdownAdapter == null) {\r\n      if (options.multiple) {\r\n        options.dropdownAdapter = Dropdown;\r\n      } else {\r\n        var SearchableDropdown = Utils.Decorate(Dropdown, DropdownSearch);\r\n\r\n        options.dropdownAdapter = SearchableDropdown;\r\n      }\r\n\r\n      if (options.minimumResultsForSearch !== 0) {\r\n        options.dropdownAdapter = Utils.Decorate(\r\n          options.dropdownAdapter,\r\n          MinimumResultsForSearch\r\n        );\r\n      }\r\n\r\n      if (options.closeOnSelect) {\r\n        options.dropdownAdapter = Utils.Decorate(\r\n          options.dropdownAdapter,\r\n          CloseOnSelect\r\n        );\r\n      }\r\n\r\n      if (\r\n        options.dropdownCssClass != null ||\r\n        options.dropdownCss != null ||\r\n        options.adaptDropdownCssClass != null\r\n      ) {\r\n        var DropdownCSS = require(options.amdBase + 'compat/dropdownCss');\r\n\r\n        options.dropdownAdapter = Utils.Decorate(\r\n          options.dropdownAdapter,\r\n          DropdownCSS\r\n        );\r\n      }\r\n\r\n      options.dropdownAdapter = Utils.Decorate(\r\n        options.dropdownAdapter,\r\n        AttachBody\r\n      );\r\n    }\r\n\r\n    if (options.selectionAdapter == null) {\r\n      if (options.multiple) {\r\n        options.selectionAdapter = MultipleSelection;\r\n      } else {\r\n        options.selectionAdapter = SingleSelection;\r\n      }\r\n\r\n      // Add the placeholder mixin if a placeholder was specified\r\n      if (options.placeholder != null) {\r\n        options.selectionAdapter = Utils.Decorate(\r\n          options.selectionAdapter,\r\n          Placeholder\r\n        );\r\n      }\r\n\r\n      if (options.allowClear) {\r\n        options.selectionAdapter = Utils.Decorate(\r\n          options.selectionAdapter,\r\n          AllowClear\r\n        );\r\n      }\r\n\r\n      if (options.multiple) {\r\n        options.selectionAdapter = Utils.Decorate(\r\n          options.selectionAdapter,\r\n          SelectionSearch\r\n        );\r\n      }\r\n\r\n      if (\r\n        options.containerCssClass != null ||\r\n        options.containerCss != null ||\r\n        options.adaptContainerCssClass != null\r\n      ) {\r\n        var ContainerCSS = require(options.amdBase + 'compat/containerCss');\r\n\r\n        options.selectionAdapter = Utils.Decorate(\r\n          options.selectionAdapter,\r\n          ContainerCSS\r\n        );\r\n      }\r\n\r\n      options.selectionAdapter = Utils.Decorate(\r\n        options.selectionAdapter,\r\n        EventRelay\r\n      );\r\n    }\r\n\r\n    if (typeof options.language === 'string') {\r\n      // Check if the language is specified with a region\r\n      if (options.language.indexOf('-') > 0) {\r\n        // Extract the region information if it is included\r\n        var languageParts = options.language.split('-');\r\n        var baseLanguage = languageParts[0];\r\n\r\n        options.language = [options.language, baseLanguage];\r\n      } else {\r\n        options.language = [options.language];\r\n      }\r\n    }\r\n\r\n    if ($.isArray(options.language)) {\r\n      var languages = new Translation();\r\n      options.language.push('en');\r\n\r\n      var languageNames = options.language;\r\n\r\n      for (var l = 0; l < languageNames.length; l++) {\r\n        var name = languageNames[l];\r\n        var language = {};\r\n\r\n        try {\r\n          // Try to load it with the original name\r\n          language = Translation.loadPath(name);\r\n        } catch (e) {\r\n          try {\r\n            // If we couldn't load it, check if it wasn't the full path\r\n            name = this.defaults.amdLanguageBase + name;\r\n            language = Translation.loadPath(name);\r\n          } catch (ex) {\r\n            // The translation could not be loaded at all. Sometimes this is\r\n            // because of a configuration problem, other times this can be\r\n            // because of how Select2 helps load all possible translation files.\r\n            if (options.debug && window.console && console.warn) {\r\n              console.warn(\r\n                'Select2: The language file for \"' + name + '\" could not be ' +\r\n                'automatically loaded. A fallback will be used instead.'\r\n              );\r\n            }\r\n\r\n            continue;\r\n          }\r\n        }\r\n\r\n        languages.extend(language);\r\n      }\r\n\r\n      options.translations = languages;\r\n    } else {\r\n      var baseTranslation = Translation.loadPath(\r\n        this.defaults.amdLanguageBase + 'en'\r\n      );\r\n      var customTranslation = new Translation(options.language);\r\n\r\n      customTranslation.extend(baseTranslation);\r\n\r\n      options.translations = customTranslation;\r\n    }\r\n\r\n    return options;\r\n  };\r\n\r\n  Defaults.prototype.reset = function () {\r\n    function stripDiacritics (text) {\r\n      // Used 'uni range + named function' from http://jsperf.com/diacritics/18\r\n      function match(a) {\r\n        return DIACRITICS[a] || a;\r\n      }\r\n\r\n      return text.replace(/[^\\u0000-\\u007E]/g, match);\r\n    }\r\n\r\n    function matcher (params, data) {\r\n      // Always return the object if there is nothing to compare\r\n      if ($.trim(params.term) === '') {\r\n        return data;\r\n      }\r\n\r\n      // Do a recursive check for options with children\r\n      if (data.children && data.children.length > 0) {\r\n        // Clone the data object if there are children\r\n        // This is required as we modify the object to remove any non-matches\r\n        var match = $.extend(true, {}, data);\r\n\r\n        // Check each child of the option\r\n        for (var c = data.children.length - 1; c >= 0; c--) {\r\n          var child = data.children[c];\r\n\r\n          var matches = matcher(params, child);\r\n\r\n          // If there wasn't a match, remove the object in the array\r\n          if (matches == null) {\r\n            match.children.splice(c, 1);\r\n          }\r\n        }\r\n\r\n        // If any children matched, return the new object\r\n        if (match.children.length > 0) {\r\n          return match;\r\n        }\r\n\r\n        // If there were no matching children, check just the plain object\r\n        return matcher(params, match);\r\n      }\r\n\r\n      var original = stripDiacritics(data.text).toUpperCase();\r\n      var term = stripDiacritics(params.term).toUpperCase();\r\n\r\n      // Check if the text contains the term\r\n      if (original.indexOf(term) > -1) {\r\n        return data;\r\n      }\r\n\r\n      // If it doesn't contain the term, don't return anything\r\n      return null;\r\n    }\r\n\r\n    this.defaults = {\r\n      amdBase: './',\r\n      amdLanguageBase: './i18n/',\r\n      closeOnSelect: true,\r\n      debug: false,\r\n      dropdownAutoWidth: false,\r\n      escapeMarkup: Utils.escapeMarkup,\r\n      language: EnglishTranslation,\r\n      matcher: matcher,\r\n      minimumInputLength: 0,\r\n      maximumInputLength: 0,\r\n      maximumSelectionLength: 0,\r\n      minimumResultsForSearch: 0,\r\n      selectOnClose: false,\r\n      sorter: function (data) {\r\n        return data;\r\n      },\r\n      templateResult: function (result) {\r\n        return result.text;\r\n      },\r\n      templateSelection: function (selection) {\r\n        return selection.text;\r\n      },\r\n      theme: 'default',\r\n      width: 'resolve'\r\n    };\r\n  };\r\n\r\n  Defaults.prototype.set = function (key, value) {\r\n    var camelKey = $.camelCase(key);\r\n\r\n    var data = {};\r\n    data[camelKey] = value;\r\n\r\n    var convertedData = Utils._convertData(data);\r\n\r\n    $.extend(true, this.defaults, convertedData);\r\n  };\r\n\r\n  var defaults = new Defaults();\r\n\r\n  return defaults;\r\n});\r\n\r\nS2.define('select2/options',[\r\n  'require',\r\n  'jquery',\r\n  './defaults',\r\n  './utils'\r\n], function (require, $, Defaults, Utils) {\r\n  function Options (options, $element) {\r\n    this.options = options;\r\n\r\n    if ($element != null) {\r\n      this.fromElement($element);\r\n    }\r\n\r\n    this.options = Defaults.apply(this.options);\r\n\r\n    if ($element && $element.is('input')) {\r\n      var InputCompat = require(this.get('amdBase') + 'compat/inputData');\r\n\r\n      this.options.dataAdapter = Utils.Decorate(\r\n        this.options.dataAdapter,\r\n        InputCompat\r\n      );\r\n    }\r\n  }\r\n\r\n  Options.prototype.fromElement = function ($e) {\r\n    var excludedData = ['select2'];\r\n\r\n    if (this.options.multiple == null) {\r\n      this.options.multiple = $e.prop('multiple');\r\n    }\r\n\r\n    if (this.options.disabled == null) {\r\n      this.options.disabled = $e.prop('disabled');\r\n    }\r\n\r\n    if (this.options.language == null) {\r\n      if ($e.prop('lang')) {\r\n        this.options.language = $e.prop('lang').toLowerCase();\r\n      } else if ($e.closest('[lang]').prop('lang')) {\r\n        this.options.language = $e.closest('[lang]').prop('lang');\r\n      }\r\n    }\r\n\r\n    if (this.options.dir == null) {\r\n      if ($e.prop('dir')) {\r\n        this.options.dir = $e.prop('dir');\r\n      } else if ($e.closest('[dir]').prop('dir')) {\r\n        this.options.dir = $e.closest('[dir]').prop('dir');\r\n      } else {\r\n        this.options.dir = 'ltr';\r\n      }\r\n    }\r\n\r\n    $e.prop('disabled', this.options.disabled);\r\n    $e.prop('multiple', this.options.multiple);\r\n\r\n    if (Utils.GetData($e[0], 'select2Tags')) {\r\n      if (this.options.debug && window.console && console.warn) {\r\n        console.warn(\r\n          'Select2: The `data-select2-tags` attribute has been changed to ' +\r\n          'use the `data-data` and `data-tags=\"true\"` attributes and will be ' +\r\n          'removed in future versions of Select2.'\r\n        );\r\n      }\r\n\r\n      Utils.StoreData($e[0], 'data', Utils.GetData($e[0], 'select2Tags'));\r\n      Utils.StoreData($e[0], 'tags', true);\r\n    }\r\n\r\n    if (Utils.GetData($e[0], 'ajaxUrl')) {\r\n      if (this.options.debug && window.console && console.warn) {\r\n        console.warn(\r\n          'Select2: The `data-ajax-url` attribute has been changed to ' +\r\n          '`data-ajax--url` and support for the old attribute will be removed' +\r\n          ' in future versions of Select2.'\r\n        );\r\n      }\r\n\r\n      $e.attr('ajax--url', Utils.GetData($e[0], 'ajaxUrl'));\r\n      Utils.StoreData($e[0], 'ajax-Url', Utils.GetData($e[0], 'ajaxUrl'));\r\n\t  \r\n    }\r\n\r\n    var dataset = {};\r\n\r\n    // Prefer the element's `dataset` attribute if it exists\r\n    // jQuery 1.x does not correctly handle data attributes with multiple dashes\r\n    if ($.fn.jquery && $.fn.jquery.substr(0, 2) == '1.' && $e[0].dataset) {\r\n      dataset = $.extend(true, {}, $e[0].dataset, Utils.GetData($e[0]));\r\n    } else {\r\n      dataset = Utils.GetData($e[0]);\r\n    }\r\n\r\n    var data = $.extend(true, {}, dataset);\r\n\r\n    data = Utils._convertData(data);\r\n\r\n    for (var key in data) {\r\n      if ($.inArray(key, excludedData) > -1) {\r\n        continue;\r\n      }\r\n\r\n      if ($.isPlainObject(this.options[key])) {\r\n        $.extend(this.options[key], data[key]);\r\n      } else {\r\n        this.options[key] = data[key];\r\n      }\r\n    }\r\n\r\n    return this;\r\n  };\r\n\r\n  Options.prototype.get = function (key) {\r\n    return this.options[key];\r\n  };\r\n\r\n  Options.prototype.set = function (key, val) {\r\n    this.options[key] = val;\r\n  };\r\n\r\n  return Options;\r\n});\r\n\r\nS2.define('select2/core',[\r\n  'jquery',\r\n  './options',\r\n  './utils',\r\n  './keys'\r\n], function ($, Options, Utils, KEYS) {\r\n  var Select2 = function ($element, options) {\r\n    if (Utils.GetData($element[0], 'select2') != null) {\r\n      Utils.GetData($element[0], 'select2').destroy();\r\n    }\r\n\r\n    this.$element = $element;\r\n\r\n    this.id = this._generateId($element);\r\n\r\n    options = options || {};\r\n\r\n    this.options = new Options(options, $element);\r\n\r\n    Select2.__super__.constructor.call(this);\r\n\r\n    // Set up the tabindex\r\n\r\n    var tabindex = $element.attr('tabindex') || 0;\r\n    Utils.StoreData($element[0], 'old-tabindex', tabindex);\r\n    $element.attr('tabindex', '-1');\r\n\r\n    // Set up containers and adapters\r\n\r\n    var DataAdapter = this.options.get('dataAdapter');\r\n    this.dataAdapter = new DataAdapter($element, this.options);\r\n\r\n    var $container = this.render();\r\n\r\n    this._placeContainer($container);\r\n\r\n    var SelectionAdapter = this.options.get('selectionAdapter');\r\n    this.selection = new SelectionAdapter($element, this.options);\r\n    this.$selection = this.selection.render();\r\n\r\n    this.selection.position(this.$selection, $container);\r\n\r\n    var DropdownAdapter = this.options.get('dropdownAdapter');\r\n    this.dropdown = new DropdownAdapter($element, this.options);\r\n    this.$dropdown = this.dropdown.render();\r\n\r\n    this.dropdown.position(this.$dropdown, $container);\r\n\r\n    var ResultsAdapter = this.options.get('resultsAdapter');\r\n    this.results = new ResultsAdapter($element, this.options, this.dataAdapter);\r\n    this.$results = this.results.render();\r\n\r\n    this.results.position(this.$results, this.$dropdown);\r\n\r\n    // Bind events\r\n\r\n    var self = this;\r\n\r\n    // Bind the container to all of the adapters\r\n    this._bindAdapters();\r\n\r\n    // Register any DOM event handlers\r\n    this._registerDomEvents();\r\n\r\n    // Register any internal event handlers\r\n    this._registerDataEvents();\r\n    this._registerSelectionEvents();\r\n    this._registerDropdownEvents();\r\n    this._registerResultsEvents();\r\n    this._registerEvents();\r\n\r\n    // Set the initial state\r\n    this.dataAdapter.current(function (initialData) {\r\n      self.trigger('selection:update', {\r\n        data: initialData\r\n      });\r\n    });\r\n\r\n    // Hide the original select\r\n    $element.addClass('select2-hidden-accessible');\r\n    $element.attr('aria-hidden', 'true');\r\n\r\n    // Synchronize any monitored attributes\r\n    this._syncAttributes();\r\n\r\n    Utils.StoreData($element[0], 'select2', this);\r\n\r\n    // Ensure backwards compatibility with $element.data('select2').\r\n    $element.data('select2', this);\r\n  };\r\n\r\n  Utils.Extend(Select2, Utils.Observable);\r\n\r\n  Select2.prototype._generateId = function ($element) {\r\n    var id = '';\r\n\r\n    if ($element.attr('id') != null) {\r\n      id = $element.attr('id');\r\n    } else if ($element.attr('name') != null) {\r\n      id = $element.attr('name') + '-' + Utils.generateChars(2);\r\n    } else {\r\n      id = Utils.generateChars(4);\r\n    }\r\n\r\n    id = id.replace(/(:|\\.|\\[|\\]|,)/g, '');\r\n    id = 'select2-' + id;\r\n\r\n    return id;\r\n  };\r\n\r\n  Select2.prototype._placeContainer = function ($container) {\r\n    $container.insertAfter(this.$element);\r\n\r\n    var width = this._resolveWidth(this.$element, this.options.get('width'));\r\n\r\n    if (width != null) {\r\n      $container.css('width', width);\r\n    }\r\n  };\r\n\r\n  Select2.prototype._resolveWidth = function ($element, method) {\r\n    var WIDTH = /^width:(([-+]?([0-9]*\\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/i;\r\n\r\n    if (method == 'resolve') {\r\n      var styleWidth = this._resolveWidth($element, 'style');\r\n\r\n      if (styleWidth != null) {\r\n        return styleWidth;\r\n      }\r\n\r\n      return this._resolveWidth($element, 'element');\r\n    }\r\n\r\n    if (method == 'element') {\r\n      var elementWidth = $element.outerWidth(false);\r\n\r\n      if (elementWidth <= 0) {\r\n        return 'auto';\r\n      }\r\n\r\n      return elementWidth + 'px';\r\n    }\r\n\r\n    if (method == 'style') {\r\n      var style = $element.attr('style');\r\n\r\n      if (typeof(style) !== 'string') {\r\n        return null;\r\n      }\r\n\r\n      var attrs = style.split(';');\r\n\r\n      for (var i = 0, l = attrs.length; i < l; i = i + 1) {\r\n        var attr = attrs[i].replace(/\\s/g, '');\r\n        var matches = attr.match(WIDTH);\r\n\r\n        if (matches !== null && matches.length >= 1) {\r\n          return matches[1];\r\n        }\r\n      }\r\n\r\n      return null;\r\n    }\r\n\r\n    return method;\r\n  };\r\n\r\n  Select2.prototype._bindAdapters = function () {\r\n    this.dataAdapter.bind(this, this.$container);\r\n    this.selection.bind(this, this.$container);\r\n\r\n    this.dropdown.bind(this, this.$container);\r\n    this.results.bind(this, this.$container);\r\n  };\r\n\r\n  Select2.prototype._registerDomEvents = function () {\r\n    var self = this;\r\n\r\n    this.$element.on('change.select2', function () {\r\n      self.dataAdapter.current(function (data) {\r\n        self.trigger('selection:update', {\r\n          data: data\r\n        });\r\n      });\r\n    });\r\n\r\n    this.$element.on('focus.select2', function (evt) {\r\n      self.trigger('focus', evt);\r\n    });\r\n\r\n    this._syncA = Utils.bind(this._syncAttributes, this);\r\n    this._syncS = Utils.bind(this._syncSubtree, this);\r\n\r\n    if (this.$element[0].attachEvent) {\r\n      this.$element[0].attachEvent('onpropertychange', this._syncA);\r\n    }\r\n\r\n    var observer = window.MutationObserver ||\r\n      window.WebKitMutationObserver ||\r\n      window.MozMutationObserver\r\n    ;\r\n\r\n    if (observer != null) {\r\n      this._observer = new observer(function (mutations) {\r\n        $.each(mutations, self._syncA);\r\n        $.each(mutations, self._syncS);\r\n      });\r\n      this._observer.observe(this.$element[0], {\r\n        attributes: true,\r\n        childList: true,\r\n        subtree: false\r\n      });\r\n    } else if (this.$element[0].addEventListener) {\r\n      this.$element[0].addEventListener(\r\n        'DOMAttrModified',\r\n        self._syncA,\r\n        false\r\n      );\r\n      this.$element[0].addEventListener(\r\n        'DOMNodeInserted',\r\n        self._syncS,\r\n        false\r\n      );\r\n      this.$element[0].addEventListener(\r\n        'DOMNodeRemoved',\r\n        self._syncS,\r\n        false\r\n      );\r\n    }\r\n  };\r\n\r\n  Select2.prototype._registerDataEvents = function () {\r\n    var self = this;\r\n\r\n    this.dataAdapter.on('*', function (name, params) {\r\n      self.trigger(name, params);\r\n    });\r\n  };\r\n\r\n  Select2.prototype._registerSelectionEvents = function () {\r\n    var self = this;\r\n    var nonRelayEvents = ['toggle', 'focus'];\r\n\r\n    this.selection.on('toggle', function () {\r\n      self.toggleDropdown();\r\n    });\r\n\r\n    this.selection.on('focus', function (params) {\r\n      self.focus(params);\r\n    });\r\n\r\n    this.selection.on('*', function (name, params) {\r\n      if ($.inArray(name, nonRelayEvents) !== -1) {\r\n        return;\r\n      }\r\n\r\n      self.trigger(name, params);\r\n    });\r\n  };\r\n\r\n  Select2.prototype._registerDropdownEvents = function () {\r\n    var self = this;\r\n\r\n    this.dropdown.on('*', function (name, params) {\r\n      self.trigger(name, params);\r\n    });\r\n  };\r\n\r\n  Select2.prototype._registerResultsEvents = function () {\r\n    var self = this;\r\n\r\n    this.results.on('*', function (name, params) {\r\n      self.trigger(name, params);\r\n    });\r\n  };\r\n\r\n  Select2.prototype._registerEvents = function () {\r\n    var self = this;\r\n\r\n    this.on('open', function () {\r\n      self.$container.addClass('select2-container--open');\r\n    });\r\n\r\n    this.on('close', function () {\r\n      self.$container.removeClass('select2-container--open');\r\n    });\r\n\r\n    this.on('enable', function () {\r\n      self.$container.removeClass('select2-container--disabled');\r\n    });\r\n\r\n    this.on('disable', function () {\r\n      self.$container.addClass('select2-container--disabled');\r\n    });\r\n\r\n    this.on('blur', function () {\r\n      self.$container.removeClass('select2-container--focus');\r\n    });\r\n\r\n    this.on('query', function (params) {\r\n      if (!self.isOpen()) {\r\n        self.trigger('open', {});\r\n      }\r\n\r\n      this.dataAdapter.query(params, function (data) {\r\n        self.trigger('results:all', {\r\n          data: data,\r\n          query: params\r\n        });\r\n      });\r\n    });\r\n\r\n    this.on('query:append', function (params) {\r\n      this.dataAdapter.query(params, function (data) {\r\n        self.trigger('results:append', {\r\n          data: data,\r\n          query: params\r\n        });\r\n      });\r\n    });\r\n\r\n    this.on('keypress', function (evt) {\r\n      var key = evt.which;\r\n\r\n      if (self.isOpen()) {\r\n        if (key === KEYS.ESC || key === KEYS.TAB ||\r\n            (key === KEYS.UP && evt.altKey)) {\r\n          self.close();\r\n\r\n          evt.preventDefault();\r\n        } else if (key === KEYS.ENTER) {\r\n          self.trigger('results:select', {});\r\n\r\n          evt.preventDefault();\r\n        } else if ((key === KEYS.SPACE && evt.ctrlKey)) {\r\n          self.trigger('results:toggle', {});\r\n\r\n          evt.preventDefault();\r\n        } else if (key === KEYS.UP) {\r\n          self.trigger('results:previous', {});\r\n\r\n          evt.preventDefault();\r\n        } else if (key === KEYS.DOWN) {\r\n          self.trigger('results:next', {});\r\n\r\n          evt.preventDefault();\r\n        }\r\n      } else {\r\n        if (key === KEYS.ENTER || key === KEYS.SPACE ||\r\n            (key === KEYS.DOWN && evt.altKey)) {\r\n          self.open();\r\n\r\n          evt.preventDefault();\r\n        }\r\n      }\r\n    });\r\n  };\r\n\r\n  Select2.prototype._syncAttributes = function () {\r\n    this.options.set('disabled', this.$element.prop('disabled'));\r\n\r\n    if (this.options.get('disabled')) {\r\n      if (this.isOpen()) {\r\n        this.close();\r\n      }\r\n\r\n      this.trigger('disable', {});\r\n    } else {\r\n      this.trigger('enable', {});\r\n    }\r\n  };\r\n\r\n  Select2.prototype._syncSubtree = function (evt, mutations) {\r\n    var changed = false;\r\n    var self = this;\r\n\r\n    // Ignore any mutation events raised for elements that aren't options or\r\n    // optgroups. This handles the case when the select element is destroyed\r\n    if (\r\n      evt && evt.target && (\r\n        evt.target.nodeName !== 'OPTION' && evt.target.nodeName !== 'OPTGROUP'\r\n      )\r\n    ) {\r\n      return;\r\n    }\r\n\r\n    if (!mutations) {\r\n      // If mutation events aren't supported, then we can only assume that the\r\n      // change affected the selections\r\n      changed = true;\r\n    } else if (mutations.addedNodes && mutations.addedNodes.length > 0) {\r\n      for (var n = 0; n < mutations.addedNodes.length; n++) {\r\n        var node = mutations.addedNodes[n];\r\n\r\n        if (node.selected) {\r\n          changed = true;\r\n        }\r\n      }\r\n    } else if (mutations.removedNodes && mutations.removedNodes.length > 0) {\r\n      changed = true;\r\n    }\r\n\r\n    // Only re-pull the data if we think there is a change\r\n    if (changed) {\r\n      this.dataAdapter.current(function (currentData) {\r\n        self.trigger('selection:update', {\r\n          data: currentData\r\n        });\r\n      });\r\n    }\r\n  };\r\n\r\n  /**\r\n   * Override the trigger method to automatically trigger pre-events when\r\n   * there are events that can be prevented.\r\n   */\r\n  Select2.prototype.trigger = function (name, args) {\r\n    var actualTrigger = Select2.__super__.trigger;\r\n    var preTriggerMap = {\r\n      'open': 'opening',\r\n      'close': 'closing',\r\n      'select': 'selecting',\r\n      'unselect': 'unselecting',\r\n      'clear': 'clearing'\r\n    };\r\n\r\n    if (args === undefined) {\r\n      args = {};\r\n    }\r\n\r\n    if (name in preTriggerMap) {\r\n      var preTriggerName = preTriggerMap[name];\r\n      var preTriggerArgs = {\r\n        prevented: false,\r\n        name: name,\r\n        args: args\r\n      };\r\n\r\n      actualTrigger.call(this, preTriggerName, preTriggerArgs);\r\n\r\n      if (preTriggerArgs.prevented) {\r\n        args.prevented = true;\r\n\r\n        return;\r\n      }\r\n    }\r\n\r\n    actualTrigger.call(this, name, args);\r\n  };\r\n\r\n  Select2.prototype.toggleDropdown = function () {\r\n    if (this.options.get('disabled')) {\r\n      return;\r\n    }\r\n\r\n    if (this.isOpen()) {\r\n      this.close();\r\n    } else {\r\n      this.open();\r\n    }\r\n  };\r\n\r\n  Select2.prototype.open = function () {\r\n    if (this.isOpen()) {\r\n      return;\r\n    }\r\n\r\n    this.trigger('query', {});\r\n  };\r\n\r\n  Select2.prototype.close = function () {\r\n    if (!this.isOpen()) {\r\n      return;\r\n    }\r\n\r\n    this.trigger('close', {});\r\n  };\r\n\r\n  Select2.prototype.isOpen = function () {\r\n    return this.$container.hasClass('select2-container--open');\r\n  };\r\n\r\n  Select2.prototype.hasFocus = function () {\r\n    return this.$container.hasClass('select2-container--focus');\r\n  };\r\n\r\n  Select2.prototype.focus = function (data) {\r\n    // No need to re-trigger focus events if we are already focused\r\n    if (this.hasFocus()) {\r\n      return;\r\n    }\r\n\r\n    this.$container.addClass('select2-container--focus');\r\n    this.trigger('focus', {});\r\n  };\r\n\r\n  Select2.prototype.enable = function (args) {\r\n    if (this.options.get('debug') && window.console && console.warn) {\r\n      console.warn(\r\n        'Select2: The `select2(\"enable\")` method has been deprecated and will' +\r\n        ' be removed in later Select2 versions. Use $element.prop(\"disabled\")' +\r\n        ' instead.'\r\n      );\r\n    }\r\n\r\n    if (args == null || args.length === 0) {\r\n      args = [true];\r\n    }\r\n\r\n    var disabled = !args[0];\r\n\r\n    this.$element.prop('disabled', disabled);\r\n  };\r\n\r\n  Select2.prototype.data = function () {\r\n    if (this.options.get('debug') &&\r\n        arguments.length > 0 && window.console && console.warn) {\r\n      console.warn(\r\n        'Select2: Data can no longer be set using `select2(\"data\")`. You ' +\r\n        'should consider setting the value instead using `$element.val()`.'\r\n      );\r\n    }\r\n\r\n    var data = [];\r\n\r\n    this.dataAdapter.current(function (currentData) {\r\n      data = currentData;\r\n    });\r\n\r\n    return data;\r\n  };\r\n\r\n  Select2.prototype.val = function (args) {\r\n    if (this.options.get('debug') && window.console && console.warn) {\r\n      console.warn(\r\n        'Select2: The `select2(\"val\")` method has been deprecated and will be' +\r\n        ' removed in later Select2 versions. Use $element.val() instead.'\r\n      );\r\n    }\r\n\r\n    if (args == null || args.length === 0) {\r\n      return this.$element.val();\r\n    }\r\n\r\n    var newVal = args[0];\r\n\r\n    if ($.isArray(newVal)) {\r\n      newVal = $.map(newVal, function (obj) {\r\n        return obj.toString();\r\n      });\r\n    }\r\n\r\n    this.$element.val(newVal).trigger('change');\r\n  };\r\n\r\n  Select2.prototype.destroy = function () {\r\n    this.$container.remove();\r\n\r\n    if (this.$element[0].detachEvent) {\r\n      this.$element[0].detachEvent('onpropertychange', this._syncA);\r\n    }\r\n\r\n    if (this._observer != null) {\r\n      this._observer.disconnect();\r\n      this._observer = null;\r\n    } else if (this.$element[0].removeEventListener) {\r\n      this.$element[0]\r\n        .removeEventListener('DOMAttrModified', this._syncA, false);\r\n      this.$element[0]\r\n        .removeEventListener('DOMNodeInserted', this._syncS, false);\r\n      this.$element[0]\r\n        .removeEventListener('DOMNodeRemoved', this._syncS, false);\r\n    }\r\n\r\n    this._syncA = null;\r\n    this._syncS = null;\r\n\r\n    this.$element.off('.select2');\r\n    this.$element.attr('tabindex',\r\n    Utils.GetData(this.$element[0], 'old-tabindex'));\r\n\r\n    this.$element.removeClass('select2-hidden-accessible');\r\n    this.$element.attr('aria-hidden', 'false');\r\n    Utils.RemoveData(this.$element[0]);\r\n    this.$element.removeData('select2');\r\n\r\n    this.dataAdapter.destroy();\r\n    this.selection.destroy();\r\n    this.dropdown.destroy();\r\n    this.results.destroy();\r\n\r\n    this.dataAdapter = null;\r\n    this.selection = null;\r\n    this.dropdown = null;\r\n    this.results = null;\r\n  };\r\n\r\n  Select2.prototype.render = function () {\r\n    var $container = $(\r\n      '<span class=\"select2 select2-container\">' +\r\n        '<span class=\"selection\"></span>' +\r\n        '<span class=\"dropdown-wrapper\" aria-hidden=\"true\"></span>' +\r\n      '</span>'\r\n    );\r\n\r\n    $container.attr('dir', this.options.get('dir'));\r\n\r\n    this.$container = $container;\r\n\r\n    this.$container.addClass('select2-container--' + this.options.get('theme'));\r\n\r\n    Utils.StoreData($container[0], 'element', this.$element);\r\n\r\n    return $container;\r\n  };\r\n\r\n  return Select2;\r\n});\r\n\r\nS2.define('jquery-mousewheel',[\r\n  'jquery'\r\n], function ($) {\r\n  // Used to shim jQuery.mousewheel for non-full builds.\r\n  return $;\r\n});\r\n\r\nS2.define('jquery.select2',[\r\n  'jquery',\r\n  'jquery-mousewheel',\r\n\r\n  './select2/core',\r\n  './select2/defaults',\r\n  './select2/utils'\r\n], function ($, _, Select2, Defaults, Utils) {\r\n  if ($.fn.select2 == null) {\r\n    // All methods that should return the element\r\n    var thisMethods = ['open', 'close', 'destroy'];\r\n\r\n    $.fn.select2 = function (options) {\r\n      options = options || {};\r\n\r\n      if (typeof options === 'object') {\r\n        this.each(function () {\r\n          var instanceOptions = $.extend(true, {}, options);\r\n\r\n          var instance = new Select2($(this), instanceOptions);\r\n        });\r\n\r\n        return this;\r\n      } else if (typeof options === 'string') {\r\n        var ret;\r\n        var args = Array.prototype.slice.call(arguments, 1);\r\n\r\n        this.each(function () {\r\n          var instance = Utils.GetData(this, 'select2');\r\n\r\n          if (instance == null && window.console && console.error) {\r\n            console.error(\r\n              'The select2(\\'' + options + '\\') method was called on an ' +\r\n              'element that is not using Select2.'\r\n            );\r\n          }\r\n\r\n          ret = instance[options].apply(instance, args);\r\n        });\r\n\r\n        // Check if we should be returning `this`\r\n        if ($.inArray(options, thisMethods) > -1) {\r\n          return this;\r\n        }\r\n\r\n        return ret;\r\n      } else {\r\n        throw new Error('Invalid arguments for Select2: ' + options);\r\n      }\r\n    };\r\n  }\r\n\r\n  if ($.fn.select2.defaults == null) {\r\n    $.fn.select2.defaults = Defaults;\r\n  }\r\n\r\n  return Select2;\r\n});\r\n\r\n  // Return the AMD loader configuration so it can be used outside of this file\r\n  return {\r\n    define: S2.define,\r\n    require: S2.require\r\n  };\r\n}());\r\n\r\n  // Autoload the jQuery bindings\r\n  // We know that all of the modules exist above this, so we're safe\r\n  var select2 = S2.require('jquery.select2');\r\n\r\n  // Hold the AMD module references on the jQuery function that was just loaded\r\n  // This allows Select2 to use the internal loader outside of this file, such\r\n  // as in the language files.\r\n  jQuery.fn.select2.amd = S2;\r\n\r\n  // Return the Select2 instance for anyone who is importing it.\r\n  return select2;\r\n}));\r\n","!function(i){\"use strict\";\"function\"==typeof define&&define.amd?define([\"jquery\"],i):\"undefined\"!=typeof exports?module.exports=i(require(\"jquery\")):i(jQuery)}(function(i){\"use strict\";var e=window.Slick||{};(e=function(){var e=0;return function(t,o){var s,n=this;n.defaults={accessibility:!0,adaptiveHeight:!1,appendArrows:i(t),appendDots:i(t),arrows:!0,asNavFor:null,prevArrow:'<button class=\"slick-prev\" aria-label=\"Previous\" type=\"button\">Previous</button>',nextArrow:'<button class=\"slick-next\" aria-label=\"Next\" type=\"button\">Next</button>',autoplay:!1,autoplaySpeed:3e3,centerMode:!1,centerPadding:\"50px\",cssEase:\"ease\",customPaging:function(e,t){return i('<button type=\"button\" />').text(t+1)},dots:!1,dotsClass:\"slick-dots\",draggable:!0,easing:\"linear\",edgeFriction:.35,fade:!1,focusOnSelect:!1,focusOnChange:!1,infinite:!0,initialSlide:0,lazyLoad:\"ondemand\",mobileFirst:!1,pauseOnHover:!0,pauseOnFocus:!0,pauseOnDotsHover:!1,respondTo:\"window\",responsive:null,rows:1,rtl:!1,slide:\"\",slidesPerRow:1,slidesToShow:1,slidesToScroll:1,speed:500,swipe:!0,swipeToSlide:!1,touchMove:!0,touchThreshold:5,useCSS:!0,useTransform:!0,variableWidth:!1,vertical:!1,verticalSwiping:!1,waitForAnimate:!0,zIndex:1e3},n.initials={animating:!1,dragging:!1,autoPlayTimer:null,currentDirection:0,currentLeft:null,currentSlide:0,direction:1,$dots:null,listWidth:null,listHeight:null,loadIndex:0,$nextArrow:null,$prevArrow:null,scrolling:!1,slideCount:null,slideWidth:null,$slideTrack:null,$slides:null,sliding:!1,slideOffset:0,swipeLeft:null,swiping:!1,$list:null,touchObject:{},transformsEnabled:!1,unslicked:!1},i.extend(n,n.initials),n.activeBreakpoint=null,n.animType=null,n.animProp=null,n.breakpoints=[],n.breakpointSettings=[],n.cssTransitions=!1,n.focussed=!1,n.interrupted=!1,n.hidden=\"hidden\",n.paused=!0,n.positionProp=null,n.respondTo=null,n.rowCount=1,n.shouldClick=!0,n.$slider=i(t),n.$slidesCache=null,n.transformType=null,n.transitionType=null,n.visibilityChange=\"visibilitychange\",n.windowWidth=0,n.windowTimer=null,s=i(t).data(\"slick\")||{},n.options=i.extend({},n.defaults,o,s),n.currentSlide=n.options.initialSlide,n.originalSettings=n.options,void 0!==document.mozHidden?(n.hidden=\"mozHidden\",n.visibilityChange=\"mozvisibilitychange\"):void 0!==document.webkitHidden&&(n.hidden=\"webkitHidden\",n.visibilityChange=\"webkitvisibilitychange\"),n.autoPlay=i.proxy(n.autoPlay,n),n.autoPlayClear=i.proxy(n.autoPlayClear,n),n.autoPlayIterator=i.proxy(n.autoPlayIterator,n),n.changeSlide=i.proxy(n.changeSlide,n),n.clickHandler=i.proxy(n.clickHandler,n),n.selectHandler=i.proxy(n.selectHandler,n),n.setPosition=i.proxy(n.setPosition,n),n.swipeHandler=i.proxy(n.swipeHandler,n),n.dragHandler=i.proxy(n.dragHandler,n),n.keyHandler=i.proxy(n.keyHandler,n),n.instanceUid=e++,n.htmlExpr=/^(?:\\s*(<[\\w\\W]+>)[^>]*)$/,n.registerBreakpoints(),n.init(!0)}}()).prototype.activateADA=function(){this.$slideTrack.find(\".slick-active\").attr({\"aria-hidden\":\"false\"}).find(\"a, input, button, select\").attr({tabindex:\"0\"})},e.prototype.addSlide=e.prototype.slickAdd=function(e,t,o){var s=this;if(\"boolean\"==typeof t)o=t,t=null;else if(t<0||t>=s.slideCount)return!1;s.unload(),\"number\"==typeof t?0===t&&0===s.$slides.length?i(e).appendTo(s.$slideTrack):o?i(e).insertBefore(s.$slides.eq(t)):i(e).insertAfter(s.$slides.eq(t)):!0===o?i(e).prependTo(s.$slideTrack):i(e).appendTo(s.$slideTrack),s.$slides=s.$slideTrack.children(this.options.slide),s.$slideTrack.children(this.options.slide).detach(),s.$slideTrack.append(s.$slides),s.$slides.each(function(e,t){i(t).attr(\"data-slick-index\",e)}),s.$slidesCache=s.$slides,s.reinit()},e.prototype.animateHeight=function(){var i=this;if(1===i.options.slidesToShow&&!0===i.options.adaptiveHeight&&!1===i.options.vertical){var e=i.$slides.eq(i.currentSlide).outerHeight(!0);i.$list.animate({height:e},i.options.speed)}},e.prototype.animateSlide=function(e,t){var o={},s=this;s.animateHeight(),!0===s.options.rtl&&!1===s.options.vertical&&(e=-e),!1===s.transformsEnabled?!1===s.options.vertical?s.$slideTrack.animate({left:e},s.options.speed,s.options.easing,t):s.$slideTrack.animate({top:e},s.options.speed,s.options.easing,t):!1===s.cssTransitions?(!0===s.options.rtl&&(s.currentLeft=-s.currentLeft),i({animStart:s.currentLeft}).animate({animStart:e},{duration:s.options.speed,easing:s.options.easing,step:function(i){i=Math.ceil(i),!1===s.options.vertical?(o[s.animType]=\"translate(\"+i+\"px, 0px)\",s.$slideTrack.css(o)):(o[s.animType]=\"translate(0px,\"+i+\"px)\",s.$slideTrack.css(o))},complete:function(){t&&t.call()}})):(s.applyTransition(),e=Math.ceil(e),!1===s.options.vertical?o[s.animType]=\"translate3d(\"+e+\"px, 0px, 0px)\":o[s.animType]=\"translate3d(0px,\"+e+\"px, 0px)\",s.$slideTrack.css(o),t&&setTimeout(function(){s.disableTransition(),t.call()},s.options.speed))},e.prototype.getNavTarget=function(){var e=this,t=e.options.asNavFor;return t&&null!==t&&(t=i(t).not(e.$slider)),t},e.prototype.asNavFor=function(e){var t=this.getNavTarget();null!==t&&\"object\"==typeof t&&t.each(function(){var t=i(this).slick(\"getSlick\");t.unslicked||t.slideHandler(e,!0)})},e.prototype.applyTransition=function(i){var e=this,t={};!1===e.options.fade?t[e.transitionType]=e.transformType+\" \"+e.options.speed+\"ms \"+e.options.cssEase:t[e.transitionType]=\"opacity \"+e.options.speed+\"ms \"+e.options.cssEase,!1===e.options.fade?e.$slideTrack.css(t):e.$slides.eq(i).css(t)},e.prototype.autoPlay=function(){var i=this;i.autoPlayClear(),i.slideCount>i.options.slidesToShow&&(i.autoPlayTimer=setInterval(i.autoPlayIterator,i.options.autoplaySpeed))},e.prototype.autoPlayClear=function(){var i=this;i.autoPlayTimer&&clearInterval(i.autoPlayTimer)},e.prototype.autoPlayIterator=function(){var i=this,e=i.currentSlide+i.options.slidesToScroll;i.paused||i.interrupted||i.focussed||(!1===i.options.infinite&&(1===i.direction&&i.currentSlide+1===i.slideCount-1?i.direction=0:0===i.direction&&(e=i.currentSlide-i.options.slidesToScroll,i.currentSlide-1==0&&(i.direction=1))),i.slideHandler(e))},e.prototype.buildArrows=function(){var e=this;!0===e.options.arrows&&(e.$prevArrow=i(e.options.prevArrow).addClass(\"slick-arrow\"),e.$nextArrow=i(e.options.nextArrow).addClass(\"slick-arrow\"),e.slideCount>e.options.slidesToShow?(e.$prevArrow.removeClass(\"slick-hidden\").removeAttr(\"aria-hidden tabindex\"),e.$nextArrow.removeClass(\"slick-hidden\").removeAttr(\"aria-hidden tabindex\"),e.htmlExpr.test(e.options.prevArrow)&&e.$prevArrow.prependTo(e.options.appendArrows),e.htmlExpr.test(e.options.nextArrow)&&e.$nextArrow.appendTo(e.options.appendArrows),!0!==e.options.infinite&&e.$prevArrow.addClass(\"slick-disabled\").attr(\"aria-disabled\",\"true\")):e.$prevArrow.add(e.$nextArrow).addClass(\"slick-hidden\").attr({\"aria-disabled\":\"true\",tabindex:\"-1\"}))},e.prototype.buildDots=function(){var e,t,o=this;if(!0===o.options.dots){for(o.$slider.addClass(\"slick-dotted\"),t=i(\"<ul />\").addClass(o.options.dotsClass),e=0;e<=o.getDotCount();e+=1)t.append(i(\"<li />\").append(o.options.customPaging.call(this,o,e)));o.$dots=t.appendTo(o.options.appendDots),o.$dots.find(\"li\").first().addClass(\"slick-active\")}},e.prototype.buildOut=function(){var e=this;e.$slides=e.$slider.children(e.options.slide+\":not(.slick-cloned)\").addClass(\"slick-slide\"),e.slideCount=e.$slides.length,e.$slides.each(function(e,t){i(t).attr(\"data-slick-index\",e).data(\"originalStyling\",i(t).attr(\"style\")||\"\")}),e.$slider.addClass(\"slick-slider\"),e.$slideTrack=0===e.slideCount?i('<div class=\"slick-track\"/>').appendTo(e.$slider):e.$slides.wrapAll('<div class=\"slick-track\"/>').parent(),e.$list=e.$slideTrack.wrap('<div class=\"slick-list\"/>').parent(),e.$slideTrack.css(\"opacity\",0),!0!==e.options.centerMode&&!0!==e.options.swipeToSlide||(e.options.slidesToScroll=1),i(\"img[data-lazy]\",e.$slider).not(\"[src]\").addClass(\"slick-loading\"),e.setupInfinite(),e.buildArrows(),e.buildDots(),e.updateDots(),e.setSlideClasses(\"number\"==typeof e.currentSlide?e.currentSlide:0),!0===e.options.draggable&&e.$list.addClass(\"draggable\")},e.prototype.buildRows=function(){var i,e,t,o,s,n,r,l=this;if(o=document.createDocumentFragment(),n=l.$slider.children(),l.options.rows>1){for(r=l.options.slidesPerRow*l.options.rows,s=Math.ceil(n.length/r),i=0;i<s;i++){var d=document.createElement(\"div\");for(e=0;e<l.options.rows;e++){var a=document.createElement(\"div\");for(t=0;t<l.options.slidesPerRow;t++){var c=i*r+(e*l.options.slidesPerRow+t);n.get(c)&&a.appendChild(n.get(c))}d.appendChild(a)}o.appendChild(d)}l.$slider.empty().append(o),l.$slider.children().children().children().css({width:100/l.options.slidesPerRow+\"%\",display:\"inline-block\"})}},e.prototype.checkResponsive=function(e,t){var o,s,n,r=this,l=!1,d=r.$slider.width(),a=window.innerWidth||i(window).width();if(\"window\"===r.respondTo?n=a:\"slider\"===r.respondTo?n=d:\"min\"===r.respondTo&&(n=Math.min(a,d)),r.options.responsive&&r.options.responsive.length&&null!==r.options.responsive){s=null;for(o in r.breakpoints)r.breakpoints.hasOwnProperty(o)&&(!1===r.originalSettings.mobileFirst?n<r.breakpoints[o]&&(s=r.breakpoints[o]):n>r.breakpoints[o]&&(s=r.breakpoints[o]));null!==s?null!==r.activeBreakpoint?(s!==r.activeBreakpoint||t)&&(r.activeBreakpoint=s,\"unslick\"===r.breakpointSettings[s]?r.unslick(s):(r.options=i.extend({},r.originalSettings,r.breakpointSettings[s]),!0===e&&(r.currentSlide=r.options.initialSlide),r.refresh(e)),l=s):(r.activeBreakpoint=s,\"unslick\"===r.breakpointSettings[s]?r.unslick(s):(r.options=i.extend({},r.originalSettings,r.breakpointSettings[s]),!0===e&&(r.currentSlide=r.options.initialSlide),r.refresh(e)),l=s):null!==r.activeBreakpoint&&(r.activeBreakpoint=null,r.options=r.originalSettings,!0===e&&(r.currentSlide=r.options.initialSlide),r.refresh(e),l=s),e||!1===l||r.$slider.trigger(\"breakpoint\",[r,l])}},e.prototype.changeSlide=function(e,t){var o,s,n,r=this,l=i(e.currentTarget);switch(l.is(\"a\")&&e.preventDefault(),l.is(\"li\")||(l=l.closest(\"li\")),n=r.slideCount%r.options.slidesToScroll!=0,o=n?0:(r.slideCount-r.currentSlide)%r.options.slidesToScroll,e.data.message){case\"previous\":s=0===o?r.options.slidesToScroll:r.options.slidesToShow-o,r.slideCount>r.options.slidesToShow&&r.slideHandler(r.currentSlide-s,!1,t);break;case\"next\":s=0===o?r.options.slidesToScroll:o,r.slideCount>r.options.slidesToShow&&r.slideHandler(r.currentSlide+s,!1,t);break;case\"index\":var d=0===e.data.index?0:e.data.index||l.index()*r.options.slidesToScroll;r.slideHandler(r.checkNavigable(d),!1,t),l.children().trigger(\"focus\");break;default:return}},e.prototype.checkNavigable=function(i){var e,t;if(e=this.getNavigableIndexes(),t=0,i>e[e.length-1])i=e[e.length-1];else for(var o in e){if(i<e[o]){i=t;break}t=e[o]}return i},e.prototype.cleanUpEvents=function(){var e=this;e.options.dots&&null!==e.$dots&&(i(\"li\",e.$dots).off(\"click.slick\",e.changeSlide).off(\"mouseenter.slick\",i.proxy(e.interrupt,e,!0)).off(\"mouseleave.slick\",i.proxy(e.interrupt,e,!1)),!0===e.options.accessibility&&e.$dots.off(\"keydown.slick\",e.keyHandler)),e.$slider.off(\"focus.slick blur.slick\"),!0===e.options.arrows&&e.slideCount>e.options.slidesToShow&&(e.$prevArrow&&e.$prevArrow.off(\"click.slick\",e.changeSlide),e.$nextArrow&&e.$nextArrow.off(\"click.slick\",e.changeSlide),!0===e.options.accessibility&&(e.$prevArrow&&e.$prevArrow.off(\"keydown.slick\",e.keyHandler),e.$nextArrow&&e.$nextArrow.off(\"keydown.slick\",e.keyHandler))),e.$list.off(\"touchstart.slick mousedown.slick\",e.swipeHandler),e.$list.off(\"touchmove.slick mousemove.slick\",e.swipeHandler),e.$list.off(\"touchend.slick mouseup.slick\",e.swipeHandler),e.$list.off(\"touchcancel.slick mouseleave.slick\",e.swipeHandler),e.$list.off(\"click.slick\",e.clickHandler),i(document).off(e.visibilityChange,e.visibility),e.cleanUpSlideEvents(),!0===e.options.accessibility&&e.$list.off(\"keydown.slick\",e.keyHandler),!0===e.options.focusOnSelect&&i(e.$slideTrack).children().off(\"click.slick\",e.selectHandler),i(window).off(\"orientationchange.slick.slick-\"+e.instanceUid,e.orientationChange),i(window).off(\"resize.slick.slick-\"+e.instanceUid,e.resize),i(\"[draggable!=true]\",e.$slideTrack).off(\"dragstart\",e.preventDefault),i(window).off(\"load.slick.slick-\"+e.instanceUid,e.setPosition)},e.prototype.cleanUpSlideEvents=function(){var e=this;e.$list.off(\"mouseenter.slick\",i.proxy(e.interrupt,e,!0)),e.$list.off(\"mouseleave.slick\",i.proxy(e.interrupt,e,!1))},e.prototype.cleanUpRows=function(){var i,e=this;e.options.rows>1&&((i=e.$slides.children().children()).removeAttr(\"style\"),e.$slider.empty().append(i))},e.prototype.clickHandler=function(i){!1===this.shouldClick&&(i.stopImmediatePropagation(),i.stopPropagation(),i.preventDefault())},e.prototype.destroy=function(e){var t=this;t.autoPlayClear(),t.touchObject={},t.cleanUpEvents(),i(\".slick-cloned\",t.$slider).detach(),t.$dots&&t.$dots.remove(),t.$prevArrow&&t.$prevArrow.length&&(t.$prevArrow.removeClass(\"slick-disabled slick-arrow slick-hidden\").removeAttr(\"aria-hidden aria-disabled tabindex\").css(\"display\",\"\"),t.htmlExpr.test(t.options.prevArrow)&&t.$prevArrow.remove()),t.$nextArrow&&t.$nextArrow.length&&(t.$nextArrow.removeClass(\"slick-disabled slick-arrow slick-hidden\").removeAttr(\"aria-hidden aria-disabled tabindex\").css(\"display\",\"\"),t.htmlExpr.test(t.options.nextArrow)&&t.$nextArrow.remove()),t.$slides&&(t.$slides.removeClass(\"slick-slide slick-active slick-center slick-visible slick-current\").removeAttr(\"aria-hidden\").removeAttr(\"data-slick-index\").each(function(){i(this).attr(\"style\",i(this).data(\"originalStyling\"))}),t.$slideTrack.children(this.options.slide).detach(),t.$slideTrack.detach(),t.$list.detach(),t.$slider.append(t.$slides)),t.cleanUpRows(),t.$slider.removeClass(\"slick-slider\"),t.$slider.removeClass(\"slick-initialized\"),t.$slider.removeClass(\"slick-dotted\"),t.unslicked=!0,e||t.$slider.trigger(\"destroy\",[t])},e.prototype.disableTransition=function(i){var e=this,t={};t[e.transitionType]=\"\",!1===e.options.fade?e.$slideTrack.css(t):e.$slides.eq(i).css(t)},e.prototype.fadeSlide=function(i,e){var t=this;!1===t.cssTransitions?(t.$slides.eq(i).css({zIndex:t.options.zIndex}),t.$slides.eq(i).animate({opacity:1},t.options.speed,t.options.easing,e)):(t.applyTransition(i),t.$slides.eq(i).css({opacity:1,zIndex:t.options.zIndex}),e&&setTimeout(function(){t.disableTransition(i),e.call()},t.options.speed))},e.prototype.fadeSlideOut=function(i){var e=this;!1===e.cssTransitions?e.$slides.eq(i).animate({opacity:0,zIndex:e.options.zIndex-2},e.options.speed,e.options.easing):(e.applyTransition(i),e.$slides.eq(i).css({opacity:0,zIndex:e.options.zIndex-2}))},e.prototype.filterSlides=e.prototype.slickFilter=function(i){var e=this;null!==i&&(e.$slidesCache=e.$slides,e.unload(),e.$slideTrack.children(this.options.slide).detach(),e.$slidesCache.filter(i).appendTo(e.$slideTrack),e.reinit())},e.prototype.focusHandler=function(){var e=this;e.$slider.off(\"focus.slick blur.slick\").on(\"focus.slick blur.slick\",\"*\",function(t){t.stopImmediatePropagation();var o=i(this);setTimeout(function(){e.options.pauseOnFocus&&(e.focussed=o.is(\":focus\"),e.autoPlay())},0)})},e.prototype.getCurrent=e.prototype.slickCurrentSlide=function(){return this.currentSlide},e.prototype.getDotCount=function(){var i=this,e=0,t=0,o=0;if(!0===i.options.infinite)if(i.slideCount<=i.options.slidesToShow)++o;else for(;e<i.slideCount;)++o,e=t+i.options.slidesToScroll,t+=i.options.slidesToScroll<=i.options.slidesToShow?i.options.slidesToScroll:i.options.slidesToShow;else if(!0===i.options.centerMode)o=i.slideCount;else if(i.options.asNavFor)for(;e<i.slideCount;)++o,e=t+i.options.slidesToScroll,t+=i.options.slidesToScroll<=i.options.slidesToShow?i.options.slidesToScroll:i.options.slidesToShow;else o=1+Math.ceil((i.slideCount-i.options.slidesToShow)/i.options.slidesToScroll);return o-1},e.prototype.getLeft=function(i){var e,t,o,s,n=this,r=0;return n.slideOffset=0,t=n.$slides.first().outerHeight(!0),!0===n.options.infinite?(n.slideCount>n.options.slidesToShow&&(n.slideOffset=n.slideWidth*n.options.slidesToShow*-1,s=-1,!0===n.options.vertical&&!0===n.options.centerMode&&(2===n.options.slidesToShow?s=-1.5:1===n.options.slidesToShow&&(s=-2)),r=t*n.options.slidesToShow*s),n.slideCount%n.options.slidesToScroll!=0&&i+n.options.slidesToScroll>n.slideCount&&n.slideCount>n.options.slidesToShow&&(i>n.slideCount?(n.slideOffset=(n.options.slidesToShow-(i-n.slideCount))*n.slideWidth*-1,r=(n.options.slidesToShow-(i-n.slideCount))*t*-1):(n.slideOffset=n.slideCount%n.options.slidesToScroll*n.slideWidth*-1,r=n.slideCount%n.options.slidesToScroll*t*-1))):i+n.options.slidesToShow>n.slideCount&&(n.slideOffset=(i+n.options.slidesToShow-n.slideCount)*n.slideWidth,r=(i+n.options.slidesToShow-n.slideCount)*t),n.slideCount<=n.options.slidesToShow&&(n.slideOffset=0,r=0),!0===n.options.centerMode&&n.slideCount<=n.options.slidesToShow?n.slideOffset=n.slideWidth*Math.floor(n.options.slidesToShow)/2-n.slideWidth*n.slideCount/2:!0===n.options.centerMode&&!0===n.options.infinite?n.slideOffset+=n.slideWidth*Math.floor(n.options.slidesToShow/2)-n.slideWidth:!0===n.options.centerMode&&(n.slideOffset=0,n.slideOffset+=n.slideWidth*Math.floor(n.options.slidesToShow/2)),e=!1===n.options.vertical?i*n.slideWidth*-1+n.slideOffset:i*t*-1+r,!0===n.options.variableWidth&&(o=n.slideCount<=n.options.slidesToShow||!1===n.options.infinite?n.$slideTrack.children(\".slick-slide\").eq(i):n.$slideTrack.children(\".slick-slide\").eq(i+n.options.slidesToShow),e=!0===n.options.rtl?o[0]?-1*(n.$slideTrack.width()-o[0].offsetLeft-o.width()):0:o[0]?-1*o[0].offsetLeft:0,!0===n.options.centerMode&&(o=n.slideCount<=n.options.slidesToShow||!1===n.options.infinite?n.$slideTrack.children(\".slick-slide\").eq(i):n.$slideTrack.children(\".slick-slide\").eq(i+n.options.slidesToShow+1),e=!0===n.options.rtl?o[0]?-1*(n.$slideTrack.width()-o[0].offsetLeft-o.width()):0:o[0]?-1*o[0].offsetLeft:0,e+=(n.$list.width()-o.outerWidth())/2)),e},e.prototype.getOption=e.prototype.slickGetOption=function(i){return this.options[i]},e.prototype.getNavigableIndexes=function(){var i,e=this,t=0,o=0,s=[];for(!1===e.options.infinite?i=e.slideCount:(t=-1*e.options.slidesToScroll,o=-1*e.options.slidesToScroll,i=2*e.slideCount);t<i;)s.push(t),t=o+e.options.slidesToScroll,o+=e.options.slidesToScroll<=e.options.slidesToShow?e.options.slidesToScroll:e.options.slidesToShow;return s},e.prototype.getSlick=function(){return this},e.prototype.getSlideCount=function(){var e,t,o=this;return t=!0===o.options.centerMode?o.slideWidth*Math.floor(o.options.slidesToShow/2):0,!0===o.options.swipeToSlide?(o.$slideTrack.find(\".slick-slide\").each(function(s,n){if(n.offsetLeft-t+i(n).outerWidth()/2>-1*o.swipeLeft)return e=n,!1}),Math.abs(i(e).attr(\"data-slick-index\")-o.currentSlide)||1):o.options.slidesToScroll},e.prototype.goTo=e.prototype.slickGoTo=function(i,e){this.changeSlide({data:{message:\"index\",index:parseInt(i)}},e)},e.prototype.init=function(e){var t=this;i(t.$slider).hasClass(\"slick-initialized\")||(i(t.$slider).addClass(\"slick-initialized\"),t.buildRows(),t.buildOut(),t.setProps(),t.startLoad(),t.loadSlider(),t.initializeEvents(),t.updateArrows(),t.updateDots(),t.checkResponsive(!0),t.focusHandler()),e&&t.$slider.trigger(\"init\",[t]),!0===t.options.accessibility&&t.initADA(),t.options.autoplay&&(t.paused=!1,t.autoPlay())},e.prototype.initADA=function(){var e=this,t=Math.ceil(e.slideCount/e.options.slidesToShow),o=e.getNavigableIndexes().filter(function(i){return i>=0&&i<e.slideCount});e.$slides.add(e.$slideTrack.find(\".slick-cloned\")).attr({\"aria-hidden\":\"true\",tabindex:\"-1\"}).find(\"a, input, button, select\").attr({tabindex:\"-1\"}),null!==e.$dots&&(e.$slides.not(e.$slideTrack.find(\".slick-cloned\")).each(function(t){var s=o.indexOf(t);i(this).attr({role:\"tabpanel\",id:\"slick-slide\"+e.instanceUid+t,tabindex:-1}),-1!==s&&i(this).attr({\"aria-describedby\":\"slick-slide-control\"+e.instanceUid+s})}),e.$dots.attr(\"role\",\"tablist\").find(\"li\").each(function(s){var n=o[s];i(this).attr({role:\"presentation\"}),i(this).find(\"button\").first().attr({role:\"tab\",id:\"slick-slide-control\"+e.instanceUid+s,\"aria-controls\":\"slick-slide\"+e.instanceUid+n,\"aria-label\":s+1+\" of \"+t,\"aria-selected\":null,tabindex:\"-1\"})}).eq(e.currentSlide).find(\"button\").attr({\"aria-selected\":\"true\",tabindex:\"0\"}).end());for(var s=e.currentSlide,n=s+e.options.slidesToShow;s<n;s++)e.$slides.eq(s).attr(\"tabindex\",0);e.activateADA()},e.prototype.initArrowEvents=function(){var i=this;!0===i.options.arrows&&i.slideCount>i.options.slidesToShow&&(i.$prevArrow.off(\"click.slick\").on(\"click.slick\",{message:\"previous\"},i.changeSlide),i.$nextArrow.off(\"click.slick\").on(\"click.slick\",{message:\"next\"},i.changeSlide),!0===i.options.accessibility&&(i.$prevArrow.on(\"keydown.slick\",i.keyHandler),i.$nextArrow.on(\"keydown.slick\",i.keyHandler)))},e.prototype.initDotEvents=function(){var e=this;!0===e.options.dots&&(i(\"li\",e.$dots).on(\"click.slick\",{message:\"index\"},e.changeSlide),!0===e.options.accessibility&&e.$dots.on(\"keydown.slick\",e.keyHandler)),!0===e.options.dots&&!0===e.options.pauseOnDotsHover&&i(\"li\",e.$dots).on(\"mouseenter.slick\",i.proxy(e.interrupt,e,!0)).on(\"mouseleave.slick\",i.proxy(e.interrupt,e,!1))},e.prototype.initSlideEvents=function(){var e=this;e.options.pauseOnHover&&(e.$list.on(\"mouseenter.slick\",i.proxy(e.interrupt,e,!0)),e.$list.on(\"mouseleave.slick\",i.proxy(e.interrupt,e,!1)))},e.prototype.initializeEvents=function(){var e=this;e.initArrowEvents(),e.initDotEvents(),e.initSlideEvents(),e.$list.on(\"touchstart.slick mousedown.slick\",{action:\"start\"},e.swipeHandler),e.$list.on(\"touchmove.slick mousemove.slick\",{action:\"move\"},e.swipeHandler),e.$list.on(\"touchend.slick mouseup.slick\",{action:\"end\"},e.swipeHandler),e.$list.on(\"touchcancel.slick mouseleave.slick\",{action:\"end\"},e.swipeHandler),e.$list.on(\"click.slick\",e.clickHandler),i(document).on(e.visibilityChange,i.proxy(e.visibility,e)),!0===e.options.accessibility&&e.$list.on(\"keydown.slick\",e.keyHandler),!0===e.options.focusOnSelect&&i(e.$slideTrack).children().on(\"click.slick\",e.selectHandler),i(window).on(\"orientationchange.slick.slick-\"+e.instanceUid,i.proxy(e.orientationChange,e)),i(window).on(\"resize.slick.slick-\"+e.instanceUid,i.proxy(e.resize,e)),i(\"[draggable!=true]\",e.$slideTrack).on(\"dragstart\",e.preventDefault),i(window).on(\"load.slick.slick-\"+e.instanceUid,e.setPosition),i(e.setPosition)},e.prototype.initUI=function(){var i=this;!0===i.options.arrows&&i.slideCount>i.options.slidesToShow&&(i.$prevArrow.show(),i.$nextArrow.show()),!0===i.options.dots&&i.slideCount>i.options.slidesToShow&&i.$dots.show()},e.prototype.keyHandler=function(i){var e=this;i.target.tagName.match(\"TEXTAREA|INPUT|SELECT\")||(37===i.keyCode&&!0===e.options.accessibility?e.changeSlide({data:{message:!0===e.options.rtl?\"next\":\"previous\"}}):39===i.keyCode&&!0===e.options.accessibility&&e.changeSlide({data:{message:!0===e.options.rtl?\"previous\":\"next\"}}))},e.prototype.lazyLoad=function(){function e(e){i(\"img[data-lazy]\",e).each(function(){var e=i(this),t=i(this).attr(\"data-lazy\"),o=i(this).attr(\"data-srcset\"),s=i(this).attr(\"data-sizes\")||n.$slider.attr(\"data-sizes\"),r=document.createElement(\"img\");r.onload=function(){e.animate({opacity:0},100,function(){o&&(e.attr(\"srcset\",o),s&&e.attr(\"sizes\",s)),e.attr(\"src\",t).animate({opacity:1},200,function(){e.removeAttr(\"data-lazy data-srcset data-sizes\").removeClass(\"slick-loading\")}),n.$slider.trigger(\"lazyLoaded\",[n,e,t])})},r.onerror=function(){e.removeAttr(\"data-lazy\").removeClass(\"slick-loading\").addClass(\"slick-lazyload-error\"),n.$slider.trigger(\"lazyLoadError\",[n,e,t])},r.src=t})}var t,o,s,n=this;if(!0===n.options.centerMode?!0===n.options.infinite?s=(o=n.currentSlide+(n.options.slidesToShow/2+1))+n.options.slidesToShow+2:(o=Math.max(0,n.currentSlide-(n.options.slidesToShow/2+1)),s=n.options.slidesToShow/2+1+2+n.currentSlide):(o=n.options.infinite?n.options.slidesToShow+n.currentSlide:n.currentSlide,s=Math.ceil(o+n.options.slidesToShow),!0===n.options.fade&&(o>0&&o--,s<=n.slideCount&&s++)),t=n.$slider.find(\".slick-slide\").slice(o,s),\"anticipated\"===n.options.lazyLoad)for(var r=o-1,l=s,d=n.$slider.find(\".slick-slide\"),a=0;a<n.options.slidesToScroll;a++)r<0&&(r=n.slideCount-1),t=(t=t.add(d.eq(r))).add(d.eq(l)),r--,l++;e(t),n.slideCount<=n.options.slidesToShow?e(n.$slider.find(\".slick-slide\")):n.currentSlide>=n.slideCount-n.options.slidesToShow?e(n.$slider.find(\".slick-cloned\").slice(0,n.options.slidesToShow)):0===n.currentSlide&&e(n.$slider.find(\".slick-cloned\").slice(-1*n.options.slidesToShow))},e.prototype.loadSlider=function(){var i=this;i.setPosition(),i.$slideTrack.css({opacity:1}),i.$slider.removeClass(\"slick-loading\"),i.initUI(),\"progressive\"===i.options.lazyLoad&&i.progressiveLazyLoad()},e.prototype.next=e.prototype.slickNext=function(){this.changeSlide({data:{message:\"next\"}})},e.prototype.orientationChange=function(){var i=this;i.checkResponsive(),i.setPosition()},e.prototype.pause=e.prototype.slickPause=function(){var i=this;i.autoPlayClear(),i.paused=!0},e.prototype.play=e.prototype.slickPlay=function(){var i=this;i.autoPlay(),i.options.autoplay=!0,i.paused=!1,i.focussed=!1,i.interrupted=!1},e.prototype.postSlide=function(e){var t=this;t.unslicked||(t.$slider.trigger(\"afterChange\",[t,e]),t.animating=!1,t.slideCount>t.options.slidesToShow&&t.setPosition(),t.swipeLeft=null,t.options.autoplay&&t.autoPlay(),!0===t.options.accessibility&&(t.initADA(),t.options.focusOnChange&&i(t.$slides.get(t.currentSlide)).attr(\"tabindex\",0).focus()))},e.prototype.prev=e.prototype.slickPrev=function(){this.changeSlide({data:{message:\"previous\"}})},e.prototype.preventDefault=function(i){i.preventDefault()},e.prototype.progressiveLazyLoad=function(e){e=e||1;var t,o,s,n,r,l=this,d=i(\"img[data-lazy]\",l.$slider);d.length?(t=d.first(),o=t.attr(\"data-lazy\"),s=t.attr(\"data-srcset\"),n=t.attr(\"data-sizes\")||l.$slider.attr(\"data-sizes\"),(r=document.createElement(\"img\")).onload=function(){s&&(t.attr(\"srcset\",s),n&&t.attr(\"sizes\",n)),t.attr(\"src\",o).removeAttr(\"data-lazy data-srcset data-sizes\").removeClass(\"slick-loading\"),!0===l.options.adaptiveHeight&&l.setPosition(),l.$slider.trigger(\"lazyLoaded\",[l,t,o]),l.progressiveLazyLoad()},r.onerror=function(){e<3?setTimeout(function(){l.progressiveLazyLoad(e+1)},500):(t.removeAttr(\"data-lazy\").removeClass(\"slick-loading\").addClass(\"slick-lazyload-error\"),l.$slider.trigger(\"lazyLoadError\",[l,t,o]),l.progressiveLazyLoad())},r.src=o):l.$slider.trigger(\"allImagesLoaded\",[l])},e.prototype.refresh=function(e){var t,o,s=this;o=s.slideCount-s.options.slidesToShow,!s.options.infinite&&s.currentSlide>o&&(s.currentSlide=o),s.slideCount<=s.options.slidesToShow&&(s.currentSlide=0),t=s.currentSlide,s.destroy(!0),i.extend(s,s.initials,{currentSlide:t}),s.init(),e||s.changeSlide({data:{message:\"index\",index:t}},!1)},e.prototype.registerBreakpoints=function(){var e,t,o,s=this,n=s.options.responsive||null;if(\"array\"===i.type(n)&&n.length){s.respondTo=s.options.respondTo||\"window\";for(e in n)if(o=s.breakpoints.length-1,n.hasOwnProperty(e)){for(t=n[e].breakpoint;o>=0;)s.breakpoints[o]&&s.breakpoints[o]===t&&s.breakpoints.splice(o,1),o--;s.breakpoints.push(t),s.breakpointSettings[t]=n[e].settings}s.breakpoints.sort(function(i,e){return s.options.mobileFirst?i-e:e-i})}},e.prototype.reinit=function(){var e=this;e.$slides=e.$slideTrack.children(e.options.slide).addClass(\"slick-slide\"),e.slideCount=e.$slides.length,e.currentSlide>=e.slideCount&&0!==e.currentSlide&&(e.currentSlide=e.currentSlide-e.options.slidesToScroll),e.slideCount<=e.options.slidesToShow&&(e.currentSlide=0),e.registerBreakpoints(),e.setProps(),e.setupInfinite(),e.buildArrows(),e.updateArrows(),e.initArrowEvents(),e.buildDots(),e.updateDots(),e.initDotEvents(),e.cleanUpSlideEvents(),e.initSlideEvents(),e.checkResponsive(!1,!0),!0===e.options.focusOnSelect&&i(e.$slideTrack).children().on(\"click.slick\",e.selectHandler),e.setSlideClasses(\"number\"==typeof e.currentSlide?e.currentSlide:0),e.setPosition(),e.focusHandler(),e.paused=!e.options.autoplay,e.autoPlay(),e.$slider.trigger(\"reInit\",[e])},e.prototype.resize=function(){var e=this;i(window).width()!==e.windowWidth&&(clearTimeout(e.windowDelay),e.windowDelay=window.setTimeout(function(){e.windowWidth=i(window).width(),e.checkResponsive(),e.unslicked||e.setPosition()},50))},e.prototype.removeSlide=e.prototype.slickRemove=function(i,e,t){var o=this;if(i=\"boolean\"==typeof i?!0===(e=i)?0:o.slideCount-1:!0===e?--i:i,o.slideCount<1||i<0||i>o.slideCount-1)return!1;o.unload(),!0===t?o.$slideTrack.children().remove():o.$slideTrack.children(this.options.slide).eq(i).remove(),o.$slides=o.$slideTrack.children(this.options.slide),o.$slideTrack.children(this.options.slide).detach(),o.$slideTrack.append(o.$slides),o.$slidesCache=o.$slides,o.reinit()},e.prototype.setCSS=function(i){var e,t,o=this,s={};!0===o.options.rtl&&(i=-i),e=\"left\"==o.positionProp?Math.ceil(i)+\"px\":\"0px\",t=\"top\"==o.positionProp?Math.ceil(i)+\"px\":\"0px\",s[o.positionProp]=i,!1===o.transformsEnabled?o.$slideTrack.css(s):(s={},!1===o.cssTransitions?(s[o.animType]=\"translate(\"+e+\", \"+t+\")\",o.$slideTrack.css(s)):(s[o.animType]=\"translate3d(\"+e+\", \"+t+\", 0px)\",o.$slideTrack.css(s)))},e.prototype.setDimensions=function(){var i=this;!1===i.options.vertical?!0===i.options.centerMode&&i.$list.css({padding:\"0px \"+i.options.centerPadding}):(i.$list.height(i.$slides.first().outerHeight(!0)*i.options.slidesToShow),!0===i.options.centerMode&&i.$list.css({padding:i.options.centerPadding+\" 0px\"})),i.listWidth=i.$list.width(),i.listHeight=i.$list.height(),!1===i.options.vertical&&!1===i.options.variableWidth?(i.slideWidth=Math.ceil(i.listWidth/i.options.slidesToShow),i.$slideTrack.width(Math.ceil(i.slideWidth*i.$slideTrack.children(\".slick-slide\").length))):!0===i.options.variableWidth?i.$slideTrack.width(5e3*i.slideCount):(i.slideWidth=Math.ceil(i.listWidth),i.$slideTrack.height(Math.ceil(i.$slides.first().outerHeight(!0)*i.$slideTrack.children(\".slick-slide\").length)));var e=i.$slides.first().outerWidth(!0)-i.$slides.first().width();!1===i.options.variableWidth&&i.$slideTrack.children(\".slick-slide\").width(i.slideWidth-e)},e.prototype.setFade=function(){var e,t=this;t.$slides.each(function(o,s){e=t.slideWidth*o*-1,!0===t.options.rtl?i(s).css({position:\"relative\",right:e,top:0,zIndex:t.options.zIndex-2,opacity:0}):i(s).css({position:\"relative\",left:e,top:0,zIndex:t.options.zIndex-2,opacity:0})}),t.$slides.eq(t.currentSlide).css({zIndex:t.options.zIndex-1,opacity:1})},e.prototype.setHeight=function(){var i=this;if(1===i.options.slidesToShow&&!0===i.options.adaptiveHeight&&!1===i.options.vertical){var e=i.$slides.eq(i.currentSlide).outerHeight(!0);i.$list.css(\"height\",e)}},e.prototype.setOption=e.prototype.slickSetOption=function(){var e,t,o,s,n,r=this,l=!1;if(\"object\"===i.type(arguments[0])?(o=arguments[0],l=arguments[1],n=\"multiple\"):\"string\"===i.type(arguments[0])&&(o=arguments[0],s=arguments[1],l=arguments[2],\"responsive\"===arguments[0]&&\"array\"===i.type(arguments[1])?n=\"responsive\":void 0!==arguments[1]&&(n=\"single\")),\"single\"===n)r.options[o]=s;else if(\"multiple\"===n)i.each(o,function(i,e){r.options[i]=e});else if(\"responsive\"===n)for(t in s)if(\"array\"!==i.type(r.options.responsive))r.options.responsive=[s[t]];else{for(e=r.options.responsive.length-1;e>=0;)r.options.responsive[e].breakpoint===s[t].breakpoint&&r.options.responsive.splice(e,1),e--;r.options.responsive.push(s[t])}l&&(r.unload(),r.reinit())},e.prototype.setPosition=function(){var i=this;i.setDimensions(),i.setHeight(),!1===i.options.fade?i.setCSS(i.getLeft(i.currentSlide)):i.setFade(),i.$slider.trigger(\"setPosition\",[i])},e.prototype.setProps=function(){var i=this,e=document.body.style;i.positionProp=!0===i.options.vertical?\"top\":\"left\",\"top\"===i.positionProp?i.$slider.addClass(\"slick-vertical\"):i.$slider.removeClass(\"slick-vertical\"),void 0===e.WebkitTransition&&void 0===e.MozTransition&&void 0===e.msTransition||!0===i.options.useCSS&&(i.cssTransitions=!0),i.options.fade&&(\"number\"==typeof i.options.zIndex?i.options.zIndex<3&&(i.options.zIndex=3):i.options.zIndex=i.defaults.zIndex),void 0!==e.OTransform&&(i.animType=\"OTransform\",i.transformType=\"-o-transform\",i.transitionType=\"OTransition\",void 0===e.perspectiveProperty&&void 0===e.webkitPerspective&&(i.animType=!1)),void 0!==e.MozTransform&&(i.animType=\"MozTransform\",i.transformType=\"-moz-transform\",i.transitionType=\"MozTransition\",void 0===e.perspectiveProperty&&void 0===e.MozPerspective&&(i.animType=!1)),void 0!==e.webkitTransform&&(i.animType=\"webkitTransform\",i.transformType=\"-webkit-transform\",i.transitionType=\"webkitTransition\",void 0===e.perspectiveProperty&&void 0===e.webkitPerspective&&(i.animType=!1)),void 0!==e.msTransform&&(i.animType=\"msTransform\",i.transformType=\"-ms-transform\",i.transitionType=\"msTransition\",void 0===e.msTransform&&(i.animType=!1)),void 0!==e.transform&&!1!==i.animType&&(i.animType=\"transform\",i.transformType=\"transform\",i.transitionType=\"transition\"),i.transformsEnabled=i.options.useTransform&&null!==i.animType&&!1!==i.animType},e.prototype.setSlideClasses=function(i){var e,t,o,s,n=this;if(t=n.$slider.find(\".slick-slide\").removeClass(\"slick-active slick-center slick-current\").attr(\"aria-hidden\",\"true\"),n.$slides.eq(i).addClass(\"slick-current\"),!0===n.options.centerMode){var r=n.options.slidesToShow%2==0?1:0;e=Math.floor(n.options.slidesToShow/2),!0===n.options.infinite&&(i>=e&&i<=n.slideCount-1-e?n.$slides.slice(i-e+r,i+e+1).addClass(\"slick-active\").attr(\"aria-hidden\",\"false\"):(o=n.options.slidesToShow+i,t.slice(o-e+1+r,o+e+2).addClass(\"slick-active\").attr(\"aria-hidden\",\"false\")),0===i?t.eq(t.length-1-n.options.slidesToShow).addClass(\"slick-center\"):i===n.slideCount-1&&t.eq(n.options.slidesToShow).addClass(\"slick-center\")),n.$slides.eq(i).addClass(\"slick-center\")}else i>=0&&i<=n.slideCount-n.options.slidesToShow?n.$slides.slice(i,i+n.options.slidesToShow).addClass(\"slick-active\").attr(\"aria-hidden\",\"false\"):t.length<=n.options.slidesToShow?t.addClass(\"slick-active\").attr(\"aria-hidden\",\"false\"):(s=n.slideCount%n.options.slidesToShow,o=!0===n.options.infinite?n.options.slidesToShow+i:i,n.options.slidesToShow==n.options.slidesToScroll&&n.slideCount-i<n.options.slidesToShow?t.slice(o-(n.options.slidesToShow-s),o+s).addClass(\"slick-active\").attr(\"aria-hidden\",\"false\"):t.slice(o,o+n.options.slidesToShow).addClass(\"slick-active\").attr(\"aria-hidden\",\"false\"));\"ondemand\"!==n.options.lazyLoad&&\"anticipated\"!==n.options.lazyLoad||n.lazyLoad()},e.prototype.setupInfinite=function(){var e,t,o,s=this;if(!0===s.options.fade&&(s.options.centerMode=!1),!0===s.options.infinite&&!1===s.options.fade&&(t=null,s.slideCount>s.options.slidesToShow)){for(o=!0===s.options.centerMode?s.options.slidesToShow+1:s.options.slidesToShow,e=s.slideCount;e>s.slideCount-o;e-=1)t=e-1,i(s.$slides[t]).clone(!0).attr(\"id\",\"\").attr(\"data-slick-index\",t-s.slideCount).prependTo(s.$slideTrack).addClass(\"slick-cloned\");for(e=0;e<o+s.slideCount;e+=1)t=e,i(s.$slides[t]).clone(!0).attr(\"id\",\"\").attr(\"data-slick-index\",t+s.slideCount).appendTo(s.$slideTrack).addClass(\"slick-cloned\");s.$slideTrack.find(\".slick-cloned\").find(\"[id]\").each(function(){i(this).attr(\"id\",\"\")})}},e.prototype.interrupt=function(i){var e=this;i||e.autoPlay(),e.interrupted=i},e.prototype.selectHandler=function(e){var t=this,o=i(e.target).is(\".slick-slide\")?i(e.target):i(e.target).parents(\".slick-slide\"),s=parseInt(o.attr(\"data-slick-index\"));s||(s=0),t.slideCount<=t.options.slidesToShow?t.slideHandler(s,!1,!0):t.slideHandler(s)},e.prototype.slideHandler=function(i,e,t){var o,s,n,r,l,d=null,a=this;if(e=e||!1,!(!0===a.animating&&!0===a.options.waitForAnimate||!0===a.options.fade&&a.currentSlide===i))if(!1===e&&a.asNavFor(i),o=i,d=a.getLeft(o),r=a.getLeft(a.currentSlide),a.currentLeft=null===a.swipeLeft?r:a.swipeLeft,!1===a.options.infinite&&!1===a.options.centerMode&&(i<0||i>a.getDotCount()*a.options.slidesToScroll))!1===a.options.fade&&(o=a.currentSlide,!0!==t?a.animateSlide(r,function(){a.postSlide(o)}):a.postSlide(o));else if(!1===a.options.infinite&&!0===a.options.centerMode&&(i<0||i>a.slideCount-a.options.slidesToScroll))!1===a.options.fade&&(o=a.currentSlide,!0!==t?a.animateSlide(r,function(){a.postSlide(o)}):a.postSlide(o));else{if(a.options.autoplay&&clearInterval(a.autoPlayTimer),s=o<0?a.slideCount%a.options.slidesToScroll!=0?a.slideCount-a.slideCount%a.options.slidesToScroll:a.slideCount+o:o>=a.slideCount?a.slideCount%a.options.slidesToScroll!=0?0:o-a.slideCount:o,a.animating=!0,a.$slider.trigger(\"beforeChange\",[a,a.currentSlide,s]),n=a.currentSlide,a.currentSlide=s,a.setSlideClasses(a.currentSlide),a.options.asNavFor&&(l=(l=a.getNavTarget()).slick(\"getSlick\")).slideCount<=l.options.slidesToShow&&l.setSlideClasses(a.currentSlide),a.updateDots(),a.updateArrows(),!0===a.options.fade)return!0!==t?(a.fadeSlideOut(n),a.fadeSlide(s,function(){a.postSlide(s)})):a.postSlide(s),void a.animateHeight();!0!==t?a.animateSlide(d,function(){a.postSlide(s)}):a.postSlide(s)}},e.prototype.startLoad=function(){var i=this;!0===i.options.arrows&&i.slideCount>i.options.slidesToShow&&(i.$prevArrow.hide(),i.$nextArrow.hide()),!0===i.options.dots&&i.slideCount>i.options.slidesToShow&&i.$dots.hide(),i.$slider.addClass(\"slick-loading\")},e.prototype.swipeDirection=function(){var i,e,t,o,s=this;return i=s.touchObject.startX-s.touchObject.curX,e=s.touchObject.startY-s.touchObject.curY,t=Math.atan2(e,i),(o=Math.round(180*t/Math.PI))<0&&(o=360-Math.abs(o)),o<=45&&o>=0?!1===s.options.rtl?\"left\":\"right\":o<=360&&o>=315?!1===s.options.rtl?\"left\":\"right\":o>=135&&o<=225?!1===s.options.rtl?\"right\":\"left\":!0===s.options.verticalSwiping?o>=35&&o<=135?\"down\":\"up\":\"vertical\"},e.prototype.swipeEnd=function(i){var e,t,o=this;if(o.dragging=!1,o.swiping=!1,o.scrolling)return o.scrolling=!1,!1;if(o.interrupted=!1,o.shouldClick=!(o.touchObject.swipeLength>10),void 0===o.touchObject.curX)return!1;if(!0===o.touchObject.edgeHit&&o.$slider.trigger(\"edge\",[o,o.swipeDirection()]),o.touchObject.swipeLength>=o.touchObject.minSwipe){switch(t=o.swipeDirection()){case\"left\":case\"down\":e=o.options.swipeToSlide?o.checkNavigable(o.currentSlide+o.getSlideCount()):o.currentSlide+o.getSlideCount(),o.currentDirection=0;break;case\"right\":case\"up\":e=o.options.swipeToSlide?o.checkNavigable(o.currentSlide-o.getSlideCount()):o.currentSlide-o.getSlideCount(),o.currentDirection=1}\"vertical\"!=t&&(o.slideHandler(e),o.touchObject={},o.$slider.trigger(\"swipe\",[o,t]))}else o.touchObject.startX!==o.touchObject.curX&&(o.slideHandler(o.currentSlide),o.touchObject={})},e.prototype.swipeHandler=function(i){var e=this;if(!(!1===e.options.swipe||\"ontouchend\"in document&&!1===e.options.swipe||!1===e.options.draggable&&-1!==i.type.indexOf(\"mouse\")))switch(e.touchObject.fingerCount=i.originalEvent&&void 0!==i.originalEvent.touches?i.originalEvent.touches.length:1,e.touchObject.minSwipe=e.listWidth/e.options.touchThreshold,!0===e.options.verticalSwiping&&(e.touchObject.minSwipe=e.listHeight/e.options.touchThreshold),i.data.action){case\"start\":e.swipeStart(i);break;case\"move\":e.swipeMove(i);break;case\"end\":e.swipeEnd(i)}},e.prototype.swipeMove=function(i){var e,t,o,s,n,r,l=this;return n=void 0!==i.originalEvent?i.originalEvent.touches:null,!(!l.dragging||l.scrolling||n&&1!==n.length)&&(e=l.getLeft(l.currentSlide),l.touchObject.curX=void 0!==n?n[0].pageX:i.clientX,l.touchObject.curY=void 0!==n?n[0].pageY:i.clientY,l.touchObject.swipeLength=Math.round(Math.sqrt(Math.pow(l.touchObject.curX-l.touchObject.startX,2))),r=Math.round(Math.sqrt(Math.pow(l.touchObject.curY-l.touchObject.startY,2))),!l.options.verticalSwiping&&!l.swiping&&r>4?(l.scrolling=!0,!1):(!0===l.options.verticalSwiping&&(l.touchObject.swipeLength=r),t=l.swipeDirection(),void 0!==i.originalEvent&&l.touchObject.swipeLength>4&&(l.swiping=!0,i.preventDefault()),s=(!1===l.options.rtl?1:-1)*(l.touchObject.curX>l.touchObject.startX?1:-1),!0===l.options.verticalSwiping&&(s=l.touchObject.curY>l.touchObject.startY?1:-1),o=l.touchObject.swipeLength,l.touchObject.edgeHit=!1,!1===l.options.infinite&&(0===l.currentSlide&&\"right\"===t||l.currentSlide>=l.getDotCount()&&\"left\"===t)&&(o=l.touchObject.swipeLength*l.options.edgeFriction,l.touchObject.edgeHit=!0),!1===l.options.vertical?l.swipeLeft=e+o*s:l.swipeLeft=e+o*(l.$list.height()/l.listWidth)*s,!0===l.options.verticalSwiping&&(l.swipeLeft=e+o*s),!0!==l.options.fade&&!1!==l.options.touchMove&&(!0===l.animating?(l.swipeLeft=null,!1):void l.setCSS(l.swipeLeft))))},e.prototype.swipeStart=function(i){var e,t=this;if(t.interrupted=!0,1!==t.touchObject.fingerCount||t.slideCount<=t.options.slidesToShow)return t.touchObject={},!1;void 0!==i.originalEvent&&void 0!==i.originalEvent.touches&&(e=i.originalEvent.touches[0]),t.touchObject.startX=t.touchObject.curX=void 0!==e?e.pageX:i.clientX,t.touchObject.startY=t.touchObject.curY=void 0!==e?e.pageY:i.clientY,t.dragging=!0},e.prototype.unfilterSlides=e.prototype.slickUnfilter=function(){var i=this;null!==i.$slidesCache&&(i.unload(),i.$slideTrack.children(this.options.slide).detach(),i.$slidesCache.appendTo(i.$slideTrack),i.reinit())},e.prototype.unload=function(){var e=this;i(\".slick-cloned\",e.$slider).remove(),e.$dots&&e.$dots.remove(),e.$prevArrow&&e.htmlExpr.test(e.options.prevArrow)&&e.$prevArrow.remove(),e.$nextArrow&&e.htmlExpr.test(e.options.nextArrow)&&e.$nextArrow.remove(),e.$slides.removeClass(\"slick-slide slick-active slick-visible slick-current\").attr(\"aria-hidden\",\"true\").css(\"width\",\"\")},e.prototype.unslick=function(i){var e=this;e.$slider.trigger(\"unslick\",[e,i]),e.destroy()},e.prototype.updateArrows=function(){var i=this;Math.floor(i.options.slidesToShow/2),!0===i.options.arrows&&i.slideCount>i.options.slidesToShow&&!i.options.infinite&&(i.$prevArrow.removeClass(\"slick-disabled\").attr(\"aria-disabled\",\"false\"),i.$nextArrow.removeClass(\"slick-disabled\").attr(\"aria-disabled\",\"false\"),0===i.currentSlide?(i.$prevArrow.addClass(\"slick-disabled\").attr(\"aria-disabled\",\"true\"),i.$nextArrow.removeClass(\"slick-disabled\").attr(\"aria-disabled\",\"false\")):i.currentSlide>=i.slideCount-i.options.slidesToShow&&!1===i.options.centerMode?(i.$nextArrow.addClass(\"slick-disabled\").attr(\"aria-disabled\",\"true\"),i.$prevArrow.removeClass(\"slick-disabled\").attr(\"aria-disabled\",\"false\")):i.currentSlide>=i.slideCount-1&&!0===i.options.centerMode&&(i.$nextArrow.addClass(\"slick-disabled\").attr(\"aria-disabled\",\"true\"),i.$prevArrow.removeClass(\"slick-disabled\").attr(\"aria-disabled\",\"false\")))},e.prototype.updateDots=function(){var i=this;null!==i.$dots&&(i.$dots.find(\"li\").removeClass(\"slick-active\").end(),i.$dots.find(\"li\").eq(Math.floor(i.currentSlide/i.options.slidesToScroll)).addClass(\"slick-active\"))},e.prototype.visibility=function(){var i=this;i.options.autoplay&&(document[i.hidden]?i.interrupted=!0:i.interrupted=!1)},i.fn.slick=function(){var i,t,o=this,s=arguments[0],n=Array.prototype.slice.call(arguments,1),r=o.length;for(i=0;i<r;i++)if(\"object\"==typeof s||void 0===s?o[i].slick=new e(o[i],s):t=o[i].slick[s].apply(o[i].slick,n),void 0!==t)return t;return o}});\r\n","/**\r\n * @license\r\n * Video.js 7.11.8 <http://videojs.com/>\r\n * Copyright Brightcove, Inc. <https://www.brightcove.com/>\r\n * Available under Apache License Version 2.0\r\n * <https://github.com/videojs/video.js/blob/main/LICENSE>\r\n *\r\n * Includes vtt.js <https://github.com/mozilla/vtt.js>\r\n * Available under Apache License Version 2.0\r\n * <https://github.com/mozilla/vtt.js/blob/main/LICENSE>\r\n */\r\n !function(e,t){\"object\"==typeof exports&&\"undefined\"!=typeof module?module.exports=t():\"function\"==typeof define&&define.amd?define(t):(e=e||self).videojs=t()}(this,function(){\"use strict\";var d=\"7.11.8\",e=\"undefined\"!=typeof globalThis?globalThis:\"undefined\"!=typeof window?window:\"undefined\"!=typeof global?global:\"undefined\"!=typeof self?self:{};function t(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,\"default\")?e.default:e}function i(e,t){return e(t={exports:{}},t.exports),t.exports}for(var n,h=\"undefined\"!=typeof window?window:\"undefined\"!=typeof e?e:\"undefined\"!=typeof self?self:{},r={},a=\"undefined\"!=typeof e?e:\"undefined\"!=typeof window?window:{},p=\"undefined\"!=typeof document?document:a[\"__GLOBAL_DOCUMENT_CACHE@4\"]||(a[\"__GLOBAL_DOCUMENT_CACHE@4\"]=r),f={prefixed:!0},s=[[\"requestFullscreen\",\"exitFullscreen\",\"fullscreenElement\",\"fullscreenEnabled\",\"fullscreenchange\",\"fullscreenerror\",\"fullscreen\"],[\"webkitRequestFullscreen\",\"webkitExitFullscreen\",\"webkitFullscreenElement\",\"webkitFullscreenEnabled\",\"webkitfullscreenchange\",\"webkitfullscreenerror\",\"-webkit-full-screen\"],[\"mozRequestFullScreen\",\"mozCancelFullScreen\",\"mozFullScreenElement\",\"mozFullScreenEnabled\",\"mozfullscreenchange\",\"mozfullscreenerror\",\"-moz-full-screen\"],[\"msRequestFullscreen\",\"msExitFullscreen\",\"msFullscreenElement\",\"msFullscreenEnabled\",\"MSFullscreenChange\",\"MSFullscreenError\",\"-ms-fullscreen\"]],o=s[0],u=0;u<s.length;u++)if(s[u][1]in p){n=s[u];break}if(n){for(var l=0;l<n.length;l++)f[o[l]]=n[l];f.prefixed=n[0]!==o[0]}var c=[],m=function(o,u){return function(e,t,i){var n=u.levels[t],r=new RegExp(\"^(\"+n+\")$\");if(\"log\"!==e&&i.unshift(e.toUpperCase()+\":\"),i.unshift(o+\":\"),c){c.push([].concat(i));var a=c.length-1e3;c.splice(0,0<a?a:0)}if(h.console){var s=h.console[e];s||\"debug\"!==e||(s=h.console.info||h.console.log),s&&n&&r.test(e)&&s[Array.isArray(i)?\"apply\":\"call\"](h.console,i)}}};var g=function t(i){function n(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];r(\"log\",a,t)}var r,a=\"info\";return r=m(i,n),n.createLogger=function(e){return t(i+\": \"+e)},n.levels={all:\"debug|log|warn|error\",off:\"\",debug:\"debug|log|warn|error\",info:\"log|warn|error\",warn:\"warn|error\",error:\"error\",DEFAULT:a},n.level=function(e){if(\"string\"==typeof e){if(!n.levels.hasOwnProperty(e))throw new Error('\"'+e+'\" in not a valid log level');a=e}return a},(n.history=function(){return c?[].concat(c):[]}).filter=function(t){return(c||[]).filter(function(e){return new RegExp(\".*\"+t+\".*\").test(e[0])})},n.history.clear=function(){c&&(c.length=0)},n.history.disable=function(){null!==c&&(c.length=0,c=null)},n.history.enable=function(){null===c&&(c=[])},n.error=function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return r(\"error\",a,t)},n.warn=function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return r(\"warn\",a,t)},n.debug=function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return r(\"debug\",a,t)},n}(\"VIDEOJS\"),v=g.createLogger,y=i(function(e){function t(){return e.exports=t=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},t.apply(this,arguments)}e.exports=t}),_=Object.prototype.toString,b=function(e){return k(e)?Object.keys(e):[]};function T(t,i){b(t).forEach(function(e){return i(t[e],e)})}function S(i){for(var e=arguments.length,t=new Array(1<e?e-1:0),n=1;n<e;n++)t[n-1]=arguments[n];return Object.assign?y.apply(void 0,[i].concat(t)):(t.forEach(function(e){e&&T(e,function(e,t){i[t]=e})}),i)}function k(e){return!!e&&\"object\"==typeof e}function w(e){return k(e)&&\"[object Object]\"===_.call(e)&&e.constructor===Object}function E(e,t){if(!e||!t)return\"\";if(\"function\"!=typeof h.getComputedStyle)return\"\";var i=h.getComputedStyle(e);return i?i.getPropertyValue(t)||i[t]:\"\"}var C,I,x,A,P=h.navigator&&h.navigator.userAgent||\"\",L=/AppleWebKit\\/([\\d.]+)/i.exec(P),O=L?parseFloat(L.pop()):null,D=/iPod/i.test(P),R=(C=P.match(/OS (\\d+)_/i))&&C[1]?C[1]:null,M=/Android/i.test(P),N=function(){var e=P.match(/Android (\\d+)(?:\\.(\\d+))?(?:\\.(\\d+))*/i);if(!e)return null;var t=e[1]&&parseFloat(e[1]),i=e[2]&&parseFloat(e[2]);return t&&i?parseFloat(e[1]+\".\"+e[2]):t||null}(),U=M&&N<5&&O<537,B=/Firefox/i.test(P),F=/Edg/i.test(P),j=!F&&(/Chrome/i.test(P)||/CriOS/i.test(P)),V=(I=P.match(/(Chrome|CriOS)\\/(\\d+)/))&&I[2]?parseFloat(I[2]):null,q=(x=/MSIE\\s(\\d+)\\.\\d/.exec(P),!(A=x&&parseFloat(x[1]))&&/Trident\\/7.0/i.test(P)&&/rv:11.0/.test(P)&&(A=11),A),H=/Safari/i.test(P)&&!j&&!M&&!F,W=/Windows/i.test(P),z=Boolean(Z()&&(\"ontouchstart\"in h||h.navigator.maxTouchPoints||h.DocumentTouch&&h.document instanceof h.DocumentTouch)),G=/iPad/i.test(P)||H&&z&&!/iPhone/i.test(P),X=/iPhone/i.test(P)&&!G,K=X||G||D,Q=(H||K)&&!j,Y=Object.freeze({__proto__:null,IS_IPOD:D,IOS_VERSION:R,IS_ANDROID:M,ANDROID_VERSION:N,IS_NATIVE_ANDROID:U,IS_FIREFOX:B,IS_EDGE:F,IS_CHROME:j,CHROME_VERSION:V,IE_VERSION:q,IS_SAFARI:H,IS_WINDOWS:W,TOUCH_ENABLED:z,IS_IPAD:G,IS_IPHONE:X,IS_IOS:K,IS_ANY_SAFARI:Q});function $(e){return\"string\"==typeof e&&Boolean(e.trim())}function J(e){if(0<=e.indexOf(\" \"))throw new Error(\"class has illegal whitespace characters\")}function Z(){return p===h.document}function ee(e){return k(e)&&1===e.nodeType}function te(){try{return h.parent!==h.self}catch(e){return!0}}function ie(n){return function(e,t){if(!$(e))return p[n](null);$(t)&&(t=p.querySelector(t));var i=ee(t)?t:p;return i[n]&&i[n](e)}}function ne(e,i,t,n){void 0===e&&(e=\"div\"),void 0===i&&(i={}),void 0===t&&(t={});var r=p.createElement(e);return Object.getOwnPropertyNames(i).forEach(function(e){var t=i[e];-1!==e.indexOf(\"aria-\")||\"role\"===e||\"type\"===e?(g.warn(\"Setting attributes in the second argument of createEl()\\nhas been deprecated. Use the third argument instead.\\ncreateEl(type, properties, attributes). Attempting to set \"+e+\" to \"+t+\".\"),r.setAttribute(e,t)):\"textContent\"===e?re(r,t):r[e]===t&&\"tabIndex\"!==e||(r[e]=t)}),Object.getOwnPropertyNames(t).forEach(function(e){r.setAttribute(e,t[e])}),n&&ke(r,n),r}function re(e,t){return\"undefined\"==typeof e.textContent?e.innerText=t:e.textContent=t,e}function ae(e,t){t.firstChild?t.insertBefore(e,t.firstChild):t.appendChild(e)}function se(e,t){return J(t),e.classList?e.classList.contains(t):function(e){return new RegExp(\"(^|\\\\s)\"+e+\"($|\\\\s)\")}(t).test(e.className)}function oe(e,t){return e.classList?e.classList.add(t):se(e,t)||(e.className=(e.className+\" \"+t).trim()),e}function ue(e,t){return e.classList?e.classList.remove(t):(J(t),e.className=e.className.split(/\\s+/).filter(function(e){return e!==t}).join(\" \")),e}function le(e,t,i){var n=se(e,t);if(\"function\"==typeof i&&(i=i(e,t)),\"boolean\"!=typeof i&&(i=!n),i!==n)return i?oe(e,t):ue(e,t),e}function ce(i,n){Object.getOwnPropertyNames(n).forEach(function(e){var t=n[e];null===t||\"undefined\"==typeof t||!1===t?i.removeAttribute(e):i.setAttribute(e,!0===t?\"\":t)})}function de(e){var t={},i=\",autoplay,controls,playsinline,loop,muted,default,defaultMuted,\";if(e&&e.attributes&&0<e.attributes.length)for(var n=e.attributes,r=n.length-1;0<=r;r--){var a=n[r].name,s=n[r].value;\"boolean\"!=typeof e[a]&&-1===i.indexOf(\",\"+a+\",\")||(s=null!==s),t[a]=s}return t}function he(e,t){return e.getAttribute(t)}function pe(e,t,i){e.setAttribute(t,i)}function fe(e,t){e.removeAttribute(t)}function me(){p.body.focus(),p.onselectstart=function(){return!1}}function ge(){p.onselectstart=function(){return!0}}function ve(e){if(e&&e.getBoundingClientRect&&e.parentNode){var t=e.getBoundingClientRect(),i={};return[\"bottom\",\"height\",\"left\",\"right\",\"top\",\"width\"].forEach(function(e){void 0!==t[e]&&(i[e]=t[e])}),i.height||(i.height=parseFloat(E(e,\"height\"))),i.width||(i.width=parseFloat(E(e,\"width\"))),i}}function ye(e){if(!e||e&&!e.offsetParent)return{left:0,top:0,width:0,height:0};for(var t=e.offsetWidth,i=e.offsetHeight,n=0,r=0;e.offsetParent&&e!==p[f.fullscreenElement];)n+=e.offsetLeft,r+=e.offsetTop,e=e.offsetParent;return{left:n,top:r,width:t,height:i}}function _e(e,t){var i={x:0,y:0};if(K)for(var n=e;n&&\"html\"!==n.nodeName.toLowerCase();){var r=E(n,\"transform\");if(/^matrix/.test(r)){var a=r.slice(7,-1).split(/,\\s/).map(Number);i.x+=a[4],i.y+=a[5]}else if(/^matrix3d/.test(r)){var s=r.slice(9,-1).split(/,\\s/).map(Number);i.x+=s[12],i.y+=s[13]}n=n.parentNode}var o={},u=ye(t.target),l=ye(e),c=l.width,d=l.height,h=t.offsetY-(l.top-u.top),p=t.offsetX-(l.left-u.left);return t.changedTouches&&(p=t.changedTouches[0].pageX-l.left,h=t.changedTouches[0].pageY+l.top,K&&(p-=i.x,h-=i.y)),o.y=1-Math.max(0,Math.min(1,h/d)),o.x=Math.max(0,Math.min(1,p/c)),o}function be(e){return k(e)&&3===e.nodeType}function Te(e){for(;e.firstChild;)e.removeChild(e.firstChild);return e}function Se(e){return\"function\"==typeof e&&(e=e()),(Array.isArray(e)?e:[e]).map(function(e){return\"function\"==typeof e&&(e=e()),ee(e)||be(e)?e:\"string\"==typeof e&&/\\S/.test(e)?p.createTextNode(e):void 0}).filter(function(e){return e})}function ke(t,e){return Se(e).forEach(function(e){return t.appendChild(e)}),t}function we(e,t){return ke(Te(e),t)}function Ee(e){return void 0===e.button&&void 0===e.buttons||(0===e.button&&void 0===e.buttons||(\"mouseup\"===e.type&&0===e.button&&0===e.buttons||0===e.button&&1===e.buttons))}var Ce,Ie=ie(\"querySelector\"),xe=ie(\"querySelectorAll\"),Ae=Object.freeze({__proto__:null,isReal:Z,isEl:ee,isInFrame:te,createEl:ne,textContent:re,prependTo:ae,hasClass:se,addClass:oe,removeClass:ue,toggleClass:le,setAttributes:ce,getAttributes:de,getAttribute:he,setAttribute:pe,removeAttribute:fe,blockTextSelection:me,unblockTextSelection:ge,getBoundingClientRect:ve,findPosition:ye,getPointerPosition:_e,isTextNode:be,emptyEl:Te,normalizeContent:Se,appendContent:ke,insertContent:we,isSingleLeftClick:Ee,$:Ie,$$:xe}),Pe=!1,Le=function(){if(Z()&&!1!==Ce.options.autoSetup){var e=Array.prototype.slice.call(p.getElementsByTagName(\"video\")),t=Array.prototype.slice.call(p.getElementsByTagName(\"audio\")),i=Array.prototype.slice.call(p.getElementsByTagName(\"video-js\")),n=e.concat(t,i);if(n&&0<n.length)for(var r=0,a=n.length;r<a;r++){var s=n[r];if(!s||!s.getAttribute){Oe(1);break}void 0===s.player&&null!==s.getAttribute(\"data-setup\")&&Ce(s)}else Pe||Oe(1)}};function Oe(e,t){t&&(Ce=t),h.setTimeout(Le,e)}function De(){Pe=!0,h.removeEventListener(\"load\",De)}Z()&&(\"complete\"===p.readyState?De():h.addEventListener(\"load\",De));function Re(e){var t=p.createElement(\"style\");return t.className=e,t}function Me(e,t){e.styleSheet?e.styleSheet.cssText=t:e.textContent=t}var Ne,Ue=3;function Be(){return Ue++}h.WeakMap||(Ne=function(){function e(){this.vdata=\"vdata\"+Math.floor(h.performance&&h.performance.now()||Date.now()),this.data={}}var t=e.prototype;return t.set=function(e,t){var i=e[this.vdata]||Be();return e[this.vdata]||(e[this.vdata]=i),this.data[i]=t,this},t.get=function(e){var t=e[this.vdata];if(t)return this.data[t];g(\"We have no data for this element\",e)},t.has=function(e){return e[this.vdata]in this.data},t.delete=function(e){var t=e[this.vdata];t&&(delete this.data[t],delete e[this.vdata])},e}());var Fe,je=h.WeakMap?new WeakMap:new Ne;function Ve(e,t){if(je.has(e)){var i=je.get(e);0===i.handlers[t].length&&(delete i.handlers[t],e.removeEventListener?e.removeEventListener(t,i.dispatcher,!1):e.detachEvent&&e.detachEvent(\"on\"+t,i.dispatcher)),Object.getOwnPropertyNames(i.handlers).length<=0&&(delete i.handlers,delete i.dispatcher,delete i.disabled),0===Object.getOwnPropertyNames(i).length&&je.delete(e)}}function qe(t,i,e,n){e.forEach(function(e){t(i,e,n)})}function He(e){if(e.fixed_)return e;function t(){return!0}function i(){return!1}if(!e||!e.isPropagationStopped){var n=e||h.event;for(var r in e={},n)\"layerX\"!==r&&\"layerY\"!==r&&\"keyLocation\"!==r&&\"webkitMovementX\"!==r&&\"webkitMovementY\"!==r&&(\"returnValue\"===r&&n.preventDefault||(e[r]=n[r]));if(e.target||(e.target=e.srcElement||p),e.relatedTarget||(e.relatedTarget=e.fromElement===e.target?e.toElement:e.fromElement),e.preventDefault=function(){n.preventDefault&&n.preventDefault(),e.returnValue=!1,n.returnValue=!1,e.defaultPrevented=!0},e.defaultPrevented=!1,e.stopPropagation=function(){n.stopPropagation&&n.stopPropagation(),e.cancelBubble=!0,n.cancelBubble=!0,e.isPropagationStopped=t},e.isPropagationStopped=i,e.stopImmediatePropagation=function(){n.stopImmediatePropagation&&n.stopImmediatePropagation(),e.isImmediatePropagationStopped=t,e.stopPropagation()},e.isImmediatePropagationStopped=i,null!==e.clientX&&void 0!==e.clientX){var a=p.documentElement,s=p.body;e.pageX=e.clientX+(a&&a.scrollLeft||s&&s.scrollLeft||0)-(a&&a.clientLeft||s&&s.clientLeft||0),e.pageY=e.clientY+(a&&a.scrollTop||s&&s.scrollTop||0)-(a&&a.clientTop||s&&s.clientTop||0)}e.which=e.charCode||e.keyCode,null!==e.button&&void 0!==e.button&&(e.button=1&e.button?0:4&e.button?1:2&e.button?2:0)}return e.fixed_=!0,e}var We=function(){if(\"boolean\"!=typeof Fe){Fe=!1;try{var e=Object.defineProperty({},\"passive\",{get:function(){Fe=!0}});h.addEventListener(\"test\",null,e),h.removeEventListener(\"test\",null,e)}catch(e){}}return Fe},ze=[\"touchstart\",\"touchmove\"];function Ge(s,e,t){if(Array.isArray(e))return qe(Ge,s,e,t);je.has(s)||je.set(s,{});var o=je.get(s);if(o.handlers||(o.handlers={}),o.handlers[e]||(o.handlers[e]=[]),t.guid||(t.guid=Be()),o.handlers[e].push(t),o.dispatcher||(o.disabled=!1,o.dispatcher=function(e,t){if(!o.disabled){e=He(e);var i=o.handlers[e.type];if(i)for(var n=i.slice(0),r=0,a=n.length;r<a&&!e.isImmediatePropagationStopped();r++)try{n[r].call(s,e,t)}catch(e){g.error(e)}}}),1===o.handlers[e].length)if(s.addEventListener){var i=!1;We()&&-1<ze.indexOf(e)&&(i={passive:!0}),s.addEventListener(e,o.dispatcher,i)}else s.attachEvent&&s.attachEvent(\"on\"+e,o.dispatcher)}function Xe(e,t,i){if(je.has(e)){var n=je.get(e);if(n.handlers){if(Array.isArray(t))return qe(Xe,e,t,i);var r=function(e,t){n.handlers[t]=[],Ve(e,t)};if(void 0!==t){var a=n.handlers[t];if(a)if(i){if(i.guid)for(var s=0;s<a.length;s++)a[s].guid===i.guid&&a.splice(s--,1);Ve(e,t)}else r(e,t)}else for(var o in n.handlers)Object.prototype.hasOwnProperty.call(n.handlers||{},o)&&r(e,o)}}}function Ke(e,t,i){var n=je.has(e)?je.get(e):{},r=e.parentNode||e.ownerDocument;if(\"string\"==typeof t?t={type:t,target:e}:t.target||(t.target=e),t=He(t),n.dispatcher&&n.dispatcher.call(e,t,i),r&&!t.isPropagationStopped()&&!0===t.bubbles)Ke.call(null,r,t,i);else if(!r&&!t.defaultPrevented&&t.target&&t.target[t.type]){je.has(t.target)||je.set(t.target,{});var a=je.get(t.target);t.target[t.type]&&(a.disabled=!0,\"function\"==typeof t.target[t.type]&&t.target[t.type](),a.disabled=!1)}return!t.defaultPrevented}function Qe(e,t,i){if(Array.isArray(t))return qe(Qe,e,t,i);function n(){Xe(e,t,n),i.apply(this,arguments)}n.guid=i.guid=i.guid||Be(),Ge(e,t,n)}function Ye(e,t,i){function n(){Xe(e,t,n),i.apply(this,arguments)}n.guid=i.guid=i.guid||Be(),Ge(e,t,n)}function $e(e,t,i){t.guid||(t.guid=Be());var n=t.bind(e);return n.guid=i?i+\"_\"+t.guid:t.guid,n}function Je(t,i){var n=h.performance.now();return function(){var e=h.performance.now();i<=e-n&&(t.apply(void 0,arguments),n=e)}}function Ze(){}var et,tt=Object.freeze({__proto__:null,fixEvent:He,on:Ge,off:Xe,trigger:Ke,one:Qe,any:Ye});Ze.prototype.allowedEvents_={},Ze.prototype.addEventListener=Ze.prototype.on=function(e,t){var i=this.addEventListener;this.addEventListener=function(){},Ge(this,e,t),this.addEventListener=i},Ze.prototype.removeEventListener=Ze.prototype.off=function(e,t){Xe(this,e,t)},Ze.prototype.one=function(e,t){var i=this.addEventListener;this.addEventListener=function(){},Qe(this,e,t),this.addEventListener=i},Ze.prototype.any=function(e,t){var i=this.addEventListener;this.addEventListener=function(){},Ye(this,e,t),this.addEventListener=i},Ze.prototype.dispatchEvent=Ze.prototype.trigger=function(e){var t=e.type||e;\"string\"==typeof e&&(e={type:t}),e=He(e),this.allowedEvents_[t]&&this[\"on\"+t]&&this[\"on\"+t](e),Ke(this,e)},Ze.prototype.queueTrigger=function(e){var t=this;et=et||new Map;var i=e.type||e,n=et.get(this);n||(n=new Map,et.set(this,n));var r=n.get(i);n.delete(i),h.clearTimeout(r);var a=h.setTimeout(function(){0===n.size&&(n=null,et.delete(t)),t.trigger(e)},0);n.set(i,a)};function it(e){return\"function\"==typeof e.name?e.name():\"string\"==typeof e.name?e.name:e.name_?e.name_:e.constructor&&e.constructor.name?e.constructor.name:typeof e}function nt(e){return\"string\"==typeof e&&/\\S/.test(e)||Array.isArray(e)&&!!e.length}function rt(e,t,i){if(!e||!e.nodeName&&!lt(e))throw new Error(\"Invalid target for \"+it(t)+\"#\"+i+\"; must be a DOM node or evented object.\")}function at(e,t,i){if(!nt(e))throw new Error(\"Invalid event type for \"+it(t)+\"#\"+i+\"; must be a non-empty string or array.\")}function st(e,t,i){if(\"function\"!=typeof e)throw new Error(\"Invalid listener for \"+it(t)+\"#\"+i+\"; must be a function.\")}function ot(e,t,i){var n,r,a,s=t.length<3||t[0]===e||t[0]===e.eventBusEl_;return a=s?(n=e.eventBusEl_,3<=t.length&&t.shift(),r=t[0],t[1]):(n=t[0],r=t[1],t[2]),rt(n,e,i),at(r,e,i),st(a,e,i),{isTargetingSelf:s,target:n,type:r,listener:a=$e(e,a)}}function ut(e,t,i,n){rt(e,e,t),e.nodeName?tt[t](e,i,n):e[t](i,n)}var lt=function(t){return t instanceof Ze||!!t.eventBusEl_&&[\"on\",\"one\",\"off\",\"trigger\"].every(function(e){return\"function\"==typeof t[e]})},ct={on:function(){for(var e=this,t=arguments.length,i=new Array(t),n=0;n<t;n++)i[n]=arguments[n];var r=ot(this,i,\"on\"),a=r.isTargetingSelf,s=r.target,o=r.type,u=r.listener;if(ut(s,\"on\",o,u),!a){var l=function(){return e.off(s,o,u)};l.guid=u.guid;var c=function(){return e.off(\"dispose\",l)};c.guid=u.guid,ut(this,\"on\",\"dispose\",l),ut(s,\"on\",\"dispose\",c)}},one:function(){for(var r=this,e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];var n=ot(this,t,\"one\"),a=n.isTargetingSelf,s=n.target,o=n.type,u=n.listener;if(a)ut(s,\"one\",o,u);else{var l=function e(){r.off(s,o,e);for(var t=arguments.length,i=new Array(t),n=0;n<t;n++)i[n]=arguments[n];u.apply(null,i)};l.guid=u.guid,ut(s,\"one\",o,l)}},any:function(){for(var r=this,e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];var n=ot(this,t,\"any\"),a=n.isTargetingSelf,s=n.target,o=n.type,u=n.listener;if(a)ut(s,\"any\",o,u);else{var l=function e(){r.off(s,o,e);for(var t=arguments.length,i=new Array(t),n=0;n<t;n++)i[n]=arguments[n];u.apply(null,i)};l.guid=u.guid,ut(s,\"any\",o,l)}},off:function(e,t,i){if(!e||nt(e))Xe(this.eventBusEl_,e,t);else{var n=e,r=t;rt(n,this,\"off\"),at(r,this,\"off\"),st(i,this,\"off\"),i=$e(this,i),this.off(\"dispose\",i),n.nodeName?(Xe(n,r,i),Xe(n,\"dispose\",i)):lt(n)&&(n.off(r,i),n.off(\"dispose\",i))}},trigger:function(e,t){rt(this.eventBusEl_,this,\"trigger\");var i=e&&\"string\"!=typeof e?e.type:e;if(!nt(i)){var n=\"Invalid event type for \"+it(this)+\"#trigger; must be a non-empty string or object with a type key that has a non-empty value.\";if(!e)throw new Error(n);(this.log||g).error(n)}return Ke(this.eventBusEl_,e,t)}};function dt(e,t){void 0===t&&(t={});var i=t.eventBusKey;if(i){if(!e[i].nodeName)throw new Error('The eventBusKey \"'+i+'\" does not refer to an element.');e.eventBusEl_=e[i]}else e.eventBusEl_=ne(\"span\",{className:\"vjs-event-bus\"});return S(e,ct),e.eventedCallbacks&&e.eventedCallbacks.forEach(function(e){e()}),e.on(\"dispose\",function(){e.off(),h.setTimeout(function(){e.eventBusEl_=null},0)}),e}var ht={state:{},setState:function(e){var i,n=this;return\"function\"==typeof e&&(e=e()),T(e,function(e,t){n.state[t]!==e&&((i=i||{})[t]={from:n.state[t],to:e}),n.state[t]=e}),i&&lt(this)&&this.trigger({changes:i,type:\"statechanged\"}),i}};function pt(e,t){return S(e,ht),e.state=S({},e.state,t),\"function\"==typeof e.handleStateChanged&&lt(e)&&e.on(\"statechanged\",e.handleStateChanged),e}function ft(e){return\"string\"!=typeof e?e:e.replace(/./,function(e){return e.toLowerCase()})}function mt(e){return\"string\"!=typeof e?e:e.replace(/./,function(e){return e.toUpperCase()})}function gt(){for(var i={},e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.forEach(function(e){e&&T(e,function(e,t){w(e)?(w(i[t])||(i[t]={}),i[t]=gt(i[t],e)):i[t]=e})}),i}var vt=function(){function e(){this.map_={}}var t=e.prototype;return t.has=function(e){return e in this.map_},t.delete=function(e){var t=this.has(e);return delete this.map_[e],t},t.set=function(e,t){return this.map_[e]=t,this},t.forEach=function(e,t){for(var i in this.map_)e.call(t,this.map_[i],i,this)},e}(),yt=h.Map?h.Map:vt,_t=function(){function e(){this.set_={}}var t=e.prototype;return t.has=function(e){return e in this.set_},t.delete=function(e){var t=this.has(e);return delete this.set_[e],t},t.add=function(e){return this.set_[e]=1,this},t.forEach=function(e,t){for(var i in this.set_)e.call(t,i,i,this)},e}(),bt=h.Set?h.Set:_t,Tt=function(){function l(e,t,i){if(!e&&this.play?this.player_=e=this:this.player_=e,this.isDisposed_=!1,this.parentComponent_=null,this.options_=gt({},this.options_),t=this.options_=gt(this.options_,t),this.id_=t.id||t.el&&t.el.id,!this.id_){var n=e&&e.id&&e.id()||\"no_player\";this.id_=n+\"_component_\"+Be()}this.name_=t.name||null,t.el?this.el_=t.el:!1!==t.createEl&&(this.el_=this.createEl()),!1!==t.evented&&(dt(this,{eventBusKey:this.el_?\"el_\":null}),this.handleLanguagechange=this.handleLanguagechange.bind(this),this.on(this.player_,\"languagechange\",this.handleLanguagechange)),pt(this,this.constructor.defaultState),this.children_=[],this.childIndex_={},this.childNameIndex_={},this.setTimeoutIds_=new bt,this.setIntervalIds_=new bt,this.rafIds_=new bt,this.namedRafs_=new yt,(this.clearingTimersOnDispose_=!1)!==t.initChildren&&this.initChildren(),this.ready(i),!1!==t.reportTouchActivity&&this.enableTouchActivity()}var e=l.prototype;return e.dispose=function(){if(!this.isDisposed_){if(this.readyQueue_&&(this.readyQueue_.length=0),this.trigger({type:\"dispose\",bubbles:!1}),this.isDisposed_=!0,this.children_)for(var e=this.children_.length-1;0<=e;e--)this.children_[e].dispose&&this.children_[e].dispose();this.children_=null,this.childIndex_=null,this.childNameIndex_=null,this.parentComponent_=null,this.el_&&(this.el_.parentNode&&this.el_.parentNode.removeChild(this.el_),je.has(this.el_)&&je.delete(this.el_),this.el_=null),this.player_=null}},e.isDisposed=function(){return Boolean(this.isDisposed_)},e.player=function(){return this.player_},e.options=function(e){return e&&(this.options_=gt(this.options_,e)),this.options_},e.el=function(){return this.el_},e.createEl=function(e,t,i){return ne(e,t,i)},e.localize=function(e,r,t){void 0===t&&(t=e);var i=this.player_.language&&this.player_.language(),n=this.player_.languages&&this.player_.languages(),a=n&&n[i],s=i&&i.split(\"-\")[0],o=n&&n[s],u=t;return a&&a[e]?u=a[e]:o&&o[e]&&(u=o[e]),r&&(u=u.replace(/\\{(\\d+)\\}/g,function(e,t){var i=r[t-1],n=i;return\"undefined\"==typeof i&&(n=e),n})),u},e.handleLanguagechange=function(){},e.contentEl=function(){return this.contentEl_||this.el_},e.id=function(){return this.id_},e.name=function(){return this.name_},e.children=function(){return this.children_},e.getChildById=function(e){return this.childIndex_[e]},e.getChild=function(e){if(e)return this.childNameIndex_[e]},e.getDescendant=function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];t=t.reduce(function(e,t){return e.concat(t)},[]);for(var n=this,r=0;r<t.length;r++)if(!(n=n.getChild(t[r]))||!n.getChild)return;return n},e.addChild=function(e,t,i){var n,r;if(void 0===t&&(t={}),void 0===i&&(i=this.children_.length),\"string\"==typeof e){r=mt(e);var a=t.componentClass||r;t.name=r;var s=l.getComponent(a);if(!s)throw new Error(\"Component \"+a+\" does not exist\");if(\"function\"!=typeof s)return null;n=new s(this.player_||this,t)}else n=e;if(n.parentComponent_&&n.parentComponent_.removeChild(n),this.children_.splice(i,0,n),n.parentComponent_=this,\"function\"==typeof n.id&&(this.childIndex_[n.id()]=n),(r=r||n.name&&mt(n.name()))&&(this.childNameIndex_[r]=n,this.childNameIndex_[ft(r)]=n),\"function\"==typeof n.el&&n.el()){var o=null;this.children_[i+1]&&(this.children_[i+1].el_?o=this.children_[i+1].el_:ee(this.children_[i+1])&&(o=this.children_[i+1])),this.contentEl().insertBefore(n.el(),o)}return n},e.removeChild=function(e){if(\"string\"==typeof e&&(e=this.getChild(e)),e&&this.children_){for(var t=!1,i=this.children_.length-1;0<=i;i--)if(this.children_[i]===e){t=!0,this.children_.splice(i,1);break}if(t){e.parentComponent_=null,this.childIndex_[e.id()]=null,this.childNameIndex_[mt(e.name())]=null,this.childNameIndex_[ft(e.name())]=null;var n=e.el();n&&n.parentNode===this.contentEl()&&this.contentEl().removeChild(e.el())}}},e.initChildren=function(){var r=this,n=this.options_.children;if(n){var e,a=this.options_,i=l.getComponent(\"Tech\");(e=Array.isArray(n)?n:Object.keys(n)).concat(Object.keys(this.options_).filter(function(t){return!e.some(function(e){return\"string\"==typeof e?t===e:t===e.name})})).map(function(e){var t,i;return i=\"string\"==typeof e?n[t=e]||r.options_[t]||{}:(t=e.name,e),{name:t,opts:i}}).filter(function(e){var t=l.getComponent(e.opts.componentClass||mt(e.name));return t&&!i.isTech(t)}).forEach(function(e){var t=e.name,i=e.opts;if(void 0!==a[t]&&(i=a[t]),!1!==i){!0===i&&(i={}),i.playerOptions=r.options_.playerOptions;var n=r.addChild(t,i);n&&(r[t]=n)}})}},e.buildCSSClass=function(){return\"\"},e.ready=function(e,t){if(void 0===t&&(t=!1),e)return this.isReady_?void(t?e.call(this):this.setTimeout(e,1)):(this.readyQueue_=this.readyQueue_||[],void this.readyQueue_.push(e))},e.triggerReady=function(){this.isReady_=!0,this.setTimeout(function(){var e=this.readyQueue_;this.readyQueue_=[],e&&0<e.length&&e.forEach(function(e){e.call(this)},this),this.trigger(\"ready\")},1)},e.$=function(e,t){return Ie(e,t||this.contentEl())},e.$$=function(e,t){return xe(e,t||this.contentEl())},e.hasClass=function(e){return se(this.el_,e)},e.addClass=function(e){oe(this.el_,e)},e.removeClass=function(e){ue(this.el_,e)},e.toggleClass=function(e,t){le(this.el_,e,t)},e.show=function(){this.removeClass(\"vjs-hidden\")},e.hide=function(){this.addClass(\"vjs-hidden\")},e.lockShowing=function(){this.addClass(\"vjs-lock-showing\")},e.unlockShowing=function(){this.removeClass(\"vjs-lock-showing\")},e.getAttribute=function(e){return he(this.el_,e)},e.setAttribute=function(e,t){pe(this.el_,e,t)},e.removeAttribute=function(e){fe(this.el_,e)},e.width=function(e,t){return this.dimension(\"width\",e,t)},e.height=function(e,t){return this.dimension(\"height\",e,t)},e.dimensions=function(e,t){this.width(e,!0),this.height(t)},e.dimension=function(e,t,i){if(void 0!==t)return null!==t&&t==t||(t=0),-1!==(\"\"+t).indexOf(\"%\")||-1!==(\"\"+t).indexOf(\"px\")?this.el_.style[e]=t:this.el_.style[e]=\"auto\"===t?\"\":t+\"px\",void(i||this.trigger(\"componentresize\"));if(!this.el_)return 0;var n=this.el_.style[e],r=n.indexOf(\"px\");return-1!==r?parseInt(n.slice(0,r),10):parseInt(this.el_[\"offset\"+mt(e)],10)},e.currentDimension=function(e){var t=0;if(\"width\"!==e&&\"height\"!==e)throw new Error(\"currentDimension only accepts width or height value\");if(t=E(this.el_,e),0===(t=parseFloat(t))||isNaN(t)){var i=\"offset\"+mt(e);t=this.el_[i]}return t},e.currentDimensions=function(){return{width:this.currentDimension(\"width\"),height:this.currentDimension(\"height\")}},e.currentWidth=function(){return this.currentDimension(\"width\")},e.currentHeight=function(){return this.currentDimension(\"height\")},e.focus=function(){this.el_.focus()},e.blur=function(){this.el_.blur()},e.handleKeyDown=function(e){this.player_&&(e.stopPropagation(),this.player_.handleKeyDown(e))},e.handleKeyPress=function(e){this.handleKeyDown(e)},e.emitTapEvents=function(){var n,t=0,r=null;this.on(\"touchstart\",function(e){1===e.touches.length&&(r={pageX:e.touches[0].pageX,pageY:e.touches[0].pageY},t=h.performance.now(),n=!0)}),this.on(\"touchmove\",function(e){if(1<e.touches.length)n=!1;else if(r){var t=e.touches[0].pageX-r.pageX,i=e.touches[0].pageY-r.pageY;10<Math.sqrt(t*t+i*i)&&(n=!1)}});function e(){n=!1}this.on(\"touchleave\",e),this.on(\"touchcancel\",e),this.on(\"touchend\",function(e){!(r=null)===n&&h.performance.now()-t<200&&(e.preventDefault(),this.trigger(\"tap\"))})},e.enableTouchActivity=function(){if(this.player()&&this.player().reportUserActivity){var t,i=$e(this.player(),this.player().reportUserActivity);this.on(\"touchstart\",function(){i(),this.clearInterval(t),t=this.setInterval(i,250)});var e=function(e){i(),this.clearInterval(t)};this.on(\"touchmove\",i),this.on(\"touchend\",e),this.on(\"touchcancel\",e)}},e.setTimeout=function(e,t){var i,n=this;return e=$e(this,e),this.clearTimersOnDispose_(),i=h.setTimeout(function(){n.setTimeoutIds_.has(i)&&n.setTimeoutIds_.delete(i),e()},t),this.setTimeoutIds_.add(i),i},e.clearTimeout=function(e){return this.setTimeoutIds_.has(e)&&(this.setTimeoutIds_.delete(e),h.clearTimeout(e)),e},e.setInterval=function(e,t){e=$e(this,e),this.clearTimersOnDispose_();var i=h.setInterval(e,t);return this.setIntervalIds_.add(i),i},e.clearInterval=function(e){return this.setIntervalIds_.has(e)&&(this.setIntervalIds_.delete(e),h.clearInterval(e)),e},e.requestAnimationFrame=function(e){var t,i=this;return this.supportsRaf_?(this.clearTimersOnDispose_(),e=$e(this,e),t=h.requestAnimationFrame(function(){i.rafIds_.has(t)&&i.rafIds_.delete(t),e()}),this.rafIds_.add(t),t):this.setTimeout(e,1e3/60)},e.requestNamedAnimationFrame=function(e,t){var i=this;if(!this.namedRafs_.has(e)){this.clearTimersOnDispose_(),t=$e(this,t);var n=this.requestAnimationFrame(function(){t(),i.namedRafs_.has(e)&&i.namedRafs_.delete(e)});return this.namedRafs_.set(e,n),e}},e.cancelNamedAnimationFrame=function(e){this.namedRafs_.has(e)&&(this.cancelAnimationFrame(this.namedRafs_.get(e)),this.namedRafs_.delete(e))},e.cancelAnimationFrame=function(e){return this.supportsRaf_?(this.rafIds_.has(e)&&(this.rafIds_.delete(e),h.cancelAnimationFrame(e)),e):this.clearTimeout(e)},e.clearTimersOnDispose_=function(){var n=this;this.clearingTimersOnDispose_||(this.clearingTimersOnDispose_=!0,this.one(\"dispose\",function(){[[\"namedRafs_\",\"cancelNamedAnimationFrame\"],[\"rafIds_\",\"cancelAnimationFrame\"],[\"setTimeoutIds_\",\"clearTimeout\"],[\"setIntervalIds_\",\"clearInterval\"]].forEach(function(e){var t=e[0],i=e[1];n[t].forEach(function(e,t){return n[i](t)})}),n.clearingTimersOnDispose_=!1}))},l.registerComponent=function(e,t){if(\"string\"!=typeof e||!e)throw new Error('Illegal component name, \"'+e+'\"; must be a non-empty string.');var i,n=l.getComponent(\"Tech\"),r=n&&n.isTech(t),a=l===t||l.prototype.isPrototypeOf(t.prototype);if(r||!a)throw i=r?\"techs must be registered using Tech.registerTech()\":\"must be a Component subclass\",new Error('Illegal component, \"'+e+'\"; '+i+\".\");e=mt(e),l.components_||(l.components_={});var s=l.getComponent(\"Player\");if(\"Player\"===e&&s&&s.players){var o=s.players,u=Object.keys(o);if(o&&0<u.length&&u.map(function(e){return o[e]}).every(Boolean))throw new Error(\"Can not register Player component after player has been created.\")}return l.components_[e]=t,l.components_[ft(e)]=t},l.getComponent=function(e){if(e&&l.components_)return l.components_[e]},l}();Tt.prototype.supportsRaf_=\"function\"==typeof h.requestAnimationFrame&&\"function\"==typeof h.cancelAnimationFrame,Tt.registerComponent(\"Component\",Tt);var St=function(e){if(void 0===e)throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");return e};i(function(t){function i(e){return\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?t.exports=i=function(e){return typeof e}:t.exports=i=function(e){return e&&\"function\"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?\"symbol\":typeof e},i(e)}t.exports=i}),i(function(t){function i(e){return t.exports=i=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},i(e)}t.exports=i});var kt=function(e,t){e.prototype=Object.create(t.prototype),(e.prototype.constructor=e).__proto__=t};function wt(e,t,i,n){return function(e,t,i){if(\"number\"!=typeof t||t<0||i<t)throw new Error(\"Failed to execute '\"+e+\"' on 'TimeRanges': The index provided (\"+t+\") is non-numeric or out of bounds (0-\"+i+\").\")}(e,n,i.length-1),i[n][t]}function Et(e){return void 0===e||0===e.length?{length:0,start:function(){throw new Error(\"This TimeRanges object is empty\")},end:function(){throw new Error(\"This TimeRanges object is empty\")}}:{length:e.length,start:wt.bind(null,\"start\",0,e),end:wt.bind(null,\"end\",1,e)}}function Ct(e,t){return Array.isArray(e)?Et(e):void 0===e||void 0===t?Et():Et([[e,t]])}function It(e,t){var i,n,r=0;if(!t)return 0;e&&e.length||(e=Ct(0,0));for(var a=0;a<e.length;a++)i=e.start(a),t<(n=e.end(a))&&(n=t),r+=n-i;return r/t}function xt(e){if(e instanceof xt)return e;\"number\"==typeof e?this.code=e:\"string\"==typeof e?this.message=e:k(e)&&(\"number\"==typeof e.code&&(this.code=e.code),S(this,e)),this.message||(this.message=xt.defaultMessages[this.code]||\"\")}xt.prototype.code=0,xt.prototype.message=\"\",xt.prototype.status=null,xt.errorTypes=[\"MEDIA_ERR_CUSTOM\",\"MEDIA_ERR_ABORTED\",\"MEDIA_ERR_NETWORK\",\"MEDIA_ERR_DECODE\",\"MEDIA_ERR_SRC_NOT_SUPPORTED\",\"MEDIA_ERR_ENCRYPTED\"],xt.defaultMessages={1:\"You aborted the media playback\",2:\"A network error caused the media download to fail part-way.\",3:\"The media playback was aborted due to a corruption problem or because the media used features your browser did not support.\",4:\"The media could not be loaded, either because the server or network failed or because the format is not supported.\",5:\"The media is encrypted and we do not have the keys to decrypt it.\"};for(var At=0;At<xt.errorTypes.length;At++)xt[xt.errorTypes[At]]=At,xt.prototype[xt.errorTypes[At]]=At;var Pt=function(e,t){var i,n=null;try{i=JSON.parse(e,t)}catch(e){n=e}return[n,i]};function Lt(e){return null!=e&&\"function\"==typeof e.then}function Ot(e){Lt(e)&&e.then(null,function(e){})}function Dt(n){return[\"kind\",\"label\",\"language\",\"id\",\"inBandMetadataTrackDispatchType\",\"mode\",\"src\"].reduce(function(e,t,i){return n[t]&&(e[t]=n[t]),e},{cues:n.cues&&Array.prototype.map.call(n.cues,function(e){return{startTime:e.startTime,endTime:e.endTime,text:e.text,id:e.id}})})}var Rt=function(e){var t=e.$$(\"track\"),i=Array.prototype.map.call(t,function(e){return e.track});return Array.prototype.map.call(t,function(e){var t=Dt(e.track);return e.src&&(t.src=e.src),t}).concat(Array.prototype.filter.call(e.textTracks(),function(e){return-1===i.indexOf(e)}).map(Dt))},Mt=function(e,i){return e.forEach(function(e){var t=i.addRemoteTextTrack(e).track;!e.src&&e.cues&&e.cues.forEach(function(e){return t.addCue(e)})}),i.textTracks()},Nt=i(function(e,t){function i(e){if(e&&\"object\"==typeof e){var t=e.which||e.keyCode||e.charCode;t&&(e=t)}if(\"number\"==typeof e)return s[e];var i,n=String(e);return(i=r[n.toLowerCase()])?i:(i=a[n.toLowerCase()])||(1===n.length?n.charCodeAt(0):void 0)}i.isEventKey=function(e,t){if(e&&\"object\"==typeof e){var i=e.which||e.keyCode||e.charCode;if(null==i)return!1;if(\"string\"==typeof t){var n;if(n=r[t.toLowerCase()])return n===i;if(n=a[t.toLowerCase()])return n===i}else if(\"number\"==typeof t)return t===i;return!1}};var r=(t=e.exports=i).code=t.codes={backspace:8,tab:9,enter:13,shift:16,ctrl:17,alt:18,\"pause/break\":19,\"caps lock\":20,esc:27,space:32,\"page up\":33,\"page down\":34,end:35,home:36,left:37,up:38,right:39,down:40,insert:45,delete:46,command:91,\"left command\":91,\"right command\":93,\"numpad *\":106,\"numpad +\":107,\"numpad -\":109,\"numpad .\":110,\"numpad /\":111,\"num lock\":144,\"scroll lock\":145,\"my computer\":182,\"my calculator\":183,\";\":186,\"=\":187,\",\":188,\"-\":189,\".\":190,\"/\":191,\"`\":192,\"[\":219,\"\\\\\":220,\"]\":221,\"'\":222},a=t.aliases={windows:91,\"⇧\":16,\"⌥\":18,\"⌃\":17,\"⌘\":91,ctl:17,control:17,option:18,pause:19,break:19,caps:20,return:13,escape:27,spc:32,spacebar:32,pgup:33,pgdn:34,ins:45,del:46,cmd:91};for(n=97;n<123;n++)r[String.fromCharCode(n)]=n-32;for(var n=48;n<58;n++)r[n-48]=n;for(n=1;n<13;n++)r[\"f\"+n]=n+111;for(n=0;n<10;n++)r[\"numpad \"+n]=n+96;var s=t.names=t.title={};for(n in r)s[r[n]]=n;for(var o in a)r[o]=a[o]}),Ut=(Nt.code,Nt.codes,Nt.aliases,Nt.names,Nt.title,\"vjs-modal-dialog\"),Bt=function(n){function e(e,t){var i;return(i=n.call(this,e,t)||this).opened_=i.hasBeenOpened_=i.hasBeenFilled_=!1,i.closeable(!i.options_.uncloseable),i.content(i.options_.content),i.contentEl_=ne(\"div\",{className:Ut+\"-content\"},{role:\"document\"}),i.descEl_=ne(\"p\",{className:Ut+\"-description vjs-control-text\",id:i.el().getAttribute(\"aria-describedby\")}),re(i.descEl_,i.description()),i.el_.appendChild(i.descEl_),i.el_.appendChild(i.contentEl_),i}kt(e,n);var t=e.prototype;return t.createEl=function(){return n.prototype.createEl.call(this,\"div\",{className:this.buildCSSClass(),tabIndex:-1},{\"aria-describedby\":this.id()+\"_description\",\"aria-hidden\":\"true\",\"aria-label\":this.label(),role:\"dialog\"})},t.dispose=function(){this.contentEl_=null,this.descEl_=null,this.previouslyActiveEl_=null,n.prototype.dispose.call(this)},t.buildCSSClass=function(){return Ut+\" vjs-hidden \"+n.prototype.buildCSSClass.call(this)},t.label=function(){return this.localize(this.options_.label||\"Modal Window\")},t.description=function(){var e=this.options_.description||this.localize(\"This is a modal window.\");return this.closeable()&&(e+=\" \"+this.localize(\"This modal can be closed by pressing the Escape key or activating the close button.\")),e},t.open=function(){if(!this.opened_){var e=this.player();this.trigger(\"beforemodalopen\"),this.opened_=!0,!this.options_.fillAlways&&(this.hasBeenOpened_||this.hasBeenFilled_)||this.fill(),this.wasPlaying_=!e.paused(),this.options_.pauseOnOpen&&this.wasPlaying_&&e.pause(),this.on(\"keydown\",this.handleKeyDown),this.hadControls_=e.controls(),e.controls(!1),this.show(),this.conditionalFocus_(),this.el().setAttribute(\"aria-hidden\",\"false\"),this.trigger(\"modalopen\"),this.hasBeenOpened_=!0}},t.opened=function(e){return\"boolean\"==typeof e&&this[e?\"open\":\"close\"](),this.opened_},t.close=function(){if(this.opened_){var e=this.player();this.trigger(\"beforemodalclose\"),this.opened_=!1,this.wasPlaying_&&this.options_.pauseOnOpen&&e.play(),this.off(\"keydown\",this.handleKeyDown),this.hadControls_&&e.controls(!0),this.hide(),this.el().setAttribute(\"aria-hidden\",\"true\"),this.trigger(\"modalclose\"),this.conditionalBlur_(),this.options_.temporary&&this.dispose()}},t.closeable=function(e){if(\"boolean\"==typeof e){var t=this.closeable_=!!e,i=this.getChild(\"closeButton\");if(t&&!i){var n=this.contentEl_;this.contentEl_=this.el_,i=this.addChild(\"closeButton\",{controlText:\"Close Modal Dialog\"}),this.contentEl_=n,this.on(i,\"close\",this.close)}!t&&i&&(this.off(i,\"close\",this.close),this.removeChild(i),i.dispose())}return this.closeable_},t.fill=function(){this.fillWith(this.content())},t.fillWith=function(e){var t=this.contentEl(),i=t.parentNode,n=t.nextSibling;this.trigger(\"beforemodalfill\"),this.hasBeenFilled_=!0,i.removeChild(t),this.empty(),we(t,e),this.trigger(\"modalfill\"),n?i.insertBefore(t,n):i.appendChild(t);var r=this.getChild(\"closeButton\");r&&i.appendChild(r.el_)},t.empty=function(){this.trigger(\"beforemodalempty\"),Te(this.contentEl()),this.trigger(\"modalempty\")},t.content=function(e){return\"undefined\"!=typeof e&&(this.content_=e),this.content_},t.conditionalFocus_=function(){var e=p.activeElement,t=this.player_.el_;this.previouslyActiveEl_=null,!t.contains(e)&&t!==e||(this.previouslyActiveEl_=e,this.focus())},t.conditionalBlur_=function(){this.previouslyActiveEl_&&(this.previouslyActiveEl_.focus(),this.previouslyActiveEl_=null)},t.handleKeyDown=function(e){if(e.stopPropagation(),Nt.isEventKey(e,\"Escape\")&&this.closeable())return e.preventDefault(),void this.close();if(Nt.isEventKey(e,\"Tab\")){for(var t,i=this.focusableEls_(),n=this.el_.querySelector(\":focus\"),r=0;r<i.length;r++)if(n===i[r]){t=r;break}p.activeElement===this.el_&&(t=0),e.shiftKey&&0===t?(i[i.length-1].focus(),e.preventDefault()):e.shiftKey||t!==i.length-1||(i[0].focus(),e.preventDefault())}},t.focusableEls_=function(){var e=this.el_.querySelectorAll(\"*\");return Array.prototype.filter.call(e,function(e){return(e instanceof h.HTMLAnchorElement||e instanceof h.HTMLAreaElement)&&e.hasAttribute(\"href\")||(e instanceof h.HTMLInputElement||e instanceof h.HTMLSelectElement||e instanceof h.HTMLTextAreaElement||e instanceof h.HTMLButtonElement)&&!e.hasAttribute(\"disabled\")||e instanceof h.HTMLIFrameElement||e instanceof h.HTMLObjectElement||e instanceof h.HTMLEmbedElement||e.hasAttribute(\"tabindex\")&&-1!==e.getAttribute(\"tabindex\")||e.hasAttribute(\"contenteditable\")})},e}(Tt);Bt.prototype.options_={pauseOnOpen:!0,temporary:!0},Tt.registerComponent(\"ModalDialog\",Bt);var Ft=function(n){function e(e){var t;void 0===e&&(e=[]),(t=n.call(this)||this).tracks_=[],Object.defineProperty(St(t),\"length\",{get:function(){return this.tracks_.length}});for(var i=0;i<e.length;i++)t.addTrack(e[i]);return t}kt(e,n);var t=e.prototype;return t.addTrack=function(e){var t=this,i=this.tracks_.length;\"\"+i in this||Object.defineProperty(this,i,{get:function(){return this.tracks_[i]}}),-1===this.tracks_.indexOf(e)&&(this.tracks_.push(e),this.trigger({track:e,type:\"addtrack\",target:this})),e.labelchange_=function(){t.trigger({track:e,type:\"labelchange\",target:t})},lt(e)&&e.addEventListener(\"labelchange\",e.labelchange_)},t.removeTrack=function(e){for(var t,i=0,n=this.length;i<n;i++)if(this[i]===e){(t=this[i]).off&&t.off(),this.tracks_.splice(i,1);break}t&&this.trigger({track:t,type:\"removetrack\",target:this})},t.getTrackById=function(e){for(var t=null,i=0,n=this.length;i<n;i++){var r=this[i];if(r.id===e){t=r;break}}return t},e}(Ze);for(var jt in Ft.prototype.allowedEvents_={change:\"change\",addtrack:\"addtrack\",removetrack:\"removetrack\",labelchange:\"labelchange\"},Ft.prototype.allowedEvents_)Ft.prototype[\"on\"+jt]=null;function Vt(e,t){for(var i=0;i<e.length;i++)Object.keys(e[i]).length&&t.id!==e[i].id&&(e[i].enabled=!1)}function qt(e,t){for(var i=0;i<e.length;i++)Object.keys(e[i]).length&&t.id!==e[i].id&&(e[i].selected=!1)}function Ht(e){var t=[\"protocol\",\"hostname\",\"port\",\"pathname\",\"search\",\"hash\",\"host\"],i=p.createElement(\"a\");i.href=e;var n,r=\"\"===i.host&&\"file:\"!==i.protocol;r&&((n=p.createElement(\"div\")).innerHTML='<a href=\"'+e+'\"></a>',i=n.firstChild,n.setAttribute(\"style\",\"display:none; position:absolute;\"),p.body.appendChild(n));for(var a={},s=0;s<t.length;s++)a[t[s]]=i[t[s]];return\"http:\"===a.protocol&&(a.host=a.host.replace(/:80$/,\"\")),\"https:\"===a.protocol&&(a.host=a.host.replace(/:443$/,\"\")),a.protocol||(a.protocol=h.location.protocol),r&&p.body.removeChild(n),a}function Wt(e){if(!e.match(/^https?:\\/\\//)){var t=p.createElement(\"div\");t.innerHTML='<a href=\"'+e+'\">x</a>',e=t.firstChild.href}return e}function zt(e){if(\"string\"==typeof e){var t=/^(\\/?)([\\s\\S]*?)((?:\\.{1,2}|[^\\/]+?)(\\.([^\\.\\/\\?]+)))(?:[\\/]*|[\\?].*)$/.exec(e);if(t)return t.pop().toLowerCase()}return\"\"}function Gt(e,t){void 0===t&&(t=h.location);var i=Ht(e);return(\":\"===i.protocol?t.protocol:i.protocol)+i.host!==t.protocol+t.host}var Xt=function(n){function e(e){var t;void 0===e&&(e=[]);for(var i=e.length-1;0<=i;i--)if(e[i].enabled){Vt(e,e[i]);break}return(t=n.call(this,e)||this).changing_=!1,t}kt(e,n);var t=e.prototype;return t.addTrack=function(e){var t=this;e.enabled&&Vt(this,e),n.prototype.addTrack.call(this,e),e.addEventListener&&(e.enabledChange_=function(){t.changing_||(t.changing_=!0,Vt(t,e),t.changing_=!1,t.trigger(\"change\"))},e.addEventListener(\"enabledchange\",e.enabledChange_))},t.removeTrack=function(e){n.prototype.removeTrack.call(this,e),e.removeEventListener&&e.enabledChange_&&(e.removeEventListener(\"enabledchange\",e.enabledChange_),e.enabledChange_=null)},e}(Ft),Kt=function(n){function e(e){var t;void 0===e&&(e=[]);for(var i=e.length-1;0<=i;i--)if(e[i].selected){qt(e,e[i]);break}return(t=n.call(this,e)||this).changing_=!1,Object.defineProperty(St(t),\"selectedIndex\",{get:function(){for(var e=0;e<this.length;e++)if(this[e].selected)return e;return-1},set:function(){}}),t}kt(e,n);var t=e.prototype;return t.addTrack=function(e){var t=this;e.selected&&qt(this,e),n.prototype.addTrack.call(this,e),e.addEventListener&&(e.selectedChange_=function(){t.changing_||(t.changing_=!0,qt(t,e),t.changing_=!1,t.trigger(\"change\"))},e.addEventListener(\"selectedchange\",e.selectedChange_))},t.removeTrack=function(e){n.prototype.removeTrack.call(this,e),e.removeEventListener&&e.selectedChange_&&(e.removeEventListener(\"selectedchange\",e.selectedChange_),e.selectedChange_=null)},e}(Ft),Qt=function(i){function e(){return i.apply(this,arguments)||this}kt(e,i);var t=e.prototype;return t.addTrack=function(e){var t=this;i.prototype.addTrack.call(this,e),this.queueChange_||(this.queueChange_=function(){return t.queueTrigger(\"change\")}),this.triggerSelectedlanguagechange||(this.triggerSelectedlanguagechange_=function(){return t.trigger(\"selectedlanguagechange\")}),e.addEventListener(\"modechange\",this.queueChange_);-1===[\"metadata\",\"chapters\"].indexOf(e.kind)&&e.addEventListener(\"modechange\",this.triggerSelectedlanguagechange_)},t.removeTrack=function(e){i.prototype.removeTrack.call(this,e),e.removeEventListener&&(this.queueChange_&&e.removeEventListener(\"modechange\",this.queueChange_),this.selectedlanguagechange_&&e.removeEventListener(\"modechange\",this.triggerSelectedlanguagechange_))},e}(Ft),Yt=function(){function e(e){void 0===e&&(e=[]),this.trackElements_=[],Object.defineProperty(this,\"length\",{get:function(){return this.trackElements_.length}});for(var t=0,i=e.length;t<i;t++)this.addTrackElement_(e[t])}var t=e.prototype;return t.addTrackElement_=function(e){var t=this.trackElements_.length;\"\"+t in this||Object.defineProperty(this,t,{get:function(){return this.trackElements_[t]}}),-1===this.trackElements_.indexOf(e)&&this.trackElements_.push(e)},t.getTrackElementByTrack_=function(e){for(var t,i=0,n=this.trackElements_.length;i<n;i++)if(e===this.trackElements_[i].track){t=this.trackElements_[i];break}return t},t.removeTrackElement_=function(e){for(var t=0,i=this.trackElements_.length;t<i;t++)if(e===this.trackElements_[t]){this.trackElements_[t].track&&\"function\"==typeof this.trackElements_[t].track.off&&this.trackElements_[t].track.off(),\"function\"==typeof this.trackElements_[t].off&&this.trackElements_[t].off(),this.trackElements_.splice(t,1);break}},e}(),$t=function(){function t(e){t.prototype.setCues_.call(this,e),Object.defineProperty(this,\"length\",{get:function(){return this.length_}})}var e=t.prototype;return e.setCues_=function(e){var t=this.length||0,i=0,n=e.length;this.cues_=e,this.length_=e.length;function r(e){\"\"+e in this||Object.defineProperty(this,\"\"+e,{get:function(){return this.cues_[e]}})}if(t<n)for(i=t;i<n;i++)r.call(this,i)},e.getCueById=function(e){for(var t=null,i=0,n=this.length;i<n;i++){var r=this[i];if(r.id===e){t=r;break}}return t},t}(),Jt={alternative:\"alternative\",captions:\"captions\",main:\"main\",sign:\"sign\",subtitles:\"subtitles\",commentary:\"commentary\"},Zt={alternative:\"alternative\",descriptions:\"descriptions\",main:\"main\",\"main-desc\":\"main-desc\",translation:\"translation\",commentary:\"commentary\"},ei={subtitles:\"subtitles\",captions:\"captions\",descriptions:\"descriptions\",chapters:\"chapters\",metadata:\"metadata\"},ti={disabled:\"disabled\",hidden:\"hidden\",showing:\"showing\"},ii=function(s){function e(e){var t;void 0===e&&(e={}),t=s.call(this)||this;function i(e){Object.defineProperty(St(t),e,{get:function(){return n[e]},set:function(){}})}var n={id:e.id||\"vjs_track_\"+Be(),kind:e.kind||\"\",language:e.language||\"\"},r=e.label||\"\";for(var a in n)i(a);return Object.defineProperty(St(t),\"label\",{get:function(){return r},set:function(e){e!==r&&(r=e,this.trigger(\"labelchange\"))}}),t}return kt(e,s),e}(Ze),ni=Object.freeze({__proto__:null,parseUrl:Ht,getAbsoluteURL:Wt,getFileExtension:zt,isCrossOrigin:Gt}),ri=\"undefined\"!=typeof window?window:\"undefined\"!=typeof e?e:\"undefined\"!=typeof self?self:{},ai=function(e){var t=si.call(e);return\"[object Function]\"===t||\"function\"==typeof e&&\"[object RegExp]\"!==t||\"undefined\"!=typeof window&&(e===window.setTimeout||e===window.alert||e===window.confirm||e===window.prompt)}\r\n /**\r\n    * @license\r\n    * slighly modified parse-headers 2.0.2 <https://github.com/kesla/parse-headers/>\r\n    * Copyright (c) 2014 David Björklund\r\n    * Available under the MIT license\r\n    * <https://github.com/kesla/parse-headers/blob/master/LICENCE>\r\n    */,si=Object.prototype.toString;var oi=function(e){var r={};return e&&e.trim().split(\"\\n\").forEach(function(e){var t=e.indexOf(\":\"),i=e.slice(0,t).trim().toLowerCase(),n=e.slice(t+1).trim();\"undefined\"==typeof r[i]?r[i]=n:Array.isArray(r[i])?r[i].push(n):r[i]=[r[i],n]}),r},ui=di,li=di;function ci(e,t,i){var n=e;return ai(t)?(i=t,\"string\"==typeof e&&(n={uri:e})):n=y({},t,{uri:e}),n.callback=i,n}function di(e,t,i){return hi(t=ci(e,t,i))}function hi(n){if(\"undefined\"==typeof n.callback)throw new Error(\"callback argument missing\");var r=!1,a=function(e,t,i){r||(r=!0,n.callback(e,t,i))};function t(e){return clearTimeout(o),e instanceof Error||(e=new Error(\"\"+(e||\"Unknown XMLHttpRequest Error\"))),e.statusCode=0,a(e,m)}function e(){if(!s){var e;clearTimeout(o),e=n.useXDR&&void 0===u.status?200:1223===u.status?204:u.status;var t=m,i=null;return 0!==e?(t={body:function(){var e=void 0;if(e=u.response?u.response:u.responseText||function(e){try{if(\"document\"===e.responseType)return e.responseXML;var t=e.responseXML&&\"parsererror\"===e.responseXML.documentElement.nodeName;if(\"\"===e.responseType&&!t)return e.responseXML}catch(e){}return null}(u),f)try{e=JSON.parse(e)}catch(e){}return e}(),statusCode:e,method:c,headers:{},url:l,rawRequest:u},u.getAllResponseHeaders&&(t.headers=oi(u.getAllResponseHeaders()))):i=new Error(\"Internal XMLHttpRequest Error\"),a(i,t,t.body)}}var i,s,o,u=n.xhr||null,l=(u=u||(n.cors||n.useXDR?new di.XDomainRequest:new di.XMLHttpRequest)).url=n.uri||n.url,c=u.method=n.method||\"GET\",d=n.body||n.data,h=u.headers=n.headers||{},p=!!n.sync,f=!1,m={body:void 0,headers:{},statusCode:0,method:c,url:l,rawRequest:u};if(\"json\"in n&&!1!==n.json&&(f=!0,h.accept||h.Accept||(h.Accept=\"application/json\"),\"GET\"!==c&&\"HEAD\"!==c&&(h[\"content-type\"]||h[\"Content-Type\"]||(h[\"Content-Type\"]=\"application/json\"),d=JSON.stringify(!0===n.json?d:n.json))),u.onreadystatechange=function(){4===u.readyState&&setTimeout(e,0)},u.onload=e,u.onerror=t,u.onprogress=function(){},u.onabort=function(){s=!0},u.ontimeout=t,u.open(c,l,!p,n.username,n.password),p||(u.withCredentials=!!n.withCredentials),!p&&0<n.timeout&&(o=setTimeout(function(){if(!s){s=!0,u.abort(\"timeout\");var e=new Error(\"XMLHttpRequest timeout\");e.code=\"ETIMEDOUT\",t(e)}},n.timeout)),u.setRequestHeader)for(i in h)h.hasOwnProperty(i)&&u.setRequestHeader(i,h[i]);else if(n.headers&&!function(e){for(var t in e)if(e.hasOwnProperty(t))return!1;return!0}(n.headers))throw new Error(\"Headers cannot be set on an XDomainRequest object\");return\"responseType\"in n&&(u.responseType=n.responseType),\"beforeSend\"in n&&\"function\"==typeof n.beforeSend&&n.beforeSend(u),u.send(d||null),u}di.XMLHttpRequest=ri.XMLHttpRequest||function(){},di.XDomainRequest=\"withCredentials\"in new di.XMLHttpRequest?di.XMLHttpRequest:ri.XDomainRequest,function(e,t){for(var i=0;i<e.length;i++)t(e[i])}([\"get\",\"put\",\"post\",\"patch\",\"head\",\"delete\"],function(n){di[\"delete\"===n?\"del\":n]=function(e,t,i){return(t=ci(e,t,i)).method=n.toUpperCase(),hi(t)}}),ui.default=li;function pi(e,t){var i=new h.WebVTT.Parser(h,h.vttjs,h.WebVTT.StringDecoder()),n=[];i.oncue=function(e){t.addCue(e)},i.onparsingerror=function(e){n.push(e)},i.onflush=function(){t.trigger({type:\"loadeddata\",target:t})},i.parse(e),0<n.length&&(h.console&&h.console.groupCollapsed&&h.console.groupCollapsed(\"Text Track parsing errors for \"+t.src),n.forEach(function(e){return g.error(e)}),h.console&&h.console.groupEnd&&h.console.groupEnd()),i.flush()}function fi(e,n){var t={uri:e},i=Gt(e);i&&(t.cors=i);var r=\"use-credentials\"===n.tech_.crossOrigin();r&&(t.withCredentials=r),ui(t,$e(this,function(e,t,i){if(e)return g.error(e,t);n.loaded_=!0,\"function\"!=typeof h.WebVTT?n.tech_&&n.tech_.any([\"vttjsloaded\",\"vttjserror\"],function(e){if(\"vttjserror\"!==e.type)return pi(i,n);g.error(\"vttjs failed to load, stopping trying to process \"+n.src)}):pi(i,n)}))}var mi=function(l){function e(e){var t;if(void 0===e&&(e={}),!e.tech)throw new Error(\"A tech was not provided.\");var i=gt(e,{kind:ei[e.kind]||\"subtitles\",language:e.language||e.srclang||\"\"}),n=ti[i.mode]||\"disabled\",r=i.default;\"metadata\"!==i.kind&&\"chapters\"!==i.kind||(n=\"hidden\"),(t=l.call(this,i)||this).tech_=i.tech,t.cues_=[],t.activeCues_=[],t.preload_=!1!==t.tech_.preloadTextTracks;var a=new $t(t.cues_),s=new $t(t.activeCues_),o=!1,u=$e(St(t),function(){this.tech_.isReady_&&!this.tech_.isDisposed()&&(this.activeCues=this.activeCues,o&&(this.trigger(\"cuechange\"),o=!1))});return t.tech_.one(\"dispose\",function(){t.tech_.off(\"timeupdate\",u)}),\"disabled\"!==n&&t.tech_.on(\"timeupdate\",u),Object.defineProperties(St(t),{default:{get:function(){return r},set:function(){}},mode:{get:function(){return n},set:function(e){ti[e]&&n!==e&&(n=e,this.preload_||\"disabled\"===n||0!==this.cues.length||fi(this.src,this),this.tech_.off(\"timeupdate\",u),\"disabled\"!==n&&this.tech_.on(\"timeupdate\",u),this.trigger(\"modechange\"))}},cues:{get:function(){return this.loaded_?a:null},set:function(){}},activeCues:{get:function(){if(!this.loaded_)return null;if(0===this.cues.length)return s;for(var e=this.tech_.currentTime(),t=[],i=0,n=this.cues.length;i<n;i++){var r=this.cues[i];r.startTime<=e&&r.endTime>=e?t.push(r):r.startTime===r.endTime&&r.startTime<=e&&r.startTime+.5>=e&&t.push(r)}if(o=!1,t.length!==this.activeCues_.length)o=!0;else for(var a=0;a<t.length;a++)-1===this.activeCues_.indexOf(t[a])&&(o=!0);return this.activeCues_=t,s.setCues_(this.activeCues_),s},set:function(){}}}),i.src?(t.src=i.src,t.preload_||(t.loaded_=!0),(t.preload_||\"subtitles\"!==i.kind&&\"captions\"!==i.kind)&&fi(t.src,St(t))):t.loaded_=!0,t}kt(e,l);var t=e.prototype;return t.addCue=function(e){var t=e;if(h.vttjs&&!(e instanceof h.vttjs.VTTCue)){for(var i in t=new h.vttjs.VTTCue(e.startTime,e.endTime,e.text),e)i in t||(t[i]=e[i]);t.id=e.id,t.originalCue_=e}for(var n=this.tech_.textTracks(),r=0;r<n.length;r++)n[r]!==this&&n[r].removeCue(t);this.cues_.push(t),this.cues.setCues_(this.cues_)},t.removeCue=function(e){for(var t=this.cues_.length;t--;){var i=this.cues_[t];if(i===e||i.originalCue_&&i.originalCue_===e){this.cues_.splice(t,1),this.cues.setCues_(this.cues_);break}}},e}(ii);mi.prototype.allowedEvents_={cuechange:\"cuechange\"};var gi=function(r){function e(e){var t;void 0===e&&(e={});var i=gt(e,{kind:Zt[e.kind]||\"\"});t=r.call(this,i)||this;var n=!1;return Object.defineProperty(St(t),\"enabled\",{get:function(){return n},set:function(e){\"boolean\"==typeof e&&e!==n&&(n=e,this.trigger(\"enabledchange\"))}}),i.enabled&&(t.enabled=i.enabled),t.loaded_=!0,t}return kt(e,r),e}(ii),vi=function(r){function e(e){var t;void 0===e&&(e={});var i=gt(e,{kind:Jt[e.kind]||\"\"});t=r.call(this,i)||this;var n=!1;return Object.defineProperty(St(t),\"selected\",{get:function(){return n},set:function(e){\"boolean\"==typeof e&&e!==n&&(n=e,this.trigger(\"selectedchange\"))}}),i.selected&&(t.selected=i.selected),t}return kt(e,r),e}(ii),yi=function(r){function e(e){var t,i;void 0===e&&(e={}),t=r.call(this)||this;var n=new mi(e);return t.kind=n.kind,t.src=n.src,t.srclang=n.language,t.label=n.label,t.default=n.default,Object.defineProperties(St(t),{readyState:{get:function(){return i}},track:{get:function(){return n}}}),i=0,n.addEventListener(\"loadeddata\",function(){i=2,t.trigger({type:\"load\",target:St(t)})}),t}return kt(e,r),e}(Ze);yi.prototype.allowedEvents_={load:\"load\"},yi.NONE=0,yi.LOADING=1,yi.LOADED=2,yi.ERROR=3;var _i={audio:{ListClass:Xt,TrackClass:gi,capitalName:\"Audio\"},video:{ListClass:Kt,TrackClass:vi,capitalName:\"Video\"},text:{ListClass:Qt,TrackClass:mi,capitalName:\"Text\"}};Object.keys(_i).forEach(function(e){_i[e].getterName=e+\"Tracks\",_i[e].privateName=e+\"Tracks_\"});var bi={remoteText:{ListClass:Qt,TrackClass:mi,capitalName:\"RemoteText\",getterName:\"remoteTextTracks\",privateName:\"remoteTextTracks_\"},remoteTextEl:{ListClass:Yt,TrackClass:yi,capitalName:\"RemoteTextTrackEls\",getterName:\"remoteTextTrackEls\",privateName:\"remoteTextTrackEls_\"}},Ti=y({},_i,bi);bi.names=Object.keys(bi),_i.names=Object.keys(_i),Ti.names=[].concat(bi.names).concat(_i.names);var Si=Object.create||function(e){if(1!==arguments.length)throw new Error(\"Object.create shim only accepts one parameter.\");return ki.prototype=e,new ki};function ki(){}function wi(e,t){this.name=\"ParsingError\",this.code=e.code,this.message=t||e.message}function Ei(e){function t(e,t,i,n){return 3600*(0|e)+60*(0|t)+(0|i)+(0|n)/1e3}var i=e.match(/^(\\d+):(\\d{1,2})(:\\d{1,2})?\\.(\\d{3})/);return i?i[3]?t(i[1],i[2],i[3].replace(\":\",\"\"),i[4]):59<i[1]?t(i[1],i[2],0,i[4]):t(0,i[1],i[2],i[4]):null}function Ci(){this.values=Si(null)}function Ii(e,t,i,n){var r=n?e.split(n):[e];for(var a in r)if(\"string\"==typeof r[a]){var s=r[a].split(i);if(2===s.length)t(s[0],s[1])}}function xi(t,e,s){var i=t;function n(){var e=Ei(t);if(null===e)throw new wi(wi.Errors.BadTimeStamp,\"Malformed timestamp: \"+i);return t=t.replace(/^[^\\sa-zA-Z-]+/,\"\"),e}function r(){t=t.replace(/^\\s+/,\"\")}if(r(),e.startTime=n(),r(),\"--\\x3e\"!==t.substr(0,3))throw new wi(wi.Errors.BadTimeStamp,\"Malformed time stamp (time stamps must be separated by '--\\x3e'): \"+i);t=t.substr(3),r(),e.endTime=n(),r(),function(e,t){var a=new Ci;Ii(e,function(e,t){switch(e){case\"region\":for(var i=s.length-1;0<=i;i--)if(s[i].id===t){a.set(e,s[i].region);break}break;case\"vertical\":a.alt(e,t,[\"rl\",\"lr\"]);break;case\"line\":var n=t.split(\",\"),r=n[0];a.integer(e,r),a.percent(e,r)&&a.set(\"snapToLines\",!1),a.alt(e,r,[\"auto\"]),2===n.length&&a.alt(\"lineAlign\",n[1],[\"start\",\"center\",\"end\"]);break;case\"position\":n=t.split(\",\"),a.percent(e,n[0]),2===n.length&&a.alt(\"positionAlign\",n[1],[\"start\",\"center\",\"end\"]);break;case\"size\":a.percent(e,t);break;case\"align\":a.alt(e,t,[\"start\",\"center\",\"end\",\"left\",\"right\"])}},/:/,/\\s/),t.region=a.get(\"region\",null),t.vertical=a.get(\"vertical\",\"\");try{t.line=a.get(\"line\",\"auto\")}catch(e){}t.lineAlign=a.get(\"lineAlign\",\"start\"),t.snapToLines=a.get(\"snapToLines\",!0),t.size=a.get(\"size\",100);try{t.align=a.get(\"align\",\"center\")}catch(e){t.align=a.get(\"align\",\"middle\")}try{t.position=a.get(\"position\",\"auto\")}catch(e){t.position=a.get(\"position\",{start:0,left:0,center:50,middle:50,end:100,right:100},t.align)}t.positionAlign=a.get(\"positionAlign\",{start:\"start\",left:\"start\",center:\"center\",middle:\"center\",end:\"end\",right:\"end\"},t.align)}(t,e)}((wi.prototype=Si(Error.prototype)).constructor=wi).Errors={BadSignature:{code:0,message:\"Malformed WebVTT signature.\"},BadTimeStamp:{code:1,message:\"Malformed time stamp.\"}},Ci.prototype={set:function(e,t){this.get(e)||\"\"===t||(this.values[e]=t)},get:function(e,t,i){return i?this.has(e)?this.values[e]:t[i]:this.has(e)?this.values[e]:t},has:function(e){return e in this.values},alt:function(e,t,i){for(var n=0;n<i.length;++n)if(t===i[n]){this.set(e,t);break}},integer:function(e,t){/^-?\\d+$/.test(t)&&this.set(e,parseInt(t,10))},percent:function(e,t){return!!(t.match(/^([\\d]{1,3})(\\.[\\d]*)?%$/)&&0<=(t=parseFloat(t))&&t<=100)&&(this.set(e,t),!0)}};var Ai=p.createElement(\"textarea\"),Pi={c:\"span\",i:\"i\",b:\"b\",u:\"u\",ruby:\"ruby\",rt:\"rt\",v:\"span\",lang:\"span\"},Li={white:\"rgba(255,255,255,1)\",lime:\"rgba(0,255,0,1)\",cyan:\"rgba(0,255,255,1)\",red:\"rgba(255,0,0,1)\",yellow:\"rgba(255,255,0,1)\",magenta:\"rgba(255,0,255,1)\",blue:\"rgba(0,0,255,1)\",black:\"rgba(0,0,0,1)\"},Oi={v:\"title\",lang:\"lang\"},Di={rt:\"ruby\"};function Ri(a,i){function e(){if(!i)return null;var e,t=i.match(/^([^<]*)(<[^>]*>?)?/);return e=t[1]?t[1]:t[2],i=i.substr(e.length),e}function t(e,t){var i=Pi[e];if(!i)return null;var n=a.document.createElement(i),r=Oi[e];return r&&t&&(n[r]=t.trim()),n}for(var n,r,s,o,u=a.document.createElement(\"div\"),l=u,c=[];null!==(n=e());)if(\"<\"!==n[0])l.appendChild(a.document.createTextNode((r=n,Ai.innerHTML=r,r=Ai.textContent,Ai.textContent=\"\",r)));else{if(\"/\"===n[1]){c.length&&c[c.length-1]===n.substr(2).replace(\">\",\"\")&&(c.pop(),l=l.parentNode);continue}var d,h=Ei(n.substr(1,n.length-2));if(h){d=a.document.createProcessingInstruction(\"timestamp\",h),l.appendChild(d);continue}var p=n.match(/^<([^.\\s/0-9>]+)(\\.[^\\s\\\\>]+)?([^>\\\\]+)?(\\\\?)>?$/);if(!p)continue;if(!(d=t(p[1],p[3])))continue;if(s=l,Di[(o=d).localName]&&Di[o.localName]!==s.localName)continue;if(p[2]){var f=p[2].split(\".\");f.forEach(function(e){var t=/^bg_/.test(e),i=t?e.slice(3):e;if(Li.hasOwnProperty(i)){var n=t?\"background-color\":\"color\",r=Li[i];d.style[n]=r}}),d.className=f.join(\" \")}c.push(p[1]),l.appendChild(d),l=d}return u}var Mi=[[1470,1470],[1472,1472],[1475,1475],[1478,1478],[1488,1514],[1520,1524],[1544,1544],[1547,1547],[1549,1549],[1563,1563],[1566,1610],[1645,1647],[1649,1749],[1765,1766],[1774,1775],[1786,1805],[1807,1808],[1810,1839],[1869,1957],[1969,1969],[1984,2026],[2036,2037],[2042,2042],[2048,2069],[2074,2074],[2084,2084],[2088,2088],[2096,2110],[2112,2136],[2142,2142],[2208,2208],[2210,2220],[8207,8207],[64285,64285],[64287,64296],[64298,64310],[64312,64316],[64318,64318],[64320,64321],[64323,64324],[64326,64449],[64467,64829],[64848,64911],[64914,64967],[65008,65020],[65136,65140],[65142,65276],[67584,67589],[67592,67592],[67594,67637],[67639,67640],[67644,67644],[67647,67669],[67671,67679],[67840,67867],[67872,67897],[67903,67903],[67968,68023],[68030,68031],[68096,68096],[68112,68115],[68117,68119],[68121,68147],[68160,68167],[68176,68184],[68192,68223],[68352,68405],[68416,68437],[68440,68466],[68472,68479],[68608,68680],[126464,126467],[126469,126495],[126497,126498],[126500,126500],[126503,126503],[126505,126514],[126516,126519],[126521,126521],[126523,126523],[126530,126530],[126535,126535],[126537,126537],[126539,126539],[126541,126543],[126545,126546],[126548,126548],[126551,126551],[126553,126553],[126555,126555],[126557,126557],[126559,126559],[126561,126562],[126564,126564],[126567,126570],[126572,126578],[126580,126583],[126585,126588],[126590,126590],[126592,126601],[126603,126619],[126625,126627],[126629,126633],[126635,126651],[1114109,1114109]];function Ni(e){for(var t=0;t<Mi.length;t++){var i=Mi[t];if(e>=i[0]&&e<=i[1])return!0}return!1}function Ui(){}function Bi(e,t,i){Ui.call(this),this.cue=t,this.cueDiv=Ri(e,t.text);var n={color:\"rgba(255, 255, 255, 1)\",backgroundColor:\"rgba(0, 0, 0, 0.8)\",position:\"relative\",left:0,right:0,top:0,bottom:0,display:\"inline\",writingMode:\"\"===t.vertical?\"horizontal-tb\":\"lr\"===t.vertical?\"vertical-lr\":\"vertical-rl\",unicodeBidi:\"plaintext\"};this.applyStyles(n,this.cueDiv),this.div=e.document.createElement(\"div\"),n={direction:function(e){var t=[],i=\"\";if(!e||!e.childNodes)return\"ltr\";function r(e,t){for(var i=t.childNodes.length-1;0<=i;i--)e.push(t.childNodes[i])}function a(e){if(!e||!e.length)return null;var t=e.pop(),i=t.textContent||t.innerText;if(i){var n=i.match(/^.*(\\n|\\r)/);return n?n[e.length=0]:i}return\"ruby\"===t.tagName?a(e):t.childNodes?(r(e,t),a(e)):void 0}for(r(t,e);i=a(t);)for(var n=0;n<i.length;n++)if(Ni(i.charCodeAt(n)))return\"rtl\";return\"ltr\"}(this.cueDiv),writingMode:\"\"===t.vertical?\"horizontal-tb\":\"lr\"===t.vertical?\"vertical-lr\":\"vertical-rl\",unicodeBidi:\"plaintext\",textAlign:\"middle\"===t.align?\"center\":t.align,font:i.font,whiteSpace:\"pre-line\",position:\"absolute\"},this.applyStyles(n),this.div.appendChild(this.cueDiv);var r=0;switch(t.positionAlign){case\"start\":r=t.position;break;case\"center\":r=t.position-t.size/2;break;case\"end\":r=t.position-t.size}\"\"===t.vertical?this.applyStyles({left:this.formatStyle(r,\"%\"),width:this.formatStyle(t.size,\"%\")}):this.applyStyles({top:this.formatStyle(r,\"%\"),height:this.formatStyle(t.size,\"%\")}),this.move=function(e){this.applyStyles({top:this.formatStyle(e.top,\"px\"),bottom:this.formatStyle(e.bottom,\"px\"),left:this.formatStyle(e.left,\"px\"),right:this.formatStyle(e.right,\"px\"),height:this.formatStyle(e.height,\"px\"),width:this.formatStyle(e.width,\"px\")})}}function Fi(e){var t,i,n,r;if(e.div){i=e.div.offsetHeight,n=e.div.offsetWidth,r=e.div.offsetTop;var a=(a=e.div.childNodes)&&(a=a[0])&&a.getClientRects&&a.getClientRects();e=e.div.getBoundingClientRect(),t=a?Math.max(a[0]&&a[0].height||0,e.height/a.length):0}this.left=e.left,this.right=e.right,this.top=e.top||r,this.height=e.height||i,this.bottom=e.bottom||r+(e.height||i),this.width=e.width||n,this.lineHeight=void 0!==t?t:e.lineHeight}function ji(e,t,o,u){var i=new Fi(t),n=t.cue,r=function(e){if(\"number\"==typeof e.line&&(e.snapToLines||0<=e.line&&e.line<=100))return e.line;if(!e.track||!e.track.textTrackList||!e.track.textTrackList.mediaElement)return-1;for(var t=e.track,i=t.textTrackList,n=0,r=0;r<i.length&&i[r]!==t;r++)\"showing\"===i[r].mode&&n++;return-1*++n}(n),a=[];if(n.snapToLines){var s;switch(n.vertical){case\"\":a=[\"+y\",\"-y\"],s=\"height\";break;case\"rl\":a=[\"+x\",\"-x\"],s=\"width\";break;case\"lr\":a=[\"-x\",\"+x\"],s=\"width\"}var l=i.lineHeight,c=l*Math.round(r),d=o[s]+l,h=a[0];Math.abs(c)>d&&(c=c<0?-1:1,c*=Math.ceil(d/l)*l),r<0&&(c+=\"\"===n.vertical?o.height:o.width,a=a.reverse()),i.move(h,c)}else{var p=i.lineHeight/o.height*100;switch(n.lineAlign){case\"center\":r-=p/2;break;case\"end\":r-=p}switch(n.vertical){case\"\":t.applyStyles({top:t.formatStyle(r,\"%\")});break;case\"rl\":t.applyStyles({left:t.formatStyle(r,\"%\")});break;case\"lr\":t.applyStyles({right:t.formatStyle(r,\"%\")})}a=[\"+y\",\"-x\",\"+x\",\"-y\"],i=new Fi(t)}var f=function(e,t){for(var i,n=new Fi(e),r=1,a=0;a<t.length;a++){for(;e.overlapsOppositeAxis(o,t[a])||e.within(o)&&e.overlapsAny(u);)e.move(t[a]);if(e.within(o))return e;var s=e.intersectPercentage(o);s<r&&(i=new Fi(e),r=s),e=new Fi(n)}return i||n}(i,a);t.move(f.toCSSCompatValues(o))}function Vi(){}Ui.prototype.applyStyles=function(e,t){for(var i in t=t||this.div,e)e.hasOwnProperty(i)&&(t.style[i]=e[i])},Ui.prototype.formatStyle=function(e,t){return 0===e?0:e+t},(Bi.prototype=Si(Ui.prototype)).constructor=Bi,Fi.prototype.move=function(e,t){switch(t=void 0!==t?t:this.lineHeight,e){case\"+x\":this.left+=t,this.right+=t;break;case\"-x\":this.left-=t,this.right-=t;break;case\"+y\":this.top+=t,this.bottom+=t;break;case\"-y\":this.top-=t,this.bottom-=t}},Fi.prototype.overlaps=function(e){return this.left<e.right&&this.right>e.left&&this.top<e.bottom&&this.bottom>e.top},Fi.prototype.overlapsAny=function(e){for(var t=0;t<e.length;t++)if(this.overlaps(e[t]))return!0;return!1},Fi.prototype.within=function(e){return this.top>=e.top&&this.bottom<=e.bottom&&this.left>=e.left&&this.right<=e.right},Fi.prototype.overlapsOppositeAxis=function(e,t){switch(t){case\"+x\":return this.left<e.left;case\"-x\":return this.right>e.right;case\"+y\":return this.top<e.top;case\"-y\":return this.bottom>e.bottom}},Fi.prototype.intersectPercentage=function(e){return Math.max(0,Math.min(this.right,e.right)-Math.max(this.left,e.left))*Math.max(0,Math.min(this.bottom,e.bottom)-Math.max(this.top,e.top))/(this.height*this.width)},Fi.prototype.toCSSCompatValues=function(e){return{top:this.top-e.top,bottom:e.bottom-this.bottom,left:this.left-e.left,right:e.right-this.right,height:this.height,width:this.width}},Fi.getSimpleBoxPosition=function(e){var t=e.div?e.div.offsetHeight:e.tagName?e.offsetHeight:0,i=e.div?e.div.offsetWidth:e.tagName?e.offsetWidth:0,n=e.div?e.div.offsetTop:e.tagName?e.offsetTop:0;return{left:(e=e.div?e.div.getBoundingClientRect():e.tagName?e.getBoundingClientRect():e).left,right:e.right,top:e.top||n,height:e.height||t,bottom:e.bottom||n+(e.height||t),width:e.width||i}},Vi.StringDecoder=function(){return{decode:function(e){if(!e)return\"\";if(\"string\"!=typeof e)throw new Error(\"Error - expected string data.\");return decodeURIComponent(encodeURIComponent(e))}}},Vi.convertCueToDOMTree=function(e,t){return e&&t?Ri(e,t):null};Vi.processCues=function(n,r,e){if(!n||!r||!e)return null;for(;e.firstChild;)e.removeChild(e.firstChild);var a=n.document.createElement(\"div\");if(a.style.position=\"absolute\",a.style.left=\"0\",a.style.right=\"0\",a.style.top=\"0\",a.style.bottom=\"0\",a.style.margin=\"1.5%\",e.appendChild(a),function(e){for(var t=0;t<e.length;t++)if(e[t].hasBeenReset||!e[t].displayState)return!0;return!1}(r)){var s=[],o=Fi.getSimpleBoxPosition(a),u={font:Math.round(.05*o.height*100)/100+\"px sans-serif\"};!function(){for(var e,t,i=0;i<r.length;i++)t=r[i],e=new Bi(n,t,u),a.appendChild(e.div),ji(0,e,o,s),t.displayState=e.div,s.push(Fi.getSimpleBoxPosition(e))}()}else for(var t=0;t<r.length;t++)a.appendChild(r[t].displayState)},(Vi.Parser=function(e,t,i){i||(i=t,t={}),t=t||{},this.window=e,this.vttjs=t,this.state=\"INITIAL\",this.buffer=\"\",this.decoder=i||new TextDecoder(\"utf8\"),this.regionList=[]}).prototype={reportOrThrowError:function(e){if(!(e instanceof wi))throw e;this.onparsingerror&&this.onparsingerror(e)},parse:function(e){var n=this;function t(){for(var e=n.buffer,t=0;t<e.length&&\"\\r\"!==e[t]&&\"\\n\"!==e[t];)++t;var i=e.substr(0,t);return\"\\r\"===e[t]&&++t,\"\\n\"===e[t]&&++t,n.buffer=e.substr(t),i}function i(e){e.match(/X-TIMESTAMP-MAP/)?Ii(e,function(e,t){switch(e){case\"X-TIMESTAMP-MAP\":!function(e){var i=new Ci;Ii(e,function(e,t){switch(e){case\"MPEGT\":i.integer(e+\"S\",t);break;case\"LOCA\":i.set(e+\"L\",Ei(t))}},/[^\\d]:/,/,/),n.ontimestampmap&&n.ontimestampmap({MPEGTS:i.get(\"MPEGTS\"),LOCAL:i.get(\"LOCAL\")})}(t)}},/=/):Ii(e,function(e,t){switch(e){case\"Region\":!function(e){var r=new Ci;if(Ii(e,function(e,t){switch(e){case\"id\":r.set(e,t);break;case\"width\":r.percent(e,t);break;case\"lines\":r.integer(e,t);break;case\"regionanchor\":case\"viewportanchor\":var i=t.split(\",\");if(2!==i.length)break;var n=new Ci;if(n.percent(\"x\",i[0]),n.percent(\"y\",i[1]),!n.has(\"x\")||!n.has(\"y\"))break;r.set(e+\"X\",n.get(\"x\")),r.set(e+\"Y\",n.get(\"y\"));break;case\"scroll\":r.alt(e,t,[\"up\"])}},/=/,/\\s/),r.has(\"id\")){var t=new(n.vttjs.VTTRegion||n.window.VTTRegion);t.width=r.get(\"width\",100),t.lines=r.get(\"lines\",3),t.regionAnchorX=r.get(\"regionanchorX\",0),t.regionAnchorY=r.get(\"regionanchorY\",100),t.viewportAnchorX=r.get(\"viewportanchorX\",0),t.viewportAnchorY=r.get(\"viewportanchorY\",100),t.scroll=r.get(\"scroll\",\"\"),n.onregion&&n.onregion(t),n.regionList.push({id:r.get(\"id\"),region:t})}}(t)}},/:/)}e&&(n.buffer+=n.decoder.decode(e,{stream:!0}));try{var r;if(\"INITIAL\"===n.state){if(!/\\r\\n|\\n/.test(n.buffer))return this;var a=(r=t()).match(/^WEBVTT([ \\t].*)?$/);if(!a||!a[0])throw new wi(wi.Errors.BadSignature);n.state=\"HEADER\"}for(var s=!1;n.buffer;){if(!/\\r\\n|\\n/.test(n.buffer))return this;switch(s?s=!1:r=t(),n.state){case\"HEADER\":/:/.test(r)?i(r):r||(n.state=\"ID\");continue;case\"NOTE\":r||(n.state=\"ID\");continue;case\"ID\":if(/^NOTE($|[ \\t])/.test(r)){n.state=\"NOTE\";break}if(!r)continue;n.cue=new(n.vttjs.VTTCue||n.window.VTTCue)(0,0,\"\");try{n.cue.align=\"center\"}catch(e){n.cue.align=\"middle\"}if(n.state=\"CUE\",-1===r.indexOf(\"--\\x3e\")){n.cue.id=r;continue}case\"CUE\":try{xi(r,n.cue,n.regionList)}catch(e){n.reportOrThrowError(e),n.cue=null,n.state=\"BADCUE\";continue}n.state=\"CUETEXT\";continue;case\"CUETEXT\":var o=-1!==r.indexOf(\"--\\x3e\");if(!r||o&&(s=!0)){n.oncue&&n.oncue(n.cue),n.cue=null,n.state=\"ID\";continue}n.cue.text&&(n.cue.text+=\"\\n\"),n.cue.text+=r.replace(/\\u2028/g,\"\\n\").replace(/u2029/g,\"\\n\");continue;case\"BADCUE\":r||(n.state=\"ID\");continue}}}catch(e){n.reportOrThrowError(e),\"CUETEXT\"===n.state&&n.cue&&n.oncue&&n.oncue(n.cue),n.cue=null,n.state=\"INITIAL\"===n.state?\"BADWEBVTT\":\"BADCUE\"}return this},flush:function(){var t=this;try{if(t.buffer+=t.decoder.decode(),!t.cue&&\"HEADER\"!==t.state||(t.buffer+=\"\\n\\n\",t.parse()),\"INITIAL\"===t.state)throw new wi(wi.Errors.BadSignature)}catch(e){t.reportOrThrowError(e)}return t.onflush&&t.onflush(),this}};var qi=Vi,Hi={\"\":1,lr:1,rl:1},Wi={start:1,center:1,end:1,left:1,right:1,auto:1,\"line-left\":1,\"line-right\":1};function zi(e){return\"string\"==typeof e&&(!!Wi[e.toLowerCase()]&&e.toLowerCase())}function Gi(e,t,i){this.hasBeenReset=!1;var n=\"\",r=!1,a=e,s=t,o=i,u=null,l=\"\",c=!0,d=\"auto\",h=\"start\",p=\"auto\",f=\"auto\",m=100,g=\"center\";Object.defineProperties(this,{id:{enumerable:!0,get:function(){return n},set:function(e){n=\"\"+e}},pauseOnExit:{enumerable:!0,get:function(){return r},set:function(e){r=!!e}},startTime:{enumerable:!0,get:function(){return a},set:function(e){if(\"number\"!=typeof e)throw new TypeError(\"Start time must be set to a number.\");a=e,this.hasBeenReset=!0}},endTime:{enumerable:!0,get:function(){return s},set:function(e){if(\"number\"!=typeof e)throw new TypeError(\"End time must be set to a number.\");s=e,this.hasBeenReset=!0}},text:{enumerable:!0,get:function(){return o},set:function(e){o=\"\"+e,this.hasBeenReset=!0}},region:{enumerable:!0,get:function(){return u},set:function(e){u=e,this.hasBeenReset=!0}},vertical:{enumerable:!0,get:function(){return l},set:function(e){var t=function(e){return\"string\"==typeof e&&(!!Hi[e.toLowerCase()]&&e.toLowerCase())}(e);if(!1===t)throw new SyntaxError(\"Vertical: an invalid or illegal direction string was specified.\");l=t,this.hasBeenReset=!0}},snapToLines:{enumerable:!0,get:function(){return c},set:function(e){c=!!e,this.hasBeenReset=!0}},line:{enumerable:!0,get:function(){return d},set:function(e){if(\"number\"!=typeof e&&\"auto\"!==e)throw new SyntaxError(\"Line: an invalid number or illegal string was specified.\");d=e,this.hasBeenReset=!0}},lineAlign:{enumerable:!0,get:function(){return h},set:function(e){var t=zi(e);t&&(h=t,this.hasBeenReset=!0)}},position:{enumerable:!0,get:function(){return p},set:function(e){if(e<0||100<e)throw new Error(\"Position must be between 0 and 100.\");p=e,this.hasBeenReset=!0}},positionAlign:{enumerable:!0,get:function(){return f},set:function(e){var t=zi(e);t&&(f=t,this.hasBeenReset=!0)}},size:{enumerable:!0,get:function(){return m},set:function(e){if(e<0||100<e)throw new Error(\"Size must be between 0 and 100.\");m=e,this.hasBeenReset=!0}},align:{enumerable:!0,get:function(){return g},set:function(e){var t=zi(e);if(!t)throw new SyntaxError(\"align: an invalid or illegal alignment string was specified.\");g=t,this.hasBeenReset=!0}}}),this.displayState=void 0}Gi.prototype.getCueAsHTML=function(){return WebVTT.convertCueToDOMTree(window,this.text)};var Xi=Gi,Ki={\"\":!0,up:!0};function Qi(e){return\"number\"==typeof e&&0<=e&&e<=100}function Yi(){var t=100,i=3,n=0,r=100,a=0,s=100,o=\"\";Object.defineProperties(this,{width:{enumerable:!0,get:function(){return t},set:function(e){if(!Qi(e))throw new Error(\"Width must be between 0 and 100.\");t=e}},lines:{enumerable:!0,get:function(){return i},set:function(e){if(\"number\"!=typeof e)throw new TypeError(\"Lines must be set to a number.\");i=e}},regionAnchorY:{enumerable:!0,get:function(){return r},set:function(e){if(!Qi(e))throw new Error(\"RegionAnchorX must be between 0 and 100.\");r=e}},regionAnchorX:{enumerable:!0,get:function(){return n},set:function(e){if(!Qi(e))throw new Error(\"RegionAnchorY must be between 0 and 100.\");n=e}},viewportAnchorY:{enumerable:!0,get:function(){return s},set:function(e){if(!Qi(e))throw new Error(\"ViewportAnchorY must be between 0 and 100.\");s=e}},viewportAnchorX:{enumerable:!0,get:function(){return a},set:function(e){if(!Qi(e))throw new Error(\"ViewportAnchorX must be between 0 and 100.\");a=e}},scroll:{enumerable:!0,get:function(){return o},set:function(e){var t=function(e){return\"string\"==typeof e&&(!!Ki[e.toLowerCase()]&&e.toLowerCase())}(e);!1===t||(o=t)}}})}var $i=i(function(e){var t=e.exports={WebVTT:qi,VTTCue:Xi,VTTRegion:Yi};h.vttjs=t,h.WebVTT=t.WebVTT;var i=t.VTTCue,n=t.VTTRegion,r=h.VTTCue,a=h.VTTRegion;t.shim=function(){h.VTTCue=i,h.VTTRegion=n},t.restore=function(){h.VTTCue=r,h.VTTRegion=a},h.VTTCue||t.shim()});$i.WebVTT,$i.VTTCue,$i.VTTRegion;var Ji=function(t){function i(i,e){var n;return void 0===i&&(i={}),void 0===e&&(e=function(){}),i.reportTouchActivity=!1,(n=t.call(this,null,i,e)||this).hasStarted_=!1,n.on(\"playing\",function(){this.hasStarted_=!0}),n.on(\"loadstart\",function(){this.hasStarted_=!1}),Ti.names.forEach(function(e){var t=Ti[e];i&&i[t.getterName]&&(n[t.privateName]=i[t.getterName])}),n.featuresProgressEvents||n.manualProgressOn(),n.featuresTimeupdateEvents||n.manualTimeUpdatesOn(),[\"Text\",\"Audio\",\"Video\"].forEach(function(e){!1===i[\"native\"+e+\"Tracks\"]&&(n[\"featuresNative\"+e+\"Tracks\"]=!1)}),!1===i.nativeCaptions||!1===i.nativeTextTracks?n.featuresNativeTextTracks=!1:!0!==i.nativeCaptions&&!0!==i.nativeTextTracks||(n.featuresNativeTextTracks=!0),n.featuresNativeTextTracks||n.emulateTextTracks(),n.preloadTextTracks=!1!==i.preloadTextTracks,n.autoRemoteTextTracks_=new Ti.text.ListClass,n.initTrackListeners(),i.nativeControlsForTouch||n.emitTapEvents(),n.constructor&&(n.name_=n.constructor.name||\"Unknown Tech\"),n}kt(i,t);var e=i.prototype;return e.triggerSourceset=function(e){var t=this;this.isReady_||this.one(\"ready\",function(){return t.setTimeout(function(){return t.triggerSourceset(e)},1)}),this.trigger({src:e,type:\"sourceset\"})},e.manualProgressOn=function(){this.on(\"durationchange\",this.onDurationChange),this.manualProgress=!0,this.one(\"ready\",this.trackProgress)},e.manualProgressOff=function(){this.manualProgress=!1,this.stopTrackingProgress(),this.off(\"durationchange\",this.onDurationChange)},e.trackProgress=function(e){this.stopTrackingProgress(),this.progressInterval=this.setInterval($e(this,function(){var e=this.bufferedPercent();this.bufferedPercent_!==e&&this.trigger(\"progress\"),1===(this.bufferedPercent_=e)&&this.stopTrackingProgress()}),500)},e.onDurationChange=function(e){this.duration_=this.duration()},e.buffered=function(){return Ct(0,0)},e.bufferedPercent=function(){return It(this.buffered(),this.duration_)},e.stopTrackingProgress=function(){this.clearInterval(this.progressInterval)},e.manualTimeUpdatesOn=function(){this.manualTimeUpdates=!0,this.on(\"play\",this.trackCurrentTime),this.on(\"pause\",this.stopTrackingCurrentTime)},e.manualTimeUpdatesOff=function(){this.manualTimeUpdates=!1,this.stopTrackingCurrentTime(),this.off(\"play\",this.trackCurrentTime),this.off(\"pause\",this.stopTrackingCurrentTime)},e.trackCurrentTime=function(){this.currentTimeInterval&&this.stopTrackingCurrentTime(),this.currentTimeInterval=this.setInterval(function(){this.trigger({type:\"timeupdate\",target:this,manuallyTriggered:!0})},250)},e.stopTrackingCurrentTime=function(){this.clearInterval(this.currentTimeInterval),this.trigger({type:\"timeupdate\",target:this,manuallyTriggered:!0})},e.dispose=function(){this.clearTracks(_i.names),this.manualProgress&&this.manualProgressOff(),this.manualTimeUpdates&&this.manualTimeUpdatesOff(),t.prototype.dispose.call(this)},e.clearTracks=function(e){var r=this;(e=[].concat(e)).forEach(function(e){for(var t=r[e+\"Tracks\"]()||[],i=t.length;i--;){var n=t[i];\"text\"===e&&r.removeRemoteTextTrack(n),t.removeTrack(n)}})},e.cleanupAutoTextTracks=function(){for(var e=this.autoRemoteTextTracks_||[],t=e.length;t--;){var i=e[t];this.removeRemoteTextTrack(i)}},e.reset=function(){},e.crossOrigin=function(){},e.setCrossOrigin=function(){},e.error=function(e){return void 0!==e&&(this.error_=new xt(e),this.trigger(\"error\")),this.error_},e.played=function(){return this.hasStarted_?Ct(0,0):Ct()},e.play=function(){},e.setScrubbing=function(){},e.scrubbing=function(){},e.setCurrentTime=function(){this.manualTimeUpdates&&this.trigger({type:\"timeupdate\",target:this,manuallyTriggered:!0})},e.initTrackListeners=function(){var r=this;_i.names.forEach(function(e){function t(){r.trigger(e+\"trackchange\")}var i=_i[e],n=r[i.getterName]();n.addEventListener(\"removetrack\",t),n.addEventListener(\"addtrack\",t),r.on(\"dispose\",function(){n.removeEventListener(\"removetrack\",t),n.removeEventListener(\"addtrack\",t)})})},e.addWebVttScript_=function(){var e=this;if(!h.WebVTT)if(p.body.contains(this.el())){if(!this.options_[\"vtt.js\"]&&w($i)&&0<Object.keys($i).length)return void this.trigger(\"vttjsloaded\");var t=p.createElement(\"script\");t.src=this.options_[\"vtt.js\"]||\"https://vjs.zencdn.net/vttjs/0.14.1/vtt.min.js\",t.onload=function(){e.trigger(\"vttjsloaded\")},t.onerror=function(){e.trigger(\"vttjserror\")},this.on(\"dispose\",function(){t.onload=null,t.onerror=null}),h.WebVTT=!0,this.el().parentNode.appendChild(t)}else this.ready(this.addWebVttScript_)},e.emulateTextTracks=function(){function t(e){return n.addTrack(e.track)}function i(e){return n.removeTrack(e.track)}var e=this,n=this.textTracks(),r=this.remoteTextTracks();r.on(\"addtrack\",t),r.on(\"removetrack\",i),this.addWebVttScript_();function a(){return e.trigger(\"texttrackchange\")}function s(){a();for(var e=0;e<n.length;e++){var t=n[e];t.removeEventListener(\"cuechange\",a),\"showing\"===t.mode&&t.addEventListener(\"cuechange\",a)}}s(),n.addEventListener(\"change\",s),n.addEventListener(\"addtrack\",s),n.addEventListener(\"removetrack\",s),this.on(\"dispose\",function(){r.off(\"addtrack\",t),r.off(\"removetrack\",i),n.removeEventListener(\"change\",s),n.removeEventListener(\"addtrack\",s),n.removeEventListener(\"removetrack\",s);for(var e=0;e<n.length;e++){n[e].removeEventListener(\"cuechange\",a)}})},e.addTextTrack=function(e,t,i){if(!e)throw new Error(\"TextTrack kind is required but was not provided\");return function(e,t,i,n,r){void 0===r&&(r={});var a=e.textTracks();r.kind=t,i&&(r.label=i),n&&(r.language=n),r.tech=e;var s=new Ti.text.TrackClass(r);return a.addTrack(s),s}(this,e,t,i)},e.createRemoteTextTrack=function(e){var t=gt(e,{tech:this});return new bi.remoteTextEl.TrackClass(t)},e.addRemoteTextTrack=function(e,t){var i=this;void 0===e&&(e={});var n=this.createRemoteTextTrack(e);return!0!==t&&!1!==t&&(g.warn('Calling addRemoteTextTrack without explicitly setting the \"manualCleanup\" parameter to `true` is deprecated and default to `false` in future version of video.js'),t=!0),this.remoteTextTrackEls().addTrackElement_(n),this.remoteTextTracks().addTrack(n.track),!0!==t&&this.ready(function(){return i.autoRemoteTextTracks_.addTrack(n.track)}),n},e.removeRemoteTextTrack=function(e){var t=this.remoteTextTrackEls().getTrackElementByTrack_(e);this.remoteTextTrackEls().removeTrackElement_(t),this.remoteTextTracks().removeTrack(e),this.autoRemoteTextTracks_.removeTrack(e)},e.getVideoPlaybackQuality=function(){return{}},e.requestPictureInPicture=function(){var e=this.options_.Promise||h.Promise;if(e)return e.reject()},e.disablePictureInPicture=function(){return!0},e.setDisablePictureInPicture=function(){},e.setPoster=function(){},e.playsinline=function(){},e.setPlaysinline=function(){},e.overrideNativeAudioTracks=function(){},e.overrideNativeVideoTracks=function(){},e.canPlayType=function(){return\"\"},i.canPlayType=function(){return\"\"},i.canPlaySource=function(e,t){return i.canPlayType(e.type)},i.isTech=function(e){return e.prototype instanceof i||e instanceof i||e===i},i.registerTech=function(e,t){if(i.techs_||(i.techs_={}),!i.isTech(t))throw new Error(\"Tech \"+e+\" must be a Tech\");if(!i.canPlayType)throw new Error(\"Techs must have a static canPlayType method on them\");if(!i.canPlaySource)throw new Error(\"Techs must have a static canPlaySource method on them\");return e=mt(e),i.techs_[e]=t,i.techs_[ft(e)]=t,\"Tech\"!==e&&i.defaultTechOrder_.push(e),t},i.getTech=function(e){if(e)return i.techs_&&i.techs_[e]?i.techs_[e]:(e=mt(e),h&&h.videojs&&h.videojs[e]?(g.warn(\"The \"+e+\" tech was added to the videojs object when it should be registered using videojs.registerTech(name, tech)\"),h.videojs[e]):void 0)},i}(Tt);Ti.names.forEach(function(e){var t=Ti[e];Ji.prototype[t.getterName]=function(){return this[t.privateName]=this[t.privateName]||new t.ListClass,this[t.privateName]}}),Ji.prototype.featuresVolumeControl=!0,Ji.prototype.featuresMuteControl=!0,Ji.prototype.featuresFullscreenResize=!1,Ji.prototype.featuresPlaybackRate=!1,Ji.prototype.featuresProgressEvents=!1,Ji.prototype.featuresSourceset=!1,Ji.prototype.featuresTimeupdateEvents=!1,Ji.prototype.featuresNativeTextTracks=!1,Ji.withSourceHandlers=function(r){r.registerSourceHandler=function(e,t){var i=r.sourceHandlers;i=i||(r.sourceHandlers=[]),void 0===t&&(t=i.length),i.splice(t,0,e)},r.canPlayType=function(e){for(var t,i=r.sourceHandlers||[],n=0;n<i.length;n++)if(t=i[n].canPlayType(e))return t;return\"\"},r.selectSourceHandler=function(e,t){for(var i=r.sourceHandlers||[],n=0;n<i.length;n++)if(i[n].canHandleSource(e,t))return i[n];return null},r.canPlaySource=function(e,t){var i=r.selectSourceHandler(e,t);return i?i.canHandleSource(e,t):\"\"};[\"seekable\",\"seeking\",\"duration\"].forEach(function(e){var t=this[e];\"function\"==typeof t&&(this[e]=function(){return this.sourceHandler_&&this.sourceHandler_[e]?this.sourceHandler_[e].apply(this.sourceHandler_,arguments):t.apply(this,arguments)})},r.prototype),r.prototype.setSource=function(e){var t=r.selectSourceHandler(e,this.options_);t||(r.nativeSourceHandler?t=r.nativeSourceHandler:g.error(\"No source handler found for the current source.\")),this.disposeSourceHandler(),this.off(\"dispose\",this.disposeSourceHandler),t!==r.nativeSourceHandler&&(this.currentSource_=e),this.sourceHandler_=t.handleSource(e,this,this.options_),this.one(\"dispose\",this.disposeSourceHandler)},r.prototype.disposeSourceHandler=function(){this.currentSource_&&(this.clearTracks([\"audio\",\"video\"]),this.currentSource_=null),this.cleanupAutoTextTracks(),this.sourceHandler_&&(this.sourceHandler_.dispose&&this.sourceHandler_.dispose(),this.sourceHandler_=null)}},Tt.registerComponent(\"Tech\",Ji),Ji.registerTech(\"Tech\",Ji),Ji.defaultTechOrder_=[];var Zi={},en={},tn={};function nn(e,t,i){e.setTimeout(function(){return function i(n,e,r,a,s,o){void 0===n&&(n={});void 0===e&&(e=[]);void 0===s&&(s=[]);void 0===o&&(o=!1);var t=e,u=t[0],l=t.slice(1);if(\"string\"==typeof u)i(n,Zi[u],r,a,s,o);else if(u){var c=ln(a,u);if(!c.setSource)return s.push(c),i(n,l,r,a,s,o);c.setSource(S({},n),function(e,t){if(e)return i(n,l,r,a,s,o);s.push(c),i(t,n.type===t.type?l:Zi[t.type],r,a,s,o)})}else l.length?i(n,l,r,a,s,o):o?r(n,s):i(n,Zi[\"*\"],r,a,s,!0)}(t,Zi[t.type],i,e)},1)}function rn(e,t,i,n){void 0===n&&(n=null);var r=\"call\"+mt(i),a=e.reduce(un(r),n),s=a===tn,o=s?null:t[i](a);return function(e,t,i,n){for(var r=e.length-1;0<=r;r--){var a=e[r];a[t]&&a[t](n,i)}}(e,i,o,s),o}var an={buffered:1,currentTime:1,duration:1,muted:1,played:1,paused:1,seekable:1,volume:1},sn={setCurrentTime:1,setMuted:1,setVolume:1},on={play:1,pause:1};function un(i){return function(e,t){return e===tn?tn:t[i]?t[i](e):e}}function ln(e,t){var i=en[e.id()],n=null;if(null==i)return n=t(e),en[e.id()]=[[t,n]],n;for(var r=0;r<i.length;r++){var a=i[r],s=a[0],o=a[1];s===t&&(n=o)}return null===n&&(n=t(e),i.push([t,n])),n}function cn(e){void 0===e&&(e=\"\");var t=zt(e);return dn[t.toLowerCase()]||\"\"}var dn={opus:\"video/ogg\",ogv:\"video/ogg\",mp4:\"video/mp4\",mov:\"video/mp4\",m4v:\"video/mp4\",mkv:\"video/x-matroska\",m4a:\"audio/mp4\",mp3:\"audio/mpeg\",aac:\"audio/aac\",caf:\"audio/x-caf\",flac:\"audio/flac\",oga:\"audio/ogg\",wav:\"audio/wav\",m3u8:\"application/x-mpegURL\",jpg:\"image/jpeg\",jpeg:\"image/jpeg\",gif:\"image/gif\",png:\"image/png\",svg:\"image/svg+xml\",webp:\"image/webp\"};function hn(e){if(!e.type){var t=cn(e.src);t&&(e.type=t)}return e}var pn=function(l){function e(e,t,i){var n,r=gt({createEl:!1},t);if(n=l.call(this,e,r,i)||this,t.playerOptions.sources&&0!==t.playerOptions.sources.length)e.src(t.playerOptions.sources);else for(var a=0,s=t.playerOptions.techOrder;a<s.length;a++){var o=mt(s[a]),u=Ji.getTech(o);if(o||(u=Tt.getComponent(o)),u&&u.isSupported()){e.loadTech_(o);break}}return n}return kt(e,l),e}(Tt);Tt.registerComponent(\"MediaLoader\",pn);var fn=function(r){function e(e,t){var i;return(i=r.call(this,e,t)||this).emitTapEvents(),i.enable(),i}kt(e,r);var t=e.prototype;return t.createEl=function(e,t,i){void 0===e&&(e=\"div\"),void 0===t&&(t={}),void 0===i&&(i={}),t=S({innerHTML:'<span aria-hidden=\"true\" class=\"vjs-icon-placeholder\"></span>',className:this.buildCSSClass(),tabIndex:0},t),\"button\"===e&&g.error(\"Creating a ClickableComponent with an HTML element of \"+e+\" is not supported; use a Button instead.\"),i=S({role:\"button\"},i),this.tabIndex_=t.tabIndex;var n=r.prototype.createEl.call(this,e,t,i);return this.createControlTextEl(n),n},t.dispose=function(){this.controlTextEl_=null,r.prototype.dispose.call(this)},t.createControlTextEl=function(e){return this.controlTextEl_=ne(\"span\",{className:\"vjs-control-text\"},{\"aria-live\":\"polite\"}),e&&e.appendChild(this.controlTextEl_),this.controlText(this.controlText_,e),this.controlTextEl_},t.controlText=function(e,t){if(void 0===t&&(t=this.el()),void 0===e)return this.controlText_||\"Need Text\";var i=this.localize(e);this.controlText_=e,re(this.controlTextEl_,i),this.nonIconControl||t.setAttribute(\"title\",i)},t.buildCSSClass=function(){return\"vjs-control vjs-button \"+r.prototype.buildCSSClass.call(this)},t.enable=function(){this.enabled_||(this.enabled_=!0,this.removeClass(\"vjs-disabled\"),this.el_.setAttribute(\"aria-disabled\",\"false\"),\"undefined\"!=typeof this.tabIndex_&&this.el_.setAttribute(\"tabIndex\",this.tabIndex_),this.on([\"tap\",\"click\"],this.handleClick),this.on(\"keydown\",this.handleKeyDown))},t.disable=function(){this.enabled_=!1,this.addClass(\"vjs-disabled\"),this.el_.setAttribute(\"aria-disabled\",\"true\"),\"undefined\"!=typeof this.tabIndex_&&this.el_.removeAttribute(\"tabIndex\"),this.off(\"mouseover\",this.handleMouseOver),this.off(\"mouseout\",this.handleMouseOut),this.off([\"tap\",\"click\"],this.handleClick),this.off(\"keydown\",this.handleKeyDown)},t.handleLanguagechange=function(){this.controlText(this.controlText_)},t.handleClick=function(e){this.options_.clickHandler&&this.options_.clickHandler.call(this,arguments)},t.handleKeyDown=function(e){Nt.isEventKey(e,\"Space\")||Nt.isEventKey(e,\"Enter\")?(e.preventDefault(),e.stopPropagation(),this.trigger(\"click\")):r.prototype.handleKeyDown.call(this,e)},e}(Tt);Tt.registerComponent(\"ClickableComponent\",fn);var mn=function(n){function e(e,t){var i;return(i=n.call(this,e,t)||this).update(),e.on(\"posterchange\",$e(St(i),i.update)),i}kt(e,n);var t=e.prototype;return t.dispose=function(){this.player().off(\"posterchange\",this.update),n.prototype.dispose.call(this)},t.createEl=function(){return ne(\"div\",{className:\"vjs-poster\",tabIndex:-1})},t.update=function(e){var t=this.player().poster();this.setSrc(t),t?this.show():this.hide()},t.setSrc=function(e){var t=\"\";e&&(t='url(\"'+e+'\")'),this.el_.style.backgroundImage=t},t.handleClick=function(e){if(this.player_.controls()){var t=this.player_.usingPlugin(\"eme\")&&this.player_.eme.sessions&&0<this.player_.eme.sessions.length;!this.player_.tech(!0)||(q||F)&&t||this.player_.tech(!0).focus(),this.player_.paused()?Ot(this.player_.play()):this.player_.pause()}},e}(fn);Tt.registerComponent(\"PosterImage\",mn);var gn=\"#222\",vn={monospace:\"monospace\",sansSerif:\"sans-serif\",serif:\"serif\",monospaceSansSerif:'\"Andale Mono\", \"Lucida Console\", monospace',monospaceSerif:'\"Courier New\", monospace',proportionalSansSerif:\"sans-serif\",proportionalSerif:\"serif\",casual:'\"Comic Sans MS\", Impact, fantasy',script:'\"Monotype Corsiva\", cursive',smallcaps:'\"Andale Mono\", \"Lucida Console\", monospace, sans-serif'};function yn(e,t){var i;if(4===e.length)i=e[1]+e[1]+e[2]+e[2]+e[3]+e[3];else{if(7!==e.length)throw new Error(\"Invalid color code provided, \"+e+\"; must be formatted as e.g. #f0e or #f604e2.\");i=e.slice(1)}return\"rgba(\"+parseInt(i.slice(0,2),16)+\",\"+parseInt(i.slice(2,4),16)+\",\"+parseInt(i.slice(4,6),16)+\",\"+t+\")\"}function _n(e,t,i){try{e.style[t]=i}catch(e){return}}var bn=function(a){function e(i,e,t){var n;n=a.call(this,i,e,t)||this;var r=$e(St(n),n.updateDisplay);return i.on(\"loadstart\",$e(St(n),n.toggleDisplay)),i.on(\"texttrackchange\",r),i.on(\"loadedmetadata\",$e(St(n),n.preselectTrack)),i.ready($e(St(n),function(){if(i.tech_&&i.tech_.featuresNativeTextTracks)this.hide();else{i.on(\"fullscreenchange\",r),i.on(\"playerresize\",r),h.addEventListener(\"orientationchange\",r),i.on(\"dispose\",function(){return h.removeEventListener(\"orientationchange\",r)});for(var e=this.options_.playerOptions.tracks||[],t=0;t<e.length;t++)this.player_.addRemoteTextTrack(e[t],!0);this.preselectTrack()}})),n}kt(e,a);var t=e.prototype;return t.preselectTrack=function(){for(var e,t,i,n={captions:1,subtitles:1},r=this.player_.textTracks(),a=this.player_.cache_.selectedLanguage,s=0;s<r.length;s++){var o=r[s];a&&a.enabled&&a.language&&a.language===o.language&&o.kind in n?i=o.kind===a.kind?o:i||o:a&&!a.enabled?t=e=i=null:o.default&&(\"descriptions\"!==o.kind||e?o.kind in n&&!t&&(t=o):e=o)}i?i.mode=\"showing\":t?t.mode=\"showing\":e&&(e.mode=\"showing\")},t.toggleDisplay=function(){this.player_.tech_&&this.player_.tech_.featuresNativeTextTracks?this.hide():this.show()},t.createEl=function(){return a.prototype.createEl.call(this,\"div\",{className:\"vjs-text-track-display\"},{\"aria-live\":\"off\",\"aria-atomic\":\"true\"})},t.clearDisplay=function(){\"function\"==typeof h.WebVTT&&h.WebVTT.processCues(h,[],this.el_)},t.updateDisplay=function(){var e=this.player_.textTracks(),t=this.options_.allowMultipleShowingTracks;if(this.clearDisplay(),t){for(var i=[],n=0;n<e.length;++n){var r=e[n];\"showing\"===r.mode&&i.push(r)}this.updateForTrack(i)}else{for(var a=null,s=null,o=e.length;o--;){var u=e[o];\"showing\"===u.mode&&(\"descriptions\"===u.kind?a=u:s=u)}s?(\"off\"!==this.getAttribute(\"aria-live\")&&this.setAttribute(\"aria-live\",\"off\"),this.updateForTrack(s)):a&&(\"assertive\"!==this.getAttribute(\"aria-live\")&&this.setAttribute(\"aria-live\",\"assertive\"),this.updateForTrack(a))}},t.updateDisplayState=function(e){for(var t=this.player_.textTrackSettings.getValues(),i=e.activeCues,n=i.length;n--;){var r=i[n];if(r){var a=r.displayState;if(t.color&&(a.firstChild.style.color=t.color),t.textOpacity&&_n(a.firstChild,\"color\",yn(t.color||\"#fff\",t.textOpacity)),t.backgroundColor&&(a.firstChild.style.backgroundColor=t.backgroundColor),t.backgroundOpacity&&_n(a.firstChild,\"backgroundColor\",yn(t.backgroundColor||\"#000\",t.backgroundOpacity)),t.windowColor&&(t.windowOpacity?_n(a,\"backgroundColor\",yn(t.windowColor,t.windowOpacity)):a.style.backgroundColor=t.windowColor),t.edgeStyle&&(\"dropshadow\"===t.edgeStyle?a.firstChild.style.textShadow=\"2px 2px 3px #222, 2px 2px 4px #222, 2px 2px 5px \"+gn:\"raised\"===t.edgeStyle?a.firstChild.style.textShadow=\"1px 1px #222, 2px 2px #222, 3px 3px \"+gn:\"depressed\"===t.edgeStyle?a.firstChild.style.textShadow=\"1px 1px #ccc, 0 1px #ccc, -1px -1px #222, 0 -1px \"+gn:\"uniform\"===t.edgeStyle&&(a.firstChild.style.textShadow=\"0 0 4px #222, 0 0 4px #222, 0 0 4px #222, 0 0 4px \"+gn)),t.fontPercent&&1!==t.fontPercent){var s=h.parseFloat(a.style.fontSize);a.style.fontSize=s*t.fontPercent+\"px\",a.style.height=\"auto\",a.style.top=\"auto\"}t.fontFamily&&\"default\"!==t.fontFamily&&(\"small-caps\"===t.fontFamily?a.firstChild.style.fontVariant=\"small-caps\":a.firstChild.style.fontFamily=vn[t.fontFamily])}}},t.updateForTrack=function(e){if(Array.isArray(e)||(e=[e]),\"function\"==typeof h.WebVTT&&!e.every(function(e){return!e.activeCues})){for(var t=[],i=0;i<e.length;++i)for(var n=e[i],r=0;r<n.activeCues.length;++r)t.push(n.activeCues[r]);h.WebVTT.processCues(h,t,this.el_);for(var a=0;a<e.length;++a){for(var s=e[a],o=0;o<s.activeCues.length;++o){var u=s.activeCues[o].displayState;oe(u,\"vjs-text-track-cue\"),oe(u,\"vjs-text-track-cue-\"+(s.language?s.language:a))}this.player_.textTrackSettings&&this.updateDisplayState(s)}}},e}(Tt);Tt.registerComponent(\"TextTrackDisplay\",bn);var Tn=function(r){function e(){return r.apply(this,arguments)||this}return kt(e,r),e.prototype.createEl=function(){var e=this.player_.isAudio(),t=this.localize(e?\"Audio Player\":\"Video Player\"),i=ne(\"span\",{className:\"vjs-control-text\",innerHTML:this.localize(\"{1} is loading.\",[t])}),n=r.prototype.createEl.call(this,\"div\",{className:\"vjs-loading-spinner\",dir:\"ltr\"});return n.appendChild(i),n},e}(Tt);Tt.registerComponent(\"LoadingSpinner\",Tn);var Sn=function(t){function e(){return t.apply(this,arguments)||this}kt(e,t);var i=e.prototype;return i.createEl=function(e,t,i){void 0===t&&(t={}),void 0===i&&(i={}),t=S({innerHTML:'<span aria-hidden=\"true\" class=\"vjs-icon-placeholder\"></span>',className:this.buildCSSClass()},t),i=S({type:\"button\"},i);var n=Tt.prototype.createEl.call(this,\"button\",t,i);return this.createControlTextEl(n),n},i.addChild=function(e,t){void 0===t&&(t={});var i=this.constructor.name;return g.warn(\"Adding an actionable (user controllable) child to a Button (\"+i+\") is not supported; use a ClickableComponent instead.\"),Tt.prototype.addChild.call(this,e,t)},i.enable=function(){t.prototype.enable.call(this),this.el_.removeAttribute(\"disabled\")},i.disable=function(){t.prototype.disable.call(this),this.el_.setAttribute(\"disabled\",\"disabled\")},i.handleKeyDown=function(e){Nt.isEventKey(e,\"Space\")||Nt.isEventKey(e,\"Enter\")?e.stopPropagation():t.prototype.handleKeyDown.call(this,e)},e}(fn);Tt.registerComponent(\"Button\",Sn);var kn=function(n){function e(e,t){var i;return(i=n.call(this,e,t)||this).mouseused_=!1,i.on(\"mousedown\",i.handleMouseDown),i}kt(e,n);var t=e.prototype;return t.buildCSSClass=function(){return\"vjs-big-play-button\"},t.handleClick=function(e){var t=this.player_.play();if(this.mouseused_&&e.clientX&&e.clientY){var i=this.player_.usingPlugin(\"eme\")&&this.player_.eme.sessions&&0<this.player_.eme.sessions.length;return Ot(t),void(!this.player_.tech(!0)||(q||F)&&i||this.player_.tech(!0).focus())}var n=this.player_.getChild(\"controlBar\"),r=n&&n.getChild(\"playToggle\");if(r){var a=function(){return r.focus()};Lt(t)?t.then(a,function(){}):this.setTimeout(a,1)}else this.player_.tech(!0).focus()},t.handleKeyDown=function(e){this.mouseused_=!1,n.prototype.handleKeyDown.call(this,e)},t.handleMouseDown=function(e){this.mouseused_=!0},e}(Sn);kn.prototype.controlText_=\"Play Video\",Tt.registerComponent(\"BigPlayButton\",kn);var wn=function(n){function e(e,t){var i;return(i=n.call(this,e,t)||this).controlText(t&&t.controlText||i.localize(\"Close\")),i}kt(e,n);var t=e.prototype;return t.buildCSSClass=function(){return\"vjs-close-button \"+n.prototype.buildCSSClass.call(this)},t.handleClick=function(e){this.trigger({type:\"close\",bubbles:!1})},t.handleKeyDown=function(e){Nt.isEventKey(e,\"Esc\")?(e.preventDefault(),e.stopPropagation(),this.trigger(\"click\")):n.prototype.handleKeyDown.call(this,e)},e}(Sn);Tt.registerComponent(\"CloseButton\",wn);var En=function(n){function e(e,t){var i;return void 0===t&&(t={}),i=n.call(this,e,t)||this,t.replay=void 0===t.replay||t.replay,i.on(e,\"play\",i.handlePlay),i.on(e,\"pause\",i.handlePause),t.replay&&i.on(e,\"ended\",i.handleEnded),i}kt(e,n);var t=e.prototype;return t.buildCSSClass=function(){return\"vjs-play-control \"+n.prototype.buildCSSClass.call(this)},t.handleClick=function(e){this.player_.paused()?this.player_.play():this.player_.pause()},t.handleSeeked=function(e){this.removeClass(\"vjs-ended\"),this.player_.paused()?this.handlePause(e):this.handlePlay(e)},t.handlePlay=function(e){this.removeClass(\"vjs-ended\"),this.removeClass(\"vjs-paused\"),this.addClass(\"vjs-playing\"),this.controlText(\"Pause\")},t.handlePause=function(e){this.removeClass(\"vjs-playing\"),this.addClass(\"vjs-paused\"),this.controlText(\"Play\")},t.handleEnded=function(e){this.removeClass(\"vjs-playing\"),this.addClass(\"vjs-ended\"),this.controlText(\"Replay\"),this.one(this.player_,\"seeked\",this.handleSeeked)},e}(Sn);En.prototype.controlText_=\"Play\",Tt.registerComponent(\"PlayToggle\",En);function Cn(e,t){e=e<0?0:e;var i=Math.floor(e%60),n=Math.floor(e/60%60),r=Math.floor(e/3600),a=Math.floor(t/60%60),s=Math.floor(t/3600);return!isNaN(e)&&e!==1/0||(r=n=i=\"-\"),(r=0<r||0<s?r+\":\":\"\")+(n=((r||10<=a)&&n<10?\"0\"+n:n)+\":\")+(i=i<10?\"0\"+i:i)}var In=Cn;function xn(e,t){return void 0===t&&(t=e),In(e,t)}var An=function(n){function e(e,t){var i;return(i=n.call(this,e,t)||this).on(e,[\"timeupdate\",\"ended\"],i.updateContent),i.updateTextNode_(),i}kt(e,n);var t=e.prototype;return t.createEl=function(){var e=this.buildCSSClass(),t=n.prototype.createEl.call(this,\"div\",{className:e+\" vjs-time-control vjs-control\",innerHTML:'<span class=\"vjs-control-text\" role=\"presentation\">'+this.localize(this.labelText_)+\" </span>\"});return this.contentEl_=ne(\"span\",{className:e+\"-display\"},{\"aria-live\":\"off\",role:\"presentation\"}),t.appendChild(this.contentEl_),t},t.dispose=function(){this.contentEl_=null,this.textNode_=null,n.prototype.dispose.call(this)},t.updateTextNode_=function(e){var t=this;void 0===e&&(e=0),e=xn(e),this.formattedTime_!==e&&(this.formattedTime_=e,this.requestNamedAnimationFrame(\"TimeDisplay#updateTextNode_\",function(){if(t.contentEl_){var e=t.textNode_;e&&t.contentEl_.firstChild!==e&&(e=null,g.warn(\"TimeDisplay#updateTextnode_: Prevented replacement of text node element since it was no longer a child of this node. Appending a new node instead.\")),t.textNode_=p.createTextNode(t.formattedTime_),t.textNode_&&(e?t.contentEl_.replaceChild(t.textNode_,e):t.contentEl_.appendChild(t.textNode_))}}))},t.updateContent=function(e){},e}(Tt);An.prototype.labelText_=\"Time\",An.prototype.controlText_=\"Time\",Tt.registerComponent(\"TimeDisplay\",An);var Pn=function(e){function t(){return e.apply(this,arguments)||this}kt(t,e);var i=t.prototype;return i.buildCSSClass=function(){return\"vjs-current-time\"},i.updateContent=function(e){var t;t=this.player_.ended()?this.player_.duration():this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime(),this.updateTextNode_(t)},t}(An);Pn.prototype.labelText_=\"Current Time\",Pn.prototype.controlText_=\"Current Time\",Tt.registerComponent(\"CurrentTimeDisplay\",Pn);var Ln=function(n){function e(e,t){var i;return(i=n.call(this,e,t)||this).on(e,\"durationchange\",i.updateContent),i.on(e,\"loadstart\",i.updateContent),i.on(e,\"loadedmetadata\",i.updateContent),i}kt(e,n);var t=e.prototype;return t.buildCSSClass=function(){return\"vjs-duration\"},t.updateContent=function(e){var t=this.player_.duration();this.updateTextNode_(t)},e}(An);Ln.prototype.labelText_=\"Duration\",Ln.prototype.controlText_=\"Duration\",Tt.registerComponent(\"DurationDisplay\",Ln);var On=function(e){function t(){return e.apply(this,arguments)||this}return kt(t,e),t.prototype.createEl=function(){return e.prototype.createEl.call(this,\"div\",{className:\"vjs-time-control vjs-time-divider\",innerHTML:\"<div><span>/</span></div>\"},{\"aria-hidden\":!0})},t}(Tt);Tt.registerComponent(\"TimeDivider\",On);var Dn=function(n){function e(e,t){var i;return(i=n.call(this,e,t)||this).on(e,\"durationchange\",i.updateContent),i}kt(e,n);var t=e.prototype;return t.buildCSSClass=function(){return\"vjs-remaining-time\"},t.createEl=function(){var e=n.prototype.createEl.call(this);return e.insertBefore(ne(\"span\",{},{\"aria-hidden\":!0},\"-\"),this.contentEl_),e},t.updateContent=function(e){var t;\"number\"==typeof this.player_.duration()&&(t=this.player_.ended()?0:this.player_.remainingTimeDisplay?this.player_.remainingTimeDisplay():this.player_.remainingTime(),this.updateTextNode_(t))},e}(An);Dn.prototype.labelText_=\"Remaining Time\",Dn.prototype.controlText_=\"Remaining Time\",Tt.registerComponent(\"RemainingTimeDisplay\",Dn);var Rn=function(n){function e(e,t){var i;return(i=n.call(this,e,t)||this).updateShowing(),i.on(i.player(),\"durationchange\",i.updateShowing),i}kt(e,n);var t=e.prototype;return t.createEl=function(){var e=n.prototype.createEl.call(this,\"div\",{className:\"vjs-live-control vjs-control\"});return this.contentEl_=ne(\"div\",{className:\"vjs-live-display\",innerHTML:'<span class=\"vjs-control-text\">'+this.localize(\"Stream Type\")+\" </span>\"+this.localize(\"LIVE\")},{\"aria-live\":\"off\"}),e.appendChild(this.contentEl_),e},t.dispose=function(){this.contentEl_=null,n.prototype.dispose.call(this)},t.updateShowing=function(e){this.player().duration()===1/0?this.show():this.hide()},e}(Tt);Tt.registerComponent(\"LiveDisplay\",Rn);var Mn=function(n){function e(e,t){var i;return(i=n.call(this,e,t)||this).updateLiveEdgeStatus(),i.player_.liveTracker&&i.on(i.player_.liveTracker,\"liveedgechange\",i.updateLiveEdgeStatus),i}kt(e,n);var t=e.prototype;return t.createEl=function(){var e=n.prototype.createEl.call(this,\"button\",{className:\"vjs-seek-to-live-control vjs-control\"});return this.textEl_=ne(\"span\",{className:\"vjs-seek-to-live-text\",innerHTML:this.localize(\"LIVE\")},{\"aria-hidden\":\"true\"}),e.appendChild(this.textEl_),e},t.updateLiveEdgeStatus=function(){!this.player_.liveTracker||this.player_.liveTracker.atLiveEdge()?(this.setAttribute(\"aria-disabled\",!0),this.addClass(\"vjs-at-live-edge\"),this.controlText(\"Seek to live, currently playing live\")):(this.setAttribute(\"aria-disabled\",!1),this.removeClass(\"vjs-at-live-edge\"),this.controlText(\"Seek to live, currently behind live\"))},t.handleClick=function(){this.player_.liveTracker.seekToLiveEdge()},t.dispose=function(){this.player_.liveTracker&&this.off(this.player_.liveTracker,\"liveedgechange\",this.updateLiveEdgeStatus),this.textEl_=null,n.prototype.dispose.call(this)},e}(Sn);Mn.prototype.controlText_=\"Seek to live, currently playing live\",Tt.registerComponent(\"SeekToLive\",Mn);function Nn(e,t,i){return e=Number(e),Math.min(i,Math.max(t,isNaN(e)?t:e))}var Un=function(n){function e(e,t){var i;return(i=n.call(this,e,t)||this).bar=i.getChild(i.options_.barName),i.vertical(!!i.options_.vertical),i.enable(),i}kt(e,n);var t=e.prototype;return t.enabled=function(){return this.enabled_},t.enable=function(){this.enabled()||(this.on(\"mousedown\",this.handleMouseDown),this.on(\"touchstart\",this.handleMouseDown),this.on(\"keydown\",this.handleKeyDown),this.on(\"click\",this.handleClick),this.on(this.player_,\"controlsvisible\",this.update),this.playerEvent&&this.on(this.player_,this.playerEvent,this.update),this.removeClass(\"disabled\"),this.setAttribute(\"tabindex\",0),this.enabled_=!0)},t.disable=function(){if(this.enabled()){var e=this.bar.el_.ownerDocument;this.off(\"mousedown\",this.handleMouseDown),this.off(\"touchstart\",this.handleMouseDown),this.off(\"keydown\",this.handleKeyDown),this.off(\"click\",this.handleClick),this.off(this.player_,\"controlsvisible\",this.update),this.off(e,\"mousemove\",this.handleMouseMove),this.off(e,\"mouseup\",this.handleMouseUp),this.off(e,\"touchmove\",this.handleMouseMove),this.off(e,\"touchend\",this.handleMouseUp),this.removeAttribute(\"tabindex\"),this.addClass(\"disabled\"),this.playerEvent&&this.off(this.player_,this.playerEvent,this.update),this.enabled_=!1}},t.createEl=function(e,t,i){return void 0===t&&(t={}),void 0===i&&(i={}),t.className=t.className+\" vjs-slider\",t=S({tabIndex:0},t),i=S({role:\"slider\",\"aria-valuenow\":0,\"aria-valuemin\":0,\"aria-valuemax\":100,tabIndex:0},i),n.prototype.createEl.call(this,e,t,i)},t.handleMouseDown=function(e){var t=this.bar.el_.ownerDocument;\"mousedown\"===e.type&&e.preventDefault(),\"touchstart\"!==e.type||j||e.preventDefault(),me(),this.addClass(\"vjs-sliding\"),this.trigger(\"slideractive\"),this.on(t,\"mousemove\",this.handleMouseMove),this.on(t,\"mouseup\",this.handleMouseUp),this.on(t,\"touchmove\",this.handleMouseMove),this.on(t,\"touchend\",this.handleMouseUp),this.handleMouseMove(e)},t.handleMouseMove=function(e){},t.handleMouseUp=function(){var e=this.bar.el_.ownerDocument;ge(),this.removeClass(\"vjs-sliding\"),this.trigger(\"sliderinactive\"),this.off(e,\"mousemove\",this.handleMouseMove),this.off(e,\"mouseup\",this.handleMouseUp),this.off(e,\"touchmove\",this.handleMouseMove),this.off(e,\"touchend\",this.handleMouseUp),this.update()},t.update=function(){var t=this;if(this.el_&&this.bar){var i=this.getProgress();return i===this.progress_||(this.progress_=i,this.requestNamedAnimationFrame(\"Slider#update\",function(){var e=t.vertical()?\"height\":\"width\";t.bar.el().style[e]=(100*i).toFixed(2)+\"%\"})),i}},t.getProgress=function(){return Number(Nn(this.getPercent(),0,1).toFixed(4))},t.calculateDistance=function(e){var t=_e(this.el_,e);return this.vertical()?t.y:t.x},t.handleKeyDown=function(e){Nt.isEventKey(e,\"Left\")||Nt.isEventKey(e,\"Down\")?(e.preventDefault(),e.stopPropagation(),this.stepBack()):Nt.isEventKey(e,\"Right\")||Nt.isEventKey(e,\"Up\")?(e.preventDefault(),e.stopPropagation(),this.stepForward()):n.prototype.handleKeyDown.call(this,e)},t.handleClick=function(e){e.stopPropagation(),e.preventDefault()},t.vertical=function(e){if(void 0===e)return this.vertical_||!1;this.vertical_=!!e,this.vertical_?this.addClass(\"vjs-slider-vertical\"):this.addClass(\"vjs-slider-horizontal\")},e}(Tt);Tt.registerComponent(\"Slider\",Un);function Bn(e,t){return Nn(e/t*100,0,100).toFixed(2)+\"%\"}var Fn=function(r){function e(e,t){var i;return(i=r.call(this,e,t)||this).partEls_=[],i.on(e,\"progress\",i.update),i}kt(e,r);var t=e.prototype;return t.createEl=function(){var e=r.prototype.createEl.call(this,\"div\",{className:\"vjs-load-progress\"}),t=ne(\"span\",{className:\"vjs-control-text\"}),i=ne(\"span\",{textContent:this.localize(\"Loaded\")}),n=p.createTextNode(\": \");return this.percentageEl_=ne(\"span\",{className:\"vjs-control-text-loaded-percentage\",textContent:\"0%\"}),e.appendChild(t),t.appendChild(i),t.appendChild(n),t.appendChild(this.percentageEl_),e},t.dispose=function(){this.partEls_=null,this.percentageEl_=null,r.prototype.dispose.call(this)},t.update=function(e){var d=this;this.requestNamedAnimationFrame(\"LoadProgressBar#update\",function(){var e=d.player_.liveTracker,t=d.player_.buffered(),i=e&&e.isLive()?e.seekableEnd():d.player_.duration(),n=d.player_.bufferedEnd(),r=d.partEls_,a=Bn(n,i);d.percent_!==a&&(d.el_.style.width=a,re(d.percentageEl_,a),d.percent_=a);for(var s=0;s<t.length;s++){var o=t.start(s),u=t.end(s),l=r[s];l||(l=d.el_.appendChild(ne()),r[s]=l),l.dataset.start===o&&l.dataset.end===u||(l.dataset.start=o,l.dataset.end=u,l.style.left=Bn(o,n),l.style.width=Bn(u-o,n))}for(var c=r.length;c>t.length;c--)d.el_.removeChild(r[c-1]);r.length=t.length})},e}(Tt);Tt.registerComponent(\"LoadProgressBar\",Fn);var jn=function(n){function e(e,t){var i;return(i=n.call(this,e,t)||this).update=Je($e(St(i),i.update),30),i}kt(e,n);var t=e.prototype;return t.createEl=function(){return n.prototype.createEl.call(this,\"div\",{className:\"vjs-time-tooltip\"},{\"aria-hidden\":\"true\"})},t.update=function(e,t,i){var n=ye(this.el_),r=ve(this.player_.el()),a=e.width*t;if(r&&n){var s=e.left-r.left+a,o=e.width-a+(r.right-e.right),u=n.width/2;s<u?u+=u-s:o<u&&(u=o),u<0?u=0:u>n.width&&(u=n.width),u=Math.round(u),this.el_.style.right=\"-\"+u+\"px\",this.write(i)}},t.write=function(e){re(this.el_,e)},t.updateTime=function(r,a,s,o){var u=this;this.requestNamedAnimationFrame(\"TimeTooltip#updateTime\",function(){var e,t=u.player_.duration();if(u.player_.liveTracker&&u.player_.liveTracker.isLive()){var i=u.player_.liveTracker.liveWindow(),n=i-a*i;e=(n<1?\"\":\"-\")+xn(n,i)}else e=xn(s,t);u.update(r,a,e),o&&o()})},e}(Tt);Tt.registerComponent(\"TimeTooltip\",jn);var Vn=function(n){function e(e,t){var i;return(i=n.call(this,e,t)||this).update=Je($e(St(i),i.update),30),i}kt(e,n);var t=e.prototype;return t.createEl=function(){return n.prototype.createEl.call(this,\"div\",{className:\"vjs-play-progress vjs-slider-bar\"},{\"aria-hidden\":\"true\"})},t.update=function(e,t){var i=this.getChild(\"timeTooltip\");if(i){var n=this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime();i.updateTime(e,t,n)}},e}(Tt);Vn.prototype.options_={children:[]},K||M||Vn.prototype.options_.children.push(\"timeTooltip\"),Tt.registerComponent(\"PlayProgressBar\",Vn);var qn=function(n){function e(e,t){var i;return(i=n.call(this,e,t)||this).update=Je($e(St(i),i.update),30),i}kt(e,n);var t=e.prototype;return t.createEl=function(){return n.prototype.createEl.call(this,\"div\",{className:\"vjs-mouse-display\"})},t.update=function(e,t){var i=this,n=t*this.player_.duration();this.getChild(\"timeTooltip\").updateTime(e,t,n,function(){i.el_.style.left=e.width*t+\"px\"})},e}(Tt);qn.prototype.options_={children:[\"timeTooltip\"]},Tt.registerComponent(\"MouseTimeDisplay\",qn);var Hn=function(a){function e(e,t){var i;return(i=a.call(this,e,t)||this).setEventHandlers_(),i}kt(e,a);var t=e.prototype;return t.setEventHandlers_=function(){this.update_=$e(this,this.update),this.update=Je(this.update_,30),this.on(this.player_,[\"ended\",\"durationchange\",\"timeupdate\"],this.update),this.player_.liveTracker&&this.on(this.player_.liveTracker,\"liveedgechange\",this.update),this.updateInterval=null,this.on(this.player_,[\"playing\"],this.enableInterval_),this.on(this.player_,[\"ended\",\"pause\",\"waiting\"],this.disableInterval_),\"hidden\"in p&&\"visibilityState\"in p&&this.on(p,\"visibilitychange\",this.toggleVisibility_)},t.toggleVisibility_=function(e){\"hidden\"===p.visibilityState?(this.cancelNamedAnimationFrame(\"SeekBar#update\"),this.cancelNamedAnimationFrame(\"Slider#update\"),this.disableInterval_(e)):(this.player_.ended()||this.player_.paused()||this.enableInterval_(),this.update())},t.enableInterval_=function(){this.updateInterval||(this.updateInterval=this.setInterval(this.update,30))},t.disableInterval_=function(e){this.player_.liveTracker&&this.player_.liveTracker.isLive()&&e&&\"ended\"!==e.type||this.updateInterval&&(this.clearInterval(this.updateInterval),this.updateInterval=null)},t.createEl=function(){return a.prototype.createEl.call(this,\"div\",{className:\"vjs-progress-holder\"},{\"aria-label\":this.localize(\"Progress Bar\")})},t.update=function(e){var n=this;if(\"hidden\"!==p.visibilityState){var r=a.prototype.update.call(this);return this.requestNamedAnimationFrame(\"SeekBar#update\",function(){var e=n.player_.ended()?n.player_.duration():n.getCurrentTime_(),t=n.player_.liveTracker,i=n.player_.duration();t&&t.isLive()&&(i=n.player_.liveTracker.liveCurrentTime()),n.percent_!==r&&(n.el_.setAttribute(\"aria-valuenow\",(100*r).toFixed(2)),n.percent_=r),n.currentTime_===e&&n.duration_===i||(n.el_.setAttribute(\"aria-valuetext\",n.localize(\"progress bar timing: currentTime={1} duration={2}\",[xn(e,i),xn(i,i)],\"{1} of {2}\")),n.currentTime_=e,n.duration_=i),n.bar&&n.bar.update(ve(n.el()),n.getProgress())}),r}},t.getCurrentTime_=function(){return this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime()},t.getPercent=function(){var e,t=this.getCurrentTime_(),i=this.player_.liveTracker;return i&&i.isLive()?(e=(t-i.seekableStart())/i.liveWindow(),i.atLiveEdge()&&(e=1)):e=t/this.player_.duration(),e},t.handleMouseDown=function(e){Ee(e)&&(e.stopPropagation(),this.player_.scrubbing(!0),this.videoWasPlaying=!this.player_.paused(),this.player_.pause(),a.prototype.handleMouseDown.call(this,e))},t.handleMouseMove=function(e){if(Ee(e)){var t,i=this.calculateDistance(e),n=this.player_.liveTracker;if(n&&n.isLive()){if(.99<=i)return void n.seekToLiveEdge();var r=n.seekableStart(),a=n.liveCurrentTime();if(a<=(t=r+i*n.liveWindow())&&(t=a),t<=r&&(t=r+.1),t===1/0)return}else(t=i*this.player_.duration())===this.player_.duration()&&(t-=.1);this.player_.currentTime(t)}},t.enable=function(){a.prototype.enable.call(this);var e=this.getChild(\"mouseTimeDisplay\");e&&e.show()},t.disable=function(){a.prototype.disable.call(this);var e=this.getChild(\"mouseTimeDisplay\");e&&e.hide()},t.handleMouseUp=function(e){a.prototype.handleMouseUp.call(this,e),e&&e.stopPropagation(),this.player_.scrubbing(!1),this.player_.trigger({type:\"timeupdate\",target:this,manuallyTriggered:!0}),this.videoWasPlaying?Ot(this.player_.play()):this.update_()},t.stepForward=function(){this.player_.currentTime(this.player_.currentTime()+5)},t.stepBack=function(){this.player_.currentTime(this.player_.currentTime()-5)},t.handleAction=function(e){this.player_.paused()?this.player_.play():this.player_.pause()},t.handleKeyDown=function(e){if(Nt.isEventKey(e,\"Space\")||Nt.isEventKey(e,\"Enter\"))e.preventDefault(),e.stopPropagation(),this.handleAction(e);else if(Nt.isEventKey(e,\"Home\"))e.preventDefault(),e.stopPropagation(),this.player_.currentTime(0);else if(Nt.isEventKey(e,\"End\"))e.preventDefault(),e.stopPropagation(),this.player_.currentTime(this.player_.duration());else if(/^[0-9]$/.test(Nt(e))){e.preventDefault(),e.stopPropagation();var t=10*(Nt.codes[Nt(e)]-Nt.codes[0])/100;this.player_.currentTime(this.player_.duration()*t)}else Nt.isEventKey(e,\"PgDn\")?(e.preventDefault(),e.stopPropagation(),this.player_.currentTime(this.player_.currentTime()-60)):Nt.isEventKey(e,\"PgUp\")?(e.preventDefault(),e.stopPropagation(),this.player_.currentTime(this.player_.currentTime()+60)):a.prototype.handleKeyDown.call(this,e)},t.dispose=function(){this.disableInterval_(),this.off(this.player_,[\"ended\",\"durationchange\",\"timeupdate\"],this.update),this.player_.liveTracker&&this.on(this.player_.liveTracker,\"liveedgechange\",this.update),this.off(this.player_,[\"playing\"],this.enableInterval_),this.off(this.player_,[\"ended\",\"pause\",\"waiting\"],this.disableInterval_),\"hidden\"in p&&\"visibilityState\"in p&&this.off(p,\"visibilitychange\",this.toggleVisibility_),a.prototype.dispose.call(this)},e}(Un);Hn.prototype.options_={children:[\"loadProgressBar\",\"playProgressBar\"],barName:\"playProgressBar\"},K||M||Hn.prototype.options_.children.splice(1,0,\"mouseTimeDisplay\"),Tt.registerComponent(\"SeekBar\",Hn);var Wn=function(n){function e(e,t){var i;return(i=n.call(this,e,t)||this).handleMouseMove=Je($e(St(i),i.handleMouseMove),30),i.throttledHandleMouseSeek=Je($e(St(i),i.handleMouseSeek),30),i.enable(),i}kt(e,n);var t=e.prototype;return t.createEl=function(){return n.prototype.createEl.call(this,\"div\",{className:\"vjs-progress-control vjs-control\"})},t.handleMouseMove=function(e){var t=this.getChild(\"seekBar\");if(t){var i=t.getChild(\"playProgressBar\"),n=t.getChild(\"mouseTimeDisplay\");if(i||n){var r=t.el(),a=ye(r),s=_e(r,e).x;s=Nn(s,0,1),n&&n.update(a,s),i&&i.update(a,t.getProgress())}}},t.handleMouseSeek=function(e){var t=this.getChild(\"seekBar\");t&&t.handleMouseMove(e)},t.enabled=function(){return this.enabled_},t.disable=function(){if(this.children().forEach(function(e){return e.disable&&e.disable()}),this.enabled()&&(this.off([\"mousedown\",\"touchstart\"],this.handleMouseDown),this.off(this.el_,\"mousemove\",this.handleMouseMove),this.removeListenersAddedOnMousedownAndTouchstart(),this.addClass(\"disabled\"),this.enabled_=!1,this.player_.scrubbing())){var e=this.getChild(\"seekBar\");this.player_.scrubbing(!1),e.videoWasPlaying&&Ot(this.player_.play())}},t.enable=function(){this.children().forEach(function(e){return e.enable&&e.enable()}),this.enabled()||(this.on([\"mousedown\",\"touchstart\"],this.handleMouseDown),this.on(this.el_,\"mousemove\",this.handleMouseMove),this.removeClass(\"disabled\"),this.enabled_=!0)},t.removeListenersAddedOnMousedownAndTouchstart=function(){var e=this.el_.ownerDocument;this.off(e,\"mousemove\",this.throttledHandleMouseSeek),this.off(e,\"touchmove\",this.throttledHandleMouseSeek),this.off(e,\"mouseup\",this.handleMouseUp),this.off(e,\"touchend\",this.handleMouseUp)},t.handleMouseDown=function(e){var t=this.el_.ownerDocument,i=this.getChild(\"seekBar\");i&&i.handleMouseDown(e),this.on(t,\"mousemove\",this.throttledHandleMouseSeek),this.on(t,\"touchmove\",this.throttledHandleMouseSeek),this.on(t,\"mouseup\",this.handleMouseUp),this.on(t,\"touchend\",this.handleMouseUp)},t.handleMouseUp=function(e){var t=this.getChild(\"seekBar\");t&&t.handleMouseUp(e),this.removeListenersAddedOnMousedownAndTouchstart()},e}(Tt);Wn.prototype.options_={children:[\"seekBar\"]},Tt.registerComponent(\"ProgressControl\",Wn);var zn=function(n){function e(e,t){var i;return(i=n.call(this,e,t)||this).on(e,[\"enterpictureinpicture\",\"leavepictureinpicture\"],i.handlePictureInPictureChange),i.on(e,[\"disablepictureinpicturechanged\",\"loadedmetadata\"],i.handlePictureInPictureEnabledChange),i.disable(),i}kt(e,n);var t=e.prototype;return t.buildCSSClass=function(){return\"vjs-picture-in-picture-control \"+n.prototype.buildCSSClass.call(this)},t.handlePictureInPictureEnabledChange=function(){p.pictureInPictureEnabled&&!1===this.player_.disablePictureInPicture()?this.enable():this.disable()},t.handlePictureInPictureChange=function(e){this.player_.isInPictureInPicture()?this.controlText(\"Exit Picture-in-Picture\"):this.controlText(\"Picture-in-Picture\"),this.handlePictureInPictureEnabledChange()},t.handleClick=function(e){this.player_.isInPictureInPicture()?this.player_.exitPictureInPicture():this.player_.requestPictureInPicture()},e}(Sn);zn.prototype.controlText_=\"Picture-in-Picture\",Tt.registerComponent(\"PictureInPictureToggle\",zn);var Gn=function(n){function e(e,t){var i;return(i=n.call(this,e,t)||this).on(e,\"fullscreenchange\",i.handleFullscreenChange),!1===p[e.fsApi_.fullscreenEnabled]&&i.disable(),i}kt(e,n);var t=e.prototype;return t.buildCSSClass=function(){return\"vjs-fullscreen-control \"+n.prototype.buildCSSClass.call(this)},t.handleFullscreenChange=function(e){this.player_.isFullscreen()?this.controlText(\"Non-Fullscreen\"):this.controlText(\"Fullscreen\")},t.handleClick=function(e){this.player_.isFullscreen()?this.player_.exitFullscreen():this.player_.requestFullscreen()},e}(Sn);Gn.prototype.controlText_=\"Fullscreen\",Tt.registerComponent(\"FullscreenToggle\",Gn);var Xn=function(e){function t(){return e.apply(this,arguments)||this}return kt(t,e),t.prototype.createEl=function(){return e.prototype.createEl.call(this,\"div\",{className:\"vjs-volume-level\",innerHTML:'<span class=\"vjs-control-text\"></span>'})},t}(Tt);Tt.registerComponent(\"VolumeLevel\",Xn);var Kn=function(n){function e(e,t){var i;return(i=n.call(this,e,t)||this).on(\"slideractive\",i.updateLastVolume_),i.on(e,\"volumechange\",i.updateARIAAttributes),e.ready(function(){return i.updateARIAAttributes()}),i}kt(e,n);var t=e.prototype;return t.createEl=function(){return n.prototype.createEl.call(this,\"div\",{className:\"vjs-volume-bar vjs-slider-bar\"},{\"aria-label\":this.localize(\"Volume Level\"),\"aria-live\":\"polite\"})},t.handleMouseDown=function(e){Ee(e)&&n.prototype.handleMouseDown.call(this,e)},t.handleMouseMove=function(e){Ee(e)&&(this.checkMuted(),this.player_.volume(this.calculateDistance(e)))},t.checkMuted=function(){this.player_.muted()&&this.player_.muted(!1)},t.getPercent=function(){return this.player_.muted()?0:this.player_.volume()},t.stepForward=function(){this.checkMuted(),this.player_.volume(this.player_.volume()+.1)},t.stepBack=function(){this.checkMuted(),this.player_.volume(this.player_.volume()-.1)},t.updateARIAAttributes=function(e){var t=this.player_.muted()?0:this.volumeAsPercentage_();this.el_.setAttribute(\"aria-valuenow\",t),this.el_.setAttribute(\"aria-valuetext\",t+\"%\")},t.volumeAsPercentage_=function(){return Math.round(100*this.player_.volume())},t.updateLastVolume_=function(){var e=this,t=this.player_.volume();this.one(\"sliderinactive\",function(){0===e.player_.volume()&&e.player_.lastVolume_(t)})},e}(Un);Kn.prototype.options_={children:[\"volumeLevel\"],barName:\"volumeLevel\"},Kn.prototype.playerEvent=\"volumechange\",Tt.registerComponent(\"VolumeBar\",Kn);var Qn=function(n){function e(e,t){var i;return void 0===t&&(t={}),t.vertical=t.vertical||!1,\"undefined\"!=typeof t.volumeBar&&!w(t.volumeBar)||(t.volumeBar=t.volumeBar||{},t.volumeBar.vertical=t.vertical),i=n.call(this,e,t)||this,function(e,t){t.tech_&&!t.tech_.featuresVolumeControl&&e.addClass(\"vjs-hidden\"),e.on(t,\"loadstart\",function(){t.tech_.featuresVolumeControl?e.removeClass(\"vjs-hidden\"):e.addClass(\"vjs-hidden\")})}(St(i),e),i.throttledHandleMouseMove=Je($e(St(i),i.handleMouseMove),30),i.on(\"mousedown\",i.handleMouseDown),i.on(\"touchstart\",i.handleMouseDown),i.on(i.volumeBar,[\"focus\",\"slideractive\"],function(){i.volumeBar.addClass(\"vjs-slider-active\"),i.addClass(\"vjs-slider-active\"),i.trigger(\"slideractive\")}),i.on(i.volumeBar,[\"blur\",\"sliderinactive\"],function(){i.volumeBar.removeClass(\"vjs-slider-active\"),i.removeClass(\"vjs-slider-active\"),i.trigger(\"sliderinactive\")}),i}kt(e,n);var t=e.prototype;return t.createEl=function(){var e=\"vjs-volume-horizontal\";return this.options_.vertical&&(e=\"vjs-volume-vertical\"),n.prototype.createEl.call(this,\"div\",{className:\"vjs-volume-control vjs-control \"+e})},t.handleMouseDown=function(e){var t=this.el_.ownerDocument;this.on(t,\"mousemove\",this.throttledHandleMouseMove),this.on(t,\"touchmove\",this.throttledHandleMouseMove),this.on(t,\"mouseup\",this.handleMouseUp),this.on(t,\"touchend\",this.handleMouseUp)},t.handleMouseUp=function(e){var t=this.el_.ownerDocument;this.off(t,\"mousemove\",this.throttledHandleMouseMove),this.off(t,\"touchmove\",this.throttledHandleMouseMove),this.off(t,\"mouseup\",this.handleMouseUp),this.off(t,\"touchend\",this.handleMouseUp)},t.handleMouseMove=function(e){this.volumeBar.handleMouseMove(e)},e}(Tt);Qn.prototype.options_={children:[\"volumeBar\"]},Tt.registerComponent(\"VolumeControl\",Qn);var Yn=function(n){function e(e,t){var i;return i=n.call(this,e,t)||this,function(e,t){t.tech_&&!t.tech_.featuresMuteControl&&e.addClass(\"vjs-hidden\"),e.on(t,\"loadstart\",function(){t.tech_.featuresMuteControl?e.removeClass(\"vjs-hidden\"):e.addClass(\"vjs-hidden\")})}(St(i),e),i.on(e,[\"loadstart\",\"volumechange\"],i.update),i}kt(e,n);var t=e.prototype;return t.buildCSSClass=function(){return\"vjs-mute-control \"+n.prototype.buildCSSClass.call(this)},t.handleClick=function(e){var t=this.player_.volume(),i=this.player_.lastVolume_();if(0===t){var n=i<.1?.1:i;this.player_.volume(n),this.player_.muted(!1)}else this.player_.muted(!this.player_.muted())},t.update=function(e){this.updateIcon_(),this.updateControlText_()},t.updateIcon_=function(){var e=this.player_.volume(),t=3;K&&this.player_.tech_&&this.player_.tech_.el_&&this.player_.muted(this.player_.tech_.el_.muted),0===e||this.player_.muted()?t=0:e<.33?t=1:e<.67&&(t=2);for(var i=0;i<4;i++)ue(this.el_,\"vjs-vol-\"+i);oe(this.el_,\"vjs-vol-\"+t)},t.updateControlText_=function(){var e=this.player_.muted()||0===this.player_.volume()?\"Unmute\":\"Mute\";this.controlText()!==e&&this.controlText(e)},e}(Sn);Yn.prototype.controlText_=\"Mute\",Tt.registerComponent(\"MuteToggle\",Yn);var $n=function(n){function e(e,t){var i;return void 0===t&&(t={}),\"undefined\"!=typeof t.inline?t.inline=t.inline:t.inline=!0,\"undefined\"!=typeof t.volumeControl&&!w(t.volumeControl)||(t.volumeControl=t.volumeControl||{},t.volumeControl.vertical=!t.inline),(i=n.call(this,e,t)||this).on(e,[\"loadstart\"],i.volumePanelState_),i.on(i.muteToggle,\"keyup\",i.handleKeyPress),i.on(i.volumeControl,\"keyup\",i.handleVolumeControlKeyUp),i.on(\"keydown\",i.handleKeyPress),i.on(\"mouseover\",i.handleMouseOver),i.on(\"mouseout\",i.handleMouseOut),i.on(i.volumeControl,[\"slideractive\"],i.sliderActive_),i.on(i.volumeControl,[\"sliderinactive\"],i.sliderInactive_),i}kt(e,n);var t=e.prototype;return t.sliderActive_=function(){this.addClass(\"vjs-slider-active\")},t.sliderInactive_=function(){this.removeClass(\"vjs-slider-active\")},t.volumePanelState_=function(){this.volumeControl.hasClass(\"vjs-hidden\")&&this.muteToggle.hasClass(\"vjs-hidden\")&&this.addClass(\"vjs-hidden\"),this.volumeControl.hasClass(\"vjs-hidden\")&&!this.muteToggle.hasClass(\"vjs-hidden\")&&this.addClass(\"vjs-mute-toggle-only\")},t.createEl=function(){var e=\"vjs-volume-panel-horizontal\";return this.options_.inline||(e=\"vjs-volume-panel-vertical\"),n.prototype.createEl.call(this,\"div\",{className:\"vjs-volume-panel vjs-control \"+e})},t.dispose=function(){this.handleMouseOut(),n.prototype.dispose.call(this)},t.handleVolumeControlKeyUp=function(e){Nt.isEventKey(e,\"Esc\")&&this.muteToggle.focus()},t.handleMouseOver=function(e){this.addClass(\"vjs-hover\"),Ge(p,\"keyup\",$e(this,this.handleKeyPress))},t.handleMouseOut=function(e){this.removeClass(\"vjs-hover\"),Xe(p,\"keyup\",$e(this,this.handleKeyPress))},t.handleKeyPress=function(e){Nt.isEventKey(e,\"Esc\")&&this.handleMouseOut()},e}(Tt);$n.prototype.options_={children:[\"muteToggle\",\"volumeControl\"]},Tt.registerComponent(\"VolumePanel\",$n);var Jn=function(n){function e(e,t){var i;return i=n.call(this,e,t)||this,t&&(i.menuButton_=t.menuButton),i.focusedChild_=-1,i.on(\"keydown\",i.handleKeyDown),i.boundHandleBlur_=$e(St(i),i.handleBlur),i.boundHandleTapClick_=$e(St(i),i.handleTapClick),i}kt(e,n);var t=e.prototype;return t.addEventListenerForItem=function(e){e instanceof Tt&&(this.on(e,\"blur\",this.boundHandleBlur_),this.on(e,[\"tap\",\"click\"],this.boundHandleTapClick_))},t.removeEventListenerForItem=function(e){e instanceof Tt&&(this.off(e,\"blur\",this.boundHandleBlur_),this.off(e,[\"tap\",\"click\"],this.boundHandleTapClick_))},t.removeChild=function(e){\"string\"==typeof e&&(e=this.getChild(e)),this.removeEventListenerForItem(e),n.prototype.removeChild.call(this,e)},t.addItem=function(e){var t=this.addChild(e);t&&this.addEventListenerForItem(t)},t.createEl=function(){var e=this.options_.contentElType||\"ul\";this.contentEl_=ne(e,{className:\"vjs-menu-content\"}),this.contentEl_.setAttribute(\"role\",\"menu\");var t=n.prototype.createEl.call(this,\"div\",{append:this.contentEl_,className:\"vjs-menu\"});return t.appendChild(this.contentEl_),Ge(t,\"click\",function(e){e.preventDefault(),e.stopImmediatePropagation()}),t},t.dispose=function(){this.contentEl_=null,this.boundHandleBlur_=null,this.boundHandleTapClick_=null,n.prototype.dispose.call(this)},t.handleBlur=function(e){var t=e.relatedTarget||p.activeElement;if(!this.children().some(function(e){return e.el()===t})){var i=this.menuButton_;i&&i.buttonPressed_&&t!==i.el().firstChild&&i.unpressButton()}},t.handleTapClick=function(t){if(this.menuButton_){this.menuButton_.unpressButton();var e=this.children();if(!Array.isArray(e))return;var i=e.filter(function(e){return e.el()===t.target})[0];if(!i)return;\"CaptionSettingsMenuItem\"!==i.name()&&this.menuButton_.focus()}},t.handleKeyDown=function(e){Nt.isEventKey(e,\"Left\")||Nt.isEventKey(e,\"Down\")?(e.preventDefault(),e.stopPropagation(),this.stepForward()):(Nt.isEventKey(e,\"Right\")||Nt.isEventKey(e,\"Up\"))&&(e.preventDefault(),e.stopPropagation(),this.stepBack())},t.stepForward=function(){var e=0;void 0!==this.focusedChild_&&(e=this.focusedChild_+1),this.focus(e)},t.stepBack=function(){var e=0;void 0!==this.focusedChild_&&(e=this.focusedChild_-1),this.focus(e)},t.focus=function(e){void 0===e&&(e=0);var t=this.children().slice();t.length&&t[0].hasClass(\"vjs-menu-title\")&&t.shift(),0<t.length&&(e<0?e=0:e>=t.length&&(e=t.length-1),t[this.focusedChild_=e].el_.focus())},e}(Tt);Tt.registerComponent(\"Menu\",Jn);var Zn=function(r){function e(e,t){var i;void 0===t&&(t={}),(i=r.call(this,e,t)||this).menuButton_=new Sn(e,t),i.menuButton_.controlText(i.controlText_),i.menuButton_.el_.setAttribute(\"aria-haspopup\",\"true\");var n=Sn.prototype.buildCSSClass();return i.menuButton_.el_.className=i.buildCSSClass()+\" \"+n,i.menuButton_.removeClass(\"vjs-control\"),i.addChild(i.menuButton_),i.update(),i.enabled_=!0,i.on(i.menuButton_,\"tap\",i.handleClick),i.on(i.menuButton_,\"click\",i.handleClick),i.on(i.menuButton_,\"keydown\",i.handleKeyDown),i.on(i.menuButton_,\"mouseenter\",function(){i.addClass(\"vjs-hover\"),i.menu.show(),Ge(p,\"keyup\",$e(St(i),i.handleMenuKeyUp))}),i.on(\"mouseleave\",i.handleMouseLeave),i.on(\"keydown\",i.handleSubmenuKeyDown),i}kt(e,r);var t=e.prototype;return t.update=function(){var e=this.createMenu();this.menu&&(this.menu.dispose(),this.removeChild(this.menu)),this.menu=e,this.addChild(e),this.buttonPressed_=!1,this.menuButton_.el_.setAttribute(\"aria-expanded\",\"false\"),this.items&&this.items.length<=this.hideThreshold_?this.hide():this.show()},t.createMenu=function(){var e=new Jn(this.player_,{menuButton:this});if(this.hideThreshold_=0,this.options_.title){var t=ne(\"li\",{className:\"vjs-menu-title\",innerHTML:mt(this.options_.title),tabIndex:-1});this.hideThreshold_+=1;var i=new Tt(this.player_,{el:t});e.addItem(i)}if(this.items=this.createItems(),this.items)for(var n=0;n<this.items.length;n++)e.addItem(this.items[n]);return e},t.createItems=function(){},t.createEl=function(){return r.prototype.createEl.call(this,\"div\",{className:this.buildWrapperCSSClass()},{})},t.buildWrapperCSSClass=function(){var e=\"vjs-menu-button\";return!0===this.options_.inline?e+=\"-inline\":e+=\"-popup\",\"vjs-menu-button \"+e+\" \"+Sn.prototype.buildCSSClass()+\" \"+r.prototype.buildCSSClass.call(this)},t.buildCSSClass=function(){var e=\"vjs-menu-button\";return!0===this.options_.inline?e+=\"-inline\":e+=\"-popup\",\"vjs-menu-button \"+e+\" \"+r.prototype.buildCSSClass.call(this)},t.controlText=function(e,t){return void 0===t&&(t=this.menuButton_.el()),this.menuButton_.controlText(e,t)},t.dispose=function(){this.handleMouseLeave(),r.prototype.dispose.call(this)},t.handleClick=function(e){this.buttonPressed_?this.unpressButton():this.pressButton()},t.handleMouseLeave=function(e){this.removeClass(\"vjs-hover\"),Xe(p,\"keyup\",$e(this,this.handleMenuKeyUp))},t.focus=function(){this.menuButton_.focus()},t.blur=function(){this.menuButton_.blur()},t.handleKeyDown=function(e){Nt.isEventKey(e,\"Esc\")||Nt.isEventKey(e,\"Tab\")?(this.buttonPressed_&&this.unpressButton(),Nt.isEventKey(e,\"Tab\")||(e.preventDefault(),this.menuButton_.focus())):(Nt.isEventKey(e,\"Up\")||Nt.isEventKey(e,\"Down\"))&&(this.buttonPressed_||(e.preventDefault(),this.pressButton()))},t.handleMenuKeyUp=function(e){(Nt.isEventKey(e,\"Esc\")||Nt.isEventKey(e,\"Tab\"))&&this.removeClass(\"vjs-hover\")},t.handleSubmenuKeyPress=function(e){this.handleSubmenuKeyDown(e)},t.handleSubmenuKeyDown=function(e){(Nt.isEventKey(e,\"Esc\")||Nt.isEventKey(e,\"Tab\"))&&(this.buttonPressed_&&this.unpressButton(),Nt.isEventKey(e,\"Tab\")||(e.preventDefault(),this.menuButton_.focus()))},t.pressButton=function(){if(this.enabled_){if(this.buttonPressed_=!0,this.menu.show(),this.menu.lockShowing(),this.menuButton_.el_.setAttribute(\"aria-expanded\",\"true\"),K&&te())return;this.menu.focus()}},t.unpressButton=function(){this.enabled_&&(this.buttonPressed_=!1,this.menu.unlockShowing(),this.menu.hide(),this.menuButton_.el_.setAttribute(\"aria-expanded\",\"false\"))},t.disable=function(){this.unpressButton(),this.enabled_=!1,this.addClass(\"vjs-disabled\"),this.menuButton_.disable()},t.enable=function(){this.enabled_=!0,this.removeClass(\"vjs-disabled\"),this.menuButton_.enable()},e}(Tt);Tt.registerComponent(\"MenuButton\",Zn);var er=function(a){function e(e,t){var i,n=t.tracks;if((i=a.call(this,e,t)||this).items.length<=1&&i.hide(),!n)return St(i);var r=$e(St(i),i.update);return n.addEventListener(\"removetrack\",r),n.addEventListener(\"addtrack\",r),n.addEventListener(\"labelchange\",r),i.player_.on(\"ready\",r),i.player_.on(\"dispose\",function(){n.removeEventListener(\"removetrack\",r),n.removeEventListener(\"addtrack\",r),n.removeEventListener(\"labelchange\",r)}),i}return kt(e,a),e}(Zn);Tt.registerComponent(\"TrackButton\",er);var tr=[\"Tab\",\"Esc\",\"Up\",\"Down\",\"Right\",\"Left\"],ir=function(n){function e(e,t){var i;return(i=n.call(this,e,t)||this).selectable=t.selectable,i.isSelected_=t.selected||!1,i.multiSelectable=t.multiSelectable,i.selected(i.isSelected_),i.selectable?i.multiSelectable?i.el_.setAttribute(\"role\",\"menuitemcheckbox\"):i.el_.setAttribute(\"role\",\"menuitemradio\"):i.el_.setAttribute(\"role\",\"menuitem\"),i}kt(e,n);var t=e.prototype;return t.createEl=function(e,t,i){return this.nonIconControl=!0,n.prototype.createEl.call(this,\"li\",S({className:\"vjs-menu-item\",innerHTML:'<span class=\"vjs-menu-item-text\">'+this.localize(this.options_.label)+\"</span>\",tabIndex:-1},t),i)},t.handleKeyDown=function(t){tr.some(function(e){return Nt.isEventKey(t,e)})||n.prototype.handleKeyDown.call(this,t)},t.handleClick=function(e){this.selected(!0)},t.selected=function(e){this.selectable&&(e?(this.addClass(\"vjs-selected\"),this.el_.setAttribute(\"aria-checked\",\"true\"),this.controlText(\", selected\"),this.isSelected_=!0):(this.removeClass(\"vjs-selected\"),this.el_.setAttribute(\"aria-checked\",\"false\"),this.controlText(\"\"),this.isSelected_=!1))},e}(fn);Tt.registerComponent(\"MenuItem\",ir);var nr=function(u){function e(e,t){var n,i=t.track,r=e.textTracks();t.label=i.label||i.language||\"Unknown\",t.selected=\"showing\"===i.mode,(n=u.call(this,e,t)||this).track=i,n.kinds=(t.kinds||[t.kind||n.track.kind]).filter(Boolean);function a(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];n.handleTracksChange.apply(St(n),t)}function s(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];n.handleSelectedLanguageChange.apply(St(n),t)}var o;e.on([\"loadstart\",\"texttrackchange\"],a),r.addEventListener(\"change\",a),r.addEventListener(\"selectedlanguagechange\",s),n.on(\"dispose\",function(){e.off([\"loadstart\",\"texttrackchange\"],a),r.removeEventListener(\"change\",a),r.removeEventListener(\"selectedlanguagechange\",s)}),void 0===r.onchange&&n.on([\"tap\",\"click\"],function(){if(\"object\"!=typeof h.Event)try{o=new h.Event(\"change\")}catch(e){}o||(o=p.createEvent(\"Event\")).initEvent(\"change\",!0,!0),r.dispatchEvent(o)});return n.handleTracksChange(),n}kt(e,u);var t=e.prototype;return t.handleClick=function(e){var t=this.track,i=this.player_.textTracks();if(u.prototype.handleClick.call(this,e),i)for(var n=0;n<i.length;n++){var r=i[n];-1!==this.kinds.indexOf(r.kind)&&(r===t?\"showing\"!==r.mode&&(r.mode=\"showing\"):\"disabled\"!==r.mode&&(r.mode=\"disabled\"))}},t.handleTracksChange=function(e){var t=\"showing\"===this.track.mode;t!==this.isSelected_&&this.selected(t)},t.handleSelectedLanguageChange=function(e){if(\"showing\"===this.track.mode){var t=this.player_.cache_.selectedLanguage;if(t&&t.enabled&&t.language===this.track.language&&t.kind!==this.track.kind)return;this.player_.cache_.selectedLanguage={enabled:!0,language:this.track.language,kind:this.track.kind}}},t.dispose=function(){this.track=null,u.prototype.dispose.call(this)},e}(ir);Tt.registerComponent(\"TextTrackMenuItem\",nr);var rr=function(i){function e(e,t){return t.track={player:e,kind:t.kind,kinds:t.kinds,default:!1,mode:\"disabled\"},t.kinds||(t.kinds=[t.kind]),t.label?t.track.label=t.label:t.track.label=t.kinds.join(\" and \")+\" off\",t.selectable=!0,t.multiSelectable=!1,i.call(this,e,t)||this}kt(e,i);var t=e.prototype;return t.handleTracksChange=function(e){for(var t=this.player().textTracks(),i=!0,n=0,r=t.length;n<r;n++){var a=t[n];if(-1<this.options_.kinds.indexOf(a.kind)&&\"showing\"===a.mode){i=!1;break}}i!==this.isSelected_&&this.selected(i)},t.handleSelectedLanguageChange=function(e){for(var t=this.player().textTracks(),i=!0,n=0,r=t.length;n<r;n++){var a=t[n];if(-1<[\"captions\",\"descriptions\",\"subtitles\"].indexOf(a.kind)&&\"showing\"===a.mode){i=!1;break}}i&&(this.player_.cache_.selectedLanguage={enabled:!1})},e}(nr);Tt.registerComponent(\"OffTextTrackMenuItem\",rr);var ar=function(i){function e(e,t){return void 0===t&&(t={}),t.tracks=e.textTracks(),i.call(this,e,t)||this}return kt(e,i),e.prototype.createItems=function(e,t){var i;void 0===e&&(e=[]),void 0===t&&(t=nr),this.label_&&(i=this.label_+\" off\"),e.push(new rr(this.player_,{kinds:this.kinds_,kind:this.kind_,label:i})),this.hideThreshold_+=1;var n=this.player_.textTracks();Array.isArray(this.kinds_)||(this.kinds_=[this.kind_]);for(var r=0;r<n.length;r++){var a=n[r];if(-1<this.kinds_.indexOf(a.kind)){var s=new t(this.player_,{track:a,kinds:this.kinds_,kind:this.kind_,selectable:!0,multiSelectable:!1});s.addClass(\"vjs-\"+a.kind+\"-menu-item\"),e.push(s)}}return e},e}(er);Tt.registerComponent(\"TextTrackButton\",ar);var sr=function(s){function e(e,t){var i,n=t.track,r=t.cue,a=e.currentTime();return t.selectable=!0,t.multiSelectable=!1,t.label=r.text,t.selected=r.startTime<=a&&a<r.endTime,(i=s.call(this,e,t)||this).track=n,i.cue=r,n.addEventListener(\"cuechange\",$e(St(i),i.update)),i}kt(e,s);var t=e.prototype;return t.handleClick=function(e){s.prototype.handleClick.call(this),this.player_.currentTime(this.cue.startTime),this.update(this.cue.startTime)},t.update=function(e){var t=this.cue,i=this.player_.currentTime();this.selected(t.startTime<=i&&i<t.endTime)},e}(ir);Tt.registerComponent(\"ChaptersTrackMenuItem\",sr);var or=function(n){function e(e,t,i){return n.call(this,e,t,i)||this}kt(e,n);var t=e.prototype;return t.buildCSSClass=function(){return\"vjs-chapters-button \"+n.prototype.buildCSSClass.call(this)},t.buildWrapperCSSClass=function(){return\"vjs-chapters-button \"+n.prototype.buildWrapperCSSClass.call(this)},t.update=function(e){this.track_&&(!e||\"addtrack\"!==e.type&&\"removetrack\"!==e.type)||this.setTrack(this.findChaptersTrack()),n.prototype.update.call(this)},t.setTrack=function(e){if(this.track_!==e){if(this.updateHandler_||(this.updateHandler_=this.update.bind(this)),this.track_){var t=this.player_.remoteTextTrackEls().getTrackElementByTrack_(this.track_);t&&t.removeEventListener(\"load\",this.updateHandler_),this.track_=null}if(this.track_=e,this.track_){this.track_.mode=\"hidden\";var i=this.player_.remoteTextTrackEls().getTrackElementByTrack_(this.track_);i&&i.addEventListener(\"load\",this.updateHandler_)}}},t.findChaptersTrack=function(){for(var e=this.player_.textTracks()||[],t=e.length-1;0<=t;t--){var i=e[t];if(i.kind===this.kind_)return i}},t.getMenuCaption=function(){return this.track_&&this.track_.label?this.track_.label:this.localize(mt(this.kind_))},t.createMenu=function(){return this.options_.title=this.getMenuCaption(),n.prototype.createMenu.call(this)},t.createItems=function(){var e=[];if(!this.track_)return e;var t=this.track_.cues;if(!t)return e;for(var i=0,n=t.length;i<n;i++){var r=t[i],a=new sr(this.player_,{track:this.track_,cue:r});e.push(a)}return e},e}(ar);or.prototype.kind_=\"chapters\",or.prototype.controlText_=\"Chapters\",Tt.registerComponent(\"ChaptersButton\",or);var ur=function(s){function e(e,t,i){var n;n=s.call(this,e,t,i)||this;var r=e.textTracks(),a=$e(St(n),n.handleTracksChange);return r.addEventListener(\"change\",a),n.on(\"dispose\",function(){r.removeEventListener(\"change\",a)}),n}kt(e,s);var t=e.prototype;return t.handleTracksChange=function(e){for(var t=this.player().textTracks(),i=!1,n=0,r=t.length;n<r;n++){var a=t[n];if(a.kind!==this.kind_&&\"showing\"===a.mode){i=!0;break}}i?this.disable():this.enable()},t.buildCSSClass=function(){return\"vjs-descriptions-button \"+s.prototype.buildCSSClass.call(this)},t.buildWrapperCSSClass=function(){return\"vjs-descriptions-button \"+s.prototype.buildWrapperCSSClass.call(this)},e}(ar);ur.prototype.kind_=\"descriptions\",ur.prototype.controlText_=\"Descriptions\",Tt.registerComponent(\"DescriptionsButton\",ur);var lr=function(n){function e(e,t,i){return n.call(this,e,t,i)||this}kt(e,n);var t=e.prototype;return t.buildCSSClass=function(){return\"vjs-subtitles-button \"+n.prototype.buildCSSClass.call(this)},t.buildWrapperCSSClass=function(){return\"vjs-subtitles-button \"+n.prototype.buildWrapperCSSClass.call(this)},e}(ar);lr.prototype.kind_=\"subtitles\",lr.prototype.controlText_=\"Subtitles\",Tt.registerComponent(\"SubtitlesButton\",lr);var cr=function(n){function e(e,t){var i;return t.track={player:e,kind:t.kind,label:t.kind+\" settings\",selectable:!1,default:!1,mode:\"disabled\"},t.selectable=!1,t.name=\"CaptionSettingsMenuItem\",(i=n.call(this,e,t)||this).addClass(\"vjs-texttrack-settings\"),i.controlText(\", opens \"+t.kind+\" settings dialog\"),i}return kt(e,n),e.prototype.handleClick=function(e){this.player().getChild(\"textTrackSettings\").open()},e}(nr);Tt.registerComponent(\"CaptionSettingsMenuItem\",cr);var dr=function(n){function e(e,t,i){return n.call(this,e,t,i)||this}kt(e,n);var t=e.prototype;return t.buildCSSClass=function(){return\"vjs-captions-button \"+n.prototype.buildCSSClass.call(this)},t.buildWrapperCSSClass=function(){return\"vjs-captions-button \"+n.prototype.buildWrapperCSSClass.call(this)},t.createItems=function(){var e=[];return this.player().tech_&&this.player().tech_.featuresNativeTextTracks||!this.player().getChild(\"textTrackSettings\")||(e.push(new cr(this.player_,{kind:this.kind_})),this.hideThreshold_+=1),n.prototype.createItems.call(this,e)},e}(ar);dr.prototype.kind_=\"captions\",dr.prototype.controlText_=\"Captions\",Tt.registerComponent(\"CaptionsButton\",dr);var hr=function(r){function e(){return r.apply(this,arguments)||this}return kt(e,r),e.prototype.createEl=function(e,t,i){var n='<span class=\"vjs-menu-item-text\">'+this.localize(this.options_.label);return\"captions\"===this.options_.track.kind&&(n+='\\n        <span aria-hidden=\"true\" class=\"vjs-icon-placeholder\"></span>\\n        <span class=\"vjs-control-text\"> '+this.localize(\"Captions\")+\"</span>\\n      \"),n+=\"</span>\",r.prototype.createEl.call(this,e,S({innerHTML:n},t),i)},e}(nr);Tt.registerComponent(\"SubsCapsMenuItem\",hr);var pr=function(n){function e(e,t){var i;return void 0===t&&(t={}),(i=n.call(this,e,t)||this).label_=\"subtitles\",-1<[\"en\",\"en-us\",\"en-ca\",\"fr-ca\"].indexOf(i.player_.language_)&&(i.label_=\"captions\"),i.menuButton_.controlText(mt(i.label_)),i}kt(e,n);var t=e.prototype;return t.buildCSSClass=function(){return\"vjs-subs-caps-button \"+n.prototype.buildCSSClass.call(this)},t.buildWrapperCSSClass=function(){return\"vjs-subs-caps-button \"+n.prototype.buildWrapperCSSClass.call(this)},t.createItems=function(){var e=[];return this.player().tech_&&this.player().tech_.featuresNativeTextTracks||!this.player().getChild(\"textTrackSettings\")||(e.push(new cr(this.player_,{kind:this.label_})),this.hideThreshold_+=1),e=n.prototype.createItems.call(this,e,hr)},e}(ar);pr.prototype.kinds_=[\"captions\",\"subtitles\"],pr.prototype.controlText_=\"Subtitles\",Tt.registerComponent(\"SubsCapsButton\",pr);var fr=function(s){function e(e,t){var n,i=t.track,r=e.audioTracks();t.label=i.label||i.language||\"Unknown\",t.selected=i.enabled,(n=s.call(this,e,t)||this).track=i,n.addClass(\"vjs-\"+i.kind+\"-menu-item\");function a(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];n.handleTracksChange.apply(St(n),t)}return r.addEventListener(\"change\",a),n.on(\"dispose\",function(){r.removeEventListener(\"change\",a)}),n}kt(e,s);var t=e.prototype;return t.createEl=function(e,t,i){var n='<span class=\"vjs-menu-item-text\">'+this.localize(this.options_.label);return\"main-desc\"===this.options_.track.kind&&(n+='\\n        <span aria-hidden=\"true\" class=\"vjs-icon-placeholder\"></span>\\n        <span class=\"vjs-control-text\"> '+this.localize(\"Descriptions\")+\"</span>\\n      \"),n+=\"</span>\",s.prototype.createEl.call(this,e,S({innerHTML:n},t),i)},t.handleClick=function(e){var t=this.player_.audioTracks();s.prototype.handleClick.call(this,e);for(var i=0;i<t.length;i++){var n=t[i];n.enabled=n===this.track}},t.handleTracksChange=function(e){this.selected(this.track.enabled)},e}(ir);Tt.registerComponent(\"AudioTrackMenuItem\",fr);var mr=function(i){function e(e,t){return void 0===t&&(t={}),t.tracks=e.audioTracks(),i.call(this,e,t)||this}kt(e,i);var t=e.prototype;return t.buildCSSClass=function(){return\"vjs-audio-button \"+i.prototype.buildCSSClass.call(this)},t.buildWrapperCSSClass=function(){return\"vjs-audio-button \"+i.prototype.buildWrapperCSSClass.call(this)},t.createItems=function(e){void 0===e&&(e=[]),this.hideThreshold_=1;for(var t=this.player_.audioTracks(),i=0;i<t.length;i++){var n=t[i];e.push(new fr(this.player_,{track:n,selectable:!0,multiSelectable:!1}))}return e},e}(er);mr.prototype.controlText_=\"Audio Track\",Tt.registerComponent(\"AudioTrackButton\",mr);var gr=function(a){function e(e,t){var i,n=t.rate,r=parseFloat(n,10);return t.label=n,t.selected=1===r,t.selectable=!0,t.multiSelectable=!1,(i=a.call(this,e,t)||this).label=n,i.rate=r,i.on(e,\"ratechange\",i.update),i}kt(e,a);var t=e.prototype;return t.handleClick=function(e){a.prototype.handleClick.call(this),this.player().playbackRate(this.rate)},t.update=function(e){this.selected(this.player().playbackRate()===this.rate)},e}(ir);gr.prototype.contentElType=\"button\",Tt.registerComponent(\"PlaybackRateMenuItem\",gr);var vr=function(n){function e(e,t){var i;return(i=n.call(this,e,t)||this).updateVisibility(),i.updateLabel(),i.on(e,\"loadstart\",i.updateVisibility),i.on(e,\"ratechange\",i.updateLabel),i}kt(e,n);var t=e.prototype;return t.createEl=function(){var e=n.prototype.createEl.call(this);return this.labelEl_=ne(\"div\",{className:\"vjs-playback-rate-value\",innerHTML:\"1x\"}),e.appendChild(this.labelEl_),e},t.dispose=function(){this.labelEl_=null,n.prototype.dispose.call(this)},t.buildCSSClass=function(){return\"vjs-playback-rate \"+n.prototype.buildCSSClass.call(this)},t.buildWrapperCSSClass=function(){return\"vjs-playback-rate \"+n.prototype.buildWrapperCSSClass.call(this)},t.createMenu=function(){var e=new Jn(this.player()),t=this.playbackRates();if(t)for(var i=t.length-1;0<=i;i--)e.addChild(new gr(this.player(),{rate:t[i]+\"x\"}));return e},t.updateARIAAttributes=function(){this.el().setAttribute(\"aria-valuenow\",this.player().playbackRate())},t.handleClick=function(e){for(var t=this.player().playbackRate(),i=this.playbackRates(),n=i[0],r=0;r<i.length;r++)if(i[r]>t){n=i[r];break}this.player().playbackRate(n)},t.playbackRates=function(){return this.options_.playbackRates||this.options_.playerOptions&&this.options_.playerOptions.playbackRates},t.playbackRateSupported=function(){return this.player().tech_&&this.player().tech_.featuresPlaybackRate&&this.playbackRates()&&0<this.playbackRates().length},t.updateVisibility=function(e){this.playbackRateSupported()?this.removeClass(\"vjs-hidden\"):this.addClass(\"vjs-hidden\")},t.updateLabel=function(e){this.playbackRateSupported()&&(this.labelEl_.innerHTML=this.player().playbackRate()+\"x\")},e}(Zn);vr.prototype.controlText_=\"Playback Rate\",Tt.registerComponent(\"PlaybackRateMenuButton\",vr);var yr=function(e){function t(){return e.apply(this,arguments)||this}kt(t,e);var i=t.prototype;return i.buildCSSClass=function(){return\"vjs-spacer \"+e.prototype.buildCSSClass.call(this)},i.createEl=function(){return e.prototype.createEl.call(this,\"div\",{className:this.buildCSSClass()})},t}(Tt);Tt.registerComponent(\"Spacer\",yr);var _r=function(t){function e(){return t.apply(this,arguments)||this}kt(e,t);var i=e.prototype;return i.buildCSSClass=function(){return\"vjs-custom-control-spacer \"+t.prototype.buildCSSClass.call(this)},i.createEl=function(){var e=t.prototype.createEl.call(this,{className:this.buildCSSClass()});return e.innerHTML=\" \",e},e}(yr);Tt.registerComponent(\"CustomControlSpacer\",_r);var br=function(e){function t(){return e.apply(this,arguments)||this}return kt(t,e),t.prototype.createEl=function(){return e.prototype.createEl.call(this,\"div\",{className:\"vjs-control-bar\",dir:\"ltr\"})},t}(Tt);br.prototype.options_={children:[\"playToggle\",\"volumePanel\",\"currentTimeDisplay\",\"timeDivider\",\"durationDisplay\",\"progressControl\",\"liveDisplay\",\"seekToLive\",\"remainingTimeDisplay\",\"customControlSpacer\",\"playbackRateMenuButton\",\"chaptersButton\",\"descriptionsButton\",\"subsCapsButton\",\"audioTrackButton\",\"fullscreenToggle\"]},\"exitPictureInPicture\"in p&&br.prototype.options_.children.splice(br.prototype.options_.children.length-1,0,\"pictureInPictureToggle\"),Tt.registerComponent(\"ControlBar\",br);var Tr=function(n){function e(e,t){var i;return(i=n.call(this,e,t)||this).on(e,\"error\",i.open),i}kt(e,n);var t=e.prototype;return t.buildCSSClass=function(){return\"vjs-error-display \"+n.prototype.buildCSSClass.call(this)},t.content=function(){var e=this.player().error();return e?this.localize(e.message):\"\"},e}(Bt);Tr.prototype.options_=y({},Bt.prototype.options_,{pauseOnOpen:!1,fillAlways:!0,temporary:!1,uncloseable:!0}),Tt.registerComponent(\"ErrorDisplay\",Tr);var Sr=\"vjs-text-track-settings\",kr=[\"#000\",\"Black\"],wr=[\"#00F\",\"Blue\"],Er=[\"#0FF\",\"Cyan\"],Cr=[\"#0F0\",\"Green\"],Ir=[\"#F0F\",\"Magenta\"],xr=[\"#F00\",\"Red\"],Ar=[\"#FFF\",\"White\"],Pr=[\"#FF0\",\"Yellow\"],Lr=[\"1\",\"Opaque\"],Or=[\"0.5\",\"Semi-Transparent\"],Dr=[\"0\",\"Transparent\"],Rr={backgroundColor:{selector:\".vjs-bg-color > select\",id:\"captions-background-color-%s\",label:\"Color\",options:[kr,Ar,xr,Cr,wr,Pr,Ir,Er]},backgroundOpacity:{selector:\".vjs-bg-opacity > select\",id:\"captions-background-opacity-%s\",label:\"Transparency\",options:[Lr,Or,Dr]},color:{selector:\".vjs-fg-color > select\",id:\"captions-foreground-color-%s\",label:\"Color\",options:[Ar,kr,xr,Cr,wr,Pr,Ir,Er]},edgeStyle:{selector:\".vjs-edge-style > select\",id:\"%s\",label:\"Text Edge Style\",options:[[\"none\",\"None\"],[\"raised\",\"Raised\"],[\"depressed\",\"Depressed\"],[\"uniform\",\"Uniform\"],[\"dropshadow\",\"Dropshadow\"]]},fontFamily:{selector:\".vjs-font-family > select\",id:\"captions-font-family-%s\",label:\"Font Family\",options:[[\"proportionalSansSerif\",\"Proportional Sans-Serif\"],[\"monospaceSansSerif\",\"Monospace Sans-Serif\"],[\"proportionalSerif\",\"Proportional Serif\"],[\"monospaceSerif\",\"Monospace Serif\"],[\"casual\",\"Casual\"],[\"script\",\"Script\"],[\"small-caps\",\"Small Caps\"]]},fontPercent:{selector:\".vjs-font-percent > select\",id:\"captions-font-size-%s\",label:\"Font Size\",options:[[\"0.50\",\"50%\"],[\"0.75\",\"75%\"],[\"1.00\",\"100%\"],[\"1.25\",\"125%\"],[\"1.50\",\"150%\"],[\"1.75\",\"175%\"],[\"2.00\",\"200%\"],[\"3.00\",\"300%\"],[\"4.00\",\"400%\"]],default:2,parser:function(e){return\"1.00\"===e?null:Number(e)}},textOpacity:{selector:\".vjs-text-opacity > select\",id:\"captions-foreground-opacity-%s\",label:\"Transparency\",options:[Lr,Or]},windowColor:{selector:\".vjs-window-color > select\",id:\"captions-window-color-%s\",label:\"Color\"},windowOpacity:{selector:\".vjs-window-opacity > select\",id:\"captions-window-opacity-%s\",label:\"Transparency\",options:[Dr,Or,Lr]}};function Mr(e,t){if(t&&(e=t(e)),e&&\"none\"!==e)return e}Rr.windowColor.options=Rr.backgroundColor.options;var Nr=function(n){function e(e,t){var i;return t.temporary=!1,(i=n.call(this,e,t)||this).updateDisplay=$e(St(i),i.updateDisplay),i.fill(),i.hasBeenOpened_=i.hasBeenFilled_=!0,i.endDialog=ne(\"p\",{className:\"vjs-control-text\",textContent:i.localize(\"End of dialog window.\")}),i.el().appendChild(i.endDialog),i.setDefaults(),void 0===t.persistTextTrackSettings&&(i.options_.persistTextTrackSettings=i.options_.playerOptions.persistTextTrackSettings),i.on(i.$(\".vjs-done-button\"),\"click\",function(){i.saveSettings(),i.close()}),i.on(i.$(\".vjs-default-button\"),\"click\",function(){i.setDefaults(),i.updateDisplay()}),T(Rr,function(e){i.on(i.$(e.selector),\"change\",i.updateDisplay)}),i.options_.persistTextTrackSettings&&i.restoreSettings(),i}kt(e,n);var t=e.prototype;return t.dispose=function(){this.endDialog=null,n.prototype.dispose.call(this)},t.createElSelect_=function(e,t,i){var n=this;void 0===t&&(t=\"\"),void 0===i&&(i=\"label\");var r=Rr[e],a=r.id.replace(\"%s\",this.id_),s=[t,a].join(\" \").trim();return[\"<\"+i+' id=\"'+a+'\" class=\"'+(\"label\"===i?\"vjs-label\":\"\")+'\">',this.localize(r.label),\"</\"+i+\">\",'<select aria-labelledby=\"'+s+'\">'].concat(r.options.map(function(e){var t=a+\"-\"+e[1].replace(/\\W+/g,\"\");return['<option id=\"'+t+'\" value=\"'+e[0]+'\" ','aria-labelledby=\"'+s+\" \"+t+'\">',n.localize(e[1]),\"</option>\"].join(\"\")})).concat(\"</select>\").join(\"\")},t.createElFgColor_=function(){var e=\"captions-text-legend-\"+this.id_;return['<fieldset class=\"vjs-fg-color vjs-track-setting\">','<legend id=\"'+e+'\">',this.localize(\"Text\"),\"</legend>\",this.createElSelect_(\"color\",e),'<span class=\"vjs-text-opacity vjs-opacity\">',this.createElSelect_(\"textOpacity\",e),\"</span>\",\"</fieldset>\"].join(\"\")},t.createElBgColor_=function(){var e=\"captions-background-\"+this.id_;return['<fieldset class=\"vjs-bg-color vjs-track-setting\">','<legend id=\"'+e+'\">',this.localize(\"Background\"),\"</legend>\",this.createElSelect_(\"backgroundColor\",e),'<span class=\"vjs-bg-opacity vjs-opacity\">',this.createElSelect_(\"backgroundOpacity\",e),\"</span>\",\"</fieldset>\"].join(\"\")},t.createElWinColor_=function(){var e=\"captions-window-\"+this.id_;return['<fieldset class=\"vjs-window-color vjs-track-setting\">','<legend id=\"'+e+'\">',this.localize(\"Window\"),\"</legend>\",this.createElSelect_(\"windowColor\",e),'<span class=\"vjs-window-opacity vjs-opacity\">',this.createElSelect_(\"windowOpacity\",e),\"</span>\",\"</fieldset>\"].join(\"\")},t.createElColors_=function(){return ne(\"div\",{className:\"vjs-track-settings-colors\",innerHTML:[this.createElFgColor_(),this.createElBgColor_(),this.createElWinColor_()].join(\"\")})},t.createElFont_=function(){return ne(\"div\",{className:\"vjs-track-settings-font\",innerHTML:['<fieldset class=\"vjs-font-percent vjs-track-setting\">',this.createElSelect_(\"fontPercent\",\"\",\"legend\"),\"</fieldset>\",'<fieldset class=\"vjs-edge-style vjs-track-setting\">',this.createElSelect_(\"edgeStyle\",\"\",\"legend\"),\"</fieldset>\",'<fieldset class=\"vjs-font-family vjs-track-setting\">',this.createElSelect_(\"fontFamily\",\"\",\"legend\"),\"</fieldset>\"].join(\"\")})},t.createElControls_=function(){var e=this.localize(\"restore all settings to the default values\");return ne(\"div\",{className:\"vjs-track-settings-controls\",innerHTML:['<button type=\"button\" class=\"vjs-default-button\" title=\"'+e+'\">',this.localize(\"Reset\"),'<span class=\"vjs-control-text\"> '+e+\"</span>\",\"</button>\",'<button type=\"button\" class=\"vjs-done-button\">'+this.localize(\"Done\")+\"</button>\"].join(\"\")})},t.content=function(){return[this.createElColors_(),this.createElFont_(),this.createElControls_()]},t.label=function(){return this.localize(\"Caption Settings Dialog\")},t.description=function(){return this.localize(\"Beginning of dialog window. Escape will cancel and close the window.\")},t.buildCSSClass=function(){return n.prototype.buildCSSClass.call(this)+\" vjs-text-track-settings\"},t.getValues=function(){var r=this;return function(i,n,e){return void 0===e&&(e=0),b(i).reduce(function(e,t){return n(e,i[t],t)},e)}(Rr,function(e,t,i){var n=function(e,t){return Mr(e.options[e.options.selectedIndex].value,t)}(r.$(t.selector),t.parser);return void 0!==n&&(e[i]=n),e},{})},t.setValues=function(i){var n=this;T(Rr,function(e,t){!function(e,t,i){if(t)for(var n=0;n<e.options.length;n++)if(Mr(e.options[n].value,i)===t){e.selectedIndex=n;break}}(n.$(e.selector),i[t],e.parser)})},t.setDefaults=function(){var i=this;T(Rr,function(e){var t=e.hasOwnProperty(\"default\")?e.default:0;i.$(e.selector).selectedIndex=t})},t.restoreSettings=function(){var e;try{e=JSON.parse(h.localStorage.getItem(Sr))}catch(e){g.warn(e)}e&&this.setValues(e)},t.saveSettings=function(){if(this.options_.persistTextTrackSettings){var e=this.getValues();try{Object.keys(e).length?h.localStorage.setItem(Sr,JSON.stringify(e)):h.localStorage.removeItem(Sr)}catch(e){g.warn(e)}}},t.updateDisplay=function(){var e=this.player_.getChild(\"textTrackDisplay\");e&&e.updateDisplay()},t.conditionalBlur_=function(){this.previouslyActiveEl_=null;var e=this.player_.controlBar,t=e&&e.subsCapsButton,i=e&&e.captionsButton;t?t.focus():i&&i.focus()},e}(Bt);Tt.registerComponent(\"TextTrackSettings\",Nr);var Ur=function(a){function e(e,t){var i,n=t.ResizeObserver||h.ResizeObserver;null===t.ResizeObserver&&(n=!1);var r=gt({createEl:!n,reportTouchActivity:!1},t);return(i=a.call(this,e,r)||this).ResizeObserver=t.ResizeObserver||h.ResizeObserver,i.loadListener_=null,i.resizeObserver_=null,i.debouncedHandler_=function(n,r,a,s){var o;void 0===s&&(s=h);function e(){var e=this,t=arguments,i=function(){i=o=null,a||n.apply(e,t)};!o&&a&&n.apply(e,t),s.clearTimeout(o),o=s.setTimeout(i,r)}return e.cancel=function(){s.clearTimeout(o),o=null},e}(function(){i.resizeHandler()},100,!1,St(i)),n?(i.resizeObserver_=new i.ResizeObserver(i.debouncedHandler_),i.resizeObserver_.observe(e.el())):(i.loadListener_=function(){if(i.el_&&i.el_.contentWindow){var e=i.debouncedHandler_,t=i.unloadListener_=function(){Xe(this,\"resize\",e),Xe(this,\"unload\",t),t=null};Ge(i.el_.contentWindow,\"unload\",t),Ge(i.el_.contentWindow,\"resize\",e)}},i.one(\"load\",i.loadListener_)),i}kt(e,a);var t=e.prototype;return t.createEl=function(){return a.prototype.createEl.call(this,\"iframe\",{className:\"vjs-resize-manager\",tabIndex:-1},{\"aria-hidden\":\"true\"})},t.resizeHandler=function(){this.player_&&this.player_.trigger&&this.player_.trigger(\"playerresize\")},t.dispose=function(){this.debouncedHandler_&&this.debouncedHandler_.cancel(),this.resizeObserver_&&(this.player_.el()&&this.resizeObserver_.unobserve(this.player_.el()),this.resizeObserver_.disconnect()),this.loadListener_&&this.off(\"load\",this.loadListener_),this.el_&&this.el_.contentWindow&&this.unloadListener_&&this.unloadListener_.call(this.el_.contentWindow),this.ResizeObserver=null,this.resizeObserver=null,this.debouncedHandler_=null,this.loadListener_=null,a.prototype.dispose.call(this)},e}(Tt);Tt.registerComponent(\"ResizeManager\",Ur);var Br={trackingThreshold:30,liveTolerance:15},Fr=function(r){function e(e,t){var i,n=gt(Br,t,{createEl:!1});return(i=r.call(this,e,n)||this).reset_(),i.on(i.player_,\"durationchange\",i.handleDurationchange),i.one(i.player_,\"canplay\",function(){return i.toggleTracking()}),q&&\"hidden\"in p&&\"visibilityState\"in p&&i.on(p,\"visibilitychange\",i.handleVisibilityChange),i}kt(e,r);var t=e.prototype;return t.handleVisibilityChange=function(){this.player_.duration()===1/0&&(p.hidden?this.stopTracking():this.startTracking())},t.trackLive_=function(){var e=this.player_.seekable();if(e&&e.length){var t=Number(h.performance.now().toFixed(4)),i=-1===this.lastTime_?0:(t-this.lastTime_)/1e3;this.lastTime_=t,this.pastSeekEnd_=this.pastSeekEnd()+i;var n=this.liveCurrentTime(),r=this.player_.currentTime(),a=this.player_.paused()||this.seekedBehindLive_||Math.abs(n-r)>this.options_.liveTolerance;this.timeupdateSeen_&&n!==1/0||(a=!1),a!==this.behindLiveEdge_&&(this.behindLiveEdge_=a,this.trigger(\"liveedgechange\"))}},t.handleDurationchange=function(){this.toggleTracking()},t.toggleTracking=function(){this.player_.duration()===1/0&&this.liveWindow()>=this.options_.trackingThreshold?(this.player_.options_.liveui&&this.player_.addClass(\"vjs-liveui\"),this.startTracking()):(this.player_.removeClass(\"vjs-liveui\"),this.stopTracking())},t.startTracking=function(){this.isTracking()||(this.timeupdateSeen_||(this.timeupdateSeen_=this.player_.hasStarted()),this.trackingInterval_=this.setInterval(this.trackLive_,30),this.trackLive_(),this.on(this.player_,[\"play\",\"pause\"],this.trackLive_),this.timeupdateSeen_?this.on(this.player_,\"seeked\",this.handleSeeked):(this.one(this.player_,\"play\",this.handlePlay),this.one(this.player_,\"timeupdate\",this.handleFirstTimeupdate)))},t.handleFirstTimeupdate=function(){this.timeupdateSeen_=!0,this.on(this.player_,\"seeked\",this.handleSeeked)},t.handleSeeked=function(){var e=Math.abs(this.liveCurrentTime()-this.player_.currentTime());this.seekedBehindLive_=!this.skipNextSeeked_&&2<e,this.skipNextSeeked_=!1,this.trackLive_()},t.handlePlay=function(){this.one(this.player_,\"timeupdate\",this.seekToLiveEdge)},t.reset_=function(){this.lastTime_=-1,this.pastSeekEnd_=0,this.lastSeekEnd_=-1,this.behindLiveEdge_=!0,this.timeupdateSeen_=!1,this.seekedBehindLive_=!1,this.skipNextSeeked_=!1,this.clearInterval(this.trackingInterval_),this.trackingInterval_=null,this.off(this.player_,[\"play\",\"pause\"],this.trackLive_),this.off(this.player_,\"seeked\",this.handleSeeked),this.off(this.player_,\"play\",this.handlePlay),this.off(this.player_,\"timeupdate\",this.handleFirstTimeupdate),this.off(this.player_,\"timeupdate\",this.seekToLiveEdge)},t.stopTracking=function(){this.isTracking()&&(this.reset_(),this.trigger(\"liveedgechange\"))},t.seekableEnd=function(){for(var e=this.player_.seekable(),t=[],i=e?e.length:0;i--;)t.push(e.end(i));return t.length?t.sort()[t.length-1]:1/0},t.seekableStart=function(){for(var e=this.player_.seekable(),t=[],i=e?e.length:0;i--;)t.push(e.start(i));return t.length?t.sort()[0]:0},t.liveWindow=function(){var e=this.liveCurrentTime();return e===1/0?0:e-this.seekableStart()},t.isLive=function(){return this.isTracking()},t.atLiveEdge=function(){return!this.behindLiveEdge()},t.liveCurrentTime=function(){return this.pastSeekEnd()+this.seekableEnd()},t.pastSeekEnd=function(){var e=this.seekableEnd();return-1!==this.lastSeekEnd_&&e!==this.lastSeekEnd_&&(this.pastSeekEnd_=0),this.lastSeekEnd_=e,this.pastSeekEnd_},t.behindLiveEdge=function(){return this.behindLiveEdge_},t.isTracking=function(){return\"number\"==typeof this.trackingInterval_},t.seekToLiveEdge=function(){this.seekedBehindLive_=!1,this.atLiveEdge()||(this.skipNextSeeked_=!0,this.player_.currentTime(this.liveCurrentTime()))},t.dispose=function(){this.off(p,\"visibilitychange\",this.handleVisibilityChange),this.stopTracking(),r.prototype.dispose.call(this)},e}(Tt);Tt.registerComponent(\"LiveTracker\",Fr);function jr(e){var t=e.el();if(t.hasAttribute(\"src\"))return e.triggerSourceset(t.src),!0;var i=e.$$(\"source\"),n=[],r=\"\";if(!i.length)return!1;for(var a=0;a<i.length;a++){var s=i[a].src;s&&-1===n.indexOf(s)&&n.push(s)}return!!n.length&&(1===n.length&&(r=n[0]),e.triggerSourceset(r),!0)}function Vr(e,t){for(var i={},n=0;n<e.length&&!((i=Object.getOwnPropertyDescriptor(e[n],t))&&i.set&&i.get);n++);return i.enumerable=!0,i.configurable=!0,i}function qr(a){var s=a.el();if(!s.resetSourceWatch_){var t={},e=function(e){return Vr([e.el(),h.HTMLMediaElement.prototype,h.Element.prototype,Gr],\"innerHTML\")}(a),i=function(r){return function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];var n=r.apply(s,t);return jr(a),n}};[\"append\",\"appendChild\",\"insertAdjacentHTML\"].forEach(function(e){s[e]&&(t[e]=s[e],s[e]=i(t[e]))}),Object.defineProperty(s,\"innerHTML\",gt(e,{set:i(e.set)})),s.resetSourceWatch_=function(){s.resetSourceWatch_=null,Object.keys(t).forEach(function(e){s[e]=t[e]}),Object.defineProperty(s,\"innerHTML\",e)},a.one(\"sourceset\",s.resetSourceWatch_)}}function Hr(n){if(n.featuresSourceset){var r=n.el();if(!r.resetSourceset_){var i=function(e){return Vr([e.el(),h.HTMLMediaElement.prototype,Xr],\"src\")}(n),a=r.setAttribute,t=r.load;Object.defineProperty(r,\"src\",gt(i,{set:function(e){var t=i.set.call(r,e);return n.triggerSourceset(r.src),t}})),r.setAttribute=function(e,t){var i=a.call(r,e,t);return/src/i.test(e)&&n.triggerSourceset(r.src),i},r.load=function(){var e=t.call(r);return jr(n)||(n.triggerSourceset(\"\"),qr(n)),e},r.currentSrc?n.triggerSourceset(r.currentSrc):jr(n)||qr(n),r.resetSourceset_=function(){r.resetSourceset_=null,r.load=t,r.setAttribute=a,Object.defineProperty(r,\"src\",i),r.resetSourceWatch_&&r.resetSourceWatch_()}}}}function Wr(t,i,n,e){function r(e){return Object.defineProperty(t,i,{value:e,enumerable:!0,writable:!0})}void 0===e&&(e=!0);var a={configurable:!0,enumerable:!0,get:function(){var e=n();return r(e),e}};return e&&(a.set=r),Object.defineProperty(t,i,a)}var zr,Gr=Object.defineProperty({},\"innerHTML\",{get:function(){return this.cloneNode(!0).innerHTML},set:function(e){var t=p.createElement(this.nodeName.toLowerCase());t.innerHTML=e;for(var i=p.createDocumentFragment();t.childNodes.length;)i.appendChild(t.childNodes[0]);return this.innerText=\"\",h.Element.prototype.appendChild.call(this,i),this.innerHTML}}),Xr=Object.defineProperty({},\"src\",{get:function(){return this.hasAttribute(\"src\")?Wt(h.Element.prototype.getAttribute.call(this,\"src\")):\"\"},set:function(e){return h.Element.prototype.setAttribute.call(this,\"src\",e),e}}),Kr=function(c){function o(e,t){var i;i=c.call(this,e,t)||this;var n=e.source,r=!1;if(n&&(i.el_.currentSrc!==n.src||e.tag&&3===e.tag.initNetworkState_)?i.setSource(n):i.handleLateInit_(i.el_),e.enableSourceset&&i.setupSourcesetHandling_(),i.isScrubbing_=!1,i.el_.hasChildNodes()){for(var a=i.el_.childNodes,s=a.length,o=[];s--;){var u=a[s];\"track\"===u.nodeName.toLowerCase()&&(i.featuresNativeTextTracks?(i.remoteTextTrackEls().addTrackElement_(u),i.remoteTextTracks().addTrack(u.track),i.textTracks().addTrack(u.track),r||i.el_.hasAttribute(\"crossorigin\")||!Gt(u.src)||(r=!0)):o.push(u))}for(var l=0;l<o.length;l++)i.el_.removeChild(o[l])}return i.proxyNativeTracks_(),i.featuresNativeTextTracks&&r&&g.warn(\"Text Tracks are being loaded from another origin but the crossorigin attribute isn't used.\\nThis may prevent text tracks from loading.\"),i.restoreMetadataTracksInIOSNativePlayer_(),(z||X||U)&&!0===e.nativeControlsForTouch&&i.setControls(!0),i.proxyWebkitFullscreen_(),i.triggerReady(),i}kt(o,c);var e=o.prototype;return e.dispose=function(){this.el_&&this.el_.resetSourceset_&&this.el_.resetSourceset_(),o.disposeMediaElement(this.el_),this.options_=null,c.prototype.dispose.call(this)},e.setupSourcesetHandling_=function(){Hr(this)},e.restoreMetadataTracksInIOSNativePlayer_=function(){function e(){i=[];for(var e=0;e<n.length;e++){var t=n[e];\"metadata\"===t.kind&&i.push({track:t,storedMode:t.mode})}}var i,n=this.textTracks();e(),n.addEventListener(\"change\",e),this.on(\"dispose\",function(){return n.removeEventListener(\"change\",e)});function r(){for(var e=0;e<i.length;e++){var t=i[e];\"disabled\"===t.track.mode&&t.track.mode!==t.storedMode&&(t.track.mode=t.storedMode)}n.removeEventListener(\"change\",r)}this.on(\"webkitbeginfullscreen\",function(){n.removeEventListener(\"change\",e),n.removeEventListener(\"change\",r),n.addEventListener(\"change\",r)}),this.on(\"webkitendfullscreen\",function(){n.removeEventListener(\"change\",e),n.addEventListener(\"change\",e),n.removeEventListener(\"change\",r)})},e.overrideNative_=function(e,t){var i=this;if(t===this[\"featuresNative\"+e+\"Tracks\"]){var n=e.toLowerCase();this[n+\"TracksListeners_\"]&&Object.keys(this[n+\"TracksListeners_\"]).forEach(function(e){i.el()[n+\"Tracks\"].removeEventListener(e,i[n+\"TracksListeners_\"][e])}),this[\"featuresNative\"+e+\"Tracks\"]=!t,this[n+\"TracksListeners_\"]=null,this.proxyNativeTracksForType_(n)}},e.overrideNativeAudioTracks=function(e){this.overrideNative_(\"Audio\",e)},e.overrideNativeVideoTracks=function(e){this.overrideNative_(\"Video\",e)},e.proxyNativeTracksForType_=function(i){var n=this,e=_i[i],r=this.el()[e.getterName],a=this[e.getterName]();if(this[\"featuresNative\"+e.capitalName+\"Tracks\"]&&r&&r.addEventListener){var s={change:function(e){var t={type:\"change\",target:a,currentTarget:a,srcElement:a};a.trigger(t),\"text\"===i&&n[bi.remoteText.getterName]().trigger(t)},addtrack:function(e){a.addTrack(e.track)},removetrack:function(e){a.removeTrack(e.track)}},t=function(){for(var e=[],t=0;t<a.length;t++){for(var i=!1,n=0;n<r.length;n++)if(r[n]===a[t]){i=!0;break}i||e.push(a[t])}for(;e.length;)a.removeTrack(e.shift())};this[e.getterName+\"Listeners_\"]=s,Object.keys(s).forEach(function(t){var i=s[t];r.addEventListener(t,i),n.on(\"dispose\",function(e){return r.removeEventListener(t,i)})}),this.on(\"loadstart\",t),this.on(\"dispose\",function(e){return n.off(\"loadstart\",t)})}},e.proxyNativeTracks_=function(){var t=this;_i.names.forEach(function(e){t.proxyNativeTracksForType_(e)})},e.createEl=function(){var e=this.options_.tag;if(!e||!this.options_.playerElIngest&&!this.movingMediaElementInDOM){if(e){var t=e.cloneNode(!0);e.parentNode&&e.parentNode.insertBefore(t,e),o.disposeMediaElement(e),e=t}else{e=p.createElement(\"video\");var i=gt({},this.options_.tag&&de(this.options_.tag));z&&!0===this.options_.nativeControlsForTouch||delete i.controls,ce(e,S(i,{id:this.options_.techId,class:\"vjs-tech\"}))}e.playerId=this.options_.playerId}\"undefined\"!=typeof this.options_.preload&&pe(e,\"preload\",this.options_.preload),void 0!==this.options_.disablePictureInPicture&&(e.disablePictureInPicture=this.options_.disablePictureInPicture);for(var n=[\"loop\",\"muted\",\"playsinline\",\"autoplay\"],r=0;r<n.length;r++){var a=n[r],s=this.options_[a];\"undefined\"!=typeof s&&(s?pe(e,a,a):fe(e,a),e[a]=s)}return e},e.handleLateInit_=function(e){if(0!==e.networkState&&3!==e.networkState){if(0===e.readyState){var t=!1,i=function(){t=!0};this.on(\"loadstart\",i);var n=function(){t||this.trigger(\"loadstart\")};return this.on(\"loadedmetadata\",n),void this.ready(function(){this.off(\"loadstart\",i),this.off(\"loadedmetadata\",n),t||this.trigger(\"loadstart\")})}var r=[\"loadstart\"];r.push(\"loadedmetadata\"),2<=e.readyState&&r.push(\"loadeddata\"),3<=e.readyState&&r.push(\"canplay\"),4<=e.readyState&&r.push(\"canplaythrough\"),this.ready(function(){r.forEach(function(e){this.trigger(e)},this)})}},e.setScrubbing=function(e){this.isScrubbing_=e},e.scrubbing=function(){return this.isScrubbing_},e.setCurrentTime=function(e){try{this.isScrubbing_&&this.el_.fastSeek&&Q?this.el_.fastSeek(e):this.el_.currentTime=e}catch(e){g(e,\"Video is not ready. (Video.js)\")}},e.duration=function(){var t=this;if(this.el_.duration===1/0&&M&&j&&0===this.el_.currentTime){return this.on(\"timeupdate\",function e(){0<t.el_.currentTime&&(t.el_.duration===1/0&&t.trigger(\"durationchange\"),t.off(\"timeupdate\",e))}),NaN}return this.el_.duration||NaN},e.width=function(){return this.el_.offsetWidth},e.height=function(){return this.el_.offsetHeight},e.proxyWebkitFullscreen_=function(){var e=this;if(\"webkitDisplayingFullscreen\"in this.el_){var t=function(){this.trigger(\"fullscreenchange\",{isFullscreen:!1})},i=function(){\"webkitPresentationMode\"in this.el_&&\"picture-in-picture\"!==this.el_.webkitPresentationMode&&(this.one(\"webkitendfullscreen\",t),this.trigger(\"fullscreenchange\",{isFullscreen:!0,nativeIOSFullscreen:!0}))};this.on(\"webkitbeginfullscreen\",i),this.on(\"dispose\",function(){e.off(\"webkitbeginfullscreen\",i),e.off(\"webkitendfullscreen\",t)})}},e.supportsFullScreen=function(){if(\"function\"==typeof this.el_.webkitEnterFullScreen){var e=h.navigator&&h.navigator.userAgent||\"\";if(/Android/.test(e)||!/Chrome|Mac OS X 10.5/.test(e))return!0}return!1},e.enterFullScreen=function(){var e=this.el_;if(e.paused&&e.networkState<=e.HAVE_METADATA)Ot(this.el_.play()),this.setTimeout(function(){e.pause();try{e.webkitEnterFullScreen()}catch(e){this.trigger(\"fullscreenerror\",e)}},0);else try{e.webkitEnterFullScreen()}catch(e){this.trigger(\"fullscreenerror\",e)}},e.exitFullScreen=function(){this.el_.webkitDisplayingFullscreen?this.el_.webkitExitFullScreen():this.trigger(\"fullscreenerror\",new Error(\"The video is not fullscreen\"))},e.requestPictureInPicture=function(){return this.el_.requestPictureInPicture()},e.src=function(e){if(void 0===e)return this.el_.src;this.setSrc(e)},e.reset=function(){o.resetMediaElement(this.el_)},e.currentSrc=function(){return this.currentSource_?this.currentSource_.src:this.el_.currentSrc},e.setControls=function(e){this.el_.controls=!!e},e.addTextTrack=function(e,t,i){return this.featuresNativeTextTracks?this.el_.addTextTrack(e,t,i):c.prototype.addTextTrack.call(this,e,t,i)},e.createRemoteTextTrack=function(e){if(!this.featuresNativeTextTracks)return c.prototype.createRemoteTextTrack.call(this,e);var t=p.createElement(\"track\");return e.kind&&(t.kind=e.kind),e.label&&(t.label=e.label),(e.language||e.srclang)&&(t.srclang=e.language||e.srclang),e.default&&(t.default=e.default),e.id&&(t.id=e.id),e.src&&(t.src=e.src),t},e.addRemoteTextTrack=function(e,t){var i=c.prototype.addRemoteTextTrack.call(this,e,t);return this.featuresNativeTextTracks&&this.el().appendChild(i),i},e.removeRemoteTextTrack=function(e){if(c.prototype.removeRemoteTextTrack.call(this,e),this.featuresNativeTextTracks)for(var t=this.$$(\"track\"),i=t.length;i--;)e!==t[i]&&e!==t[i].track||this.el().removeChild(t[i])},e.getVideoPlaybackQuality=function(){if(\"function\"==typeof this.el().getVideoPlaybackQuality)return this.el().getVideoPlaybackQuality();var e={};return\"undefined\"!=typeof this.el().webkitDroppedFrameCount&&\"undefined\"!=typeof this.el().webkitDecodedFrameCount&&(e.droppedVideoFrames=this.el().webkitDroppedFrameCount,e.totalVideoFrames=this.el().webkitDecodedFrameCount),h.performance&&\"function\"==typeof h.performance.now?e.creationTime=h.performance.now():h.performance&&h.performance.timing&&\"number\"==typeof h.performance.timing.navigationStart&&(e.creationTime=h.Date.now()-h.performance.timing.navigationStart),e},o}(Ji);Wr(Kr,\"TEST_VID\",function(){if(Z()){var e=p.createElement(\"video\"),t=p.createElement(\"track\");return t.kind=\"captions\",t.srclang=\"en\",t.label=\"English\",e.appendChild(t),e}}),Kr.isSupported=function(){try{Kr.TEST_VID.volume=.5}catch(e){return!1}return!(!Kr.TEST_VID||!Kr.TEST_VID.canPlayType)},Kr.canPlayType=function(e){return Kr.TEST_VID.canPlayType(e)},Kr.canPlaySource=function(e,t){return Kr.canPlayType(e.type)},Kr.canControlVolume=function(){try{var e=Kr.TEST_VID.volume;return Kr.TEST_VID.volume=e/2+.1,e!==Kr.TEST_VID.volume}catch(e){return!1}},Kr.canMuteVolume=function(){try{var e=Kr.TEST_VID.muted;return Kr.TEST_VID.muted=!e,Kr.TEST_VID.muted?pe(Kr.TEST_VID,\"muted\",\"muted\"):fe(Kr.TEST_VID,\"muted\"),e!==Kr.TEST_VID.muted}catch(e){return!1}},Kr.canControlPlaybackRate=function(){if(M&&j&&V<58)return!1;try{var e=Kr.TEST_VID.playbackRate;return Kr.TEST_VID.playbackRate=e/2+.1,e!==Kr.TEST_VID.playbackRate}catch(e){return!1}},Kr.canOverrideAttributes=function(){try{var e=function(){};Object.defineProperty(p.createElement(\"video\"),\"src\",{get:e,set:e}),Object.defineProperty(p.createElement(\"audio\"),\"src\",{get:e,set:e}),Object.defineProperty(p.createElement(\"video\"),\"innerHTML\",{get:e,set:e}),Object.defineProperty(p.createElement(\"audio\"),\"innerHTML\",{get:e,set:e})}catch(e){return!1}return!0},Kr.supportsNativeTextTracks=function(){return Q||K&&j},Kr.supportsNativeVideoTracks=function(){return!(!Kr.TEST_VID||!Kr.TEST_VID.videoTracks)},Kr.supportsNativeAudioTracks=function(){return!(!Kr.TEST_VID||!Kr.TEST_VID.audioTracks)},Kr.Events=[\"loadstart\",\"suspend\",\"abort\",\"error\",\"emptied\",\"stalled\",\"loadedmetadata\",\"loadeddata\",\"canplay\",\"canplaythrough\",\"playing\",\"waiting\",\"seeking\",\"seeked\",\"ended\",\"durationchange\",\"timeupdate\",\"progress\",\"play\",\"pause\",\"ratechange\",\"resize\",\"volumechange\"],[[\"featuresVolumeControl\",\"canControlVolume\"],[\"featuresMuteControl\",\"canMuteVolume\"],[\"featuresPlaybackRate\",\"canControlPlaybackRate\"],[\"featuresSourceset\",\"canOverrideAttributes\"],[\"featuresNativeTextTracks\",\"supportsNativeTextTracks\"],[\"featuresNativeVideoTracks\",\"supportsNativeVideoTracks\"],[\"featuresNativeAudioTracks\",\"supportsNativeAudioTracks\"]].forEach(function(e){var t=e[0],i=e[1];Wr(Kr.prototype,t,function(){return Kr[i]()},!0)}),Kr.prototype.movingMediaElementInDOM=!K,Kr.prototype.featuresFullscreenResize=!0,Kr.prototype.featuresProgressEvents=!0,Kr.prototype.featuresTimeupdateEvents=!0,Kr.patchCanPlayType=function(){4<=N&&!B&&!j&&(zr=Kr.TEST_VID&&Kr.TEST_VID.constructor.prototype.canPlayType,Kr.TEST_VID.constructor.prototype.canPlayType=function(e){return e&&/^application\\/(?:x-|vnd\\.apple\\.)mpegurl/i.test(e)?\"maybe\":zr.call(this,e)})},Kr.unpatchCanPlayType=function(){var e=Kr.TEST_VID.constructor.prototype.canPlayType;return zr&&(Kr.TEST_VID.constructor.prototype.canPlayType=zr),e},Kr.patchCanPlayType(),Kr.disposeMediaElement=function(e){if(e){for(e.parentNode&&e.parentNode.removeChild(e);e.hasChildNodes();)e.removeChild(e.firstChild);e.removeAttribute(\"src\"),\"function\"==typeof e.load&&function(){try{e.load()}catch(e){}}()}},Kr.resetMediaElement=function(e){if(e){for(var t=e.querySelectorAll(\"source\"),i=t.length;i--;)e.removeChild(t[i]);e.removeAttribute(\"src\"),\"function\"==typeof e.load&&function(){try{e.load()}catch(e){}}()}},[\"muted\",\"defaultMuted\",\"autoplay\",\"controls\",\"loop\",\"playsinline\"].forEach(function(e){Kr.prototype[e]=function(){return this.el_[e]||this.el_.hasAttribute(e)}}),[\"muted\",\"defaultMuted\",\"autoplay\",\"loop\",\"playsinline\"].forEach(function(t){Kr.prototype[\"set\"+mt(t)]=function(e){(this.el_[t]=e)?this.el_.setAttribute(t,t):this.el_.removeAttribute(t)}}),[\"paused\",\"currentTime\",\"buffered\",\"volume\",\"poster\",\"preload\",\"error\",\"seeking\",\"seekable\",\"ended\",\"playbackRate\",\"defaultPlaybackRate\",\"disablePictureInPicture\",\"played\",\"networkState\",\"readyState\",\"videoWidth\",\"videoHeight\",\"crossOrigin\"].forEach(function(e){Kr.prototype[e]=function(){return this.el_[e]}}),[\"volume\",\"src\",\"poster\",\"preload\",\"playbackRate\",\"defaultPlaybackRate\",\"disablePictureInPicture\",\"crossOrigin\"].forEach(function(t){Kr.prototype[\"set\"+mt(t)]=function(e){this.el_[t]=e}}),[\"pause\",\"load\",\"play\"].forEach(function(e){Kr.prototype[e]=function(){return this.el_[e]()}}),Ji.withSourceHandlers(Kr),Kr.nativeSourceHandler={},Kr.nativeSourceHandler.canPlayType=function(e){try{return Kr.TEST_VID.canPlayType(e)}catch(e){return\"\"}},Kr.nativeSourceHandler.canHandleSource=function(e,t){if(e.type)return Kr.nativeSourceHandler.canPlayType(e.type);if(e.src){var i=zt(e.src);return Kr.nativeSourceHandler.canPlayType(\"video/\"+i)}return\"\"},Kr.nativeSourceHandler.handleSource=function(e,t,i){t.setSrc(e.src)},Kr.nativeSourceHandler.dispose=function(){},Kr.registerSourceHandler(Kr.nativeSourceHandler),Ji.registerTech(\"Html5\",Kr);var Qr=[\"progress\",\"abort\",\"suspend\",\"emptied\",\"stalled\",\"loadedmetadata\",\"loadeddata\",\"timeupdate\",\"resize\",\"volumechange\",\"texttrackchange\"],Yr={canplay:\"CanPlay\",canplaythrough:\"CanPlayThrough\",playing:\"Playing\",seeked:\"Seeked\"},$r=[\"tiny\",\"xsmall\",\"small\",\"medium\",\"large\",\"xlarge\",\"huge\"],Jr={};$r.forEach(function(e){var t=\"x\"===e.charAt(0)?\"x-\"+e.substring(1):e;Jr[e]=\"vjs-layout-\"+t});var Zr={tiny:210,xsmall:320,small:425,medium:768,large:1440,xlarge:2560,huge:1/0},ea=function(c){function l(e,t,i){var n;if(e.id=e.id||t.id||\"vjs_video_\"+Be(),(t=S(l.getTagSettings(e),t)).initChildren=!1,t.createEl=!1,t.evented=!1,t.reportTouchActivity=!1,!t.language)if(\"function\"==typeof e.closest){var r=e.closest(\"[lang]\");r&&r.getAttribute&&(t.language=r.getAttribute(\"lang\"))}else for(var a=e;a&&1===a.nodeType;){if(de(a).hasOwnProperty(\"lang\")){t.language=a.getAttribute(\"lang\");break}a=a.parentNode}if((n=c.call(this,null,t,i)||this).boundDocumentFullscreenChange_=function(e){return n.documentFullscreenChange_(e)},n.boundFullWindowOnEscKey_=function(e){return n.fullWindowOnEscKey(e)},n.isFullscreen_=!1,n.log=v(n.id_),n.fsApi_=f,n.isPosterFromTech_=!1,n.queuedCallbacks_=[],n.isReady_=!1,n.hasStarted_=!1,n.userActive_=!1,n.debugEnabled_=!1,!n.options_||!n.options_.techOrder||!n.options_.techOrder.length)throw new Error(\"No techOrder specified. Did you overwrite videojs.options instead of just changing the properties you want to override?\");if(n.tag=e,n.tagAttributes=e&&de(e),n.language(n.options_.language),t.languages){var s={};Object.getOwnPropertyNames(t.languages).forEach(function(e){s[e.toLowerCase()]=t.languages[e]}),n.languages_=s}else n.languages_=l.prototype.options_.languages;n.resetCache_(),n.poster_=t.poster||\"\",n.controls_=!!t.controls,e.controls=!1,e.removeAttribute(\"controls\"),n.changingSrc_=!1,n.playCallbacks_=[],n.playTerminatedQueue_=[],e.hasAttribute(\"autoplay\")?n.autoplay(!0):n.autoplay(n.options_.autoplay),t.plugins&&Object.keys(t.plugins).forEach(function(e){if(\"function\"!=typeof n[e])throw new Error('plugin \"'+e+'\" does not exist')}),n.scrubbing_=!1,n.el_=n.createEl(),dt(St(n),{eventBusKey:\"el_\"}),n.fsApi_.requestFullscreen&&(Ge(p,n.fsApi_.fullscreenchange,n.boundDocumentFullscreenChange_),n.on(n.fsApi_.fullscreenchange,n.boundDocumentFullscreenChange_)),n.fluid_&&n.on([\"playerreset\",\"resize\"],n.updateStyleEl_);var o=gt(n.options_);t.plugins&&Object.keys(t.plugins).forEach(function(e){n[e](t.plugins[e])}),t.debug&&n.debug(!0),n.options_.playerOptions=o,n.middleware_=[],n.initChildren(),n.isAudio(\"audio\"===e.nodeName.toLowerCase()),n.controls()?n.addClass(\"vjs-controls-enabled\"):n.addClass(\"vjs-controls-disabled\"),n.el_.setAttribute(\"role\",\"region\"),n.isAudio()?n.el_.setAttribute(\"aria-label\",n.localize(\"Audio Player\")):n.el_.setAttribute(\"aria-label\",n.localize(\"Video Player\")),n.isAudio()&&n.addClass(\"vjs-audio\"),n.flexNotSupported_()&&n.addClass(\"vjs-no-flex\"),z&&n.addClass(\"vjs-touch-enabled\"),K||n.addClass(\"vjs-workinghover\"),l.players[n.id_]=St(n);var u=d.split(\".\")[0];return n.addClass(\"vjs-v\"+u),n.userActive(!0),n.reportUserActivity(),n.one(\"play\",n.listenForUserActivity_),n.on(\"stageclick\",n.handleStageClick_),n.on(\"keydown\",n.handleKeyDown),n.on(\"languagechange\",n.handleLanguagechange),n.breakpoints(n.options_.breakpoints),n.responsive(n.options_.responsive),n}kt(l,c);var e=l.prototype;return e.dispose=function(){var n=this;this.trigger(\"dispose\"),this.off(\"dispose\"),Xe(p,this.fsApi_.fullscreenchange,this.boundDocumentFullscreenChange_),Xe(p,\"keydown\",this.boundFullWindowOnEscKey_),this.styleEl_&&this.styleEl_.parentNode&&(this.styleEl_.parentNode.removeChild(this.styleEl_),this.styleEl_=null),l.players[this.id_]=null,this.tag&&this.tag.player&&(this.tag.player=null),this.el_&&this.el_.player&&(this.el_.player=null),this.tech_&&(this.tech_.dispose(),this.isPosterFromTech_=!1,this.poster_=\"\"),this.playerElIngest_&&(this.playerElIngest_=null),this.tag&&(this.tag=null),function(e){en[e.id()]=null}(this),Ti.names.forEach(function(e){var t=Ti[e],i=n[t.getterName]();i&&i.off&&i.off()}),c.prototype.dispose.call(this)},e.createEl=function(){var t,i=this.tag,e=this.playerElIngest_=i.parentNode&&i.parentNode.hasAttribute&&i.parentNode.hasAttribute(\"data-vjs-player\"),n=\"video-js\"===this.tag.tagName.toLowerCase();e?t=this.el_=i.parentNode:n||(t=this.el_=c.prototype.createEl.call(this,\"div\"));var r=de(i);if(n){for(t=this.el_=i,i=this.tag=p.createElement(\"video\");t.children.length;)i.appendChild(t.firstChild);se(t,\"video-js\")||oe(t,\"video-js\"),t.appendChild(i),e=this.playerElIngest_=t,Object.keys(t).forEach(function(e){try{i[e]=t[e]}catch(e){}})}if(i.setAttribute(\"tabindex\",\"-1\"),r.tabindex=\"-1\",(q||j&&W)&&(i.setAttribute(\"role\",\"application\"),r.role=\"application\"),i.removeAttribute(\"width\"),i.removeAttribute(\"height\"),\"width\"in r&&delete r.width,\"height\"in r&&delete r.height,Object.getOwnPropertyNames(r).forEach(function(e){n&&\"class\"===e||t.setAttribute(e,r[e]),n&&i.setAttribute(e,r[e])}),i.playerId=i.id,i.id+=\"_html5_api\",i.className=\"vjs-tech\",i.player=t.player=this,this.addClass(\"vjs-paused\"),!0!==h.VIDEOJS_NO_DYNAMIC_STYLE){this.styleEl_=Re(\"vjs-styles-dimensions\");var a=Ie(\".vjs-styles-defaults\"),s=Ie(\"head\");s.insertBefore(this.styleEl_,a?a.nextSibling:s.firstChild)}this.fill_=!1,this.fluid_=!1,this.width(this.options_.width),this.height(this.options_.height),this.fill(this.options_.fill),this.fluid(this.options_.fluid),this.aspectRatio(this.options_.aspectRatio),this.crossOrigin(this.options_.crossOrigin||this.options_.crossorigin);for(var o=i.getElementsByTagName(\"a\"),u=0;u<o.length;u++){var l=o.item(u);oe(l,\"vjs-hidden\"),l.setAttribute(\"hidden\",\"hidden\")}return i.initNetworkState_=i.networkState,i.parentNode&&!e&&i.parentNode.insertBefore(t,i),ae(i,t),this.children_.unshift(i),this.el_.setAttribute(\"lang\",this.language_),this.el_=t},e.crossOrigin=function(e){if(!e)return this.techGet_(\"crossOrigin\");\"anonymous\"===e||\"use-credentials\"===e?this.techCall_(\"setCrossOrigin\",e):g.warn('crossOrigin must be \"anonymous\" or \"use-credentials\", given \"'+e+'\"')},e.width=function(e){return this.dimension(\"width\",e)},e.height=function(e){return this.dimension(\"height\",e)},e.dimension=function(e,t){var i=e+\"_\";if(void 0===t)return this[i]||0;if(\"\"===t||\"auto\"===t)return this[i]=void 0,void this.updateStyleEl_();var n=parseFloat(t);isNaN(n)?g.error('Improper value \"'+t+'\" supplied for for '+e):(this[i]=n,this.updateStyleEl_())},e.fluid=function(e){var t=this;if(void 0===e)return!!this.fluid_;this.fluid_=!!e,lt(this)&&this.off([\"playerreset\",\"resize\"],this.updateStyleEl_),e?(this.addClass(\"vjs-fluid\"),this.fill(!1),function(e,t){lt(e)?t():(e.eventedCallbacks||(e.eventedCallbacks=[]),e.eventedCallbacks.push(t))}(this,function(){t.on([\"playerreset\",\"resize\"],t.updateStyleEl_)})):this.removeClass(\"vjs-fluid\"),this.updateStyleEl_()},e.fill=function(e){if(void 0===e)return!!this.fill_;this.fill_=!!e,e?(this.addClass(\"vjs-fill\"),this.fluid(!1)):this.removeClass(\"vjs-fill\")},e.aspectRatio=function(e){if(void 0===e)return this.aspectRatio_;if(!/^\\d+\\:\\d+$/.test(e))throw new Error(\"Improper value supplied for aspect ratio. The format should be width:height, for example 16:9.\");this.aspectRatio_=e,this.fluid(!0),this.updateStyleEl_()},e.updateStyleEl_=function(){if(!0!==h.VIDEOJS_NO_DYNAMIC_STYLE){var e,t,i,n=(void 0!==this.aspectRatio_&&\"auto\"!==this.aspectRatio_?this.aspectRatio_:0<this.videoWidth()?this.videoWidth()+\":\"+this.videoHeight():\"16:9\").split(\":\"),r=n[1]/n[0];e=void 0!==this.width_?this.width_:void 0!==this.height_?this.height_/r:this.videoWidth()||300,t=void 0!==this.height_?this.height_:e*r,i=/^[^a-zA-Z]/.test(this.id())?\"dimensions-\"+this.id():this.id()+\"-dimensions\",this.addClass(i),Me(this.styleEl_,\"\\n      .\"+i+\" {\\n        width: \"+e+\"px;\\n        height: \"+t+\"px;\\n      }\\n\\n      .\"+i+\".vjs-fluid {\\n        padding-top: \"+100*r+\"%;\\n      }\\n    \")}else{var a=\"number\"==typeof this.width_?this.width_:this.options_.width,s=\"number\"==typeof this.height_?this.height_:this.options_.height,o=this.tech_&&this.tech_.el();o&&(0<=a&&(o.width=a),0<=s&&(o.height=s))}},e.loadTech_=function(e,t){var i=this;this.tech_&&this.unloadTech_();var n=mt(e),r=e.charAt(0).toLowerCase()+e.slice(1);\"Html5\"!==n&&this.tag&&(Ji.getTech(\"Html5\").disposeMediaElement(this.tag),this.tag.player=null,this.tag=null),this.techName_=n,this.isReady_=!1;var a={source:t,autoplay:\"string\"!=typeof this.autoplay()&&this.autoplay(),nativeControlsForTouch:this.options_.nativeControlsForTouch,playerId:this.id(),techId:this.id()+\"_\"+r+\"_api\",playsinline:this.options_.playsinline,preload:this.options_.preload,loop:this.options_.loop,disablePictureInPicture:this.options_.disablePictureInPicture,muted:this.options_.muted,poster:this.poster(),language:this.language(),playerElIngest:this.playerElIngest_||!1,\"vtt.js\":this.options_[\"vtt.js\"],canOverridePoster:!!this.options_.techCanOverridePoster,enableSourceset:this.options_.enableSourceset,Promise:this.options_.Promise};Ti.names.forEach(function(e){var t=Ti[e];a[t.getterName]=i[t.privateName]}),S(a,this.options_[n]),S(a,this.options_[r]),S(a,this.options_[e.toLowerCase()]),this.tag&&(a.tag=this.tag),t&&t.src===this.cache_.src&&0<this.cache_.currentTime&&(a.startTime=this.cache_.currentTime);var s=Ji.getTech(e);if(!s)throw new Error(\"No Tech named '\"+n+\"' exists! '\"+n+\"' should be registered using videojs.registerTech()'\");this.tech_=new s(a),this.tech_.ready($e(this,this.handleTechReady_),!0),Mt(this.textTracksJson_||[],this.tech_),Qr.forEach(function(e){i.on(i.tech_,e,i[\"handleTech\"+mt(e)+\"_\"])}),Object.keys(Yr).forEach(function(t){i.on(i.tech_,t,function(e){0===i.tech_.playbackRate()&&i.tech_.seeking()?i.queuedCallbacks_.push({callback:i[\"handleTech\"+Yr[t]+\"_\"].bind(i),event:e}):i[\"handleTech\"+Yr[t]+\"_\"](e)})}),this.on(this.tech_,\"loadstart\",this.handleTechLoadStart_),this.on(this.tech_,\"sourceset\",this.handleTechSourceset_),this.on(this.tech_,\"waiting\",this.handleTechWaiting_),this.on(this.tech_,\"ended\",this.handleTechEnded_),this.on(this.tech_,\"seeking\",this.handleTechSeeking_),this.on(this.tech_,\"play\",this.handleTechPlay_),this.on(this.tech_,\"firstplay\",this.handleTechFirstPlay_),this.on(this.tech_,\"pause\",this.handleTechPause_),this.on(this.tech_,\"durationchange\",this.handleTechDurationChange_),this.on(this.tech_,\"fullscreenchange\",this.handleTechFullscreenChange_),this.on(this.tech_,\"fullscreenerror\",this.handleTechFullscreenError_),this.on(this.tech_,\"enterpictureinpicture\",this.handleTechEnterPictureInPicture_),this.on(this.tech_,\"leavepictureinpicture\",this.handleTechLeavePictureInPicture_),this.on(this.tech_,\"error\",this.handleTechError_),this.on(this.tech_,\"loadedmetadata\",this.updateStyleEl_),this.on(this.tech_,\"posterchange\",this.handleTechPosterChange_),this.on(this.tech_,\"textdata\",this.handleTechTextData_),this.on(this.tech_,\"ratechange\",this.handleTechRateChange_),this.usingNativeControls(this.techGet_(\"controls\")),this.controls()&&!this.usingNativeControls()&&this.addTechControlsListeners_(),this.tech_.el().parentNode===this.el()||\"Html5\"===n&&this.tag||ae(this.tech_.el(),this.el()),this.tag&&(this.tag.player=null,this.tag=null)},e.unloadTech_=function(){var i=this;Ti.names.forEach(function(e){var t=Ti[e];i[t.privateName]=i[t.getterName]()}),this.textTracksJson_=Rt(this.tech_),this.isReady_=!1,this.tech_.dispose(),this.tech_=!1,this.isPosterFromTech_&&(this.poster_=\"\",this.trigger(\"posterchange\")),this.isPosterFromTech_=!1},e.tech=function(e){return void 0===e&&g.warn(\"Using the tech directly can be dangerous. I hope you know what you're doing.\\nSee https://github.com/videojs/video.js/issues/2617 for more info.\\n\"),this.tech_},e.addTechControlsListeners_=function(){this.removeTechControlsListeners_(),this.on(this.tech_,\"mouseup\",this.handleTechClick_),this.on(this.tech_,\"dblclick\",this.handleTechDoubleClick_),this.on(this.tech_,\"touchstart\",this.handleTechTouchStart_),this.on(this.tech_,\"touchmove\",this.handleTechTouchMove_),this.on(this.tech_,\"touchend\",this.handleTechTouchEnd_),this.on(this.tech_,\"tap\",this.handleTechTap_)},e.removeTechControlsListeners_=function(){this.off(this.tech_,\"tap\",this.handleTechTap_),this.off(this.tech_,\"touchstart\",this.handleTechTouchStart_),this.off(this.tech_,\"touchmove\",this.handleTechTouchMove_),this.off(this.tech_,\"touchend\",this.handleTechTouchEnd_),this.off(this.tech_,\"mouseup\",this.handleTechClick_),this.off(this.tech_,\"dblclick\",this.handleTechDoubleClick_)},e.handleTechReady_=function(){this.triggerReady(),this.cache_.volume&&this.techCall_(\"setVolume\",this.cache_.volume),this.handleTechPosterChange_(),this.handleTechDurationChange_()},e.handleTechLoadStart_=function(){this.removeClass(\"vjs-ended\"),this.removeClass(\"vjs-seeking\"),this.error(null),this.handleTechDurationChange_(),this.paused()?(this.hasStarted(!1),this.trigger(\"loadstart\")):(this.trigger(\"loadstart\"),this.trigger(\"firstplay\")),this.manualAutoplay_(this.autoplay())},e.manualAutoplay_=function(t){var n=this;if(this.tech_&&\"string\"==typeof t){var e,i=function(){var e=n.muted();n.muted(!0);function t(){n.muted(e)}n.playTerminatedQueue_.push(t);var i=n.play();if(Lt(i))return i.catch(t)};if(\"any\"===t&&!0!==this.muted()?Lt(e=this.play())&&(e=e.catch(i)):e=\"muted\"===t&&!0!==this.muted()?i():this.play(),Lt(e))return e.then(function(){n.trigger({type:\"autoplay-success\",autoplay:t})}).catch(function(e){n.trigger({type:\"autoplay-failure\",autoplay:t})})}},e.updateSourceCaches_=function(e){void 0===e&&(e=\"\");var t=e,i=\"\";\"string\"!=typeof t&&(t=e.src,i=e.type),this.cache_.source=this.cache_.source||{},this.cache_.sources=this.cache_.sources||[],t&&!i&&(i=function(e,t){if(!t)return\"\";if(e.cache_.source.src===t&&e.cache_.source.type)return e.cache_.source.type;var i=e.cache_.sources.filter(function(e){return e.src===t});if(i.length)return i[0].type;for(var n=e.$$(\"source\"),r=0;r<n.length;r++){var a=n[r];if(a.type&&a.src&&a.src===t)return a.type}return cn(t)}(this,t)),this.cache_.source=gt({},e,{src:t,type:i});for(var n=this.cache_.sources.filter(function(e){return e.src&&e.src===t}),r=[],a=this.$$(\"source\"),s=[],o=0;o<a.length;o++){var u=de(a[o]);r.push(u),u.src&&u.src===t&&s.push(u.src)}s.length&&!n.length?this.cache_.sources=r:n.length||(this.cache_.sources=[this.cache_.source]),this.cache_.src=t},e.handleTechSourceset_=function(e){var i=this;if(!this.changingSrc_){var t=function(e){return i.updateSourceCaches_(e)},n=this.currentSource().src,r=e.src;n&&!/^blob:/.test(n)&&/^blob:/.test(r)&&(this.lastSource_&&(this.lastSource_.tech===r||this.lastSource_.player===n)||(t=function(){})),t(r),e.src||this.tech_.any([\"sourceset\",\"loadstart\"],function(e){if(\"sourceset\"!==e.type){var t=i.techGet(\"currentSrc\");i.lastSource_.tech=t,i.updateSourceCaches_(t)}})}this.lastSource_={player:this.currentSource().src,tech:e.src},this.trigger({src:e.src,type:\"sourceset\"})},e.hasStarted=function(e){if(void 0===e)return this.hasStarted_;e!==this.hasStarted_&&(this.hasStarted_=e,this.hasStarted_?(this.addClass(\"vjs-has-started\"),this.trigger(\"firstplay\")):this.removeClass(\"vjs-has-started\"))},e.handleTechPlay_=function(){this.removeClass(\"vjs-ended\"),this.removeClass(\"vjs-paused\"),this.addClass(\"vjs-playing\"),this.hasStarted(!0),this.trigger(\"play\")},e.handleTechRateChange_=function(){0<this.tech_.playbackRate()&&0===this.cache_.lastPlaybackRate&&(this.queuedCallbacks_.forEach(function(e){return e.callback(e.event)}),this.queuedCallbacks_=[]),this.cache_.lastPlaybackRate=this.tech_.playbackRate(),this.trigger(\"ratechange\")},e.handleTechWaiting_=function(){var t=this;this.addClass(\"vjs-waiting\"),this.trigger(\"waiting\");var i=this.currentTime();this.on(\"timeupdate\",function e(){i!==t.currentTime()&&(t.removeClass(\"vjs-waiting\"),t.off(\"timeupdate\",e))})},e.handleTechCanPlay_=function(){this.removeClass(\"vjs-waiting\"),this.trigger(\"canplay\")},e.handleTechCanPlayThrough_=function(){this.removeClass(\"vjs-waiting\"),this.trigger(\"canplaythrough\")},e.handleTechPlaying_=function(){this.removeClass(\"vjs-waiting\"),this.trigger(\"playing\")},e.handleTechSeeking_=function(){this.addClass(\"vjs-seeking\"),this.trigger(\"seeking\")},e.handleTechSeeked_=function(){this.removeClass(\"vjs-seeking\"),this.removeClass(\"vjs-ended\"),this.trigger(\"seeked\")},e.handleTechFirstPlay_=function(){this.options_.starttime&&(g.warn(\"Passing the `starttime` option to the player will be deprecated in 6.0\"),this.currentTime(this.options_.starttime)),this.addClass(\"vjs-has-started\"),this.trigger(\"firstplay\")},e.handleTechPause_=function(){this.removeClass(\"vjs-playing\"),this.addClass(\"vjs-paused\"),this.trigger(\"pause\")},e.handleTechEnded_=function(){this.addClass(\"vjs-ended\"),this.options_.loop?(this.currentTime(0),this.play()):this.paused()||this.pause(),this.trigger(\"ended\")},e.handleTechDurationChange_=function(){this.duration(this.techGet_(\"duration\"))},e.handleTechClick_=function(e){Ee(e)&&this.controls_&&(this.paused()?Ot(this.play()):this.pause())},e.handleTechDoubleClick_=function(t){this.controls_&&(Array.prototype.some.call(this.$$(\".vjs-control-bar, .vjs-modal-dialog\"),function(e){return e.contains(t.target)})||void 0!==this.options_&&void 0!==this.options_.userActions&&void 0!==this.options_.userActions.doubleClick&&!1===this.options_.userActions.doubleClick||(void 0!==this.options_&&void 0!==this.options_.userActions&&\"function\"==typeof this.options_.userActions.doubleClick?this.options_.userActions.doubleClick.call(this,t):this.isFullscreen()?this.exitFullscreen():this.requestFullscreen()))},e.handleTechTap_=function(){this.userActive(!this.userActive())},e.handleTechTouchStart_=function(){this.userWasActive=this.userActive()},e.handleTechTouchMove_=function(){this.userWasActive&&this.reportUserActivity()},e.handleTechTouchEnd_=function(e){e.cancelable&&e.preventDefault()},e.handleStageClick_=function(){this.reportUserActivity()},e.toggleFullscreenClass_=function(){this.isFullscreen()?this.addClass(\"vjs-fullscreen\"):this.removeClass(\"vjs-fullscreen\")},e.documentFullscreenChange_=function(e){var t=e.target.player;if(!t||t===this){var i=this.el(),n=p[this.fsApi_.fullscreenElement]===i;!n&&i.matches?n=i.matches(\":\"+this.fsApi_.fullscreen):!n&&i.msMatchesSelector&&(n=i.msMatchesSelector(\":\"+this.fsApi_.fullscreen)),this.isFullscreen(n)}},e.handleTechFullscreenChange_=function(e,t){t&&(t.nativeIOSFullscreen&&this.toggleClass(\"vjs-ios-native-fs\"),this.isFullscreen(t.isFullscreen))},e.handleTechFullscreenError_=function(e,t){this.trigger(\"fullscreenerror\",t)},e.togglePictureInPictureClass_=function(){this.isInPictureInPicture()?this.addClass(\"vjs-picture-in-picture\"):this.removeClass(\"vjs-picture-in-picture\")},e.handleTechEnterPictureInPicture_=function(e){this.isInPictureInPicture(!0)},e.handleTechLeavePictureInPicture_=function(e){this.isInPictureInPicture(!1)},e.handleTechError_=function(){var e=this.tech_.error();this.error(e)},e.handleTechTextData_=function(e,t){var i=null;1<arguments.length&&(i=t),this.trigger(\"textdata\",i)},e.getCache=function(){return this.cache_},e.resetCache_=function(){this.cache_={currentTime:0,initTime:0,inactivityTimeout:this.options_.inactivityTimeout,duration:NaN,lastVolume:1,lastPlaybackRate:this.defaultPlaybackRate(),media:null,src:\"\",source:{},sources:[],volume:1}},e.techCall_=function(e,t){this.ready(function(){if(e in sn)return function(e,t,i,n){return t[i](e.reduce(un(i),n))}(this.middleware_,this.tech_,e,t);if(e in on)return rn(this.middleware_,this.tech_,e,t);try{this.tech_&&this.tech_[e](t)}catch(e){throw g(e),e}},!0)},e.techGet_=function(t){if(this.tech_&&this.tech_.isReady_){if(t in an)return function(e,t,i){return e.reduceRight(un(i),t[i]())}(this.middleware_,this.tech_,t);if(t in on)return rn(this.middleware_,this.tech_,t);try{return this.tech_[t]()}catch(e){if(void 0===this.tech_[t])throw g(\"Video.js: \"+t+\" method not defined for \"+this.techName_+\" playback technology.\",e),e;if(\"TypeError\"===e.name)throw g(\"Video.js: \"+t+\" unavailable on \"+this.techName_+\" playback technology element.\",e),this.tech_.isReady_=!1,e;throw g(e),e}}},e.play=function(){var t=this,e=this.options_.Promise||h.Promise;return e?new e(function(e){t.play_(e)}):this.play_()},e.play_=function(e){var t=this;void 0===e&&(e=Ot),this.playCallbacks_.push(e);var i=Boolean(!this.changingSrc_&&(this.src()||this.currentSrc()));if(this.waitToPlay_&&(this.off([\"ready\",\"loadstart\"],this.waitToPlay_),this.waitToPlay_=null),!this.isReady_||!i)return this.waitToPlay_=function(e){t.play_()},this.one([\"ready\",\"loadstart\"],this.waitToPlay_),void(i||!Q&&!K||this.load());var n=this.techGet_(\"play\");null===n?this.runPlayTerminatedQueue_():this.runPlayCallbacks_(n)},e.runPlayTerminatedQueue_=function(){var e=this.playTerminatedQueue_.slice(0);this.playTerminatedQueue_=[],e.forEach(function(e){e()})},e.runPlayCallbacks_=function(t){var e=this.playCallbacks_.slice(0);this.playCallbacks_=[],this.playTerminatedQueue_=[],e.forEach(function(e){e(t)})},e.pause=function(){this.techCall_(\"pause\")},e.paused=function(){return!1!==this.techGet_(\"paused\")},e.played=function(){return this.techGet_(\"played\")||Ct(0,0)},e.scrubbing=function(e){if(\"undefined\"==typeof e)return this.scrubbing_;this.scrubbing_=!!e,this.techCall_(\"setScrubbing\",this.scrubbing_),e?this.addClass(\"vjs-scrubbing\"):this.removeClass(\"vjs-scrubbing\")},e.currentTime=function(e){return\"undefined\"!=typeof e?(e<0&&(e=0),this.isReady_&&!this.changingSrc_&&this.tech_&&this.tech_.isReady_?(this.techCall_(\"setCurrentTime\",e),void(this.cache_.initTime=0)):(this.cache_.initTime=e,this.off(\"canplay\",this.applyInitTime_),void this.one(\"canplay\",this.applyInitTime_))):(this.cache_.currentTime=this.techGet_(\"currentTime\")||0,this.cache_.currentTime)},e.applyInitTime_=function(){this.currentTime(this.cache_.initTime)},e.duration=function(e){if(void 0===e)return void 0!==this.cache_.duration?this.cache_.duration:NaN;(e=parseFloat(e))<0&&(e=1/0),e!==this.cache_.duration&&((this.cache_.duration=e)===1/0?this.addClass(\"vjs-live\"):this.removeClass(\"vjs-live\"),isNaN(e)||this.trigger(\"durationchange\"))},e.remainingTime=function(){return this.duration()-this.currentTime()},e.remainingTimeDisplay=function(){return Math.floor(this.duration())-Math.floor(this.currentTime())},e.buffered=function(){var e=this.techGet_(\"buffered\");return e&&e.length||(e=Ct(0,0)),e},e.bufferedPercent=function(){return It(this.buffered(),this.duration())},e.bufferedEnd=function(){var e=this.buffered(),t=this.duration(),i=e.end(e.length-1);return t<i&&(i=t),i},e.volume=function(e){var t;return void 0!==e?(t=Math.max(0,Math.min(1,parseFloat(e))),this.cache_.volume=t,this.techCall_(\"setVolume\",t),void(0<t&&this.lastVolume_(t))):(t=parseFloat(this.techGet_(\"volume\")),isNaN(t)?1:t)},e.muted=function(e){if(void 0===e)return this.techGet_(\"muted\")||!1;this.techCall_(\"setMuted\",e)},e.defaultMuted=function(e){return void 0!==e?this.techCall_(\"setDefaultMuted\",e):this.techGet_(\"defaultMuted\")||!1},e.lastVolume_=function(e){if(void 0===e||0===e)return this.cache_.lastVolume;this.cache_.lastVolume=e},e.supportsFullScreen=function(){return this.techGet_(\"supportsFullScreen\")||!1},e.isFullscreen=function(e){if(void 0===e)return this.isFullscreen_;var t=this.isFullscreen_;return this.isFullscreen_=Boolean(e),this.isFullscreen_!==t&&this.fsApi_.prefixed&&this.trigger(\"fullscreenchange\"),void this.toggleFullscreenClass_()},e.requestFullscreen=function(s){var e=this.options_.Promise||h.Promise;if(e){var o=this;return new e(function(e,i){function n(){o.off(\"fullscreenerror\",r),o.off(\"fullscreenchange\",t)}function t(){n(),e()}function r(e,t){n(),i(t)}o.one(\"fullscreenchange\",t),o.one(\"fullscreenerror\",r);var a=o.requestFullscreenHelper_(s);if(a)return a.then(n,n),a})}return this.requestFullscreenHelper_()},e.requestFullscreenHelper_=function(e){var t,i=this;if(this.fsApi_.prefixed||(t=this.options_.fullscreen&&this.options_.fullscreen.options||{},void 0!==e&&(t=e)),this.fsApi_.requestFullscreen){var n=this.el_[this.fsApi_.requestFullscreen](t);return n&&n.then(function(){return i.isFullscreen(!0)},function(){return i.isFullscreen(!1)}),n}this.tech_.supportsFullScreen()?this.techCall_(\"enterFullScreen\"):this.enterFullWindow()},e.exitFullscreen=function(){var e=this.options_.Promise||h.Promise;if(e){var s=this;return new e(function(e,i){function n(){s.off(\"fullscreenerror\",r),s.off(\"fullscreenchange\",t)}function t(){n(),e()}function r(e,t){n(),i(t)}s.one(\"fullscreenchange\",t),s.one(\"fullscreenerror\",r);var a=s.exitFullscreenHelper_();if(a)return a.then(n,n),a})}return this.exitFullscreenHelper_()},e.exitFullscreenHelper_=function(){var e=this;if(this.fsApi_.requestFullscreen){var t=p[this.fsApi_.exitFullscreen]();return t&&t.then(function(){return e.isFullscreen(!1)}),t}this.tech_.supportsFullScreen()?this.techCall_(\"exitFullScreen\"):this.exitFullWindow()},e.enterFullWindow=function(){this.isFullscreen(!0),this.isFullWindow=!0,this.docOrigOverflow=p.documentElement.style.overflow,Ge(p,\"keydown\",this.boundFullWindowOnEscKey_),p.documentElement.style.overflow=\"hidden\",oe(p.body,\"vjs-full-window\"),this.trigger(\"enterFullWindow\")},e.fullWindowOnEscKey=function(e){Nt.isEventKey(e,\"Esc\")&&(!0===this.isFullscreen()?this.exitFullscreen():this.exitFullWindow())},e.exitFullWindow=function(){this.isFullscreen(!1),this.isFullWindow=!1,Xe(p,\"keydown\",this.boundFullWindowOnEscKey_),p.documentElement.style.overflow=this.docOrigOverflow,ue(p.body,\"vjs-full-window\"),this.trigger(\"exitFullWindow\")},e.disablePictureInPicture=function(e){if(void 0===e)return this.techGet_(\"disablePictureInPicture\");this.techCall_(\"setDisablePictureInPicture\",e),this.options_.disablePictureInPicture=e,this.trigger(\"disablepictureinpicturechanged\")},e.isInPictureInPicture=function(e){return void 0!==e?(this.isInPictureInPicture_=!!e,void this.togglePictureInPictureClass_()):!!this.isInPictureInPicture_},e.requestPictureInPicture=function(){if(\"pictureInPictureEnabled\"in p&&!1===this.disablePictureInPicture())return this.techGet_(\"requestPictureInPicture\")},e.exitPictureInPicture=function(){if(\"pictureInPictureEnabled\"in p)return p.exitPictureInPicture()},e.handleKeyDown=function(e){var t=this.options_.userActions;if(t&&t.hotkeys){!function(e){var t=e.tagName.toLowerCase();if(e.isContentEditable)return!0;if(\"input\"===t)return-1===[\"button\",\"checkbox\",\"hidden\",\"radio\",\"reset\",\"submit\"].indexOf(e.type);return-1!==[\"textarea\"].indexOf(t)}(this.el_.ownerDocument.activeElement)&&(\"function\"==typeof t.hotkeys?t.hotkeys.call(this,e):this.handleHotkeys(e))}},e.handleHotkeys=function(e){var t=this.options_.userActions?this.options_.userActions.hotkeys:{},i=t.fullscreenKey,n=void 0===i?function(e){return Nt.isEventKey(e,\"f\")}:i,r=t.muteKey,a=void 0===r?function(e){return Nt.isEventKey(e,\"m\")}:r,s=t.playPauseKey,o=void 0===s?function(e){return Nt.isEventKey(e,\"k\")||Nt.isEventKey(e,\"Space\")}:s;if(n.call(this,e)){e.preventDefault(),e.stopPropagation();var u=Tt.getComponent(\"FullscreenToggle\");!1!==p[this.fsApi_.fullscreenEnabled]&&u.prototype.handleClick.call(this,e)}else if(a.call(this,e)){e.preventDefault(),e.stopPropagation(),Tt.getComponent(\"MuteToggle\").prototype.handleClick.call(this,e)}else if(o.call(this,e)){e.preventDefault(),e.stopPropagation(),Tt.getComponent(\"PlayToggle\").prototype.handleClick.call(this,e)}},e.canPlayType=function(e){for(var t,i=0,n=this.options_.techOrder;i<n.length;i++){var r=n[i],a=Ji.getTech(r);if(a=a||Tt.getComponent(r)){if(a.isSupported()&&(t=a.canPlayType(e)))return t}else g.error('The \"'+r+'\" tech is undefined. Skipped browser support check for that tech.')}return\"\"},e.selectSource=function(e){function t(e,i,n){var r;return e.some(function(t){return i.some(function(e){if(r=n(t,e))return!0})}),r}function i(e,t){var i=e[0];if(e[1].canPlaySource(t,r.options_[i.toLowerCase()]))return{source:t,tech:i}}var n,r=this,a=this.options_.techOrder.map(function(e){return[e,Ji.getTech(e)]}).filter(function(e){var t=e[0],i=e[1];return i?i.isSupported():(g.error('The \"'+t+'\" tech is undefined. Skipped browser support check for that tech.'),!1)});return(this.options_.sourceOrder?t(e,a,(n=i,function(e,t){return n(t,e)})):t(a,e,i))||!1},e.src=function(e){var i=this;if(\"undefined\"==typeof e)return this.cache_.src||\"\";var n=function t(e){if(Array.isArray(e)){var i=[];e.forEach(function(e){e=t(e),Array.isArray(e)?i=i.concat(e):k(e)&&i.push(e)}),e=i}else e=\"string\"==typeof e&&e.trim()?[hn({src:e})]:k(e)&&\"string\"==typeof e.src&&e.src&&e.src.trim()?[hn(e)]:[];return e}(e);n.length?(this.changingSrc_=!0,this.cache_.sources=n,this.updateSourceCaches_(n[0]),nn(this,n[0],function(e,t){if(i.middleware_=t,i.cache_.sources=n,i.updateSourceCaches_(e),i.src_(e))return 1<n.length?i.src(n.slice(1)):(i.changingSrc_=!1,i.setTimeout(function(){this.error({code:4,message:this.localize(this.options_.notSupportedMessage)})},0),void i.triggerReady());!function(e,t){e.forEach(function(e){return e.setTech&&e.setTech(t)})}(t,i.tech_)})):this.setTimeout(function(){this.error({code:4,message:this.localize(this.options_.notSupportedMessage)})},0)},e.src_=function(e){var t=this,i=this.selectSource([e]);return!i||(function(e,t){return mt(e)===mt(t)}(i.tech,this.techName_)?this.ready(function(){this.tech_.constructor.prototype.hasOwnProperty(\"setSource\")?this.techCall_(\"setSource\",e):this.techCall_(\"src\",e.src),this.changingSrc_=!1},!0):(this.changingSrc_=!0,this.loadTech_(i.tech,i.source),this.tech_.ready(function(){t.changingSrc_=!1})),!1)},e.load=function(){this.techCall_(\"load\")},e.reset=function(){var e=this,t=this.options_.Promise||h.Promise;this.paused()||!t?this.doReset_():Ot(this.play().then(function(){return e.doReset_()}))},e.doReset_=function(){this.tech_&&this.tech_.clearTracks(\"text\"),this.resetCache_(),this.poster(\"\"),this.loadTech_(this.options_.techOrder[0],null),this.techCall_(\"reset\"),this.resetControlBarUI_(),lt(this)&&this.trigger(\"playerreset\")},e.resetControlBarUI_=function(){this.resetProgressBar_(),this.resetPlaybackRate_(),this.resetVolumeBar_()},e.resetProgressBar_=function(){this.currentTime(0);var e=this.controlBar,t=e.durationDisplay,i=e.remainingTimeDisplay;t&&t.updateContent(),i&&i.updateContent()},e.resetPlaybackRate_=function(){this.playbackRate(this.defaultPlaybackRate()),this.handleTechRateChange_()},e.resetVolumeBar_=function(){this.volume(1),this.trigger(\"volumechange\")},e.currentSources=function(){var e=this.currentSource(),t=[];return 0!==Object.keys(e).length&&t.push(e),this.cache_.sources||t},e.currentSource=function(){return this.cache_.source||{}},e.currentSrc=function(){return this.currentSource()&&this.currentSource().src||\"\"},e.currentType=function(){return this.currentSource()&&this.currentSource().type||\"\"},e.preload=function(e){return void 0!==e?(this.techCall_(\"setPreload\",e),void(this.options_.preload=e)):this.techGet_(\"preload\")},e.autoplay=function(e){if(void 0===e)return this.options_.autoplay||!1;var t;\"string\"==typeof e&&/(any|play|muted)/.test(e)?(this.options_.autoplay=e,this.manualAutoplay_(e),t=!1):this.options_.autoplay=!!e,t=\"undefined\"==typeof t?this.options_.autoplay:t,this.tech_&&this.techCall_(\"setAutoplay\",t)},e.playsinline=function(e){return void 0!==e?(this.techCall_(\"setPlaysinline\",e),this.options_.playsinline=e,this):this.techGet_(\"playsinline\")},e.loop=function(e){return void 0!==e?(this.techCall_(\"setLoop\",e),void(this.options_.loop=e)):this.techGet_(\"loop\")},e.poster=function(e){if(void 0===e)return this.poster_;(e=e||\"\")!==this.poster_&&(this.poster_=e,this.techCall_(\"setPoster\",e),this.isPosterFromTech_=!1,this.trigger(\"posterchange\"))},e.handleTechPosterChange_=function(){if((!this.poster_||this.options_.techCanOverridePoster)&&this.tech_&&this.tech_.poster){var e=this.tech_.poster()||\"\";e!==this.poster_&&(this.poster_=e,this.isPosterFromTech_=!0,this.trigger(\"posterchange\"))}},e.controls=function(e){if(void 0===e)return!!this.controls_;e=!!e,this.controls_!==e&&(this.controls_=e,this.usingNativeControls()&&this.techCall_(\"setControls\",e),this.controls_?(this.removeClass(\"vjs-controls-disabled\"),this.addClass(\"vjs-controls-enabled\"),this.trigger(\"controlsenabled\"),this.usingNativeControls()||this.addTechControlsListeners_()):(this.removeClass(\"vjs-controls-enabled\"),this.addClass(\"vjs-controls-disabled\"),this.trigger(\"controlsdisabled\"),this.usingNativeControls()||this.removeTechControlsListeners_()))},e.usingNativeControls=function(e){if(void 0===e)return!!this.usingNativeControls_;e=!!e,this.usingNativeControls_!==e&&(this.usingNativeControls_=e,this.usingNativeControls_?(this.addClass(\"vjs-using-native-controls\"),this.trigger(\"usingnativecontrols\")):(this.removeClass(\"vjs-using-native-controls\"),this.trigger(\"usingcustomcontrols\")))},e.error=function(e){if(void 0===e)return this.error_||null;if(this.options_.suppressNotSupportedError&&e&&4===e.code){var t=function(){this.error(e)};return this.options_.suppressNotSupportedError=!1,this.any([\"click\",\"touchstart\"],t),void this.one(\"loadstart\",function(){this.off([\"click\",\"touchstart\"],t)})}if(null===e)return this.error_=e,this.removeClass(\"vjs-error\"),void(this.errorDisplay&&this.errorDisplay.close());this.error_=new xt(e),this.addClass(\"vjs-error\"),g.error(\"(CODE:\"+this.error_.code+\" \"+xt.errorTypes[this.error_.code]+\")\",this.error_.message,this.error_),this.trigger(\"error\")},e.reportUserActivity=function(e){this.userActivity_=!0},e.userActive=function(e){if(void 0===e)return this.userActive_;if((e=!!e)!==this.userActive_){if(this.userActive_=e,this.userActive_)return this.userActivity_=!0,this.removeClass(\"vjs-user-inactive\"),this.addClass(\"vjs-user-active\"),void this.trigger(\"useractive\");this.tech_&&this.tech_.one(\"mousemove\",function(e){e.stopPropagation(),e.preventDefault()}),this.userActivity_=!1,this.removeClass(\"vjs-user-active\"),this.addClass(\"vjs-user-inactive\"),this.trigger(\"userinactive\")}},e.listenForUserActivity_=function(){function e(e){r(),this.clearInterval(t)}var t,i,n,r=$e(this,this.reportUserActivity);this.on(\"mousedown\",function(){r(),this.clearInterval(t),t=this.setInterval(r,250)}),this.on(\"mousemove\",function(e){e.screenX===i&&e.screenY===n||(i=e.screenX,n=e.screenY,r())}),this.on(\"mouseup\",e),this.on(\"mouseleave\",e);var a,s=this.getChild(\"controlBar\");!s||K||M||(s.on(\"mouseenter\",function(e){this.player().cache_.inactivityTimeout=this.player().options_.inactivityTimeout,this.player().options_.inactivityTimeout=0}),s.on(\"mouseleave\",function(e){this.player().options_.inactivityTimeout=this.player().cache_.inactivityTimeout})),this.on(\"keydown\",r),this.on(\"keyup\",r),this.setInterval(function(){if(this.userActivity_){this.userActivity_=!1,this.userActive(!0),this.clearTimeout(a);var e=this.options_.inactivityTimeout;e<=0||(a=this.setTimeout(function(){this.userActivity_||this.userActive(!1)},e))}},250)},e.playbackRate=function(e){if(void 0===e)return this.tech_&&this.tech_.featuresPlaybackRate?this.cache_.lastPlaybackRate||this.techGet_(\"playbackRate\"):1;this.techCall_(\"setPlaybackRate\",e)},e.defaultPlaybackRate=function(e){return void 0!==e?this.techCall_(\"setDefaultPlaybackRate\",e):this.tech_&&this.tech_.featuresPlaybackRate?this.techGet_(\"defaultPlaybackRate\"):1},e.isAudio=function(e){if(void 0===e)return!!this.isAudio_;this.isAudio_=!!e},e.addTextTrack=function(e,t,i){if(this.tech_)return this.tech_.addTextTrack(e,t,i)},e.addRemoteTextTrack=function(e,t){if(this.tech_)return this.tech_.addRemoteTextTrack(e,t)},e.removeRemoteTextTrack=function(e){void 0===e&&(e={});var t=e.track;if(t=t||e,this.tech_)return this.tech_.removeRemoteTextTrack(t)},e.getVideoPlaybackQuality=function(){return this.techGet_(\"getVideoPlaybackQuality\")},e.videoWidth=function(){return this.tech_&&this.tech_.videoWidth&&this.tech_.videoWidth()||0},e.videoHeight=function(){return this.tech_&&this.tech_.videoHeight&&this.tech_.videoHeight()||0},e.language=function(e){if(void 0===e)return this.language_;this.language_!==String(e).toLowerCase()&&(this.language_=String(e).toLowerCase(),lt(this)&&this.trigger(\"languagechange\"))},e.languages=function(){return gt(l.prototype.options_.languages,this.languages_)},e.toJSON=function(){var e=gt(this.options_),t=e.tracks;e.tracks=[];for(var i=0;i<t.length;i++){var n=t[i];(n=gt(n)).player=void 0,e.tracks[i]=n}return e},e.createModal=function(e,t){var i=this;(t=t||{}).content=e||\"\";var n=new Bt(this,t);return this.addChild(n),n.on(\"dispose\",function(){i.removeChild(n)}),n.open(),n},e.updateCurrentBreakpoint_=function(){if(this.responsive())for(var e=this.currentBreakpoint(),t=this.currentWidth(),i=0;i<$r.length;i++){var n=$r[i];if(t<=this.breakpoints_[n]){if(e===n)return;e&&this.removeClass(Jr[e]),this.addClass(Jr[n]),this.breakpoint_=n;break}}},e.removeCurrentBreakpoint_=function(){var e=this.currentBreakpointClass();this.breakpoint_=\"\",e&&this.removeClass(e)},e.breakpoints=function(e){return void 0===e||(this.breakpoint_=\"\",this.breakpoints_=S({},Zr,e),this.updateCurrentBreakpoint_()),S(this.breakpoints_)},e.responsive=function(e){return void 0===e?this.responsive_:(e=Boolean(e))!==this.responsive_?((this.responsive_=e)?(this.on(\"playerresize\",this.updateCurrentBreakpoint_),this.updateCurrentBreakpoint_()):(this.off(\"playerresize\",this.updateCurrentBreakpoint_),this.removeCurrentBreakpoint_()),e):void 0},e.currentBreakpoint=function(){return this.breakpoint_},e.currentBreakpointClass=function(){return Jr[this.breakpoint_]||\"\"},e.loadMedia=function(e,t){var i=this;if(e&&\"object\"==typeof e){this.reset(),this.cache_.media=gt(e);var n=this.cache_.media,r=n.artwork,a=n.poster,s=n.src,o=n.textTracks;!r&&a&&(this.cache_.media.artwork=[{src:a,type:cn(a)}]),s&&this.src(s),a&&this.poster(a),Array.isArray(o)&&o.forEach(function(e){return i.addRemoteTextTrack(e,!1)}),this.ready(t)}},e.getMedia=function(){if(this.cache_.media)return gt(this.cache_.media);var e=this.poster(),t={src:this.currentSources(),textTracks:Array.prototype.map.call(this.remoteTextTracks(),function(e){return{kind:e.kind,label:e.label,language:e.language,src:e.src}})};return e&&(t.poster=e,t.artwork=[{src:t.poster,type:cn(t.poster)}]),t},l.getTagSettings=function(e){var t={sources:[],tracks:[]},i=de(e),n=i[\"data-setup\"];if(se(e,\"vjs-fill\")&&(i.fill=!0),se(e,\"vjs-fluid\")&&(i.fluid=!0),null!==n){var r=Pt(n||\"{}\"),a=r[0],s=r[1];a&&g.error(a),S(i,s)}if(S(t,i),e.hasChildNodes())for(var o=e.childNodes,u=0,l=o.length;u<l;u++){var c=o[u],d=c.nodeName.toLowerCase();\"source\"===d?t.sources.push(de(c)):\"track\"===d&&t.tracks.push(de(c))}return t},e.flexNotSupported_=function(){var e=p.createElement(\"i\");return!(\"flexBasis\"in e.style||\"webkitFlexBasis\"in e.style||\"mozFlexBasis\"in e.style||\"msFlexBasis\"in e.style||\"msFlexOrder\"in e.style)},e.debug=function(e){if(void 0===e)return this.debugEnabled_;e?(this.trigger(\"debugon\"),this.previousLogLevel_=this.log.level,this.log.level(\"debug\"),this.debugEnabled_=!0):(this.trigger(\"debugoff\"),this.log.level(this.previousLogLevel_),this.previousLogLevel_=void 0,this.debugEnabled_=!1)},l}(Tt);Ti.names.forEach(function(e){var t=Ti[e];ea.prototype[t.getterName]=function(){return this.tech_?this.tech_[t.getterName]():(this[t.privateName]=this[t.privateName]||new t.ListClass,this[t.privateName])}}),ea.prototype.crossorigin=ea.prototype.crossOrigin,ea.players={};var ta=h.navigator;ea.prototype.options_={techOrder:Ji.defaultTechOrder_,html5:{},inactivityTimeout:2e3,playbackRates:[],liveui:!1,children:[\"mediaLoader\",\"posterImage\",\"textTrackDisplay\",\"loadingSpinner\",\"bigPlayButton\",\"liveTracker\",\"controlBar\",\"errorDisplay\",\"textTrackSettings\",\"resizeManager\"],language:ta&&(ta.languages&&ta.languages[0]||ta.userLanguage||ta.language)||\"en\",languages:{},notSupportedMessage:\"No compatible source was found for this media.\",fullscreen:{options:{navigationUI:\"hide\"}},breakpoints:{},responsive:!1},[\"ended\",\"seeking\",\"seekable\",\"networkState\",\"readyState\"].forEach(function(e){ea.prototype[e]=function(){return this.techGet_(e)}}),Qr.forEach(function(e){ea.prototype[\"handleTech\"+mt(e)+\"_\"]=function(){return this.trigger(e)}}),Tt.registerComponent(\"Player\",ea);var ia=i(function(i){function n(e,t){return i.exports=n=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},n(e,t)}i.exports=n});function na(e){return ha.hasOwnProperty(e)}function ra(e){return na(e)?ha[e]:void 0}function aa(e,t){e[da]=e[da]||{},e[da][t]=!0}function sa(e,t,i){var n=(i?\"before\":\"\")+\"pluginsetup\";e.trigger(n,t),e.trigger(n+\":\"+t.name,t)}function oa(r,a){return a.prototype.name=r,function(){sa(this,{name:r,plugin:a,instance:null},!0);for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];var n=la(a,[this].concat(t));return this[r]=function(){return n},sa(this,n.getEventHash()),n}}var ua=function(){if(\"undefined\"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(\"function\"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(e){return!1}},la=i(function(n){function r(e,t,i){return ua()?n.exports=r=Reflect.construct:n.exports=r=function(e,t,i){var n=[null];n.push.apply(n,t);var r=new(Function.bind.apply(e,n));return i&&ia(r,i.prototype),r},r.apply(null,arguments)}n.exports=r}),ca=\"plugin\",da=\"activePlugins_\",ha={},pa=function(){function i(e){if(this.constructor===i)throw new Error(\"Plugin must be sub-classed; not directly instantiated.\");this.player=e,this.log||(this.log=this.player.log.createLogger(this.name)),dt(this),delete this.trigger,pt(this,this.constructor.defaultState),aa(e,this.name),this.dispose=$e(this,this.dispose),e.on(\"dispose\",this.dispose)}var e=i.prototype;return e.version=function(){return this.constructor.VERSION},e.getEventHash=function(e){return void 0===e&&(e={}),e.name=this.name,e.plugin=this.constructor,e.instance=this,e},e.trigger=function(e,t){return void 0===t&&(t={}),Ke(this.eventBusEl_,e,this.getEventHash(t))},e.handleStateChanged=function(e){},e.dispose=function(){var e=this.name,t=this.player;this.trigger(\"dispose\"),this.off(),t.off(\"dispose\",this.dispose),t[da][e]=!1,this.player=this.state=null,t[e]=oa(e,ha[e])},i.isBasic=function(e){var t=\"string\"==typeof e?ra(e):e;return\"function\"==typeof t&&!i.prototype.isPrototypeOf(t.prototype)},i.registerPlugin=function(e,t){if(\"string\"!=typeof e)throw new Error('Illegal plugin name, \"'+e+'\", must be a string, was '+typeof e+\".\");if(na(e))g.warn('A plugin named \"'+e+'\" already exists. You may want to avoid re-registering plugins!');else if(ea.prototype.hasOwnProperty(e))throw new Error('Illegal plugin name, \"'+e+'\", cannot share a name with an existing player method!');if(\"function\"!=typeof t)throw new Error('Illegal plugin for \"'+e+'\", must be a function, was '+typeof t+\".\");return ha[e]=t,e!==ca&&(i.isBasic(t)?ea.prototype[e]=function(t,i){function n(){sa(this,{name:t,plugin:i,instance:null},!0);var e=i.apply(this,arguments);return aa(this,t),sa(this,{name:t,plugin:i,instance:e}),e}return Object.keys(i).forEach(function(e){n[e]=i[e]}),n}(e,t):ea.prototype[e]=oa(e,t)),t},i.deregisterPlugin=function(e){if(e===ca)throw new Error(\"Cannot de-register base plugin.\");na(e)&&(delete ha[e],delete ea.prototype[e])},i.getPlugins=function(e){var i;return void 0===e&&(e=Object.keys(ha)),e.forEach(function(e){var t=ra(e);t&&((i=i||{})[e]=t)}),i},i.getPluginVersion=function(e){var t=ra(e);return t&&t.VERSION||\"\"},i}();pa.getPlugin=ra,pa.BASE_PLUGIN_NAME=ca,pa.registerPlugin(ca,pa),ea.prototype.usingPlugin=function(e){return!!this[da]&&!0===this[da][e]},ea.prototype.hasPlugin=function(e){return!!na(e)};var fa=function(e,t){if(\"function\"!=typeof t&&null!==t)throw new TypeError(\"Super expression must either be null or a function\");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&ia(e,t)},ma=function(e){return 0===e.indexOf(\"#\")?e.slice(1):e};function ga(e,i,t){var n=ga.getPlayer(e);if(n)return i&&g.warn('Player \"'+e+'\" is already initialised. Options will not be applied.'),t&&n.ready(t),n;var r=\"string\"==typeof e?Ie(\"#\"+ma(e)):e;if(!ee(r))throw new TypeError(\"The element or ID supplied is not valid. (videojs)\");r.ownerDocument.defaultView&&r.ownerDocument.body.contains(r)||g.warn(\"The element supplied is not included in the DOM\"),i=i||{},ga.hooks(\"beforesetup\").forEach(function(e){var t=e(r,gt(i));k(t)&&!Array.isArray(t)?i=gt(i,t):g.error(\"please return an object in beforesetup hooks\")});var a=Tt.getComponent(\"Player\");return n=new a(r,i,t),ga.hooks(\"setup\").forEach(function(e){return e(n)}),n}if(ga.hooks_={},ga.hooks=function(e,t){return ga.hooks_[e]=ga.hooks_[e]||[],t&&(ga.hooks_[e]=ga.hooks_[e].concat(t)),ga.hooks_[e]},ga.hook=function(e,t){ga.hooks(e,t)},ga.hookOnce=function(i,e){ga.hooks(i,[].concat(e).map(function(t){return function e(){return ga.removeHook(i,e),t.apply(void 0,arguments)}}))},ga.removeHook=function(e,t){var i=ga.hooks(e).indexOf(t);return!(i<=-1)&&(ga.hooks_[e]=ga.hooks_[e].slice(),ga.hooks_[e].splice(i,1),!0)},!0!==h.VIDEOJS_NO_DYNAMIC_STYLE&&Z()){var va=Ie(\".vjs-styles-defaults\");if(!va){va=Re(\"vjs-styles-defaults\");var ya=Ie(\"head\");ya&&ya.insertBefore(va,ya.firstChild),Me(va,\"\\n      .video-js {\\n        width: 300px;\\n        height: 150px;\\n      }\\n\\n      .vjs-fluid {\\n        padding-top: 56.25%\\n      }\\n    \")}}Oe(1,ga),ga.VERSION=d,ga.options=ea.prototype.options_,ga.getPlayers=function(){return ea.players},ga.getPlayer=function(e){var t,i=ea.players;if(\"string\"==typeof e){var n=ma(e),r=i[n];if(r)return r;t=Ie(\"#\"+n)}else t=e;if(ee(t)){var a=t,s=a.player,o=a.playerId;if(s||i[o])return s||i[o]}},ga.getAllPlayers=function(){return Object.keys(ea.players).map(function(e){return ea.players[e]}).filter(Boolean)},ga.players=ea.players,ga.getComponent=Tt.getComponent,ga.registerComponent=function(e,t){Ji.isTech(t)&&g.warn(\"The \"+e+\" tech was registered as a component. It should instead be registered using videojs.registerTech(name, tech)\"),Tt.registerComponent.call(Tt,e,t)},ga.getTech=Ji.getTech,ga.registerTech=Ji.registerTech,ga.use=function(e,t){Zi[e]=Zi[e]||[],Zi[e].push(t)},Object.defineProperty(ga,\"middleware\",{value:{},writeable:!1,enumerable:!0}),Object.defineProperty(ga.middleware,\"TERMINATOR\",{value:tn,writeable:!1,enumerable:!0}),ga.browser=Y,ga.TOUCH_ENABLED=z,ga.extend=function(e,t){void 0===t&&(t={});var i=function(){e.apply(this,arguments)},n={};for(var r in\"object\"==typeof t?(t.constructor!==Object.prototype.constructor&&(i=t.constructor),n=t):\"function\"==typeof t&&(i=t),fa(i,e),e&&(i.super_=e),n)n.hasOwnProperty(r)&&(i.prototype[r]=n[r]);return i},ga.mergeOptions=gt,ga.bind=$e,ga.registerPlugin=pa.registerPlugin,ga.deregisterPlugin=pa.deregisterPlugin,ga.plugin=function(e,t){return g.warn(\"videojs.plugin() is deprecated; use videojs.registerPlugin() instead\"),pa.registerPlugin(e,t)},ga.getPlugins=pa.getPlugins,ga.getPlugin=pa.getPlugin,ga.getPluginVersion=pa.getPluginVersion,ga.addLanguage=function(e,t){var i;return e=(\"\"+e).toLowerCase(),ga.options.languages=gt(ga.options.languages,((i={})[e]=t,i)),ga.options.languages[e]},ga.log=g,ga.createLogger=v,ga.createTimeRange=ga.createTimeRanges=Ct,ga.formatTime=xn,ga.setFormatTime=function(e){In=e},ga.resetFormatTime=function(){In=Cn},ga.parseUrl=Ht,ga.isCrossOrigin=Gt,ga.EventTarget=Ze,ga.on=Ge,ga.one=Qe,ga.off=Xe,ga.trigger=Ke,ga.xhr=ui,ga.TextTrack=mi,ga.AudioTrack=gi,ga.VideoTrack=vi,[\"isEl\",\"isTextNode\",\"createEl\",\"hasClass\",\"addClass\",\"removeClass\",\"toggleClass\",\"setAttributes\",\"getAttributes\",\"emptyEl\",\"appendContent\",\"insertContent\"].forEach(function(e){ga[e]=function(){return g.warn(\"videojs.\"+e+\"() is deprecated; use videojs.dom.\"+e+\"() instead\"),Ae[e].apply(null,arguments)}}),ga.computedStyle=E,ga.dom=Ae,ga.url=ni,ga.defineLazyProperty=Wr;var _a=t(i(function(e){e.exports=function(e){if(void 0===e)throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");return e},e.exports.default=e.exports,e.exports.__esModule=!0})),ba=i(function(i){function n(e,t){return i.exports=n=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},i.exports.default=i.exports,i.exports.__esModule=!0,n(e,t)}i.exports=n,i.exports.default=i.exports,i.exports.__esModule=!0});t(ba);function Ta(e,t){return/^[a-z]+:/i.test(t)?t:(/\\/\\//i.test(e)||(e=Ca.buildAbsoluteURL(Ia.location&&Ia.location.href||\"\",e)),Ca.buildAbsoluteURL(e,t))}var Sa=t(i(function(e){e.exports=function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,ba(e,t)},e.exports.default=e.exports,e.exports.__esModule=!0})),ka=\"undefined\"!=typeof e?e:\"undefined\"!=typeof window?window:{},wa=\"undefined\"!=typeof document?document:ka[\"__GLOBAL_DOCUMENT_CACHE@4\"]||(ka[\"__GLOBAL_DOCUMENT_CACHE@4\"]=r),Ea=\"undefined\"!=typeof window?window:\"undefined\"!=typeof e?e:\"undefined\"!=typeof self?self:{},Ca=i(function(e,t){var i,c,n,r,d;i=/^((?:[a-zA-Z0-9+\\-.]+:)?)(\\/\\/[^\\/?#]*)?((?:[^\\/?#]*\\/)*[^;?#]*)?(;[^?#]*)?(\\?[^#]*)?(#.*)?$/,c=/^([^\\/?#]*)(.*)$/,n=/(?:\\/|^)\\.(?=\\/)/g,r=/(?:\\/|^)\\.\\.\\/(?!\\.\\.\\/)[^\\/]*(?=\\/)/g,d={buildAbsoluteURL:function(e,t,i){if(i=i||{},e=e.trim(),!(t=t.trim())){if(!i.alwaysNormalize)return e;var n=d.parseURL(e);if(!n)throw new Error(\"Error trying to parse base URL.\");return n.path=d.normalizePath(n.path),d.buildURLFromParts(n)}var r=d.parseURL(t);if(!r)throw new Error(\"Error trying to parse relative URL.\");if(r.scheme)return i.alwaysNormalize?(r.path=d.normalizePath(r.path),d.buildURLFromParts(r)):t;var a=d.parseURL(e);if(!a)throw new Error(\"Error trying to parse base URL.\");if(!a.netLoc&&a.path&&\"/\"!==a.path[0]){var s=c.exec(a.path);a.netLoc=s[1],a.path=s[2]}a.netLoc&&!a.path&&(a.path=\"/\");var o={scheme:a.scheme,netLoc:r.netLoc,path:null,params:r.params,query:r.query,fragment:r.fragment};if(!r.netLoc&&(o.netLoc=a.netLoc,\"/\"!==r.path[0]))if(r.path){var u=a.path,l=u.substring(0,u.lastIndexOf(\"/\")+1)+r.path;o.path=d.normalizePath(l)}else o.path=a.path,r.params||(o.params=a.params,r.query||(o.query=a.query));return null===o.path&&(o.path=i.alwaysNormalize?d.normalizePath(r.path):r.path),d.buildURLFromParts(o)},parseURL:function(e){var t=i.exec(e);return t?{scheme:t[1]||\"\",netLoc:t[2]||\"\",path:t[3]||\"\",params:t[4]||\"\",query:t[5]||\"\",fragment:t[6]||\"\"}:null},normalizePath:function(e){for(e=e.split(\"\").reverse().join(\"\").replace(n,\"\");e.length!==(e=e.replace(r,\"\")).length;);return e.split(\"\").reverse().join(\"\")},buildURLFromParts:function(e){return e.scheme+e.netLoc+e.path+e.params+e.query+e.fragment}},e.exports=d}),Ia=\"undefined\"!=typeof window?window:\"undefined\"!=typeof e?e:\"undefined\"!=typeof self?self:{},xa=i(function(i){function n(e,t){return i.exports=n=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},i.exports.default=i.exports,i.exports.__esModule=!0,n(e,t)}i.exports=n,i.exports.default=i.exports,i.exports.__esModule=!0});t(xa);var Aa=t(i(function(e){e.exports=function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,xa(e,t)},e.exports.default=e.exports,e.exports.__esModule=!0})),Pa=function(){function e(){this.listeners={}}var t=e.prototype;return t.on=function(e,t){this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push(t)},t.off=function(e,t){if(!this.listeners[e])return!1;var i=this.listeners[e].indexOf(t);return this.listeners[e]=this.listeners[e].slice(0),this.listeners[e].splice(i,1),-1<i},t.trigger=function(e,t){var i=this.listeners[e];if(i)if(2===arguments.length)for(var n=i.length,r=0;r<n;++r)i[r].call(this,t);else for(var a=Array.prototype.slice.call(arguments,1),s=i.length,o=0;o<s;++o)i[o].apply(this,a)},t.dispose=function(){this.listeners={}},t.pipe=function(t){this.on(\"data\",function(e){t.push(e)})},e}(),La=t(i(function(e){function t(){return e.exports=t=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},e.exports.default=e.exports,e.exports.__esModule=!0,t.apply(this,arguments)}e.exports=t,e.exports.default=e.exports,e.exports.__esModule=!0})),Oa=t(i(function(e){e.exports=function(e){if(void 0===e)throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");return e},e.exports.default=e.exports,e.exports.__esModule=!0})),Da=function(e){return Ia.atob?Ia.atob(e):Buffer.from(e,\"base64\").toString(\"binary\")};function Ra(e){for(var t=Da(e),i=new Uint8Array(t.length),n=0;n<t.length;n++)i[n]=t.charCodeAt(n);return i}\r\n /*! @name m3u8-parser @version 4.5.2 @license Apache-2.0 */function Ma(e){for(var t,i=e.split(new RegExp('(?:^|,)((?:[^=]*)=(?:\"[^\"]*\"|[^,]*))')),n={},r=i.length;r--;)\"\"!==i[r]&&((t=/([^=]*)=(.*)/.exec(i[r]).slice(1))[0]=t[0].replace(/^\\s+|\\s+$/g,\"\"),t[1]=t[1].replace(/^\\s+|\\s+$/g,\"\"),t[1]=t[1].replace(/^['\"](.*)['\"]$/g,\"$1\"),n[t[0]]=t[1]);return n}function Na(e){return ja.test(e)?\"hls\":Va.test(e)?\"dash\":\"application/vnd.videojs.vhs+json\"===e?\"vhs-json\":null}var Ua=function(t){function e(){var e;return(e=t.call(this)||this).buffer=\"\",e}return Aa(e,t),e.prototype.push=function(e){var t;for(this.buffer+=e,t=this.buffer.indexOf(\"\\n\");-1<t;t=this.buffer.indexOf(\"\\n\"))this.trigger(\"data\",this.buffer.substring(0,t)),this.buffer=this.buffer.substring(t+1)},e}(Pa),Ba=function(t){function e(){var e;return(e=t.call(this)||this).customParsers=[],e.tagMappers=[],e}Aa(e,t);var i=e.prototype;return i.push=function(n){var u,l,c=this;0!==(n=n.trim()).length&&(\"#\"===n[0]?this.tagMappers.reduce(function(e,t){var i=t(n);return i===n?e:e.concat([i])},[n]).forEach(function(e){for(var t=0;t<c.customParsers.length;t++)if(c.customParsers[t].call(c,e))return;if(0===e.indexOf(\"#EXT\"))if(e=e.replace(\"\\r\",\"\"),u=/^#EXTM3U/.exec(e))c.trigger(\"data\",{type:\"tag\",tagType:\"m3u\"});else{if(u=/^#EXTINF:?([0-9\\.]*)?,?(.*)?$/.exec(e))return l={type:\"tag\",tagType:\"inf\"},u[1]&&(l.duration=parseFloat(u[1])),u[2]&&(l.title=u[2]),void c.trigger(\"data\",l);if(u=/^#EXT-X-TARGETDURATION:?([0-9.]*)?/.exec(e))return l={type:\"tag\",tagType:\"targetduration\"},u[1]&&(l.duration=parseInt(u[1],10)),void c.trigger(\"data\",l);if(u=/^#ZEN-TOTAL-DURATION:?([0-9.]*)?/.exec(e))return l={type:\"tag\",tagType:\"totalduration\"},u[1]&&(l.duration=parseInt(u[1],10)),void c.trigger(\"data\",l);if(u=/^#EXT-X-VERSION:?([0-9.]*)?/.exec(e))return l={type:\"tag\",tagType:\"version\"},u[1]&&(l.version=parseInt(u[1],10)),void c.trigger(\"data\",l);if(u=/^#EXT-X-MEDIA-SEQUENCE:?(\\-?[0-9.]*)?/.exec(e))return l={type:\"tag\",tagType:\"media-sequence\"},u[1]&&(l.number=parseInt(u[1],10)),void c.trigger(\"data\",l);if(u=/^#EXT-X-DISCONTINUITY-SEQUENCE:?(\\-?[0-9.]*)?/.exec(e))return l={type:\"tag\",tagType:\"discontinuity-sequence\"},u[1]&&(l.number=parseInt(u[1],10)),void c.trigger(\"data\",l);if(u=/^#EXT-X-PLAYLIST-TYPE:?(.*)?$/.exec(e))return l={type:\"tag\",tagType:\"playlist-type\"},u[1]&&(l.playlistType=u[1]),void c.trigger(\"data\",l);if(u=/^#EXT-X-BYTERANGE:?([0-9.]*)?@?([0-9.]*)?/.exec(e))return l={type:\"tag\",tagType:\"byterange\"},u[1]&&(l.length=parseInt(u[1],10)),u[2]&&(l.offset=parseInt(u[2],10)),void c.trigger(\"data\",l);if(u=/^#EXT-X-ALLOW-CACHE:?(YES|NO)?/.exec(e))return l={type:\"tag\",tagType:\"allow-cache\"},u[1]&&(l.allowed=!/NO/.test(u[1])),void c.trigger(\"data\",l);if(u=/^#EXT-X-MAP:?(.*)$/.exec(e)){if(l={type:\"tag\",tagType:\"map\"},u[1]){var i=Ma(u[1]);if(i.URI&&(l.uri=i.URI),i.BYTERANGE){var n=i.BYTERANGE.split(\"@\"),r=n[0],a=n[1];l.byterange={},r&&(l.byterange.length=parseInt(r,10)),a&&(l.byterange.offset=parseInt(a,10))}}c.trigger(\"data\",l)}else if(u=/^#EXT-X-STREAM-INF:?(.*)$/.exec(e)){if(l={type:\"tag\",tagType:\"stream-inf\"},u[1]){if(l.attributes=Ma(u[1]),l.attributes.RESOLUTION){var s=l.attributes.RESOLUTION.split(\"x\"),o={};s[0]&&(o.width=parseInt(s[0],10)),s[1]&&(o.height=parseInt(s[1],10)),l.attributes.RESOLUTION=o}l.attributes.BANDWIDTH&&(l.attributes.BANDWIDTH=parseInt(l.attributes.BANDWIDTH,10)),l.attributes[\"PROGRAM-ID\"]&&(l.attributes[\"PROGRAM-ID\"]=parseInt(l.attributes[\"PROGRAM-ID\"],10))}c.trigger(\"data\",l)}else{if(u=/^#EXT-X-MEDIA:?(.*)$/.exec(e))return l={type:\"tag\",tagType:\"media\"},u[1]&&(l.attributes=Ma(u[1])),void c.trigger(\"data\",l);if(u=/^#EXT-X-ENDLIST/.exec(e))c.trigger(\"data\",{type:\"tag\",tagType:\"endlist\"});else if(u=/^#EXT-X-DISCONTINUITY/.exec(e))c.trigger(\"data\",{type:\"tag\",tagType:\"discontinuity\"});else{if(u=/^#EXT-X-PROGRAM-DATE-TIME:?(.*)$/.exec(e))return l={type:\"tag\",tagType:\"program-date-time\"},u[1]&&(l.dateTimeString=u[1],l.dateTimeObject=new Date(u[1])),void c.trigger(\"data\",l);if(u=/^#EXT-X-KEY:?(.*)$/.exec(e))return l={type:\"tag\",tagType:\"key\"},u[1]&&(l.attributes=Ma(u[1]),l.attributes.IV&&(\"0x\"===l.attributes.IV.substring(0,2).toLowerCase()&&(l.attributes.IV=l.attributes.IV.substring(2)),l.attributes.IV=l.attributes.IV.match(/.{8}/g),l.attributes.IV[0]=parseInt(l.attributes.IV[0],16),l.attributes.IV[1]=parseInt(l.attributes.IV[1],16),l.attributes.IV[2]=parseInt(l.attributes.IV[2],16),l.attributes.IV[3]=parseInt(l.attributes.IV[3],16),l.attributes.IV=new Uint32Array(l.attributes.IV))),void c.trigger(\"data\",l);if(u=/^#EXT-X-START:?(.*)$/.exec(e))return l={type:\"tag\",tagType:\"start\"},u[1]&&(l.attributes=Ma(u[1]),l.attributes[\"TIME-OFFSET\"]=parseFloat(l.attributes[\"TIME-OFFSET\"]),l.attributes.PRECISE=/YES/.test(l.attributes.PRECISE)),void c.trigger(\"data\",l);if(u=/^#EXT-X-CUE-OUT-CONT:?(.*)?$/.exec(e))return l={type:\"tag\",tagType:\"cue-out-cont\"},u[1]?l.data=u[1]:l.data=\"\",void c.trigger(\"data\",l);if(u=/^#EXT-X-CUE-OUT:?(.*)?$/.exec(e))return l={type:\"tag\",tagType:\"cue-out\"},u[1]?l.data=u[1]:l.data=\"\",void c.trigger(\"data\",l);if(u=/^#EXT-X-CUE-IN:?(.*)?$/.exec(e))return l={type:\"tag\",tagType:\"cue-in\"},u[1]?l.data=u[1]:l.data=\"\",void c.trigger(\"data\",l);c.trigger(\"data\",{type:\"tag\",data:e.slice(4)})}}}else c.trigger(\"data\",{type:\"comment\",text:e.slice(1)})}):this.trigger(\"data\",{type:\"uri\",uri:n}))},i.addParser=function(e){var t=this,i=e.expression,n=e.customType,r=e.dataParser,a=e.segment;\"function\"!=typeof r&&(r=function(e){return e}),this.customParsers.push(function(e){if(i.exec(e))return t.trigger(\"data\",{type:\"custom\",data:r(e),customType:n,segment:a}),!0})},i.addTagMapper=function(e){var t=e.expression,i=e.map;this.tagMappers.push(function(e){return t.test(e)?i(e):e})},e}(Pa),Fa=function(t){function e(){var e;(e=t.call(this)||this).lineStream=new Ua,e.parseStream=new Ba,e.lineStream.pipe(e.parseStream);var r,a,s=Oa(e),o=[],u={},l={AUDIO:{},VIDEO:{},\"CLOSED-CAPTIONS\":{},SUBTITLES:{}},c=0;e.manifest={allowCache:!0,discontinuityStarts:[],segments:[]};var d=0;return e.parseStream.on(\"data\",function(t){var i,n;({tag:function(){({\"allow-cache\":function(){this.manifest.allowCache=t.allowed,\"allowed\"in t||(this.trigger(\"info\",{message:\"defaulting allowCache to YES\"}),this.manifest.allowCache=!0)},byterange:function(){var e={};\"length\"in t&&((u.byterange=e).length=t.length,\"offset\"in t||(t.offset=d)),\"offset\"in t&&((u.byterange=e).offset=t.offset),d=e.offset+e.length},endlist:function(){this.manifest.endList=!0},inf:function(){\"mediaSequence\"in this.manifest||(this.manifest.mediaSequence=0,this.trigger(\"info\",{message:\"defaulting media sequence to zero\"})),\"discontinuitySequence\"in this.manifest||(this.manifest.discontinuitySequence=0,this.trigger(\"info\",{message:\"defaulting discontinuity sequence to zero\"})),0<t.duration&&(u.duration=t.duration),0===t.duration&&(u.duration=.01,this.trigger(\"info\",{message:\"updating zero segment duration to a small value\"})),this.manifest.segments=o},key:function(){if(t.attributes)if(\"NONE\"!==t.attributes.METHOD)if(t.attributes.URI){if(\"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed\"===t.attributes.KEYFORMAT){return-1===[\"SAMPLE-AES\",\"SAMPLE-AES-CTR\",\"SAMPLE-AES-CENC\"].indexOf(t.attributes.METHOD)?void this.trigger(\"warn\",{message:\"invalid key method provided for Widevine\"}):(\"SAMPLE-AES-CENC\"===t.attributes.METHOD&&this.trigger(\"warn\",{message:\"SAMPLE-AES-CENC is deprecated, please use SAMPLE-AES-CTR instead\"}),\"data:text/plain;base64,\"!==t.attributes.URI.substring(0,23)?void this.trigger(\"warn\",{message:\"invalid key URI provided for Widevine\"}):t.attributes.KEYID&&\"0x\"===t.attributes.KEYID.substring(0,2)?void(this.manifest.contentProtection={\"com.widevine.alpha\":{attributes:{schemeIdUri:t.attributes.KEYFORMAT,keyId:t.attributes.KEYID.substring(2)},pssh:Ra(t.attributes.URI.split(\",\")[1])}}):void this.trigger(\"warn\",{message:\"invalid key ID provided for Widevine\"}))}t.attributes.METHOD||this.trigger(\"warn\",{message:\"defaulting key method to AES-128\"}),a={method:t.attributes.METHOD||\"AES-128\",uri:t.attributes.URI},\"undefined\"!=typeof t.attributes.IV&&(a.iv=t.attributes.IV)}else this.trigger(\"warn\",{message:\"ignoring key declaration without URI\"});else a=null;else this.trigger(\"warn\",{message:\"ignoring key declaration without attribute list\"})},\"media-sequence\":function(){isFinite(t.number)?this.manifest.mediaSequence=t.number:this.trigger(\"warn\",{message:\"ignoring invalid media sequence: \"+t.number})},\"discontinuity-sequence\":function(){isFinite(t.number)?(this.manifest.discontinuitySequence=t.number,c=t.number):this.trigger(\"warn\",{message:\"ignoring invalid discontinuity sequence: \"+t.number})},\"playlist-type\":function(){/VOD|EVENT/.test(t.playlistType)?this.manifest.playlistType=t.playlistType:this.trigger(\"warn\",{message:\"ignoring unknown playlist type: \"+t.playlist})},map:function(){r={},t.uri&&(r.uri=t.uri),t.byterange&&(r.byterange=t.byterange)},\"stream-inf\":function(){this.manifest.playlists=o,this.manifest.mediaGroups=this.manifest.mediaGroups||l,t.attributes?(u.attributes||(u.attributes={}),La(u.attributes,t.attributes)):this.trigger(\"warn\",{message:\"ignoring empty stream-inf attributes\"})},media:function(){if(this.manifest.mediaGroups=this.manifest.mediaGroups||l,t.attributes&&t.attributes.TYPE&&t.attributes[\"GROUP-ID\"]&&t.attributes.NAME){var e=this.manifest.mediaGroups[t.attributes.TYPE];e[t.attributes[\"GROUP-ID\"]]=e[t.attributes[\"GROUP-ID\"]]||{},i=e[t.attributes[\"GROUP-ID\"]],(n={default:/yes/i.test(t.attributes.DEFAULT)}).default?n.autoselect=!0:n.autoselect=/yes/i.test(t.attributes.AUTOSELECT),t.attributes.LANGUAGE&&(n.language=t.attributes.LANGUAGE),t.attributes.URI&&(n.uri=t.attributes.URI),t.attributes[\"INSTREAM-ID\"]&&(n.instreamId=t.attributes[\"INSTREAM-ID\"]),t.attributes.CHARACTERISTICS&&(n.characteristics=t.attributes.CHARACTERISTICS),t.attributes.FORCED&&(n.forced=/yes/i.test(t.attributes.FORCED)),i[t.attributes.NAME]=n}else this.trigger(\"warn\",{message:\"ignoring incomplete or missing media group\"})},discontinuity:function(){c+=1,u.discontinuity=!0,this.manifest.discontinuityStarts.push(o.length)},\"program-date-time\":function(){\"undefined\"==typeof this.manifest.dateTimeString&&(this.manifest.dateTimeString=t.dateTimeString,this.manifest.dateTimeObject=t.dateTimeObject),u.dateTimeString=t.dateTimeString,u.dateTimeObject=t.dateTimeObject},targetduration:function(){!isFinite(t.duration)||t.duration<0?this.trigger(\"warn\",{message:\"ignoring invalid target duration: \"+t.duration}):this.manifest.targetDuration=t.duration},totalduration:function(){!isFinite(t.duration)||t.duration<0?this.trigger(\"warn\",{message:\"ignoring invalid total duration: \"+t.duration}):this.manifest.totalDuration=t.duration},start:function(){t.attributes&&!isNaN(t.attributes[\"TIME-OFFSET\"])?this.manifest.start={timeOffset:t.attributes[\"TIME-OFFSET\"],precise:t.attributes.PRECISE}:this.trigger(\"warn\",{message:\"ignoring start declaration without appropriate attribute list\"})},\"cue-out\":function(){u.cueOut=t.data},\"cue-out-cont\":function(){u.cueOutCont=t.data},\"cue-in\":function(){u.cueIn=t.data}}[t.tagType]||function(){}).call(s)},uri:function(){u.uri=t.uri,o.push(u),!this.manifest.targetDuration||\"duration\"in u||(this.trigger(\"warn\",{message:\"defaulting segment duration to the target duration\"}),u.duration=this.manifest.targetDuration),a&&(u.key=a),u.timeline=c,r&&(u.map=r),u={}},comment:function(){},custom:function(){t.segment?(u.custom=u.custom||{},u.custom[t.customType]=t.data):(this.manifest.custom=this.manifest.custom||{},this.manifest.custom[t.customType]=t.data)}})[t.type].call(s)}),e}Aa(e,t);var i=e.prototype;return i.push=function(e){this.lineStream.push(e)},i.end=function(){this.lineStream.push(\"\\n\")},i.addParser=function(e){this.parseStream.addParser(e)},i.addTagMapper=function(e){this.parseStream.addTagMapper(e)},e}(Pa),ja=/^(audio|video|application)\\/(x-|vnd\\.apple\\.)?mpegurl/i,Va=/^application\\/dash\\+xml/i,qa=\"undefined\"!=typeof window?window:\"undefined\"!=typeof e?e:\"undefined\"!=typeof self?self:{},Ha={entityMap:{lt:\"<\",gt:\">\",amp:\"&\",quot:'\"',apos:\"'\",Agrave:\"À\",Aacute:\"Á\",Acirc:\"Â\",Atilde:\"Ã\",Auml:\"Ä\",Aring:\"Å\",AElig:\"Æ\",Ccedil:\"Ç\",Egrave:\"È\",Eacute:\"É\",Ecirc:\"Ê\",Euml:\"Ë\",Igrave:\"Ì\",Iacute:\"Í\",Icirc:\"Î\",Iuml:\"Ï\",ETH:\"Ð\",Ntilde:\"Ñ\",Ograve:\"Ò\",Oacute:\"Ó\",Ocirc:\"Ô\",Otilde:\"Õ\",Ouml:\"Ö\",Oslash:\"Ø\",Ugrave:\"Ù\",Uacute:\"Ú\",Ucirc:\"Û\",Uuml:\"Ü\",Yacute:\"Ý\",THORN:\"Þ\",szlig:\"ß\",agrave:\"à\",aacute:\"á\",acirc:\"â\",atilde:\"ã\",auml:\"ä\",aring:\"å\",aelig:\"æ\",ccedil:\"ç\",egrave:\"è\",eacute:\"é\",ecirc:\"ê\",euml:\"ë\",igrave:\"ì\",iacute:\"í\",icirc:\"î\",iuml:\"ï\",eth:\"ð\",ntilde:\"ñ\",ograve:\"ò\",oacute:\"ó\",ocirc:\"ô\",otilde:\"õ\",ouml:\"ö\",oslash:\"ø\",ugrave:\"ù\",uacute:\"ú\",ucirc:\"û\",uuml:\"ü\",yacute:\"ý\",thorn:\"þ\",yuml:\"ÿ\",nbsp:\" \",iexcl:\"¡\",cent:\"¢\",pound:\"£\",curren:\"¤\",yen:\"¥\",brvbar:\"¦\",sect:\"§\",uml:\"¨\",copy:\"©\",ordf:\"ª\",laquo:\"«\",not:\"¬\",shy:\"­­\",reg:\"®\",macr:\"¯\",deg:\"°\",plusmn:\"±\",sup2:\"²\",sup3:\"³\",acute:\"´\",micro:\"µ\",para:\"¶\",middot:\"·\",cedil:\"¸\",sup1:\"¹\",ordm:\"º\",raquo:\"»\",frac14:\"¼\",frac12:\"½\",frac34:\"¾\",iquest:\"¿\",times:\"×\",divide:\"÷\",forall:\"∀\",part:\"∂\",exist:\"∃\",empty:\"∅\",nabla:\"∇\",isin:\"∈\",notin:\"∉\",ni:\"∋\",prod:\"∏\",sum:\"∑\",minus:\"−\",lowast:\"∗\",radic:\"√\",prop:\"∝\",infin:\"∞\",ang:\"∠\",and:\"∧\",or:\"∨\",cap:\"∩\",cup:\"∪\",int:\"∫\",there4:\"∴\",sim:\"∼\",cong:\"≅\",asymp:\"≈\",ne:\"≠\",equiv:\"≡\",le:\"≤\",ge:\"≥\",sub:\"⊂\",sup:\"⊃\",nsub:\"⊄\",sube:\"⊆\",supe:\"⊇\",oplus:\"⊕\",otimes:\"⊗\",perp:\"⊥\",sdot:\"⋅\",Alpha:\"Α\",Beta:\"Β\",Gamma:\"Γ\",Delta:\"Δ\",Epsilon:\"Ε\",Zeta:\"Ζ\",Eta:\"Η\",Theta:\"Θ\",Iota:\"Ι\",Kappa:\"Κ\",Lambda:\"Λ\",Mu:\"Μ\",Nu:\"Ν\",Xi:\"Ξ\",Omicron:\"Ο\",Pi:\"Π\",Rho:\"Ρ\",Sigma:\"Σ\",Tau:\"Τ\",Upsilon:\"Υ\",Phi:\"Φ\",Chi:\"Χ\",Psi:\"Ψ\",Omega:\"Ω\",alpha:\"α\",beta:\"β\",gamma:\"γ\",delta:\"δ\",epsilon:\"ε\",zeta:\"ζ\",eta:\"η\",theta:\"θ\",iota:\"ι\",kappa:\"κ\",lambda:\"λ\",mu:\"μ\",nu:\"ν\",xi:\"ξ\",omicron:\"ο\",pi:\"π\",rho:\"ρ\",sigmaf:\"ς\",sigma:\"σ\",tau:\"τ\",upsilon:\"υ\",phi:\"φ\",chi:\"χ\",psi:\"ψ\",omega:\"ω\",thetasym:\"ϑ\",upsih:\"ϒ\",piv:\"ϖ\",OElig:\"Œ\",oelig:\"œ\",Scaron:\"Š\",scaron:\"š\",Yuml:\"Ÿ\",fnof:\"ƒ\",circ:\"ˆ\",tilde:\"˜\",ensp:\" \",emsp:\" \",thinsp:\" \",zwnj:\"‌\",zwj:\"‍\",lrm:\"‎\",rlm:\"‏\",ndash:\"–\",mdash:\"—\",lsquo:\"‘\",rsquo:\"’\",sbquo:\"‚\",ldquo:\"“\",rdquo:\"”\",bdquo:\"„\",dagger:\"†\",Dagger:\"‡\",bull:\"•\",hellip:\"…\",permil:\"‰\",prime:\"′\",Prime:\"″\",lsaquo:\"‹\",rsaquo:\"›\",oline:\"‾\",euro:\"€\",trade:\"™\",larr:\"←\",uarr:\"↑\",rarr:\"→\",darr:\"↓\",harr:\"↔\",crarr:\"↵\",lceil:\"⌈\",rceil:\"⌉\",lfloor:\"⌊\",rfloor:\"⌋\",loz:\"◊\",spades:\"♠\",clubs:\"♣\",hearts:\"♥\",diams:\"♦\"}},Wa=/[A-Z_a-z\\xC0-\\xD6\\xD8-\\xF6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD]/,za=new RegExp(\"[\\\\-\\\\.0-9\"+Wa.source.slice(1,-1)+\"\\\\u00B7\\\\u0300-\\\\u036F\\\\u203F-\\\\u2040]\"),Ga=new RegExp(\"^\"+Wa.source+za.source+\"*(?::\"+Wa.source+za.source+\"*)?$\"),Xa=0,Ka=1,Qa=2,Ya=3,$a=4,Ja=5,Za=6,es=7;function ts(){}function is(e,t){return t.lineNumber=e.lineNumber,t.columnNumber=e.columnNumber,t}function ns(e,t,i,n,r,a){for(var s,o=++t,u=Xa;;){var l=e.charAt(o);switch(l){case\"=\":if(u===Ka)s=e.slice(t,o),u=Ya;else{if(u!==Qa)throw new Error(\"attribute equal must after attrName\");u=Ya}break;case\"'\":case'\"':if(u===Ya||u===Ka){if(u===Ka&&(a.warning('attribute value must after \"=\"'),s=e.slice(t,o)),t=o+1,!(0<(o=e.indexOf(l,t))))throw new Error(\"attribute value no end '\"+l+\"' match\");c=e.slice(t,o).replace(/&#?\\w+;/g,r),i.add(s,c,t-1),u=Ja}else{if(u!=$a)throw new Error('attribute value must after \"=\"');c=e.slice(t,o).replace(/&#?\\w+;/g,r),i.add(s,c,t),a.warning('attribute \"'+s+'\" missed start quot('+l+\")!!\"),t=o+1,u=Ja}break;case\"/\":switch(u){case Xa:i.setTagName(e.slice(t,o));case Ja:case Za:case es:u=es,i.closed=!0;case $a:case Ka:case Qa:break;default:throw new Error(\"attribute invalid close char('/')\")}break;case\"\":return a.error(\"unexpected end of input\"),u==Xa&&i.setTagName(e.slice(t,o)),o;case\">\":switch(u){case Xa:i.setTagName(e.slice(t,o));case Ja:case Za:case es:break;case $a:case Ka:\"/\"===(c=e.slice(t,o)).slice(-1)&&(i.closed=!0,c=c.slice(0,-1));case Qa:u===Qa&&(c=s),u==$a?(a.warning('attribute \"'+c+'\" missed quot(\")!!'),i.add(s,c.replace(/&#?\\w+;/g,r),t)):(\"http://www.w3.org/1999/xhtml\"===n[\"\"]&&c.match(/^(?:disabled|checked|selected)$/i)||a.warning('attribute \"'+c+'\" missed value!! \"'+c+'\" instead!!'),i.add(c,c,t));break;case Ya:throw new Error(\"attribute value missed!!\")}return o;case\"€\":l=\" \";default:if(l<=\" \")switch(u){case Xa:i.setTagName(e.slice(t,o)),u=Za;break;case Ka:s=e.slice(t,o),u=Qa;break;case $a:var c=e.slice(t,o).replace(/&#?\\w+;/g,r);a.warning('attribute \"'+c+'\" missed quot(\")!!'),i.add(s,c,t);case Ja:u=Za}else switch(u){case Qa:i.tagName;\"http://www.w3.org/1999/xhtml\"===n[\"\"]&&s.match(/^(?:disabled|checked|selected)$/i)||a.warning('attribute \"'+s+'\" missed value!! \"'+s+'\" instead2!!'),i.add(s,s,t),t=o,u=Ka;break;case Ja:a.warning('attribute space is required\"'+s+'\"!!');case Za:u=Ka,t=o;break;case Ya:u=$a,t=o;break;case es:throw new Error(\"elements closed character '/' and '>' must be connected to\")}}o++}}function rs(e,t,i){for(var n=e.tagName,r=null,a=e.length;a--;){var s=e[a],o=s.qName,u=s.value;if(0<(h=o.indexOf(\":\")))var l=s.prefix=o.slice(0,h),c=o.slice(h+1),d=\"xmlns\"===l&&c;else l=null,d=\"xmlns\"===(c=o)&&\"\";s.localName=c,!1!==d&&(null==r&&(r={},os(i,i={})),i[d]=r[d]=u,s.uri=\"http://www.w3.org/2000/xmlns/\",t.startPrefixMapping(d,u))}for(a=e.length;a--;){(l=(s=e[a]).prefix)&&(\"xml\"===l&&(s.uri=\"http://www.w3.org/XML/1998/namespace\"),\"xmlns\"!==l&&(s.uri=i[l||\"\"]))}var h;c=0<(h=n.indexOf(\":\"))?(l=e.prefix=n.slice(0,h),e.localName=n.slice(h+1)):(l=null,e.localName=n);var p=e.uri=i[l||\"\"];if(t.startElement(p,c,n,e),!e.closed)return e.currentNSMap=i,e.localNSMap=r,!0;if(t.endElement(p,c,n),r)for(l in r)t.endPrefixMapping(l)}function as(e,t,i,n,r){if(/^(?:script|textarea)$/i.test(i)){var a=e.indexOf(\"</\"+i+\">\",t),s=e.substring(t+1,a);if(/[&<]/.test(s))return/^script$/i.test(i)||(s=s.replace(/&#?\\w+;/g,n)),r.characters(s,0,s.length),a}return t+1}function ss(e,t,i,n){var r=n[i];return null==r&&((r=e.lastIndexOf(\"</\"+i+\">\"))<t&&(r=e.lastIndexOf(\"</\"+i)),n[i]=r),r<t}function os(e,t){for(var i in e)t[i]=e[i]}function us(e,t,i,n){switch(e.charAt(t+2)){case\"-\":return\"-\"!==e.charAt(t+3)?-1:t<(r=e.indexOf(\"--\\x3e\",t+4))?(i.comment(e,t+4,r-t-4),r+3):(n.error(\"Unclosed comment\"),-1);default:if(\"CDATA[\"==e.substr(t+3,6)){var r=e.indexOf(\"]]>\",t+9);return i.startCDATA(),i.characters(e,t+9,r-t-9),i.endCDATA(),r+3}var a=function(e,t){var i,n=[],r=/'[^']+'|\"[^\"]+\"|[^\\s<>\\/=]+=?|(\\/?\\s*>|<)/g;r.lastIndex=t,r.exec(e);for(;i=r.exec(e);)if(n.push(i),i[1])return n}(e,t),s=a.length;if(1<s&&/!doctype/i.test(a[0][0])){var o=a[1][0],u=!1,l=!1;3<s&&(/^public$/i.test(a[2][0])?(u=a[3][0],l=4<s&&a[4][0]):/^system$/i.test(a[2][0])&&(l=a[3][0]));var c=a[s-1];return i.startDTD(o,u&&u.replace(/^(['\"])(.*?)\\1$/,\"$2\"),l&&l.replace(/^(['\"])(.*?)\\1$/,\"$2\")),i.endDTD(),c.index+c[0].length}}return-1}function ls(e,t,i){var n=e.indexOf(\"?>\",t);if(n){var r=e.substring(t,n).match(/^<\\?(\\S*)\\s*([\\s\\S]*?)\\s*$/);if(r){r[0].length;return i.processingInstruction(r[1],r[2]),n+2}return-1}return-1}function cs(e){}ts.prototype={parse:function(e,t,i){var n=this.domBuilder;n.startDocument(),os(t,t={}),function(i,e,n,r,a){function s(e){var t=e.slice(1,-1);return t in n?n[t]:\"#\"===t.charAt(0)?function(e){if(65535<e){var t=55296+((e-=65536)>>10),i=56320+(1023&e);return String.fromCharCode(t,i)}return String.fromCharCode(e)}(parseInt(t.substr(1).replace(\"x\",\"0x\"))):(a.error(\"entity not found:\"+e),e)}function t(e){if(f<e){var t=i.substring(f,e).replace(/&#?\\w+;/g,s);d&&o(f),r.characters(t,0,e-f),f=e}}function o(e,t){for(;l<=e&&(t=c.exec(i));)u=t.index,l=u+t[0].length,d.lineNumber++;d.columnNumber=e-u+1}var u=0,l=0,c=/.*(?:\\r\\n?|\\n)|.*$/g,d=r.locator,h=[{currentNSMap:e}],p={},f=0;for(;;){try{var m=i.indexOf(\"<\",f);if(m<0){if(!i.substr(f).match(/^\\s*$/)){var g=r.doc,v=g.createTextNode(i.substr(f));g.appendChild(v),r.currentElement=v}return}switch(f<m&&t(m),i.charAt(m+1)){case\"/\":var y=i.indexOf(\">\",m+3),_=i.substring(m+2,y),b=h.pop();y<0?(_=i.substring(m+2).replace(/[\\s<].*/,\"\"),a.error(\"end tag name: \"+_+\" is not complete:\"+b.tagName),y=m+1+_.length):_.match(/\\s</)&&(_=_.replace(/[\\s<].*/,\"\"),a.error(\"end tag name: \"+_+\" maybe not complete\"),y=m+1+_.length);var T=b.localNSMap,S=b.tagName==_;if(S||b.tagName&&b.tagName.toLowerCase()==_.toLowerCase()){if(r.endElement(b.uri,b.localName,_),T)for(var k in T)r.endPrefixMapping(k);S||a.fatalError(\"end tag name: \"+_+\" is not match the current start tagName:\"+b.tagName)}else h.push(b);y++;break;case\"?\":d&&o(m),y=ls(i,m,r);break;case\"!\":d&&o(m),y=us(i,m,r,a);break;default:d&&o(m);var w=new cs,E=h[h.length-1].currentNSMap,C=(y=ns(i,m,w,E,s,a),w.length);if(!w.closed&&ss(i,y,w.tagName,p)&&(w.closed=!0,n.nbsp||a.warning(\"unclosed xml attribute\")),d&&C){for(var I=is(d,{}),x=0;x<C;x++){var A=w[x];o(A.offset),A.locator=is(d,{})}r.locator=I,rs(w,r,E)&&h.push(w),r.locator=d}else rs(w,r,E)&&h.push(w);\"http://www.w3.org/1999/xhtml\"!==w.uri||w.closed?y++:y=as(i,y,w.tagName,s,r)}}catch(e){a.error(\"element parse error: \"+e),y=-1}f<y?f=y:t(Math.max(m,f)+1)}}(e,t,i,n,this.errorHandler),n.endDocument()}},cs.prototype={setTagName:function(e){if(!Ga.test(e))throw new Error(\"invalid tagName:\"+e);this.tagName=e},add:function(e,t,i){if(!Ga.test(e))throw new Error(\"invalid attribute:\"+e);this[this.length++]={qName:e,value:t,offset:i}},length:0,getLocalName:function(e){return this[e].localName},getLocator:function(e){return this[e].locator},getQName:function(e){return this[e].qName},getURI:function(e){return this[e].uri},getValue:function(e){return this[e].value}};var ds={XMLReader:ts};function hs(e,t){for(var i in e)t[i]=e[i]}function ps(e,t){var i=e.prototype;if(!(i instanceof t)){var n=function(){};n.prototype=t.prototype,hs(i,n=new n),e.prototype=i=n}i.constructor!=e&&(i.constructor=e)}var fs=\"http://www.w3.org/1999/xhtml\",ms={},gs=ms.ELEMENT_NODE=1,vs=ms.ATTRIBUTE_NODE=2,ys=ms.TEXT_NODE=3,_s=ms.CDATA_SECTION_NODE=4,bs=ms.ENTITY_REFERENCE_NODE=5,Ts=ms.ENTITY_NODE=6,Ss=ms.PROCESSING_INSTRUCTION_NODE=7,ks=ms.COMMENT_NODE=8,ws=ms.DOCUMENT_NODE=9,Es=ms.DOCUMENT_TYPE_NODE=10,Cs=ms.DOCUMENT_FRAGMENT_NODE=11,Is=ms.NOTATION_NODE=12,xs={},As={},Ps=(xs.INDEX_SIZE_ERR=(As[1]=\"Index size error\",1),xs.DOMSTRING_SIZE_ERR=(As[2]=\"DOMString size error\",2),xs.HIERARCHY_REQUEST_ERR=(As[3]=\"Hierarchy request error\",3)),Ls=(xs.WRONG_DOCUMENT_ERR=(As[4]=\"Wrong document\",4),xs.INVALID_CHARACTER_ERR=(As[5]=\"Invalid character\",5),xs.NO_DATA_ALLOWED_ERR=(As[6]=\"No data allowed\",6),xs.NO_MODIFICATION_ALLOWED_ERR=(As[7]=\"No modification allowed\",7),xs.NOT_FOUND_ERR=(As[8]=\"Not found\",8)),Os=(xs.NOT_SUPPORTED_ERR=(As[9]=\"Not supported\",9),xs.INUSE_ATTRIBUTE_ERR=(As[10]=\"Attribute in use\",10));xs.INVALID_STATE_ERR=(As[11]=\"Invalid state\",11),xs.SYNTAX_ERR=(As[12]=\"Syntax error\",12),xs.INVALID_MODIFICATION_ERR=(As[13]=\"Invalid modification\",13),xs.NAMESPACE_ERR=(As[14]=\"Invalid namespace\",14),xs.INVALID_ACCESS_ERR=(As[15]=\"Invalid access\",15);function Ds(e,t){if(t instanceof Error)var i=t;else i=this,Error.call(this,As[e]),this.message=As[e],Error.captureStackTrace&&Error.captureStackTrace(this,Ds);return i.code=e,t&&(this.message=this.message+\": \"+t),i}function Rs(){}function Ms(e,t){this._node=e,this._refresh=t,Ns(this)}function Ns(e){var t=e._node._inc||e._node.ownerDocument._inc;if(e._inc!=t){var i=e._refresh(e._node);po(e,\"length\",i.length),hs(i,e),e._inc=t}}function Us(){}function Bs(e,t){for(var i=e.length;i--;)if(e[i]===t)return i}function Fs(e,t,i,n){if(n?t[Bs(t,n)]=i:t[t.length++]=i,e){var r=(i.ownerElement=e).ownerDocument;r&&(n&&Gs(r,e,n),function(e,t,i){e&&e._inc++,\"http://www.w3.org/2000/xmlns/\"==i.namespaceURI&&(t._nsMap[i.prefix?i.localName:\"\"]=i.value)}(r,e,i))}}function js(e,t,i){var n=Bs(t,i);if(!(0<=n))throw Ds(Ls,new Error(e.tagName+\"@\"+i));for(var r=t.length-1;n<r;)t[n]=t[++n];if(t.length=r,e){var a=e.ownerDocument;a&&(Gs(a,e,i),i.ownerElement=null)}}function Vs(e){if(this._features={},e)for(var t in e)this._features=e[t]}function qs(){}function Hs(e){return(\"<\"==e?\"&lt;\":\">\"==e&&\"&gt;\")||\"&\"==e&&\"&amp;\"||'\"'==e&&\"&quot;\"||\"&#\"+e.charCodeAt()+\";\"}function Ws(e,t){if(t(e))return!0;if(e=e.firstChild)do{if(Ws(e,t))return!0}while(e=e.nextSibling)}function zs(){}function Gs(e,t,i){e&&e._inc++,\"http://www.w3.org/2000/xmlns/\"==i.namespaceURI&&delete t._nsMap[i.prefix?i.localName:\"\"]}function Xs(e,t,i){if(e&&e._inc){e._inc++;var n=t.childNodes;if(i)n[n.length++]=i;else{for(var r=t.firstChild,a=0;r;)r=(n[a++]=r).nextSibling;n.length=a}}}function Ks(e,t){var i=t.previousSibling,n=t.nextSibling;return i?i.nextSibling=n:e.firstChild=n,n?n.previousSibling=i:e.lastChild=i,Xs(e.ownerDocument,e),t}function Qs(e,t,i){var n=t.parentNode;if(n&&n.removeChild(t),t.nodeType===Cs){var r=t.firstChild;if(null==r)return t;var a=t.lastChild}else r=a=t;var s=i?i.previousSibling:e.lastChild;for(r.previousSibling=s,a.nextSibling=i,s?s.nextSibling=r:e.firstChild=r,null==i?e.lastChild=a:i.previousSibling=a;r.parentNode=e,r!==a&&(r=r.nextSibling););return Xs(e.ownerDocument||e,e),t.nodeType==Cs&&(t.firstChild=t.lastChild=null),t}function Ys(){this._nsMap={}}function $s(){}function Js(){}function Zs(){}function eo(){}function to(){}function io(){}function no(){}function ro(){}function ao(){}function so(){}function oo(){}function uo(){}function lo(e,t){var i=[],n=9==this.nodeType&&this.documentElement||this,r=n.prefix,a=n.namespaceURI;if(a&&null==r&&null==(r=n.lookupPrefix(a)))var s=[{namespace:a,prefix:null}];return ho(this,i,e,t,s),i.join(\"\")}function co(e,t,i){var n=e.prefix||\"\",r=e.namespaceURI;if(!n&&!r)return!1;if(\"xml\"===n&&\"http://www.w3.org/XML/1998/namespace\"===r||\"http://www.w3.org/2000/xmlns/\"==r)return!1;for(var a=i.length;a--;){var s=i[a];if(s.prefix==n)return s.namespace!=r}return!0}function ho(e,t,i,n,r){if(n){if(!(e=n(e)))return;if(\"string\"==typeof e)return void t.push(e)}switch(e.nodeType){case gs:r=r||[];var a=e.attributes,s=a.length,o=e.firstChild,u=e.tagName;i=fs===e.namespaceURI||i,t.push(\"<\",u);for(var l=0;l<s;l++){\"xmlns\"==(c=a.item(l)).prefix?r.push({prefix:c.localName,namespace:c.value}):\"xmlns\"==c.nodeName&&r.push({prefix:\"\",namespace:c.value})}for(l=0;l<s;l++){var c;if(co(c=a.item(l),0,r)){var d=c.prefix||\"\",h=c.namespaceURI,p=d?\" xmlns:\"+d:\" xmlns\";t.push(p,'=\"',h,'\"'),r.push({prefix:d,namespace:h})}ho(c,t,i,n,r)}if(co(e,0,r)){d=e.prefix||\"\",h=e.namespaceURI,p=d?\" xmlns:\"+d:\" xmlns\";t.push(p,'=\"',h,'\"'),r.push({prefix:d,namespace:h})}if(o||i&&!/^(?:meta|link|img|br|hr|input)$/i.test(u)){if(t.push(\">\"),i&&/^script$/i.test(u))for(;o;)o.data?t.push(o.data):ho(o,t,i,n,r),o=o.nextSibling;else for(;o;)ho(o,t,i,n,r),o=o.nextSibling;t.push(\"</\",u,\">\")}else t.push(\"/>\");return;case ws:case Cs:for(o=e.firstChild;o;)ho(o,t,i,n,r),o=o.nextSibling;return;case vs:return t.push(\" \",e.name,'=\"',e.value.replace(/[<&\"]/g,Hs),'\"');case ys:return t.push(e.data.replace(/[<&]/g,Hs));case _s:return t.push(\"<![CDATA[\",e.data,\"]]>\");case ks:return t.push(\"\\x3c!--\",e.data,\"--\\x3e\");case Es:var f=e.publicId,m=e.systemId;if(t.push(\"<!DOCTYPE \",e.name),f)t.push(' PUBLIC \"',f),m&&\".\"!=m&&t.push('\" \"',m),t.push('\">');else if(m&&\".\"!=m)t.push(' SYSTEM \"',m,'\">');else{var g=e.internalSubset;g&&t.push(\" [\",g,\"]\"),t.push(\">\")}return;case Ss:return t.push(\"<?\",e.target,\" \",e.data,\"?>\");case bs:return t.push(\"&\",e.nodeName,\";\");default:t.push(\"??\",e.nodeName)}}function po(e,t,i){e[t]=i}Ds.prototype=Error.prototype,hs(xs,Ds),Rs.prototype={length:0,item:function(e){return this[e]||null},toString:function(e,t){for(var i=[],n=0;n<this.length;n++)ho(this[n],i,e,t);return i.join(\"\")}},Ms.prototype.item=function(e){return Ns(this),this[e]},ps(Ms,Rs),Us.prototype={length:0,item:Rs.prototype.item,getNamedItem:function(e){for(var t=this.length;t--;){var i=this[t];if(i.nodeName==e)return i}},setNamedItem:function(e){var t=e.ownerElement;if(t&&t!=this._ownerElement)throw new Ds(Os);var i=this.getNamedItem(e.nodeName);return Fs(this._ownerElement,this,e,i),i},setNamedItemNS:function(e){var t,i=e.ownerElement;if(i&&i!=this._ownerElement)throw new Ds(Os);return t=this.getNamedItemNS(e.namespaceURI,e.localName),Fs(this._ownerElement,this,e,t),t},removeNamedItem:function(e){var t=this.getNamedItem(e);return js(this._ownerElement,this,t),t},removeNamedItemNS:function(e,t){var i=this.getNamedItemNS(e,t);return js(this._ownerElement,this,i),i},getNamedItemNS:function(e,t){for(var i=this.length;i--;){var n=this[i];if(n.localName==t&&n.namespaceURI==e)return n}return null}},Vs.prototype={hasFeature:function(e,t){var i=this._features[e.toLowerCase()];return!(!i||t&&!(t in i))},createDocument:function(e,t,i){var n=new zs;if(n.implementation=this,n.childNodes=new Rs,(n.doctype=i)&&n.appendChild(i),t){var r=n.createElementNS(e,t);n.appendChild(r)}return n},createDocumentType:function(e,t,i){var n=new io;return n.name=e,n.nodeName=e,n.publicId=t,n.systemId=i,n}},qs.prototype={firstChild:null,lastChild:null,previousSibling:null,nextSibling:null,attributes:null,parentNode:null,childNodes:null,ownerDocument:null,nodeValue:null,namespaceURI:null,prefix:null,localName:null,insertBefore:function(e,t){return Qs(this,e,t)},replaceChild:function(e,t){this.insertBefore(e,t),t&&this.removeChild(t)},removeChild:function(e){return Ks(this,e)},appendChild:function(e){return this.insertBefore(e,null)},hasChildNodes:function(){return null!=this.firstChild},cloneNode:function(e){return function e(t,i,n){var r=new i.constructor;for(var a in i){var s=i[a];\"object\"!=typeof s&&s!=r[a]&&(r[a]=s)}i.childNodes&&(r.childNodes=new Rs);r.ownerDocument=t;switch(r.nodeType){case gs:var o=i.attributes,u=r.attributes=new Us,l=o.length;u._ownerElement=r;for(var c=0;c<l;c++)r.setAttributeNode(e(t,o.item(c),!0));break;case vs:n=!0}if(n)for(var d=i.firstChild;d;)r.appendChild(e(t,d,n)),d=d.nextSibling;return r}(this.ownerDocument||this,this,e)},normalize:function(){for(var e=this.firstChild;e;){var t=e.nextSibling;t&&t.nodeType==ys&&e.nodeType==ys?(this.removeChild(t),e.appendData(t.data)):(e.normalize(),e=t)}},isSupported:function(e,t){return this.ownerDocument.implementation.hasFeature(e,t)},hasAttributes:function(){return 0<this.attributes.length},lookupPrefix:function(e){for(var t=this;t;){var i=t._nsMap;if(i)for(var n in i)if(i[n]==e)return n;t=t.nodeType==vs?t.ownerDocument:t.parentNode}return null},lookupNamespaceURI:function(e){for(var t=this;t;){var i=t._nsMap;if(i&&e in i)return i[e];t=t.nodeType==vs?t.ownerDocument:t.parentNode}return null},isDefaultNamespace:function(e){return null==this.lookupPrefix(e)}},hs(ms,qs),hs(ms,qs.prototype),zs.prototype={nodeName:\"#document\",nodeType:ws,doctype:null,documentElement:null,_inc:1,insertBefore:function(e,t){if(e.nodeType!=Cs)return null==this.documentElement&&e.nodeType==gs&&(this.documentElement=e),Qs(this,e,t),e.ownerDocument=this,e;for(var i=e.firstChild;i;){var n=i.nextSibling;this.insertBefore(i,t),i=n}return e},removeChild:function(e){return this.documentElement==e&&(this.documentElement=null),Ks(this,e)},importNode:function(e,t){return function e(t,i,n){var r;switch(i.nodeType){case gs:(r=i.cloneNode(!1)).ownerDocument=t;case Cs:break;case vs:n=!0}r=r||i.cloneNode(!1);r.ownerDocument=t;r.parentNode=null;if(n)for(var a=i.firstChild;a;)r.appendChild(e(t,a,n)),a=a.nextSibling;return r}(this,e,t)},getElementById:function(t){var i=null;return Ws(this.documentElement,function(e){if(e.nodeType==gs&&e.getAttribute(\"id\")==t)return i=e,!0}),i},getElementsByClassName:function(e){var n=new RegExp(\"(^|\\\\s)\"+e+\"(\\\\s|$)\");return new Ms(this,function(t){var i=[];return Ws(t.documentElement,function(e){e!==t&&e.nodeType==gs&&n.test(e.getAttribute(\"class\"))&&i.push(e)}),i})},createElement:function(e){var t=new Ys;return t.ownerDocument=this,t.nodeName=e,t.tagName=e,t.childNodes=new Rs,(t.attributes=new Us)._ownerElement=t},createDocumentFragment:function(){var e=new so;return e.ownerDocument=this,e.childNodes=new Rs,e},createTextNode:function(e){var t=new Zs;return t.ownerDocument=this,t.appendData(e),t},createComment:function(e){var t=new eo;return t.ownerDocument=this,t.appendData(e),t},createCDATASection:function(e){var t=new to;return t.ownerDocument=this,t.appendData(e),t},createProcessingInstruction:function(e,t){var i=new oo;return i.ownerDocument=this,i.tagName=i.target=e,i.nodeValue=i.data=t,i},createAttribute:function(e){var t=new $s;return t.ownerDocument=this,t.name=e,t.nodeName=e,t.localName=e,t.specified=!0,t},createEntityReference:function(e){var t=new ao;return t.ownerDocument=this,t.nodeName=e,t},createElementNS:function(e,t){var i=new Ys,n=t.split(\":\"),r=i.attributes=new Us;return i.childNodes=new Rs,i.ownerDocument=this,i.nodeName=t,i.tagName=t,i.namespaceURI=e,2==n.length?(i.prefix=n[0],i.localName=n[1]):i.localName=t,r._ownerElement=i},createAttributeNS:function(e,t){var i=new $s,n=t.split(\":\");return i.ownerDocument=this,i.nodeName=t,i.name=t,i.namespaceURI=e,i.specified=!0,2==n.length?(i.prefix=n[0],i.localName=n[1]):i.localName=t,i}},ps(zs,qs),zs.prototype.getElementsByTagName=(Ys.prototype={nodeType:gs,hasAttribute:function(e){return null!=this.getAttributeNode(e)},getAttribute:function(e){var t=this.getAttributeNode(e);return t&&t.value||\"\"},getAttributeNode:function(e){return this.attributes.getNamedItem(e)},setAttribute:function(e,t){var i=this.ownerDocument.createAttribute(e);i.value=i.nodeValue=\"\"+t,this.setAttributeNode(i)},removeAttribute:function(e){var t=this.getAttributeNode(e);t&&this.removeAttributeNode(t)},appendChild:function(e){return e.nodeType===Cs?this.insertBefore(e,null):function(e,t){var i=t.parentNode;if(i){var n=e.lastChild;i.removeChild(t);n=e.lastChild}return n=e.lastChild,t.parentNode=e,t.previousSibling=n,t.nextSibling=null,n?n.nextSibling=t:e.firstChild=t,e.lastChild=t,Xs(e.ownerDocument,e,t),t}(this,e)},setAttributeNode:function(e){return this.attributes.setNamedItem(e)},setAttributeNodeNS:function(e){return this.attributes.setNamedItemNS(e)},removeAttributeNode:function(e){return this.attributes.removeNamedItem(e.nodeName)},removeAttributeNS:function(e,t){var i=this.getAttributeNodeNS(e,t);i&&this.removeAttributeNode(i)},hasAttributeNS:function(e,t){return null!=this.getAttributeNodeNS(e,t)},getAttributeNS:function(e,t){var i=this.getAttributeNodeNS(e,t);return i&&i.value||\"\"},setAttributeNS:function(e,t,i){var n=this.ownerDocument.createAttributeNS(e,t);n.value=n.nodeValue=\"\"+i,this.setAttributeNode(n)},getAttributeNodeNS:function(e,t){return this.attributes.getNamedItemNS(e,t)},getElementsByTagName:function(n){return new Ms(this,function(t){var i=[];return Ws(t,function(e){e===t||e.nodeType!=gs||\"*\"!==n&&e.tagName!=n||i.push(e)}),i})},getElementsByTagNameNS:function(n,r){return new Ms(this,function(t){var i=[];return Ws(t,function(e){e===t||e.nodeType!==gs||\"*\"!==n&&e.namespaceURI!==n||\"*\"!==r&&e.localName!=r||i.push(e)}),i})}}).getElementsByTagName,zs.prototype.getElementsByTagNameNS=Ys.prototype.getElementsByTagNameNS,ps(Ys,qs),$s.prototype.nodeType=vs,ps($s,qs),Js.prototype={data:\"\",substringData:function(e,t){return this.data.substring(e,e+t)},appendData:function(e){e=this.data+e,this.nodeValue=this.data=e,this.length=e.length},insertData:function(e,t){this.replaceData(e,0,t)},appendChild:function(e){throw new Error(As[Ps])},deleteData:function(e,t){this.replaceData(e,t,\"\")},replaceData:function(e,t,i){i=this.data.substring(0,e)+i+this.data.substring(e+t),this.nodeValue=this.data=i,this.length=i.length}},ps(Js,qs),Zs.prototype={nodeName:\"#text\",nodeType:ys,splitText:function(e){var t=this.data,i=t.substring(e);t=t.substring(0,e),this.data=this.nodeValue=t,this.length=t.length;var n=this.ownerDocument.createTextNode(i);return this.parentNode&&this.parentNode.insertBefore(n,this.nextSibling),n}},ps(Zs,Js),eo.prototype={nodeName:\"#comment\",nodeType:ks},ps(eo,Js),to.prototype={nodeName:\"#cdata-section\",nodeType:_s},ps(to,Js),io.prototype.nodeType=Es,ps(io,qs),no.prototype.nodeType=Is,ps(no,qs),ro.prototype.nodeType=Ts,ps(ro,qs),ao.prototype.nodeType=bs,ps(ao,qs),so.prototype.nodeName=\"#document-fragment\",so.prototype.nodeType=Cs,ps(so,qs),oo.prototype.nodeType=Ss,ps(oo,qs),uo.prototype.serializeToString=function(e,t,i){return lo.call(e,t,i)},qs.prototype.toString=lo;try{if(Object.defineProperty){Object.defineProperty(Ms.prototype,\"length\",{get:function(){return Ns(this),this.$$length}}),Object.defineProperty(qs.prototype,\"textContent\",{get:function(){return function e(t){switch(t.nodeType){case gs:case Cs:var i=[];for(t=t.firstChild;t;)7!==t.nodeType&&8!==t.nodeType&&i.push(e(t)),t=t.nextSibling;return i.join(\"\");default:return t.nodeValue}}(this)},set:function(e){switch(this.nodeType){case gs:case Cs:for(;this.firstChild;)this.removeChild(this.firstChild);(e||String(e))&&this.appendChild(this.ownerDocument.createTextNode(e));break;default:this.data=e,this.value=e,this.nodeValue=e}}}),po=function(e,t,i){e[\"$$\"+t]=i}}}catch(e){}function fo(e){return!!e&&\"object\"==typeof e}function mo(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return t.reduce(function(t,i){return\"object\"!=typeof i||Object.keys(i).forEach(function(e){Array.isArray(t[e])&&Array.isArray(i[e])?t[e]=t[e].concat(i[e]):fo(t[e])&&fo(i[e])?t[e]=mo(t[e],i[e]):t[e]=i[e]}),t},{})}function go(e){return e.reduce(function(e,t){return e.concat(t)},[])}function vo(e){if(!e.length)return[];for(var t=[],i=0;i<e.length;i++)t.push(e[i]);return t}function yo(e){var t=e.baseUrl,i=void 0===t?\"\":t,n=e.source,r=void 0===n?\"\":n,a=e.range,s=void 0===a?\"\":a,o=e.indexRange,u=void 0===o?\"\":o,l={uri:r,resolvedUri:Ta(i||\"\",r)};if(s||u){var c=(s||u).split(\"-\"),d=parseInt(c[0],10),h=parseInt(c[1],10);l.byterange={length:h-d+1,offset:d}}return l}function _o(e){return e&&\"number\"!=typeof e&&(e=parseInt(e,10)),isNaN(e)?null:e}function bo(e){var t=e.type,i=void 0===t?\"static\":t,n=e.duration,r=e.timescale,a=void 0===r?1:r,s=e.sourceDuration,o=du[i](e),u=function(e,t){for(var i=[],n=e;n<t;n++)i.push(n);return i}(o.start,o.end).map(function(o){return function(e,t){var i=o.duration,n=o.timescale,r=void 0===n?1:n,a=o.periodIndex,s=o.startNumber;return{number:(void 0===s?1:s)+e,duration:i/r,timeline:a,time:t*i}}}(e));if(\"static\"===i){var l=u.length-1;u[l].duration=s-n/a*l}return u}function To(e){var t=e.baseUrl,i=e.initialization,n=void 0===i?{}:i,r=e.sourceDuration,a=e.indexRange,s=void 0===a?\"\":a,o=e.duration;if(!t)throw new Error(uu);var u=yo({baseUrl:t,source:n.sourceURL,range:n.range}),l=yo({baseUrl:t,source:t,indexRange:s});if(l.map=u,o){var c=bo(e);c.length&&(l.duration=c[0].duration,l.timeline=c[0].timeline)}else r&&(l.duration=r,l.timeline=0);return l.number=0,[l]}function So(e,t,i){for(var n=e.sidx.map?e.sidx.map:null,r=e.sidx.duration,a=e.timeline||0,s=e.sidx.byterange,o=s.offset+s.length,u=t.timescale,l=t.references.filter(function(e){return 1!==e.referenceType}),c=[],d=o+t.firstOffset,h=0;h<l.length;h++){var p=t.references[h],f=p.referencedSize,m=p.subsegmentDuration,g=To({baseUrl:i,timescale:u,timeline:a,periodIndex:a,duration:m,sourceDuration:r,indexRange:d+\"-\"+(d+f-1)})[0];n&&(g.map=n),c.push(g),d+=f}return e.segments=c,e}function ko(e){return function(t){return Object.keys(t).map(function(e){return t[e]})}(e.reduce(function(e,t){var i,n=t.attributes.id+(t.attributes.lang||\"\");e[n]?(t.segments[0]&&(t.segments[0].discontinuity=!0),(i=e[n].segments).push.apply(i,t.segments),t.attributes.contentProtection&&(e[n].attributes.contentProtection=t.attributes.contentProtection)):e[n]=t;return e},{})).map(function(e){return e.discontinuityStarts=function(e,n){return e.reduce(function(e,t,i){return t[n]&&e.push(i),e},[])}(e.segments,\"discontinuity\"),e})}function wo(e,t){if(void 0===t&&(t={}),!Object.keys(t).length)return e;for(var i in e){var n=e[i];if(n.sidx){var r=n.sidx.uri+\"-\"+(s=n.sidx.byterange,void 0,o=s.offset+s.length-1,s.offset+\"-\"+o),a=t[r]&&t[r].sidx;n.sidx&&a&&So(n,a,n.sidx.resolvedUri)}}var s,o;return e}function Eo(e){var t,i=e.attributes,n=e.segments,r=e.sidx,a={attributes:(t={NAME:i.id,AUDIO:\"audio\",SUBTITLES:\"subs\",RESOLUTION:{width:i.width,height:i.height},CODECS:i.codecs,BANDWIDTH:i.bandwidth},t[\"PROGRAM-ID\"]=1,t),uri:\"\",endList:\"static\"===(i.type||\"static\"),timeline:i.periodIndex,resolvedUri:\"\",targetDuration:i.duration,segments:n,mediaSequence:n.length?n[0].number:1};return i.contentProtection&&(a.contentProtection=i.contentProtection),r&&(a.sidx=r),a}function Co(e,t,i){var n;if(void 0===i&&(i={}),!e.length)return{};var r=e[0].attributes,a=r.sourceDuration,s=r.type,o=void 0===s?\"static\":s,u=r.suggestedPresentationDelay,l=r.minimumUpdatePeriod,c=ko(e.filter(function(e){var t=e.attributes;return\"video/mp4\"===t.mimeType||\"video/webm\"===t.mimeType||\"video\"===t.contentType})).map(Eo),d=ko(e.filter(function(e){var t=e.attributes;return\"audio/mp4\"===t.mimeType||\"audio/webm\"===t.mimeType||\"audio\"===t.contentType})),h=e.filter(function(e){var t=e.attributes;return\"text/vtt\"===t.mimeType||\"text\"===t.contentType}),p={allowCache:!0,discontinuityStarts:[],segments:[],endList:!0,mediaGroups:(n={AUDIO:{},VIDEO:{}},n[\"CLOSED-CAPTIONS\"]={},n.SUBTITLES={},n),uri:\"\",duration:a,playlists:wo(c,i)};return 0<=l&&(p.minimumUpdatePeriod=1e3*l),t&&(p.locations=t),\"dynamic\"===o&&(p.suggestedPresentationDelay=u),d.length&&(p.mediaGroups.AUDIO.audio=function(e,s){var o;void 0===s&&(s={});var t=e.reduce(function(e,t){var i=t.attributes.role&&t.attributes.role.value||\"\",n=t.attributes.lang||\"\",r=\"main\";if(n){var a=i?\" (\"+i+\")\":\"\";r=t.attributes.lang+a}return e[r]&&e[r].playlists[0].attributes.BANDWIDTH>t.attributes.bandwidth||(e[r]={language:n,autoselect:!0,default:\"main\"===i,playlists:wo([function(e){var t,i=e.attributes,n=e.segments,r=e.sidx,a={attributes:(t={NAME:i.id,BANDWIDTH:i.bandwidth,CODECS:i.codecs},t[\"PROGRAM-ID\"]=1,t),uri:\"\",endList:\"static\"===(i.type||\"static\"),timeline:i.periodIndex,resolvedUri:\"\",targetDuration:i.duration,segments:n,mediaSequence:n.length?n[0].number:1};return i.contentProtection&&(a.contentProtection=i.contentProtection),r&&(a.sidx=r),a}(t)],s),uri:\"\"},\"undefined\"==typeof o&&\"main\"===i&&((o=t).default=!0)),e},{});o||(t[Object.keys(t)[0]].default=!0);return t}(d,i)),h.length&&(p.mediaGroups.SUBTITLES.subs=function(e,n){return void 0===n&&(n={}),e.reduce(function(e,t){var i=t.attributes.lang||\"text\";return e[i]||(e[i]={language:i,default:!1,autoselect:!1,playlists:wo([function(e){var t,i=e.attributes,n=e.segments;\"undefined\"==typeof n&&(n=[{uri:i.baseUrl,timeline:i.periodIndex,resolvedUri:i.baseUrl||\"\",duration:i.sourceDuration,number:0}],i.duration=i.sourceDuration);var r=((t={NAME:i.id,BANDWIDTH:i.bandwidth})[\"PROGRAM-ID\"]=1,t);return i.codecs&&(r.CODECS=i.codecs),{attributes:r,uri:\"\",endList:\"static\"===(i.type||\"static\"),timeline:i.periodIndex,resolvedUri:i.baseUrl||\"\",targetDuration:i.duration,segments:n,mediaSequence:n.length?n[0].number:1}}(t)],n),uri:\"\"}),e},{})}(h,i)),p}function Io(e,t){for(var i,n,r,a,s,o,u,l,c,d,h,p,f=e.type,m=void 0===f?\"static\":f,g=e.minimumUpdatePeriod,v=void 0===g?0:g,y=e.media,_=void 0===y?\"\":y,b=e.sourceDuration,T=e.timescale,S=void 0===T?1:T,k=e.startNumber,w=void 0===k?1:k,E=e.periodIndex,C=[],I=-1,x=0;x<t.length;x++){var A=t[x],P=A.d,L=A.r||0,O=A.t||0;I<0&&(I=O),O&&I<O&&(I=O);var D=void 0;if(L<0){var R=x+1;D=R===t.length?\"dynamic\"===m&&0<v&&0<_.indexOf(\"$Number$\")?(n=I,r=P,void 0,a=(i=e).NOW,s=i.clientOffset,o=i.availabilityStartTime,u=i.timescale,l=void 0===u?1:u,c=i.start,d=void 0===c?0:c,h=i.minimumUpdatePeriod,p=(a+s)/1e3+(void 0===h?0:h)-(o+d),Math.ceil((p*l-n)/r)):(b*S-I)/P:(t[R].t-I)/P}else D=L+1;for(var M=w+C.length+D,N=w+C.length;N<M;)C.push({number:N,duration:P/S,time:I,timeline:E}),I+=P,N++}return C}function xo(e,t){return e.replace(hu,function(a){return function(e,t,i,n){if(\"$$\"===e)return\"$\";if(\"undefined\"==typeof a[t])return e;var r=\"\"+a[t];return\"RepresentationID\"===t?r:(n=i?parseInt(n,10):1)<=r.length?r:new Array(n-r.length+1).join(\"0\")+r}}(t))}function Ao(i,e){var n={RepresentationID:i.id,Bandwidth:i.bandwidth||0},t=i.initialization,r=void 0===t?{sourceURL:\"\",range:\"\"}:t,a=yo({baseUrl:i.baseUrl,source:xo(r.sourceURL,n),range:r.range});return function(e,t){return e.duration||t?e.duration?bo(e):Io(e,t):[{number:e.startNumber||1,duration:e.sourceDuration,time:0,timeline:e.periodIndex}]}(i,e).map(function(e){n.Number=e.number,n.Time=e.time;var t=xo(i.media||\"\",n);return{uri:t,timeline:e.timeline,duration:e.duration,resolvedUri:Ta(i.baseUrl||\"\",t),map:a,number:e.number}})}function Po(t,e){var i=t.duration,n=t.segmentUrls,r=void 0===n?[]:n;if(!i&&!e||i&&e)throw new Error(lu);var a,s=r.map(function(e){return function(e,t){var i=e.baseUrl,n=e.initialization,r=void 0===n?{}:n,a=yo({baseUrl:i,source:r.sourceURL,range:r.range}),s=yo({baseUrl:i,source:t.media,range:t.mediaRange});return s.map=a,s}(t,e)});return i&&(a=bo(t)),e&&(a=Io(t,e)),a.map(function(e,t){if(s[t]){var i=s[t];return i.timeline=e.timeline,i.duration=e.duration,i.number=e.number,i}}).filter(function(e){return e})}function Lo(e){var t,i,n=e.attributes,r=e.segmentInfo;r.template?(i=Ao,t=mo(n,r.template)):r.base?(i=To,t=mo(n,r.base)):r.list&&(i=Po,t=mo(n,r.list));var a={attributes:n};if(!i)return a;var s=i(t,r.timeline);if(t.duration){var o=t,u=o.duration,l=o.timescale,c=void 0===l?1:l;t.duration=u/c}else s.length?t.duration=s.reduce(function(e,t){return Math.max(e,Math.ceil(t.duration))},0):t.duration=0;return a.attributes=t,a.segments=s,r.base&&t.indexRange&&(a.sidx=s[0],a.segments=[]),a}function Oo(e,t){return vo(e.childNodes).filter(function(e){return e.tagName===t})}function Do(e){return e.textContent.trim()}function Ro(e){var t=/P(?:(\\d*)Y)?(?:(\\d*)M)?(?:(\\d*)D)?(?:T(?:(\\d*)H)?(?:(\\d*)M)?(?:([\\d.]*)S)?)?/.exec(e);if(!t)return 0;var i=t.slice(1),n=i[0],r=i[1],a=i[2],s=i[3],o=i[4],u=i[5];return 31536e3*parseFloat(n||0)+2592e3*parseFloat(r||0)+86400*parseFloat(a||0)+3600*parseFloat(s||0)+60*parseFloat(o||0)+parseFloat(u||0)}function Mo(e){return e&&e.attributes?vo(e.attributes).reduce(function(e,t){var i=pu[t.name]||pu.DEFAULT;return e[t.name]=i(t.value),e},{}):{}}function No(e,i){return i.length?go(e.map(function(t){return i.map(function(e){return Ta(t,Do(e))})})):e}function Uo(e){var t=Oo(e,\"SegmentTemplate\")[0],i=Oo(e,\"SegmentList\")[0],n=i&&Oo(i,\"SegmentURL\").map(function(e){return mo({tag:\"SegmentURL\"},Mo(e))}),r=Oo(e,\"SegmentBase\")[0],a=i||t,s=a&&Oo(a,\"SegmentTimeline\")[0],o=i||r||t,u=o&&Oo(o,\"Initialization\")[0],l=t&&Mo(t);l&&u?l.initialization=u&&Mo(u):l&&l.initialization&&(l.initialization={sourceURL:l.initialization});var c={template:l,timeline:s&&Oo(s,\"S\").map(function(e){return Mo(e)}),list:i&&mo(Mo(i),{segmentUrls:n,initialization:Mo(u)}),base:r&&mo(Mo(r),{initialization:Mo(u)})};return Object.keys(c).forEach(function(e){c[e]||delete c[e]}),c}function Bo(c,d,h){return function(e){var t=Mo(e),i=No(d,Oo(e,\"BaseURL\")),n=Oo(e,\"Role\")[0],r={role:Mo(n)},a=mo(c,t,r),s=function(e){return e.reduce(function(e,t){var i=Mo(t),n=fu[i.schemeIdUri];if(n){e[n]={attributes:i};var r=Oo(t,\"cenc:pssh\")[0];if(r){var a=Do(r),s=a&&Ra(a);e[n].pssh=s}}return e},{})}(Oo(e,\"ContentProtection\"));Object.keys(s).length&&(a=mo(a,{contentProtection:s}));var o=Uo(e),u=Oo(e,\"Representation\"),l=mo(h,o);return go(u.map(function(a,s,o){return function(e){var t=Oo(e,\"BaseURL\"),i=No(s,t),n=mo(a,Mo(e)),r=Uo(e);return i.map(function(e){return{segmentInfo:mo(o,r),attributes:mo(n,{baseUrl:e})}})}}(a,i,l)))}}function Fo(e,t){void 0===t&&(t={});var i=t,n=i.manifestUri,r=void 0===n?\"\":n,a=i.NOW,s=void 0===a?Date.now():a,o=i.clientOffset,u=void 0===o?0:o,l=Oo(e,\"Period\");if(!l.length)throw new Error(au);var c=Oo(e,\"Location\"),d=Mo(e),h=No([r],Oo(e,\"BaseURL\"));return d.sourceDuration=d.mediaPresentationDuration||0,d.NOW=s,d.clientOffset=u,c.length&&(d.locations=c.map(Do)),{locations:d.locations,representationInfo:go(l.map(function(l,c){return function(e,t){var i=No(c,Oo(e,\"BaseURL\")),n=Mo(e),r=parseInt(n.id,10),a=qa.isNaN(r)?t:r,s=mo(l,{periodIndex:a}),o=Oo(e,\"AdaptationSet\"),u=Uo(e);return go(o.map(Bo(s,i,u)))}}(d,h)))}}function jo(e){if(\"\"===e)throw new Error(su);var t,i,n=new ru;try{i=(t=n.parseFromString(e,\"application/xml\"))&&\"MPD\"===t.documentElement.tagName?t.documentElement:null}catch(e){}if(!i||i&&0<i.getElementsByTagName(\"parsererror\").length)throw new Error(ou);return i}function Vo(e,t){void 0===t&&(t={});var i=Fo(jo(e),t),n=function(e){return e.map(Lo)}(i.representationInfo);return Co(n,i.locations,t.sidxMapping)}function qo(e){return function(e){var t=Oo(e,\"UTCTiming\")[0];if(!t)return null;var i=Mo(t);switch(i.schemeIdUri){case\"urn:mpeg:dash:utc:http-head:2014\":case\"urn:mpeg:dash:utc:http-head:2012\":i.method=\"HEAD\";break;case\"urn:mpeg:dash:utc:http-xsdate:2014\":case\"urn:mpeg:dash:utc:http-iso:2014\":case\"urn:mpeg:dash:utc:http-xsdate:2012\":case\"urn:mpeg:dash:utc:http-iso:2012\":i.method=\"GET\";break;case\"urn:mpeg:dash:utc:direct:2014\":case\"urn:mpeg:dash:utc:direct:2012\":i.method=\"DIRECT\",i.value=Date.parse(i.value);break;case\"urn:mpeg:dash:utc:http-ntp:2014\":case\"urn:mpeg:dash:utc:ntp:2014\":case\"urn:mpeg:dash:utc:sntp:2014\":default:throw new Error(cu)}return i}(jo(e))}function Ho(e){return e instanceof Uint8Array?e:(Array.isArray(e)||function(e){return ArrayBuffer.isView(e)}(e)||e instanceof ArrayBuffer||(e=\"number\"!=typeof e||\"number\"==typeof e&&e!=e?0:[e]),new Uint8Array(e&&e.buffer||e,e&&e.byteOffset||0,e&&e.byteLength||0))}function Wo(e,t){var i=(void 0===t?{}:t).le,n=void 0!==i&&i;(\"bigint\"!=typeof e&&\"number\"!=typeof e||\"number\"==typeof e&&e!=e)&&(e=0);for(var r=function(e){return Math.ceil(function(e){return e.toString(2).length}(e)/8)}(e=yu(e)),a=new Uint8Array(new ArrayBuffer(r)),s=0;s<r;s++){var o=n?s:Math.abs(s+1-a.length);a[o]=Number(e/_u[s]&yu(255)),e<0&&(a[o]=Math.abs(~a[o]),a[o]-=0===s?1:2)}return a}function zo(e,t){if(\"string\"!=typeof e&&e&&\"function\"==typeof e.toString&&(e=e.toString()),\"string\"!=typeof e)return new Uint8Array;t||(e=unescape(encodeURIComponent(e)));for(var i=new Uint8Array(e.length),n=0;n<e.length;n++)i[n]=e.charCodeAt(n);return i}function Go(i,e,t){var n=void 0===t?{}:t,r=n.offset,a=void 0===r?0:r,s=n.mask,o=void 0===s?[]:s;i=Ho(i);var u=(e=Ho(e)).every?e.every:Array.prototype.every;return e.length&&i.length-a>=e.length&&u.call(e,function(e,t){return e===(o[t]?o[t]&i[a+t]:i[a+t])})}function Xo(e,t){return void 0===t&&(t=0),(e=Ho(e)).length-t<10||!Go(e,bu,{offset:t})?t:Xo(e,t+=function(e,t){void 0===t&&(t=0);var i=(e=Ho(e))[t+5],n=e[t+6]<<21|e[t+7]<<14|e[t+8]<<7|e[t+9];return(16&i)>>4?20+n:10+n}(e,t))}function Ko(e){return\"string\"==typeof e?zo(e):e}function Qo(e,t,i){void 0===i&&(i=!1),t=function(e){return Array.isArray(e)?e.map(function(e){return Ko(e)}):[Ko(e)]}(t),e=Ho(e);var n=[];if(!t.length)return n;for(var r=0;r<e.length;){var a=(e[r]<<24|e[r+1]<<16|e[r+2]<<8|e[r+3])>>>0,s=e.subarray(r+4,r+8);if(0==a)break;var o=r+a;if(o>e.length){if(i)break;o=e.length}var u=e.subarray(r+8,o);Go(s,t[0])&&(1===t.length?n.push(u):n.push.apply(n,Qo(u,t.slice(1),i))),r=o}return n}function Yo(e,t,i,n){void 0===i&&(i=!0),void 0===n&&(n=!1);var r=function(e){for(var t=1,i=0;i<Su.length&&!(e&Su[i]);i++)t++;return t}(e[t]),a=e.subarray(t,t+r);return i&&((a=Array.prototype.slice.call(e,t,t+r))[0]^=Su[r-1]),{length:r,value:function(r,e){var t=void 0===e?{}:e,i=t.signed,n=void 0!==i&&i,a=t.le,s=void 0!==a&&a;r=Ho(r);var o=s?\"reduce\":\"reduceRight\",u=(r[o]?r[o]:Array.prototype[o]).call(r,function(e,t,i){var n=s?i:Math.abs(i+1-r.length);return e+yu(t)*_u[n]},yu(0));if(n){var l=_u[r.length]/yu(2)-yu(1);l<(u=yu(u))&&(u-=l,u-=l,u-=yu(2))}return Number(u)}(a,{signed:n}),bytes:a}}function $o(e){return\"string\"==typeof e?e.match(/.{1,2}/g).map(function(e){return $o(e)}):\"number\"==typeof e?Wo(e):e}function Jo(e,t,i){if(i>=t.length)return t.length;var n=Yo(t,i,!1);if(Go(e.bytes,n.bytes))return i;var r=Yo(t,i+n.length);return Jo(e,t,i+r.length+r.value+n.length)}function Zo(e,t){t=function(e){return Array.isArray(e)?e.map(function(e){return $o(e)}):[$o(e)]}(t),e=Ho(e);var i=[];if(!t.length)return i;for(var n=0;n<e.length;){var r=Yo(e,n,!1),a=Yo(e,n+r.length),s=n+r.length+a.length;127===a.value&&(a.value=Jo(r,e,s),a.value!==e.length&&(a.value-=s));var o=s+a.value>e.length?e.length:s+a.value,u=e.subarray(s,o);Go(t[0],r.bytes)&&(1===t.length?i.push(u):i=i.concat(Zo(u,t.slice(1)))),n+=r.length+a.length+u.length}return i}function eu(e){for(var t=[],i=1;i<e.length-2;)Go(e.subarray(i,i+3),Eu)&&(t.push(i+2),i++),i++;if(0===t.length)return e;var n=e.length-t.length,r=new Uint8Array(n),a=0;for(i=0;i<n;a++,i++)a===t[0]&&(a++,t.shift()),r[i]=e[a];return r}function tu(e,t,i,n){void 0===n&&(n=1/0),e=Ho(e),i=[].concat(i);for(var r,a=0,s=0;a<e.length&&(s<n||r);){var o=void 0;if(Go(e.subarray(a),ku)?o=4:Go(e.subarray(a),wu)&&(o=3),o){if(s++,r)return eu(e.subarray(r,a));var u=void 0;\"h264\"===t?u=31&e[a+o]:\"h265\"===t&&(u=e[a+o]>>1&63),-1!==i.indexOf(u)&&(r=a+o),a+=o+(\"h264\"===t?1:2)}else a++}return e.subarray(0,0)}var iu={Node:qs,DOMImplementation:Vs,XMLSerializer:uo},nu=i(function(e,t){function i(e){this.options=e||{locator:{}}}function c(){this.cdata=!1}function d(e,t){t.lineNumber=e.lineNumber,t.columnNumber=e.columnNumber}function h(e){if(e)return\"\\n@\"+(e.systemId||\"\")+\"#[line:\"+e.lineNumber+\",col:\"+e.columnNumber+\"]\"}function r(e,t,i){return\"string\"==typeof e?e.substr(t,i):e.length>=t+i||t?new java.lang.String(e,t,i)+\"\":e}function p(e,t){e.currentElement?e.currentElement.appendChild(t):e.doc.appendChild(t)}i.prototype.parseFromString=function(e,t){var i=this.options,n=new f,r=i.domBuilder||new c,a=i.errorHandler,s=i.locator,o=i.xmlns||{},u=/\\/x?html?$/.test(t),l=u?Ha.entityMap:{lt:\"<\",gt:\">\",amp:\"&\",quot:'\"',apos:\"'\"};return s&&r.setDocumentLocator(s),n.errorHandler=function(n,e,r){if(!n){if(e instanceof c)return e;n=e}var a={},s=n instanceof Function;function t(t){var i=n[t];!i&&s&&(i=2==n.length?function(e){n(t,e)}:n),a[t]=i&&function(e){i(\"[xmldom \"+t+\"]\\t\"+e+h(r))}||function(){}}return r=r||{},t(\"warning\"),t(\"error\"),t(\"fatalError\"),a}(a,r,s),n.domBuilder=i.domBuilder||r,u&&(o[\"\"]=\"http://www.w3.org/1999/xhtml\"),o.xml=o.xml||\"http://www.w3.org/XML/1998/namespace\",e&&\"string\"==typeof e?n.parse(e,o,l):n.errorHandler.error(\"invalid doc source\"),r.doc},c.prototype={startDocument:function(){this.doc=(new n).createDocument(null,null,null),this.locator&&(this.doc.documentURI=this.locator.systemId)},startElement:function(e,t,i,n){var r=this.doc,a=r.createElementNS(e,i||t),s=n.length;p(this,a),this.currentElement=a,this.locator&&d(this.locator,a);for(var o=0;o<s;o++){e=n.getURI(o);var u=n.getValue(o),l=(i=n.getQName(o),r.createAttributeNS(e,i));this.locator&&d(n.getLocator(o),l),l.value=l.nodeValue=u,a.setAttributeNode(l)}},endElement:function(e,t,i){var n=this.currentElement;n.tagName;this.currentElement=n.parentNode},startPrefixMapping:function(e,t){},endPrefixMapping:function(e){},processingInstruction:function(e,t){var i=this.doc.createProcessingInstruction(e,t);this.locator&&d(this.locator,i),p(this,i)},ignorableWhitespace:function(e,t,i){},characters:function(e,t,i){if(e=r.apply(this,arguments)){if(this.cdata)var n=this.doc.createCDATASection(e);else n=this.doc.createTextNode(e);this.currentElement?this.currentElement.appendChild(n):/^\\s*$/.test(e)&&this.doc.appendChild(n),this.locator&&d(this.locator,n)}},skippedEntity:function(e){},endDocument:function(){this.doc.normalize()},setDocumentLocator:function(e){(this.locator=e)&&(e.lineNumber=0)},comment:function(e,t,i){e=r.apply(this,arguments);var n=this.doc.createComment(e);this.locator&&d(this.locator,n),p(this,n)},startCDATA:function(){this.cdata=!0},endCDATA:function(){this.cdata=!1},startDTD:function(e,t,i){var n=this.doc.implementation;if(n&&n.createDocumentType){var r=n.createDocumentType(e,t,i);this.locator&&d(this.locator,r),p(this,r)}},warning:function(e){},error:function(e){},fatalError:function(e){throw e}},\"endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl\".replace(/\\w+/g,function(e){c.prototype[e]=function(){return null}});var f=ds.XMLReader,n=t.DOMImplementation=iu.DOMImplementation;t.XMLSerializer=iu.XMLSerializer,t.DOMParser=i}),ru=(nu.DOMImplementation,nu.XMLSerializer,nu.DOMParser),au=\"INVALID_NUMBER_OF_PERIOD\",su=\"DASH_EMPTY_MANIFEST\",ou=\"DASH_INVALID_XML\",uu=\"NO_BASE_URL\",lu=\"SEGMENT_TIME_UNSPECIFIED\",cu=\"UNSUPPORTED_UTC_TIMING_SCHEME\",du={static:function(e){var t=e.duration,i=e.timescale,n=void 0===i?1:i,r=e.sourceDuration,a=_o(e.endNumber);return{start:0,end:\"number\"==typeof a?a:Math.ceil(r/(t/n))}},dynamic:function(e){var t=e.NOW,i=e.clientOffset,n=e.availabilityStartTime,r=e.timescale,a=void 0===r?1:r,s=e.duration,o=e.start,u=void 0===o?0:o,l=e.minimumUpdatePeriod,c=void 0===l?0:l,d=e.timeShiftBufferDepth,h=void 0===d?1/0:d,p=_o(e.endNumber),f=(t+i)/1e3,m=n+u,g=f+c-m,v=Math.ceil(g*a/s),y=Math.floor((f-m-h)*a/s),_=Math.floor((f-m)*a/s);return{start:Math.max(0,y),end:\"number\"==typeof p?p:Math.min(v,_)}}},hu=/\\$([A-z]*)(?:(%0)([0-9]+)d)?\\$/g,pu={mediaPresentationDuration:function(e){return Ro(e)},availabilityStartTime:function(e){return function(e){return/^\\d+-\\d+-\\d+T\\d+:\\d+:\\d+(\\.\\d+)?$/.test(e)&&(e+=\"Z\"),Date.parse(e)}(e)/1e3},minimumUpdatePeriod:function(e){return Ro(e)},suggestedPresentationDelay:function(e){return Ro(e)},type:function(e){return e},timeShiftBufferDepth:function(e){return Ro(e)},start:function(e){return Ro(e)},width:function(e){return parseInt(e,10)},height:function(e){return parseInt(e,10)},bandwidth:function(e){return parseInt(e,10)},startNumber:function(e){return parseInt(e,10)},timescale:function(e){return parseInt(e,10)},duration:function(e){var t=parseInt(e,10);return isNaN(t)?Ro(e):t},d:function(e){return parseInt(e,10)},t:function(e){return parseInt(e,10)},r:function(e){return parseInt(e,10)},DEFAULT:function(e){return e}},fu={\"urn:uuid:1077efec-c0b2-4d02-ace3-3c1e52e2fb4b\":\"org.w3.clearkey\",\"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed\":\"com.widevine.alpha\",\"urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95\":\"com.microsoft.playready\",\"urn:uuid:f239e769-efa3-4850-9c16-a903c6932efb\":\"com.adobe.primetime\"},mu=So,gu=Math.pow(2,32),vu=function(e){var t=new DataView(e.buffer,e.byteOffset,e.byteLength),i={version:e[0],flags:new Uint8Array(e.subarray(1,4)),references:[],referenceId:t.getUint32(4),timescale:t.getUint32(8)},n=12;0===i.version?(i.earliestPresentationTime=t.getUint32(n),i.firstOffset=t.getUint32(n+4),n+=8):(i.earliestPresentationTime=t.getUint32(n)*gu+t.getUint32(n+4),i.firstOffset=t.getUint32(n+8)*gu+t.getUint32(n+12),n+=16),n+=2;var r=t.getUint16(n);for(n+=2;0<r;n+=12,r--)i.references.push({referenceType:(128&e[n])>>>7,referencedSize:2147483647&t.getUint32(n),subsegmentDuration:t.getUint32(n+4),startsWithSap:!!(128&e[n+8]),sapType:(112&e[n+8])>>>4,sapDeltaTime:268435455&t.getUint32(n+8)});return i},yu=Ia.BigInt||Number,_u=[yu(\"0x1\"),yu(\"0x100\"),yu(\"0x10000\"),yu(\"0x1000000\"),yu(\"0x100000000\"),yu(\"0x10000000000\"),yu(\"0x1000000000000\"),yu(\"0x100000000000000\"),yu(\"0x10000000000000000\")],bu=Ho([73,68,51]),Tu={EBML:Ho([26,69,223,163]),DocType:Ho([66,130]),Segment:Ho([24,83,128,103]),SegmentInfo:Ho([21,73,169,102]),Tracks:Ho([22,84,174,107]),Track:Ho([174]),TrackNumber:Ho([215]),DefaultDuration:Ho([35,227,131]),TrackEntry:Ho([174]),TrackType:Ho([131]),FlagDefault:Ho([136]),CodecID:Ho([134]),CodecPrivate:Ho([99,162]),VideoTrack:Ho([224]),AudioTrack:Ho([225]),Cluster:Ho([31,67,182,117]),Timestamp:Ho([231]),TimestampScale:Ho([42,215,177]),BlockGroup:Ho([160]),BlockDuration:Ho([155]),Block:Ho([161]),SimpleBlock:Ho([163])},Su=[128,64,32,16,8,4,2,1],ku=Ho([0,0,0,1]),wu=Ho([0,0,1]),Eu=Ho([0,0,3]),Cu={webm:Ho([119,101,98,109]),matroska:Ho([109,97,116,114,111,115,107,97]),flac:Ho([102,76,97,67]),ogg:Ho([79,103,103,83]),ac3:Ho([11,119]),riff:Ho([82,73,70,70]),avi:Ho([65,86,73]),wav:Ho([87,65,86,69]),\"3gp\":Ho([102,116,121,112,51,103]),mp4:Ho([102,116,121,112]),fmp4:Ho([115,116,121,112]),mov:Ho([102,116,121,112,113,116])},Iu={aac:function(e){var t=Xo(e);return Go(e,[255,16],{offset:t,mask:[255,22]})},mp3:function(e){var t=Xo(e);return Go(e,[255,2],{offset:t,mask:[255,6]})},webm:function(e){var t=Zo(e,[Tu.EBML,Tu.DocType])[0];return Go(t,Cu.webm)},mkv:function(e){var t=Zo(e,[Tu.EBML,Tu.DocType])[0];return Go(t,Cu.matroska)},mp4:function(e){return!Iu[\"3gp\"](e)&&!Iu.mov(e)&&(Go(e,Cu.mp4,{offset:4})||Go(e,Cu.fmp4,{offset:4}))},mov:function(e){return Go(e,Cu.mov,{offset:4})},\"3gp\":function(e){return Go(e,Cu[\"3gp\"],{offset:4})},ac3:function(e){var t=Xo(e);return Go(e,Cu.ac3,{offset:t})},ts:function(e){if(e.length<189&&1<=e.length)return 71===e[0];for(var t=0;t+188<e.length&&t<188;){if(71===e[t]&&71===e[t+188])return!0;t+=1}return!1},flac:function(e){var t=Xo(e);return Go(e,Cu.flac,{offset:t})},ogg:function(e){return Go(e,Cu.ogg)},avi:function(e){return Go(e,Cu.riff)&&Go(e,Cu.avi,{offset:8})},wav:function(e){return Go(e,Cu.riff)&&Go(e,Cu.wav,{offset:8})},h264:function(e){return function(e,t,i){return tu(e,\"h264\",t,i)}(e,7,3).length},h265:function(e){return function(e,t,i){return tu(e,\"h265\",t,i)}(e,[32,33],3).length}},xu=Object.keys(Iu).filter(function(e){return\"ts\"!==e&&\"h264\"!==e&&\"h265\"!==e}).concat([\"ts\",\"h264\",\"h265\"]);xu.forEach(function(e){var t=Iu[e];Iu[e]=function(e){return t(Ho(e))}});function Au(e){e=Ho(e);for(var t=0;t<xu.length;t++){var i=xu[t];if(Ou[i](e))return i}return\"\"}function Pu(e){return 0<Qo(e,[\"moof\"]).length}function Lu(){this.init=function(){var a={};this.on=function(e,t){a[e]||(a[e]=[]),a[e]=a[e].concat(t)},this.off=function(e,t){var i;return!!a[e]&&(i=a[e].indexOf(t),a[e]=a[e].slice(),a[e].splice(i,1),-1<i)},this.trigger=function(e){var t,i,n,r;if(t=a[e])if(2===arguments.length)for(n=t.length,i=0;i<n;++i)t[i].call(this,arguments[1]);else{for(r=[],i=arguments.length,i=1;i<arguments.length;++i)r.push(arguments[i]);for(n=t.length,i=0;i<n;++i)t[i].apply(this,r)}},this.dispose=function(){a={}}}}var Ou=Iu,Du=27,Ru=15,Mu=21;Lu.prototype.pipe=function(t){return this.on(\"data\",function(e){t.push(e)}),this.on(\"done\",function(e){t.flush(e)}),this.on(\"partialdone\",function(e){t.partialFlush(e)}),this.on(\"endedtimeline\",function(e){t.endTimeline(e)}),this.on(\"reset\",function(e){t.reset(e)}),t},Lu.prototype.push=function(e){this.trigger(\"data\",e)},Lu.prototype.flush=function(e){this.trigger(\"done\",e)},Lu.prototype.partialFlush=function(e){this.trigger(\"partialdone\",e)},Lu.prototype.endTimeline=function(e){this.trigger(\"endedtimeline\",e)},Lu.prototype.reset=function(e){this.trigger(\"reset\",e)};function Nu(e,t){var i=1;for(t<e&&(i=-1);4294967296<Math.abs(t-e);)e+=8589934592*i;return e}new Lu;function Uu(e){var t=31&e[1];return t<<=8,t|=e[2]}function Bu(e){return!!(64&e[1])}function Fu(e){var t=0;return 1<(48&e[3])>>>4&&(t+=e[4]+1),t}function ju(e){switch(e){case 5:return\"slice_layer_without_partitioning_rbsp_idr\";case 6:return\"sei_rbsp\";case 7:return\"seq_parameter_set_rbsp\";case 8:return\"pic_parameter_set_rbsp\";case 9:return\"access_unit_delimiter_rbsp\";default:return null}}function Vu(e,t){var i=e[t+6]<<21|e[t+7]<<14|e[t+8]<<7|e[t+9];return i=0<=i?i:0,(16&e[t+5])>>4?i+20:i+10}function qu(e){return e[0]<<21|e[1]<<14|e[2]<<7|e[3]}var Hu,Wu,zu,Gu,Xu={parseType:function(e,t){var i=Uu(e);return 0===i?\"pat\":i===t?\"pmt\":t?\"pes\":null},parsePat:function(e){var t=Bu(e),i=4+Fu(e);return t&&(i+=e[i]+1),(31&e[i+10])<<8|e[i+11]},parsePmt:function(e){var t={},i=Bu(e),n=4+Fu(e);if(i&&(n+=e[n]+1),1&e[n+5]){var r;r=3+((15&e[n+1])<<8|e[n+2])-4;for(var a=12+((15&e[n+10])<<8|e[n+11]);a<r;){var s=n+a;t[(31&e[s+1])<<8|e[s+2]]=e[s],a+=5+((15&e[s+3])<<8|e[s+4])}return t}},parsePayloadUnitStartIndicator:Bu,parsePesType:function(e,t){switch(t[Uu(e)]){case Du:return\"video\";case Ru:return\"audio\";case Mu:return\"timed-metadata\";default:return null}},parsePesTime:function(e){if(!Bu(e))return null;var t=4+Fu(e);if(t>=e.byteLength)return null;var i,n=null;return 192&(i=e[t+7])&&((n={}).pts=(14&e[t+9])<<27|(255&e[t+10])<<20|(254&e[t+11])<<12|(255&e[t+12])<<5|(254&e[t+13])>>>3,n.pts*=4,n.pts+=(6&e[t+13])>>>1,n.dts=n.pts,64&i&&(n.dts=(14&e[t+14])<<27|(255&e[t+15])<<20|(254&e[t+16])<<12|(255&e[t+17])<<5|(254&e[t+18])>>>3,n.dts*=4,n.dts+=(6&e[t+18])>>>1)),n},videoPacketContainsKeyFrame:function(e){for(var t=4+Fu(e),i=e.subarray(t),n=0,r=0,a=!1;r<i.byteLength-3;r++)if(1===i[r+2]){n=r+5;break}for(;n<i.byteLength;)switch(i[n]){case 0:if(0!==i[n-1]){n+=2;break}if(0!==i[n-2]){n++;break}for(r+3!==n-2&&\"slice_layer_without_partitioning_rbsp_idr\"===ju(31&i[r+3])&&(a=!0);1!==i[++n]&&n<i.length;);r=n-2,n+=3;break;case 1:if(0!==i[n-1]||0!==i[n-2]){n+=3;break}\"slice_layer_without_partitioning_rbsp_idr\"===ju(31&i[r+3])&&(a=!0),r=n-2,n+=3;break;default:n+=3}return i=i.subarray(r),n-=r,r=0,i&&3<i.byteLength&&\"slice_layer_without_partitioning_rbsp_idr\"===ju(31&i[r+3])&&(a=!0),a}},Ku=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350],Qu={isLikelyAacData:function(e){var t=function e(t,i){return t.length-i<10||t[i]!==\"I\".charCodeAt(0)||t[i+1]!==\"D\".charCodeAt(0)||t[i+2]!==\"3\".charCodeAt(0)?i:e(t,i+=Vu(t,i))}(e,0);return e.length>=t+2&&255==(255&e[t])&&240==(240&e[t+1])&&16==(22&e[t+1])},parseId3TagSize:Vu,parseAdtsSize:function(e,t){var i=(224&e[t+5])>>5,n=e[t+4]<<3;return 6144&e[t+3]|n|i},parseType:function(e,t){return e[t]===\"I\".charCodeAt(0)&&e[t+1]===\"D\".charCodeAt(0)&&e[t+2]===\"3\".charCodeAt(0)?\"timed-metadata\":!0&e[t]&&240==(240&e[t+1])?\"audio\":null},parseSampleRate:function(e){for(var t=0;t+5<e.length;){if(255===e[t]&&240==(246&e[t+1]))return Ku[(60&e[t+2])>>>2];t++}return null},parseAacTimestamp:function(e){var t,i,n;t=10,64&e[5]&&(t+=4,t+=qu(e.subarray(10,14)));do{if((i=qu(e.subarray(t+4,t+8)))<1)return null;if(\"PRIV\"===String.fromCharCode(e[t],e[t+1],e[t+2],e[t+3])){n=e.subarray(t+10,t+i+10);for(var r=0;r<n.byteLength;r++)if(0===n[r]){if(\"com.apple.streaming.transportStreamTimestamp\"!==unescape(function(e,t,i){var n,r=\"\";for(n=t;n<i;n++)r+=\"%\"+(\"00\"+e[n].toString(16)).slice(-2);return r}(n,0,r)))break;var a=n.subarray(r+1),s=(1&a[3])<<30|a[4]<<22|a[5]<<14|a[6]<<6|a[7]>>>2;return s*=4,s+=3&a[7]}}t+=10,t+=i}while(t<e.byteLength);return null}},Yu=9e4,$u=(Hu=function(e){return 9e4*e},Wu=function(e,t){return e*t},zu=function(e){return e/9e4},Gu=function(e,t){return e/t},Yu),Ju=Nu,Zu={};Zu.ts=Xu,Zu.aac=Qu;function el(e,t,i){for(var n,r,a,s,o=0,u=ol,l=!1;u<=e.byteLength;)if(71!==e[o]||71!==e[u]&&u!==e.byteLength)o++,u++;else{switch(n=e.subarray(o,u),Zu.ts.parseType(n,t.pid)){case\"pes\":r=Zu.ts.parsePesType(n,t.table),a=Zu.ts.parsePayloadUnitStartIndicator(n),\"audio\"===r&&a&&(s=Zu.ts.parsePesTime(n))&&(s.type=\"audio\",i.audio.push(s),l=!0)}if(l)break;o+=ol,u+=ol}for(o=(u=e.byteLength)-ol,l=!1;0<=o;)if(71!==e[o]||71!==e[u]&&u!==e.byteLength)o--,u--;else{switch(n=e.subarray(o,u),Zu.ts.parseType(n,t.pid)){case\"pes\":r=Zu.ts.parsePesType(n,t.table),a=Zu.ts.parsePayloadUnitStartIndicator(n),\"audio\"===r&&a&&(s=Zu.ts.parsePesTime(n))&&(s.type=\"audio\",i.audio.push(s),l=!0)}if(l)break;o-=ol,u-=ol}}function tl(e,t,i){for(var n,r,a,s,o,u,l,c=0,d=ol,h=!1,p={data:[],size:0};d<e.byteLength;)if(71!==e[c]||71!==e[d])c++,d++;else{switch(n=e.subarray(c,d),Zu.ts.parseType(n,t.pid)){case\"pes\":if(r=Zu.ts.parsePesType(n,t.table),a=Zu.ts.parsePayloadUnitStartIndicator(n),\"video\"===r&&(a&&!h&&(s=Zu.ts.parsePesTime(n))&&(s.type=\"video\",i.video.push(s),h=!0),!i.firstKeyFrame)){if(a&&0!==p.size){for(o=new Uint8Array(p.size),u=0;p.data.length;)l=p.data.shift(),o.set(l,u),u+=l.byteLength;if(Zu.ts.videoPacketContainsKeyFrame(o)){var f=Zu.ts.parsePesTime(o);f&&(i.firstKeyFrame=f,i.firstKeyFrame.type=\"video\")}p.size=0}p.data.push(n),p.size+=n.byteLength}}if(h&&i.firstKeyFrame)break;c+=ol,d+=ol}for(c=(d=e.byteLength)-ol,h=!1;0<=c;)if(71!==e[c]||71!==e[d])c--,d--;else{switch(n=e.subarray(c,d),Zu.ts.parseType(n,t.pid)){case\"pes\":r=Zu.ts.parsePesType(n,t.table),a=Zu.ts.parsePayloadUnitStartIndicator(n),\"video\"===r&&a&&(s=Zu.ts.parsePesTime(n))&&(s.type=\"video\",i.video.push(s),h=!0)}if(h)break;c-=ol,d-=ol}}function il(e){var t={pid:null,table:null},i={};for(var n in function(e,t){for(var i,n=0,r=ol;r<e.byteLength;)if(71!==e[n]||71!==e[r])n++,r++;else{switch(i=e.subarray(n,r),Zu.ts.parseType(i,t.pid)){case\"pat\":t.pid||(t.pid=Zu.ts.parsePat(i));break;case\"pmt\":t.table||(t.table=Zu.ts.parsePmt(i))}if(t.pid&&t.table)return;n+=ol,r+=ol}}(e,t),t.table){if(t.table.hasOwnProperty(n))switch(t.table[n]){case Du:i.video=[],tl(e,t,i),0===i.video.length&&delete i.video;break;case Ru:i.audio=[],el(e,t,i),0===i.audio.length&&delete i.audio}}return i}var nl,rl,al,sl=Yu,ol=188,ul=function(e,t){var i;return(i=Zu.aac.isLikelyAacData(e)?function(e){for(var t,i=!1,n=0,r=null,a=null,s=0,o=0;3<=e.length-o;){switch(Zu.aac.parseType(e,o)){case\"timed-metadata\":if(e.length-o<10){i=!0;break}if((s=Zu.aac.parseId3TagSize(e,o))>e.length){i=!0;break}null===a&&(t=e.subarray(o,o+s),a=Zu.aac.parseAacTimestamp(t)),o+=s;break;case\"audio\":if(e.length-o<7){i=!0;break}if((s=Zu.aac.parseAdtsSize(e,o))>e.length){i=!0;break}null===r&&(t=e.subarray(o,o+s),r=Zu.aac.parseSampleRate(t)),n++,o+=s;break;default:o++}if(i)return null}if(null===r||null===a)return null;var u=sl/r;return{audio:[{type:\"audio\",dts:a,pts:a},{type:\"audio\",dts:a+1024*n*u,pts:a+1024*n*u}]}}(e):il(e))&&(i.audio||i.video)?(function(e,t){if(e.audio&&e.audio.length){var i=t;\"undefined\"!=typeof i&&!isNaN(i)||(i=e.audio[0].dts),e.audio.forEach(function(e){e.dts=Ju(e.dts,i),e.pts=Ju(e.pts,i),e.dtsTime=e.dts/sl,e.ptsTime=e.pts/sl})}if(e.video&&e.video.length){var n=t;if(\"undefined\"!=typeof n&&!isNaN(n)||(n=e.video[0].dts),e.video.forEach(function(e){e.dts=Ju(e.dts,n),e.pts=Ju(e.pts,n),e.dtsTime=e.dts/sl,e.ptsTime=e.pts/sl}),e.firstKeyFrame){var r=e.firstKeyFrame;r.dts=Ju(r.dts,n),r.pts=Ju(r.pts,n),r.dtsTime=r.dts/sl,r.ptsTime=r.pts/sl}}}(i,t),i):null},ll=function(e){return e>>>0},cl=function(e){var t=\"\";return t+=String.fromCharCode(e[0]),t+=String.fromCharCode(e[1]),t+=String.fromCharCode(e[2]),t+=String.fromCharCode(e[3])},dl=ll,hl=function e(t,i){var n,r,a,s,o,u=[];if(!i.length)return null;for(n=0;n<t.byteLength;)r=dl(t[n]<<24|t[n+1]<<16|t[n+2]<<8|t[n+3]),a=cl(t.subarray(n+4,n+8)),s=1<r?n+r:t.byteLength,a===i[0]&&(1===i.length?u.push(t.subarray(n+8,s)):(o=e(t.subarray(n+8,s),i.slice(1))).length&&(u=u.concat(o))),n=s;return u},pl=function(e){var t,i=new DataView(e.buffer,e.byteOffset,e.byteLength),n={version:e[0],flags:new Uint8Array(e.subarray(1,4)),trackId:i.getUint32(4)},r=1&n.flags[2],a=2&n.flags[2],s=8&n.flags[2],o=16&n.flags[2],u=32&n.flags[2],l=65536&n.flags[0],c=131072&n.flags[0];return t=8,r&&(t+=4,n.baseDataOffset=i.getUint32(12),t+=4),a&&(n.sampleDescriptionIndex=i.getUint32(t),t+=4),s&&(n.defaultSampleDuration=i.getUint32(t),t+=4),o&&(n.defaultSampleSize=i.getUint32(t),t+=4),u&&(n.defaultSampleFlags=i.getUint32(t)),l&&(n.durationIsEmpty=!0),!r&&c&&(n.baseDataOffsetIsMoof=!0),n},fl=function(e){return{isLeading:(12&e[0])>>>2,dependsOn:3&e[0],isDependedOn:(192&e[1])>>>6,hasRedundancy:(48&e[1])>>>4,paddingValue:(14&e[1])>>>1,isNonSyncSample:1&e[1],degradationPriority:e[2]<<8|e[3]}},ml=function(e){var t,i={version:e[0],flags:new Uint8Array(e.subarray(1,4)),samples:[]},n=new DataView(e.buffer,e.byteOffset,e.byteLength),r=1&i.flags[2],a=4&i.flags[2],s=1&i.flags[1],o=2&i.flags[1],u=4&i.flags[1],l=8&i.flags[1],c=n.getUint32(4),d=8;for(r&&(i.dataOffset=n.getInt32(d),d+=4),a&&c&&(t={flags:fl(e.subarray(d,d+4))},d+=4,s&&(t.duration=n.getUint32(d),d+=4),o&&(t.size=n.getUint32(d),d+=4),l&&(1===i.version?t.compositionTimeOffset=n.getInt32(d):t.compositionTimeOffset=n.getUint32(d),d+=4),i.samples.push(t),c--);c--;)t={},s&&(t.duration=n.getUint32(d),d+=4),o&&(t.size=n.getUint32(d),d+=4),u&&(t.flags=fl(e.subarray(d,d+4)),d+=4),l&&(1===i.version?t.compositionTimeOffset=n.getInt32(d):t.compositionTimeOffset=n.getUint32(d),d+=4),i.samples.push(t);return i},gl=ll,vl=function(e){var t={version:e[0],flags:new Uint8Array(e.subarray(1,4)),baseMediaDecodeTime:gl(e[4]<<24|e[5]<<16|e[6]<<8|e[7])};return 1===t.version&&(t.baseMediaDecodeTime*=Math.pow(2,32),t.baseMediaDecodeTime+=gl(e[8]<<24|e[9]<<16|e[10]<<8|e[11])),t},yl=ll,_l=function(e){return(\"00\"+e.toString(16)).slice(-2)};nl=function(a,e){var t,i,n;return t=hl(e,[\"moof\",\"traf\"]),i=[].concat.apply([],t.map(function(r){return hl(r,[\"tfhd\"]).map(function(e){var t,i,n;return t=yl(e[4]<<24|e[5]<<16|e[6]<<8|e[7]),i=a[t]||9e4,(n=\"number\"!=typeof(n=hl(r,[\"tfdt\"]).map(function(e){var t,i;return t=e[0],i=yl(e[4]<<24|e[5]<<16|e[6]<<8|e[7]),1===t&&(i*=Math.pow(2,32),i+=yl(e[8]<<24|e[9]<<16|e[10]<<8|e[11])),i})[0])||isNaN(n)?1/0:n)/i})})),n=Math.min.apply(null,i),isFinite(n)?n:0},rl=function(e){var t=hl(e,[\"moov\",\"trak\"]),h=[];return t.forEach(function(e){var t,i,n={},r=hl(e,[\"tkhd\"])[0];r&&(i=(t=new DataView(r.buffer,r.byteOffset,r.byteLength)).getUint8(0),n.id=0===i?t.getUint32(12):t.getUint32(20));var a=hl(e,[\"mdia\",\"hdlr\"])[0];if(a){var s=cl(a.subarray(8,12));n.type=\"vide\"===s?\"video\":\"soun\"===s?\"audio\":s}var o=hl(e,[\"mdia\",\"minf\",\"stbl\",\"stsd\"])[0];if(o){var u=o.subarray(8);n.codec=cl(u.subarray(4,8));var l,c=hl(u,[n.codec])[0];c&&(/^[a-z]vc[1-9]$/i.test(n.codec)?(l=c.subarray(78),\"avcC\"===cl(l.subarray(4,8))&&11<l.length?(n.codec+=\".\",n.codec+=_l(l[9]),n.codec+=_l(l[10]),n.codec+=_l(l[11])):n.codec=\"avc1.4d400d\"):/^mp4[a,v]$/i.test(n.codec)?(l=c.subarray(28),\"esds\"===cl(l.subarray(4,8))&&20<l.length&&0!==l[19]?(n.codec+=\".\"+_l(l[19]),n.codec+=\".\"+_l(l[20]>>>2&63).replace(/^0/,\"\")):n.codec=\"mp4a.40.2\"):n.codec=n.codec.toLowerCase())}var d=hl(e,[\"mdia\",\"mdhd\"])[0];d&&(n.timescale=al(d)),h.push(n)}),h};function bl(e){return e?e.replace(/avc1\\.(\\d+)\\.(\\d+)/i,function(e,t,i){return\"avc1.\"+(\"00\"+Number(t).toString(16)).slice(-2)+\"00\"+(\"00\"+Number(i).toString(16)).slice(-2)}):e}function Tl(e){void 0===e&&(e=\"\");var t=e.split(\",\"),s=[];return t.forEach(function(r){var a;r=r.trim(),$c.forEach(function(e){var t=Yc[e].exec(r.toLowerCase());if(t&&!(t.length<=1)){a=e;var i=r.substring(0,t[1].length),n=r.replace(i,\"\");s.push({type:i,details:n,mediaType:e})}}),a||s.push({type:r,details:\"\",mediaType:\"unknown\"})}),s}function Sl(e){return void 0===e&&(e=\"\"),Yc.audio.test(e.trim().toLowerCase())}function kl(e){if(e&&\"string\"==typeof e){var t=e.toLowerCase().split(\",\").map(function(e){return bl(e.trim())}),i=\"video\";1===t.length&&Sl(t[0])?i=\"audio\":1===t.length&&function(e){return void 0===e&&(e=\"\"),Yc.text.test(e.trim().toLowerCase())}(t[0])&&(i=\"application\");var n=\"mp4\";return t.every(function(e){return Yc.mp4.test(e)})?n=\"mp4\":t.every(function(e){return Yc.webm.test(e)})?n=\"webm\":t.every(function(e){return Yc.ogg.test(e)})&&(n=\"ogg\"),i+\"/\"+n+';codecs=\"'+e+'\"'}}function wl(e){return void 0===e&&(e=\"\"),Ia.MediaSource&&Ia.MediaSource.isTypeSupported&&Ia.MediaSource.isTypeSupported(kl(e))||!1}function El(e){return void 0===e&&(e=\"\"),e.toLowerCase().split(\",\").every(function(e){e=e.trim();for(var t=0;t<Jc.length;t++){if(Yc[\"muxer\"+Jc[t]].test(e))return!0}return!1})}function Cl(e,t,i){return e&&i&&i.responseURL&&t!==i.responseURL?i.responseURL:t}function Il(e){return ga.log.debug?ga.log.debug.bind(ga,\"VHS:\",e+\" >\"):function(){}}function xl(e,t){return e+\"-\"+t}function Al(e){var t=e.onwarn,i=e.oninfo,n=e.manifestString,r=e.customTagParsers,a=void 0===r?[]:r,s=e.customTagMappers,o=void 0===s?[]:s,u=new Fa;return t&&u.on(\"warn\",t),i&&u.on(\"info\",i),a.forEach(function(e){return u.addParser(e)}),o.forEach(function(e){return u.addTagMapper(e)}),u.push(n),u.end(),u.manifest}function Pl(r,a){[\"AUDIO\",\"SUBTITLES\"].forEach(function(e){for(var t in r.mediaGroups[e])for(var i in r.mediaGroups[e][t]){var n=r.mediaGroups[e][t][i];a(n,e,t,i)}})}function Ll(e){var t=e.playlist,i=e.uri,n=e.id;t.id=n,i&&(t.uri=i),t.attributes=t.attributes||{}}function Ol(s,e){s.uri=e;for(var t=0;t<s.playlists.length;t++)if(!s.playlists[t].uri){var i=\"placeholder-uri-\"+t;s.playlists[t].uri=i}Pl(s,function(e,t,i,n){if(e.playlists&&e.playlists.length&&!e.playlists[0].uri){var r=\"placeholder-uri-\"+t+\"-\"+i+\"-\"+n,a=xl(0,r);e.playlists[0].uri=r,e.playlists[0].id=a,s.playlists[a]=e.playlists[0],s.playlists[r]=e.playlists[0]}}),function(e){for(var t=e.playlists.length;t--;){var i=e.playlists[t];Ll({playlist:i,id:xl(t,i.uri)}),i.resolvedUri=ed(e.uri,i.uri),e.playlists[i.id]=i,(e.playlists[i.uri]=i).attributes.BANDWIDTH||td.warn(\"Invalid playlist STREAM-INF detected. Missing BANDWIDTH attribute.\")}}(s),function(t){Pl(t,function(e){e.uri&&(e.resolvedUri=ed(t.uri,e.uri))})}(s)}function Dl(e,t){e.resolvedUri||(e.resolvedUri=ed(t,e.uri)),e.key&&!e.key.resolvedUri&&(e.key.resolvedUri=ed(t,e.key.uri)),e.map&&!e.map.resolvedUri&&(e.map.resolvedUri=ed(t,e.map.uri))}function Rl(e,t){return e===t||e.segments&&t.segments&&e.segments.length===t.segments.length&&e.endList===t.endList&&e.mediaSequence===t.mediaSequence}function Ml(e,t,i){void 0===i&&(i=Rl);var n=id(e,{}),r=n.playlists[t.id];if(!r)return null;if(i(r,t))return null;var a=id(r,t);r.segments&&(a.segments=function(e,t,i){var n=t.slice();i=i||0;for(var r=Math.min(e.length,t.length+i),a=i;a<r;a++)n[a-i]=id(e[a],n[a-i]);return n}(r.segments,t.segments,t.mediaSequence-r.mediaSequence)),a.segments.forEach(function(e){Dl(e,a.resolvedUri)});for(var s=0;s<n.playlists.length;s++)n.playlists[s].id===t.id&&(n.playlists[s]=a);return n.playlists[t.id]=a,n.playlists[t.uri]=a,n}function Nl(e,t){var i=e.segments[e.segments.length-1];return t&&i&&i.duration?1e3*i.duration:500*(e.targetDuration||10)}function Ul(e,t){var i,n=[];if(e&&e.length)for(i=0;i<e.length;i++)t(e.start(i),e.end(i))&&n.push([e.start(i),e.end(i)]);return ga.createTimeRanges(n)}function Bl(e,i){return Ul(e,function(e,t){return e-.1<=i&&i<=t+.1})}function Fl(e,t){return Ul(e,function(e){return t<=e-rd})}function jl(e){var t=[];if(!e||!e.length)return\"\";for(var i=0;i<e.length;i++)t.push(e.start(i)+\" => \"+e.end(i));return t.join(\", \")}function Vl(e){for(var t=[],i=0;i<e.length;i++)t.push({start:e.start(i),end:e.end(i)});return t}function ql(e,t,i){if(\"undefined\"==typeof t&&(t=e.mediaSequence+e.segments.length),t<e.mediaSequence)return 0;var n=function(e,t){var i=0,n=t-e.mediaSequence,r=e.segments[n];if(r){if(\"undefined\"!=typeof r.start)return{result:r.start,precise:!0};if(\"undefined\"!=typeof r.end)return{result:r.end-r.duration,precise:!0}}for(;n--;){if(\"undefined\"!=typeof(r=e.segments[n]).end)return{result:i+r.end,precise:!0};if(i+=r.duration,\"undefined\"!=typeof r.start)return{result:i+r.start,precise:!0}}return{result:i,precise:!1}}(e,t);if(n.precise)return n.result;var r=function(e,t){for(var i,n=0,r=t-e.mediaSequence;r<e.segments.length;r++){if(\"undefined\"!=typeof(i=e.segments[r]).start)return{result:i.start-n,precise:!0};if(n+=i.duration,\"undefined\"!=typeof i.end)return{result:i.end-n,precise:!0}}return{result:-1,precise:!1}}(e,t);return r.precise?r.result:n.result+i}function Hl(e,t,i){if(!e)return 0;if(\"number\"!=typeof i&&(i=0),\"undefined\"==typeof t){if(e.totalDuration)return e.totalDuration;if(!e.endList)return Ea.Infinity}return ql(e,t,i)}function Wl(e,t,i){var n=0;if(i<t){var r=[i,t];t=r[0],i=r[1]}if(t<0){for(var a=t;a<Math.min(0,i);a++)n+=e.targetDuration;t=0}for(var s=t;s<i;s++)n+=e.segments[s].duration;return n}function zl(e,t){if(!e.segments.length)return 0;var i=e.segments.length,n=e.segments[i-1].duration||e.targetDuration,r=\"number\"==typeof t?t:n+2*e.targetDuration;if(0===r)return i;for(var a=0;i--&&!(r<=(a+=e.segments[i].duration)););return Math.max(0,i)}function Gl(e,t,i,n){if(!e||!e.segments)return null;if(e.endList)return Hl(e);if(null===t)return null;t=t||0;var r=i?zl(e,n):e.segments.length;return ql(e,e.mediaSequence+r,t)}function Xl(e){return e.excludeUntil&&e.excludeUntil>Date.now()}function Kl(e){return e.excludeUntil&&e.excludeUntil===1/0}function Ql(e){var t=Xl(e);return!e.disabled&&!t}function Yl(e,t){return t.attributes&&t.attributes[e]}function $l(e,t){if(1===e.playlists.length)return!0;var i=t.attributes.BANDWIDTH||Number.MAX_VALUE;return 0===e.playlists.filter(function(e){return!!Ql(e)&&(e.attributes.BANDWIDTH||0)<i}).length}function Jl(e,t,i,n){var r=\"arraybuffer\"===e.responseType?e.response:e.responseText;!t&&r&&(e.responseTime=Date.now(),e.roundTripTime=e.responseTime-e.requestTime,e.bytesReceived=r.byteLength||r.length,e.bandwidth||(e.bandwidth=Math.floor(e.bytesReceived/e.roundTripTime*8*1e3))),i.headers&&(e.responseHeaders=i.headers),t&&\"ETIMEDOUT\"===t.code&&(e.timedout=!0),t||e.aborted||200===i.statusCode||206===i.statusCode||0===i.statusCode||(t=new Error(\"XHR Failed with a response of: \"+(e&&(r||e.responseText)))),n(t,e)}function Zl(){function s(e,i){e=ud({timeout:45e3},e);var t=s.beforeRequest||ga.Vhs.xhr.beforeRequest;if(t&&\"function\"==typeof t){var n=t(e);n&&(e=n)}var r=(!0===ga.Vhs.xhr.original?od:ga.Vhs.xhr)(e,function(e,t){return Jl(r,e,t,i)}),a=r.abort;return r.abort=function(){return r.aborted=!0,a.apply(r,arguments)},r.uri=e.uri,r.requestTime=Date.now(),r}return s.original=!0,s}function ec(e){var t={};return e.byterange&&(t.Range=function(e){var t=e.offset+e.length-1;return\"bytes=\"+e.offset+\"-\"+t}(e.byterange)),t}function tc(e,t){var i=e.toString(16);return\"00\".substring(0,2-i.length)+i+(t%2?\" \":\"\")}function ic(e){return 32<=e&&e<126?String.fromCharCode(e):\".\"}function nc(i){var n={};return Object.keys(i).forEach(function(e){var t=i[e];ArrayBuffer.isView(t)?n[e]={bytes:t.buffer,byteOffset:t.byteOffset,byteLength:t.byteLength}:n[e]=t}),n}function rc(e){var t=e.byterange||{length:1/0,offset:0};return[t.length,t.offset,e.resolvedUri].join(\",\")}function ac(e){return e.resolvedUri}function sc(e){for(var t=Array.prototype.slice.call(e),i=\"\",n=0;n<t.length/16;n++)i+=t.slice(16*n,16*n+16).map(tc).join(\"\")+\" \"+t.slice(16*n,16*n+16).map(ic).join(\"\")+\"\\n\";return i}function oc(e){var t=e.playlist,i=e.time,n=void 0===i?void 0:i,r=e.callback;if(!r)throw new Error(\"getProgramTime: callback must be provided\");if(!t||void 0===n)return r({message:\"getProgramTime: playlist and time must be provided\"});var a=function(e,t){if(!t||!t.segments||0===t.segments.length)return null;for(var i,n=0,r=0;r<t.segments.length&&!(e<=(n=(i=t.segments[r]).videoTimingInfo?i.videoTimingInfo.transmuxedPresentationEnd:n+i.duration));r++);var a=t.segments[t.segments.length-1];if(a.videoTimingInfo&&a.videoTimingInfo.transmuxedPresentationEnd<e)return null;if(n<e){if(e>n+.25*a.duration)return null;i=a}return{segment:i,estimatedStart:i.videoTimingInfo?i.videoTimingInfo.transmuxedPresentationStart:n-i.duration,type:i.videoTimingInfo?\"accurate\":\"estimate\"}}(n,t);if(!a)return r({message:\"valid programTime was not found\"});if(\"estimate\"===a.type)return r({message:\"Accurate programTime could not be determined. Please seek to e.seekTime and try again\",seekTime:a.estimatedStart});var s={mediaSeconds:n},o=function(e,t){if(!t.dateTimeObject)return null;var i=t.videoTimingInfo.transmuxerPrependedSeconds,n=e-(t.videoTimingInfo.transmuxedPresentationStart+i);return new Date(t.dateTimeObject.getTime()+1e3*n)}(n,a.segment);return o&&(s.programDateTime=o.toISOString()),r(null,s)}function uc(e){var t=e.programTime,i=e.playlist,n=e.retryCount,r=void 0===n?2:n,a=e.seekTo,s=e.pauseAfterSeek,o=void 0===s||s,u=e.tech,l=e.callback;if(!l)throw new Error(\"seekToProgramTime: callback must be provided\");if(\"undefined\"==typeof t||!i||!a)return l({message:\"seekToProgramTime: programTime, seekTo and playlist must be provided\"});if(!i.endList&&!u.hasStarted_)return l({message:\"player must be playing a live stream to start buffering\"});if(!function(e){if(!e.segments||0===e.segments.length)return!1;for(var t=0;t<e.segments.length;t++){if(!e.segments[t].dateTimeObject)return!1}return!0}(i))return l({message:\"programDateTime tags must be provided in the manifest \"+i.resolvedUri});var c=function(e,t){var i;try{i=new Date(e)}catch(e){return null}if(!t||!t.segments||0===t.segments.length)return null;var n=t.segments[0];if(i<n.dateTimeObject)return null;for(var r=0;r<t.segments.length-1;r++){if(n=t.segments[r],i<t.segments[r+1].dateTimeObject)break}var a=t.segments[t.segments.length-1],s=a.dateTimeObject,o=a.videoTimingInfo?function(e){return e.transmuxedPresentationEnd-e.transmuxedPresentationStart-e.transmuxerPrependedSeconds}(a.videoTimingInfo):a.duration+.25*a.duration;return new Date(s.getTime()+1e3*o)<i?null:(s<i&&(n=a),{segment:n,estimatedStart:n.videoTimingInfo?n.videoTimingInfo.transmuxedPresentationStart:sd.duration(t,t.mediaSequence+t.segments.indexOf(n)),type:n.videoTimingInfo?\"accurate\":\"estimate\"})}(t,i);if(!c)return l({message:t+\" was not found in the stream\"});var d=c.segment,h=function(e,t){var i,n;try{i=new Date(e),n=new Date(t)}catch(e){}var r=i.getTime();return(n.getTime()-r)/1e3}(d.dateTimeObject,t);if(\"estimate\"===c.type)return 0===r?l({message:t+\" is not buffered yet. Try again\"}):(a(c.estimatedStart+h),void u.one(\"seeked\",function(){uc({programTime:t,playlist:i,retryCount:r-1,seekTo:a,pauseAfterSeek:o,tech:u,callback:l})}));var p=d.start+h;u.one(\"seeked\",function(){return l(null,u.currentTime())}),o&&u.pause(),a(p)}function lc(e,t){if(4===e.readyState)return t()}function cc(e,t,r){function a(e,t,i,n){return t.abort(),u=!0,r(e,t,i,n)}function i(e,t){if(!u){if(e)return a(e,t,\"\",o);var i=t.responseText.substring(o&&o.byteLength||0,t.responseText.length);if(o=function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];if((t=t.filter(function(e){return e&&(e.byteLength||e.length)&&\"string\"!=typeof e})).length<=1)return Ho(t[0]);var n=t.reduce(function(e,t,i){return e+(t.byteLength||t.length)},0),r=new Uint8Array(n),a=0;return t.forEach(function(e){e=Ho(e),r.set(e,a),a+=e.byteLength}),r}(o,zo(i,!0)),s=s||Xo(o),o.length<10||s&&o.length<s+2)return lc(t,function(){return a(e,t,\"\",o)});var n=Au(o);return\"ts\"===n&&o.length<188?lc(t,function(){return a(e,t,\"\",o)}):!n&&o.length<376?lc(t,function(){return a(e,t,\"\",o)}):a(null,t,n,o)}}var s,o=[],u=!1,n=t({uri:e,beforeSend:function(t){t.overrideMimeType(\"text/plain; charset=x-user-defined\"),t.addEventListener(\"progress\",function(e){e.total,e.loaded;return Jl(t,null,{statusCode:t.status},i)})}},function(e,t){return Jl(n,e,t,i)});return n}function dc(e,t){if(!Rl(e,t))return!1;if(e.sidx&&t.sidx&&(e.sidx.offset!==t.sidx.offset||e.sidx.length!==t.sidx.length))return!1;if(!e.sidx&&t.sidx||e.sidx&&!t.sidx)return!1;if(e.segments&&!t.segments||!e.segments&&t.segments)return!1;if(!e.segments&&!t.segments)return!0;for(var i=0;i<e.segments.length;i++){var n=e.segments[i],r=t.segments[i];if(n.uri!==r.uri)return!1;if(n.byterange||r.byterange){var a=n.byterange,s=r.byterange;if(a&&!s||!a&&s)return!1;if(a.offset!==s.offset||a.length!==s.length)return!1}}return!0}function hc(e){var t=e.byterange.offset+e.byterange.length-1;return e.uri+\"-\"+e.byterange.offset+\"-\"+t}function pc(e,t){var i,n,r={};for(var a in e){var s=e[a].sidx;if(s){var o=hc(s);if(!t[o])break;var u=t[o].sidxInfo;i=u,n=s,(Boolean(!i.map&&!n.map)||Boolean(i.map&&n.map&&i.map.byterange.offset===n.map.byterange.offset&&i.map.byterange.length===n.map.byterange.length))&&i.uri===n.uri&&i.byterange.offset===n.byterange.offset&&i.byterange.length===n.byterange.length&&(r[o]=t[o])}}return r}function fc(e){for(var t=new Uint8Array(new ArrayBuffer(e.length)),i=0;i<e.length;i++)t[i]=e.charCodeAt(i);return t.buffer}function mc(e){return e.on=e.addEventListener,e.off=e.removeEventListener,e}function gc(n){return function(){var e=function(t){try{return URL.createObjectURL(new Blob([t],{type:\"application/javascript\"}))}catch(e){var i=new BlobBuilder;return i.append(t),URL.createObjectURL(i.getBlob())}}(n),t=mc(new Worker(e));t.objURL=e;var i=t.terminate;return t.on=t.addEventListener,t.off=t.removeEventListener,t.terminate=function(){return URL.revokeObjectURL(e),i.call(this)},t}}function vc(e){return\"var browserWorkerPolyFill = \"+mc.toString()+\";\\nbrowserWorkerPolyFill(self);\\n\"+e}function yc(e){return e.toString().replace(/^function.+?{/,\"\").slice(0,-1)}function _c(t){var i=t.transmuxer,e=t.bytes,n=t.audioAppendStart,r=t.gopsToAlignWith,a=t.isPartial,s=t.remux,o=t.onData,u=t.onTrackInfo,l=t.onAudioTimingInfo,c=t.onVideoTimingInfo,d=t.onVideoSegmentTimingInfo,h=t.onAudioSegmentTimingInfo,p=t.onId3,f=t.onCaptions,m=t.onDone,g=t.onEndedTimeline,v=t.isEndOfTimeline,y={isPartial:a,buffer:[]},_=v;if(i.onmessage=function(e){i.currentTransmux===t&&(\"data\"===e.data.action&&function(e,t,i){var n=e.data.segment,r=n.type,a=n.initSegment,s=n.captions,o=n.captionStreams,u=n.metadata,l=n.videoFrameDtsTime,c=n.videoFramePtsTime;t.buffer.push({captions:s,captionStreams:o,metadata:u});var d=e.data.segment.boxes||{data:e.data.segment.data},h={type:r,data:new Uint8Array(d.data,d.data.byteOffset,d.data.byteLength),initSegment:new Uint8Array(a.data,a.byteOffset,a.byteLength)};\"undefined\"!=typeof l&&(h.videoFrameDtsTime=l),\"undefined\"!=typeof c&&(h.videoFramePtsTime=c),i(h)}(e,y,o),\"trackinfo\"===e.data.action&&u(e.data.trackInfo),\"gopInfo\"===e.data.action&&function(e,t){t.gopInfo=e.data.gopInfo}(e,y),\"audioTimingInfo\"===e.data.action&&l(e.data.audioTimingInfo),\"videoTimingInfo\"===e.data.action&&c(e.data.videoTimingInfo),\"videoSegmentTimingInfo\"===e.data.action&&d(e.data.videoSegmentTimingInfo),\"audioSegmentTimingInfo\"===e.data.action&&h(e.data.audioSegmentTimingInfo),\"id3Frame\"===e.data.action&&p([e.data.id3Frame],e.data.id3Frame.dispatchType),\"caption\"===e.data.action&&f(e.data.caption),\"endedtimeline\"===e.data.action&&(_=!1,g()),\"transmuxed\"===e.data.type&&(_||(i.onmessage=null,function(e){var t=e.transmuxedData,i=e.callback;t.buffer=[],i(t)}({transmuxedData:y,callback:m}),fd(i))))},n&&i.postMessage({action:\"setAudioAppendStart\",appendStart:n}),Array.isArray(r)&&i.postMessage({action:\"alignGopsWith\",gopsToAlignWith:r}),\"undefined\"!=typeof s&&i.postMessage({action:\"setRemux\",remux:s}),e.byteLength){var b=e instanceof ArrayBuffer?e:e.buffer,T=e instanceof ArrayBuffer?0:e.byteOffset;i.postMessage({action:\"push\",data:b,byteOffset:T,byteLength:e.byteLength},[b])}i.postMessage({action:a?\"partialFlush\":\"flush\"}),v&&i.postMessage({action:\"endTimeline\"})}function bc(e,t){e.postMessage({action:t}),fd(e)}function Tc(e,t){if(!t.currentTransmux)return t.currentTransmux=e,void bc(t,e);t.transmuxQueue.push(bc.bind(null,t,e))}function Sc(e){if(!e.transmuxer.currentTransmux)return e.transmuxer.currentTransmux=e,void _c(e);e.transmuxer.transmuxQueue.push(e)}function kc(e){e.forEach(function(e){e.abort()})}function wc(e,t){return t.timedout?{status:t.status,message:\"HLS request timed-out at URL: \"+t.uri,code:yd,xhr:t}:t.aborted?{status:t.status,message:\"HLS request aborted at URL: \"+t.uri,code:_d,xhr:t}:e?{status:t.status,message:\"HLS request errored at URL: \"+t.uri,code:vd,xhr:t}:null}function Ec(e){var i=e.segment,t=e.bytes,n=e.isPartial,r=e.trackInfoFn,a=e.timingInfoFn,s=e.videoSegmentTimingInfoFn,o=e.audioSegmentTimingInfoFn,u=e.id3Fn,l=e.captionsFn,c=e.isEndOfTimeline,d=e.endedTimelineFn,h=e.dataFn,p=e.doneFn,f=i.map&&i.map.tracks||{},m=Boolean(f.audio&&f.video),g=a.bind(null,i,\"audio\",\"start\"),v=a.bind(null,i,\"audio\",\"end\"),y=a.bind(null,i,\"video\",\"start\"),_=a.bind(null,i,\"video\",\"end\");if(!n&&!i.lastReachedChar){var b=function(e,t){var i=\"number\"!=typeof t||isNaN(t)?void 0:t*$u,n=ul(e,i);if(!n)return null;var r={hasVideo:n.video&&2===n.video.length||!1,hasAudio:n.audio&&2===n.audio.length||!1};return r.hasVideo&&(r.videoStart=n.video[0].ptsTime),r.hasAudio&&(r.audioStart=n.audio[0].ptsTime),r}(t,i.baseStartTime);b&&(r(i,{hasAudio:b.hasAudio,hasVideo:b.hasVideo,isMuxed:m}),r=null,b.hasAudio&&!m&&g(b.audioStart),b.hasVideo&&y(b.videoStart),y=g=null)}Sc({bytes:t,transmuxer:i.transmuxer,audioAppendStart:i.audioAppendStart,gopsToAlignWith:i.gopsToAlignWith,isPartial:n,remux:m,onData:function(e){e.type=\"combined\"===e.type?\"video\":e.type,h(i,e)},onTrackInfo:function(e){r&&(m&&(e.isMuxed=!0),r(i,e))},onAudioTimingInfo:function(e){g&&\"undefined\"!=typeof e.start&&(g(e.start),g=null),v&&\"undefined\"!=typeof e.end&&v(e.end)},onVideoTimingInfo:function(e){y&&\"undefined\"!=typeof e.start&&(y(e.start),y=null),_&&\"undefined\"!=typeof e.end&&_(e.end)},onVideoSegmentTimingInfo:function(e){s(e)},onAudioSegmentTimingInfo:function(e){o(e)},onId3:function(e,t){u(i,e,t)},onCaptions:function(e){l(i,[e])},isEndOfTimeline:c&&!n,onEndedTimeline:function(){d()},onDone:function(e){p&&!n&&(e.type=\"combined\"===e.type?\"video\":e.type,p(null,i,e))}})}function Cc(e){var n=e.segment,r=e.bytes,t=e.isPartial,i=e.trackInfoFn,a=e.timingInfoFn,s=e.videoSegmentTimingInfoFn,o=e.audioSegmentTimingInfoFn,u=e.id3Fn,l=e.captionsFn,c=e.isEndOfTimeline,d=e.endedTimelineFn,h=e.dataFn,p=e.doneFn,f=new Uint8Array(r);if(Pu(f)){n.isFmp4=!0;var m=n.map.tracks,g={isFmp4:!0,hasVideo:!!m.video,hasAudio:!!m.audio};m.audio&&m.audio.codec&&\"enca\"!==m.audio.codec&&(g.audioCodec=m.audio.codec),m.video&&m.video.codec&&\"encv\"!==m.video.codec&&(g.videoCodec=m.video.codec),m.video&&m.audio&&(g.isMuxed=!0),i(n,g);var v=Kc(n.map.timescales,f);g.hasAudio&&!g.isMuxed&&a(n,\"audio\",\"start\",v),g.hasVideo&&a(n,\"video\",\"start\",v);var y=function(e){h(n,{data:r,type:g.hasAudio&&!g.isMuxed?\"audio\":\"video\"}),e&&e.length&&l(n,e),p(null,n,{})};if(!m.video||!r.byteLength||!n.transmuxer)return void y();var _=r instanceof ArrayBuffer?r:r.buffer,b=r instanceof ArrayBuffer?0:r.byteOffset;return n.transmuxer.addEventListener(\"message\",function e(t){if(\"mp4Captions\"===t.data.action){n.transmuxer.removeEventListener(\"message\",e);var i=t.data.data;n.bytes=r=new Uint8Array(i,i.byteOffset||0,i.byteLength),y(t.data.captions)}}),void n.transmuxer.postMessage({action:\"pushMp4Captions\",timescales:n.map.timescales,trackIds:[m.video.id],data:_,byteOffset:b,byteLength:r.byteLength},[_])}if(n.transmuxer){if(\"undefined\"==typeof n.container&&(n.container=Au(f)),\"ts\"!==n.container&&\"aac\"!==n.container)return i(n,{hasAudio:!1,hasVideo:!1}),void p(null,n,{});Ec({segment:n,bytes:r,isPartial:t,trackInfoFn:i,timingInfoFn:a,videoSegmentTimingInfoFn:s,audioSegmentTimingInfoFn:o,id3Fn:u,captionsFn:l,isEndOfTimeline:c,endedTimelineFn:d,dataFn:h,doneFn:p})}else p(null,n,{})}function Ic(e){var i=e.activeXhrs,n=e.decryptionWorker,r=e.trackInfoFn,a=e.timingInfoFn,s=e.videoSegmentTimingInfoFn,o=e.audioSegmentTimingInfoFn,u=e.id3Fn,l=e.captionsFn,c=e.isEndOfTimeline,d=e.endedTimelineFn,h=e.dataFn,p=e.doneFn,f=0,m=!1;return function(e,t){if(!m){if(e)return m=!0,kc(i),p(e,t);if((f+=1)===i.length){if(t.endOfAllRequests=Date.now(),t.encryptedBytes)return function(e){var t,n=e.decryptionWorker,r=e.segment,a=e.trackInfoFn,s=e.timingInfoFn,o=e.videoSegmentTimingInfoFn,u=e.audioSegmentTimingInfoFn,l=e.id3Fn,c=e.captionsFn,d=e.isEndOfTimeline,h=e.endedTimelineFn,p=e.dataFn,f=e.doneFn;n.addEventListener(\"message\",function e(t){if(t.data.source===r.requestId){n.removeEventListener(\"message\",e);var i=t.data.decrypted;r.bytes=new Uint8Array(i.bytes,i.byteOffset,i.byteLength),Cc({segment:r,bytes:r.bytes,isPartial:!1,trackInfoFn:a,timingInfoFn:s,videoSegmentTimingInfoFn:o,audioSegmentTimingInfoFn:u,id3Fn:l,captionsFn:c,isEndOfTimeline:d,endedTimelineFn:h,dataFn:p,doneFn:f})}}),t=r.key.bytes.slice?r.key.bytes.slice():new Uint32Array(Array.prototype.slice.call(r.key.bytes)),n.postMessage(nc({source:r.requestId,encrypted:r.encryptedBytes,key:t,iv:r.key.iv}),[r.encryptedBytes.buffer,t.buffer])}({decryptionWorker:n,segment:t,trackInfoFn:r,timingInfoFn:a,videoSegmentTimingInfoFn:s,audioSegmentTimingInfoFn:o,id3Fn:u,captionsFn:l,isEndOfTimeline:c,endedTimelineFn:d,dataFn:h,doneFn:p});Cc({segment:t,bytes:t.bytes,isPartial:!1,trackInfoFn:r,timingInfoFn:a,videoSegmentTimingInfoFn:s,audioSegmentTimingInfoFn:o,id3Fn:u,captionsFn:l,isEndOfTimeline:c,endedTimelineFn:d,dataFn:h,doneFn:p})}}}}function xc(e){var n=e.segment,r=e.progressFn,a=e.trackInfoFn,s=e.timingInfoFn,o=e.videoSegmentTimingInfoFn,u=e.audioSegmentTimingInfoFn,l=e.id3Fn,c=e.captionsFn,d=e.isEndOfTimeline,h=e.endedTimelineFn,p=e.dataFn,f=e.handlePartialData;return function(e){var t=e.target;if(!t.aborted){if(f&&!n.key&&t.responseText&&8<=t.responseText.length){var i=fc(t.responseText.substring(n.lastReachedChar||0));!n.lastReachedChar&&Pu(new Uint8Array(i))||(n.lastReachedChar=t.responseText.length,Cc({segment:n,bytes:i,isPartial:!0,trackInfoFn:a,timingInfoFn:s,videoSegmentTimingInfoFn:o,audioSegmentTimingInfoFn:u,id3Fn:l,captionsFn:c,isEndOfTimeline:d,endedTimelineFn:h,dataFn:p}))}return n.stats=ga.mergeOptions(n.stats,function(e){var t=e.target,i={bandwidth:1/0,bytesReceived:0,roundTripTime:Date.now()-t.requestTime||0};return i.bytesReceived=e.loaded,i.bandwidth=Math.floor(i.bytesReceived/i.roundTripTime*8*1e3),i}(e)),!n.stats.firstBytesReceivedAt&&n.stats.bytesReceived&&(n.stats.firstBytesReceivedAt=Date.now()),r(e,n)}}}function Ac(e){var t=e.xhr,i=e.xhrOptions,n=e.decryptionWorker,r=e.segment,a=e.abortFn,s=e.progressFn,o=e.trackInfoFn,u=e.timingInfoFn,l=e.videoSegmentTimingInfoFn,c=e.audioSegmentTimingInfoFn,d=e.id3Fn,h=e.captionsFn,p=e.isEndOfTimeline,f=e.endedTimelineFn,m=e.dataFn,g=e.doneFn,v=e.handlePartialData,y=[],_=Ic({activeXhrs:y,decryptionWorker:n,trackInfoFn:o,timingInfoFn:u,videoSegmentTimingInfoFn:l,audioSegmentTimingInfoFn:c,id3Fn:d,captionsFn:h,isEndOfTimeline:p,endedTimelineFn:f,dataFn:m,doneFn:g});if(r.key&&!r.key.bytes){var b=t(ga.mergeOptions(i,{uri:r.key.resolvedUri,responseType:\"arraybuffer\"}),function(a,s){return function(e,t){var i=t.response,n=wc(e,t);if(n)return s(n,a);if(16!==i.byteLength)return s({status:t.status,message:\"Invalid HLS key at URL: \"+t.uri,code:vd,xhr:t},a);var r=new DataView(i);return a.key.bytes=new Uint32Array([r.getUint32(0),r.getUint32(4),r.getUint32(8),r.getUint32(12)]),s(null,a)}}(r,_));y.push(b)}if(r.map&&!r.map.bytes){var T=t(ga.mergeOptions(i,{uri:r.map.resolvedUri,responseType:\"arraybuffer\",headers:ec(r.map)}),function(e){var a=e.segment,s=e.finishProcessingFn;return function(e,t){var i=t.response,n=wc(e,t);if(n)return s(n,a);if(0===i.byteLength)return s({status:t.status,message:\"Empty HLS segment content at URL: \"+t.uri,code:vd,xhr:t},a);a.map.bytes=new Uint8Array(t.response);var r=Au(a.map.bytes);return\"mp4\"!==r?s({status:t.status,message:\"Found unsupported \"+(r||\"unknown\")+\" container for initialization segment at URL: \"+t.uri,code:vd,internal:!0,xhr:t},a):(Qc(a.map.bytes).forEach(function(e){a.map.tracks=a.map.tracks||{},a.map.tracks[e.type]||\"number\"==typeof(a.map.tracks[e.type]=e).id&&e.timescale&&(a.map.timescales=a.map.timescales||{},a.map.timescales[e.id]=e.timescale)}),s(null,a))}}({segment:r,finishProcessingFn:_}));y.push(T)}var S=ga.mergeOptions(i,{uri:r.resolvedUri,responseType:\"arraybuffer\",headers:ec(r)});v&&(S.responseType=\"text\",S.beforeSend=function(e){e.overrideMimeType(\"text/plain; charset=x-user-defined\")});var k=t(S,function(e){var a=e.segment,s=e.finishProcessingFn,o=e.responseType;return function(e,t){var i=t.response,n=wc(e,t);if(n)return s(n,a);var r=\"arraybuffer\"!==o&&t.responseText?fc(t.responseText.substring(a.lastReachedChar||0)):t.response;return 0===i.byteLength?s({status:t.status,message:\"Empty HLS segment content at URL: \"+t.uri,code:vd,xhr:t},a):(a.stats=function(e){return{bandwidth:e.bandwidth,bytesReceived:e.bytesReceived||0,roundTripTime:e.roundTripTime||0}}(t),a.key?a.encryptedBytes=new Uint8Array(r):a.bytes=new Uint8Array(r),s(null,a))}}({segment:r,finishProcessingFn:_,responseType:S.responseType}));k.addEventListener(\"progress\",xc({segment:r,progressFn:s,trackInfoFn:o,timingInfoFn:u,videoSegmentTimingInfoFn:l,audioSegmentTimingInfoFn:c,id3Fn:d,captionsFn:h,isEndOfTimeline:p,endedTimelineFn:f,dataFn:m,handlePartialData:v})),y.push(k);var w={};return y.forEach(function(e){e.addEventListener(\"loadend\",function(e){var t=e.loadendState,i=e.abortFn;return function(e){e.target.aborted&&i&&!t.calledAbortFn&&(i(),t.calledAbortFn=!0)}}({loadendState:w,abortFn:a}))}),function(){return kc(y)}}function Pc(e,t){var i=t.attributes||{};return e&&e.mediaGroups&&e.mediaGroups.AUDIO&&i.AUDIO&&e.mediaGroups.AUDIO[i.AUDIO]}function Lc(e){var r={};return e.forEach(function(e){var t=e.mediaType,i=e.type,n=e.details;r[t]=r[t]||[],r[t].push(bl(\"\"+i+n))}),Object.keys(r).forEach(function(e){if(1<r[e].length)return bd(\"multiple \"+e+\" codecs found as attributes: \"+r[e].join(\", \")+\". Setting playlist codecs to null so that we wait for mux.js to probe segments for real codecs.\"),void(r[e]=null);r[e]=r[e][0]}),r}function Oc(e){var t=0;return e.audio&&t++,e.video&&t++,t}function Dc(e,t){var i=t.attributes||{},n=Lc(function(e){var t=e.attributes||{};if(t.CODECS)return Tl(t.CODECS)}(t)||[]);if(Pc(e,t)&&!n.audio&&!function(e,t){if(!Pc(e,t))return!0;var i=t.attributes||{},n=e.mediaGroups.AUDIO[i.AUDIO];for(var r in n)if(!n[r].uri&&!n[r].playlists)return!0;return!1}(e,t)){var r=Lc(function(e,t){if(!e.mediaGroups.AUDIO||!t)return null;var i=e.mediaGroups.AUDIO[t];if(!i)return null;for(var n in i){var r=i[n];if(r.default&&r.playlists)return Tl(r.playlists[0].attributes.CODECS)}return null}(e,i.AUDIO)||[]);r.audio&&(n.audio=r.audio)}return n}function Rc(e){if(e&&e.playlist){var t=e.playlist;return JSON.stringify({id:t.id,bandwidth:e.bandwidth,width:e.width,height:e.height,codecs:t.attributes&&t.attributes.CODECS||\"\"})}}function Mc(e,t){if(!e)return\"\";var i=Ea.getComputedStyle(e);return i?i[t]:\"\"}function Nc(e,n){var r=e.slice();e.sort(function(e,t){var i=n(e,t);return 0===i?r.indexOf(e)-r.indexOf(t):i})}function Uc(e,t){var i,n;return e.attributes.BANDWIDTH&&(i=e.attributes.BANDWIDTH),i=i||Ea.Number.MAX_VALUE,t.attributes.BANDWIDTH&&(n=t.attributes.BANDWIDTH),i-(n=n||Ea.Number.MAX_VALUE)}function Bc(e,t,i,n,r){if(e){var a={bandwidth:t,width:i,height:n,limitRenditionByPlayerDimensions:r},s=e.playlists.map(function(e){var t=e.attributes.RESOLUTION&&e.attributes.RESOLUTION.width,i=e.attributes.RESOLUTION&&e.attributes.RESOLUTION.height;return{bandwidth:e.attributes.BANDWIDTH||Ea.Number.MAX_VALUE,width:t,height:i,playlist:e}});Nc(s,function(e,t){return e.bandwidth-t.bandwidth});var o=(s=s.filter(function(e){return!sd.isIncompatible(e.playlist)})).filter(function(e){return sd.isEnabled(e.playlist)});o.length||(o=s.filter(function(e){return!sd.isDisabled(e.playlist)}));var u=o.filter(function(e){return e.bandwidth*hd.BANDWIDTH_VARIANCE<t}),l=u[u.length-1],c=u.filter(function(e){return e.bandwidth===l.bandwidth})[0];if(!1===r){var d=c||o[0]||s[0];if(d&&d.playlist){var h=\"sortedPlaylistReps\";return c&&(h=\"bandwidthBestRep\"),o[0]&&(h=\"enabledPlaylistReps\"),Td(\"choosing \"+Rc(d)+\" using \"+h+\" with options\",a),d.playlist}return Td(\"could not choose a playlist with options\",a),null}var p=u.filter(function(e){return e.width&&e.height});Nc(p,function(e,t){return e.width-t.width});var f=p.filter(function(e){return e.width===i&&e.height===n});l=f[f.length-1];var m,g,v,y=f.filter(function(e){return e.bandwidth===l.bandwidth})[0];y||(g=(m=p.filter(function(e){return e.width>i||e.height>n})).filter(function(e){return e.width===m[0].width&&e.height===m[0].height}),l=g[g.length-1],v=g.filter(function(e){return e.bandwidth===l.bandwidth})[0]);var _=v||y||c||o[0]||s[0];if(_&&_.playlist){var b=\"sortedPlaylistReps\";return v?b=\"resolutionPlusOneRep\":y?b=\"resolutionBestRep\":c?b=\"bandwidthBestRep\":o[0]&&(b=\"enabledPlaylistReps\"),Td(\"choosing \"+Rc(_)+\" using \"+b+\" with options\",a),_.playlist}return Td(\"could not choose a playlist with options\",a),null}}function Fc(){var e=this.useDevicePixelRatio&&Ea.devicePixelRatio||1;return Bc(this.playlists.master,this.systemBandwidth,parseInt(Mc(this.tech_.el(),\"width\"),10)*e,parseInt(Mc(this.tech_.el(),\"height\"),10)*e,this.limitRenditionByPlayerDimensions)}function jc(e){var t=e.inbandTextTracks,i=e.metadataArray,n=e.timestampOffset,r=e.videoDuration;if(i){var a=Ea.WebKitDataCue||Ea.VTTCue,s=t.metadataTrack_;if(s&&(i.forEach(function(e){var i=e.cueTime+n;!(\"number\"!=typeof i||Ea.isNaN(i)||i<0)&&i<1/0&&e.frames.forEach(function(e){var t=new a(i,i,e.value||e.url||e.data||\"\");t.frame=e,t.value=e,function(e){Object.defineProperties(e.frame,{id:{get:function(){return ga.log.warn(\"cue.frame.id is deprecated. Use cue.value.key instead.\"),e.value.key}},value:{get:function(){return ga.log.warn(\"cue.frame.value is deprecated. Use cue.value.data instead.\"),e.value.data}},privateData:{get:function(){return ga.log.warn(\"cue.frame.privateData is deprecated. Use cue.value.data instead.\"),e.value.data}}})}(t),s.addCue(t)})}),s.cues&&s.cues.length)){for(var o=s.cues,u=[],l=0;l<o.length;l++)o[l]&&u.push(o[l]);var c=u.reduce(function(e,t){var i=e[t.startTime]||[];return i.push(t),e[t.startTime]=i,e},{}),d=Object.keys(c).sort(function(e,t){return Number(e)-Number(t)});d.forEach(function(e,t){var i=c[e],n=Number(d[t+1])||r;i.forEach(function(e){e.endTime=n})})}}}function Vc(e,t,i){var n,r;if(i&&i.cues)for(n=i.cues.length;n--;)(r=i.cues[n]).startTime>=e&&r.endTime<=t&&i.removeCue(r)}function qc(e){return\"number\"==typeof e&&isFinite(e)}function Hc(e){return e+\"TimingInfo\"}function Wc(e){var t=e.segmentTimeline,i=e.currentTimeline,n=e.startOfSegment,r=e.buffered;return e.overrideCheck||t!==i?t<i?n:r.length?r.end(r.length-1):n:null}function zc(e){var t=e.timelineChangeController,i=e.currentTimeline,n=e.segmentTimeline,r=e.loaderType,a=e.audioDisabled;if(i===n)return!1;if(\"audio\"===r){var s=t.lastTimelineChange({type:\"main\"});return!s||s.to!==n}if(\"main\"===r&&a){var o=t.pendingTimelineChange({type:\"audio\"});return!o||o.to!==n}return!1}function Gc(e){var t=e.segmentDuration,i=e.maxDuration;return!!t&&Math.round(t)>i+rd}function Xc(e,t){if(\"hls\"!==t)return null;var i=function(e,t){var i=e&&\"number\"==typeof e.start&&\"number\"==typeof e.end?e.end-e.start:0,n=t&&\"number\"==typeof t.start&&\"number\"==typeof t.end?t.end-t.start:0;return Math.max(i,n)}(e.audioTimingInfo,e.videoTimingInfo);if(!i)return null;var n=e.playlist.targetDuration,r=Gc({segmentDuration:i,maxDuration:2*n}),a=Gc({segmentDuration:i,maxDuration:n}),s=\"Segment with index \"+e.mediaIndex+\" from playlist \"+e.playlist.id+\" has a duration of \"+i+\" when the reported duration is \"+e.duration+\" and the target duration is \"+n+\". For HLS content, a duration in excess of the target duration may result in playback issues. See the HLS specification section on EXT-X-TARGETDURATION for more details: https://tools.ietf.org/html/draft-pantos-http-live-streaming-23#section-4.3.3.1\";return r||a?{severity:r?\"warn\":\"info\",message:s}:null}var Kc=nl,Qc=rl,Yc=(al=function(e){var t=0===e[0]?12:20;return yl(e[t]<<24|e[1+t]<<16|e[2+t]<<8|e[3+t])},{mp4:/^(av0?1|avc0?[1234]|vp0?9|flac|opus|mp3|mp4a|mp4v|stpp.ttml.im1t)/,webm:/^(vp0?[89]|av0?1|opus|vorbis)/,ogg:/^(vp0?[89]|theora|flac|opus|vorbis)/,video:/^(av0?1|avc0?[1234]|vp0?[89]|hvc1|hev1|theora|mp4v)/,audio:/^(mp4a|flac|vorbis|opus|ac-[34]|ec-3|alac|mp3|speex|aac)/,text:/^(stpp.ttml.im1t)/,muxerVideo:/^(avc0?1)/,muxerAudio:/^(mp4a)/,muxerText:/a^/}),$c=[\"video\",\"audio\",\"text\"],Jc=[\"Video\",\"Audio\",\"Text\"],Zc=\"mp4a.40.2\",ed=Ta,td=ga.log,id=ga.mergeOptions,nd=function(c){function e(e,t,i){var n;if(void 0===i&&(i={}),n=c.call(this)||this,!e)throw new Error(\"A non-empty playlist URL or object is required\");n.logger_=Il(\"PlaylistLoader\");var r=i,a=r.withCredentials,s=void 0!==a&&a,o=r.handleManifestRedirects,u=void 0!==o&&o;n.src=e,n.vhs_=t,n.withCredentials=s,n.handleManifestRedirects=u;var l=t.options_;return n.customTagParsers=l&&l.customTagParsers||[],n.customTagMappers=l&&l.customTagMappers||[],n.state=\"HAVE_NOTHING\",n.on(\"mediaupdatetimeout\",function(){\"HAVE_METADATA\"===n.state&&(n.state=\"HAVE_CURRENT_METADATA\",n.request=n.vhs_.xhr({uri:ed(n.master.uri,n.media().uri),withCredentials:n.withCredentials},function(e,t){if(n.request)return e?n.playlistRequestError(n.request,n.media(),\"HAVE_METADATA\"):void n.haveMetadata({playlistString:n.request.responseText,url:n.media().uri,id:n.media().id})}))}),n}Sa(e,c);var t=e.prototype;return t.playlistRequestError=function(e,t,i){var n=t.uri,r=t.id;this.request=null,i&&(this.state=i),this.error={playlist:this.master.playlists[r],status:e.status,message:\"HLS playlist request error at URL: \"+n+\".\",responseText:e.responseText,code:500<=e.status?4:2},this.trigger(\"error\")},t.haveMetadata=function(e){var i=this,t=e.playlistString,n=e.playlistObject,r=e.url,a=e.id;this.request=null,this.state=\"HAVE_METADATA\";var s=n||Al({onwarn:function(e){var t=e.message;return i.logger_(\"m3u8-parser warn for \"+a+\": \"+t)},oninfo:function(e){var t=e.message;return i.logger_(\"m3u8-parser info for \"+a+\": \"+t)},manifestString:t,customTagParsers:this.customTagParsers,customTagMappers:this.customTagMappers});s.lastRequest=Date.now(),Ll({playlist:s,uri:r,id:a});var o=Ml(this.master,s);this.targetDuration=s.targetDuration,o?(this.master=o,this.media_=this.master.playlists[a]):this.trigger(\"playlistunchanged\"),this.media().endList||(Ea.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=Ea.setTimeout(function(){i.trigger(\"mediaupdatetimeout\")},Nl(this.media(),!!o))),this.trigger(\"loadedplaylist\")},t.dispose=function(){this.trigger(\"dispose\"),this.stopRequest(),Ea.clearTimeout(this.mediaUpdateTimeout),Ea.clearTimeout(this.finalRenditionTimeout),this.off()},t.stopRequest=function(){if(this.request){var e=this.request;this.request=null,e.onreadystatechange=null,e.abort()}},t.media=function(i,e){var n=this;if(!i)return this.media_;if(\"HAVE_NOTHING\"===this.state)throw new Error(\"Cannot switch media playlist from \"+this.state);if(\"string\"==typeof i){if(!this.master.playlists[i])throw new Error(\"Unknown playlist URI: \"+i);i=this.master.playlists[i]}if(Ea.clearTimeout(this.finalRenditionTimeout),e){var t=i.targetDuration/2*1e3||5e3;this.finalRenditionTimeout=Ea.setTimeout(this.media.bind(this,i,!1),t)}else{var r=this.state,a=!this.media_||i.id!==this.media_.id;if(this.master.playlists[i.id].endList||i.endList&&i.segments.length)return this.request&&(this.request.onreadystatechange=null,this.request.abort(),this.request=null),this.state=\"HAVE_METADATA\",this.media_=i,void(a&&(this.trigger(\"mediachanging\"),\"HAVE_MASTER\"===r?this.trigger(\"loadedmetadata\"):this.trigger(\"mediachange\")));if(a){if(this.state=\"SWITCHING_MEDIA\",this.request){if(i.resolvedUri===this.request.url)return;this.request.onreadystatechange=null,this.request.abort(),this.request=null}this.media_&&this.trigger(\"mediachanging\"),this.request=this.vhs_.xhr({uri:i.resolvedUri,withCredentials:this.withCredentials},function(e,t){if(n.request){if(i.lastRequest=Date.now(),i.resolvedUri=Cl(n.handleManifestRedirects,i.resolvedUri,t),e)return n.playlistRequestError(n.request,i,r);n.haveMetadata({playlistString:t.responseText,url:i.uri,id:i.id}),\"HAVE_MASTER\"===r?n.trigger(\"loadedmetadata\"):n.trigger(\"mediachange\")}})}}},t.pause=function(){this.stopRequest(),Ea.clearTimeout(this.mediaUpdateTimeout),\"HAVE_NOTHING\"===this.state&&(this.started=!1),\"SWITCHING_MEDIA\"===this.state?this.media_?this.state=\"HAVE_METADATA\":this.state=\"HAVE_MASTER\":\"HAVE_CURRENT_METADATA\"===this.state&&(this.state=\"HAVE_METADATA\")},t.load=function(e){var t=this;Ea.clearTimeout(this.mediaUpdateTimeout);var i=this.media();if(e){var n=i?i.targetDuration/2*1e3:5e3;this.mediaUpdateTimeout=Ea.setTimeout(function(){return t.load()},n)}else this.started?i&&!i.endList?this.trigger(\"mediaupdatetimeout\"):this.trigger(\"loadedplaylist\"):this.start()},t.start=function(){var n=this;if(this.started=!0,\"object\"==typeof this.src)return this.src.uri||(this.src.uri=Ea.location.href),this.src.resolvedUri=this.src.uri,void setTimeout(function(){n.setupInitialPlaylist(n.src)},0);this.request=this.vhs_.xhr({uri:this.src,withCredentials:this.withCredentials},function(e,t){if(n.request){if(n.request=null,e)return n.error={status:t.status,message:\"HLS playlist request error at URL: \"+n.src+\".\",responseText:t.responseText,code:2},\"HAVE_NOTHING\"===n.state&&(n.started=!1),n.trigger(\"error\");n.src=Cl(n.handleManifestRedirects,n.src,t);var i=Al({manifestString:t.responseText,customTagParsers:n.customTagParsers,customTagMappers:n.customTagMappers});n.setupInitialPlaylist(i)}})},t.srcUri=function(){return\"string\"==typeof this.src?this.src:this.src.uri},t.setupInitialPlaylist=function(e){if(this.state=\"HAVE_MASTER\",e.playlists)return this.master=e,Ol(this.master,this.srcUri()),e.playlists.forEach(function(t){t.segments&&t.segments.forEach(function(e){Dl(e,t.resolvedUri)})}),this.trigger(\"loadedplaylist\"),void(this.request||this.media(this.master.playlists[0]));var t=this.srcUri()||Ea.location.href;this.master=function(e,t){var i=xl(0,t),n={mediaGroups:{AUDIO:{},VIDEO:{},\"CLOSED-CAPTIONS\":{},SUBTITLES:{}},uri:Ea.location.href,resolvedUri:Ea.location.href,playlists:[{uri:t,id:i,resolvedUri:t,attributes:{}}]};return n.playlists[i]=n.playlists[0],n.playlists[t]=n.playlists[0],n}(0,t),this.haveMetadata({playlistObject:e,url:t,id:this.master.playlists[0].id}),this.trigger(\"loadedmetadata\")},e}(ga.EventTarget),rd=1/30,ad=ga.createTimeRange,sd={duration:Hl,seekable:function(e,t,i){var n=t||0,r=Gl(e,t,!0,i);return null===r?ad():ad(n,r)},safeLiveIndex:zl,getMediaInfoForTime:function(e,t,i,n){var r,a=e.segments.length,s=t-n;if(s<0){if(0<i)for(r=i-1;0<=r;r--)if(0<(s+=e.segments[r].duration+rd))return{mediaIndex:r,startTime:n-Wl(e,i,r)};return{mediaIndex:0,startTime:t}}if(i<0){for(r=i;r<0;r++)if((s-=e.targetDuration)<0)return{mediaIndex:0,startTime:t};i=0}for(r=i;r<a;r++)if((s-=e.segments[r].duration+rd)<0)return{mediaIndex:r,startTime:n+Wl(e,i,r)};return{mediaIndex:a-1,startTime:t}},isEnabled:Ql,isDisabled:function(e){return e.disabled},isBlacklisted:Xl,isIncompatible:Kl,playlistEnd:Gl,isAes:function(e){for(var t=0;t<e.segments.length;t++)if(e.segments[t].key)return!0;return!1},hasAttribute:Yl,estimateSegmentRequestTime:function(e,t,i,n){return void 0===n&&(n=0),Yl(\"BANDWIDTH\",i)?(e*i.attributes.BANDWIDTH-8*n)/t:NaN},isLowestEnabledRendition:$l},od=ga.xhr,ud=ga.mergeOptions,ld=Object.freeze({__proto__:null,createTransferableMessage:nc,initSegmentId:rc,segmentKeyId:ac,hexDump:sc,tagDump:function(e){var t=e.bytes;return sc(t)},textRanges:function(e){var t,i,n,r=\"\";for(t=0;t<e.length;t++)r+=(n=t,(i=e).start(n)+\"-\"+i.end(n)+\" \");return r}}),cd=ga.mergeOptions,dd=function(c){function e(e,t,i,n){var r;void 0===i&&(i={}),(r=c.call(this)||this).masterPlaylistLoader_=n||_a(r),n||(r.isMaster_=!0);var a=i,s=a.withCredentials,o=void 0!==s&&s,u=a.handleManifestRedirects,l=void 0!==u&&u;if(r.vhs_=t,r.withCredentials=o,r.handleManifestRedirects=l,!e)throw new Error(\"A non-empty playlist URL or object is required\");return r.on(\"minimumUpdatePeriod\",function(){r.refreshXml_()}),r.on(\"mediaupdatetimeout\",function(){r.refreshMedia_(r.media().id)}),r.state=\"HAVE_NOTHING\",r.loadedPlaylists_={},r.logger_=Il(\"DashPlaylistLoader\"),r.isMaster_?(r.masterPlaylistLoader_.srcUrl=e,r.masterPlaylistLoader_.sidxMapping_={}):r.childPlaylist_=e,r}Sa(e,c);var t=e.prototype;return t.requestErrored_=function(e,t,i){return!this.request||(this.request=null,e?(this.error=\"object\"!=typeof e||e instanceof Error?{status:t.status,message:\"DASH request error at URL: \"+t.uri,response:t.response,code:2}:e,i&&(this.state=i),this.trigger(\"error\"),!0):void 0)},t.addSidxSegments_=function(o,n,r){var u=this,a=o.sidx&&hc(o.sidx);if(o.sidx&&a&&!this.masterPlaylistLoader_.sidxMapping_[a]){var l=Cl(this.handleManifestRedirects,o.sidx.resolvedUri),s=this.masterPlaylistLoader_.sidxMapping_;s[a]={sidxInfo:o.sidx};var c=function(e,t){if(!u.requestErrored_(e,t,n)){var i=vu(Ho(t.response).subarray(8));return s[a].sidx=i,mu(o,i,o.sidx.resolvedUri),r(!0)}};this.request=cc(l,this.vhs_.xhr,function(e,t,i,n){if(e)return c(e,t);if(!i||\"mp4\"!==i)return c({status:t.status,message:\"Unsupported \"+(i||\"unknown\")+\" container type for sidx segment at URL: \"+l,response:\"\",playlist:o,internal:!0,blacklistDuration:1/0,code:2},t);var r=o.sidx.byterange,a=r.offset,s=r.length;if(n.length>=s+a)return c(e,{response:n.subarray(a,a+s),status:t.status,uri:t.uri});u.request=u.vhs_.xhr({uri:l,responseType:\"arraybuffer\",headers:ec({byterange:o.sidx.byterange})},c)})}else this.mediaRequest_=Ea.setTimeout(function(){return r(!1)},0)},t.dispose=function(){this.trigger(\"dispose\"),this.stopRequest(),this.loadedPlaylists_={},Ea.clearTimeout(this.minimumUpdatePeriodTimeout_),Ea.clearTimeout(this.mediaRequest_),Ea.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null,this.mediaRequest_=null,this.minimumUpdatePeriodTimeout_=null,this.masterPlaylistLoader_.createMupOnMedia_&&(this.off(\"loadedmetadata\",this.masterPlaylistLoader_.createMupOnMedia_),this.masterPlaylistLoader_.createMupOnMedia_=null),this.off()},t.hasPendingRequest=function(){return this.request||this.mediaRequest_},t.stopRequest=function(){if(this.request){var e=this.request;this.request=null,e.onreadystatechange=null,e.abort()}},t.media=function(t){var i=this;if(!t)return this.media_;if(\"HAVE_NOTHING\"===this.state)throw new Error(\"Cannot switch media playlist from \"+this.state);var n=this.state;if(\"string\"==typeof t){if(!this.masterPlaylistLoader_.master.playlists[t])throw new Error(\"Unknown playlist URI: \"+t);t=this.masterPlaylistLoader_.master.playlists[t]}var e=!this.media_||t.id!==this.media_.id;if(e&&this.loadedPlaylists_[t.id]&&this.loadedPlaylists_[t.id].endList)return this.state=\"HAVE_METADATA\",this.media_=t,void(e&&(this.trigger(\"mediachanging\"),this.trigger(\"mediachange\")));e&&(this.media_&&this.trigger(\"mediachanging\"),this.addSidxSegments_(t,n,function(e){i.haveMetadata({startingState:n,playlist:t})}))},t.haveMetadata=function(e){var t=e.startingState,i=e.playlist;this.state=\"HAVE_METADATA\",this.loadedPlaylists_[i.id]=i,this.mediaRequest_=null,this.refreshMedia_(i.id),\"HAVE_MASTER\"===t?this.trigger(\"loadedmetadata\"):this.trigger(\"mediachange\")},t.pause=function(){this.masterPlaylistLoader_.createMupOnMedia_&&(this.off(\"loadedmetadata\",this.masterPlaylistLoader_.createMupOnMedia_),this.masterPlaylistLoader_.createMupOnMedia_=null),this.stopRequest(),Ea.clearTimeout(this.mediaUpdateTimeout),Ea.clearTimeout(this.masterPlaylistLoader_.minimumUpdatePeriodTimeout_),this.masterPlaylistLoader_.minimumUpdatePeriodTimeout_=null,this.mediaUpdateTimeout=null,\"HAVE_NOTHING\"===this.state&&(this.started=!1)},t.load=function(e){var t=this;Ea.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null;var i=this.media();if(e){var n=i?i.targetDuration/2*1e3:5e3;this.mediaUpdateTimeout=Ea.setTimeout(function(){return t.load()},n)}else this.started?i&&!i.endList?this.trigger(\"mediaupdatetimeout\"):this.trigger(\"loadedplaylist\"):this.start()},t.start=function(){var i=this;this.started=!0,this.isMaster_?this.requestMaster_(function(e,t){i.haveMaster_(),i.hasPendingRequest()||i.media_||i.media(i.masterPlaylistLoader_.master.playlists[0])}):this.mediaRequest_=Ea.setTimeout(function(){return i.haveMaster_()},0)},t.requestMaster_=function(n){var r=this;this.request=this.vhs_.xhr({uri:this.masterPlaylistLoader_.srcUrl,withCredentials:this.withCredentials},function(e,t){if(!r.requestErrored_(e,t)){var i=t.responseText!==r.masterPlaylistLoader_.masterXml_;return r.masterPlaylistLoader_.masterXml_=t.responseText,t.responseHeaders&&t.responseHeaders.date?r.masterLoaded_=Date.parse(t.responseHeaders.date):r.masterLoaded_=Date.now(),r.masterPlaylistLoader_.srcUrl=Cl(r.handleManifestRedirects,r.masterPlaylistLoader_.srcUrl,t),i?(r.handleMaster_(),void r.syncClientServerClock_(function(){return n(t,i)})):n(t,i)}\"HAVE_NOTHING\"===r.state&&(r.started=!1)})},t.syncClientServerClock_=function(n){var r=this,a=qo(this.masterPlaylistLoader_.masterXml_);return null===a?(this.masterPlaylistLoader_.clientOffset_=this.masterLoaded_-Date.now(),n()):\"DIRECT\"===a.method?(this.masterPlaylistLoader_.clientOffset_=a.value-Date.now(),n()):void(this.request=this.vhs_.xhr({uri:ed(this.masterPlaylistLoader_.srcUrl,a.value),method:a.method,withCredentials:this.withCredentials},function(e,t){if(r.request){if(e)return r.masterPlaylistLoader_.clientOffset_=r.masterLoaded_-Date.now(),n();var i;i=\"HEAD\"===a.method?t.responseHeaders&&t.responseHeaders.date?Date.parse(t.responseHeaders.date):r.masterLoaded_:Date.parse(t.responseText),r.masterPlaylistLoader_.clientOffset_=i-Date.now(),n()}}))},t.haveMaster_=function(){this.state=\"HAVE_MASTER\",this.isMaster_?this.trigger(\"loadedplaylist\"):this.media_||this.media(this.childPlaylist_)},t.handleMaster_=function(){this.mediaRequest_=null;var e=function(e){var t=e.masterXml,i=e.srcUrl,n=e.clientOffset,r=e.sidxMapping,a=Vo(t,{manifestUri:i,clientOffset:n,sidxMapping:r});return Ol(a,i),a}({masterXml:this.masterPlaylistLoader_.masterXml_,srcUrl:this.masterPlaylistLoader_.srcUrl,clientOffset:this.masterPlaylistLoader_.clientOffset_,sidxMapping:this.masterPlaylistLoader_.sidxMapping_}),t=this.masterPlaylistLoader_.master;t&&(e=function(e,t,i){for(var s=!0,o=cd(e,{duration:t.duration,minimumUpdatePeriod:t.minimumUpdatePeriod}),n=0;n<t.playlists.length;n++){var r=t.playlists[n];if(r.sidx){var a=hc(r.sidx);i&&i[a]&&mu(r,i[a].sidx,r.sidx.resolvedUri)}var u=Ml(o,r,dc);u&&(o=u,s=!1)}return Pl(t,function(e,t,i,n){if(e.playlists&&e.playlists.length){var r=e.playlists[0].id,a=Ml(o,e.playlists[0],dc);a&&((o=a).mediaGroups[t][i][n].playlists[0]=o.playlists[r],s=!1)}}),t.minimumUpdatePeriod!==e.minimumUpdatePeriod&&(s=!1),s?null:o}(t,e,this.masterPlaylistLoader_.sidxMapping_)),this.masterPlaylistLoader_.master=e||t;var i=this.masterPlaylistLoader_.master.locations&&this.masterPlaylistLoader_.master.locations[0];return i&&i!==this.masterPlaylistLoader_.srcUrl&&(this.masterPlaylistLoader_.srcUrl=i),(!t||e&&e.minimumUpdatePeriod!==t.minimumUpdatePeriod)&&this.updateMinimumUpdatePeriodTimeout_(),Boolean(e)},t.updateMinimumUpdatePeriodTimeout_=function(){var e=this.masterPlaylistLoader_;e.createMupOnMedia_&&(e.off(\"loadedmetadata\",e.createMupOnMedia_),e.createMupOnMedia_=null),e.minimumUpdatePeriodTimeout_&&(Ea.clearTimeout(e.minimumUpdatePeriodTimeout_),e.minimumUpdatePeriodTimeout_=null);var t=e.master&&e.master.minimumUpdatePeriod;0===t&&(e.media()?t=1e3*e.media().targetDuration:(e.createMupOnMedia_=e.updateMinimumUpdatePeriodTimeout_,e.one(\"loadedmetadata\",e.createMupOnMedia_))),\"number\"!=typeof t||t<=0?t<0&&this.logger_(\"found invalid minimumUpdatePeriod of \"+t+\", not setting a timeout\"):this.createMUPTimeout_(t)},t.createMUPTimeout_=function(e){var t=this.masterPlaylistLoader_;t.minimumUpdatePeriodTimeout_=Ea.setTimeout(function(){t.minimumUpdatePeriodTimeout_=null,t.trigger(\"minimumUpdatePeriod\"),t.createMUPTimeout_(e)},e)},t.refreshXml_=function(){var i=this;this.requestMaster_(function(e,t){t&&(i.media_&&(i.media_=i.masterPlaylistLoader_.master.playlists[i.media_.id]),i.masterPlaylistLoader_.sidxMapping_=function(e,a){var s=pc(e.playlists,a);return Pl(e,function(e,t,i,n){if(e.playlists&&e.playlists.length){var r=e.playlists;s=cd(s,pc(r,a))}}),s}(i.masterPlaylistLoader_.master,i.masterPlaylistLoader_.sidxMapping_),i.addSidxSegments_(i.media(),i.state,function(e){i.refreshMedia_(i.media().id)}))})},t.refreshMedia_=function(e){var t=this;if(!e)throw new Error(\"refreshMedia_ must take a media id\");this.media_&&this.isMaster_&&this.handleMaster_();var i=this.masterPlaylistLoader_.master.playlists,n=!this.media_||this.media_!==i[e];if(n?this.media_=i[e]:this.trigger(\"playlistunchanged\"),!this.mediaUpdateTimeout){!function e(){t.media().endList||(t.mediaUpdateTimeout=Ea.setTimeout(function(){t.trigger(\"mediaupdatetimeout\"),e()},Nl(t.media(),Boolean(n))))}()}this.trigger(\"loadedplaylist\")},e}(ga.EventTarget),hd={GOAL_BUFFER_LENGTH:30,MAX_GOAL_BUFFER_LENGTH:60,BACK_BUFFER_LENGTH:30,GOAL_BUFFER_LENGTH_RATE:1,INITIAL_BANDWIDTH:4194304,BANDWIDTH_VARIANCE:1.2,BUFFER_LOW_WATER_LINE:0,MAX_BUFFER_LOW_WATER_LINE:30,EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE:16,BUFFER_LOW_WATER_LINE_RATE:1,BUFFER_HIGH_WATER_LINE:30},pd=gc(vc(yc(function(){function e(){this.init=function(){var a={};this.on=function(e,t){a[e]||(a[e]=[]),a[e]=a[e].concat(t)},this.off=function(e,t){var i;return!!a[e]&&(i=a[e].indexOf(t),a[e]=a[e].slice(),a[e].splice(i,1),-1<i)},this.trigger=function(e){var t,i,n,r;if(t=a[e])if(2===arguments.length)for(n=t.length,i=0;i<n;++i)t[i].call(this,arguments[1]);else{for(r=[],i=arguments.length,i=1;i<arguments.length;++i)r.push(arguments[i]);for(n=t.length,i=0;i<n;++i)t[i].apply(this,r)}},this.dispose=function(){a={}}}}e.prototype.pipe=function(t){return this.on(\"data\",function(e){t.push(e)}),this.on(\"done\",function(e){t.flush(e)}),this.on(\"partialdone\",function(e){t.partialFlush(e)}),this.on(\"endedtimeline\",function(e){t.endTimeline(e)}),this.on(\"reset\",function(e){t.reset(e)}),t},e.prototype.push=function(e){this.trigger(\"data\",e)},e.prototype.flush=function(e){this.trigger(\"done\",e)},e.prototype.partialFlush=function(e){this.trigger(\"partialdone\",e)},e.prototype.endTimeline=function(e){this.trigger(\"endedtimeline\",e)},e.prototype.reset=function(e){this.trigger(\"reset\",e)};var l,t,i,r,a,n,s,o,u,c,d,h,p,f,m,g,v,y,_,b,T,S,k,w,E,C,I,x,A,P,L,O,D,R,M,N,U,B,F,j,V=e,q=Math.pow(2,32)-1;!function(){var e;if(S={avc1:[],avcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],mvex:[],mvhd:[],pasp:[],sdtp:[],smhd:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],styp:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[]},\"undefined\"!=typeof Uint8Array){for(e in S)S.hasOwnProperty(e)&&(S[e]=[e.charCodeAt(0),e.charCodeAt(1),e.charCodeAt(2),e.charCodeAt(3)]);k=new Uint8Array([\"i\".charCodeAt(0),\"s\".charCodeAt(0),\"o\".charCodeAt(0),\"m\".charCodeAt(0)]),E=new Uint8Array([\"a\".charCodeAt(0),\"v\".charCodeAt(0),\"c\".charCodeAt(0),\"1\".charCodeAt(0)]),w=new Uint8Array([0,0,0,1]),C=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),I=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]),x={video:C,audio:I},L=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),P=new Uint8Array([0,0,0,0,0,0,0,0]),O=new Uint8Array([0,0,0,0,0,0,0,0]),D=O,R=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),M=O,A=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0])}}(),l=function(e){var t,i,n=[],r=0;for(t=1;t<arguments.length;t++)n.push(arguments[t]);for(t=n.length;t--;)r+=n[t].byteLength;for(i=new Uint8Array(r+8),new DataView(i.buffer,i.byteOffset,i.byteLength).setUint32(0,i.byteLength),i.set(e,4),t=0,r=8;t<n.length;t++)i.set(n[t],r),r+=n[t].byteLength;return i},t=function(){return l(S.dinf,l(S.dref,L))},i=function(e){return l(S.esds,new Uint8Array([0,0,0,0,3,25,0,0,0,4,17,64,21,0,6,0,0,0,218,192,0,0,218,192,5,2,e.audioobjecttype<<3|e.samplingfrequencyindex>>>1,e.samplingfrequencyindex<<7|e.channelcount<<3,6,1,2]))},m=function(e){return l(S.hdlr,x[e])},f=function(e){var t=new Uint8Array([0,0,0,0,0,0,0,2,0,0,0,3,0,1,95,144,e.duration>>>24&255,e.duration>>>16&255,e.duration>>>8&255,255&e.duration,85,196,0,0]);return e.samplerate&&(t[12]=e.samplerate>>>24&255,t[13]=e.samplerate>>>16&255,t[14]=e.samplerate>>>8&255,t[15]=255&e.samplerate),l(S.mdhd,t)},p=function(e){return l(S.mdia,f(e),m(e.type),n(e))},a=function(e){return l(S.mfhd,new Uint8Array([0,0,0,0,(4278190080&e)>>24,(16711680&e)>>16,(65280&e)>>8,255&e]))},n=function(e){return l(S.minf,\"video\"===e.type?l(S.vmhd,A):l(S.smhd,P),t(),v(e))},s=function(e,t){for(var i=[],n=t.length;n--;)i[n]=_(t[n]);return l.apply(null,[S.moof,a(e)].concat(i))},o=function(e){for(var t=e.length,i=[];t--;)i[t]=d(e[t]);return l.apply(null,[S.moov,c(4294967295)].concat(i).concat(u(e)))},u=function(e){for(var t=e.length,i=[];t--;)i[t]=b(e[t]);return l.apply(null,[S.mvex].concat(i))},c=function(e){var t=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,2,0,1,95,144,(4278190080&e)>>24,(16711680&e)>>16,(65280&e)>>8,255&e,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]);return l(S.mvhd,t)},g=function(e){var t,i,n=e.samples||[],r=new Uint8Array(4+n.length);for(i=0;i<n.length;i++)t=n[i].flags,r[i+4]=t.dependsOn<<4|t.isDependedOn<<2|t.hasRedundancy;return l(S.sdtp,r)},v=function(e){return l(S.stbl,y(e),l(S.stts,M),l(S.stsc,D),l(S.stsz,R),l(S.stco,O))},y=function(e){return l(S.stsd,new Uint8Array([0,0,0,0,0,0,0,1]),\"video\"===e.type?N(e):U(e))},N=function(e){var t,i,n=e.sps||[],r=e.pps||[],a=[],s=[];for(t=0;t<n.length;t++)a.push((65280&n[t].byteLength)>>>8),a.push(255&n[t].byteLength),a=a.concat(Array.prototype.slice.call(n[t]));for(t=0;t<r.length;t++)s.push((65280&r[t].byteLength)>>>8),s.push(255&r[t].byteLength),s=s.concat(Array.prototype.slice.call(r[t]));if(i=[S.avc1,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,(65280&e.width)>>8,255&e.width,(65280&e.height)>>8,255&e.height,0,72,0,0,0,72,0,0,0,0,0,0,0,1,19,118,105,100,101,111,106,115,45,99,111,110,116,114,105,98,45,104,108,115,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]),l(S.avcC,new Uint8Array([1,e.profileIdc,e.profileCompatibility,e.levelIdc,255].concat([n.length],a,[r.length],s))),l(S.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192]))],e.sarRatio){var o=e.sarRatio[0],u=e.sarRatio[1];i.push(l(S.pasp,new Uint8Array([(4278190080&o)>>24,(16711680&o)>>16,(65280&o)>>8,255&o,(4278190080&u)>>24,(16711680&u)>>16,(65280&u)>>8,255&u])))}return l.apply(null,i)},U=function(e){return l(S.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,(65280&e.channelcount)>>8,255&e.channelcount,(65280&e.samplesize)>>8,255&e.samplesize,0,0,0,0,(65280&e.samplerate)>>8,255&e.samplerate,0,0]),i(e))},h=function(e){var t=new Uint8Array([0,0,0,7,0,0,0,0,0,0,0,0,(4278190080&e.id)>>24,(16711680&e.id)>>16,(65280&e.id)>>8,255&e.id,0,0,0,0,(4278190080&e.duration)>>24,(16711680&e.duration)>>16,(65280&e.duration)>>8,255&e.duration,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,(65280&e.width)>>8,255&e.width,0,0,(65280&e.height)>>8,255&e.height,0,0]);return l(S.tkhd,t)},_=function(e){var t,i,n,r,a,s;return t=l(S.tfhd,new Uint8Array([0,0,0,58,(4278190080&e.id)>>24,(16711680&e.id)>>16,(65280&e.id)>>8,255&e.id,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0])),a=Math.floor(e.baseMediaDecodeTime/(1+q)),s=Math.floor(e.baseMediaDecodeTime%(1+q)),i=l(S.tfdt,new Uint8Array([1,0,0,0,a>>>24&255,a>>>16&255,a>>>8&255,255&a,s>>>24&255,s>>>16&255,s>>>8&255,255&s])),92,\"audio\"===e.type?(n=T(e,92),l(S.traf,t,i,n)):(r=g(e),n=T(e,r.length+92),l(S.traf,t,i,n,r))},d=function(e){return e.duration=e.duration||4294967295,l(S.trak,h(e),p(e))},b=function(e){var t=new Uint8Array([0,0,0,0,(4278190080&e.id)>>24,(16711680&e.id)>>16,(65280&e.id)>>8,255&e.id,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]);return\"video\"!==e.type&&(t[t.length-1]=0),l(S.trex,t)},j=function(e,t){var i=0,n=0,r=0,a=0;return e.length&&(void 0!==e[0].duration&&(i=1),void 0!==e[0].size&&(n=2),void 0!==e[0].flags&&(r=4),void 0!==e[0].compositionTimeOffset&&(a=8)),[0,0,i|n|r|a,1,(4278190080&e.length)>>>24,(16711680&e.length)>>>16,(65280&e.length)>>>8,255&e.length,(4278190080&t)>>>24,(16711680&t)>>>16,(65280&t)>>>8,255&t]},F=function(e,t){var i,n,r,a,s,o;for(t+=20+16*(a=e.samples||[]).length,r=j(a,t),(n=new Uint8Array(r.length+16*a.length)).set(r),i=r.length,o=0;o<a.length;o++)s=a[o],n[i++]=(4278190080&s.duration)>>>24,n[i++]=(16711680&s.duration)>>>16,n[i++]=(65280&s.duration)>>>8,n[i++]=255&s.duration,n[i++]=(4278190080&s.size)>>>24,n[i++]=(16711680&s.size)>>>16,n[i++]=(65280&s.size)>>>8,n[i++]=255&s.size,n[i++]=s.flags.isLeading<<2|s.flags.dependsOn,n[i++]=s.flags.isDependedOn<<6|s.flags.hasRedundancy<<4|s.flags.paddingValue<<1|s.flags.isNonSyncSample,n[i++]=61440&s.flags.degradationPriority,n[i++]=15&s.flags.degradationPriority,n[i++]=(4278190080&s.compositionTimeOffset)>>>24,n[i++]=(16711680&s.compositionTimeOffset)>>>16,n[i++]=(65280&s.compositionTimeOffset)>>>8,n[i++]=255&s.compositionTimeOffset;return l(S.trun,n)},B=function(e,t){var i,n,r,a,s,o;for(t+=20+8*(a=e.samples||[]).length,r=j(a,t),(i=new Uint8Array(r.length+8*a.length)).set(r),n=r.length,o=0;o<a.length;o++)s=a[o],i[n++]=(4278190080&s.duration)>>>24,i[n++]=(16711680&s.duration)>>>16,i[n++]=(65280&s.duration)>>>8,i[n++]=255&s.duration,i[n++]=(4278190080&s.size)>>>24,i[n++]=(16711680&s.size)>>>16,i[n++]=(65280&s.size)>>>8,i[n++]=255&s.size;return l(S.trun,i)},T=function(e,t){return\"audio\"===e.type?B(e,t):F(e,t)};r=function(){return l(S.ftyp,k,w,k,E)};function H(e,t){var i={size:0,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0,degradationPriority:0,isNonSyncSample:1}};return i.dataOffset=t,i.compositionTimeOffset=e.pts-e.dts,i.duration=e.duration,i.size=4*e.length,i.size+=e.byteLength,e.keyFrame&&(i.flags.dependsOn=2,i.flags.isNonSyncSample=0),i}function W(e){for(var t=[];e--;)t.push(0);return t}function z(){if(!X){var e={96e3:[ue,[227,64],W(154),[56]],88200:[ue,[231],W(170),[56]],64e3:[ue,[248,192],W(240),[56]],48e3:[ue,[255,192],W(268),[55,148,128],W(54),[112]],44100:[ue,[255,192],W(268),[55,163,128],W(84),[112]],32e3:[ue,[255,192],W(268),[55,234],W(226),[112]],24e3:[ue,[255,192],W(268),[55,255,128],W(268),[111,112],W(126),[224]],16e3:[ue,[255,192],W(268),[55,255,128],W(268),[111,255],W(269),[223,108],W(195),[1,192]],12e3:[le,W(268),[3,127,248],W(268),[6,255,240],W(268),[13,255,224],W(268),[27,253,128],W(259),[56]],11025:[le,W(268),[3,127,248],W(268),[6,255,240],W(268),[13,255,224],W(268),[27,255,192],W(268),[55,175,128],W(108),[112]],8e3:[le,W(268),[3,121,16],W(47),[7]]};X=function(i){return Object.keys(i).reduce(function(e,t){return e[t]=new Uint8Array(i[t].reduce(function(e,t){return e.concat(t)},[])),e},{})}(e)}return X}function G(e){e=e||{},G.prototype.init.call(this),this.parse708captions_=\"boolean\"!=typeof e.parse708captions||e.parse708captions,this.captionPackets_=[],this.ccStreams_=[new Be(0,0),new Be(0,1),new Be(1,0),new Be(1,1)],this.parse708captions_&&(this.cc708Stream_=new De),this.reset(),this.ccStreams_.forEach(function(e){e.on(\"data\",this.trigger.bind(this,\"data\")),e.on(\"partialdone\",this.trigger.bind(this,\"partialdone\")),e.on(\"done\",this.trigger.bind(this,\"done\"))},this),this.parse708captions_&&(this.cc708Stream_.on(\"data\",this.trigger.bind(this,\"data\")),this.cc708Stream_.on(\"partialdone\",this.trigger.bind(this,\"partialdone\")),this.cc708Stream_.on(\"done\",this.trigger.bind(this,\"done\")))}var X,K,Q,Y,$,J=function(e){return l(S.mdat,e)},Z=s,ee=function(e){var t,i=r(),n=o(e);return(t=new Uint8Array(i.byteLength+n.byteLength)).set(i),t.set(n,i.byteLength),t},te=function(e){var t,i,n=[],r=[];for(r.byteLength=0,r.nalCount=0,r.duration=0,t=n.byteLength=0;t<e.length;t++)\"access_unit_delimiter_rbsp\"===(i=e[t]).nalUnitType?(n.length&&(n.duration=i.dts-n.dts,r.byteLength+=n.byteLength,r.nalCount+=n.length,r.duration+=n.duration,r.push(n)),(n=[i]).byteLength=i.data.byteLength,n.pts=i.pts,n.dts=i.dts):(\"slice_layer_without_partitioning_rbsp_idr\"===i.nalUnitType&&(n.keyFrame=!0),n.duration=i.dts-n.dts,n.byteLength+=i.data.byteLength,n.push(i));return r.length&&(!n.duration||n.duration<=0)&&(n.duration=r[r.length-1].duration),r.byteLength+=n.byteLength,r.nalCount+=n.length,r.duration+=n.duration,r.push(n),r},ie=function(e){var t,i,n=[],r=[];for(n.byteLength=0,n.nalCount=0,n.duration=0,n.pts=e[0].pts,n.dts=e[0].dts,r.byteLength=0,r.nalCount=0,r.duration=0,r.pts=e[0].pts,r.dts=e[0].dts,t=0;t<e.length;t++)(i=e[t]).keyFrame?(n.length&&(r.push(n),r.byteLength+=n.byteLength,r.nalCount+=n.nalCount,r.duration+=n.duration),(n=[i]).nalCount=i.length,n.byteLength=i.byteLength,n.pts=i.pts,n.dts=i.dts,n.duration=i.duration):(n.duration+=i.duration,n.nalCount+=i.length,n.byteLength+=i.byteLength,n.push(i));return r.length&&n.duration<=0&&(n.duration=r[r.length-1].duration),r.byteLength+=n.byteLength,r.nalCount+=n.nalCount,r.duration+=n.duration,r.push(n),r},ne=function(e){var t;return!e[0][0].keyFrame&&1<e.length&&(t=e.shift(),e.byteLength-=t.byteLength,e.nalCount-=t.nalCount,e[0][0].dts=t.dts,e[0][0].pts=t.pts,e[0][0].duration+=t.duration),e},re=function(e,t){var i,n,r,a,s,o=t||0,u=[];for(i=0;i<e.length;i++)for(a=e[i],n=0;n<a.length;n++)s=a[n],o+=(r=H(s,o)).size,u.push(r);return u},ae=function(e){var t,i,n,r,a,s,o=0,u=e.byteLength,l=e.nalCount,c=new Uint8Array(u+4*l),d=new DataView(c.buffer);for(t=0;t<e.length;t++)for(r=e[t],i=0;i<r.length;i++)for(a=r[i],n=0;n<a.length;n++)s=a[n],d.setUint32(o,s.data.byteLength),o+=4,c.set(s.data,o),o+=s.data.byteLength;return c},se=function(e,t){var i,n=[];return i=H(e,t||0),n.push(i),n},oe=function(e){var t,i,n=0,r=e.byteLength,a=e.length,s=new Uint8Array(r+4*a),o=new DataView(s.buffer);for(t=0;t<e.length;t++)i=e[t],o.setUint32(n,i.data.byteLength),n+=4,s.set(i.data,n),n+=i.data.byteLength;return s},ue=[33,16,5,32,164,27],le=[33,65,108,84,1,2,4,8,168,2,4,8,17,191,252],ce=9e4,de=K=function(e){return 9e4*e},he=(Q=function(e,t){return e*t},Y=function(e){return e/9e4}),pe=($=function(e,t){return e/t},function(e,t){return K($(e,t))}),fe=function(e,t){return Q(Y(e),t)},me=function(e,t,i){return Y(i?e:e-t)},ge=function(e,t,i,n){var r,a,s,o,u,l=0,c=0,d=0;if(t.length&&(r=pe(e.baseMediaDecodeTime,e.samplerate),a=Math.ceil(ce/(e.samplerate/1024)),i&&n&&(l=r-Math.max(i,n),d=(c=Math.floor(l/a))*a),!(c<1||ce/2<d))){for(s=(s=z()[e.samplerate])||t[0].data,o=0;o<c;o++)u=t[0],t.splice(0,0,{data:s,dts:u.dts-a,pts:u.pts-a});return e.baseMediaDecodeTime-=Math.floor(fe(d,e.samplerate)),d}},ve=function(e,t,i){return t.minSegmentDts>=i?e:(t.minSegmentDts=1/0,e.filter(function(e){return e.dts>=i&&(t.minSegmentDts=Math.min(t.minSegmentDts,e.dts),t.minSegmentPts=t.minSegmentDts,!0)}))},ye=function(e){var t,i,n=[];for(t=0;t<e.length;t++)i=e[t],n.push({size:i.data.byteLength,duration:1024});return n},_e=function(e){var t,i,n=0,r=new Uint8Array(function(e){var t,i=0;for(t=0;t<e.length;t++)i+=e[t].data.byteLength;return i}(e));for(t=0;t<e.length;t++)i=e[t],r.set(i.data,n),n+=i.data.byteLength;return r},be=ce,Te=function(e){delete e.minSegmentDts,delete e.maxSegmentDts,delete e.minSegmentPts,delete e.maxSegmentPts},Se=function(e,t){var i,n=e.minSegmentDts;return t||(n-=e.timelineStartInfo.dts),i=e.timelineStartInfo.baseMediaDecodeTime,i+=n,i=Math.max(0,i),\"audio\"===e.type&&(i*=e.samplerate/be,i=Math.floor(i)),i},ke=function(e,t){\"number\"==typeof t.pts&&(void 0===e.timelineStartInfo.pts&&(e.timelineStartInfo.pts=t.pts),void 0===e.minSegmentPts?e.minSegmentPts=t.pts:e.minSegmentPts=Math.min(e.minSegmentPts,t.pts),void 0===e.maxSegmentPts?e.maxSegmentPts=t.pts:e.maxSegmentPts=Math.max(e.maxSegmentPts,t.pts)),\"number\"==typeof t.dts&&(void 0===e.timelineStartInfo.dts&&(e.timelineStartInfo.dts=t.dts),void 0===e.minSegmentDts?e.minSegmentDts=t.dts:e.minSegmentDts=Math.min(e.minSegmentDts,t.dts),void 0===e.maxSegmentDts?e.maxSegmentDts=t.dts:e.maxSegmentDts=Math.max(e.maxSegmentDts,t.dts))},we=function(e){for(var t=0,i={payloadType:-1,payloadSize:0},n=0,r=0;t<e.byteLength&&128!==e[t];){for(;255===e[t];)n+=255,t++;for(n+=e[t++];255===e[t];)r+=255,t++;if(r+=e[t++],!i.payload&&4===n){if(\"GA94\"===String.fromCharCode(e[t+3],e[t+4],e[t+5],e[t+6])){i.payloadType=n,i.payloadSize=r,i.payload=e.subarray(t,t+r);break}i.payload=void 0}t+=r,r=n=0}return i},Ee=function(e){return 181!==e.payload[0]?null:49!=(e.payload[1]<<8|e.payload[2])?null:\"GA94\"!==String.fromCharCode(e.payload[3],e.payload[4],e.payload[5],e.payload[6])?null:3!==e.payload[7]?null:e.payload.subarray(8,e.payload.length-1)},Ce=function(e,t){var i,n,r,a,s=[];if(!(64&t[0]))return s;for(n=31&t[0],i=0;i<n;i++)a={type:3&t[2+(r=3*i)],pts:e},4&t[2+r]&&(a.ccData=t[3+r]<<8|t[4+r],s.push(a));return s},Ie=function(e){for(var t,i,n=e.byteLength,r=[],a=1;a<n-2;)0===e[a]&&0===e[a+1]&&3===e[a+2]?(r.push(a+2),a+=2):a++;if(0===r.length)return e;t=n-r.length,i=new Uint8Array(t);var s=0;for(a=0;a<t;s++,a++)s===r[0]&&(s++,r.shift()),i[a]=e[s];return i},xe=4;(G.prototype=new V).push=function(e){var t,i,n;if(\"sei_rbsp\"===e.nalUnitType&&(t=we(e.escapedRBSP)).payload&&t.payloadType===xe&&(i=Ee(t)))if(e.dts<this.latestDts_)this.ignoreNextEqualDts_=!0;else{if(e.dts===this.latestDts_&&this.ignoreNextEqualDts_)return this.numSameDts_--,void(this.numSameDts_||(this.ignoreNextEqualDts_=!1));n=Ce(e.pts,i),this.captionPackets_=this.captionPackets_.concat(n),this.latestDts_!==e.dts&&(this.numSameDts_=0),this.numSameDts_++,this.latestDts_=e.dts}},G.prototype.flushCCStreams=function(t){this.ccStreams_.forEach(function(e){return\"flush\"===t?e.flush():e.partialFlush()},this)},G.prototype.flushStream=function(e){this.captionPackets_.length&&(this.captionPackets_.forEach(function(e,t){e.presortIndex=t}),this.captionPackets_.sort(function(e,t){return e.pts===t.pts?e.presortIndex-t.presortIndex:e.pts-t.pts}),this.captionPackets_.forEach(function(e){e.type<2?this.dispatchCea608Packet(e):this.dispatchCea708Packet(e)},this),this.captionPackets_.length=0),this.flushCCStreams(e)},G.prototype.flush=function(){return this.flushStream(\"flush\")},G.prototype.partialFlush=function(){return this.flushStream(\"partialFlush\")},G.prototype.reset=function(){this.latestDts_=null,this.ignoreNextEqualDts_=!1,this.numSameDts_=0,this.activeCea608Channel_=[null,null],this.ccStreams_.forEach(function(e){e.reset()})},G.prototype.dispatchCea608Packet=function(e){this.setsTextOrXDSActive(e)?this.activeCea608Channel_[e.type]=null:this.setsChannel1Active(e)?this.activeCea608Channel_[e.type]=0:this.setsChannel2Active(e)&&(this.activeCea608Channel_[e.type]=1),null!==this.activeCea608Channel_[e.type]&&this.ccStreams_[(e.type<<1)+this.activeCea608Channel_[e.type]].push(e)},G.prototype.setsChannel1Active=function(e){return 4096==(30720&e.ccData)},G.prototype.setsChannel2Active=function(e){return 6144==(30720&e.ccData)},G.prototype.setsTextOrXDSActive=function(e){return 256==(28928&e.ccData)||4138==(30974&e.ccData)||6186==(30974&e.ccData)},G.prototype.dispatchCea708Packet=function(e){this.parse708captions_&&this.cc708Stream_.push(e)};function Ae(e){return 32<=e&&e<=127||160<=e&&e<=255}function Pe(e){this.windowNum=e,this.reset()}var Le={127:9834,4128:32,4129:160,4133:8230,4138:352,4140:338,4144:9608,4145:8216,4146:8217,4147:8220,4148:8221,4149:8226,4153:8482,4154:353,4156:339,4157:8480,4159:376,4214:8539,4215:8540,4216:8541,4217:8542,4218:9168,4219:9124,4220:9123,4221:9135,4222:9126,4223:9121,4256:12600};Pe.prototype.reset=function(){this.clearText(),this.pendingNewLine=!1,this.winAttr={},this.penAttr={},this.penLoc={},this.penColor={},this.visible=0,this.rowLock=0,this.columnLock=0,this.priority=0,this.relativePositioning=0,this.anchorVertical=0,this.anchorHorizontal=0,this.anchorPoint=0,this.rowCount=1,this.virtualRowCount=this.rowCount+1,this.columnCount=41,this.windowStyle=0,this.penStyle=0},Pe.prototype.getText=function(){return this.rows.join(\"\\n\")},Pe.prototype.clearText=function(){this.rows=[\"\"],this.rowIdx=0},Pe.prototype.newLine=function(e){for(this.rows.length>=this.virtualRowCount&&\"function\"==typeof this.beforeRowOverflow&&this.beforeRowOverflow(e),0<this.rows.length&&(this.rows.push(\"\"),this.rowIdx++);this.rows.length>this.virtualRowCount;)this.rows.shift(),this.rowIdx--},Pe.prototype.isEmpty=function(){return 0===this.rows.length||1===this.rows.length&&\"\"===this.rows[0]},Pe.prototype.addText=function(e){this.rows[this.rowIdx]+=e},Pe.prototype.backspace=function(){if(!this.isEmpty()){var e=this.rows[this.rowIdx];this.rows[this.rowIdx]=e.substr(0,e.length-1)}};function Oe(e){this.serviceNum=e,this.text=\"\",this.currentWindow=new Pe(-1),this.windows=[]}Oe.prototype.init=function(e,t){this.startPts=e;for(var i=0;i<8;i++)this.windows[i]=new Pe(i),\"function\"==typeof t&&(this.windows[i].beforeRowOverflow=t)},Oe.prototype.setCurrentWindow=function(e){this.currentWindow=this.windows[e]};var De=function e(){e.prototype.init.call(this);var t=this;this.current708Packet=null,this.services={},this.push=function(e){3===e.type?t.new708Packet():null===t.current708Packet&&t.new708Packet(),t.add708Bytes(e)}};De.prototype=new V,De.prototype.new708Packet=function(){null!==this.current708Packet&&this.push708Packet(),this.current708Packet={data:[],ptsVals:[]}},De.prototype.add708Bytes=function(e){var t=e.ccData,i=t>>>8,n=255&t;this.current708Packet.ptsVals.push(e.pts),this.current708Packet.data.push(i),this.current708Packet.data.push(n)},De.prototype.push708Packet=function(){var e=this.current708Packet,t=e.data,i=null,n=null,r=0,a=t[r++];for(e.seq=a>>6,e.sizeCode=63&a;r<t.length;r++)n=31&(a=t[r++]),7===(i=a>>5)&&0<n&&(i=a=t[r++]),this.pushServiceBlock(i,r,n),0<n&&(r+=n-1)},De.prototype.pushServiceBlock=function(e,t,i){var n,r=t,a=this.current708Packet.data,s=this.services[e];for(s=s||this.initService(e,r);r<t+i&&r<a.length;r++)n=a[r],Ae(n)?r=this.handleText(r,s):16===n?r=this.extendedCommands(r,s):128<=n&&n<=135?r=this.setCurrentWindow(r,s):152<=n&&n<=159?r=this.defineWindow(r,s):136===n?r=this.clearWindows(r,s):140===n?r=this.deleteWindows(r,s):137===n?r=this.displayWindows(r,s):138===n?r=this.hideWindows(r,s):139===n?r=this.toggleWindows(r,s):151===n?r=this.setWindowAttributes(r,s):144===n?r=this.setPenAttributes(r,s):145===n?r=this.setPenColor(r,s):146===n?r=this.setPenLocation(r,s):143===n?s=this.reset(r,s):8===n?s.currentWindow.backspace():12===n?s.currentWindow.clearText():13===n?s.currentWindow.pendingNewLine=!0:14===n?s.currentWindow.clearText():141===n&&r++},De.prototype.extendedCommands=function(e,t){var i=this.current708Packet.data[++e];return Ae(i)&&(e=this.handleText(e,t,!0)),e},De.prototype.getPts=function(e){return this.current708Packet.ptsVals[Math.floor(e/2)]},De.prototype.initService=function(t,e){var i=this;return this.services[t]=new Oe(t),this.services[t].init(this.getPts(e),function(e){i.flushDisplayed(e,i.services[t])}),this.services[t]},De.prototype.handleText=function(e,t,i){var n=function(e){var t=Le[e]||e;return 4096&e&&e===t?\"\":String.fromCharCode(t)}((i?4096:0)|this.current708Packet.data[e]),r=t.currentWindow;return r.pendingNewLine&&!r.isEmpty()&&r.newLine(this.getPts(e)),r.pendingNewLine=!1,r.addText(n),e},De.prototype.setCurrentWindow=function(e,t){var i=7&this.current708Packet.data[e];return t.setCurrentWindow(i),e},De.prototype.defineWindow=function(e,t){var i=this.current708Packet.data,n=i[e],r=7&n;t.setCurrentWindow(r);var a=t.currentWindow;return n=i[++e],a.visible=(32&n)>>5,a.rowLock=(16&n)>>4,a.columnLock=(8&n)>>3,a.priority=7&n,n=i[++e],a.relativePositioning=(128&n)>>7,a.anchorVertical=127&n,n=i[++e],a.anchorHorizontal=n,n=i[++e],a.anchorPoint=(240&n)>>4,a.rowCount=15&n,n=i[++e],a.columnCount=63&n,n=i[++e],a.windowStyle=(56&n)>>3,a.penStyle=7&n,a.virtualRowCount=a.rowCount+1,e},De.prototype.setWindowAttributes=function(e,t){var i=this.current708Packet.data,n=i[e],r=t.currentWindow.winAttr;return n=i[++e],r.fillOpacity=(192&n)>>6,r.fillRed=(48&n)>>4,r.fillGreen=(12&n)>>2,r.fillBlue=3&n,n=i[++e],r.borderType=(192&n)>>6,r.borderRed=(48&n)>>4,r.borderGreen=(12&n)>>2,r.borderBlue=3&n,n=i[++e],r.borderType+=(128&n)>>5,r.wordWrap=(64&n)>>6,r.printDirection=(48&n)>>4,r.scrollDirection=(12&n)>>2,r.justify=3&n,n=i[++e],r.effectSpeed=(240&n)>>4,r.effectDirection=(12&n)>>2,r.displayEffect=3&n,e},De.prototype.flushDisplayed=function(e,t){for(var i=[],n=0;n<8;n++)t.windows[n].visible&&!t.windows[n].isEmpty()&&i.push(t.windows[n].getText());t.endPts=e,t.text=i.join(\"\\n\\n\"),this.pushCaption(t),t.startPts=e},De.prototype.pushCaption=function(e){\"\"!==e.text&&(this.trigger(\"data\",{startPts:e.startPts,endPts:e.endPts,text:e.text,stream:\"cc708_\"+e.serviceNum}),e.text=\"\",e.startPts=e.endPts)},De.prototype.displayWindows=function(e,t){var i=this.current708Packet.data[++e],n=this.getPts(e);this.flushDisplayed(n,t);for(var r=0;r<8;r++)i&1<<r&&(t.windows[r].visible=1);return e},De.prototype.hideWindows=function(e,t){var i=this.current708Packet.data[++e],n=this.getPts(e);this.flushDisplayed(n,t);for(var r=0;r<8;r++)i&1<<r&&(t.windows[r].visible=0);return e},De.prototype.toggleWindows=function(e,t){var i=this.current708Packet.data[++e],n=this.getPts(e);this.flushDisplayed(n,t);for(var r=0;r<8;r++)i&1<<r&&(t.windows[r].visible^=1);return e},De.prototype.clearWindows=function(e,t){var i=this.current708Packet.data[++e],n=this.getPts(e);this.flushDisplayed(n,t);for(var r=0;r<8;r++)i&1<<r&&t.windows[r].clearText();return e},De.prototype.deleteWindows=function(e,t){var i=this.current708Packet.data[++e],n=this.getPts(e);this.flushDisplayed(n,t);for(var r=0;r<8;r++)i&1<<r&&t.windows[r].reset();return e},De.prototype.setPenAttributes=function(e,t){var i=this.current708Packet.data,n=i[e],r=t.currentWindow.penAttr;return n=i[++e],r.textTag=(240&n)>>4,r.offset=(12&n)>>2,r.penSize=3&n,n=i[++e],r.italics=(128&n)>>7,r.underline=(64&n)>>6,r.edgeType=(56&n)>>3,r.fontStyle=7&n,e},De.prototype.setPenColor=function(e,t){var i=this.current708Packet.data,n=i[e],r=t.currentWindow.penColor;return n=i[++e],r.fgOpacity=(192&n)>>6,r.fgRed=(48&n)>>4,r.fgGreen=(12&n)>>2,r.fgBlue=3&n,n=i[++e],r.bgOpacity=(192&n)>>6,r.bgRed=(48&n)>>4,r.bgGreen=(12&n)>>2,r.bgBlue=3&n,n=i[++e],r.edgeRed=(48&n)>>4,r.edgeGreen=(12&n)>>2,r.edgeBlue=3&n,e},De.prototype.setPenLocation=function(e,t){var i=this.current708Packet.data,n=i[e],r=t.currentWindow.penLoc;return t.currentWindow.pendingNewLine=!0,n=i[++e],r.row=15&n,n=i[++e],r.column=63&n,e},De.prototype.reset=function(e,t){var i=this.getPts(e);return this.flushDisplayed(i,t),this.initService(t.serviceNum,e)};function Re(e){return null===e?\"\":(e=Ne[e]||e,String.fromCharCode(e))}function Me(){for(var e=[],t=15;t--;)e.push(\"\");return e}var Ne={42:225,92:233,94:237,95:243,96:250,123:231,124:247,125:209,126:241,127:9608,304:174,305:176,306:189,307:191,308:8482,309:162,310:163,311:9834,312:224,313:160,314:232,315:226,316:234,317:238,318:244,319:251,544:193,545:201,546:211,547:218,548:220,549:252,550:8216,551:161,552:42,553:39,554:8212,555:169,556:8480,557:8226,558:8220,559:8221,560:192,561:194,562:199,563:200,564:202,565:203,566:235,567:206,568:207,569:239,570:212,571:217,572:249,573:219,574:171,575:187,800:195,801:227,802:205,803:204,804:236,805:210,806:242,807:213,808:245,809:123,810:125,811:92,812:94,813:95,814:124,815:126,816:196,817:228,818:214,819:246,820:223,821:165,822:164,823:9474,824:197,825:229,826:216,827:248,828:9484,829:9488,830:9492,831:9496},Ue=[4352,4384,4608,4640,5376,5408,5632,5664,5888,5920,4096,4864,4896,5120,5152],Be=function e(t,i){e.prototype.init.call(this),this.field_=t||0,this.dataChannel_=i||0,this.name_=\"CC\"+(1+(this.field_<<1|this.dataChannel_)),this.setConstants(),this.reset(),this.push=function(e){var t,i,n,r,a;if((t=32639&e.ccData)!==this.lastControlCode_){if(4096==(61440&t)?this.lastControlCode_=t:t!==this.PADDING_&&(this.lastControlCode_=null),n=t>>>8,r=255&t,t!==this.PADDING_)if(t===this.RESUME_CAPTION_LOADING_)this.mode_=\"popOn\";else if(t===this.END_OF_CAPTION_)this.mode_=\"popOn\",this.clearFormatting(e.pts),this.flushDisplayed(e.pts),i=this.displayed_,this.displayed_=this.nonDisplayed_,this.nonDisplayed_=i,this.startPts_=e.pts;else if(t===this.ROLL_UP_2_ROWS_)this.rollUpRows_=2,this.setRollUp(e.pts);else if(t===this.ROLL_UP_3_ROWS_)this.rollUpRows_=3,this.setRollUp(e.pts);else if(t===this.ROLL_UP_4_ROWS_)this.rollUpRows_=4,this.setRollUp(e.pts);else if(t===this.CARRIAGE_RETURN_)this.clearFormatting(e.pts),this.flushDisplayed(e.pts),this.shiftRowsUp_(),this.startPts_=e.pts;else if(t===this.BACKSPACE_)\"popOn\"===this.mode_?this.nonDisplayed_[this.row_]=this.nonDisplayed_[this.row_].slice(0,-1):this.displayed_[this.row_]=this.displayed_[this.row_].slice(0,-1);else if(t===this.ERASE_DISPLAYED_MEMORY_)this.flushDisplayed(e.pts),this.displayed_=Me();else if(t===this.ERASE_NON_DISPLAYED_MEMORY_)this.nonDisplayed_=Me();else if(t===this.RESUME_DIRECT_CAPTIONING_)\"paintOn\"!==this.mode_&&(this.flushDisplayed(e.pts),this.displayed_=Me()),this.mode_=\"paintOn\",this.startPts_=e.pts;else if(this.isSpecialCharacter(n,r))a=Re((n=(3&n)<<8)|r),this[this.mode_](e.pts,a),this.column_++;else if(this.isExtCharacter(n,r))\"popOn\"===this.mode_?this.nonDisplayed_[this.row_]=this.nonDisplayed_[this.row_].slice(0,-1):this.displayed_[this.row_]=this.displayed_[this.row_].slice(0,-1),a=Re((n=(3&n)<<8)|r),this[this.mode_](e.pts,a),this.column_++;else if(this.isMidRowCode(n,r))this.clearFormatting(e.pts),this[this.mode_](e.pts,\" \"),this.column_++,14==(14&r)&&this.addFormatting(e.pts,[\"i\"]),1==(1&r)&&this.addFormatting(e.pts,[\"u\"]);else if(this.isOffsetControlCode(n,r))this.column_+=3&r;else if(this.isPAC(n,r)){var s=Ue.indexOf(7968&t);\"rollUp\"===this.mode_&&(s-this.rollUpRows_+1<0&&(s=this.rollUpRows_-1),this.setRollUp(e.pts,s)),s!==this.row_&&(this.clearFormatting(e.pts),this.row_=s),1&r&&-1===this.formatting_.indexOf(\"u\")&&this.addFormatting(e.pts,[\"u\"]),16==(16&t)&&(this.column_=4*((14&t)>>1)),this.isColorPAC(r)&&14==(14&r)&&this.addFormatting(e.pts,[\"i\"])}else this.isNormalChar(n)&&(0===r&&(r=null),a=Re(n),a+=Re(r),this[this.mode_](e.pts,a),this.column_+=a.length)}else this.lastControlCode_=null}};Be.prototype=new V,Be.prototype.flushDisplayed=function(e){var t=this.displayed_.map(function(e){try{return e.trim()}catch(e){return\"\"}}).join(\"\\n\").replace(/^\\n+|\\n+$/g,\"\");t.length&&this.trigger(\"data\",{startPts:this.startPts_,endPts:e,text:t,stream:this.name_})},Be.prototype.reset=function(){this.mode_=\"popOn\",this.topRow_=0,this.startPts_=0,this.displayed_=Me(),this.nonDisplayed_=Me(),this.lastControlCode_=null,this.column_=0,this.row_=14,this.rollUpRows_=2,this.formatting_=[]},Be.prototype.setConstants=function(){0===this.dataChannel_?(this.BASE_=16,this.EXT_=17,this.CONTROL_=(20|this.field_)<<8,this.OFFSET_=23):1===this.dataChannel_&&(this.BASE_=24,this.EXT_=25,this.CONTROL_=(28|this.field_)<<8,this.OFFSET_=31),this.PADDING_=0,this.RESUME_CAPTION_LOADING_=32|this.CONTROL_,this.END_OF_CAPTION_=47|this.CONTROL_,this.ROLL_UP_2_ROWS_=37|this.CONTROL_,this.ROLL_UP_3_ROWS_=38|this.CONTROL_,this.ROLL_UP_4_ROWS_=39|this.CONTROL_,this.CARRIAGE_RETURN_=45|this.CONTROL_,this.RESUME_DIRECT_CAPTIONING_=41|this.CONTROL_,this.BACKSPACE_=33|this.CONTROL_,this.ERASE_DISPLAYED_MEMORY_=44|this.CONTROL_,this.ERASE_NON_DISPLAYED_MEMORY_=46|this.CONTROL_},Be.prototype.isSpecialCharacter=function(e,t){return e===this.EXT_&&48<=t&&t<=63},Be.prototype.isExtCharacter=function(e,t){return(e===this.EXT_+1||e===this.EXT_+2)&&32<=t&&t<=63},Be.prototype.isMidRowCode=function(e,t){return e===this.EXT_&&32<=t&&t<=47},Be.prototype.isOffsetControlCode=function(e,t){return e===this.OFFSET_&&33<=t&&t<=35},Be.prototype.isPAC=function(e,t){return e>=this.BASE_&&e<this.BASE_+8&&64<=t&&t<=127},Be.prototype.isColorPAC=function(e){return 64<=e&&e<=79||96<=e&&e<=127},Be.prototype.isNormalChar=function(e){return 32<=e&&e<=127},Be.prototype.setRollUp=function(e,t){if(\"rollUp\"!==this.mode_&&(this.row_=14,this.mode_=\"rollUp\",this.flushDisplayed(e),this.nonDisplayed_=Me(),this.displayed_=Me()),void 0!==t&&t!==this.row_)for(var i=0;i<this.rollUpRows_;i++)this.displayed_[t-i]=this.displayed_[this.row_-i],this.displayed_[this.row_-i]=\"\";void 0===t&&(t=this.row_),this.topRow_=t-this.rollUpRows_+1},Be.prototype.addFormatting=function(e,t){this.formatting_=this.formatting_.concat(t);var i=t.reduce(function(e,t){return e+\"<\"+t+\">\"},\"\");this[this.mode_](e,i)},Be.prototype.clearFormatting=function(e){if(this.formatting_.length){var t=this.formatting_.reverse().reduce(function(e,t){return e+\"</\"+t+\">\"},\"\");this.formatting_=[],this[this.mode_](e,t)}},Be.prototype.popOn=function(e,t){var i=this.nonDisplayed_[this.row_];i+=t,this.nonDisplayed_[this.row_]=i},Be.prototype.rollUp=function(e,t){var i=this.displayed_[this.row_];i+=t,this.displayed_[this.row_]=i},Be.prototype.shiftRowsUp_=function(){var e;for(e=0;e<this.topRow_;e++)this.displayed_[e]=\"\";for(e=this.row_+1;e<15;e++)this.displayed_[e]=\"\";for(e=this.topRow_;e<this.row_;e++)this.displayed_[e]=this.displayed_[e+1];this.displayed_[this.row_]=\"\"},Be.prototype.paintOn=function(e,t){var i=this.displayed_[this.row_];i+=t,this.displayed_[this.row_]=i};function Fe(e,t){var i=1;for(t<e&&(i=-1);4294967296<Math.abs(t-e);)e+=8589934592*i;return e}function je(e){var t,i;je.prototype.init.call(this),this.type_=e||\"shared\",this.push=function(e){\"shared\"!==this.type_&&e.type!==this.type_||(void 0===i&&(i=e.dts),e.dts=Fe(e.dts,i),e.pts=Fe(e.pts,i),t=e.dts,this.trigger(\"data\",e))},this.flush=function(){i=t,this.trigger(\"done\")},this.endTimeline=function(){this.flush(),this.trigger(\"endedtimeline\")},this.discontinuity=function(){t=i=void 0},this.reset=function(){this.discontinuity(),this.trigger(\"reset\")}}var Ve={CaptionStream:G,Cea608Stream:Be,Cea708Stream:De},qe={H264_STREAM_TYPE:27,ADTS_STREAM_TYPE:15,METADATA_STREAM_TYPE:21};je.prototype=new V;function He(e,t,i){var n,r=\"\";for(n=t;n<i;n++)r+=\"%\"+(\"00\"+e[n].toString(16)).slice(-2);return r}function We(e,t,i){return decodeURIComponent(He(e,t,i))}function ze(e){return e[0]<<21|e[1]<<14|e[2]<<7|e[3]}var Ge,Xe=je,Ke={TXXX:function(e){var t;if(3===e.data[0]){for(t=1;t<e.data.length;t++)if(0===e.data[t]){e.description=We(e.data,1,t),e.value=We(e.data,t+1,e.data.length).replace(/\\0*$/,\"\");break}e.data=e.value}},WXXX:function(e){var t;if(3===e.data[0])for(t=1;t<e.data.length;t++)if(0===e.data[t]){e.description=We(e.data,1,t),e.url=We(e.data,t+1,e.data.length);break}},PRIV:function(e){var t,i;for(t=0;t<e.data.length;t++)if(0===e.data[t]){e.owner=(i=e.data,unescape(He(i,0,t)));break}e.privateData=e.data.subarray(t+1),e.data=e.privateData}};(Ge=function(e){var t,u={debug:!(!e||!e.debug),descriptor:e&&e.descriptor},l=0,c=[],d=0;if(Ge.prototype.init.call(this),this.dispatchType=qe.METADATA_STREAM_TYPE.toString(16),u.descriptor)for(t=0;t<u.descriptor.length;t++)this.dispatchType+=(\"00\"+u.descriptor[t].toString(16)).slice(-2);this.push=function(e){var t,i,n,r,a;if(\"timed-metadata\"===e.type)if(e.dataAlignmentIndicator&&(d=0,c.length=0),0===c.length&&(e.data.length<10||e.data[0]!==\"I\".charCodeAt(0)||e.data[1]!==\"D\".charCodeAt(0)||e.data[2]!==\"3\".charCodeAt(0)))u.debug;else if(c.push(e),d+=e.data.byteLength,1===c.length&&(l=ze(e.data.subarray(6,10)),l+=10),!(d<l)){for(t={data:new Uint8Array(l),frames:[],pts:c[0].pts,dts:c[0].dts},a=0;a<l;)t.data.set(c[0].data.subarray(0,l-a),a),a+=c[0].data.byteLength,d-=c[0].data.byteLength,c.shift();i=10,64&t.data[5]&&(i+=4,i+=ze(t.data.subarray(10,14)),l-=ze(t.data.subarray(16,20)));do{if((n=ze(t.data.subarray(i+4,i+8)))<1)return;if((r={id:String.fromCharCode(t.data[i],t.data[i+1],t.data[i+2],t.data[i+3]),data:t.data.subarray(i+10,i+n+10)}).key=r.id,Ke[r.id]&&(Ke[r.id](r),\"com.apple.streaming.transportStreamTimestamp\"===r.owner)){var s=r.data,o=(1&s[3])<<30|s[4]<<22|s[5]<<14|s[6]<<6|s[7]>>>2;o*=4,o+=3&s[7],r.timeStamp=o,void 0===t.pts&&void 0===t.dts&&(t.pts=r.timeStamp,t.dts=r.timeStamp),this.trigger(\"timestamp\",r)}t.frames.push(r),i+=10,i+=n}while(i<l);this.trigger(\"data\",t)}}}).prototype=new V;var Qe,Ye,$e,Je=Ge,Ze=Xe;(Qe=function(){var r=new Uint8Array(188),a=0;Qe.prototype.init.call(this),this.push=function(e){var t,i=0,n=188;for(a?((t=new Uint8Array(e.byteLength+a)).set(r.subarray(0,a)),t.set(e,a),a=0):t=e;n<t.byteLength;)71!==t[i]||71!==t[n]?(i++,n++):(this.trigger(\"data\",t.subarray(i,n)),i+=188,n+=188);i<t.byteLength&&(r.set(t.subarray(i),0),a=t.byteLength-i)},this.flush=function(){188===a&&71===r[0]&&(this.trigger(\"data\",r),a=0),this.trigger(\"done\")},this.endTimeline=function(){this.flush(),this.trigger(\"endedtimeline\")},this.reset=function(){a=0,this.trigger(\"reset\")}}).prototype=new V,(Ye=function(){var n,r,a,s;Ye.prototype.init.call(this),(s=this).packetsWaitingForPmt=[],this.programMapTable=void 0,n=function(e,t){var i=0;t.payloadUnitStartIndicator&&(i+=e[i]+1),\"pat\"===t.type?r(e.subarray(i),t):a(e.subarray(i),t)},r=function(e,t){t.section_number=e[7],t.last_section_number=e[8],s.pmtPid=(31&e[10])<<8|e[11],t.pmtPid=s.pmtPid},a=function(e,t){var i,n;if(1&e[5]){for(s.programMapTable={video:null,audio:null,\"timed-metadata\":{}},i=3+((15&e[1])<<8|e[2])-4,n=12+((15&e[10])<<8|e[11]);n<i;){var r=e[n],a=(31&e[n+1])<<8|e[n+2];r===qe.H264_STREAM_TYPE&&null===s.programMapTable.video?s.programMapTable.video=a:r===qe.ADTS_STREAM_TYPE&&null===s.programMapTable.audio?s.programMapTable.audio=a:r===qe.METADATA_STREAM_TYPE&&(s.programMapTable[\"timed-metadata\"][a]=r),n+=5+((15&e[n+3])<<8|e[n+4])}t.programMapTable=s.programMapTable}},this.push=function(e){var t={},i=4;if(t.payloadUnitStartIndicator=!!(64&e[1]),t.pid=31&e[1],t.pid<<=8,t.pid|=e[2],1<(48&e[3])>>>4&&(i+=e[i]+1),0===t.pid)t.type=\"pat\",n(e.subarray(i),t),this.trigger(\"data\",t);else if(t.pid===this.pmtPid)for(t.type=\"pmt\",n(e.subarray(i),t),this.trigger(\"data\",t);this.packetsWaitingForPmt.length;)this.processPes_.apply(this,this.packetsWaitingForPmt.shift());else void 0===this.programMapTable?this.packetsWaitingForPmt.push([e,i,t]):this.processPes_(e,i,t)},this.processPes_=function(e,t,i){i.pid===this.programMapTable.video?i.streamType=qe.H264_STREAM_TYPE:i.pid===this.programMapTable.audio?i.streamType=qe.ADTS_STREAM_TYPE:i.streamType=this.programMapTable[\"timed-metadata\"][i.pid],i.type=\"pes\",i.data=e.subarray(t),this.trigger(\"data\",i)}}).prototype=new V,Ye.STREAM_TYPES={h264:27,adts:15},($e=function(){function n(e,t,i){var n,r,a=new Uint8Array(e.size),s={type:t},o=0,u=0;if(e.data.length&&!(e.size<9)){for(s.trackId=e.data[0].pid,o=0;o<e.data.length;o++)r=e.data[o],a.set(r.data,u),u+=r.data.byteLength;!function(e,t){var i,n=e[0]<<16|e[1]<<8|e[2];t.data=new Uint8Array,1==n&&(t.packetLength=6+(e[4]<<8|e[5]),t.dataAlignmentIndicator=0!=(4&e[6]),192&(i=e[7])&&(t.pts=(14&e[9])<<27|(255&e[10])<<20|(254&e[11])<<12|(255&e[12])<<5|(254&e[13])>>>3,t.pts*=4,t.pts+=(6&e[13])>>>1,t.dts=t.pts,64&i&&(t.dts=(14&e[14])<<27|(255&e[15])<<20|(254&e[16])<<12|(255&e[17])<<5|(254&e[18])>>>3,t.dts*=4,t.dts+=(6&e[18])>>>1)),t.data=e.subarray(9+e[8]))}(a,s),n=\"video\"===t||s.packetLength<=e.size,(i||n)&&(e.size=0,e.data.length=0),n&&l.trigger(\"data\",s)}}var t,l=this,r={data:[],size:0},a={data:[],size:0},s={data:[],size:0};$e.prototype.init.call(this),this.push=function(i){({pat:function(){},pes:function(){var e,t;switch(i.streamType){case qe.H264_STREAM_TYPE:e=r,t=\"video\";break;case qe.ADTS_STREAM_TYPE:e=a,t=\"audio\";break;case qe.METADATA_STREAM_TYPE:e=s,t=\"timed-metadata\";break;default:return}i.payloadUnitStartIndicator&&n(e,t,!0),e.data.push(i),e.size+=i.data.byteLength},pmt:function(){var e={type:\"metadata\",tracks:[]};null!==(t=i.programMapTable).video&&e.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+t.video,codec:\"avc\",type:\"video\"}),null!==t.audio&&e.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+t.audio,codec:\"adts\",type:\"audio\"}),l.trigger(\"data\",e)}})[i.type]()},this.reset=function(){r.size=0,r.data.length=0,a.size=0,a.data.length=0,this.trigger(\"reset\")},this.flushStreams_=function(){n(r,\"video\"),n(a,\"audio\"),n(s,\"timed-metadata\")},this.flush=function(){this.flushStreams_(),this.trigger(\"done\")}}).prototype=new V;var et={PAT_PID:0,MP2T_PACKET_LENGTH:188,TransportPacketStream:Qe,TransportParseStream:Ye,ElementaryStream:$e,TimestampRolloverStream:Ze,CaptionStream:Ve.CaptionStream,Cea608Stream:Ve.Cea608Stream,Cea708Stream:Ve.Cea708Stream,MetadataStream:Je};for(var tt in qe)qe.hasOwnProperty(tt)&&(et[tt]=qe[tt]);var it,nt=et,rt=ce,at=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];(it=function(u){var l,c=0;it.prototype.init.call(this),this.push=function(e){var t,i,n,r,a,s,o=0;if(u||(c=0),\"audio\"===e.type)for(l?(r=l,(l=new Uint8Array(r.byteLength+e.data.byteLength)).set(r),l.set(e.data,r.byteLength)):l=e.data;o+5<l.length;)if(255===l[o]&&240==(246&l[o+1])){if(i=2*(1&~l[o+1]),t=(3&l[o+3])<<11|l[o+4]<<3|(224&l[o+5])>>5,s=(a=1024*(1+(3&l[o+6])))*rt/at[(60&l[o+2])>>>2],n=o+t,l.byteLength<n)return;if(this.trigger(\"data\",{pts:e.pts+c*s,dts:e.dts+c*s,sampleCount:a,audioobjecttype:1+(l[o+2]>>>6&3),channelcount:(1&l[o+2])<<2|(192&l[o+3])>>>6,samplerate:at[(60&l[o+2])>>>2],samplingfrequencyindex:(60&l[o+2])>>>2,samplesize:16,data:l.subarray(o+7+i,n)}),c++,l.byteLength===n)return void(l=void 0);l=l.subarray(n)}else o++},this.flush=function(){c=0,this.trigger(\"done\")},this.reset=function(){l=void 0,this.trigger(\"reset\")},this.endTimeline=function(){l=void 0,this.trigger(\"endedtimeline\")}}).prototype=new V;var st,ot,ut,lt=it,ct=function(n){var r=n.byteLength,a=0,s=0;this.length=function(){return 8*r},this.bitsAvailable=function(){return 8*r+s},this.loadWord=function(){var e=n.byteLength-r,t=new Uint8Array(4),i=Math.min(4,r);if(0===i)throw new Error(\"no bytes available\");t.set(n.subarray(e,e+i)),a=new DataView(t.buffer).getUint32(0),s=8*i,r-=i},this.skipBits=function(e){var t;e<s||(e-=s,e-=8*(t=Math.floor(e/8)),r-=t,this.loadWord()),a<<=e,s-=e},this.readBits=function(e){var t=Math.min(s,e),i=a>>>32-t;return 0<(s-=t)?a<<=t:0<r&&this.loadWord(),0<(t=e-t)?i<<t|this.readBits(t):i},this.skipLeadingZeros=function(){var e;for(e=0;e<s;++e)if(0!=(a&2147483648>>>e))return a<<=e,s-=e,e;return this.loadWord(),e+this.skipLeadingZeros()},this.skipUnsignedExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros())},this.skipExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros())},this.readUnsignedExpGolomb=function(){var e=this.skipLeadingZeros();return this.readBits(e+1)-1},this.readExpGolomb=function(){var e=this.readUnsignedExpGolomb();return 1&e?1+e>>>1:-1*(e>>>1)},this.readBoolean=function(){return 1===this.readBits(1)},this.readUnsignedByte=function(){return this.readBits(8)},this.loadWord()};(ot=function(){var n,r,a=0;ot.prototype.init.call(this),this.push=function(e){for(var t,i=(r=r?((t=new Uint8Array(r.byteLength+e.data.byteLength)).set(r),t.set(e.data,r.byteLength),t):e.data).byteLength;a<i-3;a++)if(1===r[a+2]){n=a+5;break}for(;n<i;)switch(r[n]){case 0:if(0!==r[n-1]){n+=2;break}if(0!==r[n-2]){n++;break}for(a+3!==n-2&&this.trigger(\"data\",r.subarray(a+3,n-2));1!==r[++n]&&n<i;);a=n-2,n+=3;break;case 1:if(0!==r[n-1]||0!==r[n-2]){n+=3;break}this.trigger(\"data\",r.subarray(a+3,n-2)),a=n-2,n+=3;break;default:n+=3}r=r.subarray(a),n-=a,a=0},this.reset=function(){r=null,a=0,this.trigger(\"reset\")},this.flush=function(){r&&3<r.byteLength&&this.trigger(\"data\",r.subarray(a+3)),r=null,a=0,this.trigger(\"done\")},this.endTimeline=function(){this.flush(),this.trigger(\"endedtimeline\")}}).prototype=new V,ut={100:!0,110:!0,122:!0,244:!0,44:!0,83:!0,86:!0,118:!0,128:!0,138:!0,139:!0,134:!0},(st=function(){var i,n,r,a,s,o,_,t=new ot;st.prototype.init.call(this),(i=this).push=function(e){\"video\"===e.type&&(n=e.trackId,r=e.pts,a=e.dts,t.push(e))},t.on(\"data\",function(e){var t={trackId:n,pts:r,dts:a,data:e};switch(31&e[0]){case 5:t.nalUnitType=\"slice_layer_without_partitioning_rbsp_idr\";break;case 6:t.nalUnitType=\"sei_rbsp\",t.escapedRBSP=s(e.subarray(1));break;case 7:t.nalUnitType=\"seq_parameter_set_rbsp\",t.escapedRBSP=s(e.subarray(1)),t.config=o(t.escapedRBSP);break;case 8:t.nalUnitType=\"pic_parameter_set_rbsp\";break;case 9:t.nalUnitType=\"access_unit_delimiter_rbsp\"}i.trigger(\"data\",t)}),t.on(\"done\",function(){i.trigger(\"done\")}),t.on(\"partialdone\",function(){i.trigger(\"partialdone\")}),t.on(\"reset\",function(){i.trigger(\"reset\")}),t.on(\"endedtimeline\",function(){i.trigger(\"endedtimeline\")}),this.flush=function(){t.flush()},this.partialFlush=function(){t.partialFlush()},this.reset=function(){t.reset()},this.endTimeline=function(){t.endTimeline()},_=function(e,t){var i,n=8,r=8;for(i=0;i<e;i++)0!==r&&(r=(n+t.readExpGolomb()+256)%256),n=0===r?n:r},s=function(e){for(var t,i,n=e.byteLength,r=[],a=1;a<n-2;)0===e[a]&&0===e[a+1]&&3===e[a+2]?(r.push(a+2),a+=2):a++;if(0===r.length)return e;t=n-r.length,i=new Uint8Array(t);var s=0;for(a=0;a<t;s++,a++)s===r[0]&&(s++,r.shift()),i[a]=e[s];return i},o=function(e){var t,i,n,r,a,s,o,u,l,c,d,h,p,f=0,m=0,g=0,v=0,y=1;if(i=(t=new ct(e)).readUnsignedByte(),r=t.readUnsignedByte(),n=t.readUnsignedByte(),t.skipUnsignedExpGolomb(),ut[i]&&(3===(a=t.readUnsignedExpGolomb())&&t.skipBits(1),t.skipUnsignedExpGolomb(),t.skipUnsignedExpGolomb(),t.skipBits(1),t.readBoolean()))for(d=3!==a?8:12,p=0;p<d;p++)t.readBoolean()&&_(p<6?16:64,t);if(t.skipUnsignedExpGolomb(),0===(s=t.readUnsignedExpGolomb()))t.readUnsignedExpGolomb();else if(1===s)for(t.skipBits(1),t.skipExpGolomb(),t.skipExpGolomb(),o=t.readUnsignedExpGolomb(),p=0;p<o;p++)t.skipExpGolomb();if(t.skipUnsignedExpGolomb(),t.skipBits(1),u=t.readUnsignedExpGolomb(),l=t.readUnsignedExpGolomb(),0===(c=t.readBits(1))&&t.skipBits(1),t.skipBits(1),t.readBoolean()&&(f=t.readUnsignedExpGolomb(),m=t.readUnsignedExpGolomb(),g=t.readUnsignedExpGolomb(),v=t.readUnsignedExpGolomb()),t.readBoolean()&&t.readBoolean()){switch(t.readUnsignedByte()){case 1:h=[1,1];break;case 2:h=[12,11];break;case 3:h=[10,11];break;case 4:h=[16,11];break;case 5:h=[40,33];break;case 6:h=[24,11];break;case 7:h=[20,11];break;case 8:h=[32,11];break;case 9:h=[80,33];break;case 10:h=[18,11];break;case 11:h=[15,11];break;case 12:h=[64,33];break;case 13:h=[160,99];break;case 14:h=[4,3];break;case 15:h=[3,2];break;case 16:h=[2,1];break;case 255:h=[t.readUnsignedByte()<<8|t.readUnsignedByte(),t.readUnsignedByte()<<8|t.readUnsignedByte()]}h&&(y=h[0]/h[1])}return{profileIdc:i,levelIdc:n,profileCompatibility:r,width:Math.ceil((16*(u+1)-2*f-2*m)*y),height:(2-c)*(l+1)*16-2*g-2*v,sarRatio:h}}}).prototype=new V;function dt(e,t){var i=e[t+6]<<21|e[t+7]<<14|e[t+8]<<7|e[t+9];return i=0<=i?i:0,(16&e[t+5])>>4?i+20:i+10}var ht,pt={H264Stream:st,NalByteStream:ot},ft=function(e){var t=function e(t,i){return t.length-i<10||t[i]!==\"I\".charCodeAt(0)||t[i+1]!==\"D\".charCodeAt(0)||t[i+2]!==\"3\".charCodeAt(0)?i:e(t,i+=dt(t,i))}(e,0);return e.length>=t+2&&255==(255&e[t])&&240==(240&e[t+1])&&16==(22&e[t+1])},mt=dt,gt=function(e,t){var i=(224&e[t+5])>>5,n=e[t+4]<<3;return 6144&e[t+3]|n|i};(ht=function(){var o=new Uint8Array,u=0;ht.prototype.init.call(this),this.setTimestamp=function(e){u=e},this.push=function(e){var t,i,n,r,a=0,s=0;for(o.length?(r=o.length,(o=new Uint8Array(e.byteLength+r)).set(o.subarray(0,r)),o.set(e,r)):o=e;3<=o.length-s;)if(o[s]!==\"I\".charCodeAt(0)||o[s+1]!==\"D\".charCodeAt(0)||o[s+2]!==\"3\".charCodeAt(0))if(255!=(255&o[s])||240!=(240&o[s+1]))s++;else{if(o.length-s<7)break;if(s+(a=gt(o,s))>o.length)break;n={type:\"audio\",data:o.subarray(s,s+a),pts:u,dts:u},this.trigger(\"data\",n),s+=a}else{if(o.length-s<10)break;if(s+(a=mt(o,s))>o.length)break;i={type:\"timed-metadata\",data:o.subarray(s,s+a)},this.trigger(\"data\",i),s+=a}t=o.length-s,o=0<t?o.subarray(s):new Uint8Array},this.reset=function(){o=new Uint8Array,this.trigger(\"reset\")},this.endTimeline=function(){o=new Uint8Array,this.trigger(\"endedtimeline\")}}).prototype=new V;function vt(e,t){var i;if(e.length!==t.length)return!1;for(i=0;i<e.length;i++)if(e[i]!==t[i])return!1;return!0}function yt(e,t,i,n,r,a){return{start:{dts:e,pts:e+(i-t)},end:{dts:e+(n-t),pts:e+(r-i)},prependedContentDuration:a,baseMediaDecodeTime:e}}var _t,bt,Tt,St,kt=ht,wt=[\"audioobjecttype\",\"channelcount\",\"samplerate\",\"samplingfrequencyindex\",\"samplesize\"],Et=[\"width\",\"height\",\"profileIdc\",\"levelIdc\",\"profileCompatibility\",\"sarRatio\"],Ct=pt.H264Stream,It=ft,xt=ce;(bt=function(o,u){var l=[],c=0,d=0,h=0,p=1/0;u=u||{},bt.prototype.init.call(this),this.push=function(t){ke(o,t),o&&wt.forEach(function(e){o[e]=t[e]}),l.push(t)},this.setEarliestDts=function(e){d=e},this.setVideoBaseMediaDecodeTime=function(e){p=e},this.setAudioAppendStart=function(e){h=e},this.flush=function(){var e,t,i,n,r,a,s;0!==l.length&&(e=ve(l,o,d),o.baseMediaDecodeTime=Se(o,u.keepOriginalTimestamps),s=ge(o,e,h,p),o.samples=ye(e),i=J(_e(e)),l=[],t=Z(c,[o]),n=new Uint8Array(t.byteLength+i.byteLength),c++,n.set(t),n.set(i,t.byteLength),Te(o),r=Math.ceil(1024*xt/o.samplerate),e.length&&(a=e.length*r,this.trigger(\"segmentTimingInfo\",yt(pe(o.baseMediaDecodeTime,o.samplerate),e[0].dts,e[0].pts,e[0].dts+a,e[0].pts+a,s||0)),this.trigger(\"timingInfo\",{start:e[0].pts,end:e[0].pts+a})),this.trigger(\"data\",{track:o,boxes:n})),this.trigger(\"done\",\"AudioSegmentStream\")},this.reset=function(){Te(o),l=[],this.trigger(\"reset\")}}).prototype=new V,(_t=function(c,d){var t,i,h=0,p=[],f=[];d=d||{},_t.prototype.init.call(this),delete c.minPTS,this.gopCache_=[],this.push=function(e){ke(c,e),\"seq_parameter_set_rbsp\"!==e.nalUnitType||t||(t=e.config,c.sps=[e.data],Et.forEach(function(e){c[e]=t[e]},this)),\"pic_parameter_set_rbsp\"!==e.nalUnitType||i||(i=e.data,c.pps=[e.data]),p.push(e)},this.flush=function(){for(var e,t,i,n,r,a,s,o,u=0;p.length&&\"access_unit_delimiter_rbsp\"!==p[0].nalUnitType;)p.shift();if(0===p.length)return this.resetStream_(),void this.trigger(\"done\",\"VideoSegmentStream\");if(e=te(p),(i=ie(e))[0][0].keyFrame||((t=this.getGopForFusion_(p[0],c))?(u=t.duration,i.unshift(t),i.byteLength+=t.byteLength,i.nalCount+=t.nalCount,i.pts=t.pts,i.dts=t.dts,i.duration+=t.duration):i=ne(i)),f.length){var l;if(!(l=d.alignGopsAtEnd?this.alignGopsAtEnd_(i):this.alignGopsAtStart_(i)))return this.gopCache_.unshift({gop:i.pop(),pps:c.pps,sps:c.sps}),this.gopCache_.length=Math.min(6,this.gopCache_.length),p=[],this.resetStream_(),void this.trigger(\"done\",\"VideoSegmentStream\");Te(c),i=l}ke(c,i),c.samples=re(i),r=J(ae(i)),c.baseMediaDecodeTime=Se(c,d.keepOriginalTimestamps),this.trigger(\"processedGopsInfo\",i.map(function(e){return{pts:e.pts,dts:e.dts,byteLength:e.byteLength}})),s=i[0],o=i[i.length-1],this.trigger(\"segmentTimingInfo\",yt(c.baseMediaDecodeTime,s.dts,s.pts,o.dts+o.duration,o.pts+o.duration,u)),this.trigger(\"timingInfo\",{start:i[0].pts,end:i[i.length-1].pts+i[i.length-1].duration}),this.gopCache_.unshift({gop:i.pop(),pps:c.pps,sps:c.sps}),this.gopCache_.length=Math.min(6,this.gopCache_.length),p=[],this.trigger(\"baseMediaDecodeTime\",c.baseMediaDecodeTime),this.trigger(\"timelineStartInfo\",c.timelineStartInfo),n=Z(h,[c]),a=new Uint8Array(n.byteLength+r.byteLength),h++,a.set(n),a.set(r,n.byteLength),this.trigger(\"data\",{track:c,boxes:a}),this.resetStream_(),this.trigger(\"done\",\"VideoSegmentStream\")},this.reset=function(){this.resetStream_(),p=[],this.gopCache_.length=0,f.length=0,this.trigger(\"reset\")},this.resetStream_=function(){Te(c),i=t=void 0},this.getGopForFusion_=function(e){var t,i,n,r,a,s=1/0;for(a=0;a<this.gopCache_.length;a++)n=(r=this.gopCache_[a]).gop,c.pps&&vt(c.pps[0],r.pps[0])&&c.sps&&vt(c.sps[0],r.sps[0])&&(n.dts<c.timelineStartInfo.dts||-1e4<=(t=e.dts-n.dts-n.duration)&&t<=45e3&&(!i||t<s)&&(i=r,s=t));return i?i.gop:null},this.alignGopsAtStart_=function(e){var t,i,n,r,a,s,o,u;for(a=e.byteLength,s=e.nalCount,o=e.duration,t=i=0;t<f.length&&i<e.length&&(n=f[t],r=e[i],n.pts!==r.pts);)r.pts>n.pts?t++:(i++,a-=r.byteLength,s-=r.nalCount,o-=r.duration);return 0===i?e:i===e.length?null:((u=e.slice(i)).byteLength=a,u.duration=o,u.nalCount=s,u.pts=u[0].pts,u.dts=u[0].dts,u)},this.alignGopsAtEnd_=function(e){var t,i,n,r,a,s,o;for(t=f.length-1,i=e.length-1,a=null,s=!1;0<=t&&0<=i;){if(n=f[t],r=e[i],n.pts===r.pts){s=!0;break}n.pts>r.pts?t--:(t===f.length-1&&(a=i),i--)}if(!s&&null===a)return null;if(0===(o=s?i:a))return e;var u=e.slice(o),l=u.reduce(function(e,t){return e.byteLength+=t.byteLength,e.duration+=t.duration,e.nalCount+=t.nalCount,e},{byteLength:0,duration:0,nalCount:0});return u.byteLength=l.byteLength,u.duration=l.duration,u.nalCount=l.nalCount,u.pts=u[0].pts,u.dts=u[0].dts,u},this.alignGopsWith=function(e){f=e}}).prototype=new V,(St=function(e,t){this.numberOfTracks=0,this.metadataStream=t,\"undefined\"!=typeof(e=e||{}).remux?this.remuxTracks=!!e.remux:this.remuxTracks=!0,\"boolean\"==typeof e.keepOriginalTimestamps?this.keepOriginalTimestamps=e.keepOriginalTimestamps:this.keepOriginalTimestamps=!1,this.pendingTracks=[],this.videoTrack=null,this.pendingBoxes=[],this.pendingCaptions=[],this.pendingMetadata=[],this.pendingBytes=0,this.emittedTracks=0,St.prototype.init.call(this),this.push=function(e){return e.text?this.pendingCaptions.push(e):e.frames?this.pendingMetadata.push(e):(this.pendingTracks.push(e.track),this.pendingBytes+=e.boxes.byteLength,\"video\"===e.track.type&&(this.videoTrack=e.track,this.pendingBoxes.push(e.boxes)),void(\"audio\"===e.track.type&&(this.audioTrack=e.track,this.pendingBoxes.unshift(e.boxes))))}}).prototype=new V,St.prototype.flush=function(e){var t,i,n,r,a=0,s={captions:[],captionStreams:{},metadata:[],info:{}},o=0;if(this.pendingTracks.length<this.numberOfTracks){if(\"VideoSegmentStream\"!==e&&\"AudioSegmentStream\"!==e)return;if(this.remuxTracks)return;if(0===this.pendingTracks.length)return this.emittedTracks++,void(this.emittedTracks>=this.numberOfTracks&&(this.trigger(\"done\"),this.emittedTracks=0))}if(this.videoTrack?(o=this.videoTrack.timelineStartInfo.pts,Et.forEach(function(e){s.info[e]=this.videoTrack[e]},this)):this.audioTrack&&(o=this.audioTrack.timelineStartInfo.pts,wt.forEach(function(e){s.info[e]=this.audioTrack[e]},this)),this.videoTrack||this.audioTrack){for(1===this.pendingTracks.length?s.type=this.pendingTracks[0].type:s.type=\"combined\",this.emittedTracks+=this.pendingTracks.length,n=ee(this.pendingTracks),s.initSegment=new Uint8Array(n.byteLength),s.initSegment.set(n),s.data=new Uint8Array(this.pendingBytes),r=0;r<this.pendingBoxes.length;r++)s.data.set(this.pendingBoxes[r],a),a+=this.pendingBoxes[r].byteLength;for(r=0;r<this.pendingCaptions.length;r++)(t=this.pendingCaptions[r]).startTime=me(t.startPts,o,this.keepOriginalTimestamps),t.endTime=me(t.endPts,o,this.keepOriginalTimestamps),s.captionStreams[t.stream]=!0,s.captions.push(t);for(r=0;r<this.pendingMetadata.length;r++)(i=this.pendingMetadata[r]).cueTime=me(i.pts,o,this.keepOriginalTimestamps),s.metadata.push(i);for(s.metadata.dispatchType=this.metadataStream.dispatchType,this.pendingTracks.length=0,this.videoTrack=null,this.pendingBoxes.length=0,this.pendingCaptions.length=0,this.pendingBytes=0,this.pendingMetadata.length=0,this.trigger(\"data\",s),r=0;r<s.captions.length;r++)t=s.captions[r],this.trigger(\"caption\",t);for(r=0;r<s.metadata.length;r++)i=s.metadata[r],this.trigger(\"id3Frame\",i)}this.emittedTracks>=this.numberOfTracks&&(this.trigger(\"done\"),this.emittedTracks=0)},St.prototype.setRemux=function(e){this.remuxTracks=e},(Tt=function(n){var r,a,s=this,i=!0;Tt.prototype.init.call(this),n=n||{},this.baseMediaDecodeTime=n.baseMediaDecodeTime||0,this.transmuxPipeline_={},this.setupAacPipeline=function(){var t={};(this.transmuxPipeline_=t).type=\"aac\",t.metadataStream=new nt.MetadataStream,t.aacStream=new kt,t.audioTimestampRolloverStream=new nt.TimestampRolloverStream(\"audio\"),t.timedMetadataTimestampRolloverStream=new nt.TimestampRolloverStream(\"timed-metadata\"),t.adtsStream=new lt,t.coalesceStream=new St(n,t.metadataStream),t.headOfPipeline=t.aacStream,t.aacStream.pipe(t.audioTimestampRolloverStream).pipe(t.adtsStream),t.aacStream.pipe(t.timedMetadataTimestampRolloverStream).pipe(t.metadataStream).pipe(t.coalesceStream),t.metadataStream.on(\"timestamp\",function(e){t.aacStream.setTimestamp(e.timeStamp)}),t.aacStream.on(\"data\",function(e){\"timed-metadata\"!==e.type&&\"audio\"!==e.type||t.audioSegmentStream||(a=a||{timelineStartInfo:{baseMediaDecodeTime:s.baseMediaDecodeTime},codec:\"adts\",type:\"audio\"},t.coalesceStream.numberOfTracks++,t.audioSegmentStream=new bt(a,n),t.audioSegmentStream.on(\"timingInfo\",s.trigger.bind(s,\"audioTimingInfo\")),t.adtsStream.pipe(t.audioSegmentStream).pipe(t.coalesceStream),s.trigger(\"trackinfo\",{hasAudio:!!a,hasVideo:!!r}))}),t.coalesceStream.on(\"data\",this.trigger.bind(this,\"data\")),t.coalesceStream.on(\"done\",this.trigger.bind(this,\"done\"))},this.setupTsPipeline=function(){var i={};(this.transmuxPipeline_=i).type=\"ts\",i.metadataStream=new nt.MetadataStream,i.packetStream=new nt.TransportPacketStream,i.parseStream=new nt.TransportParseStream,i.elementaryStream=new nt.ElementaryStream,i.timestampRolloverStream=new nt.TimestampRolloverStream,i.adtsStream=new lt,i.h264Stream=new Ct,i.captionStream=new nt.CaptionStream(n),i.coalesceStream=new St(n,i.metadataStream),i.headOfPipeline=i.packetStream,i.packetStream.pipe(i.parseStream).pipe(i.elementaryStream).pipe(i.timestampRolloverStream),i.timestampRolloverStream.pipe(i.h264Stream),i.timestampRolloverStream.pipe(i.adtsStream),i.timestampRolloverStream.pipe(i.metadataStream).pipe(i.coalesceStream),i.h264Stream.pipe(i.captionStream).pipe(i.coalesceStream),i.elementaryStream.on(\"data\",function(e){var t;if(\"metadata\"===e.type){for(t=e.tracks.length;t--;)r||\"video\"!==e.tracks[t].type?a||\"audio\"!==e.tracks[t].type||((a=e.tracks[t]).timelineStartInfo.baseMediaDecodeTime=s.baseMediaDecodeTime):(r=e.tracks[t]).timelineStartInfo.baseMediaDecodeTime=s.baseMediaDecodeTime;r&&!i.videoSegmentStream&&(i.coalesceStream.numberOfTracks++,i.videoSegmentStream=new _t(r,n),i.videoSegmentStream.on(\"timelineStartInfo\",function(e){a&&!n.keepOriginalTimestamps&&(a.timelineStartInfo=e,i.audioSegmentStream.setEarliestDts(e.dts-s.baseMediaDecodeTime))}),i.videoSegmentStream.on(\"processedGopsInfo\",s.trigger.bind(s,\"gopInfo\")),i.videoSegmentStream.on(\"segmentTimingInfo\",s.trigger.bind(s,\"videoSegmentTimingInfo\")),i.videoSegmentStream.on(\"baseMediaDecodeTime\",function(e){a&&i.audioSegmentStream.setVideoBaseMediaDecodeTime(e)}),i.videoSegmentStream.on(\"timingInfo\",s.trigger.bind(s,\"videoTimingInfo\")),i.h264Stream.pipe(i.videoSegmentStream).pipe(i.coalesceStream)),a&&!i.audioSegmentStream&&(i.coalesceStream.numberOfTracks++,i.audioSegmentStream=new bt(a,n),i.audioSegmentStream.on(\"timingInfo\",s.trigger.bind(s,\"audioTimingInfo\")),i.audioSegmentStream.on(\"segmentTimingInfo\",s.trigger.bind(s,\"audioSegmentTimingInfo\")),i.adtsStream.pipe(i.audioSegmentStream).pipe(i.coalesceStream)),s.trigger(\"trackinfo\",{hasAudio:!!a,hasVideo:!!r})}}),i.coalesceStream.on(\"data\",this.trigger.bind(this,\"data\")),i.coalesceStream.on(\"id3Frame\",function(e){e.dispatchType=i.metadataStream.dispatchType,s.trigger(\"id3Frame\",e)}),i.coalesceStream.on(\"caption\",this.trigger.bind(this,\"caption\")),i.coalesceStream.on(\"done\",this.trigger.bind(this,\"done\"))},this.setBaseMediaDecodeTime=function(e){var t=this.transmuxPipeline_;n.keepOriginalTimestamps||(this.baseMediaDecodeTime=e),a&&(a.timelineStartInfo.dts=void 0,a.timelineStartInfo.pts=void 0,Te(a),t.audioTimestampRolloverStream&&t.audioTimestampRolloverStream.discontinuity()),r&&(t.videoSegmentStream&&(t.videoSegmentStream.gopCache_=[]),r.timelineStartInfo.dts=void 0,r.timelineStartInfo.pts=void 0,Te(r),t.captionStream.reset()),t.timestampRolloverStream&&t.timestampRolloverStream.discontinuity()},this.setAudioAppendStart=function(e){a&&this.transmuxPipeline_.audioSegmentStream.setAudioAppendStart(e)},this.setRemux=function(e){var t=this.transmuxPipeline_;n.remux=e,t&&t.coalesceStream&&t.coalesceStream.setRemux(e)},this.alignGopsWith=function(e){r&&this.transmuxPipeline_.videoSegmentStream&&this.transmuxPipeline_.videoSegmentStream.alignGopsWith(e)},this.push=function(e){if(i){var t=It(e);t&&\"aac\"!==this.transmuxPipeline_.type?this.setupAacPipeline():t||\"ts\"===this.transmuxPipeline_.type||this.setupTsPipeline(),i=!1}this.transmuxPipeline_.headOfPipeline.push(e)},this.flush=function(){i=!0,this.transmuxPipeline_.headOfPipeline.flush()},this.endTimeline=function(){this.transmuxPipeline_.headOfPipeline.endTimeline()},this.reset=function(){this.transmuxPipeline_.headOfPipeline&&this.transmuxPipeline_.headOfPipeline.reset()},this.resetCaptions=function(){this.transmuxPipeline_.captionStream&&this.transmuxPipeline_.captionStream.reset()}}).prototype=new V;function At(a,s){var o=[],u=0,l=0,c=0,d=1/0,h=null,p=null;s=s||{},At.prototype.init.call(this),this.push=function(t){ke(a,t),a&&wt.forEach(function(e){a[e]=t[e]}),o.push(t)},this.setEarliestDts=function(e){l=e},this.setVideoBaseMediaDecodeTime=function(e){d=e},this.setAudioAppendStart=function(e){c=e},this.processFrames_=function(){var e,t,i,n,r;0!==o.length&&0!==(e=ve(o,a,l)).length&&(a.baseMediaDecodeTime=Se(a,s.keepOriginalTimestamps),ge(a,e,c,d),a.samples=ye(e),i=J(_e(e)),o=[],t=Z(u,[a]),u++,a.initSegment=ee([a]),(n=new Uint8Array(t.byteLength+i.byteLength)).set(t),n.set(i,t.byteLength),Te(a),null===h&&(p=h=e[0].pts),p+=e.length*(1024*Ot/a.samplerate),r={start:h},this.trigger(\"timingInfo\",r),this.trigger(\"data\",{track:a,boxes:n}))},this.flush=function(){this.processFrames_(),this.trigger(\"timingInfo\",{start:h,end:p}),this.resetTiming_(),this.trigger(\"done\",\"AudioSegmentStream\")},this.partialFlush=function(){this.processFrames_(),this.trigger(\"partialdone\",\"AudioSegmentStream\")},this.endTimeline=function(){this.flush(),this.trigger(\"endedtimeline\",\"AudioSegmentStream\")},this.resetTiming_=function(){Te(a),p=h=null},this.reset=function(){this.resetTiming_(),o=[],this.trigger(\"reset\")}}var Pt={Transmuxer:Tt,VideoSegmentStream:_t,AudioSegmentStream:bt,AUDIO_PROPERTIES:wt,VIDEO_PROPERTIES:Et,generateSegmentTimingInfo:yt},Lt={Adts:lt,h264:pt},Ot=ce;At.prototype=new V;function Dt(o,u){var t,i,l,c=0,d=[],h=[],p=null,f=null,m=!0;u=u||{},Dt.prototype.init.call(this),this.push=function(e){ke(o,e),\"undefined\"==typeof o.timelineStartInfo.dts&&(o.timelineStartInfo.dts=e.dts),\"seq_parameter_set_rbsp\"!==e.nalUnitType||t||(t=e.config,o.sps=[e.data],Et.forEach(function(e){o[e]=t[e]},this)),\"pic_parameter_set_rbsp\"!==e.nalUnitType||i||(i=e.data,o.pps=[e.data]),d.push(e)},this.processNals_=function(e){var t;for(d=h.concat(d);d.length&&\"access_unit_delimiter_rbsp\"!==d[0].nalUnitType;)d.shift();if(0!==d.length){var i=te(d);if(i.length)if(h=i[i.length-1],e&&(i.pop(),i.duration-=h.duration,i.nalCount-=h.length,i.byteLength-=h.byteLength),i.length){if(this.trigger(\"timelineStartInfo\",o.timelineStartInfo),m){if(!(l=ie(i))[0][0].keyFrame){if(!(l=ne(l))[0][0].keyFrame)return d=[].concat.apply([],i).concat(h),void(h=[]);(i=[].concat.apply([],l)).duration=l.duration}m=!1}for(null===p&&(p=i[0].pts,f=p),f+=i.duration,this.trigger(\"timingInfo\",{start:p,end:f}),t=0;t<i.length;t++){var n=i[t];o.samples=se(n);var r=J(oe(n));Te(o),ke(o,n),o.baseMediaDecodeTime=Se(o,u.keepOriginalTimestamps);var a=Z(c,[o]);c++,o.initSegment=ee([o]);var s=new Uint8Array(a.byteLength+r.byteLength);s.set(a),s.set(r,a.byteLength),this.trigger(\"data\",{track:o,boxes:s,sequence:c,videoFrameDts:n.dts,videoFramePts:n.pts})}d=[]}else d=[]}},this.resetTimingAndConfig_=function(){i=t=void 0,f=p=null},this.partialFlush=function(){this.processNals_(!0),this.trigger(\"partialdone\",\"VideoSegmentStream\")},this.flush=function(){this.processNals_(!1),this.resetTimingAndConfig_(),this.trigger(\"done\",\"VideoSegmentStream\")},this.endTimeline=function(){this.flush(),this.trigger(\"endedtimeline\",\"VideoSegmentStream\")},this.reset=function(){this.resetTimingAndConfig_(),h=[],d=[],m=!0,this.trigger(\"reset\")}}var Rt=At;Dt.prototype=new V;function Mt(e){return e.prototype=new V,e.prototype.init.call(e),e}function Nt(t,i){t.on(\"data\",i.trigger.bind(i,\"data\")),t.on(\"done\",i.trigger.bind(i,\"done\")),t.on(\"partialdone\",i.trigger.bind(i,\"partialdone\")),t.on(\"endedtimeline\",i.trigger.bind(i,\"endedtimeline\")),t.on(\"audioTimingInfo\",i.trigger.bind(i,\"audioTimingInfo\")),t.on(\"videoTimingInfo\",i.trigger.bind(i,\"videoTimingInfo\")),t.on(\"trackinfo\",i.trigger.bind(i,\"trackinfo\")),t.on(\"id3Frame\",function(e){e.dispatchType=t.metadataStream.dispatchType,e.cueTime=he(e.pts),i.trigger(\"id3Frame\",e)}),t.on(\"caption\",function(e){i.trigger(\"caption\",e)})}function Ut(i){var n=null,r=!0;i=i||{},Ut.prototype.init.call(this),i.baseMediaDecodeTime=i.baseMediaDecodeTime||0,this.push=function(e){if(r){var t=Ft(e);!t||n&&\"aac\"===n.type?t||n&&\"ts\"===n.type||(n=function(i){var n={type:\"ts\",tracks:{audio:null,video:null},packet:new nt.TransportPacketStream,parse:new nt.TransportParseStream,elementary:new nt.ElementaryStream,timestampRollover:new nt.TimestampRolloverStream,adts:new Lt.Adts,h264:new Lt.h264.H264Stream,captionStream:new nt.CaptionStream(i),metadataStream:new nt.MetadataStream};return n.headOfPipeline=n.packet,n.packet.pipe(n.parse).pipe(n.elementary).pipe(n.timestampRollover),n.timestampRollover.pipe(n.h264),n.h264.pipe(n.captionStream),n.timestampRollover.pipe(n.metadataStream),n.timestampRollover.pipe(n.adts),n.elementary.on(\"data\",function(e){if(\"metadata\"===e.type){for(var t=0;t<e.tracks.length;t++)n.tracks[e.tracks[t].type]||(n.tracks[e.tracks[t].type]=e.tracks[t],n.tracks[e.tracks[t].type].timelineStartInfo.baseMediaDecodeTime=i.baseMediaDecodeTime);n.tracks.video&&!n.videoSegmentStream&&(n.videoSegmentStream=new Bt(n.tracks.video,i),n.videoSegmentStream.on(\"timelineStartInfo\",function(e){n.tracks.audio&&!i.keepOriginalTimestamps&&n.audioSegmentStream.setEarliestDts(e.dts-i.baseMediaDecodeTime)}),n.videoSegmentStream.on(\"timingInfo\",n.trigger.bind(n,\"videoTimingInfo\")),n.videoSegmentStream.on(\"data\",function(e){n.trigger(\"data\",{type:\"video\",data:e})}),n.videoSegmentStream.on(\"done\",n.trigger.bind(n,\"done\")),n.videoSegmentStream.on(\"partialdone\",n.trigger.bind(n,\"partialdone\")),n.videoSegmentStream.on(\"endedtimeline\",n.trigger.bind(n,\"endedtimeline\")),n.h264.pipe(n.videoSegmentStream)),n.tracks.audio&&!n.audioSegmentStream&&(n.audioSegmentStream=new Rt(n.tracks.audio,i),n.audioSegmentStream.on(\"data\",function(e){n.trigger(\"data\",{type:\"audio\",data:e})}),n.audioSegmentStream.on(\"done\",n.trigger.bind(n,\"done\")),n.audioSegmentStream.on(\"partialdone\",n.trigger.bind(n,\"partialdone\")),n.audioSegmentStream.on(\"endedtimeline\",n.trigger.bind(n,\"endedtimeline\")),n.audioSegmentStream.on(\"timingInfo\",n.trigger.bind(n,\"audioTimingInfo\")),n.adts.pipe(n.audioSegmentStream)),n.trigger(\"trackinfo\",{hasAudio:!!n.tracks.audio,hasVideo:!!n.tracks.video})}}),n.captionStream.on(\"data\",function(e){var t;t=n.tracks.video&&n.tracks.video.timelineStartInfo.pts||0,e.startTime=me(e.startPts,t,i.keepOriginalTimestamps),e.endTime=me(e.endPts,t,i.keepOriginalTimestamps),n.trigger(\"caption\",e)}),(n=Mt(n)).metadataStream.on(\"data\",n.trigger.bind(n,\"id3Frame\")),n}(i),Nt(n,this)):(n=function(t){var i={type:\"aac\",tracks:{audio:null},metadataStream:new nt.MetadataStream,aacStream:new kt,audioRollover:new nt.TimestampRolloverStream(\"audio\"),timedMetadataRollover:new nt.TimestampRolloverStream(\"timed-metadata\"),adtsStream:new lt(!0)};return i.headOfPipeline=i.aacStream,i.aacStream.pipe(i.audioRollover).pipe(i.adtsStream),i.aacStream.pipe(i.timedMetadataRollover).pipe(i.metadataStream),i.metadataStream.on(\"timestamp\",function(e){i.aacStream.setTimestamp(e.timeStamp)}),i.aacStream.on(\"data\",function(e){\"timed-metadata\"!==e.type&&\"audio\"!==e.type||i.audioSegmentStream||(i.tracks.audio=i.tracks.audio||{timelineStartInfo:{baseMediaDecodeTime:t.baseMediaDecodeTime},codec:\"adts\",type:\"audio\"},i.audioSegmentStream=new Rt(i.tracks.audio,t),i.audioSegmentStream.on(\"data\",function(e){i.trigger(\"data\",{type:\"audio\",data:e})}),i.audioSegmentStream.on(\"partialdone\",i.trigger.bind(i,\"partialdone\")),i.audioSegmentStream.on(\"done\",i.trigger.bind(i,\"done\")),i.audioSegmentStream.on(\"endedtimeline\",i.trigger.bind(i,\"endedtimeline\")),i.audioSegmentStream.on(\"timingInfo\",i.trigger.bind(i,\"audioTimingInfo\")),i.adtsStream.pipe(i.audioSegmentStream),i.trigger(\"trackinfo\",{hasAudio:!!i.tracks.audio,hasVideo:!!i.tracks.video}))}),(i=Mt(i)).metadataStream.on(\"data\",i.trigger.bind(i,\"id3Frame\")),i}(i),Nt(n,this)),r=!1}n.headOfPipeline.push(e)},this.flush=function(){n&&(r=!0,n.headOfPipeline.flush())},this.partialFlush=function(){n&&n.headOfPipeline.partialFlush()},this.endTimeline=function(){n&&n.headOfPipeline.endTimeline()},this.reset=function(){n&&n.headOfPipeline.reset()},this.setBaseMediaDecodeTime=function(e){i.keepOriginalTimestamps||(i.baseMediaDecodeTime=e),n&&(n.tracks.audio&&(n.tracks.audio.timelineStartInfo.dts=void 0,n.tracks.audio.timelineStartInfo.pts=void 0,Te(n.tracks.audio),n.audioRollover&&n.audioRollover.discontinuity()),n.tracks.video&&(n.videoSegmentStream&&(n.videoSegmentStream.gopCache_=[]),n.tracks.video.timelineStartInfo.dts=void 0,n.tracks.video.timelineStartInfo.pts=void 0,Te(n.tracks.video)),n.timestampRollover&&n.timestampRollover.discontinuity())},this.setRemux=function(e){i.remux=e,n&&n.coalesceStream&&n.coalesceStream.setRemux(e)},this.setAudioAppendStart=function(e){n&&n.tracks.audio&&n.audioSegmentStream&&n.audioSegmentStream.setAudioAppendStart(e)},this.alignGopsWith=function(e){}}var Bt=Dt,Ft=ft;Ut.prototype=new V;function jt(e,t){for(var i=e,n=0;n<t.length;n++){var r=t[n];if(i<r.size)return r;i-=r.size}return null}function Vt(e,c){var n=Xt(e,[\"moof\",\"traf\"]),t=Xt(e,[\"mdat\"]),d={},r=[];return t.forEach(function(e,t){var i=n[t];r.push({mdat:e,traf:i})}),r.forEach(function(e){var t,i=e.mdat,n=e.traf,r=Xt(n,[\"tfhd\"]),a=Jt(r[0]),s=a.trackId,o=Xt(n,[\"tfdt\"]),u=0<o.length?Qt(o[0]).baseMediaDecodeTime:0,l=Xt(n,[\"trun\"]);c===s&&0<l.length&&(t=function(e,t,i){var n,r,a,s,o=new DataView(e.buffer,e.byteOffset,e.byteLength),u=[];for(r=0;r+4<e.length;r+=a)if(a=o.getUint32(r),r+=4,!(a<=0))switch(31&e[r]){case 6:var l=e.subarray(r+1,r+1+a),c=jt(r,t);if(n={nalUnitType:\"sei_rbsp\",size:a,data:l,escapedRBSP:Zt(l),trackId:i},c)n.pts=c.pts,n.dts=c.dts,s=c;else{if(!s)break;n.pts=s.pts,n.dts=s.dts}u.push(n)}return u}(i,function(e,t,i){var n=t,r=i.defaultSampleDuration||0,a=i.defaultSampleSize||0,s=i.trackId,o=[];return e.forEach(function(e){var t=$t(e).samples;t.forEach(function(e){void 0===e.duration&&(e.duration=r),void 0===e.size&&(e.size=a),e.trackId=s,e.dts=n,void 0===e.compositionTimeOffset&&(e.compositionTimeOffset=0),e.pts=n+e.compositionTimeOffset,n+=e.duration}),o=o.concat(t)}),o}(l,u,a),s),d[s]||(d[s]=[]),d[s]=d[s].concat(t))}),d}function qt(e){return\"AudioSegmentStream\"===e?\"audio\":\"VideoSegmentStream\"===e?\"video\":\"\"}var Ht=Ut,Wt=function(e){return e>>>0},zt=function(e){var t=\"\";return t+=String.fromCharCode(e[0]),t+=String.fromCharCode(e[1]),t+=String.fromCharCode(e[2]),t+=String.fromCharCode(e[3])},Gt=Wt,Xt=function e(t,i){var n,r,a,s,o,u=[];if(!i.length)return null;for(n=0;n<t.byteLength;)r=Gt(t[n]<<24|t[n+1]<<16|t[n+2]<<8|t[n+3]),a=zt(t.subarray(n+4,n+8)),s=1<r?n+r:t.byteLength,a===i[0]&&(1===i.length?u.push(t.subarray(n+8,s)):(o=e(t.subarray(n+8,s),i.slice(1))).length&&(u=u.concat(o))),n=s;return u},Kt=Wt,Qt=function(e){var t={version:e[0],flags:new Uint8Array(e.subarray(1,4)),baseMediaDecodeTime:Kt(e[4]<<24|e[5]<<16|e[6]<<8|e[7])};return 1===t.version&&(t.baseMediaDecodeTime*=Math.pow(2,32),t.baseMediaDecodeTime+=Kt(e[8]<<24|e[9]<<16|e[10]<<8|e[11])),t},Yt=function(e){return{isLeading:(12&e[0])>>>2,dependsOn:3&e[0],isDependedOn:(192&e[1])>>>6,hasRedundancy:(48&e[1])>>>4,paddingValue:(14&e[1])>>>1,isNonSyncSample:1&e[1],degradationPriority:e[2]<<8|e[3]}},$t=function(e){var t,i={version:e[0],flags:new Uint8Array(e.subarray(1,4)),samples:[]},n=new DataView(e.buffer,e.byteOffset,e.byteLength),r=1&i.flags[2],a=4&i.flags[2],s=1&i.flags[1],o=2&i.flags[1],u=4&i.flags[1],l=8&i.flags[1],c=n.getUint32(4),d=8;for(r&&(i.dataOffset=n.getInt32(d),d+=4),a&&c&&(t={flags:Yt(e.subarray(d,d+4))},d+=4,s&&(t.duration=n.getUint32(d),d+=4),o&&(t.size=n.getUint32(d),d+=4),l&&(1===i.version?t.compositionTimeOffset=n.getInt32(d):t.compositionTimeOffset=n.getUint32(d),d+=4),i.samples.push(t),c--);c--;)t={},s&&(t.duration=n.getUint32(d),d+=4),o&&(t.size=n.getUint32(d),d+=4),u&&(t.flags=Yt(e.subarray(d,d+4)),d+=4),l&&(1===i.version?t.compositionTimeOffset=n.getInt32(d):t.compositionTimeOffset=n.getUint32(d),d+=4),i.samples.push(t);return i},Jt=function(e){var t,i=new DataView(e.buffer,e.byteOffset,e.byteLength),n={version:e[0],flags:new Uint8Array(e.subarray(1,4)),trackId:i.getUint32(4)},r=1&n.flags[2],a=2&n.flags[2],s=8&n.flags[2],o=16&n.flags[2],u=32&n.flags[2],l=65536&n.flags[0],c=131072&n.flags[0];return t=8,r&&(t+=4,n.baseDataOffset=i.getUint32(12),t+=4),a&&(n.sampleDescriptionIndex=i.getUint32(t),t+=4),s&&(n.defaultSampleDuration=i.getUint32(t),t+=4),o&&(n.defaultSampleSize=i.getUint32(t),t+=4),u&&(n.defaultSampleFlags=i.getUint32(t)),l&&(n.durationIsEmpty=!0),!r&&c&&(n.baseDataOffsetIsMoof=!0),n},Zt=Ie,ei=Ve.CaptionStream,ti=function(){var t,a,s,o,u,i,n=!1;this.isInitialized=function(){return n},this.init=function(e){t=new ei,n=!0,i=!!e&&e.isPartial,t.on(\"data\",function(e){e.startTime=e.startPts/o,e.endTime=e.endPts/o,u.captions.push(e),u.captionStreams[e.stream]=!0})},this.isNewInit=function(e,t){return!(e&&0===e.length||t&&\"object\"==typeof t&&0===Object.keys(t).length)&&(s!==e[0]||o!==t[s])},this.parse=function(e,t,i){var n;if(!this.isInitialized())return null;if(!t||!i)return null;if(this.isNewInit(t,i))s=t[0],o=i[s];else if(null===s||!o)return a.push(e),null;for(;0<a.length;){var r=a.shift();this.parse(r,t,i)}return null!==(n=function(e,t,i){return null===t?null:{seiNals:Vt(e,t)[t],timescale:i}}(e,s,o))&&n.seiNals?(this.pushNals(n.seiNals),this.flushStream(),u):null},this.pushNals=function(e){if(!this.isInitialized()||!e||0===e.length)return null;e.forEach(function(e){t.push(e)})},this.flushStream=function(){if(!this.isInitialized())return null;i?t.partialFlush():t.flush()},this.clearParsedCaptions=function(){u.captions=[],u.captionStreams={}},this.resetCaptionStream=function(){if(!this.isInitialized())return null;t.reset()},this.clearAllCaptions=function(){this.clearParsedCaptions(),this.resetCaptionStream()},this.reset=function(){a=[],o=s=null,u?this.clearParsedCaptions():u={captions:[],captionStreams:{}},this.resetCaptionStream()},this.reset()},ii=function(){function e(e,t){this.options=t||{},this.self=e,this.init()}var t=e.prototype;return t.init=function(){this.transmuxer&&this.transmuxer.dispose(),this.transmuxer=this.options.handlePartialData?new Ht(this.options):new Pt.Transmuxer(this.options),this.options.handlePartialData?function(n,e){e.on(\"data\",function(e){var t={data:e.data.track.initSegment.buffer,byteOffset:e.data.track.initSegment.byteOffset,byteLength:e.data.track.initSegment.byteLength},i={boxes:{data:e.data.boxes.buffer,byteOffset:e.data.boxes.byteOffset,byteLength:e.data.boxes.byteLength},initSegment:t,type:e.type,sequence:e.data.sequence};\"undefined\"!=typeof e.data.videoFrameDts&&(i.videoFrameDtsTime=he(e.data.videoFrameDts)),\"undefined\"!=typeof e.data.videoFramePts&&(i.videoFramePtsTime=he(e.data.videoFramePts)),n.postMessage({action:\"data\",segment:i},[i.boxes.data,i.initSegment.data])}),e.on(\"id3Frame\",function(e){n.postMessage({action:\"id3Frame\",id3Frame:e})}),e.on(\"caption\",function(e){n.postMessage({action:\"caption\",caption:e})}),e.on(\"done\",function(e){n.postMessage({action:\"done\",type:qt(e)})}),e.on(\"partialdone\",function(e){n.postMessage({action:\"partialdone\",type:qt(e)})}),e.on(\"endedsegment\",function(e){n.postMessage({action:\"endedSegment\",type:qt(e)})}),e.on(\"trackinfo\",function(e){n.postMessage({action:\"trackinfo\",trackInfo:e})}),e.on(\"audioTimingInfo\",function(e){if(null!==e.start){var t={start:he(e.start)};e.end&&(t.end=he(e.end)),n.postMessage({action:\"audioTimingInfo\",audioTimingInfo:t})}else n.postMessage({action:\"audioTimingInfo\",audioTimingInfo:e})}),e.on(\"videoTimingInfo\",function(e){var t={start:he(e.start)};e.end&&(t.end=he(e.end)),n.postMessage({action:\"videoTimingInfo\",videoTimingInfo:t})})}(this.self,this.transmuxer):function(n,e){e.on(\"data\",function(e){var t=e.initSegment;e.initSegment={data:t.buffer,byteOffset:t.byteOffset,byteLength:t.byteLength};var i=e.data;e.data=i.buffer,n.postMessage({action:\"data\",segment:e,byteOffset:i.byteOffset,byteLength:i.byteLength},[e.data])}),e.on(\"done\",function(e){n.postMessage({action:\"done\"})}),e.on(\"gopInfo\",function(e){n.postMessage({action:\"gopInfo\",gopInfo:e})}),e.on(\"videoSegmentTimingInfo\",function(e){var t={start:{decode:he(e.start.dts),presentation:he(e.start.pts)},end:{decode:he(e.end.dts),presentation:he(e.end.pts)},baseMediaDecodeTime:he(e.baseMediaDecodeTime)};e.prependedContentDuration&&(t.prependedContentDuration=he(e.prependedContentDuration)),n.postMessage({action:\"videoSegmentTimingInfo\",videoSegmentTimingInfo:t})}),e.on(\"audioSegmentTimingInfo\",function(e){var t={start:{decode:he(e.start.dts),presentation:he(e.start.pts)},end:{decode:he(e.end.dts),presentation:he(e.end.pts)},baseMediaDecodeTime:he(e.baseMediaDecodeTime)};e.prependedContentDuration&&(t.prependedContentDuration=he(e.prependedContentDuration)),n.postMessage({action:\"audioSegmentTimingInfo\",audioSegmentTimingInfo:t})}),e.on(\"id3Frame\",function(e){n.postMessage({action:\"id3Frame\",id3Frame:e})}),e.on(\"caption\",function(e){n.postMessage({action:\"caption\",caption:e})}),e.on(\"trackinfo\",function(e){n.postMessage({action:\"trackinfo\",trackInfo:e})}),e.on(\"audioTimingInfo\",function(e){n.postMessage({action:\"audioTimingInfo\",audioTimingInfo:{start:he(e.start),end:he(e.end)}})}),e.on(\"videoTimingInfo\",function(e){n.postMessage({action:\"videoTimingInfo\",videoTimingInfo:{start:he(e.start),end:he(e.end)}})})}(this.self,this.transmuxer)},t.pushMp4Captions=function(e){this.captionParser||(this.captionParser=new ti,this.captionParser.init());var t=new Uint8Array(e.data,e.byteOffset,e.byteLength),i=this.captionParser.parse(t,e.trackIds,e.timescales);this.self.postMessage({action:\"mp4Captions\",captions:i&&i.captions||[],data:t.buffer},[t.buffer])},t.clearAllMp4Captions=function(){this.captionParser&&this.captionParser.clearAllCaptions()},t.clearParsedMp4Captions=function(){this.captionParser&&this.captionParser.clearParsedCaptions()},t.push=function(e){var t=new Uint8Array(e.data,e.byteOffset,e.byteLength);this.transmuxer.push(t)},t.reset=function(){this.transmuxer.reset()},t.setTimestampOffset=function(e){var t=e.timestampOffset||0;this.transmuxer.setBaseMediaDecodeTime(Math.round(de(t)))},t.setAudioAppendStart=function(e){this.transmuxer.setAudioAppendStart(Math.ceil(de(e.appendStart)))},t.setRemux=function(e){this.transmuxer.setRemux(e.remux)},t.flush=function(e){this.transmuxer.flush(),self.postMessage({action:\"done\",type:\"transmuxed\"})},t.partialFlush=function(e){this.transmuxer.partialFlush(),self.postMessage({action:\"partialdone\",type:\"transmuxed\"})},t.endTimeline=function(){this.transmuxer.endTimeline(),self.postMessage({action:\"endedtimeline\",type:\"transmuxed\"})},t.alignGopsWith=function(e){this.transmuxer.alignGopsWith(e.gopsToAlignWith.slice())},e}();self.onmessage=function(e){\"init\"===e.data.action&&e.data.options?this.messageHandlers=new ii(self,e.data.options):(this.messageHandlers||(this.messageHandlers=new ii(self)),e.data&&e.data.action&&\"init\"!==e.data.action&&this.messageHandlers[e.data.action]&&this.messageHandlers[e.data.action](e.data))}}))),fd=function(e){e.currentTransmux=null,e.transmuxQueue.length&&(e.currentTransmux=e.transmuxQueue.shift(),\"function\"==typeof e.currentTransmux?e.currentTransmux():_c(e.currentTransmux))},md=function(e){Tc(\"reset\",e)},gd=function(e){var t=new pd;t.currentTransmux=null,t.transmuxQueue=[];var i=t.terminate;return t.terminate=function(){return t.currentTransmux=null,t.transmuxQueue.length=0,i.call(t)},t.postMessage({action:\"init\",options:e}),t},vd=2,yd=-101,_d=-102,bd=Il(\"CodecUtils\"),Td=Il(\"PlaylistSelector\"),Sd=function(n){function e(e,t){var i;if(i=n.call(this)||this,!e)throw new TypeError(\"Initialization settings are required\");if(\"function\"!=typeof e.currentTime)throw new TypeError(\"No currentTime getter specified\");if(!e.mediaSource)throw new TypeError(\"No MediaSource specified\");return i.bandwidth=e.bandwidth,i.throughput={rate:0,count:0},i.roundTrip=NaN,i.resetStats_(),i.mediaIndex=null,i.hasPlayed_=e.hasPlayed,i.currentTime_=e.currentTime,i.seekable_=e.seekable,i.seeking_=e.seeking,i.duration_=e.duration,i.mediaSource_=e.mediaSource,i.vhs_=e.vhs,i.loaderType_=e.loaderType,i.currentMediaInfo_=void 0,i.startingMediaInfo_=void 0,i.segmentMetadataTrack_=e.segmentMetadataTrack,i.goalBufferLength_=e.goalBufferLength,i.sourceType_=e.sourceType,i.sourceUpdater_=e.sourceUpdater,i.inbandTextTracks_=e.inbandTextTracks,i.state_=\"INIT\",i.handlePartialData_=e.handlePartialData,i.timelineChangeController_=e.timelineChangeController,i.shouldSaveSegmentTimingInfo_=!0,i.parse708captions_=e.parse708captions,i.checkBufferTimeout_=null,i.error_=void 0,i.currentTimeline_=-1,i.pendingSegment_=null,i.xhrOptions_=null,i.pendingSegments_=[],i.audioDisabled_=!1,i.isPendingTimestampOffset_=!1,i.gopBuffer_=[],i.timeMapping_=0,i.safeAppend_=11<=ga.browser.IE_VERSION,i.appendInitSegment_={audio:!0,video:!0},i.playlistOfLastInitSegment_={audio:null,video:null},i.callQueue_=[],i.loadQueue_=[],i.metadataQueue_={id3:[],caption:[]},i.waitingOnRemove_=!1,i.quotaExceededErrorRetryTimeout_=null,i.activeInitSegmentId_=null,i.initSegments_={},i.cacheEncryptionKeys_=e.cacheEncryptionKeys,i.keyCache_={},i.decrypter_=e.decrypter,i.syncController_=e.syncController,i.syncPoint_={segmentIndex:0,time:0},i.transmuxer_=i.createTransmuxer_(),i.triggerSyncInfoUpdate_=function(){return i.trigger(\"syncinfoupdate\")},i.syncController_.on(\"syncinfoupdate\",i.triggerSyncInfoUpdate_),i.mediaSource_.addEventListener(\"sourceopen\",function(){i.isEndOfStream_()||(i.ended_=!1)}),i.fetchAtBuffer_=!1,i.logger_=Il(\"SegmentLoader[\"+i.loaderType_+\"]\"),Object.defineProperty(_a(i),\"state\",{get:function(){return this.state_},set:function(e){e!==this.state_&&(this.logger_(this.state_+\" -> \"+e),this.state_=e,this.trigger(\"statechange\"))}}),i.sourceUpdater_.on(\"ready\",function(){i.hasEnoughInfoToAppend_()&&i.processCallQueue_()}),\"main\"===i.loaderType_&&i.timelineChangeController_.on(\"pendingtimelinechange\",function(){i.hasEnoughInfoToAppend_()&&i.processCallQueue_()}),\"audio\"===i.loaderType_&&i.timelineChangeController_.on(\"timelinechange\",function(){i.hasEnoughInfoToLoad_()&&i.processLoadQueue_(),i.hasEnoughInfoToAppend_()&&i.processCallQueue_()}),i}Sa(e,n);var t=e.prototype;return t.createTransmuxer_=function(){return gd({remux:!1,alignGopsAtEnd:this.safeAppend_,keepOriginalTimestamps:!0,handlePartialData:this.handlePartialData_,parse708captions:this.parse708captions_})},t.resetStats_=function(){this.mediaBytesTransferred=0,this.mediaRequests=0,this.mediaRequestsAborted=0,this.mediaRequestsTimedout=0,this.mediaRequestsErrored=0,this.mediaTransferDuration=0,this.mediaSecondsLoaded=0},t.dispose=function(){this.trigger(\"dispose\"),this.state=\"DISPOSED\",this.pause(),this.abort_(),this.transmuxer_&&this.transmuxer_.terminate(),this.resetStats_(),this.checkBufferTimeout_&&Ea.clearTimeout(this.checkBufferTimeout_),this.syncController_&&this.triggerSyncInfoUpdate_&&this.syncController_.off(\"syncinfoupdate\",this.triggerSyncInfoUpdate_),this.off()},t.setAudio=function(e){this.audioDisabled_=!e,e?this.appendInitSegment_.audio=!0:this.sourceUpdater_.removeAudio(0,this.duration_())},t.abort=function(){\"WAITING\"===this.state?(this.abort_(),this.state=\"READY\",this.paused()||this.monitorBuffer_()):this.pendingSegment_&&(this.pendingSegment_=null)},t.abort_=function(){this.pendingSegment_&&this.pendingSegment_.abortRequests&&this.pendingSegment_.abortRequests(),this.pendingSegment_=null,this.callQueue_=[],this.loadQueue_=[],this.metadataQueue_.id3=[],this.metadataQueue_.caption=[],this.timelineChangeController_.clearPendingTimelineChange(this.loaderType_),this.waitingOnRemove_=!1,Ea.clearTimeout(this.quotaExceededErrorRetryTimeout_),this.quotaExceededErrorRetryTimeout_=null},t.checkForAbort_=function(e){return\"APPENDING\"!==this.state||this.pendingSegment_?!this.pendingSegment_||this.pendingSegment_.requestId!==e:(this.state=\"READY\",!0)},t.error=function(e){return\"undefined\"!=typeof e&&(this.logger_(\"error occurred:\",e),this.error_=e),this.pendingSegment_=null,this.error_},t.endOfStream=function(){this.ended_=!0,this.transmuxer_&&md(this.transmuxer_),this.gopBuffer_.length=0,this.pause(),this.trigger(\"ended\")},t.buffered_=function(){if(!this.sourceUpdater_||!this.startingMediaInfo_)return ga.createTimeRanges();if(\"main\"===this.loaderType_){var e=this.startingMediaInfo_,t=e.hasAudio,i=e.hasVideo,n=e.isMuxed;if(i&&t&&!this.audioDisabled_&&!n)return this.sourceUpdater_.buffered();if(i)return this.sourceUpdater_.videoBuffered()}return this.sourceUpdater_.audioBuffered()},t.initSegmentForMap=function(e,t){if(void 0===t&&(t=!1),!e)return null;var i=rc(e),n=this.initSegments_[i];return t&&!n&&e.bytes&&(this.initSegments_[i]=n={resolvedUri:e.resolvedUri,byterange:e.byterange,bytes:e.bytes,tracks:e.tracks,timescales:e.timescales}),n||e},t.segmentKey=function(e,t){if(void 0===t&&(t=!1),!e)return null;var i=ac(e),n=this.keyCache_[i];this.cacheEncryptionKeys_&&t&&!n&&e.bytes&&(this.keyCache_[i]=n={resolvedUri:e.resolvedUri,bytes:e.bytes});var r={resolvedUri:(n||e).resolvedUri};return n&&(r.bytes=n.bytes),r},t.couldBeginLoading_=function(){return this.playlist_&&!this.paused()},t.load=function(){if(this.monitorBuffer_(),this.playlist_)return\"INIT\"===this.state&&this.couldBeginLoading_()?this.init_():void(!this.couldBeginLoading_()||\"READY\"!==this.state&&\"INIT\"!==this.state||(this.state=\"READY\"))},t.init_=function(){return this.state=\"READY\",this.resetEverything(),this.monitorBuffer_()},t.playlist=function(e,t){if(void 0===t&&(t={}),e){var i=this.playlist_,n=this.pendingSegment_;this.playlist_=e,this.xhrOptions_=t,\"INIT\"===this.state&&(e.syncInfo={mediaSequence:e.mediaSequence,time:0},\"main\"===this.loaderType_&&this.syncController_.setDateTimeMappingForStart(e));var r=null;if(i&&(i.id?r=i.id:i.uri&&(r=i.uri)),this.logger_(\"playlist update [\"+r+\" => \"+(e.id||e.uri)+\"]\"),this.trigger(\"syncinfoupdate\"),\"INIT\"===this.state&&this.couldBeginLoading_())return this.init_();if(!i||i.uri!==e.uri)return null===this.mediaIndex&&!this.handlePartialData_||this.resyncLoader(),this.currentMediaInfo_=void 0,void this.trigger(\"playlistupdate\");var a=e.mediaSequence-i.mediaSequence;this.logger_(\"live window shift [\"+a+\"]\"),null!==this.mediaIndex&&(this.mediaIndex-=a),n&&(n.mediaIndex-=a,0<=n.mediaIndex&&(n.segment=e.segments[n.mediaIndex])),this.syncController_.saveExpiredSegmentInfo(i,e)}},t.pause=function(){this.checkBufferTimeout_&&(Ea.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=null)},t.paused=function(){return null===this.checkBufferTimeout_},t.resetEverything=function(e){this.ended_=!1,this.appendInitSegment_={audio:!0,video:!0},this.resetLoader(),this.remove(0,1/0,e),this.transmuxer_&&this.transmuxer_.postMessage({action:\"clearAllMp4Captions\"})},t.resetLoader=function(){this.fetchAtBuffer_=!1,this.resyncLoader()},t.resyncLoader=function(){this.transmuxer_&&md(this.transmuxer_),this.mediaIndex=null,this.syncPoint_=null,this.isPendingTimestampOffset_=!1,this.callQueue_=[],this.loadQueue_=[],this.metadataQueue_.id3=[],this.metadataQueue_.caption=[],this.abort(),this.transmuxer_&&this.transmuxer_.postMessage({action:\"clearParsedMp4Captions\"})},t.remove=function(e,t,i){if(void 0===i&&(i=function(){}),t===1/0&&(t=this.duration_()),this.sourceUpdater_&&this.startingMediaInfo_){var n=1,r=function(){0===--n&&i()};for(var a in this.audioDisabled_||(n++,this.sourceUpdater_.removeAudio(e,t,r)),\"main\"===this.loaderType_&&(this.gopBuffer_=function(e,t,i,n){for(var r=Math.ceil((t-n)*$u),a=Math.ceil((i-n)*$u),s=e.slice(),o=e.length;o--&&!(e[o].pts<=a););if(-1===o)return s;for(var u=o+1;u--&&!(e[u].pts<=r););return u=Math.max(u,0),s.splice(u,o-u+1),s}(this.gopBuffer_,e,t,this.timeMapping_),n++,this.sourceUpdater_.removeVideo(e,t,r)),this.inbandTextTracks_)Vc(e,t,this.inbandTextTracks_[a]);Vc(e,t,this.segmentMetadataTrack_),r()}else this.logger_(\"skipping remove because no source updater or starting media info\")},t.monitorBuffer_=function(){this.checkBufferTimeout_&&Ea.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=Ea.setTimeout(this.monitorBufferTick_.bind(this),1)},t.monitorBufferTick_=function(){\"READY\"===this.state&&this.fillBuffer_(),this.checkBufferTimeout_&&Ea.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=Ea.setTimeout(this.monitorBufferTick_.bind(this),500)},t.fillBuffer_=function(){if(!this.sourceUpdater_.updating()){this.syncPoint_||(this.syncPoint_=this.syncController_.getSyncPoint(this.playlist_,this.duration_(),this.currentTimeline_,this.currentTime_()));var e=this.buffered_(),t=this.checkBuffer_(e,this.playlist_,this.mediaIndex,this.hasPlayed_(),this.currentTime_(),this.syncPoint_);t&&(t.timestampOffset=Wc({segmentTimeline:t.timeline,currentTimeline:this.currentTimeline_,startOfSegment:t.startOfSegment,buffered:e,overrideCheck:this.isPendingTimestampOffset_}),this.isPendingTimestampOffset_=!1,\"number\"==typeof t.timestampOffset&&this.timelineChangeController_.pendingTimelineChange({type:this.loaderType_,from:this.currentTimeline_,to:t.timeline}),this.loadSegment_(t))}},t.isEndOfStream_=function(e,t){if(void 0===e&&(e=this.mediaIndex),void 0===t&&(t=this.playlist_),!t||!this.mediaSource_)return!1;var i=e+1===t.segments.length;return t.endList&&\"open\"===this.mediaSource_.readyState&&i},t.checkBuffer_=function(e,t,i,n,r,a){var s=0;e.length&&(s=e.end(e.length-1));var o=Math.max(0,s-r);if(!t.segments.length)return null;if(o>=this.goalBufferLength_())return null;if(!n&&1<=o)return null;var u,l=null,c=!1;if(null===a)l=this.getSyncSegmentCandidate_(t),c=!0;else if(null!==i){var d=t.segments[i];u=d&&d.end?d.end:s,l=i+1}else if(this.fetchAtBuffer_){var h=sd.getMediaInfoForTime(t,s,a.segmentIndex,a.time);l=h.mediaIndex,u=h.startTime}else{var p=sd.getMediaInfoForTime(t,r,a.segmentIndex,a.time);l=p.mediaIndex,u=p.startTime}var f=this.generateSegmentInfo_(t,l,u,c);return!f||this.mediaSource_&&this.playlist_&&f.mediaIndex===this.playlist_.segments.length-1&&\"ended\"===this.mediaSource_.readyState&&!this.seeking_()?void 0:(this.logger_(\"checkBuffer_ returning \"+f.uri,{segmentInfo:f,playlist:t,currentMediaIndex:i,nextMediaIndex:l,startOfSegment:u,isSyncRequest:c}),f)},t.getSyncSegmentCandidate_=function(e){var t=this;if(-1===this.currentTimeline_)return 0;var i=e.segments.map(function(e,t){return{timeline:e.timeline,segmentIndex:t}}).filter(function(e){return e.timeline===t.currentTimeline_});return i.length?i[Math.min(i.length-1,1)].segmentIndex:Math.max(e.segments.length-1,0)},t.generateSegmentInfo_=function(e,t,i,n){if(t<0||t>=e.segments.length)return null;var r,a,s=e.segments[t],o=this.sourceUpdater_.audioBuffered(),u=this.sourceUpdater_.videoBuffered();return o.length&&(r=o.end(o.length-1)-this.sourceUpdater_.audioTimestampOffset()),u.length&&(a=function(e,t,i){if(\"undefined\"==typeof t||null===t||!e.length)return[];var n,r=Math.ceil((t-i+3)*$u);for(n=0;n<e.length&&!(e[n].pts>r);n++);return e.slice(n)}(this.gopBuffer_,this.currentTime_()-this.sourceUpdater_.videoTimestampOffset(),this.timeMapping_)),{requestId:\"segment-loader-\"+Math.random(),uri:s.resolvedUri,mediaIndex:t,isSyncRequest:n,startOfSegment:i,playlist:e,bytes:null,encryptedBytes:null,timestampOffset:null,timeline:s.timeline,duration:s.duration,segment:s,byteLength:0,transmuxer:this.transmuxer_,audioAppendStart:r,gopsToAlignWith:a}},t.earlyAbortWhenNeeded_=function(e){if(!this.vhs_.tech_.paused()&&this.xhrOptions_.timeout&&this.playlist_.attributes.BANDWIDTH&&!(Date.now()-(e.firstBytesReceivedAt||Date.now())<1e3)){var t=this.currentTime_(),i=e.bandwidth,n=this.pendingSegment_.duration,r=sd.estimateSegmentRequestTime(n,i,this.playlist_,e.bytesReceived),a=function(e,t,i){return void 0===i&&(i=1),((e.length?e.end(e.length-1):0)-t)/i}(this.buffered_(),t,this.vhs_.tech_.playbackRate())-1;if(!(r<=a)){var s=function(e){var t=e.master,i=e.currentTime,n=e.bandwidth,r=e.duration,a=e.segmentDuration,s=e.timeUntilRebuffer,o=e.currentTimeline,u=e.syncController,l=t.playlists.filter(function(e){return!sd.isIncompatible(e)}),c=l.filter(sd.isEnabled);c.length||(c=l.filter(function(e){return!sd.isDisabled(e)}));var d=c.filter(sd.hasAttribute.bind(null,\"BANDWIDTH\")).map(function(e){var t=u.getSyncPoint(e,r,o,i)?1:2;return{playlist:e,rebufferingImpact:sd.estimateSegmentRequestTime(a,n,e)*t-s}}),h=d.filter(function(e){return e.rebufferingImpact<=0});return Nc(h,function(e,t){return Uc(t.playlist,e.playlist)}),h.length?h[0]:(Nc(d,function(e,t){return e.rebufferingImpact-t.rebufferingImpact}),d[0]||null)}({master:this.vhs_.playlists.master,currentTime:t,bandwidth:i,duration:this.duration_(),segmentDuration:n,timeUntilRebuffer:a,currentTimeline:this.currentTimeline_,syncController:this.syncController_});if(s){var o=r-a-s.rebufferingImpact,u=.5;a<=rd&&(u=1),!s.playlist||s.playlist.uri===this.playlist_.uri||o<u||(this.bandwidth=s.playlist.attributes.BANDWIDTH*hd.BANDWIDTH_VARIANCE+1,this.trigger(\"earlyabort\"))}}}},t.handleAbort_=function(){this.mediaRequestsAborted+=1},t.handleProgress_=function(e,t){this.earlyAbortWhenNeeded_(t.stats),this.checkForAbort_(t.requestId)||this.trigger(\"progress\")},t.handleTrackInfo_=function(e,t){this.earlyAbortWhenNeeded_(e.stats),this.checkForAbort_(e.requestId)||this.checkForIllegalMediaSwitch(t)||(t=t||{},function(e,t){if(!e&&!t||!e&&t||e&&!t)return!1;if(e===t)return!0;var i=Object.keys(e).sort(),n=Object.keys(t).sort();if(i.length!==n.length)return!1;for(var r=0;r<i.length;r++){var a=i[r];if(a!==n[r])return!1;if(e[a]!==t[a])return!1}return!0}(this.currentMediaInfo_,t)||(this.appendInitSegment_={audio:!0,video:!0},this.startingMediaInfo_=t,this.currentMediaInfo_=t,this.logger_(\"trackinfo update\",t),this.trigger(\"trackinfo\")),this.checkForAbort_(e.requestId)||(this.pendingSegment_.trackInfo=t,this.hasEnoughInfoToAppend_()&&this.processCallQueue_()))},t.handleTimingInfo_=function(e,t,i,n){if(this.earlyAbortWhenNeeded_(e.stats),!this.checkForAbort_(e.requestId)){var r=this.pendingSegment_,a=Hc(t);r[a]=r[a]||{},r[a][i]=n,this.logger_(\"timinginfo: \"+t+\" - \"+i+\" - \"+n),this.hasEnoughInfoToAppend_()&&this.processCallQueue_()}},t.handleCaptions_=function(e,t){var s=this;if(this.earlyAbortWhenNeeded_(e.stats),!this.checkForAbort_(e.requestId))if(0!==t.length)if(this.pendingSegment_.hasAppendedData_){var o=null===this.sourceUpdater_.videoTimestampOffset()?this.sourceUpdater_.audioTimestampOffset():this.sourceUpdater_.videoTimestampOffset(),u={};t.forEach(function(e){u[e.stream]=u[e.stream]||{startTime:1/0,captions:[],endTime:0};var t=u[e.stream];t.startTime=Math.min(t.startTime,e.startTime+o),t.endTime=Math.max(t.endTime,e.endTime+o),t.captions.push(e)}),Object.keys(u).forEach(function(e){var t=u[e],i=t.startTime,n=t.endTime,r=t.captions,a=s.inbandTextTracks_;s.logger_(\"adding cues from \"+i+\" -> \"+n+\" for \"+e),function(e,t,i){if(!e[i]){t.trigger({type:\"usage\",name:\"vhs-608\"}),t.trigger({type:\"usage\",name:\"hls-608\"});var n=t.textTracks().getTrackById(i);e[i]=n||t.addRemoteTextTrack({kind:\"captions\",id:i,label:i},!1).track}}(a,s.vhs_.tech_,e),Vc(i,n,a[e]),function(e){var i=e.inbandTextTracks,t=e.captionArray,n=e.timestampOffset;if(t){var r=Ea.WebKitDataCue||Ea.VTTCue;t.forEach(function(e){var t=e.stream;i[t].addCue(new r(e.startTime+n,e.endTime+n,e.text))})}}({captionArray:r,inbandTextTracks:a,timestampOffset:o})}),this.transmuxer_&&this.transmuxer_.postMessage({action:\"clearParsedMp4Captions\"})}else this.metadataQueue_.caption.push(this.handleCaptions_.bind(this,e,t));else this.logger_(\"SegmentLoader received no captions from a caption event\")},t.handleId3_=function(e,t,i){if(this.earlyAbortWhenNeeded_(e.stats),!this.checkForAbort_(e.requestId))if(this.pendingSegment_.hasAppendedData_){var n=null===this.sourceUpdater_.videoTimestampOffset()?this.sourceUpdater_.audioTimestampOffset():this.sourceUpdater_.videoTimestampOffset();!function(e,t,i){e.metadataTrack_||(e.metadataTrack_=i.addRemoteTextTrack({kind:\"metadata\",label:\"Timed Metadata\"},!1).track,e.metadataTrack_.inBandMetadataTrackDispatchType=t)}(this.inbandTextTracks_,i,this.vhs_.tech_),jc({inbandTextTracks:this.inbandTextTracks_,metadataArray:t,timestampOffset:n,videoDuration:this.duration_()})}else this.metadataQueue_.id3.push(this.handleId3_.bind(this,e,t,i))},t.processMetadataQueue_=function(){this.metadataQueue_.id3.forEach(function(e){return e()}),this.metadataQueue_.caption.forEach(function(e){return e()}),this.metadataQueue_.id3=[],this.metadataQueue_.caption=[]},t.processCallQueue_=function(){var e=this.callQueue_;this.callQueue_=[],e.forEach(function(e){return e()})},t.processLoadQueue_=function(){var e=this.loadQueue_;this.loadQueue_=[],e.forEach(function(e){return e()})},t.hasEnoughInfoToLoad_=function(){if(\"audio\"!==this.loaderType_)return!0;var e=this.pendingSegment_;return!!e&&(!this.currentMediaInfo_||!zc({timelineChangeController:this.timelineChangeController_,currentTimeline:this.currentTimeline_,segmentTimeline:e.timeline,loaderType:this.loaderType_,audioDisabled:this.audioDisabled_}))},t.hasEnoughInfoToAppend_=function(){if(!this.sourceUpdater_.ready())return!1;if(this.waitingOnRemove_||this.quotaExceededErrorRetryTimeout_)return!1;var e=this.pendingSegment_;if(!e||!e.trackInfo)return!1;if(!this.handlePartialData_){var t=this.currentMediaInfo_,i=t.hasAudio,n=t.hasVideo,r=t.isMuxed;if(n&&!e.videoTimingInfo)return!1;if(i&&!this.audioDisabled_&&!r&&!e.audioTimingInfo)return!1}return!zc({timelineChangeController:this.timelineChangeController_,currentTimeline:this.currentTimeline_,segmentTimeline:e.timeline,loaderType:this.loaderType_,audioDisabled:this.audioDisabled_})},t.handleData_=function(e,t){if(this.earlyAbortWhenNeeded_(e.stats),!this.checkForAbort_(e.requestId))if(!this.callQueue_.length&&this.hasEnoughInfoToAppend_()){var i=this.pendingSegment_;if(this.setTimeMapping_(i.timeline),this.updateMediaSecondsLoaded_(i.segment),\"closed\"!==this.mediaSource_.readyState){if(e.map&&(e.map=this.initSegmentForMap(e.map,!0),i.segment.map=e.map),e.key&&this.segmentKey(e.key,!0),i.isFmp4=e.isFmp4,i.timingInfo=i.timingInfo||{},i.isFmp4)this.trigger(\"fmp4\"),i.timingInfo.start=i[Hc(t.type)].start;else{var n,r=\"main\"===this.loaderType_&&this.currentMediaInfo_.hasVideo;r&&(n=this.handlePartialData_?t.videoFramePtsTime:i.videoTimingInfo.start),i.timingInfo.start=this.trueSegmentStart_({currentStart:i.timingInfo.start,playlist:i.playlist,mediaIndex:i.mediaIndex,currentVideoTimestampOffset:this.sourceUpdater_.videoTimestampOffset(),useVideoTimingInfo:r,firstVideoFrameTimeForData:n,videoTimingInfo:i.videoTimingInfo,audioTimingInfo:i.audioTimingInfo})}this.updateAppendInitSegmentStatus(i,t.type),this.updateSourceBufferTimestampOffset_(i),i.hasAppendedData_=!0,this.processMetadataQueue_(),this.appendData_(i,t)}}else this.callQueue_.push(this.handleData_.bind(this,e,t))},t.updateAppendInitSegmentStatus=function(e,t){\"main\"!==this.loaderType_||\"number\"!=typeof e.timestampOffset||e.changedTimestampOffset||(this.appendInitSegment_={audio:!0,video:!0}),this.playlistOfLastInitSegment_[t]!==e.playlist&&(this.appendInitSegment_[t]=!0)},t.getInitSegmentAndUpdateState_=function(e){var t=e.type,i=e.initSegment,n=e.map,r=e.playlist;if(n){var a=rc(n);if(this.activeInitSegmentId_===a)return null;i=this.initSegmentForMap(n,!0).bytes,this.activeInitSegmentId_=a}return i&&this.appendInitSegment_[t]?(this.playlistOfLastInitSegment_[t]=r,this.appendInitSegment_[t]=!!n,this.activeInitSegmentId_=null,i):null},t.handleQuotaExceededError_=function(e,t){var i=this,n=e.segmentInfo,r=e.type,a=e.bytes,s=this.sourceUpdater_.audioBuffered(),o=this.sourceUpdater_.videoBuffered();1<s.length&&this.logger_(\"On QUOTA_EXCEEDED_ERR, found gaps in the audio buffer: \"+Vl(s).join(\", \")),1<o.length&&this.logger_(\"On QUOTA_EXCEEDED_ERR, found gaps in the video buffer: \"+Vl(o).join(\", \"));var u=s.length?s.start(0):0,l=s.length?s.end(s.length-1):0,c=o.length?o.start(0):0,d=o.length?o.end(o.length-1):0;if(l-u<=1&&d-c<=1)return this.logger_(\"On QUOTA_EXCEEDED_ERR, single segment too large to append to buffer, triggering an error. Appended byte length: \"+a.byteLength+\", audio buffer: \"+Vl(s).join(\", \")+\", video buffer: \"+Vl(o).join(\", \")+\", \"),this.error({message:\"Quota exceeded error with append of a single segment of content\",blacklistDuration:1/0}),void this.trigger(\"error\");this.waitingOnRemove_=!0,this.callQueue_.push(this.appendToSourceBuffer_.bind(this,{segmentInfo:n,type:r,bytes:a}));var h=this.currentTime_()-1;this.logger_(\"On QUOTA_EXCEEDED_ERR, removing video from 0 to \"+h),this.sourceUpdater_.removeVideo(0,h,function(){i.logger_(\"On QUOTA_EXCEEDED_ERR, removing audio from 0 to \"+h),i.sourceUpdater_.removeAudio(0,h,function(){i.logger_(\"On QUOTA_EXCEEDED_ERR, retrying append in 1s\"),i.waitingOnRemove_=!1,i.quotaExceededErrorRetryTimeout_=Ea.setTimeout(function(){i.logger_(\"On QUOTA_EXCEEDED_ERR, re-processing call queue\"),i.quotaExceededErrorRetryTimeout_=null,i.processCallQueue_()},1e3)})})},t.handleAppendError_=function(e,t){var i=e.segmentInfo,n=e.type,r=e.bytes;t&&(22!==t.code?(this.logger_(\"Received non QUOTA_EXCEEDED_ERR on append\",t),this.error(n+\" append of \"+r.length+\"b failed for segment #\"+i.mediaIndex+\" in playlist \"+i.playlist.id),this.trigger(\"appenderror\")):this.handleQuotaExceededError_({segmentInfo:i,type:n,bytes:r}))},t.appendToSourceBuffer_=function(e){var t=e.segmentInfo,i=e.type,n=e.initSegment,r=e.data,a=e.bytes;if(!a){var s=[r],o=r.byteLength;n&&(s.unshift(n),o+=n.byteLength),a=function(e){var t,i=0;return e.bytes&&(t=new Uint8Array(e.bytes),e.segments.forEach(function(e){t.set(e,i),i+=e.byteLength})),t}({bytes:o,segments:s})}this.sourceUpdater_.appendBuffer({segmentInfo:t,type:i,bytes:a},this.handleAppendError_.bind(this,{segmentInfo:t,type:i,bytes:a}))},t.handleSegmentTimingInfo_=function(e,t,i){if(this.pendingSegment_&&t===this.pendingSegment_.requestId){var n=this.pendingSegment_.segment,r=e+\"TimingInfo\";n[r]||(n[r]={}),n[r].transmuxerPrependedSeconds=i.prependedContentDuration||0,n[r].transmuxedPresentationStart=i.start.presentation,n[r].transmuxedDecodeStart=i.start.decode,n[r].transmuxedPresentationEnd=i.end.presentation,n[r].transmuxedDecodeEnd=i.end.decode,n[r].baseMediaDecodeTime=i.baseMediaDecodeTime}},t.appendData_=function(e,t){var i=t.type,n=t.data;if(n&&n.byteLength&&(\"audio\"!==i||!this.audioDisabled_)){var r=this.getInitSegmentAndUpdateState_({type:i,initSegment:t.initSegment,playlist:e.playlist,map:e.isFmp4?e.segment.map:null});this.appendToSourceBuffer_({segmentInfo:e,type:i,initSegment:r,data:n})}},t.loadSegment_=function(i){var n=this;this.state=\"WAITING\",this.pendingSegment_=i,this.trimBackBuffer_(i),\"number\"==typeof i.timestampOffset&&this.transmuxer_&&this.transmuxer_.postMessage({action:\"clearAllMp4Captions\"}),this.hasEnoughInfoToLoad_()?this.updateTransmuxerAndRequestSegment_(i):this.loadQueue_.push(function(){var e=n.buffered_();\"number\"==typeof i.timestampOffset&&(i.timestampOffset=Wc({segmentTimeline:i.timeline,currentTimeline:n.currentTimeline_,startOfSegment:i.startOfSegment,buffered:e,overrideCheck:!0})),delete i.audioAppendStart;var t=n.sourceUpdater_.audioBuffered();t.length&&(i.audioAppendStart=t.end(t.length-1)-n.sourceUpdater_.audioTimestampOffset()),n.updateTransmuxerAndRequestSegment_(i)})},t.updateTransmuxerAndRequestSegment_=function(e){var t=this;this.shouldUpdateTransmuxerTimestampOffset_(e.timestampOffset)&&(this.gopBuffer_.length=0,e.gopsToAlignWith=[],this.timeMapping_=0,this.transmuxer_.postMessage({action:\"reset\"}),this.transmuxer_.postMessage({action:\"setTimestampOffset\",timestampOffset:e.timestampOffset}));var i=this.createSimplifiedSegmentObj_(e),n=this.isEndOfStream_(e.mediaIndex,e.playlist),r=null!==this.mediaIndex,a=e.timeline!==this.currentTimeline_&&0<e.timeline,s=n||r&&a;e.abortRequests=Ac({xhr:this.vhs_.xhr,xhrOptions:this.xhrOptions_,decryptionWorker:this.decrypter_,segment:i,handlePartialData:this.handlePartialData_,abortFn:this.handleAbort_.bind(this),progressFn:this.handleProgress_.bind(this),trackInfoFn:this.handleTrackInfo_.bind(this),timingInfoFn:this.handleTimingInfo_.bind(this),videoSegmentTimingInfoFn:this.handleSegmentTimingInfo_.bind(this,\"video\",e.requestId),audioSegmentTimingInfoFn:this.handleSegmentTimingInfo_.bind(this,\"audio\",e.requestId),captionsFn:this.handleCaptions_.bind(this),isEndOfTimeline:s,endedTimelineFn:function(){t.logger_(\"received endedtimeline callback\")},id3Fn:this.handleId3_.bind(this),dataFn:this.handleData_.bind(this),doneFn:this.segmentRequestFinished_.bind(this)})},t.trimBackBuffer_=function(e){var t=function(e,t,i){var n=t-hd.BACK_BUFFER_LENGTH;e.length&&(n=Math.max(n,e.start(0)));var r=t-i;return Math.min(r,n)}(this.seekable_(),this.currentTime_(),this.playlist_.targetDuration||10);0<t&&this.remove(0,t)},t.createSimplifiedSegmentObj_=function(e){var t=e.segment,i={resolvedUri:t.resolvedUri,byterange:t.byterange,requestId:e.requestId,transmuxer:e.transmuxer,audioAppendStart:e.audioAppendStart,gopsToAlignWith:e.gopsToAlignWith},n=e.playlist.segments[e.mediaIndex-1];if(n&&n.timeline===t.timeline&&(n.videoTimingInfo?i.baseStartTime=n.videoTimingInfo.transmuxedDecodeEnd:n.audioTimingInfo&&(i.baseStartTime=n.audioTimingInfo.transmuxedDecodeEnd)),t.key){var r=t.key.iv||new Uint32Array([0,0,0,e.mediaIndex+e.playlist.mediaSequence]);i.key=this.segmentKey(t.key),i.key.iv=r}return t.map&&(i.map=this.initSegmentForMap(t.map)),i},t.saveTransferStats_=function(e){this.mediaRequests+=1,e&&(this.mediaBytesTransferred+=e.bytesReceived,this.mediaTransferDuration+=e.roundTripTime)},t.saveBandwidthRelatedStats_=function(e,t){this.pendingSegment_.byteLength=t.bytesReceived,e<1/60?this.logger_(\"Ignoring segment's bandwidth because its duration of \"+e+\" is less than the min to record \"+1/60):(this.bandwidth=t.bandwidth,this.roundTrip=t.roundTripTime)},t.handleTimeout_=function(){this.mediaRequestsTimedout+=1,this.bandwidth=1,this.roundTrip=NaN,this.trigger(\"bandwidthupdate\")},t.segmentRequestFinished_=function(e,t,i){if(this.callQueue_.length)this.callQueue_.push(this.segmentRequestFinished_.bind(this,e,t,i));else if(this.saveTransferStats_(t.stats),this.pendingSegment_&&t.requestId===this.pendingSegment_.requestId){if(e){if(this.pendingSegment_=null,this.state=\"READY\",e.code===_d)return;return this.pause(),e.code===yd?void this.handleTimeout_():(this.mediaRequestsErrored+=1,this.error(e),void this.trigger(\"error\"))}var n=this.pendingSegment_;this.saveBandwidthRelatedStats_(n.duration,t.stats),n.endOfAllRequests=t.endOfAllRequests,i.gopInfo&&(this.gopBuffer_=function(e,t,i){if(!t.length)return e;if(i)return t.slice();for(var n=t[0].pts,r=0;r<e.length&&!(e[r].pts>=n);r++);return e.slice(0,r).concat(t)}(this.gopBuffer_,i.gopInfo,this.safeAppend_)),this.state=\"APPENDING\",this.trigger(\"appending\"),this.waitForAppendsToComplete_(n)}},t.setTimeMapping_=function(e){var t=this.syncController_.mappingForTimeline(e);null!==t&&(this.timeMapping_=t)},t.updateMediaSecondsLoaded_=function(e){\"number\"==typeof e.start&&\"number\"==typeof e.end?this.mediaSecondsLoaded+=e.end-e.start:this.mediaSecondsLoaded+=e.duration},t.shouldUpdateTransmuxerTimestampOffset_=function(e){return null!==e&&(\"main\"===this.loaderType_&&e!==this.sourceUpdater_.videoTimestampOffset()||!this.audioDisabled_&&e!==this.sourceUpdater_.audioTimestampOffset())},t.trueSegmentStart_=function(e){var t=e.currentStart,i=e.playlist,n=e.mediaIndex,r=e.firstVideoFrameTimeForData,a=e.currentVideoTimestampOffset,s=e.useVideoTimingInfo,o=e.videoTimingInfo,u=e.audioTimingInfo;if(\"undefined\"!=typeof t)return t;if(!s)return u.start;var l=i.segments[n-1];return 0!==n&&l&&\"undefined\"!=typeof l.start&&l.end===r+a?o.start:r},t.waitForAppendsToComplete_=function(e){if(!this.currentMediaInfo_)return this.error({message:\"No starting media returned, likely due to an unsupported media format.\",blacklistDuration:1/0}),void this.trigger(\"error\");var t=this.currentMediaInfo_,i=t.hasAudio,n=t.hasVideo,r=t.isMuxed,a=\"main\"===this.loaderType_&&n,s=!this.audioDisabled_&&i&&!r;if(e.waitingOnAppends=0,!e.hasAppendedData_)return e.timingInfo||\"number\"!=typeof e.timestampOffset||(this.isPendingTimestampOffset_=!0),e.timingInfo={start:0},e.waitingOnAppends++,this.isPendingTimestampOffset_||(this.updateSourceBufferTimestampOffset_(e),this.processMetadataQueue_()),void this.checkAppendsDone_(e);a&&e.waitingOnAppends++,s&&e.waitingOnAppends++,a&&this.sourceUpdater_.videoQueueCallback(this.checkAppendsDone_.bind(this,e)),s&&this.sourceUpdater_.audioQueueCallback(this.checkAppendsDone_.bind(this,e))},t.checkAppendsDone_=function(e){this.checkForAbort_(e.requestId)||(e.waitingOnAppends--,0===e.waitingOnAppends&&this.handleAppendsDone_())},t.checkForIllegalMediaSwitch=function(e){var t=function(e,t,i){return\"main\"===e&&t&&i?i.hasAudio||i.hasVideo?t.hasVideo&&!i.hasVideo?\"Only audio found in segment when we expected video. We can't switch to audio only from a stream that had video. To get rid of this message, please add codec information to the manifest.\":!t.hasVideo&&i.hasVideo?\"Video found in segment when we expected only audio. We can't switch to a stream with video from an audio only stream. To get rid of this message, please add codec information to the manifest.\":null:\"Neither audio nor video found in segment.\":null}(this.loaderType_,this.currentMediaInfo_,e);return!!t&&(this.error({message:t,blacklistDuration:1/0}),this.trigger(\"error\"),!0)},t.updateSourceBufferTimestampOffset_=function(e){if(null!==e.timestampOffset&&\"number\"==typeof e.timingInfo.start&&!e.changedTimestampOffset&&\"main\"===this.loaderType_){var t=!1;e.timestampOffset-=e.timingInfo.start,e.changedTimestampOffset=!0,e.timestampOffset!==this.sourceUpdater_.videoTimestampOffset()&&(this.sourceUpdater_.videoTimestampOffset(e.timestampOffset),t=!0),e.timestampOffset!==this.sourceUpdater_.audioTimestampOffset()&&(this.sourceUpdater_.audioTimestampOffset(e.timestampOffset),t=!0),t&&this.trigger(\"timestampoffset\")}},t.updateTimingInfoEnd_=function(e){e.timingInfo=e.timingInfo||{};var t=\"main\"===this.loaderType_&&this.currentMediaInfo_.hasVideo&&e.videoTimingInfo?e.videoTimingInfo:e.audioTimingInfo;t&&(e.timingInfo.end=\"number\"==typeof t.end?t.end:t.start+e.duration)},t.handleAppendsDone_=function(){if(this.pendingSegment_&&this.trigger(\"appendsdone\"),!this.pendingSegment_)return this.state=\"READY\",void(this.paused()||this.monitorBuffer_());var e=this.pendingSegment_;this.updateTimingInfoEnd_(e),this.shouldSaveSegmentTimingInfo_&&this.syncController_.saveSegmentTimingInfo({segmentInfo:e,shouldSaveTimelineMapping:\"main\"===this.loaderType_}),this.logger_(function(e){var t=e.segment,i=t.start,n=t.end,r=e.playlist,a=r.mediaSequence,s=r.id,o=r.segments,u=void 0===o?[]:o,l=e.mediaIndex,c=e.timeline;return[\"appending [\"+l+\"] of [\"+a+\", \"+(a+u.length)+\"] from playlist [\"+s+\"]\",\"[\"+i+\" => \"+n+\"] in timeline [\"+c+\"]\"].join(\" \")}(e));var t=Xc(e,this.sourceType_);if(t&&(\"warn\"===t.severity?ga.log.warn(t.message):this.logger_(t.message)),this.recordThroughput_(e),this.pendingSegment_=null,this.state=\"READY\",e.isSyncRequest)this.trigger(\"syncinfoupdate\");else{this.addSegmentMetadataCue_(e),this.fetchAtBuffer_=!0,this.currentTimeline_!==e.timeline&&(this.timelineChangeController_.lastTimelineChange({type:this.loaderType_,from:this.currentTimeline_,to:e.timeline}),\"main\"!==this.loaderType_||this.audioDisabled_||this.timelineChangeController_.lastTimelineChange({type:\"audio\",from:this.currentTimeline_,to:e.timeline})),this.currentTimeline_=e.timeline,this.trigger(\"syncinfoupdate\");var i=e.segment;if(i.end&&this.currentTime_()-i.end>3*e.playlist.targetDuration)this.resetEverything();else null!==this.mediaIndex&&this.trigger(\"bandwidthupdate\"),this.trigger(\"progress\"),this.mediaIndex=e.mediaIndex,this.isEndOfStream_(e.mediaIndex,e.playlist)&&this.endOfStream(),this.trigger(\"appended\"),this.paused()||this.monitorBuffer_()}},t.recordThroughput_=function(e){if(e.duration<1/60)this.logger_(\"Ignoring segment's throughput because its duration of \"+e.duration+\" is less than the min to record \"+1/60);else{var t=this.throughput.rate,i=Date.now()-e.endOfAllRequests+1,n=Math.floor(e.byteLength/i*8*1e3);this.throughput.rate+=(n-t)/++this.throughput.count}},t.addSegmentMetadataCue_=function(e){if(this.segmentMetadataTrack_){var t=e.segment,i=t.start,n=t.end;if(qc(i)&&qc(n)){Vc(i,n,this.segmentMetadataTrack_);var r=Ea.WebKitDataCue||Ea.VTTCue,a={custom:t.custom,dateTimeObject:t.dateTimeObject,dateTimeString:t.dateTimeString,bandwidth:e.playlist.attributes.BANDWIDTH,resolution:e.playlist.attributes.RESOLUTION,codecs:e.playlist.attributes.CODECS,byteLength:e.byteLength,uri:e.uri,timeline:e.timeline,playlist:e.playlist.id,start:i,end:n},s=new r(i,n,JSON.stringify(a));s.value=a,this.segmentMetadataTrack_.addCue(s)}}},e}(ga.EventTarget);function kd(){}function wd(e){return\"string\"!=typeof e?e:e.replace(/./,function(e){return e.toUpperCase()})}function Ed(e,t){var i=t[e+\"Buffer\"];return i&&i.updating||t.queuePending[e]}function Cd(e,t){if(0!==t.queue.length){var i=0,n=t.queue[i];if(\"mediaSource\"!==n.type){if(\"mediaSource\"!==e&&t.ready()&&\"closed\"!==t.mediaSource.readyState&&!Ed(e,t)){if(n.type!==e){if(null===(i=function(e,t){for(var i=0;i<t.length;i++){var n=t[i];if(\"mediaSource\"===n.type)return null;if(n.type===e)return i}return null}(e,t.queue)))return;n=t.queue[i]}return t.queue.splice(i,1),(t.queuePending[e]=n).action(e,t),n.doneFn?void 0:(t.queuePending[e]=null,void Cd(e,t))}}else t.updating()||\"closed\"===t.mediaSource.readyState||(t.queue.shift(),n.action(t),n.doneFn&&n.doneFn(),Cd(\"audio\",t),Cd(\"video\",t))}}function Id(e,t){var i=t[e+\"Buffer\"],n=wd(e);i&&(i.removeEventListener(\"updateend\",t[\"on\"+n+\"UpdateEnd_\"]),i.removeEventListener(\"error\",t[\"on\"+n+\"Error_\"]),t.codecs[e]=null,t[e+\"Buffer\"]=null)}function xd(e,t){return e&&t&&-1!==Array.prototype.indexOf.call(e.sourceBuffers,t)}function Ad(e){var t=e.type,i=e.sourceUpdater,n=e.action,r=e.doneFn,a=e.name;i.queue.push({type:t,action:n,doneFn:r,name:a}),Cd(t,i)}function Pd(i,n){return function(e){if(n.queuePending[i]){var t=n.queuePending[i].doneFn;n.queuePending[i]=null,t&&t(n[i+\"Error_\"])}Cd(i,n)}}function Ld(e){return decodeURIComponent(escape(String.fromCharCode.apply(null,e)))}function Od(e,t){for(var i=e.cues,n=0;n<i.length;n++){var r=i[n];if(t>=r.adStartTime&&t<=r.adEndTime)return r}return null}function Dd(e,t){e.abort(),e.pause(),t&&t.activePlaylistLoader&&(t.activePlaylistLoader.pause(),t.activePlaylistLoader=null)}function Rd(e,t){(t.activePlaylistLoader=e).load()}function Md(t){[\"AUDIO\",\"SUBTITLES\",\"CLOSED-CAPTIONS\"].forEach(function(e){ah[e](e,t)});var i=t.mediaTypes,e=t.masterPlaylistLoader,n=t.tech,r=t.vhs;[\"AUDIO\",\"SUBTITLES\"].forEach(function(e){i[e].activeGroup=function(a,s){return function(t){var e=s.masterPlaylistLoader,i=s.mediaTypes[a].groups,n=e.media();if(!n)return null;var r=null;return n.attributes[a]&&(r=i[n.attributes[a]]),r=r||i.main,\"undefined\"==typeof t?r:null===t?null:r.filter(function(e){return e.id===t.id})[0]||null}}(e,t),i[e].activeTrack=sh[e](e,t),i[e].onGroupChanged=function(o,u){return function(){var e=u.segmentLoaders,t=e[o],i=e.main,n=u.mediaTypes[o],r=n.activeTrack(),a=n.activeGroup(r),s=n.activePlaylistLoader;Dd(t,n),a&&(a.playlistLoader?(t.resyncLoader(),Rd(a.playlistLoader,n)):s&&i.resetEverything())}}(e,t),i[e].onGroupChanging=function(t,i){return function(){var e=i.segmentLoaders[t];e.abort(),e.pause()}}(e,t),i[e].onTrackChanged=function(o,u){return function(){var e=u.segmentLoaders,t=e[o],i=e.main,n=u.mediaTypes[o],r=n.activeTrack(),a=n.activeGroup(r),s=n.activePlaylistLoader;if(Dd(t,n),a){if(\"AUDIO\"===o){if(!a.playlistLoader)return i.setAudio(!0),void i.resetEverything();t.setAudio(!0),i.setAudio(!1)}s!==a.playlistLoader&&(t.track&&t.track(r),t.resetEverything()),Rd(a.playlistLoader,n)}}}(e,t)});var a=i.AUDIO.activeGroup();if(a){var s=(a.filter(function(e){return e.default})[0]||a[0]).id;i.AUDIO.tracks[s].enabled=!0,i.AUDIO.onTrackChanged()}function o(){i.AUDIO.onTrackChanged(),n.trigger({type:\"usage\",name:\"vhs-audio-change\"}),n.trigger({type:\"usage\",name:\"hls-audio-change\"})}for(var u in e.on(\"mediachange\",function(){[\"AUDIO\",\"SUBTITLES\"].forEach(function(e){return i[e].onGroupChanged()})}),e.on(\"mediachanging\",function(){[\"AUDIO\",\"SUBTITLES\"].forEach(function(e){return i[e].onGroupChanging()})}),n.audioTracks().addEventListener(\"change\",o),n.remoteTextTracks().addEventListener(\"change\",i.SUBTITLES.onTrackChanged),r.on(\"dispose\",function(){n.audioTracks().removeEventListener(\"change\",o),n.remoteTextTracks().removeEventListener(\"change\",i.SUBTITLES.onTrackChanged)}),n.clearTracks(\"audio\"),i.AUDIO.tracks)n.audioTracks().addTrack(i.AUDIO.tracks[u])}function Nd(e,t,i){var n=e.masterPlaylistController_,r=n[(e.options_.smoothQualityChange?\"smooth\":\"fast\")+\"QualityChange_\"].bind(n);if(t.attributes.RESOLUTION){var a=t.attributes.RESOLUTION;this.width=a.width,this.height=a.height}this.bandwidth=t.attributes.BANDWIDTH,this.codecs=Dc(n.master(),t),this.playlist=t,this.id=i,this.enabled=function(r,a,s){return function(e){var t=r.master.playlists[a],i=Kl(t),n=Ql(t);return\"undefined\"==typeof e?n:(e?delete t.disabled:t.disabled=!0,e===n||i||(s(),e?r.trigger(\"renditionenabled\"):r.trigger(\"renditiondisabled\")),e)}}(e.playlists,t.id,r)}function Ud(e){!function t(i,e){var n=0,r=0,a=ga.mergeOptions(dh,e);i.ready(function(){i.trigger({type:\"usage\",name:\"vhs-error-reload-initialized\"}),i.trigger({type:\"usage\",name:\"hls-error-reload-initialized\"})});function s(){r&&i.currentTime(r)}function o(e){null!=e&&(r=i.duration()!==1/0&&i.currentTime()||0,i.one(\"loadedmetadata\",s),i.src(e),i.trigger({type:\"usage\",name:\"vhs-error-reload\"}),i.trigger({type:\"usage\",name:\"hls-error-reload\"}),i.play())}function u(){return Date.now()-n<1e3*a.errorInterval?(i.trigger({type:\"usage\",name:\"vhs-error-reload-canceled\"}),void i.trigger({type:\"usage\",name:\"hls-error-reload-canceled\"})):a.getSource&&\"function\"==typeof a.getSource?(n=Date.now(),a.getSource.call(i,o)):void ga.log.error(\"ERROR: reloadSourceOnError - The option getSource must be a function!\")}function l(){i.off(\"loadedmetadata\",s),i.off(\"error\",u),i.off(\"dispose\",l)}i.on(\"error\",u),i.on(\"dispose\",l),i.reloadSourceOnError=function(e){l(),t(i,e)}}(this,e)}var Bd,Fd=[\"video\",\"audio\"],jd=function(n,r,a){return function(t,i){var e=i[t+\"Buffer\"];if(xd(i.mediaSource,e)){i.logger_(\"Appending segment \"+r.mediaIndex+\"'s \"+n.length+\" bytes to \"+t+\"Buffer\");try{e.appendBuffer(n)}catch(e){i.logger_(\"Error with code \"+e.code+\" \"+(22===e.code?\"(QUOTA_EXCEEDED_ERR) \":\"\")+\"when appending segment \"+r.mediaIndex+\" to \"+t+\"Buffer\"),i.queuePending[t]=null,a(e)}}}},Vd=function(n,r){return function(e,t){var i=t[e+\"Buffer\"];xd(t.mediaSource,i)&&(t.logger_(\"Removing \"+n+\" to \"+r+\" from \"+e+\"Buffer\"),i.remove(n,r))}},qd=function(n){return function(e,t){var i=t[e+\"Buffer\"];xd(t.mediaSource,i)&&(t.logger_(\"Setting \"+e+\"timestampOffset to \"+n),i.timestampOffset=n)}},Hd=function(i){return function(e,t){i()}},Wd=function(t){return function(e){if(\"open\"===e.mediaSource.readyState){e.logger_(\"Calling mediaSource endOfStream(\"+(t||\"\")+\")\");try{e.mediaSource.endOfStream(t)}catch(e){ga.log.warn(\"Failed to call media source endOfStream\",e)}}}},zd=function(t){return function(e){e.logger_(\"Setting mediaSource duration to \"+t);try{e.mediaSource.duration=t}catch(e){ga.log.warn(\"Failed to set media source duration\",e)}}},Gd=function(){return function(t,e){if(\"open\"===e.mediaSource.readyState){var i=e[t+\"Buffer\"];if(xd(e.mediaSource,i)){e.logger_(\"calling abort on \"+t+\"Buffer\");try{i.abort()}catch(e){ga.log.warn(\"Failed to abort on \"+t+\"Buffer\",e)}}}}},Xd=function(r,a){return function(e){var t=wd(r),i=kl(a);e.logger_(\"Adding \"+r+\"Buffer with codec \"+a+\" to mediaSource\");var n=e.mediaSource.addSourceBuffer(i);n.addEventListener(\"updateend\",e[\"on\"+t+\"UpdateEnd_\"]),n.addEventListener(\"error\",e[\"on\"+t+\"Error_\"]),e.codecs[r]=a,e[r+\"Buffer\"]=n}},Kd=function(i){return function(e){var t=e[i+\"Buffer\"];if(Id(i,e),xd(e.mediaSource,t)){e.logger_(\"Removing \"+i+\"Buffer with codec \"+e.codecs[i]+\" from mediaSource\");try{e.mediaSource.removeSourceBuffer(t)}catch(e){ga.log.warn(\"Failed to removeSourceBuffer \"+i+\"Buffer\",e)}}}},Qd=function(r){return function(e,t){var i=t[e+\"Buffer\"],n=kl(r);xd(t.mediaSource,i)&&t.codecs[e]!==r&&(t.logger_(\"changing \"+e+\"Buffer codec from \"+t.codecs[e]+\" to \"+r),i.changeType(n),t.codecs[e]=r)}},Yd=function(i){function e(e){var t;return(t=i.call(this)||this).mediaSource=e,t.sourceopenListener_=function(){return Cd(\"mediaSource\",_a(t))},t.mediaSource.addEventListener(\"sourceopen\",t.sourceopenListener_),t.logger_=Il(\"SourceUpdater\"),t.audioTimestampOffset_=0,t.videoTimestampOffset_=0,t.queue=[],t.queuePending={audio:null,video:null},t.delayedAudioAppendQueue_=[],t.videoAppendQueued_=!1,t.codecs={},t.onVideoUpdateEnd_=Pd(\"video\",_a(t)),t.onAudioUpdateEnd_=Pd(\"audio\",_a(t)),t.onVideoError_=function(e){t.videoError_=e},t.onAudioError_=function(e){t.audioError_=e},t.createdSourceBuffers_=!1,t.initializedEme_=!1,t.triggeredReady_=!1,t}Sa(e,i);var t=e.prototype;return t.initializedEme=function(){this.initializedEme_=!0,this.triggerReady()},t.hasCreatedSourceBuffers=function(){return this.createdSourceBuffers_},t.hasInitializedAnyEme=function(){return this.initializedEme_},t.ready=function(){return this.hasCreatedSourceBuffers()&&this.hasInitializedAnyEme()},t.createSourceBuffers=function(e){this.hasCreatedSourceBuffers()||(this.addOrChangeSourceBuffers(e),this.createdSourceBuffers_=!0,this.trigger(\"createdsourcebuffers\"),this.triggerReady())},t.triggerReady=function(){this.ready()&&!this.triggeredReady_&&(this.triggeredReady_=!0,this.trigger(\"ready\"))},t.addSourceBuffer=function(e,t){Ad({type:\"mediaSource\",sourceUpdater:this,action:Xd(e,t),name:\"addSourceBuffer\"})},t.abort=function(e){Ad({type:e,sourceUpdater:this,action:Gd(e),name:\"abort\"})},t.removeSourceBuffer=function(e){this.canRemoveSourceBuffer()?Ad({type:\"mediaSource\",sourceUpdater:this,action:Kd(e),name:\"removeSourceBuffer\"}):ga.log.error(\"removeSourceBuffer is not supported!\")},t.canRemoveSourceBuffer=function(){return!ga.browser.IE_VERSION&&!ga.browser.IS_FIREFOX&&Ea.MediaSource&&Ea.MediaSource.prototype&&\"function\"==typeof Ea.MediaSource.prototype.removeSourceBuffer},e.canChangeType=function(){return Ea.SourceBuffer&&Ea.SourceBuffer.prototype&&\"function\"==typeof Ea.SourceBuffer.prototype.changeType},t.canChangeType=function(){return this.constructor.canChangeType()},t.changeType=function(e,t){this.canChangeType()?Ad({type:e,sourceUpdater:this,action:Qd(t),name:\"changeType\"}):ga.log.error(\"changeType is not supported!\")},t.addOrChangeSourceBuffers=function(i){var n=this;if(!i||\"object\"!=typeof i||0===Object.keys(i).length)throw new Error(\"Cannot addOrChangeSourceBuffers to undefined codecs\");Object.keys(i).forEach(function(e){var t=i[e];if(!n.hasCreatedSourceBuffers())return n.addSourceBuffer(e,t);n.canChangeType()&&n.changeType(e,t)})},t.appendBuffer=function(e,t){var i=this,n=e.segmentInfo,r=e.type,a=e.bytes;if(this.processedAppend_=!0,\"audio\"===r&&this.videoBuffer&&!this.videoAppendQueued_)return this.delayedAudioAppendQueue_.push([e,t]),void this.logger_(\"delayed audio append of \"+a.length+\" until video append\");if(Ad({type:r,sourceUpdater:this,action:jd(a,n||{mediaIndex:-1},t),doneFn:t,name:\"appendBuffer\"}),\"video\"===r){if(this.videoAppendQueued_=!0,!this.delayedAudioAppendQueue_.length)return;var s=this.delayedAudioAppendQueue_.slice();this.logger_(\"queuing delayed audio \"+s.length+\" appendBuffers\"),this.delayedAudioAppendQueue_.length=0,s.forEach(function(e){i.appendBuffer.apply(i,e)})}},t.audioBuffered=function(){return xd(this.mediaSource,this.audioBuffer)&&this.audioBuffer.buffered?this.audioBuffer.buffered:ga.createTimeRange()},t.videoBuffered=function(){return xd(this.mediaSource,this.videoBuffer)&&this.videoBuffer.buffered?this.videoBuffer.buffered:ga.createTimeRange()},t.buffered=function(){var e=xd(this.mediaSource,this.videoBuffer)?this.videoBuffer:null,t=xd(this.mediaSource,this.audioBuffer)?this.audioBuffer:null;return t&&!e?this.audioBuffered():e&&!t?this.videoBuffered():function(e,t){var i=null,n=null,r=0,a=[],s=[];if(!(e&&e.length&&t&&t.length))return ga.createTimeRange();for(var o=e.length;o--;)a.push({time:e.start(o),type:\"start\"}),a.push({time:e.end(o),type:\"end\"});for(o=t.length;o--;)a.push({time:t.start(o),type:\"start\"}),a.push({time:t.end(o),type:\"end\"});for(a.sort(function(e,t){return e.time-t.time}),o=0;o<a.length;o++)\"start\"===a[o].type?2===++r&&(i=a[o].time):\"end\"===a[o].type&&1===--r&&(n=a[o].time),null!==i&&null!==n&&(s.push([i,n]),n=i=null);return ga.createTimeRanges(s)}(this.audioBuffered(),this.videoBuffered())},t.setDuration=function(e,t){void 0===t&&(t=kd),Ad({type:\"mediaSource\",sourceUpdater:this,action:zd(e),name:\"duration\",doneFn:t})},t.endOfStream=function(e,t){void 0===e&&(e=null),void 0===t&&(t=kd),\"string\"!=typeof e&&(e=void 0),Ad({type:\"mediaSource\",sourceUpdater:this,action:Wd(e),name:\"endOfStream\",doneFn:t})},t.removeAudio=function(e,t,i){void 0===i&&(i=kd),this.audioBuffered().length&&0!==this.audioBuffered().end(0)?Ad({type:\"audio\",sourceUpdater:this,action:Vd(e,t),doneFn:i,name:\"remove\"}):i()},t.removeVideo=function(e,t,i){void 0===i&&(i=kd),this.videoBuffered().length&&0!==this.videoBuffered().end(0)?Ad({type:\"video\",sourceUpdater:this,action:Vd(e,t),doneFn:i,name:\"remove\"}):i()},t.updating=function(){return!(!Ed(\"audio\",this)&&!Ed(\"video\",this))},t.audioTimestampOffset=function(e){return\"undefined\"!=typeof e&&this.audioBuffer&&this.audioTimestampOffset_!==e&&(Ad({type:\"audio\",sourceUpdater:this,action:qd(e),name:\"timestampOffset\"}),this.audioTimestampOffset_=e),this.audioTimestampOffset_},t.videoTimestampOffset=function(e){return\"undefined\"!=typeof e&&this.videoBuffer&&this.videoTimestampOffset!==e&&(Ad({type:\"video\",sourceUpdater:this,action:qd(e),name:\"timestampOffset\"}),this.videoTimestampOffset_=e),this.videoTimestampOffset_},t.audioQueueCallback=function(e){this.audioBuffer&&Ad({type:\"audio\",sourceUpdater:this,action:Hd(e),name:\"callback\"})},t.videoQueueCallback=function(e){this.videoBuffer&&Ad({type:\"video\",sourceUpdater:this,action:Hd(e),name:\"callback\"})},t.dispose=function(){var t=this;this.trigger(\"dispose\"),Fd.forEach(function(e){t.abort(e),t.canRemoveSourceBuffer()?t.removeSourceBuffer(e):t[e+\"QueueCallback\"](function(){return Id(e,t)})}),this.videoAppendQueued_=!1,this.delayedAudioAppendQueue_.length=0,this.sourceopenListener_&&this.mediaSource.removeEventListener(\"sourceopen\",this.sourceopenListener_),this.off()},e}(ga.EventTarget),$d=new Uint8Array(\"\\n\\n\".split(\"\").map(function(e){return e.charCodeAt(0)})),Jd=function(n){function e(e,t){var i;return void 0===t&&(t={}),(i=n.call(this,e,t)||this).handlePartialData_=!1,i.mediaSource_=null,i.subtitlesTrack_=null,i.loaderType_=\"subtitle\",i.featuresNativeTextTracks_=e.featuresNativeTextTracks,i.shouldSaveSegmentTimingInfo_=!1,i}Sa(e,n);var t=e.prototype;return t.createTransmuxer_=function(){return null},t.buffered_=function(){if(!this.subtitlesTrack_||!this.subtitlesTrack_.cues||!this.subtitlesTrack_.cues.length)return ga.createTimeRanges();var e=this.subtitlesTrack_.cues,t=e[0].startTime,i=e[e.length-1].startTime;return ga.createTimeRanges([[t,i]])},t.initSegmentForMap=function(e,t){if(void 0===t&&(t=!1),!e)return null;var i=rc(e),n=this.initSegments_[i];if(t&&!n&&e.bytes){var r=$d.byteLength+e.bytes.byteLength,a=new Uint8Array(r);a.set(e.bytes),a.set($d,e.bytes.byteLength),this.initSegments_[i]=n={resolvedUri:e.resolvedUri,byterange:e.byterange,bytes:a}}return n||e},t.couldBeginLoading_=function(){return this.playlist_&&this.subtitlesTrack_&&!this.paused()},t.init_=function(){return this.state=\"READY\",this.resetEverything(),this.monitorBuffer_()},t.track=function(e){return\"undefined\"==typeof e||(this.subtitlesTrack_=e,\"INIT\"===this.state&&this.couldBeginLoading_()&&this.init_()),this.subtitlesTrack_},t.remove=function(e,t){Vc(e,t,this.subtitlesTrack_)},t.fillBuffer_=function(){var e=this;this.syncPoint_||(this.syncPoint_=this.syncController_.getSyncPoint(this.playlist_,this.duration_(),this.currentTimeline_,this.currentTime_()));var t=this.checkBuffer_(this.buffered_(),this.playlist_,this.mediaIndex,this.hasPlayed_(),this.currentTime_(),this.syncPoint_);if(t=this.skipEmptySegments_(t)){if(null===this.syncController_.timestampOffsetForTimeline(t.timeline)){return this.syncController_.one(\"timestampoffset\",function(){e.state=\"READY\",e.paused()||e.monitorBuffer_()}),void(this.state=\"WAITING_ON_TIMELINE\")}this.loadSegment_(t)}},t.skipEmptySegments_=function(e){for(;e&&e.segment.empty;)e=this.generateSegmentInfo_(e.playlist,e.mediaIndex+1,e.startOfSegment+e.duration,e.isSyncRequest);return e},t.stopForError=function(e){this.error(e),this.state=\"READY\",this.pause(),this.trigger(\"error\")},t.segmentRequestFinished_=function(e,t,i){var n=this;if(this.subtitlesTrack_){if(this.saveTransferStats_(t.stats),!this.pendingSegment_)return this.state=\"READY\",void(this.mediaRequestsAborted+=1);if(e)return e.code===yd&&this.handleTimeout_(),e.code===_d?this.mediaRequestsAborted+=1:this.mediaRequestsErrored+=1,void this.stopForError(e);var r=this.pendingSegment_;this.saveBandwidthRelatedStats_(r.duration,t.stats),this.state=\"APPENDING\",this.trigger(\"appending\");var a=r.segment;if(a.map&&(a.map.bytes=t.map.bytes),r.bytes=t.bytes,\"function\"!=typeof Ea.WebVTT&&this.subtitlesTrack_&&this.subtitlesTrack_.tech_){var s,o=function(){n.subtitlesTrack_.tech_.off(\"vttjsloaded\",s),n.stopForError({message:\"Error loading vtt.js\"})};return s=function(){n.subtitlesTrack_.tech_.off(\"vttjserror\",o),n.segmentRequestFinished_(e,t,i)},this.state=\"WAITING_ON_VTTJS\",this.subtitlesTrack_.tech_.one(\"vttjsloaded\",s),void this.subtitlesTrack_.tech_.one(\"vttjserror\",o)}a.requested=!0;try{this.parseVTTCues_(r)}catch(e){return void this.stopForError({message:e.message})}if(this.updateTimeMapping_(r,this.syncController_.timelines[r.timeline],this.playlist_),r.cues.length?r.timingInfo={start:r.cues[0].startTime,end:r.cues[r.cues.length-1].endTime}:r.timingInfo={start:r.startOfSegment,end:r.startOfSegment+r.duration},r.isSyncRequest)return this.trigger(\"syncinfoupdate\"),this.pendingSegment_=null,void(this.state=\"READY\");r.byteLength=r.bytes.byteLength,this.mediaSecondsLoaded+=a.duration,r.cues.forEach(function(e){n.subtitlesTrack_.addCue(n.featuresNativeTextTracks_?new Ea.VTTCue(e.startTime,e.endTime,e.text):e)}),function(t){var e=t.cues;if(e)for(var i=0;i<e.length;i++){for(var n=[],r=0,a=0;a<e.length;a++)e[i].startTime===e[a].startTime&&e[i].endTime===e[a].endTime&&e[i].text===e[a].text&&1<++r&&n.push(e[a]);n.length&&n.forEach(function(e){return t.removeCue(e)})}}(this.subtitlesTrack_),this.handleAppendsDone_()}else this.state=\"READY\"},t.handleData_=function(){},t.updateTimingInfoEnd_=function(){},t.parseVTTCues_=function(t){var e,i=!1;\"function\"==typeof Ea.TextDecoder?e=new Ea.TextDecoder(\"utf8\"):(e=Ea.WebVTT.StringDecoder(),i=!0);var n=new Ea.WebVTT.Parser(Ea,Ea.vttjs,e);if(t.cues=[],t.timestampmap={MPEGTS:0,LOCAL:0},n.oncue=t.cues.push.bind(t.cues),n.ontimestampmap=function(e){t.timestampmap=e},n.onparsingerror=function(e){ga.log.warn(\"Error encountered when parsing cues: \"+e.message)},t.segment.map){var r=t.segment.map.bytes;i&&(r=Ld(r)),n.parse(r)}var a=t.bytes;i&&(a=Ld(a)),n.parse(a),n.flush()},t.updateTimeMapping_=function(e,t,i){var n=e.segment;if(t)if(e.cues.length){var r=e.timestampmap,a=r.MPEGTS/$u-r.LOCAL+t.mapping;if(e.cues.forEach(function(e){e.startTime+=a,e.endTime+=a}),!i.syncInfo){var s=e.cues[0].startTime,o=e.cues[e.cues.length-1].startTime;i.syncInfo={mediaSequence:i.mediaSequence+e.mediaIndex,time:Math.min(s,o-n.duration)}}}else n.empty=!0},e}(Sd),Zd=[{name:\"VOD\",run:function(e,t,i,n,r){if(i===1/0)return null;return{time:0,segmentIndex:0}}},{name:\"ProgramDateTime\",run:function(e,t,i,n,r){if(!Object.keys(e.timelineToDatetimeMappings).length)return null;var a=t.segments||[],s=null,o=null;r=r||0;for(var u=0;u<a.length;u++){var l=a[u],c=e.timelineToDatetimeMappings[l.timeline];if(c&&l.dateTimeObject){var d=l.dateTimeObject.getTime()/1e3+c,h=Math.abs(r-d);if(null!==o&&(0===h||o<h))break;o=h,s={time:d,segmentIndex:u}}}return s}},{name:\"Segment\",run:function(e,t,i,n,r){var a=t.segments||[],s=null,o=null;r=r||0;for(var u=0;u<a.length;u++){var l=a[u];if(l.timeline===n&&\"undefined\"!=typeof l.start){var c=Math.abs(r-l.start);if(null!==o&&o<c)break;(!s||null===o||c<=o)&&(o=c,s={time:l.start,segmentIndex:u})}}return s}},{name:\"Discontinuity\",run:function(e,t,i,n,r){var a=null;if(r=r||0,t.discontinuityStarts&&t.discontinuityStarts.length)for(var s=null,o=0;o<t.discontinuityStarts.length;o++){var u=t.discontinuityStarts[o],l=t.discontinuitySequence+o+1,c=e.discontinuities[l];if(c){var d=Math.abs(r-c.time);if(null!==s&&s<d)break;(!a||null===s||d<=s)&&(s=d,a={time:c.time,segmentIndex:u})}}return a}},{name:\"Playlist\",run:function(e,t,i,n,r){return t.syncInfo?{time:t.syncInfo.time,segmentIndex:t.syncInfo.mediaSequence-t.mediaSequence}:null}}],eh=function(i){function e(e){var t;return(t=i.call(this)||this).timelines=[],t.discontinuities=[],t.timelineToDatetimeMappings={},t.logger_=Il(\"SyncController\"),t}Sa(e,i);var t=e.prototype;return t.getSyncPoint=function(e,t,i,n){var r=this.runStrategies_(e,t,i,n);return r.length?this.selectSyncPoint_(r,{key:\"time\",value:n}):null},t.getExpiredTime=function(e,t){if(!e||!e.segments)return null;var i=this.runStrategies_(e,t,e.discontinuitySequence,0);if(!i.length)return null;var n=this.selectSyncPoint_(i,{key:\"segmentIndex\",value:0});return 0<n.segmentIndex&&(n.time*=-1),Math.abs(n.time+Wl(e,n.segmentIndex,0))},t.runStrategies_=function(e,t,i,n){for(var r=[],a=0;a<Zd.length;a++){var s=Zd[a],o=s.run(this,e,t,i,n);o&&(o.strategy=s.name,r.push({strategy:s.name,syncPoint:o}))}return r},t.selectSyncPoint_=function(e,t){for(var i=e[0].syncPoint,n=Math.abs(e[0].syncPoint[t.key]-t.value),r=e[0].strategy,a=1;a<e.length;a++){var s=Math.abs(e[a].syncPoint[t.key]-t.value);s<n&&(n=s,i=e[a].syncPoint,r=e[a].strategy)}return this.logger_(\"syncPoint for [\"+t.key+\": \"+t.value+\"] chosen with strategy [\"+r+\"]: [time:\"+i.time+\", segmentIndex:\"+i.segmentIndex+\"]\"),i},t.saveExpiredSegmentInfo=function(e,t){for(var i=t.mediaSequence-e.mediaSequence-1;0<=i;i--){var n=e.segments[i];if(n&&\"undefined\"!=typeof n.start){t.syncInfo={mediaSequence:e.mediaSequence+i,time:n.start},this.logger_(\"playlist refresh sync: [time:\"+t.syncInfo.time+\", mediaSequence: \"+t.syncInfo.mediaSequence+\"]\"),this.trigger(\"syncinfoupdate\");break}}},t.setDateTimeMappingForStart=function(e){if(this.timelineToDatetimeMappings={},e.segments&&e.segments.length&&e.segments[0].dateTimeObject){var t=e.segments[0],i=t.dateTimeObject.getTime()/1e3;this.timelineToDatetimeMappings[t.timeline]=-i}},t.saveSegmentTimingInfo=function(e){var t=e.segmentInfo,i=e.shouldSaveTimelineMapping,n=this.calculateSegmentTimeMapping_(t,t.timingInfo,i),r=t.segment;n&&(this.saveDiscontinuitySyncInfo_(t),t.playlist.syncInfo||(t.playlist.syncInfo={mediaSequence:t.playlist.mediaSequence+t.mediaIndex,time:r.start}));var a=r.dateTimeObject;r.discontinuity&&i&&a&&(this.timelineToDatetimeMappings[r.timeline]=-a.getTime()/1e3)},t.timestampOffsetForTimeline=function(e){return\"undefined\"==typeof this.timelines[e]?null:this.timelines[e].time},t.mappingForTimeline=function(e){return\"undefined\"==typeof this.timelines[e]?null:this.timelines[e].mapping},t.calculateSegmentTimeMapping_=function(e,t,i){var n=e.segment,r=this.timelines[e.timeline];if(\"number\"==typeof e.timestampOffset)r={time:e.startOfSegment,mapping:e.startOfSegment-t.start},i&&(this.timelines[e.timeline]=r,this.trigger(\"timestampoffset\"),this.logger_(\"time mapping for timeline \"+e.timeline+\": [time: \"+r.time+\"] [mapping: \"+r.mapping+\"]\")),n.start=e.startOfSegment,n.end=t.end+r.mapping;else{if(!r)return!1;n.start=t.start+r.mapping,n.end=t.end+r.mapping}return!0},t.saveDiscontinuitySyncInfo_=function(e){var t=e.playlist,i=e.segment;if(i.discontinuity)this.discontinuities[i.timeline]={time:i.start,accuracy:0};else if(t.discontinuityStarts&&t.discontinuityStarts.length)for(var n=0;n<t.discontinuityStarts.length;n++){var r=t.discontinuityStarts[n],a=t.discontinuitySequence+n+1,s=r-e.mediaIndex,o=Math.abs(s);if(!this.discontinuities[a]||this.discontinuities[a].accuracy>o){var u=void 0;u=s<0?i.start-Wl(t,e.mediaIndex,r):i.end+Wl(t,e.mediaIndex+1,r),this.discontinuities[a]={time:u,accuracy:o}}}},t.dispose=function(){this.trigger(\"dispose\"),this.off()},e}(ga.EventTarget),th=function(t){function e(){var e;return(e=t.call(this)||this).pendingTimelineChanges_={},e.lastTimelineChanges_={},e}Sa(e,t);var i=e.prototype;return i.clearPendingTimelineChange=function(e){this.pendingTimelineChanges_[e]=null,this.trigger(\"pendingtimelinechange\")},i.pendingTimelineChange=function(e){var t=e.type,i=e.from,n=e.to;return\"number\"==typeof i&&\"number\"==typeof n&&(this.pendingTimelineChanges_[t]={type:t,from:i,to:n},this.trigger(\"pendingtimelinechange\")),this.pendingTimelineChanges_[t]},i.lastTimelineChange=function(e){var t=e.type,i=e.from,n=e.to;return\"number\"==typeof i&&\"number\"==typeof n&&(this.lastTimelineChanges_[t]={type:t,from:i,to:n},delete this.pendingTimelineChanges_[t],this.trigger(\"timelinechange\")),this.lastTimelineChanges_[t]},i.dispose=function(){this.trigger(\"dispose\"),this.pendingTimelineChanges_={},this.lastTimelineChanges_={},this.off()},e}(ga.EventTarget),ih=gc(vc(yc(function(){function n(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,\"value\"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var e=function(e,t,i){return t&&n(e.prototype,t),i&&n(e,i),e};var r=function(e,t){e.prototype=Object.create(t.prototype),(e.prototype.constructor=e).__proto__=t},a=function(){function e(){this.listeners={}}var t=e.prototype;return t.on=function(e,t){this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push(t)},t.off=function(e,t){if(!this.listeners[e])return!1;var i=this.listeners[e].indexOf(t);return this.listeners[e]=this.listeners[e].slice(0),this.listeners[e].splice(i,1),-1<i},t.trigger=function(e,t){var i=this.listeners[e];if(i)if(2===arguments.length)for(var n=i.length,r=0;r<n;++r)i[r].call(this,t);else for(var a=Array.prototype.slice.call(arguments,1),s=i.length,o=0;o<s;++o)i[o].apply(this,a)},t.dispose=function(){this.listeners={}},t.pipe=function(t){this.on(\"data\",function(e){t.push(e)})},e}();function g(e){return e<<24|(65280&e)<<8|(16711680&e)>>8|e>>>24}\r\n /*! @name aes-decrypter @version 3.1.2 @license Apache-2.0 */\r\n var c=null,v=function(){function e(e){var t,i,n;c=c||function(){var e,t,i,n,r,a,s,o,u=[[[],[],[],[],[]],[[],[],[],[],[]]],l=u[0],c=u[1],d=l[4],h=c[4],p=[],f=[];for(e=0;e<256;e++)f[(p[e]=e<<1^283*(e>>7))^e]=e;for(t=i=0;!d[t];t^=n||1,i=f[i]||1)for(a=(a=i^i<<1^i<<2^i<<3^i<<4)>>8^255&a^99,o=16843009*p[r=p[n=p[h[d[t]=a]=t]]]^65537*r^257*n^16843008*t,s=257*p[a]^16843008*a,e=0;e<4;e++)l[e][t]=s=s<<24^s>>>8,c[e][a]=o=o<<24^o>>>8;for(e=0;e<5;e++)l[e]=l[e].slice(0),c[e]=c[e].slice(0);return u}(),this._tables=[[c[0][0].slice(),c[0][1].slice(),c[0][2].slice(),c[0][3].slice(),c[0][4].slice()],[c[1][0].slice(),c[1][1].slice(),c[1][2].slice(),c[1][3].slice(),c[1][4].slice()]];var r=this._tables[0][4],a=this._tables[1],s=e.length,o=1;if(4!==s&&6!==s&&8!==s)throw new Error(\"Invalid aes key size\");var u=e.slice(0),l=[];for(this._key=[u,l],t=s;t<4*s+28;t++)n=u[t-1],(t%s==0||8===s&&t%s==4)&&(n=r[n>>>24]<<24^r[n>>16&255]<<16^r[n>>8&255]<<8^r[255&n],t%s==0&&(n=n<<8^n>>>24^o<<24,o=o<<1^283*(o>>7))),u[t]=u[t-s]^n;for(i=0;t;i++,t--)n=u[3&i?t:t-4],l[i]=t<=4||i<4?n:a[0][r[n>>>24]]^a[1][r[n>>16&255]]^a[2][r[n>>8&255]]^a[3][r[255&n]]}return e.prototype.decrypt=function(e,t,i,n,r,a){var s,o,u,l,c=this._key[1],d=e^c[0],h=n^c[1],p=i^c[2],f=t^c[3],m=c.length/4-2,g=4,v=this._tables[1],y=v[0],_=v[1],b=v[2],T=v[3],S=v[4];for(l=0;l<m;l++)s=y[d>>>24]^_[h>>16&255]^b[p>>8&255]^T[255&f]^c[g],o=y[h>>>24]^_[p>>16&255]^b[f>>8&255]^T[255&d]^c[g+1],u=y[p>>>24]^_[f>>16&255]^b[d>>8&255]^T[255&h]^c[g+2],f=y[f>>>24]^_[d>>16&255]^b[h>>8&255]^T[255&p]^c[g+3],g+=4,d=s,h=o,p=u;for(l=0;l<4;l++)r[(3&-l)+a]=S[d>>>24]<<24^S[h>>16&255]<<16^S[p>>8&255]<<8^S[255&f]^c[g++],s=d,d=h,h=p,p=f,f=s},e}(),l=function(t){function e(){var e;return(e=t.call(this,a)||this).jobs=[],e.delay=1,e.timeout_=null,e}r(e,t);var i=e.prototype;return i.processJob_=function(){this.jobs.shift()(),this.jobs.length?this.timeout_=setTimeout(this.processJob_.bind(this),this.delay):this.timeout_=null},i.push=function(e){this.jobs.push(e),this.timeout_||(this.timeout_=setTimeout(this.processJob_.bind(this),this.delay))},e}(a),s=function(){function u(e,t,i,n){var r=u.STEP,a=new Int32Array(e.buffer),s=new Uint8Array(e.byteLength),o=0;for(this.asyncStream_=new l,this.asyncStream_.push(this.decryptChunk_(a.subarray(o,o+r),t,i,s)),o=r;o<a.length;o+=r)i=new Uint32Array([g(a[o-4]),g(a[o-3]),g(a[o-2]),g(a[o-1])]),this.asyncStream_.push(this.decryptChunk_(a.subarray(o,o+r),t,i,s));this.asyncStream_.push(function(){n(null,\r\n /*! @name pkcs7 @version 1.0.4 @license Apache-2.0 */\r\n function(e){return e.subarray(0,e.byteLength-e[e.byteLength-1])}(s))})}return u.prototype.decryptChunk_=function(t,i,n,r){return function(){var e=function(e,t,i){var n,r,a,s,o,u,l,c,d,h=new Int32Array(e.buffer,e.byteOffset,e.byteLength>>2),p=new v(Array.prototype.slice.call(t)),f=new Uint8Array(e.byteLength),m=new Int32Array(f.buffer);for(n=i[0],r=i[1],a=i[2],s=i[3],d=0;d<h.length;d+=4)o=g(h[d]),u=g(h[d+1]),l=g(h[d+2]),c=g(h[d+3]),p.decrypt(o,u,l,c,m,d),m[d]=g(m[d]^n),m[d+1]=g(m[d+1]^r),m[d+2]=g(m[d+2]^a),m[d+3]=g(m[d+3]^s),n=o,r=u,a=l,s=c;return f}(t,i,n);r.set(e,t.byteOffset)}},e(u,null,[{key:\"STEP\",get:function(){return 32e3}}]),u}();self.onmessage=function(e){var i=e.data,t=new Uint8Array(i.encrypted.bytes,i.encrypted.byteOffset,i.encrypted.byteLength),n=new Uint32Array(i.key.bytes,i.key.byteOffset,i.key.byteLength/4),r=new Uint32Array(i.iv.bytes,i.iv.byteOffset,i.iv.byteLength/4);new s(t,n,r,function(e,t){self.postMessage(function(i){var n={};return Object.keys(i).forEach(function(e){var t=i[e];ArrayBuffer.isView(t)?n[e]={bytes:t.buffer,byteOffset:t.byteOffset,byteLength:t.byteLength}:n[e]=t}),n}({source:i.source,decrypted:t}),[t.buffer])})}}))),nh={AUDIO:function(u,l){return function(){var e=l.segmentLoaders[u],t=l.mediaTypes[u],i=l.blacklistCurrentPlaylist;Dd(e,t);var n=t.activeTrack(),r=t.activeGroup(),a=(r.filter(function(e){return e.default})[0]||r[0]).id,s=t.tracks[a];if(n!==s){for(var o in ga.log.warn(\"Problem encountered loading the alternate audio track.Switching back to default.\"),t.tracks)t.tracks[o].enabled=t.tracks[o]===s;t.onTrackChanged()}else i({message:\"Problem encountered loading the default audio track.\"})}},SUBTITLES:function(n,r){return function(){var e=r.segmentLoaders[n],t=r.mediaTypes[n];ga.log.warn(\"Problem encountered loading the subtitle track.Disabling subtitle track.\"),Dd(e,t);var i=t.activeTrack();i&&(i.mode=\"disabled\"),t.onTrackChanged()}}},rh={AUDIO:function(e,t,i){if(t){var n=i.tech,r=i.requestOptions,a=i.segmentLoaders[e];t.on(\"loadedmetadata\",function(){var e=t.media();a.playlist(e,r),(!n.paused()||e.endList&&\"none\"!==n.preload())&&a.load()}),t.on(\"loadedplaylist\",function(){a.playlist(t.media(),r),n.paused()||a.load()}),t.on(\"error\",nh[e](e,i))}},SUBTITLES:function(e,t,i){var n=i.tech,r=i.requestOptions,a=i.segmentLoaders[e],s=i.mediaTypes[e];t.on(\"loadedmetadata\",function(){var e=t.media();a.playlist(e,r),a.track(s.activeTrack()),(!n.paused()||e.endList&&\"none\"!==n.preload())&&a.load()}),t.on(\"loadedplaylist\",function(){a.playlist(t.media(),r),n.paused()||a.load()}),t.on(\"error\",nh[e](e,i))}},ah={AUDIO:function(s,o){var u=o.vhs,l=o.sourceType,e=o.segmentLoaders[s],c=o.requestOptions,t=o.master,d=t.mediaGroups,i=t.playlists,n=o.mediaTypes[s],h=n.groups,p=n.tracks,f=o.masterPlaylistLoader;d[s]&&0!==Object.keys(d[s]).length||(d[s]={main:{default:{default:!0}}});function r(r){function e(e){var t=d[s][r][e];!a.filter(function(e){return e.resolvedUri!==t.resolvedUri}).length&&a.length&&delete t.resolvedUri;var i=void 0;if(i=\"vhs-json\"===l&&t.playlists?new nd(t.playlists[0],u,c):t.resolvedUri?new nd(t.resolvedUri,u,c):t.playlists&&\"dash\"===l?new dd(t.playlists[0],u,c,f):null,t=ga.mergeOptions({id:e,playlistLoader:i},t),rh[s](s,t.playlistLoader,o),h[r].push(t),\"undefined\"==typeof p[e]){var n=new ga.AudioTrack({id:e,kind:function(e){var t=e.default?\"main\":\"alternative\";return e.characteristics&&0<=e.characteristics.indexOf(\"public.accessibility.describes-video\")&&(t=\"main-desc\"),t}(t),enabled:!1,language:t.language,default:t.default,label:e});p[e]=n}}h[r]||(h[r]=[]);var a=i.filter(function(e){return e.attributes[s]===r});for(var t in d[s][r])e(t)}for(var a in d[s])r(a);e.on(\"error\",nh[s](s,o))},SUBTITLES:function(e,t){var i=t.tech,n=t.vhs,r=t.sourceType,a=t.segmentLoaders[e],s=t.requestOptions,o=t.master.mediaGroups,u=t.mediaTypes[e],l=u.groups,c=u.tracks,d=t.masterPlaylistLoader;for(var h in o[e])for(var p in l[h]||(l[h]=[]),o[e][h])if(!o[e][h][p].forced){var f=o[e][h][p],m=void 0;if(\"hls\"===r)m=new nd(f.resolvedUri,n,s);else if(\"dash\"===r){if(!f.playlists.filter(function(e){return e.excludeUntil!==1/0}).length)return;m=new dd(f.playlists[0],n,s,d)}else\"vhs-json\"===r&&(m=new nd(f.playlists?f.playlists[0]:f.resolvedUri,n,s));if(f=ga.mergeOptions({id:p,playlistLoader:m},f),rh[e](e,f.playlistLoader,t),l[h].push(f),\"undefined\"==typeof c[p]){var g=i.addRemoteTextTrack({id:p,kind:\"subtitles\",default:f.default&&f.autoselect,language:f.language,label:p},!1).track;c[p]=g}}a.on(\"error\",nh[e](e,t))},\"CLOSED-CAPTIONS\":function(e,t){var i=t.tech,n=t.master.mediaGroups,r=t.mediaTypes[e],a=r.groups,s=r.tracks;for(var o in n[e])for(var u in a[o]||(a[o]=[]),n[e][o]){var l=n[e][o][u];if(l.instreamId.match(/CC\\d/)&&(a[o].push(ga.mergeOptions({id:u},l)),\"undefined\"==typeof s[u])){var c=i.addRemoteTextTrack({id:l.instreamId,kind:\"captions\",default:l.default&&l.autoselect,language:l.language,label:u},!1).track;s[u]=c}}}},sh={AUDIO:function(i,n){return function(){var e=n.mediaTypes[i].tracks;for(var t in e)if(e[t].enabled)return e[t];return null}},SUBTITLES:function(i,n){return function(){var e=n.mediaTypes[i].tracks;for(var t in e)if(\"showing\"===e[t].mode||\"hidden\"===e[t].mode)return e[t];return null}}},oh=[\"mediaRequests\",\"mediaRequestsAborted\",\"mediaRequestsTimedout\",\"mediaRequestsErrored\",\"mediaTransferDuration\",\"mediaBytesTransferred\"],uh=function(g){function e(e){var t;t=g.call(this)||this;var i=e.src,n=e.handleManifestRedirects,r=e.withCredentials,a=e.tech,s=e.bandwidth,o=e.externVhs,u=e.useCueTags,l=e.blacklistDuration,c=e.enableLowInitialPlaylist,d=e.sourceType,h=e.cacheEncryptionKeys,p=e.handlePartialData,f=e.experimentalBufferBasedABR;if(!i)throw new Error(\"A non-empty playlist URL or JSON manifest string is required\");Bd=o,t.experimentalBufferBasedABR=Boolean(f),t.withCredentials=r,t.tech_=a,t.vhs_=a.vhs,t.sourceType_=d,t.useCueTags_=u,t.blacklistDuration=l,t.enableLowInitialPlaylist=c,t.useCueTags_&&(t.cueTagsTrack_=t.tech_.addTextTrack(\"metadata\",\"ad-cues\"),t.cueTagsTrack_.inBandMetadataTrackDispatchType=\"\"),t.requestOptions_={withCredentials:r,handleManifestRedirects:n,timeout:null},t.on(\"error\",t.pauseLoading),t.mediaTypes_=function(){var t={};return[\"AUDIO\",\"SUBTITLES\",\"CLOSED-CAPTIONS\"].forEach(function(e){t[e]={groups:{},tracks:{},activePlaylistLoader:null,activeGroup:kd,activeTrack:kd,onGroupChanged:kd,onTrackChanged:kd}}),t}(),t.mediaSource=new Ea.MediaSource,t.handleDurationChange_=t.handleDurationChange_.bind(_a(t)),t.handleSourceOpen_=t.handleSourceOpen_.bind(_a(t)),t.handleSourceEnded_=t.handleSourceEnded_.bind(_a(t)),t.mediaSource.addEventListener(\"durationchange\",t.handleDurationChange_),t.mediaSource.addEventListener(\"sourceopen\",t.handleSourceOpen_),t.mediaSource.addEventListener(\"sourceended\",t.handleSourceEnded_),t.seekable_=ga.createTimeRanges(),t.hasPlayed_=!1,t.syncController_=new eh(e),t.segmentMetadataTrack_=a.addRemoteTextTrack({kind:\"metadata\",label:\"segment-metadata\"},!1).track,t.decrypter_=new ih,t.sourceUpdater_=new Yd(t.mediaSource),t.inbandTextTracks_={},t.timelineChangeController_=new th;var m={vhs:t.vhs_,parse708captions:e.parse708captions,mediaSource:t.mediaSource,currentTime:t.tech_.currentTime.bind(t.tech_),seekable:function(){return t.seekable()},seeking:function(){return t.tech_.seeking()},duration:function(){return t.duration()},hasPlayed:function(){return t.hasPlayed_},goalBufferLength:function(){return t.goalBufferLength()},bandwidth:s,syncController:t.syncController_,decrypter:t.decrypter_,sourceType:t.sourceType_,inbandTextTracks:t.inbandTextTracks_,cacheEncryptionKeys:h,handlePartialData:p,sourceUpdater:t.sourceUpdater_,timelineChangeController:t.timelineChangeController_};return t.masterPlaylistLoader_=\"dash\"===t.sourceType_?new dd(i,t.vhs_,t.requestOptions_):new nd(i,t.vhs_,t.requestOptions_),t.setupMasterPlaylistLoaderListeners_(),t.mainSegmentLoader_=new Sd(ga.mergeOptions(m,{segmentMetadataTrack:t.segmentMetadataTrack_,loaderType:\"main\"}),e),t.audioSegmentLoader_=new Sd(ga.mergeOptions(m,{loaderType:\"audio\"}),e),t.subtitleSegmentLoader_=new Jd(ga.mergeOptions(m,{loaderType:\"vtt\",featuresNativeTextTracks:t.tech_.featuresNativeTextTracks}),e),t.setupSegmentLoaderListeners_(),t.experimentalBufferBasedABR&&(t.masterPlaylistLoader_.one(\"loadedplaylist\",function(){return t.startABRTimer_()}),t.tech_.on(\"pause\",function(){return t.stopABRTimer_()}),t.tech_.on(\"play\",function(){return t.startABRTimer_()})),oh.forEach(function(e){t[e+\"_\"]=function(e){return this.audioSegmentLoader_[e]+this.mainSegmentLoader_[e]}.bind(_a(t),e)}),t.logger_=Il(\"MPC\"),t.triggeredFmp4Usage=!1,\"none\"===t.tech_.preload()?(t.loadOnPlay_=function(){t.loadOnPlay_=null,t.masterPlaylistLoader_.load()},t.tech_.one(\"play\",t.loadOnPlay_)):t.masterPlaylistLoader_.load(),t}Sa(e,g);var t=e.prototype;return t.checkABR_=function(){var e=this.selectPlaylist();this.shouldSwitchToMedia_(e)&&this.masterPlaylistLoader_.media(e)},t.startABRTimer_=function(){var e=this;this.stopABRTimer_(),this.abrTimer_=Ea.setInterval(function(){return e.checkABR_()},250)},t.stopABRTimer_=function(){this.tech_.scrubbing&&this.tech_.scrubbing()||(Ea.clearInterval(this.abrTimer_),this.abrTimer_=null)},t.setupMasterPlaylistLoaderListeners_=function(){var i=this;this.masterPlaylistLoader_.on(\"loadedmetadata\",function(){var e=i.masterPlaylistLoader_.media(),t=1.5*e.targetDuration*1e3;$l(i.masterPlaylistLoader_.master,i.masterPlaylistLoader_.media())?i.requestOptions_.timeout=0:i.requestOptions_.timeout=t,e.endList&&\"none\"!==i.tech_.preload()&&(i.mainSegmentLoader_.playlist(e,i.requestOptions_),i.mainSegmentLoader_.load()),Md({sourceType:i.sourceType_,segmentLoaders:{AUDIO:i.audioSegmentLoader_,SUBTITLES:i.subtitleSegmentLoader_,main:i.mainSegmentLoader_},tech:i.tech_,requestOptions:i.requestOptions_,masterPlaylistLoader:i.masterPlaylistLoader_,vhs:i.vhs_,master:i.master(),mediaTypes:i.mediaTypes_,blacklistCurrentPlaylist:i.blacklistCurrentPlaylist.bind(i)}),i.triggerPresenceUsage_(i.master(),e),i.setupFirstPlay(),!i.mediaTypes_.AUDIO.activePlaylistLoader||i.mediaTypes_.AUDIO.activePlaylistLoader.media()?i.trigger(\"selectedinitialmedia\"):i.mediaTypes_.AUDIO.activePlaylistLoader.one(\"loadedmetadata\",function(){i.trigger(\"selectedinitialmedia\")})}),this.masterPlaylistLoader_.on(\"loadedplaylist\",function(){i.loadOnPlay_&&i.tech_.off(\"play\",i.loadOnPlay_);var e=i.masterPlaylistLoader_.media();if(!e){var t;if(i.excludeUnsupportedVariants_(),i.enableLowInitialPlaylist&&(t=i.selectInitialPlaylist()),!(t=t||i.selectPlaylist())||!i.shouldSwitchToMedia_(t))return;if(i.initialMedia_=t,i.masterPlaylistLoader_.media(i.initialMedia_),!(\"vhs-json\"===i.sourceType_&&i.initialMedia_.segments))return;e=i.initialMedia_}i.handleUpdatedMediaPlaylist(e)}),this.masterPlaylistLoader_.on(\"error\",function(){i.blacklistCurrentPlaylist(i.masterPlaylistLoader_.error)}),this.masterPlaylistLoader_.on(\"mediachanging\",function(){i.mainSegmentLoader_.abort(),i.mainSegmentLoader_.pause()}),this.masterPlaylistLoader_.on(\"mediachange\",function(){var e=i.masterPlaylistLoader_.media(),t=1.5*e.targetDuration*1e3;$l(i.masterPlaylistLoader_.master,i.masterPlaylistLoader_.media())?i.requestOptions_.timeout=0:i.requestOptions_.timeout=t,i.mainSegmentLoader_.playlist(e,i.requestOptions_),i.mainSegmentLoader_.load(),i.tech_.trigger({type:\"mediachange\",bubbles:!0})}),this.masterPlaylistLoader_.on(\"playlistunchanged\",function(){var e=i.masterPlaylistLoader_.media();\"playlist-unchanged\"!==e.lastExcludeReason_&&i.stuckAtPlaylistEnd_(e)&&(i.blacklistCurrentPlaylist({message:\"Playlist no longer updating.\",reason:\"playlist-unchanged\"}),i.tech_.trigger(\"playliststuck\"))}),this.masterPlaylistLoader_.on(\"renditiondisabled\",function(){i.tech_.trigger({type:\"usage\",name:\"vhs-rendition-disabled\"}),i.tech_.trigger({type:\"usage\",name:\"hls-rendition-disabled\"})}),this.masterPlaylistLoader_.on(\"renditionenabled\",function(){i.tech_.trigger({type:\"usage\",name:\"vhs-rendition-enabled\"}),i.tech_.trigger({type:\"usage\",name:\"hls-rendition-enabled\"})})},t.handleUpdatedMediaPlaylist=function(e){this.useCueTags_&&this.updateAdCues_(e),this.mainSegmentLoader_.playlist(e,this.requestOptions_),this.updateDuration(!e.endList),this.tech_.paused()||(this.mainSegmentLoader_.load(),this.audioSegmentLoader_&&this.audioSegmentLoader_.load())},t.triggerPresenceUsage_=function(e,t){var i=e.mediaGroups||{},n=!0,r=Object.keys(i.AUDIO);for(var a in i.AUDIO)for(var s in i.AUDIO[a]){i.AUDIO[a][s].uri||(n=!1)}n&&(this.tech_.trigger({type:\"usage\",name:\"vhs-demuxed\"}),this.tech_.trigger({type:\"usage\",name:\"hls-demuxed\"})),Object.keys(i.SUBTITLES).length&&(this.tech_.trigger({type:\"usage\",name:\"vhs-webvtt\"}),this.tech_.trigger({type:\"usage\",name:\"hls-webvtt\"})),Bd.Playlist.isAes(t)&&(this.tech_.trigger({type:\"usage\",name:\"vhs-aes\"}),this.tech_.trigger({type:\"usage\",name:\"hls-aes\"})),r.length&&1<Object.keys(i.AUDIO[r[0]]).length&&(this.tech_.trigger({type:\"usage\",name:\"vhs-alternate-audio\"}),this.tech_.trigger({type:\"usage\",name:\"hls-alternate-audio\"})),this.useCueTags_&&(this.tech_.trigger({type:\"usage\",name:\"vhs-playlist-cue-tags\"}),this.tech_.trigger({type:\"usage\",name:\"hls-playlist-cue-tags\"}))},t.shouldSwitchToMedia_=function(e){var t=this.masterPlaylistLoader_.media(),i=this.tech_.buffered();return function(e){var t=e.currentPlaylist,i=e.nextPlaylist,n=e.forwardBuffer,r=e.bufferLowWaterLine,a=e.bufferHighWaterLine,s=e.duration,o=e.experimentalBufferBasedABR,u=e.log;if(!i)return ga.log.warn(\"We received no playlist to switch to. Please check your stream.\"),!1;var l=\"allowing switch \"+(t&&t.id||\"null\")+\" -> \"+i.id;if(!t||!t.endList)return u(l+\" as current playlist \"+(t?\"is live\":\"is not set\")),!0;if(i.id===t.id)return!1;var c=o?hd.EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE:hd.MAX_BUFFER_LOW_WATER_LINE;if(s<c)return u(l+\" as duration < max low water line (\"+s+\" < \"+c+\")\"),!0;var d=i.attributes.BANDWIDTH,h=t.attributes.BANDWIDTH;if(d<h&&(!o||n<a)){var p=l+\" as next bandwidth < current bandwidth (\"+d+\" < \"+h+\")\";return o&&(p+=\" and forwardBuffer < bufferHighWaterLine (\"+n+\" < \"+a+\")\"),u(p),!0}if((!o||h<d)&&r<=n){var f=l+\" as forwardBuffer >= bufferLowWaterLine (\"+n+\" >= \"+r+\")\";return o&&(f+=\" and next bandwidth > current bandwidth (\"+d+\" > \"+h+\")\"),u(f),!0}return u(\"not \"+l+\" as no switching criteria met\"),!1}({currentPlaylist:t,nextPlaylist:e,forwardBuffer:i.length?i.end(i.length-1)-this.tech_.currentTime():0,bufferLowWaterLine:this.bufferLowWaterLine(),bufferHighWaterLine:this.bufferHighWaterLine(),duration:this.duration(),experimentalBufferBasedABR:this.experimentalBufferBasedABR,log:this.logger_})},t.setupSegmentLoaderListeners_=function(){var t=this;this.experimentalBufferBasedABR||(this.mainSegmentLoader_.on(\"bandwidthupdate\",function(){var e=t.selectPlaylist();t.shouldSwitchToMedia_(e)&&t.masterPlaylistLoader_.media(e),t.tech_.trigger(\"bandwidthupdate\")}),this.mainSegmentLoader_.on(\"progress\",function(){t.trigger(\"progress\")})),this.mainSegmentLoader_.on(\"error\",function(){t.blacklistCurrentPlaylist(t.mainSegmentLoader_.error())}),this.mainSegmentLoader_.on(\"appenderror\",function(){t.error=t.mainSegmentLoader_.error_,t.trigger(\"error\")}),this.mainSegmentLoader_.on(\"syncinfoupdate\",function(){t.onSyncInfoUpdate_()}),this.mainSegmentLoader_.on(\"timestampoffset\",function(){t.tech_.trigger({type:\"usage\",name:\"vhs-timestamp-offset\"}),t.tech_.trigger({type:\"usage\",name:\"hls-timestamp-offset\"})}),this.audioSegmentLoader_.on(\"syncinfoupdate\",function(){t.onSyncInfoUpdate_()}),this.audioSegmentLoader_.on(\"appenderror\",function(){t.error=t.audioSegmentLoader_.error_,t.trigger(\"error\")}),this.mainSegmentLoader_.on(\"ended\",function(){t.logger_(\"main segment loader ended\"),t.onEndOfStream()}),this.mainSegmentLoader_.on(\"earlyabort\",function(e){t.experimentalBufferBasedABR||(t.delegateLoaders_(\"all\",[\"abort\"]),t.blacklistCurrentPlaylist({message:\"Aborted early because there isn't enough bandwidth to complete the request without rebuffering.\"},120))});function e(){if(!t.sourceUpdater_.hasCreatedSourceBuffers())return t.tryToCreateSourceBuffers_();var e=t.getCodecsOrExclude_();e&&t.sourceUpdater_.addOrChangeSourceBuffers(e)}this.mainSegmentLoader_.on(\"trackinfo\",e),this.audioSegmentLoader_.on(\"trackinfo\",e),this.mainSegmentLoader_.on(\"fmp4\",function(){t.triggeredFmp4Usage||(t.tech_.trigger({type:\"usage\",name:\"vhs-fmp4\"}),t.tech_.trigger({type:\"usage\",name:\"hls-fmp4\"}),t.triggeredFmp4Usage=!0)}),this.audioSegmentLoader_.on(\"fmp4\",function(){t.triggeredFmp4Usage||(t.tech_.trigger({type:\"usage\",name:\"vhs-fmp4\"}),t.tech_.trigger({type:\"usage\",name:\"hls-fmp4\"}),t.triggeredFmp4Usage=!0)}),this.audioSegmentLoader_.on(\"ended\",function(){t.logger_(\"audioSegmentLoader ended\"),t.onEndOfStream()})},t.mediaSecondsLoaded_=function(){return Math.max(this.audioSegmentLoader_.mediaSecondsLoaded+this.mainSegmentLoader_.mediaSecondsLoaded)},t.load=function(){this.mainSegmentLoader_.load(),this.mediaTypes_.AUDIO.activePlaylistLoader&&this.audioSegmentLoader_.load(),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&this.subtitleSegmentLoader_.load()},t.smoothQualityChange_=function(e){void 0===e&&(e=this.selectPlaylist()),e!==this.masterPlaylistLoader_.media()&&(this.masterPlaylistLoader_.media(e),this.mainSegmentLoader_.resetLoader())},t.fastQualityChange_=function(e){var t=this;void 0===e&&(e=this.selectPlaylist()),e!==this.masterPlaylistLoader_.media()?(this.masterPlaylistLoader_.media(e),this.mainSegmentLoader_.resetEverything(function(){ga.browser.IE_VERSION||ga.browser.IS_EDGE?t.tech_.setCurrentTime(t.tech_.currentTime()+.04):t.tech_.setCurrentTime(t.tech_.currentTime())})):this.logger_(\"skipping fastQualityChange because new media is same as old\")},t.play=function(){if(!this.setupFirstPlay()){this.tech_.ended()&&this.tech_.setCurrentTime(0),this.hasPlayed_&&this.load();var e=this.tech_.seekable();return this.tech_.duration()===1/0&&this.tech_.currentTime()<e.start(0)?this.tech_.setCurrentTime(e.end(e.length-1)):void 0}},t.setupFirstPlay=function(){var e=this,t=this.masterPlaylistLoader_.media();if(!t||this.tech_.paused()||this.hasPlayed_)return!1;if(!t.endList){var i=this.seekable();if(!i.length)return!1;if(ga.browser.IE_VERSION&&0===this.tech_.readyState())return this.tech_.one(\"loadedmetadata\",function(){e.trigger(\"firstplay\"),e.tech_.setCurrentTime(i.end(0)),e.hasPlayed_=!0}),!1;this.trigger(\"firstplay\"),this.tech_.setCurrentTime(i.end(0))}return this.hasPlayed_=!0,this.load(),!0},t.handleSourceOpen_=function(){if(this.tryToCreateSourceBuffers_(),this.tech_.autoplay()){var e=this.tech_.play();\"undefined\"!=typeof e&&\"function\"==typeof e.then&&e.then(null,function(e){})}this.trigger(\"sourceopen\")},t.handleSourceEnded_=function(){if(this.inbandTextTracks_.metadataTrack_){var e=this.inbandTextTracks_.metadataTrack_.cues;if(e&&e.length){var t=this.duration();e[e.length-1].endTime=isNaN(t)||Math.abs(t)===1/0?Number.MAX_VALUE:t}}},t.handleDurationChange_=function(){this.tech_.trigger(\"durationchange\")},t.onEndOfStream=function(){var e=this.mainSegmentLoader_.ended_;this.mediaTypes_.AUDIO.activePlaylistLoader&&(e=!this.mainSegmentLoader_.currentMediaInfo_||this.mainSegmentLoader_.currentMediaInfo_.hasVideo?e&&this.audioSegmentLoader_.ended_:this.audioSegmentLoader_.ended_),e&&(this.stopABRTimer_(),this.sourceUpdater_.endOfStream())},t.stuckAtPlaylistEnd_=function(e){if(!this.seekable().length)return!1;var t=this.syncController_.getExpiredTime(e,this.duration());if(null===t)return!1;var i=Bd.Playlist.playlistEnd(e,t),n=this.tech_.currentTime(),r=this.tech_.buffered();if(!r.length)return i-n<=.1;var a=r.end(r.length-1);return a-n<=.1&&i-a<=.1},t.blacklistCurrentPlaylist=function(e,t){void 0===e&&(e={});var i=e.playlist||this.masterPlaylistLoader_.media();if(t=t||e.blacklistDuration||this.blacklistDuration,!i)return this.error=e,void(\"open\"!==this.mediaSource.readyState?this.trigger(\"error\"):this.sourceUpdater_.endOfStream(\"network\"));var n=this.masterPlaylistLoader_.master.playlists,r=n.filter(Ql),a=1===r.length&&r[0]===i;if(1===n.length&&t!==1/0)return ga.log.warn(\"Problem encountered with playlist \"+i.id+\". Trying again since it is the only playlist.\"),this.tech_.trigger(\"retryplaylist\"),this.masterPlaylistLoader_.load(a);if(a){var s=!1;n.forEach(function(e){if(e!==i){var t=e.excludeUntil;\"undefined\"!=typeof t&&t!==1/0&&(s=!0,delete e.excludeUntil)}}),s&&(ga.log.warn(\"Removing other playlists from the exclusion list because the last rendition is about to be excluded.\"),this.tech_.trigger(\"retryplaylist\"))}i.excludeUntil=Date.now()+1e3*t,e.reason&&(i.lastExcludeReason_=e.reason),this.tech_.trigger(\"blacklistplaylist\"),this.tech_.trigger({type:\"usage\",name:\"vhs-rendition-blacklisted\"}),this.tech_.trigger({type:\"usage\",name:\"hls-rendition-blacklisted\"});var o=this.selectPlaylist();if(!o)return this.error=\"Playback cannot continue. No available working or supported playlists.\",void this.trigger(\"error\");var u=e.internal?this.logger_:ga.log.warn,l=e.message?\" \"+e.message:\"\";u((e.internal?\"Internal problem\":\"Problem\")+\" encountered with playlist \"+i.id+\".\"+l+\" Switching to playlist \"+o.id+\".\"),o.attributes.AUDIO!==i.attributes.AUDIO&&this.delegateLoaders_(\"audio\",[\"abort\",\"pause\"]),o.attributes.SUBTITLES!==i.attributes.SUBTITLES&&this.delegateLoaders_(\"subtitle\",[\"abort\",\"pause\"]),this.delegateLoaders_(\"main\",[\"abort\",\"pause\"]);var c=o.targetDuration/2*1e3||5e3,d=\"number\"==typeof o.lastRequest&&Date.now()-o.lastRequest<=c;return this.masterPlaylistLoader_.media(o,a||d)},t.pauseLoading=function(){this.delegateLoaders_(\"all\",[\"abort\",\"pause\"]),this.stopABRTimer_()},t.delegateLoaders_=function(i,e){var n=this,r=[],t=\"all\"===i;!t&&\"main\"!==i||r.push(this.masterPlaylistLoader_);var a=[];!t&&\"audio\"!==i||a.push(\"AUDIO\"),!t&&\"subtitle\"!==i||(a.push(\"CLOSED-CAPTIONS\"),a.push(\"SUBTITLES\")),a.forEach(function(e){var t=n.mediaTypes_[e]&&n.mediaTypes_[e].activePlaylistLoader;t&&r.push(t)}),[\"main\",\"audio\",\"subtitle\"].forEach(function(e){var t=n[e+\"SegmentLoader_\"];!t||i!==e&&\"all\"!==i||r.push(t)}),r.forEach(function(t){return e.forEach(function(e){\"function\"==typeof t[e]&&t[e]()})})},t.setCurrentTime=function(e){var t=Bl(this.tech_.buffered(),e);return this.masterPlaylistLoader_&&this.masterPlaylistLoader_.media()&&this.masterPlaylistLoader_.media().segments?t&&t.length?e:(this.mainSegmentLoader_.resetEverything(),this.mainSegmentLoader_.abort(),this.mediaTypes_.AUDIO.activePlaylistLoader&&(this.audioSegmentLoader_.resetEverything(),this.audioSegmentLoader_.abort()),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&(this.subtitleSegmentLoader_.resetEverything(),this.subtitleSegmentLoader_.abort()),void this.load()):0},t.duration=function(){if(!this.masterPlaylistLoader_)return 0;var e=this.masterPlaylistLoader_.media();return e?e.endList?this.mediaSource?this.mediaSource.duration:Bd.Playlist.duration(e):1/0:0},t.seekable=function(){return this.seekable_},t.onSyncInfoUpdate_=function(){var e;if(this.masterPlaylistLoader_){var t=this.masterPlaylistLoader_.media();if(t){var i=this.syncController_.getExpiredTime(t,this.duration());if(null!==i){var n=this.masterPlaylistLoader_.master.suggestedPresentationDelay,r=Bd.Playlist.seekable(t,i,n);if(0!==r.length){if(this.mediaTypes_.AUDIO.activePlaylistLoader){if(t=this.mediaTypes_.AUDIO.activePlaylistLoader.media(),null===(i=this.syncController_.getExpiredTime(t,this.duration())))return;if(0===(e=Bd.Playlist.seekable(t,i,n)).length)return}var a,s;this.seekable_&&this.seekable_.length&&(a=this.seekable_.end(0),s=this.seekable_.start(0)),e?e.start(0)>r.end(0)||r.start(0)>e.end(0)?this.seekable_=r:this.seekable_=ga.createTimeRanges([[e.start(0)>r.start(0)?e.start(0):r.start(0),e.end(0)<r.end(0)?e.end(0):r.end(0)]]):this.seekable_=r,this.seekable_&&this.seekable_.length&&this.seekable_.end(0)===a&&this.seekable_.start(0)===s||(this.logger_(\"seekable updated [\"+jl(this.seekable_)+\"]\"),this.tech_.trigger(\"seekablechanged\"))}}}}},t.updateDuration=function(e){if(this.updateDuration_&&(this.mediaSource.removeEventListener(\"sourceopen\",this.updateDuration_),this.updateDuration_=null),\"open\"!==this.mediaSource.readyState)return this.updateDuration_=this.updateDuration.bind(this,e),void this.mediaSource.addEventListener(\"sourceopen\",this.updateDuration_);if(e){var t=this.seekable();if(!t.length)return;(isNaN(this.mediaSource.duration)||this.mediaSource.duration<t.end(t.length-1))&&this.sourceUpdater_.setDuration(t.end(t.length-1))}else{var i=this.tech_.buffered(),n=Bd.Playlist.duration(this.masterPlaylistLoader_.media());0<i.length&&(n=Math.max(n,i.end(i.length-1))),this.mediaSource.duration!==n&&this.sourceUpdater_.setDuration(n)}},t.dispose=function(){var n=this;this.trigger(\"dispose\"),this.decrypter_.terminate(),this.masterPlaylistLoader_.dispose(),this.mainSegmentLoader_.dispose(),this.loadOnPlay_&&this.tech_.off(\"play\",this.loadOnPlay_),[\"AUDIO\",\"SUBTITLES\"].forEach(function(e){var t=n.mediaTypes_[e].groups;for(var i in t)t[i].forEach(function(e){e.playlistLoader&&e.playlistLoader.dispose()})}),this.audioSegmentLoader_.dispose(),this.subtitleSegmentLoader_.dispose(),this.sourceUpdater_.dispose(),this.timelineChangeController_.dispose(),this.stopABRTimer_(),this.updateDuration_&&this.mediaSource.removeEventListener(\"sourceopen\",this.updateDuration_),this.mediaSource.removeEventListener(\"durationchange\",this.handleDurationChange_),this.mediaSource.removeEventListener(\"sourceopen\",this.handleSourceOpen_),this.mediaSource.removeEventListener(\"sourceended\",this.handleSourceEnded_),this.off()},t.master=function(){return this.masterPlaylistLoader_.master},t.media=function(){return this.masterPlaylistLoader_.media()||this.initialMedia_},t.areMediaTypesKnown_=function(){var e=!!this.mediaTypes_.AUDIO.activePlaylistLoader;return!(!this.mainSegmentLoader_.currentMediaInfo_||e&&!this.audioSegmentLoader_.currentMediaInfo_)},t.getCodecsOrExclude_=function(){var n=this,i={main:this.mainSegmentLoader_.currentMediaInfo_||{},audio:this.audioSegmentLoader_.currentMediaInfo_||{}};i.video=i.main;var e=Dc(this.master(),this.media()),r={},t=!!this.mediaTypes_.AUDIO.activePlaylistLoader;if(i.main.hasVideo&&(r.video=e.video||i.main.videoCodec||\"avc1.4d400d\"),i.main.isMuxed&&(r.video+=\",\"+(e.audio||i.main.audioCodec||Zc)),(i.main.hasAudio&&!i.main.isMuxed||i.audio.hasAudio||t)&&(r.audio=e.audio||i.main.audioCodec||i.audio.audioCodec||Zc,i.audio.isFmp4=i.main.hasAudio&&!i.main.isMuxed?i.main.isFmp4:i.audio.isFmp4),r.audio||r.video){var a,s={};if([\"video\",\"audio\"].forEach(function(e){if(r.hasOwnProperty(e)&&!function(e,t){return e?wl(t):El(t)}(i[e].isFmp4,r[e])){var t=i[e].isFmp4?\"browser\":\"muxer\";s[t]=s[t]||[],s[t].push(r[e]),\"audio\"===e&&(a=t)}}),t&&a&&this.media().attributes.AUDIO){var o=this.media().attributes.AUDIO;this.master().playlists.forEach(function(e){(e.attributes&&e.attributes.AUDIO)===o&&e!==n.media()&&(e.excludeUntil=1/0)}),this.logger_(\"excluding audio group \"+o+\" as \"+a+' does not support codec(s): \"'+r.audio+'\"')}if(!Object.keys(s).length){if(this.sourceUpdater_.hasCreatedSourceBuffers()&&!this.sourceUpdater_.canChangeType()){var u=[];if([\"video\",\"audio\"].forEach(function(e){var t=(Tl(n.sourceUpdater_.codecs[e]||\"\")[0]||{}).type,i=(Tl(r[e]||\"\")[0]||{}).type;t&&i&&t.toLowerCase()!==i.toLowerCase()&&u.push('\"'+n.sourceUpdater_.codecs[e]+'\" -> \"'+r[e]+'\"')}),u.length)return void this.blacklistCurrentPlaylist({playlist:this.media(),message:\"Codec switching not supported: \"+u.join(\", \")+\".\",blacklistDuration:1/0,internal:!0})}return r}var l=Object.keys(s).reduce(function(e,t){return e&&(e+=\", \"),e+=t+' does not support codec(s): \"'+s[t].join(\",\")+'\"'},\"\")+\".\";this.blacklistCurrentPlaylist({playlist:this.media(),internal:!0,message:l,blacklistDuration:1/0})}else this.blacklistCurrentPlaylist({playlist:this.media(),message:\"Could not determine codecs for playlist.\",blacklistDuration:1/0})},t.tryToCreateSourceBuffers_=function(){if(\"open\"===this.mediaSource.readyState&&!this.sourceUpdater_.hasCreatedSourceBuffers()&&this.areMediaTypesKnown_()){var e=this.getCodecsOrExclude_();if(e){this.sourceUpdater_.createSourceBuffers(e);var t=[e.video,e.audio].filter(Boolean).join(\",\");this.excludeIncompatibleVariants_(t)}}},t.excludeUnsupportedVariants_=function(){var r=this,a=this.master().playlists,s=[];Object.keys(a).forEach(function(e){var t=a[e];if(-1===s.indexOf(t.id)){s.push(t.id);var i=Dc(r.master,t),n=[];!i.audio||El(i.audio)||wl(i.audio)||n.push(\"audio codec \"+i.audio),!i.video||El(i.video)||wl(i.video)||n.push(\"video codec \"+i.video),i.text&&\"stpp.ttml.im1t\"===i.text&&n.push(\"text codec \"+i.text),n.length&&(t.excludeUntil=1/0,r.logger_(\"excluding \"+t.id+\" for unsupported: \"+n.join(\", \")))}})},t.excludeIncompatibleVariants_=function(e){var o=this,u=[],l=this.master().playlists,t=Lc(Tl(e)),c=Oc(t),d=t.video&&Tl(t.video)[0]||null,h=t.audio&&Tl(t.audio)[0]||null;Object.keys(l).forEach(function(e){var t=l[e];if(-1===u.indexOf(t.id)&&t.excludeUntil!==1/0){u.push(t.id);var i=[],n=Dc(o.masterPlaylistLoader_.master,t),r=Oc(n);if(n.audio||n.video){if(r!==c&&i.push('codec count \"'+r+'\" !== \"'+c+'\"'),!o.sourceUpdater_.canChangeType()){var a=n.video&&Tl(n.video)[0]||null,s=n.audio&&Tl(n.audio)[0]||null;a&&d&&a.type.toLowerCase()!==d.type.toLowerCase()&&i.push('video codec \"'+a.type+'\" !== \"'+d.type+'\"'),s&&h&&s.type.toLowerCase()!==h.type.toLowerCase()&&i.push('audio codec \"'+s.type+'\" !== \"'+h.type+'\"')}i.length&&(t.excludeUntil=1/0,o.logger_(\"blacklisting \"+t.id+\": \"+i.join(\" && \")))}}})},t.updateAdCues_=function(e){var t=0,i=this.seekable();i.length&&(t=i.start(0)),function(e,t,i){if(void 0===i&&(i=0),e.segments)for(var n,r=i,a=0;a<e.segments.length;a++){var s=e.segments[a];if(n=n||Od(t,r+s.duration/2)){if(\"cueIn\"in s){n.endTime=r,n.adEndTime=r,r+=s.duration,n=null;continue}if(r<n.endTime){r+=s.duration;continue}n.endTime+=s.duration}else if(\"cueOut\"in s&&((n=new Ea.VTTCue(r,r+s.duration,s.cueOut)).adStartTime=r,n.adEndTime=r+parseFloat(s.cueOut),t.addCue(n)),\"cueOutCont\"in s){var o=s.cueOutCont.split(\"/\").map(parseFloat),u=o[0],l=o[1];(n=new Ea.VTTCue(r,r+s.duration,\"\")).adStartTime=r-u,n.adEndTime=n.adStartTime+l,t.addCue(n)}r+=s.duration}}(e,this.cueTagsTrack_,t)},t.goalBufferLength=function(){var e=this.tech_.currentTime(),t=hd.GOAL_BUFFER_LENGTH,i=hd.GOAL_BUFFER_LENGTH_RATE,n=Math.max(t,hd.MAX_GOAL_BUFFER_LENGTH);return Math.min(t+e*i,n)},t.bufferLowWaterLine=function(){var e=this.tech_.currentTime(),t=hd.BUFFER_LOW_WATER_LINE,i=hd.BUFFER_LOW_WATER_LINE_RATE,n=Math.max(t,hd.MAX_BUFFER_LOW_WATER_LINE),r=Math.max(t,hd.EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE);return Math.min(t+e*i,this.experimentalBufferBasedABR?r:n)},t.bufferHighWaterLine=function(){return hd.BUFFER_HIGH_WATER_LINE},e}(ga.EventTarget),lh=[\"seeking\",\"seeked\",\"pause\",\"playing\",\"error\"],ch=function(){function e(e){var t=this;this.masterPlaylistController_=e.masterPlaylistController,this.tech_=e.tech,this.seekable=e.seekable,this.allowSeeksWithinUnsafeLiveWindow=e.allowSeeksWithinUnsafeLiveWindow,this.liveRangeSafeTimeDelta=e.liveRangeSafeTimeDelta,this.media=e.media,this.consecutiveUpdates=0,this.lastRecordedTime=null,this.timer_=null,this.checkCurrentTimeTimeout_=null,this.logger_=Il(\"PlaybackWatcher\"),this.logger_(\"initialize\");function i(){return t.monitorCurrentTime_()}function n(){return t.monitorCurrentTime_()}function r(){return t.techWaiting_()}function a(){return t.cancelTimer_()}function s(){return t.fixesBadSeeks_()}var o=this.masterPlaylistController_,u=[\"main\",\"subtitle\",\"audio\"],l={};u.forEach(function(e){l[e]={reset:function(){return t.resetSegmentDownloads_(e)},updateend:function(){return t.checkSegmentDownloads_(e)}},o[e+\"SegmentLoader_\"].on(\"appendsdone\",l[e].updateend),o[e+\"SegmentLoader_\"].on(\"playlistupdate\",l[e].reset),t.tech_.on([\"seeked\",\"seeking\"],l[e].reset)}),this.tech_.on(\"seekablechanged\",s),this.tech_.on(\"waiting\",r),this.tech_.on(lh,a),this.tech_.on(\"canplay\",n),this.tech_.one(\"play\",i),this.dispose=function(){t.logger_(\"dispose\"),t.tech_.off(\"seekablechanged\",s),t.tech_.off(\"waiting\",r),t.tech_.off(lh,a),t.tech_.off(\"canplay\",n),t.tech_.off(\"play\",i),u.forEach(function(e){o[e+\"SegmentLoader_\"].off(\"appendsdone\",l[e].updateend),o[e+\"SegmentLoader_\"].off(\"playlistupdate\",l[e].reset),t.tech_.off([\"seeked\",\"seeking\"],l[e].reset)}),t.checkCurrentTimeTimeout_&&Ea.clearTimeout(t.checkCurrentTimeTimeout_),t.cancelTimer_()}}var t=e.prototype;return t.monitorCurrentTime_=function(){this.checkCurrentTime_(),this.checkCurrentTimeTimeout_&&Ea.clearTimeout(this.checkCurrentTimeTimeout_),this.checkCurrentTimeTimeout_=Ea.setTimeout(this.monitorCurrentTime_.bind(this),250)},t.resetSegmentDownloads_=function(e){var t=this.masterPlaylistController_[e+\"SegmentLoader_\"];0<this[e+\"StalledDownloads_\"]&&this.logger_(\"resetting possible stalled download count for \"+e+\" loader\"),this[e+\"StalledDownloads_\"]=0,this[e+\"Buffered_\"]=t.buffered_()},t.checkSegmentDownloads_=function(e){var t=this.masterPlaylistController_,i=t[e+\"SegmentLoader_\"],n=i.buffered_(),r=function(e,t){if(e===t)return!1;if(!e&&t||!t&&e)return!0;if(e.length!==t.length)return!0;for(var i=0;i<e.length;i++)if(e.start(i)!==t.start(i)||e.end(i)!==t.end(i))return!0;return!1}(this[e+\"Buffered_\"],n);this[e+\"Buffered_\"]=n,r?this.resetSegmentDownloads_(e):(this[e+\"StalledDownloads_\"]++,this.logger_(\"found #\"+this[e+\"StalledDownloads_\"]+\" \"+e+\" appends that did not increase buffer (possible stalled download)\",{playlistId:i.playlist_&&i.playlist_.id,buffered:Vl(n)}),this[e+\"StalledDownloads_\"]<10||(this.logger_(e+\" loader stalled download exclusion\"),this.resetSegmentDownloads_(e),this.tech_.trigger({type:\"usage\",name:\"vhs-\"+e+\"-download-exclusion\"}),\"subtitle\"!==e&&t.blacklistCurrentPlaylist({message:\"Excessive \"+e+\" segment downloading detected.\"},1/0)))},t.checkCurrentTime_=function(){if(this.tech_.seeking()&&this.fixesBadSeeks_())return this.consecutiveUpdates=0,void(this.lastRecordedTime=this.tech_.currentTime());if(!this.tech_.paused()&&!this.tech_.seeking()){var e=this.tech_.currentTime(),t=this.tech_.buffered();if(this.lastRecordedTime===e&&(!t.length||e+.1>=t.end(t.length-1)))return this.techWaiting_();5<=this.consecutiveUpdates&&e===this.lastRecordedTime?(this.consecutiveUpdates++,this.waiting_()):e===this.lastRecordedTime?this.consecutiveUpdates++:(this.consecutiveUpdates=0,this.lastRecordedTime=e)}},t.cancelTimer_=function(){this.consecutiveUpdates=0,this.timer_&&(this.logger_(\"cancelTimer_\"),clearTimeout(this.timer_)),this.timer_=null},t.fixesBadSeeks_=function(){if(!this.tech_.seeking())return!1;var e,t=this.seekable(),i=this.tech_.currentTime();this.afterSeekableWindow_(t,i,this.media(),this.allowSeeksWithinUnsafeLiveWindow)&&(e=t.end(t.length-1));if(this.beforeSeekableWindow_(t,i)){var n=t.start(0);e=n+(n===t.end(0)?0:.1)}if(\"undefined\"!=typeof e)return this.logger_(\"Trying to seek outside of seekable at time \"+i+\" with seekable range \"+jl(t)+\". Seeking to \"+e+\".\"),this.tech_.setCurrentTime(e),!0;var r=this.tech_.buffered();return!!function(e){var t=e.buffered,i=e.targetDuration,n=e.currentTime;return!!t.length&&(!(t.end(0)-t.start(0)<2*i)&&(!(n>t.start(0))&&t.start(0)-n<i))}({buffered:r,targetDuration:this.media().targetDuration,currentTime:i})&&(e=r.start(0)+.1,this.logger_(\"Buffered region starts (\"+r.start(0)+\")  just beyond seek point (\"+i+\"). Seeking to \"+e+\".\"),this.tech_.setCurrentTime(e),!0)},t.waiting_=function(){if(!this.techWaiting_()){var e=this.tech_.currentTime(),t=this.tech_.buffered(),i=Bl(t,e);return i.length&&e+3<=i.end(0)?(this.cancelTimer_(),this.tech_.setCurrentTime(e),this.logger_(\"Stopped at \"+e+\" while inside a buffered region [\"+i.start(0)+\" -> \"+i.end(0)+\"]. Attempting to resume playback by seeking to the current time.\"),this.tech_.trigger({type:\"usage\",name:\"vhs-unknown-waiting\"}),void this.tech_.trigger({type:\"usage\",name:\"hls-unknown-waiting\"})):void 0}},t.techWaiting_=function(){var e=this.seekable(),t=this.tech_.currentTime();if(this.tech_.seeking()&&this.fixesBadSeeks_())return!0;if(this.tech_.seeking()||null!==this.timer_)return!0;if(this.beforeSeekableWindow_(e,t)){var i=e.end(e.length-1);return this.logger_(\"Fell out of live window at time \"+t+\". Seeking to live point (seekable end) \"+i),this.cancelTimer_(),this.tech_.setCurrentTime(i),this.tech_.trigger({type:\"usage\",name:\"vhs-live-resync\"}),this.tech_.trigger({type:\"usage\",name:\"hls-live-resync\"}),!0}var n=this.tech_.vhs.masterPlaylistController_.sourceUpdater_,r=this.tech_.buffered();if(this.videoUnderflow_({audioBuffered:n.audioBuffered(),videoBuffered:n.videoBuffered(),currentTime:t}))return this.cancelTimer_(),this.tech_.setCurrentTime(t),this.tech_.trigger({type:\"usage\",name:\"vhs-video-underflow\"}),this.tech_.trigger({type:\"usage\",name:\"hls-video-underflow\"}),!0;var a=Fl(r,t);if(0<a.length){var s=a.start(0)-t;return this.logger_(\"Stopped at \"+t+\", setting timer for \"+s+\", seeking to \"+a.start(0)),this.cancelTimer_(),this.timer_=setTimeout(this.skipTheGap_.bind(this),1e3*s,t),!0}return!1},t.afterSeekableWindow_=function(e,t,i,n){if(void 0===n&&(n=!1),!e.length)return!1;var r=e.end(e.length-1)+.1;return!i.endList&&n&&(r=e.end(e.length-1)+3*i.targetDuration),r<t},t.beforeSeekableWindow_=function(e,t){return!!(e.length&&0<e.start(0)&&t<e.start(0)-this.liveRangeSafeTimeDelta)},t.videoUnderflow_=function(e){var t=e.videoBuffered,i=e.audioBuffered,n=e.currentTime;if(t){var r;if(t.length&&i.length){var a=Bl(t,n-3),s=Bl(t,n),o=Bl(i,n);o.length&&!s.length&&a.length&&(r={start:a.end(0),end:o.end(0)})}else{Fl(t,n).length||(r=this.gapFromVideoUnderflow_(t,n))}return!!r&&(this.logger_(\"Encountered a gap in video from \"+r.start+\" to \"+r.end+\". Seeking to current time \"+n),!0)}},t.skipTheGap_=function(e){var t=this.tech_.buffered(),i=this.tech_.currentTime(),n=Fl(t,i);this.cancelTimer_(),0!==n.length&&i===e&&(this.logger_(\"skipTheGap_:\",\"currentTime:\",i,\"scheduled currentTime:\",e,\"nextRange start:\",n.start(0)),this.tech_.setCurrentTime(n.start(0)+rd),this.tech_.trigger({type:\"usage\",name:\"vhs-gap-skip\"}),this.tech_.trigger({type:\"usage\",name:\"hls-gap-skip\"}))},t.gapFromVideoUnderflow_=function(e,t){for(var i=function(e){if(e.length<2)return ga.createTimeRanges();for(var t=[],i=1;i<e.length;i++){var n=e.end(i-1),r=e.start(i);t.push([n,r])}return ga.createTimeRanges(t)}(e),n=0;n<i.length;n++){var r=i.start(n),a=i.end(n);if(t-r<4&&2<t-r)return{start:r,end:a}}return null},e}(),dh={errorInterval:30,getSource:function(e){return e(this.tech({IWillNotUseThisInPlugins:!0}).currentSource_||this.currentSource())}},hh={PlaylistLoader:nd,Playlist:sd,utils:ld,STANDARD_PLAYLIST_SELECTOR:Fc,INITIAL_PLAYLIST_SELECTOR:function(){var t=this,e=this.playlists.master.playlists.filter(sd.isEnabled);return Nc(e,function(e,t){return Uc(e,t)}),e.filter(function(e){return!!Dc(t.playlists.master,e).video})[0]||null},lastBandwidthSelector:Fc,movingAverageBandwidthSelector:function(t){var i=-1;if(t<0||1<t)throw new Error(\"Moving average bandwidth decay must be between 0 and 1.\");return function(){var e=this.useDevicePixelRatio&&Ea.devicePixelRatio||1;return i<0&&(i=this.systemBandwidth),i=t*this.systemBandwidth+(1-t)*i,Bc(this.playlists.master,i,parseInt(Mc(this.tech_.el(),\"width\"),10)*e,parseInt(Mc(this.tech_.el(),\"height\"),10)*e,this.limitRenditionByPlayerDimensions)}},comparePlaylistBandwidth:Uc,comparePlaylistResolution:function(e,t){var i,n;return e.attributes.RESOLUTION&&e.attributes.RESOLUTION.width&&(i=e.attributes.RESOLUTION.width),i=i||Ea.Number.MAX_VALUE,t.attributes.RESOLUTION&&t.attributes.RESOLUTION.width&&(n=t.attributes.RESOLUTION.width),i===(n=n||Ea.Number.MAX_VALUE)&&e.attributes.BANDWIDTH&&t.attributes.BANDWIDTH?e.attributes.BANDWIDTH-t.attributes.BANDWIDTH:i-n},xhr:Zl()};Object.keys(hd).forEach(function(t){Object.defineProperty(hh,t,{get:function(){return ga.log.warn(\"using Vhs.\"+t+\" is UNSAFE be sure you know what you are doing\"),hd[t]},set:function(e){ga.log.warn(\"using Vhs.\"+t+\" is UNSAFE be sure you know what you are doing\"),\"number\"!=typeof e||e<0?ga.log.warn(\"value of Vhs.\"+t+\" must be greater than or equal to 0\"):hd[t]=e}})});function ph(e,t){for(var i=t.media(),n=-1,r=0;r<e.length;r++)if(e[r].id===i.id){n=r;break}e.selectedIndex_=n,e.trigger({selectedIndex:n,type:\"change\"})}var fh=\"videojs-vhs\";hh.canPlaySource=function(){return ga.log.warn(\"HLS is no longer a tech. Please remove it from your player's techOrder.\")};function mh(e,t,i){if(!e)return e;var n={video:t&&t.attributes&&t.attributes.CODECS,audio:i&&i.attributes&&i.attributes.CODECS};!n.audio&&n.video&&1<n.video.split(\",\").length&&n.video.split(\",\").forEach(function(e){e=e.trim(),Sl(e)?n.audio=e:function(e){return void 0===e&&(e=\"\"),Yc.video.test(e.trim().toLowerCase())}(e)&&(n.video=e)});var r=n.video?'video/mp4;codecs=\"'+n.video+'\"':null,a=n.audio?'audio/mp4;codecs=\"'+n.audio+'\"':null,s={};for(var o in e)s[o]={audioContentType:a,videoContentType:r},t.contentProtection&&t.contentProtection[o]&&t.contentProtection[o].pssh&&(s[o].pssh=t.contentProtection[o].pssh),\"string\"==typeof e[o]&&(s[o].url=e[o]);return ga.mergeOptions(e,s)}function gh(e){var n=e.player,t=e.sourceKeySystems,i=e.audioMedia,r=e.mainPlaylists;if(!n.eme.initializeMediaKeys)return Promise.resolve();var a=function(e,i){return e.reduce(function(e,n){if(!n.contentProtection)return e;var t=i.reduce(function(e,t){var i=n.contentProtection[t];return i&&i.pssh&&(e[t]={pssh:i.pssh}),e},{});return Object.keys(t).length&&e.push(t),e},[])}(i?r.concat([i]):r,Object.keys(t)),s=[],o=[];return a.forEach(function(e){o.push(new Promise(function(e,t){n.tech_.one(\"keysessioncreated\",e)})),s.push(new Promise(function(t,i){n.eme.initializeMediaKeys({keySystems:e},function(e){e?i(e):t()})}))}),Promise.race([Promise.all(s),Promise.race(o)])}function vh(){if(!Ea.localStorage)return null;var e=Ea.localStorage.getItem(fh);if(!e)return null;try{return JSON.parse(e)}catch(e){return null}}hh.supportsNativeHls=function(){if(!wa||!wa.createElement)return!1;var t=wa.createElement(\"video\");if(!ga.getTech(\"Html5\").isSupported())return!1;return[\"application/vnd.apple.mpegurl\",\"audio/mpegurl\",\"audio/x-mpegurl\",\"application/x-mpegurl\",\"video/x-mpegurl\",\"video/mpegurl\",\"application/mpegurl\"].some(function(e){return/maybe|probably/i.test(t.canPlayType(e))})}(),hh.supportsNativeDash=!!(wa&&wa.createElement&&ga.getTech(\"Html5\").isSupported())&&/maybe|probably/i.test(wa.createElement(\"video\").canPlayType(\"application/dash+xml\")),hh.supportsTypeNatively=function(e){return\"hls\"===e?hh.supportsNativeHls:\"dash\"===e&&hh.supportsNativeDash},hh.isSupported=function(){return ga.log.warn(\"HLS is no longer a tech. Please remove it from your player's techOrder.\")};var yh=function(a){function e(e,t,i){var n;if(n=a.call(this,t,ga.mergeOptions(i.hls,i.vhs))||this,i.hls&&Object.keys(i.hls).length&&ga.log.warn(\"Using hls options is deprecated. Use vhs instead.\"),n.logger_=Il(\"VhsHandler\"),t.options_&&t.options_.playerId){var r=ga(t.options_.playerId);r.hasOwnProperty(\"hls\")||Object.defineProperty(r,\"hls\",{get:function(){return ga.log.warn(\"player.hls is deprecated. Use player.tech().vhs instead.\"),t.trigger({type:\"usage\",name:\"hls-player-access\"}),_a(n)},configurable:!0}),r.hasOwnProperty(\"vhs\")||Object.defineProperty(r,\"vhs\",{get:function(){return ga.log.warn(\"player.vhs is deprecated. Use player.tech().vhs instead.\"),t.trigger({type:\"usage\",name:\"vhs-player-access\"}),_a(n)},configurable:!0}),r.hasOwnProperty(\"dash\")||Object.defineProperty(r,\"dash\",{get:function(){return ga.log.warn(\"player.dash is deprecated. Use player.tech().vhs instead.\"),_a(n)},configurable:!0}),n.player_=r}if(n.tech_=t,n.source_=e,n.stats={},n.ignoreNextSeekingEvent_=!1,n.setOptions_(),n.options_.overrideNative&&t.overrideNativeAudioTracks&&t.overrideNativeVideoTracks)t.overrideNativeAudioTracks(!0),t.overrideNativeVideoTracks(!0);else if(n.options_.overrideNative&&(t.featuresNativeVideoTracks||t.featuresNativeAudioTracks))throw new Error(\"Overriding native HLS requires emulated tracks. See https://git.io/vMpjB\");return n.on(wa,[\"fullscreenchange\",\"webkitfullscreenchange\",\"mozfullscreenchange\",\"MSFullscreenChange\"],function(e){var t=wa.fullscreenElement||wa.webkitFullscreenElement||wa.mozFullScreenElement||wa.msFullscreenElement;t&&t.contains(n.tech_.el())&&n.masterPlaylistController_.smoothQualityChange_()}),n.on(n.tech_,\"seeking\",function(){this.ignoreNextSeekingEvent_?this.ignoreNextSeekingEvent_=!1:this.setCurrentTime(this.tech_.currentTime())}),n.on(n.tech_,\"error\",function(){this.tech_.error()&&this.masterPlaylistController_&&this.masterPlaylistController_.pauseLoading()}),n.on(n.tech_,\"play\",n.play),n}Sa(e,a);var t=e.prototype;return t.setOptions_=function(){var t=this;if(this.options_.withCredentials=this.options_.withCredentials||!1,this.options_.handleManifestRedirects=!1!==this.options_.handleManifestRedirects,this.options_.limitRenditionByPlayerDimensions=!1!==this.options_.limitRenditionByPlayerDimensions,this.options_.useDevicePixelRatio=this.options_.useDevicePixelRatio||!1,this.options_.smoothQualityChange=this.options_.smoothQualityChange||!1,this.options_.useBandwidthFromLocalStorage=\"undefined\"!=typeof this.source_.useBandwidthFromLocalStorage?this.source_.useBandwidthFromLocalStorage:this.options_.useBandwidthFromLocalStorage||!1,this.options_.customTagParsers=this.options_.customTagParsers||[],this.options_.customTagMappers=this.options_.customTagMappers||[],this.options_.cacheEncryptionKeys=this.options_.cacheEncryptionKeys||!1,this.options_.handlePartialData=this.options_.handlePartialData||!1,\"number\"!=typeof this.options_.blacklistDuration&&(this.options_.blacklistDuration=300),\"number\"!=typeof this.options_.bandwidth&&this.options_.useBandwidthFromLocalStorage){var e=vh();e&&e.bandwidth&&(this.options_.bandwidth=e.bandwidth,this.tech_.trigger({type:\"usage\",name:\"vhs-bandwidth-from-local-storage\"}),this.tech_.trigger({type:\"usage\",name:\"hls-bandwidth-from-local-storage\"})),e&&e.throughput&&(this.options_.throughput=e.throughput,this.tech_.trigger({type:\"usage\",name:\"vhs-throughput-from-local-storage\"}),this.tech_.trigger({type:\"usage\",name:\"hls-throughput-from-local-storage\"}))}\"number\"!=typeof this.options_.bandwidth&&(this.options_.bandwidth=hd.INITIAL_BANDWIDTH),this.options_.enableLowInitialPlaylist=this.options_.enableLowInitialPlaylist&&this.options_.bandwidth===hd.INITIAL_BANDWIDTH,[\"withCredentials\",\"useDevicePixelRatio\",\"limitRenditionByPlayerDimensions\",\"bandwidth\",\"smoothQualityChange\",\"customTagParsers\",\"customTagMappers\",\"handleManifestRedirects\",\"cacheEncryptionKeys\",\"handlePartialData\",\"playlistSelector\",\"initialPlaylistSelector\",\"experimentalBufferBasedABR\",\"liveRangeSafeTimeDelta\"].forEach(function(e){\"undefined\"!=typeof t.source_[e]&&(t.options_[e]=t.source_[e])}),this.limitRenditionByPlayerDimensions=this.options_.limitRenditionByPlayerDimensions,this.useDevicePixelRatio=this.options_.useDevicePixelRatio},t.src=function(e,t){var i=this;if(e){this.setOptions_(),this.options_.src=function(e){return 0===e.toLowerCase().indexOf(\"data:application/vnd.videojs.vhs+json,\")?JSON.parse(e.substring(e.indexOf(\",\")+1)):e}(this.source_.src),this.options_.tech=this.tech_,this.options_.externVhs=hh,this.options_.sourceType=Na(t),this.options_.seekTo=function(e){i.tech_.setCurrentTime(e)},this.masterPlaylistController_=new uh(this.options_);var n=ga.mergeOptions({liveRangeSafeTimeDelta:.1},this.options_,{seekable:function(){return i.seekable()},media:function(){return i.masterPlaylistController_.media()},masterPlaylistController:this.masterPlaylistController_});this.playbackWatcher_=new ch(n),this.masterPlaylistController_.on(\"error\",function(){var e=ga.players[i.tech_.options_.playerId],t=i.masterPlaylistController_.error;\"object\"!=typeof t||t.code?\"string\"==typeof t&&(t={message:t,code:3}):t.code=3,e.error(t)});var r=this.options_.experimentalBufferBasedABR?hh.movingAverageBandwidthSelector(.55):hh.STANDARD_PLAYLIST_SELECTOR;this.masterPlaylistController_.selectPlaylist=this.selectPlaylist?this.selectPlaylist.bind(this):r.bind(this),this.masterPlaylistController_.selectInitialPlaylist=hh.INITIAL_PLAYLIST_SELECTOR.bind(this),this.playlists=this.masterPlaylistController_.masterPlaylistLoader_,this.mediaSource=this.masterPlaylistController_.mediaSource,Object.defineProperties(this,{selectPlaylist:{get:function(){return this.masterPlaylistController_.selectPlaylist},set:function(e){this.masterPlaylistController_.selectPlaylist=e.bind(this)}},throughput:{get:function(){return this.masterPlaylistController_.mainSegmentLoader_.throughput.rate},set:function(e){this.masterPlaylistController_.mainSegmentLoader_.throughput.rate=e,this.masterPlaylistController_.mainSegmentLoader_.throughput.count=1}},bandwidth:{get:function(){return this.masterPlaylistController_.mainSegmentLoader_.bandwidth},set:function(e){this.masterPlaylistController_.mainSegmentLoader_.bandwidth=e,this.masterPlaylistController_.mainSegmentLoader_.throughput={rate:0,count:0}}},systemBandwidth:{get:function(){var e,t=1/(this.bandwidth||1);return e=0<this.throughput?1/this.throughput:0,Math.floor(1/(t+e))},set:function(){ga.log.error('The \"systemBandwidth\" property is read-only')}}}),this.options_.bandwidth&&(this.bandwidth=this.options_.bandwidth),this.options_.throughput&&(this.throughput=this.options_.throughput),Object.defineProperties(this.stats,{bandwidth:{get:function(){return i.bandwidth||0},enumerable:!0},mediaRequests:{get:function(){return i.masterPlaylistController_.mediaRequests_()||0},enumerable:!0},mediaRequestsAborted:{get:function(){return i.masterPlaylistController_.mediaRequestsAborted_()||0},enumerable:!0},mediaRequestsTimedout:{get:function(){return i.masterPlaylistController_.mediaRequestsTimedout_()||0},enumerable:!0},mediaRequestsErrored:{get:function(){return i.masterPlaylistController_.mediaRequestsErrored_()||0},enumerable:!0},mediaTransferDuration:{get:function(){return i.masterPlaylistController_.mediaTransferDuration_()||0},enumerable:!0},mediaBytesTransferred:{get:function(){return i.masterPlaylistController_.mediaBytesTransferred_()||0},enumerable:!0},mediaSecondsLoaded:{get:function(){return i.masterPlaylistController_.mediaSecondsLoaded_()||0},enumerable:!0},buffered:{get:function(){return Vl(i.tech_.buffered())},enumerable:!0},currentTime:{get:function(){return i.tech_.currentTime()},enumerable:!0},currentSource:{get:function(){return i.tech_.currentSource_},enumerable:!0},currentTech:{get:function(){return i.tech_.name_},enumerable:!0},duration:{get:function(){return i.tech_.duration()},enumerable:!0},master:{get:function(){return i.playlists.master},enumerable:!0},playerDimensions:{get:function(){return i.tech_.currentDimensions()},enumerable:!0},seekable:{get:function(){return Vl(i.tech_.seekable())},enumerable:!0},timestamp:{get:function(){return Date.now()},enumerable:!0},videoPlaybackQuality:{get:function(){return i.tech_.getVideoPlaybackQuality()},enumerable:!0}}),this.tech_.one(\"canplay\",this.masterPlaylistController_.setupFirstPlay.bind(this.masterPlaylistController_)),this.tech_.on(\"bandwidthupdate\",function(){i.options_.useBandwidthFromLocalStorage&&function(e){if(!Ea.localStorage)return;var t=vh();t=t?ga.mergeOptions(t,e):e;try{Ea.localStorage.setItem(fh,JSON.stringify(t))}catch(e){return}}({bandwidth:i.bandwidth,throughput:Math.round(i.throughput)})}),this.masterPlaylistController_.on(\"selectedinitialmedia\",function(){!function(i){var e=i.playlists;i.representations=function(){return e&&e.master&&e.master.playlists?e.master.playlists.filter(function(e){return!Kl(e)}).map(function(e,t){return new Nd(i,e,e.id)}):[]}}(i)}),this.masterPlaylistController_.sourceUpdater_.on(\"createdsourcebuffers\",function(){i.setupEme_()}),this.on(this.masterPlaylistController_,\"progress\",function(){this.tech_.trigger(\"progress\")}),this.on(this.masterPlaylistController_,\"firstplay\",function(){this.ignoreNextSeekingEvent_=!0}),this.setupQualityLevels_(),this.tech_.el()&&(this.mediaSourceUrl_=Ea.URL.createObjectURL(this.masterPlaylistController_.mediaSource),this.tech_.src(this.mediaSourceUrl_))}},t.setupEme_=function(){var t=this,e=this.masterPlaylistController_.mediaTypes_.AUDIO.activePlaylistLoader,i=function(e){var t=e.player,i=e.sourceKeySystems,n=e.media,r=e.audioMedia,a=mh(i,n,r);return!!a&&(!((t.currentSource().keySystems=a)&&!t.eme)||(ga.log.warn(\"DRM encrypted source cannot be decrypted without a DRM plugin\"),!1))}({player:this.player_,sourceKeySystems:this.source_.keySystems,media:this.playlists.media(),audioMedia:e&&e.media()});11!==ga.browser.IE_VERSION&&i?(this.logger_(\"waiting for EME key session creation\"),gh({player:this.player_,sourceKeySystems:this.source_.keySystems,audioMedia:e&&e.media(),mainPlaylists:this.playlists.master.playlists}).then(function(){t.logger_(\"created EME key session\"),t.masterPlaylistController_.sourceUpdater_.initializedEme()}).catch(function(e){t.logger_(\"error while creating EME key session\",e),t.player_.error({message:\"Failed to initialize media keys for EME\",code:3})})):this.masterPlaylistController_.sourceUpdater_.initializedEme()},t.setupQualityLevels_=function(){var e=this,t=ga.players[this.tech_.options_.playerId];t&&t.qualityLevels&&!this.qualityLevels_&&(this.qualityLevels_=t.qualityLevels(),this.masterPlaylistController_.on(\"selectedinitialmedia\",function(){!function(t,e){e.representations().forEach(function(e){t.addQualityLevel(e)}),ph(t,e.playlists)}(e.qualityLevels_,e)}),this.playlists.on(\"mediachange\",function(){ph(e.qualityLevels_,e.playlists)}))},e.version=function(){return{\"@videojs/http-streaming\":\"2.6.4\",\"mux.js\":\"5.10.0\",\"mpd-parser\":\"0.15.4\",\"m3u8-parser\":\"4.5.2\",\"aes-decrypter\":\"3.1.2\"}},t.version=function(){return this.constructor.version()},t.canChangeType=function(){return Yd.canChangeType()},t.play=function(){this.masterPlaylistController_.play()},t.setCurrentTime=function(e){this.masterPlaylistController_.setCurrentTime(e)},t.duration=function(){return this.masterPlaylistController_.duration()},t.seekable=function(){return this.masterPlaylistController_.seekable()},t.dispose=function(){this.playbackWatcher_&&this.playbackWatcher_.dispose(),this.masterPlaylistController_&&this.masterPlaylistController_.dispose(),this.qualityLevels_&&this.qualityLevels_.dispose(),this.player_&&(delete this.player_.vhs,delete this.player_.dash,delete this.player_.hls),this.tech_&&this.tech_.vhs&&delete this.tech_.vhs,this.tech_&&delete this.tech_.hls,this.mediaSourceUrl_&&Ea.URL.revokeObjectURL&&(Ea.URL.revokeObjectURL(this.mediaSourceUrl_),this.mediaSourceUrl_=null),a.prototype.dispose.call(this)},t.convertToProgramTime=function(e,t){return oc({playlist:this.masterPlaylistController_.media(),time:e,callback:t})},t.seekToProgramTime=function(e,t,i,n){return void 0===i&&(i=!0),void 0===n&&(n=2),uc({programTime:e,playlist:this.masterPlaylistController_.media(),retryCount:n,pauseAfterSeek:i,seekTo:this.options_.seekTo,tech:this.options_.tech,callback:t})},e}(ga.getComponent(\"Component\")),_h={name:\"videojs-http-streaming\",VERSION:\"2.6.4\",canHandleSource:function(e,t){void 0===t&&(t={});var i=ga.mergeOptions(ga.options,t);return _h.canPlayType(e.type,i)},handleSource:function(e,t,i){void 0===i&&(i={});var n=ga.mergeOptions(ga.options,i);return t.vhs=new yh(e,t,n),ga.hasOwnProperty(\"hls\")||Object.defineProperty(t,\"hls\",{get:function(){return ga.log.warn(\"player.tech().hls is deprecated. Use player.tech().vhs instead.\"),t.vhs},configurable:!0}),t.vhs.xhr=Zl(),t.vhs.src(e.src,e.type),t.vhs},canPlayType:function(e,t){void 0===t&&(t={});var i=ga.mergeOptions(ga.options,t).vhs.overrideNative,n=void 0===i?!ga.browser.IS_ANY_SAFARI:i,r=Na(e);return r&&(!hh.supportsTypeNatively(r)||n)?\"maybe\":\"\"}};return wl(\"avc1.4d400d,mp4a.40.2\")&&ga.getTech(\"Html5\").registerSourceHandler(_h,0),ga.VhsHandler=yh,Object.defineProperty(ga,\"HlsHandler\",{get:function(){return ga.log.warn(\"videojs.HlsHandler is deprecated. Use videojs.VhsHandler instead.\"),yh},configurable:!0}),ga.VhsSourceHandler=_h,Object.defineProperty(ga,\"HlsSourceHandler\",{get:function(){return ga.log.warn(\"videojs.HlsSourceHandler is deprecated. Use videojs.VhsSourceHandler instead.\"),_h},configurable:!0}),ga.Vhs=hh,Object.defineProperty(ga,\"Hls\",{get:function(){return ga.log.warn(\"videojs.Hls is deprecated. Use videojs.Vhs instead.\"),hh},configurable:!0}),ga.use||(ga.registerComponent(\"Hls\",hh),ga.registerComponent(\"Vhs\",hh)),ga.options.vhs=ga.options.vhs||{},ga.options.hls=ga.options.hls||{},ga.registerPlugin?ga.registerPlugin(\"reloadSourceOnError\",Ud):ga.plugin(\"reloadSourceOnError\",Ud),ga});","(function(root,factory){if(typeof exports===\"object\"&&typeof module!==\"undefined\"){var videojs=require(\"video.js\");module.exports=factory(videojs.default||videojs)}else if(typeof define===\"function\"&&define.amd){define([\"videojs\"],function(videojs){return root.Youtube=factory(videojs)})}else{root.Youtube=factory(root.videojs)}})(this,function(videojs){\"use strict\";var _isOnMobile=videojs.browser.IS_IOS||videojs.browser.IS_NATIVE_ANDROID;var Tech=videojs.getTech(\"Tech\");var Youtube=videojs.extend(Tech,{constructor:function(options,ready){Tech.call(this,options,ready);this.setPoster(options.poster);this.setSrc(this.options_.source,true);this.setTimeout(function(){if(this.el_){this.el_.parentNode.className+=\" vjs-youtube\";if(_isOnMobile){this.el_.parentNode.className+=\" vjs-youtube-mobile\"}if(Youtube.isApiReady){this.initYTPlayer()}else{Youtube.apiReadyQueue.push(this)}}}.bind(this))},dispose:function(){if(this.ytPlayer){if(this.ytPlayer.stopVideo){this.ytPlayer.stopVideo()}if(this.ytPlayer.destroy){this.ytPlayer.destroy()}}else{var index=Youtube.apiReadyQueue.indexOf(this);if(index!==-1){Youtube.apiReadyQueue.splice(index,1)}}this.ytPlayer=null;this.el_.parentNode.className=this.el_.parentNode.className.replace(\" vjs-youtube\",\"\").replace(\" vjs-youtube-mobile\",\"\");this.el_.parentNode.removeChild(this.el_);Tech.prototype.dispose.call(this)},createEl:function(){var div=document.createElement(\"div\");div.setAttribute(\"id\",this.options_.techId);div.setAttribute(\"style\",\"width:100%;height:100%;top:0;left:0;position:absolute\");div.setAttribute(\"class\",\"vjs-tech\");var divWrapper=document.createElement(\"div\");divWrapper.appendChild(div);if(!_isOnMobile&&!this.options_.ytControls){var divBlocker=document.createElement(\"div\");divBlocker.setAttribute(\"class\",\"vjs-iframe-blocker\");divBlocker.setAttribute(\"style\",\"position:absolute;top:0;left:0;width:100%;height:100%\");divBlocker.onclick=function(){this.pause()}.bind(this);divWrapper.appendChild(divBlocker)}return divWrapper},initYTPlayer:function(){var playerVars={controls:0,modestbranding:1,rel:0,showinfo:0,loop:this.options_.loop?1:0};if(typeof this.options_.autohide!==\"undefined\"){playerVars.autohide=this.options_.autohide}if(typeof this.options_[\"cc_load_policy\"]!==\"undefined\"){playerVars[\"cc_load_policy\"]=this.options_[\"cc_load_policy\"]}if(typeof this.options_.ytControls!==\"undefined\"){playerVars.controls=this.options_.ytControls}if(typeof this.options_.disablekb!==\"undefined\"){playerVars.disablekb=this.options_.disablekb}if(typeof this.options_.color!==\"undefined\"){playerVars.color=this.options_.color}if(!playerVars.controls){playerVars.fs=0}else if(typeof this.options_.fs!==\"undefined\"){playerVars.fs=this.options_.fs}if(this.options_.source.src.indexOf(\"end=\")!==-1){var srcEndTime=this.options_.source.src.match(/end=([0-9]*)/);this.options_.end=parseInt(srcEndTime[1])}if(typeof this.options_.end!==\"undefined\"){playerVars.end=this.options_.end}if(typeof this.options_.hl!==\"undefined\"){playerVars.hl=this.options_.hl}else if(typeof this.options_.language!==\"undefined\"){playerVars.hl=this.options_.language.substr(0,2)}if(typeof this.options_[\"iv_load_policy\"]!==\"undefined\"){playerVars[\"iv_load_policy\"]=this.options_[\"iv_load_policy\"]}if(typeof this.options_.list!==\"undefined\"){playerVars.list=this.options_.list}else if(this.url&&typeof this.url.listId!==\"undefined\"){playerVars.list=this.url.listId}if(typeof this.options_.listType!==\"undefined\"){playerVars.listType=this.options_.listType}if(typeof this.options_.modestbranding!==\"undefined\"){playerVars.modestbranding=this.options_.modestbranding}if(typeof this.options_.playlist!==\"undefined\"){playerVars.playlist=this.options_.playlist}if(typeof this.options_.playsinline!==\"undefined\"){playerVars.playsinline=this.options_.playsinline}if(typeof this.options_.rel!==\"undefined\"){playerVars.rel=this.options_.rel}if(typeof this.options_.showinfo!==\"undefined\"){playerVars.showinfo=this.options_.showinfo}if(this.options_.source.src.indexOf(\"start=\")!==-1){var srcStartTime=this.options_.source.src.match(/start=([0-9]*)/);this.options_.start=parseInt(srcStartTime[1])}if(typeof this.options_.start!==\"undefined\"){playerVars.start=this.options_.start}if(typeof this.options_.theme!==\"undefined\"){playerVars.theme=this.options_.theme}if(typeof this.options_.customVars!==\"undefined\"){var customVars=this.options_.customVars;Object.keys(customVars).forEach(function(key){playerVars[key]=customVars[key]})}this.activeVideoId=this.url?this.url.videoId:null;this.activeList=playerVars.list;var playerConfig={videoId:this.activeVideoId,playerVars:playerVars,events:{onReady:this.onPlayerReady.bind(this),onPlaybackQualityChange:this.onPlayerPlaybackQualityChange.bind(this),onPlaybackRateChange:this.onPlayerPlaybackRateChange.bind(this),onStateChange:this.onPlayerStateChange.bind(this),onVolumeChange:this.onPlayerVolumeChange.bind(this),onError:this.onPlayerError.bind(this)}};if(typeof this.options_.enablePrivacyEnhancedMode!==\"undefined\"&&this.options_.enablePrivacyEnhancedMode){playerConfig.host=\"https://www.youtube-nocookie.com\"}this.ytPlayer=new YT.Player(this.options_.techId,playerConfig)},onPlayerReady:function(){if(this.options_.muted){this.ytPlayer.mute()}var playbackRates=this.ytPlayer.getAvailablePlaybackRates();if(playbackRates.length>1){this.featuresPlaybackRate=true}this.playerReady_=true;this.triggerReady();if(this.playOnReady){this.play()}else if(this.cueOnReady){this.cueVideoById_(this.url.videoId);this.activeVideoId=this.url.videoId}},onPlayerPlaybackQualityChange:function(){},onPlayerPlaybackRateChange:function(){this.trigger(\"ratechange\")},onPlayerStateChange:function(e){var state=e.data;if(state===this.lastState||this.errorNumber){return}this.lastState=state;switch(state){case-1:this.trigger(\"loadstart\");this.trigger(\"loadedmetadata\");this.trigger(\"durationchange\");this.trigger(\"ratechange\");break;case YT.PlayerState.ENDED:this.trigger(\"ended\");break;case YT.PlayerState.PLAYING:this.trigger(\"timeupdate\");this.trigger(\"durationchange\");this.trigger(\"playing\");this.trigger(\"play\");if(this.isSeeking){this.onSeeked()}break;case YT.PlayerState.PAUSED:this.trigger(\"canplay\");if(this.isSeeking){this.onSeeked()}else{this.trigger(\"pause\")}break;case YT.PlayerState.BUFFERING:this.player_.trigger(\"timeupdate\");this.player_.trigger(\"waiting\");break}},onPlayerVolumeChange:function(){this.trigger(\"volumechange\")},onPlayerError:function(e){this.errorNumber=e.data;this.trigger(\"pause\");this.trigger(\"error\")},error:function(){var code=1e3+this.errorNumber;switch(this.errorNumber){case 5:return{code:code,message:\"Error while trying to play the video\"};case 2:case 100:return{code:code,message:\"Unable to find the video\"};case 101:case 150:return{code:code,message:\"Playback on other Websites has been disabled by the video owner.\"}}return{code:code,message:\"YouTube unknown error (\"+this.errorNumber+\")\"}},loadVideoById_:function(id){var options={videoId:id};if(this.options_.start){options.startSeconds=this.options_.start}if(this.options_.end){options.endSeconds=this.options_.end}this.ytPlayer.loadVideoById(options)},cueVideoById_:function(id){var options={videoId:id};if(this.options_.start){options.startSeconds=this.options_.start}if(this.options_.end){options.endSeconds=this.options_.end}this.ytPlayer.cueVideoById(options)},src:function(src){if(src){this.setSrc({src:src})}return this.source},poster:function(){if(_isOnMobile){return null}return this.poster_},setPoster:function(poster){this.poster_=poster},setSrc:function(source){if(!source||!source.src){return}delete this.errorNumber;this.source=source;this.url=Youtube.parseUrl(source.src);if(!this.options_.poster){if(this.url.videoId){this.poster_=\"https://img.youtube.com/vi/\"+this.url.videoId+\"/0.jpg\";this.trigger(\"posterchange\");this.checkHighResPoster()}}if(this.options_.autoplay&&!_isOnMobile){if(this.isReady_){this.play()}else{this.playOnReady=true}}else if(this.activeVideoId!==this.url.videoId){if(this.isReady_){this.cueVideoById_(this.url.videoId);this.activeVideoId=this.url.videoId}else{this.cueOnReady=true}}},autoplay:function(){return this.options_.autoplay},setAutoplay:function(val){this.options_.autoplay=val},loop:function(){return this.options_.loop},setLoop:function(val){this.options_.loop=val},play:function(){if(!this.url||!this.url.videoId){return}this.wasPausedBeforeSeek=false;if(this.isReady_){if(this.url.listId){if(this.activeList===this.url.listId){this.ytPlayer.playVideo()}else{this.ytPlayer.loadPlaylist(this.url.listId);this.activeList=this.url.listId}}if(this.activeVideoId===this.url.videoId){this.ytPlayer.playVideo()}else{this.loadVideoById_(this.url.videoId);this.activeVideoId=this.url.videoId}}else{this.trigger(\"waiting\");this.playOnReady=true}},pause:function(){if(this.ytPlayer){this.ytPlayer.pauseVideo()}},paused:function(){return this.ytPlayer?this.lastState!==YT.PlayerState.PLAYING&&this.lastState!==YT.PlayerState.BUFFERING:true},currentTime:function(){return this.ytPlayer?this.ytPlayer.getCurrentTime():0},setCurrentTime:function(seconds){if(this.lastState===YT.PlayerState.PAUSED){this.timeBeforeSeek=this.currentTime()}if(!this.isSeeking){this.wasPausedBeforeSeek=this.paused()}this.ytPlayer.seekTo(seconds,true);this.trigger(\"timeupdate\");this.trigger(\"seeking\");this.isSeeking=true;if(this.lastState===YT.PlayerState.PAUSED&&this.timeBeforeSeek!==seconds){clearInterval(this.checkSeekedInPauseInterval);this.checkSeekedInPauseInterval=setInterval(function(){if(this.lastState!==YT.PlayerState.PAUSED||!this.isSeeking){clearInterval(this.checkSeekedInPauseInterval)}else if(this.currentTime()!==this.timeBeforeSeek){this.trigger(\"timeupdate\");this.onSeeked()}}.bind(this),250)}},seeking:function(){return this.isSeeking},seekable:function(){if(!this.ytPlayer){return videojs.createTimeRange()}return videojs.createTimeRange(0,this.ytPlayer.getDuration())},onSeeked:function(){clearInterval(this.checkSeekedInPauseInterval);this.isSeeking=false;if(this.wasPausedBeforeSeek){this.pause()}this.trigger(\"seeked\")},playbackRate:function(){return this.ytPlayer?this.ytPlayer.getPlaybackRate():1},setPlaybackRate:function(suggestedRate){if(!this.ytPlayer){return}this.ytPlayer.setPlaybackRate(suggestedRate)},duration:function(){return this.ytPlayer?this.ytPlayer.getDuration():0},currentSrc:function(){return this.source&&this.source.src},ended:function(){return this.ytPlayer?this.lastState===YT.PlayerState.ENDED:false},volume:function(){return this.ytPlayer?this.ytPlayer.getVolume()/100:1},setVolume:function(percentAsDecimal){if(!this.ytPlayer){return}this.ytPlayer.setVolume(percentAsDecimal*100)},muted:function(){return this.ytPlayer?this.ytPlayer.isMuted():false},setMuted:function(mute){if(!this.ytPlayer){return}else{this.muted(true)}if(mute){this.ytPlayer.mute()}else{this.ytPlayer.unMute()}this.setTimeout(function(){this.trigger(\"volumechange\")},50)},buffered:function(){if(!this.ytPlayer||!this.ytPlayer.getVideoLoadedFraction){return videojs.createTimeRange()}var bufferedEnd=this.ytPlayer.getVideoLoadedFraction()*this.ytPlayer.getDuration();return videojs.createTimeRange(0,bufferedEnd)},preload:function(){},load:function(){},reset:function(){},networkState:function(){if(!this.ytPlayer){return 0}switch(this.ytPlayer.getPlayerState()){case-1:return 0;case 3:return 2;default:return 1}},readyState:function(){if(!this.ytPlayer){return 0}switch(this.ytPlayer.getPlayerState()){case-1:return 0;case 5:return 1;case 3:return 2;default:return 4}},supportsFullScreen:function(){return document.fullscreenEnabled||document.webkitFullscreenEnabled||document.mozFullScreenEnabled||document.msFullscreenEnabled},checkHighResPoster:function(){var uri=\"https://img.youtube.com/vi/\"+this.url.videoId+\"/maxresdefault.jpg\";try{var image=new Image;image.onload=function(){if(\"naturalHeight\"in image){if(image.naturalHeight<=90||image.naturalWidth<=120){return}}else if(image.height<=90||image.width<=120){return}this.poster_=uri;this.trigger(\"posterchange\")}.bind(this);image.onerror=function(){};image.src=uri}catch(e){}}});Youtube.isSupported=function(){return true};Youtube.canPlaySource=function(e){return Youtube.canPlayType(e.type)};Youtube.canPlayType=function(e){return e===\"video/youtube\"};Youtube.parseUrl=function(url){var result={videoId:null};var regex=/^.*(youtu.be\\/|v\\/|u\\/\\w\\/|embed\\/|watch\\?v=|\\&v=)([^#\\&\\?]*).*/;var match=url.match(regex);if(match&&match[2].length===11){result.videoId=match[2]}var regPlaylist=/[?&]list=([^#\\&\\?]+)/;match=url.match(regPlaylist);if(match&&match[1]){result.listId=match[1]}return result};function apiLoaded(){YT.ready(function(){Youtube.isApiReady=true;for(var i=0;i<Youtube.apiReadyQueue.length;++i){Youtube.apiReadyQueue[i].initYTPlayer()}})}function loadScript(src,callback){var loaded=false;var tag=document.createElement(\"script\");var firstScriptTag=document.getElementsByTagName(\"script\")[0];if(!firstScriptTag){return}firstScriptTag.parentNode.insertBefore(tag,firstScriptTag);tag.onload=function(){if(!loaded){loaded=true;callback()}};tag.onreadystatechange=function(){if(!loaded&&(this.readyState===\"complete\"||this.readyState===\"loaded\")){loaded=true;callback()}};tag.src=src}function injectCss(){var css=\".vjs-youtube .vjs-iframe-blocker { display: none; }\"+\".vjs-youtube.vjs-user-inactive .vjs-iframe-blocker { display: block; }\"+\".vjs-youtube .vjs-poster { background-size: cover; }\"+\".vjs-youtube-mobile .vjs-big-play-button { display: none; }\";var head=document.head||document.getElementsByTagName(\"head\")[0];var style=document.createElement(\"style\");style.type=\"text/css\";if(style.styleSheet){style.styleSheet.cssText=css}else{style.appendChild(document.createTextNode(css))}head.appendChild(style)}Youtube.apiReadyQueue=[];if(typeof document!==\"undefined\"){loadScript(\"https://www.youtube.com/iframe_api\",apiLoaded);injectCss()}if(typeof videojs.registerTech!==\"undefined\"){videojs.registerTech(\"Youtube\",Youtube)}else{videojs.registerComponent(\"Youtube\",Youtube)}});"]}