!function(i){var n={};function s(t){if(n[t])return n[t].exports;var e=n[t]={i:t,l:!1,exports:{}};return i[t].call(e.exports,e,e.exports,s),e.l=!0,e.exports}s.m=i,s.c=n,s.i=function(t){return t},s.d=function(t,e,i){s.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:i})},s.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return s.d(e,"a",e),e},s.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},s.p="",s(s.s=32)}([function(e,t,i){(function(t){e.exports=t.jQuery=i(20)}).call(t,i(1))},function(t,u){var v;v=function(){return this}();try{v=v||Function("return this")()||eval("this")}catch(t){"object"==typeof window&&(v=window)}t.exports=v},function(t,e,i){"use strict";(function(n){function t(){n(".teaser").length&&!n("body.procontain").length&&(992<=n(window).width()&&n(".teaser").outerHeight()<700?n(".teaser .teaser-arrow").hide():n(".teaser .teaser-arrow").show())}i(0),i(18),i(17),i(23),i(4),i(26),i(16),i(27),i(19),i(8),i(7),i(13),i(3),i(5),i(14),i(11),i(6),i(10),i(12),i(15),i(9),n('a[href*="#"]').not('[href="#"]').not('[href="#0"]').click(function(t){if(location.pathname.replace(/^\//,"")==this.pathname.replace(/^\//,"")&&location.hostname==this.hostname){var e=n(this.hash);(e=e.length?e:n("[name="+this.hash.slice(1)+"]")).length&&(t.preventDefault(),n("html, body").animate({scrollTop:e.offset().top-90},1e3,function(){var t=n(e);if(t.focus(),t.is(":focus"))return!1;t.attr("tabindex","-1"),t.focus()}))}}),n(window).scroll(function(){n(".count").each(function(){var t=this.getBoundingClientRect(),e=t.top,i=t.bottom;0<=e&&i<=window.innerHeight&&n(this).prop("Counter",0).animate({Counter:n(this).attr("data-count")},{duration:1e3,easing:"swing",step:function(t){n(this).text(Math.ceil(t))}})})}),n(".detail-toggle").click(function(){n(".detail-container").slideToggle(1e3),n(this).toggleClass("open"),window.dispatchEvent(new Event("resize")),n(".detail-container .slick-initialized").slick("slickGoTo",0,!0)}),t(),n(window).resize(function(){t()}),document.write("<script>if(window.innerWidth >= 992)$('.text-split').columnize({columns: 2}); else $('.text-split').uncolumnize();<\/script>"),n(".jobs-list-title").each(function(t){0==n(this).parent(".jobs-list-row").length&&(n(this).next(".col-lg-4").css("display","none"),n(this).css("display","none"))}),n(".ui-accordion-header")&&n(".ui-accordion-header:nth-of-type(1)").click()}).call(e,i(0))},function(t,e,i){"use strict";(function(t){t(".accordion").each(function(){t(this).find(".table-accordion-header").show(),void 0!==t(this).attr("data-show-all")&&""!=t(this).attr("data-show-all")||t(this).accordion({heightStyle:"content",collapsible:!0,active:!1})})}).call(e,i(0))},function(t,e,i){"use strict";(function(t){var P,i;i="columnizer-original-dom",(P=t).fn.columnize=function(I){this.each(function(){var t=P(this);t.data(i,t.clone(!0,!0))}),this.cols=[],this.offset=0,this.before=[],this.lastOther=0,this.prevMax=0,this.debug=0,this.setColumnStart=null;var r={width:400,columns:!1,buildOnce:!1,overflow:!1,doneFunc:function(){},target:!1,ignoreImageLoading:!(this.elipsisText=""),columnFloat:"left",lastNeverTallest:!1,accuracy:!1,precise:!1,manualBreaks:!1,cssClassPrefix:"",elipsisText:"...",debug:0};function O(e,i){try{e.append(i)}catch(t){e[0].appendChild(i[0])}}return"string"==typeof(I=P.extend(r,I)).width&&(I.width=parseInt(I.width,10),isNaN(I.width)&&(I.width=r.width)),"function"==typeof I.setColumnStart&&(this.setColumnStart=I.setColumnStart),"string"==typeof I.elipsisText&&(this.elipsisText=I.elipsisText),I.debug&&(this.debug=I.debug),I.setWidth||(I.precise?I.setWidth=function(t){return 100/t}:I.setWidth=function(t){return Math.floor(100/t)}),this.each(function(){var T=I.target?P(I.target):P(this),w=P(this).height(),k=P("<div></div>"),S=0,C=I.manualBreaks,n=r.cssClassPrefix;"string"==typeof I.cssClassPrefix&&(n=I.cssClassPrefix);var t,e;if(O(k,P(this).contents().clone(!0)),!I.ignoreImageLoading&&!I.target&&!T.data("imageLoaded")&&(T.data("imageLoaded",!0),0<P(this).find("img").length)){var i=(t=P(this),e=k,function(){t.data("firstImageLoaded")||(t.data("firstImageLoaded","true"),O(t.empty(),e.children().clone(!0)),t.columnize(I))});return P(this).find("img").one("load",i),void P(this).find("img").one("abort",i)}function x(t,e){var i=e?".":"";return n.length?i+n+"-"+t:i+t}function E(t,e,i,n){for(;(C||i.height()<n)&&e[0].childNodes.length;){var s=e[0].childNodes[0];if(P(s).find(x("columnbreak",!0)).length)return;if(P(s).hasClass(x("columnbreak")))return;O(t,P(s))}if(0!==t[0].childNodes.length){var r=t[0].childNodes,a=r[r.length-1];t[0].removeChild(a);var o=P(a);if(3==o[0].nodeType){var l,c=o[0].nodeValue,u=I.width/18;I.accuracy&&(u=I.accuracy);for(var h=null;i.height()<n&&c.length;){var d=c.indexOf(" ",u);l=-1!=d?c.substring(0,d):c,h=document.createTextNode(l),O(t,P(h)),c=c.length>u&&-1!=d?c.substring(d):""}if(i.height()>=n&&null!==h&&(t[0].removeChild(h),c=h.nodeValue+c),!c.length)return!1;o[0].nodeValue=c}return e.contents().length?e.prepend(o):O(e,o),3==o[0].nodeType}}function D(t,e,i,n){if(!t.contents(":last").find(x("columnbreak",!0)).length&&!t.contents(":last").hasClass(x("columnbreak"))&&e.contents().length){var s=e.contents(":first");if(void 0===s.get(0)||1!=s.get(0).nodeType)return;var r=s.clone(!0);if(s.hasClass(x("columnbreak")))O(t,r),s.remove();else if(C)O(t,r),s.remove();else if(1==r.get(0).nodeType&&!r.hasClass(x("dontend")))if(O(t,r),r.is("img")&&i.height()<n+20)s.remove();else if(s.hasClass(x("dontsplit"))&&i.height()<n+20)s.remove();else if(r.is("img")||s.hasClass(x("dontsplit")))r.remove();else{if(r.empty(),E(r,s,i,n))s.addClass(x("split"));else{if(s.addClass(x("split")),"OL"==s.get(0).tagName){var a=r.get(0).childElementCount+r.get(0).start;s.attr("start",a+1)}s.children().length&&D(r,s,i,n)}if(0===r.get(0).childNodes.length)r.remove(),s.removeClass(x("split"));else if(1==r.get(0).childNodes.length){var o=r.get(0).childNodes[0];if(3==o.nodeType){var l=o.nodeValue;/\S/.test(l)||(r.remove(),s.removeClass(x("split")))}}}}}function A(t){return 3==t.nodeType?!!/^\s+$/.test(t.nodeValue)&&(!!t.previousSibling&&A(t.previousSibling)):1==t.nodeType&&(!!P(t).hasClass(x("dontend"))||0!==t.childNodes.length&&A(t.childNodes[t.childNodes.length-1]))}function s(){if(0,S!=T.width()){S=T.width();var t=Math.round(T.width()/I.width),e=I.width,i=I.height;if(I.columns&&(t=I.columns),C&&(t=k.find(x("columnbreak",!0)).length+1,e=!1),t<=1)return function(){if(!T.data("columnized")||1!=T.children().length){if(T.data("columnized",!0),T.data("columnizing",!0),T.empty(),T.append(P("<div class='"+x("first")+" "+x("last")+" "+x("column")+" ' style='width:100%; float: "+I.columnFloat+";'></div>")),$col=T.children().eq(T.children().length-1),$destroyable=k.clone(!0),I.overflow){for(targetHeight=I.overflow.height,E($col,$destroyable,$col,targetHeight),$destroyable.contents().find(":first-child").hasClass(x("dontend"))||D($col,$destroyable,$col,targetHeight);$col.contents(":last").length&&A($col.contents(":last").get(0));){var t=$col.contents(":last");t.remove(),$destroyable.prepend(t)}for(var e="",i=document.createElement("DIV");0<$destroyable[0].childNodes.length;){var n=$destroyable[0].childNodes[0];if(n.attributes)for(var s=0;s<n.attributes.length;s++)0===n.attributes[s].nodeName.indexOf("jQuery")&&n.removeAttribute(n.attributes[s].nodeName);i.innerHTML="",i.appendChild($destroyable[0].childNodes[0]),e+=i.innerHTML}P(I.overflow.id)[0].innerHTML=e}else O($col,$destroyable.contents());T.data("columnizing",!1),I.overflow&&I.overflow.doneFunc&&I.overflow.doneFunc(),I.doneFunc()}}();if(!T.data("columnizing")){T.data("columnized",!0),T.data("columnizing",!0),T.empty(),T.append(P("<div style='width:"+I.setWidth(t)+"%; float: "+I.columnFloat+";'></div>")),O(c=T.children(":last"),k.clone()),w=c.height(),T.empty();var n=w/t,s=3,r=!1;I.overflow?(s=1,n=I.overflow.height):i&&e&&(s=1,n=i,r=!0);for(var a=0;a<s&&a<20;a++){var o,l,c,u;T.empty();try{o=k.clone(!0)}catch(t){o=k.clone()}o.css("visibility","hidden");for(var h=0;h<t;h++)l=0===h?x("first"):"",l+=" "+x("column"),l=h==t-1?x("last")+" "+l:l,T.append(P("<div class='"+l+"' style='width:"+I.setWidth(t)+"%; float: "+I.columnFloat+";'></div>"));for(h=0;h<t-(I.overflow?0:1)||r&&o.contents().length;){for(T.children().length<=h&&T.append(P("<div class='"+l+"' style='width:"+I.setWidth(t)+"%; float: "+I.columnFloat+";'></div>")),c=T.children().eq(h),r&&c.width(e+"px"),E(c,o,c,n),D(c,o,c,n);c.contents(":last").length&&A(c.contents(":last").get(0));)(u=c.contents(":last")).remove(),o.prepend(u);h++,0===c.contents().length&&o.contents().length?c.append(o.contents(":first")):h!=t-(I.overflow?0:1)||I.overflow||o.find(x("columnbreak",!0)).length&&t++}if(I.overflow&&!r){if(document.all&&-1!=navigator.appVersion.indexOf("MSIE 7.")){for(var d="",p=document.createElement("DIV");0<o[0].childNodes.length;){var f=o[0].childNodes[0];for(h=0;h<f.attributes.length;h++)0===f.attributes[h].nodeName.indexOf("jQuery")&&f.removeAttribute(f.attributes[h].nodeName);p.innerHTML="",p.appendChild(o[0].childNodes[0]),d+=p.innerHTML}P(I.overflow.id)[0].innerHTML=d}else P(I.overflow.id).empty().append(o.contents().clone(!0))}else if(r)T.children().each(function(t){(c=T.children().eq(t)).width(e+"px"),0===t?c.addClass(x("first")):t==T.children().length-1?c.addClass(x("last")):(c.removeClass(x("first")),c.removeClass(x("last")))}),T.width(T.children().length*e+"px");else{c=T.children().eq(T.children().length-1),o.contents().each(function(){c.append(P(this))});c.height();var m=0,g=1e7,v=0,y=!1,_=0;T.children().each(function(n){return function(t){var e=n.children().eq(t);if(!e.children(":last").find(x("columnbreak",!0)).length){var i=e.height();y=!1,m+=i,v<i&&(v=i,y=!0),i<g&&(g=i),_++}}}(T));var b=m/_;0===m?a=s:I.lastNeverTallest&&y?(5,n+=30,a==s-1&&s++):30<v-g?n=30+b:20<Math.abs(b-n)?n=b:a=s}T.append(P("<br style='clear:both;'>"))}T.find(x("column",!0)).find(":first"+x("removeiffirst",!0)).remove(),T.find(x("column",!0)).find(":last"+x("removeiflast",!0)).remove(),T.find(x("split",!0)).find(":first"+x("removeiffirst",!0)).remove(),T.find(x("split",!0)).find(":last"+x("removeiflast",!0)).remove(),T.data("columnizing",!1),I.overflow&&I.overflow.doneFunc(),I.doneFunc()}}}T.empty(),s(),I.buildOnce||P(window).resize(function(){I.buildOnce||(T.data("timeout")&&clearTimeout(T.data("timeout")),T.data("timeout",setTimeout(s,200)))})})},P.fn.uncolumnize=function(){this.each(function(){var t,e=P(this);(t=e.data(i))&&e.replaceWith(t)})},P.fn.renumberByJS=function(t,e,i,n){if(this.setList=function(t,e,i){var n,s=this.before.parents();if((n=P(t[this.offset-1]).find(">*")).last()[0].tagName!=i.toUpperCase())return this.debug&&console.log("Last item in previous column, isn't a list..."),0;n=n.length;var r,a=1;if(a=this.lastOther<=0?this.before.children().length+1:P(s[this.lastOther]).children().length+1,P(t[this.offset]).find(i+":first li.split").length){var o=P(t[this.offset-1]).find(i+":last li:last");if(""!==this.elipsisText&&!P(t[this.offset-1]).find(i+":last ~ div").length&&!P(t[this.offset-1]).find(i+":last ~ p").length&&0==P(o).find("ul, ol, dl").length){var l=o.last().text(),c=l.length;";"==l.substring(c-1)?l.substring(c-4)!=this.elipsisText+";"&&(l=l.substring(0,c-1)+this.elipsisText+";"):l.substring(c-3)!=this.elipsisText&&(l+=this.elipsisText),o.last().text(l)}0==P(t[this.offset]).find(i+":first >li.split >"+i).length&&a--}(1==n&&(a+=this.prevMax),1<this.nest)?(this.debug&&console.log("Supposed to be a nested list...decr"),a--,0<(r=P(t[this.offset-1]).find(i+":first li.split:first")).length&&(this.debug&&console.log("Previous column started with a split item, so that count is one less than expected"),a--),(r=P(t[this.offset]).find(i+":first li:first").clone()).children().remove(),0<P.trim(r.text()).length&&(this.debug&&console.log("If that was a complete list in the previous column, don't decr."),a++,0==P(t[this.offset-1]).find(">"+i+":last ").children().length&&(this.debug&&console.log("unless that was empty, in which case revert"),a--))):0<(r=P(t[this.offset]).find(i+":first li:first "+i+".split li.split")).length&&(this.debug&&console.log("[Nested] Column started with a split item, so that count is one less than expected"),a--);return this.debug&&console.log("Setting the start value to "+a+" ("+this.prevMax+")"),0<a&&("function"==typeof this.setColumnStart?this.setColumnStart(e,a):e.attr("start",a)),0},void 0===i&&(i=!1),void 0===n&&(n=!1),!i&&!n)throw"renumberByJS(): Bad param, must pass an id or a class";var s="";this.prevMax=1,s=n?"."+n:"#"+i;var r=t.toLowerCase(),a=t.toUpperCase();for(this.cols=P(s),this.debug&&console.log("There are "+this.cols.length+" items, looking for "+r),this.before=P(this.cols[0]).find(r+":last"),this.prevMax=this.before.children().length,this.offset=1;this.offset<this.cols.length;this.offset++)if(this.debug&&console.log("iterating "+this.offset+"...[of "+this.cols.length+"]"),this.offset%e!=0){if(this.before=P(this.cols[this.offset-1]).find(r+":last"),this.before.length){this.debug&&console.log("Have some "+t+" elements in the previous column");var o=P(this.cols[this.offset]).find(r+":first");if(P(this.cols[this.offset]).find("*:first")[0]!==o[0])continue;var l=this.before.parents();this.lastOther=0;for(;this.lastOther<l.length;this.lastOther++)if(l[this.lastOther].tagName!=a&&"LI"!=l[this.lastOther].tagName){!0,this.lastOther--;break}this.nest=1,P(this.cols[this.offset]).find(">"+r+":first li "+r+":first").length&&(this.nest=2),this.setList(this.cols,o,r),this.lastOther--,(o=P(this.cols[this.offset]).find(r+":first li "+r+":first")).length&&(this.before=P(this.cols[this.offset-1]).find(">"+r+":last li "+r+":last"),this.prevMax=0,this.nest=1,this.setList(this.cols,o,r));var c=P(this.cols[this.offset-1]).find(">"+r+":last");this.prevMax=c.children().length}}else this.debug&&console.log("First column (in theory..)"),this.prevMax=1;return 0}}).call(e,i(0))},function(t,e,i){"use strict";(function(e){function t(){var t=e("#projects-list");t.find(".col-xl-3").attr("style",""),""!=e('input[name="projects_plz"]').val()&&t.find(".col-xl-3").not('[class*="projects_plz-'+e('input[name="projects_plz"]').val().substring(0,2)+'"]').attr("style","display:none !important"),""!=e('select[name="projects_country"]').val()&&t.find(".col-xl-3").not(".projects_country-"+e('select[name="projects_country"]').val()).attr("style","display:none !important"),""!=e('select[name="projects_type"]').val()&&t.find(".col-xl-3").not(".projects_type-"+e('select[name="projects_type"]').val()).attr("style","display:none !important"),""!=e('select[name="projects_year"]').val()&&t.find(".col-xl-3").not(".projects_year-"+e('select[name="projects_year"]').val()).attr("style","display:none !important"),0==t.find(".col-xl-3:visible").length?e("#projects-list .no-result").show():e("#projects-list .no-result").hide()}e("#projects-filter").find('select[name="projects_country"], select[name="projects_type"], select[name="projects_year"]').change(function(){t()}),e("#projects-filter").find('input[name="projects_plz"]').keyup(function(){t()}),e("#projects-filter").find('select[name="projects_product"], select[name="projects_category"]').change(function(){!function(){var t=e("#projects-list");t.find(".col-12").attr("style",""),""!=e('select[name="projects_product"]').val()&&t.find(".col-12").not(".projects_product-"+e('select[name="projects_product"]').val()).attr("style","display:none !important");""!=e('select[name="projects_category"]').val()&&t.find(".col-12").not(".projects_category-"+e('select[name="projects_category"]').val()).attr("style","display:none !important");0==t.find(".col-12:visible").length?e("#projects-list .no-result").show():e("#projects-list .no-result").hide()}()})}).call(e,i(0))},function(t,e,i){"use strict";(function(s){s("form").submit(function(t){var e=s(this);if(e.find(".require-any input").length){var i=!0;if(e.find(".require-any input").each(function(){""!=s(this).val()&&(i=!1)}),i){if(t.preventDefault(),!e.find(".phone-or-mail").length){var n="Please provide us with a telephone number or e-mail address for inquiries.";"de"==s("#header-lang img").attr("alt")||"ch"==s("#header-lang img").attr("alt")?n="Bitte geben Sie uns für Rückfragen eine Telefonnummer oder E-Mail-Adresse an.":"fr"==s("#header-lang img").attr("alt")?n="Veuillez nous fournir un numéro de téléphone ou une adresse e-mail pour toute question.":"nl"==s("#header-lang img").attr("alt")&&(n="Geef ons een telefoonnummer of e-mailadres voor vragen."),s('<span class="error help-block phone-or-mail" role="alert">'+n+"<br></span>").insertBefore(e.find(".actions"))}}else e.find(".phone-or-mail").length&&e.find(".phone-or-mail").remove()}}),s("form#kontaktformularkompakt").on("submit",function(t){var e=s(this);if(""==e.find("#kontaktformularkompakt-text-4").val()&&""==e.find("#kontaktformularkompakt-text-5").val()&&(t.preventDefault(),!e.find(".phone-or-mail").length)){var i="Please provide us with a telephone number or e-mail address for inquiries.";"de"==s("#header-lang img").attr("alt")||"ch"==s("#header-lang img").attr("alt")?i="Bitte geben Sie uns für Rückfragen eine Telefonnummer oder E-Mail-Adresse an.":"fr"==s("#header-lang img").attr("alt")?i="Veuillez nous fournir un numéro de téléphone ou une adresse e-mail pour toute question.":"nl"==s("#header-lang img").attr("alt")&&(i="Geef ons een telefoonnummer of e-mailadres voor vragen."),s('<span class="error help-block phone-or-mail" role="alert">'+i+"<br></span>").insertAfter(e.find("#kontaktformularkompakt-text-5"))}}),s("form#kontaktformularkompakt").on("input propertychange","#kontaktformularkompakt-text-4, #kontaktformularkompakt-text-5",function(t){""!=s(this).val()&&s("form#kontaktformularkompakt .phone-or-mail").remove()}),window.setFormRequiredAlho=function(){var i=s("form#kontaktformularkomplett"),t=i.find('#kontaktformularkomplett-contactway input[type="checkbox"]:checked');i.find("#kontaktformularkomplett-text-6, #kontaktformularkomplett-text-7, #kontaktformularkomplett-text-8, #kontaktformularkomplett-singleselect-2, #kontaktformularkomplett-text-4, #kontaktformularkomplett-text-5").prop("required",!1),i.find('label[for="kontaktformularkomplett-text-6"], label[for="kontaktformularkomplett-text-7"], label[for="kontaktformularkomplett-text-8"], label[for="kontaktformularkomplett-singleselect-2"], label[for="kontaktformularkomplett-text-4"], label[for="kontaktformularkomplett-text-5"]').find(".required").remove(),s.each(t,function(t,e){"Post"==s(e).val()&&(i.find("#kontaktformularkomplett-text-6, #kontaktformularkomplett-text-7, #kontaktformularkomplett-text-8, #kontaktformularkomplett-singleselect-2").prop("required",!0),i.find('label[for="kontaktformularkomplett-text-6"], label[for="kontaktformularkomplett-text-7"], label[for="kontaktformularkomplett-text-8"], label[for="kontaktformularkomplett-singleselect-2"]').append('<span class="required">*</span>')),"Telefon"==s(e).val()&&(i.find("#kontaktformularkomplett-text-4").prop("required",!0),i.find('label[for="kontaktformularkomplett-text-4"]').append('<span class="required">*</span>')),"E-Mail"==s(e).val()&&(i.find("#kontaktformularkomplett-text-5").prop("required",!0),i.find('label[for="kontaktformularkomplett-text-5"]').append('<span class="required">*</span>'))})},s("form#kontaktformularkomplett").on("submit",function(t){var e=s(this);if(!e.find('#kontaktformularkomplett-contactway input[type="checkbox"]:checked').length&&(t.preventDefault(),!e.find(".contactway-reqired").length)){var i="Please choose how we are allowed to contact you.";"de"==s("#header-lang img").attr("alt")||"ch"==s("#header-lang img").attr("alt")?i="Bitte wählen Sie aus, wie wir Sie kontaktieren dürfen.":"fr"==s("#header-lang img").attr("alt")?i="Veuillez choisir comment nous sommes autorisés à vous contacter.":"nl"==s("#header-lang img").attr("alt")&&(i="Kies hoe we contact met u mogen opnemen."),s('<span class="error help-block contactway-reqired" role="alert">'+i+"<br></span>").insertAfter(e.find("#kontaktformularkomplett-contactway"))}}),s("form#kontaktformularkomplett").each(function(){setFormRequiredAlho()}),s("form#kontaktformularkomplett").on("change",'#kontaktformularkomplett-contactway input[type="checkbox"]',function(){s(this).prop("checked")&&s("form#kontaktformularkomplett .contactway-reqired").remove(),setFormRequiredAlho()}),s("form#alho-ch-contact-compact").on("submit",function(t){var e=s(this);if(""==e.find("#alho-ch-contact-compact-text-4").val()&&""==e.find("#alho-ch-contact-compact-text-5").val()&&(t.preventDefault(),!e.find(".phone-or-mail").length)){var i="Please provide us with a telephone number or e-mail address for inquiries.";"de"==s("#header-lang img").attr("alt")||"ch"==s("#header-lang img").attr("alt")?i="Bitte geben Sie uns für Rückfragen eine Telefonnummer oder E-Mail-Adresse an.":"fr"==s("#header-lang img").attr("alt")?i="Veuillez nous fournir un numéro de téléphone ou une adresse e-mail pour toute question.":"nl"==s("#header-lang img").attr("alt")&&(i="Geef ons een telefoonnummer of e-mailadres voor vragen."),s('<span class="error help-block phone-or-mail" role="alert">'+i+"<br></span>").insertAfter(e.find("#alho-ch-contact-compact-text-5"))}}),s("form#alho-ch-contact-compact").on("input propertychange","#alho-ch-contact-compact-text-4, #alho-ch-contact-compact-text-5",function(t){""!=s(this).val()&&s("form#alho-ch-contact-compact .phone-or-mail").remove()}),window.setFormRequiredAlhoCh=function(){var i=s("form#alho-ch-contact-main"),t=i.find('#alho-ch-contact-main-contactway input[type="checkbox"]:checked');i.find("#alho-ch-contact-main-text-6, #alho-ch-contact-main-text-7, #alho-ch-contact-main-text-8, #alho-ch-contact-main-singleselect-2, #alho-ch-contact-main-text-4, #alho-ch-contact-main-text-5").prop("required",!1),i.find('label[for="alho-ch-contact-main-text-6"], label[for="alho-ch-contact-main-text-7"], label[for="alho-ch-contact-main-text-8"], label[for="alho-ch-contact-main-singleselect-2"], label[for="alho-ch-contact-main-text-4"], label[for="alho-ch-contact-main-text-5"]').find(".required").remove(),s.each(t,function(t,e){"Post"==s(e).val()&&(i.find("#alho-ch-contact-main-text-6, #alho-ch-contact-main-text-7, #alho-ch-contact-main-text-8, #alho-ch-contact-main-singleselect-2").prop("required",!0),i.find('label[for="alho-ch-contact-main-text-6"], label[for="alho-ch-contact-main-text-7"], label[for="alho-ch-contact-main-text-8"], label[for="alho-ch-contact-main-singleselect-2"]').append('<span class="required">*</span>')),"Telefon"==s(e).val()&&(i.find("#alho-ch-contact-main-text-4").prop("required",!0),i.find('label[for="alho-ch-contact-main-text-4"]').append('<span class="required">*</span>')),"E-Mail"==s(e).val()&&(i.find("#alho-ch-contact-main-text-5").prop("required",!0),i.find('label[for="alho-ch-contact-main-text-5"]').append('<span class="required">*</span>'))})},s("form#alho-ch-contact-main").on("submit",function(t){var e=s(this);if(!e.find('#alho-ch-contact-main-contactway input[type="checkbox"]:checked').length&&(t.preventDefault(),!e.find(".contactway-reqired").length)){var i="Please choose how we are allowed to contact you.";"de"==s("#header-lang img").attr("alt")||"ch"==s("#header-lang img").attr("alt")?i="Bitte wählen Sie aus, wie wir Sie kontaktieren dürfen.":"fr"==s("#header-lang img").attr("alt")?i="Veuillez choisir comment nous sommes autorisés à vous contacter.":"nl"==s("#header-lang img").attr("alt")&&(i="Kies hoe we contact met u mogen opnemen."),s('<span class="error help-block contactway-reqired" role="alert">'+i+"<br></span>").insertAfter(e.find("#alho-ch-contact-main-contactway"))}}),s("form#alho-ch-contact-main").each(function(){setFormRequiredAlhoCh()}),s("form#alho-ch-contact-main").on("change",'#alho-ch-contact-main-contactway input[type="checkbox"]',function(){s(this).prop("checked")&&s("form#alho-ch-contact-main-contactway .contactway-reqired").remove(),setFormRequiredAlhoCh()}),s("form#procontain-sidebar-mail").on("submit",function(t){var e=s(this);if(""==e.find("#procontain-sidebar-mail-email").val()&&""==e.find("#procontain-sidebar-mail-phone").val()&&(t.preventDefault(),!e.find(".phone-or-mail").length)){var i="Please provide us with a telephone number or e-mail address for inquiries.";"de"==s("#header-lang img").attr("alt")&&(i="Bitte geben Sie uns für Rückfragen eine Telefonnummer oder E-Mail-Adresse an."),s('<span class="error help-block phone-or-mail" role="alert">'+i+"<br></span>").insertAfter(e.find("#procontain-sidebar-mail-phone"))}}),s("form#procontain-sidebar-mail").on("input propertychange","#procontain-sidebar-mail-email, #procontain-sidebar-mail-phone",function(t){""!=s(this).val()&&s("form#procontain-sidebar-mail .phone-or-mail").remove()}),s("form#procontain-contact-compact").on("submit",function(t){var e=s(this);if(""==e.find("#procontain-contact-compact-text-4").val()&&""==e.find("#procontain-contact-compact-text-5").val()&&(t.preventDefault(),!e.find(".phone-or-mail").length)){var i="Please provide us with a telephone number or e-mail address for inquiries.";"de"==s("#header-lang img").attr("alt")?i="Bitte geben Sie uns für Rückfragen eine Telefonnummer oder E-Mail-Adresse an.":"fr"==s("#header-lang img").attr("alt")?i="Veuillez nous fournir un numéro de téléphone ou une adresse e-mail pour toute question.":"nl"==s("#header-lang img").attr("alt")&&(i="Geef ons een telefoonnummer of e-mailadres voor vragen."),s('<span class="error help-block phone-or-mail" role="alert">'+i+"<br></span>").insertAfter(e.find("#procontain-contact-compact-text-5"))}}),s("form#procontain-contact-compact").on("input propertychange","#procontain-contact-compact-text-4, #procontain-contact-compact-text-5",function(t){""!=s(this).val()&&s("form#procontain-contact-compact .phone-or-mail").remove()}),window.setFormRequiredProcontain=function(){var i=s("form#procontain-contact-main"),t=i.find('#procontain-contact-main-contactway input[type="checkbox"]:checked');i.find("#procontain-contact-main-text-6, #procontain-contact-main-text-7, #procontain-contact-main-text-8, #procontain-contact-main-singleselect-2, #procontain-contact-main-text-4, #procontain-contact-main-text-5").prop("required",!1),i.find('label[for="procontain-contact-main-text-6"], label[for="procontain-contact-main-text-7"], label[for="procontain-contact-main-text-8"], label[for="procontain-contact-main-singleselect-2"], label[for="procontain-contact-main-text-4"], label[for="procontain-contact-main-text-5"]').find(".required").remove(),s.each(t,function(t,e){"Post"==s(e).val()&&(i.find("#procontain-contact-main-text-6, #procontain-contact-main-text-7, #procontain-contact-main-text-8, #procontain-contact-main-singleselect-2").prop("required",!0),i.find('label[for="procontain-contact-main-text-6"], label[for="procontain-contact-main-text-7"], label[for="procontain-contact-main-text-8"], label[for="procontain-contact-main-singleselect-2"]').append('<span class="required">*</span>')),"Telefon"==s(e).val()&&(i.find("#procontain-contact-main-text-4").prop("required",!0),i.find('label[for="procontain-contact-main-text-4"]').append('<span class="required">*</span>')),"E-Mail"==s(e).val()&&(i.find("#procontain-contact-main-text-5").prop("required",!0),i.find('label[for="procontain-contact-main-text-5"]').append('<span class="required">*</span>'))})},s("form#procontain-contact-main").on("submit",function(t){var e=s(this);if(!e.find('#procontain-contact-main-contactway input[type="checkbox"]:checked').length&&(t.preventDefault(),!e.find(".contactway-reqired").length)){var i="Please choose how we are allowed to contact you.";"de"==s("#header-lang img").attr("alt")||"ch"==s("#header-lang img").attr("alt")?i="Bitte wählen Sie aus, wie wir Sie kontaktieren dürfen.":"fr"==s("#header-lang img").attr("alt")?i="Veuillez choisir comment nous sommes autorisés à vous contacter.":"nl"==s("#header-lang img").attr("alt")&&(i="Kies hoe we contact met u mogen opnemen."),s('<span class="error help-block contactway-reqired" role="alert">'+i+"<br></span>").insertAfter(e.find("#procontain-contact-main-contactway"))}}),s("form#procontain-contact-main").each(function(){setFormRequiredProcontain()}),s("form#procontain-contact-main").on("change",'#procontain-contact-main-contactway input[type="checkbox"]',function(){s(this).prop("checked")&&s("form#procontain-contact-main .contactway-reqired").remove(),setFormRequiredProcontain()}),s("form#fagsi-contact-compact").on("submit",function(t){var e=s(this);if(""==e.find("#fagsi-contact-compact-text-4").val()&&""==e.find("#fagsi-contact-compact-text-5").val()&&(t.preventDefault(),!e.find(".phone-or-mail").length)){var i="Please provide us with a telephone number or e-mail address for inquiries.";"de"==s("#header-lang img").attr("alt")?i="Bitte geben Sie uns für Rückfragen eine Telefonnummer oder E-Mail-Adresse an.":"fr"==s("#header-lang img").attr("alt")?i="Veuillez nous fournir un numéro de téléphone ou une adresse e-mail pour toute question.":"nl"==s("#header-lang img").attr("alt")&&(i="Geef ons een telefoonnummer of e-mailadres voor vragen."),s('<span class="error help-block phone-or-mail" role="alert">'+i+"<br></span>").insertAfter(e.find("#fagsi-contact-compact-text-5"))}}),s("form#fagsi-contact-compact").on("input propertychange","#fagsi-contact-compact-text-4, #fagsi-contact-compact-text-5",function(t){""!=s(this).val()&&s("form#fagsi-contact-compact .phone-or-mail").remove()}),window.setFormRequiredfagsi=function(){var i=s("form#fagsi-contact-main"),t=i.find('#fagsi-contact-main-contactway input[type="checkbox"]:checked');i.find("#fagsi-contact-main-text-6, #fagsi-contact-main-text-7, #fagsi-contact-main-text-8, #fagsi-contact-main-singleselect-2, #fagsi-contact-main-text-4, #fagsi-contact-main-text-5").prop("required",!1),i.find('label[for="fagsi-contact-main-text-6"], label[for="fagsi-contact-main-text-7"], label[for="fagsi-contact-main-text-8"], label[for="fagsi-contact-main-singleselect-2"], label[for="fagsi-contact-main-text-4"], label[for="fagsi-contact-main-text-5"]').find(".required").remove(),s.each(t,function(t,e){"Post"==s(e).val()&&(i.find("#fagsi-contact-main-text-6, #fagsi-contact-main-text-7, #fagsi-contact-main-text-8, #fagsi-contact-main-singleselect-2").prop("required",!0),i.find('label[for="fagsi-contact-main-text-6"], label[for="fagsi-contact-main-text-7"], label[for="fagsi-contact-main-text-8"], label[for="fagsi-contact-main-singleselect-2"]').append('<span class="required">*</span>')),"Telefon"==s(e).val()&&(i.find("#fagsi-contact-main-text-4").prop("required",!0),i.find('label[for="fagsi-contact-main-text-4"]').append('<span class="required">*</span>')),"E-Mail"==s(e).val()&&(i.find("#fagsi-contact-main-text-5").prop("required",!0),i.find('label[for="fagsi-contact-main-text-5"]').append('<span class="required">*</span>'))})},s("form#fagsi-contact-main").on("submit",function(t){var e=s(this);if(!e.find('#fagsi-contact-main-contactway input[type="checkbox"]:checked').length&&(t.preventDefault(),!e.find(".contactway-reqired").length)){var i="Please choose how we are allowed to contact you.";"de"==s("#header-lang img").attr("alt")||"ch"==s("#header-lang img").attr("alt")?i="Bitte wählen Sie aus, wie wir Sie kontaktieren dürfen.":"fr"==s("#header-lang img").attr("alt")?i="Veuillez choisir comment nous sommes autorisés à vous contacter.":"nl"==s("#header-lang img").attr("alt")&&(i="Kies hoe we contact met u mogen opnemen."),s('<span class="error help-block contactway-reqired" role="alert">'+i+"<br></span>").insertAfter(e.find("#fagsi-contact-main-contactway"))}}),s("form#fagsi-contact-main").each(function(){setFormRequiredfagsi()}),s("form#fagsi-contact-main").on("change",'#fagsi-contact-main-contactway input[type="checkbox"]',function(){s(this).prop("checked")&&s("form#fagsi-contact-main .contactway-reqired").remove(),setFormRequiredfagsi()})}).call(e,i(0))},function(t,e,i){"use strict";(function(t){t(window).scroll(function(){300<window.scrollY?t("#goTop").addClass("visible"):t("#goTop").removeClass("visible")}),t("#goTop span").click(function(){t("html, body").animate({scrollTop:-1},1e3)})}).call(e,i(0))},function(t,e,i){"use strict";(function(t){t(document).ready(function(){t("#header-menu-mobile").click(function(){t("#header-menu .has-sub").removeClass("sub-open"),t(this).toggleClass("active"),t("header").toggleClass("menu-open"),t("header").removeClass("search-open lang-open")}),t("#header-menu .has-sub .sub-arrow").click(function(){t("#header-menu .has-sub .sub-arrow").not(this).parent().removeClass("sub-open"),t(this).parent().toggleClass("sub-open")}),t("#header-search").click(function(){t("header").toggleClass("search-open"),t("header").removeClass("menu-open lang-open"),t("#header-menu-mobile").removeClass("active"),t("header").hasClass("search-open")&&t("#header-search-overlay .form-control").focus()}),t("#header-lang").click(function(){t("header").toggleClass("lang-open"),t("header").removeClass("search-open menu-open"),t("#header-menu-mobile").removeClass("active")}),t("main").click(function(){t("#header-menu-mobile").removeClass("active"),t("#header-menu .has-sub").removeClass("sub-open"),t("header").removeClass("menu-open search-open lang-open")})})}).call(e,i(0))},function(t,e,i){"use strict";(function(t){t(".image-fill-col").closest(".container").css("overflow","hidden")}).call(e,i(0))},function(t,e,i){"use strict";(function(n){var s,r,i;function a(t){s.find("path.selectable").removeClass("active"),n(t).addClass("active");var e=n(t).attr("id");r.find(".container h2").text(mapData[e].title),""!=mapData[e].plz?r.find(".container h3").text(mapLang["map.postal"]+": "+mapData[e].plz).removeClass("hidden"):r.find(".container h3").text("").addClass("hidden");var i="";1<mapData[e].count?n.each(mapData[e].people,function(){i+='<div class="col-12 col-sm-6 col-xl-4 col-xxl-3 px-sm-50 py-50"><div class="p-50 p-xl-1 w-100 text-center cursor-pointer border-0">',""==this.photo&&(this.photo="/fileadmin/user_uploads/mapNoPhoto.jpg"),i+='<img src="'+this.photo+'" alt="" class="pb-15 pb-xl-2"><h4><span>'+this.name+"</span></h4><p>",this.position&&(i+="<b>"+this.position+"</b>"),i+=this.info+"<br>",this.phone&&(i+=mapLang["people.phone"]+": "+this.phone+"<br>"),this.mobile&&(i+=mapLang["people.mobile"]+": "+this.mobile+"<br>"),i+='<a href="'+mapLang["page.contact"]+'" class="btn">'+mapLang["people.btn_contact"]+"</a></p></div></div>"}):(i='<div class="col-12 col-sm-6 col-xl-4 col-xxl-3 px-sm-50 py-50"><div class="p-50 p-xl-1 w-100 text-center cursor-pointer border-0"><img src="'+mapData[e].people[0].photo+'" alt="Ansprechpartner" class="pb-15 pb-xl-2 img-fluid"><h4><span>'+mapData[e].people[0].name+"</span></h4><p>",mapData[e].people[0].position&&(i+="<b>"+mapData[e].people[0].position+"</b>"),i+=mapData[e].people[0].info+"<br>",mapData[e].people[0].phone&&(i+=mapLang["people.phone"]+": "+mapData[e].people[0].phone+"<br>"),mapData[e].people[0].mobile&&(i+=mapLang["people.mobile"]+": "+mapData[e].people[0].mobile+"<br>"),i+="a4"==e?'<a href="https://alho.ch/ch/kontakte/kontaktformular" target="_blank" class="btn">'+mapLang["people.btn_contact"]+"</a></p></div></div>":'<a href="'+mapLang["page.contact"]+'" class="btn">'+mapLang["people.btn_contact"]+"</a></p></div></div>"),r.find(".tiles1 .row").html(i).find("p").children("b").matchHeight(),r.find(".tiles1 .cursor-pointer").children("h4").matchHeight(),n.fn.matchHeight._update(),mapData[e].plz_all?o("DE"):o(e),r.addClass("visible")}function o(t){"DE"!=t&&""!=t?(i.find('input[name="map_plz"]').val("").prop("disabled",!0),i.find('select[name="map_country"]').val(t).selectpicker("refresh")):(i.find('input[name="map_plz"]').prop("disabled",!1),i.find('select[name="map_country"]').val("DE").selectpicker("refresh"))}n("#map").each(function(){n("#breadcrumb").addClass("hidden"),s=n(this),r=n("#map-details"),s.find("path.selectable").click(function(){i.find('input[name="map_plz"]').val(""),a(this),n("html, body").animate({scrollTop:r.offset().top-90},1e3)});var e=s.find(".mapTooltip");s.find("path.selectable").mouseleave(function(t){e.removeClass("visible")}),s.find("path.selectable, .mapTooltip").mousemove(function(t){e.css("left",t.pageX+3),e.css("top",t.pageY+3)}),s.find("path.selectable").mouseenter(function(t){e.text(mapRegions[n(this).attr("id")]),e.addClass("visible")})}),n("#map-filter").each(function(){(i=n(this)).find('select[name="map_country"]').change(function(){var t=n(this).val();o(t),"DE"!=t&&""!=t?(i.find('input[name="map_plz"]').val("").prop("disabled",!0),a(s.find("path.selectable#"+t))):(s.find("path.selectable").removeClass("active"),i.find('input[name="map_plz"]').prop("disabled",!1).focus())}),i.find('input[name="map_plz"]').keyup(function(){var i=n(this);1<i.val().length&&n.each(mapData,function(t,e){0<=mapData[t].plz_all.indexOf(i.val().substring(0,2))&&a(s.find("path.selectable#"+t))})})})}).call(e,i(0))},function(t,e,i){"use strict";(function(e){e(".image-fill-col").parent(".row > div").matchHeight({byRow:!1}),e(".tiles-people p").children("b").matchHeight(),e(".tiles-people div").children(".h4").matchHeight(),e(".video-preview .video-button, .video-object .video-close").click(function(){var t=e(this).parents().find(".video-object");t.toggleClass("visible"),t.find("video").length?t.hasClass("visible")?t.find("video").get(0).play():t.find("video").get(0).pause():t.is("[data-youtube]")&&(t.hasClass("visible")?t.find(".video-wrapper").html('<iframe width="1406" height="817" src="https://www.youtube-nocookie.com/embed/'+t.attr("data-youtube")+'?rel=0&showinfo=0&autoplay=1" frameborder="0" gesture="media" allow="encrypted-media" allowfullscreen></iframe>'):t.find(".video-wrapper").html(""))}),e(".youtube-video").each(function(){var t=e(this);t.height(t.width()/16*9)}),e(window).resize(function(){e(".youtube-video").each(function(){var t=e(this);t.height(t.width()/16*9)})})}).call(e,i(0))},function(t,e,i){"use strict";(function(e){var i;e(".form-overlay, .success-overlay").each(function(){var t=e(this);window.setTimeout(function(){t.removeClass("d-none bg-white")},500)}),e(".downloads a[data-file]").click(function(){var t=e(".form-overlay .container").outerHeight();window.innerHeight>t&&e(".form-overlay").css("padding-top",(window.innerHeight-t)/2),i=window.scrollY,0==e(".form-overlay .closeButton").length&&e(".form-overlay .container").append('<div class="closeButton" onclick="closeOverlay()"></div>'),e("#medien-CenterPlanmappen").length?(e("#medien-CenterPlanmappen-origin").val(e(this).data("origin")),e("#medien-CenterPlanmappen-file").val(e(this).data("file")),e("#medien-CenterPlanmappen-filepath").val(downloadData[e(this).data("file")].file)):e("#alho-ch-media-planmappen").length&&(e("#alho-ch-media-planmappen-origin").val(e(this).data("origin")),e("#alho-ch-media-planmappen-file").val(e(this).data("file")),e("#alho-ch-media-planmappen-filepath").val(downloadData[e(this).data("file")].file)),e("body").css("top",-1*i).addClass("formVisible")}),window.closeOverlay=function(){e("body").removeClass("formVisible successVisible").css("top",null),window.scrollTo(0,i)},window.setTimeout(function(){if(function(){for(var t,e=[],i=window.location.href.split("#")[0].slice(window.location.href.indexOf("?")+1).split("&"),n=0;n<i.length;n++)t=i[n].split("="),e.push(t[0]),e[t[0]]=t[1];return e}().file){var t=e(".success-overlay .container").outerHeight();window.innerHeight>t&&e(".success-overlay").css("padding-top",(window.innerHeight-t)/2),i=window.scrollY,0==e(".success-overlay .closeButton").length&&e(".success-overlay .container").append('<div class="closeButton" onclick="closeOverlay()"></div>'),e(".success-overlay .btn").length&&e(".success-overlay .btn").click(function(t){t.preventDefault(),closeOverlay()}),e("body").css("top",-1*i).addClass("successVisible")}},500)}).call(e,i(0))},function(t,e,i){"use strict";(function(i){if(i("#sidebar").length){var t=function(){i.each(i(".sidebar-item"),function(){i(this).find(".sidebar-content").css("max-height",i(window).height()-i("#sidebar").position().top-i(this).position().top-i(this).find(".sidebar-header").outerHeight()-56)})};t(),i("body").on("click","#sidebar .sidebar-header",function(){var t=i(this).closest(".sidebar-item"),e=i("#sidebar .sidebar-item.active");e.length&&(e.find(".sidebar-content").slideUp(600,function(){var t=i(this).closest(".sidebar-item");setTimeout(function(){t.removeClass("active")})}),t.hasClass("active"))||t.addClass("active").find(".sidebar-content").slideDown(600)}),i(window).on("resize orientationchange",function(){i("#sidebar .sidebar-item.active").removeClass("active").find(".sidebar-content").hide(),t()}),""!=location.hash&&i("#sidebar "+location.hash).length&&i("#sidebar "+location.hash).closest(".sidebar-item").addClass("active").find(".sidebar-content").slideDown(600)}}).call(e,i(0))},function(t,e,i){"use strict";(function(i){i(window).resize(function(){initTiles1(),t(),e(),i(".tiles3.isSlider .row").each(function(){var t=i(this);t.find(".slick-slide").css("height",t.find(".slick-slide").width())})}),i(".teaser").each(function(){var t=i(this);t.hasClass("isSlider")&&t.slick({arrows:!1,infinite:!0,autoplay:!0,autoplaySpeed:8e3,pauseOnHover:!1,fade:!0,speed:500,dots:!0}),t.after('<span id="firstContent"></span>'),t.append('<a href="#firstContent" class="teaser-arrow"></a>')}),i(".image-slider").each(function(){i(this).slick({arrows:!1,infinite:!0,autoplay:!0,autoplaySpeed:4e3,pauseOnHover:!0,speed:500,dots:!0})}),window.initTiles1=function(){i(".tiles1.isSlider .row").each(function(){var t=i(this);4<t.find("> div").length?(t.parent().addClass("forceSlider"),t.slick({arrows:!1,mobileFirst:!0,speed:1e3,slidesToShow:1,slidesToScroll:1,responsive:[{breakpoint:1200,settings:{slidesToShow:4}},{breakpoint:576,settings:{slidesToShow:2}}]})):window.innerWidth<1200&&!t.hasClass("slick-initialized")?(t.find("> div").first().removeClass("offset-15 offset-3"),t.find("> div").addClass("col-12"),t.slick({arrows:!1,mobileFirst:!0,speed:1e3,responsive:[{breakpoint:1200,settings:"unslick"},{breakpoint:576,settings:{slidesToShow:2,slidesToScroll:1}}]})):3==t.find("> div").length?(t.find("> div").first().addClass("offset-15"),t.find("> div").removeClass("col-12")):2==t.find("> div").length&&(t.find("> div").first().addClass("offset-3"),t.find("> div").removeClass("col-12")),t.find(".slick-slide").css("height","");var e=t.find(".slick-track").height();t.find(".slick-slide").css("height",e+"px")})},initTiles1();var t=function(){i(".tiles2.isSlider .row").each(function(){var t=i(this);4<t.find("> div").length?(t.parent().addClass("forceSlider"),t.slick({arrows:!1,mobileFirst:!0,speed:1e3,slidesToShow:1,slidesToScroll:1,responsive:[{breakpoint:1200,settings:{slidesToShow:4}},{breakpoint:576,settings:{slidesToShow:2}}]})):window.innerWidth<1200&&!t.hasClass("slick-initialized")?(t.find("> div").first().removeClass("offset-15 offset-3"),t.find("> div").addClass("col-12"),t.slick({arrows:!1,mobileFirst:!0,speed:1e3,responsive:[{breakpoint:1200,settings:"unslick"},{breakpoint:576,settings:{slidesToShow:2,slidesToScroll:1}}]})):3==t.find("> div").length?(t.find("> div").first().addClass("offset-15"),t.find("> div").removeClass("col-12")):2==t.find("> div").length&&(t.find("> div").first().addClass("offset-3"),t.find("> div").removeClass("col-12")),t.find(".col-xl-3").css("height","");var e=t.height();t.find(".col-xl-3").css("height",e+"px")})};t();i(".tiles3.isSlider .row").each(function(){var t=i(this);t.slick({arrows:!1,mobileFirst:!0,speed:1e3,slidesToShow:2,slidesToScroll:1,responsive:[{breakpoint:1800,settings:{slidesToShow:6}},{breakpoint:1200,settings:{slidesToShow:5}},{breakpoint:992,settings:{slidesToShow:4}},{breakpoint:576,settings:{slidesToShow:3}}]}),t.find(".slick-slide").css("height",t.find(".slick-slide").width())});i(".tiles4.isSlider .row").each(function(){var t=i(this);t.slick({arrows:!1,mobileFirst:!0,speed:1e3,responsive:[{breakpoint:1800,settings:{slidesToShow:3,slidesToScroll:1}},{breakpoint:992,settings:{slidesToShow:2,slidesToScroll:1}}]}),t.find(".slick-slide").css("height","");var e=t.find(".slick-track").height();t.find(".slick-slide").css("height",e+"px")});var e=function(){i(".tiles5.isSlider .container-fluid .row").each(function(){var t=i(this);t.find(".cursor-pointer").children(".h3").matchHeight(),window.innerWidth<1200&&!t.hasClass("slick-initialized")&&t.slick({arrows:!1,mobileFirst:!0,speed:1e3,infinite:!1,responsive:[{breakpoint:1200,settings:"unslick"},{breakpoint:576,settings:{slidesToShow:2,slidesToScroll:1}}]}),t.find(".slick-slide").css("height","");var e=t.find(".slick-track").height();t.find(".slick-slide").css("height",e+"px")})};e();function n(){i(".tiles6.isSlider").each(function(){var t=i(this);t.hasClass("slick-initialized")||t.slick({infinite:!1,arrows:!1,mobileFirst:!0,speed:1e3,slidesToShow:1,slidesToScroll:1,dots:!0,responsive:[{breakpoint:1800,settings:{slidesToShow:5,slidesToScroll:5}},{breakpoint:1200,settings:{slidesToShow:4,slidesToScroll:4}},{breakpoint:992,settings:{slidesToShow:3,slidesToScroll:3}},{breakpoint:576,settings:{slidesToShow:2,slidesToScroll:2}}]})})}n(),window.setTimeout(function(){i(".tiles1, .tiles2, .tiles3, .tiles5").find(".cursor-pointer").children("img").matchHeight(),i(".tiles1, .tiles2, .tiles3, .tiles5").find(".cursor-pointer").children(".h4").matchHeight(),initTiles1(),t(),e(),n(),i(".tiles3.isSlider .row").each(function(){var t=i(this);t.find(".slick-slide").css("height",t.find(".slick-slide").width())})},1e3),i(".tiles1, .tiles2, .tiles3, .tiles5").find(".row").on("setPosition",function(){i(this).find(".cursor-pointer").children("img").matchHeight(),i(this).find(".cursor-pointer").children(".h4").matchHeight()})}).call(e,i(0))},function(t,e,i){"use strict";(function(e){e(".stage-video [data-video]").each(function(){if(!(e(window).width()<768)){var t=e(this);t.replaceWith('<video class="d-block" poster="'+t.attr("src")+'" autoplay loop muted><source src="'+t.attr("data-video")+'" type="video/mp4"></video>')}})}).call(e,i(0))},function(t,e,i){var n,s,r;r=function(t){!function(E){"use strict";function t(t){if(null==this)throw new TypeError;var e=String(this);if(t&&"[object RegExp]"==o.call(t))throw new TypeError;var i=e.length,n=String(t),s=n.length,r=1<arguments.length?arguments[1]:void 0,a=r?Number(r):0;return a!=a&&(a=0),!(i<s+Math.min(Math.max(a,0),i))&&-1!=l.call(e,n,a)}var o,e,l,i,c;function n(t){if(null==this)throw new TypeError;var e=String(this);if(t&&"[object RegExp]"==c.call(t))throw new TypeError;var i=e.length,n=String(t),s=n.length,r=1<arguments.length?arguments[1]:void 0,a=r?Number(r):0;a!=a&&(a=0);var o=Math.min(Math.max(a,0),i);if(i<s+o)return!1;for(var l=-1;++l<s;)if(e.charCodeAt(o+l)!=n.charCodeAt(l))return!1;return!0}String.prototype.includes||(o={}.toString,e=function(){try{var t={},e=Object.defineProperty,i=e(t,t,t)&&e}catch(t){}return i}(),l="".indexOf,e?e(String.prototype,"includes",{value:t,configurable:!0,writable:!0}):String.prototype.includes=t),String.prototype.startsWith||(i=function(){try{var t={},e=Object.defineProperty,i=e(t,t,t)&&e}catch(t){}return i}(),c={}.toString,i?i(String.prototype,"startsWith",{value:n,configurable:!0,writable:!0}):String.prototype.startsWith=n),Object.keys||(Object.keys=function(t,e,i){for(e in i=[],t)i.hasOwnProperty.call(t,e)&&i.push(e);return i});var s={useDefault:!1,_set:E.valHooks.select.set};E.valHooks.select.set=function(t,e){return e&&!s.useDefault&&E(t).data("selected",!0),s._set.apply(this,arguments)};var T=null;function a(t){return E.each([{re:/[\xC0-\xC6]/g,ch:"A"},{re:/[\xE0-\xE6]/g,ch:"a"},{re:/[\xC8-\xCB]/g,ch:"E"},{re:/[\xE8-\xEB]/g,ch:"e"},{re:/[\xCC-\xCF]/g,ch:"I"},{re:/[\xEC-\xEF]/g,ch:"i"},{re:/[\xD2-\xD6]/g,ch:"O"},{re:/[\xF2-\xF6]/g,ch:"o"},{re:/[\xD9-\xDC]/g,ch:"U"},{re:/[\xF9-\xFC]/g,ch:"u"},{re:/[\xC7-\xE7]/g,ch:"c"},{re:/[\xD1]/g,ch:"N"},{re:/[\xF1]/g,ch:"n"}],function(){t=t?t.replace(this.re,this.ch):""}),t}E.fn.triggerNative=function(t){var e,i=this[0];i.dispatchEvent?("function"==typeof Event?e=new Event(t,{bubbles:!0}):(e=document.createEvent("Event")).initEvent(t,!0,!1),i.dispatchEvent(e)):i.fireEvent?((e=document.createEventObject()).eventType=t,i.fireEvent("on"+t,e)):this.trigger(t)},E.expr.pseudos.icontains=function(t,e,i){var n=E(t).find("span.dropdown-item-inner");return(n.data("tokens")||n.text()).toString().toUpperCase().includes(i[3].toUpperCase())},E.expr.pseudos.ibegins=function(t,e,i){var n=E(t).find("span.dropdown-item-inner");return(n.data("tokens")||n.text()).toString().toUpperCase().startsWith(i[3].toUpperCase())},E.expr.pseudos.aicontains=function(t,e,i){var n=E(t).find("span.dropdown-item-inner");return(n.data("tokens")||n.data("normalizedText")||n.text()).toString().toUpperCase().includes(i[3].toUpperCase())},E.expr.pseudos.aibegins=function(t,e,i){var n=E(t).find("span.dropdown-item-inner");return(n.data("tokens")||n.data("normalizedText")||n.text()).toString().toUpperCase().startsWith(i[3].toUpperCase())};function r(e){function i(t){return e[t]}var t="(?:"+Object.keys(e).join("|")+")",n=RegExp(t),s=RegExp(t,"g");return function(t){return t=null==t?"":""+t,n.test(t)?t.replace(s,i):t}}var x=r({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"}),u=r({"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#x27;":"'","&#x60;":"`"}),h=function(t,e){s.useDefault||(E.valHooks.select.set=s._set,s.useDefault=!0),this.$element=E(t),this.$newElement=null,this.$button=null,this.$menu=null,this.$lis=null,this.options=e,null===this.options.title&&(this.options.title=this.$element.attr("title"));var i=this.options.windowPadding;"number"==typeof i&&(this.options.windowPadding=[i,i,i,i]),this.val=h.prototype.val,this.render=h.prototype.render,this.refresh=h.prototype.refresh,this.setStyle=h.prototype.setStyle,this.selectAll=h.prototype.selectAll,this.deselectAll=h.prototype.deselectAll,this.destroy=h.prototype.destroy,this.remove=h.prototype.remove,this.show=h.prototype.show,this.hide=h.prototype.hide,this.init()};function d(t){var r,a=arguments,o=t;[].shift.apply(a);var e=this.each(function(){var t=E(this);if(t.is("select")){var e=t.data("selectpicker"),i="object"==typeof o&&o;if(e){if(i)for(var n in i)i.hasOwnProperty(n)&&(e.options[n]=i[n])}else{var s=E.extend({},h.DEFAULTS,E.fn.selectpicker.defaults||{},t.data(),i);s.template=E.extend({},h.DEFAULTS.template,E.fn.selectpicker.defaults?E.fn.selectpicker.defaults.template:{},t.data().template,i.template),t.data("selectpicker",e=new h(this,s))}"string"==typeof o&&(r=e[o]instanceof Function?e[o].apply(e,a):e.options[o])}});return void 0!==r?r:e}h.VERSION="1.12.2",h.DEFAULTS={noneSelectedText:"Nothing selected",noneResultsText:"No results matched {0}",countSelectedText:function(t,e){return 1==t?"{0} item selected":"{0} items selected"},maxOptionsText:function(t,e){return[1==t?"Limit reached ({n} item max)":"Limit reached ({n} items max)",1==e?"Group limit reached ({n} item max)":"Group limit reached ({n} items max)"]},selectAllText:"Select All",deselectAllText:"Deselect All",doneButton:!1,doneButtonText:"Close",multipleSeparator:", ",styleBase:"btn",style:"btn-default btn-light",size:"auto",title:null,selectedTextFormat:"values",width:!1,container:!1,hideDisabled:!1,showSubtext:!1,showIcon:!0,showContent:!0,dropupAuto:!0,header:!1,liveSearch:!1,liveSearchPlaceholder:null,liveSearchNormalize:!1,liveSearchStyle:"contains",actionsBox:!1,iconBase:"fa",tickIcon:"fa-check",showTick:!1,template:{caret:'<span class="caret"></span>'},maxOptions:!1,mobile:!1,selectOnTab:!1,dropdownAlignRight:!1,windowPadding:0},h.prototype={constructor:h,init:function(){var e=this,t=this.$element.attr("id");this.$element.addClass("bs-select-hidden"),this.liObj={},this.multiple=this.$element.prop("multiple"),this.autofocus=this.$element.prop("autofocus"),this.$newElement=this.createView(),this.$element.after(this.$newElement).appendTo(this.$newElement),this.$button=this.$newElement.children("button"),this.$menu=this.$newElement.children(".dropdown-menu"),this.$menuInner=this.$menu.children(".inner"),this.$searchbox=this.$menu.find("input"),this.$element.removeClass("bs-select-hidden"),!0===this.options.dropdownAlignRight&&this.$menu.addClass("dropdown-menu-right"),void 0!==t&&(this.$button.attr("data-id",t),E('label[for="'+t+'"]').click(function(t){t.preventDefault(),e.$button.focus()})),this.checkDisabled(),this.clickListener(),this.options.liveSearch&&this.liveSearchListener(),this.render(),this.setStyle(),this.setWidth(),this.options.container&&this.selectPosition(),this.$menu.data("this",this),this.$newElement.data("this",this),this.options.mobile&&this.mobile(),this.$newElement.on({"hide.bs.dropdown":function(t){e.$menuInner.attr("aria-expanded",!1),e.$element.trigger("hide.bs.select",t)},"hidden.bs.dropdown":function(t){e.$element.trigger("hidden.bs.select",t)},"show.bs.dropdown":function(t){e.$menuInner.attr("aria-expanded",!0),e.$element.trigger("show.bs.select",t)},"shown.bs.dropdown":function(t){e.$element.trigger("shown.bs.select",t)}}),e.$element[0].hasAttribute("required")&&this.$element.on("invalid",function(){e.$button.addClass("bs-invalid").focus(),e.$element.on({"focus.bs.select":function(){e.$button.focus(),e.$element.off("focus.bs.select")},"shown.bs.select":function(){e.$element.val(e.$element.val()).off("shown.bs.select")},"rendered.bs.select":function(){this.validity.valid&&e.$button.removeClass("bs-invalid"),e.$element.off("rendered.bs.select")}})}),setTimeout(function(){e.$element.trigger("loaded.bs.select")})},createDropdown:function(){var t=this.multiple||this.options.showTick?" show-tick":"",e=this.$element.parent().hasClass("input-group")?" input-group-btn":"",i=this.autofocus?" autofocus":"",n=this.options.header?'<div class="popover-title"><button type="button" class="close" aria-hidden="true">&times;</button>'+this.options.header+"</div>":"",s=this.options.liveSearch?'<div class="bs-searchbox"><input type="text" class="form-control" autocomplete="off"'+(null===this.options.liveSearchPlaceholder?"":' placeholder="'+x(this.options.liveSearchPlaceholder)+'"')+' role="textbox" aria-label="Search"></div>':"",r=this.multiple&&this.options.actionsBox?'<div class="bs-actionsbox"><div class="btn-group btn-group-sm btn-block"><button type="button" class="actions-btn bs-select-all btn btn-default btn-light">'+this.options.selectAllText+'</button><button type="button" class="actions-btn bs-deselect-all btn btn-default btn-light">'+this.options.deselectAllText+"</button></div></div>":"",a=this.multiple&&this.options.doneButton?'<div class="bs-donebutton"><div class="btn-group btn-block"><button type="button" class="btn btn-sm btn-default btn-light">'+this.options.doneButtonText+"</button></div></div>":"",o='<div class="btn-group bootstrap-select'+t+e+'"><button type="button" class="'+this.options.styleBase+' dropdown-toggle" data-toggle="dropdown"'+i+' role="button"><span class="filter-option pull-left"></span>&nbsp;<span class="bs-caret">'+this.options.template.caret+'</span></button><div class="dropdown-menu open" role="combobox">'+n+s+r+'<div class="dropdown-menu inner" role="listbox" aria-expanded="false"></div>'+a+"</div></div>";return E(o)},createView:function(){var t=this.createDropdown(),e=this.createLi();return t.find("div.inner")[0].innerHTML=e,t},reloadLi:function(){var t=this.createLi();this.$menuInner[0].innerHTML=t},createLi:function(){function _(t,e,i,n){return"<a"+(void 0!==(i="dropdown-item "+(i||""))&&""!==i?' class="'+i+'"':"")+(null!=e?' data-original-index="'+e+'"':"")+(null!=n?'data-optgroup="'+n+'"':"")+">"+t+"</a>"}function b(t,e,i,n){return'<span tabindex="0"'+(void 0!==(e="dropdown-item-inner "+(e||""))?' class="'+e+'"':"")+(i?' style="'+i+'"':"")+(T.options.liveSearchNormalize?' data-normalized-text="'+a(x(E(t).html()))+'"':"")+(void 0!==n||null!==n?' data-tokens="'+n+'"':"")+' role="option">'+t+'<span class="'+T.options.iconBase+" "+T.options.tickIcon+' check-mark"></span></span>'}var T=this,w=[],k=0,t=document.createElement("option"),S=-1;if(this.options.title&&!this.multiple&&(S--,!this.$element.find(".bs-title-option").length)){var e=this.$element[0];t.className="bs-title-option",t.innerHTML=this.options.title,t.value="",e.insertBefore(t,e.firstChild),void 0===E(e.options[e.selectedIndex]).attr("selected")&&void 0===this.$element.data("selected")&&(t.selected=!0)}var C=this.$element.find("option");return C.each(function(t){var e=E(this);if(S++,!e.hasClass("bs-title-option")){var i,n=this.className||"",s=x(this.style.cssText),r=e.data("content")?e.data("content"):e.html(),a=e.data("tokens")?e.data("tokens"):null,o=void 0!==e.data("subtext")?'<small class="text-muted">'+e.data("subtext")+"</small>":"",l=void 0!==e.data("icon")?'<span class="'+T.options.iconBase+" "+e.data("icon")+'"></span> ':"",c=e.parent(),u="OPTGROUP"===c[0].tagName,h=u&&c[0].disabled,d=this.disabled||h;if(""!==l&&d&&(l="<span>"+l+"</span>"),T.options.hideDisabled&&(d&&!u||h))return i=e.data("prevHiddenIndex"),e.next().data("prevHiddenIndex",void 0!==i?i:t),void S--;if(e.data("content")||(r=l+'<span class="text">'+r+o+"</span>"),u&&!0!==e.data("divider")){if(T.options.hideDisabled&&d){if(void 0===c.data("allOptionsDisabled")){var p=c.children();c.data("allOptionsDisabled",p.filter(":disabled").length===p.length)}if(c.data("allOptionsDisabled"))return void S--}var f=" "+c[0].className||"";if(0===e.index()){k+=1;var m=c[0].label,g=void 0!==c.data("subtext")?'<small class="text-muted">'+c.data("subtext")+"</small>":"";m=(c.data("icon")?'<span class="'+T.options.iconBase+" "+c.data("icon")+'"></span> ':"")+'<span class="text">'+x(m)+g+"</span>",0!==t&&0<w.length&&(S++,w.push(_("",null,"divider",k+"div"))),S++,w.push(_(m,null,"dropdown-header"+f,k))}if(T.options.hideDisabled&&d)return void S--;w.push(_(b(r,"opt "+n+f,s,a),t,"",k))}else if(!0===e.data("divider"))w.push(_("",t,"divider"));else if(!0===e.data("hidden"))i=e.data("prevHiddenIndex"),e.next().data("prevHiddenIndex",void 0!==i?i:t),w.push(_(b(r,n,s,a),t,"hidden is-hidden"));else{var v=this.previousElementSibling&&"OPTGROUP"===this.previousElementSibling.tagName;if(!v&&T.options.hideDisabled&&void 0!==(i=e.data("prevHiddenIndex"))){var y=C.eq(i)[0].previousElementSibling;y&&"OPTGROUP"===y.tagName&&!y.disabled&&(v=!0)}v&&(S++,w.push(_("",null,"divider",k+"div"))),w.push(_(b(r,n,s,a),t))}T.liObj[t]=S}}),this.multiple||0!==this.$element.find("option:selected").length||this.options.title||this.$element.find("option").eq(0).prop("selected",!0).attr("selected","selected"),w.join("")},findLis:function(){return null==this.$lis&&(this.$lis=this.$menu.find("a")),this.$lis},render:function(t){var e,n=this,i=this.$element.find("option");!1!==t&&i.each(function(t){var e=n.findLis().eq(n.liObj[t]);n.setDisabled(t,this.disabled||"OPTGROUP"===this.parentNode.tagName&&this.parentNode.disabled,e),n.setSelected(t,this.selected,e)}),this.togglePlaceholder(),this.tabIndex();var s=i.map(function(){if(this.selected){if(n.options.hideDisabled&&(this.disabled||"OPTGROUP"===this.parentNode.tagName&&this.parentNode.disabled))return;var t,e=E(this),i=e.data("icon")&&n.options.showIcon?'<i class="'+n.options.iconBase+" "+e.data("icon")+'"></i> ':"";return t=n.options.showSubtext&&e.data("subtext")&&!n.multiple?' <small class="text-muted">'+e.data("subtext")+"</small>":"",void 0!==e.attr("title")?e.attr("title"):e.data("content")&&n.options.showContent?e.data("content").toString():i+e.html()+t}}).toArray(),r=this.multiple?s.join(this.options.multipleSeparator):s[0];if(this.multiple&&-1<this.options.selectedTextFormat.indexOf("count")){var a=this.options.selectedTextFormat.split(">");if(1<a.length&&s.length>a[1]||1==a.length&&2<=s.length){e=this.options.hideDisabled?", [disabled]":"";var o=i.not('[data-divider="true"], [data-hidden="true"]'+e).length;r=("function"==typeof this.options.countSelectedText?this.options.countSelectedText(s.length,o):this.options.countSelectedText).replace("{0}",s.length.toString()).replace("{1}",o.toString())}}null==this.options.title&&(this.options.title=this.$element.attr("title")),"static"==this.options.selectedTextFormat&&(r=this.options.title),r=r||(void 0!==this.options.title?this.options.title:this.options.noneSelectedText),this.$button.attr("title",u(E.trim(r.replace(/<[^>]*>?/g,"")))),this.$button.children(".filter-option").html(r),this.$element.trigger("rendered.bs.select")},setStyle:function(t,e){this.$element.attr("class")&&this.$newElement.addClass(this.$element.attr("class").replace(/selectpicker|mobile-device|bs-select-hidden|validate\[.*\]/gi,""));var i=t||this.options.style;"add"==e?this.$button.addClass(i):"remove"==e?this.$button.removeClass(i):(this.$button.removeClass(this.options.style),this.$button.addClass(i))},liHeight:function(t){if(t||!1!==this.options.size&&!this.sizeInfo){var e=document.createElement("div"),i=document.createElement("div"),n=document.createElement("ul"),s=document.createElement("a"),r=document.createElement("a"),a=document.createElement("span"),o=document.createElement("span"),l=this.options.header&&0<this.$menu.find(".popover-title").length?this.$menu.find(".popover-title")[0].cloneNode(!0):null,c=this.options.liveSearch?document.createElement("div"):null,u=this.options.actionsBox&&this.multiple&&0<this.$menu.find(".bs-actionsbox").length?this.$menu.find(".bs-actionsbox")[0].cloneNode(!0):null,h=this.options.doneButton&&this.multiple&&0<this.$menu.find(".bs-donebutton").length?this.$menu.find(".bs-donebutton")[0].cloneNode(!0):null;if(o.className="text",e.className=this.$menu[0].parentNode.className+" show open",i.className="dropdown-menu open show",n.className="dropdown-menu inner",s.className="divider",a.className="dropdown-item-inner",o.appendChild(document.createTextNode("Inner text")),a.appendChild(o),r.appendChild(a),n.appendChild(r),n.appendChild(s),l&&i.appendChild(l),c){var d=document.createElement("input");c.className="bs-searchbox",d.className="form-control",c.appendChild(d),i.appendChild(c)}u&&i.appendChild(u),i.appendChild(n),h&&i.appendChild(h),e.appendChild(i),document.body.appendChild(e);var p=a.offsetHeight,f=l?l.offsetHeight:0,m=c?c.offsetHeight:0,g=u?u.offsetHeight:0,v=h?h.offsetHeight:0,y=E(s).outerHeight(!0),_="function"==typeof getComputedStyle&&getComputedStyle(i),b=_?null:E(i),T={vert:parseInt(_?_.paddingTop:b.css("paddingTop"))+parseInt(_?_.paddingBottom:b.css("paddingBottom"))+parseInt(_?_.borderTopWidth:b.css("borderTopWidth"))+parseInt(_?_.borderBottomWidth:b.css("borderBottomWidth")),horiz:parseInt(_?_.paddingLeft:b.css("paddingLeft"))+parseInt(_?_.paddingRight:b.css("paddingRight"))+parseInt(_?_.borderLeftWidth:b.css("borderLeftWidth"))+parseInt(_?_.borderRightWidth:b.css("borderRightWidth"))},w={vert:T.vert+parseInt(_?_.marginTop:b.css("marginTop"))+parseInt(_?_.marginBottom:b.css("marginBottom"))+2,horiz:T.horiz+parseInt(_?_.marginLeft:b.css("marginLeft"))+parseInt(_?_.marginRight:b.css("marginRight"))+2};document.body.removeChild(e),this.sizeInfo={liHeight:p,headerHeight:f,searchHeight:m,actionsHeight:g,doneButtonHeight:v,dividerHeight:y,menuPadding:T,menuExtras:w}}},setSize:function(){if(this.findLis(),this.liHeight(),this.options.header&&this.$menu.css("padding-top",0),!1!==this.options.size){var r,a,o,l,c,u,h,d,p=this,f=this.$menu,m=this.$menuInner,s=E(window),g=this.$newElement[0].offsetHeight,v=this.$newElement[0].offsetWidth,y=this.sizeInfo.liHeight,_=this.sizeInfo.headerHeight,b=this.sizeInfo.searchHeight,T=this.sizeInfo.actionsHeight,w=this.sizeInfo.doneButtonHeight,t=this.sizeInfo.dividerHeight,k=this.sizeInfo.menuPadding,S=this.sizeInfo.menuExtras,e=this.options.hideDisabled?".disabled":"",C=function(){var t,e=p.$newElement.offset(),i=E(p.options.container);p.options.container&&!i.is("body")?((t=i.offset()).top+=parseInt(i.css("borderTopWidth")),t.left+=parseInt(i.css("borderLeftWidth"))):t={top:0,left:0};var n=p.options.windowPadding;c=e.top-t.top-s.scrollTop(),u=s.height()-c-g-t.top-n[2],h=e.left-t.left-s.scrollLeft(),d=s.width()-h-v-t.left-n[1],c-=n[0],h-=n[3]};if(C(),"auto"===this.options.size){var i=function(){function t(e,i){return function(t){return i?t.classList?t.classList.contains(e):E(t).hasClass(e):!(t.classList?t.classList.contains(e):E(t).hasClass(e))}}var e,i=p.$menuInner[0].getElementsByTagName("a"),n=Array.prototype.filter?Array.prototype.filter.call(i,t("hidden",!1)):p.$lis.not(".hidden"),s=Array.prototype.filter?Array.prototype.filter.call(n,t("dropdown-header",!0)):n.filter(".dropdown-header");C(),r=u-S.vert,a=d-S.horiz,l=p.options.container?(f.data("height")||f.data("height",f.height()),o=f.data("height"),f.data("width")||f.data("width",f.width()),f.data("width")):(o=f.height(),f.width()),p.options.dropupAuto&&p.$newElement.toggleClass("dropup",u<c&&r-S.vert<o),p.$newElement.hasClass("dropup")&&(r=c-S.vert),"auto"===p.options.dropdownAlignRight&&f.toggleClass("dropdown-menu-right",d<h&&a-S.horiz<l-v),e=3<n.length+s.length?3*y+S.vert-2:0,f.css({"max-height":r+"px",overflow:"hidden","min-height":e+_+b+T+w+"px"}),m.css({"max-height":r-_-b-T-w-k.vert+"px","overflow-y":"auto","min-height":Math.max(e-k.vert,0)+"px"})};i(),this.$searchbox.off("input.getSize propertychange.getSize").on("input.getSize propertychange.getSize",i),s.off("resize.getSize scroll.getSize").on("resize.getSize scroll.getSize",i)}else if(this.options.size&&"auto"!=this.options.size&&this.$lis.not(e).length>this.options.size){var n=this.$lis.not(".divider").not(e).children().slice(0,this.options.size).last().parent().index(),x=this.$lis.slice(0,n+1).filter(".divider").length;r=y*this.options.size+x*t+k.vert,o=p.options.container?(f.data("height")||f.data("height",f.height()),f.data("height")):f.height(),p.options.dropupAuto&&this.$newElement.toggleClass("dropup",u<c&&r-S.vert<o),f.css({"max-height":r+_+b+T+w+"px",overflow:"hidden","min-height":""}),m.css({"max-height":r-k.vert+"px","overflow-y":"auto","min-height":""})}}},setWidth:function(){if("auto"===this.options.width){this.$menu.css("min-width","0");var t=this.$menu.parent().clone().appendTo("body"),e=this.options.container?this.$newElement.clone().appendTo("body"):t,i=t.children(".dropdown-menu").outerWidth(),n=e.css("width","auto").children("button").outerWidth();t.remove(),e.remove(),this.$newElement.css("width",Math.max(i,n)+"px")}else"fit"===this.options.width?(this.$menu.css("min-width",""),this.$newElement.css("width","").addClass("fit-width")):this.options.width?(this.$menu.css("min-width",""),this.$newElement.css("width",this.options.width)):(this.$menu.css("min-width",""),this.$newElement.css("width",""));this.$newElement.hasClass("fit-width")&&"fit"!==this.options.width&&this.$newElement.removeClass("fit-width")},selectPosition:function(){this.$bsContainer=E('<div class="bs-container" />');function e(t){r.$bsContainer.addClass(t.attr("class").replace(/form-control|fit-width/gi,"")).toggleClass("dropup",t.hasClass("dropup")),i=t.offset(),a.is("body")?n={top:0,left:0}:((n=a.offset()).top+=parseInt(a.css("borderTopWidth"))-a.scrollTop(),n.left+=parseInt(a.css("borderLeftWidth"))-a.scrollLeft()),s=t.hasClass("dropup")?0:t[0].offsetHeight,r.$bsContainer.css({top:i.top-n.top+s,left:i.left-n.left,width:t[0].offsetWidth})}var i,n,s,r=this,a=E(this.options.container);this.$button.on("click",function(){var t=E(this);r.isDisabled()||(e(r.$newElement),r.$bsContainer.appendTo(r.options.container).toggleClass("open",!t.hasClass("open")).append(r.$menu))}),E(window).on("resize scroll",function(){e(r.$newElement)}),this.$element.on("hide.bs.select",function(){r.$menu.data("height",r.$menu.height()),r.$bsContainer.detach()})},setSelected:function(t,e,i){i||(this.togglePlaceholder(),i=this.findLis().eq(this.liObj[t])),i.toggleClass("selected",e).find("span.dropdown-item-inner").attr("aria-selected",e)},setDisabled:function(t,e,i){i=i||this.findLis().eq(this.liObj[t]),e?i.addClass("disabled").children("span.dropdown-item-inner").attr("href","#").attr("tabindex",-1).attr("aria-disabled",!0):i.removeClass("disabled").children("span.dropdown-item-inner").removeAttr("href").attr("tabindex",0).attr("aria-disabled",!1)},isDisabled:function(){return this.$element[0].disabled},checkDisabled:function(){var t=this;this.isDisabled()?(this.$newElement.addClass("disabled"),this.$button.addClass("disabled").attr("tabindex",-1).attr("aria-disabled",!0)):(this.$button.hasClass("disabled")&&(this.$newElement.removeClass("disabled"),this.$button.removeClass("disabled").attr("aria-disabled",!1)),-1!=this.$button.attr("tabindex")||this.$element.data("tabindex")||this.$button.removeAttr("tabindex")),this.$button.click(function(){return!t.isDisabled()})},togglePlaceholder:function(){var t=this.$element.val();this.$button.toggleClass("bs-placeholder",null===t||""===t||t.constructor===Array&&0===t.length)},tabIndex:function(){this.$element.data("tabindex")!==this.$element.attr("tabindex")&&-98!==this.$element.attr("tabindex")&&"-98"!==this.$element.attr("tabindex")&&(this.$element.data("tabindex",this.$element.attr("tabindex")),this.$button.attr("tabindex",this.$element.data("tabindex"))),this.$element.attr("tabindex",-98)},clickListener:function(){var b=this,e=E(document);e.data("spaceSelect",!1),this.$button.on("keyup",function(t){/(32)/.test(t.keyCode.toString(10))&&e.data("spaceSelect")&&(t.preventDefault(),e.data("spaceSelect",!1))}),this.$button.on("click",function(){b.setSize()}),this.$element.on("shown.bs.select",function(){if(b.options.liveSearch||b.multiple){if(!b.multiple){var t=b.liObj[b.$element[0].selectedIndex];if("number"!=typeof t||!1===b.options.size)return;var e=b.$lis.eq(t)[0].offsetTop-b.$menuInner[0].offsetTop;e=e-b.$menuInner[0].offsetHeight/2+b.sizeInfo.liHeight/2,b.$menuInner[0].scrollTop=e}}else b.$menuInner.find(".selected a").focus()}),this.$menuInner.on("click","a span.dropdown-item-inner",function(t){var e=E(this),i=e.parent().data("originalIndex"),n=b.$element.val(),s=b.$element.prop("selectedIndex"),r=!0;if(b.multiple&&1!==b.options.maxOptions&&t.stopPropagation(),t.preventDefault(),!b.isDisabled()&&!e.parent().hasClass("disabled")){var a=b.$element.find("option"),o=a.eq(i),l=o.prop("selected"),c=o.parent("optgroup"),u=b.options.maxOptions,h=c.data("maxOptions")||!1;if(b.multiple){if(o.prop("selected",!l),b.setSelected(i,!l),e.blur(),!1!==u||!1!==h){var d=u<a.filter(":selected").length,p=h<c.find("option:selected").length;if(u&&d||h&&p)if(u&&1==u)a.prop("selected",!1),o.prop("selected",!0),b.$menuInner.find(".selected").removeClass("selected"),b.setSelected(i,!0);else if(h&&1==h){c.find("option:selected").prop("selected",!1),o.prop("selected",!0);var f=e.parent().data("optgroup");b.$menuInner.find('[data-optgroup="'+f+'"]').removeClass("selected"),b.setSelected(i,!0)}else{var m="string"==typeof b.options.maxOptionsText?[b.options.maxOptionsText,b.options.maxOptionsText]:b.options.maxOptionsText,g="function"==typeof m?m(u,h):m,v=g[0].replace("{n}",u),y=g[1].replace("{n}",h),_=E('<div class="notify"></div>');g[2]&&(v=v.replace("{var}",g[2][1<u?0:1]),y=y.replace("{var}",g[2][1<h?0:1])),o.prop("selected",!1),b.$menu.append(_),u&&d&&(_.append(E("<div>"+v+"</div>")),r=!1,b.$element.trigger("maxReached.bs.select")),h&&p&&(_.append(E("<div>"+y+"</div>")),r=!1,b.$element.trigger("maxReachedGrp.bs.select")),setTimeout(function(){b.setSelected(i,!1)},10),_.delay(750).fadeOut(300,function(){E(this).remove()})}}}else a.prop("selected",!1),o.prop("selected",!0),b.$menuInner.find(".selected").removeClass("selected").find("span.dropdown-item-inner").attr("aria-selected",!1),b.setSelected(i,!0);!b.multiple||b.multiple&&1===b.options.maxOptions?b.$button.focus():b.options.liveSearch&&b.$searchbox.focus(),r&&(n!=b.$element.val()&&b.multiple||s!=b.$element.prop("selectedIndex")&&!b.multiple)&&(T=[i,o.prop("selected"),l],b.$element.triggerNative("change"))}}),this.$menu.on("click","a.disabled span.dropdown-item-inner , .popover-title, .popover-title :not(.close)",function(t){t.currentTarget==this&&(t.preventDefault(),t.stopPropagation(),b.options.liveSearch&&!E(t.target).hasClass("close")?b.$searchbox.focus():b.$button.focus())}),this.$menuInner.on("click",".divider, .dropdown-header",function(t){t.preventDefault(),t.stopPropagation(),b.options.liveSearch?b.$searchbox.focus():b.$button.focus()}),this.$menu.on("click",".popover-title .close",function(){b.$button.click()}),this.$searchbox.on("click",function(t){t.stopPropagation()}),this.$menu.on("click",".actions-btn",function(t){b.options.liveSearch?b.$searchbox.focus():b.$button.focus(),t.preventDefault(),t.stopPropagation(),E(this).hasClass("bs-select-all")?b.selectAll():b.deselectAll()}),this.$element.change(function(){b.render(!1),b.$element.trigger("changed.bs.select",T),T=null})},liveSearchListener:function(){var s=this,r=E('<li class="no-results"></li>');this.$button.on("click.dropdown.data-api",function(){s.$menuInner.find(".active").removeClass("active"),s.$searchbox.val()&&(s.$searchbox.val(""),s.$lis.not(".is-hidden").removeClass("hidden"),r.parent().length&&r.remove()),s.multiple||s.$menuInner.find(".selected").addClass("active"),setTimeout(function(){s.$searchbox.focus()},10)}),this.$searchbox.on("click.dropdown.data-api focus.dropdown.data-api touchend.dropdown.data-api",function(t){t.stopPropagation()}),this.$searchbox.on("input propertychange",function(){if(s.$lis.not(".is-hidden").removeClass("hidden"),s.$lis.filter(".active").removeClass("active"),r.remove(),s.$searchbox.val()){var t,e=s.$lis.not(".is-hidden, .divider, .dropdown-header");if((t=s.options.liveSearchNormalize?e.not(":a"+s._searchStyle()+'("'+a(s.$searchbox.val())+'")'):e.not(":"+s._searchStyle()+'("'+s.$searchbox.val()+'")')).length===e.length)r.html(s.options.noneResultsText.replace("{0}",'"'+x(s.$searchbox.val())+'"')),s.$menuInner.append(r),s.$lis.addClass("hidden");else{t.addClass("hidden");var i,n=s.$lis.not(".hidden");n.each(function(t){var e=E(this);e.hasClass("divider")?void 0===i?e.addClass("hidden"):(i&&i.addClass("hidden"),i=e):e.hasClass("dropdown-header")&&n.eq(t+1).data("optgroup")!==e.data("optgroup")?e.addClass("hidden"):i=null}),i&&i.addClass("hidden"),e.not(".hidden").first().addClass("active"),s.$menuInner.scrollTop(0)}}})},_searchStyle:function(){return{begins:"ibegins",startsWith:"ibegins"}[this.options.liveSearchStyle]||"icontains"},val:function(t){return void 0!==t?(this.$element.val(t),this.render(),this.$element):this.$element.val()},changeAll:function(t){if(this.multiple){void 0===t&&(t=!0),this.findLis();var e=this.$element.find("option"),i=this.$lis.not(".divider, .dropdown-header, .disabled, .hidden"),n=i.length,s=[];if(t){if(i.filter(".selected").length===i.length)return}else if(0===i.filter(".selected").length)return;i.toggleClass("selected",t);for(var r=0;r<n;r++){var a=i[r].getAttribute("data-original-index");s[s.length]=e.eq(a)[0]}E(s).prop("selected",t),this.render(!1),this.togglePlaceholder(),this.$element.triggerNative("change")}},selectAll:function(){return this.changeAll(!0)},deselectAll:function(){return this.changeAll(!1)},toggle:function(t){(t=t||window.event)&&t.stopPropagation(),this.$button.trigger("click")},keydown:function(e){var t,i,n,s,r=E(this),a=(r.is("input")?r.parent().parent():r.parent()).data("this"),o=":not(.disabled, .hidden, .dropdown-header, .divider)",l={32:" ",48:"0",49:"1",50:"2",51:"3",52:"4",53:"5",54:"6",55:"7",56:"8",57:"9",59:";",65:"a",66:"b",67:"c",68:"d",69:"e",70:"f",71:"g",72:"h",73:"i",74:"j",75:"k",76:"l",77:"m",78:"n",79:"o",80:"p",81:"q",82:"r",83:"s",84:"t",85:"u",86:"v",87:"w",88:"x",89:"y",90:"z",96:"0",97:"1",98:"2",99:"3",100:"4",101:"5",102:"6",103:"7",104:"8",105:"9"};if(!(s=a.$newElement.hasClass("open"))&&(48<=e.keyCode&&e.keyCode<=57||96<=e.keyCode&&e.keyCode<=105||65<=e.keyCode&&e.keyCode<=90))return a.options.container?a.$button.trigger("click"):(a.setSize(),a.$menu.parent().addClass("open"),s=!0),void a.$searchbox.focus();if(a.options.liveSearch&&/(^9$|27)/.test(e.keyCode.toString(10))&&s&&(e.preventDefault(),e.stopPropagation(),a.$menuInner.click(),a.$button.focus()),/(38|40)/.test(e.keyCode.toString(10))){if(!(t=a.$lis.filter(o)).length)return;i=a.options.liveSearch?t.index(t.filter(".active")):t.index(t.find("span.dropdown-item-inner").filter(":focus").parent()),n=a.$menuInner.data("prevIndex"),38==e.keyCode?(!a.options.liveSearch&&i!=n||-1==i||i--,i<0&&(i+=t.length)):40==e.keyCode&&(!a.options.liveSearch&&i!=n||i++,i%=t.length),a.$menuInner.data("prevIndex",i),a.options.liveSearch?(e.preventDefault(),r.hasClass("dropdown-toggle")||(t.removeClass("active").eq(i).addClass("active").children("span.dropdown-item-inner").focus(),r.focus())):t.eq(i).children("span.dropdown-item-inner").focus()}else if(!r.is("input")){var c,u=[];(t=a.$lis.filter(o)).each(function(t){E.trim(E(this).children("span.dropdown-item-inner").text().toLowerCase()).substring(0,1)==l[e.keyCode]&&u.push(t)}),c=E(document).data("keycount"),c++,E(document).data("keycount",c),E.trim(E(":focus").text().toLowerCase()).substring(0,1)!=l[e.keyCode]?(c=1,E(document).data("keycount",c)):c>=u.length&&(E(document).data("keycount",0),c>u.length&&(c=1)),t.eq(u[c-1]).children("span.dropdown-item-inner").focus()}if((/(13|32)/.test(e.keyCode.toString(10))||/(^9$)/.test(e.keyCode.toString(10))&&a.options.selectOnTab)&&s){if(/(32)/.test(e.keyCode.toString(10))||e.preventDefault(),a.options.liveSearch)/(32)/.test(e.keyCode.toString(10))||(a.$menuInner.find(".active a").click(),r.focus());else{var h=E(":focus");h.click(),h.focus(),e.preventDefault(),E(document).data("spaceSelect",!0)}E(document).data("keycount",0)}(/(^9$|27)/.test(e.keyCode.toString(10))&&s&&(a.multiple||a.options.liveSearch)||/(27)/.test(e.keyCode.toString(10))&&!s)&&(a.$menu.parent().removeClass("open"),a.options.container&&a.$newElement.removeClass("open"),a.$button.focus())},mobile:function(){this.$element.addClass("mobile-device")},refresh:function(){this.$lis=null,this.liObj={},this.reloadLi(),this.render(),this.checkDisabled(),this.liHeight(!0),this.setStyle(),this.setWidth(),this.$lis&&this.$searchbox.trigger("propertychange"),this.$element.trigger("refreshed.bs.select")},hide:function(){this.$newElement.hide()},show:function(){this.$newElement.show()},remove:function(){this.$newElement.remove(),this.$element.remove()},destroy:function(){this.$newElement.before(this.$element).remove(),this.$bsContainer?this.$bsContainer.remove():this.$menu.remove(),this.$element.off(".bs.select").removeData("selectpicker").removeClass("bs-select-hidden selectpicker")}};var p=E.fn.selectpicker;E.fn.selectpicker=d,E.fn.selectpicker.Constructor=h,E.fn.selectpicker.noConflict=function(){return E.fn.selectpicker=p,this},E(document).data("keycount",0).on("keydown.bs.select",'.bootstrap-select [data-toggle=dropdown], .bootstrap-select [role="listbox"], .bs-searchbox input',h.prototype.keydown).on("focusin.modal",'.bootstrap-select [data-toggle=dropdown], .bootstrap-select [role="listbox"], .bs-searchbox input',function(t){t.stopPropagation()}),E(window).on("load.bs.select.data-api",function(){E(".selectpicker").each(function(){var t=E(this);d.call(t,t.data())})})}(t)},n=[i(0)],void 0===(s=function(t){return r(t)}.apply(e,n))||(t.exports=s)},function(t,e,i){(function(t,e){!function(t,S,C){"use strict";S=S&&S.hasOwnProperty("default")?S.default:S,C=C&&C.hasOwnProperty("default")?C.default:C;var e,i,l,x=(e=!1,i={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"},l={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");e&&"#"!==e||(e=t.getAttribute("href")||"");try{return 0<S(document).find(e).length?e:null}catch(t){return null}},reflow:function(t){return t.offsetHeight},triggerTransitionEnd:function(t){S(t).trigger(e.end)},supportsTransitionEnd:function(){return Boolean(e)},isElement:function(t){return(t[0]||t).nodeType},typeCheckConfig:function(t,e,i){for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n)){var s=i[n],r=e[n],a=r&&l.isElement(r)?"element":(o=r,{}.toString.call(o).match(/\s([a-zA-Z]+)/)[1].toLowerCase());if(!new RegExp(s).test(a))throw new Error(t.toUpperCase()+': Option "'+n+'" provided type "'+a+'" but expected type "'+s+'".')}var o}},e=function(){if(window.QUnit)return!1;var t=document.createElement("bootstrap");for(var e in i)if(void 0!==t.style[e])return{end:i[e]};return!1}(),S.fn.emulateTransitionEnd=n,l.supportsTransitionEnd()&&(S.event.special[l.TRANSITION_END]={bindType:e.end,delegateType:e.end,handle:function(t){if(S(t.target).is(this))return t.handleObj.handler.apply(this,arguments)}}),l);function n(t){var e=this,i=!1;return S(this).one(l.TRANSITION_END,function(){i=!0}),setTimeout(function(){i||l.triggerTransitionEnd(e)},t),this}function s(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}var E=function(t,e,i){return e&&s(t.prototype,e),i&&s(t,i),t};var r,a,o,c,u,h,d,p,f,m,g,v,y,_,b,T,w,k,D,A,I,O,P,L,M,N,R,U,j,B,H,F,z,W,$,q,V,Y,G,X,K,Q,J,Z,tt,et,it,nt,st,rt,at,ot,lt,ct,ut,ht,dt,pt,ft,mt,gt,vt,yt,_t,bt,Tt,wt,kt,St,Ct,xt,Et,Dt,At,It,Ot,Pt,Lt,Mt,Nt,Rt,Ut,jt,Bt,Ht,Ft,zt,Wt,$t,qt,Vt,Yt,Gt,Xt,Kt,Qt,Jt,Zt,te,ee,ie,ne,se,re,ae,oe,le,ce,ue,he,de,pe,fe,me,ge,ve,ye,_e,be,Te,we,ke,Se,Ce,xe,Ee,De,Ae,Ie,Oe,Pe,Le,Me,Ne,Re,Ue,je,Be,He=function(t,e){t.prototype=Object.create(e.prototype),(t.prototype.constructor=t).__proto__=e},Fe=(r="alert",o="."+(a="bs.alert"),c=S.fn[r],u={CLOSE:"close"+o,CLOSED:"closed"+o,CLICK_DATA_API:"click"+o+".data-api"},h="alert",d="fade",p="show",f=function(){function n(t){this._element=t}var t=n.prototype;return t.close=function(t){t=t||this._element;var e=this._getRootElement(t);this._triggerCloseEvent(e).isDefaultPrevented()||this._removeElement(e)},t.dispose=function(){S.removeData(this._element,a),this._element=null},t._getRootElement=function(t){var e=x.getSelectorFromElement(t),i=!1;return e&&(i=S(e)[0]),i=i||S(t).closest("."+h)[0]},t._triggerCloseEvent=function(t){var e=S.Event(u.CLOSE);return S(t).trigger(e),e},t._removeElement=function(e){var i=this;S(e).removeClass(p),x.supportsTransitionEnd()&&S(e).hasClass(d)?S(e).one(x.TRANSITION_END,function(t){return i._destroyElement(e,t)}).emulateTransitionEnd(150):this._destroyElement(e)},t._destroyElement=function(t){S(t).detach().trigger(u.CLOSED).remove()},n._jQueryInterface=function(i){return this.each(function(){var t=S(this),e=t.data(a);e||(e=new n(this),t.data(a,e)),"close"===i&&e[i](this)})},n._handleDismiss=function(e){return function(t){t&&t.preventDefault(),e.close(this)}},E(n,null,[{key:"VERSION",get:function(){return"4.0.0-beta.2"}}]),n}(),S(document).on(u.CLICK_DATA_API,'[data-dismiss="alert"]',f._handleDismiss(new f)),S.fn[r]=f._jQueryInterface,S.fn[r].Constructor=f,S.fn[r].noConflict=function(){return S.fn[r]=c,f._jQueryInterface},f),ze=(m="button",v="."+(g="bs.button"),y=".data-api",_=S.fn[m],b="active",T="btn",k='[data-toggle^="button"]',D='[data-toggle="buttons"]',A="input",I=".active",O=".btn",P={CLICK_DATA_API:"click"+v+y,FOCUS_BLUR_DATA_API:(w="focus")+v+y+" blur"+v+y},L=function(){function i(t){this._element=t}var t=i.prototype;return t.toggle=function(){var t=!0,e=!0,i=S(this._element).closest(D)[0];if(i){var n=S(this._element).find(A)[0];if(n){if("radio"===n.type)if(n.checked&&S(this._element).hasClass(b))t=!1;else{var s=S(i).find(I)[0];s&&S(s).removeClass(b)}if(t){if(n.hasAttribute("disabled")||i.hasAttribute("disabled")||n.classList.contains("disabled")||i.classList.contains("disabled"))return;n.checked=!S(this._element).hasClass(b),S(n).trigger("change")}n.focus(),e=!1}}e&&this._element.setAttribute("aria-pressed",!S(this._element).hasClass(b)),t&&S(this._element).toggleClass(b)},t.dispose=function(){S.removeData(this._element,g),this._element=null},i._jQueryInterface=function(e){return this.each(function(){var t=S(this).data(g);t||(t=new i(this),S(this).data(g,t)),"toggle"===e&&t[e]()})},E(i,null,[{key:"VERSION",get:function(){return"4.0.0-beta.2"}}]),i}(),S(document).on(P.CLICK_DATA_API,k,function(t){t.preventDefault();var e=t.target;S(e).hasClass(T)||(e=S(e).closest(O)),L._jQueryInterface.call(S(e),"toggle")}).on(P.FOCUS_BLUR_DATA_API,k,function(t){var e=S(t.target).closest(O)[0];S(e).toggleClass(w,/^focus(in)?$/.test(t.type))}),S.fn[m]=L._jQueryInterface,S.fn[m].Constructor=L,S.fn[m].noConflict=function(){return S.fn[m]=_,L._jQueryInterface},L),We=(M="carousel",R="."+(N="bs.carousel"),U=".data-api",j=S.fn[M],B={interval:5e3,keyboard:!0,slide:!1,pause:"hover",wrap:!0},H={interval:"(number|boolean)",keyboard:"boolean",slide:"(boolean|string)",pause:"(string|boolean)",wrap:"boolean"},F="next",z="prev",W="left",$="right",q={SLIDE:"slide"+R,SLID:"slid"+R,KEYDOWN:"keydown"+R,MOUSEENTER:"mouseenter"+R,MOUSELEAVE:"mouseleave"+R,TOUCHEND:"touchend"+R,LOAD_DATA_API:"load"+R+U,CLICK_DATA_API:"click"+R+U},V="carousel",Y="active",G="slide",X="carousel-item-right",K="carousel-item-left",Q="carousel-item-next",J="carousel-item-prev",Z=".active",tt=".active.carousel-item",et=".carousel-item",it=".carousel-item-next, .carousel-item-prev",nt=".carousel-indicators",st="[data-slide], [data-slide-to]",rt='[data-ride="carousel"]',at=function(){function r(t,e){this._items=null,this._interval=null,this._activeElement=null,this._isPaused=!1,this._isSliding=!1,this.touchTimeout=null,this._config=this._getConfig(e),this._element=S(t)[0],this._indicatorsElement=S(this._element).find(nt)[0],this._addEventListeners()}var t=r.prototype;return t.next=function(){this._isSliding||this._slide(F)},t.nextWhenVisible=function(){!document.hidden&&S(this._element).is(":visible")&&"hidden"!==S(this._element).css("visibility")&&this.next()},t.prev=function(){this._isSliding||this._slide(z)},t.pause=function(t){t||(this._isPaused=!0),S(this._element).find(it)[0]&&x.supportsTransitionEnd()&&(x.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=S(this._element).find(tt)[0];var i=this._getItemIndex(this._activeElement);if(!(t>this._items.length-1||t<0))if(this._isSliding)S(this._element).one(q.SLID,function(){return e.to(t)});else{if(i===t)return this.pause(),void this.cycle();var n=i<t?F:z;this._slide(n,this._items[t])}},t.dispose=function(){S(this._element).off(R),S.removeData(this._element,N),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=S.extend({},B,t),x.typeCheckConfig(M,t,H),t},t._addEventListeners=function(){var e=this;this._config.keyboard&&S(this._element).on(q.KEYDOWN,function(t){return e._keydown(t)}),"hover"===this._config.pause&&(S(this._element).on(q.MOUSEENTER,function(t){return e.pause(t)}).on(q.MOUSELEAVE,function(t){return e.cycle(t)}),"ontouchstart"in document.documentElement&&S(this._element).on(q.TOUCHEND,function(){e.pause(),e.touchTimeout&&clearTimeout(e.touchTimeout),e.touchTimeout=setTimeout(function(t){return e.cycle(t)},500+e._config.interval)}))},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();break;default:return}},t._getItemIndex=function(t){return this._items=S.makeArray(S(t).parent().find(et)),this._items.indexOf(t)},t._getItemByDirection=function(t,e){var i=t===F,n=t===z,s=this._getItemIndex(e),r=this._items.length-1;if((n&&0===s||i&&s===r)&&!this._config.wrap)return e;var a=(s+(t===z?-1:1))%this._items.length;return-1==a?this._items[this._items.length-1]:this._items[a]},t._triggerSlideEvent=function(t,e){var i=this._getItemIndex(t),n=this._getItemIndex(S(this._element).find(tt)[0]),s=S.Event(q.SLIDE,{relatedTarget:t,direction:e,from:n,to:i});return S(this._element).trigger(s),s},t._setActiveIndicatorElement=function(t){if(this._indicatorsElement){S(this._indicatorsElement).find(Z).removeClass(Y);var e=this._indicatorsElement.children[this._getItemIndex(t)];e&&S(e).addClass(Y)}},t._slide=function(t,e){var i,n,s,r=this,a=S(this._element).find(tt)[0],o=this._getItemIndex(a),l=e||a&&this._getItemByDirection(t,a),c=this._getItemIndex(l),u=Boolean(this._interval);if(s=t===F?(i=K,n=Q,W):(i=X,n=J,$),l&&S(l).hasClass(Y))this._isSliding=!1;else if(!this._triggerSlideEvent(l,s).isDefaultPrevented()&&a&&l){this._isSliding=!0,u&&this.pause(),this._setActiveIndicatorElement(l);var h=S.Event(q.SLID,{relatedTarget:l,direction:s,from:o,to:c});x.supportsTransitionEnd()&&S(this._element).hasClass(G)?(S(l).addClass(n),x.reflow(l),S(a).addClass(i),S(l).addClass(i),S(a).one(x.TRANSITION_END,function(){S(l).removeClass(i+" "+n).addClass(Y),S(a).removeClass(Y+" "+n+" "+i),r._isSliding=!1,setTimeout(function(){return S(r._element).trigger(h)},0)}).emulateTransitionEnd(600)):(S(a).removeClass(Y),S(l).addClass(Y),this._isSliding=!1,S(this._element).trigger(h)),u&&this.cycle()}},r._jQueryInterface=function(n){return this.each(function(){var t=S(this).data(N),e=S.extend({},B,S(this).data());"object"==typeof n&&S.extend(e,n);var i="string"==typeof n?n:e.slide;if(t||(t=new r(this,e),S(this).data(N,t)),"number"==typeof n)t.to(n);else if("string"==typeof i){if(void 0===t[i])throw new Error('No method named "'+i+'"');t[i]()}else e.interval&&(t.pause(),t.cycle())})},r._dataApiClickHandler=function(t){var e=x.getSelectorFromElement(this);if(e){var i=S(e)[0];if(i&&S(i).hasClass(V)){var n=S.extend({},S(i).data(),S(this).data()),s=this.getAttribute("data-slide-to");s&&(n.interval=!1),r._jQueryInterface.call(S(i),n),s&&S(i).data(N).to(s),t.preventDefault()}}},E(r,null,[{key:"VERSION",get:function(){return"4.0.0-beta.2"}},{key:"Default",get:function(){return B}}]),r}(),S(document).on(q.CLICK_DATA_API,st,at._dataApiClickHandler),S(window).on(q.LOAD_DATA_API,function(){S(rt).each(function(){var t=S(this);at._jQueryInterface.call(t,t.data())})}),S.fn[M]=at._jQueryInterface,S.fn[M].Constructor=at,S.fn[M].noConflict=function(){return S.fn[M]=j,at._jQueryInterface},at),$e=(ot="collapse",ct="."+(lt="bs.collapse"),ut=S.fn[ot],ht={toggle:!0,parent:""},dt={toggle:"boolean",parent:"(string|element)"},pt={SHOW:"show"+ct,SHOWN:"shown"+ct,HIDE:"hide"+ct,HIDDEN:"hidden"+ct,CLICK_DATA_API:"click"+ct+".data-api"},ft="show",mt="collapse",gt="collapsing",vt="collapsed",yt="width",_t="height",bt=".show, .collapsing",Tt='[data-toggle="collapse"]',wt=function(){function o(t,e){this._isTransitioning=!1,this._element=t,this._config=this._getConfig(e),this._triggerArray=S.makeArray(S('[data-toggle="collapse"][href="#'+t.id+'"],[data-toggle="collapse"][data-target="#'+t.id+'"]'));for(var i=S(Tt),n=0;n<i.length;n++){var s=i[n],r=x.getSelectorFromElement(s);null!==r&&0<S(r).filter(t).length&&this._triggerArray.push(s)}this._parent=this._config.parent?this._getParent():null,this._config.parent||this._addAriaAndCollapsedClass(this._element,this._triggerArray),this._config.toggle&&this.toggle()}var t=o.prototype;return t.toggle=function(){S(this._element).hasClass(ft)?this.hide():this.show()},t.show=function(){var t,e,i=this;if(!this._isTransitioning&&!S(this._element).hasClass(ft)&&(this._parent&&((t=S.makeArray(S(this._parent).children().children(bt))).length||(t=null)),!(t&&(e=S(t).data(lt))&&e._isTransitioning))){var n=S.Event(pt.SHOW);if(S(this._element).trigger(n),!n.isDefaultPrevented()){t&&(o._jQueryInterface.call(S(t),"hide"),e||S(t).data(lt,null));var s=this._getDimension();S(this._element).removeClass(mt).addClass(gt),this._element.style[s]=0,this._triggerArray.length&&S(this._triggerArray).removeClass(vt).attr("aria-expanded",!0),this.setTransitioning(!0);var r=function(){S(i._element).removeClass(gt).addClass(mt).addClass(ft),i._element.style[s]="",i.setTransitioning(!1),S(i._element).trigger(pt.SHOWN)};if(x.supportsTransitionEnd()){var a="scroll"+(s[0].toUpperCase()+s.slice(1));S(this._element).one(x.TRANSITION_END,r).emulateTransitionEnd(600),this._element.style[s]=this._element[a]+"px"}else r()}}},t.hide=function(){var t=this;if(!this._isTransitioning&&S(this._element).hasClass(ft)){var e=S.Event(pt.HIDE);if(S(this._element).trigger(e),!e.isDefaultPrevented()){var i=this._getDimension();if(this._element.style[i]=this._element.getBoundingClientRect()[i]+"px",x.reflow(this._element),S(this._element).addClass(gt).removeClass(mt).removeClass(ft),this._triggerArray.length)for(var n=0;n<this._triggerArray.length;n++){var s=this._triggerArray[n],r=x.getSelectorFromElement(s);if(null!==r)S(r).hasClass(ft)||S(s).addClass(vt).attr("aria-expanded",!1)}this.setTransitioning(!0);var a=function(){t.setTransitioning(!1),S(t._element).removeClass(gt).addClass(mt).trigger(pt.HIDDEN)};this._element.style[i]="",x.supportsTransitionEnd()?S(this._element).one(x.TRANSITION_END,a).emulateTransitionEnd(600):a()}}},t.setTransitioning=function(t){this._isTransitioning=t},t.dispose=function(){S.removeData(this._element,lt),this._config=null,this._parent=null,this._element=null,this._triggerArray=null,this._isTransitioning=null},t._getConfig=function(t){return(t=S.extend({},ht,t)).toggle=Boolean(t.toggle),x.typeCheckConfig(ot,t,dt),t},t._getDimension=function(){return S(this._element).hasClass(yt)?yt:_t},t._getParent=function(){var i=this,t=null;x.isElement(this._config.parent)?(t=this._config.parent,void 0!==this._config.parent.jquery&&(t=this._config.parent[0])):t=S(this._config.parent)[0];var e='[data-toggle="collapse"][data-parent="'+this._config.parent+'"]';return S(t).find(e).each(function(t,e){i._addAriaAndCollapsedClass(o._getTargetFromElement(e),[e])}),t},t._addAriaAndCollapsedClass=function(t,e){if(t){var i=S(t).hasClass(ft);e.length&&S(e).toggleClass(vt,!i).attr("aria-expanded",i)}},o._getTargetFromElement=function(t){var e=x.getSelectorFromElement(t);return e?S(e)[0]:null},o._jQueryInterface=function(n){return this.each(function(){var t=S(this),e=t.data(lt),i=S.extend({},ht,t.data(),"object"==typeof n&&n);if(!e&&i.toggle&&/show|hide/.test(n)&&(i.toggle=!1),e||(e=new o(this,i),t.data(lt,e)),"string"==typeof n){if(void 0===e[n])throw new Error('No method named "'+n+'"');e[n]()}})},E(o,null,[{key:"VERSION",get:function(){return"4.0.0-beta.2"}},{key:"Default",get:function(){return ht}}]),o}(),S(document).on(pt.CLICK_DATA_API,Tt,function(t){"A"===t.currentTarget.tagName&&t.preventDefault();var i=S(this),e=x.getSelectorFromElement(this);S(e).each(function(){var t=S(this),e=t.data(lt)?"toggle":i.data();wt._jQueryInterface.call(t,e)})}),S.fn[ot]=wt._jQueryInterface,S.fn[ot].Constructor=wt,S.fn[ot].noConflict=function(){return S.fn[ot]=ut,wt._jQueryInterface},wt),qe=function(){if(void 0===C)throw new Error("Bootstrap dropdown require Popper.js (https://popper.js.org)");var e="dropdown",c="bs.dropdown",i="."+c,t=".data-api",n=S.fn[e],a=new RegExp("38|40|27"),u={HIDE:"hide"+i,HIDDEN:"hidden"+i,SHOW:"show"+i,SHOWN:"shown"+i,CLICK:"click"+i,CLICK_DATA_API:"click"+i+t,KEYDOWN_DATA_API:"keydown"+i+t,KEYUP_DATA_API:"keyup"+i+t},o="disabled",h="show",r="dropup",d="dropdown-menu-right",p="dropdown-menu-left",f='[data-toggle="dropdown"]',s=".dropdown form",m=".dropdown-menu",g=".navbar-nav",v=".dropdown-menu .dropdown-item:not(.disabled)",y="top-start",_="top-end",b="bottom-start",T="bottom-end",w={offset:0,flip:!0},k={offset:"(number|string|function)",flip:"boolean"},l=function(){function l(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=l.prototype;return t.toggle=function(){if(!this._element.disabled&&!S(this._element).hasClass(o)){var t=l._getParentFromElement(this._element),e=S(this._menu).hasClass(h);if(l._clearMenus(),!e){var i={relatedTarget:this._element},n=S.Event(u.SHOW,i);if(S(t).trigger(n),!n.isDefaultPrevented()){var s=this._element;S(t).hasClass(r)&&(S(this._menu).hasClass(p)||S(this._menu).hasClass(d))&&(s=t),this._popper=new C(s,this._menu,this._getPopperConfig()),"ontouchstart"in document.documentElement&&!S(t).closest(g).length&&S("body").children().on("mouseover",null,S.noop),this._element.focus(),this._element.setAttribute("aria-expanded",!0),S(this._menu).toggleClass(h),S(t).toggleClass(h).trigger(S.Event(u.SHOWN,i))}}}},t.dispose=function(){S.removeData(this._element,c),S(this._element).off(i),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;S(this._element).on(u.CLICK,function(t){t.preventDefault(),t.stopPropagation(),e.toggle()})},t._getConfig=function(t){return t=S.extend({},this.constructor.Default,S(this._element).data(),t),x.typeCheckConfig(e,t,this.constructor.DefaultType),t},t._getMenuElement=function(){if(!this._menu){var t=l._getParentFromElement(this._element);this._menu=S(t).find(m)[0]}return this._menu},t._getPlacement=function(){var t=S(this._element).parent(),e=b;return t.hasClass(r)?(e=y,S(this._menu).hasClass(d)&&(e=_)):S(this._menu).hasClass(d)&&(e=T),e},t._detectNavbar=function(){return 0<S(this._element).closest(".navbar").length},t._getPopperConfig=function(){var e=this,t={};"function"==typeof this._config.offset?t.fn=function(t){return t.offsets=S.extend({},t.offsets,e._config.offset(t.offsets)||{}),t}:t.offset=this._config.offset;var i={placement:this._getPlacement(),modifiers:{offset:t,flip:{enabled:this._config.flip}}};return this._inNavbar&&(i.modifiers.applyStyle={enabled:!this._inNavbar}),i},l._jQueryInterface=function(e){return this.each(function(){var t=S(this).data(c);if(t||(t=new l(this,"object"==typeof e?e:null),S(this).data(c,t)),"string"==typeof e){if(void 0===t[e])throw new Error('No method named "'+e+'"');t[e]()}})},l._clearMenus=function(t){if(!t||3!==t.which&&("keyup"!==t.type||9===t.which))for(var e=S.makeArray(S(f)),i=0;i<e.length;i++){var n=l._getParentFromElement(e[i]),s=S(e[i]).data(c),r={relatedTarget:e[i]};if(s){var a=s._menu;if(S(n).hasClass(h)&&!(t&&("click"===t.type&&/input|textarea/i.test(t.target.tagName)||"keyup"===t.type&&9===t.which)&&S.contains(n,t.target))){var o=S.Event(u.HIDE,r);S(n).trigger(o),o.isDefaultPrevented()||("ontouchstart"in document.documentElement&&S("body").children().off("mouseover",null,S.noop),e[i].setAttribute("aria-expanded","false"),S(a).removeClass(h),S(n).removeClass(h).trigger(S.Event(u.HIDDEN,r)))}}}},l._getParentFromElement=function(t){var e,i=x.getSelectorFromElement(t);return i&&(e=S(i)[0]),e||t.parentNode},l._dataApiKeydownHandler=function(t){if(!(!a.test(t.which)||/button/i.test(t.target.tagName)&&32===t.which||/input|textarea/i.test(t.target.tagName)||(t.preventDefault(),t.stopPropagation(),this.disabled||S(this).hasClass(o)))){var e=l._getParentFromElement(this),i=S(e).hasClass(h);if((i||27===t.which&&32===t.which)&&(!i||27!==t.which&&32!==t.which)){var n=S(e).find(v).get();if(n.length){var s=n.indexOf(t.target);38===t.which&&0<s&&s--,40===t.which&&s<n.length-1&&s++,s<0&&(s=0),n[s].focus()}}else{if(27===t.which){var r=S(e).find(f)[0];S(r).trigger("focus")}S(this).trigger("click")}}},E(l,null,[{key:"VERSION",get:function(){return"4.0.0-beta.2"}},{key:"Default",get:function(){return w}},{key:"DefaultType",get:function(){return k}}]),l}();return S(document).on(u.KEYDOWN_DATA_API,f,l._dataApiKeydownHandler).on(u.KEYDOWN_DATA_API,m,l._dataApiKeydownHandler).on(u.CLICK_DATA_API+" "+u.KEYUP_DATA_API,l._clearMenus).on(u.CLICK_DATA_API,f,function(t){t.preventDefault(),t.stopPropagation(),l._jQueryInterface.call(S(this),"toggle")}).on(u.CLICK_DATA_API,s,function(t){t.stopPropagation()}),S.fn[e]=l._jQueryInterface,S.fn[e].Constructor=l,S.fn[e].noConflict=function(){return S.fn[e]=n,l._jQueryInterface},l}(),Ve=(kt="modal",Ct="."+(St="bs.modal"),xt=S.fn[kt],Et={backdrop:!0,keyboard:!0,focus:!0,show:!0},Dt={backdrop:"(boolean|string)",keyboard:"boolean",focus:"boolean",show:"boolean"},At={HIDE:"hide"+Ct,HIDDEN:"hidden"+Ct,SHOW:"show"+Ct,SHOWN:"shown"+Ct,FOCUSIN:"focusin"+Ct,RESIZE:"resize"+Ct,CLICK_DISMISS:"click.dismiss"+Ct,KEYDOWN_DISMISS:"keydown.dismiss"+Ct,MOUSEUP_DISMISS:"mouseup.dismiss"+Ct,MOUSEDOWN_DISMISS:"mousedown.dismiss"+Ct,CLICK_DATA_API:"click"+Ct+".data-api"},It="modal-scrollbar-measure",Ot="modal-backdrop",Pt="modal-open",Lt="fade",Mt="show",Nt=".modal-dialog",Rt='[data-toggle="modal"]',Ut='[data-dismiss="modal"]',jt=".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",Bt=".sticky-top",Ht=".navbar-toggler",Ft=function(){function s(t,e){this._config=this._getConfig(e),this._element=t,this._dialog=S(t).find(Nt)[0],this._backdrop=null,this._isShown=!1,this._isBodyOverflowing=!1,this._ignoreBackdropClick=!1,this._originalBodyPadding=0,this._scrollbarWidth=0}var t=s.prototype;return t.toggle=function(t){return this._isShown?this.hide():this.show(t)},t.show=function(t){var e=this;if(!this._isTransitioning&&!this._isShown){x.supportsTransitionEnd()&&S(this._element).hasClass(Lt)&&(this._isTransitioning=!0);var i=S.Event(At.SHOW,{relatedTarget:t});S(this._element).trigger(i),this._isShown||i.isDefaultPrevented()||(this._isShown=!0,this._checkScrollbar(),this._setScrollbar(),this._adjustDialog(),S(document.body).addClass(Pt),this._setEscapeEvent(),this._setResizeEvent(),S(this._element).on(At.CLICK_DISMISS,Ut,function(t){return e.hide(t)}),S(this._dialog).on(At.MOUSEDOWN_DISMISS,function(){S(e._element).one(At.MOUSEUP_DISMISS,function(t){S(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._isTransitioning&&this._isShown){var i=S.Event(At.HIDE);if(S(this._element).trigger(i),this._isShown&&!i.isDefaultPrevented()){this._isShown=!1;var n=x.supportsTransitionEnd()&&S(this._element).hasClass(Lt);n&&(this._isTransitioning=!0),this._setEscapeEvent(),this._setResizeEvent(),S(document).off(At.FOCUSIN),S(this._element).removeClass(Mt),S(this._element).off(At.CLICK_DISMISS),S(this._dialog).off(At.MOUSEDOWN_DISMISS),n?S(this._element).one(x.TRANSITION_END,function(t){return e._hideModal(t)}).emulateTransitionEnd(300):this._hideModal()}}},t.dispose=function(){S.removeData(this._element,St),S(window,document,this._element,this._backdrop).off(Ct),this._config=null,this._element=null,this._dialog=null,this._backdrop=null,this._isShown=null,this._isBodyOverflowing=null,this._ignoreBackdropClick=null,this._scrollbarWidth=null},t.handleUpdate=function(){this._adjustDialog()},t._getConfig=function(t){return t=S.extend({},Et,t),x.typeCheckConfig(kt,t,Dt),t},t._showElement=function(t){var e=this,i=x.supportsTransitionEnd()&&S(this._element).hasClass(Lt);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.scrollTop=0,i&&x.reflow(this._element),S(this._element).addClass(Mt),this._config.focus&&this._enforceFocus();function n(){e._config.focus&&e._element.focus(),e._isTransitioning=!1,S(e._element).trigger(s)}var s=S.Event(At.SHOWN,{relatedTarget:t});i?S(this._dialog).one(x.TRANSITION_END,n).emulateTransitionEnd(300):n()},t._enforceFocus=function(){var e=this;S(document).off(At.FOCUSIN).on(At.FOCUSIN,function(t){document===t.target||e._element===t.target||S(e._element).has(t.target).length||e._element.focus()})},t._setEscapeEvent=function(){var e=this;this._isShown&&this._config.keyboard?S(this._element).on(At.KEYDOWN_DISMISS,function(t){27===t.which&&(t.preventDefault(),e.hide())}):this._isShown||S(this._element).off(At.KEYDOWN_DISMISS)},t._setResizeEvent=function(){var e=this;this._isShown?S(window).on(At.RESIZE,function(t){return e.handleUpdate(t)}):S(window).off(At.RESIZE)},t._hideModal=function(){var t=this;this._element.style.display="none",this._element.setAttribute("aria-hidden",!0),this._isTransitioning=!1,this._showBackdrop(function(){S(document.body).removeClass(Pt),t._resetAdjustments(),t._resetScrollbar(),S(t._element).trigger(At.HIDDEN)})},t._removeBackdrop=function(){this._backdrop&&(S(this._backdrop).remove(),this._backdrop=null)},t._showBackdrop=function(t){var e=this,i=S(this._element).hasClass(Lt)?Lt:"";if(this._isShown&&this._config.backdrop){var n=x.supportsTransitionEnd()&&i;if(this._backdrop=document.createElement("div"),this._backdrop.className=Ot,i&&S(this._backdrop).addClass(i),S(this._backdrop).appendTo(document.body),S(this._element).on(At.CLICK_DISMISS,function(t){e._ignoreBackdropClick?e._ignoreBackdropClick=!1:t.target===t.currentTarget&&("static"===e._config.backdrop?e._element.focus():e.hide())}),n&&x.reflow(this._backdrop),S(this._backdrop).addClass(Mt),!t)return;if(!n)return void t();S(this._backdrop).one(x.TRANSITION_END,t).emulateTransitionEnd(150)}else if(!this._isShown&&this._backdrop){S(this._backdrop).removeClass(Mt);var s=function(){e._removeBackdrop(),t&&t()};x.supportsTransitionEnd()&&S(this._element).hasClass(Lt)?S(this._backdrop).one(x.TRANSITION_END,s).emulateTransitionEnd(150):s()}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 s=this;if(this._isBodyOverflowing){S(jt).each(function(t,e){var i=S(e)[0].style.paddingRight,n=S(e).css("padding-right");S(e).data("padding-right",i).css("padding-right",parseFloat(n)+s._scrollbarWidth+"px")}),S(Bt).each(function(t,e){var i=S(e)[0].style.marginRight,n=S(e).css("margin-right");S(e).data("margin-right",i).css("margin-right",parseFloat(n)-s._scrollbarWidth+"px")}),S(Ht).each(function(t,e){var i=S(e)[0].style.marginRight,n=S(e).css("margin-right");S(e).data("margin-right",i).css("margin-right",parseFloat(n)+s._scrollbarWidth+"px")});var t=document.body.style.paddingRight,e=S("body").css("padding-right");S("body").data("padding-right",t).css("padding-right",parseFloat(e)+this._scrollbarWidth+"px")}},t._resetScrollbar=function(){S(jt).each(function(t,e){var i=S(e).data("padding-right");void 0!==i&&S(e).css("padding-right",i).removeData("padding-right")}),S(Bt+", "+Ht).each(function(t,e){var i=S(e).data("margin-right");void 0!==i&&S(e).css("margin-right",i).removeData("margin-right")});var t=S("body").data("padding-right");void 0!==t&&S("body").css("padding-right",t).removeData("padding-right")},t._getScrollbarWidth=function(){var t=document.createElement("div");t.className=It,document.body.appendChild(t);var e=t.getBoundingClientRect().width-t.clientWidth;return document.body.removeChild(t),e},s._jQueryInterface=function(i,n){return this.each(function(){var t=S(this).data(St),e=S.extend({},s.Default,S(this).data(),"object"==typeof i&&i);if(t||(t=new s(this,e),S(this).data(St,t)),"string"==typeof i){if(void 0===t[i])throw new Error('No method named "'+i+'"');t[i](n)}else e.show&&t.show(n)})},E(s,null,[{key:"VERSION",get:function(){return"4.0.0-beta.2"}},{key:"Default",get:function(){return Et}}]),s}(),S(document).on(At.CLICK_DATA_API,Rt,function(t){var e,i=this,n=x.getSelectorFromElement(this);n&&(e=S(n)[0]);var s=S(e).data(St)?"toggle":S.extend({},S(e).data(),S(this).data());"A"!==this.tagName&&"AREA"!==this.tagName||t.preventDefault();var r=S(e).one(At.SHOW,function(t){t.isDefaultPrevented()||r.one(At.HIDDEN,function(){S(i).is(":visible")&&i.focus()})});Ft._jQueryInterface.call(S(e),s,this)}),S.fn[kt]=Ft._jQueryInterface,S.fn[kt].Constructor=Ft,S.fn[kt].noConflict=function(){return S.fn[kt]=xt,Ft._jQueryInterface},Ft),Ye=function(){if(void 0===C)throw new Error("Bootstrap tooltips require Popper.js (https://popper.js.org)");var e="tooltip",n="bs.tooltip",i="."+n,t=S.fn[e],s="bs-tooltip",r=new RegExp("(^|\\s)"+s+"\\S+","g"),a={animation:"boolean",template:"string",title:"(string|element|function)",trigger:"string",delay:"(number|object)",html:"boolean",selector:"(string|boolean)",placement:"(string|function)",offset:"(number|string)",container:"(string|element|boolean)",fallbackPlacement:"(string|array)"},o={AUTO:"auto",TOP:"top",RIGHT:"right",BOTTOM:"bottom",LEFT:"left"},l={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"},u="show",h="out",d={HIDE:"hide"+i,HIDDEN:"hidden"+i,SHOW:"show"+i,SHOWN:"shown"+i,INSERTED:"inserted"+i,CLICK:"click"+i,FOCUSIN:"focusin"+i,FOCUSOUT:"focusout"+i,MOUSEENTER:"mouseenter"+i,MOUSELEAVE:"mouseleave"+i},p="fade",f="show",m=".tooltip-inner",g=".arrow",v="hover",y="focus",_="click",b="manual",c=function(){function c(t,e){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=c.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,i=S(t.currentTarget).data(e);i||(i=new this.constructor(t.currentTarget,this._getDelegateConfig()),S(t.currentTarget).data(e,i)),i._activeTrigger.click=!i._activeTrigger.click,i._isWithActiveTrigger()?i._enter(null,i):i._leave(null,i)}else{if(S(this.getTipElement()).hasClass(f))return void this._leave(null,this);this._enter(null,this)}},t.dispose=function(){clearTimeout(this._timeout),S.removeData(this.element,this.constructor.DATA_KEY),S(this.element).off(this.constructor.EVENT_KEY),S(this.element).closest(".modal").off("hide.bs.modal"),this.tip&&S(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"===S(this.element).css("display"))throw new Error("Please use show on visible elements");var t=S.Event(this.constructor.Event.SHOW);if(this.isWithContent()&&this._isEnabled){S(this.element).trigger(t);var i=S.contains(this.element.ownerDocument.documentElement,this.element);if(t.isDefaultPrevented()||!i)return;var n=this.getTipElement(),s=x.getUID(this.constructor.NAME);n.setAttribute("id",s),this.element.setAttribute("aria-describedby",s),this.setContent(),this.config.animation&&S(n).addClass(p);var r="function"==typeof this.config.placement?this.config.placement.call(this,n,this.element):this.config.placement,a=this._getAttachment(r);this.addAttachmentClass(a);var o=!1===this.config.container?document.body:S(this.config.container);S(n).data(this.constructor.DATA_KEY,this),S.contains(this.element.ownerDocument.documentElement,this.tip)||S(n).appendTo(o),S(this.element).trigger(this.constructor.Event.INSERTED),this._popper=new C(this.element,n,{placement:a,modifiers:{offset:{offset:this.config.offset},flip:{behavior:this.config.fallbackPlacement},arrow:{element:g}},onCreate:function(t){t.originalPlacement!==t.placement&&e._handlePopperPlacementChange(t)},onUpdate:function(t){e._handlePopperPlacementChange(t)}}),S(n).addClass(f),"ontouchstart"in document.documentElement&&S("body").children().on("mouseover",null,S.noop);var l=function(){e.config.animation&&e._fixTransition();var t=e._hoverState;e._hoverState=null,S(e.element).trigger(e.constructor.Event.SHOWN),t===h&&e._leave(null,e)};x.supportsTransitionEnd()&&S(this.tip).hasClass(p)?S(this.tip).one(x.TRANSITION_END,l).emulateTransitionEnd(c._TRANSITION_DURATION):l()}},t.hide=function(t){function e(){i._hoverState!==u&&n.parentNode&&n.parentNode.removeChild(n),i._cleanTipClass(),i.element.removeAttribute("aria-describedby"),S(i.element).trigger(i.constructor.Event.HIDDEN),null!==i._popper&&i._popper.destroy(),t&&t()}var i=this,n=this.getTipElement(),s=S.Event(this.constructor.Event.HIDE);S(this.element).trigger(s),s.isDefaultPrevented()||(S(n).removeClass(f),"ontouchstart"in document.documentElement&&S("body").children().off("mouseover",null,S.noop),this._activeTrigger[_]=!1,this._activeTrigger[y]=!1,this._activeTrigger[v]=!1,x.supportsTransitionEnd()&&S(this.tip).hasClass(p)?S(n).one(x.TRANSITION_END,e).emulateTransitionEnd(150):e(),this._hoverState="")},t.update=function(){null!==this._popper&&this._popper.scheduleUpdate()},t.isWithContent=function(){return Boolean(this.getTitle())},t.addAttachmentClass=function(t){S(this.getTipElement()).addClass(s+"-"+t)},t.getTipElement=function(){return this.tip=this.tip||S(this.config.template)[0],this.tip},t.setContent=function(){var t=S(this.getTipElement());this.setElementContent(t.find(m),this.getTitle()),t.removeClass(p+" "+f)},t.setElementContent=function(t,e){var i=this.config.html;"object"==typeof e&&(e.nodeType||e.jquery)?i?S(e).parent().is(t)||t.empty().append(e):t.text(S(e).text()):t[i?"html":"text"](e)},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._getAttachment=function(t){return o[t.toUpperCase()]},t._setListeners=function(){var n=this;this.config.trigger.split(" ").forEach(function(t){if("click"===t)S(n.element).on(n.constructor.Event.CLICK,n.config.selector,function(t){return n.toggle(t)});else if(t!==b){var e=t===v?n.constructor.Event.MOUSEENTER:n.constructor.Event.FOCUSIN,i=t===v?n.constructor.Event.MOUSELEAVE:n.constructor.Event.FOCUSOUT;S(n.element).on(e,n.config.selector,function(t){return n._enter(t)}).on(i,n.config.selector,function(t){return n._leave(t)})}S(n.element).closest(".modal").on("hide.bs.modal",function(){return n.hide()})}),this.config.selector?this.config=S.extend({},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 i=this.constructor.DATA_KEY;(e=e||S(t.currentTarget).data(i))||(e=new this.constructor(t.currentTarget,this._getDelegateConfig()),S(t.currentTarget).data(i,e)),t&&(e._activeTrigger["focusin"===t.type?y:v]=!0),S(e.getTipElement()).hasClass(f)||e._hoverState===u?e._hoverState=u:(clearTimeout(e._timeout),e._hoverState=u,e.config.delay&&e.config.delay.show?e._timeout=setTimeout(function(){e._hoverState===u&&e.show()},e.config.delay.show):e.show())},t._leave=function(t,e){var i=this.constructor.DATA_KEY;(e=e||S(t.currentTarget).data(i))||(e=new this.constructor(t.currentTarget,this._getDelegateConfig()),S(t.currentTarget).data(i,e)),t&&(e._activeTrigger["focusout"===t.type?y:v]=!1),e._isWithActiveTrigger()||(clearTimeout(e._timeout),e._hoverState=h,e.config.delay&&e.config.delay.hide?e._timeout=setTimeout(function(){e._hoverState===h&&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){return"number"==typeof(t=S.extend({},this.constructor.Default,S(this.element).data(),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()),x.typeCheckConfig(e,t,this.constructor.DefaultType),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=S(this.getTipElement()),e=t.attr("class").match(r);null!==e&&0<e.length&&t.removeClass(e.join(""))},t._handlePopperPlacementChange=function(t){this._cleanTipClass(),this.addAttachmentClass(this._getAttachment(t.placement))},t._fixTransition=function(){var t=this.getTipElement(),e=this.config.animation;null===t.getAttribute("x-placement")&&(S(t).removeClass(p),this.config.animation=!1,this.hide(),this.show(),this.config.animation=e)},c._jQueryInterface=function(i){return this.each(function(){var t=S(this).data(n),e="object"==typeof i&&i;if((t||!/dispose|hide/.test(i))&&(t||(t=new c(this,e),S(this).data(n,t)),"string"==typeof i)){if(void 0===t[i])throw new Error('No method named "'+i+'"');t[i]()}})},E(c,null,[{key:"VERSION",get:function(){return"4.0.0-beta.2"}},{key:"Default",get:function(){return l}},{key:"NAME",get:function(){return e}},{key:"DATA_KEY",get:function(){return n}},{key:"Event",get:function(){return d}},{key:"EVENT_KEY",get:function(){return i}},{key:"DefaultType",get:function(){return a}}]),c}();return S.fn[e]=c._jQueryInterface,S.fn[e].Constructor=c,S.fn[e].noConflict=function(){return S.fn[e]=t,c._jQueryInterface},c}(),Ge=(zt="popover",$t="."+(Wt="bs.popover"),qt=S.fn[zt],Vt="bs-popover",Yt=new RegExp("(^|\\s)"+Vt+"\\S+","g"),Gt=S.extend({},Ye.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>'}),Xt=S.extend({},Ye.DefaultType,{content:"(string|element|function)"}),Kt="fade",Jt=".popover-header",Zt=".popover-body",te={HIDE:"hide"+$t,HIDDEN:"hidden"+$t,SHOW:(Qt="show")+$t,SHOWN:"shown"+$t,INSERTED:"inserted"+$t,CLICK:"click"+$t,FOCUSIN:"focusin"+$t,FOCUSOUT:"focusout"+$t,MOUSEENTER:"mouseenter"+$t,MOUSELEAVE:"mouseleave"+$t},ee=function(t){function n(){return t.apply(this,arguments)||this}He(n,t);var e=n.prototype;return e.isWithContent=function(){return this.getTitle()||this._getContent()},e.addAttachmentClass=function(t){S(this.getTipElement()).addClass(Vt+"-"+t)},e.getTipElement=function(){return this.tip=this.tip||S(this.config.template)[0],this.tip},e.setContent=function(){var t=S(this.getTipElement());this.setElementContent(t.find(Jt),this.getTitle()),this.setElementContent(t.find(Zt),this._getContent()),t.removeClass(Kt+" "+Qt)},e._getContent=function(){return this.element.getAttribute("data-content")||("function"==typeof this.config.content?this.config.content.call(this.element):this.config.content)},e._cleanTipClass=function(){var t=S(this.getTipElement()),e=t.attr("class").match(Yt);null!==e&&0<e.length&&t.removeClass(e.join(""))},n._jQueryInterface=function(i){return this.each(function(){var t=S(this).data(Wt),e="object"==typeof i?i:null;if((t||!/destroy|hide/.test(i))&&(t||(t=new n(this,e),S(this).data(Wt,t)),"string"==typeof i)){if(void 0===t[i])throw new Error('No method named "'+i+'"');t[i]()}})},E(n,null,[{key:"VERSION",get:function(){return"4.0.0-beta.2"}},{key:"Default",get:function(){return Gt}},{key:"NAME",get:function(){return zt}},{key:"DATA_KEY",get:function(){return Wt}},{key:"Event",get:function(){return te}},{key:"EVENT_KEY",get:function(){return $t}},{key:"DefaultType",get:function(){return Xt}}]),n}(Ye),S.fn[zt]=ee._jQueryInterface,S.fn[zt].Constructor=ee,S.fn[zt].noConflict=function(){return S.fn[zt]=qt,ee._jQueryInterface},ee),Xe=(ie="scrollspy",se="."+(ne="bs.scrollspy"),re=S.fn[ie],ae={offset:10,method:"auto",target:""},oe={offset:"number",method:"string",target:"(string|element)"},le={ACTIVATE:"activate"+se,SCROLL:"scroll"+se,LOAD_DATA_API:"load"+se+".data-api"},ce="dropdown-item",ue="active",he='[data-spy="scroll"]',de=".active",pe=".nav, .list-group",fe=".nav-link",me=".nav-item",ge=".list-group-item",ve=".dropdown",ye=".dropdown-item",_e=".dropdown-toggle",be="offset",Te="position",we=function(){function i(t,e){var i=this;this._element=t,this._scrollElement="BODY"===t.tagName?window:t,this._config=this._getConfig(e),this._selector=this._config.target+" "+fe+","+this._config.target+" "+ge+","+this._config.target+" "+ye,this._offsets=[],this._targets=[],this._activeTarget=null,this._scrollHeight=0,S(this._scrollElement).on(le.SCROLL,function(t){return i._process(t)}),this.refresh(),this._process()}var t=i.prototype;return t.refresh=function(){var e=this,t=this._scrollElement!==this._scrollElement.window?Te:be,s="auto"===this._config.method?t:this._config.method,r=s===Te?this._getScrollTop():0;this._offsets=[],this._targets=[],this._scrollHeight=this._getScrollHeight(),S.makeArray(S(this._selector)).map(function(t){var e,i=x.getSelectorFromElement(t);if(i&&(e=S(i)[0]),e){var n=e.getBoundingClientRect();if(n.width||n.height)return[S(e)[s]().top+r,i]}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(){S.removeData(this._element,ne),S(this._scrollElement).off(se),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=S.extend({},ae,t)).target){var e=S(t.target).attr("id");e||(e=x.getUID(ie),S(t.target).attr("id",e)),t.target="#"+e}return x.typeCheckConfig(ie,t,oe),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(),i=this._config.offset+e-this._getOffsetHeight();if(this._scrollHeight!==e&&this.refresh(),i<=t){var n=this._targets[this._targets.length-1];this._activeTarget!==n&&this._activate(n)}else{if(this._activeTarget&&t<this._offsets[0]&&0<this._offsets[0])return this._activeTarget=null,void this._clear();for(var s=this._offsets.length;s--;){this._activeTarget!==this._targets[s]&&t>=this._offsets[s]&&(void 0===this._offsets[s+1]||t<this._offsets[s+1])&&this._activate(this._targets[s])}}},t._activate=function(e){this._activeTarget=e,this._clear();var t=this._selector.split(",");t=t.map(function(t){return t+'[data-target="'+e+'"],'+t+'[href="'+e+'"]'});var i=S(t.join(","));i.hasClass(ce)?(i.closest(ve).find(_e).addClass(ue),i.addClass(ue)):(i.addClass(ue),i.parents(pe).prev(fe+", "+ge).addClass(ue),i.parents(pe).prev(me).children(fe).addClass(ue)),S(this._scrollElement).trigger(le.ACTIVATE,{relatedTarget:e})},t._clear=function(){S(this._selector).filter(de).removeClass(ue)},i._jQueryInterface=function(e){return this.each(function(){var t=S(this).data(ne);if(t||(t=new i(this,"object"==typeof e&&e),S(this).data(ne,t)),"string"==typeof e){if(void 0===t[e])throw new Error('No method named "'+e+'"');t[e]()}})},E(i,null,[{key:"VERSION",get:function(){return"4.0.0-beta.2"}},{key:"Default",get:function(){return ae}}]),i}(),S(window).on(le.LOAD_DATA_API,function(){for(var t=S.makeArray(S(he)),e=t.length;e--;){var i=S(t[e]);we._jQueryInterface.call(i,i.data())}}),S.fn[ie]=we._jQueryInterface,S.fn[ie].Constructor=we,S.fn[ie].noConflict=function(){return S.fn[ie]=re,we._jQueryInterface},we),Ke=(Se="."+(ke="bs.tab"),Ce=S.fn.tab,xe={HIDE:"hide"+Se,HIDDEN:"hidden"+Se,SHOW:"show"+Se,SHOWN:"shown"+Se,CLICK_DATA_API:"click"+Se+".data-api"},Ee="dropdown-menu",De="active",Ae="disabled",Ie="fade",Oe="show",Pe=".dropdown",Le=".nav, .list-group",Me=".active",Ne="> li > .active",Re='[data-toggle="tab"], [data-toggle="pill"], [data-toggle="list"]',Ue=".dropdown-toggle",je="> .dropdown-menu .active",Be=function(){function n(t){this._element=t}var t=n.prototype;return t.show=function(){var i=this;if(!(this._element.parentNode&&this._element.parentNode.nodeType===Node.ELEMENT_NODE&&S(this._element).hasClass(De)||S(this._element).hasClass(Ae))){var t,n,e=S(this._element).closest(Le)[0],s=x.getSelectorFromElement(this._element);if(e){var r="UL"===e.nodeName?Ne:Me;n=(n=S.makeArray(S(e).find(r)))[n.length-1]}var a=S.Event(xe.HIDE,{relatedTarget:this._element}),o=S.Event(xe.SHOW,{relatedTarget:n});if(n&&S(n).trigger(a),S(this._element).trigger(o),!o.isDefaultPrevented()&&!a.isDefaultPrevented()){s&&(t=S(s)[0]),this._activate(this._element,e);var l=function(){var t=S.Event(xe.HIDDEN,{relatedTarget:i._element}),e=S.Event(xe.SHOWN,{relatedTarget:n});S(n).trigger(t),S(i._element).trigger(e)};t?this._activate(t,t.parentNode,l):l()}}},t.dispose=function(){S.removeData(this._element,ke),this._element=null},t._activate=function(t,e,i){function n(){return s._transitionComplete(t,r,a,i)}var s=this,r=("UL"===e.nodeName?S(e).find(Ne):S(e).children(Me))[0],a=i&&x.supportsTransitionEnd()&&r&&S(r).hasClass(Ie);r&&a?S(r).one(x.TRANSITION_END,n).emulateTransitionEnd(150):n(),r&&S(r).removeClass(Oe)},t._transitionComplete=function(t,e,i,n){if(e){S(e).removeClass(De);var s=S(e.parentNode).find(je)[0];s&&S(s).removeClass(De),"tab"===e.getAttribute("role")&&e.setAttribute("aria-selected",!1)}if(S(t).addClass(De),"tab"===t.getAttribute("role")&&t.setAttribute("aria-selected",!0),i?(x.reflow(t),S(t).addClass(Oe)):S(t).removeClass(Ie),t.parentNode&&S(t.parentNode).hasClass(Ee)){var r=S(t).closest(Pe)[0];r&&S(r).find(Ue).addClass(De),t.setAttribute("aria-expanded",!0)}n&&n()},n._jQueryInterface=function(i){return this.each(function(){var t=S(this),e=t.data(ke);if(e||(e=new n(this),t.data(ke,e)),"string"==typeof i){if(void 0===e[i])throw new Error('No method named "'+i+'"');e[i]()}})},E(n,null,[{key:"VERSION",get:function(){return"4.0.0-beta.2"}}]),n}(),S(document).on(xe.CLICK_DATA_API,Re,function(t){t.preventDefault(),Be._jQueryInterface.call(S(this),"show")}),S.fn.tab=Be._jQueryInterface,S.fn.tab.Constructor=Be,S.fn.tab.noConflict=function(){return S.fn.tab=Ce,Be._jQueryInterface},Be);(function(){if(void 0===S)throw new Error("Bootstrap's JavaScript requires jQuery. jQuery must be included before Bootstrap's JavaScript.");var t=S.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")})(),t.Util=x,t.Alert=Fe,t.Button=ze,t.Carousel=We,t.Collapse=$e,t.Dropdown=qe,t.Modal=Ve,t.Popover=Ge,t.Scrollspy=Xe,t.Tab=Ke,t.Tooltip=Ye}({},t,e)}).call(e,i(0),i(25).default)},function(t,e,i){var n,s,r,a;a=function(k){k.ui=k.ui||{};k.ui.version="1.12.1";var s,i=0,o=Array.prototype.slice;k.cleanData=(s=k.cleanData,function(t){var e,i,n;for(n=0;null!=(i=t[n]);n++)try{(e=k._data(i,"events"))&&e.remove&&k(i).triggerHandler("remove")}catch(t){}s(t)}),k.widget=function(t,i,e){var n,s,r,a={},o=t.split(".")[0],l=o+"-"+(t=t.split(".")[1]);return e||(e=i,i=k.Widget),k.isArray(e)&&(e=k.extend.apply(null,[{}].concat(e))),k.expr[":"][l.toLowerCase()]=function(t){return!!k.data(t,l)},k[o]=k[o]||{},n=k[o][t],s=k[o][t]=function(t,e){if(!this._createWidget)return new s(t,e);arguments.length&&this._createWidget(t,e)},k.extend(s,n,{version:e.version,_proto:k.extend({},e),_childConstructors:[]}),(r=new i).options=k.widget.extend({},r.options),k.each(e,function(e,n){function s(){return i.prototype[e].apply(this,arguments)}function r(t){return i.prototype[e].apply(this,t)}k.isFunction(n)?a[e]=function(){var t,e=this._super,i=this._superApply;return this._super=s,this._superApply=r,t=n.apply(this,arguments),this._super=e,this._superApply=i,t}:a[e]=n}),s.prototype=k.widget.extend(r,{widgetEventPrefix:n&&r.widgetEventPrefix||t},a,{constructor:s,namespace:o,widgetName:t,widgetFullName:l}),n?(k.each(n._childConstructors,function(t,e){var i=e.prototype;k.widget(i.namespace+"."+i.widgetName,s,e._proto)}),delete n._childConstructors):i._childConstructors.push(s),k.widget.bridge(t,s),s},k.widget.extend=function(t){for(var e,i,n=o.call(arguments,1),s=0,r=n.length;s<r;s++)for(e in n[s])i=n[s][e],n[s].hasOwnProperty(e)&&void 0!==i&&(k.isPlainObject(i)?t[e]=k.isPlainObject(t[e])?k.widget.extend({},t[e],i):k.widget.extend({},i):t[e]=i);return t},k.widget.bridge=function(r,e){var a=e.prototype.widgetFullName||r;k.fn[r]=function(i){var t="string"==typeof i,n=o.call(arguments,1),s=this;return t?this.length||"instance"!==i?this.each(function(){var t,e=k.data(this,a);return"instance"===i?(s=e,!1):e?k.isFunction(e[i])&&"_"!==i.charAt(0)?(t=e[i].apply(e,n))!==e&&void 0!==t?(s=t&&t.jquery?s.pushStack(t.get()):t,!1):void 0:k.error("no such method '"+i+"' for "+r+" widget instance"):k.error("cannot call methods on "+r+" prior to initialization; attempted to call method '"+i+"'")}):s=void 0:(n.length&&(i=k.widget.extend.apply(null,[i].concat(n))),this.each(function(){var t=k.data(this,a);t?(t.option(i||{}),t._init&&t._init()):k.data(this,a,new e(i,this))})),s}},k.Widget=function(){},k.Widget._childConstructors=[],k.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{classes:{},disabled:!1,create:null},_createWidget:function(t,e){e=k(e||this.defaultElement||this)[0],this.element=k(e),this.uuid=i++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=k(),this.hoverable=k(),this.focusable=k(),this.classesElementLookup={},e!==this&&(k.data(e,this.widgetFullName,this),this._on(!0,this.element,{remove:function(t){t.target===e&&this.destroy()}}),this.document=k(e.style?e.ownerDocument:e.document||e),this.window=k(this.document[0].defaultView||this.document[0].parentWindow)),this.options=k.widget.extend({},this.options,this._getCreateOptions(),t),this._create(),this.options.disabled&&this._setOptionDisabled(this.options.disabled),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:function(){return{}},_getCreateEventData:k.noop,_create:k.noop,_init:k.noop,destroy:function(){var i=this;this._destroy(),k.each(this.classesElementLookup,function(t,e){i._removeClass(e,t)}),this.element.off(this.eventNamespace).removeData(this.widgetFullName),this.widget().off(this.eventNamespace).removeAttr("aria-disabled"),this.bindings.off(this.eventNamespace)},_destroy:k.noop,widget:function(){return this.element},option:function(t,e){var i,n,s,r=t;if(0===arguments.length)return k.widget.extend({},this.options);if("string"==typeof t)if(r={},t=(i=t.split(".")).shift(),i.length){for(n=r[t]=k.widget.extend({},this.options[t]),s=0;s<i.length-1;s++)n[i[s]]=n[i[s]]||{},n=n[i[s]];if(t=i.pop(),1===arguments.length)return void 0===n[t]?null:n[t];n[t]=e}else{if(1===arguments.length)return void 0===this.options[t]?null:this.options[t];r[t]=e}return this._setOptions(r),this},_setOptions:function(t){var e;for(e in t)this._setOption(e,t[e]);return this},_setOption:function(t,e){return"classes"===t&&this._setOptionClasses(e),this.options[t]=e,"disabled"===t&&this._setOptionDisabled(e),this},_setOptionClasses:function(t){var e,i,n;for(e in t)n=this.classesElementLookup[e],t[e]!==this.options.classes[e]&&n&&n.length&&(i=k(n.get()),this._removeClass(n,e),i.addClass(this._classes({element:i,keys:e,classes:t,add:!0})))},_setOptionDisabled:function(t){this._toggleClass(this.widget(),this.widgetFullName+"-disabled",null,!!t),t&&(this._removeClass(this.hoverable,null,"ui-state-hover"),this._removeClass(this.focusable,null,"ui-state-focus"))},enable:function(){return this._setOptions({disabled:!1})},disable:function(){return this._setOptions({disabled:!0})},_classes:function(s){var r=[],a=this;function t(t,e){var i,n;for(n=0;n<t.length;n++)i=a.classesElementLookup[t[n]]||k(),i=s.add?k(k.unique(i.get().concat(s.element.get()))):k(i.not(s.element).get()),a.classesElementLookup[t[n]]=i,r.push(t[n]),e&&s.classes[t[n]]&&r.push(s.classes[t[n]])}return s=k.extend({element:this.element,classes:this.options.classes||{}},s),this._on(s.element,{remove:"_untrackClassesElement"}),s.keys&&t(s.keys.match(/\S+/g)||[],!0),s.extra&&t(s.extra.match(/\S+/g)||[]),r.join(" ")},_untrackClassesElement:function(i){var n=this;k.each(n.classesElementLookup,function(t,e){-1!==k.inArray(i.target,e)&&(n.classesElementLookup[t]=k(e.not(i.target).get()))})},_removeClass:function(t,e,i){return this._toggleClass(t,e,i,!1)},_addClass:function(t,e,i){return this._toggleClass(t,e,i,!0)},_toggleClass:function(t,e,i,n){n="boolean"==typeof n?n:i;var s="string"==typeof t||null===t,r={extra:s?e:i,keys:s?t:e,element:s?this.element:t,add:n};return r.element.toggleClass(this._classes(r),n),this},_on:function(a,o,t){var l,c=this;"boolean"!=typeof a&&(t=o,o=a,a=!1),t?(o=l=k(o),this.bindings=this.bindings.add(o)):(t=o,o=this.element,l=this.widget()),k.each(t,function(t,e){function i(){if(a||!0!==c.options.disabled&&!k(this).hasClass("ui-state-disabled"))return("string"==typeof e?c[e]:e).apply(c,arguments)}"string"!=typeof e&&(i.guid=e.guid=e.guid||i.guid||k.guid++);var n=t.match(/^([\w:-]*)\s*(.*)$/),s=n[1]+c.eventNamespace,r=n[2];r?l.on(s,r,i):o.on(s,i)})},_off:function(t,e){e=(e||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,t.off(e).off(e),this.bindings=k(this.bindings.not(t).get()),this.focusable=k(this.focusable.not(t).get()),this.hoverable=k(this.hoverable.not(t).get())},_delay:function(t,e){var i=this;return setTimeout(function(){return("string"==typeof t?i[t]:t).apply(i,arguments)},e||0)},_hoverable:function(t){this.hoverable=this.hoverable.add(t),this._on(t,{mouseenter:function(t){this._addClass(k(t.currentTarget),null,"ui-state-hover")},mouseleave:function(t){this._removeClass(k(t.currentTarget),null,"ui-state-hover")}})},_focusable:function(t){this.focusable=this.focusable.add(t),this._on(t,{focusin:function(t){this._addClass(k(t.currentTarget),null,"ui-state-focus")},focusout:function(t){this._removeClass(k(t.currentTarget),null,"ui-state-focus")}})},_trigger:function(t,e,i){var n,s,r=this.options[t];if(i=i||{},(e=k.Event(e)).type=(t===this.widgetEventPrefix?t:this.widgetEventPrefix+t).toLowerCase(),e.target=this.element[0],s=e.originalEvent)for(n in s)n in e||(e[n]=s[n]);return this.element.trigger(e,i),!(k.isFunction(r)&&!1===r.apply(this.element[0],[e].concat(i))||e.isDefaultPrevented())}},k.each({show:"fadeIn",hide:"fadeOut"},function(r,a){k.Widget.prototype["_"+r]=function(e,t,i){var n;"string"==typeof t&&(t={effect:t});var s=t?!0===t||"number"==typeof t?a:t.effect||a:r;"number"==typeof(t=t||{})&&(t={duration:t}),n=!k.isEmptyObject(t),t.complete=i,t.delay&&e.delay(t.delay),n&&k.effects&&k.effects.effect[s]?e[r](t):s!==r&&e[s]?e[s](t.duration,t.easing,i):e.queue(function(t){k(this)[r](),i&&i.call(e[0]),t()})}});var r,w,S,n,a,l,c,u,e;k.widget;function C(t,e,i){return[parseFloat(t[0])*(u.test(t[0])?e/100:1),parseFloat(t[1])*(u.test(t[1])?i/100:1)]}function x(t,e){return parseInt(k.css(t,e),10)||0}w=Math.max,S=Math.abs,n=/left|center|right/,a=/top|center|bottom/,l=/[\+\-]\d+(\.[\d]+)?%?/,c=/^\w+/,u=/%$/,e=k.fn.position,k.position={scrollbarWidth:function(){if(void 0!==r)return r;var t,e,i=k("<div style='display:block;position:absolute;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>"),n=i.children()[0];return k("body").append(i),t=n.offsetWidth,i.css("overflow","scroll"),t===(e=n.offsetWidth)&&(e=i[0].clientWidth),i.remove(),r=t-e},getScrollInfo:function(t){var e=t.isWindow||t.isDocument?"":t.element.css("overflow-x"),i=t.isWindow||t.isDocument?"":t.element.css("overflow-y"),n="scroll"===e||"auto"===e&&t.width<t.element[0].scrollWidth;return{width:"scroll"===i||"auto"===i&&t.height<t.element[0].scrollHeight?k.position.scrollbarWidth():0,height:n?k.position.scrollbarWidth():0}},getWithinInfo:function(t){var e=k(t||window),i=k.isWindow(e[0]),n=!!e[0]&&9===e[0].nodeType;return{element:e,isWindow:i,isDocument:n,offset:!i&&!n?k(t).offset():{left:0,top:0},scrollLeft:e.scrollLeft(),scrollTop:e.scrollTop(),width:e.outerWidth(),height:e.outerHeight()}}},k.fn.position=function(h){if(!h||!h.of)return e.apply(this,arguments);h=k.extend({},h);var d,p,f,m,g,t,v=k(h.of),y=k.position.getWithinInfo(h.within),_=k.position.getScrollInfo(y),b=(h.collision||"flip").split(" "),T={};return t=function(t){var e=t[0];return 9===e.nodeType?{width:t.width(),height:t.height(),offset:{top:0,left:0}}:k.isWindow(e)?{width:t.width(),height:t.height(),offset:{top:t.scrollTop(),left:t.scrollLeft()}}:e.preventDefault?{width:0,height:0,offset:{top:e.pageY,left:e.pageX}}:{width:t.outerWidth(),height:t.outerHeight(),offset:t.offset()}}(v),v[0].preventDefault&&(h.at="left top"),p=t.width,f=t.height,m=t.offset,g=k.extend({},m),k.each(["my","at"],function(){var t,e,i=(h[this]||"").split(" ");1===i.length&&(i=n.test(i[0])?i.concat(["center"]):a.test(i[0])?["center"].concat(i):["center","center"]),i[0]=n.test(i[0])?i[0]:"center",i[1]=a.test(i[1])?i[1]:"center",t=l.exec(i[0]),e=l.exec(i[1]),T[this]=[t?t[0]:0,e?e[0]:0],h[this]=[c.exec(i[0])[0],c.exec(i[1])[0]]}),1===b.length&&(b[1]=b[0]),"right"===h.at[0]?g.left+=p:"center"===h.at[0]&&(g.left+=p/2),"bottom"===h.at[1]?g.top+=f:"center"===h.at[1]&&(g.top+=f/2),d=C(T.at,p,f),g.left+=d[0],g.top+=d[1],this.each(function(){var i,t,a=k(this),o=a.outerWidth(),l=a.outerHeight(),e=x(this,"marginLeft"),n=x(this,"marginTop"),s=o+e+x(this,"marginRight")+_.width,r=l+n+x(this,"marginBottom")+_.height,c=k.extend({},g),u=C(T.my,a.outerWidth(),a.outerHeight());"right"===h.my[0]?c.left-=o:"center"===h.my[0]&&(c.left-=o/2),"bottom"===h.my[1]?c.top-=l:"center"===h.my[1]&&(c.top-=l/2),c.left+=u[0],c.top+=u[1],i={marginLeft:e,marginTop:n},k.each(["left","top"],function(t,e){k.ui.position[b[t]]&&k.ui.position[b[t]][e](c,{targetWidth:p,targetHeight:f,elemWidth:o,elemHeight:l,collisionPosition:i,collisionWidth:s,collisionHeight:r,offset:[d[0]+u[0],d[1]+u[1]],my:h.my,at:h.at,within:y,elem:a})}),h.using&&(t=function(t){var e=m.left-c.left,i=e+p-o,n=m.top-c.top,s=n+f-l,r={target:{element:v,left:m.left,top:m.top,width:p,height:f},element:{element:a,left:c.left,top:c.top,width:o,height:l},horizontal:i<0?"left":0<e?"right":"center",vertical:s<0?"top":0<n?"bottom":"middle"};p<o&&S(e+i)<p&&(r.horizontal="center"),f<l&&S(n+s)<f&&(r.vertical="middle"),w(S(e),S(i))>w(S(n),S(s))?r.important="horizontal":r.important="vertical",h.using.call(this,t,r)}),a.offset(k.extend(c,{using:t}))})},k.ui.position={fit:{left:function(t,e){var i,n=e.within,s=n.isWindow?n.scrollLeft:n.offset.left,r=n.width,a=t.left-e.collisionPosition.marginLeft,o=s-a,l=a+e.collisionWidth-r-s;e.collisionWidth>r?0<o&&l<=0?(i=t.left+o+e.collisionWidth-r-s,t.left+=o-i):t.left=0<l&&o<=0?s:l<o?s+r-e.collisionWidth:s:0<o?t.left+=o:0<l?t.left-=l:t.left=w(t.left-a,t.left)},top:function(t,e){var i,n=e.within,s=n.isWindow?n.scrollTop:n.offset.top,r=e.within.height,a=t.top-e.collisionPosition.marginTop,o=s-a,l=a+e.collisionHeight-r-s;e.collisionHeight>r?0<o&&l<=0?(i=t.top+o+e.collisionHeight-r-s,t.top+=o-i):t.top=0<l&&o<=0?s:l<o?s+r-e.collisionHeight:s:0<o?t.top+=o:0<l?t.top-=l:t.top=w(t.top-a,t.top)}},flip:{left:function(t,e){var i,n,s=e.within,r=s.offset.left+s.scrollLeft,a=s.width,o=s.isWindow?s.scrollLeft:s.offset.left,l=t.left-e.collisionPosition.marginLeft,c=l-o,u=l+e.collisionWidth-a-o,h="left"===e.my[0]?-e.elemWidth:"right"===e.my[0]?e.elemWidth:0,d="left"===e.at[0]?e.targetWidth:"right"===e.at[0]?-e.targetWidth:0,p=-2*e.offset[0];c<0?((i=t.left+h+d+p+e.collisionWidth-a-r)<0||i<S(c))&&(t.left+=h+d+p):0<u&&(0<(n=t.left-e.collisionPosition.marginLeft+h+d+p-o)||S(n)<u)&&(t.left+=h+d+p)},top:function(t,e){var i,n,s=e.within,r=s.offset.top+s.scrollTop,a=s.height,o=s.isWindow?s.scrollTop:s.offset.top,l=t.top-e.collisionPosition.marginTop,c=l-o,u=l+e.collisionHeight-a-o,h="top"===e.my[1]?-e.elemHeight:"bottom"===e.my[1]?e.elemHeight:0,d="top"===e.at[1]?e.targetHeight:"bottom"===e.at[1]?-e.targetHeight:0,p=-2*e.offset[1];c<0?((n=t.top+h+d+p+e.collisionHeight-a-r)<0||n<S(c))&&(t.top+=h+d+p):0<u&&(0<(i=t.top-e.collisionPosition.marginTop+h+d+p-o)||S(i)<u)&&(t.top+=h+d+p)}},flipfit:{left:function(){k.ui.position.flip.left.apply(this,arguments),k.ui.position.fit.left.apply(this,arguments)},top:function(){k.ui.position.flip.top.apply(this,arguments),k.ui.position.fit.top.apply(this,arguments)}}};k.ui.position,k.extend(k.expr[":"],{data:k.expr.createPseudo?k.expr.createPseudo(function(e){return function(t){return!!k.data(t,e)}}):function(t,e,i){return!!k.data(t,i[3])}}),k.fn.extend({disableSelection:(t="onselectstart"in document.createElement("div")?"selectstart":"mousedown",function(){return this.on(t+".ui-disableSelection",function(t){t.preventDefault()})}),enableSelection:function(){return this.off(".ui-disableSelection")}});var t,h,d,p,f,m,g,v,y,_,b,T,E,D,A,I,O,P,L,M,N,R,U="ui-effects-",j="ui-effects-style",B="ui-effects-animated",H=k;function F(t,e,i){var n=y[e.type]||{};return null==t?i||!e.def?null:e.def:(t=n.floor?~~t:parseFloat(t),isNaN(t)?e.def:n.mod?(t+n.mod)%n.mod:t<0?0:n.max<t?n.max:t)}function z(a){var o=g(),l=o._rgba=[];return a=a.toLowerCase(),T(m,function(t,e){var i,n=e.re.exec(a),s=n&&e.parse(n),r=e.space||"rgba";if(s)return i=o[r](s),o[v[r].cache]=i[v[r].cache],l=o._rgba=i._rgba,!1}),l.length?("0,0,0,0"===l.join()&&h.extend(l,p.transparent),o):p[a]}function W(t,e,i){return 6*(i=(i+1)%1)<1?t+(e-t)*i*6:2*i<1?e:3*i<2?t+(e-t)*(2/3-i)*6:t}function $(t){var e,i,n=t.ownerDocument.defaultView?t.ownerDocument.defaultView.getComputedStyle(t,null):t.currentStyle,s={};if(n&&n.length&&n[0]&&n[n[0]])for(i=n.length;i--;)"string"==typeof n[e=n[i]]&&(s[k.camelCase(e)]=n[e]);else for(e in n)"string"==typeof n[e]&&(s[e]=n[e]);return s}function q(t,e,i,n){return k.isPlainObject(t)&&(t=(e=t).effect),t={effect:t},null==e&&(e={}),k.isFunction(e)&&(n=e,i=null,e={}),"number"!=typeof e&&!k.fx.speeds[e]||(n=i,i=e,e={}),k.isFunction(i)&&(n=i,i=null),e&&k.extend(t,e),i=i||e.duration,t.duration=k.fx.off?0:"number"==typeof i?i:i in k.fx.speeds?k.fx.speeds[i]:k.fx.speeds._default,t.complete=n||e.complete,t}function V(t){return!(t&&"number"!=typeof t&&!k.fx.speeds[t])||("string"==typeof t&&!k.effects.effect[t]||(!!k.isFunction(t)||"object"==typeof t&&!t.effect))}function Y(t,e){var i=e.outerWidth(),n=e.outerHeight(),s=/^rect\((-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto)\)$/.exec(t)||["",0,i,n,0];return{top:parseFloat(s[1])||0,right:"auto"===s[2]?i:parseFloat(s[2]),bottom:"auto"===s[3]?n:parseFloat(s[3]),left:parseFloat(s[4])||0}}k.effects={effect:{}},f=/^([\-+])=\s*(\d+\.?\d*)/,m=[{re:/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(t){return[t[1],t[2],t[3],t[4]]}},{re:/rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(t){return[2.55*t[1],2.55*t[2],2.55*t[3],t[4]]}},{re:/#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/,parse:function(t){return[parseInt(t[1],16),parseInt(t[2],16),parseInt(t[3],16)]}},{re:/#([a-f0-9])([a-f0-9])([a-f0-9])/,parse:function(t){return[parseInt(t[1]+t[1],16),parseInt(t[2]+t[2],16),parseInt(t[3]+t[3],16)]}},{re:/hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,space:"hsla",parse:function(t){return[t[1],t[2]/100,t[3]/100,t[4]]}}],g=(h=H).Color=function(t,e,i,n){return new h.Color.fn.parse(t,e,i,n)},v={rgba:{props:{red:{idx:0,type:"byte"},green:{idx:1,type:"byte"},blue:{idx:2,type:"byte"}}},hsla:{props:{hue:{idx:0,type:"degrees"},saturation:{idx:1,type:"percent"},lightness:{idx:2,type:"percent"}}}},y={byte:{floor:!0,max:255},percent:{max:1},degrees:{mod:360,floor:!0}},_=g.support={},b=h("<p>")[0],T=h.each,b.style.cssText="background-color:rgba(1,1,1,.5)",_.rgba=-1<b.style.backgroundColor.indexOf("rgba"),T(v,function(t,e){e.cache="_"+t,e.props.alpha={idx:3,type:"percent",def:1}}),g.fn=h.extend(g.prototype,{parse:function(s,t,e,i){if(s===d)return this._rgba=[null,null,null,null],this;(s.jquery||s.nodeType)&&(s=h(s).css(t),t=d);var r=this,n=h.type(s),a=this._rgba=[];return t!==d&&(s=[s,t,e,i],n="array"),"string"===n?this.parse(z(s)||p._default):"array"===n?(T(v.rgba.props,function(t,e){a[e.idx]=F(s[e.idx],e)}),this):"object"===n?(T(v,s instanceof g?function(t,e){s[e.cache]&&(r[e.cache]=s[e.cache].slice())}:function(t,i){var n=i.cache;T(i.props,function(t,e){if(!r[n]&&i.to){if("alpha"===t||null==s[t])return;r[n]=i.to(r._rgba)}r[n][e.idx]=F(s[t],e,!0)}),r[n]&&h.inArray(null,r[n].slice(0,3))<0&&(r[n][3]=1,i.from&&(r._rgba=i.from(r[n])))}),this):void 0},is:function(t){var s=g(t),r=!0,a=this;return T(v,function(t,e){var i,n=s[e.cache];return n&&(i=a[e.cache]||e.to&&e.to(a._rgba)||[],T(e.props,function(t,e){if(null!=n[e.idx])return r=n[e.idx]===i[e.idx]})),r}),r},_space:function(){var i=[],n=this;return T(v,function(t,e){n[e.cache]&&i.push(t)}),i.pop()},transition:function(t,a){var o=g(t),e=o._space(),i=v[e],n=0===this.alpha()?g("transparent"):this,l=n[i.cache]||i.to(n._rgba),c=l.slice();return o=o[i.cache],T(i.props,function(t,e){var i=e.idx,n=l[i],s=o[i],r=y[e.type]||{};null!==s&&(null===n?c[i]=s:(r.mod&&(r.mod/2<s-n?n+=r.mod:r.mod/2<n-s&&(n-=r.mod)),c[i]=F((s-n)*a+n,e)))}),this[e](c)},blend:function(t){if(1===this._rgba[3])return this;var e=this._rgba.slice(),i=e.pop(),n=g(t)._rgba;return g(h.map(e,function(t,e){return(1-i)*n[e]+i*t}))},toRgbaString:function(){var t="rgba(",e=h.map(this._rgba,function(t,e){return null==t?2<e?1:0:t});return 1===e[3]&&(e.pop(),t="rgb("),t+e.join()+")"},toHslaString:function(){var t="hsla(",e=h.map(this.hsla(),function(t,e){return null==t&&(t=2<e?1:0),e&&e<3&&(t=Math.round(100*t)+"%"),t});return 1===e[3]&&(e.pop(),t="hsl("),t+e.join()+")"},toHexString:function(t){var e=this._rgba.slice(),i=e.pop();return t&&e.push(~~(255*i)),"#"+h.map(e,function(t){return 1===(t=(t||0).toString(16)).length?"0"+t:t}).join("")},toString:function(){return 0===this._rgba[3]?"transparent":this.toRgbaString()}}),g.fn.parse.prototype=g.fn,v.hsla.to=function(t){if(null==t[0]||null==t[1]||null==t[2])return[null,null,null,t[3]];var e,i,n=t[0]/255,s=t[1]/255,r=t[2]/255,a=t[3],o=Math.max(n,s,r),l=Math.min(n,s,r),c=o-l,u=o+l,h=.5*u;return e=l===o?0:n===o?60*(s-r)/c+360:s===o?60*(r-n)/c+120:60*(n-s)/c+240,i=0==c?0:h<=.5?c/u:c/(2-u),[Math.round(e)%360,i,h,null==a?1:a]},v.hsla.from=function(t){if(null==t[0]||null==t[1]||null==t[2])return[null,null,null,t[3]];var e=t[0]/360,i=t[1],n=t[2],s=t[3],r=n<=.5?n*(1+i):n+i-n*i,a=2*n-r;return[Math.round(255*W(a,r,e+1/3)),Math.round(255*W(a,r,e)),Math.round(255*W(a,r,e-1/3)),s]},T(v,function(l,t){var i=t.props,a=t.cache,o=t.to,c=t.from;g.fn[l]=function(t){if(o&&!this[a]&&(this[a]=o(this._rgba)),t===d)return this[a].slice();var e,n=h.type(t),s="array"===n||"object"===n?t:arguments,r=this[a].slice();return T(i,function(t,e){var i=s["object"===n?t:e.idx];null==i&&(i=r[e.idx]),r[e.idx]=F(i,e)}),c?((e=g(c(r)))[a]=r,e):g(r)},T(i,function(a,o){g.fn[a]||(g.fn[a]=function(t){var e,i=h.type(t),n="alpha"===a?this._hsla?"hsla":"rgba":l,s=this[n](),r=s[o.idx];return"undefined"===i?r:("function"===i&&(t=t.call(this,r),i=h.type(t)),null==t&&o.empty?this:("string"===i&&(e=f.exec(t))&&(t=r+parseFloat(e[2])*("+"===e[1]?1:-1)),s[o.idx]=t,this[n](s)))})})}),g.hook=function(t){var e=t.split(" ");T(e,function(t,r){h.cssHooks[r]={set:function(t,e){var i,n,s="";if("transparent"!==e&&("string"!==h.type(e)||(i=z(e)))){if(e=g(i||e),!_.rgba&&1!==e._rgba[3]){for(n="backgroundColor"===r?t.parentNode:t;(""===s||"transparent"===s)&&n&&n.style;)try{s=h.css(n,"backgroundColor"),n=n.parentNode}catch(t){}e=e.blend(s&&"transparent"!==s?s:"_default")}e=e.toRgbaString()}try{t.style[r]=e}catch(t){}}},h.fx.step[r]=function(t){t.colorInit||(t.start=g(t.elem,r),t.end=g(t.end),t.colorInit=!0),h.cssHooks[r].set(t.elem,t.start.transition(t.end,t.pos))}})},g.hook("backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor"),h.cssHooks.borderColor={expand:function(i){var n={};return T(["Top","Right","Bottom","Left"],function(t,e){n["border"+e+"Color"]=i}),n}},p=h.Color.names={aqua:"#00ffff",black:"#000000",blue:"#0000ff",fuchsia:"#ff00ff",gray:"#808080",green:"#008000",lime:"#00ff00",maroon:"#800000",navy:"#000080",olive:"#808000",purple:"#800080",red:"#ff0000",silver:"#c0c0c0",teal:"#008080",white:"#ffffff",yellow:"#ffff00",transparent:[null,null,null,0],_default:"#ffffff"},I=["add","remove","toggle"],O={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1},k.each(["borderLeftStyle","borderRightStyle","borderBottomStyle","borderTopStyle"],function(t,e){k.fx.step[e]=function(t){("none"!==t.end&&!t.setAttr||1===t.pos&&!t.setAttr)&&(H.style(t.elem,e,t.end),t.setAttr=!0)}}),k.fn.addBack||(k.fn.addBack=function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}),k.effects.animateClass=function(s,t,e,i){var r=k.speed(t,e,i);return this.queue(function(){var t,i=k(this),e=i.attr("class")||"",n=r.children?i.find("*").addBack():i;n=n.map(function(){return{el:k(this),start:$(this)}}),(t=function(){k.each(I,function(t,e){s[e]&&i[e+"Class"](s[e])})})(),n=n.map(function(){return this.end=$(this.el[0]),this.diff=function(t,e){var i,n,s={};for(i in e)n=e[i],t[i]!==n&&(O[i]||!k.fx.step[i]&&isNaN(parseFloat(n))||(s[i]=n));return s}(this.start,this.end),this}),i.attr("class",e),n=n.map(function(){var t=this,e=k.Deferred(),i=k.extend({},r,{queue:!1,complete:function(){e.resolve(t)}});return this.el.animate(this.diff,i),e.promise()}),k.when.apply(k,n.get()).done(function(){t(),k.each(arguments,function(){var e=this.el;k.each(this.diff,function(t){e.css(t,"")})}),r.complete.call(i[0])})})},k.fn.extend({addClass:(A=k.fn.addClass,function(t,e,i,n){return e?k.effects.animateClass.call(this,{add:t},e,i,n):A.apply(this,arguments)}),removeClass:(D=k.fn.removeClass,function(t,e,i,n){return 1<arguments.length?k.effects.animateClass.call(this,{remove:t},e,i,n):D.apply(this,arguments)}),toggleClass:(E=k.fn.toggleClass,function(t,e,i,n,s){return"boolean"==typeof e||void 0===e?i?k.effects.animateClass.call(this,e?{add:t}:{remove:t},i,n,s):E.apply(this,arguments):k.effects.animateClass.call(this,{toggle:t},e,i,n)}),switchClass:function(t,e,i,n,s){return k.effects.animateClass.call(this,{add:e,remove:t},i,n,s)}}),k.expr&&k.expr.filters&&k.expr.filters.animated&&(k.expr.filters.animated=(P=k.expr.filters.animated,function(t){return!!k(t).data(B)||P(t)})),!1!==k.uiBackCompat&&k.extend(k.effects,{save:function(t,e){for(var i=0,n=e.length;i<n;i++)null!==e[i]&&t.data(U+e[i],t[0].style[e[i]])},restore:function(t,e){for(var i,n=0,s=e.length;n<s;n++)null!==e[n]&&(i=t.data(U+e[n]),t.css(e[n],i))},setMode:function(t,e){return"toggle"===e&&(e=t.is(":hidden")?"show":"hide"),e},createWrapper:function(i){if(i.parent().is(".ui-effects-wrapper"))return i.parent();var n={width:i.outerWidth(!0),height:i.outerHeight(!0),float:i.css("float")},t=k("<div></div>").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0}),e={width:i.width(),height:i.height()},s=document.activeElement;try{s.id}catch(t){s=document.body}return i.wrap(t),i[0]!==s&&!k.contains(i[0],s)||k(s).trigger("focus"),t=i.parent(),"static"===i.css("position")?(t.css({position:"relative"}),i.css({position:"relative"})):(k.extend(n,{position:i.css("position"),zIndex:i.css("z-index")}),k.each(["top","left","bottom","right"],function(t,e){n[e]=i.css(e),isNaN(parseInt(n[e],10))&&(n[e]="auto")}),i.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})),i.css(e),t.css(n).show()},removeWrapper:function(t){var e=document.activeElement;return t.parent().is(".ui-effects-wrapper")&&(t.parent().replaceWith(t),t[0]!==e&&!k.contains(t[0],e)||k(e).trigger("focus")),t}}),k.extend(k.effects,{version:"1.12.1",define:function(t,e,i){return i||(i=e,e="effect"),k.effects.effect[t]=i,k.effects.effect[t].mode=e,i},scaledDimensions:function(t,e,i){if(0===e)return{height:0,width:0,outerHeight:0,outerWidth:0};var n="horizontal"!==i?(e||100)/100:1,s="vertical"!==i?(e||100)/100:1;return{height:t.height()*s,width:t.width()*n,outerHeight:t.outerHeight()*s,outerWidth:t.outerWidth()*n}},clipToBox:function(t){return{width:t.clip.right-t.clip.left,height:t.clip.bottom-t.clip.top,left:t.clip.left,top:t.clip.top}},unshift:function(t,e,i){var n=t.queue();1<e&&n.splice.apply(n,[1,0].concat(n.splice(e,i))),t.dequeue()},saveStyle:function(t){t.data(j,t[0].style.cssText)},restoreStyle:function(t){t[0].style.cssText=t.data(j)||"",t.removeData(j)},mode:function(t,e){var i=t.is(":hidden");return"toggle"===e&&(e=i?"show":"hide"),(i?"hide"===e:"show"===e)&&(e="none"),e},getBaseline:function(t,e){var i,n;switch(t[0]){case"top":i=0;break;case"middle":i=.5;break;case"bottom":i=1;break;default:i=t[0]/e.height}switch(t[1]){case"left":n=0;break;case"center":n=.5;break;case"right":n=1;break;default:n=t[1]/e.width}return{x:n,y:i}},createPlaceholder:function(t){var e,i=t.css("position"),n=t.position();return t.css({marginTop:t.css("marginTop"),marginBottom:t.css("marginBottom"),marginLeft:t.css("marginLeft"),marginRight:t.css("marginRight")}).outerWidth(t.outerWidth()).outerHeight(t.outerHeight()),/^(static|relative)/.test(i)&&(i="absolute",e=k("<"+t[0].nodeName+">").insertAfter(t).css({display:/^(inline|ruby)/.test(t.css("display"))?"inline-block":"block",visibility:"hidden",marginTop:t.css("marginTop"),marginBottom:t.css("marginBottom"),marginLeft:t.css("marginLeft"),marginRight:t.css("marginRight"),float:t.css("float")}).outerWidth(t.outerWidth()).outerHeight(t.outerHeight()).addClass("ui-effects-placeholder"),t.data(U+"placeholder",e)),t.css({position:i,left:n.left,top:n.top}),e},removePlaceholder:function(t){var e=U+"placeholder",i=t.data(e);i&&(i.remove(),t.removeData(e))},cleanUp:function(t){k.effects.restoreStyle(t),k.effects.removePlaceholder(t)},setTransition:function(n,t,s,r){return r=r||{},k.each(t,function(t,e){var i=n.cssUnit(e);0<i[0]&&(r[e]=i[0]*s+i[1])}),r}}),k.fn.extend({effect:function(){function t(t){var e=k(this),i=k.effects.mode(e,o)||r;e.data(B,!0),l.push(i),r&&("show"===i||i===r&&"hide"===i)&&e.show(),r&&"none"===i||k.effects.saveStyle(e),k.isFunction(t)&&t()}var n=q.apply(this,arguments),s=k.effects.effect[n.effect],r=s.mode,e=n.queue,i=e||"fx",a=n.complete,o=n.mode,l=[];if(k.fx.off||!s)return o?this[o](n.duration,a):this.each(function(){a&&a.call(this)});function c(t){var e=k(this);function i(){k.isFunction(a)&&a.call(e[0]),k.isFunction(t)&&t()}n.mode=l.shift(),!1===k.uiBackCompat||r?"none"===n.mode?(e[o](),i()):s.call(e[0],n,function(){e.removeData(B),k.effects.cleanUp(e),"hide"===n.mode&&e.hide(),i()}):(e.is(":hidden")?"hide"===o:"show"===o)?(e[o](),i()):s.call(e[0],n,i)}return!1===e?this.each(t).each(c):this.queue(i,t).queue(i,c)},show:(N=k.fn.show,function(t){if(V(t))return N.apply(this,arguments);var e=q.apply(this,arguments);return e.mode="show",this.effect.call(this,e)}),hide:(M=k.fn.hide,function(t){if(V(t))return M.apply(this,arguments);var e=q.apply(this,arguments);return e.mode="hide",this.effect.call(this,e)}),toggle:(L=k.fn.toggle,function(t){if(V(t)||"boolean"==typeof t)return L.apply(this,arguments);var e=q.apply(this,arguments);return e.mode="toggle",this.effect.call(this,e)}),cssUnit:function(t){var i=this.css(t),n=[];return k.each(["em","px","%","pt"],function(t,e){0<i.indexOf(e)&&(n=[parseFloat(i),e])}),n},cssClip:function(t){return t?this.css("clip","rect("+t.top+"px "+t.right+"px "+t.bottom+"px "+t.left+"px)"):Y(this.css("clip"),this)},transfer:function(t,e){var i=k(this),n=k(t.to),s="fixed"===n.css("position"),r=k("body"),a=s?r.scrollTop():0,o=s?r.scrollLeft():0,l=n.offset(),c={top:l.top-a,left:l.left-o,height:n.innerHeight(),width:n.innerWidth()},u=i.offset(),h=k("<div class='ui-effects-transfer'></div>").appendTo("body").addClass(t.className).css({top:u.top-a,left:u.left-o,height:i.innerHeight(),width:i.innerWidth(),position:s?"fixed":"absolute"}).animate(c,t.duration,t.easing,function(){h.remove(),k.isFunction(e)&&e()})}}),k.fx.step.clip=function(t){t.clipInit||(t.start=k(t.elem).cssClip(),"string"==typeof t.end&&(t.end=Y(t.end,t.elem)),t.clipInit=!0),k(t.elem).cssClip({top:t.pos*(t.end.top-t.start.top)+t.start.top,right:t.pos*(t.end.right-t.start.right)+t.start.right,bottom:t.pos*(t.end.bottom-t.start.bottom)+t.start.bottom,left:t.pos*(t.end.left-t.start.left)+t.start.left})},R={},k.each(["Quad","Cubic","Quart","Quint","Expo"],function(e,t){R[t]=function(t){return Math.pow(t,e+2)}}),k.extend(R,{Sine:function(t){return 1-Math.cos(t*Math.PI/2)},Circ:function(t){return 1-Math.sqrt(1-t*t)},Elastic:function(t){return 0===t||1===t?t:-Math.pow(2,8*(t-1))*Math.sin((80*(t-1)-7.5)*Math.PI/15)},Back:function(t){return t*t*(3*t-2)},Bounce:function(t){for(var e,i=4;t<((e=Math.pow(2,--i))-1)/11;);return 1/Math.pow(4,3-i)-7.5625*Math.pow((3*e-2)/22-t,2)}}),k.each(R,function(t,e){k.easing["easeIn"+t]=e,k.easing["easeOut"+t]=function(t){return 1-e(1-t)},k.easing["easeInOut"+t]=function(t){return t<.5?e(2*t)/2:1-e(-2*t+2)/2}});k.effects,k.effects.define("blind","hide",function(t,e){var i={up:["bottom","top"],vertical:["bottom","top"],down:["top","bottom"],left:["right","left"],horizontal:["right","left"],right:["left","right"]},n=k(this),s=t.direction||"up",r=n.cssClip(),a={clip:k.extend({},r)},o=k.effects.createPlaceholder(n);a.clip[i[s][0]]=a.clip[i[s][1]],"show"===t.mode&&(n.cssClip(a.clip),o&&o.css(k.effects.clipToBox(a)),a.clip=r),o&&o.animate(k.effects.clipToBox(a),t.duration,t.easing),n.animate(a,{queue:!1,duration:t.duration,easing:t.easing,complete:e})}),k.effects.define("bounce",function(t,e){var i,n,s,r=k(this),a=t.mode,o="hide"===a,l="show"===a,c=t.direction||"up",u=t.distance,h=t.times||5,d=2*h+(l||o?1:0),p=t.duration/d,f=t.easing,m="up"===c||"down"===c?"top":"left",g="up"===c||"left"===c,v=0,y=r.queue().length;for(k.effects.createPlaceholder(r),s=r.css(m),u=u||r["top"==m?"outerHeight":"outerWidth"]()/3,l&&((n={opacity:1})[m]=s,r.css("opacity",0).css(m,g?2*-u:2*u).animate(n,p,f)),o&&(u/=Math.pow(2,h-1)),(n={})[m]=s;v<h;v++)(i={})[m]=(g?"-=":"+=")+u,r.animate(i,p,f).animate(n,p,f),u=o?2*u:u/2;o&&((i={opacity:0})[m]=(g?"-=":"+=")+u,r.animate(i,p,f)),r.queue(e),k.effects.unshift(r,y,1+d)}),k.effects.define("clip","hide",function(t,e){var i,n={},s=k(this),r=t.direction||"vertical",a="both"===r,o=a||"horizontal"===r,l=a||"vertical"===r;i=s.cssClip(),n.clip={top:l?(i.bottom-i.top)/2:i.top,right:o?(i.right-i.left)/2:i.right,bottom:l?(i.bottom-i.top)/2:i.bottom,left:o?(i.right-i.left)/2:i.left},k.effects.createPlaceholder(s),"show"===t.mode&&(s.cssClip(n.clip),n.clip=i),s.animate(n,{queue:!1,duration:t.duration,easing:t.easing,complete:e})}),k.effects.define("drop","hide",function(t,e){var i,n=k(this),s="show"===t.mode,r=t.direction||"left",a="up"===r||"down"===r?"top":"left",o="up"===r||"left"===r?"-=":"+=",l="+="==o?"-=":"+=",c={opacity:0};k.effects.createPlaceholder(n),i=t.distance||n["top"==a?"outerHeight":"outerWidth"](!0)/2,c[a]=o+i,s&&(n.css(c),c[a]=l+i,c.opacity=1),n.animate(c,{queue:!1,duration:t.duration,easing:t.easing,complete:e})}),k.effects.define("explode","hide",function(t,e){var i,n,s,r,a,o,l=t.pieces?Math.round(Math.sqrt(t.pieces)):3,c=l,u=k(this),h="show"===t.mode,d=u.show().css("visibility","hidden").offset(),p=Math.ceil(u.outerWidth()/c),f=Math.ceil(u.outerHeight()/l),m=[];function g(){m.push(this),m.length===l*c&&(u.css({visibility:"visible"}),k(m).remove(),e())}for(i=0;i<l;i++)for(r=d.top+i*f,o=i-(l-1)/2,n=0;n<c;n++)s=d.left+n*p,a=n-(c-1)/2,u.clone().appendTo("body").wrap("<div></div>").css({position:"absolute",visibility:"visible",left:-n*p,top:-i*f}).parent().addClass("ui-effects-explode").css({position:"absolute",overflow:"hidden",width:p,height:f,left:s+(h?a*p:0),top:r+(h?o*f:0),opacity:h?0:1}).animate({left:s+(h?0:a*p),top:r+(h?0:o*f),opacity:h?1:0},t.duration||500,t.easing,g)}),k.effects.define("fade","toggle",function(t,e){var i="show"===t.mode;k(this).css("opacity",i?0:1).animate({opacity:i?1:0},{queue:!1,duration:t.duration,easing:t.easing,complete:e})}),k.effects.define("fold","hide",function(e,t){var i=k(this),n=e.mode,s="show"===n,r="hide"===n,a=e.size||15,o=/([0-9]+)%/.exec(a),l=!!e.horizFirst?["right","bottom"]:["bottom","right"],c=e.duration/2,u=k.effects.createPlaceholder(i),h=i.cssClip(),d={clip:k.extend({},h)},p={clip:k.extend({},h)},f=[h[l[0]],h[l[1]]],m=i.queue().length;o&&(a=parseInt(o[1],10)/100*f[r?0:1]),d.clip[l[0]]=a,p.clip[l[0]]=a,p.clip[l[1]]=0,s&&(i.cssClip(p.clip),u&&u.css(k.effects.clipToBox(p)),p.clip=h),i.queue(function(t){u&&u.animate(k.effects.clipToBox(d),c,e.easing).animate(k.effects.clipToBox(p),c,e.easing),t()}).animate(d,c,e.easing).animate(p,c,e.easing).queue(t),k.effects.unshift(i,m,4)}),k.effects.define("highlight","show",function(t,e){var i=k(this),n={backgroundColor:i.css("backgroundColor")};"hide"===t.mode&&(n.opacity=0),k.effects.saveStyle(i),i.css({backgroundImage:"none",backgroundColor:t.color||"#ffff99"}).animate(n,{queue:!1,duration:t.duration,easing:t.easing,complete:e})}),k.effects.define("size",function(s,e){var t,r,i,n=k(this),a=["fontSize"],o=["borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"],l=["borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"],c=s.mode,u="effect"!==c,h=s.scale||"both",d=s.origin||["middle","center"],p=n.css("position"),f=n.position(),m=k.effects.scaledDimensions(n),g=s.from||m,v=s.to||k.effects.scaledDimensions(n,0);k.effects.createPlaceholder(n),"show"===c&&(i=g,g=v,v=i),r={from:{y:g.height/m.height,x:g.width/m.width},to:{y:v.height/m.height,x:v.width/m.width}},"box"!==h&&"both"!==h||(r.from.y!==r.to.y&&(g=k.effects.setTransition(n,o,r.from.y,g),v=k.effects.setTransition(n,o,r.to.y,v)),r.from.x!==r.to.x&&(g=k.effects.setTransition(n,l,r.from.x,g),v=k.effects.setTransition(n,l,r.to.x,v))),"content"!==h&&"both"!==h||r.from.y!==r.to.y&&(g=k.effects.setTransition(n,a,r.from.y,g),v=k.effects.setTransition(n,a,r.to.y,v)),d&&(t=k.effects.getBaseline(d,m),g.top=(m.outerHeight-g.outerHeight)*t.y+f.top,g.left=(m.outerWidth-g.outerWidth)*t.x+f.left,v.top=(m.outerHeight-v.outerHeight)*t.y+f.top,v.left=(m.outerWidth-v.outerWidth)*t.x+f.left),n.css(g),"content"!==h&&"both"!==h||(o=o.concat(["marginTop","marginBottom"]).concat(a),l=l.concat(["marginLeft","marginRight"]),n.find("*[width]").each(function(){var t=k(this),e=k.effects.scaledDimensions(t),i={height:e.height*r.from.y,width:e.width*r.from.x,outerHeight:e.outerHeight*r.from.y,outerWidth:e.outerWidth*r.from.x},n={height:e.height*r.to.y,width:e.width*r.to.x,outerHeight:e.height*r.to.y,outerWidth:e.width*r.to.x};r.from.y!==r.to.y&&(i=k.effects.setTransition(t,o,r.from.y,i),n=k.effects.setTransition(t,o,r.to.y,n)),r.from.x!==r.to.x&&(i=k.effects.setTransition(t,l,r.from.x,i),n=k.effects.setTransition(t,l,r.to.x,n)),u&&k.effects.saveStyle(t),t.css(i),t.animate(n,s.duration,s.easing,function(){u&&k.effects.restoreStyle(t)})})),n.animate(v,{queue:!1,duration:s.duration,easing:s.easing,complete:function(){var t=n.offset();0===v.opacity&&n.css("opacity",g.opacity),u||(n.css("position","static"===p?"relative":p).offset(t),k.effects.saveStyle(n)),e()}})}),k.effects.define("scale",function(t,e){var i=k(this),n=t.mode,s=parseInt(t.percent,10)||(0===parseInt(t.percent,10)?0:"effect"!==n?0:100),r=k.extend(!0,{from:k.effects.scaledDimensions(i),to:k.effects.scaledDimensions(i,s,t.direction||"both"),origin:t.origin||["middle","center"]},t);t.fade&&(r.from.opacity=1,r.to.opacity=0),k.effects.effect.size.call(this,r,e)}),k.effects.define("puff","hide",function(t,e){var i=k.extend(!0,{},t,{fade:!0,percent:parseInt(t.percent,10)||150});k.effects.effect.scale.call(this,i,e)}),k.effects.define("pulsate","show",function(t,e){var i=k(this),n=t.mode,s="show"===n,r=s||"hide"===n,a=2*(t.times||5)+(r?1:0),o=t.duration/a,l=0,c=1,u=i.queue().length;for(!s&&i.is(":visible")||(i.css("opacity",0).show(),l=1);c<a;c++)i.animate({opacity:l},o,t.easing),l=1-l;i.animate({opacity:l},o,t.easing),i.queue(e),k.effects.unshift(i,u,1+a)}),k.effects.define("shake",function(t,e){var i=1,n=k(this),s=t.direction||"left",r=t.distance||20,a=t.times||3,o=2*a+1,l=Math.round(t.duration/o),c="up"===s||"down"===s?"top":"left",u="up"===s||"left"===s,h={},d={},p={},f=n.queue().length;for(k.effects.createPlaceholder(n),h[c]=(u?"-=":"+=")+r,d[c]=(u?"+=":"-=")+2*r,p[c]=(u?"-=":"+=")+2*r,n.animate(h,l,t.easing);i<a;i++)n.animate(d,l,t.easing).animate(p,l,t.easing);n.animate(d,l,t.easing).animate(h,l/2,t.easing).queue(e),k.effects.unshift(n,f,1+o)}),k.effects.define("slide","show",function(t,e){var i,n,s=k(this),r={up:["bottom","top"],down:["top","bottom"],left:["right","left"],right:["left","right"]},a=t.mode,o=t.direction||"left",l="up"===o||"down"===o?"top":"left",c="up"===o||"left"===o,u=t.distance||s["top"==l?"outerHeight":"outerWidth"](!0),h={};k.effects.createPlaceholder(s),i=s.cssClip(),n=s.position()[l],h[l]=(c?-1:1)*u+n,h.clip=s.cssClip(),h.clip[r[o][1]]=h.clip[r[o][0]],"show"===a&&(s.cssClip(h.clip),s.css(l,h[l]),h.clip=i,h[l]=n),s.animate(h,{queue:!1,duration:t.duration,easing:t.easing,complete:e})});!1!==k.uiBackCompat&&k.effects.define("transfer",function(t,e){k(this).transfer(t,e)});k.ui.focusable=function(t,e){var i,n,s,r,a,o=t.nodeName.toLowerCase();return"area"===o?(n=(i=t.parentNode).name,!(!t.href||!n||"map"!==i.nodeName.toLowerCase())&&(0<(s=k("img[usemap='#"+n+"']")).length&&s.is(":visible"))):(/^(input|select|textarea|button|object)$/.test(o)?(r=!t.disabled)&&(a=k(t).closest("fieldset")[0])&&(r=!a.disabled):r="a"===o&&t.href||e,r&&k(t).is(":visible")&&function(t){var e=t.css("visibility");for(;"inherit"===e;)t=t.parent(),e=t.css("visibility");return"hidden"!==e}(k(t)))},k.extend(k.expr[":"],{focusable:function(t){return k.ui.focusable(t,null!=k.attr(t,"tabindex"))}});k.ui.focusable,k.fn.form=function(){return"string"==typeof this[0].form?this.closest("form"):k(this[0].form)},k.ui.formResetMixin={_formResetHandler:function(){var e=k(this);setTimeout(function(){var t=e.data("ui-form-reset-instances");k.each(t,function(){this.refresh()})})},_bindFormResetHandler:function(){if(this.form=this.element.form(),this.form.length){var t=this.form.data("ui-form-reset-instances")||[];t.length||this.form.on("reset.ui-form-reset",this._formResetHandler),t.push(this),this.form.data("ui-form-reset-instances",t)}},_unbindFormResetHandler:function(){if(this.form.length){var t=this.form.data("ui-form-reset-instances");t.splice(k.inArray(this,t),1),t.length?this.form.data("ui-form-reset-instances",t):this.form.removeData("ui-form-reset-instances").off("reset.ui-form-reset")}}};"1.7"===k.fn.jquery.substring(0,3)&&(k.each(["Width","Height"],function(t,i){var s="Width"===i?["Left","Right"]:["Top","Bottom"],n=i.toLowerCase(),r={innerWidth:k.fn.innerWidth,innerHeight:k.fn.innerHeight,outerWidth:k.fn.outerWidth,outerHeight:k.fn.outerHeight};function a(t,e,i,n){return k.each(s,function(){e-=parseFloat(k.css(t,"padding"+this))||0,i&&(e-=parseFloat(k.css(t,"border"+this+"Width"))||0),n&&(e-=parseFloat(k.css(t,"margin"+this))||0)}),e}k.fn["inner"+i]=function(t){return void 0===t?r["inner"+i].call(this):this.each(function(){k(this).css(n,a(this,t)+"px")})},k.fn["outer"+i]=function(t,e){return"number"!=typeof t?r["outer"+i].call(this,t):this.each(function(){k(this).css(n,a(this,t,!0,e)+"px")})}}),k.fn.addBack=function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))});var G,X;k.ui.keyCode={BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38},k.ui.escapeSelector=(G=/([!"#$%&'()*+,./:;<=>?@[\]^`{|}~])/g,function(t){return t.replace(G,"\\$1")}),k.fn.labels=function(){var t,e,i,n,s;return this[0].labels&&this[0].labels.length?this.pushStack(this[0].labels):(n=this.eq(0).parents("label"),(i=this.attr("id"))&&(s=(t=this.eq(0).parents().last()).add(t.length?t.siblings():this.siblings()),e="label[for='"+k.ui.escapeSelector(i)+"']",n=n.add(s.find(e).addBack(e))),this.pushStack(n))},k.fn.scrollParent=function(t){var e=this.css("position"),i="absolute"===e,n=t?/(auto|scroll|hidden)/:/(auto|scroll)/,s=this.parents().filter(function(){var t=k(this);return(!i||"static"!==t.css("position"))&&n.test(t.css("overflow")+t.css("overflow-y")+t.css("overflow-x"))}).eq(0);return"fixed"!==e&&s.length?s:k(this[0].ownerDocument||document)},k.extend(k.expr[":"],{tabbable:function(t){var e=k.attr(t,"tabindex"),i=null!=e;return(!i||0<=e)&&k.ui.focusable(t,i)}}),k.fn.extend({uniqueId:(X=0,function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++X)})}),removeUniqueId:function(){return this.each(function(){/^ui-id-\d+$/.test(this.id)&&k(this).removeAttr("id")})}}),k.widget("ui.accordion",{version:"1.12.1",options:{active:0,animate:{},classes:{"ui-accordion-header":"ui-corner-top","ui-accordion-header-collapsed":"ui-corner-all","ui-accordion-content":"ui-corner-bottom"},collapsible:!1,event:"click",header:"> li > :first-child, > :not(li):even",heightStyle:"auto",icons:{activeHeader:"ui-icon-triangle-1-s",header:"ui-icon-triangle-1-e"},activate:null,beforeActivate:null},hideProps:{borderTopWidth:"hide",borderBottomWidth:"hide",paddingTop:"hide",paddingBottom:"hide",height:"hide"},showProps:{borderTopWidth:"show",borderBottomWidth:"show",paddingTop:"show",paddingBottom:"show",height:"show"},_create:function(){var t=this.options;this.prevShow=this.prevHide=k(),this._addClass("ui-accordion","ui-widget ui-helper-reset"),this.element.attr("role","tablist"),t.collapsible||!1!==t.active&&null!=t.active||(t.active=0),this._processPanels(),t.active<0&&(t.active+=this.headers.length),this._refresh()},_getCreateEventData:function(){return{header:this.active,panel:this.active.length?this.active.next():k()}},_createIcons:function(){var t,e,i=this.options.icons;i&&(t=k("<span>"),this._addClass(t,"ui-accordion-header-icon","ui-icon "+i.header),t.prependTo(this.headers),e=this.active.children(".ui-accordion-header-icon"),this._removeClass(e,i.header)._addClass(e,null,i.activeHeader)._addClass(this.headers,"ui-accordion-icons"))},_destroyIcons:function(){this._removeClass(this.headers,"ui-accordion-icons"),this.headers.children(".ui-accordion-header-icon").remove()},_destroy:function(){var t;this.element.removeAttr("role"),this.headers.removeAttr("role aria-expanded aria-selected aria-controls tabIndex").removeUniqueId(),this._destroyIcons(),t=this.headers.next().css("display","").removeAttr("role aria-hidden aria-labelledby").removeUniqueId(),"content"!==this.options.heightStyle&&t.css("height","")},_setOption:function(t,e){"active"!==t?("event"===t&&(this.options.event&&this._off(this.headers,this.options.event),this._setupEvents(e)),this._super(t,e),"collapsible"!==t||e||!1!==this.options.active||this._activate(0),"icons"===t&&(this._destroyIcons(),e&&this._createIcons())):this._activate(e)},_setOptionDisabled:function(t){this._super(t),this.element.attr("aria-disabled",t),this._toggleClass(null,"ui-state-disabled",!!t),this._toggleClass(this.headers.add(this.headers.next()),null,"ui-state-disabled",!!t)},_keydown:function(t){if(!t.altKey&&!t.ctrlKey){var e=k.ui.keyCode,i=this.headers.length,n=this.headers.index(t.target),s=!1;switch(t.keyCode){case e.RIGHT:case e.DOWN:s=this.headers[(n+1)%i];break;case e.LEFT:case e.UP:s=this.headers[(n-1+i)%i];break;case e.SPACE:case e.ENTER:this._eventHandler(t);break;case e.HOME:s=this.headers[0];break;case e.END:s=this.headers[i-1]}s&&(k(t.target).attr("tabIndex",-1),k(s).attr("tabIndex",0),k(s).trigger("focus"),t.preventDefault())}},_panelKeyDown:function(t){t.keyCode===k.ui.keyCode.UP&&t.ctrlKey&&k(t.currentTarget).prev().trigger("focus")},refresh:function(){var t=this.options;this._processPanels(),!1===t.active&&!0===t.collapsible||!this.headers.length?(t.active=!1,this.active=k()):!1===t.active?this._activate(0):this.active.length&&!k.contains(this.element[0],this.active[0])?this.headers.length===this.headers.find(".ui-state-disabled").length?(t.active=!1,this.active=k()):this._activate(Math.max(0,t.active-1)):t.active=this.headers.index(this.active),this._destroyIcons(),this._refresh()},_processPanels:function(){var t=this.headers,e=this.panels;this.headers=this.element.find(this.options.header),this._addClass(this.headers,"ui-accordion-header ui-accordion-header-collapsed","ui-state-default"),this.panels=this.headers.next().filter(":not(.ui-accordion-content-active)").hide(),this._addClass(this.panels,"ui-accordion-content","ui-helper-reset ui-widget-content"),e&&(this._off(t.not(this.headers)),this._off(e.not(this.panels)))},_refresh:function(){var i,t=this.options,e=t.heightStyle,n=this.element.parent();this.active=this._findActive(t.active),this._addClass(this.active,"ui-accordion-header-active","ui-state-active")._removeClass(this.active,"ui-accordion-header-collapsed"),this._addClass(this.active.next(),"ui-accordion-content-active"),this.active.next().show(),this.headers.attr("role","tab").each(function(){var t=k(this),e=t.uniqueId().attr("id"),i=t.next(),n=i.uniqueId().attr("id");t.attr("aria-controls",n),i.attr("aria-labelledby",e)}).next().attr("role","tabpanel"),this.headers.not(this.active).attr({"aria-selected":"false","aria-expanded":"false",tabIndex:-1}).next().attr({"aria-hidden":"true"}).hide(),this.active.length?this.active.attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0}).next().attr({"aria-hidden":"false"}):this.headers.eq(0).attr("tabIndex",0),this._createIcons(),this._setupEvents(t.event),"fill"===e?(i=n.height(),this.element.siblings(":visible").each(function(){var t=k(this),e=t.css("position");"absolute"!==e&&"fixed"!==e&&(i-=t.outerHeight(!0))}),this.headers.each(function(){i-=k(this).outerHeight(!0)}),this.headers.next().each(function(){k(this).height(Math.max(0,i-k(this).innerHeight()+k(this).height()))}).css("overflow","auto")):"auto"===e&&(i=0,this.headers.next().each(function(){var t=k(this).is(":visible");t||k(this).show(),i=Math.max(i,k(this).css("height","").height()),t||k(this).hide()}).height(i))},_activate:function(t){var e=this._findActive(t)[0];e!==this.active[0]&&(e=e||this.active[0],this._eventHandler({target:e,currentTarget:e,preventDefault:k.noop}))},_findActive:function(t){return"number"==typeof t?this.headers.eq(t):k()},_setupEvents:function(t){var i={keydown:"_keydown"};t&&k.each(t.split(" "),function(t,e){i[e]="_eventHandler"}),this._off(this.headers.add(this.headers.next())),this._on(this.headers,i),this._on(this.headers.next(),{keydown:"_panelKeyDown"}),this._hoverable(this.headers),this._focusable(this.headers)},_eventHandler:function(t){var e,i,n=this.options,s=this.active,r=k(t.currentTarget),a=r[0]===s[0],o=a&&n.collapsible,l=o?k():r.next(),c=s.next(),u={oldHeader:s,oldPanel:c,newHeader:o?k():r,newPanel:l};t.preventDefault(),a&&!n.collapsible||!1===this._trigger("beforeActivate",t,u)||(n.active=!o&&this.headers.index(r),this.active=a?k():r,this._toggle(u),this._removeClass(s,"ui-accordion-header-active","ui-state-active"),n.icons&&(e=s.children(".ui-accordion-header-icon"),this._removeClass(e,null,n.icons.activeHeader)._addClass(e,null,n.icons.header)),a||(this._removeClass(r,"ui-accordion-header-collapsed")._addClass(r,"ui-accordion-header-active","ui-state-active"),n.icons&&(i=r.children(".ui-accordion-header-icon"),this._removeClass(i,null,n.icons.header)._addClass(i,null,n.icons.activeHeader)),this._addClass(r.next(),"ui-accordion-content-active")))},_toggle:function(t){var e=t.newPanel,i=this.prevShow.length?this.prevShow:t.oldPanel;this.prevShow.add(this.prevHide).stop(!0,!0),this.prevShow=e,this.prevHide=i,this.options.animate?this._animate(e,i,t):(i.hide(),e.show(),this._toggleComplete(t)),i.attr({"aria-hidden":"true"}),i.prev().attr({"aria-selected":"false","aria-expanded":"false"}),e.length&&i.length?i.prev().attr({tabIndex:-1,"aria-expanded":"false"}):e.length&&this.headers.filter(function(){return 0===parseInt(k(this).attr("tabIndex"),10)}).attr("tabIndex",-1),e.attr("aria-hidden","false").prev().attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0})},_animate:function(t,i,e){function n(){o._toggleComplete(e)}var s,r,a,o=this,l=0,c=t.css("box-sizing"),u=t.length&&(!i.length||t.index()<i.index()),h=this.options.animate||{},d=u&&h.down||h;return"number"==typeof d&&(a=d),"string"==typeof d&&(r=d),r=r||d.easing||h.easing,a=a||d.duration||h.duration,i.length?t.length?(s=t.show().outerHeight(),i.animate(this.hideProps,{duration:a,easing:r,step:function(t,e){e.now=Math.round(t)}}),void t.hide().animate(this.showProps,{duration:a,easing:r,complete:n,step:function(t,e){e.now=Math.round(t),"height"!==e.prop?"content-box"===c&&(l+=e.now):"content"!==o.options.heightStyle&&(e.now=Math.round(s-i.outerHeight()-l),l=0)}})):i.animate(this.hideProps,a,r,n):t.animate(this.showProps,a,r,n)},_toggleComplete:function(t){var e=t.oldPanel,i=e.prev();this._removeClass(e,"ui-accordion-content-active"),this._removeClass(i,"ui-accordion-header-active")._addClass(i,"ui-accordion-header-collapsed"),e.length&&(e.parent()[0].className=e.parent()[0].className),this._trigger("activate",null,t)}}),k.ui.safeActiveElement=function(e){var i;try{i=e.activeElement}catch(t){i=e.body}return(i=i||e.body).nodeName||(i=e.body),i},k.widget("ui.menu",{version:"1.12.1",defaultElement:"<ul>",delay:300,options:{icons:{submenu:"ui-icon-caret-1-e"},items:"> *",menus:"ul",position:{my:"left top",at:"right top"},role:"menu",blur:null,focus:null,select:null},_create:function(){this.activeMenu=this.element,this.mouseHandled=!1,this.element.uniqueId().attr({role:this.options.role,tabIndex:0}),this._addClass("ui-menu","ui-widget ui-widget-content"),this._on({"mousedown .ui-menu-item":function(t){t.preventDefault()},"click .ui-menu-item":function(t){var e=k(t.target),i=k(k.ui.safeActiveElement(this.document[0]));!this.mouseHandled&&e.not(".ui-state-disabled").length&&(this.select(t),t.isPropagationStopped()||(this.mouseHandled=!0),e.has(".ui-menu").length?this.expand(t):!this.element.is(":focus")&&i.closest(".ui-menu").length&&(this.element.trigger("focus",[!0]),this.active&&1===this.active.parents(".ui-menu").length&&clearTimeout(this.timer)))},"mouseenter .ui-menu-item":function(t){if(!this.previousFilter){var e=k(t.target).closest(".ui-menu-item"),i=k(t.currentTarget);e[0]===i[0]&&(this._removeClass(i.siblings().children(".ui-state-active"),null,"ui-state-active"),this.focus(t,i))}},mouseleave:"collapseAll","mouseleave .ui-menu":"collapseAll",focus:function(t,e){var i=this.active||this.element.find(this.options.items).eq(0);e||this.focus(t,i)},blur:function(t){this._delay(function(){k.contains(this.element[0],k.ui.safeActiveElement(this.document[0]))||this.collapseAll(t)})},keydown:"_keydown"}),this.refresh(),this._on(this.document,{click:function(t){this._closeOnDocumentClick(t)&&this.collapseAll(t),this.mouseHandled=!1}})},_destroy:function(){var t=this.element.find(".ui-menu-item").removeAttr("role aria-disabled").children(".ui-menu-item-wrapper").removeUniqueId().removeAttr("tabIndex role aria-haspopup");this.element.removeAttr("aria-activedescendant").find(".ui-menu").addBack().removeAttr("role aria-labelledby aria-expanded aria-hidden aria-disabled tabIndex").removeUniqueId().show(),t.children().each(function(){var t=k(this);t.data("ui-menu-submenu-caret")&&t.remove()})},_keydown:function(t){var e,i,n,s,r=!0;switch(t.keyCode){case k.ui.keyCode.PAGE_UP:this.previousPage(t);break;case k.ui.keyCode.PAGE_DOWN:this.nextPage(t);break;case k.ui.keyCode.HOME:this._move("first","first",t);break;case k.ui.keyCode.END:this._move("last","last",t);break;case k.ui.keyCode.UP:this.previous(t);break;case k.ui.keyCode.DOWN:this.next(t);break;case k.ui.keyCode.LEFT:this.collapse(t);break;case k.ui.keyCode.RIGHT:this.active&&!this.active.is(".ui-state-disabled")&&this.expand(t);break;case k.ui.keyCode.ENTER:case k.ui.keyCode.SPACE:this._activate(t);break;case k.ui.keyCode.ESCAPE:this.collapse(t);break;default:r=!1,i=this.previousFilter||"",s=!1,n=96<=t.keyCode&&t.keyCode<=105?(t.keyCode-96).toString():String.fromCharCode(t.keyCode),clearTimeout(this.filterTimer),n===i?s=!0:n=i+n,e=this._filterMenuItems(n),(e=s&&-1!==e.index(this.active.next())?this.active.nextAll(".ui-menu-item"):e).length||(n=String.fromCharCode(t.keyCode),e=this._filterMenuItems(n)),e.length?(this.focus(t,e),this.previousFilter=n,this.filterTimer=this._delay(function(){delete this.previousFilter},1e3)):delete this.previousFilter}r&&t.preventDefault()},_activate:function(t){this.active&&!this.active.is(".ui-state-disabled")&&(this.active.children("[aria-haspopup='true']").length?this.expand(t):this.select(t))},refresh:function(){var t,e,i,n,s=this,r=this.options.icons.submenu,a=this.element.find(this.options.menus);this._toggleClass("ui-menu-icons",null,!!this.element.find(".ui-icon").length),e=a.filter(":not(.ui-menu)").hide().attr({role:this.options.role,"aria-hidden":"true","aria-expanded":"false"}).each(function(){var t=k(this),e=t.prev(),i=k("<span>").data("ui-menu-submenu-caret",!0);s._addClass(i,"ui-menu-icon","ui-icon "+r),e.attr("aria-haspopup","true").prepend(i),t.attr("aria-labelledby",e.attr("id"))}),this._addClass(e,"ui-menu","ui-widget ui-widget-content ui-front"),(t=a.add(this.element).find(this.options.items)).not(".ui-menu-item").each(function(){var t=k(this);s._isDivider(t)&&s._addClass(t,"ui-menu-divider","ui-widget-content")}),n=(i=t.not(".ui-menu-item, .ui-menu-divider")).children().not(".ui-menu").uniqueId().attr({tabIndex:-1,role:this._itemRole()}),this._addClass(i,"ui-menu-item")._addClass(n,"ui-menu-item-wrapper"),t.filter(".ui-state-disabled").attr("aria-disabled","true"),this.active&&!k.contains(this.element[0],this.active[0])&&this.blur()},_itemRole:function(){return{menu:"menuitem",listbox:"option"}[this.options.role]},_setOption:function(t,e){if("icons"===t){var i=this.element.find(".ui-menu-icon");this._removeClass(i,null,this.options.icons.submenu)._addClass(i,null,e.submenu)}this._super(t,e)},_setOptionDisabled:function(t){this._super(t),this.element.attr("aria-disabled",String(t)),this._toggleClass(null,"ui-state-disabled",!!t)},focus:function(t,e){var i,n,s;this.blur(t,t&&"focus"===t.type),this._scrollIntoView(e),this.active=e.first(),n=this.active.children(".ui-menu-item-wrapper"),this._addClass(n,null,"ui-state-active"),this.options.role&&this.element.attr("aria-activedescendant",n.attr("id")),s=this.active.parent().closest(".ui-menu-item").children(".ui-menu-item-wrapper"),this._addClass(s,null,"ui-state-active"),t&&"keydown"===t.type?this._close():this.timer=this._delay(function(){this._close()},this.delay),(i=e.children(".ui-menu")).length&&t&&/^mouse/.test(t.type)&&this._startOpening(i),this.activeMenu=e.parent(),this._trigger("focus",t,{item:e})},_scrollIntoView:function(t){var e,i,n,s,r,a;this._hasScroll()&&(e=parseFloat(k.css(this.activeMenu[0],"borderTopWidth"))||0,i=parseFloat(k.css(this.activeMenu[0],"paddingTop"))||0,n=t.offset().top-this.activeMenu.offset().top-e-i,s=this.activeMenu.scrollTop(),r=this.activeMenu.height(),a=t.outerHeight(),n<0?this.activeMenu.scrollTop(s+n):r<n+a&&this.activeMenu.scrollTop(s+n-r+a))},blur:function(t,e){e||clearTimeout(this.timer),this.active&&(this._removeClass(this.active.children(".ui-menu-item-wrapper"),null,"ui-state-active"),this._trigger("blur",t,{item:this.active}),this.active=null)},_startOpening:function(t){clearTimeout(this.timer),"true"===t.attr("aria-hidden")&&(this.timer=this._delay(function(){this._close(),this._open(t)},this.delay))},_open:function(t){var e=k.extend({of:this.active},this.options.position);clearTimeout(this.timer),this.element.find(".ui-menu").not(t.parents(".ui-menu")).hide().attr("aria-hidden","true"),t.show().removeAttr("aria-hidden").attr("aria-expanded","true").position(e)},collapseAll:function(e,i){clearTimeout(this.timer),this.timer=this._delay(function(){var t=i?this.element:k(e&&e.target).closest(this.element.find(".ui-menu"));t.length||(t=this.element),this._close(t),this.blur(e),this._removeClass(t.find(".ui-state-active"),null,"ui-state-active"),this.activeMenu=t},this.delay)},_close:function(t){(t=t||(this.active?this.active.parent():this.element)).find(".ui-menu").hide().attr("aria-hidden","true").attr("aria-expanded","false")},_closeOnDocumentClick:function(t){return!k(t.target).closest(".ui-menu").length},_isDivider:function(t){return!/[^\-\u2014\u2013\s]/.test(t.text())},collapse:function(t){var e=this.active&&this.active.parent().closest(".ui-menu-item",this.element);e&&e.length&&(this._close(),this.focus(t,e))},expand:function(t){var e=this.active&&this.active.children(".ui-menu ").find(this.options.items).first();e&&e.length&&(this._open(e.parent()),this._delay(function(){this.focus(t,e)}))},next:function(t){this._move("next","first",t)},previous:function(t){this._move("prev","last",t)},isFirstItem:function(){return this.active&&!this.active.prevAll(".ui-menu-item").length},isLastItem:function(){return this.active&&!this.active.nextAll(".ui-menu-item").length},_move:function(t,e,i){var n;this.active&&(n="first"===t||"last"===t?this.active["first"===t?"prevAll":"nextAll"](".ui-menu-item").eq(-1):this.active[t+"All"](".ui-menu-item").eq(0)),n&&n.length&&this.active||(n=this.activeMenu.find(this.options.items)[e]()),this.focus(i,n)},nextPage:function(t){var e,i,n;this.active?this.isLastItem()||(this._hasScroll()?(i=this.active.offset().top,n=this.element.height(),this.active.nextAll(".ui-menu-item").each(function(){return(e=k(this)).offset().top-i-n<0}),this.focus(t,e)):this.focus(t,this.activeMenu.find(this.options.items)[this.active?"last":"first"]())):this.next(t)},previousPage:function(t){var e,i,n;this.active?this.isFirstItem()||(this._hasScroll()?(i=this.active.offset().top,n=this.element.height(),this.active.prevAll(".ui-menu-item").each(function(){return 0<(e=k(this)).offset().top-i+n}),this.focus(t,e)):this.focus(t,this.activeMenu.find(this.options.items).first())):this.next(t)},_hasScroll:function(){return this.element.outerHeight()<this.element.prop("scrollHeight")},select:function(t){this.active=this.active||k(t.target).closest(".ui-menu-item");var e={item:this.active};this.active.has(".ui-menu").length||this.collapseAll(t,!0),this._trigger("select",t,e)},_filterMenuItems:function(t){var e=t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&"),i=new RegExp("^"+e,"i");return this.activeMenu.find(this.options.items).filter(".ui-menu-item").filter(function(){return i.test(k.trim(k(this).children(".ui-menu-item-wrapper").text()))})}});k.widget("ui.autocomplete",{version:"1.12.1",defaultElement:"<input>",options:{appendTo:null,autoFocus:!1,delay:300,minLength:1,position:{my:"left top",at:"left bottom",collision:"none"},source:null,change:null,close:null,focus:null,open:null,response:null,search:null,select:null},requestIndex:0,pending:0,_create:function(){var i,n,s,t=this.element[0].nodeName.toLowerCase(),e="textarea"===t,r="input"===t;this.isMultiLine=e||!r&&this._isContentEditable(this.element),this.valueMethod=this.element[e||r?"val":"text"],this.isNewMenu=!0,this._addClass("ui-autocomplete-input"),this.element.attr("autocomplete","off"),this._on(this.element,{keydown:function(t){if(this.element.prop("readOnly"))n=s=i=!0;else{n=s=i=!1;var e=k.ui.keyCode;switch(t.keyCode){case e.PAGE_UP:i=!0,this._move("previousPage",t);break;case e.PAGE_DOWN:i=!0,this._move("nextPage",t);break;case e.UP:i=!0,this._keyEvent("previous",t);break;case e.DOWN:i=!0,this._keyEvent("next",t);break;case e.ENTER:this.menu.active&&(i=!0,t.preventDefault(),this.menu.select(t));break;case e.TAB:this.menu.active&&this.menu.select(t);break;case e.ESCAPE:this.menu.element.is(":visible")&&(this.isMultiLine||this._value(this.term),this.close(t),t.preventDefault());break;default:n=!0,this._searchTimeout(t)}}},keypress:function(t){if(i)return i=!1,void(this.isMultiLine&&!this.menu.element.is(":visible")||t.preventDefault());if(!n){var e=k.ui.keyCode;switch(t.keyCode){case e.PAGE_UP:this._move("previousPage",t);break;case e.PAGE_DOWN:this._move("nextPage",t);break;case e.UP:this._keyEvent("previous",t);break;case e.DOWN:this._keyEvent("next",t)}}},input:function(t){if(s)return s=!1,void t.preventDefault();this._searchTimeout(t)},focus:function(){this.selectedItem=null,this.previous=this._value()},blur:function(t){this.cancelBlur?delete this.cancelBlur:(clearTimeout(this.searching),this.close(t),this._change(t))}}),this._initSource(),this.menu=k("<ul>").appendTo(this._appendTo()).menu({role:null}).hide().menu("instance"),this._addClass(this.menu.element,"ui-autocomplete","ui-front"),this._on(this.menu.element,{mousedown:function(t){t.preventDefault(),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur,this.element[0]!==k.ui.safeActiveElement(this.document[0])&&this.element.trigger("focus")})},menufocus:function(t,e){var i,n;if(this.isNewMenu&&(this.isNewMenu=!1,t.originalEvent&&/^mouse/.test(t.originalEvent.type)))return this.menu.blur(),void this.document.one("mousemove",function(){k(t.target).trigger(t.originalEvent)});n=e.item.data("ui-autocomplete-item"),!1!==this._trigger("focus",t,{item:n})&&t.originalEvent&&/^key/.test(t.originalEvent.type)&&this._value(n.value),(i=e.item.attr("aria-label")||n.value)&&k.trim(i).length&&(this.liveRegion.children().hide(),k("<div>").text(i).appendTo(this.liveRegion))},menuselect:function(t,e){var i=e.item.data("ui-autocomplete-item"),n=this.previous;this.element[0]!==k.ui.safeActiveElement(this.document[0])&&(this.element.trigger("focus"),this.previous=n,this._delay(function(){this.previous=n,this.selectedItem=i})),!1!==this._trigger("select",t,{item:i})&&this._value(i.value),this.term=this._value(),this.close(t),this.selectedItem=i}}),this.liveRegion=k("<div>",{role:"status","aria-live":"assertive","aria-relevant":"additions"}).appendTo(this.document[0].body),this._addClass(this.liveRegion,null,"ui-helper-hidden-accessible"),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_destroy:function(){clearTimeout(this.searching),this.element.removeAttr("autocomplete"),this.menu.element.remove(),this.liveRegion.remove()},_setOption:function(t,e){this._super(t,e),"source"===t&&this._initSource(),"appendTo"===t&&this.menu.element.appendTo(this._appendTo()),"disabled"===t&&e&&this.xhr&&this.xhr.abort()},_isEventTargetInWidget:function(t){var e=this.menu.element[0];return t.target===this.element[0]||t.target===e||k.contains(e,t.target)},_closeOnClickOutside:function(t){this._isEventTargetInWidget(t)||this.close()},_appendTo:function(){var t=this.options.appendTo;return(t=t&&(t.jquery||t.nodeType?k(t):this.document.find(t).eq(0)))&&t[0]||(t=this.element.closest(".ui-front, dialog")),t.length||(t=this.document[0].body),t},_initSource:function(){var i,n,s=this;k.isArray(this.options.source)?(i=this.options.source,this.source=function(t,e){e(k.ui.autocomplete.filter(i,t.term))}):"string"==typeof this.options.source?(n=this.options.source,this.source=function(t,e){s.xhr&&s.xhr.abort(),s.xhr=k.ajax({url:n,data:t,dataType:"json",success:function(t){e(t)},error:function(){e([])}})}):this.source=this.options.source},_searchTimeout:function(n){clearTimeout(this.searching),this.searching=this._delay(function(){var t=this.term===this._value(),e=this.menu.element.is(":visible"),i=n.altKey||n.ctrlKey||n.metaKey||n.shiftKey;t&&(!t||e||i)||(this.selectedItem=null,this.search(null,n))},this.options.delay)},search:function(t,e){return t=null!=t?t:this._value(),this.term=this._value(),t.length<this.options.minLength?this.close(e):!1!==this._trigger("search",e)?this._search(t):void 0},_search:function(t){this.pending++,this._addClass("ui-autocomplete-loading"),this.cancelSearch=!1,this.source({term:t},this._response())},_response:function(){var e=++this.requestIndex;return k.proxy(function(t){e===this.requestIndex&&this.__response(t),this.pending--,this.pending||this._removeClass("ui-autocomplete-loading")},this)},__response:function(t){t=t&&this._normalize(t),this._trigger("response",null,{content:t}),!this.options.disabled&&t&&t.length&&!this.cancelSearch?(this._suggest(t),this._trigger("open")):this._close()},close:function(t){this.cancelSearch=!0,this._close(t)},_close:function(t){this._off(this.document,"mousedown"),this.menu.element.is(":visible")&&(this.menu.element.hide(),this.menu.blur(),this.isNewMenu=!0,this._trigger("close",t))},_change:function(t){this.previous!==this._value()&&this._trigger("change",t,{item:this.selectedItem})},_normalize:function(t){return t.length&&t[0].label&&t[0].value?t:k.map(t,function(t){return"string"==typeof t?{label:t,value:t}:k.extend({},t,{label:t.label||t.value,value:t.value||t.label})})},_suggest:function(t){var e=this.menu.element.empty();this._renderMenu(e,t),this.isNewMenu=!0,this.menu.refresh(),e.show(),this._resizeMenu(),e.position(k.extend({of:this.element},this.options.position)),this.options.autoFocus&&this.menu.next(),this._on(this.document,{mousedown:"_closeOnClickOutside"})},_resizeMenu:function(){var t=this.menu.element;t.outerWidth(Math.max(t.width("").outerWidth()+1,this.element.outerWidth()))},_renderMenu:function(i,t){var n=this;k.each(t,function(t,e){n._renderItemData(i,e)})},_renderItemData:function(t,e){return this._renderItem(t,e).data("ui-autocomplete-item",e)},_renderItem:function(t,e){return k("<li>").append(k("<div>").text(e.label)).appendTo(t)},_move:function(t,e){if(this.menu.element.is(":visible"))return this.menu.isFirstItem()&&/^previous/.test(t)||this.menu.isLastItem()&&/^next/.test(t)?(this.isMultiLine||this._value(this.term),void this.menu.blur()):void this.menu[t](e);this.search(null,e)},widget:function(){return this.menu.element},_value:function(){return this.valueMethod.apply(this.element,arguments)},_keyEvent:function(t,e){this.isMultiLine&&!this.menu.element.is(":visible")||(this._move(t,e),e.preventDefault())},_isContentEditable:function(t){if(!t.length)return!1;var e=t.prop("contentEditable");return"inherit"===e?this._isContentEditable(t.parent()):"true"===e}}),k.extend(k.ui.autocomplete,{escapeRegex:function(t){return t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")},filter:function(t,e){var i=new RegExp(k.ui.autocomplete.escapeRegex(e),"i");return k.grep(t,function(t){return i.test(t.label||t.value||t)})}}),k.widget("ui.autocomplete",k.ui.autocomplete,{options:{messages:{noResults:"No search results.",results:function(t){return t+(1<t?" results are":" result is")+" available, use up and down arrow keys to navigate."}}},__response:function(t){var e;this._superApply(arguments),this.options.disabled||this.cancelSearch||(e=t&&t.length?this.options.messages.results(t.length):this.options.messages.noResults,this.liveRegion.children().hide(),k("<div>").text(e).appendTo(this.liveRegion))}});k.ui.autocomplete;var K=/ui-corner-([a-z]){2,6}/g;k.widget("ui.controlgroup",{version:"1.12.1",defaultElement:"<div>",options:{direction:"horizontal",disabled:null,onlyVisible:!0,items:{button:"input[type=button], input[type=submit], input[type=reset], button, a",controlgroupLabel:".ui-controlgroup-label",checkboxradio:"input[type='checkbox'], input[type='radio']",selectmenu:"select",spinner:".ui-spinner-input"}},_create:function(){this._enhance()},_enhance:function(){this.element.attr("role","toolbar"),this.refresh()},_destroy:function(){this._callChildMethod("destroy"),this.childWidgets.removeData("ui-controlgroup-data"),this.element.removeAttr("role"),this.options.items.controlgroupLabel&&this.element.find(this.options.items.controlgroupLabel).find(".ui-controlgroup-label-contents").contents().unwrap()},_initWidgets:function(){var a=this,o=[];k.each(this.options.items,function(s,t){var e,r={};if(t)return"controlgroupLabel"===s?((e=a.element.find(t)).each(function(){var t=k(this);t.children(".ui-controlgroup-label-contents").length||t.contents().wrapAll("<span class='ui-controlgroup-label-contents'></span>")}),a._addClass(e,null,"ui-widget ui-widget-content ui-state-default"),void(o=o.concat(e.get()))):void(k.fn[s]&&(r=a["_"+s+"Options"]?a["_"+s+"Options"]("middle"):{classes:{}},a.element.find(t).each(function(){var t=k(this),e=t[s]("instance"),i=k.widget.extend({},r);if("button"!==s||!t.parent(".ui-spinner").length){(e=e||t[s]()[s]("instance"))&&(i.classes=a._resolveClassesValues(i.classes,e)),t[s](i);var n=t[s]("widget");k.data(n[0],"ui-controlgroup-data",e||t[s]("instance")),o.push(n[0])}})))}),this.childWidgets=k(k.unique(o)),this._addClass(this.childWidgets,"ui-controlgroup-item")},_callChildMethod:function(e){this.childWidgets.each(function(){var t=k(this).data("ui-controlgroup-data");t&&t[e]&&t[e]()})},_updateCornerClass:function(t,e){var i=this._buildSimpleOptions(e,"label").classes.label;this._removeClass(t,null,"ui-corner-top ui-corner-bottom ui-corner-left ui-corner-right ui-corner-all"),this._addClass(t,null,i)},_buildSimpleOptions:function(t,e){var i="vertical"===this.options.direction,n={classes:{}};return n.classes[e]={middle:"",first:"ui-corner-"+(i?"top":"left"),last:"ui-corner-"+(i?"bottom":"right"),only:"ui-corner-all"}[t],n},_spinnerOptions:function(t){var e=this._buildSimpleOptions(t,"ui-spinner");return e.classes["ui-spinner-up"]="",e.classes["ui-spinner-down"]="",e},_buttonOptions:function(t){return this._buildSimpleOptions(t,"ui-button")},_checkboxradioOptions:function(t){return this._buildSimpleOptions(t,"ui-checkboxradio-label")},_selectmenuOptions:function(t){var e="vertical"===this.options.direction;return{width:e&&"auto",classes:{middle:{"ui-selectmenu-button-open":"","ui-selectmenu-button-closed":""},first:{"ui-selectmenu-button-open":"ui-corner-"+(e?"top":"tl"),"ui-selectmenu-button-closed":"ui-corner-"+(e?"top":"left")},last:{"ui-selectmenu-button-open":e?"":"ui-corner-tr","ui-selectmenu-button-closed":"ui-corner-"+(e?"bottom":"right")},only:{"ui-selectmenu-button-open":"ui-corner-top","ui-selectmenu-button-closed":"ui-corner-all"}}[t]}},_resolveClassesValues:function(i,n){var s={};return k.each(i,function(t){var e=n.options.classes[t]||"";e=k.trim(e.replace(K,"")),s[t]=(e+" "+i[t]).replace(/\s+/g," ")}),s},_setOption:function(t,e){"direction"===t&&this._removeClass("ui-controlgroup-"+this.options.direction),this._super(t,e),"disabled"!==t?this.refresh():this._callChildMethod(e?"disable":"enable")},refresh:function(){var s,r=this;this._addClass("ui-controlgroup ui-controlgroup-"+this.options.direction),"horizontal"===this.options.direction&&this._addClass(null,"ui-helper-clearfix"),this._initWidgets(),s=this.childWidgets,this.options.onlyVisible&&(s=s.filter(":visible")),s.length&&(k.each(["first","last"],function(t,e){var i=s[e]().data("ui-controlgroup-data");if(i&&r["_"+i.widgetName+"Options"]){var n=r["_"+i.widgetName+"Options"](1===s.length?"only":e);n.classes=r._resolveClassesValues(n.classes,i),i.element[i.widgetName](n)}else r._updateCornerClass(s[e](),e)}),this._callChildMethod("refresh"))}});k.widget("ui.checkboxradio",[k.ui.formResetMixin,{version:"1.12.1",options:{disabled:null,label:null,icon:!0,classes:{"ui-checkboxradio-label":"ui-corner-all","ui-checkboxradio-icon":"ui-corner-all"}},_getCreateOptions:function(){var t,e,i=this,n=this._super()||{};return this._readType(),e=this.element.labels(),this.label=k(e[e.length-1]),this.label.length||k.error("No label found for checkboxradio widget"),this.originalLabel="",this.label.contents().not(this.element[0]).each(function(){i.originalLabel+=3===this.nodeType?k(this).text():this.outerHTML}),this.originalLabel&&(n.label=this.originalLabel),null!=(t=this.element[0].disabled)&&(n.disabled=t),n},_create:function(){var t=this.element[0].checked;this._bindFormResetHandler(),null==this.options.disabled&&(this.options.disabled=this.element[0].disabled),this._setOption("disabled",this.options.disabled),this._addClass("ui-checkboxradio","ui-helper-hidden-accessible"),this._addClass(this.label,"ui-checkboxradio-label","ui-button ui-widget"),"radio"===this.type&&this._addClass(this.label,"ui-checkboxradio-radio-label"),this.options.label&&this.options.label!==this.originalLabel?this._updateLabel():this.originalLabel&&(this.options.label=this.originalLabel),this._enhance(),t&&(this._addClass(this.label,"ui-checkboxradio-checked","ui-state-active"),this.icon&&this._addClass(this.icon,null,"ui-state-hover")),this._on({change:"_toggleClasses",focus:function(){this._addClass(this.label,null,"ui-state-focus ui-visual-focus")},blur:function(){this._removeClass(this.label,null,"ui-state-focus ui-visual-focus")}})},_readType:function(){var t=this.element[0].nodeName.toLowerCase();this.type=this.element[0].type,"input"===t&&/radio|checkbox/.test(this.type)||k.error("Can't create checkboxradio on element.nodeName="+t+" and element.type="+this.type)},_enhance:function(){this._updateIcon(this.element[0].checked)},widget:function(){return this.label},_getRadioGroup:function(){var t=this.element[0].name,e="input[name='"+k.ui.escapeSelector(t)+"']";return t?(this.form.length?k(this.form[0].elements).filter(e):k(e).filter(function(){return 0===k(this).form().length})).not(this.element):k([])},_toggleClasses:function(){var t=this.element[0].checked;this._toggleClass(this.label,"ui-checkboxradio-checked","ui-state-active",t),this.options.icon&&"checkbox"===this.type&&this._toggleClass(this.icon,null,"ui-icon-check ui-state-checked",t)._toggleClass(this.icon,null,"ui-icon-blank",!t),"radio"===this.type&&this._getRadioGroup().each(function(){var t=k(this).checkboxradio("instance");t&&t._removeClass(t.label,"ui-checkboxradio-checked","ui-state-active")})},_destroy:function(){this._unbindFormResetHandler(),this.icon&&(this.icon.remove(),this.iconSpace.remove())},_setOption:function(t,e){if("label"!==t||e){if(this._super(t,e),"disabled"===t)return this._toggleClass(this.label,null,"ui-state-disabled",e),void(this.element[0].disabled=e);this.refresh()}},_updateIcon:function(t){var e="ui-icon ui-icon-background ";this.options.icon?(this.icon||(this.icon=k("<span>"),this.iconSpace=k("<span> </span>"),this._addClass(this.iconSpace,"ui-checkboxradio-icon-space")),"checkbox"===this.type?(e+=t?"ui-icon-check ui-state-checked":"ui-icon-blank",this._removeClass(this.icon,null,t?"ui-icon-blank":"ui-icon-check")):e+="ui-icon-blank",this._addClass(this.icon,"ui-checkboxradio-icon",e),t||this._removeClass(this.icon,null,"ui-icon-check ui-state-checked"),this.icon.prependTo(this.label).after(this.iconSpace)):void 0!==this.icon&&(this.icon.remove(),this.iconSpace.remove(),delete this.icon)},_updateLabel:function(){var t=this.label.contents().not(this.element[0]);this.icon&&(t=t.not(this.icon[0])),this.iconSpace&&(t=t.not(this.iconSpace[0])),t.remove(),this.label.append(this.options.label)},refresh:function(){var t=this.element[0].checked,e=this.element[0].disabled;this._updateIcon(t),this._toggleClass(this.label,"ui-checkboxradio-checked","ui-state-active",t),null!==this.options.label&&this._updateLabel(),e!==this.options.disabled&&this._setOptions({disabled:e})}}]);var Q;k.ui.checkboxradio;k.widget("ui.button",{version:"1.12.1",defaultElement:"<button>",options:{classes:{"ui-button":"ui-corner-all"},disabled:null,icon:null,iconPosition:"beginning",label:null,showLabel:!0},_getCreateOptions:function(){var t,e=this._super()||{};return this.isInput=this.element.is("input"),null!=(t=this.element[0].disabled)&&(e.disabled=t),this.originalLabel=this.isInput?this.element.val():this.element.html(),this.originalLabel&&(e.label=this.originalLabel),e},_create:function(){!this.option.showLabel&!this.options.icon&&(this.options.showLabel=!0),null==this.options.disabled&&(this.options.disabled=this.element[0].disabled||!1),this.hasTitle=!!this.element.attr("title"),this.options.label&&this.options.label!==this.originalLabel&&(this.isInput?this.element.val(this.options.label):this.element.html(this.options.label)),this._addClass("ui-button","ui-widget"),this._setOption("disabled",this.options.disabled),this._enhance(),this.element.is("a")&&this._on({keyup:function(t){t.keyCode===k.ui.keyCode.SPACE&&(t.preventDefault(),this.element[0].click?this.element[0].click():this.element.trigger("click"))}})},_enhance:function(){this.element.is("button")||this.element.attr("role","button"),this.options.icon&&(this._updateIcon("icon",this.options.icon),this._updateTooltip())},_updateTooltip:function(){this.title=this.element.attr("title"),this.options.showLabel||this.title||this.element.attr("title",this.options.label)},_updateIcon:function(t,e){var i="iconPosition"!==t,n=i?this.options.iconPosition:e,s="top"===n||"bottom"===n;this.icon?i&&this._removeClass(this.icon,null,this.options.icon):(this.icon=k("<span>"),this._addClass(this.icon,"ui-button-icon","ui-icon"),this.options.showLabel||this._addClass("ui-button-icon-only")),i&&this._addClass(this.icon,null,e),this._attachIcon(n),s?(this._addClass(this.icon,null,"ui-widget-icon-block"),this.iconSpace&&this.iconSpace.remove()):(this.iconSpace||(this.iconSpace=k("<span> </span>"),this._addClass(this.iconSpace,"ui-button-icon-space")),this._removeClass(this.icon,null,"ui-wiget-icon-block"),this._attachIconSpace(n))},_destroy:function(){this.element.removeAttr("role"),this.icon&&this.icon.remove(),this.iconSpace&&this.iconSpace.remove(),this.hasTitle||this.element.removeAttr("title")},_attachIconSpace:function(t){this.icon[/^(?:end|bottom)/.test(t)?"before":"after"](this.iconSpace)},_attachIcon:function(t){this.element[/^(?:end|bottom)/.test(t)?"append":"prepend"](this.icon)},_setOptions:function(t){var e=void 0===t.showLabel?this.options.showLabel:t.showLabel,i=void 0===t.icon?this.options.icon:t.icon;e||i||(t.showLabel=!0),this._super(t)},_setOption:function(t,e){"icon"===t&&(e?this._updateIcon(t,e):this.icon&&(this.icon.remove(),this.iconSpace&&this.iconSpace.remove())),"iconPosition"===t&&this._updateIcon(t,e),"showLabel"===t&&(this._toggleClass("ui-button-icon-only",null,!e),this._updateTooltip()),"label"===t&&(this.isInput?this.element.val(e):(this.element.html(e),this.icon&&(this._attachIcon(this.options.iconPosition),this._attachIconSpace(this.options.iconPosition)))),this._super(t,e),"disabled"===t&&(this._toggleClass(null,"ui-state-disabled",e),(this.element[0].disabled=e)&&this.element.blur())},refresh:function(){var t=this.element.is("input, button")?this.element[0].disabled:this.element.hasClass("ui-button-disabled");t!==this.options.disabled&&this._setOptions({disabled:t}),this._updateTooltip()}}),!1!==k.uiBackCompat&&(k.widget("ui.button",k.ui.button,{options:{text:!0,icons:{primary:null,secondary:null}},_create:function(){this.options.showLabel&&!this.options.text&&(this.options.showLabel=this.options.text),!this.options.showLabel&&this.options.text&&(this.options.text=this.options.showLabel),this.options.icon||!this.options.icons.primary&&!this.options.icons.secondary?this.options.icon&&(this.options.icons.primary=this.options.icon):this.options.icons.primary?this.options.icon=this.options.icons.primary:(this.options.icon=this.options.icons.secondary,this.options.iconPosition="end"),this._super()},_setOption:function(t,e){"text"!==t?("showLabel"===t&&(this.options.text=e),"icon"===t&&(this.options.icons.primary=e),"icons"===t&&(e.primary?(this._super("icon",e.primary),this._super("iconPosition","beginning")):e.secondary&&(this._super("icon",e.secondary),this._super("iconPosition","end"))),this._superApply(arguments)):this._super("showLabel",e)}}),k.fn.button=(Q=k.fn.button,function(){return!this.length||this.length&&"INPUT"!==this[0].tagName||this.length&&"INPUT"===this[0].tagName&&"checkbox"!==this.attr("type")&&"radio"!==this.attr("type")?Q.apply(this,arguments):(k.ui.checkboxradio||k.error("Checkboxradio widget missing"),0===arguments.length?this.checkboxradio({icon:!1}):this.checkboxradio.apply(this,arguments))}),k.fn.buttonset=function(){return k.ui.controlgroup||k.error("Controlgroup widget missing"),"option"===arguments[0]&&"items"===arguments[1]&&arguments[2]?this.controlgroup.apply(this,[arguments[0],"items.button",arguments[2]]):"option"===arguments[0]&&"items"===arguments[1]?this.controlgroup.apply(this,[arguments[0],"items.button"]):("object"==typeof arguments[0]&&arguments[0].items&&(arguments[0].items={button:arguments[0].items}),this.controlgroup.apply(this,arguments))});var J;k.ui.button;function Z(){this._curInst=null,this._keyEvent=!1,this._disabledInputs=[],this._datepickerShowing=!1,this._inDialog=!1,this._mainDivId="ui-datepicker-div",this._inlineClass="ui-datepicker-inline",this._appendClass="ui-datepicker-append",this._triggerClass="ui-datepicker-trigger",this._dialogClass="ui-datepicker-dialog",this._disableClass="ui-datepicker-disabled",this._unselectableClass="ui-datepicker-unselectable",this._currentClass="ui-datepicker-current-day",this._dayOverClass="ui-datepicker-days-cell-over",this.regional=[],this.regional[""]={closeText:"Done",prevText:"Prev",nextText:"Next",currentText:"Today",monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],weekHeader:"Wk",dateFormat:"mm/dd/yy",firstDay:0,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},this._defaults={showOn:"focus",showAnim:"fadeIn",showOptions:{},defaultDate:null,appendText:"",buttonText:"...",buttonImage:"",buttonImageOnly:!1,hideIfNoPrevNext:!1,navigationAsDateFormat:!1,gotoCurrent:!1,changeMonth:!1,changeYear:!1,yearRange:"c-10:c+10",showOtherMonths:!1,selectOtherMonths:!1,showWeek:!1,calculateWeek:this.iso8601Week,shortYearCutoff:"+10",minDate:null,maxDate:null,duration:"fast",beforeShowDay:null,beforeShow:null,onSelect:null,onChangeMonthYear:null,onClose:null,numberOfMonths:1,showCurrentAtPos:0,stepMonths:1,stepBigMonths:12,altField:"",altFormat:"",constrainInput:!0,showButtonPanel:!1,autoSize:!1,disabled:!1},k.extend(this._defaults,this.regional[""]),this.regional.en=k.extend(!0,{},this.regional[""]),this.regional["en-US"]=k.extend(!0,{},this.regional.en),this.dpDiv=tt(k("<div id='"+this._mainDivId+"' class='ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>"))}function tt(t){var e="button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a";return t.on("mouseout",e,function(){k(this).removeClass("ui-state-hover"),-1!==this.className.indexOf("ui-datepicker-prev")&&k(this).removeClass("ui-datepicker-prev-hover"),-1!==this.className.indexOf("ui-datepicker-next")&&k(this).removeClass("ui-datepicker-next-hover")}).on("mouseover",e,et)}function et(){k.datepicker._isDisabledDatepicker(J.inline?J.dpDiv.parent()[0]:J.input[0])||(k(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover"),k(this).addClass("ui-state-hover"),-1!==this.className.indexOf("ui-datepicker-prev")&&k(this).addClass("ui-datepicker-prev-hover"),-1!==this.className.indexOf("ui-datepicker-next")&&k(this).addClass("ui-datepicker-next-hover"))}function it(t,e){for(var i in k.extend(t,e),e)null==e[i]&&(t[i]=e[i]);return t}k.extend(k.ui,{datepicker:{version:"1.12.1"}}),k.extend(Z.prototype,{markerClassName:"hasDatepicker",maxRows:4,_widgetDatepicker:function(){return this.dpDiv},setDefaults:function(t){return it(this._defaults,t||{}),this},_attachDatepicker:function(t,e){var i,n,s;n="div"===(i=t.nodeName.toLowerCase())||"span"===i,t.id||(this.uuid+=1,t.id="dp"+this.uuid),(s=this._newInst(k(t),n)).settings=k.extend({},e||{}),"input"===i?this._connectDatepicker(t,s):n&&this._inlineDatepicker(t,s)},_newInst:function(t,e){return{id:t[0].id.replace(/([^A-Za-z0-9_\-])/g,"\\\\$1"),input:t,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:e,dpDiv:e?tt(k("<div class='"+this._inlineClass+" ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>")):this.dpDiv}},_connectDatepicker:function(t,e){var i=k(t);e.append=k([]),e.trigger=k([]),i.hasClass(this.markerClassName)||(this._attachments(i,e),i.addClass(this.markerClassName).on("keydown",this._doKeyDown).on("keypress",this._doKeyPress).on("keyup",this._doKeyUp),this._autoSize(e),k.data(t,"datepicker",e),e.settings.disabled&&this._disableDatepicker(t))},_attachments:function(t,e){var i,n,s,r=this._get(e,"appendText"),a=this._get(e,"isRTL");e.append&&e.append.remove(),r&&(e.append=k("<span class='"+this._appendClass+"'>"+r+"</span>"),t[a?"before":"after"](e.append)),t.off("focus",this._showDatepicker),e.trigger&&e.trigger.remove(),"focus"!==(i=this._get(e,"showOn"))&&"both"!==i||t.on("focus",this._showDatepicker),"button"!==i&&"both"!==i||(n=this._get(e,"buttonText"),s=this._get(e,"buttonImage"),e.trigger=k(this._get(e,"buttonImageOnly")?k("<img/>").addClass(this._triggerClass).attr({src:s,alt:n,title:n}):k("<button type='button'></button>").addClass(this._triggerClass).html(s?k("<img/>").attr({src:s,alt:n,title:n}):n)),t[a?"before":"after"](e.trigger),e.trigger.on("click",function(){return k.datepicker._datepickerShowing&&k.datepicker._lastInput===t[0]?k.datepicker._hideDatepicker():(k.datepicker._datepickerShowing&&k.datepicker._lastInput!==t[0]&&k.datepicker._hideDatepicker(),k.datepicker._showDatepicker(t[0])),!1}))},_autoSize:function(t){if(this._get(t,"autoSize")&&!t.inline){var e,i,n,s,r=new Date(2009,11,20),a=this._get(t,"dateFormat");a.match(/[DM]/)&&(e=function(t){for(s=n=i=0;s<t.length;s++)t[s].length>i&&(i=t[s].length,n=s);return n},r.setMonth(e(this._get(t,a.match(/MM/)?"monthNames":"monthNamesShort"))),r.setDate(e(this._get(t,a.match(/DD/)?"dayNames":"dayNamesShort"))+20-r.getDay())),t.input.attr("size",this._formatDate(t,r).length)}},_inlineDatepicker:function(t,e){var i=k(t);i.hasClass(this.markerClassName)||(i.addClass(this.markerClassName).append(e.dpDiv),k.data(t,"datepicker",e),this._setDate(e,this._getDefaultDate(e),!0),this._updateDatepicker(e),this._updateAlternate(e),e.settings.disabled&&this._disableDatepicker(t),e.dpDiv.css("display","block"))},_dialogDatepicker:function(t,e,i,n,s){var r,a,o,l,c,u=this._dialogInst;return u||(this.uuid+=1,r="dp"+this.uuid,this._dialogInput=k("<input type='text' id='"+r+"' style='position: absolute; top: -100px; width: 0px;'/>"),this._dialogInput.on("keydown",this._doKeyDown),k("body").append(this._dialogInput),(u=this._dialogInst=this._newInst(this._dialogInput,!1)).settings={},k.data(this._dialogInput[0],"datepicker",u)),it(u.settings,n||{}),e=e&&e.constructor===Date?this._formatDate(u,e):e,this._dialogInput.val(e),this._pos=s?s.length?s:[s.pageX,s.pageY]:null,this._pos||(a=document.documentElement.clientWidth,o=document.documentElement.clientHeight,l=document.documentElement.scrollLeft||document.body.scrollLeft,c=document.documentElement.scrollTop||document.body.scrollTop,this._pos=[a/2-100+l,o/2-150+c]),this._dialogInput.css("left",this._pos[0]+20+"px").css("top",this._pos[1]+"px"),u.settings.onSelect=i,this._inDialog=!0,this.dpDiv.addClass(this._dialogClass),this._showDatepicker(this._dialogInput[0]),k.blockUI&&k.blockUI(this.dpDiv),k.data(this._dialogInput[0],"datepicker",u),this},_destroyDatepicker:function(t){var e,i=k(t),n=k.data(t,"datepicker");i.hasClass(this.markerClassName)&&(e=t.nodeName.toLowerCase(),k.removeData(t,"datepicker"),"input"===e?(n.append.remove(),n.trigger.remove(),i.removeClass(this.markerClassName).off("focus",this._showDatepicker).off("keydown",this._doKeyDown).off("keypress",this._doKeyPress).off("keyup",this._doKeyUp)):"div"!==e&&"span"!==e||i.removeClass(this.markerClassName).empty(),J===n&&(J=null))},_enableDatepicker:function(e){var t,i,n=k(e),s=k.data(e,"datepicker");n.hasClass(this.markerClassName)&&("input"===(t=e.nodeName.toLowerCase())?(e.disabled=!1,s.trigger.filter("button").each(function(){this.disabled=!1}).end().filter("img").css({opacity:"1.0",cursor:""})):"div"!==t&&"span"!==t||((i=n.children("."+this._inlineClass)).children().removeClass("ui-state-disabled"),i.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!1)),this._disabledInputs=k.map(this._disabledInputs,function(t){return t===e?null:t}))},_disableDatepicker:function(e){var t,i,n=k(e),s=k.data(e,"datepicker");n.hasClass(this.markerClassName)&&("input"===(t=e.nodeName.toLowerCase())?(e.disabled=!0,s.trigger.filter("button").each(function(){this.disabled=!0}).end().filter("img").css({opacity:"0.5",cursor:"default"})):"div"!==t&&"span"!==t||((i=n.children("."+this._inlineClass)).children().addClass("ui-state-disabled"),i.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!0)),this._disabledInputs=k.map(this._disabledInputs,function(t){return t===e?null:t}),this._disabledInputs[this._disabledInputs.length]=e)},_isDisabledDatepicker:function(t){if(!t)return!1;for(var e=0;e<this._disabledInputs.length;e++)if(this._disabledInputs[e]===t)return!0;return!1},_getInst:function(t){try{return k.data(t,"datepicker")}catch(t){throw"Missing instance data for this datepicker"}},_optionDatepicker:function(t,e,i){var n,s,r,a,o=this._getInst(t);if(2===arguments.length&&"string"==typeof e)return"defaults"===e?k.extend({},k.datepicker._defaults):o?"all"===e?k.extend({},o.settings):this._get(o,e):null;n=e||{},"string"==typeof e&&((n={})[e]=i),o&&(this._curInst===o&&this._hideDatepicker(),s=this._getDateDatepicker(t,!0),r=this._getMinMaxDate(o,"min"),a=this._getMinMaxDate(o,"max"),it(o.settings,n),null!==r&&void 0!==n.dateFormat&&void 0===n.minDate&&(o.settings.minDate=this._formatDate(o,r)),null!==a&&void 0!==n.dateFormat&&void 0===n.maxDate&&(o.settings.maxDate=this._formatDate(o,a)),"disabled"in n&&(n.disabled?this._disableDatepicker(t):this._enableDatepicker(t)),this._attachments(k(t),o),this._autoSize(o),this._setDate(o,s),this._updateAlternate(o),this._updateDatepicker(o))},_changeDatepicker:function(t,e,i){this._optionDatepicker(t,e,i)},_refreshDatepicker:function(t){var e=this._getInst(t);e&&this._updateDatepicker(e)},_setDateDatepicker:function(t,e){var i=this._getInst(t);i&&(this._setDate(i,e),this._updateDatepicker(i),this._updateAlternate(i))},_getDateDatepicker:function(t,e){var i=this._getInst(t);return i&&!i.inline&&this._setDateFromField(i,e),i?this._getDate(i):null},_doKeyDown:function(t){var e,i,n,s=k.datepicker._getInst(t.target),r=!0,a=s.dpDiv.is(".ui-datepicker-rtl");if(s._keyEvent=!0,k.datepicker._datepickerShowing)switch(t.keyCode){case 9:k.datepicker._hideDatepicker(),r=!1;break;case 13:return(n=k("td."+k.datepicker._dayOverClass+":not(."+k.datepicker._currentClass+")",s.dpDiv))[0]&&k.datepicker._selectDay(t.target,s.selectedMonth,s.selectedYear,n[0]),(e=k.datepicker._get(s,"onSelect"))?(i=k.datepicker._formatDate(s),e.apply(s.input?s.input[0]:null,[i,s])):k.datepicker._hideDatepicker(),!1;case 27:k.datepicker._hideDatepicker();break;case 33:k.datepicker._adjustDate(t.target,t.ctrlKey?-k.datepicker._get(s,"stepBigMonths"):-k.datepicker._get(s,"stepMonths"),"M");break;case 34:k.datepicker._adjustDate(t.target,t.ctrlKey?+k.datepicker._get(s,"stepBigMonths"):+k.datepicker._get(s,"stepMonths"),"M");break;case 35:(t.ctrlKey||t.metaKey)&&k.datepicker._clearDate(t.target),r=t.ctrlKey||t.metaKey;break;case 36:(t.ctrlKey||t.metaKey)&&k.datepicker._gotoToday(t.target),r=t.ctrlKey||t.metaKey;break;case 37:(t.ctrlKey||t.metaKey)&&k.datepicker._adjustDate(t.target,a?1:-1,"D"),r=t.ctrlKey||t.metaKey,t.originalEvent.altKey&&k.datepicker._adjustDate(t.target,t.ctrlKey?-k.datepicker._get(s,"stepBigMonths"):-k.datepicker._get(s,"stepMonths"),"M");break;case 38:(t.ctrlKey||t.metaKey)&&k.datepicker._adjustDate(t.target,-7,"D"),r=t.ctrlKey||t.metaKey;break;case 39:(t.ctrlKey||t.metaKey)&&k.datepicker._adjustDate(t.target,a?-1:1,"D"),r=t.ctrlKey||t.metaKey,t.originalEvent.altKey&&k.datepicker._adjustDate(t.target,t.ctrlKey?+k.datepicker._get(s,"stepBigMonths"):+k.datepicker._get(s,"stepMonths"),"M");break;case 40:(t.ctrlKey||t.metaKey)&&k.datepicker._adjustDate(t.target,7,"D"),r=t.ctrlKey||t.metaKey;break;default:r=!1}else 36===t.keyCode&&t.ctrlKey?k.datepicker._showDatepicker(this):r=!1;r&&(t.preventDefault(),t.stopPropagation())},_doKeyPress:function(t){var e,i,n=k.datepicker._getInst(t.target);if(k.datepicker._get(n,"constrainInput"))return e=k.datepicker._possibleChars(k.datepicker._get(n,"dateFormat")),i=String.fromCharCode(null==t.charCode?t.keyCode:t.charCode),t.ctrlKey||t.metaKey||i<" "||!e||-1<e.indexOf(i)},_doKeyUp:function(t){var e=k.datepicker._getInst(t.target);if(e.input.val()!==e.lastVal)try{k.datepicker.parseDate(k.datepicker._get(e,"dateFormat"),e.input?e.input.val():null,k.datepicker._getFormatConfig(e))&&(k.datepicker._setDateFromField(e),k.datepicker._updateAlternate(e),k.datepicker._updateDatepicker(e))}catch(t){}return!0},_showDatepicker:function(t){var e,i,n,s,r,a,o;"input"!==(t=t.target||t).nodeName.toLowerCase()&&(t=k("input",t.parentNode)[0]),k.datepicker._isDisabledDatepicker(t)||k.datepicker._lastInput===t||(e=k.datepicker._getInst(t),k.datepicker._curInst&&k.datepicker._curInst!==e&&(k.datepicker._curInst.dpDiv.stop(!0,!0),e&&k.datepicker._datepickerShowing&&k.datepicker._hideDatepicker(k.datepicker._curInst.input[0])),!1!==(n=(i=k.datepicker._get(e,"beforeShow"))?i.apply(t,[t,e]):{})&&(it(e.settings,n),e.lastVal=null,k.datepicker._lastInput=t,k.datepicker._setDateFromField(e),k.datepicker._inDialog&&(t.value=""),k.datepicker._pos||(k.datepicker._pos=k.datepicker._findPos(t),k.datepicker._pos[1]+=t.offsetHeight),s=!1,k(t).parents().each(function(){return!(s|="fixed"===k(this).css("position"))}),r={left:k.datepicker._pos[0],top:k.datepicker._pos[1]},k.datepicker._pos=null,e.dpDiv.empty(),e.dpDiv.css({position:"absolute",display:"block",top:"-1000px"}),k.datepicker._updateDatepicker(e),r=k.datepicker._checkOffset(e,r,s),e.dpDiv.css({position:k.datepicker._inDialog&&k.blockUI?"static":s?"fixed":"absolute",display:"none",left:r.left+"px",top:r.top+"px"}),e.inline||(a=k.datepicker._get(e,"showAnim"),o=k.datepicker._get(e,"duration"),e.dpDiv.css("z-index",function(t){for(var e,i;t.length&&t[0]!==document;){if(("absolute"===(e=t.css("position"))||"relative"===e||"fixed"===e)&&(i=parseInt(t.css("zIndex"),10),!isNaN(i)&&0!==i))return i;t=t.parent()}return 0}(k(t))+1),k.datepicker._datepickerShowing=!0,k.effects&&k.effects.effect[a]?e.dpDiv.show(a,k.datepicker._get(e,"showOptions"),o):e.dpDiv[a||"show"](a?o:null),k.datepicker._shouldFocusInput(e)&&e.input.trigger("focus"),k.datepicker._curInst=e)))},_updateDatepicker:function(t){this.maxRows=4,(J=t).dpDiv.empty().append(this._generateHTML(t)),this._attachHandlers(t);var e,i=this._getNumberOfMonths(t),n=i[1],s=t.dpDiv.find("."+this._dayOverClass+" a");0<s.length&&et.apply(s.get(0)),t.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width(""),1<n&&t.dpDiv.addClass("ui-datepicker-multi-"+n).css("width",17*n+"em"),t.dpDiv[(1!==i[0]||1!==i[1]?"add":"remove")+"Class"]("ui-datepicker-multi"),t.dpDiv[(this._get(t,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl"),t===k.datepicker._curInst&&k.datepicker._datepickerShowing&&k.datepicker._shouldFocusInput(t)&&t.input.trigger("focus"),t.yearshtml&&(e=t.yearshtml,setTimeout(function(){e===t.yearshtml&&t.yearshtml&&t.dpDiv.find("select.ui-datepicker-year:first").replaceWith(t.yearshtml),e=t.yearshtml=null},0))},_shouldFocusInput:function(t){return t.input&&t.input.is(":visible")&&!t.input.is(":disabled")&&!t.input.is(":focus")},_checkOffset:function(t,e,i){var n=t.dpDiv.outerWidth(),s=t.dpDiv.outerHeight(),r=t.input?t.input.outerWidth():0,a=t.input?t.input.outerHeight():0,o=document.documentElement.clientWidth+(i?0:k(document).scrollLeft()),l=document.documentElement.clientHeight+(i?0:k(document).scrollTop());return e.left-=this._get(t,"isRTL")?n-r:0,e.left-=i&&e.left===t.input.offset().left?k(document).scrollLeft():0,e.top-=i&&e.top===t.input.offset().top+a?k(document).scrollTop():0,e.left-=Math.min(e.left,e.left+n>o&&n<o?Math.abs(e.left+n-o):0),e.top-=Math.min(e.top,e.top+s>l&&s<l?Math.abs(s+a):0),e},_findPos:function(t){for(var e,i=this._getInst(t),n=this._get(i,"isRTL");t&&("hidden"===t.type||1!==t.nodeType||k.expr.filters.hidden(t));)t=t[n?"previousSibling":"nextSibling"];return[(e=k(t).offset()).left,e.top]},_hideDatepicker:function(t){var e,i,n,s,r=this._curInst;!r||t&&r!==k.data(t,"datepicker")||this._datepickerShowing&&(e=this._get(r,"showAnim"),i=this._get(r,"duration"),n=function(){k.datepicker._tidyDialog(r)},k.effects&&(k.effects.effect[e]||k.effects[e])?r.dpDiv.hide(e,k.datepicker._get(r,"showOptions"),i,n):r.dpDiv["slideDown"===e?"slideUp":"fadeIn"===e?"fadeOut":"hide"](e?i:null,n),e||n(),this._datepickerShowing=!1,(s=this._get(r,"onClose"))&&s.apply(r.input?r.input[0]:null,[r.input?r.input.val():"",r]),this._lastInput=null,this._inDialog&&(this._dialogInput.css({position:"absolute",left:"0",top:"-100px"}),k.blockUI&&(k.unblockUI(),k("body").append(this.dpDiv))),this._inDialog=!1)},_tidyDialog:function(t){t.dpDiv.removeClass(this._dialogClass).off(".ui-datepicker-calendar")},_checkExternalClick:function(t){if(k.datepicker._curInst){var e=k(t.target),i=k.datepicker._getInst(e[0]);(e[0].id===k.datepicker._mainDivId||0!==e.parents("#"+k.datepicker._mainDivId).length||e.hasClass(k.datepicker.markerClassName)||e.closest("."+k.datepicker._triggerClass).length||!k.datepicker._datepickerShowing||k.datepicker._inDialog&&k.blockUI)&&(!e.hasClass(k.datepicker.markerClassName)||k.datepicker._curInst===i)||k.datepicker._hideDatepicker()}},_adjustDate:function(t,e,i){var n=k(t),s=this._getInst(n[0]);this._isDisabledDatepicker(n[0])||(this._adjustInstDate(s,e+("M"===i?this._get(s,"showCurrentAtPos"):0),i),this._updateDatepicker(s))},_gotoToday:function(t){var e,i=k(t),n=this._getInst(i[0]);this._get(n,"gotoCurrent")&&n.currentDay?(n.selectedDay=n.currentDay,n.drawMonth=n.selectedMonth=n.currentMonth,n.drawYear=n.selectedYear=n.currentYear):(e=new Date,n.selectedDay=e.getDate(),n.drawMonth=n.selectedMonth=e.getMonth(),n.drawYear=n.selectedYear=e.getFullYear()),this._notifyChange(n),this._adjustDate(i)},_selectMonthYear:function(t,e,i){var n=k(t),s=this._getInst(n[0]);s["selected"+("M"===i?"Month":"Year")]=s["draw"+("M"===i?"Month":"Year")]=parseInt(e.options[e.selectedIndex].value,10),this._notifyChange(s),this._adjustDate(n)},_selectDay:function(t,e,i,n){var s,r=k(t);k(n).hasClass(this._unselectableClass)||this._isDisabledDatepicker(r[0])||((s=this._getInst(r[0])).selectedDay=s.currentDay=k("a",n).html(),s.selectedMonth=s.currentMonth=e,s.selectedYear=s.currentYear=i,this._selectDate(t,this._formatDate(s,s.currentDay,s.currentMonth,s.currentYear)))},_clearDate:function(t){var e=k(t);this._selectDate(e,"")},_selectDate:function(t,e){var i,n=k(t),s=this._getInst(n[0]);e=null!=e?e:this._formatDate(s),s.input&&s.input.val(e),this._updateAlternate(s),(i=this._get(s,"onSelect"))?i.apply(s.input?s.input[0]:null,[e,s]):s.input&&s.input.trigger("change"),s.inline?this._updateDatepicker(s):(this._hideDatepicker(),this._lastInput=s.input[0],"object"!=typeof s.input[0]&&s.input.trigger("focus"),this._lastInput=null)},_updateAlternate:function(t){var e,i,n,s=this._get(t,"altField");s&&(e=this._get(t,"altFormat")||this._get(t,"dateFormat"),i=this._getDate(t),n=this.formatDate(e,i,this._getFormatConfig(t)),k(s).val(n))},noWeekends:function(t){var e=t.getDay();return[0<e&&e<6,""]},iso8601Week:function(t){var e,i=new Date(t.getTime());return i.setDate(i.getDate()+4-(i.getDay()||7)),e=i.getTime(),i.setMonth(0),i.setDate(1),Math.floor(Math.round((e-i)/864e5)/7)+1},parseDate:function(i,r,t){if(null==i||null==r)throw"Invalid arguments";if(""===(r="object"==typeof r?r.toString():r+""))return null;function a(t){var e=o+1<i.length&&i.charAt(o+1)===t;return e&&o++,e}function e(t){var e=a(t),i="@"===t?14:"!"===t?20:"y"===t&&e?4:"o"===t?3:2,n=new RegExp("^\\d{"+("y"===t?i:1)+","+i+"}"),s=r.substring(h).match(n);if(!s)throw"Missing number at position "+h;return h+=s[0].length,parseInt(s[0],10)}function n(t,e,i){var n=-1,s=k.map(a(t)?i:e,function(t,e){return[[e,t]]}).sort(function(t,e){return-(t[1].length-e[1].length)});if(k.each(s,function(t,e){var i=e[1];if(r.substr(h,i.length).toLowerCase()===i.toLowerCase())return n=e[0],h+=i.length,!1}),-1!==n)return n+1;throw"Unknown name at position "+h}function s(){if(r.charAt(h)!==i.charAt(o))throw"Unexpected literal at position "+h;h++}var o,l,c,u,h=0,d=(t?t.shortYearCutoff:null)||this._defaults.shortYearCutoff,p="string"!=typeof d?d:(new Date).getFullYear()%100+parseInt(d,10),f=(t?t.dayNamesShort:null)||this._defaults.dayNamesShort,m=(t?t.dayNames:null)||this._defaults.dayNames,g=(t?t.monthNamesShort:null)||this._defaults.monthNamesShort,v=(t?t.monthNames:null)||this._defaults.monthNames,y=-1,_=-1,b=-1,T=-1,w=!1;for(o=0;o<i.length;o++)if(w)"'"!==i.charAt(o)||a("'")?s():w=!1;else switch(i.charAt(o)){case"d":b=e("d");break;case"D":n("D",f,m);break;case"o":T=e("o");break;case"m":_=e("m");break;case"M":_=n("M",g,v);break;case"y":y=e("y");break;case"@":y=(u=new Date(e("@"))).getFullYear(),_=u.getMonth()+1,b=u.getDate();break;case"!":y=(u=new Date((e("!")-this._ticksTo1970)/1e4)).getFullYear(),_=u.getMonth()+1,b=u.getDate();break;case"'":a("'")?s():w=!0;break;default:s()}if(h<r.length&&(c=r.substr(h),!/^\s+/.test(c)))throw"Extra/unparsed characters found in date: "+c;if(-1===y?y=(new Date).getFullYear():y<100&&(y+=(new Date).getFullYear()-(new Date).getFullYear()%100+(y<=p?0:-100)),-1<T)for(_=1,b=T;;){if(b<=(l=this._getDaysInMonth(y,_-1)))break;_++,b-=l}if((u=this._daylightSavingAdjust(new Date(y,_-1,b))).getFullYear()!==y||u.getMonth()+1!==_||u.getDate()!==b)throw"Invalid date";return u},ATOM:"yy-mm-dd",COOKIE:"D, dd M yy",ISO_8601:"yy-mm-dd",RFC_822:"D, d M y",RFC_850:"DD, dd-M-y",RFC_1036:"D, d M y",RFC_1123:"D, d M yy",RFC_2822:"D, d M yy",RSS:"D, d M y",TICKS:"!",TIMESTAMP:"@",W3C:"yy-mm-dd",_ticksTo1970:24*(718685+Math.floor(492.5)-Math.floor(19.7)+Math.floor(4.925))*60*60*1e7,formatDate:function(i,t,e){if(!t)return"";function s(t){var e=a+1<i.length&&i.charAt(a+1)===t;return e&&a++,e}function n(t,e,i){var n=""+e;if(s(t))for(;n.length<i;)n="0"+n;return n}function r(t,e,i,n){return s(t)?n[e]:i[e]}var a,o=(e?e.dayNamesShort:null)||this._defaults.dayNamesShort,l=(e?e.dayNames:null)||this._defaults.dayNames,c=(e?e.monthNamesShort:null)||this._defaults.monthNamesShort,u=(e?e.monthNames:null)||this._defaults.monthNames,h="",d=!1;if(t)for(a=0;a<i.length;a++)if(d)"'"!==i.charAt(a)||s("'")?h+=i.charAt(a):d=!1;else switch(i.charAt(a)){case"d":h+=n("d",t.getDate(),2);break;case"D":h+=r("D",t.getDay(),o,l);break;case"o":h+=n("o",Math.round((new Date(t.getFullYear(),t.getMonth(),t.getDate()).getTime()-new Date(t.getFullYear(),0,0).getTime())/864e5),3);break;case"m":h+=n("m",t.getMonth()+1,2);break;case"M":h+=r("M",t.getMonth(),c,u);break;case"y":h+=s("y")?t.getFullYear():(t.getFullYear()%100<10?"0":"")+t.getFullYear()%100;break;case"@":h+=t.getTime();break;case"!":h+=1e4*t.getTime()+this._ticksTo1970;break;case"'":s("'")?h+="'":d=!0;break;default:h+=i.charAt(a)}return h},_possibleChars:function(i){function t(t){var e=n+1<i.length&&i.charAt(n+1)===t;return e&&n++,e}var n,e="",s=!1;for(n=0;n<i.length;n++)if(s)"'"!==i.charAt(n)||t("'")?e+=i.charAt(n):s=!1;else switch(i.charAt(n)){case"d":case"m":case"y":case"@":e+="0123456789";break;case"D":case"M":return null;case"'":t("'")?e+="'":s=!0;break;default:e+=i.charAt(n)}return e},_get:function(t,e){return void 0!==t.settings[e]?t.settings[e]:this._defaults[e]},_setDateFromField:function(t,e){if(t.input.val()!==t.lastVal){var i=this._get(t,"dateFormat"),n=t.lastVal=t.input?t.input.val():null,s=this._getDefaultDate(t),r=s,a=this._getFormatConfig(t);try{r=this.parseDate(i,n,a)||s}catch(t){n=e?"":n}t.selectedDay=r.getDate(),t.drawMonth=t.selectedMonth=r.getMonth(),t.drawYear=t.selectedYear=r.getFullYear(),t.currentDay=n?r.getDate():0,t.currentMonth=n?r.getMonth():0,t.currentYear=n?r.getFullYear():0,this._adjustInstDate(t)}},_getDefaultDate:function(t){return this._restrictMinMax(t,this._determineDate(t,this._get(t,"defaultDate"),new Date))},_determineDate:function(o,t,e){var i,n,s=null==t||""===t?e:"string"==typeof t?function(t){try{return k.datepicker.parseDate(k.datepicker._get(o,"dateFormat"),t,k.datepicker._getFormatConfig(o))}catch(t){}for(var e=(t.toLowerCase().match(/^c/)?k.datepicker._getDate(o):null)||new Date,i=e.getFullYear(),n=e.getMonth(),s=e.getDate(),r=/([+\-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g,a=r.exec(t);a;){switch(a[2]||"d"){case"d":case"D":s+=parseInt(a[1],10);break;case"w":case"W":s+=7*parseInt(a[1],10);break;case"m":case"M":n+=parseInt(a[1],10),s=Math.min(s,k.datepicker._getDaysInMonth(i,n));break;case"y":case"Y":i+=parseInt(a[1],10),s=Math.min(s,k.datepicker._getDaysInMonth(i,n))}a=r.exec(t)}return new Date(i,n,s)}(t):"number"==typeof t?isNaN(t)?e:(i=t,(n=new Date).setDate(n.getDate()+i),n):new Date(t.getTime());return(s=s&&"Invalid Date"===s.toString()?e:s)&&(s.setHours(0),s.setMinutes(0),s.setSeconds(0),s.setMilliseconds(0)),this._daylightSavingAdjust(s)},_daylightSavingAdjust:function(t){return t?(t.setHours(12<t.getHours()?t.getHours()+2:0),t):null},_setDate:function(t,e,i){var n=!e,s=t.selectedMonth,r=t.selectedYear,a=this._restrictMinMax(t,this._determineDate(t,e,new Date));t.selectedDay=t.currentDay=a.getDate(),t.drawMonth=t.selectedMonth=t.currentMonth=a.getMonth(),t.drawYear=t.selectedYear=t.currentYear=a.getFullYear(),s===t.selectedMonth&&r===t.selectedYear||i||this._notifyChange(t),this._adjustInstDate(t),t.input&&t.input.val(n?"":this._formatDate(t))},_getDate:function(t){return!t.currentYear||t.input&&""===t.input.val()?null:this._daylightSavingAdjust(new Date(t.currentYear,t.currentMonth,t.currentDay))},_attachHandlers:function(t){var e=this._get(t,"stepMonths"),i="#"+t.id.replace(/\\\\/g,"\\");t.dpDiv.find("[data-handler]").map(function(){var t={prev:function(){k.datepicker._adjustDate(i,-e,"M")},next:function(){k.datepicker._adjustDate(i,+e,"M")},hide:function(){k.datepicker._hideDatepicker()},today:function(){k.datepicker._gotoToday(i)},selectDay:function(){return k.datepicker._selectDay(i,+this.getAttribute("data-month"),+this.getAttribute("data-year"),this),!1},selectMonth:function(){return k.datepicker._selectMonthYear(i,this,"M"),!1},selectYear:function(){return k.datepicker._selectMonthYear(i,this,"Y"),!1}};k(this).on(this.getAttribute("data-event"),t[this.getAttribute("data-handler")])})},_generateHTML:function(t){var e,i,n,s,r,a,o,l,c,u,h,d,p,f,m,g,v,y,_,b,T,w,k,S,C,x,E,D,A,I,O,P,L,M,N,R,U,j,B,H=new Date,F=this._daylightSavingAdjust(new Date(H.getFullYear(),H.getMonth(),H.getDate())),z=this._get(t,"isRTL"),W=this._get(t,"showButtonPanel"),$=this._get(t,"hideIfNoPrevNext"),q=this._get(t,"navigationAsDateFormat"),V=this._getNumberOfMonths(t),Y=this._get(t,"showCurrentAtPos"),G=this._get(t,"stepMonths"),X=1!==V[0]||1!==V[1],K=this._daylightSavingAdjust(t.currentDay?new Date(t.currentYear,t.currentMonth,t.currentDay):new Date(9999,9,9)),Q=this._getMinMaxDate(t,"min"),J=this._getMinMaxDate(t,"max"),Z=t.drawMonth-Y,tt=t.drawYear;if(Z<0&&(Z+=12,tt--),J)for(e=this._daylightSavingAdjust(new Date(J.getFullYear(),J.getMonth()-V[0]*V[1]+1,J.getDate())),e=Q&&e<Q?Q:e;this._daylightSavingAdjust(new Date(tt,Z,1))>e;)--Z<0&&(Z=11,tt--);for(t.drawMonth=Z,t.drawYear=tt,i=this._get(t,"prevText"),i=q?this.formatDate(i,this._daylightSavingAdjust(new Date(tt,Z-G,1)),this._getFormatConfig(t)):i,n=this._canAdjustMonth(t,-1,tt,Z)?"<a class='ui-datepicker-prev ui-corner-all' data-handler='prev' data-event='click' title='"+i+"'><span class='ui-icon ui-icon-circle-triangle-"+(z?"e":"w")+"'>"+i+"</span></a>":$?"":"<a class='ui-datepicker-prev ui-corner-all ui-state-disabled' title='"+i+"'><span class='ui-icon ui-icon-circle-triangle-"+(z?"e":"w")+"'>"+i+"</span></a>",s=this._get(t,"nextText"),s=q?this.formatDate(s,this._daylightSavingAdjust(new Date(tt,Z+G,1)),this._getFormatConfig(t)):s,r=this._canAdjustMonth(t,1,tt,Z)?"<a class='ui-datepicker-next ui-corner-all' data-handler='next' data-event='click' title='"+s+"'><span class='ui-icon ui-icon-circle-triangle-"+(z?"w":"e")+"'>"+s+"</span></a>":$?"":"<a class='ui-datepicker-next ui-corner-all ui-state-disabled' title='"+s+"'><span class='ui-icon ui-icon-circle-triangle-"+(z?"w":"e")+"'>"+s+"</span></a>",a=this._get(t,"currentText"),o=this._get(t,"gotoCurrent")&&t.currentDay?K:F,a=q?this.formatDate(a,o,this._getFormatConfig(t)):a,l=t.inline?"":"<button type='button' class='ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all' data-handler='hide' data-event='click'>"+this._get(t,"closeText")+"</button>",c=W?"<div class='ui-datepicker-buttonpane ui-widget-content'>"+(z?l:"")+(this._isInRange(t,o)?"<button type='button' class='ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all' data-handler='today' data-event='click'>"+a+"</button>":"")+(z?"":l)+"</div>":"",u=parseInt(this._get(t,"firstDay"),10),u=isNaN(u)?0:u,h=this._get(t,"showWeek"),d=this._get(t,"dayNames"),p=this._get(t,"dayNamesMin"),f=this._get(t,"monthNames"),m=this._get(t,"monthNamesShort"),g=this._get(t,"beforeShowDay"),v=this._get(t,"showOtherMonths"),y=this._get(t,"selectOtherMonths"),_=this._getDefaultDate(t),b="",w=0;w<V[0];w++){for(k="",this.maxRows=4,S=0;S<V[1];S++){if(C=this._daylightSavingAdjust(new Date(tt,Z,t.selectedDay)),x=" ui-corner-all",E="",X){if(E+="<div class='ui-datepicker-group",1<V[1])switch(S){case 0:E+=" ui-datepicker-group-first",x=" ui-corner-"+(z?"right":"left");break;case V[1]-1:E+=" ui-datepicker-group-last",x=" ui-corner-"+(z?"left":"right");break;default:E+=" ui-datepicker-group-middle",x=""}E+="'>"}for(E+="<div class='ui-datepicker-header ui-widget-header ui-helper-clearfix"+x+"'>"+(/all|left/.test(x)&&0===w?z?r:n:"")+(/all|right/.test(x)&&0===w?z?n:r:"")+this._generateMonthYearHeader(t,Z,tt,Q,J,0<w||0<S,f,m)+"</div><table class='ui-datepicker-calendar'><thead><tr>",D=h?"<th class='ui-datepicker-week-col'>"+this._get(t,"weekHeader")+"</th>":"",T=0;T<7;T++)D+="<th scope='col'"+(5<=(T+u+6)%7?" class='ui-datepicker-week-end'":"")+"><span title='"+d[A=(T+u)%7]+"'>"+p[A]+"</span></th>";for(E+=D+"</tr></thead><tbody>",I=this._getDaysInMonth(tt,Z),tt===t.selectedYear&&Z===t.selectedMonth&&(t.selectedDay=Math.min(t.selectedDay,I)),O=(this._getFirstDayOfMonth(tt,Z)-u+7)%7,P=Math.ceil((O+I)/7),L=X&&this.maxRows>P?this.maxRows:P,this.maxRows=L,M=this._daylightSavingAdjust(new Date(tt,Z,1-O)),N=0;N<L;N++){for(E+="<tr>",R=h?"<td class='ui-datepicker-week-col'>"+this._get(t,"calculateWeek")(M)+"</td>":"",T=0;T<7;T++)U=g?g.apply(t.input?t.input[0]:null,[M]):[!0,""],B=(j=M.getMonth()!==Z)&&!y||!U[0]||Q&&M<Q||J&&J<M,R+="<td class='"+(5<=(T+u+6)%7?" ui-datepicker-week-end":"")+(j?" ui-datepicker-other-month":"")+(M.getTime()===C.getTime()&&Z===t.selectedMonth&&t._keyEvent||_.getTime()===M.getTime()&&_.getTime()===C.getTime()?" "+this._dayOverClass:"")+(B?" "+this._unselectableClass+" ui-state-disabled":"")+(j&&!v?"":" "+U[1]+(M.getTime()===K.getTime()?" "+this._currentClass:"")+(M.getTime()===F.getTime()?" ui-datepicker-today":""))+"'"+(j&&!v||!U[2]?"":" title='"+U[2].replace(/'/g,"&#39;")+"'")+(B?"":" data-handler='selectDay' data-event='click' data-month='"+M.getMonth()+"' data-year='"+M.getFullYear()+"'")+">"+(j&&!v?"&#xa0;":B?"<span class='ui-state-default'>"+M.getDate()+"</span>":"<a class='ui-state-default"+(M.getTime()===F.getTime()?" ui-state-highlight":"")+(M.getTime()===K.getTime()?" ui-state-active":"")+(j?" ui-priority-secondary":"")+"' href='#'>"+M.getDate()+"</a>")+"</td>",M.setDate(M.getDate()+1),M=this._daylightSavingAdjust(M);E+=R+"</tr>"}11<++Z&&(Z=0,tt++),k+=E+="</tbody></table>"+(X?"</div>"+(0<V[0]&&S===V[1]-1?"<div class='ui-datepicker-row-break'></div>":""):"")}b+=k}return b+=c,t._keyEvent=!1,b},_generateMonthYearHeader:function(t,e,i,n,s,r,a,o){var l,c,u,h,d,p,f,m,g=this._get(t,"changeMonth"),v=this._get(t,"changeYear"),y=this._get(t,"showMonthAfterYear"),_="<div class='ui-datepicker-title'>",b="";if(r||!g)b+="<span class='ui-datepicker-month'>"+a[e]+"</span>";else{for(l=n&&n.getFullYear()===i,c=s&&s.getFullYear()===i,b+="<select class='ui-datepicker-month' data-handler='selectMonth' data-event='change'>",u=0;u<12;u++)(!l||u>=n.getMonth())&&(!c||u<=s.getMonth())&&(b+="<option value='"+u+"'"+(u===e?" selected='selected'":"")+">"+o[u]+"</option>");b+="</select>"}if(y||(_+=b+(!r&&g&&v?"":"&#xa0;")),!t.yearshtml)if(t.yearshtml="",r||!v)_+="<span class='ui-datepicker-year'>"+i+"</span>";else{for(h=this._get(t,"yearRange").split(":"),d=(new Date).getFullYear(),f=(p=function(t){var e=t.match(/c[+\-].*/)?i+parseInt(t.substring(1),10):t.match(/[+\-].*/)?d+parseInt(t,10):parseInt(t,10);return isNaN(e)?d:e})(h[0]),m=Math.max(f,p(h[1]||"")),f=n?Math.max(f,n.getFullYear()):f,m=s?Math.min(m,s.getFullYear()):m,t.yearshtml+="<select class='ui-datepicker-year' data-handler='selectYear' data-event='change'>";f<=m;f++)t.yearshtml+="<option value='"+f+"'"+(f===i?" selected='selected'":"")+">"+f+"</option>";t.yearshtml+="</select>",_+=t.yearshtml,t.yearshtml=null}return _+=this._get(t,"yearSuffix"),y&&(_+=(!r&&g&&v?"":"&#xa0;")+b),_+="</div>"},_adjustInstDate:function(t,e,i){var n=t.selectedYear+("Y"===i?e:0),s=t.selectedMonth+("M"===i?e:0),r=Math.min(t.selectedDay,this._getDaysInMonth(n,s))+("D"===i?e:0),a=this._restrictMinMax(t,this._daylightSavingAdjust(new Date(n,s,r)));t.selectedDay=a.getDate(),t.drawMonth=t.selectedMonth=a.getMonth(),t.drawYear=t.selectedYear=a.getFullYear(),"M"!==i&&"Y"!==i||this._notifyChange(t)},_restrictMinMax:function(t,e){var i=this._getMinMaxDate(t,"min"),n=this._getMinMaxDate(t,"max"),s=i&&e<i?i:e;return n&&n<s?n:s},_notifyChange:function(t){var e=this._get(t,"onChangeMonthYear");e&&e.apply(t.input?t.input[0]:null,[t.selectedYear,t.selectedMonth+1,t])},_getNumberOfMonths:function(t){var e=this._get(t,"numberOfMonths");return null==e?[1,1]:"number"==typeof e?[1,e]:e},_getMinMaxDate:function(t,e){return this._determineDate(t,this._get(t,e+"Date"),null)},_getDaysInMonth:function(t,e){return 32-this._daylightSavingAdjust(new Date(t,e,32)).getDate()},_getFirstDayOfMonth:function(t,e){return new Date(t,e,1).getDay()},_canAdjustMonth:function(t,e,i,n){var s=this._getNumberOfMonths(t),r=this._daylightSavingAdjust(new Date(i,n+(e<0?e:s[0]*s[1]),1));return e<0&&r.setDate(this._getDaysInMonth(r.getFullYear(),r.getMonth())),this._isInRange(t,r)},_isInRange:function(t,e){var i,n,s=this._getMinMaxDate(t,"min"),r=this._getMinMaxDate(t,"max"),a=null,o=null,l=this._get(t,"yearRange");return l&&(i=l.split(":"),n=(new Date).getFullYear(),a=parseInt(i[0],10),o=parseInt(i[1],10),i[0].match(/[+\-].*/)&&(a+=n),i[1].match(/[+\-].*/)&&(o+=n)),(!s||e.getTime()>=s.getTime())&&(!r||e.getTime()<=r.getTime())&&(!a||e.getFullYear()>=a)&&(!o||e.getFullYear()<=o)},_getFormatConfig:function(t){var e=this._get(t,"shortYearCutoff");return{shortYearCutoff:e="string"!=typeof e?e:(new Date).getFullYear()%100+parseInt(e,10),dayNamesShort:this._get(t,"dayNamesShort"),dayNames:this._get(t,"dayNames"),monthNamesShort:this._get(t,"monthNamesShort"),monthNames:this._get(t,"monthNames")}},_formatDate:function(t,e,i,n){e||(t.currentDay=t.selectedDay,t.currentMonth=t.selectedMonth,t.currentYear=t.selectedYear);var s=e?"object"==typeof e?e:this._daylightSavingAdjust(new Date(n,i,e)):this._daylightSavingAdjust(new Date(t.currentYear,t.currentMonth,t.currentDay));return this.formatDate(this._get(t,"dateFormat"),s,this._getFormatConfig(t))}}),k.fn.datepicker=function(t){if(!this.length)return this;k.datepicker.initialized||(k(document).on("mousedown",k.datepicker._checkExternalClick),k.datepicker.initialized=!0),0===k("#"+k.datepicker._mainDivId).length&&k("body").append(k.datepicker.dpDiv);var e=Array.prototype.slice.call(arguments,1);return"string"!=typeof t||"isDisabled"!==t&&"getDate"!==t&&"widget"!==t?"option"===t&&2===arguments.length&&"string"==typeof arguments[1]?k.datepicker["_"+t+"Datepicker"].apply(k.datepicker,[this[0]].concat(e)):this.each(function(){"string"==typeof t?k.datepicker["_"+t+"Datepicker"].apply(k.datepicker,[this].concat(e)):k.datepicker._attachDatepicker(this,t)}):k.datepicker["_"+t+"Datepicker"].apply(k.datepicker,[this[0]].concat(e))},k.datepicker=new Z,k.datepicker.initialized=!1,k.datepicker.uuid=(new Date).getTime(),k.datepicker.version="1.12.1";k.datepicker,k.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase());var nt=!1;k(document).on("mouseup",function(){nt=!1});k.widget("ui.mouse",{version:"1.12.1",options:{cancel:"input, textarea, button, select, option",distance:1,delay:0},_mouseInit:function(){var e=this;this.element.on("mousedown."+this.widgetName,function(t){return e._mouseDown(t)}).on("click."+this.widgetName,function(t){if(!0===k.data(t.target,e.widgetName+".preventClickEvent"))return k.removeData(t.target,e.widgetName+".preventClickEvent"),t.stopImmediatePropagation(),!1}),this.started=!1},_mouseDestroy:function(){this.element.off("."+this.widgetName),this._mouseMoveDelegate&&this.document.off("mousemove."+this.widgetName,this._mouseMoveDelegate).off("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(t){if(!nt){this._mouseMoved=!1,this._mouseStarted&&this._mouseUp(t),this._mouseDownEvent=t;var e=this,i=1===t.which,n=!("string"!=typeof this.options.cancel||!t.target.nodeName)&&k(t.target).closest(this.options.cancel).length;return!(i&&!n&&this._mouseCapture(t))||(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){e.mouseDelayMet=!0},this.options.delay)),this._mouseDistanceMet(t)&&this._mouseDelayMet(t)&&(this._mouseStarted=!1!==this._mouseStart(t),!this._mouseStarted)?(t.preventDefault(),!0):(!0===k.data(t.target,this.widgetName+".preventClickEvent")&&k.removeData(t.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(t){return e._mouseMove(t)},this._mouseUpDelegate=function(t){return e._mouseUp(t)},this.document.on("mousemove."+this.widgetName,this._mouseMoveDelegate).on("mouseup."+this.widgetName,this._mouseUpDelegate),t.preventDefault(),nt=!0))}},_mouseMove:function(t){if(this._mouseMoved){if(k.ui.ie&&(!document.documentMode||document.documentMode<9)&&!t.button)return this._mouseUp(t);if(!t.which)if(t.originalEvent.altKey||t.originalEvent.ctrlKey||t.originalEvent.metaKey||t.originalEvent.shiftKey)this.ignoreMissingWhich=!0;else if(!this.ignoreMissingWhich)return this._mouseUp(t)}return(t.which||t.button)&&(this._mouseMoved=!0),this._mouseStarted?(this._mouseDrag(t),t.preventDefault()):(this._mouseDistanceMet(t)&&this._mouseDelayMet(t)&&(this._mouseStarted=!1!==this._mouseStart(this._mouseDownEvent,t),this._mouseStarted?this._mouseDrag(t):this._mouseUp(t)),!this._mouseStarted)},_mouseUp:function(t){this.document.off("mousemove."+this.widgetName,this._mouseMoveDelegate).off("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,t.target===this._mouseDownEvent.target&&k.data(t.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(t)),this._mouseDelayTimer&&(clearTimeout(this._mouseDelayTimer),delete this._mouseDelayTimer),this.ignoreMissingWhich=!1,nt=!1,t.preventDefault()},_mouseDistanceMet:function(t){return Math.max(Math.abs(this._mouseDownEvent.pageX-t.pageX),Math.abs(this._mouseDownEvent.pageY-t.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}}),k.ui.plugin={add:function(t,e,i){var n,s=k.ui[t].prototype;for(n in i)s.plugins[n]=s.plugins[n]||[],s.plugins[n].push([e,i[n]])},call:function(t,e,i,n){var s,r=t.plugins[e];if(r&&(n||t.element[0].parentNode&&11!==t.element[0].parentNode.nodeType))for(s=0;s<r.length;s++)t.options[r[s][0]]&&r[s][1].apply(t.element,i)}},k.ui.safeBlur=function(t){t&&"body"!==t.nodeName.toLowerCase()&&k(t).trigger("blur")};k.widget("ui.draggable",k.ui.mouse,{version:"1.12.1",widgetEventPrefix:"drag",options:{addClasses:!0,appendTo:"parent",axis:!1,connectToSortable:!1,containment:!1,cursor:"auto",cursorAt:!1,grid:!1,handle:!1,helper:"original",iframeFix:!1,opacity:!1,refreshPositions:!1,revert:!1,revertDuration:500,scope:"default",scroll:!0,scrollSensitivity:20,scrollSpeed:20,snap:!1,snapMode:"both",snapTolerance:20,stack:!1,zIndex:!1,drag:null,start:null,stop:null},_create:function(){"original"===this.options.helper&&this._setPositionRelative(),this.options.addClasses&&this._addClass("ui-draggable"),this._setHandleClassName(),this._mouseInit()},_setOption:function(t,e){this._super(t,e),"handle"===t&&(this._removeHandleClassName(),this._setHandleClassName())},_destroy:function(){(this.helper||this.element).is(".ui-draggable-dragging")?this.destroyOnClear=!0:(this._removeHandleClassName(),this._mouseDestroy())},_mouseCapture:function(t){var e=this.options;return!(this.helper||e.disabled||0<k(t.target).closest(".ui-resizable-handle").length)&&(this.handle=this._getHandle(t),!!this.handle&&(this._blurActiveElement(t),this._blockFrames(!0===e.iframeFix?"iframe":e.iframeFix),!0))},_blockFrames:function(t){this.iframeBlocks=this.document.find(t).map(function(){var t=k(this);return k("<div>").css("position","absolute").appendTo(t.parent()).outerWidth(t.outerWidth()).outerHeight(t.outerHeight()).offset(t.offset())[0]})},_unblockFrames:function(){this.iframeBlocks&&(this.iframeBlocks.remove(),delete this.iframeBlocks)},_blurActiveElement:function(t){var e=k.ui.safeActiveElement(this.document[0]);k(t.target).closest(e).length||k.ui.safeBlur(e)},_mouseStart:function(t){var e=this.options;return this.helper=this._createHelper(t),this._addClass(this.helper,"ui-draggable-dragging"),this._cacheHelperProportions(),k.ui.ddmanager&&(k.ui.ddmanager.current=this),this._cacheMargins(),this.cssPosition=this.helper.css("position"),this.scrollParent=this.helper.scrollParent(!0),this.offsetParent=this.helper.offsetParent(),this.hasFixedAncestor=0<this.helper.parents().filter(function(){return"fixed"===k(this).css("position")}).length,this.positionAbs=this.element.offset(),this._refreshOffsets(t),this.originalPosition=this.position=this._generatePosition(t,!1),this.originalPageX=t.pageX,this.originalPageY=t.pageY,e.cursorAt&&this._adjustOffsetFromHelper(e.cursorAt),this._setContainment(),!1===this._trigger("start",t)?(this._clear(),!1):(this._cacheHelperProportions(),k.ui.ddmanager&&!e.dropBehaviour&&k.ui.ddmanager.prepareOffsets(this,t),this._mouseDrag(t,!0),k.ui.ddmanager&&k.ui.ddmanager.dragStart(this,t),!0)},_refreshOffsets:function(t){this.offset={top:this.positionAbs.top-this.margins.top,left:this.positionAbs.left-this.margins.left,scroll:!1,parent:this._getParentOffset(),relative:this._getRelativeOffset()},this.offset.click={left:t.pageX-this.offset.left,top:t.pageY-this.offset.top}},_mouseDrag:function(t,e){if(this.hasFixedAncestor&&(this.offset.parent=this._getParentOffset()),this.position=this._generatePosition(t,!0),this.positionAbs=this._convertPositionTo("absolute"),!e){var i=this._uiHash();if(!1===this._trigger("drag",t,i))return this._mouseUp(new k.Event("mouseup",t)),!1;this.position=i.position}return this.helper[0].style.left=this.position.left+"px",this.helper[0].style.top=this.position.top+"px",k.ui.ddmanager&&k.ui.ddmanager.drag(this,t),!1},_mouseStop:function(t){var e=this,i=!1;return k.ui.ddmanager&&!this.options.dropBehaviour&&(i=k.ui.ddmanager.drop(this,t)),this.dropped&&(i=this.dropped,this.dropped=!1),"invalid"===this.options.revert&&!i||"valid"===this.options.revert&&i||!0===this.options.revert||k.isFunction(this.options.revert)&&this.options.revert.call(this.element,i)?k(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){!1!==e._trigger("stop",t)&&e._clear()}):!1!==this._trigger("stop",t)&&this._clear(),!1},_mouseUp:function(t){return this._unblockFrames(),k.ui.ddmanager&&k.ui.ddmanager.dragStop(this,t),this.handleElement.is(t.target)&&this.element.trigger("focus"),k.ui.mouse.prototype._mouseUp.call(this,t)},cancel:function(){return this.helper.is(".ui-draggable-dragging")?this._mouseUp(new k.Event("mouseup",{target:this.element[0]})):this._clear(),this},_getHandle:function(t){return!this.options.handle||!!k(t.target).closest(this.element.find(this.options.handle)).length},_setHandleClassName:function(){this.handleElement=this.options.handle?this.element.find(this.options.handle):this.element,this._addClass(this.handleElement,"ui-draggable-handle")},_removeHandleClassName:function(){this._removeClass(this.handleElement,"ui-draggable-handle")},_createHelper:function(t){var e=this.options,i=k.isFunction(e.helper),n=i?k(e.helper.apply(this.element[0],[t])):"clone"===e.helper?this.element.clone().removeAttr("id"):this.element;return n.parents("body").length||n.appendTo("parent"===e.appendTo?this.element[0].parentNode:e.appendTo),i&&n[0]===this.element[0]&&this._setPositionRelative(),n[0]===this.element[0]||/(fixed|absolute)/.test(n.css("position"))||n.css("position","absolute"),n},_setPositionRelative:function(){/^(?:r|a|f)/.test(this.element.css("position"))||(this.element[0].style.position="relative")},_adjustOffsetFromHelper:function(t){"string"==typeof t&&(t=t.split(" ")),k.isArray(t)&&(t={left:+t[0],top:+t[1]||0}),"left"in t&&(this.offset.click.left=t.left+this.margins.left),"right"in t&&(this.offset.click.left=this.helperProportions.width-t.right+this.margins.left),"top"in t&&(this.offset.click.top=t.top+this.margins.top),"bottom"in t&&(this.offset.click.top=this.helperProportions.height-t.bottom+this.margins.top)},_isRootNode:function(t){return/(html|body)/i.test(t.tagName)||t===this.document[0]},_getParentOffset:function(){var t=this.offsetParent.offset(),e=this.document[0];return"absolute"===this.cssPosition&&this.scrollParent[0]!==e&&k.contains(this.scrollParent[0],this.offsetParent[0])&&(t.left+=this.scrollParent.scrollLeft(),t.top+=this.scrollParent.scrollTop()),this._isRootNode(this.offsetParent[0])&&(t={top:0,left:0}),{top:t.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:t.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"!==this.cssPosition)return{top:0,left:0};var t=this.element.position(),e=this._isRootNode(this.scrollParent[0]);return{top:t.top-(parseInt(this.helper.css("top"),10)||0)+(e?0:this.scrollParent.scrollTop()),left:t.left-(parseInt(this.helper.css("left"),10)||0)+(e?0:this.scrollParent.scrollLeft())}},_cacheMargins:function(){this.margins={left:parseInt(this.element.css("marginLeft"),10)||0,top:parseInt(this.element.css("marginTop"),10)||0,right:parseInt(this.element.css("marginRight"),10)||0,bottom:parseInt(this.element.css("marginBottom"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var t,e,i,n=this.options,s=this.document[0];this.relativeContainer=null,n.containment?"window"!==n.containment?"document"!==n.containment?n.containment.constructor!==Array?("parent"===n.containment&&(n.containment=this.helper[0].parentNode),(i=(e=k(n.containment))[0])&&(t=/(scroll|auto)/.test(e.css("overflow")),this.containment=[(parseInt(e.css("borderLeftWidth"),10)||0)+(parseInt(e.css("paddingLeft"),10)||0),(parseInt(e.css("borderTopWidth"),10)||0)+(parseInt(e.css("paddingTop"),10)||0),(t?Math.max(i.scrollWidth,i.offsetWidth):i.offsetWidth)-(parseInt(e.css("borderRightWidth"),10)||0)-(parseInt(e.css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,(t?Math.max(i.scrollHeight,i.offsetHeight):i.offsetHeight)-(parseInt(e.css("borderBottomWidth"),10)||0)-(parseInt(e.css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top-this.margins.bottom],this.relativeContainer=e)):this.containment=n.containment:this.containment=[0,0,k(s).width()-this.helperProportions.width-this.margins.left,(k(s).height()||s.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]:this.containment=[k(window).scrollLeft()-this.offset.relative.left-this.offset.parent.left,k(window).scrollTop()-this.offset.relative.top-this.offset.parent.top,k(window).scrollLeft()+k(window).width()-this.helperProportions.width-this.margins.left,k(window).scrollTop()+(k(window).height()||s.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]:this.containment=null},_convertPositionTo:function(t,e){e=e||this.position;var i="absolute"===t?1:-1,n=this._isRootNode(this.scrollParent[0]);return{top:e.top+this.offset.relative.top*i+this.offset.parent.top*i-("fixed"===this.cssPosition?-this.offset.scroll.top:n?0:this.offset.scroll.top)*i,left:e.left+this.offset.relative.left*i+this.offset.parent.left*i-("fixed"===this.cssPosition?-this.offset.scroll.left:n?0:this.offset.scroll.left)*i}},_generatePosition:function(t,e){var i,n,s,r,a=this.options,o=this._isRootNode(this.scrollParent[0]),l=t.pageX,c=t.pageY;return o&&this.offset.scroll||(this.offset.scroll={top:this.scrollParent.scrollTop(),left:this.scrollParent.scrollLeft()}),e&&(this.containment&&(i=this.relativeContainer?(n=this.relativeContainer.offset(),[this.containment[0]+n.left,this.containment[1]+n.top,this.containment[2]+n.left,this.containment[3]+n.top]):this.containment,t.pageX-this.offset.click.left<i[0]&&(l=i[0]+this.offset.click.left),t.pageY-this.offset.click.top<i[1]&&(c=i[1]+this.offset.click.top),t.pageX-this.offset.click.left>i[2]&&(l=i[2]+this.offset.click.left),t.pageY-this.offset.click.top>i[3]&&(c=i[3]+this.offset.click.top)),a.grid&&(s=a.grid[1]?this.originalPageY+Math.round((c-this.originalPageY)/a.grid[1])*a.grid[1]:this.originalPageY,c=i?s-this.offset.click.top>=i[1]||s-this.offset.click.top>i[3]?s:s-this.offset.click.top>=i[1]?s-a.grid[1]:s+a.grid[1]:s,r=a.grid[0]?this.originalPageX+Math.round((l-this.originalPageX)/a.grid[0])*a.grid[0]:this.originalPageX,l=i?r-this.offset.click.left>=i[0]||r-this.offset.click.left>i[2]?r:r-this.offset.click.left>=i[0]?r-a.grid[0]:r+a.grid[0]:r),"y"===a.axis&&(l=this.originalPageX),"x"===a.axis&&(c=this.originalPageY)),{top:c-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.offset.scroll.top:o?0:this.offset.scroll.top),left:l-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.offset.scroll.left:o?0:this.offset.scroll.left)}},_clear:function(){this._removeClass(this.helper,"ui-draggable-dragging"),this.helper[0]===this.element[0]||this.cancelHelperRemoval||this.helper.remove(),this.helper=null,this.cancelHelperRemoval=!1,this.destroyOnClear&&this.destroy()},_trigger:function(t,e,i){return i=i||this._uiHash(),k.ui.plugin.call(this,t,[e,i,this],!0),/^(drag|start|stop)/.test(t)&&(this.positionAbs=this._convertPositionTo("absolute"),i.offset=this.positionAbs),k.Widget.prototype._trigger.call(this,t,e,i)},plugins:{},_uiHash:function(){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}}),k.ui.plugin.add("draggable","connectToSortable",{start:function(e,t,i){var n=k.extend({},t,{item:i.element});i.sortables=[],k(i.options.connectToSortable).each(function(){var t=k(this).sortable("instance");t&&!t.options.disabled&&(i.sortables.push(t),t.refreshPositions(),t._trigger("activate",e,n))})},stop:function(e,t,i){var n=k.extend({},t,{item:i.element});i.cancelHelperRemoval=!1,k.each(i.sortables,function(){var t=this;t.isOver?(t.isOver=0,i.cancelHelperRemoval=!0,t.cancelHelperRemoval=!1,t._storedCSS={position:t.placeholder.css("position"),top:t.placeholder.css("top"),left:t.placeholder.css("left")},t._mouseStop(e),t.options.helper=t.options._helper):(t.cancelHelperRemoval=!0,t._trigger("deactivate",e,n))})},drag:function(i,n,s){k.each(s.sortables,function(){var t=!1,e=this;e.positionAbs=s.positionAbs,e.helperProportions=s.helperProportions,e.offset.click=s.offset.click,e._intersectsWith(e.containerCache)&&(t=!0,k.each(s.sortables,function(){return this.positionAbs=s.positionAbs,this.helperProportions=s.helperProportions,this.offset.click=s.offset.click,this!==e&&this._intersectsWith(this.containerCache)&&k.contains(e.element[0],this.element[0])&&(t=!1),t})),t?(e.isOver||(e.isOver=1,s._parent=n.helper.parent(),e.currentItem=n.helper.appendTo(e.element).data("ui-sortable-item",!0),e.options._helper=e.options.helper,e.options.helper=function(){return n.helper[0]},i.target=e.currentItem[0],e._mouseCapture(i,!0),e._mouseStart(i,!0,!0),e.offset.click.top=s.offset.click.top,e.offset.click.left=s.offset.click.left,e.offset.parent.left-=s.offset.parent.left-e.offset.parent.left,e.offset.parent.top-=s.offset.parent.top-e.offset.parent.top,s._trigger("toSortable",i),s.dropped=e.element,k.each(s.sortables,function(){this.refreshPositions()}),s.currentItem=s.element,e.fromOutside=s),e.currentItem&&(e._mouseDrag(i),n.position=e.position)):e.isOver&&(e.isOver=0,e.cancelHelperRemoval=!0,e.options._revert=e.options.revert,e.options.revert=!1,e._trigger("out",i,e._uiHash(e)),e._mouseStop(i,!0),e.options.revert=e.options._revert,e.options.helper=e.options._helper,e.placeholder&&e.placeholder.remove(),n.helper.appendTo(s._parent),s._refreshOffsets(i),n.position=s._generatePosition(i,!0),s._trigger("fromSortable",i),s.dropped=!1,k.each(s.sortables,function(){this.refreshPositions()}))})}}),k.ui.plugin.add("draggable","cursor",{start:function(t,e,i){var n=k("body"),s=i.options;n.css("cursor")&&(s._cursor=n.css("cursor")),n.css("cursor",s.cursor)},stop:function(t,e,i){var n=i.options;n._cursor&&k("body").css("cursor",n._cursor)}}),k.ui.plugin.add("draggable","opacity",{start:function(t,e,i){var n=k(e.helper),s=i.options;n.css("opacity")&&(s._opacity=n.css("opacity")),n.css("opacity",s.opacity)},stop:function(t,e,i){var n=i.options;n._opacity&&k(e.helper).css("opacity",n._opacity)}}),k.ui.plugin.add("draggable","scroll",{start:function(t,e,i){i.scrollParentNotHidden||(i.scrollParentNotHidden=i.helper.scrollParent(!1)),i.scrollParentNotHidden[0]!==i.document[0]&&"HTML"!==i.scrollParentNotHidden[0].tagName&&(i.overflowOffset=i.scrollParentNotHidden.offset())},drag:function(t,e,i){var n=i.options,s=!1,r=i.scrollParentNotHidden[0],a=i.document[0];r!==a&&"HTML"!==r.tagName?(n.axis&&"x"===n.axis||(i.overflowOffset.top+r.offsetHeight-t.pageY<n.scrollSensitivity?r.scrollTop=s=r.scrollTop+n.scrollSpeed:t.pageY-i.overflowOffset.top<n.scrollSensitivity&&(r.scrollTop=s=r.scrollTop-n.scrollSpeed)),n.axis&&"y"===n.axis||(i.overflowOffset.left+r.offsetWidth-t.pageX<n.scrollSensitivity?r.scrollLeft=s=r.scrollLeft+n.scrollSpeed:t.pageX-i.overflowOffset.left<n.scrollSensitivity&&(r.scrollLeft=s=r.scrollLeft-n.scrollSpeed))):(n.axis&&"x"===n.axis||(t.pageY-k(a).scrollTop()<n.scrollSensitivity?s=k(a).scrollTop(k(a).scrollTop()-n.scrollSpeed):k(window).height()-(t.pageY-k(a).scrollTop())<n.scrollSensitivity&&(s=k(a).scrollTop(k(a).scrollTop()+n.scrollSpeed))),n.axis&&"y"===n.axis||(t.pageX-k(a).scrollLeft()<n.scrollSensitivity?s=k(a).scrollLeft(k(a).scrollLeft()-n.scrollSpeed):k(window).width()-(t.pageX-k(a).scrollLeft())<n.scrollSensitivity&&(s=k(a).scrollLeft(k(a).scrollLeft()+n.scrollSpeed)))),!1!==s&&k.ui.ddmanager&&!n.dropBehaviour&&k.ui.ddmanager.prepareOffsets(i,t)}}),k.ui.plugin.add("draggable","snap",{start:function(t,e,i){var n=i.options;i.snapElements=[],k(n.snap.constructor!==String?n.snap.items||":data(ui-draggable)":n.snap).each(function(){var t=k(this),e=t.offset();this!==i.element[0]&&i.snapElements.push({item:this,width:t.outerWidth(),height:t.outerHeight(),top:e.top,left:e.left})})},drag:function(t,e,i){var n,s,r,a,o,l,c,u,h,d,p=i.options,f=p.snapTolerance,m=e.offset.left,g=m+i.helperProportions.width,v=e.offset.top,y=v+i.helperProportions.height;for(h=i.snapElements.length-1;0<=h;h--)l=(o=i.snapElements[h].left-i.margins.left)+i.snapElements[h].width,u=(c=i.snapElements[h].top-i.margins.top)+i.snapElements[h].height,g<o-f||l+f<m||y<c-f||u+f<v||!k.contains(i.snapElements[h].item.ownerDocument,i.snapElements[h].item)?(i.snapElements[h].snapping&&i.options.snap.release&&i.options.snap.release.call(i.element,t,k.extend(i._uiHash(),{snapItem:i.snapElements[h].item})),i.snapElements[h].snapping=!1):("inner"!==p.snapMode&&(n=Math.abs(c-y)<=f,s=Math.abs(u-v)<=f,r=Math.abs(o-g)<=f,a=Math.abs(l-m)<=f,n&&(e.position.top=i._convertPositionTo("relative",{top:c-i.helperProportions.height,left:0}).top),s&&(e.position.top=i._convertPositionTo("relative",{top:u,left:0}).top),r&&(e.position.left=i._convertPositionTo("relative",{top:0,left:o-i.helperProportions.width}).left),a&&(e.position.left=i._convertPositionTo("relative",{top:0,left:l}).left)),d=n||s||r||a,"outer"!==p.snapMode&&(n=Math.abs(c-v)<=f,s=Math.abs(u-y)<=f,r=Math.abs(o-m)<=f,a=Math.abs(l-g)<=f,n&&(e.position.top=i._convertPositionTo("relative",{top:c,left:0}).top),s&&(e.position.top=i._convertPositionTo("relative",{top:u-i.helperProportions.height,left:0}).top),r&&(e.position.left=i._convertPositionTo("relative",{top:0,left:o}).left),a&&(e.position.left=i._convertPositionTo("relative",{top:0,left:l-i.helperProportions.width}).left)),!i.snapElements[h].snapping&&(n||s||r||a||d)&&i.options.snap.snap&&i.options.snap.snap.call(i.element,t,k.extend(i._uiHash(),{snapItem:i.snapElements[h].item})),i.snapElements[h].snapping=n||s||r||a||d)}}),k.ui.plugin.add("draggable","stack",{start:function(t,e,i){var n,s=i.options,r=k.makeArray(k(s.stack)).sort(function(t,e){return(parseInt(k(t).css("zIndex"),10)||0)-(parseInt(k(e).css("zIndex"),10)||0)});r.length&&(n=parseInt(k(r[0]).css("zIndex"),10)||0,k(r).each(function(t){k(this).css("zIndex",n+t)}),this.css("zIndex",n+r.length))}}),k.ui.plugin.add("draggable","zIndex",{start:function(t,e,i){var n=k(e.helper),s=i.options;n.css("zIndex")&&(s._zIndex=n.css("zIndex")),n.css("zIndex",s.zIndex)},stop:function(t,e,i){var n=i.options;n._zIndex&&k(e.helper).css("zIndex",n._zIndex)}});k.ui.draggable;k.widget("ui.resizable",k.ui.mouse,{version:"1.12.1",widgetEventPrefix:"resize",options:{alsoResize:!1,animate:!1,animateDuration:"slow",animateEasing:"swing",aspectRatio:!1,autoHide:!1,classes:{"ui-resizable-se":"ui-icon ui-icon-gripsmall-diagonal-se"},containment:!1,ghost:!1,grid:!1,handles:"e,s,se",helper:!1,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:90,resize:null,start:null,stop:null},_num:function(t){return parseFloat(t)||0},_isNumber:function(t){return!isNaN(parseFloat(t))},_hasScroll:function(t,e){if("hidden"===k(t).css("overflow"))return!1;var i,n=e&&"left"===e?"scrollLeft":"scrollTop";return 0<t[n]||(t[n]=1,i=0<t[n],t[n]=0,i)},_create:function(){var t,e=this.options,i=this;this._addClass("ui-resizable"),k.extend(this,{_aspectRatio:!!e.aspectRatio,aspectRatio:e.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:e.helper||e.ghost||e.animate?e.helper||"ui-resizable-helper":null}),this.element[0].nodeName.match(/^(canvas|textarea|input|select|button|img)$/i)&&(this.element.wrap(k("<div class='ui-wrapper' style='overflow: hidden;'></div>").css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")})),this.element=this.element.parent().data("ui-resizable",this.element.resizable("instance")),this.elementIsWrapper=!0,t={marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom"),marginLeft:this.originalElement.css("marginLeft")},this.element.css(t),this.originalElement.css("margin",0),this.originalResizeStyle=this.originalElement.css("resize"),this.originalElement.css("resize","none"),this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"})),this.originalElement.css(t),this._proportionallyResize()),this._setupHandles(),e.autoHide&&k(this.element).on("mouseenter",function(){e.disabled||(i._removeClass("ui-resizable-autohide"),i._handles.show())}).on("mouseleave",function(){e.disabled||i.resizing||(i._addClass("ui-resizable-autohide"),i._handles.hide())}),this._mouseInit()},_destroy:function(){this._mouseDestroy();function t(t){k(t).removeData("resizable").removeData("ui-resizable").off(".resizable").find(".ui-resizable-handle").remove()}var e;return this.elementIsWrapper&&(t(this.element),e=this.element,this.originalElement.css({position:e.css("position"),width:e.outerWidth(),height:e.outerHeight(),top:e.css("top"),left:e.css("left")}).insertAfter(e),e.remove()),this.originalElement.css("resize",this.originalResizeStyle),t(this.originalElement),this},_setOption:function(t,e){switch(this._super(t,e),t){case"handles":this._removeHandles(),this._setupHandles()}},_setupHandles:function(){var t,e,i,n,s,r=this.options,a=this;if(this.handles=r.handles||(k(".ui-resizable-handle",this.element).length?{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"}:"e,s,se"),this._handles=k(),this.handles.constructor===String)for("all"===this.handles&&(this.handles="n,e,s,w,se,sw,ne,nw"),i=this.handles.split(","),this.handles={},e=0;e<i.length;e++)n="ui-resizable-"+(t=k.trim(i[e])),s=k("<div>"),this._addClass(s,"ui-resizable-handle "+n),s.css({zIndex:r.zIndex}),this.handles[t]=".ui-resizable-"+t,this.element.append(s);this._renderAxis=function(t){var e,i,n,s;for(e in t=t||this.element,this.handles)this.handles[e].constructor===String?this.handles[e]=this.element.children(this.handles[e]).first().show():(this.handles[e].jquery||this.handles[e].nodeType)&&(this.handles[e]=k(this.handles[e]),this._on(this.handles[e],{mousedown:a._mouseDown})),this.elementIsWrapper&&this.originalElement[0].nodeName.match(/^(textarea|input|select|button)$/i)&&(i=k(this.handles[e],this.element),s=/sw|ne|nw|se|n|s/.test(e)?i.outerHeight():i.outerWidth(),n=["padding",/ne|nw|n/.test(e)?"Top":/se|sw|s/.test(e)?"Bottom":/^e$/.test(e)?"Right":"Left"].join(""),t.css(n,s),this._proportionallyResize()),this._handles=this._handles.add(this.handles[e])},this._renderAxis(this.element),this._handles=this._handles.add(this.element.find(".ui-resizable-handle")),this._handles.disableSelection(),this._handles.on("mouseover",function(){a.resizing||(this.className&&(s=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)),a.axis=s&&s[1]?s[1]:"se")}),r.autoHide&&(this._handles.hide(),this._addClass("ui-resizable-autohide"))},_removeHandles:function(){this._handles.remove()},_mouseCapture:function(t){var e,i,n=!1;for(e in this.handles)(i=k(this.handles[e])[0])!==t.target&&!k.contains(i,t.target)||(n=!0);return!this.options.disabled&&n},_mouseStart:function(t){var e,i,n,s=this.options,r=this.element;return this.resizing=!0,this._renderProxy(),e=this._num(this.helper.css("left")),i=this._num(this.helper.css("top")),s.containment&&(e+=k(s.containment).scrollLeft()||0,i+=k(s.containment).scrollTop()||0),this.offset=this.helper.offset(),this.position={left:e,top:i},this.size=this._helper?{width:this.helper.width(),height:this.helper.height()}:{width:r.width(),height:r.height()},this.originalSize=this._helper?{width:r.outerWidth(),height:r.outerHeight()}:{width:r.width(),height:r.height()},this.sizeDiff={width:r.outerWidth()-r.width(),height:r.outerHeight()-r.height()},this.originalPosition={left:e,top:i},this.originalMousePosition={left:t.pageX,top:t.pageY},this.aspectRatio="number"==typeof s.aspectRatio?s.aspectRatio:this.originalSize.width/this.originalSize.height||1,n=k(".ui-resizable-"+this.axis).css("cursor"),k("body").css("cursor","auto"===n?this.axis+"-resize":n),this._addClass("ui-resizable-resizing"),this._propagate("start",t),!0},_mouseDrag:function(t){var e,i,n=this.originalMousePosition,s=this.axis,r=t.pageX-n.left||0,a=t.pageY-n.top||0,o=this._change[s];return this._updatePrevProperties(),o&&(e=o.apply(this,[t,r,a]),this._updateVirtualBoundaries(t.shiftKey),(this._aspectRatio||t.shiftKey)&&(e=this._updateRatio(e,t)),e=this._respectSize(e,t),this._updateCache(e),this._propagate("resize",t),i=this._applyChanges(),!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize(),k.isEmptyObject(i)||(this._updatePrevProperties(),this._trigger("resize",t,this.ui()),this._applyChanges())),!1},_mouseStop:function(t){this.resizing=!1;var e,i,n,s,r,a,o,l=this.options,c=this;return this._helper&&(n=(i=(e=this._proportionallyResizeElements).length&&/textarea/i.test(e[0].nodeName))&&this._hasScroll(e[0],"left")?0:c.sizeDiff.height,s=i?0:c.sizeDiff.width,r={width:c.helper.width()-s,height:c.helper.height()-n},a=parseFloat(c.element.css("left"))+(c.position.left-c.originalPosition.left)||null,o=parseFloat(c.element.css("top"))+(c.position.top-c.originalPosition.top)||null,l.animate||this.element.css(k.extend(r,{top:o,left:a})),c.helper.height(c.size.height),c.helper.width(c.size.width),this._helper&&!l.animate&&this._proportionallyResize()),k("body").css("cursor","auto"),this._removeClass("ui-resizable-resizing"),this._propagate("stop",t),this._helper&&this.helper.remove(),!1},_updatePrevProperties:function(){this.prevPosition={top:this.position.top,left:this.position.left},this.prevSize={width:this.size.width,height:this.size.height}},_applyChanges:function(){var t={};return this.position.top!==this.prevPosition.top&&(t.top=this.position.top+"px"),this.position.left!==this.prevPosition.left&&(t.left=this.position.left+"px"),this.size.width!==this.prevSize.width&&(t.width=this.size.width+"px"),this.size.height!==this.prevSize.height&&(t.height=this.size.height+"px"),this.helper.css(t),t},_updateVirtualBoundaries:function(t){var e,i,n,s,r,a=this.options;r={minWidth:this._isNumber(a.minWidth)?a.minWidth:0,maxWidth:this._isNumber(a.maxWidth)?a.maxWidth:1/0,minHeight:this._isNumber(a.minHeight)?a.minHeight:0,maxHeight:this._isNumber(a.maxHeight)?a.maxHeight:1/0},(this._aspectRatio||t)&&(e=r.minHeight*this.aspectRatio,n=r.minWidth/this.aspectRatio,i=r.maxHeight*this.aspectRatio,s=r.maxWidth/this.aspectRatio,e>r.minWidth&&(r.minWidth=e),n>r.minHeight&&(r.minHeight=n),i<r.maxWidth&&(r.maxWidth=i),s<r.maxHeight&&(r.maxHeight=s)),this._vBoundaries=r},_updateCache:function(t){this.offset=this.helper.offset(),this._isNumber(t.left)&&(this.position.left=t.left),this._isNumber(t.top)&&(this.position.top=t.top),this._isNumber(t.height)&&(this.size.height=t.height),this._isNumber(t.width)&&(this.size.width=t.width)},_updateRatio:function(t){var e=this.position,i=this.size,n=this.axis;return this._isNumber(t.height)?t.width=t.height*this.aspectRatio:this._isNumber(t.width)&&(t.height=t.width/this.aspectRatio),"sw"===n&&(t.left=e.left+(i.width-t.width),t.top=null),"nw"===n&&(t.top=e.top+(i.height-t.height),t.left=e.left+(i.width-t.width)),t},_respectSize:function(t){var e=this._vBoundaries,i=this.axis,n=this._isNumber(t.width)&&e.maxWidth&&e.maxWidth<t.width,s=this._isNumber(t.height)&&e.maxHeight&&e.maxHeight<t.height,r=this._isNumber(t.width)&&e.minWidth&&e.minWidth>t.width,a=this._isNumber(t.height)&&e.minHeight&&e.minHeight>t.height,o=this.originalPosition.left+this.originalSize.width,l=this.originalPosition.top+this.originalSize.height,c=/sw|nw|w/.test(i),u=/nw|ne|n/.test(i);return r&&(t.width=e.minWidth),a&&(t.height=e.minHeight),n&&(t.width=e.maxWidth),s&&(t.height=e.maxHeight),r&&c&&(t.left=o-e.minWidth),n&&c&&(t.left=o-e.maxWidth),a&&u&&(t.top=l-e.minHeight),s&&u&&(t.top=l-e.maxHeight),t.width||t.height||t.left||!t.top?t.width||t.height||t.top||!t.left||(t.left=null):t.top=null,t},_getPaddingPlusBorderDimensions:function(t){for(var e=0,i=[],n=[t.css("borderTopWidth"),t.css("borderRightWidth"),t.css("borderBottomWidth"),t.css("borderLeftWidth")],s=[t.css("paddingTop"),t.css("paddingRight"),t.css("paddingBottom"),t.css("paddingLeft")];e<4;e++)i[e]=parseFloat(n[e])||0,i[e]+=parseFloat(s[e])||0;return{height:i[0]+i[2],width:i[1]+i[3]}},_proportionallyResize:function(){if(this._proportionallyResizeElements.length)for(var t,e=0,i=this.helper||this.element;e<this._proportionallyResizeElements.length;e++)t=this._proportionallyResizeElements[e],this.outerDimensions||(this.outerDimensions=this._getPaddingPlusBorderDimensions(t)),t.css({height:i.height()-this.outerDimensions.height||0,width:i.width()-this.outerDimensions.width||0})},_renderProxy:function(){var t=this.element,e=this.options;this.elementOffset=t.offset(),this._helper?(this.helper=this.helper||k("<div style='overflow:hidden;'></div>"),this._addClass(this.helper,this._helper),this.helper.css({width:this.element.outerWidth(),height:this.element.outerHeight(),position:"absolute",left:this.elementOffset.left+"px",top:this.elementOffset.top+"px",zIndex:++e.zIndex}),this.helper.appendTo("body").disableSelection()):this.helper=this.element},_change:{e:function(t,e){return{width:this.originalSize.width+e}},w:function(t,e){var i=this.originalSize;return{left:this.originalPosition.left+e,width:i.width-e}},n:function(t,e,i){var n=this.originalSize;return{top:this.originalPosition.top+i,height:n.height-i}},s:function(t,e,i){return{height:this.originalSize.height+i}},se:function(t,e,i){return k.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[t,e,i]))},sw:function(t,e,i){return k.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[t,e,i]))},ne:function(t,e,i){return k.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[t,e,i]))},nw:function(t,e,i){return k.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[t,e,i]))}},_propagate:function(t,e){k.ui.plugin.call(this,t,[e,this.ui()]),"resize"!==t&&this._trigger(t,e,this.ui())},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}}),k.ui.plugin.add("resizable","animate",{stop:function(e){var i=k(this).resizable("instance"),t=i.options,n=i._proportionallyResizeElements,s=n.length&&/textarea/i.test(n[0].nodeName),r=s&&i._hasScroll(n[0],"left")?0:i.sizeDiff.height,a=s?0:i.sizeDiff.width,o={width:i.size.width-a,height:i.size.height-r},l=parseFloat(i.element.css("left"))+(i.position.left-i.originalPosition.left)||null,c=parseFloat(i.element.css("top"))+(i.position.top-i.originalPosition.top)||null;i.element.animate(k.extend(o,c&&l?{top:c,left:l}:{}),{duration:t.animateDuration,easing:t.animateEasing,step:function(){var t={width:parseFloat(i.element.css("width")),height:parseFloat(i.element.css("height")),top:parseFloat(i.element.css("top")),left:parseFloat(i.element.css("left"))};n&&n.length&&k(n[0]).css({width:t.width,height:t.height}),i._updateCache(t),i._propagate("resize",e)}})}}),k.ui.plugin.add("resizable","containment",{start:function(){var i,n,t,e,s,r,a,o=k(this).resizable("instance"),l=o.options,c=o.element,u=l.containment,h=u instanceof k?u.get(0):/parent/.test(u)?c.parent().get(0):u;h&&(o.containerElement=k(h),/document/.test(u)||u===document?(o.containerOffset={left:0,top:0},o.containerPosition={left:0,top:0},o.parentData={element:k(document),left:0,top:0,width:k(document).width(),height:k(document).height()||document.body.parentNode.scrollHeight}):(i=k(h),n=[],k(["Top","Right","Left","Bottom"]).each(function(t,e){n[t]=o._num(i.css("padding"+e))}),o.containerOffset=i.offset(),o.containerPosition=i.position(),o.containerSize={height:i.innerHeight()-n[3],width:i.innerWidth()-n[1]},t=o.containerOffset,e=o.containerSize.height,s=o.containerSize.width,r=o._hasScroll(h,"left")?h.scrollWidth:s,a=o._hasScroll(h)?h.scrollHeight:e,o.parentData={element:h,left:t.left,top:t.top,width:r,height:a}))},resize:function(t){var e,i,n,s,r=k(this).resizable("instance"),a=r.options,o=r.containerOffset,l=r.position,c=r._aspectRatio||t.shiftKey,u={top:0,left:0},h=r.containerElement,d=!0;h[0]!==document&&/static/.test(h.css("position"))&&(u=o),l.left<(r._helper?o.left:0)&&(r.size.width=r.size.width+(r._helper?r.position.left-o.left:r.position.left-u.left),c&&(r.size.height=r.size.width/r.aspectRatio,d=!1),r.position.left=a.helper?o.left:0),l.top<(r._helper?o.top:0)&&(r.size.height=r.size.height+(r._helper?r.position.top-o.top:r.position.top),c&&(r.size.width=r.size.height*r.aspectRatio,d=!1),r.position.top=r._helper?o.top:0),n=r.containerElement.get(0)===r.element.parent().get(0),s=/relative|absolute/.test(r.containerElement.css("position")),n&&s?(r.offset.left=r.parentData.left+r.position.left,r.offset.top=r.parentData.top+r.position.top):(r.offset.left=r.element.offset().left,r.offset.top=r.element.offset().top),e=Math.abs(r.sizeDiff.width+(r._helper?r.offset.left-u.left:r.offset.left-o.left)),i=Math.abs(r.sizeDiff.height+(r._helper?r.offset.top-u.top:r.offset.top-o.top)),e+r.size.width>=r.parentData.width&&(r.size.width=r.parentData.width-e,c&&(r.size.height=r.size.width/r.aspectRatio,d=!1)),i+r.size.height>=r.parentData.height&&(r.size.height=r.parentData.height-i,c&&(r.size.width=r.size.height*r.aspectRatio,d=!1)),d||(r.position.left=r.prevPosition.left,r.position.top=r.prevPosition.top,r.size.width=r.prevSize.width,r.size.height=r.prevSize.height)},stop:function(){var t=k(this).resizable("instance"),e=t.options,i=t.containerOffset,n=t.containerPosition,s=t.containerElement,r=k(t.helper),a=r.offset(),o=r.outerWidth()-t.sizeDiff.width,l=r.outerHeight()-t.sizeDiff.height;t._helper&&!e.animate&&/relative/.test(s.css("position"))&&k(this).css({left:a.left-n.left-i.left,width:o,height:l}),t._helper&&!e.animate&&/static/.test(s.css("position"))&&k(this).css({left:a.left-n.left-i.left,width:o,height:l})}}),k.ui.plugin.add("resizable","alsoResize",{start:function(){var t=k(this).resizable("instance").options;k(t.alsoResize).each(function(){var t=k(this);t.data("ui-resizable-alsoresize",{width:parseFloat(t.width()),height:parseFloat(t.height()),left:parseFloat(t.css("left")),top:parseFloat(t.css("top"))})})},resize:function(t,i){var e=k(this).resizable("instance"),n=e.options,s=e.originalSize,r=e.originalPosition,a={height:e.size.height-s.height||0,width:e.size.width-s.width||0,top:e.position.top-r.top||0,left:e.position.left-r.left||0};k(n.alsoResize).each(function(){var t=k(this),n=k(this).data("ui-resizable-alsoresize"),s={},e=t.parents(i.originalElement[0]).length?["width","height"]:["width","height","top","left"];k.each(e,function(t,e){var i=(n[e]||0)+(a[e]||0);i&&0<=i&&(s[e]=i||null)}),t.css(s)})},stop:function(){k(this).removeData("ui-resizable-alsoresize")}}),k.ui.plugin.add("resizable","ghost",{start:function(){var t=k(this).resizable("instance"),e=t.size;t.ghost=t.originalElement.clone(),t.ghost.css({opacity:.25,display:"block",position:"relative",height:e.height,width:e.width,margin:0,left:0,top:0}),t._addClass(t.ghost,"ui-resizable-ghost"),!1!==k.uiBackCompat&&"string"==typeof t.options.ghost&&t.ghost.addClass(this.options.ghost),t.ghost.appendTo(t.helper)},resize:function(){var t=k(this).resizable("instance");t.ghost&&t.ghost.css({position:"relative",height:t.size.height,width:t.size.width})},stop:function(){var t=k(this).resizable("instance");t.ghost&&t.helper&&t.helper.get(0).removeChild(t.ghost.get(0))}}),k.ui.plugin.add("resizable","grid",{resize:function(){var t,e=k(this).resizable("instance"),i=e.options,n=e.size,s=e.originalSize,r=e.originalPosition,a=e.axis,o="number"==typeof i.grid?[i.grid,i.grid]:i.grid,l=o[0]||1,c=o[1]||1,u=Math.round((n.width-s.width)/l)*l,h=Math.round((n.height-s.height)/c)*c,d=s.width+u,p=s.height+h,f=i.maxWidth&&i.maxWidth<d,m=i.maxHeight&&i.maxHeight<p,g=i.minWidth&&i.minWidth>d,v=i.minHeight&&i.minHeight>p;i.grid=o,g&&(d+=l),v&&(p+=c),f&&(d-=l),m&&(p-=c),/^(se|s|e)$/.test(a)?(e.size.width=d,e.size.height=p):/^(ne)$/.test(a)?(e.size.width=d,e.size.height=p,e.position.top=r.top-h):/^(sw)$/.test(a)?(e.size.width=d,e.size.height=p,e.position.left=r.left-u):((p-c<=0||d-l<=0)&&(t=e._getPaddingPlusBorderDimensions(this)),0<p-c?(e.size.height=p,e.position.top=r.top-h):(p=c-t.height,e.size.height=p,e.position.top=r.top+s.height-p),0<d-l?(e.size.width=d,e.position.left=r.left-u):(d=l-t.width,e.size.width=d,e.position.left=r.left+s.width-d))}});k.ui.resizable;k.widget("ui.dialog",{version:"1.12.1",options:{appendTo:"body",autoOpen:!0,buttons:[],classes:{"ui-dialog":"ui-corner-all","ui-dialog-titlebar":"ui-corner-all"},closeOnEscape:!0,closeText:"Close",draggable:!0,hide:null,height:"auto",maxHeight:null,maxWidth:null,minHeight:150,minWidth:150,modal:!1,position:{my:"center",at:"center",of:window,collision:"fit",using:function(t){var e=k(this).css(t).offset().top;e<0&&k(this).css("top",t.top-e)}},resizable:!0,show:null,title:null,width:300,beforeClose:null,close:null,drag:null,dragStart:null,dragStop:null,focus:null,open:null,resize:null,resizeStart:null,resizeStop:null},sizeRelatedOptions:{buttons:!0,height:!0,maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0,width:!0},resizableRelatedOptions:{maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0},_create:function(){this.originalCss={display:this.element[0].style.display,width:this.element[0].style.width,minHeight:this.element[0].style.minHeight,maxHeight:this.element[0].style.maxHeight,height:this.element[0].style.height},this.originalPosition={parent:this.element.parent(),index:this.element.parent().children().index(this.element)},this.originalTitle=this.element.attr("title"),null==this.options.title&&null!=this.originalTitle&&(this.options.title=this.originalTitle),this.options.disabled&&(this.options.disabled=!1),this._createWrapper(),this.element.show().removeAttr("title").appendTo(this.uiDialog),this._addClass("ui-dialog-content","ui-widget-content"),this._createTitlebar(),this._createButtonPane(),this.options.draggable&&k.fn.draggable&&this._makeDraggable(),this.options.resizable&&k.fn.resizable&&this._makeResizable(),this._isOpen=!1,this._trackFocus()},_init:function(){this.options.autoOpen&&this.open()},_appendTo:function(){var t=this.options.appendTo;return t&&(t.jquery||t.nodeType)?k(t):this.document.find(t||"body").eq(0)},_destroy:function(){var t,e=this.originalPosition;this._untrackInstance(),this._destroyOverlay(),this.element.removeUniqueId().css(this.originalCss).detach(),this.uiDialog.remove(),this.originalTitle&&this.element.attr("title",this.originalTitle),(t=e.parent.children().eq(e.index)).length&&t[0]!==this.element[0]?t.before(this.element):e.parent.append(this.element)},widget:function(){return this.uiDialog},disable:k.noop,enable:k.noop,close:function(t){var e=this;this._isOpen&&!1!==this._trigger("beforeClose",t)&&(this._isOpen=!1,this._focusedElement=null,this._destroyOverlay(),this._untrackInstance(),this.opener.filter(":focusable").trigger("focus").length||k.ui.safeBlur(k.ui.safeActiveElement(this.document[0])),this._hide(this.uiDialog,this.options.hide,function(){e._trigger("close",t)}))},isOpen:function(){return this._isOpen},moveToTop:function(){this._moveToTop()},_moveToTop:function(t,e){var i=!1,n=this.uiDialog.siblings(".ui-front:visible").map(function(){return+k(this).css("z-index")}).get(),s=Math.max.apply(null,n);return s>=+this.uiDialog.css("z-index")&&(this.uiDialog.css("z-index",s+1),i=!0),i&&!e&&this._trigger("focus",t),i},open:function(){var t=this;this._isOpen?this._moveToTop()&&this._focusTabbable():(this._isOpen=!0,this.opener=k(k.ui.safeActiveElement(this.document[0])),this._size(),this._position(),this._createOverlay(),this._moveToTop(null,!0),this.overlay&&this.overlay.css("z-index",this.uiDialog.css("z-index")-1),this._show(this.uiDialog,this.options.show,function(){t._focusTabbable(),t._trigger("focus")}),this._makeFocusTarget(),this._trigger("open"))},_focusTabbable:function(){var t=this._focusedElement;(t=t||this.element.find("[autofocus]")).length||(t=this.element.find(":tabbable")),t.length||(t=this.uiDialogButtonPane.find(":tabbable")),t.length||(t=this.uiDialogTitlebarClose.filter(":tabbable")),t.length||(t=this.uiDialog),t.eq(0).trigger("focus")},_keepFocus:function(t){function e(){var t=k.ui.safeActiveElement(this.document[0]);this.uiDialog[0]===t||k.contains(this.uiDialog[0],t)||this._focusTabbable()}t.preventDefault(),e.call(this),this._delay(e)},_createWrapper:function(){this.uiDialog=k("<div>").hide().attr({tabIndex:-1,role:"dialog"}).appendTo(this._appendTo()),this._addClass(this.uiDialog,"ui-dialog","ui-widget ui-widget-content ui-front"),this._on(this.uiDialog,{keydown:function(t){if(this.options.closeOnEscape&&!t.isDefaultPrevented()&&t.keyCode&&t.keyCode===k.ui.keyCode.ESCAPE)return t.preventDefault(),void this.close(t);if(t.keyCode===k.ui.keyCode.TAB&&!t.isDefaultPrevented()){var e=this.uiDialog.find(":tabbable"),i=e.filter(":first"),n=e.filter(":last");t.target!==n[0]&&t.target!==this.uiDialog[0]||t.shiftKey?t.target!==i[0]&&t.target!==this.uiDialog[0]||!t.shiftKey||(this._delay(function(){n.trigger("focus")}),t.preventDefault()):(this._delay(function(){i.trigger("focus")}),t.preventDefault())}},mousedown:function(t){this._moveToTop(t)&&this._focusTabbable()}}),this.element.find("[aria-describedby]").length||this.uiDialog.attr({"aria-describedby":this.element.uniqueId().attr("id")})},_createTitlebar:function(){var t;this.uiDialogTitlebar=k("<div>"),this._addClass(this.uiDialogTitlebar,"ui-dialog-titlebar","ui-widget-header ui-helper-clearfix"),this._on(this.uiDialogTitlebar,{mousedown:function(t){k(t.target).closest(".ui-dialog-titlebar-close")||this.uiDialog.trigger("focus")}}),this.uiDialogTitlebarClose=k("<button type='button'></button>").button({label:k("<a>").text(this.options.closeText).html(),icon:"ui-icon-closethick",showLabel:!1}).appendTo(this.uiDialogTitlebar),this._addClass(this.uiDialogTitlebarClose,"ui-dialog-titlebar-close"),this._on(this.uiDialogTitlebarClose,{click:function(t){t.preventDefault(),this.close(t)}}),t=k("<span>").uniqueId().prependTo(this.uiDialogTitlebar),this._addClass(t,"ui-dialog-title"),this._title(t),this.uiDialogTitlebar.prependTo(this.uiDialog),this.uiDialog.attr({"aria-labelledby":t.attr("id")})},_title:function(t){this.options.title?t.text(this.options.title):t.html("&#160;")},_createButtonPane:function(){this.uiDialogButtonPane=k("<div>"),this._addClass(this.uiDialogButtonPane,"ui-dialog-buttonpane","ui-widget-content ui-helper-clearfix"),this.uiButtonSet=k("<div>").appendTo(this.uiDialogButtonPane),this._addClass(this.uiButtonSet,"ui-dialog-buttonset"),this._createButtons()},_createButtons:function(){var s=this,t=this.options.buttons;this.uiDialogButtonPane.remove(),this.uiButtonSet.empty(),k.isEmptyObject(t)||k.isArray(t)&&!t.length?this._removeClass(this.uiDialog,"ui-dialog-buttons"):(k.each(t,function(t,e){var i,n;e=k.isFunction(e)?{click:e,text:t}:e,e=k.extend({type:"button"},e),i=e.click,n={icon:e.icon,iconPosition:e.iconPosition,showLabel:e.showLabel,icons:e.icons,text:e.text},delete e.click,delete e.icon,delete e.iconPosition,delete e.showLabel,delete e.icons,"boolean"==typeof e.text&&delete e.text,k("<button></button>",e).button(n).appendTo(s.uiButtonSet).on("click",function(){i.apply(s.element[0],arguments)})}),this._addClass(this.uiDialog,"ui-dialog-buttons"),this.uiDialogButtonPane.appendTo(this.uiDialog))},_makeDraggable:function(){var s=this,r=this.options;function a(t){return{position:t.position,offset:t.offset}}this.uiDialog.draggable({cancel:".ui-dialog-content, .ui-dialog-titlebar-close",handle:".ui-dialog-titlebar",containment:"document",start:function(t,e){s._addClass(k(this),"ui-dialog-dragging"),s._blockFrames(),s._trigger("dragStart",t,a(e))},drag:function(t,e){s._trigger("drag",t,a(e))},stop:function(t,e){var i=e.offset.left-s.document.scrollLeft(),n=e.offset.top-s.document.scrollTop();r.position={my:"left top",at:"left"+(0<=i?"+":"")+i+" top"+(0<=n?"+":"")+n,of:s.window},s._removeClass(k(this),"ui-dialog-dragging"),s._unblockFrames(),s._trigger("dragStop",t,a(e))}})},_makeResizable:function(){var r=this,a=this.options,t=a.resizable,e=this.uiDialog.css("position"),i="string"==typeof t?t:"n,e,s,w,se,sw,ne,nw";function o(t){return{originalPosition:t.originalPosition,originalSize:t.originalSize,position:t.position,size:t.size}}this.uiDialog.resizable({cancel:".ui-dialog-content",containment:"document",alsoResize:this.element,maxWidth:a.maxWidth,maxHeight:a.maxHeight,minWidth:a.minWidth,minHeight:this._minHeight(),handles:i,start:function(t,e){r._addClass(k(this),"ui-dialog-resizing"),r._blockFrames(),r._trigger("resizeStart",t,o(e))},resize:function(t,e){r._trigger("resize",t,o(e))},stop:function(t,e){var i=r.uiDialog.offset(),n=i.left-r.document.scrollLeft(),s=i.top-r.document.scrollTop();a.height=r.uiDialog.height(),a.width=r.uiDialog.width(),a.position={my:"left top",at:"left"+(0<=n?"+":"")+n+" top"+(0<=s?"+":"")+s,of:r.window},r._removeClass(k(this),"ui-dialog-resizing"),r._unblockFrames(),r._trigger("resizeStop",t,o(e))}}).css("position",e)},_trackFocus:function(){this._on(this.widget(),{focusin:function(t){this._makeFocusTarget(),this._focusedElement=k(t.target)}})},_makeFocusTarget:function(){this._untrackInstance(),this._trackingInstances().unshift(this)},_untrackInstance:function(){var t=this._trackingInstances(),e=k.inArray(this,t);-1!==e&&t.splice(e,1)},_trackingInstances:function(){var t=this.document.data("ui-dialog-instances");return t||(t=[],this.document.data("ui-dialog-instances",t)),t},_minHeight:function(){var t=this.options;return"auto"===t.height?t.minHeight:Math.min(t.minHeight,t.height)},_position:function(){var t=this.uiDialog.is(":visible");t||this.uiDialog.show(),this.uiDialog.position(this.options.position),t||this.uiDialog.hide()},_setOptions:function(t){var i=this,n=!1,s={};k.each(t,function(t,e){i._setOption(t,e),t in i.sizeRelatedOptions&&(n=!0),t in i.resizableRelatedOptions&&(s[t]=e)}),n&&(this._size(),this._position()),this.uiDialog.is(":data(ui-resizable)")&&this.uiDialog.resizable("option",s)},_setOption:function(t,e){var i,n,s=this.uiDialog;"disabled"!==t&&(this._super(t,e),"appendTo"===t&&this.uiDialog.appendTo(this._appendTo()),"buttons"===t&&this._createButtons(),"closeText"===t&&this.uiDialogTitlebarClose.button({label:k("<a>").text(""+this.options.closeText).html()}),"draggable"===t&&((i=s.is(":data(ui-draggable)"))&&!e&&s.draggable("destroy"),!i&&e&&this._makeDraggable()),"position"===t&&this._position(),"resizable"===t&&((n=s.is(":data(ui-resizable)"))&&!e&&s.resizable("destroy"),n&&"string"==typeof e&&s.resizable("option","handles",e),n||!1===e||this._makeResizable()),"title"===t&&this._title(this.uiDialogTitlebar.find(".ui-dialog-title")))},_size:function(){var t,e,i,n=this.options;this.element.show().css({width:"auto",minHeight:0,maxHeight:"none",height:0}),n.minWidth>n.width&&(n.width=n.minWidth),t=this.uiDialog.css({height:"auto",width:n.width}).outerHeight(),e=Math.max(0,n.minHeight-t),i="number"==typeof n.maxHeight?Math.max(0,n.maxHeight-t):"none","auto"===n.height?this.element.css({minHeight:e,maxHeight:i,height:"auto"}):this.element.height(Math.max(0,n.height-t)),this.uiDialog.is(":data(ui-resizable)")&&this.uiDialog.resizable("option","minHeight",this._minHeight())},_blockFrames:function(){this.iframeBlocks=this.document.find("iframe").map(function(){var t=k(this);return k("<div>").css({position:"absolute",width:t.outerWidth(),height:t.outerHeight()}).appendTo(t.parent()).offset(t.offset())[0]})},_unblockFrames:function(){this.iframeBlocks&&(this.iframeBlocks.remove(),delete this.iframeBlocks)},_allowInteraction:function(t){return!!k(t.target).closest(".ui-dialog").length||!!k(t.target).closest(".ui-datepicker").length},_createOverlay:function(){if(this.options.modal){var e=!0;this._delay(function(){e=!1}),this.document.data("ui-dialog-overlays")||this._on(this.document,{focusin:function(t){e||this._allowInteraction(t)||(t.preventDefault(),this._trackingInstances()[0]._focusTabbable())}}),this.overlay=k("<div>").appendTo(this._appendTo()),this._addClass(this.overlay,null,"ui-widget-overlay ui-front"),this._on(this.overlay,{mousedown:"_keepFocus"}),this.document.data("ui-dialog-overlays",(this.document.data("ui-dialog-overlays")||0)+1)}},_destroyOverlay:function(){if(this.options.modal&&this.overlay){var t=this.document.data("ui-dialog-overlays")-1;t?this.document.data("ui-dialog-overlays",t):(this._off(this.document,"focusin"),this.document.removeData("ui-dialog-overlays")),this.overlay.remove(),this.overlay=null}}}),!1!==k.uiBackCompat&&k.widget("ui.dialog",k.ui.dialog,{options:{dialogClass:""},_createWrapper:function(){this._super(),this.uiDialog.addClass(this.options.dialogClass)},_setOption:function(t,e){"dialogClass"===t&&this.uiDialog.removeClass(this.options.dialogClass).addClass(e),this._superApply(arguments)}});k.ui.dialog;k.widget("ui.droppable",{version:"1.12.1",widgetEventPrefix:"drop",options:{accept:"*",addClasses:!0,greedy:!1,scope:"default",tolerance:"intersect",activate:null,deactivate:null,drop:null,out:null,over:null},_create:function(){var t,e=this.options,i=e.accept;this.isover=!1,this.isout=!0,this.accept=k.isFunction(i)?i:function(t){return t.is(i)},this.proportions=function(){if(!arguments.length)return t||(t={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight});t=arguments[0]},this._addToManager(e.scope),e.addClasses&&this._addClass("ui-droppable")},_addToManager:function(t){k.ui.ddmanager.droppables[t]=k.ui.ddmanager.droppables[t]||[],k.ui.ddmanager.droppables[t].push(this)},_splice:function(t){for(var e=0;e<t.length;e++)t[e]===this&&t.splice(e,1)},_destroy:function(){var t=k.ui.ddmanager.droppables[this.options.scope];this._splice(t)},_setOption:function(t,e){if("accept"===t)this.accept=k.isFunction(e)?e:function(t){return t.is(e)};else if("scope"===t){var i=k.ui.ddmanager.droppables[this.options.scope];this._splice(i),this._addToManager(e)}this._super(t,e)},_activate:function(t){var e=k.ui.ddmanager.current;this._addActiveClass(),e&&this._trigger("activate",t,this.ui(e))},_deactivate:function(t){var e=k.ui.ddmanager.current;this._removeActiveClass(),e&&this._trigger("deactivate",t,this.ui(e))},_over:function(t){var e=k.ui.ddmanager.current;e&&(e.currentItem||e.element)[0]!==this.element[0]&&this.accept.call(this.element[0],e.currentItem||e.element)&&(this._addHoverClass(),this._trigger("over",t,this.ui(e)))},_out:function(t){var e=k.ui.ddmanager.current;e&&(e.currentItem||e.element)[0]!==this.element[0]&&this.accept.call(this.element[0],e.currentItem||e.element)&&(this._removeHoverClass(),this._trigger("out",t,this.ui(e)))},_drop:function(e,t){var i=t||k.ui.ddmanager.current,n=!1;return!(!i||(i.currentItem||i.element)[0]===this.element[0])&&(this.element.find(":data(ui-droppable)").not(".ui-draggable-dragging").each(function(){var t=k(this).droppable("instance");if(t.options.greedy&&!t.options.disabled&&t.options.scope===i.options.scope&&t.accept.call(t.element[0],i.currentItem||i.element)&&st(i,k.extend(t,{offset:t.element.offset()}),t.options.tolerance,e))return!(n=!0)}),!n&&(!!this.accept.call(this.element[0],i.currentItem||i.element)&&(this._removeActiveClass(),this._removeHoverClass(),this._trigger("drop",e,this.ui(i)),this.element)))},ui:function(t){return{draggable:t.currentItem||t.element,helper:t.helper,position:t.position,offset:t.positionAbs}},_addHoverClass:function(){this._addClass("ui-droppable-hover")},_removeHoverClass:function(){this._removeClass("ui-droppable-hover")},_addActiveClass:function(){this._addClass("ui-droppable-active")},_removeActiveClass:function(){this._removeClass("ui-droppable-active")}});var st=k.ui.intersect=function(t,e,i,n){if(!e.offset)return!1;var s=(t.positionAbs||t.position.absolute).left+t.margins.left,r=(t.positionAbs||t.position.absolute).top+t.margins.top,a=s+t.helperProportions.width,o=r+t.helperProportions.height,l=e.offset.left,c=e.offset.top,u=l+e.proportions().width,h=c+e.proportions().height;switch(i){case"fit":return l<=s&&a<=u&&c<=r&&o<=h;case"intersect":return l<s+t.helperProportions.width/2&&a-t.helperProportions.width/2<u&&c<r+t.helperProportions.height/2&&o-t.helperProportions.height/2<h;case"pointer":return rt(n.pageY,c,e.proportions().height)&&rt(n.pageX,l,e.proportions().width);case"touch":return(c<=r&&r<=h||c<=o&&o<=h||r<c&&h<o)&&(l<=s&&s<=u||l<=a&&a<=u||s<l&&u<a);default:return!1}};function rt(t,e,i){return e<=t&&t<e+i}!(k.ui.ddmanager={current:null,droppables:{default:[]},prepareOffsets:function(t,e){var i,n,s=k.ui.ddmanager.droppables[t.options.scope]||[],r=e?e.type:null,a=(t.currentItem||t.element).find(":data(ui-droppable)").addBack();t:for(i=0;i<s.length;i++)if(!(s[i].options.disabled||t&&!s[i].accept.call(s[i].element[0],t.currentItem||t.element))){for(n=0;n<a.length;n++)if(a[n]===s[i].element[0]){s[i].proportions().height=0;continue t}s[i].visible="none"!==s[i].element.css("display"),s[i].visible&&("mousedown"===r&&s[i]._activate.call(s[i],e),s[i].offset=s[i].element.offset(),s[i].proportions({width:s[i].element[0].offsetWidth,height:s[i].element[0].offsetHeight}))}},drop:function(t,e){var i=!1;return k.each((k.ui.ddmanager.droppables[t.options.scope]||[]).slice(),function(){this.options&&(!this.options.disabled&&this.visible&&st(t,this,this.options.tolerance,e)&&(i=this._drop.call(this,e)||i),!this.options.disabled&&this.visible&&this.accept.call(this.element[0],t.currentItem||t.element)&&(this.isout=!0,this.isover=!1,this._deactivate.call(this,e)))}),i},dragStart:function(t,e){t.element.parentsUntil("body").on("scroll.droppable",function(){t.options.refreshPositions||k.ui.ddmanager.prepareOffsets(t,e)})},drag:function(r,a){r.options.refreshPositions&&k.ui.ddmanager.prepareOffsets(r,a),k.each(k.ui.ddmanager.droppables[r.options.scope]||[],function(){if(!this.options.disabled&&!this.greedyChild&&this.visible){var t,e,i,n=st(r,this,this.options.tolerance,a),s=!n&&this.isover?"isout":n&&!this.isover?"isover":null;s&&(this.options.greedy&&(e=this.options.scope,(i=this.element.parents(":data(ui-droppable)").filter(function(){return k(this).droppable("instance").options.scope===e})).length&&((t=k(i[0]).droppable("instance")).greedyChild="isover"===s)),t&&"isover"===s&&(t.isover=!1,t.isout=!0,t._out.call(t,a)),this[s]=!0,this["isout"===s?"isover":"isout"]=!1,this["isover"===s?"_over":"_out"].call(this,a),t&&"isout"===s&&(t.isout=!1,t.isover=!0,t._over.call(t,a)))}})},dragStop:function(t,e){t.element.parentsUntil("body").off("scroll.droppable"),t.options.refreshPositions||k.ui.ddmanager.prepareOffsets(t,e)}})!==k.uiBackCompat&&k.widget("ui.droppable",k.ui.droppable,{options:{hoverClass:!1,activeClass:!1},_addActiveClass:function(){this._super(),this.options.activeClass&&this.element.addClass(this.options.activeClass)},_removeActiveClass:function(){this._super(),this.options.activeClass&&this.element.removeClass(this.options.activeClass)},_addHoverClass:function(){this._super(),this.options.hoverClass&&this.element.addClass(this.options.hoverClass)},_removeHoverClass:function(){this._super(),this.options.hoverClass&&this.element.removeClass(this.options.hoverClass)}});k.ui.droppable,k.widget("ui.progressbar",{version:"1.12.1",options:{classes:{"ui-progressbar":"ui-corner-all","ui-progressbar-value":"ui-corner-left","ui-progressbar-complete":"ui-corner-right"},max:100,value:0,change:null,complete:null},min:0,_create:function(){this.oldValue=this.options.value=this._constrainedValue(),this.element.attr({role:"progressbar","aria-valuemin":this.min}),this._addClass("ui-progressbar","ui-widget ui-widget-content"),this.valueDiv=k("<div>").appendTo(this.element),this._addClass(this.valueDiv,"ui-progressbar-value","ui-widget-header"),this._refreshValue()},_destroy:function(){this.element.removeAttr("role aria-valuemin aria-valuemax aria-valuenow"),this.valueDiv.remove()},value:function(t){if(void 0===t)return this.options.value;this.options.value=this._constrainedValue(t),this._refreshValue()},_constrainedValue:function(t){return void 0===t&&(t=this.options.value),this.indeterminate=!1===t,"number"!=typeof t&&(t=0),!this.indeterminate&&Math.min(this.options.max,Math.max(this.min,t))},_setOptions:function(t){var e=t.value;delete t.value,this._super(t),this.options.value=this._constrainedValue(e),this._refreshValue()},_setOption:function(t,e){"max"===t&&(e=Math.max(this.min,e)),this._super(t,e)},_setOptionDisabled:function(t){this._super(t),this.element.attr("aria-disabled",t),this._toggleClass(null,"ui-state-disabled",!!t)},_percentage:function(){return this.indeterminate?100:100*(this.options.value-this.min)/(this.options.max-this.min)},_refreshValue:function(){var t=this.options.value,e=this._percentage();this.valueDiv.toggle(this.indeterminate||t>this.min).width(e.toFixed(0)+"%"),this._toggleClass(this.valueDiv,"ui-progressbar-complete",null,t===this.options.max)._toggleClass("ui-progressbar-indeterminate",null,this.indeterminate),this.indeterminate?(this.element.removeAttr("aria-valuenow"),this.overlayDiv||(this.overlayDiv=k("<div>").appendTo(this.valueDiv),this._addClass(this.overlayDiv,"ui-progressbar-overlay"))):(this.element.attr({"aria-valuemax":this.options.max,"aria-valuenow":t}),this.overlayDiv&&(this.overlayDiv.remove(),this.overlayDiv=null)),this.oldValue!==t&&(this.oldValue=t,this._trigger("change")),t===this.options.max&&this._trigger("complete")}}),k.widget("ui.selectable",k.ui.mouse,{version:"1.12.1",options:{appendTo:"body",autoRefresh:!0,distance:0,filter:"*",tolerance:"touch",selected:null,selecting:null,start:null,stop:null,unselected:null,unselecting:null},_create:function(){var n=this;this._addClass("ui-selectable"),this.dragged=!1,this.refresh=function(){n.elementPos=k(n.element[0]).offset(),n.selectees=k(n.options.filter,n.element[0]),n._addClass(n.selectees,"ui-selectee"),n.selectees.each(function(){var t=k(this),e=t.offset(),i={left:e.left-n.elementPos.left,top:e.top-n.elementPos.top};k.data(this,"selectable-item",{element:this,$element:t,left:i.left,top:i.top,right:i.left+t.outerWidth(),bottom:i.top+t.outerHeight(),startselected:!1,selected:t.hasClass("ui-selected"),selecting:t.hasClass("ui-selecting"),unselecting:t.hasClass("ui-unselecting")})})},this.refresh(),this._mouseInit(),this.helper=k("<div>"),this._addClass(this.helper,"ui-selectable-helper")},_destroy:function(){this.selectees.removeData("selectable-item"),this._mouseDestroy()},_mouseStart:function(i){var n=this,t=this.options;this.opos=[i.pageX,i.pageY],this.elementPos=k(this.element[0]).offset(),this.options.disabled||(this.selectees=k(t.filter,this.element[0]),this._trigger("start",i),k(t.appendTo).append(this.helper),this.helper.css({left:i.pageX,top:i.pageY,width:0,height:0}),t.autoRefresh&&this.refresh(),this.selectees.filter(".ui-selected").each(function(){var t=k.data(this,"selectable-item");t.startselected=!0,i.metaKey||i.ctrlKey||(n._removeClass(t.$element,"ui-selected"),t.selected=!1,n._addClass(t.$element,"ui-unselecting"),t.unselecting=!0,n._trigger("unselecting",i,{unselecting:t.element}))}),k(i.target).parents().addBack().each(function(){var t,e=k.data(this,"selectable-item");if(e)return t=!i.metaKey&&!i.ctrlKey||!e.$element.hasClass("ui-selected"),n._removeClass(e.$element,t?"ui-unselecting":"ui-selected")._addClass(e.$element,t?"ui-selecting":"ui-unselecting"),e.unselecting=!t,e.selecting=t,(e.selected=t)?n._trigger("selecting",i,{selecting:e.element}):n._trigger("unselecting",i,{unselecting:e.element}),!1}))},_mouseDrag:function(n){if(this.dragged=!0,!this.options.disabled){var t,s=this,r=this.options,a=this.opos[0],o=this.opos[1],l=n.pageX,c=n.pageY;return l<a&&(t=l,l=a,a=t),c<o&&(t=c,c=o,o=t),this.helper.css({left:a,top:o,width:l-a,height:c-o}),this.selectees.each(function(){var t=k.data(this,"selectable-item"),e=!1,i={};t&&t.element!==s.element[0]&&(i.left=t.left+s.elementPos.left,i.right=t.right+s.elementPos.left,i.top=t.top+s.elementPos.top,i.bottom=t.bottom+s.elementPos.top,"touch"===r.tolerance?e=!(i.left>l||i.right<a||i.top>c||i.bottom<o):"fit"===r.tolerance&&(e=i.left>a&&i.right<l&&i.top>o&&i.bottom<c),e?(t.selected&&(s._removeClass(t.$element,"ui-selected"),t.selected=!1),t.unselecting&&(s._removeClass(t.$element,"ui-unselecting"),t.unselecting=!1),t.selecting||(s._addClass(t.$element,"ui-selecting"),t.selecting=!0,s._trigger("selecting",n,{selecting:t.element}))):(t.selecting&&((n.metaKey||n.ctrlKey)&&t.startselected?(s._removeClass(t.$element,"ui-selecting"),t.selecting=!1,s._addClass(t.$element,"ui-selected"),t.selected=!0):(s._removeClass(t.$element,"ui-selecting"),t.selecting=!1,t.startselected&&(s._addClass(t.$element,"ui-unselecting"),t.unselecting=!0),s._trigger("unselecting",n,{unselecting:t.element}))),t.selected&&(n.metaKey||n.ctrlKey||t.startselected||(s._removeClass(t.$element,"ui-selected"),t.selected=!1,s._addClass(t.$element,"ui-unselecting"),t.unselecting=!0,s._trigger("unselecting",n,{unselecting:t.element})))))}),!1}},_mouseStop:function(e){var i=this;return this.dragged=!1,k(".ui-unselecting",this.element[0]).each(function(){var t=k.data(this,"selectable-item");i._removeClass(t.$element,"ui-unselecting"),t.unselecting=!1,t.startselected=!1,i._trigger("unselected",e,{unselected:t.element})}),k(".ui-selecting",this.element[0]).each(function(){var t=k.data(this,"selectable-item");i._removeClass(t.$element,"ui-selecting")._addClass(t.$element,"ui-selected"),t.selecting=!1,t.selected=!0,t.startselected=!0,i._trigger("selected",e,{selected:t.element})}),this._trigger("stop",e),this.helper.remove(),!1}}),k.widget("ui.selectmenu",[k.ui.formResetMixin,{version:"1.12.1",defaultElement:"<select>",options:{appendTo:null,classes:{"ui-selectmenu-button-open":"ui-corner-top","ui-selectmenu-button-closed":"ui-corner-all"},disabled:null,icons:{button:"ui-icon-triangle-1-s"},position:{my:"left top",at:"left bottom",collision:"none"},width:!1,change:null,close:null,focus:null,open:null,select:null},_create:function(){var t=this.element.uniqueId().attr("id");this.ids={element:t,button:t+"-button",menu:t+"-menu"},this._drawButton(),this._drawMenu(),this._bindFormResetHandler(),this._rendered=!1,this.menuItems=k()},_drawButton:function(){var t,e=this,i=this._parseOption(this.element.find("option:selected"),this.element[0].selectedIndex);this.labels=this.element.labels().attr("for",this.ids.button),this._on(this.labels,{click:function(t){this.button.focus(),t.preventDefault()}}),this.element.hide(),this.button=k("<span>",{tabindex:this.options.disabled?-1:0,id:this.ids.button,role:"combobox","aria-expanded":"false","aria-autocomplete":"list","aria-owns":this.ids.menu,"aria-haspopup":"true",title:this.element.attr("title")}).insertAfter(this.element),this._addClass(this.button,"ui-selectmenu-button ui-selectmenu-button-closed","ui-button ui-widget"),t=k("<span>").appendTo(this.button),this._addClass(t,"ui-selectmenu-icon","ui-icon "+this.options.icons.button),this.buttonItem=this._renderButtonItem(i).appendTo(this.button),!1!==this.options.width&&this._resizeButton(),this._on(this.button,this._buttonEvents),this.button.one("focusin",function(){e._rendered||e._refreshMenu()})},_drawMenu:function(){var n=this;this.menu=k("<ul>",{"aria-hidden":"true","aria-labelledby":this.ids.button,id:this.ids.menu}),this.menuWrap=k("<div>").append(this.menu),this._addClass(this.menuWrap,"ui-selectmenu-menu","ui-front"),this.menuWrap.appendTo(this._appendTo()),this.menuInstance=this.menu.menu({classes:{"ui-menu":"ui-corner-bottom"},role:"listbox",select:function(t,e){t.preventDefault(),n._setSelection(),n._select(e.item.data("ui-selectmenu-item"),t)},focus:function(t,e){var i=e.item.data("ui-selectmenu-item");null!=n.focusIndex&&i.index!==n.focusIndex&&(n._trigger("focus",t,{item:i}),n.isOpen||n._select(i,t)),n.focusIndex=i.index,n.button.attr("aria-activedescendant",n.menuItems.eq(i.index).attr("id"))}}).menu("instance"),this.menuInstance._off(this.menu,"mouseleave"),this.menuInstance._closeOnDocumentClick=function(){return!1},this.menuInstance._isDivider=function(){return!1}},refresh:function(){this._refreshMenu(),this.buttonItem.replaceWith(this.buttonItem=this._renderButtonItem(this._getSelectedItem().data("ui-selectmenu-item")||{})),null===this.options.width&&this._resizeButton()},_refreshMenu:function(){var t,e=this.element.find("option");this.menu.empty(),this._parseOptions(e),this._renderMenu(this.menu,this.items),this.menuInstance.refresh(),this.menuItems=this.menu.find("li").not(".ui-selectmenu-optgroup").find(".ui-menu-item-wrapper"),this._rendered=!0,e.length&&(t=this._getSelectedItem(),this.menuInstance.focus(null,t),this._setAria(t.data("ui-selectmenu-item")),this._setOption("disabled",this.element.prop("disabled")))},open:function(t){this.options.disabled||(this._rendered?(this._removeClass(this.menu.find(".ui-state-active"),null,"ui-state-active"),this.menuInstance.focus(null,this._getSelectedItem())):this._refreshMenu(),this.menuItems.length&&(this.isOpen=!0,this._toggleAttr(),this._resizeMenu(),this._position(),this._on(this.document,this._documentClick),this._trigger("open",t)))},_position:function(){this.menuWrap.position(k.extend({of:this.button},this.options.position))},close:function(t){this.isOpen&&(this.isOpen=!1,this._toggleAttr(),this.range=null,this._off(this.document),this._trigger("close",t))},widget:function(){return this.button},menuWidget:function(){return this.menu},_renderButtonItem:function(t){var e=k("<span>");return this._setText(e,t.label),this._addClass(e,"ui-selectmenu-text"),e},_renderMenu:function(n,t){var s=this,r="";k.each(t,function(t,e){var i;e.optgroup!==r&&(i=k("<li>",{text:e.optgroup}),s._addClass(i,"ui-selectmenu-optgroup","ui-menu-divider"+(e.element.parent("optgroup").prop("disabled")?" ui-state-disabled":"")),i.appendTo(n),r=e.optgroup),s._renderItemData(n,e)})},_renderItemData:function(t,e){return this._renderItem(t,e).data("ui-selectmenu-item",e)},_renderItem:function(t,e){var i=k("<li>"),n=k("<div>",{title:e.element.attr("title")});return e.disabled&&this._addClass(i,null,"ui-state-disabled"),this._setText(n,e.label),i.append(n).appendTo(t)},_setText:function(t,e){e?t.text(e):t.html("&#160;")},_move:function(t,e){var i,n,s=".ui-menu-item";this.isOpen?i=this.menuItems.eq(this.focusIndex).parent("li"):(i=this.menuItems.eq(this.element[0].selectedIndex).parent("li"),s+=":not(.ui-state-disabled)"),(n="first"===t||"last"===t?i["first"===t?"prevAll":"nextAll"](s).eq(-1):i[t+"All"](s).eq(0)).length&&this.menuInstance.focus(e,n)},_getSelectedItem:function(){return this.menuItems.eq(this.element[0].selectedIndex).parent("li")},_toggle:function(t){this[this.isOpen?"close":"open"](t)},_setSelection:function(){var t;this.range&&(window.getSelection?((t=window.getSelection()).removeAllRanges(),t.addRange(this.range)):this.range.select(),this.button.focus())},_documentClick:{mousedown:function(t){this.isOpen&&(k(t.target).closest(".ui-selectmenu-menu, #"+k.ui.escapeSelector(this.ids.button)).length||this.close(t))}},_buttonEvents:{mousedown:function(){var t;window.getSelection?(t=window.getSelection()).rangeCount&&(this.range=t.getRangeAt(0)):this.range=document.selection.createRange()},click:function(t){this._setSelection(),this._toggle(t)},keydown:function(t){var e=!0;switch(t.keyCode){case k.ui.keyCode.TAB:case k.ui.keyCode.ESCAPE:this.close(t),e=!1;break;case k.ui.keyCode.ENTER:this.isOpen&&this._selectFocusedItem(t);break;case k.ui.keyCode.UP:t.altKey?this._toggle(t):this._move("prev",t);break;case k.ui.keyCode.DOWN:t.altKey?this._toggle(t):this._move("next",t);break;case k.ui.keyCode.SPACE:this.isOpen?this._selectFocusedItem(t):this._toggle(t);break;case k.ui.keyCode.LEFT:this._move("prev",t);break;case k.ui.keyCode.RIGHT:this._move("next",t);break;case k.ui.keyCode.HOME:case k.ui.keyCode.PAGE_UP:this._move("first",t);break;case k.ui.keyCode.END:case k.ui.keyCode.PAGE_DOWN:this._move("last",t);break;default:this.menu.trigger(t),e=!1}e&&t.preventDefault()}},_selectFocusedItem:function(t){var e=this.menuItems.eq(this.focusIndex).parent("li");e.hasClass("ui-state-disabled")||this._select(e.data("ui-selectmenu-item"),t)},_select:function(t,e){var i=this.element[0].selectedIndex;this.element[0].selectedIndex=t.index,this.buttonItem.replaceWith(this.buttonItem=this._renderButtonItem(t)),this._setAria(t),this._trigger("select",e,{item:t}),t.index!==i&&this._trigger("change",e,{item:t}),this.close(e)},_setAria:function(t){var e=this.menuItems.eq(t.index).attr("id");this.button.attr({"aria-labelledby":e,"aria-activedescendant":e}),this.menu.attr("aria-activedescendant",e)},_setOption:function(t,e){if("icons"===t){var i=this.button.find("span.ui-icon");this._removeClass(i,null,this.options.icons.button)._addClass(i,null,e.button)}this._super(t,e),"appendTo"===t&&this.menuWrap.appendTo(this._appendTo()),"width"===t&&this._resizeButton()},_setOptionDisabled:function(t){this._super(t),this.menuInstance.option("disabled",t),this.button.attr("aria-disabled",t),this._toggleClass(this.button,null,"ui-state-disabled",t),this.element.prop("disabled",t),t?(this.button.attr("tabindex",-1),this.close()):this.button.attr("tabindex",0)},_appendTo:function(){var t=this.options.appendTo;return(t=t&&(t.jquery||t.nodeType?k(t):this.document.find(t).eq(0)))&&t[0]||(t=this.element.closest(".ui-front, dialog")),t.length||(t=this.document[0].body),t},_toggleAttr:function(){this.button.attr("aria-expanded",this.isOpen),this._removeClass(this.button,"ui-selectmenu-button-"+(this.isOpen?"closed":"open"))._addClass(this.button,"ui-selectmenu-button-"+(this.isOpen?"open":"closed"))._toggleClass(this.menuWrap,"ui-selectmenu-open",null,this.isOpen),this.menu.attr("aria-hidden",!this.isOpen)},_resizeButton:function(){var t=this.options.width;!1!==t?(null===t&&(t=this.element.show().outerWidth(),this.element.hide()),this.button.outerWidth(t)):this.button.css("width","")},_resizeMenu:function(){this.menu.outerWidth(Math.max(this.button.outerWidth(),this.menu.width("").outerWidth()+1))},_getCreateOptions:function(){var t=this._super();return t.disabled=this.element.prop("disabled"),t},_parseOptions:function(t){var i=this,n=[];t.each(function(t,e){n.push(i._parseOption(k(e),t))}),this.items=n},_parseOption:function(t,e){var i=t.parent("optgroup");return{element:t,index:e,value:t.val(),label:t.text(),optgroup:i.attr("label")||"",disabled:i.prop("disabled")||t.prop("disabled")}},_destroy:function(){this._unbindFormResetHandler(),this.menuWrap.remove(),this.button.remove(),this.element.show(),this.element.removeUniqueId(),this.labels.attr("for",this.ids.element)}}]),k.widget("ui.slider",k.ui.mouse,{version:"1.12.1",widgetEventPrefix:"slide",options:{animate:!1,classes:{"ui-slider":"ui-corner-all","ui-slider-handle":"ui-corner-all","ui-slider-range":"ui-corner-all ui-widget-header"},distance:0,max:100,min:0,orientation:"horizontal",range:!1,step:1,value:0,values:null,change:null,slide:null,start:null,stop:null},numPages:5,_create:function(){this._keySliding=!1,this._mouseSliding=!1,this._animateOff=!0,this._handleIndex=null,this._detectOrientation(),this._mouseInit(),this._calculateNewMax(),this._addClass("ui-slider ui-slider-"+this.orientation,"ui-widget ui-widget-content"),this._refresh(),this._animateOff=!1},_refresh:function(){this._createRange(),this._createHandles(),this._setupEvents(),this._refreshValue()},_createHandles:function(){var t,e,i=this.options,n=this.element.find(".ui-slider-handle"),s=[];for(e=i.values&&i.values.length||1,n.length>e&&(n.slice(e).remove(),n=n.slice(0,e)),t=n.length;t<e;t++)s.push("<span tabindex='0'></span>");this.handles=n.add(k(s.join("")).appendTo(this.element)),this._addClass(this.handles,"ui-slider-handle","ui-state-default"),this.handle=this.handles.eq(0),this.handles.each(function(t){k(this).data("ui-slider-handle-index",t).attr("tabIndex",0)})},_createRange:function(){var t=this.options;t.range?(!0===t.range&&(t.values?t.values.length&&2!==t.values.length?t.values=[t.values[0],t.values[0]]:k.isArray(t.values)&&(t.values=t.values.slice(0)):t.values=[this._valueMin(),this._valueMin()]),this.range&&this.range.length?(this._removeClass(this.range,"ui-slider-range-min ui-slider-range-max"),this.range.css({left:"",bottom:""})):(this.range=k("<div>").appendTo(this.element),this._addClass(this.range,"ui-slider-range")),"min"!==t.range&&"max"!==t.range||this._addClass(this.range,"ui-slider-range-"+t.range)):(this.range&&this.range.remove(),this.range=null)},_setupEvents:function(){this._off(this.handles),this._on(this.handles,this._handleEvents),this._hoverable(this.handles),this._focusable(this.handles)},_destroy:function(){this.handles.remove(),this.range&&this.range.remove(),this._mouseDestroy()},_mouseCapture:function(t){var e,i,n,s,r,a,o,l=this,c=this.options;return!c.disabled&&(this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()},this.elementOffset=this.element.offset(),e={x:t.pageX,y:t.pageY},i=this._normValueFromMouse(e),n=this._valueMax()-this._valueMin()+1,this.handles.each(function(t){var e=Math.abs(i-l.values(t));(e<n||n===e&&(t===l._lastChangedValue||l.values(t)===c.min))&&(n=e,s=k(this),r=t)}),!1!==this._start(t,r)&&(this._mouseSliding=!0,this._handleIndex=r,this._addClass(s,null,"ui-state-active"),s.trigger("focus"),a=s.offset(),o=!k(t.target).parents().addBack().is(".ui-slider-handle"),this._clickOffset=o?{left:0,top:0}:{left:t.pageX-a.left-s.width()/2,top:t.pageY-a.top-s.height()/2-(parseInt(s.css("borderTopWidth"),10)||0)-(parseInt(s.css("borderBottomWidth"),10)||0)+(parseInt(s.css("marginTop"),10)||0)},this.handles.hasClass("ui-state-hover")||this._slide(t,r,i),this._animateOff=!0))},_mouseStart:function(){return!0},_mouseDrag:function(t){var e={x:t.pageX,y:t.pageY},i=this._normValueFromMouse(e);return this._slide(t,this._handleIndex,i),!1},_mouseStop:function(t){return this._removeClass(this.handles,null,"ui-state-active"),this._mouseSliding=!1,this._stop(t,this._handleIndex),this._change(t,this._handleIndex),this._handleIndex=null,this._clickOffset=null,this._animateOff=!1},_detectOrientation:function(){this.orientation="vertical"===this.options.orientation?"vertical":"horizontal"},_normValueFromMouse:function(t){var e,i,n,s;return 1<(i=("horizontal"===this.orientation?(e=this.elementSize.width,t.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)):(e=this.elementSize.height,t.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)))/e)&&(i=1),i<0&&(i=0),"vertical"===this.orientation&&(i=1-i),n=this._valueMax()-this._valueMin(),s=this._valueMin()+i*n,this._trimAlignValue(s)},_uiHash:function(t,e,i){var n={handle:this.handles[t],handleIndex:t,value:void 0!==e?e:this.value()};return this._hasMultipleValues()&&(n.value=void 0!==e?e:this.values(t),n.values=i||this.values()),n},_hasMultipleValues:function(){return this.options.values&&this.options.values.length},_start:function(t,e){return this._trigger("start",t,this._uiHash(e))},_slide:function(t,e,i){var n,s=this.value(),r=this.values();this._hasMultipleValues()&&(n=this.values(e?0:1),s=this.values(e),2===this.options.values.length&&!0===this.options.range&&(i=0===e?Math.min(n,i):Math.max(n,i)),r[e]=i),i!==s&&!1!==this._trigger("slide",t,this._uiHash(e,i,r))&&(this._hasMultipleValues()?this.values(e,i):this.value(i))},_stop:function(t,e){this._trigger("stop",t,this._uiHash(e))},_change:function(t,e){this._keySliding||this._mouseSliding||(this._lastChangedValue=e,this._trigger("change",t,this._uiHash(e)))},value:function(t){return arguments.length?(this.options.value=this._trimAlignValue(t),this._refreshValue(),void this._change(null,0)):this._value()},values:function(t,e){var i,n,s;if(1<arguments.length)return this.options.values[t]=this._trimAlignValue(e),this._refreshValue(),void this._change(null,t);if(!arguments.length)return this._values();if(!k.isArray(t))return this._hasMultipleValues()?this._values(t):this.value();for(i=this.options.values,n=t,s=0;s<i.length;s+=1)i[s]=this._trimAlignValue(n[s]),this._change(null,s);this._refreshValue()},_setOption:function(t,e){var i,n=0;switch("range"===t&&!0===this.options.range&&("min"===e?(this.options.value=this._values(0),this.options.values=null):"max"===e&&(this.options.value=this._values(this.options.values.length-1),this.options.values=null)),k.isArray(this.options.values)&&(n=this.options.values.length),this._super(t,e),t){case"orientation":this._detectOrientation(),this._removeClass("ui-slider-horizontal ui-slider-vertical")._addClass("ui-slider-"+this.orientation),this._refreshValue(),this.options.range&&this._refreshRange(e),this.handles.css("horizontal"===e?"bottom":"left","");break;case"value":this._animateOff=!0,this._refreshValue(),this._change(null,0),this._animateOff=!1;break;case"values":for(this._animateOff=!0,this._refreshValue(),i=n-1;0<=i;i--)this._change(null,i);this._animateOff=!1;break;case"step":case"min":case"max":this._animateOff=!0,this._calculateNewMax(),this._refreshValue(),this._animateOff=!1;break;case"range":this._animateOff=!0,this._refresh(),this._animateOff=!1}},_setOptionDisabled:function(t){this._super(t),this._toggleClass(null,"ui-state-disabled",!!t)},_value:function(){var t=this.options.value;return t=this._trimAlignValue(t)},_values:function(t){var e,i,n;if(arguments.length)return e=this.options.values[t],e=this._trimAlignValue(e);if(this._hasMultipleValues()){for(i=this.options.values.slice(),n=0;n<i.length;n+=1)i[n]=this._trimAlignValue(i[n]);return i}return[]},_trimAlignValue:function(t){if(t<=this._valueMin())return this._valueMin();if(t>=this._valueMax())return this._valueMax();var e=0<this.options.step?this.options.step:1,i=(t-this._valueMin())%e,n=t-i;return 2*Math.abs(i)>=e&&(n+=0<i?e:-e),parseFloat(n.toFixed(5))},_calculateNewMax:function(){var t=this.options.max,e=this._valueMin(),i=this.options.step;(t=Math.round((t-e)/i)*i+e)>this.options.max&&(t-=i),this.max=parseFloat(t.toFixed(this._precision()))},_precision:function(){var t=this._precisionOf(this.options.step);return null!==this.options.min&&(t=Math.max(t,this._precisionOf(this.options.min))),t},_precisionOf:function(t){var e=t.toString(),i=e.indexOf(".");return-1===i?0:e.length-i-1},_valueMin:function(){return this.options.min},_valueMax:function(){return this.max},_refreshRange:function(t){"vertical"===t&&this.range.css({width:"",left:""}),"horizontal"===t&&this.range.css({height:"",bottom:""})},_refreshValue:function(){var e,i,t,n,s,r=this.options.range,a=this.options,o=this,l=!this._animateOff&&a.animate,c={};this._hasMultipleValues()?this.handles.each(function(t){i=(o.values(t)-o._valueMin())/(o._valueMax()-o._valueMin())*100,c["horizontal"===o.orientation?"left":"bottom"]=i+"%",k(this).stop(1,1)[l?"animate":"css"](c,a.animate),!0===o.options.range&&("horizontal"===o.orientation?(0===t&&o.range.stop(1,1)[l?"animate":"css"]({left:i+"%"},a.animate),1===t&&o.range[l?"animate":"css"]({width:i-e+"%"},{queue:!1,duration:a.animate})):(0===t&&o.range.stop(1,1)[l?"animate":"css"]({bottom:i+"%"},a.animate),1===t&&o.range[l?"animate":"css"]({height:i-e+"%"},{queue:!1,duration:a.animate}))),e=i}):(t=this.value(),n=this._valueMin(),s=this._valueMax(),i=s!==n?(t-n)/(s-n)*100:0,c["horizontal"===this.orientation?"left":"bottom"]=i+"%",this.handle.stop(1,1)[l?"animate":"css"](c,a.animate),"min"===r&&"horizontal"===this.orientation&&this.range.stop(1,1)[l?"animate":"css"]({width:i+"%"},a.animate),"max"===r&&"horizontal"===this.orientation&&this.range.stop(1,1)[l?"animate":"css"]({width:100-i+"%"},a.animate),"min"===r&&"vertical"===this.orientation&&this.range.stop(1,1)[l?"animate":"css"]({height:i+"%"},a.animate),"max"===r&&"vertical"===this.orientation&&this.range.stop(1,1)[l?"animate":"css"]({height:100-i+"%"},a.animate))},_handleEvents:{keydown:function(t){var e,i,n,s=k(t.target).data("ui-slider-handle-index");switch(t.keyCode){case k.ui.keyCode.HOME:case k.ui.keyCode.END:case k.ui.keyCode.PAGE_UP:case k.ui.keyCode.PAGE_DOWN:case k.ui.keyCode.UP:case k.ui.keyCode.RIGHT:case k.ui.keyCode.DOWN:case k.ui.keyCode.LEFT:if(t.preventDefault(),!this._keySliding&&(this._keySliding=!0,this._addClass(k(t.target),null,"ui-state-active"),!1===this._start(t,s)))return}switch(n=this.options.step,e=i=this._hasMultipleValues()?this.values(s):this.value(),t.keyCode){case k.ui.keyCode.HOME:i=this._valueMin();break;case k.ui.keyCode.END:i=this._valueMax();break;case k.ui.keyCode.PAGE_UP:i=this._trimAlignValue(e+(this._valueMax()-this._valueMin())/this.numPages);break;case k.ui.keyCode.PAGE_DOWN:i=this._trimAlignValue(e-(this._valueMax()-this._valueMin())/this.numPages);break;case k.ui.keyCode.UP:case k.ui.keyCode.RIGHT:if(e===this._valueMax())return;i=this._trimAlignValue(e+n);break;case k.ui.keyCode.DOWN:case k.ui.keyCode.LEFT:if(e===this._valueMin())return;i=this._trimAlignValue(e-n)}this._slide(t,s,i)},keyup:function(t){var e=k(t.target).data("ui-slider-handle-index");this._keySliding&&(this._keySliding=!1,this._stop(t,e),this._change(t,e),this._removeClass(k(t.target),null,"ui-state-active"))}}}),k.widget("ui.sortable",k.ui.mouse,{version:"1.12.1",widgetEventPrefix:"sort",ready:!1,options:{appendTo:"parent",axis:!1,connectWith:!1,containment:!1,cursor:"auto",cursorAt:!1,dropOnEmpty:!0,forcePlaceholderSize:!1,forceHelperSize:!1,grid:!1,handle:!1,helper:"original",items:"> *",opacity:!1,placeholder:!1,revert:!1,scroll:!0,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1e3,activate:null,beforeStop:null,change:null,deactivate:null,out:null,over:null,receive:null,remove:null,sort:null,start:null,stop:null,update:null},_isOverAxis:function(t,e,i){return e<=t&&t<e+i},_isFloating:function(t){return/left|right/.test(t.css("float"))||/inline|table-cell/.test(t.css("display"))},_create:function(){this.containerCache={},this._addClass("ui-sortable"),this.refresh(),this.offset=this.element.offset(),this._mouseInit(),this._setHandleClassName(),this.ready=!0},_setOption:function(t,e){this._super(t,e),"handle"===t&&this._setHandleClassName()},_setHandleClassName:function(){var t=this;this._removeClass(this.element.find(".ui-sortable-handle"),"ui-sortable-handle"),k.each(this.items,function(){t._addClass(this.instance.options.handle?this.item.find(this.instance.options.handle):this.item,"ui-sortable-handle")})},_destroy:function(){this._mouseDestroy();for(var t=this.items.length-1;0<=t;t--)this.items[t].item.removeData(this.widgetName+"-item");return this},_mouseCapture:function(t,e){var i=null,n=!1,s=this;return!this.reverting&&(!this.options.disabled&&"static"!==this.options.type&&(this._refreshItems(t),k(t.target).parents().each(function(){if(k.data(this,s.widgetName+"-item")===s)return i=k(this),!1}),k.data(t.target,s.widgetName+"-item")===s&&(i=k(t.target)),!!i&&(!(this.options.handle&&!e&&(k(this.options.handle,i).find("*").addBack().each(function(){this===t.target&&(n=!0)}),!n))&&(this.currentItem=i,this._removeCurrentsFromItems(),!0))))},_mouseStart:function(t,e,i){var n,s,r=this.options;if((this.currentContainer=this).refreshPositions(),this.helper=this._createHelper(t),this._cacheHelperProportions(),this._cacheMargins(),this.scrollParent=this.helper.scrollParent(),this.offset=this.currentItem.offset(),this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left},k.extend(this.offset,{click:{left:t.pageX-this.offset.left,top:t.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()}),this.helper.css("position","absolute"),this.cssPosition=this.helper.css("position"),this.originalPosition=this._generatePosition(t),this.originalPageX=t.pageX,this.originalPageY=t.pageY,r.cursorAt&&this._adjustOffsetFromHelper(r.cursorAt),this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]},this.helper[0]!==this.currentItem[0]&&this.currentItem.hide(),this._createPlaceholder(),r.containment&&this._setContainment(),r.cursor&&"auto"!==r.cursor&&(s=this.document.find("body"),this.storedCursor=s.css("cursor"),s.css("cursor",r.cursor),this.storedStylesheet=k("<style>*{ cursor: "+r.cursor+" !important; }</style>").appendTo(s)),r.opacity&&(this.helper.css("opacity")&&(this._storedOpacity=this.helper.css("opacity")),this.helper.css("opacity",r.opacity)),r.zIndex&&(this.helper.css("zIndex")&&(this._storedZIndex=this.helper.css("zIndex")),this.helper.css("zIndex",r.zIndex)),this.scrollParent[0]!==this.document[0]&&"HTML"!==this.scrollParent[0].tagName&&(this.overflowOffset=this.scrollParent.offset()),this._trigger("start",t,this._uiHash()),this._preserveHelperProportions||this._cacheHelperProportions(),!i)for(n=this.containers.length-1;0<=n;n--)this.containers[n]._trigger("activate",t,this._uiHash(this));return k.ui.ddmanager&&(k.ui.ddmanager.current=this),k.ui.ddmanager&&!r.dropBehaviour&&k.ui.ddmanager.prepareOffsets(this,t),this.dragging=!0,this._addClass(this.helper,"ui-sortable-helper"),this._mouseDrag(t),!0},_mouseDrag:function(t){var e,i,n,s,r=this.options,a=!1;for(this.position=this._generatePosition(t),this.positionAbs=this._convertPositionTo("absolute"),this.lastPositionAbs||(this.lastPositionAbs=this.positionAbs),this.options.scroll&&(this.scrollParent[0]!==this.document[0]&&"HTML"!==this.scrollParent[0].tagName?(this.overflowOffset.top+this.scrollParent[0].offsetHeight-t.pageY<r.scrollSensitivity?this.scrollParent[0].scrollTop=a=this.scrollParent[0].scrollTop+r.scrollSpeed:t.pageY-this.overflowOffset.top<r.scrollSensitivity&&(this.scrollParent[0].scrollTop=a=this.scrollParent[0].scrollTop-r.scrollSpeed),this.overflowOffset.left+this.scrollParent[0].offsetWidth-t.pageX<r.scrollSensitivity?this.scrollParent[0].scrollLeft=a=this.scrollParent[0].scrollLeft+r.scrollSpeed:t.pageX-this.overflowOffset.left<r.scrollSensitivity&&(this.scrollParent[0].scrollLeft=a=this.scrollParent[0].scrollLeft-r.scrollSpeed)):(t.pageY-this.document.scrollTop()<r.scrollSensitivity?a=this.document.scrollTop(this.document.scrollTop()-r.scrollSpeed):this.window.height()-(t.pageY-this.document.scrollTop())<r.scrollSensitivity&&(a=this.document.scrollTop(this.document.scrollTop()+r.scrollSpeed)),t.pageX-this.document.scrollLeft()<r.scrollSensitivity?a=this.document.scrollLeft(this.document.scrollLeft()-r.scrollSpeed):this.window.width()-(t.pageX-this.document.scrollLeft())<r.scrollSensitivity&&(a=this.document.scrollLeft(this.document.scrollLeft()+r.scrollSpeed))),!1!==a&&k.ui.ddmanager&&!r.dropBehaviour&&k.ui.ddmanager.prepareOffsets(this,t)),this.positionAbs=this._convertPositionTo("absolute"),this.options.axis&&"y"===this.options.axis||(this.helper[0].style.left=this.position.left+"px"),this.options.axis&&"x"===this.options.axis||(this.helper[0].style.top=this.position.top+"px"),e=this.items.length-1;0<=e;e--)if(n=(i=this.items[e]).item[0],(s=this._intersectsWithPointer(i))&&i.instance===this.currentContainer&&!(n===this.currentItem[0]||this.placeholder[1===s?"next":"prev"]()[0]===n||k.contains(this.placeholder[0],n)||"semi-dynamic"===this.options.type&&k.contains(this.element[0],n))){if(this.direction=1===s?"down":"up","pointer"!==this.options.tolerance&&!this._intersectsWithSides(i))break;this._rearrange(t,i),this._trigger("change",t,this._uiHash());break}return this._contactContainers(t),k.ui.ddmanager&&k.ui.ddmanager.drag(this,t),this._trigger("sort",t,this._uiHash()),this.lastPositionAbs=this.positionAbs,!1},_mouseStop:function(t,e){if(t){if(k.ui.ddmanager&&!this.options.dropBehaviour&&k.ui.ddmanager.drop(this,t),this.options.revert){var i=this,n=this.placeholder.offset(),s=this.options.axis,r={};s&&"x"!==s||(r.left=n.left-this.offset.parent.left-this.margins.left+(this.offsetParent[0]===this.document[0].body?0:this.offsetParent[0].scrollLeft)),s&&"y"!==s||(r.top=n.top-this.offset.parent.top-this.margins.top+(this.offsetParent[0]===this.document[0].body?0:this.offsetParent[0].scrollTop)),this.reverting=!0,k(this.helper).animate(r,parseInt(this.options.revert,10)||500,function(){i._clear(t)})}else this._clear(t,e);return!1}},cancel:function(){if(this.dragging){this._mouseUp(new k.Event("mouseup",{target:null})),"original"===this.options.helper?(this.currentItem.css(this._storedCSS),this._removeClass(this.currentItem,"ui-sortable-helper")):this.currentItem.show();for(var t=this.containers.length-1;0<=t;t--)this.containers[t]._trigger("deactivate",null,this._uiHash(this)),this.containers[t].containerCache.over&&(this.containers[t]._trigger("out",null,this._uiHash(this)),this.containers[t].containerCache.over=0)}return this.placeholder&&(this.placeholder[0].parentNode&&this.placeholder[0].parentNode.removeChild(this.placeholder[0]),"original"!==this.options.helper&&this.helper&&this.helper[0].parentNode&&this.helper.remove(),k.extend(this,{helper:null,dragging:!1,reverting:!1,_noFinalSort:null}),this.domPosition.prev?k(this.domPosition.prev).after(this.currentItem):k(this.domPosition.parent).prepend(this.currentItem)),this},serialize:function(e){var t=this._getItemsAsjQuery(e&&e.connected),i=[];return e=e||{},k(t).each(function(){var t=(k(e.item||this).attr(e.attribute||"id")||"").match(e.expression||/(.+)[\-=_](.+)/);t&&i.push((e.key||t[1]+"[]")+"="+(e.key&&e.expression?t[1]:t[2]))}),!i.length&&e.key&&i.push(e.key+"="),i.join("&")},toArray:function(t){var e=this._getItemsAsjQuery(t&&t.connected),i=[];return t=t||{},e.each(function(){i.push(k(t.item||this).attr(t.attribute||"id")||"")}),i},_intersectsWith:function(t){var e=this.positionAbs.left,i=e+this.helperProportions.width,n=this.positionAbs.top,s=n+this.helperProportions.height,r=t.left,a=r+t.width,o=t.top,l=o+t.height,c=this.offset.click.top,u=this.offset.click.left,h="x"===this.options.axis||o<n+c&&n+c<l,d="y"===this.options.axis||r<e+u&&e+u<a,p=h&&d;return"pointer"===this.options.tolerance||this.options.forcePointerForContainers||"pointer"!==this.options.tolerance&&this.helperProportions[this.floating?"width":"height"]>t[this.floating?"width":"height"]?p:r<e+this.helperProportions.width/2&&i-this.helperProportions.width/2<a&&o<n+this.helperProportions.height/2&&s-this.helperProportions.height/2<l},_intersectsWithPointer:function(t){var e,i,n="x"===this.options.axis||this._isOverAxis(this.positionAbs.top+this.offset.click.top,t.top,t.height),s="y"===this.options.axis||this._isOverAxis(this.positionAbs.left+this.offset.click.left,t.left,t.width);return!(!n||!s)&&(e=this._getDragVerticalDirection(),i=this._getDragHorizontalDirection(),this.floating?"right"===i||"down"===e?2:1:e&&("down"===e?2:1))},_intersectsWithSides:function(t){var e=this._isOverAxis(this.positionAbs.top+this.offset.click.top,t.top+t.height/2,t.height),i=this._isOverAxis(this.positionAbs.left+this.offset.click.left,t.left+t.width/2,t.width),n=this._getDragVerticalDirection(),s=this._getDragHorizontalDirection();return this.floating&&s?"right"===s&&i||"left"===s&&!i:n&&("down"===n&&e||"up"===n&&!e)},_getDragVerticalDirection:function(){var t=this.positionAbs.top-this.lastPositionAbs.top;return 0!=t&&(0<t?"down":"up")},_getDragHorizontalDirection:function(){var t=this.positionAbs.left-this.lastPositionAbs.left;return 0!=t&&(0<t?"right":"left")},refresh:function(t){return this._refreshItems(t),this._setHandleClassName(),this.refreshPositions(),this},_connectWith:function(){var t=this.options;return t.connectWith.constructor===String?[t.connectWith]:t.connectWith},_getItemsAsjQuery:function(t){var e,i,n,s,r=[],a=[],o=this._connectWith();if(o&&t)for(e=o.length-1;0<=e;e--)for(i=(n=k(o[e],this.document[0])).length-1;0<=i;i--)(s=k.data(n[i],this.widgetFullName))&&s!==this&&!s.options.disabled&&a.push([k.isFunction(s.options.items)?s.options.items.call(s.element):k(s.options.items,s.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),s]);function l(){r.push(this)}for(a.push([k.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):k(this.options.items,this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),this]),e=a.length-1;0<=e;e--)a[e][0].each(l);return k(r)},_removeCurrentsFromItems:function(){var i=this.currentItem.find(":data("+this.widgetName+"-item)");this.items=k.grep(this.items,function(t){for(var e=0;e<i.length;e++)if(i[e]===t.item[0])return!1;return!0})},_refreshItems:function(t){this.items=[],this.containers=[this];var e,i,n,s,r,a,o,l,c=this.items,u=[[k.isFunction(this.options.items)?this.options.items.call(this.element[0],t,{item:this.currentItem}):k(this.options.items,this.element),this]],h=this._connectWith();if(h&&this.ready)for(e=h.length-1;0<=e;e--)for(i=(n=k(h[e],this.document[0])).length-1;0<=i;i--)(s=k.data(n[i],this.widgetFullName))&&s!==this&&!s.options.disabled&&(u.push([k.isFunction(s.options.items)?s.options.items.call(s.element[0],t,{item:this.currentItem}):k(s.options.items,s.element),s]),this.containers.push(s));for(e=u.length-1;0<=e;e--)for(r=u[e][1],i=0,l=(a=u[e][0]).length;i<l;i++)(o=k(a[i])).data(this.widgetName+"-item",r),c.push({item:o,instance:r,width:0,height:0,left:0,top:0})},refreshPositions:function(t){var e,i,n,s;for(this.floating=!!this.items.length&&("x"===this.options.axis||this._isFloating(this.items[0].item)),this.offsetParent&&this.helper&&(this.offset.parent=this._getParentOffset()),e=this.items.length-1;0<=e;e--)(i=this.items[e]).instance!==this.currentContainer&&this.currentContainer&&i.item[0]!==this.currentItem[0]||(n=this.options.toleranceElement?k(this.options.toleranceElement,i.item):i.item,t||(i.width=n.outerWidth(),i.height=n.outerHeight()),s=n.offset(),i.left=s.left,i.top=s.top);if(this.options.custom&&this.options.custom.refreshContainers)this.options.custom.refreshContainers.call(this);else for(e=this.containers.length-1;0<=e;e--)s=this.containers[e].element.offset(),this.containers[e].containerCache.left=s.left,this.containers[e].containerCache.top=s.top,this.containers[e].containerCache.width=this.containers[e].element.outerWidth(),this.containers[e].containerCache.height=this.containers[e].element.outerHeight();return this},_createPlaceholder:function(i){var n,s=(i=i||this).options;s.placeholder&&s.placeholder.constructor!==String||(n=s.placeholder,s.placeholder={element:function(){var t=i.currentItem[0].nodeName.toLowerCase(),e=k("<"+t+">",i.document[0]);return i._addClass(e,"ui-sortable-placeholder",n||i.currentItem[0].className)._removeClass(e,"ui-sortable-helper"),"tbody"===t?i._createTrPlaceholder(i.currentItem.find("tr").eq(0),k("<tr>",i.document[0]).appendTo(e)):"tr"===t?i._createTrPlaceholder(i.currentItem,e):"img"===t&&e.attr("src",i.currentItem.attr("src")),n||e.css("visibility","hidden"),e},update:function(t,e){n&&!s.forcePlaceholderSize||(e.height()||e.height(i.currentItem.innerHeight()-parseInt(i.currentItem.css("paddingTop")||0,10)-parseInt(i.currentItem.css("paddingBottom")||0,10)),e.width()||e.width(i.currentItem.innerWidth()-parseInt(i.currentItem.css("paddingLeft")||0,10)-parseInt(i.currentItem.css("paddingRight")||0,10)))}}),i.placeholder=k(s.placeholder.element.call(i.element,i.currentItem)),i.currentItem.after(i.placeholder),s.placeholder.update(i,i.placeholder)},_createTrPlaceholder:function(t,e){var i=this;t.children().each(function(){k("<td>&#160;</td>",i.document[0]).attr("colspan",k(this).attr("colspan")||1).appendTo(e)})},_contactContainers:function(t){var e,i,n,s,r,a,o,l,c,u,h=null,d=null;for(e=this.containers.length-1;0<=e;e--)if(!k.contains(this.currentItem[0],this.containers[e].element[0]))if(this._intersectsWith(this.containers[e].containerCache)){if(h&&k.contains(this.containers[e].element[0],h.element[0]))continue;h=this.containers[e],d=e}else this.containers[e].containerCache.over&&(this.containers[e]._trigger("out",t,this._uiHash(this)),this.containers[e].containerCache.over=0);if(h)if(1===this.containers.length)this.containers[d].containerCache.over||(this.containers[d]._trigger("over",t,this._uiHash(this)),this.containers[d].containerCache.over=1);else{for(n=1e4,s=null,r=(c=h.floating||this._isFloating(this.currentItem))?"left":"top",a=c?"width":"height",u=c?"pageX":"pageY",i=this.items.length-1;0<=i;i--)k.contains(this.containers[d].element[0],this.items[i].item[0])&&this.items[i].item[0]!==this.currentItem[0]&&(o=this.items[i].item.offset()[r],l=!1,t[u]-o>this.items[i][a]/2&&(l=!0),Math.abs(t[u]-o)<n&&(n=Math.abs(t[u]-o),s=this.items[i],this.direction=l?"up":"down"));if(!s&&!this.options.dropOnEmpty)return;if(this.currentContainer===this.containers[d])return void(this.currentContainer.containerCache.over||(this.containers[d]._trigger("over",t,this._uiHash()),this.currentContainer.containerCache.over=1));s?this._rearrange(t,s,null,!0):this._rearrange(t,null,this.containers[d].element,!0),this._trigger("change",t,this._uiHash()),this.containers[d]._trigger("change",t,this._uiHash(this)),this.currentContainer=this.containers[d],this.options.placeholder.update(this.currentContainer,this.placeholder),this.containers[d]._trigger("over",t,this._uiHash(this)),this.containers[d].containerCache.over=1}},_createHelper:function(t){var e=this.options,i=k.isFunction(e.helper)?k(e.helper.apply(this.element[0],[t,this.currentItem])):"clone"===e.helper?this.currentItem.clone():this.currentItem;return i.parents("body").length||k("parent"!==e.appendTo?e.appendTo:this.currentItem[0].parentNode)[0].appendChild(i[0]),i[0]===this.currentItem[0]&&(this._storedCSS={width:this.currentItem[0].style.width,height:this.currentItem[0].style.height,position:this.currentItem.css("position"),top:this.currentItem.css("top"),left:this.currentItem.css("left")}),i[0].style.width&&!e.forceHelperSize||i.width(this.currentItem.width()),i[0].style.height&&!e.forceHelperSize||i.height(this.currentItem.height()),i},_adjustOffsetFromHelper:function(t){"string"==typeof t&&(t=t.split(" ")),k.isArray(t)&&(t={left:+t[0],top:+t[1]||0}),"left"in t&&(this.offset.click.left=t.left+this.margins.left),"right"in t&&(this.offset.click.left=this.helperProportions.width-t.right+this.margins.left),"top"in t&&(this.offset.click.top=t.top+this.margins.top),"bottom"in t&&(this.offset.click.top=this.helperProportions.height-t.bottom+this.margins.top)},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var t=this.offsetParent.offset();return"absolute"===this.cssPosition&&this.scrollParent[0]!==this.document[0]&&k.contains(this.scrollParent[0],this.offsetParent[0])&&(t.left+=this.scrollParent.scrollLeft(),t.top+=this.scrollParent.scrollTop()),(this.offsetParent[0]===this.document[0].body||this.offsetParent[0].tagName&&"html"===this.offsetParent[0].tagName.toLowerCase()&&k.ui.ie)&&(t={top:0,left:0}),{top:t.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:t.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"!==this.cssPosition)return{top:0,left:0};var t=this.currentItem.position();return{top:t.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:t.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}},_cacheMargins:function(){this.margins={left:parseInt(this.currentItem.css("marginLeft"),10)||0,top:parseInt(this.currentItem.css("marginTop"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var t,e,i,n=this.options;"parent"===n.containment&&(n.containment=this.helper[0].parentNode),"document"!==n.containment&&"window"!==n.containment||(this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,"document"===n.containment?this.document.width():this.window.width()-this.helperProportions.width-this.margins.left,("document"===n.containment?this.document.height()||document.body.parentNode.scrollHeight:this.window.height()||this.document[0].body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]),/^(document|window|parent)$/.test(n.containment)||(t=k(n.containment)[0],e=k(n.containment).offset(),i="hidden"!==k(t).css("overflow"),this.containment=[e.left+(parseInt(k(t).css("borderLeftWidth"),10)||0)+(parseInt(k(t).css("paddingLeft"),10)||0)-this.margins.left,e.top+(parseInt(k(t).css("borderTopWidth"),10)||0)+(parseInt(k(t).css("paddingTop"),10)||0)-this.margins.top,e.left+(i?Math.max(t.scrollWidth,t.offsetWidth):t.offsetWidth)-(parseInt(k(t).css("borderLeftWidth"),10)||0)-(parseInt(k(t).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,e.top+(i?Math.max(t.scrollHeight,t.offsetHeight):t.offsetHeight)-(parseInt(k(t).css("borderTopWidth"),10)||0)-(parseInt(k(t).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top])},_convertPositionTo:function(t,e){e=e||this.position;var i="absolute"===t?1:-1,n="absolute"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&k.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,s=/(html|body)/i.test(n[0].tagName);return{top:e.top+this.offset.relative.top*i+this.offset.parent.top*i-("fixed"===this.cssPosition?-this.scrollParent.scrollTop():s?0:n.scrollTop())*i,left:e.left+this.offset.relative.left*i+this.offset.parent.left*i-("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():s?0:n.scrollLeft())*i}},_generatePosition:function(t){var e,i,n=this.options,s=t.pageX,r=t.pageY,a="absolute"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&k.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,o=/(html|body)/i.test(a[0].tagName);return"relative"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&this.scrollParent[0]!==this.offsetParent[0]||(this.offset.relative=this._getRelativeOffset()),this.originalPosition&&(this.containment&&(t.pageX-this.offset.click.left<this.containment[0]&&(s=this.containment[0]+this.offset.click.left),t.pageY-this.offset.click.top<this.containment[1]&&(r=this.containment[1]+this.offset.click.top),t.pageX-this.offset.click.left>this.containment[2]&&(s=this.containment[2]+this.offset.click.left),t.pageY-this.offset.click.top>this.containment[3]&&(r=this.containment[3]+this.offset.click.top)),n.grid&&(e=this.originalPageY+Math.round((r-this.originalPageY)/n.grid[1])*n.grid[1],r=this.containment?e-this.offset.click.top>=this.containment[1]&&e-this.offset.click.top<=this.containment[3]?e:e-this.offset.click.top>=this.containment[1]?e-n.grid[1]:e+n.grid[1]:e,i=this.originalPageX+Math.round((s-this.originalPageX)/n.grid[0])*n.grid[0],s=this.containment?i-this.offset.click.left>=this.containment[0]&&i-this.offset.click.left<=this.containment[2]?i:i-this.offset.click.left>=this.containment[0]?i-n.grid[0]:i+n.grid[0]:i)),{top:r-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.scrollParent.scrollTop():o?0:a.scrollTop()),left:s-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():o?0:a.scrollLeft())}},_rearrange:function(t,e,i,n){i?i[0].appendChild(this.placeholder[0]):e.item[0].parentNode.insertBefore(this.placeholder[0],"down"===this.direction?e.item[0]:e.item[0].nextSibling),this.counter=this.counter?++this.counter:1;var s=this.counter;this._delay(function(){s===this.counter&&this.refreshPositions(!n)})},_clear:function(t,e){this.reverting=!1;var i,n=[];if(!this._noFinalSort&&this.currentItem.parent().length&&this.placeholder.before(this.currentItem),this._noFinalSort=null,this.helper[0]===this.currentItem[0]){for(i in this._storedCSS)"auto"!==this._storedCSS[i]&&"static"!==this._storedCSS[i]||(this._storedCSS[i]="");this.currentItem.css(this._storedCSS),this._removeClass(this.currentItem,"ui-sortable-helper")}else this.currentItem.show();function s(e,i,n){return function(t){n._trigger(e,t,i._uiHash(i))}}for(this.fromOutside&&!e&&n.push(function(t){this._trigger("receive",t,this._uiHash(this.fromOutside))}),!this.fromOutside&&this.domPosition.prev===this.currentItem.prev().not(".ui-sortable-helper")[0]&&this.domPosition.parent===this.currentItem.parent()[0]||e||n.push(function(t){this._trigger("update",t,this._uiHash())}),this!==this.currentContainer&&(e||(n.push(function(t){this._trigger("remove",t,this._uiHash())}),n.push(function(e){return function(t){e._trigger("receive",t,this._uiHash(this))}}.call(this,this.currentContainer)),n.push(function(e){return function(t){e._trigger("update",t,this._uiHash(this))}}.call(this,this.currentContainer)))),i=this.containers.length-1;0<=i;i--)e||n.push(s("deactivate",this,this.containers[i])),this.containers[i].containerCache.over&&(n.push(s("out",this,this.containers[i])),this.containers[i].containerCache.over=0);if(this.storedCursor&&(this.document.find("body").css("cursor",this.storedCursor),this.storedStylesheet.remove()),this._storedOpacity&&this.helper.css("opacity",this._storedOpacity),this._storedZIndex&&this.helper.css("zIndex","auto"===this._storedZIndex?"":this._storedZIndex),this.dragging=!1,e||this._trigger("beforeStop",t,this._uiHash()),this.placeholder[0].parentNode.removeChild(this.placeholder[0]),this.cancelHelperRemoval||(this.helper[0]!==this.currentItem[0]&&this.helper.remove(),this.helper=null),!e){for(i=0;i<n.length;i++)n[i].call(this,t);this._trigger("stop",t,this._uiHash())}return this.fromOutside=!1,!this.cancelHelperRemoval},_trigger:function(){!1===k.Widget.prototype._trigger.apply(this,arguments)&&this.cancel()},_uiHash:function(t){var e=t||this;return{helper:e.helper,placeholder:e.placeholder||k([]),position:e.position,originalPosition:e.originalPosition,offset:e.positionAbs,item:e.currentItem,sender:t?t.element:null}}});function at(e){return function(){var t=this.element.val();e.apply(this,arguments),this._refresh(),t!==this.element.val()&&this._trigger("change")}}k.widget("ui.spinner",{version:"1.12.1",defaultElement:"<input>",widgetEventPrefix:"spin",options:{classes:{"ui-spinner":"ui-corner-all","ui-spinner-down":"ui-corner-br","ui-spinner-up":"ui-corner-tr"},culture:null,icons:{down:"ui-icon-triangle-1-s",up:"ui-icon-triangle-1-n"},incremental:!0,max:null,min:null,numberFormat:null,page:10,step:1,change:null,spin:null,start:null,stop:null},_create:function(){this._setOption("max",this.options.max),this._setOption("min",this.options.min),this._setOption("step",this.options.step),""!==this.value()&&this._value(this.element.val(),!0),this._draw(),this._on(this._events),this._refresh(),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_getCreateOptions:function(){var n=this._super(),s=this.element;return k.each(["min","max","step"],function(t,e){var i=s.attr(e);null!=i&&i.length&&(n[e]=i)}),n},_events:{keydown:function(t){this._start(t)&&this._keydown(t)&&t.preventDefault()},keyup:"_stop",focus:function(){this.previous=this.element.val()},blur:function(t){this.cancelBlur?delete this.cancelBlur:(this._stop(),this._refresh(),this.previous!==this.element.val()&&this._trigger("change",t))},mousewheel:function(t,e){if(e){if(!this.spinning&&!this._start(t))return!1;this._spin((0<e?1:-1)*this.options.step,t),clearTimeout(this.mousewheelTimer),this.mousewheelTimer=this._delay(function(){this.spinning&&this._stop(t)},100),t.preventDefault()}},"mousedown .ui-spinner-button":function(t){var e;function i(){this.element[0]===k.ui.safeActiveElement(this.document[0])||(this.element.trigger("focus"),this.previous=e,this._delay(function(){this.previous=e}))}e=this.element[0]===k.ui.safeActiveElement(this.document[0])?this.previous:this.element.val(),t.preventDefault(),i.call(this),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur,i.call(this)}),!1!==this._start(t)&&this._repeat(null,k(t.currentTarget).hasClass("ui-spinner-up")?1:-1,t)},"mouseup .ui-spinner-button":"_stop","mouseenter .ui-spinner-button":function(t){if(k(t.currentTarget).hasClass("ui-state-active"))return!1!==this._start(t)&&void this._repeat(null,k(t.currentTarget).hasClass("ui-spinner-up")?1:-1,t)},"mouseleave .ui-spinner-button":"_stop"},_enhance:function(){this.uiSpinner=this.element.attr("autocomplete","off").wrap("<span>").parent().append("<a></a><a></a>")},_draw:function(){this._enhance(),this._addClass(this.uiSpinner,"ui-spinner","ui-widget ui-widget-content"),this._addClass("ui-spinner-input"),this.element.attr("role","spinbutton"),this.buttons=this.uiSpinner.children("a").attr("tabIndex",-1).attr("aria-hidden",!0).button({classes:{"ui-button":""}}),this._removeClass(this.buttons,"ui-corner-all"),this._addClass(this.buttons.first(),"ui-spinner-button ui-spinner-up"),this._addClass(this.buttons.last(),"ui-spinner-button ui-spinner-down"),this.buttons.first().button({icon:this.options.icons.up,showLabel:!1}),this.buttons.last().button({icon:this.options.icons.down,showLabel:!1}),this.buttons.height()>Math.ceil(.5*this.uiSpinner.height())&&0<this.uiSpinner.height()&&this.uiSpinner.height(this.uiSpinner.height())},_keydown:function(t){var e=this.options,i=k.ui.keyCode;switch(t.keyCode){case i.UP:return this._repeat(null,1,t),!0;case i.DOWN:return this._repeat(null,-1,t),!0;case i.PAGE_UP:return this._repeat(null,e.page,t),!0;case i.PAGE_DOWN:return this._repeat(null,-e.page,t),!0}return!1},_start:function(t){return!(!this.spinning&&!1===this._trigger("start",t))&&(this.counter||(this.counter=1),this.spinning=!0)},_repeat:function(t,e,i){t=t||500,clearTimeout(this.timer),this.timer=this._delay(function(){this._repeat(40,e,i)},t),this._spin(e*this.options.step,i)},_spin:function(t,e){var i=this.value()||0;this.counter||(this.counter=1),i=this._adjustValue(i+t*this._increment(this.counter)),this.spinning&&!1===this._trigger("spin",e,{value:i})||(this._value(i),this.counter++)},_increment:function(t){var e=this.options.incremental;return e?k.isFunction(e)?e(t):Math.floor(t*t*t/5e4-t*t/500+17*t/200+1):1},_precision:function(){var t=this._precisionOf(this.options.step);return null!==this.options.min&&(t=Math.max(t,this._precisionOf(this.options.min))),t},_precisionOf:function(t){var e=t.toString(),i=e.indexOf(".");return-1===i?0:e.length-i-1},_adjustValue:function(t){var e,i,n=this.options;return i=t-(e=null!==n.min?n.min:0),t=e+(i=Math.round(i/n.step)*n.step),t=parseFloat(t.toFixed(this._precision())),null!==n.max&&t>n.max?n.max:null!==n.min&&t<n.min?n.min:t},_stop:function(t){this.spinning&&(clearTimeout(this.timer),clearTimeout(this.mousewheelTimer),this.counter=0,this.spinning=!1,this._trigger("stop",t))},_setOption:function(t,e){var i,n,s;if("culture"===t||"numberFormat"===t)return i=this._parse(this.element.val()),this.options[t]=e,void this.element.val(this._format(i));"max"!==t&&"min"!==t&&"step"!==t||"string"==typeof e&&(e=this._parse(e)),"icons"===t&&(n=this.buttons.first().find(".ui-icon"),this._removeClass(n,null,this.options.icons.up),this._addClass(n,null,e.up),s=this.buttons.last().find(".ui-icon"),this._removeClass(s,null,this.options.icons.down),this._addClass(s,null,e.down)),this._super(t,e)},_setOptionDisabled:function(t){this._super(t),this._toggleClass(this.uiSpinner,null,"ui-state-disabled",!!t),this.element.prop("disabled",!!t),this.buttons.button(t?"disable":"enable")},_setOptions:at(function(t){this._super(t)}),_parse:function(t){return"string"==typeof t&&""!==t&&(t=window.Globalize&&this.options.numberFormat?Globalize.parseFloat(t,10,this.options.culture):+t),""===t||isNaN(t)?null:t},_format:function(t){return""===t?"":window.Globalize&&this.options.numberFormat?Globalize.format(t,this.options.numberFormat,this.options.culture):t},_refresh:function(){this.element.attr({"aria-valuemin":this.options.min,"aria-valuemax":this.options.max,"aria-valuenow":this._parse(this.element.val())})},isValid:function(){var t=this.value();return null!==t&&t===this._adjustValue(t)},_value:function(t,e){var i;""!==t&&null!==(i=this._parse(t))&&(e||(i=this._adjustValue(i)),t=this._format(i)),this.element.val(t),this._refresh()},_destroy:function(){this.element.prop("disabled",!1).removeAttr("autocomplete role aria-valuemin aria-valuemax aria-valuenow"),this.uiSpinner.replaceWith(this.element)},stepUp:at(function(t){this._stepUp(t)}),_stepUp:function(t){this._start()&&(this._spin((t||1)*this.options.step),this._stop())},stepDown:at(function(t){this._stepDown(t)}),_stepDown:function(t){this._start()&&(this._spin((t||1)*-this.options.step),this._stop())},pageUp:at(function(t){this._stepUp((t||1)*this.options.page)}),pageDown:at(function(t){this._stepDown((t||1)*this.options.page)}),value:function(t){if(!arguments.length)return this._parse(this.element.val());at(this._value).call(this,t)},widget:function(){return this.uiSpinner}}),!1!==k.uiBackCompat&&k.widget("ui.spinner",k.ui.spinner,{_enhance:function(){this.uiSpinner=this.element.attr("autocomplete","off").wrap(this._uiSpinnerHtml()).parent().append(this._buttonHtml())},_uiSpinnerHtml:function(){return"<span>"},_buttonHtml:function(){return"<a></a><a></a>"}});var ot;k.ui.spinner;k.widget("ui.tabs",{version:"1.12.1",delay:300,options:{active:null,classes:{"ui-tabs":"ui-corner-all","ui-tabs-nav":"ui-corner-all","ui-tabs-panel":"ui-corner-bottom","ui-tabs-tab":"ui-corner-top"},collapsible:!1,event:"click",heightStyle:"content",hide:null,show:null,activate:null,beforeActivate:null,beforeLoad:null,load:null},_isLocal:(ot=/#.*$/,function(t){var e,i;e=t.href.replace(ot,""),i=location.href.replace(ot,"");try{e=decodeURIComponent(e)}catch(t){}try{i=decodeURIComponent(i)}catch(t){}return 1<t.hash.length&&e===i}),_create:function(){var e=this,t=this.options;this.running=!1,this._addClass("ui-tabs","ui-widget ui-widget-content"),this._toggleClass("ui-tabs-collapsible",null,t.collapsible),this._processTabs(),t.active=this._initialActive(),k.isArray(t.disabled)&&(t.disabled=k.unique(t.disabled.concat(k.map(this.tabs.filter(".ui-state-disabled"),function(t){return e.tabs.index(t)}))).sort()),!1!==this.options.active&&this.anchors.length?this.active=this._findActive(t.active):this.active=k(),this._refresh(),this.active.length&&this.load(t.active)},_initialActive:function(){var i=this.options.active,t=this.options.collapsible,n=location.hash.substring(1);return null===i&&(n&&this.tabs.each(function(t,e){if(k(e).attr("aria-controls")===n)return i=t,!1}),null===i&&(i=this.tabs.index(this.tabs.filter(".ui-tabs-active"))),null!==i&&-1!==i||(i=!!this.tabs.length&&0)),!1!==i&&-1===(i=this.tabs.index(this.tabs.eq(i)))&&(i=!t&&0),!t&&!1===i&&this.anchors.length&&(i=0),i},_getCreateEventData:function(){return{tab:this.active,panel:this.active.length?this._getPanelForTab(this.active):k()}},_tabKeydown:function(t){var e=k(k.ui.safeActiveElement(this.document[0])).closest("li"),i=this.tabs.index(e),n=!0;if(!this._handlePageNav(t)){switch(t.keyCode){case k.ui.keyCode.RIGHT:case k.ui.keyCode.DOWN:i++;break;case k.ui.keyCode.UP:case k.ui.keyCode.LEFT:n=!1,i--;break;case k.ui.keyCode.END:i=this.anchors.length-1;break;case k.ui.keyCode.HOME:i=0;break;case k.ui.keyCode.SPACE:return t.preventDefault(),clearTimeout(this.activating),void this._activate(i);case k.ui.keyCode.ENTER:return t.preventDefault(),clearTimeout(this.activating),void this._activate(i!==this.options.active&&i);default:return}t.preventDefault(),clearTimeout(this.activating),i=this._focusNextTab(i,n),t.ctrlKey||t.metaKey||(e.attr("aria-selected","false"),this.tabs.eq(i).attr("aria-selected","true"),this.activating=this._delay(function(){this.option("active",i)},this.delay))}},_panelKeydown:function(t){this._handlePageNav(t)||t.ctrlKey&&t.keyCode===k.ui.keyCode.UP&&(t.preventDefault(),this.active.trigger("focus"))},_handlePageNav:function(t){return t.altKey&&t.keyCode===k.ui.keyCode.PAGE_UP?(this._activate(this._focusNextTab(this.options.active-1,!1)),!0):t.altKey&&t.keyCode===k.ui.keyCode.PAGE_DOWN?(this._activate(this._focusNextTab(this.options.active+1,!0)),!0):void 0},_findNextTab:function(t,e){var i=this.tabs.length-1;for(;-1!==k.inArray((i<t&&(t=0),t<0&&(t=i),t),this.options.disabled);)t=e?t+1:t-1;return t},_focusNextTab:function(t,e){return t=this._findNextTab(t,e),this.tabs.eq(t).trigger("focus"),t},_setOption:function(t,e){"active"!==t?(this._super(t,e),"collapsible"===t&&(this._toggleClass("ui-tabs-collapsible",null,e),e||!1!==this.options.active||this._activate(0)),"event"===t&&this._setupEvents(e),"heightStyle"===t&&this._setupHeightStyle(e)):this._activate(e)},_sanitizeSelector:function(t){return t?t.replace(/[!"$%&'()*+,.\/:;<=>?@\[\]\^`{|}~]/g,"\\$&"):""},refresh:function(){var t=this.options,e=this.tablist.children(":has(a[href])");t.disabled=k.map(e.filter(".ui-state-disabled"),function(t){return e.index(t)}),this._processTabs(),!1!==t.active&&this.anchors.length?this.active.length&&!k.contains(this.tablist[0],this.active[0])?this.tabs.length===t.disabled.length?(t.active=!1,this.active=k()):this._activate(this._findNextTab(Math.max(0,t.active-1),!1)):t.active=this.tabs.index(this.active):(t.active=!1,this.active=k()),this._refresh()},_refresh:function(){this._setOptionDisabled(this.options.disabled),this._setupEvents(this.options.event),this._setupHeightStyle(this.options.heightStyle),this.tabs.not(this.active).attr({"aria-selected":"false","aria-expanded":"false",tabIndex:-1}),this.panels.not(this._getPanelForTab(this.active)).hide().attr({"aria-hidden":"true"}),this.active.length?(this.active.attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0}),this._addClass(this.active,"ui-tabs-active","ui-state-active"),this._getPanelForTab(this.active).show().attr({"aria-hidden":"false"})):this.tabs.eq(0).attr("tabIndex",0)},_processTabs:function(){var l=this,t=this.tabs,e=this.anchors,i=this.panels;this.tablist=this._getList().attr("role","tablist"),this._addClass(this.tablist,"ui-tabs-nav","ui-helper-reset ui-helper-clearfix ui-widget-header"),this.tablist.on("mousedown"+this.eventNamespace,"> li",function(t){k(this).is(".ui-state-disabled")&&t.preventDefault()}).on("focus"+this.eventNamespace,".ui-tabs-anchor",function(){k(this).closest("li").is(".ui-state-disabled")&&this.blur()}),this.tabs=this.tablist.find("> li:has(a[href])").attr({role:"tab",tabIndex:-1}),this._addClass(this.tabs,"ui-tabs-tab","ui-state-default"),this.anchors=this.tabs.map(function(){return k("a",this)[0]}).attr({role:"presentation",tabIndex:-1}),this._addClass(this.anchors,"ui-tabs-anchor"),this.panels=k(),this.anchors.each(function(t,e){var i,n,s,r=k(e).uniqueId().attr("id"),a=k(e).closest("li"),o=a.attr("aria-controls");l._isLocal(e)?(s=(i=e.hash).substring(1),n=l.element.find(l._sanitizeSelector(i))):(i="#"+(s=a.attr("aria-controls")||k({}).uniqueId()[0].id),(n=l.element.find(i)).length||(n=l._createPanel(s)).insertAfter(l.panels[t-1]||l.tablist),n.attr("aria-live","polite")),n.length&&(l.panels=l.panels.add(n)),o&&a.data("ui-tabs-aria-controls",o),a.attr({"aria-controls":s,"aria-labelledby":r}),n.attr("aria-labelledby",r)}),this.panels.attr("role","tabpanel"),this._addClass(this.panels,"ui-tabs-panel","ui-widget-content"),t&&(this._off(t.not(this.tabs)),this._off(e.not(this.anchors)),this._off(i.not(this.panels)))},_getList:function(){return this.tablist||this.element.find("ol, ul").eq(0)},_createPanel:function(t){return k("<div>").attr("id",t).data("ui-tabs-destroy",!0)},_setOptionDisabled:function(t){var e,i,n;for(k.isArray(t)&&(t.length?t.length===this.anchors.length&&(t=!0):t=!1),n=0;i=this.tabs[n];n++)e=k(i),!0===t||-1!==k.inArray(n,t)?(e.attr("aria-disabled","true"),this._addClass(e,null,"ui-state-disabled")):(e.removeAttr("aria-disabled"),this._removeClass(e,null,"ui-state-disabled"));this.options.disabled=t,this._toggleClass(this.widget(),this.widgetFullName+"-disabled",null,!0===t)},_setupEvents:function(t){var i={};t&&k.each(t.split(" "),function(t,e){i[e]="_eventHandler"}),this._off(this.anchors.add(this.tabs).add(this.panels)),this._on(!0,this.anchors,{click:function(t){t.preventDefault()}}),this._on(this.anchors,i),this._on(this.tabs,{keydown:"_tabKeydown"}),this._on(this.panels,{keydown:"_panelKeydown"}),this._focusable(this.tabs),this._hoverable(this.tabs)},_setupHeightStyle:function(t){var i,e=this.element.parent();"fill"===t?(i=e.height(),i-=this.element.outerHeight()-this.element.height(),this.element.siblings(":visible").each(function(){var t=k(this),e=t.css("position");"absolute"!==e&&"fixed"!==e&&(i-=t.outerHeight(!0))}),this.element.children().not(this.panels).each(function(){i-=k(this).outerHeight(!0)}),this.panels.each(function(){k(this).height(Math.max(0,i-k(this).innerHeight()+k(this).height()))}).css("overflow","auto")):"auto"===t&&(i=0,this.panels.each(function(){i=Math.max(i,k(this).height("").height())}).height(i))},_eventHandler:function(t){var e=this.options,i=this.active,n=k(t.currentTarget).closest("li"),s=n[0]===i[0],r=s&&e.collapsible,a=r?k():this._getPanelForTab(n),o=i.length?this._getPanelForTab(i):k(),l={oldTab:i,oldPanel:o,newTab:r?k():n,newPanel:a};t.preventDefault(),n.hasClass("ui-state-disabled")||n.hasClass("ui-tabs-loading")||this.running||s&&!e.collapsible||!1===this._trigger("beforeActivate",t,l)||(e.active=!r&&this.tabs.index(n),this.active=s?k():n,this.xhr&&this.xhr.abort(),o.length||a.length||k.error("jQuery UI Tabs: Mismatching fragment identifier."),a.length&&this.load(this.tabs.index(n),t),this._toggle(t,l))},_toggle:function(t,e){var i=this,n=e.newPanel,s=e.oldPanel;function r(){i.running=!1,i._trigger("activate",t,e)}function a(){i._addClass(e.newTab.closest("li"),"ui-tabs-active","ui-state-active"),n.length&&i.options.show?i._show(n,i.options.show,r):(n.show(),r())}this.running=!0,s.length&&this.options.hide?this._hide(s,this.options.hide,function(){i._removeClass(e.oldTab.closest("li"),"ui-tabs-active","ui-state-active"),a()}):(this._removeClass(e.oldTab.closest("li"),"ui-tabs-active","ui-state-active"),s.hide(),a()),s.attr("aria-hidden","true"),e.oldTab.attr({"aria-selected":"false","aria-expanded":"false"}),n.length&&s.length?e.oldTab.attr("tabIndex",-1):n.length&&this.tabs.filter(function(){return 0===k(this).attr("tabIndex")}).attr("tabIndex",-1),n.attr("aria-hidden","false"),e.newTab.attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0})},_activate:function(t){var e,i=this._findActive(t);i[0]!==this.active[0]&&(i.length||(i=this.active),e=i.find(".ui-tabs-anchor")[0],this._eventHandler({target:e,currentTarget:e,preventDefault:k.noop}))},_findActive:function(t){return!1===t?k():this.tabs.eq(t)},_getIndex:function(t){return"string"==typeof t&&(t=this.anchors.index(this.anchors.filter("[href$='"+k.ui.escapeSelector(t)+"']"))),t},_destroy:function(){this.xhr&&this.xhr.abort(),this.tablist.removeAttr("role").off(this.eventNamespace),this.anchors.removeAttr("role tabIndex").removeUniqueId(),this.tabs.add(this.panels).each(function(){k.data(this,"ui-tabs-destroy")?k(this).remove():k(this).removeAttr("role tabIndex aria-live aria-busy aria-selected aria-labelledby aria-hidden aria-expanded")}),this.tabs.each(function(){var t=k(this),e=t.data("ui-tabs-aria-controls");e?t.attr("aria-controls",e).removeData("ui-tabs-aria-controls"):t.removeAttr("aria-controls")}),this.panels.show(),"content"!==this.options.heightStyle&&this.panels.css("height","")},enable:function(i){var t=this.options.disabled;!1!==t&&(t=void 0!==i&&(i=this._getIndex(i),k.isArray(t)?k.map(t,function(t){return t!==i?t:null}):k.map(this.tabs,function(t,e){return e!==i?e:null})),this._setOptionDisabled(t))},disable:function(t){var e=this.options.disabled;if(!0!==e){if(void 0===t)e=!0;else{if(t=this._getIndex(t),-1!==k.inArray(t,e))return;e=k.isArray(e)?k.merge([t],e).sort():[t]}this._setOptionDisabled(e)}},load:function(t,n){t=this._getIndex(t);function s(t,e){"abort"===e&&r.panels.stop(!1,!0),r._removeClass(i,"ui-tabs-loading"),a.removeAttr("aria-busy"),t===r.xhr&&delete r.xhr}var r=this,i=this.tabs.eq(t),e=i.find(".ui-tabs-anchor"),a=this._getPanelForTab(i),o={tab:i,panel:a};this._isLocal(e[0])||(this.xhr=k.ajax(this._ajaxSettings(e,n,o)),this.xhr&&"canceled"!==this.xhr.statusText&&(this._addClass(i,"ui-tabs-loading"),a.attr("aria-busy","true"),this.xhr.done(function(t,e,i){setTimeout(function(){a.html(t),r._trigger("load",n,o),s(i,e)},1)}).fail(function(t,e){setTimeout(function(){s(t,e)},1)})))},_ajaxSettings:function(t,i,n){var s=this;return{url:t.attr("href").replace(/#.*$/,""),beforeSend:function(t,e){return s._trigger("beforeLoad",i,k.extend({jqXHR:t,ajaxSettings:e},n))}}},_getPanelForTab:function(t){var e=k(t).attr("aria-controls");return this.element.find(this._sanitizeSelector("#"+e))}}),!1!==k.uiBackCompat&&k.widget("ui.tabs",k.ui.tabs,{_processTabs:function(){this._superApply(arguments),this._addClass(this.tabs,"ui-tab")}});k.ui.tabs;k.widget("ui.tooltip",{version:"1.12.1",options:{classes:{"ui-tooltip":"ui-corner-all ui-widget-shadow"},content:function(){var t=k(this).attr("title")||"";return k("<a>").text(t).html()},hide:!0,items:"[title]:not([disabled])",position:{my:"left top+15",at:"left bottom",collision:"flipfit flip"},show:!0,track:!1,close:null,open:null},_addDescribedBy:function(t,e){var i=(t.attr("aria-describedby")||"").split(/\s+/);i.push(e),t.data("ui-tooltip-id",e).attr("aria-describedby",k.trim(i.join(" ")))},_removeDescribedBy:function(t){var e=t.data("ui-tooltip-id"),i=(t.attr("aria-describedby")||"").split(/\s+/),n=k.inArray(e,i);-1!==n&&i.splice(n,1),t.removeData("ui-tooltip-id"),(i=k.trim(i.join(" ")))?t.attr("aria-describedby",i):t.removeAttr("aria-describedby")},_create:function(){this._on({mouseover:"open",focusin:"open"}),this.tooltips={},this.parents={},this.liveRegion=k("<div>").attr({role:"log","aria-live":"assertive","aria-relevant":"additions"}).appendTo(this.document[0].body),this._addClass(this.liveRegion,null,"ui-helper-hidden-accessible"),this.disabledTitles=k([])},_setOption:function(t,e){var i=this;this._super(t,e),"content"===t&&k.each(this.tooltips,function(t,e){i._updateContent(e.element)})},_setOptionDisabled:function(t){this[t?"_disable":"_enable"]()},_disable:function(){var n=this;k.each(this.tooltips,function(t,e){var i=k.Event("blur");i.target=i.currentTarget=e.element[0],n.close(i,!0)}),this.disabledTitles=this.disabledTitles.add(this.element.find(this.options.items).addBack().filter(function(){var t=k(this);if(t.is("[title]"))return t.data("ui-tooltip-title",t.attr("title")).removeAttr("title")}))},_enable:function(){this.disabledTitles.each(function(){var t=k(this);t.data("ui-tooltip-title")&&t.attr("title",t.data("ui-tooltip-title"))}),this.disabledTitles=k([])},open:function(t){var i=this,e=k(t?t.target:this.element).closest(this.options.items);e.length&&!e.data("ui-tooltip-id")&&(e.attr("title")&&e.data("ui-tooltip-title",e.attr("title")),e.data("ui-tooltip-open",!0),t&&"mouseover"===t.type&&e.parents().each(function(){var t,e=k(this);e.data("ui-tooltip-open")&&((t=k.Event("blur")).target=t.currentTarget=this,i.close(t,!0)),e.attr("title")&&(e.uniqueId(),i.parents[this.id]={element:this,title:e.attr("title")},e.attr("title",""))}),this._registerCloseHandlers(t,e),this._updateContent(e,t))},_updateContent:function(e,i){var t,n=this.options.content,s=this,r=i?i.type:null;if("string"==typeof n||n.nodeType||n.jquery)return this._open(i,e,n);(t=n.call(e[0],function(t){s._delay(function(){e.data("ui-tooltip-open")&&(i&&(i.type=r),this._open(i,e,t))})}))&&this._open(i,e,t)},_open:function(t,e,i){var n,s,r,a,o=k.extend({},this.options.position);function l(t){o.of=t,s.is(":hidden")||s.position(o)}i&&((n=this._find(e))?n.tooltip.find(".ui-tooltip-content").html(i):(e.is("[title]")&&(t&&"mouseover"===t.type?e.attr("title",""):e.removeAttr("title")),n=this._tooltip(e),s=n.tooltip,this._addDescribedBy(e,s.attr("id")),s.find(".ui-tooltip-content").html(i),this.liveRegion.children().hide(),(a=k("<div>").html(s.find(".ui-tooltip-content").html())).removeAttr("name").find("[name]").removeAttr("name"),a.removeAttr("id").find("[id]").removeAttr("id"),a.appendTo(this.liveRegion),this.options.track&&t&&/^mouse/.test(t.type)?(this._on(this.document,{mousemove:l}),l(t)):s.position(k.extend({of:e},this.options.position)),s.hide(),this._show(s,this.options.show),this.options.track&&this.options.show&&this.options.show.delay&&(r=this.delayedShow=setInterval(function(){s.is(":visible")&&(l(o.of),clearInterval(r))},k.fx.interval)),this._trigger("open",t,{tooltip:s})))},_registerCloseHandlers:function(t,i){var e={keyup:function(t){if(t.keyCode===k.ui.keyCode.ESCAPE){var e=k.Event(t);e.currentTarget=i[0],this.close(e,!0)}}};i[0]!==this.element[0]&&(e.remove=function(){this._removeTooltip(this._find(i).tooltip)}),t&&"mouseover"!==t.type||(e.mouseleave="close"),t&&"focusin"!==t.type||(e.focusout="close"),this._on(!0,i,e)},close:function(t){var e,i=this,n=k(t?t.currentTarget:this.element),s=this._find(n);s?(e=s.tooltip,s.closing||(clearInterval(this.delayedShow),n.data("ui-tooltip-title")&&!n.attr("title")&&n.attr("title",n.data("ui-tooltip-title")),this._removeDescribedBy(n),s.hiding=!0,e.stop(!0),this._hide(e,this.options.hide,function(){i._removeTooltip(k(this))}),n.removeData("ui-tooltip-open"),this._off(n,"mouseleave focusout keyup"),n[0]!==this.element[0]&&this._off(n,"remove"),this._off(this.document,"mousemove"),t&&"mouseleave"===t.type&&k.each(this.parents,function(t,e){k(e.element).attr("title",e.title),delete i.parents[t]}),s.closing=!0,this._trigger("close",t,{tooltip:e}),s.hiding||(s.closing=!1))):n.removeData("ui-tooltip-open")},_tooltip:function(t){var e=k("<div>").attr("role","tooltip"),i=k("<div>").appendTo(e),n=e.uniqueId().attr("id");return this._addClass(i,"ui-tooltip-content"),this._addClass(e,"ui-tooltip","ui-widget ui-widget-content"),e.appendTo(this._appendTo(t)),this.tooltips[n]={element:t,tooltip:e}},_find:function(t){var e=t.data("ui-tooltip-id");return e?this.tooltips[e]:null},_removeTooltip:function(t){t.remove(),delete this.tooltips[t.attr("id")]},_appendTo:function(t){var e=t.closest(".ui-front, dialog");return e.length||(e=this.document[0].body),e},_destroy:function(){var s=this;k.each(this.tooltips,function(t,e){var i=k.Event("blur"),n=e.element;i.target=i.currentTarget=n[0],s.close(i,!0),k("#"+t).remove(),n.data("ui-tooltip-title")&&(n.attr("title")||n.attr("title",n.data("ui-tooltip-title")),n.removeData("ui-tooltip-title"))}),this.liveRegion.remove()}}),!1!==k.uiBackCompat&&k.widget("ui.tooltip",k.ui.tooltip,{options:{tooltipClass:null},_tooltip:function(){var t=this._superApply(arguments);return this.options.tooltipClass&&t.tooltip.addClass(this.options.tooltipClass),t}});k.ui.tooltip},s=[i(0)],void 0===(r="function"==typeof(n=a)?n.apply(e,s):n)||(t.exports=r)},function(t,e){!function(u){if(!u.hasInitialised){var h={escapeRegExp:function(t){return t.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")},hasClass:function(t,e){return 1===t.nodeType&&0<=(" "+t.className+" ").replace(/[\n\t]/g," ").indexOf(" "+e+" ")},addClass:function(t,e){t.className+=" "+e},removeClass:function(t,e){var i=new RegExp("\\b"+this.escapeRegExp(e)+"\\b");t.className=t.className.replace(i,"")},interpolateString:function(t,e){return t.replace(/{{([a-z][a-z0-9\-_]*)}}/gi,function(t){return e(arguments[1])||""})},getCookie:function(t){var e=("; "+document.cookie).split("; "+t+"=");return 2!=e.length?void 0:e.pop().split(";").shift()},setCookie:function(t,e,i,n,s){var r=new Date;r.setDate(r.getDate()+(i||365));var a=[t+"="+e,"expires="+r.toUTCString(),"path="+(s||"/")];n&&a.push("domain="+n),document.cookie=a.join(";")},deepExtend:function(t,e){for(var i in e)e.hasOwnProperty(i)&&(i in t&&this.isPlainObject(t[i])&&this.isPlainObject(e[i])?this.deepExtend(t[i],e[i]):t[i]=e[i]);return t},throttle:function(t,e){var i=!1;return function(){i||(t.apply(this,arguments),i=!0,setTimeout(function(){i=!1},e))}},hash:function(t){var e,i,n=0;if(0===t.length)return n;for(e=0,i=t.length;e<i;++e)n=(n<<5)-n+t.charCodeAt(e),n|=0;return n},normaliseHex:function(t){return"#"==t[0]&&(t=t.substr(1)),3==t.length&&(t=t[0]+t[0]+t[1]+t[1]+t[2]+t[2]),t},getContrast:function(t){return t=this.normaliseHex(t),128<=(299*parseInt(t.substr(0,2),16)+587*parseInt(t.substr(2,2),16)+114*parseInt(t.substr(4,2),16))/1e3?"#000":"#fff"},getLuminance:function(t){var e=parseInt(this.normaliseHex(t),16),i=38+(e>>16),n=38+(e>>8&255),s=38+(255&e);return"#"+(16777216+65536*(i<255?i<1?0:i:255)+256*(n<255?n<1?0:n:255)+(s<255?s<1?0:s:255)).toString(16).slice(1)},isMobile:function(){return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)},isPlainObject:function(t){return"object"==typeof t&&null!==t&&t.constructor==Object}};u.status={deny:"deny",allow:"allow",dismiss:"dismiss"},u.transitionEnd=function(){var t=document.createElement("div"),e={t:"transitionend",OT:"oTransitionEnd",msT:"MSTransitionEnd",MozT:"transitionend",WebkitT:"webkitTransitionEnd"};for(var i in e)if(e.hasOwnProperty(i)&&void 0!==t.style[i+"ransition"])return e[i];return""}(),u.hasTransition=!!u.transitionEnd;var r=Object.keys(u.status).map(h.escapeRegExp);u.customStyles={},u.Popup=(s={enabled:!0,container:null,cookie:{name:"cookieconsent_status",path:"/",domain:"",expiryDays:365},onPopupOpen:function(){},onPopupClose:function(){},onInitialise:function(t){},onStatusChange:function(t,e){},onRevokeChoice:function(){},content:{header:"Cookies used on the website!",message:"This website uses cookies to ensure you get the best experience on our website.",dismiss:"Got it!",allow:"Allow cookies",deny:"Decline",link:"Learn more",href:"http://cookiesandyou.com",close:"&#x274c;"},elements:{header:'<span class="cc-header">{{header}}</span>&nbsp;',message:'<span id="cookieconsent:desc" class="cc-message">{{message}}</span>',messagelink:'<span id="cookieconsent:desc" class="cc-message">{{message}} <a aria-label="learn more about cookies" role=button tabindex="0" class="cc-link" href="{{href}}" rel="noopener noreferrer nofollow" target="_blank">{{link}}</a></span>',dismiss:'<a aria-label="dismiss cookie message" role=button tabindex="0" class="cc-btn cc-dismiss">{{dismiss}}</a>',allow:'<a aria-label="allow cookies" role=button tabindex="0"  class="cc-btn cc-allow">{{allow}}</a>',deny:'<a aria-label="deny cookies" role=button tabindex="0" class="cc-btn cc-deny">{{deny}}</a>',link:'<a aria-label="learn more about cookies" role=button tabindex="0" class="cc-link" href="{{href}}" target="_blank">{{link}}</a>',close:'<span aria-label="dismiss cookie message" role=button tabindex="0" class="cc-close">{{close}}</span>'},window:'<div role="dialog" aria-live="polite" aria-label="cookieconsent" aria-describedby="cookieconsent:desc" class="cc-window {{classes}}">\x3c!--googleoff: all--\x3e{{children}}\x3c!--googleon: all--\x3e</div>',revokeBtn:'<div class="cc-revoke {{classes}}">Cookie Policy</div>',compliance:{info:'<div class="cc-compliance">{{dismiss}}</div>',"opt-in":'<div class="cc-compliance cc-highlight">{{dismiss}}{{allow}}</div>',"opt-out":'<div class="cc-compliance cc-highlight">{{deny}}{{dismiss}}</div>'},type:"info",layouts:{basic:"{{messagelink}}{{compliance}}","basic-close":"{{messagelink}}{{compliance}}{{close}}","basic-header":"{{header}}{{message}}{{link}}{{compliance}}"},layout:"basic",position:"bottom",theme:"block",static:!1,palette:null,revokable:!1,animateRevokable:!0,showLink:!0,dismissOnScroll:!1,dismissOnTimeout:!1,autoOpen:!0,autoAttach:!0,whitelistPage:[],blacklistPage:[],overrideHTML:null},c.prototype.initialise=function(t){this.options&&this.destroy(),h.deepExtend(this.options={},s),h.isPlainObject(t)&&h.deepExtend(this.options,t),function(){var t=this.options.onInitialise.bind(this);if(!window.navigator.cookieEnabled)return t(u.status.deny),!0;if(window.CookiesOK||window.navigator.CookiesOK)return t(u.status.allow),!0;var e=Object.keys(u.status),i=this.getStatus(),n=0<=e.indexOf(i);return n&&t(i),n}.call(this)&&(this.options.enabled=!1),v(this.options.blacklistPage,location.pathname)&&(this.options.enabled=!1),v(this.options.whitelistPage,location.pathname)&&(this.options.enabled=!0);var e=this.options.window.replace("{{classes}}",m.call(this).join(" ")).replace("{{children}}",function(){var e={},i=this.options;i.showLink||(i.elements.link="",i.elements.messagelink=i.elements.message),Object.keys(i.elements).forEach(function(t){e[t]=h.interpolateString(i.elements[t],function(t){var e=i.content[t];return t&&"string"==typeof e&&e.length?e:""})});var t=i.compliance[i.type];t=t||i.compliance.info,e.compliance=h.interpolateString(t,function(t){return e[t]});var n=i.layouts[i.layout];return n=n||i.layouts.basic,h.interpolateString(n,function(t){return e[t]})}.call(this)),i=this.options.overrideHTML;if("string"==typeof i&&i.length&&(e=i),this.options.static){var n=g.call(this,'<div class="cc-grower">'+e+"</div>");n.style.display="",this.element=n.firstChild,this.element.style.display="none",h.addClass(this.element,"cc-invisible")}else this.element=g.call(this,e);(function(){var e=this.setStatus.bind(this),t=this.options.dismissOnTimeout;"number"==typeof t&&0<=t&&(this.dismissTimeout=window.setTimeout(function(){e(u.status.dismiss)},Math.floor(t)));var i=this.options.dismissOnScroll;if("number"==typeof i&&0<=i){var n=function(t){window.pageYOffset>Math.floor(i)&&(e(u.status.dismiss),window.removeEventListener("scroll",n),this.onWindowScroll=null)};this.onWindowScroll=n,window.addEventListener("scroll",n)}}).call(this),function(){if("info"!=this.options.type&&(this.options.revokable=!0),h.isMobile()&&(this.options.animateRevokable=!1),this.options.revokable){var t=f.call(this);this.options.animateRevokable&&t.push("cc-animate"),this.customStyleSelector&&t.push(this.customStyleSelector);var e=this.options.revokeBtn.replace("{{classes}}",t.join(" "));this.revokeBtn=g.call(this,e);var n=this.revokeBtn;if(this.options.animateRevokable){var i=h.throttle(function(t){var e=!1,i=window.innerHeight-20;h.hasClass(n,"cc-top")&&t.clientY<20&&(e=!0),h.hasClass(n,"cc-bottom")&&t.clientY>i&&(e=!0),e?h.hasClass(n,"cc-active")||h.addClass(n,"cc-active"):h.hasClass(n,"cc-active")&&h.removeClass(n,"cc-active")},200);this.onMouseMove=i,window.addEventListener("mousemove",i)}}}.call(this),this.options.autoOpen&&this.autoOpen()},c.prototype.destroy=function(){this.onButtonClick&&this.element&&(this.element.removeEventListener("click",this.onButtonClick),this.onButtonClick=null),this.dismissTimeout&&(clearTimeout(this.dismissTimeout),this.dismissTimeout=null),this.onWindowScroll&&(window.removeEventListener("scroll",this.onWindowScroll),this.onWindowScroll=null),this.onMouseMove&&(window.removeEventListener("mousemove",this.onMouseMove),this.onMouseMove=null),this.element&&this.element.parentNode&&this.element.parentNode.removeChild(this.element),this.element=null,this.revokeBtn&&this.revokeBtn.parentNode&&this.revokeBtn.parentNode.removeChild(this.revokeBtn),this.revokeBtn=null,function(t){if(h.isPlainObject(t)){var e=h.hash(JSON.stringify(t)),i=u.customStyles[e];if(i&&!--i.references){var n=i.element.ownerNode;n&&n.parentNode&&n.parentNode.removeChild(n),u.customStyles[e]=null}}}(this.options.palette),this.options=null},c.prototype.open=function(t){if(this.element)return this.isOpen()||(u.hasTransition?this.fadeIn():this.element.style.display="",this.options.revokable&&this.toggleRevokeButton(),this.options.onPopupOpen.call(this)),this},c.prototype.close=function(t){if(this.element)return this.isOpen()&&(u.hasTransition?this.fadeOut():this.element.style.display="none",t&&this.options.revokable&&this.toggleRevokeButton(!0),this.options.onPopupClose.call(this)),this},c.prototype.fadeIn=function(){var t=this.element;if(u.hasTransition&&t&&(this.afterTransition&&p.call(this,t),h.hasClass(t,"cc-invisible"))){if(t.style.display="",this.options.static){var e=this.element.clientHeight;this.element.parentNode.style.maxHeight=e+"px"}this.openingTimeout=setTimeout(d.bind(this,t),20)}},c.prototype.fadeOut=function(){var t=this.element;u.hasTransition&&t&&(this.openingTimeout&&(clearTimeout(this.openingTimeout),d.bind(this,t)),h.hasClass(t,"cc-invisible")||(this.options.static&&(this.element.parentNode.style.maxHeight=""),this.afterTransition=p.bind(this,t),t.addEventListener(u.transitionEnd,this.afterTransition),h.addClass(t,"cc-invisible")))},c.prototype.isOpen=function(){return this.element&&""==this.element.style.display&&(!u.hasTransition||!h.hasClass(this.element,"cc-invisible"))},c.prototype.toggleRevokeButton=function(t){this.revokeBtn&&(this.revokeBtn.style.display=t?"":"none")},c.prototype.revokeChoice=function(t){this.options.enabled=!0,this.clearStatus(),this.options.onRevokeChoice.call(this),t||this.autoOpen()},c.prototype.hasAnswered=function(t){return 0<=Object.keys(u.status).indexOf(this.getStatus())},c.prototype.hasConsented=function(t){var e=this.getStatus();return e==u.status.allow||e==u.status.dismiss},c.prototype.autoOpen=function(t){!this.hasAnswered()&&this.options.enabled&&this.open()},c.prototype.setStatus=function(t){var e=this.options.cookie,i=h.getCookie(e.name),n=0<=Object.keys(u.status).indexOf(i);0<=Object.keys(u.status).indexOf(t)?(h.setCookie(e.name,t,e.expiryDays,e.domain,e.path),this.options.onStatusChange.call(this,t,n)):this.clearStatus()},c.prototype.getStatus=function(){return h.getCookie(this.options.cookie.name)},c.prototype.clearStatus=function(){var t=this.options.cookie;h.setCookie(t.name,"",-1,t.domain,t.path)},c),u.Location=(i={timeout:5e3,services:["freegeoip","ipinfo","maxmind"],serviceDefinitions:{freegeoip:function(){return{url:"//freegeoip.net/json/?callback={callback}",isScript:!0,callback:function(t,e){try{var i=JSON.parse(e);return i.error?l(i):{code:i.country_code}}catch(t){return l({error:"Invalid response ("+t+")"})}}}},ipinfo:function(){return{url:"//ipinfo.io",headers:["Accept: application/json"],callback:function(t,e){try{var i=JSON.parse(e);return i.error?l(i):{code:i.country}}catch(t){return l({error:"Invalid response ("+t+")"})}}}},ipinfodb:function(t){return{url:"//api.ipinfodb.com/v3/ip-country/?key={api_key}&format=json&callback={callback}",isScript:!0,callback:function(t,e){try{var i=JSON.parse(e);return"ERROR"==i.statusCode?l({error:i.statusMessage}):{code:i.countryCode}}catch(t){return l({error:"Invalid response ("+t+")"})}}}},maxmind:function(){return{url:"//js.maxmind.com/js/apis/geoip2/v2.1/geoip2.js",isScript:!0,callback:function(e){return window.geoip2?void geoip2.country(function(t){try{e({code:t.country.iso_code})}catch(t){e(l(t))}},function(t){e(l(t))}):void e(new Error("Unexpected response format. The downloaded script should have exported `geoip2` to the global scope"))}}}}},n.prototype.getNextService=function(){for(var t;t=this.getServiceByIdx(++this.currentServiceIndex),this.currentServiceIndex<this.options.services.length&&!t;);return t},n.prototype.getServiceByIdx=function(t){var e=this.options.services[t];if("function"!=typeof e)return"string"==typeof e?this.options.serviceDefinitions[e]():h.isPlainObject(e)?this.options.serviceDefinitions[e.name](e):null;var i=e();return i.name&&h.deepExtend(i,this.options.serviceDefinitions[i.name](i)),i},n.prototype.locate=function(t,e){var i=this.getNextService();return i?(this.callbackComplete=t,this.callbackError=e,void this.runService(i,this.runNextServiceOnError.bind(this))):void e(new Error("No services to run"))},n.prototype.setupUrl=function(n){var s=this.getCurrentServiceOpts();return n.url.replace(/\{(.*?)\}/g,function(t,e){if("callback"===e){var i="callback"+Date.now();return window[i]=function(t){n.__JSONP_DATA=JSON.stringify(t)},i}if(e in s.interpolateUrl)return s.interpolateUrl[e]})},n.prototype.runService=function(i,n){var s=this;i&&i.url&&i.callback&&(i.isScript?a:o)(this.setupUrl(i),function(t){var e=t?t.responseText:"";i.__JSONP_DATA&&(e=i.__JSONP_DATA,delete i.__JSONP_DATA),s.runServiceCallback.call(s,n,i,e)},this.options.timeout,i.data,i.headers)},n.prototype.runServiceCallback=function(e,t,i){var n=this,s=t.callback(function(t){s||n.onServiceResult.call(n,e,t)},i);s&&this.onServiceResult.call(this,e,s)},n.prototype.onServiceResult=function(t,e){e instanceof Error||e&&e.error?t.call(this,e,null):t.call(this,null,e)},n.prototype.runNextServiceOnError=function(t,e){if(t){this.logError(t);var i=this.getNextService();i?this.runService(i,this.runNextServiceOnError.bind(this)):this.completeService.call(this,this.callbackError,new Error("All services failed"))}else this.completeService.call(this,this.callbackComplete,e)},n.prototype.getCurrentServiceOpts=function(){var t=this.options.services[this.currentServiceIndex];return"string"==typeof t?{name:t}:"function"==typeof t?t():h.isPlainObject(t)?t:{}},n.prototype.completeService=function(t,e){this.currentServiceIndex=-1,t&&t(e)},n.prototype.logError=function(t){var e=this.currentServiceIndex,i=this.getServiceByIdx(e);console.error("The service["+e+"] ("+i.url+") responded with the following error",t)},n),u.Law=(e={regionalLaw:!0,hasLaw:["AT","BE","BG","HR","CZ","CY","DK","EE","FI","FR","DE","EL","HU","IE","IT","LV","LT","LU","MT","NL","PL","PT","SK","SI","ES","SE","GB","UK"],revokable:["HR","CY","DK","EE","FR","DE","LV","LT","NL","PT","ES"],explicitAction:["HR","IT","ES"]},t.prototype.initialise=function(t){h.deepExtend(this.options={},e),h.isPlainObject(t)&&h.deepExtend(this.options,t)},t.prototype.get=function(t){var e=this.options;return{hasLaw:0<=e.hasLaw.indexOf(t),revokable:0<=e.revokable.indexOf(t),explicitAction:0<=e.explicitAction.indexOf(t)}},t.prototype.applyLaw=function(t,e){var i=this.get(e);return i.hasLaw||(t.enabled=!1),this.options.regionalLaw&&(i.revokable&&(t.revokable=!0),i.explicitAction&&(t.dismissOnScroll=!1,t.dismissOnTimeout=!1)),t},t),u.initialise=function(e,i,n){var s=new u.Law(e.law);i=i||function(){},n=n||function(){},u.getCountryCode(e,function(t){delete e.law,delete e.location,t.code&&(e=s.applyLaw(e,t.code)),i(new u.Popup(e))},function(t){delete e.law,delete e.location,n(t,new u.Popup(e))})},u.getCountryCode=function(t,e,i){t.law&&t.law.countryCode?e({code:t.law.countryCode}):t.location?new u.Location(t.location).locate(function(t){e(t||{})},i):e({})},u.utils=h,u.hasInitialised=!0,window.cookieconsent=u}function t(t){this.initialise.apply(this,arguments)}var e,i,s;function n(t){h.deepExtend(this.options={},i),h.isPlainObject(t)&&h.deepExtend(this.options,t),this.currentServiceIndex=-1}function a(t,e,i){var n,s=document.createElement("script");s.type="text/"+(t.type||"javascript"),s.src=t.src||t,s.async=!1,s.onreadystatechange=s.onload=function(){var t=s.readyState;clearTimeout(n),e.done||t&&!/loaded|complete/.test(t)||(e.done=!0,e(),s.onreadystatechange=s.onload=null)},document.body.appendChild(s),n=setTimeout(function(){e.done=!0,e(),s.onreadystatechange=s.onload=null},i)}function o(t,e,i,n,s){var r=new(window.XMLHttpRequest||window.ActiveXObject)("MSXML2.XMLHTTP.3.0");if(r.open(n?"POST":"GET",t,1),r.setRequestHeader("X-Requested-With","XMLHttpRequest"),r.setRequestHeader("Content-type","application/x-www-form-urlencoded"),Array.isArray(s))for(var a=0,o=s.length;a<o;++a){var l=s[a].split(":",2);r.setRequestHeader(l[0].replace(/^\s+|\s+$/g,""),l[1].replace(/^\s+|\s+$/g,""))}"function"==typeof e&&(r.onreadystatechange=function(){3<r.readyState&&e(r)}),r.send(n)}function l(t){return new Error("Error ["+(t.code||"UNKNOWN")+"]: "+t.error)}function c(){this.initialise.apply(this,arguments)}function d(t){this.openingTimeout=null,h.removeClass(t,"cc-invisible")}function p(t){t.style.display="none",t.removeEventListener(u.transitionEnd,this.afterTransition),this.afterTransition=null}function f(){var t=this.options.position.split("-"),e=[];return t.forEach(function(t){e.push("cc-"+t)}),e}function m(){var t=this.options,e="top"==t.position||"bottom"==t.position?"banner":"floating";h.isMobile()&&(e="floating");var i=["cc-"+e,"cc-type-"+t.type,"cc-theme-"+t.theme];return t.static&&i.push("cc-static"),i.push.apply(i,f.call(this)),function(t){var e=h.hash(JSON.stringify(t)),i="cc-color-override-"+e,n=h.isPlainObject(t);return this.customStyleSelector=n?i:null,n&&function(t,e,i){if(u.customStyles[t])return++u.customStyles[t].references;var n={},s=e.popup,r=e.button,a=e.highlight;s&&(s.text=s.text?s.text:h.getContrast(s.background),s.link=s.link?s.link:s.text,n[i+".cc-window"]=["color: "+s.text,"background-color: "+s.background],n[i+".cc-revoke"]=["color: "+s.text,"background-color: "+s.background],n[i+" .cc-link,"+i+" .cc-link:active,"+i+" .cc-link:visited"]=["color: "+s.link],r&&(r.text=r.text?r.text:h.getContrast(r.background),r.border=r.border?r.border:"transparent",n[i+" .cc-btn"]=["color: "+r.text,"border-color: "+r.border,"background-color: "+r.background],"transparent"!=r.background&&(n[i+" .cc-btn:hover, "+i+" .cc-btn:focus"]=["background-color: "+function(t){return"000000"==(t=h.normaliseHex(t))?"#222":h.getLuminance(t)}(r.background)]),a?(a.text=a.text?a.text:h.getContrast(a.background),a.border=a.border?a.border:"transparent",n[i+" .cc-highlight .cc-btn:first-child"]=["color: "+a.text,"border-color: "+a.border,"background-color: "+a.background]):n[i+" .cc-highlight .cc-btn:first-child"]=["color: "+s.text]));var o=document.createElement("style");document.head.appendChild(o),u.customStyles[t]={references:1,element:o.sheet};var l=-1;for(var c in n)n.hasOwnProperty(c)&&o.sheet.insertRule(c+"{"+n[c].join(";")+"}",++l)}(e,t,"."+i),n}.call(this,this.options.palette),this.customStyleSelector&&i.push(this.customStyleSelector),i}function g(t){var e=this.options,i=document.createElement("div"),n=e.container&&1===e.container.nodeType?e.container:document.body;i.innerHTML=t;var s=i.children[0];return s.style.display="none",h.hasClass(s,"cc-window")&&u.hasTransition&&h.addClass(s,"cc-invisible"),this.onButtonClick=function(t){var e=t.target;if(h.hasClass(e,"cc-btn")){var i=e.className.match(new RegExp("\\bcc-("+r.join("|")+")\\b")),n=i&&i[1]||!1;n&&(this.setStatus(n),this.close(!0))}h.hasClass(e,"cc-close")&&(this.setStatus(u.status.dismiss),this.close(!0)),h.hasClass(e,"cc-revoke")&&this.revokeChoice()}.bind(this),s.addEventListener("click",this.onButtonClick),e.autoAttach&&(n.firstChild?n.insertBefore(s,n.firstChild):n.appendChild(s)),s}function v(t,e){for(var i=0,n=t.length;i<n;++i){var s=t[i];if(s instanceof RegExp&&s.test(e)||"string"==typeof s&&s.length&&s===e)return!0}return!1}}(window.cookieconsent||{})},function(e,t,i){(function(t){e.exports=t.$=i(24)}).call(t,i(1))},function(s,t,r){(function(t){var e,i=void 0!==t?t:"undefined"!=typeof window?window:{},n=r(28);e="undefined"!=typeof document?document:(e=i["__GLOBAL_DOCUMENT_CACHE@4"])||(i["__GLOBAL_DOCUMENT_CACHE@4"]=n),s.exports=e}).call(t,r(1))},function(i,t,e){(function(t){var e;e="undefined"!=typeof window?window:void 0!==t?t:"undefined"!=typeof self?self:{},i.exports=e}).call(t,e(1))},function(e,i,n){var s,r,a;!function(t){"use strict";r=[n(0)],void 0===(a="function"==typeof(s=t)?s.apply(i,r):s)||(e.exports=a)}(function(l){function c(t){return parseFloat(t)||0}function u(t){var e=l(t),n=null,s=[];return e.each(function(){var t=l(this),e=t.offset().top-c(t.css("margin-top")),i=0<s.length?s[s.length-1]:null;null===i?s.push(t):Math.floor(Math.abs(n-e))<=1?s[s.length-1]=i.add(t):s.push(t),n=e}),s}function h(t){var e={byRow:!0,property:"height",target:null,remove:!1};return"object"==typeof t?l.extend(e,t):("boolean"==typeof t?e.byRow=t:"remove"===t&&(e.remove=!0),e)}var n=-1,s=-1,d=l.fn.matchHeight=function(t){var e=h(t);if(e.remove){var i=this;return this.css(e.property,""),l.each(d._groups,function(t,e){e.elements=e.elements.not(i)}),this}return this.length<=1&&!e.target||(d._groups.push({elements:this,options:e}),d._apply(this,e)),this};d.version="0.7.2",d._groups=[],d._throttle=80,d._maintainScroll=!1,d._beforeUpdate=null,d._afterUpdate=null,d._rows=u,d._parse=c,d._parseOptions=h,d._apply=function(t,e){var r=h(e),i=l(t),n=[i],s=l(window).scrollTop(),a=l("html").outerHeight(!0),o=i.parents().filter(":hidden");return o.each(function(){var t=l(this);t.data("style-cache",t.attr("style"))}),o.css("display","block"),r.byRow&&!r.target&&(i.each(function(){var t=l(this),e=t.css("display");"inline-block"!==e&&"flex"!==e&&"inline-flex"!==e&&(e="block"),t.data("style-cache",t.attr("style")),t.css({display:e,"padding-top":"0","padding-bottom":"0","margin-top":"0","margin-bottom":"0","border-top-width":"0","border-bottom-width":"0",height:"100px",overflow:"hidden"})}),n=u(i),i.each(function(){var t=l(this);t.attr("style",t.data("style-cache")||"")})),l.each(n,function(t,e){var i=l(e),s=0;if(r.target)s=r.target.outerHeight(!1);else{if(r.byRow&&i.length<=1)return void i.css(r.property,"");i.each(function(){var t=l(this),e=t.attr("style"),i=t.css("display");"inline-block"!==i&&"flex"!==i&&"inline-flex"!==i&&(i="block");var n={display:i};n[r.property]="",t.css(n),t.outerHeight(!1)>s&&(s=t.outerHeight(!1)),e?t.attr("style",e):t.css("display","")})}i.each(function(){var t=l(this),e=0;r.target&&t.is(r.target)||("border-box"!==t.css("box-sizing")&&(e+=c(t.css("border-top-width"))+c(t.css("border-bottom-width")),e+=c(t.css("padding-top"))+c(t.css("padding-bottom"))),t.css(r.property,s-e+"px"))})}),o.each(function(){var t=l(this);t.attr("style",t.data("style-cache")||null)}),d._maintainScroll&&l(window).scrollTop(s/a*l("html").outerHeight(!0)),this},d._applyDataApi=function(){var i={};l("[data-match-height], [data-mh]").each(function(){var t=l(this),e=t.attr("data-mh")||t.attr("data-match-height");i[e]=e in i?i[e].add(t):t}),l.each(i,function(){this.matchHeight(!0)})};function r(t){d._beforeUpdate&&d._beforeUpdate(t,d._groups),l.each(d._groups,function(){d._apply(this.elements,this.options)}),d._afterUpdate&&d._afterUpdate(t,d._groups)}d._update=function(t,e){if(e&&"resize"===e.type){var i=l(window).width();if(i===n)return;n=i}t?-1===s&&(s=setTimeout(function(){r(e),s=-1},d._throttle)):r(e)},l(d._applyDataApi);var t=l.fn.on?"on":"bind";l(window)[t]("load",function(t){d._update(!1,t)}),l(window)[t]("resize orientationchange",function(t){d._update(!0,t)})})},function(Xe,Ke,t){var Qe;!function(t,e){"use strict";"object"==typeof Xe&&"object"==typeof Xe.exports?Xe.exports=t.document?e(t,!0):function(t){if(!t.document)throw new Error("jQuery requires a window with a document");return e(t)}:e(t)}("undefined"!=typeof window?window:this,function(k,t){"use strict";var e=[],S=k.document,n=Object.getPrototypeOf,o=e.slice,m=e.concat,l=e.push,s=e.indexOf,i={},r=i.toString,f=i.hasOwnProperty,a=f.toString,c=a.call(Object),g={};function v(t,e){var i=(e=e||S).createElement("script");i.text=t,e.head.appendChild(i).parentNode.removeChild(i)}function u(t,e){return e.toUpperCase()}var C=function(t,e){return new C.fn.init(t,e)},h=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,d=/^-ms-/,p=/-([a-z])/g;function y(t){var e=!!t&&"length"in t&&t.length,i=C.type(t);return"function"!==i&&!C.isWindow(t)&&("array"===i||0===e||"number"==typeof e&&0<e&&e-1 in t)}C.fn=C.prototype={jquery:"3.2.1",constructor:C,length:0,toArray:function(){return o.call(this)},get:function(t){return null==t?o.call(this):t<0?this[t+this.length]:this[t]},pushStack:function(t){var e=C.merge(this.constructor(),t);return e.prevObject=this,e},each:function(t){return C.each(this,t)},map:function(i){return this.pushStack(C.map(this,function(t,e){return i.call(t,e,t)}))},slice:function(){return this.pushStack(o.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(t){var e=this.length,i=+t+(t<0?e:0);return this.pushStack(0<=i&&i<e?[this[i]]:[])},end:function(){return this.prevObject||this.constructor()},push:l,sort:e.sort,splice:e.splice},C.extend=C.fn.extend=function(){var t,e,i,n,s,r,a=arguments[0]||{},o=1,l=arguments.length,c=!1;for("boolean"==typeof a&&(c=a,a=arguments[o]||{},o++),"object"==typeof a||C.isFunction(a)||(a={}),o===l&&(a=this,o--);o<l;o++)if(null!=(t=arguments[o]))for(e in t)i=a[e],a!==(n=t[e])&&(c&&n&&(C.isPlainObject(n)||(s=Array.isArray(n)))?(r=s?(s=!1,i&&Array.isArray(i)?i:[]):i&&C.isPlainObject(i)?i:{},a[e]=C.extend(c,r,n)):void 0!==n&&(a[e]=n));return a},C.extend({expando:"jQuery"+("3.2.1"+Math.random()).replace(/\D/g,""),isReady:!0,error:function(t){throw new Error(t)},noop:function(){},isFunction:function(t){return"function"===C.type(t)},isWindow:function(t){return null!=t&&t===t.window},isNumeric:function(t){var e=C.type(t);return("number"===e||"string"===e)&&!isNaN(t-parseFloat(t))},isPlainObject:function(t){var e,i;return!(!t||"[object Object]"!==r.call(t))&&(!(e=n(t))||"function"==typeof(i=f.call(e,"constructor")&&e.constructor)&&a.call(i)===c)},isEmptyObject:function(t){var e;for(e in t)return!1;return!0},type:function(t){return null==t?t+"":"object"==typeof t||"function"==typeof t?i[r.call(t)]||"object":typeof t},globalEval:function(t){v(t)},camelCase:function(t){return t.replace(d,"ms-").replace(p,u)},each:function(t,e){var i,n=0;if(y(t))for(i=t.length;n<i&&!1!==e.call(t[n],n,t[n]);n++);else for(n in t)if(!1===e.call(t[n],n,t[n]))break;return t},trim:function(t){return null==t?"":(t+"").replace(h,"")},makeArray:function(t,e){var i=e||[];return null!=t&&(y(Object(t))?C.merge(i,"string"==typeof t?[t]:t):l.call(i,t)),i},inArray:function(t,e,i){return null==e?-1:s.call(e,t,i)},merge:function(t,e){for(var i=+e.length,n=0,s=t.length;n<i;n++)t[s++]=e[n];return t.length=s,t},grep:function(t,e,i){for(var n=[],s=0,r=t.length,a=!i;s<r;s++)!e(t[s],s)!=a&&n.push(t[s]);return n},map:function(t,e,i){var n,s,r=0,a=[];if(y(t))for(n=t.length;r<n;r++)null!=(s=e(t[r],r,i))&&a.push(s);else for(r in t)null!=(s=e(t[r],r,i))&&a.push(s);return m.apply([],a)},guid:1,proxy:function(t,e){var i,n,s;if("string"==typeof e&&(i=t[e],e=t,t=i),C.isFunction(t))return n=o.call(arguments,2),(s=function(){return t.apply(e||this,n.concat(o.call(arguments)))}).guid=t.guid=t.guid||C.guid++,s},now:Date.now,support:g}),"function"==typeof Symbol&&(C.fn[Symbol.iterator]=e[Symbol.iterator]),C.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(t,e){i["[object "+e+"]"]=e.toLowerCase()});var _=function(i){function h(t,e,i){var n="0x"+e-65536;return n!=n||i?e:n<0?String.fromCharCode(65536+n):String.fromCharCode(n>>10|55296,1023&n|56320)}function s(){w()}var t,p,b,r,a,f,d,m,T,l,c,w,k,o,S,g,u,v,y,C="sizzle"+1*new Date,_=i.document,x=0,n=0,E=at(),D=at(),A=at(),I=function(t,e){return t===e&&(c=!0),0},O={}.hasOwnProperty,e=[],P=e.pop,L=e.push,M=e.push,N=e.slice,R=function(t,e){for(var i=0,n=t.length;i<n;i++)if(t[i]===e)return i;return-1},U="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",j="[\\x20\\t\\r\\n\\f]",B="(?:\\\\.|[\\w-]|[^\0-\\xa0])+",H="\\["+j+"*("+B+")(?:"+j+"*([*^$|!~]?=)"+j+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+B+"))|)"+j+"*\\]",F=":("+B+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+H+")*)|.*)\\)|)",z=new RegExp(j+"+","g"),W=new RegExp("^"+j+"+|((?:^|[^\\\\])(?:\\\\.)*)"+j+"+$","g"),$=new RegExp("^"+j+"*,"+j+"*"),q=new RegExp("^"+j+"*([>+~]|"+j+")"+j+"*"),V=new RegExp("="+j+"*([^\\]'\"]*?)"+j+"*\\]","g"),Y=new RegExp(F),G=new RegExp("^"+B+"$"),X={ID:new RegExp("^#("+B+")"),CLASS:new RegExp("^\\.("+B+")"),TAG:new RegExp("^("+B+"|[*])"),ATTR:new RegExp("^"+H),PSEUDO:new RegExp("^"+F),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+j+"*(even|odd|(([+-]|)(\\d*)n|)"+j+"*(?:([+-]|)"+j+"*(\\d+)|))"+j+"*\\)|)","i"),bool:new RegExp("^(?:"+U+")$","i"),needsContext:new RegExp("^"+j+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+j+"*((?:-\\d)?\\d*)"+j+"*\\)|)(?=[^-]|$)","i")},K=/^(?:input|select|textarea|button)$/i,Q=/^h\d$/i,J=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,tt=/[+~]/,et=new RegExp("\\\\([\\da-f]{1,6}"+j+"?|("+j+")|.)","ig"),it=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,nt=function(t,e){return e?"\0"===t?"�":t.slice(0,-1)+"\\"+t.charCodeAt(t.length-1).toString(16)+" ":"\\"+t},st=yt(function(t){return!0===t.disabled&&("form"in t||"label"in t)},{dir:"parentNode",next:"legend"});try{M.apply(e=N.call(_.childNodes),_.childNodes),e[_.childNodes.length].nodeType}catch(t){M={apply:e.length?function(t,e){L.apply(t,N.call(e))}:function(t,e){for(var i=t.length,n=0;t[i++]=e[n++];);t.length=i-1}}}function rt(t,e,i,n){var s,r,a,o,l,c,u,h=e&&e.ownerDocument,d=e?e.nodeType:9;if(i=i||[],"string"!=typeof t||!t||1!==d&&9!==d&&11!==d)return i;if(!n&&((e?e.ownerDocument||e:_)!==k&&w(e),e=e||k,S)){if(11!==d&&(l=Z.exec(t)))if(s=l[1]){if(9===d){if(!(a=e.getElementById(s)))return i;if(a.id===s)return i.push(a),i}else if(h&&(a=h.getElementById(s))&&y(e,a)&&a.id===s)return i.push(a),i}else{if(l[2])return M.apply(i,e.getElementsByTagName(t)),i;if((s=l[3])&&p.getElementsByClassName&&e.getElementsByClassName)return M.apply(i,e.getElementsByClassName(s)),i}if(p.qsa&&!A[t+" "]&&(!g||!g.test(t))){if(1!==d)h=e,u=t;else if("object"!==e.nodeName.toLowerCase()){for((o=e.getAttribute("id"))?o=o.replace(it,nt):e.setAttribute("id",o=C),r=(c=f(t)).length;r--;)c[r]="#"+o+" "+vt(c[r]);u=c.join(","),h=tt.test(t)&&mt(e.parentNode)||e}if(u)try{return M.apply(i,h.querySelectorAll(u)),i}catch(t){}finally{o===C&&e.removeAttribute("id")}}}return m(t.replace(W,"$1"),e,i,n)}function at(){var n=[];return function t(e,i){return n.push(e+" ")>b.cacheLength&&delete t[n.shift()],t[e+" "]=i}}function ot(t){return t[C]=!0,t}function lt(t){var e=k.createElement("fieldset");try{return!!t(e)}catch(t){return!1}finally{e.parentNode&&e.parentNode.removeChild(e),e=null}}function ct(t,e){for(var i=t.split("|"),n=i.length;n--;)b.attrHandle[i[n]]=e}function ut(t,e){var i=e&&t,n=i&&1===t.nodeType&&1===e.nodeType&&t.sourceIndex-e.sourceIndex;if(n)return n;if(i)for(;i=i.nextSibling;)if(i===e)return-1;return t?1:-1}function ht(e){return function(t){return"input"===t.nodeName.toLowerCase()&&t.type===e}}function dt(i){return function(t){var e=t.nodeName.toLowerCase();return("input"===e||"button"===e)&&t.type===i}}function pt(e){return function(t){return"form"in t?t.parentNode&&!1===t.disabled?"label"in t?"label"in t.parentNode?t.parentNode.disabled===e:t.disabled===e:t.isDisabled===e||t.isDisabled!==!e&&st(t)===e:t.disabled===e:"label"in t&&t.disabled===e}}function ft(a){return ot(function(r){return r=+r,ot(function(t,e){for(var i,n=a([],t.length,r),s=n.length;s--;)t[i=n[s]]&&(t[i]=!(e[i]=t[i]))})})}function mt(t){return t&&void 0!==t.getElementsByTagName&&t}for(t in p=rt.support={},a=rt.isXML=function(t){var e=t&&(t.ownerDocument||t).documentElement;return!!e&&"HTML"!==e.nodeName},w=rt.setDocument=function(t){var e,i,n=t?t.ownerDocument||t:_;return n!==k&&9===n.nodeType&&n.documentElement&&(o=(k=n).documentElement,S=!a(k),_!==k&&(i=k.defaultView)&&i.top!==i&&(i.addEventListener?i.addEventListener("unload",s,!1):i.attachEvent&&i.attachEvent("onunload",s)),p.attributes=lt(function(t){return t.className="i",!t.getAttribute("className")}),p.getElementsByTagName=lt(function(t){return t.appendChild(k.createComment("")),!t.getElementsByTagName("*").length}),p.getElementsByClassName=J.test(k.getElementsByClassName),p.getById=lt(function(t){return o.appendChild(t).id=C,!k.getElementsByName||!k.getElementsByName(C).length}),p.getById?(b.filter.ID=function(t){var e=t.replace(et,h);return function(t){return t.getAttribute("id")===e}},b.find.ID=function(t,e){if(void 0!==e.getElementById&&S){var i=e.getElementById(t);return i?[i]:[]}}):(b.filter.ID=function(t){var i=t.replace(et,h);return function(t){var e=void 0!==t.getAttributeNode&&t.getAttributeNode("id");return e&&e.value===i}},b.find.ID=function(t,e){if(void 0!==e.getElementById&&S){var i,n,s,r=e.getElementById(t);if(r){if((i=r.getAttributeNode("id"))&&i.value===t)return[r];for(s=e.getElementsByName(t),n=0;r=s[n++];)if((i=r.getAttributeNode("id"))&&i.value===t)return[r]}return[]}}),b.find.TAG=p.getElementsByTagName?function(t,e){return void 0!==e.getElementsByTagName?e.getElementsByTagName(t):p.qsa?e.querySelectorAll(t):void 0}:function(t,e){var i,n=[],s=0,r=e.getElementsByTagName(t);if("*"!==t)return r;for(;i=r[s++];)1===i.nodeType&&n.push(i);return n},b.find.CLASS=p.getElementsByClassName&&function(t,e){if(void 0!==e.getElementsByClassName&&S)return e.getElementsByClassName(t)},u=[],g=[],(p.qsa=J.test(k.querySelectorAll))&&(lt(function(t){o.appendChild(t).innerHTML="<a id='"+C+"'></a><select id='"+C+"-\r\\' msallowcapture=''><option selected=''></option></select>",t.querySelectorAll("[msallowcapture^='']").length&&g.push("[*^$]="+j+"*(?:''|\"\")"),t.querySelectorAll("[selected]").length||g.push("\\["+j+"*(?:value|"+U+")"),t.querySelectorAll("[id~="+C+"-]").length||g.push("~="),t.querySelectorAll(":checked").length||g.push(":checked"),t.querySelectorAll("a#"+C+"+*").length||g.push(".#.+[+~]")}),lt(function(t){t.innerHTML="<a href='' disabled='disabled'></a><select disabled='disabled'><option/></select>";var e=k.createElement("input");e.setAttribute("type","hidden"),t.appendChild(e).setAttribute("name","D"),t.querySelectorAll("[name=d]").length&&g.push("name"+j+"*[*^$|!~]?="),2!==t.querySelectorAll(":enabled").length&&g.push(":enabled",":disabled"),o.appendChild(t).disabled=!0,2!==t.querySelectorAll(":disabled").length&&g.push(":enabled",":disabled"),t.querySelectorAll("*,:x"),g.push(",.*:")})),(p.matchesSelector=J.test(v=o.matches||o.webkitMatchesSelector||o.mozMatchesSelector||o.oMatchesSelector||o.msMatchesSelector))&&lt(function(t){p.disconnectedMatch=v.call(t,"*"),v.call(t,"[s!='']:x"),u.push("!=",F)}),g=g.length&&new RegExp(g.join("|")),u=u.length&&new RegExp(u.join("|")),e=J.test(o.compareDocumentPosition),y=e||J.test(o.contains)?function(t,e){var i=9===t.nodeType?t.documentElement:t,n=e&&e.parentNode;return t===n||!(!n||1!==n.nodeType||!(i.contains?i.contains(n):t.compareDocumentPosition&&16&t.compareDocumentPosition(n)))}:function(t,e){if(e)for(;e=e.parentNode;)if(e===t)return!0;return!1},I=e?function(t,e){if(t===e)return c=!0,0;var i=!t.compareDocumentPosition-!e.compareDocumentPosition;return i||(1&(i=(t.ownerDocument||t)===(e.ownerDocument||e)?t.compareDocumentPosition(e):1)||!p.sortDetached&&e.compareDocumentPosition(t)===i?t===k||t.ownerDocument===_&&y(_,t)?-1:e===k||e.ownerDocument===_&&y(_,e)?1:l?R(l,t)-R(l,e):0:4&i?-1:1)}:function(t,e){if(t===e)return c=!0,0;var i,n=0,s=t.parentNode,r=e.parentNode,a=[t],o=[e];if(!s||!r)return t===k?-1:e===k?1:s?-1:r?1:l?R(l,t)-R(l,e):0;if(s===r)return ut(t,e);for(i=t;i=i.parentNode;)a.unshift(i);for(i=e;i=i.parentNode;)o.unshift(i);for(;a[n]===o[n];)n++;return n?ut(a[n],o[n]):a[n]===_?-1:o[n]===_?1:0}),k},rt.matches=function(t,e){return rt(t,null,null,e)},rt.matchesSelector=function(t,e){if((t.ownerDocument||t)!==k&&w(t),e=e.replace(V,"='$1']"),p.matchesSelector&&S&&!A[e+" "]&&(!u||!u.test(e))&&(!g||!g.test(e)))try{var i=v.call(t,e);if(i||p.disconnectedMatch||t.document&&11!==t.document.nodeType)return i}catch(t){}return 0<rt(e,k,null,[t]).length},rt.contains=function(t,e){return(t.ownerDocument||t)!==k&&w(t),y(t,e)},rt.attr=function(t,e){(t.ownerDocument||t)!==k&&w(t);var i=b.attrHandle[e.toLowerCase()],n=i&&O.call(b.attrHandle,e.toLowerCase())?i(t,e,!S):void 0;return void 0!==n?n:p.attributes||!S?t.getAttribute(e):(n=t.getAttributeNode(e))&&n.specified?n.value:null},rt.escape=function(t){return(t+"").replace(it,nt)},rt.error=function(t){throw new Error("Syntax error, unrecognized expression: "+t)},rt.uniqueSort=function(t){var e,i=[],n=0,s=0;if(c=!p.detectDuplicates,l=!p.sortStable&&t.slice(0),t.sort(I),c){for(;e=t[s++];)e===t[s]&&(n=i.push(s));for(;n--;)t.splice(i[n],1)}return l=null,t},r=rt.getText=function(t){var e,i="",n=0,s=t.nodeType;if(s){if(1===s||9===s||11===s){if("string"==typeof t.textContent)return t.textContent;for(t=t.firstChild;t;t=t.nextSibling)i+=r(t)}else if(3===s||4===s)return t.nodeValue}else for(;e=t[n++];)i+=r(e);return i},(b=rt.selectors={cacheLength:50,createPseudo:ot,match:X,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(t){return t[1]=t[1].replace(et,h),t[3]=(t[3]||t[4]||t[5]||"").replace(et,h),"~="===t[2]&&(t[3]=" "+t[3]+" "),t.slice(0,4)},CHILD:function(t){return t[1]=t[1].toLowerCase(),"nth"===t[1].slice(0,3)?(t[3]||rt.error(t[0]),t[4]=+(t[4]?t[5]+(t[6]||1):2*("even"===t[3]||"odd"===t[3])),t[5]=+(t[7]+t[8]||"odd"===t[3])):t[3]&&rt.error(t[0]),t},PSEUDO:function(t){var e,i=!t[6]&&t[2];return X.CHILD.test(t[0])?null:(t[3]?t[2]=t[4]||t[5]||"":i&&Y.test(i)&&(e=f(i,!0))&&(e=i.indexOf(")",i.length-e)-i.length)&&(t[0]=t[0].slice(0,e),t[2]=i.slice(0,e)),t.slice(0,3))}},filter:{TAG:function(t){var e=t.replace(et,h).toLowerCase();return"*"===t?function(){return!0}:function(t){return t.nodeName&&t.nodeName.toLowerCase()===e}},CLASS:function(t){var e=E[t+" "];return e||(e=new RegExp("(^|"+j+")"+t+"("+j+"|$)"))&&E(t,function(t){return e.test("string"==typeof t.className&&t.className||void 0!==t.getAttribute&&t.getAttribute("class")||"")})},ATTR:function(i,n,s){return function(t){var e=rt.attr(t,i);return null==e?"!="===n:!n||(e+="","="===n?e===s:"!="===n?e!==s:"^="===n?s&&0===e.indexOf(s):"*="===n?s&&-1<e.indexOf(s):"$="===n?s&&e.slice(-s.length)===s:"~="===n?-1<(" "+e.replace(z," ")+" ").indexOf(s):"|="===n&&(e===s||e.slice(0,s.length+1)===s+"-"))}},CHILD:function(f,t,e,m,g){var v="nth"!==f.slice(0,3),y="last"!==f.slice(-4),_="of-type"===t;return 1===m&&0===g?function(t){return!!t.parentNode}:function(t,e,i){var n,s,r,a,o,l,c=v!=y?"nextSibling":"previousSibling",u=t.parentNode,h=_&&t.nodeName.toLowerCase(),d=!i&&!_,p=!1;if(u){if(v){for(;c;){for(a=t;a=a[c];)if(_?a.nodeName.toLowerCase()===h:1===a.nodeType)return!1;l=c="only"===f&&!l&&"nextSibling"}return!0}if(l=[y?u.firstChild:u.lastChild],y&&d){for(p=(o=(n=(s=(r=(a=u)[C]||(a[C]={}))[a.uniqueID]||(r[a.uniqueID]={}))[f]||[])[0]===x&&n[1])&&n[2],a=o&&u.childNodes[o];a=++o&&a&&a[c]||(p=o=0)||l.pop();)if(1===a.nodeType&&++p&&a===t){s[f]=[x,o,p];break}}else if(d&&(p=o=(n=(s=(r=(a=t)[C]||(a[C]={}))[a.uniqueID]||(r[a.uniqueID]={}))[f]||[])[0]===x&&n[1]),!1===p)for(;(a=++o&&a&&a[c]||(p=o=0)||l.pop())&&((_?a.nodeName.toLowerCase()!==h:1!==a.nodeType)||!++p||(d&&((s=(r=a[C]||(a[C]={}))[a.uniqueID]||(r[a.uniqueID]={}))[f]=[x,p]),a!==t)););return(p-=g)===m||p%m==0&&0<=p/m}}},PSEUDO:function(t,r){var e,a=b.pseudos[t]||b.setFilters[t.toLowerCase()]||rt.error("unsupported pseudo: "+t);return a[C]?a(r):1<a.length?(e=[t,t,"",r],b.setFilters.hasOwnProperty(t.toLowerCase())?ot(function(t,e){for(var i,n=a(t,r),s=n.length;s--;)t[i=R(t,n[s])]=!(e[i]=n[s])}):function(t){return a(t,0,e)}):a}},pseudos:{not:ot(function(t){var n=[],s=[],o=d(t.replace(W,"$1"));return o[C]?ot(function(t,e,i,n){for(var s,r=o(t,null,n,[]),a=t.length;a--;)(s=r[a])&&(t[a]=!(e[a]=s))}):function(t,e,i){return n[0]=t,o(n,null,i,s),n[0]=null,!s.pop()}}),has:ot(function(e){return function(t){return 0<rt(e,t).length}}),contains:ot(function(e){return e=e.replace(et,h),function(t){return-1<(t.textContent||t.innerText||r(t)).indexOf(e)}}),lang:ot(function(i){return G.test(i||"")||rt.error("unsupported lang: "+i),i=i.replace(et,h).toLowerCase(),function(t){var e;do{if(e=S?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return(e=e.toLowerCase())===i||0===e.indexOf(i+"-")}while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var e=i.location&&i.location.hash;return e&&e.slice(1)===t.id},root:function(t){return t===o},focus:function(t){return t===k.activeElement&&(!k.hasFocus||k.hasFocus())&&!!(t.type||t.href||~t.tabIndex)},enabled:pt(!1),disabled:pt(!0),checked:function(t){var e=t.nodeName.toLowerCase();return"input"===e&&!!t.checked||"option"===e&&!!t.selected},selected:function(t){return t.parentNode&&t.parentNode.selectedIndex,!0===t.selected},empty:function(t){for(t=t.firstChild;t;t=t.nextSibling)if(t.nodeType<6)return!1;return!0},parent:function(t){return!b.pseudos.empty(t)},header:function(t){return Q.test(t.nodeName)},input:function(t){return K.test(t.nodeName)},button:function(t){var e=t.nodeName.toLowerCase();return"input"===e&&"button"===t.type||"button"===e},text:function(t){var e;return"input"===t.nodeName.toLowerCase()&&"text"===t.type&&(null==(e=t.getAttribute("type"))||"text"===e.toLowerCase())},first:ft(function(){return[0]}),last:ft(function(t,e){return[e-1]}),eq:ft(function(t,e,i){return[i<0?i+e:i]}),even:ft(function(t,e){for(var i=0;i<e;i+=2)t.push(i);return t}),odd:ft(function(t,e){for(var i=1;i<e;i+=2)t.push(i);return t}),lt:ft(function(t,e,i){for(var n=i<0?i+e:i;0<=--n;)t.push(n);return t}),gt:ft(function(t,e,i){for(var n=i<0?i+e:i;++n<e;)t.push(n);return t})}}).pseudos.nth=b.pseudos.eq,{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})b.pseudos[t]=ht(t);for(t in{submit:!0,reset:!0})b.pseudos[t]=dt(t);function gt(){}function vt(t){for(var e=0,i=t.length,n="";e<i;e++)n+=t[e].value;return n}function yt(o,t,e){var l=t.dir,c=t.next,u=c||l,h=e&&"parentNode"===u,d=n++;return t.first?function(t,e,i){for(;t=t[l];)if(1===t.nodeType||h)return o(t,e,i);return!1}:function(t,e,i){var n,s,r,a=[x,d];if(i){for(;t=t[l];)if((1===t.nodeType||h)&&o(t,e,i))return!0}else for(;t=t[l];)if(1===t.nodeType||h)if(s=(r=t[C]||(t[C]={}))[t.uniqueID]||(r[t.uniqueID]={}),c&&c===t.nodeName.toLowerCase())t=t[l]||t;else{if((n=s[u])&&n[0]===x&&n[1]===d)return a[2]=n[2];if((s[u]=a)[2]=o(t,e,i))return!0}return!1}}function _t(s){return 1<s.length?function(t,e,i){for(var n=s.length;n--;)if(!s[n](t,e,i))return!1;return!0}:s[0]}function bt(t,e,i,n,s){for(var r,a=[],o=0,l=t.length,c=null!=e;o<l;o++)(r=t[o])&&(i&&!i(r,n,s)||(a.push(r),c&&e.push(o)));return a}function Tt(p,f,m,g,v,t){return g&&!g[C]&&(g=Tt(g)),v&&!v[C]&&(v=Tt(v,t)),ot(function(t,e,i,n){var s,r,a,o=[],l=[],c=e.length,u=t||function(t,e,i){for(var n=0,s=e.length;n<s;n++)rt(t,e[n],i);return i}(f||"*",i.nodeType?[i]:i,[]),h=!p||!t&&f?u:bt(u,o,p,i,n),d=m?v||(t?p:c||g)?[]:e:h;if(m&&m(h,d,i,n),g)for(s=bt(d,l),g(s,[],i,n),r=s.length;r--;)(a=s[r])&&(d[l[r]]=!(h[l[r]]=a));if(t){if(v||p){if(v){for(s=[],r=d.length;r--;)(a=d[r])&&s.push(h[r]=a);v(null,d=[],s,n)}for(r=d.length;r--;)(a=d[r])&&-1<(s=v?R(t,a):o[r])&&(t[s]=!(e[s]=a))}}else d=bt(d===e?d.splice(c,d.length):d),v?v(null,e,d,n):M.apply(e,d)})}function wt(t){for(var s,e,i,n=t.length,r=b.relative[t[0].type],a=r||b.relative[" "],o=r?1:0,l=yt(function(t){return t===s},a,!0),c=yt(function(t){return-1<R(s,t)},a,!0),u=[function(t,e,i){var n=!r&&(i||e!==T)||((s=e).nodeType?l(t,e,i):c(t,e,i));return s=null,n}];o<n;o++)if(e=b.relative[t[o].type])u=[yt(_t(u),e)];else{if((e=b.filter[t[o].type].apply(null,t[o].matches))[C]){for(i=++o;i<n&&!b.relative[t[i].type];i++);return Tt(1<o&&_t(u),1<o&&vt(t.slice(0,o-1).concat({value:" "===t[o-2].type?"*":""})).replace(W,"$1"),e,o<i&&wt(t.slice(o,i)),i<n&&wt(t=t.slice(i)),i<n&&vt(t))}u.push(e)}return _t(u)}function kt(g,v){function t(t,e,i,n,s){var r,a,o,l=0,c="0",u=t&&[],h=[],d=T,p=t||_&&b.find.TAG("*",s),f=x+=null==d?1:Math.random()||.1,m=p.length;for(s&&(T=e===k||e||s);c!==m&&null!=(r=p[c]);c++){if(_&&r){for(a=0,e||r.ownerDocument===k||(w(r),i=!S);o=g[a++];)if(o(r,e||k,i)){n.push(r);break}s&&(x=f)}y&&((r=!o&&r)&&l--,t&&u.push(r))}if(l+=c,y&&c!==l){for(a=0;o=v[a++];)o(u,h,e,i);if(t){if(0<l)for(;c--;)u[c]||h[c]||(h[c]=P.call(n));h=bt(h)}M.apply(n,h),s&&!t&&0<h.length&&1<l+v.length&&rt.uniqueSort(n)}return s&&(x=f,T=d),u}var y=0<v.length,_=0<g.length;return y?ot(t):t}return gt.prototype=b.filters=b.pseudos,b.setFilters=new gt,f=rt.tokenize=function(t,e){var i,n,s,r,a,o,l,c=D[t+" "];if(c)return e?0:c.slice(0);for(a=t,o=[],l=b.preFilter;a;){for(r in i&&!(n=$.exec(a))||(n&&(a=a.slice(n[0].length)||a),o.push(s=[])),i=!1,(n=q.exec(a))&&(i=n.shift(),s.push({value:i,type:n[0].replace(W," ")}),a=a.slice(i.length)),b.filter)!(n=X[r].exec(a))||l[r]&&!(n=l[r](n))||(i=n.shift(),s.push({value:i,type:r,matches:n}),a=a.slice(i.length));if(!i)break}return e?a.length:a?rt.error(t):D(t,o).slice(0)},d=rt.compile=function(t,e){var i,n=[],s=[],r=A[t+" "];if(!r){for(i=(e=e||f(t)).length;i--;)(r=wt(e[i]))[C]?n.push(r):s.push(r);(r=A(t,kt(s,n))).selector=t}return r},m=rt.select=function(t,e,i,n){var s,r,a,o,l,c="function"==typeof t&&t,u=!n&&f(t=c.selector||t);if(i=i||[],1===u.length){if(2<(r=u[0]=u[0].slice(0)).length&&"ID"===(a=r[0]).type&&9===e.nodeType&&S&&b.relative[r[1].type]){if(!(e=(b.find.ID(a.matches[0].replace(et,h),e)||[])[0]))return i;c&&(e=e.parentNode),t=t.slice(r.shift().value.length)}for(s=X.needsContext.test(t)?0:r.length;s--&&(a=r[s],!b.relative[o=a.type]);)if((l=b.find[o])&&(n=l(a.matches[0].replace(et,h),tt.test(r[0].type)&&mt(e.parentNode)||e))){if(r.splice(s,1),!(t=n.length&&vt(r)))return M.apply(i,n),i;break}}return(c||d(t,u))(n,e,!S,i,!e||tt.test(t)&&mt(e.parentNode)||e),i},p.sortStable=C.split("").sort(I).join("")===C,p.detectDuplicates=!!c,w(),p.sortDetached=lt(function(t){return 1&t.compareDocumentPosition(k.createElement("fieldset"))}),lt(function(t){return t.innerHTML="<a href='#'></a>","#"===t.firstChild.getAttribute("href")})||ct("type|href|height|width",function(t,e,i){if(!i)return t.getAttribute(e,"type"===e.toLowerCase()?1:2)}),p.attributes&&lt(function(t){return t.innerHTML="<input/>",t.firstChild.setAttribute("value",""),""===t.firstChild.getAttribute("value")})||ct("value",function(t,e,i){if(!i&&"input"===t.nodeName.toLowerCase())return t.defaultValue}),lt(function(t){return null==t.getAttribute("disabled")})||ct(U,function(t,e,i){var n;if(!i)return!0===t[e]?e.toLowerCase():(n=t.getAttributeNode(e))&&n.specified?n.value:null}),rt}(k);C.find=_,C.expr=_.selectors,C.expr[":"]=C.expr.pseudos,C.uniqueSort=C.unique=_.uniqueSort,C.text=_.getText,C.isXMLDoc=_.isXML,C.contains=_.contains,C.escapeSelector=_.escape;function b(t,e,i){for(var n=[],s=void 0!==i;(t=t[e])&&9!==t.nodeType;)if(1===t.nodeType){if(s&&C(t).is(i))break;n.push(t)}return n}function T(t,e){for(var i=[];t;t=t.nextSibling)1===t.nodeType&&t!==e&&i.push(t);return i}var w=C.expr.match.needsContext;function x(t,e){return t.nodeName&&t.nodeName.toLowerCase()===e.toLowerCase()}var E=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i,D=/^.[^:#\[\.,]*$/;function A(t,i,n){return C.isFunction(i)?C.grep(t,function(t,e){return!!i.call(t,e,t)!==n}):i.nodeType?C.grep(t,function(t){return t===i!==n}):"string"!=typeof i?C.grep(t,function(t){return-1<s.call(i,t)!==n}):D.test(i)?C.filter(i,t,n):(i=C.filter(i,t),C.grep(t,function(t){return-1<s.call(i,t)!==n&&1===t.nodeType}))}C.filter=function(t,e,i){var n=e[0];return i&&(t=":not("+t+")"),1===e.length&&1===n.nodeType?C.find.matchesSelector(n,t)?[n]:[]:C.find.matches(t,C.grep(e,function(t){return 1===t.nodeType}))},C.fn.extend({find:function(t){var e,i,n=this.length,s=this;if("string"!=typeof t)return this.pushStack(C(t).filter(function(){for(e=0;e<n;e++)if(C.contains(s[e],this))return!0}));for(i=this.pushStack([]),e=0;e<n;e++)C.find(t,s[e],i);return 1<n?C.uniqueSort(i):i},filter:function(t){return this.pushStack(A(this,t||[],!1))},not:function(t){return this.pushStack(A(this,t||[],!0))},is:function(t){return!!A(this,"string"==typeof t&&w.test(t)?C(t):t||[],!1).length}});var I,O=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(C.fn.init=function(t,e,i){var n,s;if(!t)return this;if(i=i||I,"string"!=typeof t)return t.nodeType?(this[0]=t,this.length=1,this):C.isFunction(t)?void 0!==i.ready?i.ready(t):t(C):C.makeArray(t,this);if(!(n="<"===t[0]&&">"===t[t.length-1]&&3<=t.length?[null,t,null]:O.exec(t))||!n[1]&&e)return!e||e.jquery?(e||i).find(t):this.constructor(e).find(t);if(n[1]){if(e=e instanceof C?e[0]:e,C.merge(this,C.parseHTML(n[1],e&&e.nodeType?e.ownerDocument||e:S,!0)),E.test(n[1])&&C.isPlainObject(e))for(n in e)C.isFunction(this[n])?this[n](e[n]):this.attr(n,e[n]);return this}return(s=S.getElementById(n[2]))&&(this[0]=s,this.length=1),this}).prototype=C.fn,I=C(S);var P=/^(?:parents|prev(?:Until|All))/,L={children:!0,contents:!0,next:!0,prev:!0};function M(t,e){for(;(t=t[e])&&1!==t.nodeType;);return t}C.fn.extend({has:function(t){var e=C(t,this),i=e.length;return this.filter(function(){for(var t=0;t<i;t++)if(C.contains(this,e[t]))return!0})},closest:function(t,e){var i,n=0,s=this.length,r=[],a="string"!=typeof t&&C(t);if(!w.test(t))for(;n<s;n++)for(i=this[n];i&&i!==e;i=i.parentNode)if(i.nodeType<11&&(a?-1<a.index(i):1===i.nodeType&&C.find.matchesSelector(i,t))){r.push(i);break}return this.pushStack(1<r.length?C.uniqueSort(r):r)},index:function(t){return t?"string"==typeof t?s.call(C(t),this[0]):s.call(this,t.jquery?t[0]:t):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(t,e){return this.pushStack(C.uniqueSort(C.merge(this.get(),C(t,e))))},addBack:function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}}),C.each({parent:function(t){var e=t.parentNode;return e&&11!==e.nodeType?e:null},parents:function(t){return b(t,"parentNode")},parentsUntil:function(t,e,i){return b(t,"parentNode",i)},next:function(t){return M(t,"nextSibling")},prev:function(t){return M(t,"previousSibling")},nextAll:function(t){return b(t,"nextSibling")},prevAll:function(t){return b(t,"previousSibling")},nextUntil:function(t,e,i){return b(t,"nextSibling",i)},prevUntil:function(t,e,i){return b(t,"previousSibling",i)},siblings:function(t){return T((t.parentNode||{}).firstChild,t)},children:function(t){return T(t.firstChild)},contents:function(t){return x(t,"iframe")?t.contentDocument:(x(t,"template")&&(t=t.content||t),C.merge([],t.childNodes))}},function(n,s){C.fn[n]=function(t,e){var i=C.map(this,s,t);return"Until"!==n.slice(-5)&&(e=t),e&&"string"==typeof e&&(i=C.filter(e,i)),1<this.length&&(L[n]||C.uniqueSort(i),P.test(n)&&i.reverse()),this.pushStack(i)}});var N=/[^\x20\t\r\n\f]+/g;function R(t){return t}function U(t){throw t}function j(t,e,i,n){var s;try{t&&C.isFunction(s=t.promise)?s.call(t).done(e).fail(i):t&&C.isFunction(s=t.then)?s.call(t,e,i):e.apply(void 0,[t].slice(n))}catch(t){i.apply(void 0,[t])}}C.Callbacks=function(n){n="string"==typeof n?function(t){var i={};return C.each(t.match(N)||[],function(t,e){i[e]=!0}),i}(n):C.extend({},n);function i(){for(r=r||n.once,e=s=!0;o.length;l=-1)for(t=o.shift();++l<a.length;)!1===a[l].apply(t[0],t[1])&&n.stopOnFalse&&(l=a.length,t=!1);n.memory||(t=!1),s=!1,r&&(a=t?[]:"")}var s,t,e,r,a=[],o=[],l=-1,c={add:function(){return a&&(t&&!s&&(l=a.length-1,o.push(t)),function i(t){C.each(t,function(t,e){C.isFunction(e)?n.unique&&c.has(e)||a.push(e):e&&e.length&&"string"!==C.type(e)&&i(e)})}(arguments),t&&!s&&i()),this},remove:function(){return C.each(arguments,function(t,e){for(var i;-1<(i=C.inArray(e,a,i));)a.splice(i,1),i<=l&&l--}),this},has:function(t){return t?-1<C.inArray(t,a):0<a.length},empty:function(){return a=a&&[],this},disable:function(){return r=o=[],a=t="",this},disabled:function(){return!a},lock:function(){return r=o=[],t||s||(a=t=""),this},locked:function(){return!!r},fireWith:function(t,e){return r||(e=[t,(e=e||[]).slice?e.slice():e],o.push(e),s||i()),this},fire:function(){return c.fireWith(this,arguments),this},fired:function(){return!!e}};return c},C.extend({Deferred:function(t){var r=[["notify","progress",C.Callbacks("memory"),C.Callbacks("memory"),2],["resolve","done",C.Callbacks("once memory"),C.Callbacks("once memory"),0,"resolved"],["reject","fail",C.Callbacks("once memory"),C.Callbacks("once memory"),1,"rejected"]],s="pending",a={state:function(){return s},always:function(){return o.done(arguments).fail(arguments),this},catch:function(t){return a.then(null,t)},pipe:function(){var s=arguments;return C.Deferred(function(n){C.each(r,function(t,e){var i=C.isFunction(s[e[4]])&&s[e[4]];o[e[1]](function(){var t=i&&i.apply(this,arguments);t&&C.isFunction(t.promise)?t.promise().progress(n.notify).done(n.resolve).fail(n.reject):n[e[0]+"With"](this,i?[t]:arguments)})}),s=null}).promise()},then:function(e,i,n){var l=0;function c(s,r,a,o){return function(){function t(){var t,e;if(!(s<l)){if((t=a.apply(i,n))===r.promise())throw new TypeError("Thenable self-resolution");e=t&&("object"==typeof t||"function"==typeof t)&&t.then,C.isFunction(e)?o?e.call(t,c(l,r,R,o),c(l,r,U,o)):(l++,e.call(t,c(l,r,R,o),c(l,r,U,o),c(l,r,R,r.notifyWith))):(a!==R&&(i=void 0,n=[t]),(o||r.resolveWith)(i,n))}}var i=this,n=arguments,e=o?t:function(){try{t()}catch(t){C.Deferred.exceptionHook&&C.Deferred.exceptionHook(t,e.stackTrace),l<=s+1&&(a!==U&&(i=void 0,n=[t]),r.rejectWith(i,n))}};s?e():(C.Deferred.getStackHook&&(e.stackTrace=C.Deferred.getStackHook()),k.setTimeout(e))}}return C.Deferred(function(t){r[0][3].add(c(0,t,C.isFunction(n)?n:R,t.notifyWith)),r[1][3].add(c(0,t,C.isFunction(e)?e:R)),r[2][3].add(c(0,t,C.isFunction(i)?i:U))}).promise()},promise:function(t){return null!=t?C.extend(t,a):a}},o={};return C.each(r,function(t,e){var i=e[2],n=e[5];a[e[1]]=i.add,n&&i.add(function(){s=n},r[3-t][2].disable,r[0][2].lock),i.add(e[3].fire),o[e[0]]=function(){return o[e[0]+"With"](this===o?void 0:this,arguments),this},o[e[0]+"With"]=i.fireWith}),a.promise(o),t&&t.call(o,o),o},when:function(t){function e(e){return function(t){s[e]=this,r[e]=1<arguments.length?o.call(arguments):t,--i||a.resolveWith(s,r)}}var i=arguments.length,n=i,s=Array(n),r=o.call(arguments),a=C.Deferred();if(i<=1&&(j(t,a.done(e(n)).resolve,a.reject,!i),"pending"===a.state()||C.isFunction(r[n]&&r[n].then)))return a.then();for(;n--;)j(r[n],e(n),a.reject);return a.promise()}});var B=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;C.Deferred.exceptionHook=function(t,e){k.console&&k.console.warn&&t&&B.test(t.name)&&k.console.warn("jQuery.Deferred exception: "+t.message,t.stack,e)},C.readyException=function(t){k.setTimeout(function(){throw t})};var H=C.Deferred();function F(){S.removeEventListener("DOMContentLoaded",F),k.removeEventListener("load",F),C.ready()}C.fn.ready=function(t){return H.then(t).catch(function(t){C.readyException(t)}),this},C.extend({isReady:!1,readyWait:1,ready:function(t){(!0===t?--C.readyWait:C.isReady)||(C.isReady=!0)!==t&&0<--C.readyWait||H.resolveWith(S,[C])}}),C.ready.then=H.then,"complete"===S.readyState||"loading"!==S.readyState&&!S.documentElement.doScroll?k.setTimeout(C.ready):(S.addEventListener("DOMContentLoaded",F),k.addEventListener("load",F));function z(t){return 1===t.nodeType||9===t.nodeType||!+t.nodeType}var W=function(t,e,i,n,s,r,a){var o=0,l=t.length,c=null==i;if("object"===C.type(i))for(o in s=!0,i)W(t,e,o,i[o],!0,r,a);else if(void 0!==n&&(s=!0,C.isFunction(n)||(a=!0),c&&(e=a?(e.call(t,n),null):(c=e,function(t,e,i){return c.call(C(t),i)})),e))for(;o<l;o++)e(t[o],i,a?n:n.call(t[o],o,e(t[o],i)));return s?t:c?e.call(t):l?e(t[0],i):r};function $(){this.expando=C.expando+$.uid++}$.uid=1,$.prototype={cache:function(t){var e=t[this.expando];return e||(e={},z(t)&&(t.nodeType?t[this.expando]=e:Object.defineProperty(t,this.expando,{value:e,configurable:!0}))),e},set:function(t,e,i){var n,s=this.cache(t);if("string"==typeof e)s[C.camelCase(e)]=i;else for(n in e)s[C.camelCase(n)]=e[n];return s},get:function(t,e){return void 0===e?this.cache(t):t[this.expando]&&t[this.expando][C.camelCase(e)]},access:function(t,e,i){return void 0===e||e&&"string"==typeof e&&void 0===i?this.get(t,e):(this.set(t,e,i),void 0!==i?i:e)},remove:function(t,e){var i,n=t[this.expando];if(void 0!==n){if(void 0!==e){i=(e=Array.isArray(e)?e.map(C.camelCase):(e=C.camelCase(e))in n?[e]:e.match(N)||[]).length;for(;i--;)delete n[e[i]]}void 0!==e&&!C.isEmptyObject(n)||(t.nodeType?t[this.expando]=void 0:delete t[this.expando])}},hasData:function(t){var e=t[this.expando];return void 0!==e&&!C.isEmptyObject(e)}};var q=new $,V=new $,Y=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,G=/[A-Z]/g;function X(t,e,i){var n;if(void 0===i&&1===t.nodeType)if(n="data-"+e.replace(G,"-$&").toLowerCase(),"string"==typeof(i=t.getAttribute(n))){try{i=function(t){return"true"===t||"false"!==t&&("null"===t?null:t===+t+""?+t:Y.test(t)?JSON.parse(t):t)}(i)}catch(t){}V.set(t,e,i)}else i=void 0;return i}C.extend({hasData:function(t){return V.hasData(t)||q.hasData(t)},data:function(t,e,i){return V.access(t,e,i)},removeData:function(t,e){V.remove(t,e)},_data:function(t,e,i){return q.access(t,e,i)},_removeData:function(t,e){q.remove(t,e)}}),C.fn.extend({data:function(i,t){var e,n,s,r=this[0],a=r&&r.attributes;if(void 0!==i)return"object"==typeof i?this.each(function(){V.set(this,i)}):W(this,function(t){var e;if(r&&void 0===t)return void 0!==(e=V.get(r,i))?e:void 0!==(e=X(r,i))?e:void 0;this.each(function(){V.set(this,i,t)})},null,t,1<arguments.length,null,!0);if(this.length&&(s=V.get(r),1===r.nodeType&&!q.get(r,"hasDataAttrs"))){for(e=a.length;e--;)a[e]&&0===(n=a[e].name).indexOf("data-")&&(n=C.camelCase(n.slice(5)),X(r,n,s[n]));q.set(r,"hasDataAttrs",!0)}return s},removeData:function(t){return this.each(function(){V.remove(this,t)})}}),C.extend({queue:function(t,e,i){var n;if(t)return e=(e||"fx")+"queue",n=q.get(t,e),i&&(!n||Array.isArray(i)?n=q.access(t,e,C.makeArray(i)):n.push(i)),n||[]},dequeue:function(t,e){e=e||"fx";var i=C.queue(t,e),n=i.length,s=i.shift(),r=C._queueHooks(t,e);"inprogress"===s&&(s=i.shift(),n--),s&&("fx"===e&&i.unshift("inprogress"),delete r.stop,s.call(t,function(){C.dequeue(t,e)},r)),!n&&r&&r.empty.fire()},_queueHooks:function(t,e){var i=e+"queueHooks";return q.get(t,i)||q.access(t,i,{empty:C.Callbacks("once memory").add(function(){q.remove(t,[e+"queue",i])})})}}),C.fn.extend({queue:function(e,i){var t=2;return"string"!=typeof e&&(i=e,e="fx",t--),arguments.length<t?C.queue(this[0],e):void 0===i?this:this.each(function(){var t=C.queue(this,e,i);C._queueHooks(this,e),"fx"===e&&"inprogress"!==t[0]&&C.dequeue(this,e)})},dequeue:function(t){return this.each(function(){C.dequeue(this,t)})},clearQueue:function(t){return this.queue(t||"fx",[])},promise:function(t,e){function i(){--s||r.resolveWith(a,[a])}var n,s=1,r=C.Deferred(),a=this,o=this.length;for("string"!=typeof t&&(e=t,t=void 0),t=t||"fx";o--;)(n=q.get(a[o],t+"queueHooks"))&&n.empty&&(s++,n.empty.add(i));return i(),r.promise(e)}});function K(t,e,i,n){var s,r,a={};for(r in e)a[r]=t.style[r],t.style[r]=e[r];for(r in s=i.apply(t,n||[]),e)t.style[r]=a[r];return s}var Q=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,J=new RegExp("^(?:([+-])=|)("+Q+")([a-z%]*)$","i"),Z=["Top","Right","Bottom","Left"],tt=function(t,e){return"none"===(t=e||t).style.display||""===t.style.display&&C.contains(t.ownerDocument,t)&&"none"===C.css(t,"display")};function et(t,e,i,n){var s,r=1,a=20,o=n?function(){return n.cur()}:function(){return C.css(t,e,"")},l=o(),c=i&&i[3]||(C.cssNumber[e]?"":"px"),u=(C.cssNumber[e]||"px"!==c&&+l)&&J.exec(C.css(t,e));if(u&&u[3]!==c)for(c=c||u[3],i=i||[],u=+l||1;u/=r=r||".5",C.style(t,e,u+c),r!==(r=o()/l)&&1!==r&&--a;);return i&&(u=+u||+l||0,s=i[1]?u+(i[1]+1)*i[2]:+i[2],n&&(n.unit=c,n.start=u,n.end=s)),s}var it={};function nt(t,e){for(var i,n,s,r,a,o,l,c=[],u=0,h=t.length;u<h;u++)(n=t[u]).style&&(i=n.style.display,e?("none"===i&&(c[u]=q.get(n,"display")||null,c[u]||(n.style.display="")),""===n.style.display&&tt(n)&&(c[u]=(l=a=r=void 0,a=(s=n).ownerDocument,o=s.nodeName,(l=it[o])||(r=a.body.appendChild(a.createElement(o)),l=C.css(r,"display"),r.parentNode.removeChild(r),"none"===l&&(l="block"),it[o]=l)))):"none"!==i&&(c[u]="none",q.set(n,"display",i)));for(u=0;u<h;u++)null!=c[u]&&(t[u].style.display=c[u]);return t}C.fn.extend({show:function(){return nt(this,!0)},hide:function(){return nt(this)},toggle:function(t){return"boolean"==typeof t?t?this.show():this.hide():this.each(function(){tt(this)?C(this).show():C(this).hide()})}});var st=/^(?:checkbox|radio)$/i,rt=/<([a-z][^\/\0>\x20\t\r\n\f]+)/i,at=/^$|\/(?:java|ecma)script/i,ot={option:[1,"<select multiple='multiple'>","</select>"],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 lt(t,e){var i;return i=void 0!==t.getElementsByTagName?t.getElementsByTagName(e||"*"):void 0!==t.querySelectorAll?t.querySelectorAll(e||"*"):[],void 0===e||e&&x(t,e)?C.merge([t],i):i}function ct(t,e){for(var i=0,n=t.length;i<n;i++)q.set(t[i],"globalEval",!e||q.get(e[i],"globalEval"))}ot.optgroup=ot.option,ot.tbody=ot.tfoot=ot.colgroup=ot.caption=ot.thead,ot.th=ot.td;var ut,ht,dt=/<|&#?\w+;/;function pt(t,e,i,n,s){for(var r,a,o,l,c,u,h=e.createDocumentFragment(),d=[],p=0,f=t.length;p<f;p++)if((r=t[p])||0===r)if("object"===C.type(r))C.merge(d,r.nodeType?[r]:r);else if(dt.test(r)){for(a=a||h.appendChild(e.createElement("div")),o=(rt.exec(r)||["",""])[1].toLowerCase(),l=ot[o]||ot._default,a.innerHTML=l[1]+C.htmlPrefilter(r)+l[2],u=l[0];u--;)a=a.lastChild;C.merge(d,a.childNodes),(a=h.firstChild).textContent=""}else d.push(e.createTextNode(r));for(h.textContent="",p=0;r=d[p++];)if(n&&-1<C.inArray(r,n))s&&s.push(r);else if(c=C.contains(r.ownerDocument,r),a=lt(h.appendChild(r),"script"),c&&ct(a),i)for(u=0;r=a[u++];)at.test(r.type||"")&&i.push(r);return h}ut=S.createDocumentFragment().appendChild(S.createElement("div")),(ht=S.createElement("input")).setAttribute("type","radio"),ht.setAttribute("checked","checked"),ht.setAttribute("name","t"),ut.appendChild(ht),g.checkClone=ut.cloneNode(!0).cloneNode(!0).lastChild.checked,ut.innerHTML="<textarea>x</textarea>",g.noCloneChecked=!!ut.cloneNode(!0).lastChild.defaultValue;var ft=S.documentElement,mt=/^key/,gt=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,vt=/^([^.]*)(?:\.(.+)|)/;function yt(){return!0}function _t(){return!1}function bt(){try{return S.activeElement}catch(t){}}function Tt(t,e,i,n,s,r){var a,o;if("object"==typeof e){for(o in"string"!=typeof i&&(n=n||i,i=void 0),e)Tt(t,o,i,n,e[o],r);return t}if(null==n&&null==s?(s=i,n=i=void 0):null==s&&("string"==typeof i?(s=n,n=void 0):(s=n,n=i,i=void 0)),!1===s)s=_t;else if(!s)return t;return 1===r&&(a=s,(s=function(t){return C().off(t),a.apply(this,arguments)}).guid=a.guid||(a.guid=C.guid++)),t.each(function(){C.event.add(this,e,s,n,i)})}C.event={global:{},add:function(e,t,i,n,s){var r,a,o,l,c,u,h,d,p,f,m,g=q.get(e);if(g)for(i.handler&&(i=(r=i).handler,s=r.selector),s&&C.find.matchesSelector(ft,s),i.guid||(i.guid=C.guid++),(l=g.events)||(l=g.events={}),(a=g.handle)||(a=g.handle=function(t){return void 0!==C&&C.event.triggered!==t.type?C.event.dispatch.apply(e,arguments):void 0}),c=(t=(t||"").match(N)||[""]).length;c--;)p=m=(o=vt.exec(t[c])||[])[1],f=(o[2]||"").split(".").sort(),p&&(h=C.event.special[p]||{},p=(s?h.delegateType:h.bindType)||p,h=C.event.special[p]||{},u=C.extend({type:p,origType:m,data:n,handler:i,guid:i.guid,selector:s,needsContext:s&&C.expr.match.needsContext.test(s),namespace:f.join(".")},r),(d=l[p])||((d=l[p]=[]).delegateCount=0,h.setup&&!1!==h.setup.call(e,n,f,a)||e.addEventListener&&e.addEventListener(p,a)),h.add&&(h.add.call(e,u),u.handler.guid||(u.handler.guid=i.guid)),s?d.splice(d.delegateCount++,0,u):d.push(u),C.event.global[p]=!0)},remove:function(t,e,i,n,s){var r,a,o,l,c,u,h,d,p,f,m,g=q.hasData(t)&&q.get(t);if(g&&(l=g.events)){for(c=(e=(e||"").match(N)||[""]).length;c--;)if(p=m=(o=vt.exec(e[c])||[])[1],f=(o[2]||"").split(".").sort(),p){for(h=C.event.special[p]||{},d=l[p=(n?h.delegateType:h.bindType)||p]||[],o=o[2]&&new RegExp("(^|\\.)"+f.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=r=d.length;r--;)u=d[r],!s&&m!==u.origType||i&&i.guid!==u.guid||o&&!o.test(u.namespace)||n&&n!==u.selector&&("**"!==n||!u.selector)||(d.splice(r,1),u.selector&&d.delegateCount--,h.remove&&h.remove.call(t,u));a&&!d.length&&(h.teardown&&!1!==h.teardown.call(t,f,g.handle)||C.removeEvent(t,p,g.handle),delete l[p])}else for(p in l)C.event.remove(t,p+e[c],i,n,!0);C.isEmptyObject(l)&&q.remove(t,"handle events")}},dispatch:function(t){var e,i,n,s,r,a,o=C.event.fix(t),l=new Array(arguments.length),c=(q.get(this,"events")||{})[o.type]||[],u=C.event.special[o.type]||{};for(l[0]=o,e=1;e<arguments.length;e++)l[e]=arguments[e];if(o.delegateTarget=this,!u.preDispatch||!1!==u.preDispatch.call(this,o)){for(a=C.event.handlers.call(this,o,c),e=0;(s=a[e++])&&!o.isPropagationStopped();)for(o.currentTarget=s.elem,i=0;(r=s.handlers[i++])&&!o.isImmediatePropagationStopped();)o.rnamespace&&!o.rnamespace.test(r.namespace)||(o.handleObj=r,o.data=r.data,void 0!==(n=((C.event.special[r.origType]||{}).handle||r.handler).apply(s.elem,l))&&!1===(o.result=n)&&(o.preventDefault(),o.stopPropagation()));return u.postDispatch&&u.postDispatch.call(this,o),o.result}},handlers:function(t,e){var i,n,s,r,a,o=[],l=e.delegateCount,c=t.target;if(l&&c.nodeType&&!("click"===t.type&&1<=t.button))for(;c!==this;c=c.parentNode||this)if(1===c.nodeType&&("click"!==t.type||!0!==c.disabled)){for(r=[],a={},i=0;i<l;i++)void 0===a[s=(n=e[i]).selector+" "]&&(a[s]=n.needsContext?-1<C(s,this).index(c):C.find(s,this,null,[c]).length),a[s]&&r.push(n);r.length&&o.push({elem:c,handlers:r})}return c=this,l<e.length&&o.push({elem:c,handlers:e.slice(l)}),o},addProp:function(e,t){Object.defineProperty(C.Event.prototype,e,{enumerable:!0,configurable:!0,get:C.isFunction(t)?function(){if(this.originalEvent)return t(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[e]},set:function(t){Object.defineProperty(this,e,{enumerable:!0,configurable:!0,writable:!0,value:t})}})},fix:function(t){return t[C.expando]?t:new C.Event(t)},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==bt()&&this.focus)return this.focus(),!1},delegateType:"focusin"},blur:{trigger:function(){if(this===bt()&&this.blur)return this.blur(),!1},delegateType:"focusout"},click:{trigger:function(){if("checkbox"===this.type&&this.click&&x(this,"input"))return this.click(),!1},_default:function(t){return x(t.target,"a")}},beforeunload:{postDispatch:function(t){void 0!==t.result&&t.originalEvent&&(t.originalEvent.returnValue=t.result)}}}},C.removeEvent=function(t,e,i){t.removeEventListener&&t.removeEventListener(e,i)},C.Event=function(t,e){if(!(this instanceof C.Event))return new C.Event(t,e);t&&t.type?(this.originalEvent=t,this.type=t.type,this.isDefaultPrevented=t.defaultPrevented||void 0===t.defaultPrevented&&!1===t.returnValue?yt:_t,this.target=t.target&&3===t.target.nodeType?t.target.parentNode:t.target,this.currentTarget=t.currentTarget,this.relatedTarget=t.relatedTarget):this.type=t,e&&C.extend(this,e),this.timeStamp=t&&t.timeStamp||C.now(),this[C.expando]=!0},C.Event.prototype={constructor:C.Event,isDefaultPrevented:_t,isPropagationStopped:_t,isImmediatePropagationStopped:_t,isSimulated:!1,preventDefault:function(){var t=this.originalEvent;this.isDefaultPrevented=yt,t&&!this.isSimulated&&t.preventDefault()},stopPropagation:function(){var t=this.originalEvent;this.isPropagationStopped=yt,t&&!this.isSimulated&&t.stopPropagation()},stopImmediatePropagation:function(){var t=this.originalEvent;this.isImmediatePropagationStopped=yt,t&&!this.isSimulated&&t.stopImmediatePropagation(),this.stopPropagation()}},C.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,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:function(t){var e=t.button;return null==t.which&&mt.test(t.type)?null!=t.charCode?t.charCode:t.keyCode:!t.which&&void 0!==e&&gt.test(t.type)?1&e?1:2&e?3:4&e?2:0:t.which}},C.event.addProp),C.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(t,s){C.event.special[t]={delegateType:s,bindType:s,handle:function(t){var e,i=t.relatedTarget,n=t.handleObj;return i&&(i===this||C.contains(this,i))||(t.type=n.origType,e=n.handler.apply(this,arguments),t.type=s),e}}}),C.fn.extend({on:function(t,e,i,n){return Tt(this,t,e,i,n)},one:function(t,e,i,n){return Tt(this,t,e,i,n,1)},off:function(t,e,i){var n,s;if(t&&t.preventDefault&&t.handleObj)return n=t.handleObj,C(t.delegateTarget).off(n.namespace?n.origType+"."+n.namespace:n.origType,n.selector,n.handler),this;if("object"!=typeof t)return!1!==e&&"function"!=typeof e||(i=e,e=void 0),!1===i&&(i=_t),this.each(function(){C.event.remove(this,t,i,e)});for(s in t)this.off(s,e,t[s]);return this}});var wt=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([a-z][^\/\0>\x20\t\r\n\f]*)[^>]*)\/>/gi,kt=/<script|<style|<link/i,St=/checked\s*(?:[^=]|=\s*.checked.)/i,Ct=/^true\/(.*)/,xt=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;function Et(t,e){return x(t,"table")&&x(11!==e.nodeType?e:e.firstChild,"tr")&&C(">tbody",t)[0]||t}function Dt(t){return t.type=(null!==t.getAttribute("type"))+"/"+t.type,t}function At(t){var e=Ct.exec(t.type);return e?t.type=e[1]:t.removeAttribute("type"),t}function It(t,e){var i,n,s,r,a,o,l,c;if(1===e.nodeType){if(q.hasData(t)&&(r=q.access(t),a=q.set(e,r),c=r.events))for(s in delete a.handle,a.events={},c)for(i=0,n=c[s].length;i<n;i++)C.event.add(e,s,c[s][i]);V.hasData(t)&&(o=V.access(t),l=C.extend({},o),V.set(e,l))}}function Ot(i,n,s,r){n=m.apply([],n);var t,e,a,o,l,c,u=0,h=i.length,d=h-1,p=n[0],f=C.isFunction(p);if(f||1<h&&"string"==typeof p&&!g.checkClone&&St.test(p))return i.each(function(t){var e=i.eq(t);f&&(n[0]=p.call(this,t,e.html())),Ot(e,n,s,r)});if(h&&(e=(t=pt(n,i[0].ownerDocument,!1,i,r)).firstChild,1===t.childNodes.length&&(t=e),e||r)){for(o=(a=C.map(lt(t,"script"),Dt)).length;u<h;u++)l=t,u!==d&&(l=C.clone(l,!0,!0),o&&C.merge(a,lt(l,"script"))),s.call(i[u],l,u);if(o)for(c=a[a.length-1].ownerDocument,C.map(a,At),u=0;u<o;u++)l=a[u],at.test(l.type||"")&&!q.access(l,"globalEval")&&C.contains(c,l)&&(l.src?C._evalUrl&&C._evalUrl(l.src):v(l.textContent.replace(xt,""),c))}return i}function Pt(t,e,i){for(var n,s=e?C.filter(e,t):t,r=0;null!=(n=s[r]);r++)i||1!==n.nodeType||C.cleanData(lt(n)),n.parentNode&&(i&&C.contains(n.ownerDocument,n)&&ct(lt(n,"script")),n.parentNode.removeChild(n));return t}C.extend({htmlPrefilter:function(t){return t.replace(wt,"<$1></$2>")},clone:function(t,e,i){var n,s,r,a,o,l,c,u=t.cloneNode(!0),h=C.contains(t.ownerDocument,t);if(!(g.noCloneChecked||1!==t.nodeType&&11!==t.nodeType||C.isXMLDoc(t)))for(a=lt(u),n=0,s=(r=lt(t)).length;n<s;n++)o=r[n],l=a[n],void 0,"input"===(c=l.nodeName.toLowerCase())&&st.test(o.type)?l.checked=o.checked:"input"!==c&&"textarea"!==c||(l.defaultValue=o.defaultValue);if(e)if(i)for(r=r||lt(t),a=a||lt(u),n=0,s=r.length;n<s;n++)It(r[n],a[n]);else It(t,u);return 0<(a=lt(u,"script")).length&&ct(a,!h&&lt(t,"script")),u},cleanData:function(t){for(var e,i,n,s=C.event.special,r=0;void 0!==(i=t[r]);r++)if(z(i)){if(e=i[q.expando]){if(e.events)for(n in e.events)s[n]?C.event.remove(i,n):C.removeEvent(i,n,e.handle);i[q.expando]=void 0}i[V.expando]&&(i[V.expando]=void 0)}}}),C.fn.extend({detach:function(t){return Pt(this,t,!0)},remove:function(t){return Pt(this,t)},text:function(t){return W(this,function(t){return void 0===t?C.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=t)})},null,t,arguments.length)},append:function(){return Ot(this,arguments,function(t){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||Et(this,t).appendChild(t)})},prepend:function(){return Ot(this,arguments,function(t){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var e=Et(this,t);e.insertBefore(t,e.firstChild)}})},before:function(){return Ot(this,arguments,function(t){this.parentNode&&this.parentNode.insertBefore(t,this)})},after:function(){return Ot(this,arguments,function(t){this.parentNode&&this.parentNode.insertBefore(t,this.nextSibling)})},empty:function(){for(var t,e=0;null!=(t=this[e]);e++)1===t.nodeType&&(C.cleanData(lt(t,!1)),t.textContent="");return this},clone:function(t,e){return t=null!=t&&t,e=null==e?t:e,this.map(function(){return C.clone(this,t,e)})},html:function(t){return W(this,function(t){var e=this[0]||{},i=0,n=this.length;if(void 0===t&&1===e.nodeType)return e.innerHTML;if("string"==typeof t&&!kt.test(t)&&!ot[(rt.exec(t)||["",""])[1].toLowerCase()]){t=C.htmlPrefilter(t);try{for(;i<n;i++)1===(e=this[i]||{}).nodeType&&(C.cleanData(lt(e,!1)),e.innerHTML=t);e=0}catch(t){}}e&&this.empty().append(t)},null,t,arguments.length)},replaceWith:function(){var i=[];return Ot(this,arguments,function(t){var e=this.parentNode;C.inArray(this,i)<0&&(C.cleanData(lt(this)),e&&e.replaceChild(t,this))},i)}}),C.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(t,a){C.fn[t]=function(t){for(var e,i=[],n=C(t),s=n.length-1,r=0;r<=s;r++)e=r===s?this:this.clone(!0),C(n[r])[a](e),l.apply(i,e.get());return this.pushStack(i)}});var Lt,Mt,Nt,Rt,Ut,jt,Bt=/^margin/,Ht=new RegExp("^("+Q+")(?!px)[a-z%]+$","i"),Ft=function(t){var e=t.ownerDocument.defaultView;return e&&e.opener||(e=k),e.getComputedStyle(t)};function zt(){if(jt){jt.style.cssText="box-sizing:border-box;position:relative;display:block;margin:auto;border:1px;padding:1px;top:1%;width:50%",jt.innerHTML="",ft.appendChild(Ut);var t=k.getComputedStyle(jt);Lt="1%"!==t.top,Rt="2px"===t.marginLeft,Mt="4px"===t.width,jt.style.marginRight="50%",Nt="4px"===t.marginRight,ft.removeChild(Ut),jt=null}}function Wt(t,e,i){var n,s,r,a,o=t.style;return(i=i||Ft(t))&&(""!==(a=i.getPropertyValue(e)||i[e])||C.contains(t.ownerDocument,t)||(a=C.style(t,e)),!g.pixelMarginRight()&&Ht.test(a)&&Bt.test(e)&&(n=o.width,s=o.minWidth,r=o.maxWidth,o.minWidth=o.maxWidth=o.width=a,a=i.width,o.width=n,o.minWidth=s,o.maxWidth=r)),void 0!==a?a+"":a}function $t(t,e){return{get:function(){if(!t())return(this.get=e).apply(this,arguments);delete this.get}}}Ut=S.createElement("div"),(jt=S.createElement("div")).style&&(jt.style.backgroundClip="content-box",jt.cloneNode(!0).style.backgroundClip="",g.clearCloneStyle="content-box"===jt.style.backgroundClip,Ut.style.cssText="border:0;width:8px;height:0;top:0;left:-9999px;padding:0;margin-top:1px;position:absolute",Ut.appendChild(jt),C.extend(g,{pixelPosition:function(){return zt(),Lt},boxSizingReliable:function(){return zt(),Mt},pixelMarginRight:function(){return zt(),Nt},reliableMarginLeft:function(){return zt(),Rt}}));var qt=/^(none|table(?!-c[ea]).+)/,Vt=/^--/,Yt={position:"absolute",visibility:"hidden",display:"block"},Gt={letterSpacing:"0",fontWeight:"400"},Xt=["Webkit","Moz","ms"],Kt=S.createElement("div").style;function Qt(t){var e=C.cssProps[t];return e=e||(C.cssProps[t]=function(t){if(t in Kt)return t;for(var e=t[0].toUpperCase()+t.slice(1),i=Xt.length;i--;)if((t=Xt[i]+e)in Kt)return t}(t)||t)}function Jt(t,e,i){var n=J.exec(e);return n?Math.max(0,n[2]-(i||0))+(n[3]||"px"):e}function Zt(t,e,i,n,s){var r,a=0;for(r=i===(n?"border":"content")?4:"width"===e?1:0;r<4;r+=2)"margin"===i&&(a+=C.css(t,i+Z[r],!0,s)),n?("content"===i&&(a-=C.css(t,"padding"+Z[r],!0,s)),"margin"!==i&&(a-=C.css(t,"border"+Z[r]+"Width",!0,s))):(a+=C.css(t,"padding"+Z[r],!0,s),"padding"!==i&&(a+=C.css(t,"border"+Z[r]+"Width",!0,s)));return a}function te(t,e,i){var n,s=Ft(t),r=Wt(t,e,s),a="border-box"===C.css(t,"boxSizing",!1,s);return Ht.test(r)?r:(n=a&&(g.boxSizingReliable()||r===t.style[e]),"auto"===r&&(r=t["offset"+e[0].toUpperCase()+e.slice(1)]),(r=parseFloat(r)||0)+Zt(t,e,i||(a?"border":"content"),n,s)+"px")}function ee(t,e,i,n,s){return new ee.prototype.init(t,e,i,n,s)}C.extend({cssHooks:{opacity:{get:function(t,e){if(e){var i=Wt(t,"opacity");return""===i?"1":i}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{float:"cssFloat"},style:function(t,e,i,n){if(t&&3!==t.nodeType&&8!==t.nodeType&&t.style){var s,r,a,o=C.camelCase(e),l=Vt.test(e),c=t.style;if(l||(e=Qt(o)),a=C.cssHooks[e]||C.cssHooks[o],void 0===i)return a&&"get"in a&&void 0!==(s=a.get(t,!1,n))?s:c[e];"string"===(r=typeof i)&&(s=J.exec(i))&&s[1]&&(i=et(t,e,s),r="number"),null!=i&&i==i&&("number"===r&&(i+=s&&s[3]||(C.cssNumber[o]?"":"px")),g.clearCloneStyle||""!==i||0!==e.indexOf("background")||(c[e]="inherit"),a&&"set"in a&&void 0===(i=a.set(t,i,n))||(l?c.setProperty(e,i):c[e]=i))}},css:function(t,e,i,n){var s,r,a,o=C.camelCase(e);return Vt.test(e)||(e=Qt(o)),(a=C.cssHooks[e]||C.cssHooks[o])&&"get"in a&&(s=a.get(t,!0,i)),void 0===s&&(s=Wt(t,e,n)),"normal"===s&&e in Gt&&(s=Gt[e]),""===i||i?(r=parseFloat(s),!0===i||isFinite(r)?r||0:s):s}}),C.each(["height","width"],function(t,a){C.cssHooks[a]={get:function(t,e,i){if(e)return!qt.test(C.css(t,"display"))||t.getClientRects().length&&t.getBoundingClientRect().width?te(t,a,i):K(t,Yt,function(){return te(t,a,i)})},set:function(t,e,i){var n,s=i&&Ft(t),r=i&&Zt(t,a,i,"border-box"===C.css(t,"boxSizing",!1,s),s);return r&&(n=J.exec(e))&&"px"!==(n[3]||"px")&&(t.style[a]=e,e=C.css(t,a)),Jt(0,e,r)}}}),C.cssHooks.marginLeft=$t(g.reliableMarginLeft,function(t,e){if(e)return(parseFloat(Wt(t,"marginLeft"))||t.getBoundingClientRect().left-K(t,{marginLeft:0},function(){return t.getBoundingClientRect().left}))+"px"}),C.each({margin:"",padding:"",border:"Width"},function(s,r){C.cssHooks[s+r]={expand:function(t){for(var e=0,i={},n="string"==typeof t?t.split(" "):[t];e<4;e++)i[s+Z[e]+r]=n[e]||n[e-2]||n[0];return i}},Bt.test(s)||(C.cssHooks[s+r].set=Jt)}),C.fn.extend({css:function(t,e){return W(this,function(t,e,i){var n,s,r={},a=0;if(Array.isArray(e)){for(n=Ft(t),s=e.length;a<s;a++)r[e[a]]=C.css(t,e[a],!1,n);return r}return void 0!==i?C.style(t,e,i):C.css(t,e)},t,e,1<arguments.length)}}),((C.Tween=ee).prototype={constructor:ee,init:function(t,e,i,n,s,r){this.elem=t,this.prop=i,this.easing=s||C.easing._default,this.options=e,this.start=this.now=this.cur(),this.end=n,this.unit=r||(C.cssNumber[i]?"":"px")},cur:function(){var t=ee.propHooks[this.prop];return t&&t.get?t.get(this):ee.propHooks._default.get(this)},run:function(t){var e,i=ee.propHooks[this.prop];return this.options.duration?this.pos=e=C.easing[this.easing](t,this.options.duration*t,0,1,this.options.duration):this.pos=e=t,this.now=(this.end-this.start)*e+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),i&&i.set?i.set(this):ee.propHooks._default.set(this),this}}).init.prototype=ee.prototype,(ee.propHooks={_default:{get:function(t){var e;return 1!==t.elem.nodeType||null!=t.elem[t.prop]&&null==t.elem.style[t.prop]?t.elem[t.prop]:(e=C.css(t.elem,t.prop,""))&&"auto"!==e?e:0},set:function(t){C.fx.step[t.prop]?C.fx.step[t.prop](t):1!==t.elem.nodeType||null==t.elem.style[C.cssProps[t.prop]]&&!C.cssHooks[t.prop]?t.elem[t.prop]=t.now:C.style(t.elem,t.prop,t.now+t.unit)}}}).scrollTop=ee.propHooks.scrollLeft={set:function(t){t.elem.nodeType&&t.elem.parentNode&&(t.elem[t.prop]=t.now)}},C.easing={linear:function(t){return t},swing:function(t){return.5-Math.cos(t*Math.PI)/2},_default:"swing"},C.fx=ee.prototype.init,C.fx.step={};var ie,ne,se,re,ae=/^(?:toggle|show|hide)$/,oe=/queueHooks$/;function le(){ne&&(!1===S.hidden&&k.requestAnimationFrame?k.requestAnimationFrame(le):k.setTimeout(le,C.fx.interval),C.fx.tick())}function ce(){return k.setTimeout(function(){ie=void 0}),ie=C.now()}function ue(t,e){var i,n=0,s={height:t};for(e=e?1:0;n<4;n+=2-e)s["margin"+(i=Z[n])]=s["padding"+i]=t;return e&&(s.opacity=s.width=t),s}function he(t,e,i){for(var n,s=(de.tweeners[e]||[]).concat(de.tweeners["*"]),r=0,a=s.length;r<a;r++)if(n=s[r].call(i,e,t))return n}function de(r,t,e){var i,a,n=0,s=de.prefilters.length,o=C.Deferred().always(function(){delete l.elem}),l=function(){if(a)return!1;for(var t=ie||ce(),e=Math.max(0,c.startTime+c.duration-t),i=1-(e/c.duration||0),n=0,s=c.tweens.length;n<s;n++)c.tweens[n].run(i);return o.notifyWith(r,[c,i,e]),i<1&&s?e:(s||o.notifyWith(r,[c,1,0]),o.resolveWith(r,[c]),!1)},c=o.promise({elem:r,props:C.extend({},t),opts:C.extend(!0,{specialEasing:{},easing:C.easing._default},e),originalProperties:t,originalOptions:e,startTime:ie||ce(),duration:e.duration,tweens:[],createTween:function(t,e){var i=C.Tween(r,c.opts,t,e,c.opts.specialEasing[t]||c.opts.easing);return c.tweens.push(i),i},stop:function(t){var e=0,i=t?c.tweens.length:0;if(a)return this;for(a=!0;e<i;e++)c.tweens[e].run(1);return t?(o.notifyWith(r,[c,1,0]),o.resolveWith(r,[c,t])):o.rejectWith(r,[c,t]),this}}),u=c.props;for(!function(t,e){var i,n,s,r,a;for(i in t)if(s=e[n=C.camelCase(i)],r=t[i],Array.isArray(r)&&(s=r[1],r=t[i]=r[0]),i!==n&&(t[n]=r,delete t[i]),(a=C.cssHooks[n])&&"expand"in a)for(i in r=a.expand(r),delete t[n],r)i in t||(t[i]=r[i],e[i]=s);else e[n]=s}(u,c.opts.specialEasing);n<s;n++)if(i=de.prefilters[n].call(c,r,u,c.opts))return C.isFunction(i.stop)&&(C._queueHooks(c.elem,c.opts.queue).stop=C.proxy(i.stop,i)),i;return C.map(u,he,c),C.isFunction(c.opts.start)&&c.opts.start.call(r,c),c.progress(c.opts.progress).done(c.opts.done,c.opts.complete).fail(c.opts.fail).always(c.opts.always),C.fx.timer(C.extend(l,{elem:r,anim:c,queue:c.opts.queue})),c}C.Animation=C.extend(de,{tweeners:{"*":[function(t,e){var i=this.createTween(t,e);return et(i.elem,t,J.exec(e),i),i}]},tweener:function(t,e){for(var i,n=0,s=(t=C.isFunction(t)?(e=t,["*"]):t.match(N)).length;n<s;n++)i=t[n],de.tweeners[i]=de.tweeners[i]||[],de.tweeners[i].unshift(e)},prefilters:[function(t,e,i){var n,s,r,a,o,l,c,u,h="width"in e||"height"in e,d=this,p={},f=t.style,m=t.nodeType&&tt(t),g=q.get(t,"fxshow");for(n in i.queue||(null==(a=C._queueHooks(t,"fx")).unqueued&&(a.unqueued=0,o=a.empty.fire,a.empty.fire=function(){a.unqueued||o()}),a.unqueued++,d.always(function(){d.always(function(){a.unqueued--,C.queue(t,"fx").length||a.empty.fire()})})),e)if(s=e[n],ae.test(s)){if(delete e[n],r=r||"toggle"===s,s===(m?"hide":"show")){if("show"!==s||!g||void 0===g[n])continue;m=!0}p[n]=g&&g[n]||C.style(t,n)}if((l=!C.isEmptyObject(e))||!C.isEmptyObject(p))for(n in h&&1===t.nodeType&&(i.overflow=[f.overflow,f.overflowX,f.overflowY],null==(c=g&&g.display)&&(c=q.get(t,"display")),"none"===(u=C.css(t,"display"))&&(c?u=c:(nt([t],!0),c=t.style.display||c,u=C.css(t,"display"),nt([t]))),("inline"===u||"inline-block"===u&&null!=c)&&"none"===C.css(t,"float")&&(l||(d.done(function(){f.display=c}),null==c&&(u=f.display,c="none"===u?"":u)),f.display="inline-block")),i.overflow&&(f.overflow="hidden",d.always(function(){f.overflow=i.overflow[0],f.overflowX=i.overflow[1],f.overflowY=i.overflow[2]})),l=!1,p)l||(g?"hidden"in g&&(m=g.hidden):g=q.access(t,"fxshow",{display:c}),r&&(g.hidden=!m),m&&nt([t],!0),d.done(function(){for(n in m||nt([t]),q.remove(t,"fxshow"),p)C.style(t,n,p[n])})),l=he(m?g[n]:0,n,d),n in g||(g[n]=l.start,m&&(l.end=l.start,l.start=0))}],prefilter:function(t,e){e?de.prefilters.unshift(t):de.prefilters.push(t)}}),C.speed=function(t,e,i){var n=t&&"object"==typeof t?C.extend({},t):{complete:i||!i&&e||C.isFunction(t)&&t,duration:t,easing:i&&e||e&&!C.isFunction(e)&&e};return C.fx.off?n.duration=0:"number"!=typeof n.duration&&(n.duration in C.fx.speeds?n.duration=C.fx.speeds[n.duration]:n.duration=C.fx.speeds._default),null!=n.queue&&!0!==n.queue||(n.queue="fx"),n.old=n.complete,n.complete=function(){C.isFunction(n.old)&&n.old.call(this),n.queue&&C.dequeue(this,n.queue)},n},C.fn.extend({fadeTo:function(t,e,i,n){return this.filter(tt).css("opacity",0).show().end().animate({opacity:e},t,i,n)},animate:function(e,t,i,n){function s(){var t=de(this,C.extend({},e),a);(r||q.get(this,"finish"))&&t.stop(!0)}var r=C.isEmptyObject(e),a=C.speed(t,i,n);return s.finish=s,r||!1===a.queue?this.each(s):this.queue(a.queue,s)},stop:function(s,t,r){function a(t){var e=t.stop;delete t.stop,e(r)}return"string"!=typeof s&&(r=t,t=s,s=void 0),t&&!1!==s&&this.queue(s||"fx",[]),this.each(function(){var t=!0,e=null!=s&&s+"queueHooks",i=C.timers,n=q.get(this);if(e)n[e]&&n[e].stop&&a(n[e]);else for(e in n)n[e]&&n[e].stop&&oe.test(e)&&a(n[e]);for(e=i.length;e--;)i[e].elem!==this||null!=s&&i[e].queue!==s||(i[e].anim.stop(r),t=!1,i.splice(e,1));!t&&r||C.dequeue(this,s)})},finish:function(a){return!1!==a&&(a=a||"fx"),this.each(function(){var t,e=q.get(this),i=e[a+"queue"],n=e[a+"queueHooks"],s=C.timers,r=i?i.length:0;for(e.finish=!0,C.queue(this,a,[]),n&&n.stop&&n.stop.call(this,!0),t=s.length;t--;)s[t].elem===this&&s[t].queue===a&&(s[t].anim.stop(!0),s.splice(t,1));for(t=0;t<r;t++)i[t]&&i[t].finish&&i[t].finish.call(this);delete e.finish})}}),C.each(["toggle","show","hide"],function(t,n){var s=C.fn[n];C.fn[n]=function(t,e,i){return null==t||"boolean"==typeof t?s.apply(this,arguments):this.animate(ue(n,!0),t,e,i)}}),C.each({slideDown:ue("show"),slideUp:ue("hide"),slideToggle:ue("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(t,n){C.fn[t]=function(t,e,i){return this.animate(n,t,e,i)}}),C.timers=[],C.fx.tick=function(){var t,e=0,i=C.timers;for(ie=C.now();e<i.length;e++)(t=i[e])()||i[e]!==t||i.splice(e--,1);i.length||C.fx.stop(),ie=void 0},C.fx.timer=function(t){C.timers.push(t),C.fx.start()},C.fx.interval=13,C.fx.start=function(){ne||(ne=!0,le())},C.fx.stop=function(){ne=null},C.fx.speeds={slow:600,fast:200,_default:400},C.fn.delay=function(n,t){return n=C.fx&&C.fx.speeds[n]||n,t=t||"fx",this.queue(t,function(t,e){var i=k.setTimeout(t,n);e.stop=function(){k.clearTimeout(i)}})},se=S.createElement("input"),re=S.createElement("select").appendChild(S.createElement("option")),se.type="checkbox",g.checkOn=""!==se.value,g.optSelected=re.selected,(se=S.createElement("input")).value="t",se.type="radio",g.radioValue="t"===se.value;var pe,fe=C.expr.attrHandle;C.fn.extend({attr:function(t,e){return W(this,C.attr,t,e,1<arguments.length)},removeAttr:function(t){return this.each(function(){C.removeAttr(this,t)})}}),C.extend({attr:function(t,e,i){var n,s,r=t.nodeType;if(3!==r&&8!==r&&2!==r)return void 0===t.getAttribute?C.prop(t,e,i):(1===r&&C.isXMLDoc(t)||(s=C.attrHooks[e.toLowerCase()]||(C.expr.match.bool.test(e)?pe:void 0)),void 0!==i?null===i?void C.removeAttr(t,e):s&&"set"in s&&void 0!==(n=s.set(t,i,e))?n:(t.setAttribute(e,i+""),i):s&&"get"in s&&null!==(n=s.get(t,e))?n:null==(n=C.find.attr(t,e))?void 0:n)},attrHooks:{type:{set:function(t,e){if(!g.radioValue&&"radio"===e&&x(t,"input")){var i=t.value;return t.setAttribute("type",e),i&&(t.value=i),e}}}},removeAttr:function(t,e){var i,n=0,s=e&&e.match(N);if(s&&1===t.nodeType)for(;i=s[n++];)t.removeAttribute(i)}}),pe={set:function(t,e,i){return!1===e?C.removeAttr(t,i):t.setAttribute(i,i),i}},C.each(C.expr.match.bool.source.match(/\w+/g),function(t,e){var a=fe[e]||C.find.attr;fe[e]=function(t,e,i){var n,s,r=e.toLowerCase();return i||(s=fe[r],fe[r]=n,n=null!=a(t,e,i)?r:null,fe[r]=s),n}});var me=/^(?:input|select|textarea|button)$/i,ge=/^(?:a|area)$/i;function ve(t){return(t.match(N)||[]).join(" ")}function ye(t){return t.getAttribute&&t.getAttribute("class")||""}C.fn.extend({prop:function(t,e){return W(this,C.prop,t,e,1<arguments.length)},removeProp:function(t){return this.each(function(){delete this[C.propFix[t]||t]})}}),C.extend({prop:function(t,e,i){var n,s,r=t.nodeType;if(3!==r&&8!==r&&2!==r)return 1===r&&C.isXMLDoc(t)||(e=C.propFix[e]||e,s=C.propHooks[e]),void 0!==i?s&&"set"in s&&void 0!==(n=s.set(t,i,e))?n:t[e]=i:s&&"get"in s&&null!==(n=s.get(t,e))?n:t[e]},propHooks:{tabIndex:{get:function(t){var e=C.find.attr(t,"tabindex");return e?parseInt(e,10):me.test(t.nodeName)||ge.test(t.nodeName)&&t.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),g.optSelected||(C.propHooks.selected={get:function(t){var e=t.parentNode;return e&&e.parentNode&&e.parentNode.selectedIndex,null},set:function(t){var e=t.parentNode;e&&(e.selectedIndex,e.parentNode&&e.parentNode.selectedIndex)}}),C.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){C.propFix[this.toLowerCase()]=this}),C.fn.extend({addClass:function(e){var t,i,n,s,r,a,o,l=0;if(C.isFunction(e))return this.each(function(t){C(this).addClass(e.call(this,t,ye(this)))});if("string"==typeof e&&e)for(t=e.match(N)||[];i=this[l++];)if(s=ye(i),n=1===i.nodeType&&" "+ve(s)+" "){for(a=0;r=t[a++];)n.indexOf(" "+r+" ")<0&&(n+=r+" ");s!==(o=ve(n))&&i.setAttribute("class",o)}return this},removeClass:function(e){var t,i,n,s,r,a,o,l=0;if(C.isFunction(e))return this.each(function(t){C(this).removeClass(e.call(this,t,ye(this)))});if(!arguments.length)return this.attr("class","");if("string"==typeof e&&e)for(t=e.match(N)||[];i=this[l++];)if(s=ye(i),n=1===i.nodeType&&" "+ve(s)+" "){for(a=0;r=t[a++];)for(;-1<n.indexOf(" "+r+" ");)n=n.replace(" "+r+" "," ");s!==(o=ve(n))&&i.setAttribute("class",o)}return this},toggleClass:function(s,e){var r=typeof s;return"boolean"==typeof e&&"string"==r?e?this.addClass(s):this.removeClass(s):C.isFunction(s)?this.each(function(t){C(this).toggleClass(s.call(this,t,ye(this),e),e)}):this.each(function(){var t,e,i,n;if("string"==r)for(e=0,i=C(this),n=s.match(N)||[];t=n[e++];)i.hasClass(t)?i.removeClass(t):i.addClass(t);else void 0!==s&&"boolean"!=r||((t=ye(this))&&q.set(this,"__className__",t),this.setAttribute&&this.setAttribute("class",t||!1===s?"":q.get(this,"__className__")||""))})},hasClass:function(t){var e,i,n=0;for(e=" "+t+" ";i=this[n++];)if(1===i.nodeType&&-1<(" "+ve(ye(i))+" ").indexOf(e))return!0;return!1}});var _e=/\r/g;C.fn.extend({val:function(i){var n,t,s,e=this[0];return arguments.length?(s=C.isFunction(i),this.each(function(t){var e;1===this.nodeType&&(null==(e=s?i.call(this,t,C(this).val()):i)?e="":"number"==typeof e?e+="":Array.isArray(e)&&(e=C.map(e,function(t){return null==t?"":t+""})),(n=C.valHooks[this.type]||C.valHooks[this.nodeName.toLowerCase()])&&"set"in n&&void 0!==n.set(this,e,"value")||(this.value=e))})):e?(n=C.valHooks[e.type]||C.valHooks[e.nodeName.toLowerCase()])&&"get"in n&&void 0!==(t=n.get(e,"value"))?t:"string"==typeof(t=e.value)?t.replace(_e,""):null==t?"":t:void 0}}),C.extend({valHooks:{option:{get:function(t){var e=C.find.attr(t,"value");return null!=e?e:ve(C.text(t))}},select:{get:function(t){var e,i,n,s=t.options,r=t.selectedIndex,a="select-one"===t.type,o=a?null:[],l=a?r+1:s.length;for(n=r<0?l:a?r:0;n<l;n++)if(((i=s[n]).selected||n===r)&&!i.disabled&&(!i.parentNode.disabled||!x(i.parentNode,"optgroup"))){if(e=C(i).val(),a)return e;o.push(e)}return o},set:function(t,e){for(var i,n,s=t.options,r=C.makeArray(e),a=s.length;a--;)((n=s[a]).selected=-1<C.inArray(C.valHooks.option.get(n),r))&&(i=!0);return i||(t.selectedIndex=-1),r}}}}),C.each(["radio","checkbox"],function(){C.valHooks[this]={set:function(t,e){if(Array.isArray(e))return t.checked=-1<C.inArray(C(t).val(),e)}},g.checkOn||(C.valHooks[this].get=function(t){return null===t.getAttribute("value")?"on":t.value})});var be=/^(?:focusinfocus|focusoutblur)$/;C.extend(C.event,{trigger:function(t,e,i,n){var s,r,a,o,l,c,u,h=[i||S],d=f.call(t,"type")?t.type:t,p=f.call(t,"namespace")?t.namespace.split("."):[];if(r=a=i=i||S,3!==i.nodeType&&8!==i.nodeType&&!be.test(d+C.event.triggered)&&(-1<d.indexOf(".")&&(d=(p=d.split(".")).shift(),p.sort()),l=d.indexOf(":")<0&&"on"+d,(t=t[C.expando]?t:new C.Event(d,"object"==typeof t&&t)).isTrigger=n?2:3,t.namespace=p.join("."),t.rnamespace=t.namespace?new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=void 0,t.target||(t.target=i),e=null==e?[t]:C.makeArray(e,[t]),u=C.event.special[d]||{},n||!u.trigger||!1!==u.trigger.apply(i,e))){if(!n&&!u.noBubble&&!C.isWindow(i)){for(o=u.delegateType||d,be.test(o+d)||(r=r.parentNode);r;r=r.parentNode)h.push(r),a=r;a===(i.ownerDocument||S)&&h.push(a.defaultView||a.parentWindow||k)}for(s=0;(r=h[s++])&&!t.isPropagationStopped();)t.type=1<s?o:u.bindType||d,(c=(q.get(r,"events")||{})[t.type]&&q.get(r,"handle"))&&c.apply(r,e),(c=l&&r[l])&&c.apply&&z(r)&&(t.result=c.apply(r,e),!1===t.result&&t.preventDefault());return t.type=d,n||t.isDefaultPrevented()||u._default&&!1!==u._default.apply(h.pop(),e)||!z(i)||l&&C.isFunction(i[d])&&!C.isWindow(i)&&((a=i[l])&&(i[l]=null),i[C.event.triggered=d](),C.event.triggered=void 0,a&&(i[l]=a)),t.result}},simulate:function(t,e,i){var n=C.extend(new C.Event,i,{type:t,isSimulated:!0});C.event.trigger(n,null,e)}}),C.fn.extend({trigger:function(t,e){return this.each(function(){C.event.trigger(t,e,this)})},triggerHandler:function(t,e){var i=this[0];if(i)return C.event.trigger(t,e,i,!0)}}),C.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(t,i){C.fn[i]=function(t,e){return 0<arguments.length?this.on(i,null,t,e):this.trigger(i)}}),C.fn.extend({hover:function(t,e){return this.mouseenter(t).mouseleave(e||t)}}),g.focusin="onfocusin"in k,g.focusin||C.each({focus:"focusin",blur:"focusout"},function(i,n){function s(t){C.event.simulate(n,t.target,C.event.fix(t))}C.event.special[n]={setup:function(){var t=this.ownerDocument||this,e=q.access(t,n);e||t.addEventListener(i,s,!0),q.access(t,n,(e||0)+1)},teardown:function(){var t=this.ownerDocument||this,e=q.access(t,n)-1;e?q.access(t,n,e):(t.removeEventListener(i,s,!0),q.remove(t,n))}}});var Te=k.location,we=C.now(),ke=/\?/;C.parseXML=function(t){var e;if(!t||"string"!=typeof t)return null;try{e=(new k.DOMParser).parseFromString(t,"text/xml")}catch(t){e=void 0}return e&&!e.getElementsByTagName("parsererror").length||C.error("Invalid XML: "+t),e};var Se=/\[\]$/,Ce=/\r?\n/g,xe=/^(?:submit|button|image|reset|file)$/i,Ee=/^(?:input|select|textarea|keygen)/i;function De(i,t,n,s){var e;if(Array.isArray(t))C.each(t,function(t,e){n||Se.test(i)?s(i,e):De(i+"["+("object"==typeof e&&null!=e?t:"")+"]",e,n,s)});else if(n||"object"!==C.type(t))s(i,t);else for(e in t)De(i+"["+e+"]",t[e],n,s)}C.param=function(t,e){function i(t,e){var i=C.isFunction(e)?e():e;s[s.length]=encodeURIComponent(t)+"="+encodeURIComponent(null==i?"":i)}var n,s=[];if(Array.isArray(t)||t.jquery&&!C.isPlainObject(t))C.each(t,function(){i(this.name,this.value)});else for(n in t)De(n,t[n],e,i);return s.join("&")},C.fn.extend({serialize:function(){return C.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var t=C.prop(this,"elements");return t?C.makeArray(t):this}).filter(function(){var t=this.type;return this.name&&!C(this).is(":disabled")&&Ee.test(this.nodeName)&&!xe.test(t)&&(this.checked||!st.test(t))}).map(function(t,e){var i=C(this).val();return null==i?null:Array.isArray(i)?C.map(i,function(t){return{name:e.name,value:t.replace(Ce,"\r\n")}}):{name:e.name,value:i.replace(Ce,"\r\n")}}).get()}});var Ae=/%20/g,Ie=/#.*$/,Oe=/([?&])_=[^&]*/,Pe=/^(.*?):[ \t]*([^\r\n]*)$/gm,Le=/^(?:GET|HEAD)$/,Me=/^\/\//,Ne={},Re={},Ue="*/".concat("*"),je=S.createElement("a");function Be(r){return function(t,e){"string"!=typeof t&&(e=t,t="*");var i,n=0,s=t.toLowerCase().match(N)||[];if(C.isFunction(e))for(;i=s[n++];)"+"===i[0]?(i=i.slice(1)||"*",(r[i]=r[i]||[]).unshift(e)):(r[i]=r[i]||[]).push(e)}}function He(e,s,r,a){var o={},l=e===Re;function c(t){var n;return o[t]=!0,C.each(e[t]||[],function(t,e){var i=e(s,r,a);return"string"!=typeof i||l||o[i]?l?!(n=i):void 0:(s.dataTypes.unshift(i),c(i),!1)}),n}return c(s.dataTypes[0])||!o["*"]&&c("*")}function Fe(t,e){var i,n,s=C.ajaxSettings.flatOptions||{};for(i in e)void 0!==e[i]&&((s[i]?t:n=n||{})[i]=e[i]);return n&&C.extend(!0,t,n),t}je.href=Te.href,C.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Te.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(Te.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Ue,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":C.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(t,e){return e?Fe(Fe(t,C.ajaxSettings),e):Fe(C.ajaxSettings,t)},ajaxPrefilter:Be(Ne),ajaxTransport:Be(Re),ajax:function(t,e){"object"==typeof t&&(e=t,t=void 0),e=e||{};var u,h,d,i,p,n,f,m,s,r,g=C.ajaxSetup({},e),v=g.context||g,y=g.context&&(v.nodeType||v.jquery)?C(v):C.event,_=C.Deferred(),b=C.Callbacks("once memory"),T=g.statusCode||{},a={},o={},l="canceled",w={readyState:0,getResponseHeader:function(t){var e;if(f){if(!i)for(i={};e=Pe.exec(d);)i[e[1].toLowerCase()]=e[2];e=i[t.toLowerCase()]}return null==e?null:e},getAllResponseHeaders:function(){return f?d:null},setRequestHeader:function(t,e){return null==f&&(t=o[t.toLowerCase()]=o[t.toLowerCase()]||t,a[t]=e),this},overrideMimeType:function(t){return null==f&&(g.mimeType=t),this},statusCode:function(t){var e;if(t)if(f)w.always(t[w.status]);else for(e in t)T[e]=[T[e],t[e]];return this},abort:function(t){var e=t||l;return u&&u.abort(e),c(0,e),this}};if(_.promise(w),g.url=((t||g.url||Te.href)+"").replace(Me,Te.protocol+"//"),g.type=e.method||e.type||g.method||g.type,g.dataTypes=(g.dataType||"*").toLowerCase().match(N)||[""],null==g.crossDomain){n=S.createElement("a");try{n.href=g.url,n.href=n.href,g.crossDomain=je.protocol+"//"+je.host!=n.protocol+"//"+n.host}catch(t){g.crossDomain=!0}}if(g.data&&g.processData&&"string"!=typeof g.data&&(g.data=C.param(g.data,g.traditional)),He(Ne,g,e,w),f)return w;for(s in(m=C.event&&g.global)&&0==C.active++&&C.event.trigger("ajaxStart"),g.type=g.type.toUpperCase(),g.hasContent=!Le.test(g.type),h=g.url.replace(Ie,""),g.hasContent?g.data&&g.processData&&0===(g.contentType||"").indexOf("application/x-www-form-urlencoded")&&(g.data=g.data.replace(Ae,"+")):(r=g.url.slice(h.length),g.data&&(h+=(ke.test(h)?"&":"?")+g.data,delete g.data),!1===g.cache&&(h=h.replace(Oe,"$1"),r=(ke.test(h)?"&":"?")+"_="+we+++r),g.url=h+r),g.ifModified&&(C.lastModified[h]&&w.setRequestHeader("If-Modified-Since",C.lastModified[h]),C.etag[h]&&w.setRequestHeader("If-None-Match",C.etag[h])),(g.data&&g.hasContent&&!1!==g.contentType||e.contentType)&&w.setRequestHeader("Content-Type",g.contentType),w.setRequestHeader("Accept",g.dataTypes[0]&&g.accepts[g.dataTypes[0]]?g.accepts[g.dataTypes[0]]+("*"!==g.dataTypes[0]?", "+Ue+"; q=0.01":""):g.accepts["*"]),g.headers)w.setRequestHeader(s,g.headers[s]);if(g.beforeSend&&(!1===g.beforeSend.call(v,w,g)||f))return w.abort();if(l="abort",b.add(g.complete),w.done(g.success),w.fail(g.error),u=He(Re,g,e,w)){if(w.readyState=1,m&&y.trigger("ajaxSend",[w,g]),f)return w;g.async&&0<g.timeout&&(p=k.setTimeout(function(){w.abort("timeout")},g.timeout));try{f=!1,u.send(a,c)}catch(t){if(f)throw t;c(-1,t)}}else c(-1,"No Transport");function c(t,e,i,n){var s,r,a,o,l,c=e;f||(f=!0,p&&k.clearTimeout(p),u=void 0,d=n||"",w.readyState=0<t?4:0,s=200<=t&&t<300||304===t,i&&(o=function(t,e,i){for(var n,s,r,a,o=t.contents,l=t.dataTypes;"*"===l[0];)l.shift(),void 0===n&&(n=t.mimeType||e.getResponseHeader("Content-Type"));if(n)for(s in o)if(o[s]&&o[s].test(n)){l.unshift(s);break}if(l[0]in i)r=l[0];else{for(s in i){if(!l[0]||t.converters[s+" "+l[0]]){r=s;break}a=a||s}r=r||a}if(r)return r!==l[0]&&l.unshift(r),i[r]}(g,w,i)),o=function(t,e,i,n){var s,r,a,o,l,c={},u=t.dataTypes.slice();if(u[1])for(a in t.converters)c[a.toLowerCase()]=t.converters[a];for(r=u.shift();r;)if(t.responseFields[r]&&(i[t.responseFields[r]]=e),!l&&n&&t.dataFilter&&(e=t.dataFilter(e,t.dataType)),l=r,r=u.shift())if("*"===r)r=l;else if("*"!==l&&l!==r){if(!(a=c[l+" "+r]||c["* "+r]))for(s in c)if((o=s.split(" "))[1]===r&&(a=c[l+" "+o[0]]||c["* "+o[0]])){!0===a?a=c[s]:!0!==c[s]&&(r=o[0],u.unshift(o[1]));break}if(!0!==a)if(a&&t.throws)e=a(e);else try{e=a(e)}catch(t){return{state:"parsererror",error:a?t:"No conversion from "+l+" to "+r}}}return{state:"success",data:e}}(g,o,w,s),s?(g.ifModified&&((l=w.getResponseHeader("Last-Modified"))&&(C.lastModified[h]=l),(l=w.getResponseHeader("etag"))&&(C.etag[h]=l)),204===t||"HEAD"===g.type?c="nocontent":304===t?c="notmodified":(c=o.state,r=o.data,s=!(a=o.error))):(a=c,!t&&c||(c="error",t<0&&(t=0))),w.status=t,w.statusText=(e||c)+"",s?_.resolveWith(v,[r,c,w]):_.rejectWith(v,[w,c,a]),w.statusCode(T),T=void 0,m&&y.trigger(s?"ajaxSuccess":"ajaxError",[w,g,s?r:a]),b.fireWith(v,[w,c]),m&&(y.trigger("ajaxComplete",[w,g]),--C.active||C.event.trigger("ajaxStop")))}return w},getJSON:function(t,e,i){return C.get(t,e,i,"json")},getScript:function(t,e){return C.get(t,void 0,e,"script")}}),C.each(["get","post"],function(t,s){C[s]=function(t,e,i,n){return C.isFunction(e)&&(n=n||i,i=e,e=void 0),C.ajax(C.extend({url:t,type:s,dataType:n,data:e,success:i},C.isPlainObject(t)&&t))}}),C._evalUrl=function(t){return C.ajax({url:t,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,throws:!0})},C.fn.extend({wrapAll:function(t){var e;return this[0]&&(C.isFunction(t)&&(t=t.call(this[0])),e=C(t,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&e.insertBefore(this[0]),e.map(function(){for(var t=this;t.firstElementChild;)t=t.firstElementChild;return t}).append(this)),this},wrapInner:function(i){return C.isFunction(i)?this.each(function(t){C(this).wrapInner(i.call(this,t))}):this.each(function(){var t=C(this),e=t.contents();e.length?e.wrapAll(i):t.append(i)})},wrap:function(e){var i=C.isFunction(e);return this.each(function(t){C(this).wrapAll(i?e.call(this,t):e)})},unwrap:function(t){return this.parent(t).not("body").each(function(){C(this).replaceWith(this.childNodes)}),this}}),C.expr.pseudos.hidden=function(t){return!C.expr.pseudos.visible(t)},C.expr.pseudos.visible=function(t){return!!(t.offsetWidth||t.offsetHeight||t.getClientRects().length)},C.ajaxSettings.xhr=function(){try{return new k.XMLHttpRequest}catch(t){}};var ze={0:200,1223:204},We=C.ajaxSettings.xhr();g.cors=!!We&&"withCredentials"in We,g.ajax=We=!!We,C.ajaxTransport(function(s){var r,a;if(g.cors||We&&!s.crossDomain)return{send:function(t,e){var i,n=s.xhr();if(n.open(s.type,s.url,s.async,s.username,s.password),s.xhrFields)for(i in s.xhrFields)n[i]=s.xhrFields[i];for(i in s.mimeType&&n.overrideMimeType&&n.overrideMimeType(s.mimeType),s.crossDomain||t["X-Requested-With"]||(t["X-Requested-With"]="XMLHttpRequest"),t)n.setRequestHeader(i,t[i]);r=function(t){return function(){r&&(r=a=n.onload=n.onerror=n.onabort=n.onreadystatechange=null,"abort"===t?n.abort():"error"===t?"number"!=typeof n.status?e(0,"error"):e(n.status,n.statusText):e(ze[n.status]||n.status,n.statusText,"text"!==(n.responseType||"text")||"string"!=typeof n.responseText?{binary:n.response}:{text:n.responseText},n.getAllResponseHeaders()))}},n.onload=r(),a=n.onerror=r("error"),void 0!==n.onabort?n.onabort=a:n.onreadystatechange=function(){4===n.readyState&&k.setTimeout(function(){r&&a()})},r=r("abort");try{n.send(s.hasContent&&s.data||null)}catch(t){if(r)throw t}},abort:function(){r&&r()}}}),C.ajaxPrefilter(function(t){t.crossDomain&&(t.contents.script=!1)}),C.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(t){return C.globalEval(t),t}}}),C.ajaxPrefilter("script",function(t){void 0===t.cache&&(t.cache=!1),t.crossDomain&&(t.type="GET")}),C.ajaxTransport("script",function(i){var n,s;if(i.crossDomain)return{send:function(t,e){n=C("<script>").prop({charset:i.scriptCharset,src:i.url}).on("load error",s=function(t){n.remove(),s=null,t&&e("error"===t.type?404:200,t.type)}),S.head.appendChild(n[0])},abort:function(){s&&s()}}});var $e,qe=[],Ve=/(=)\?(?=&|$)|\?\?/;C.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var t=qe.pop()||C.expando+"_"+we++;return this[t]=!0,t}}),C.ajaxPrefilter("json jsonp",function(t,e,i){var n,s,r,a=!1!==t.jsonp&&(Ve.test(t.url)?"url":"string"==typeof t.data&&0===(t.contentType||"").indexOf("application/x-www-form-urlencoded")&&Ve.test(t.data)&&"data");if(a||"jsonp"===t.dataTypes[0])return n=t.jsonpCallback=C.isFunction(t.jsonpCallback)?t.jsonpCallback():t.jsonpCallback,a?t[a]=t[a].replace(Ve,"$1"+n):!1!==t.jsonp&&(t.url+=(ke.test(t.url)?"&":"?")+t.jsonp+"="+n),t.converters["script json"]=function(){return r||C.error(n+" was not called"),r[0]},t.dataTypes[0]="json",s=k[n],k[n]=function(){r=arguments},i.always(function(){void 0===s?C(k).removeProp(n):k[n]=s,t[n]&&(t.jsonpCallback=e.jsonpCallback,qe.push(n)),r&&C.isFunction(s)&&s(r[0]),r=s=void 0}),"script"}),g.createHTMLDocument=(($e=S.implementation.createHTMLDocument("").body).innerHTML="<form></form><form></form>",2===$e.childNodes.length),C.parseHTML=function(t,e,i){return"string"!=typeof t?[]:("boolean"==typeof e&&(i=e,e=!1),e||(g.createHTMLDocument?((n=(e=S.implementation.createHTMLDocument("")).createElement("base")).href=S.location.href,e.head.appendChild(n)):e=S),r=!i&&[],(s=E.exec(t))?[e.createElement(s[1])]:(s=pt([t],e,r),r&&r.length&&C(r).remove(),C.merge([],s.childNodes)));var n,s,r},C.fn.load=function(t,e,i){var n,s,r,a=this,o=t.indexOf(" ");return-1<o&&(n=ve(t.slice(o)),t=t.slice(0,o)),C.isFunction(e)?(i=e,e=void 0):e&&"object"==typeof e&&(s="POST"),0<a.length&&C.ajax({url:t,type:s||"GET",dataType:"html",data:e}).done(function(t){r=arguments,a.html(n?C("<div>").append(C.parseHTML(t)).find(n):t)}).always(i&&function(t,e){a.each(function(){i.apply(this,r||[t.responseText,e,t])})}),this},C.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(t,e){C.fn[e]=function(t){return this.on(e,t)}}),C.expr.pseudos.animated=function(e){return C.grep(C.timers,function(t){return e===t.elem}).length},C.offset={setOffset:function(t,e,i){var n,s,r,a,o,l,c=C.css(t,"position"),u=C(t),h={};"static"===c&&(t.style.position="relative"),o=u.offset(),r=C.css(t,"top"),l=C.css(t,"left"),s=("absolute"===c||"fixed"===c)&&-1<(r+l).indexOf("auto")?(a=(n=u.position()).top,n.left):(a=parseFloat(r)||0,parseFloat(l)||0),C.isFunction(e)&&(e=e.call(t,i,C.extend({},o))),null!=e.top&&(h.top=e.top-o.top+a),null!=e.left&&(h.left=e.left-o.left+s),"using"in e?e.using.call(t,h):u.css(h)}},C.fn.extend({offset:function(e){if(arguments.length)return void 0===e?this:this.each(function(t){C.offset.setOffset(this,e,t)});var t,i,n,s,r=this[0];return r?r.getClientRects().length?(n=r.getBoundingClientRect(),i=(t=r.ownerDocument).documentElement,s=t.defaultView,{top:n.top+s.pageYOffset-i.clientTop,left:n.left+s.pageXOffset-i.clientLeft}):{top:0,left:0}:void 0},position:function(){if(this[0]){var t,e,i=this[0],n={top:0,left:0};return"fixed"===C.css(i,"position")?e=i.getBoundingClientRect():(t=this.offsetParent(),e=this.offset(),x(t[0],"html")||(n=t.offset()),n={top:n.top+C.css(t[0],"borderTopWidth",!0),left:n.left+C.css(t[0],"borderLeftWidth",!0)}),{top:e.top-n.top-C.css(i,"marginTop",!0),left:e.left-n.left-C.css(i,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var t=this.offsetParent;t&&"static"===C.css(t,"position");)t=t.offsetParent;return t||ft})}}),C.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,s){var r="pageYOffset"===s;C.fn[e]=function(t){return W(this,function(t,e,i){var n;if(C.isWindow(t)?n=t:9===t.nodeType&&(n=t.defaultView),void 0===i)return n?n[s]:t[e];n?n.scrollTo(r?n.pageXOffset:i,r?i:n.pageYOffset):t[e]=i},e,t,arguments.length)}}),C.each(["top","left"],function(t,i){C.cssHooks[i]=$t(g.pixelPosition,function(t,e){if(e)return e=Wt(t,i),Ht.test(e)?C(t).position()[i]+"px":e})}),C.each({Height:"height",Width:"width"},function(a,o){C.each({padding:"inner"+a,content:o,"":"outer"+a},function(n,r){C.fn[r]=function(t,e){var i=arguments.length&&(n||"boolean"!=typeof t),s=n||(!0===t||!0===e?"margin":"border");return W(this,function(t,e,i){var n;return C.isWindow(t)?0===r.indexOf("outer")?t["inner"+a]:t.document.documentElement["client"+a]:9===t.nodeType?(n=t.documentElement,Math.max(t.body["scroll"+a],n["scroll"+a],t.body["offset"+a],n["offset"+a],n["client"+a])):void 0===i?C.css(t,e,s):C.style(t,e,i,s)},o,i?t:void 0,i)}})}),C.fn.extend({bind:function(t,e,i){return this.on(t,null,e,i)},unbind:function(t,e){return this.off(t,null,e)},delegate:function(t,e,i,n){return this.on(e,t,i,n)},undelegate:function(t,e,i){return 1===arguments.length?this.off(t,"**"):this.off(e,t||"**",i)}}),C.holdReady=function(t){t?C.readyWait++:C.ready(!0)},C.isArray=Array.isArray,C.parseJSON=JSON.parse,C.nodeName=x,void 0===(Qe=function(){return C}.apply(Ke,[]))||(Xe.exports=Qe);var Ye=k.jQuery,Ge=k.$;return C.noConflict=function(t){return k.$===C&&(k.$=Ge),t&&k.jQuery===C&&(k.jQuery=Ye),C},t||(k.jQuery=k.$=C),C})},function(t,J,e){"use strict";Object.defineProperty(J,"__esModule",{value:!0}),function(t){for(var e="undefined"!=typeof window&&"undefined"!=typeof document,i=["Edge","Trident","Firefox"],n=0,s=0;s<i.length;s+=1)if(e&&0<=navigator.userAgent.indexOf(i[s])){n=1;break}var r=e&&window.Promise?function(t){var e=!1;return function(){e||(e=!0,window.Promise.resolve().then(function(){e=!1,t()}))}}:function(t){var e=!1;return function(){e||(e=!0,setTimeout(function(){e=!1,t()},n))}};function a(t){return t&&"[object Function]"==={}.toString.call(t)}function b(t,e){if(1!==t.nodeType)return[];var i=getComputedStyle(t,null);return e?i[e]:i}function h(t){return"HTML"===t.nodeName?t:t.parentNode||t.host}function p(t){if(!t)return document.body;switch(t.nodeName){case"HTML":case"BODY":return t.ownerDocument.body;case"#document":return t.body}var e=b(t),i=e.overflow,n=e.overflowX,s=e.overflowY;return/(auto|scroll)/.test(i+s+n)?t:p(h(t))}function y(t){var e=t&&t.offsetParent,i=e&&e.nodeName;return i&&"BODY"!==i&&"HTML"!==i?-1!==["TD","TABLE"].indexOf(e.nodeName)&&"static"===b(e,"position")?y(e):e:t?t.ownerDocument.documentElement:document.documentElement}function l(t){return null!==t.parentNode?l(t.parentNode):t}function d(t,e){if(!(t&&t.nodeType&&e&&e.nodeType))return document.documentElement;var i=t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_FOLLOWING,n=i?t:e,s=i?e:t,r=document.createRange();r.setStart(n,0),r.setEnd(s,0);var a=r.commonAncestorContainer;if(t!==a&&e!==a||n.contains(s))return function(t){var e=t.nodeName;return"BODY"!==e&&("HTML"===e||y(t.firstElementChild)===t)}(a)?a:y(a);var o=l(t);return o.host?d(o.host,e):d(t,l(e).host)}function f(t,e){var i="top"===(1<arguments.length&&void 0!==e?e:"top")?"scrollTop":"scrollLeft",n=t.nodeName;if("BODY"!==n&&"HTML"!==n)return t[i];var s=t.ownerDocument.documentElement;return(t.ownerDocument.scrollingElement||s)[i]}function m(t,e){var i="x"===e?"Left":"Top",n="Left"==i?"Right":"Bottom";return parseFloat(t["border"+i+"Width"],10)+parseFloat(t["border"+n+"Width"],10)}var o=void 0,g=function(){return void 0===o&&(o=-1!==navigator.appVersion.indexOf("MSIE 10")),o};function c(t,e,i,n){return Math.max(e["offset"+t],e["scroll"+t],i["client"+t],i["offset"+t],i["scroll"+t],g()?i["offset"+t]+n["margin"+("Height"===t?"Top":"Left")]+n["margin"+("Height"===t?"Bottom":"Right")]:0)}function v(){var t=document.body,e=document.documentElement,i=g()&&getComputedStyle(e);return{height:c("Height",t,e,i),width:c("Width",t,e,i)}}var u=function(t,e,i){return e&&_(t.prototype,e),i&&_(t,i),t};function _(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function T(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}var w=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(t[n]=i[n])}return t};function k(t){return w({},t,{right:t.left+t.width,bottom:t.top+t.height})}function S(t){var e={};if(g())try{e=t.getBoundingClientRect();var i=f(t,"top"),n=f(t,"left");e.top+=i,e.left+=n,e.bottom+=i,e.right+=n}catch(t){}else e=t.getBoundingClientRect();var s={left:e.left,top:e.top,width:e.right-e.left,height:e.bottom-e.top},r="HTML"===t.nodeName?v():{},a=r.width||t.clientWidth||s.right-s.left,o=r.height||t.clientHeight||s.bottom-s.top,l=t.offsetWidth-a,c=t.offsetHeight-o;if(l||c){var u=b(t);l-=m(u,"x"),c-=m(u,"y"),s.width-=l,s.height-=c}return k(s)}function C(t,e){var i=g(),n="HTML"===e.nodeName,s=S(t),r=S(e),a=p(t),o=b(e),l=parseFloat(o.borderTopWidth,10),c=parseFloat(o.borderLeftWidth,10),u=k({top:s.top-r.top-l,left:s.left-r.left-c,width:s.width,height:s.height});if(u.marginTop=0,u.marginLeft=0,!i&&n){var h=parseFloat(o.marginTop,10),d=parseFloat(o.marginLeft,10);u.top-=l-h,u.bottom-=l-h,u.left-=c-d,u.right-=c-d,u.marginTop=h,u.marginLeft=d}return(i?e.contains(a):e===a&&"BODY"!==a.nodeName)&&(u=function(t,e,i){var n=2<arguments.length&&void 0!==i&&i,s=f(e,"top"),r=f(e,"left"),a=n?-1:1;return t.top+=s*a,t.bottom+=s*a,t.left+=r*a,t.right+=r*a,t}(u,e)),u}function x(t,e,i,n){var s={top:0,left:0},r=d(t,e);if("viewport"===n)s=function(t){var e=t.ownerDocument.documentElement,i=C(t,e),n=Math.max(e.clientWidth,window.innerWidth||0),s=Math.max(e.clientHeight,window.innerHeight||0),r=f(e),a=f(e,"left");return k({top:r-i.top+i.marginTop,left:a-i.left+i.marginLeft,width:n,height:s})}(r);else{var a=void 0;"scrollParent"===n?"BODY"===(a=p(h(e))).nodeName&&(a=t.ownerDocument.documentElement):a="window"===n?t.ownerDocument.documentElement:n;var o=C(a,r);if("HTML"!==a.nodeName||function t(e){var i=e.nodeName;return"BODY"!==i&&"HTML"!==i&&("fixed"===b(e,"position")||t(h(e)))}(r))s=o;else{var l=v(),c=l.height,u=l.width;s.top+=o.top-o.marginTop,s.bottom=c+o.top,s.left+=o.left-o.marginLeft,s.right=u+o.left}}return s.left+=i,s.top+=i,s.right-=i,s.bottom-=i,s}function E(t,e,n,i,s,r){var a=5<arguments.length&&void 0!==r?r:0;if(-1===t.indexOf("auto"))return t;var o=x(n,i,a,s),l={top:{width:o.width,height:e.top-o.top},right:{width:o.right-e.right,height:o.height},bottom:{width:o.width,height:o.bottom-e.bottom},left:{width:e.left-o.left,height:o.height}},c=Object.keys(l).map(function(t){return w({key:t},l[t],{area:function(t){return t.width*t.height}(l[t])})}).sort(function(t,e){return e.area-t.area}),u=c.filter(function(t){var e=t.width,i=t.height;return e>=n.clientWidth&&i>=n.clientHeight}),h=0<u.length?u[0].key:c[0].key,d=t.split("-")[1];return h+(d?"-"+d:"")}function D(t,e,i){return C(i,d(e,i))}function A(t){var e=getComputedStyle(t),i=parseFloat(e.marginTop)+parseFloat(e.marginBottom),n=parseFloat(e.marginLeft)+parseFloat(e.marginRight);return{width:t.offsetWidth+n,height:t.offsetHeight+i}}function I(t){var e={left:"right",right:"left",bottom:"top",top:"bottom"};return t.replace(/left|right|bottom|top/g,function(t){return e[t]})}function O(t,e,i){i=i.split("-")[0];var n=A(t),s={width:n.width,height:n.height},r=-1!==["right","left"].indexOf(i),a=r?"top":"left",o=r?"left":"top",l=r?"height":"width",c=r?"width":"height";return s[a]=e[a]+e[l]/2-n[l]/2,s[o]=i===o?e[o]-n[c]:e[I(o)],s}function P(t,e){return Array.prototype.find?t.find(e):t.filter(e)[0]}function L(t,i,e){return(void 0===e?t:t.slice(0,function(t,e,i){if(Array.prototype.findIndex)return t.findIndex(function(t){return t[e]===i});var n=P(t,function(t){return t[e]===i});return t.indexOf(n)}(t,"name",e))).forEach(function(t){t.function&&console.warn("`modifier.function` is deprecated, use `modifier.fn`!");var e=t.function||t.fn;t.enabled&&a(e)&&(i.offsets.popper=k(i.offsets.popper),i.offsets.reference=k(i.offsets.reference),i=e(i,t))}),i}function M(t,i){return t.some(function(t){var e=t.name;return t.enabled&&e===i})}function N(t){for(var e=[!1,"ms","Webkit","Moz","O"],i=t.charAt(0).toUpperCase()+t.slice(1),n=0;n<e.length-1;n++){var s=e[n],r=s?""+s+i:t;if(void 0!==document.body.style[r])return r}return null}function R(t){var e=t.ownerDocument;return e?e.defaultView:window}function U(t,e,i,n){i.updateBound=n,R(t).addEventListener("resize",i.updateBound,{passive:!0});var s=p(t);return function t(e,i,n,s){var r="BODY"===e.nodeName,a=r?e.ownerDocument.defaultView:e;a.addEventListener(i,n,{passive:!0}),r||t(p(a.parentNode),i,n,s),s.push(a)}(s,"scroll",i.updateBound,i.scrollParents),i.scrollElement=s,i.eventsEnabled=!0,i}function j(){this.state.eventsEnabled&&(cancelAnimationFrame(this.scheduleUpdate),this.state=function(t,e){return R(t).removeEventListener("resize",e.updateBound),e.scrollParents.forEach(function(t){t.removeEventListener("scroll",e.updateBound)}),e.updateBound=null,e.scrollParents=[],e.scrollElement=null,e.eventsEnabled=!1,e}(this.reference,this.state))}function B(t){return""!==t&&!isNaN(parseFloat(t))&&isFinite(t)}function H(i,n){Object.keys(n).forEach(function(t){var e="";-1!==["width","height","top","right","bottom","left"].indexOf(t)&&B(n[t])&&(e="px"),i.style[t]=n[t]+e})}function F(t,e,i){var n=P(t,function(t){return t.name===e}),s=!!n&&t.some(function(t){return t.name===i&&t.enabled&&t.order<n.order});if(!s){var r="`"+e+"`",a="`"+i+"`";console.warn(a+" modifier is required by "+r+" modifier in order to work, be sure to include it before "+r+"!")}return s}var z=["auto-start","auto","auto-end","top-start","top","top-end","right-start","right","right-end","bottom-end","bottom","bottom-start","left-end","left","left-start"],W=z.slice(3);function $(t,e){var i=1<arguments.length&&void 0!==e&&e,n=W.indexOf(t),s=W.slice(n+1).concat(W.slice(0,n));return i?s.reverse():s}var q="flip",V="clockwise",Y="counterclockwise";function G(t,s,r,e){var a=[0,0],o=-1!==["right","left"].indexOf(e),i=t.split(/(\+|\-)/).map(function(t){return t.trim()}),n=i.indexOf(P(i,function(t){return-1!==t.search(/,|\s/)}));i[n]&&-1===i[n].indexOf(",")&&console.warn("Offsets separated by white space(s) are deprecated, use a comma (,) instead.");var l=/\s*,\s*|\s+/,c=-1!==n?[i.slice(0,n).concat([i[n].split(l)[0]]),[i[n].split(l)[1]].concat(i.slice(n+1))]:[i];return(c=c.map(function(t,e){var i=(1===e?!o:o)?"height":"width",n=!1;return t.reduce(function(t,e){return""===t[t.length-1]&&-1!==["+","-"].indexOf(e)?(t[t.length-1]=e,n=!0,t):n?(t[t.length-1]+=e,n=!1,t):t.concat(e)},[]).map(function(t){return function(t,e,i,n){var s=t.match(/((?:\-|\+)?\d*\.?\d*)(.*)/),r=+s[1],a=s[2];if(!r)return t;if(0!==a.indexOf("%"))return"vh"!==a&&"vw"!==a?r:("vh"===a?Math.max(document.documentElement.clientHeight,window.innerHeight||0):Math.max(document.documentElement.clientWidth,window.innerWidth||0))/100*r;var o=void 0;switch(a){case"%p":o=i;break;case"%":case"%r":default:o=n}return k(o)[e]/100*r}(t,i,s,r)})})).forEach(function(i,n){i.forEach(function(t,e){B(t)&&(a[n]+=t*("-"===i[e-1]?-1:1))})}),a}var X={placement:"bottom",eventsEnabled:!0,removeOnDestroy:!1,onCreate:function(){},onUpdate:function(){},modifiers:{shift:{order:100,enabled:!0,fn:function(t){var e=t.placement,i=e.split("-")[0],n=e.split("-")[1];if(n){var s=t.offsets,r=s.reference,a=s.popper,o=-1!==["bottom","top"].indexOf(i),l=o?"left":"top",c=o?"width":"height",u={start:T({},l,r[l]),end:T({},l,r[l]+r[c]-a[c])};t.offsets.popper=w({},a,u[n])}return t}},offset:{order:200,enabled:!0,fn:function(t,e){var i=e.offset,n=t.placement,s=t.offsets,r=s.popper,a=s.reference,o=n.split("-")[0],l=void 0;return l=B(+i)?[+i,0]:G(i,r,a,o),"left"===o?(r.top+=l[0],r.left-=l[1]):"right"===o?(r.top+=l[0],r.left+=l[1]):"top"===o?(r.left+=l[0],r.top-=l[1]):"bottom"===o&&(r.left+=l[0],r.top+=l[1]),t.popper=r,t},offset:0},preventOverflow:{order:300,enabled:!0,fn:function(t,n){var e=n.boundariesElement||y(t.instance.popper);t.instance.reference===e&&(e=y(e));var s=x(t.instance.popper,t.instance.reference,n.padding,e);n.boundaries=s;var i=n.priority,r=t.offsets.popper,a={primary:function(t){var e=r[t];return r[t]<s[t]&&!n.escapeWithReference&&(e=Math.max(r[t],s[t])),T({},t,e)},secondary:function(t){var e="right"===t?"left":"top",i=r[e];return r[t]>s[t]&&!n.escapeWithReference&&(i=Math.min(r[e],s[t]-("right"===t?r.width:r.height))),T({},e,i)}};return i.forEach(function(t){var e=-1!==["left","top"].indexOf(t)?"primary":"secondary";r=w({},r,a[e](t))}),t.offsets.popper=r,t},priority:["left","right","top","bottom"],padding:5,boundariesElement:"scrollParent"},keepTogether:{order:400,enabled:!0,fn:function(t){var e=t.offsets,i=e.popper,n=e.reference,s=t.placement.split("-")[0],r=Math.floor,a=-1!==["top","bottom"].indexOf(s),o=a?"right":"bottom",l=a?"left":"top",c=a?"width":"height";return i[o]<r(n[l])&&(t.offsets.popper[l]=r(n[l])-i[c]),i[l]>r(n[o])&&(t.offsets.popper[l]=r(n[o])),t}},arrow:{order:500,enabled:!0,fn:function(t,e){var i;if(!F(t.instance.modifiers,"arrow","keepTogether"))return t;var n=e.element;if("string"==typeof n){if(!(n=t.instance.popper.querySelector(n)))return t}else if(!t.instance.popper.contains(n))return console.warn("WARNING: `arrow.element` must be child of its popper element!"),t;var s=t.placement.split("-")[0],r=t.offsets,a=r.popper,o=r.reference,l=-1!==["left","right"].indexOf(s),c=l?"height":"width",u=l?"Top":"Left",h=u.toLowerCase(),d=l?"left":"top",p=l?"bottom":"right",f=A(n)[c];o[p]-f<a[h]&&(t.offsets.popper[h]-=a[h]-(o[p]-f)),o[h]+f>a[p]&&(t.offsets.popper[h]+=o[h]+f-a[p]),t.offsets.popper=k(t.offsets.popper);var m=o[h]+o[c]/2-f/2,g=b(t.instance.popper),v=parseFloat(g["margin"+u],10),y=parseFloat(g["border"+u+"Width"],10),_=m-t.offsets.popper[h]-v-y;return _=Math.max(Math.min(a[c]-f,_),0),t.arrowElement=n,t.offsets.arrow=(T(i={},h,Math.round(_)),T(i,d,""),i),t},element:"[x-arrow]"},flip:{order:600,enabled:!0,fn:function(p,f){if(M(p.instance.modifiers,"inner"))return p;if(p.flipped&&p.placement===p.originalPlacement)return p;var m=x(p.instance.popper,p.instance.reference,f.padding,f.boundariesElement),g=p.placement.split("-")[0],v=I(g),y=p.placement.split("-")[1]||"",_=[];switch(f.behavior){case q:_=[g,v];break;case V:_=$(g);break;case Y:_=$(g,!0);break;default:_=f.behavior}return _.forEach(function(t,e){if(g!==t||_.length===e+1)return p;g=p.placement.split("-")[0],v=I(g);var i=p.offsets.popper,n=p.offsets.reference,s=Math.floor,r="left"===g&&s(i.right)>s(n.left)||"right"===g&&s(i.left)<s(n.right)||"top"===g&&s(i.bottom)>s(n.top)||"bottom"===g&&s(i.top)<s(n.bottom),a=s(i.left)<s(m.left),o=s(i.right)>s(m.right),l=s(i.top)<s(m.top),c=s(i.bottom)>s(m.bottom),u="left"===g&&a||"right"===g&&o||"top"===g&&l||"bottom"===g&&c,h=-1!==["top","bottom"].indexOf(g),d=!!f.flipVariations&&(h&&"start"===y&&a||h&&"end"===y&&o||!h&&"start"===y&&l||!h&&"end"===y&&c);(r||u||d)&&(p.flipped=!0,(r||u)&&(g=_[e+1]),d&&(y=function(t){return"end"===t?"start":"start"===t?"end":t}(y)),p.placement=g+(y?"-"+y:""),p.offsets.popper=w({},p.offsets.popper,O(p.instance.popper,p.offsets.reference,p.placement)),p=L(p.instance.modifiers,p,"flip"))}),p},behavior:"flip",padding:5,boundariesElement:"viewport"},inner:{order:700,enabled:!1,fn:function(t){var e=t.placement,i=e.split("-")[0],n=t.offsets,s=n.popper,r=n.reference,a=-1!==["left","right"].indexOf(i),o=-1===["top","left"].indexOf(i);return s[a?"left":"top"]=r[i]-(o?s[a?"width":"height"]:0),t.placement=I(e),t.offsets.popper=k(s),t}},hide:{order:800,enabled:!0,fn:function(t){if(!F(t.instance.modifiers,"hide","preventOverflow"))return t;var e=t.offsets.reference,i=P(t.instance.modifiers,function(t){return"preventOverflow"===t.name}).boundaries;if(e.bottom<i.top||e.left>i.right||e.top>i.bottom||e.right<i.left){if(!0===t.hide)return t;t.hide=!0,t.attributes["x-out-of-boundaries"]=""}else{if(!1===t.hide)return t;t.hide=!1,t.attributes["x-out-of-boundaries"]=!1}return t}},computeStyle:{order:850,enabled:!0,fn:function(t,e){var i=e.x,n=e.y,s=t.offsets.popper,r=P(t.instance.modifiers,function(t){return"applyStyle"===t.name}).gpuAcceleration;void 0!==r&&console.warn("WARNING: `gpuAcceleration` option moved to `computeStyle` modifier and will not be supported in future versions of Popper.js!");var a=void 0!==r?r:e.gpuAcceleration,o=S(y(t.instance.popper)),l={position:s.position},c={left:Math.floor(s.left),top:Math.floor(s.top),bottom:Math.floor(s.bottom),right:Math.floor(s.right)},u="bottom"===i?"top":"bottom",h="right"===n?"left":"right",d=N("transform"),p=void 0,f=void 0;if(f="bottom"==u?-o.height+c.bottom:c.top,p="right"==h?-o.width+c.right:c.left,a&&d)l[d]="translate3d("+p+"px, "+f+"px, 0)",l[u]=0,l[h]=0,l.willChange="transform";else{var m="bottom"==u?-1:1,g="right"==h?-1:1;l[u]=f*m,l[h]=p*g,l.willChange=u+", "+h}var v={"x-placement":t.placement};return t.attributes=w({},v,t.attributes),t.styles=w({},l,t.styles),t.arrowStyles=w({},t.offsets.arrow,t.arrowStyles),t},gpuAcceleration:!0,x:"bottom",y:"right"},applyStyle:{order:900,enabled:!0,fn:function(t){return H(t.instance.popper,t.styles),function(e,i){Object.keys(i).forEach(function(t){!1!==i[t]?e.setAttribute(t,i[t]):e.removeAttribute(t)})}(t.instance.popper,t.attributes),t.arrowElement&&Object.keys(t.arrowStyles).length&&H(t.arrowElement,t.arrowStyles),t},onLoad:function(t,e,i,n,s){var r=D(0,e,t),a=E(i.placement,r,e,t,i.modifiers.flip.boundariesElement,i.modifiers.flip.padding);return e.setAttribute("x-placement",a),H(e,{position:"absolute"}),i},gpuAcceleration:void 0}}},K=(u(Q,[{key:"update",value:function(){return function(){if(!this.state.isDestroyed){var t={instance:this,styles:{},arrowStyles:{},attributes:{},flipped:!1,offsets:{}};t.offsets.reference=D(this.state,this.popper,this.reference),t.placement=E(this.options.placement,t.offsets.reference,this.popper,this.reference,this.options.modifiers.flip.boundariesElement,this.options.modifiers.flip.padding),t.originalPlacement=t.placement,t.offsets.popper=O(this.popper,t.offsets.reference,t.placement),t.offsets.popper.position="absolute",t=L(this.modifiers,t),this.state.isCreated?this.options.onUpdate(t):(this.state.isCreated=!0,this.options.onCreate(t))}}.call(this)}},{key:"destroy",value:function(){return function(){return this.state.isDestroyed=!0,M(this.modifiers,"applyStyle")&&(this.popper.removeAttribute("x-placement"),this.popper.style.left="",this.popper.style.position="",this.popper.style.top="",this.popper.style[N("transform")]=""),this.disableEventListeners(),this.options.removeOnDestroy&&this.popper.parentNode.removeChild(this.popper),this}.call(this)}},{key:"enableEventListeners",value:function(){return function(){this.state.eventsEnabled||(this.state=U(this.reference,this.options,this.state,this.scheduleUpdate))}.call(this)}},{key:"disableEventListeners",value:function(){return j.call(this)}}]),Q);function Q(t,e){var i=this,n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{};!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,Q),this.scheduleUpdate=function(){return requestAnimationFrame(i.update)},this.update=r(this.update.bind(this)),this.options=w({},Q.Defaults,n),this.state={isDestroyed:!1,isCreated:!1,scrollParents:[]},this.reference=t&&t.jquery?t[0]:t,this.popper=e&&e.jquery?e[0]:e,this.options.modifiers={},Object.keys(w({},Q.Defaults.modifiers,n.modifiers)).forEach(function(t){i.options.modifiers[t]=w({},Q.Defaults.modifiers[t]||{},n.modifiers?n.modifiers[t]:{})}),this.modifiers=Object.keys(this.options.modifiers).map(function(t){return w({name:t},i.options.modifiers[t])}).sort(function(t,e){return t.order-e.order}),this.modifiers.forEach(function(t){t.enabled&&a(t.onLoad)&&t.onLoad(i.reference,i.popper,i.options,t,i.state)}),this.update();var s=this.options.eventsEnabled;s&&this.enableEventListeners(),this.state.eventsEnabled=s}K.Utils=("undefined"!=typeof window?window:t).PopperUtils,K.placements=z,K.Defaults=X,J.default=K}.call(J,e(1))},function(e,i,n){var s,r,a;!function(t){"use strict";r=[n(0)],void 0===(a="function"==typeof(s=t)?s.apply(i,r):s)||(e.exports=a)}(function(c){"use strict";var s,r=window.Slick||{};s=0,(r=function(t,e){var i,n=this;n.defaults={accessibility:!0,adaptiveHeight:!1,appendArrows:c(t),appendDots:c(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(t,e){return c('<button type="button" />').text(e+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},c.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=c(t),n.$slidesCache=null,n.transformType=null,n.transitionType=null,n.visibilityChange="visibilitychange",n.windowWidth=0,n.windowTimer=null,i=c(t).data("slick")||{},n.options=c.extend({},n.defaults,e,i),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=c.proxy(n.autoPlay,n),n.autoPlayClear=c.proxy(n.autoPlayClear,n),n.autoPlayIterator=c.proxy(n.autoPlayIterator,n),n.changeSlide=c.proxy(n.changeSlide,n),n.clickHandler=c.proxy(n.clickHandler,n),n.selectHandler=c.proxy(n.selectHandler,n),n.setPosition=c.proxy(n.setPosition,n),n.swipeHandler=c.proxy(n.swipeHandler,n),n.dragHandler=c.proxy(n.dragHandler,n),n.keyHandler=c.proxy(n.keyHandler,n),n.instanceUid=s++,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"})},r.prototype.addSlide=r.prototype.slickAdd=function(t,e,i){var n=this;if("boolean"==typeof e)i=e,e=null;else if(e<0||e>=n.slideCount)return!1;n.unload(),"number"==typeof e?0===e&&0===n.$slides.length?c(t).appendTo(n.$slideTrack):i?c(t).insertBefore(n.$slides.eq(e)):c(t).insertAfter(n.$slides.eq(e)):!0===i?c(t).prependTo(n.$slideTrack):c(t).appendTo(n.$slideTrack),n.$slides=n.$slideTrack.children(this.options.slide),n.$slideTrack.children(this.options.slide).detach(),n.$slideTrack.append(n.$slides),n.$slides.each(function(t,e){c(e).attr("data-slick-index",t)}),n.$slidesCache=n.$slides,n.reinit()},r.prototype.animateHeight=function(){if(1===this.options.slidesToShow&&!0===this.options.adaptiveHeight&&!1===this.options.vertical){var t=this.$slides.eq(this.currentSlide).outerHeight(!0);this.$list.animate({height:t},this.options.speed)}},r.prototype.animateSlide=function(t,e){var i={},n=this;n.animateHeight(),!0===n.options.rtl&&!1===n.options.vertical&&(t=-t),!1===n.transformsEnabled?!1===n.options.vertical?n.$slideTrack.animate({left:t},n.options.speed,n.options.easing,e):n.$slideTrack.animate({top:t},n.options.speed,n.options.easing,e):!1===n.cssTransitions?(!0===n.options.rtl&&(n.currentLeft=-n.currentLeft),c({animStart:n.currentLeft}).animate({animStart:t},{duration:n.options.speed,easing:n.options.easing,step:function(t){t=Math.ceil(t),!1===n.options.vertical?i[n.animType]="translate("+t+"px, 0px)":i[n.animType]="translate(0px,"+t+"px)",n.$slideTrack.css(i)},complete:function(){e&&e.call()}})):(n.applyTransition(),t=Math.ceil(t),!1===n.options.vertical?i[n.animType]="translate3d("+t+"px, 0px, 0px)":i[n.animType]="translate3d(0px,"+t+"px, 0px)",n.$slideTrack.css(i),e&&setTimeout(function(){n.disableTransition(),e.call()},n.options.speed))},r.prototype.getNavTarget=function(){var t=this.options.asNavFor;return t&&null!==t&&(t=c(t).not(this.$slider)),t},r.prototype.asNavFor=function(e){var t=this.getNavTarget();null!==t&&"object"==typeof t&&t.each(function(){var t=c(this).slick("getSlick");t.unslicked||t.slideHandler(e,!0)})},r.prototype.applyTransition=function(t){var e=this,i={};!1===e.options.fade?i[e.transitionType]=e.transformType+" "+e.options.speed+"ms "+e.options.cssEase:i[e.transitionType]="opacity "+e.options.speed+"ms "+e.options.cssEase,!1===e.options.fade?e.$slideTrack.css(i):e.$slides.eq(t).css(i)},r.prototype.autoPlay=function(){this.autoPlayClear(),this.slideCount>this.options.slidesToShow&&(this.autoPlayTimer=setInterval(this.autoPlayIterator,this.options.autoplaySpeed))},r.prototype.autoPlayClear=function(){this.autoPlayTimer&&clearInterval(this.autoPlayTimer)},r.prototype.autoPlayIterator=function(){var t=this,e=t.currentSlide+t.options.slidesToScroll;t.paused||t.interrupted||t.focussed||(!1===t.options.infinite&&(1===t.direction&&t.currentSlide+1===t.slideCount-1?t.direction=0:0===t.direction&&(e=t.currentSlide-t.options.slidesToScroll,t.currentSlide-1==0&&(t.direction=1))),t.slideHandler(e))},r.prototype.buildArrows=function(){var t=this;!0===t.options.arrows&&(t.$prevArrow=c(t.options.prevArrow).addClass("slick-arrow"),t.$nextArrow=c(t.options.nextArrow).addClass("slick-arrow"),t.slideCount>t.options.slidesToShow?(t.$prevArrow.removeClass("slick-hidden").removeAttr("aria-hidden tabindex"),t.$nextArrow.removeClass("slick-hidden").removeAttr("aria-hidden tabindex"),t.htmlExpr.test(t.options.prevArrow)&&t.$prevArrow.prependTo(t.options.appendArrows),t.htmlExpr.test(t.options.nextArrow)&&t.$nextArrow.appendTo(t.options.appendArrows),!0!==t.options.infinite&&t.$prevArrow.addClass("slick-disabled").attr("aria-disabled","true")):t.$prevArrow.add(t.$nextArrow).addClass("slick-hidden").attr({"aria-disabled":"true",tabindex:"-1"}))},r.prototype.buildDots=function(){var t,e,i=this;if(!0===i.options.dots&&i.slideCount>i.options.slidesToShow){for(i.$slider.addClass("slick-dotted"),e=c("<ul />").addClass(i.options.dotsClass),t=0;t<=i.getDotCount();t+=1)e.append(c("<li />").append(i.options.customPaging.call(this,i,t)));i.$dots=e.appendTo(i.options.appendDots),i.$dots.find("li").first().addClass("slick-active")}},r.prototype.buildOut=function(){var t=this;t.$slides=t.$slider.children(t.options.slide+":not(.slick-cloned)").addClass("slick-slide"),t.slideCount=t.$slides.length,t.$slides.each(function(t,e){c(e).attr("data-slick-index",t).data("originalStyling",c(e).attr("style")||"")}),t.$slider.addClass("slick-slider"),t.$slideTrack=0===t.slideCount?c('<div class="slick-track"/>').appendTo(t.$slider):t.$slides.wrapAll('<div class="slick-track"/>').parent(),t.$list=t.$slideTrack.wrap('<div class="slick-list"/>').parent(),t.$slideTrack.css("opacity",0),!0!==t.options.centerMode&&!0!==t.options.swipeToSlide||(t.options.slidesToScroll=1),c("img[data-lazy]",t.$slider).not("[src]").addClass("slick-loading"),t.setupInfinite(),t.buildArrows(),t.buildDots(),t.updateDots(),t.setSlideClasses("number"==typeof t.currentSlide?t.currentSlide:0),!0===t.options.draggable&&t.$list.addClass("draggable")},r.prototype.buildRows=function(){var t,e,i,n,s,r,a,o=this;if(n=document.createDocumentFragment(),r=o.$slider.children(),0<o.options.rows){for(a=o.options.slidesPerRow*o.options.rows,s=Math.ceil(r.length/a),t=0;t<s;t++){var l=document.createElement("div");for(e=0;e<o.options.rows;e++){var c=document.createElement("div");for(i=0;i<o.options.slidesPerRow;i++){var u=t*a+(e*o.options.slidesPerRow+i);r.get(u)&&c.appendChild(r.get(u))}l.appendChild(c)}n.appendChild(l)}o.$slider.empty().append(n),o.$slider.children().children().children().css({width:100/o.options.slidesPerRow+"%",display:"inline-block"})}},r.prototype.checkResponsive=function(t,e){var i,n,s,r=this,a=!1,o=r.$slider.width(),l=window.innerWidth||c(window).width();if("window"===r.respondTo?s=l:"slider"===r.respondTo?s=o:"min"===r.respondTo&&(s=Math.min(l,o)),r.options.responsive&&r.options.responsive.length&&null!==r.options.responsive){for(i in n=null,r.breakpoints)r.breakpoints.hasOwnProperty(i)&&(!1===r.originalSettings.mobileFirst?s<r.breakpoints[i]&&(n=r.breakpoints[i]):s>r.breakpoints[i]&&(n=r.breakpoints[i]));null!==n?null!==r.activeBreakpoint&&n===r.activeBreakpoint&&!e||(r.activeBreakpoint=n,"unslick"===r.breakpointSettings[n]?r.unslick(n):(r.options=c.extend({},r.originalSettings,r.breakpointSettings[n]),!0===t&&(r.currentSlide=r.options.initialSlide),r.refresh(t)),a=n):null!==r.activeBreakpoint&&(r.activeBreakpoint=null,r.options=r.originalSettings,!0===t&&(r.currentSlide=r.options.initialSlide),r.refresh(t),a=n),t||!1===a||r.$slider.trigger("breakpoint",[r,a])}},r.prototype.changeSlide=function(t,e){var i,n,s=this,r=c(t.currentTarget);switch(r.is("a")&&t.preventDefault(),r.is("li")||(r=r.closest("li")),i=s.slideCount%s.options.slidesToScroll!=0?0:(s.slideCount-s.currentSlide)%s.options.slidesToScroll,t.data.message){case"previous":n=0==i?s.options.slidesToScroll:s.options.slidesToShow-i,s.slideCount>s.options.slidesToShow&&s.slideHandler(s.currentSlide-n,!1,e);break;case"next":n=0==i?s.options.slidesToScroll:i,s.slideCount>s.options.slidesToShow&&s.slideHandler(s.currentSlide+n,!1,e);break;case"index":var a=0===t.data.index?0:t.data.index||r.index()*s.options.slidesToScroll;s.slideHandler(s.checkNavigable(a),!1,e),r.children().trigger("focus");break;default:return}},r.prototype.checkNavigable=function(t){var e,i;if(i=0,t>(e=this.getNavigableIndexes())[e.length-1])t=e[e.length-1];else for(var n in e){if(t<e[n]){t=i;break}i=e[n]}return t},r.prototype.cleanUpEvents=function(){var t=this;t.options.dots&&null!==t.$dots&&(c("li",t.$dots).off("click.slick",t.changeSlide).off("mouseenter.slick",c.proxy(t.interrupt,t,!0)).off("mouseleave.slick",c.proxy(t.interrupt,t,!1)),!0===t.options.accessibility&&t.$dots.off("keydown.slick",t.keyHandler)),t.$slider.off("focus.slick blur.slick"),!0===t.options.arrows&&t.slideCount>t.options.slidesToShow&&(t.$prevArrow&&t.$prevArrow.off("click.slick",t.changeSlide),t.$nextArrow&&t.$nextArrow.off("click.slick",t.changeSlide),!0===t.options.accessibility&&(t.$prevArrow&&t.$prevArrow.off("keydown.slick",t.keyHandler),t.$nextArrow&&t.$nextArrow.off("keydown.slick",t.keyHandler))),t.$list.off("touchstart.slick mousedown.slick",t.swipeHandler),t.$list.off("touchmove.slick mousemove.slick",t.swipeHandler),t.$list.off("touchend.slick mouseup.slick",t.swipeHandler),t.$list.off("touchcancel.slick mouseleave.slick",t.swipeHandler),t.$list.off("click.slick",t.clickHandler),c(document).off(t.visibilityChange,t.visibility),t.cleanUpSlideEvents(),!0===t.options.accessibility&&t.$list.off("keydown.slick",t.keyHandler),!0===t.options.focusOnSelect&&c(t.$slideTrack).children().off("click.slick",t.selectHandler),c(window).off("orientationchange.slick.slick-"+t.instanceUid,t.orientationChange),c(window).off("resize.slick.slick-"+t.instanceUid,t.resize),c("[draggable!=true]",t.$slideTrack).off("dragstart",t.preventDefault),c(window).off("load.slick.slick-"+t.instanceUid,t.setPosition)},r.prototype.cleanUpSlideEvents=function(){this.$list.off("mouseenter.slick",c.proxy(this.interrupt,this,!0)),this.$list.off("mouseleave.slick",c.proxy(this.interrupt,this,!1))},r.prototype.cleanUpRows=function(){var t;0<this.options.rows&&((t=this.$slides.children().children()).removeAttr("style"),this.$slider.empty().append(t))},r.prototype.clickHandler=function(t){!1===this.shouldClick&&(t.stopImmediatePropagation(),t.stopPropagation(),t.preventDefault())},r.prototype.destroy=function(t){var e=this;e.autoPlayClear(),e.touchObject={},e.cleanUpEvents(),c(".slick-cloned",e.$slider).detach(),e.$dots&&e.$dots.remove(),e.$prevArrow&&e.$prevArrow.length&&(e.$prevArrow.removeClass("slick-disabled slick-arrow slick-hidden").removeAttr("aria-hidden aria-disabled tabindex").css("display",""),e.htmlExpr.test(e.options.prevArrow)&&e.$prevArrow.remove()),e.$nextArrow&&e.$nextArrow.length&&(e.$nextArrow.removeClass("slick-disabled slick-arrow slick-hidden").removeAttr("aria-hidden aria-disabled tabindex").css("display",""),e.htmlExpr.test(e.options.nextArrow)&&e.$nextArrow.remove()),e.$slides&&(e.$slides.removeClass("slick-slide slick-active slick-center slick-visible slick-current").removeAttr("aria-hidden").removeAttr("data-slick-index").each(function(){c(this).attr("style",c(this).data("originalStyling"))}),e.$slideTrack.children(this.options.slide).detach(),e.$slideTrack.detach(),e.$list.detach(),e.$slider.append(e.$slides)),e.cleanUpRows(),e.$slider.removeClass("slick-slider"),e.$slider.removeClass("slick-initialized"),e.$slider.removeClass("slick-dotted"),e.unslicked=!0,t||e.$slider.trigger("destroy",[e])},r.prototype.disableTransition=function(t){var e={};e[this.transitionType]="",!1===this.options.fade?this.$slideTrack.css(e):this.$slides.eq(t).css(e)},r.prototype.fadeSlide=function(t,e){var i=this;!1===i.cssTransitions?(i.$slides.eq(t).css({zIndex:i.options.zIndex}),i.$slides.eq(t).animate({opacity:1},i.options.speed,i.options.easing,e)):(i.applyTransition(t),i.$slides.eq(t).css({opacity:1,zIndex:i.options.zIndex}),e&&setTimeout(function(){i.disableTransition(t),e.call()},i.options.speed))},r.prototype.fadeSlideOut=function(t){!1===this.cssTransitions?this.$slides.eq(t).animate({opacity:0,zIndex:this.options.zIndex-2},this.options.speed,this.options.easing):(this.applyTransition(t),this.$slides.eq(t).css({opacity:0,zIndex:this.options.zIndex-2}))},r.prototype.filterSlides=r.prototype.slickFilter=function(t){null!==t&&(this.$slidesCache=this.$slides,this.unload(),this.$slideTrack.children(this.options.slide).detach(),this.$slidesCache.filter(t).appendTo(this.$slideTrack),this.reinit())},r.prototype.focusHandler=function(){var i=this;i.$slider.off("focus.slick blur.slick").on("focus.slick blur.slick","*",function(t){t.stopImmediatePropagation();var e=c(this);setTimeout(function(){i.options.pauseOnFocus&&(i.focussed=e.is(":focus"),i.autoPlay())},0)})},r.prototype.getCurrent=r.prototype.slickCurrentSlide=function(){return this.currentSlide},r.prototype.getDotCount=function(){var t=this,e=0,i=0,n=0;if(!0===t.options.infinite)if(t.slideCount<=t.options.slidesToShow)++n;else for(;e<t.slideCount;)++n,e=i+t.options.slidesToScroll,i+=t.options.slidesToScroll<=t.options.slidesToShow?t.options.slidesToScroll:t.options.slidesToShow;else if(!0===t.options.centerMode)n=t.slideCount;else if(t.options.asNavFor)for(;e<t.slideCount;)++n,e=i+t.options.slidesToScroll,i+=t.options.slidesToScroll<=t.options.slidesToShow?t.options.slidesToScroll:t.options.slidesToShow;else n=1+Math.ceil((t.slideCount-t.options.slidesToShow)/t.options.slidesToScroll);return n-1},r.prototype.getLeft=function(t){var e,i,n,s,r=this,a=0;return r.slideOffset=0,i=r.$slides.first().outerHeight(!0),!0===r.options.infinite?(r.slideCount>r.options.slidesToShow&&(r.slideOffset=r.slideWidth*r.options.slidesToShow*-1,s=-1,!0===r.options.vertical&&!0===r.options.centerMode&&(2===r.options.slidesToShow?s=-1.5:1===r.options.slidesToShow&&(s=-2)),a=i*r.options.slidesToShow*s),r.slideCount%r.options.slidesToScroll!=0&&t+r.options.slidesToScroll>r.slideCount&&r.slideCount>r.options.slidesToShow&&(a=t>r.slideCount?(r.slideOffset=(r.options.slidesToShow-(t-r.slideCount))*r.slideWidth*-1,(r.options.slidesToShow-(t-r.slideCount))*i*-1):(r.slideOffset=r.slideCount%r.options.slidesToScroll*r.slideWidth*-1,r.slideCount%r.options.slidesToScroll*i*-1))):t+r.options.slidesToShow>r.slideCount&&(r.slideOffset=(t+r.options.slidesToShow-r.slideCount)*r.slideWidth,a=(t+r.options.slidesToShow-r.slideCount)*i),r.slideCount<=r.options.slidesToShow&&(a=r.slideOffset=0),!0===r.options.centerMode&&r.slideCount<=r.options.slidesToShow?r.slideOffset=r.slideWidth*Math.floor(r.options.slidesToShow)/2-r.slideWidth*r.slideCount/2:!0===r.options.centerMode&&!0===r.options.infinite?r.slideOffset+=r.slideWidth*Math.floor(r.options.slidesToShow/2)-r.slideWidth:!0===r.options.centerMode&&(r.slideOffset=0,r.slideOffset+=r.slideWidth*Math.floor(r.options.slidesToShow/2)),e=!1===r.options.vertical?t*r.slideWidth*-1+r.slideOffset:t*i*-1+a,!0===r.options.variableWidth&&(n=r.slideCount<=r.options.slidesToShow||!1===r.options.infinite?r.$slideTrack.children(".slick-slide").eq(t):r.$slideTrack.children(".slick-slide").eq(t+r.options.slidesToShow),e=!0===r.options.rtl?n[0]?-1*(r.$slideTrack.width()-n[0].offsetLeft-n.width()):0:n[0]?-1*n[0].offsetLeft:0,!0===r.options.centerMode&&(n=r.slideCount<=r.options.slidesToShow||!1===r.options.infinite?r.$slideTrack.children(".slick-slide").eq(t):r.$slideTrack.children(".slick-slide").eq(t+r.options.slidesToShow+1),e=!0===r.options.rtl?n[0]?-1*(r.$slideTrack.width()-n[0].offsetLeft-n.width()):0:n[0]?-1*n[0].offsetLeft:0,e+=(r.$list.width()-n.outerWidth())/2)),e},r.prototype.getOption=r.prototype.slickGetOption=function(t){return this.options[t]},r.prototype.getNavigableIndexes=function(){var t,e=this,i=0,n=0,s=[];for(t=!1===e.options.infinite?e.slideCount:(i=-1*e.options.slidesToScroll,n=-1*e.options.slidesToScroll,2*e.slideCount);i<t;)s.push(i),i=n+e.options.slidesToScroll,n+=e.options.slidesToScroll<=e.options.slidesToShow?e.options.slidesToScroll:e.options.slidesToShow;return s},r.prototype.getSlick=function(){return this},r.prototype.getSlideCount=function(){var i,n,s=this;return n=!0===s.options.centerMode?s.slideWidth*Math.floor(s.options.slidesToShow/2):0,!0===s.options.swipeToSlide?(s.$slideTrack.find(".slick-slide").each(function(t,e){if(e.offsetLeft-n+c(e).outerWidth()/2>-1*s.swipeLeft)return i=e,!1}),Math.abs(c(i).attr("data-slick-index")-s.currentSlide)||1):s.options.slidesToScroll},r.prototype.goTo=r.prototype.slickGoTo=function(t,e){this.changeSlide({data:{message:"index",index:parseInt(t)}},e)},r.prototype.init=function(t){var e=this;c(e.$slider).hasClass("slick-initialized")||(c(e.$slider).addClass("slick-initialized"),e.buildRows(),e.buildOut(),e.setProps(),e.startLoad(),e.loadSlider(),e.initializeEvents(),e.updateArrows(),e.updateDots(),e.checkResponsive(!0),e.focusHandler()),t&&e.$slider.trigger("init",[e]),!0===e.options.accessibility&&e.initADA(),e.options.autoplay&&(e.paused=!1,e.autoPlay())},r.prototype.initADA=function(){var n=this,i=Math.ceil(n.slideCount/n.options.slidesToShow),s=n.getNavigableIndexes().filter(function(t){return 0<=t&&t<n.slideCount});n.$slides.add(n.$slideTrack.find(".slick-cloned")).attr({"aria-hidden":"true",tabindex:"-1"}).find("a, input, button, select").attr({tabindex:"-1"}),null!==n.$dots&&(n.$slides.not(n.$slideTrack.find(".slick-cloned")).each(function(t){var e=s.indexOf(t);if(c(this).attr({role:"tabpanel",id:"slick-slide"+n.instanceUid+t,tabindex:-1}),-1!==e){var i="slick-slide-control"+n.instanceUid+e;c("#"+i).length&&c(this).attr({"aria-describedby":i})}}),n.$dots.attr("role","tablist").find("li").each(function(t){var e=s[t];c(this).attr({role:"presentation"}),c(this).find("button").first().attr({role:"tab",id:"slick-slide-control"+n.instanceUid+t,"aria-controls":"slick-slide"+n.instanceUid+e,"aria-label":t+1+" of "+i,"aria-selected":null,tabindex:"-1"})}).eq(n.currentSlide).find("button").attr({"aria-selected":"true",tabindex:"0"}).end());for(var t=n.currentSlide,e=t+n.options.slidesToShow;t<e;t++)n.options.focusOnChange?n.$slides.eq(t).attr({tabindex:"0"}):n.$slides.eq(t).removeAttr("tabindex");n.activateADA()},r.prototype.initArrowEvents=function(){var t=this;!0===t.options.arrows&&t.slideCount>t.options.slidesToShow&&(t.$prevArrow.off("click.slick").on("click.slick",{message:"previous"},t.changeSlide),t.$nextArrow.off("click.slick").on("click.slick",{message:"next"},t.changeSlide),!0===t.options.accessibility&&(t.$prevArrow.on("keydown.slick",t.keyHandler),t.$nextArrow.on("keydown.slick",t.keyHandler)))},r.prototype.initDotEvents=function(){var t=this;!0===t.options.dots&&t.slideCount>t.options.slidesToShow&&(c("li",t.$dots).on("click.slick",{message:"index"},t.changeSlide),!0===t.options.accessibility&&t.$dots.on("keydown.slick",t.keyHandler)),!0===t.options.dots&&!0===t.options.pauseOnDotsHover&&t.slideCount>t.options.slidesToShow&&c("li",t.$dots).on("mouseenter.slick",c.proxy(t.interrupt,t,!0)).on("mouseleave.slick",c.proxy(t.interrupt,t,!1))},r.prototype.initSlideEvents=function(){this.options.pauseOnHover&&(this.$list.on("mouseenter.slick",c.proxy(this.interrupt,this,!0)),this.$list.on("mouseleave.slick",c.proxy(this.interrupt,this,!1)))},r.prototype.initializeEvents=function(){var t=this;t.initArrowEvents(),t.initDotEvents(),t.initSlideEvents(),t.$list.on("touchstart.slick mousedown.slick",{action:"start"},t.swipeHandler),t.$list.on("touchmove.slick mousemove.slick",{action:"move"},t.swipeHandler),t.$list.on("touchend.slick mouseup.slick",{action:"end"},t.swipeHandler),t.$list.on("touchcancel.slick mouseleave.slick",{action:"end"},t.swipeHandler),t.$list.on("click.slick",t.clickHandler),c(document).on(t.visibilityChange,c.proxy(t.visibility,t)),!0===t.options.accessibility&&t.$list.on("keydown.slick",t.keyHandler),!0===t.options.focusOnSelect&&c(t.$slideTrack).children().on("click.slick",t.selectHandler),c(window).on("orientationchange.slick.slick-"+t.instanceUid,c.proxy(t.orientationChange,t)),c(window).on("resize.slick.slick-"+t.instanceUid,c.proxy(t.resize,t)),c("[draggable!=true]",t.$slideTrack).on("dragstart",t.preventDefault),c(window).on("load.slick.slick-"+t.instanceUid,t.setPosition),c(t.setPosition)},r.prototype.initUI=function(){!0===this.options.arrows&&this.slideCount>this.options.slidesToShow&&(this.$prevArrow.show(),this.$nextArrow.show()),!0===this.options.dots&&this.slideCount>this.options.slidesToShow&&this.$dots.show()},r.prototype.keyHandler=function(t){t.target.tagName.match("TEXTAREA|INPUT|SELECT")||(37===t.keyCode&&!0===this.options.accessibility?this.changeSlide({data:{message:!0===this.options.rtl?"next":"previous"}}):39===t.keyCode&&!0===this.options.accessibility&&this.changeSlide({data:{message:!0===this.options.rtl?"previous":"next"}}))},r.prototype.lazyLoad=function(){var t,e,i,r=this;function n(t){c("img[data-lazy]",t).each(function(){var t=c(this),e=c(this).attr("data-lazy"),i=c(this).attr("data-srcset"),n=c(this).attr("data-sizes")||r.$slider.attr("data-sizes"),s=document.createElement("img");s.onload=function(){t.animate({opacity:0},100,function(){i&&(t.attr("srcset",i),n&&t.attr("sizes",n)),t.attr("src",e).animate({opacity:1},200,function(){t.removeAttr("data-lazy data-srcset data-sizes").removeClass("slick-loading")}),r.$slider.trigger("lazyLoaded",[r,t,e])})},s.onerror=function(){t.removeAttr("data-lazy").removeClass("slick-loading").addClass("slick-lazyload-error"),r.$slider.trigger("lazyLoadError",[r,t,e])},s.src=e})}if(!0===r.options.centerMode?i=!0===r.options.infinite?(e=r.currentSlide+(r.options.slidesToShow/2+1))+r.options.slidesToShow+2:(e=Math.max(0,r.currentSlide-(r.options.slidesToShow/2+1)),r.options.slidesToShow/2+1+2+r.currentSlide):(e=r.options.infinite?r.options.slidesToShow+r.currentSlide:r.currentSlide,i=Math.ceil(e+r.options.slidesToShow),!0===r.options.fade&&(0<e&&e--,i<=r.slideCount&&i++)),t=r.$slider.find(".slick-slide").slice(e,i),"anticipated"===r.options.lazyLoad)for(var s=e-1,a=i,o=r.$slider.find(".slick-slide"),l=0;l<r.options.slidesToScroll;l++)s<0&&(s=r.slideCount-1),t=(t=t.add(o.eq(s))).add(o.eq(a)),s--,a++;n(t),r.slideCount<=r.options.slidesToShow?n(r.$slider.find(".slick-slide")):r.currentSlide>=r.slideCount-r.options.slidesToShow?n(r.$slider.find(".slick-cloned").slice(0,r.options.slidesToShow)):0===r.currentSlide&&n(r.$slider.find(".slick-cloned").slice(-1*r.options.slidesToShow))},r.prototype.loadSlider=function(){this.setPosition(),this.$slideTrack.css({opacity:1}),this.$slider.removeClass("slick-loading"),this.initUI(),"progressive"===this.options.lazyLoad&&this.progressiveLazyLoad()},r.prototype.next=r.prototype.slickNext=function(){this.changeSlide({data:{message:"next"}})},r.prototype.orientationChange=function(){this.checkResponsive(),this.setPosition()},r.prototype.pause=r.prototype.slickPause=function(){this.autoPlayClear(),this.paused=!0},r.prototype.play=r.prototype.slickPlay=function(){this.autoPlay(),this.options.autoplay=!0,this.paused=!1,this.focussed=!1,this.interrupted=!1},r.prototype.postSlide=function(t){var e=this;e.unslicked||(e.$slider.trigger("afterChange",[e,t]),e.animating=!1,e.slideCount>e.options.slidesToShow&&e.setPosition(),e.swipeLeft=null,e.options.autoplay&&e.autoPlay(),!0===e.options.accessibility&&(e.initADA(),e.options.focusOnChange&&c(e.$slides.get(e.currentSlide)).attr("tabindex",0).focus()))},r.prototype.prev=r.prototype.slickPrev=function(){this.changeSlide({data:{message:"previous"}})},r.prototype.preventDefault=function(t){t.preventDefault()},r.prototype.progressiveLazyLoad=function(t){t=t||1;var e,i,n,s,r,a=this,o=c("img[data-lazy]",a.$slider);o.length?(e=o.first(),i=e.attr("data-lazy"),n=e.attr("data-srcset"),s=e.attr("data-sizes")||a.$slider.attr("data-sizes"),(r=document.createElement("img")).onload=function(){n&&(e.attr("srcset",n),s&&e.attr("sizes",s)),e.attr("src",i).removeAttr("data-lazy data-srcset data-sizes").removeClass("slick-loading"),!0===a.options.adaptiveHeight&&a.setPosition(),a.$slider.trigger("lazyLoaded",[a,e,i]),a.progressiveLazyLoad()},r.onerror=function(){t<3?setTimeout(function(){a.progressiveLazyLoad(t+1)},500):(e.removeAttr("data-lazy").removeClass("slick-loading").addClass("slick-lazyload-error"),a.$slider.trigger("lazyLoadError",[a,e,i]),a.progressiveLazyLoad())},r.src=i):a.$slider.trigger("allImagesLoaded",[a])},r.prototype.refresh=function(t){var e,i,n=this;i=n.slideCount-n.options.slidesToShow,!n.options.infinite&&n.currentSlide>i&&(n.currentSlide=i),n.slideCount<=n.options.slidesToShow&&(n.currentSlide=0),e=n.currentSlide,n.destroy(!0),c.extend(n,n.initials,{currentSlide:e}),n.init(),t||n.changeSlide({data:{message:"index",index:e}},!1)},r.prototype.registerBreakpoints=function(){var t,e,i,n=this,s=n.options.responsive||null;if("array"===c.type(s)&&s.length){for(t in n.respondTo=n.options.respondTo||"window",s)if(i=n.breakpoints.length-1,s.hasOwnProperty(t)){for(e=s[t].breakpoint;0<=i;)n.breakpoints[i]&&n.breakpoints[i]===e&&n.breakpoints.splice(i,1),i--;n.breakpoints.push(e),n.breakpointSettings[e]=s[t].settings}n.breakpoints.sort(function(t,e){return n.options.mobileFirst?t-e:e-t})}},r.prototype.reinit=function(){var t=this;t.$slides=t.$slideTrack.children(t.options.slide).addClass("slick-slide"),t.slideCount=t.$slides.length,t.currentSlide>=t.slideCount&&0!==t.currentSlide&&(t.currentSlide=t.currentSlide-t.options.slidesToScroll),t.slideCount<=t.options.slidesToShow&&(t.currentSlide=0),t.registerBreakpoints(),t.setProps(),t.setupInfinite(),t.buildArrows(),t.updateArrows(),t.initArrowEvents(),t.buildDots(),t.updateDots(),t.initDotEvents(),t.cleanUpSlideEvents(),t.initSlideEvents(),t.checkResponsive(!1,!0),!0===t.options.focusOnSelect&&c(t.$slideTrack).children().on("click.slick",t.selectHandler),t.setSlideClasses("number"==typeof t.currentSlide?t.currentSlide:0),t.setPosition(),t.focusHandler(),t.paused=!t.options.autoplay,t.autoPlay(),t.$slider.trigger("reInit",[t])},r.prototype.resize=function(){var t=this;c(window).width()!==t.windowWidth&&(clearTimeout(t.windowDelay),t.windowDelay=window.setTimeout(function(){t.windowWidth=c(window).width(),t.checkResponsive(),t.unslicked||t.setPosition()},50))},r.prototype.removeSlide=r.prototype.slickRemove=function(t,e,i){var n=this;if(t="boolean"==typeof t?!0===(e=t)?0:n.slideCount-1:!0===e?--t:t,n.slideCount<1||t<0||t>n.slideCount-1)return!1;n.unload(),!0===i?n.$slideTrack.children().remove():n.$slideTrack.children(this.options.slide).eq(t).remove(),n.$slides=n.$slideTrack.children(this.options.slide),n.$slideTrack.children(this.options.slide).detach(),n.$slideTrack.append(n.$slides),n.$slidesCache=n.$slides,n.reinit()},r.prototype.setCSS=function(t){var e,i,n=this,s={};!0===n.options.rtl&&(t=-t),e="left"==n.positionProp?Math.ceil(t)+"px":"0px",i="top"==n.positionProp?Math.ceil(t)+"px":"0px",s[n.positionProp]=t,!1===n.transformsEnabled||(!(s={})===n.cssTransitions?s[n.animType]="translate("+e+", "+i+")":s[n.animType]="translate3d("+e+", "+i+", 0px)"),n.$slideTrack.css(s)},r.prototype.setDimensions=function(){var t=this;!1===t.options.vertical?!0===t.options.centerMode&&t.$list.css({padding:"0px "+t.options.centerPadding}):(t.$list.height(t.$slides.first().outerHeight(!0)*t.options.slidesToShow),!0===t.options.centerMode&&t.$list.css({padding:t.options.centerPadding+" 0px"})),t.listWidth=t.$list.width(),t.listHeight=t.$list.height(),!1===t.options.vertical&&!1===t.options.variableWidth?(t.slideWidth=Math.ceil(t.listWidth/t.options.slidesToShow),t.$slideTrack.width(Math.ceil(t.slideWidth*t.$slideTrack.children(".slick-slide").length))):!0===t.options.variableWidth?t.$slideTrack.width(5e3*t.slideCount):(t.slideWidth=Math.ceil(t.listWidth),t.$slideTrack.height(Math.ceil(t.$slides.first().outerHeight(!0)*t.$slideTrack.children(".slick-slide").length)));var e=t.$slides.first().outerWidth(!0)-t.$slides.first().width();!1===t.options.variableWidth&&t.$slideTrack.children(".slick-slide").width(t.slideWidth-e)},r.prototype.setFade=function(){var i,n=this;n.$slides.each(function(t,e){i=n.slideWidth*t*-1,!0===n.options.rtl?c(e).css({position:"relative",right:i,top:0,zIndex:n.options.zIndex-2,opacity:0}):c(e).css({position:"relative",left:i,top:0,zIndex:n.options.zIndex-2,opacity:0})}),n.$slides.eq(n.currentSlide).css({zIndex:n.options.zIndex-1,opacity:1})},r.prototype.setHeight=function(){if(1===this.options.slidesToShow&&!0===this.options.adaptiveHeight&&!1===this.options.vertical){var t=this.$slides.eq(this.currentSlide).outerHeight(!0);this.$list.css("height",t)}},r.prototype.setOption=r.prototype.slickSetOption=function(){var t,e,i,n,s,r=this,a=!1;if("object"===c.type(arguments[0])?(i=arguments[0],a=arguments[1],s="multiple"):"string"===c.type(arguments[0])&&(n=arguments[1],a=arguments[2],"responsive"===(i=arguments[0])&&"array"===c.type(arguments[1])?s="responsive":void 0!==arguments[1]&&(s="single")),"single"===s)r.options[i]=n;else if("multiple"===s)c.each(i,function(t,e){r.options[t]=e});else if("responsive"===s)for(e in n)if("array"!==c.type(r.options.responsive))r.options.responsive=[n[e]];else{for(t=r.options.responsive.length-1;0<=t;)r.options.responsive[t].breakpoint===n[e].breakpoint&&r.options.responsive.splice(t,1),t--;r.options.responsive.push(n[e])}a&&(r.unload(),r.reinit())},r.prototype.setPosition=function(){this.setDimensions(),this.setHeight(),!1===this.options.fade?this.setCSS(this.getLeft(this.currentSlide)):this.setFade(),this.$slider.trigger("setPosition",[this])},r.prototype.setProps=function(){var t=this,e=document.body.style;t.positionProp=!0===t.options.vertical?"top":"left","top"===t.positionProp?t.$slider.addClass("slick-vertical"):t.$slider.removeClass("slick-vertical"),void 0===e.WebkitTransition&&void 0===e.MozTransition&&void 0===e.msTransition||!0===t.options.useCSS&&(t.cssTransitions=!0),t.options.fade&&("number"==typeof t.options.zIndex?t.options.zIndex<3&&(t.options.zIndex=3):t.options.zIndex=t.defaults.zIndex),void 0!==e.OTransform&&(t.animType="OTransform",t.transformType="-o-transform",t.transitionType="OTransition",void 0===e.perspectiveProperty&&void 0===e.webkitPerspective&&(t.animType=!1)),void 0!==e.MozTransform&&(t.animType="MozTransform",t.transformType="-moz-transform",t.transitionType="MozTransition",void 0===e.perspectiveProperty&&void 0===e.MozPerspective&&(t.animType=!1)),void 0!==e.webkitTransform&&(t.animType="webkitTransform",t.transformType="-webkit-transform",t.transitionType="webkitTransition",void 0===e.perspectiveProperty&&void 0===e.webkitPerspective&&(t.animType=!1)),void 0!==e.msTransform&&(t.animType="msTransform",t.transformType="-ms-transform",t.transitionType="msTransition",void 0===e.msTransform&&(t.animType=!1)),void 0!==e.transform&&!1!==t.animType&&(t.animType="transform",t.transformType="transform",t.transitionType="transition"),t.transformsEnabled=t.options.useTransform&&null!==t.animType&&!1!==t.animType},r.prototype.setSlideClasses=function(t){var e,i,n,s,r=this;if(i=r.$slider.find(".slick-slide").removeClass("slick-active slick-center slick-current").attr("aria-hidden","true"),r.$slides.eq(t).addClass("slick-current"),!0===r.options.centerMode){var a=r.options.slidesToShow%2==0?1:0;e=Math.floor(r.options.slidesToShow/2),!0===r.options.infinite&&(e<=t&&t<=r.slideCount-1-e?r.$slides.slice(t-e+a,t+e+1).addClass("slick-active").attr("aria-hidden","false"):(n=r.options.slidesToShow+t,i.slice(n-e+1+a,n+e+2).addClass("slick-active").attr("aria-hidden","false")),0===t?i.eq(i.length-1-r.options.slidesToShow).addClass("slick-center"):t===r.slideCount-1&&i.eq(r.options.slidesToShow).addClass("slick-center")),r.$slides.eq(t).addClass("slick-center")}else 0<=t&&t<=r.slideCount-r.options.slidesToShow?r.$slides.slice(t,t+r.options.slidesToShow).addClass("slick-active").attr("aria-hidden","false"):i.length<=r.options.slidesToShow?i.addClass("slick-active").attr("aria-hidden","false"):(s=r.slideCount%r.options.slidesToShow,n=!0===r.options.infinite?r.options.slidesToShow+t:t,r.options.slidesToShow==r.options.slidesToScroll&&r.slideCount-t<r.options.slidesToShow?i.slice(n-(r.options.slidesToShow-s),n+s).addClass("slick-active").attr("aria-hidden","false"):i.slice(n,n+r.options.slidesToShow).addClass("slick-active").attr("aria-hidden","false"));"ondemand"!==r.options.lazyLoad&&"anticipated"!==r.options.lazyLoad||r.lazyLoad()},r.prototype.setupInfinite=function(){var t,e,i,n=this;if(!0===n.options.fade&&(n.options.centerMode=!1),!0===n.options.infinite&&!1===n.options.fade&&(e=null,n.slideCount>n.options.slidesToShow)){for(i=!0===n.options.centerMode?n.options.slidesToShow+1:n.options.slidesToShow,t=n.slideCount;t>n.slideCount-i;t-=1)e=t-1,c(n.$slides[e]).clone(!0).attr("id","").attr("data-slick-index",e-n.slideCount).prependTo(n.$slideTrack).addClass("slick-cloned");for(t=0;t<i+n.slideCount;t+=1)e=t,c(n.$slides[e]).clone(!0).attr("id","").attr("data-slick-index",e+n.slideCount).appendTo(n.$slideTrack).addClass("slick-cloned");n.$slideTrack.find(".slick-cloned").find("[id]").each(function(){c(this).attr("id","")})}},r.prototype.interrupt=function(t){t||this.autoPlay(),this.interrupted=t},r.prototype.selectHandler=function(t){var e=c(t.target).is(".slick-slide")?c(t.target):c(t.target).parents(".slick-slide"),i=parseInt(e.attr("data-slick-index"));i=i||0,this.slideCount<=this.options.slidesToShow?this.slideHandler(i,!1,!0):this.slideHandler(i)},r.prototype.slideHandler=function(t,e,i){var n,s,r,a,o,l,c=this;if(e=e||!1,!(!0===c.animating&&!0===c.options.waitForAnimate||!0===c.options.fade&&c.currentSlide===t))if(!1===e&&c.asNavFor(t),n=t,o=c.getLeft(n),a=c.getLeft(c.currentSlide),c.currentLeft=null===c.swipeLeft?a:c.swipeLeft,!1===c.options.infinite&&!1===c.options.centerMode&&(t<0||t>c.getDotCount()*c.options.slidesToScroll))!1===c.options.fade&&(n=c.currentSlide,!0!==i&&c.slideCount>c.options.slidesToShow?c.animateSlide(a,function(){c.postSlide(n)}):c.postSlide(n));else if(!1===c.options.infinite&&!0===c.options.centerMode&&(t<0||t>c.slideCount-c.options.slidesToScroll))!1===c.options.fade&&(n=c.currentSlide,!0!==i&&c.slideCount>c.options.slidesToShow?c.animateSlide(a,function(){c.postSlide(n)}):c.postSlide(n));else{if(c.options.autoplay&&clearInterval(c.autoPlayTimer),s=n<0?c.slideCount%c.options.slidesToScroll!=0?c.slideCount-c.slideCount%c.options.slidesToScroll:c.slideCount+n:n>=c.slideCount?c.slideCount%c.options.slidesToScroll!=0?0:n-c.slideCount:n,c.animating=!0,c.$slider.trigger("beforeChange",[c,c.currentSlide,s]),r=c.currentSlide,c.currentSlide=s,c.setSlideClasses(c.currentSlide),c.options.asNavFor&&(l=(l=c.getNavTarget()).slick("getSlick")).slideCount<=l.options.slidesToShow&&l.setSlideClasses(c.currentSlide),c.updateDots(),c.updateArrows(),!0===c.options.fade)return!0!==i?(c.fadeSlideOut(r),c.fadeSlide(s,function(){c.postSlide(s)})):c.postSlide(s),void c.animateHeight();!0!==i&&c.slideCount>c.options.slidesToShow?c.animateSlide(o,function(){c.postSlide(s)}):c.postSlide(s)}},r.prototype.startLoad=function(){var t=this;!0===t.options.arrows&&t.slideCount>t.options.slidesToShow&&(t.$prevArrow.hide(),t.$nextArrow.hide()),!0===t.options.dots&&t.slideCount>t.options.slidesToShow&&t.$dots.hide(),t.$slider.addClass("slick-loading")},r.prototype.swipeDirection=function(){var t,e,i,n;return t=this.touchObject.startX-this.touchObject.curX,e=this.touchObject.startY-this.touchObject.curY,i=Math.atan2(e,t),(n=Math.round(180*i/Math.PI))<0&&(n=360-Math.abs(n)),n<=45&&0<=n?!1===this.options.rtl?"left":"right":n<=360&&315<=n?!1===this.options.rtl?"left":"right":135<=n&&n<=225?!1===this.options.rtl?"right":"left":!0===this.options.verticalSwiping?35<=n&&n<=135?"down":"up":"vertical"},r.prototype.swipeEnd=function(t){var e,i,n=this;if(n.dragging=!1,n.swiping=!1,n.scrolling)return n.scrolling=!1;if(n.interrupted=!1,n.shouldClick=!(10<n.touchObject.swipeLength),void 0===n.touchObject.curX)return!1;if(!0===n.touchObject.edgeHit&&n.$slider.trigger("edge",[n,n.swipeDirection()]),n.touchObject.swipeLength>=n.touchObject.minSwipe){switch(i=n.swipeDirection()){case"left":case"down":e=n.options.swipeToSlide?n.checkNavigable(n.currentSlide+n.getSlideCount()):n.currentSlide+n.getSlideCount(),n.currentDirection=0;break;case"right":case"up":e=n.options.swipeToSlide?n.checkNavigable(n.currentSlide-n.getSlideCount()):n.currentSlide-n.getSlideCount(),n.currentDirection=1}"vertical"!=i&&(n.slideHandler(e),n.touchObject={},n.$slider.trigger("swipe",[n,i]))}else n.touchObject.startX!==n.touchObject.curX&&(n.slideHandler(n.currentSlide),n.touchObject={})},r.prototype.swipeHandler=function(t){var e=this;if(!(!1===e.options.swipe||"ontouchend"in document&&!1===e.options.swipe||!1===e.options.draggable&&-1!==t.type.indexOf("mouse")))switch(e.touchObject.fingerCount=t.originalEvent&&void 0!==t.originalEvent.touches?t.originalEvent.touches.length:1,e.touchObject.minSwipe=e.listWidth/e.options.touchThreshold,!0===e.options.verticalSwiping&&(e.touchObject.minSwipe=e.listHeight/e.options.touchThreshold),t.data.action){case"start":e.swipeStart(t);break;case"move":e.swipeMove(t);break;case"end":e.swipeEnd(t)}},r.prototype.swipeMove=function(t){var e,i,n,s,r,a,o=this;return r=void 0!==t.originalEvent?t.originalEvent.touches:null,!(!o.dragging||o.scrolling||r&&1!==r.length)&&(e=o.getLeft(o.currentSlide),o.touchObject.curX=void 0!==r?r[0].pageX:t.clientX,o.touchObject.curY=void 0!==r?r[0].pageY:t.clientY,o.touchObject.swipeLength=Math.round(Math.sqrt(Math.pow(o.touchObject.curX-o.touchObject.startX,2))),a=Math.round(Math.sqrt(Math.pow(o.touchObject.curY-o.touchObject.startY,2))),!o.options.verticalSwiping&&!o.swiping&&4<a?!(o.scrolling=!0):(!0===o.options.verticalSwiping&&(o.touchObject.swipeLength=a),i=o.swipeDirection(),void 0!==t.originalEvent&&4<o.touchObject.swipeLength&&(o.swiping=!0,t.preventDefault()),s=(!1===o.options.rtl?1:-1)*(o.touchObject.curX>o.touchObject.startX?1:-1),!0===o.options.verticalSwiping&&(s=o.touchObject.curY>o.touchObject.startY?1:-1),n=o.touchObject.swipeLength,(o.touchObject.edgeHit=!1)===o.options.infinite&&(0===o.currentSlide&&"right"===i||o.currentSlide>=o.getDotCount()&&"left"===i)&&(n=o.touchObject.swipeLength*o.options.edgeFriction,o.touchObject.edgeHit=!0),!1===o.options.vertical?o.swipeLeft=e+n*s:o.swipeLeft=e+n*(o.$list.height()/o.listWidth)*s,!0===o.options.verticalSwiping&&(o.swipeLeft=e+n*s),!0!==o.options.fade&&!1!==o.options.touchMove&&(!0===o.animating?(o.swipeLeft=null,!1):void o.setCSS(o.swipeLeft))))},r.prototype.swipeStart=function(t){var e,i=this;if(i.interrupted=!0,1!==i.touchObject.fingerCount||i.slideCount<=i.options.slidesToShow)return!(i.touchObject={});void 0!==t.originalEvent&&void 0!==t.originalEvent.touches&&(e=t.originalEvent.touches[0]),i.touchObject.startX=i.touchObject.curX=void 0!==e?e.pageX:t.clientX,i.touchObject.startY=i.touchObject.curY=void 0!==e?e.pageY:t.clientY,i.dragging=!0},r.prototype.unfilterSlides=r.prototype.slickUnfilter=function(){null!==this.$slidesCache&&(this.unload(),this.$slideTrack.children(this.options.slide).detach(),this.$slidesCache.appendTo(this.$slideTrack),this.reinit())},r.prototype.unload=function(){var t=this;c(".slick-cloned",t.$slider).remove(),t.$dots&&t.$dots.remove(),t.$prevArrow&&t.htmlExpr.test(t.options.prevArrow)&&t.$prevArrow.remove(),t.$nextArrow&&t.htmlExpr.test(t.options.nextArrow)&&t.$nextArrow.remove(),t.$slides.removeClass("slick-slide slick-active slick-visible slick-current").attr("aria-hidden","true").css("width","")},r.prototype.unslick=function(t){this.$slider.trigger("unslick",[this,t]),this.destroy()},r.prototype.updateArrows=function(){var t=this;Math.floor(t.options.slidesToShow/2),!0===t.options.arrows&&t.slideCount>t.options.slidesToShow&&!t.options.infinite&&(t.$prevArrow.removeClass("slick-disabled").attr("aria-disabled","false"),t.$nextArrow.removeClass("slick-disabled").attr("aria-disabled","false"),0===t.currentSlide?(t.$prevArrow.addClass("slick-disabled").attr("aria-disabled","true"),t.$nextArrow.removeClass("slick-disabled").attr("aria-disabled","false")):t.currentSlide>=t.slideCount-t.options.slidesToShow&&!1===t.options.centerMode?(t.$nextArrow.addClass("slick-disabled").attr("aria-disabled","true"),t.$prevArrow.removeClass("slick-disabled").attr("aria-disabled","false")):t.currentSlide>=t.slideCount-1&&!0===t.options.centerMode&&(t.$nextArrow.addClass("slick-disabled").attr("aria-disabled","true"),t.$prevArrow.removeClass("slick-disabled").attr("aria-disabled","false")))},r.prototype.updateDots=function(){null!==this.$dots&&(this.$dots.find("li").removeClass("slick-active").end(),this.$dots.find("li").eq(Math.floor(this.currentSlide/this.options.slidesToScroll)).addClass("slick-active"))},r.prototype.visibility=function(){this.options.autoplay&&(document[this.hidden]?this.interrupted=!0:this.interrupted=!1)},c.fn.slick=function(){var t,e,i=arguments[0],n=Array.prototype.slice.call(arguments,1),s=this.length;for(t=0;t<s;t++)if("object"==typeof i||void 0===i?this[t].slick=new r(this[t],i):e=this[t].slick[i].apply(this[t].slick,n),void 0!==e)return e;return this}})},function(i,t,n){(function(t){var e;e=function(d,y){d=d&&d.hasOwnProperty("default")?d.default:d,y=y&&y.hasOwnProperty("default")?y.default:y;function p(t,e){t.prototype=Object.create(e.prototype),(t.prototype.constructor=t).__proto__=e}function r(t,e){return(r=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function a(t,e,i){return(a=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(t){return!1}}()?Reflect.construct:function(t,e,i){var n=[null];n.push.apply(n,e);var s=new(Function.bind.apply(t,n));return i&&r(s,i.prototype),s}).apply(null,arguments)}function f(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function e(t,e){return e=e||t.slice(0),t.raw=e,t}var l=[],t=function(a,o){return function(t,e,i){var n=o.levels[e],s=new RegExp("^("+n+")$");if("log"!==t&&i.unshift(t.toUpperCase()+":"),i.unshift(a+":"),l&&l.push([].concat(i)),y.console){var r=y.console[t];r||"debug"!==t||(r=y.console.info||y.console.log),r&&n&&s.test(t)&&r[Array.isArray(i)?"apply":"call"](y.console,i)}}};var m=function e(i){function n(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];s("log",r,e)}var s,r="info";return s=t(i,n),n.createLogger=function(t){return e(i+": "+t)},n.levels={all:"debug|log|warn|error",off:"",debug:"debug|log|warn|error",info:"log|warn|error",warn:"warn|error",error:"error",DEFAULT:r},n.level=function(t){if("string"==typeof t){if(!n.levels.hasOwnProperty(t))throw new Error('"'+t+'" in not a valid log level');r=t}return r},(n.history=function(){return l?[].concat(l):[]}).filter=function(e){return(l||[]).filter(function(t){return new RegExp(".*"+e+".*").test(t[0])})},n.history.clear=function(){l&&(l.length=0)},n.history.disable=function(){null!==l&&(l.length=0,l=null)},n.history.enable=function(){null===l&&(l=[])},n.error=function(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];return s("error",r,e)},n.warn=function(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];return s("warn",r,e)},n.debug=function(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];return s("debug",r,e)},n}("VIDEOJS"),g=m.createLogger;var v=function(t){for(var e="",i=0;i<arguments.length;i++)e+=t[i].replace(/\n\r?\s*/g,"")+(arguments[i+1]||"");return e},i=Object.prototype.toString,o=function(t){return c(t)?Object.keys(t):[]};function s(e,i){o(e).forEach(function(t){return i(e[t],t)})}function _(i){for(var t=arguments.length,e=new Array(1<t?t-1:0),n=1;n<t;n++)e[n-1]=arguments[n];return Object.assign?Object.assign.apply(Object,[i].concat(e)):(e.forEach(function(t){t&&s(t,function(t,e){i[e]=t})}),i)}function c(t){return!!t&&"object"==typeof t}function u(t){return c(t)&&"[object Object]"===i.call(t)&&t.constructor===Object}function n(t,e){if(!t||!e)return"";if("function"!=typeof y.getComputedStyle)return"";var i=y.getComputedStyle(t);return i?i[e]:""}function h(){var t=e(["Setting attributes in the second argument of createEl()\n                has been deprecated. Use the third argument instead.\n                createEl(type, properties, attributes). Attempting to set "," to ","."]);return h=function(){return t},t}function b(t){return"string"==typeof t&&/\S/.test(t)}function T(t){if(/\s/.test(t))throw new Error("class has illegal whitespace characters")}function w(){return d===y.document}function k(t){return c(t)&&1===t.nodeType}function S(){try{return y.parent!==y.self}catch(t){return!0}}function C(n){return function(t,e){if(!b(t))return d[n](null);b(e)&&(e=d.querySelector(e));var i=k(e)?e:d;return i[n]&&i[n](t)}}function x(t,i,e,n){void 0===t&&(t="div"),void 0===i&&(i={}),void 0===e&&(e={});var s=d.createElement(t);return Object.getOwnPropertyNames(i).forEach(function(t){var e=i[t];-1!==t.indexOf("aria-")||"role"===t||"type"===t?(m.warn(v(h(),t,e)),s.setAttribute(t,e)):"textContent"===t?E(s,e):s[t]=e}),Object.getOwnPropertyNames(e).forEach(function(t){s.setAttribute(t,e[t])}),n&&V(s,n),s}function E(t,e){return void 0===t.textContent?t.innerText=e:t.textContent=e,t}function D(t,e){e.firstChild?e.insertBefore(t,e.firstChild):e.appendChild(t)}function A(t,e){return T(e),t.classList?t.classList.contains(e):function(t){return new RegExp("(^|\\s)"+t+"($|\\s)")}(e).test(t.className)}function I(t,e){return t.classList?t.classList.add(e):A(t,e)||(t.className=(t.className+" "+e).trim()),t}function O(t,e){return t.classList?t.classList.remove(e):(T(e),t.className=t.className.split(/\s+/).filter(function(t){return t!==e}).join(" ")),t}function P(t,e,i){var n=A(t,e);if("function"==typeof i&&(i=i(t,e)),"boolean"!=typeof i&&(i=!n),i!==n)return i?I(t,e):O(t,e),t}function L(i,n){Object.getOwnPropertyNames(n).forEach(function(t){var e=n[t];null==e||!1===e?i.removeAttribute(t):i.setAttribute(t,!0===e?"":e)})}function M(t){var e={},i=",autoplay,controls,playsinline,loop,muted,default,defaultMuted,";if(t&&t.attributes&&0<t.attributes.length)for(var n=t.attributes,s=n.length-1;0<=s;s--){var r=n[s].name,a=n[s].value;"boolean"!=typeof t[r]&&-1===i.indexOf(","+r+",")||(a=null!==a),e[r]=a}return e}function N(t,e){return t.getAttribute(e)}function R(t,e,i){t.setAttribute(e,i)}function U(t,e){t.removeAttribute(e)}function j(){d.body.focus(),d.onselectstart=function(){return!1}}function B(){d.onselectstart=function(){return!0}}function H(t){if(t&&t.getBoundingClientRect&&t.parentNode){var e=t.getBoundingClientRect(),i={};return["bottom","height","left","right","top","width"].forEach(function(t){void 0!==e[t]&&(i[t]=e[t])}),i.height||(i.height=parseFloat(n(t,"height"))),i.width||(i.width=parseFloat(n(t,"width"))),i}}function F(t){var e;if(t.getBoundingClientRect&&t.parentNode&&(e=t.getBoundingClientRect()),!e)return{left:0,top:0};var i=d.documentElement,n=d.body,s=i.clientLeft||n.clientLeft||0,r=y.pageXOffset||n.scrollLeft,a=e.left+r-s,o=i.clientTop||n.clientTop||0,l=y.pageYOffset||n.scrollTop,c=e.top+l-o;return{left:Math.round(a),top:Math.round(c)}}function z(t,e){var i={},n=F(t),s=t.offsetWidth,r=t.offsetHeight,a=n.top,o=n.left,l=e.pageY,c=e.pageX;return e.changedTouches&&(c=e.changedTouches[0].pageX,l=e.changedTouches[0].pageY),i.y=Math.max(0,Math.min(1,(a-l+r)/r)),i.x=Math.max(0,Math.min(1,(c-o)/s)),i}function W(t){return c(t)&&3===t.nodeType}function $(t){for(;t.firstChild;)t.removeChild(t.firstChild);return t}function q(t){return"function"==typeof t&&(t=t()),(Array.isArray(t)?t:[t]).map(function(t){return"function"==typeof t&&(t=t()),k(t)||W(t)?t:"string"==typeof t&&/\S/.test(t)?d.createTextNode(t):void 0}).filter(function(t){return t})}function V(e,t){return q(t).forEach(function(t){return e.appendChild(t)}),e}function Y(t,e){return V($(t),e)}function G(t){return void 0===t.button&&void 0===t.buttons||(0===t.button&&void 0===t.buttons||0===t.button&&1===t.buttons)}var X=C("querySelector"),K=C("querySelectorAll"),Q=Object.freeze({isReal:w,isEl:k,isInFrame:S,createEl:x,textContent:E,prependTo:D,hasClass:A,addClass:I,removeClass:O,toggleClass:P,setAttributes:L,getAttributes:M,getAttribute:N,setAttribute:R,removeAttribute:U,blockTextSelection:j,unblockTextSelection:B,getBoundingClientRect:H,findPosition:F,getPointerPosition:z,isTextNode:W,emptyEl:$,normalizeContent:q,appendContent:V,insertContent:Y,isSingleLeftClick:G,$:X,$$:K}),J=1;function Z(){return J++}var tt={},et="vdata"+(new Date).getTime();function it(t){var e=t[et];return e=e||(t[et]=Z()),tt[e]||(tt[e]={}),tt[e]}function nt(t){var e=t[et];return!!e&&!!Object.getOwnPropertyNames(tt[e]).length}function st(e){var t=e[et];if(t){delete tt[t];try{delete e[et]}catch(t){e.removeAttribute?e.removeAttribute(et):e[et]=null}}}function rt(t,e){var i=it(t);0===i.handlers[e].length&&(delete i.handlers[e],t.removeEventListener?t.removeEventListener(e,i.dispatcher,!1):t.detachEvent&&t.detachEvent("on"+e,i.dispatcher)),Object.getOwnPropertyNames(i.handlers).length<=0&&(delete i.handlers,delete i.dispatcher,delete i.disabled),0===Object.getOwnPropertyNames(i).length&&st(t)}function at(e,i,t,n){t.forEach(function(t){e(i,t,n)})}function ot(t){function e(){return!0}function i(){return!1}if(!t||!t.isPropagationStopped){var n=t||y.event;for(var s in t={},n)"layerX"!==s&&"layerY"!==s&&"keyLocation"!==s&&"webkitMovementX"!==s&&"webkitMovementY"!==s&&("returnValue"===s&&n.preventDefault||(t[s]=n[s]));if(t.target||(t.target=t.srcElement||d),t.relatedTarget||(t.relatedTarget=t.fromElement===t.target?t.toElement:t.fromElement),t.preventDefault=function(){n.preventDefault&&n.preventDefault(),t.returnValue=!1,n.returnValue=!1,t.defaultPrevented=!0},t.defaultPrevented=!1,t.stopPropagation=function(){n.stopPropagation&&n.stopPropagation(),t.cancelBubble=!0,n.cancelBubble=!0,t.isPropagationStopped=e},t.isPropagationStopped=i,t.stopImmediatePropagation=function(){n.stopImmediatePropagation&&n.stopImmediatePropagation(),t.isImmediatePropagationStopped=e,t.stopPropagation()},t.isImmediatePropagationStopped=i,null!==t.clientX&&void 0!==t.clientX){var r=d.documentElement,a=d.body;t.pageX=t.clientX+(r&&r.scrollLeft||a&&a.scrollLeft||0)-(r&&r.clientLeft||a&&a.clientLeft||0),t.pageY=t.clientY+(r&&r.scrollTop||a&&a.scrollTop||0)-(r&&r.clientTop||a&&a.clientTop||0)}t.which=t.charCode||t.keyCode,null!==t.button&&void 0!==t.button&&(t.button=1&t.button?0:4&t.button?1:2&t.button?2:0)}return t}var lt=!1;!function(){try{var t=Object.defineProperty({},"passive",{get:function(){lt=!0}});y.addEventListener("test",null,t),y.removeEventListener("test",null,t)}catch(t){}}();var ct=["touchstart","touchmove"];function ut(a,t,e){if(Array.isArray(t))return at(ut,a,t,e);var o=it(a);if(o.handlers||(o.handlers={}),o.handlers[t]||(o.handlers[t]=[]),e.guid||(e.guid=Z()),o.handlers[t].push(e),o.dispatcher||(o.disabled=!1,o.dispatcher=function(t,e){if(!o.disabled){t=ot(t);var i=o.handlers[t.type];if(i)for(var n=i.slice(0),s=0,r=n.length;s<r&&!t.isImmediatePropagationStopped();s++)try{n[s].call(a,t,e)}catch(t){m.error(t)}}}),1===o.handlers[t].length)if(a.addEventListener){var i=!1;lt&&-1<ct.indexOf(t)&&(i={passive:!0}),a.addEventListener(t,o.dispatcher,i)}else a.attachEvent&&a.attachEvent("on"+t,o.dispatcher)}function ht(t,e,i){if(nt(t)){var n=it(t);if(n.handlers){if(Array.isArray(e))return at(ht,t,e,i);function s(t,e){n.handlers[e]=[],rt(t,e)}if(void 0!==e){var r=n.handlers[e];if(r)if(i){if(i.guid)for(var a=0;a<r.length;a++)r[a].guid===i.guid&&r.splice(a--,1);rt(t,e)}else s(t,e)}else for(var o in n.handlers)Object.prototype.hasOwnProperty.call(n.handlers||{},o)&&s(t,o)}}}function dt(t,e,i){var n=nt(t)?it(t):{},s=t.parentNode||t.ownerDocument;if("string"==typeof e?e={type:e,target:t}:e.target||(e.target=t),e=ot(e),n.dispatcher&&n.dispatcher.call(t,e,i),s&&!e.isPropagationStopped()&&!0===e.bubbles)dt.call(null,s,e,i);else if(!s&&!e.defaultPrevented){var r=it(e.target);e.target[e.type]&&(r.disabled=!0,"function"==typeof e.target[e.type]&&e.target[e.type](),r.disabled=!1)}return!e.defaultPrevented}function pt(t,e,i){if(Array.isArray(e))return at(pt,t,e,i);function n(){ht(t,e,n),i.apply(this,arguments)}n.guid=i.guid=i.guid||Z(),ut(t,e,n)}var ft,mt=Object.freeze({fixEvent:ot,on:ut,off:ht,trigger:dt,one:pt}),gt=!1,vt=function(){if(w()&&!1!==ft.options.autoSetup){var t=Array.prototype.slice.call(d.getElementsByTagName("video")),e=Array.prototype.slice.call(d.getElementsByTagName("audio")),i=Array.prototype.slice.call(d.getElementsByTagName("video-js")),n=t.concat(e,i);if(n&&0<n.length)for(var s=0,r=n.length;s<r;s++){var a=n[s];if(!a||!a.getAttribute){yt(1);break}void 0===a.player&&null!==a.getAttribute("data-setup")&&ft(a)}else gt||yt(1)}};function yt(t,e){e&&(ft=e),y.setTimeout(vt,t)}w()&&"complete"===d.readyState?gt=!0:pt(y,"load",function(){gt=!0});function _t(t){var e=d.createElement("style");return e.className=t,e}function bt(t,e){t.styleSheet?t.styleSheet.cssText=e:t.textContent=e}function Tt(t,e,i){function n(){return e.apply(t,arguments)}return e.guid||(e.guid=Z()),n.guid=i?i+"_"+e.guid:e.guid,n}function wt(e,i){var n=Date.now();return function(){var t=Date.now();i<=t-n&&(e.apply(void 0,arguments),n=t)}}function kt(n,s,r,a){var o;function t(){var t=this,e=arguments,i=function(){i=o=null,r||n.apply(t,e)};!o&&r&&n.apply(t,e),a.clearTimeout(o),o=a.setTimeout(i,s)}return void 0===a&&(a=y),t.cancel=function(){a.clearTimeout(o),o=null},t}function St(){}var Ct;St.prototype.allowedEvents_={},St.prototype.addEventListener=St.prototype.on=function(t,e){var i=this.addEventListener;this.addEventListener=function(){},ut(this,t,e),this.addEventListener=i},St.prototype.removeEventListener=St.prototype.off=function(t,e){ht(this,t,e)},St.prototype.one=function(t,e){var i=this.addEventListener;this.addEventListener=function(){},pt(this,t,e),this.addEventListener=i},St.prototype.dispatchEvent=St.prototype.trigger=function(t){var e=t.type||t;"string"==typeof t&&(t={type:e}),t=ot(t),this.allowedEvents_[e]&&this["on"+e]&&this["on"+e](t),dt(this,t)},St.prototype.queueTrigger=function(t){var e=this;Ct=Ct||new Map;var i=t.type||t,n=Ct.get(this);n||(n=new Map,Ct.set(this,n));var s=n.get(i);n.delete(i),y.clearTimeout(s);var r=y.setTimeout(function(){0===n.size&&(n=null,Ct.delete(e)),e.trigger(t)},0);n.set(i,r)};function xt(t){return"string"==typeof t&&/\S/.test(t)||Array.isArray(t)&&!!t.length}function Et(t){if(!t.nodeName&&!Pt(t))throw new Error("Invalid target; must be a DOM node or evented object.")}function Dt(t){if(!xt(t))throw new Error("Invalid event type; must be a non-empty string or array.")}function At(t){if("function"!=typeof t)throw new Error("Invalid listener; must be a function.")}function It(t,e){var i,n,s,r=e.length<3||e[0]===t||e[0]===t.eventBusEl_;return s=r?(i=t.eventBusEl_,3<=e.length&&e.shift(),n=e[0],e[1]):(i=e[0],n=e[1],e[2]),Et(i),Dt(n),At(s),{isTargetingSelf:r,target:i,type:n,listener:s=Tt(t,s)}}function Ot(t,e,i,n){Et(t),t.nodeName?mt[e](t,i,n):t[e](i,n)}var Pt=function(e){return e instanceof St||!!e.eventBusEl_&&["on","one","off","trigger"].every(function(t){return"function"==typeof e[t]})},Lt={on:function(){for(var t=this,e=arguments.length,i=new Array(e),n=0;n<e;n++)i[n]=arguments[n];var s=It(this,i),r=s.isTargetingSelf,a=s.target,o=s.type,l=s.listener;if(Ot(a,"on",o,l),!r){function c(){return t.off(a,o,l)}c.guid=l.guid;function u(){return t.off("dispose",c)}u.guid=l.guid,Ot(this,"on","dispose",c),Ot(a,"on","dispose",u)}},one:function(){for(var n=this,t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];var s=It(this,e),r=s.isTargetingSelf,a=s.target,o=s.type,l=s.listener;if(r)Ot(a,"one",o,l);else{function c(){n.off(a,o,c);for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];l.apply(null,e)}c.guid=l.guid,Ot(a,"one",o,c)}},off:function(t,e,i){if(!t||xt(t))ht(this.eventBusEl_,t,e);else{var n=t,s=e;Et(n),Dt(s),At(i),i=Tt(this,i),this.off("dispose",i),n.nodeName?(ht(n,s,i),ht(n,"dispose",i)):Pt(n)&&(n.off(s,i),n.off("dispose",i))}},trigger:function(t,e){return dt(this.eventBusEl_,t,e)}};function Mt(t,e){void 0===e&&(e={});var i=e.eventBusKey;if(i){if(!t[i].nodeName)throw new Error('The eventBusKey "'+i+'" does not refer to an element.');t.eventBusEl_=t[i]}else t.eventBusEl_=x("span",{className:"vjs-event-bus"});return _(t,Lt),t.eventedCallbacks&&t.eventedCallbacks.forEach(function(t){t()}),t.on("dispose",function(){t.off(),y.setTimeout(function(){t.eventBusEl_=null},0)}),t}var Nt={state:{},setState:function(t){var i,n=this;return"function"==typeof t&&(t=t()),s(t,function(t,e){n.state[e]!==t&&((i=i||{})[e]={from:n.state[e],to:t}),n.state[e]=t}),i&&Pt(this)&&this.trigger({changes:i,type:"statechanged"}),i}};function Rt(t,e){return _(t,Nt),t.state=_({},t.state,e),"function"==typeof t.handleStateChanged&&Pt(t)&&t.on("statechanged",t.handleStateChanged),t}function Ut(t){return"string"!=typeof t?t:t.charAt(0).toUpperCase()+t.slice(1)}function jt(){for(var i={},t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return e.forEach(function(t){t&&s(t,function(t,e){u(t)?(u(i[e])||(i[e]={}),i[e]=jt(i[e],t)):i[e]=t})}),i}var Bt=function(){function c(t,e,i){if(!t&&this.play?this.player_=t=this:this.player_=t,this.options_=jt({},this.options_),e=this.options_=jt(this.options_,e),this.id_=e.id||e.el&&e.el.id,!this.id_){var n=t&&t.id&&t.id()||"no_player";this.id_=n+"_component_"+Z()}this.name_=e.name||null,e.el?this.el_=e.el:!1!==e.createEl&&(this.el_=this.createEl()),!1!==e.evented&&Mt(this,{eventBusKey:this.el_?"el_":null}),Rt(this,this.constructor.defaultState),this.children_=[],this.childIndex_={},!(this.childNameIndex_={})!==e.initChildren&&this.initChildren(),this.ready(i),!1!==e.reportTouchActivity&&this.enableTouchActivity()}var t=c.prototype;return t.dispose=function(){if(this.trigger({type:"dispose",bubbles:!1}),this.children_)for(var t=this.children_.length-1;0<=t;t--)this.children_[t].dispose&&this.children_[t].dispose();this.children_=null,this.childIndex_=null,this.childNameIndex_=null,this.el_&&(this.el_.parentNode&&this.el_.parentNode.removeChild(this.el_),st(this.el_),this.el_=null),this.player_=null},t.player=function(){return this.player_},t.options=function(t){return m.warn("this.options() has been deprecated and will be moved to the constructor in 6.0"),t&&(this.options_=jt(this.options_,t)),this.options_},t.el=function(){return this.el_},t.createEl=function(t,e,i){return x(t,e,i)},t.localize=function(t,s,e){void 0===e&&(e=t);var i=this.player_.language&&this.player_.language(),n=this.player_.languages&&this.player_.languages(),r=n&&n[i],a=i&&i.split("-")[0],o=n&&n[a],l=e;return r&&r[t]?l=r[t]:o&&o[t]&&(l=o[t]),s&&(l=l.replace(/\{(\d+)\}/g,function(t,e){var i=s[e-1],n=i;return void 0===i&&(n=t),n})),l},t.contentEl=function(){return this.contentEl_||this.el_},t.id=function(){return this.id_},t.name=function(){return this.name_},t.children=function(){return this.children_},t.getChildById=function(t){return this.childIndex_[t]},t.getChild=function(t){if(t)return t=Ut(t),this.childNameIndex_[t]},t.addChild=function(t,e,i){var n,s;if(void 0===e&&(e={}),void 0===i&&(i=this.children_.length),"string"==typeof t){s=Ut(t);var r=e.componentClass||s;e.name=s;var a=c.getComponent(r);if(!a)throw new Error("Component "+r+" does not exist");if("function"!=typeof a)return null;n=new a(this.player_||this,e)}else n=t;if(this.children_.splice(i,0,n),"function"==typeof n.id&&(this.childIndex_[n.id()]=n),(s=s||n.name&&Ut(n.name()))&&(this.childNameIndex_[s]=n),"function"==typeof n.el&&n.el()){var o=this.contentEl().children[i]||null;this.contentEl().insertBefore(n.el(),o)}return n},t.removeChild=function(t){if("string"==typeof t&&(t=this.getChild(t)),t&&this.children_){for(var e=!1,i=this.children_.length-1;0<=i;i--)if(this.children_[i]===t){e=!0,this.children_.splice(i,1);break}if(e){this.childIndex_[t.id()]=null,this.childNameIndex_[t.name()]=null;var n=t.el();n&&n.parentNode===this.contentEl()&&this.contentEl().removeChild(t.el())}}},t.initChildren=function(){var s=this,n=this.options_.children;if(n){var t,r=this.options_,i=c.getComponent("Tech");(t=Array.isArray(n)?n:Object.keys(n)).concat(Object.keys(this.options_).filter(function(e){return!t.some(function(t){return"string"==typeof t?e===t:e===t.name})})).map(function(t){var e,i;return i="string"==typeof t?n[e=t]||s.options_[e]||{}:(e=t.name,t),{name:e,opts:i}}).filter(function(t){var e=c.getComponent(t.opts.componentClass||Ut(t.name));return e&&!i.isTech(e)}).forEach(function(t){var e=t.name,i=t.opts;if(void 0!==r[e]&&(i=r[e]),!1!==i){!0===i&&(i={}),i.playerOptions=s.options_.playerOptions;var n=s.addChild(e,i);n&&(s[e]=n)}})}},t.buildCSSClass=function(){return""},t.ready=function(t,e){if(void 0===e&&(e=!1),t)return this.isReady_?void(e?t.call(this):this.setTimeout(t,1)):(this.readyQueue_=this.readyQueue_||[],void this.readyQueue_.push(t))},t.triggerReady=function(){this.isReady_=!0,this.setTimeout(function(){var t=this.readyQueue_;this.readyQueue_=[],t&&0<t.length&&t.forEach(function(t){t.call(this)},this),this.trigger("ready")},1)},t.$=function(t,e){return X(t,e||this.contentEl())},t.$$=function(t,e){return K(t,e||this.contentEl())},t.hasClass=function(t){return A(this.el_,t)},t.addClass=function(t){I(this.el_,t)},t.removeClass=function(t){O(this.el_,t)},t.toggleClass=function(t,e){P(this.el_,t,e)},t.show=function(){this.removeClass("vjs-hidden")},t.hide=function(){this.addClass("vjs-hidden")},t.lockShowing=function(){this.addClass("vjs-lock-showing")},t.unlockShowing=function(){this.removeClass("vjs-lock-showing")},t.getAttribute=function(t){return N(this.el_,t)},t.setAttribute=function(t,e){R(this.el_,t,e)},t.removeAttribute=function(t){U(this.el_,t)},t.width=function(t,e){return this.dimension("width",t,e)},t.height=function(t,e){return this.dimension("height",t,e)},t.dimensions=function(t,e){this.width(t,!0),this.height(e)},t.dimension=function(t,e,i){if(void 0!==e)return null!==e&&e==e||(e=0),-1!==(""+e).indexOf("%")||-1!==(""+e).indexOf("px")?this.el_.style[t]=e:this.el_.style[t]="auto"===e?"":e+"px",void(i||this.trigger("componentresize"));if(!this.el_)return 0;var n=this.el_.style[t],s=n.indexOf("px");return-1!==s?parseInt(n.slice(0,s),10):parseInt(this.el_["offset"+Ut(t)],10)},t.currentDimension=function(t){var e=0;if("width"!==t&&"height"!==t)throw new Error("currentDimension only accepts width or height value");if("function"==typeof y.getComputedStyle){var i=y.getComputedStyle(this.el_);e=i.getPropertyValue(t)||i[t]}if(0===(e=parseFloat(e))){var n="offset"+Ut(t);e=this.el_[n]}return e},t.currentDimensions=function(){return{width:this.currentDimension("width"),height:this.currentDimension("height")}},t.currentWidth=function(){return this.currentDimension("width")},t.currentHeight=function(){return this.currentDimension("height")},t.focus=function(){this.el_.focus()},t.blur=function(){this.el_.blur()},t.emitTapEvents=function(){var n,e=0,s=null;this.on("touchstart",function(t){1===t.touches.length&&(s={pageX:t.touches[0].pageX,pageY:t.touches[0].pageY},e=(new Date).getTime(),n=!0)}),this.on("touchmove",function(t){if(1<t.touches.length)n=!1;else if(s){var e=t.touches[0].pageX-s.pageX,i=t.touches[0].pageY-s.pageY;10<Math.sqrt(e*e+i*i)&&(n=!1)}});function t(){n=!1}this.on("touchleave",t),this.on("touchcancel",t),this.on("touchend",function(t){!(s=null)===n&&(new Date).getTime()-e<200&&(t.preventDefault(),this.trigger("tap"))})},t.enableTouchActivity=function(){if(this.player()&&this.player().reportUserActivity){var t,e=Tt(this.player(),this.player().reportUserActivity);this.on("touchstart",function(){e(),this.clearInterval(t),t=this.setInterval(e,250)});function i(){e(),this.clearInterval(t)}this.on("touchmove",e),this.on("touchend",i),this.on("touchcancel",i)}},t.setTimeout=function(t,e){var i,n,s=this;return t=Tt(this,t),i=y.setTimeout(function(){s.off("dispose",n),t()},e),(n=function(){return s.clearTimeout(i)}).guid="vjs-timeout-"+i,this.on("dispose",n),i},t.clearTimeout=function(t){y.clearTimeout(t);function e(){}return e.guid="vjs-timeout-"+t,this.off("dispose",e),t},t.setInterval=function(t,e){var i=this;t=Tt(this,t);function n(){return i.clearInterval(s)}var s=y.setInterval(t,e);return n.guid="vjs-interval-"+s,this.on("dispose",n),s},t.clearInterval=function(t){y.clearInterval(t);function e(){}return e.guid="vjs-interval-"+t,this.off("dispose",e),t},t.requestAnimationFrame=function(t){var e,i,n=this;return this.supportsRaf_?(t=Tt(this,t),e=y.requestAnimationFrame(function(){n.off("dispose",i),t()}),(i=function(){return n.cancelAnimationFrame(e)}).guid="vjs-raf-"+e,this.on("dispose",i),e):this.setTimeout(t,1e3/60)},t.cancelAnimationFrame=function(t){if(this.supportsRaf_){y.cancelAnimationFrame(t);function e(){}return e.guid="vjs-raf-"+t,this.off("dispose",e),t}return this.clearTimeout(t)},c.registerComponent=function(t,e){if("string"!=typeof t||!t)throw new Error('Illegal component name, "'+t+'"; must be a non-empty string.');var i,n=c.getComponent("Tech"),s=n&&n.isTech(e),r=c===e||c.prototype.isPrototypeOf(e.prototype);if(s||!r)throw i=s?"techs must be registered using Tech.registerTech()":"must be a Component subclass",new Error('Illegal component, "'+t+'"; '+i+".");t=Ut(t),c.components_||(c.components_={});var a=c.getComponent("Player");if("Player"===t&&a&&a.players){var o=a.players,l=Object.keys(o);if(o&&0<l.length&&l.map(function(t){return o[t]}).every(Boolean))throw new Error("Can not register Player component after player has been created.")}return c.components_[t]=e},c.getComponent=function(t){if(t)return t=Ut(t),c.components_&&c.components_[t]?c.components_[t]:void 0},c}();Bt.prototype.supportsRaf_="function"==typeof y.requestAnimationFrame&&"function"==typeof y.cancelAnimationFrame,Bt.registerComponent("Component",Bt);var Ht,Ft,zt,Wt,$t=y.navigator&&y.navigator.userAgent||"",qt=/AppleWebKit\/([\d.]+)/i.exec($t),Vt=qt?parseFloat(qt.pop()):null,Yt=/iPad/i.test($t),Gt=/iPhone/i.test($t)&&!Yt,Xt=/iPod/i.test($t),Kt=Gt||Yt||Xt,Qt=(Ht=$t.match(/OS (\d+)_/i))&&Ht[1]?Ht[1]:null,Jt=/Android/i.test($t),Zt=function(){var t=$t.match(/Android (\d+)(?:\.(\d+))?(?:\.(\d+))*/i);if(!t)return null;var e=t[1]&&parseFloat(t[1]),i=t[2]&&parseFloat(t[2]);return e&&i?parseFloat(t[1]+"."+t[2]):e||null}(),te=Jt&&Zt<5&&Vt<537,ee=/Firefox/i.test($t),ie=/Edge/i.test($t),ne=!ie&&(/Chrome/i.test($t)||/CriOS/i.test($t)),se=(Ft=$t.match(/(Chrome|CriOS)\/(\d+)/))&&Ft[2]?parseFloat(Ft[2]):null,re=(zt=/MSIE\s(\d+)\.\d/.exec($t),!(Wt=zt&&parseFloat(zt[1]))&&/Trident\/7.0/i.test($t)&&/rv:11.0/.test($t)&&(Wt=11),Wt),ae=/Safari/i.test($t)&&!ne&&!Jt&&!ie,oe=(ae||Kt)&&!ne,le=w()&&("ontouchstart"in y||y.navigator.maxTouchPoints||y.DocumentTouch&&y.document instanceof y.DocumentTouch),ce=Object.freeze({IS_IPAD:Yt,IS_IPHONE:Gt,IS_IPOD:Xt,IS_IOS:Kt,IOS_VERSION:Qt,IS_ANDROID:Jt,ANDROID_VERSION:Zt,IS_NATIVE_ANDROID:te,IS_FIREFOX:ee,IS_EDGE:ie,IS_CHROME:ne,CHROME_VERSION:se,IE_VERSION:re,IS_SAFARI:ae,IS_ANY_SAFARI:oe,TOUCH_ENABLED:le});function ue(t,e,i,n){return function(t,e,i){if("number"!=typeof e||e<0||i<e)throw new Error("Failed to execute '"+t+"' on 'TimeRanges': The index provided ("+e+") is non-numeric or out of bounds (0-"+i+").")}(t,n,i.length-1),i[n][e]}function he(t){return void 0===t||0===t.length?{length:0,start:function(){throw new Error("This TimeRanges object is empty")},end:function(){throw new Error("This TimeRanges object is empty")}}:{length:t.length,start:ue.bind(null,"start",0,t),end:ue.bind(null,"end",1,t)}}function de(t,e){return Array.isArray(t)?he(t):void 0===t||void 0===e?he():he([[t,e]])}function pe(t,e){var i,n,s=0;if(!e)return 0;t&&t.length||(t=de(0,0));for(var r=0;r<t.length;r++)i=t.start(r),e<(n=t.end(r))&&(n=e),s+=n-i;return s/e}for(var fe,me={},ge=[["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"]],ve=ge[0],ye=0;ye<ge.length;ye++)if(ge[ye][1]in d){fe=ge[ye];break}if(fe)for(var _e=0;_e<fe.length;_e++)me[ve[_e]]=fe[_e];function be(t){if(t instanceof be)return t;"number"==typeof t?this.code=t:"string"==typeof t?this.message=t:c(t)&&("number"==typeof t.code&&(this.code=t.code),_(this,t)),this.message||(this.message=be.defaultMessages[this.code]||"")}be.prototype.code=0,be.prototype.message="",be.prototype.status=null,be.errorTypes=["MEDIA_ERR_CUSTOM","MEDIA_ERR_ABORTED","MEDIA_ERR_NETWORK","MEDIA_ERR_DECODE","MEDIA_ERR_SRC_NOT_SUPPORTED","MEDIA_ERR_ENCRYPTED"],be.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 Te=0;Te<be.errorTypes.length;Te++)be[be.errorTypes[Te]]=Te,be.prototype[be.errorTypes[Te]]=Te;var we=function(t,e){var i,n=null;try{i=JSON.parse(t,e)}catch(t){n=t}return[n,i]};function ke(t){return null!=t&&"function"==typeof t.then}function Se(t){ke(t)&&t.then(null,function(t){})}function Ce(n){return["kind","label","language","id","inBandMetadataTrackDispatchType","mode","src"].reduce(function(t,e,i){return n[e]&&(t[e]=n[e]),t},{cues:n.cues&&Array.prototype.map.call(n.cues,function(t){return{startTime:t.startTime,endTime:t.endTime,text:t.text,id:t.id}})})}var xe=function(t){var e=t.$$("track"),i=Array.prototype.map.call(e,function(t){return t.track});return Array.prototype.map.call(e,function(t){var e=Ce(t.track);return t.src&&(e.src=t.src),e}).concat(Array.prototype.filter.call(t.textTracks(),function(t){return-1===i.indexOf(t)}).map(Ce))},Ee=function(t,i){return t.forEach(function(t){var e=i.addRemoteTextTrack(t).track;!t.src&&t.cues&&t.cues.forEach(function(t){return e.addCue(t)})}),i.textTracks()},De="vjs-modal-dialog",Ae=function(n){function t(t,e){var i;return(i=n.call(this,t,e)||this).opened_=i.hasBeenOpened_=i.hasBeenFilled_=!1,i.closeable(!i.options_.uncloseable),i.content(i.options_.content),i.contentEl_=x("div",{className:De+"-content"},{role:"document"}),i.descEl_=x("p",{className:De+"-description vjs-control-text",id:i.el().getAttribute("aria-describedby")}),E(i.descEl_,i.description()),i.el_.appendChild(i.descEl_),i.el_.appendChild(i.contentEl_),i}p(t,n);var e=t.prototype;return e.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"})},e.dispose=function(){this.contentEl_=null,this.descEl_=null,this.previouslyActiveEl_=null,n.prototype.dispose.call(this)},e.buildCSSClass=function(){return De+" vjs-hidden "+n.prototype.buildCSSClass.call(this)},e.handleKeyPress=function(t){27===t.which&&this.closeable()&&this.close()},e.label=function(){return this.localize(this.options_.label||"Modal Window")},e.description=function(){var t=this.options_.description||this.localize("This is a modal window.");return this.closeable()&&(t+=" "+this.localize("This modal can be closed by pressing the Escape key or activating the close button.")),t},e.open=function(){if(!this.opened_){var t=this.player();this.trigger("beforemodalopen"),this.opened_=!0,!this.options_.fillAlways&&(this.hasBeenOpened_||this.hasBeenFilled_)||this.fill(),this.wasPlaying_=!t.paused(),this.options_.pauseOnOpen&&this.wasPlaying_&&t.pause(),this.closeable()&&this.on(this.el_.ownerDocument,"keydown",Tt(this,this.handleKeyPress)),this.hadControls_=t.controls(),t.controls(!1),this.show(),this.conditionalFocus_(),this.el().setAttribute("aria-hidden","false"),this.trigger("modalopen"),this.hasBeenOpened_=!0}},e.opened=function(t){return"boolean"==typeof t&&this[t?"open":"close"](),this.opened_},e.close=function(){if(this.opened_){var t=this.player();this.trigger("beforemodalclose"),this.opened_=!1,this.wasPlaying_&&this.options_.pauseOnOpen&&t.play(),this.closeable()&&this.off(this.el_.ownerDocument,"keydown",Tt(this,this.handleKeyPress)),this.hadControls_&&t.controls(!0),this.hide(),this.el().setAttribute("aria-hidden","true"),this.trigger("modalclose"),this.conditionalBlur_(),this.options_.temporary&&this.dispose()}},e.closeable=function(t){if("boolean"==typeof t){var e=this.closeable_=!!t,i=this.getChild("closeButton");if(e&&!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)}!e&&i&&(this.off(i,"close",this.close),this.removeChild(i),i.dispose())}return this.closeable_},e.fill=function(){this.fillWith(this.content())},e.fillWith=function(t){var e=this.contentEl(),i=e.parentNode,n=e.nextSibling;this.trigger("beforemodalfill"),this.hasBeenFilled_=!0,i.removeChild(e),this.empty(),Y(e,t),this.trigger("modalfill"),n?i.insertBefore(e,n):i.appendChild(e);var s=this.getChild("closeButton");s&&i.appendChild(s.el_)},e.empty=function(){this.trigger("beforemodalempty"),$(this.contentEl()),this.trigger("modalempty")},e.content=function(t){return void 0!==t&&(this.content_=t),this.content_},e.conditionalFocus_=function(){var t=d.activeElement,e=this.player_.el_;this.previouslyActiveEl_=null,!e.contains(t)&&e!==t||(this.previouslyActiveEl_=t,this.focus(),this.on(d,"keydown",this.handleKeyDown))},e.conditionalBlur_=function(){this.previouslyActiveEl_&&(this.previouslyActiveEl_.focus(),this.previouslyActiveEl_=null),this.off(d,"keydown",this.handleKeyDown)},e.handleKeyDown=function(t){if(9===t.which){for(var e,i=this.focusableEls_(),n=this.el_.querySelector(":focus"),s=0;s<i.length;s++)if(n===i[s]){e=s;break}d.activeElement===this.el_&&(e=0),t.shiftKey&&0===e?(i[i.length-1].focus(),t.preventDefault()):t.shiftKey||e!==i.length-1||(i[0].focus(),t.preventDefault())}},e.focusableEls_=function(){var t=this.el_.querySelectorAll("*");return Array.prototype.filter.call(t,function(t){return(t instanceof y.HTMLAnchorElement||t instanceof y.HTMLAreaElement)&&t.hasAttribute("href")||(t instanceof y.HTMLInputElement||t instanceof y.HTMLSelectElement||t instanceof y.HTMLTextAreaElement||t instanceof y.HTMLButtonElement)&&!t.hasAttribute("disabled")||t instanceof y.HTMLIFrameElement||t instanceof y.HTMLObjectElement||t instanceof y.HTMLEmbedElement||t.hasAttribute("tabindex")&&-1!==t.getAttribute("tabindex")||t.hasAttribute("contenteditable")})},t}(Bt);Ae.prototype.options_={pauseOnOpen:!0,temporary:!0},Bt.registerComponent("ModalDialog",Ae);var Ie=function(n){function t(t){var e;void 0===t&&(t=[]),(e=n.call(this)||this).tracks_=[],Object.defineProperty(f(f(e)),"length",{get:function(){return this.tracks_.length}});for(var i=0;i<t.length;i++)e.addTrack(t[i]);return e}p(t,n);var e=t.prototype;return e.addTrack=function(t){var e=this.tracks_.length;""+e in this||Object.defineProperty(this,e,{get:function(){return this.tracks_[e]}}),-1===this.tracks_.indexOf(t)&&(this.tracks_.push(t),this.trigger({track:t,type:"addtrack"}))},e.removeTrack=function(t){for(var e,i=0,n=this.length;i<n;i++)if(this[i]===t){(e=this[i]).off&&e.off(),this.tracks_.splice(i,1);break}e&&this.trigger({track:e,type:"removetrack"})},e.getTrackById=function(t){for(var e=null,i=0,n=this.length;i<n;i++){var s=this[i];if(s.id===t){e=s;break}}return e},t}(St);for(var Oe in Ie.prototype.allowedEvents_={change:"change",addtrack:"addtrack",removetrack:"removetrack"},Ie.prototype.allowedEvents_)Ie.prototype["on"+Oe]=null;function Pe(t,e){for(var i=0;i<t.length;i++)Object.keys(t[i]).length&&e.id!==t[i].id&&(t[i].enabled=!1)}function Le(t,e){for(var i=0;i<t.length;i++)Object.keys(t[i]).length&&e.id!==t[i].id&&(t[i].selected=!1)}function Me(t){var e=["protocol","hostname","port","pathname","search","hash","host"],i=d.createElement("a");i.href=t;var n,s=""===i.host&&"file:"!==i.protocol;s&&((n=d.createElement("div")).innerHTML='<a href="'+t+'"></a>',i=n.firstChild,n.setAttribute("style","display:none; position:absolute;"),d.body.appendChild(n));for(var r={},a=0;a<e.length;a++)r[e[a]]=i[e[a]];return"http:"===r.protocol&&(r.host=r.host.replace(/:80$/,"")),"https:"===r.protocol&&(r.host=r.host.replace(/:443$/,"")),r.protocol||(r.protocol=y.location.protocol),s&&d.body.removeChild(n),r}function Ne(t){if(!t.match(/^https?:\/\//)){var e=d.createElement("div");e.innerHTML='<a href="'+t+'">x</a>',t=e.firstChild.href}return t}function Re(t){if("string"==typeof t){var e=/^(\/?)([\s\S]*?)((?:\.{1,2}|[^\/]+?)(\.([^\.\/\?]+)))(?:[\/]*|[\?].*)$/i.exec(t);if(e)return e.pop().toLowerCase()}return""}function Ue(t){var e=y.location,i=Me(t);return(":"===i.protocol?e.protocol:i.protocol)+i.host!==e.protocol+e.host}var je=function(n){function t(t){var e;void 0===t&&(t=[]);for(var i=t.length-1;0<=i;i--)if(t[i].enabled){Pe(t,t[i]);break}return(e=n.call(this,t)||this).changing_=!1,e}return p(t,n),t.prototype.addTrack=function(t){var e=this;t.enabled&&Pe(this,t),n.prototype.addTrack.call(this,t),t.addEventListener&&t.addEventListener("enabledchange",function(){e.changing_||(e.changing_=!0,Pe(e,t),e.changing_=!1,e.trigger("change"))})},t}(Ie),Be=function(n){function t(t){var e;void 0===t&&(t=[]);for(var i=t.length-1;0<=i;i--)if(t[i].selected){Le(t,t[i]);break}return(e=n.call(this,t)||this).changing_=!1,Object.defineProperty(f(f(e)),"selectedIndex",{get:function(){for(var t=0;t<this.length;t++)if(this[t].selected)return t;return-1},set:function(){}}),e}return p(t,n),t.prototype.addTrack=function(t){var e=this;t.selected&&Le(this,t),n.prototype.addTrack.call(this,t),t.addEventListener&&t.addEventListener("selectedchange",function(){e.changing_||(e.changing_=!0,Le(e,t),e.changing_=!1,e.trigger("change"))})},t}(Ie),He=function(e){function t(){return e.apply(this,arguments)||this}return p(t,e),t.prototype.addTrack=function(t){e.prototype.addTrack.call(this,t),t.addEventListener("modechange",Tt(this,function(){this.queueTrigger("change")}));-1===["metadata","chapters"].indexOf(t.kind)&&t.addEventListener("modechange",Tt(this,function(){this.trigger("selectedlanguagechange")}))},t}(Ie),Fe=function(){function t(t){void 0===t&&(t=[]),this.trackElements_=[],Object.defineProperty(this,"length",{get:function(){return this.trackElements_.length}});for(var e=0,i=t.length;e<i;e++)this.addTrackElement_(t[e])}var e=t.prototype;return e.addTrackElement_=function(t){var e=this.trackElements_.length;""+e in this||Object.defineProperty(this,e,{get:function(){return this.trackElements_[e]}}),-1===this.trackElements_.indexOf(t)&&this.trackElements_.push(t)},e.getTrackElementByTrack_=function(t){for(var e,i=0,n=this.trackElements_.length;i<n;i++)if(t===this.trackElements_[i].track){e=this.trackElements_[i];break}return e},e.removeTrackElement_=function(t){for(var e=0,i=this.trackElements_.length;e<i;e++)if(t===this.trackElements_[e]){this.trackElements_.splice(e,1);break}},t}(),ze=function(){function e(t){e.prototype.setCues_.call(this,t),Object.defineProperty(this,"length",{get:function(){return this.length_}})}var t=e.prototype;return t.setCues_=function(t){var e=this.length||0,i=0,n=t.length;this.cues_=t,this.length_=t.length;function s(t){""+t in this||Object.defineProperty(this,""+t,{get:function(){return this.cues_[t]}})}if(e<n)for(i=e;i<n;i++)s.call(this,i)},t.getCueById=function(t){for(var e=null,i=0,n=this.length;i<n;i++){var s=this[i];if(s.id===t){e=s;break}}return e},e}(),We={alternative:"alternative",captions:"captions",main:"main",sign:"sign",subtitles:"subtitles",commentary:"commentary"},$e={alternative:"alternative",descriptions:"descriptions",main:"main","main-desc":"main-desc",translation:"translation",commentary:"commentary"},qe={subtitles:"subtitles",captions:"captions",descriptions:"descriptions",chapters:"chapters",metadata:"metadata"},Ve={disabled:"disabled",hidden:"hidden",showing:"showing"},Ye=function(r){function t(t){var e;void 0===t&&(t={}),e=r.call(this)||this;function i(t){Object.defineProperty(f(f(e)),t,{get:function(){return n[t]},set:function(){}})}var n={id:t.id||"vjs_track_"+Z(),kind:t.kind||"",label:t.label||"",language:t.language||""};for(var s in n)i(s);return e}return p(t,r),t}(St),Ge=Object.freeze({parseUrl:Me,getAbsoluteURL:Ne,getFileExtension:Re,isCrossOrigin:Ue}),Xe=function(t){var e=Ke.call(t);return"[object Function]"===e||"function"==typeof t&&"[object RegExp]"!==e||"undefined"!=typeof window&&(t===window.setTimeout||t===window.alert||t===window.confirm||t===window.prompt)},Ke=Object.prototype.toString;function Qe(t,e){return t(e={exports:{}},e.exports),e.exports}function Je(t){try{var e=ei.call(t);return ii.test(e)}catch(t){return!1}}function Ze(t){if(!t)return!1;if("function"!=typeof t&&"object"!=typeof t)return!1;if("function"==typeof t&&!t.prototype)return!0;if(si)return function(t){try{return!Je(t)&&(ei.call(t),!0)}catch(t){return!1}}(t);if(Je(t))return!1;var e=ni.call(t);return"[object Function]"===e||"[object GeneratorFunction]"===e}var ti=Qe(function(t,e){(e=t.exports=function(t){return t.replace(/^\s*|\s*$/g,"")}).left=function(t){return t.replace(/^\s*/,"")},e.right=function(t){return t.replace(/\s*$/,"")}}),ei=(ti.left,ti.right,Function.prototype.toString),ii=/^\s*class\b/,ni=Object.prototype.toString,si="function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag,ri=Object.prototype.toString,ai=Object.prototype.hasOwnProperty,oi=function(t,e,i){if(!Ze(e))throw new TypeError("iterator must be a function");var n;3<=arguments.length&&(n=i),"[object Array]"===ri.call(t)?function(t,e,i){for(var n=0,s=t.length;n<s;n++)ai.call(t,n)&&(null==i?e(t[n],n,t):e.call(i,t[n],n,t))}(t,e,n):"string"==typeof t?function(t,e,i){for(var n=0,s=t.length;n<s;n++)null==i?e(t.charAt(n),n,t):e.call(i,t.charAt(n),n,t)}(t,e,n):function(t,e,i){for(var n in t)ai.call(t,n)&&(null==i?e(t[n],n,t):e.call(i,t[n],n,t))}(t,e,n)},li=function(t){if(!t)return{};var s={};return oi(ti(t).split("\n"),function(t){var e=t.indexOf(":"),i=ti(t.slice(0,e)).toLowerCase(),n=ti(t.slice(e+1));void 0===s[i]?s[i]=n:!function(t){return"[object Array]"===Object.prototype.toString.call(t)}(s[i])?s[i]=[s[i],n]:s[i].push(n)}),s},ci=function(){for(var t={},e=0;e<arguments.length;e++){var i=arguments[e];for(var n in i)ui.call(i,n)&&(t[n]=i[n])}return t},ui=Object.prototype.hasOwnProperty;var hi=pi;function di(t,e,i){var n=t;return Xe(e)?(i=e,"string"==typeof t&&(n={uri:t})):n=ci(e,{uri:t}),n.callback=i,n}function pi(t,e,i){return fi(e=di(t,e,i))}function fi(n){if(void 0===n.callback)throw new Error("callback argument missing");var s=!1,r=function(t,e,i){s||(s=!0,n.callback(t,e,i))};function a(){var t=void 0;if(t=c.response?c.response:c.responseText||function(t){if("document"===t.responseType)return t.responseXML;var e=t.responseXML&&"parsererror"===t.responseXML.documentElement.nodeName;return""!==t.responseType||e?null:t.responseXML}(c),m)try{t=JSON.parse(t)}catch(t){}return t}function e(t){return clearTimeout(l),t instanceof Error||(t=new Error(""+(t||"Unknown XMLHttpRequest Error"))),t.statusCode=0,r(t,g)}function t(){if(!o){var t;clearTimeout(l),t=n.useXDR&&void 0===c.status?200:1223===c.status?204:c.status;var e=g,i=null;return 0!==t?(e={body:a(),statusCode:t,method:h,headers:{},url:u,rawRequest:c},c.getAllResponseHeaders&&(e.headers=li(c.getAllResponseHeaders()))):i=new Error("Internal XMLHttpRequest Error"),r(i,e,e.body)}}var i,o,l,c=n.xhr||null,u=(c=c||(n.cors||n.useXDR?new pi.XDomainRequest:new pi.XMLHttpRequest)).url=n.uri||n.url,h=c.method=n.method||"GET",d=n.body||n.data,p=c.headers=n.headers||{},f=!!n.sync,m=!1,g={body:void 0,headers:{},statusCode:0,method:h,url:u,rawRequest:c};if("json"in n&&!1!==n.json&&(m=!0,p.accept||p.Accept||(p.Accept="application/json"),"GET"!==h&&"HEAD"!==h&&(p["content-type"]||p["Content-Type"]||(p["Content-Type"]="application/json"),d=JSON.stringify(!0===n.json?d:n.json))),c.onreadystatechange=function(){4===c.readyState&&setTimeout(t,0)},c.onload=t,c.onerror=e,c.onprogress=function(){},c.onabort=function(){o=!0},c.ontimeout=e,c.open(h,u,!f,n.username,n.password),f||(c.withCredentials=!!n.withCredentials),!f&&0<n.timeout&&(l=setTimeout(function(){if(!o){o=!0,c.abort("timeout");var t=new Error("XMLHttpRequest timeout");t.code="ETIMEDOUT",e(t)}},n.timeout)),c.setRequestHeader)for(i in p)p.hasOwnProperty(i)&&c.setRequestHeader(i,p[i]);else if(n.headers&&!function(t){for(var e in t)if(t.hasOwnProperty(e))return!1;return!0}(n.headers))throw new Error("Headers cannot be set on an XDomainRequest object");return"responseType"in n&&(c.responseType=n.responseType),"beforeSend"in n&&"function"==typeof n.beforeSend&&n.beforeSend(c),c.send(d||null),c}pi.XMLHttpRequest=y.XMLHttpRequest||function(){},pi.XDomainRequest="withCredentials"in new pi.XMLHttpRequest?pi.XMLHttpRequest:y.XDomainRequest,function(t,e){for(var i=0;i<t.length;i++)e(t[i])}(["get","put","post","patch","head","delete"],function(n){pi["delete"===n?"del":n]=function(t,e,i){return(e=di(t,e,i)).method=n.toUpperCase(),fi(e)}});function mi(t,e){var i=new y.WebVTT.Parser(y,y.vttjs,y.WebVTT.StringDecoder()),n=[];i.oncue=function(t){e.addCue(t)},i.onparsingerror=function(t){n.push(t)},i.onflush=function(){e.trigger({type:"loadeddata",target:e})},i.parse(t),0<n.length&&(y.console&&y.console.groupCollapsed&&y.console.groupCollapsed("Text Track parsing errors for "+e.src),n.forEach(function(t){return m.error(t)}),y.console&&y.console.groupEnd&&y.console.groupEnd()),i.flush()}var gi=function(c){function t(t){var e;if(void 0===t&&(t={}),!t.tech)throw new Error("A tech was not provided.");var i=jt(t,{kind:qe[t.kind]||"subtitles",language:t.language||t.srclang||""}),n=Ve[i.mode]||"disabled",s=i.default;"metadata"!==i.kind&&"chapters"!==i.kind||(n="hidden"),(e=c.call(this,i)||this).tech_=i.tech,e.cues_=[],e.activeCues_=[];var r=new ze(e.cues_),a=new ze(e.activeCues_),o=!1,l=Tt(f(f(e)),function(){this.activeCues=this.activeCues,o&&(this.trigger("cuechange"),o=!1)});return"disabled"!==n&&e.tech_.ready(function(){e.tech_.on("timeupdate",l)},!0),Object.defineProperties(f(f(e)),{default:{get:function(){return s},set:function(){}},mode:{get:function(){return n},set:function(t){var e=this;Ve[t]&&("disabled"!==(n=t)?this.tech_.ready(function(){e.tech_.on("timeupdate",l)},!0):this.tech_.off("timeupdate",l),this.trigger("modechange"))}},cues:{get:function(){return this.loaded_?r:null},set:function(){}},activeCues:{get:function(){if(!this.loaded_)return null;if(0===this.cues.length)return a;for(var t=this.tech_.currentTime(),e=[],i=0,n=this.cues.length;i<n;i++){var s=this.cues[i];s.startTime<=t&&s.endTime>=t?e.push(s):s.startTime===s.endTime&&s.startTime<=t&&s.startTime+.5>=t&&e.push(s)}if(o=!1,e.length!==this.activeCues_.length)o=!0;else for(var r=0;r<e.length;r++)-1===this.activeCues_.indexOf(e[r])&&(o=!0);return this.activeCues_=e,a.setCues_(this.activeCues_),a},set:function(){}}}),i.src?(e.src=i.src,function(t,s){var e={uri:t},i=Ue(t);i&&(e.cors=i),hi(e,Tt(this,function(t,e,i){if(t)return m.error(t,e);if(s.loaded_=!0,"function"!=typeof y.WebVTT){if(s.tech_){function n(){return mi(i,s)}s.tech_.on("vttjsloaded",n),s.tech_.on("vttjserror",function(){m.error("vttjs failed to load, stopping trying to process "+s.src),s.tech_.off("vttjsloaded",n)})}}else mi(i,s)}))}(i.src,f(f(e)))):e.loaded_=!0,e}p(t,c);var e=t.prototype;return e.addCue=function(t){var e=t;if(y.vttjs&&!(t instanceof y.vttjs.VTTCue)){for(var i in e=new y.vttjs.VTTCue(t.startTime,t.endTime,t.text),t)i in e||(e[i]=t[i]);e.id=t.id,e.originalCue_=t}for(var n=this.tech_.textTracks(),s=0;s<n.length;s++)n[s]!==this&&n[s].removeCue(e);this.cues_.push(e),this.cues.setCues_(this.cues_)},e.removeCue=function(t){for(var e=this.cues_.length;e--;){var i=this.cues_[e];if(i===t||i.originalCue_&&i.originalCue_===t){this.cues_.splice(e,1),this.cues.setCues_(this.cues_);break}}},t}(Ye);gi.prototype.allowedEvents_={cuechange:"cuechange"};var vi=function(s){function t(t){var e;void 0===t&&(t={});var i=jt(t,{kind:$e[t.kind]||""});e=s.call(this,i)||this;var n=!1;return Object.defineProperty(f(f(e)),"enabled",{get:function(){return n},set:function(t){"boolean"==typeof t&&t!==n&&(n=t,this.trigger("enabledchange"))}}),i.enabled&&(e.enabled=i.enabled),e.loaded_=!0,e}return p(t,s),t}(Ye),yi=function(s){function t(t){var e;void 0===t&&(t={});var i=jt(t,{kind:We[t.kind]||""});e=s.call(this,i)||this;var n=!1;return Object.defineProperty(f(f(e)),"selected",{get:function(){return n},set:function(t){"boolean"==typeof t&&t!==n&&(n=t,this.trigger("selectedchange"))}}),i.selected&&(e.selected=i.selected),e}return p(t,s),t}(Ye),_i=function(s){function t(t){var e,i;void 0===t&&(t={}),e=s.call(this)||this;var n=new gi(t);return e.kind=n.kind,e.src=n.src,e.srclang=n.language,e.label=n.label,e.default=n.default,Object.defineProperties(f(f(e)),{readyState:{get:function(){return i}},track:{get:function(){return n}}}),i=0,n.addEventListener("loadeddata",function(){i=2,e.trigger({type:"load",target:f(f(e))})}),e}return p(t,s),t}(St);_i.prototype.allowedEvents_={load:"load"},_i.NONE=0,_i.LOADING=1,_i.LOADED=2,_i.ERROR=3;var bi={audio:{ListClass:je,TrackClass:vi,capitalName:"Audio"},video:{ListClass:Be,TrackClass:yi,capitalName:"Video"},text:{ListClass:He,TrackClass:gi,capitalName:"Text"}};Object.keys(bi).forEach(function(t){bi[t].getterName=t+"Tracks",bi[t].privateName=t+"Tracks_"});var Ti={remoteText:{ListClass:He,TrackClass:gi,capitalName:"RemoteText",getterName:"remoteTextTracks",privateName:"remoteTextTracks_"},remoteTextEl:{ListClass:Fe,TrackClass:_i,capitalName:"RemoteTextTrackEls",getterName:"remoteTextTrackEls",privateName:"remoteTextTrackEls_"}},wi=jt(bi,Ti);Ti.names=Object.keys(Ti),bi.names=Object.keys(bi),wi.names=[].concat(Ti.names).concat(bi.names);var ki=Object.create||function(t){if(1!==arguments.length)throw new Error("Object.create shim only accepts one parameter.");return Si.prototype=t,new Si};function Si(){}function Ci(t,e){this.name="ParsingError",this.code=t.code,this.message=e||t.message}function xi(t){function e(t,e,i,n){return 3600*(0|t)+60*(0|e)+(0|i)+(0|n)/1e3}var i=t.match(/^(\d+):(\d{2})(:\d{2})?\.(\d{3})/);return i?i[3]?e(i[1],i[2],i[3].replace(":",""),i[4]):59<i[1]?e(i[1],i[2],0,i[4]):e(0,i[1],i[2],i[4]):null}function Ei(){this.values=ki(null)}function Di(t,e,i,n){var s=n?t.split(n):[t];for(var r in s)if("string"==typeof s[r]){var a=s[r].split(i);if(2===a.length)e(a[0],a[1])}}function Ai(e,t,r){var i,n,a,s=e;function o(){var t=xi(e);if(null===t)throw new Ci(Ci.Errors.BadTimeStamp,"Malformed timestamp: "+s);return e=e.replace(/^[^\sa-zA-Z-]+/,""),t}function l(){e=e.replace(/^\s+/,"")}if(l(),t.startTime=o(),l(),"--\x3e"!==e.substr(0,3))throw new Ci(Ci.Errors.BadTimeStamp,"Malformed time stamp (time stamps must be separated by '--\x3e'): "+s);e=e.substr(3),l(),t.endTime=o(),l(),i=e,n=t,a=new Ei,Di(i,function(t,e){switch(t){case"region":for(var i=r.length-1;0<=i;i--)if(r[i].id===e){a.set(t,r[i].region);break}break;case"vertical":a.alt(t,e,["rl","lr"]);break;case"line":var n=e.split(","),s=n[0];a.integer(t,s),a.percent(t,s)&&a.set("snapToLines",!1),a.alt(t,s,["auto"]),2===n.length&&a.alt("lineAlign",n[1],["start","middle","end"]);break;case"position":n=e.split(","),a.percent(t,n[0]),2===n.length&&a.alt("positionAlign",n[1],["start","middle","end"]);break;case"size":a.percent(t,e);break;case"align":a.alt(t,e,["start","middle","end","left","right"])}},/:/,/\s/),n.region=a.get("region",null),n.vertical=a.get("vertical",""),n.line=a.get("line","auto"),n.lineAlign=a.get("lineAlign","start"),n.snapToLines=a.get("snapToLines",!0),n.size=a.get("size",100),n.align=a.get("align","middle"),n.position=a.get("position",{start:0,left:0,middle:50,end:100,right:100},n.align),n.positionAlign=a.get("positionAlign",{start:"start",left:"start",middle:"middle",end:"end",right:"end"},n.align)}((Ci.prototype=ki(Error.prototype)).constructor=Ci).Errors={BadSignature:{code:0,message:"Malformed WebVTT signature."},BadTimeStamp:{code:1,message:"Malformed time stamp."}},Ei.prototype={set:function(t,e){this.get(t)||""===e||(this.values[t]=e)},get:function(t,e,i){return i?this.has(t)?this.values[t]:e[i]:this.has(t)?this.values[t]:e},has:function(t){return t in this.values},alt:function(t,e,i){for(var n=0;n<i.length;++n)if(e===i[n]){this.set(t,e);break}},integer:function(t,e){/^-?\d+$/.test(e)&&this.set(t,parseInt(e,10))},percent:function(t,e){return!!(e.match(/^([\d]{1,3})(\.[\d]*)?%$/)&&0<=(e=parseFloat(e))&&e<=100)&&(this.set(t,e),!0)}};var Ii={"&amp;":"&","&lt;":"<","&gt;":">","&lrm;":"‎","&rlm;":"‏","&nbsp;":" "},Oi={c:"span",i:"i",b:"b",u:"u",ruby:"ruby",rt:"rt",v:"span",lang:"span"},Pi={v:"title",lang:"lang"},Li={rt:"ruby"};function Mi(r,i){function t(){if(!i)return null;var t,e=i.match(/^([^<]*)(<[^>]*>?)?/);return t=e[1]?e[1]:e[2],i=i.substr(t.length),t}function e(t){return Ii[t]}function n(t){for(;f=t.match(/&(amp|lt|gt|lrm|rlm|nbsp);/);)t=t.replace(f[0],e);return t}function s(t,e){var i=Oi[t];if(!i)return null;var n=r.document.createElement(i);n.localName=i;var s=Pi[t];return s&&e&&(n[s]=e.trim()),n}for(var a,o,l,c=r.document.createElement("div"),u=c,h=[];null!==(a=t());)if("<"!==a[0])u.appendChild(r.document.createTextNode(n(a)));else{if("/"===a[1]){h.length&&h[h.length-1]===a.substr(2).replace(">","")&&(h.pop(),u=u.parentNode);continue}var d,p=xi(a.substr(1,a.length-2));if(p){d=r.document.createProcessingInstruction("timestamp",p),u.appendChild(d);continue}var f=a.match(/^<([^.\s/0-9>]+)(\.[^\s\\>]+)?([^>\\]+)?(\\?)>?$/);if(!f)continue;if(!(d=s(f[1],f[3])))continue;if(o=u,Li[(l=d).localName]&&Li[l.localName]!==o.localName)continue;f[2]&&(d.className=f[2].substr(1).replace("."," ")),h.push(f[1]),u.appendChild(d),u=d}return c}var Ni=[[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 Ri(t){for(var e=0;e<Ni.length;e++){var i=Ni[e];if(t>=i[0]&&t<=i[1])return!0}return!1}function Ui(){}function ji(t,e,i){Ui.call(this),this.cue=e,this.cueDiv=Mi(t,e.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:""===e.vertical?"horizontal-tb":"lr"===e.vertical?"vertical-lr":"vertical-rl",unicodeBidi:"plaintext"};this.applyStyles(n,this.cueDiv),this.div=t.document.createElement("div"),n={direction:function(t){var e=[],i="";if(!t||!t.childNodes)return"ltr";function s(t,e){for(var i=e.childNodes.length-1;0<=i;i--)t.push(e.childNodes[i])}function r(t){if(!t||!t.length)return null;var e=t.pop(),i=e.textContent||e.innerText;if(i){var n=i.match(/^.*(\n|\r)/);return n?n[t.length=0]:i}return"ruby"===e.tagName?r(t):e.childNodes?(s(t,e),r(t)):void 0}for(s(e,t);i=r(e);)for(var n=0;n<i.length;n++)if(Ri(i.charCodeAt(n)))return"rtl";return"ltr"}(this.cueDiv),writingMode:""===e.vertical?"horizontal-tb":"lr"===e.vertical?"vertical-lr":"vertical-rl",unicodeBidi:"plaintext",textAlign:"middle"===e.align?"center":e.align,font:i.font,whiteSpace:"pre-line",position:"absolute"},this.applyStyles(n),this.div.appendChild(this.cueDiv);var s=0;switch(e.positionAlign){case"start":s=e.position;break;case"middle":s=e.position-e.size/2;break;case"end":s=e.position-e.size}""===e.vertical?this.applyStyles({left:this.formatStyle(s,"%"),width:this.formatStyle(e.size,"%")}):this.applyStyles({top:this.formatStyle(s,"%"),height:this.formatStyle(e.size,"%")}),this.move=function(t){this.applyStyles({top:this.formatStyle(t.top,"px"),bottom:this.formatStyle(t.bottom,"px"),left:this.formatStyle(t.left,"px"),right:this.formatStyle(t.right,"px"),height:this.formatStyle(t.height,"px"),width:this.formatStyle(t.width,"px")})}}function Bi(t){var e,i,n,s;if(t.div){i=t.div.offsetHeight,n=t.div.offsetWidth,s=t.div.offsetTop;var r=(r=t.div.childNodes)&&(r=r[0])&&r.getClientRects&&r.getClientRects();t=t.div.getBoundingClientRect(),e=r?Math.max(r[0]&&r[0].height||0,t.height/r.length):0}this.left=t.left,this.right=t.right,this.top=t.top||s,this.height=t.height||i,this.bottom=t.bottom||s+(t.height||i),this.width=t.width||n,this.lineHeight=void 0!==e?e:t.lineHeight}function Hi(t,e,o,l){var i=new Bi(e),n=e.cue,s=function(t){if("number"==typeof t.line&&(t.snapToLines||0<=t.line&&t.line<=100))return t.line;if(!t.track||!t.track.textTrackList||!t.track.textTrackList.mediaElement)return-1;for(var e=t.track,i=e.textTrackList,n=0,s=0;s<i.length&&i[s]!==e;s++)"showing"===i[s].mode&&n++;return-1*++n}(n),r=[];if(n.snapToLines){var a;switch(n.vertical){case"":r=["+y","-y"],a="height";break;case"rl":r=["+x","-x"],a="width";break;case"lr":r=["-x","+x"],a="width"}var c=i.lineHeight,u=c*Math.round(s),h=o[a]+c,d=r[0];Math.abs(u)>h&&(u=u<0?-1:1,u*=Math.ceil(h/c)*c),s<0&&(u+=""===n.vertical?o.height:o.width,r=r.reverse()),i.move(d,u)}else{var p=i.lineHeight/o.height*100;switch(n.lineAlign){case"middle":s-=p/2;break;case"end":s-=p}switch(n.vertical){case"":e.applyStyles({top:e.formatStyle(s,"%")});break;case"rl":e.applyStyles({left:e.formatStyle(s,"%")});break;case"lr":e.applyStyles({right:e.formatStyle(s,"%")})}r=["+y","-x","+x","-y"],i=new Bi(e)}var f=function(t,e){for(var i,n=new Bi(t),s=1,r=0;r<e.length;r++){for(;t.overlapsOppositeAxis(o,e[r])||t.within(o)&&t.overlapsAny(l);)t.move(e[r]);if(t.within(o))return t;var a=t.intersectPercentage(o);a<s&&(i=new Bi(t),s=a),t=new Bi(n)}return i||n}(i,r);e.move(f.toCSSCompatValues(o))}function Fi(){}Ui.prototype.applyStyles=function(t,e){for(var i in e=e||this.div,t)t.hasOwnProperty(i)&&(e.style[i]=t[i])},Ui.prototype.formatStyle=function(t,e){return 0===t?0:t+e},(ji.prototype=ki(Ui.prototype)).constructor=ji,Bi.prototype.move=function(t,e){switch(e=void 0!==e?e:this.lineHeight,t){case"+x":this.left+=e,this.right+=e;break;case"-x":this.left-=e,this.right-=e;break;case"+y":this.top+=e,this.bottom+=e;break;case"-y":this.top-=e,this.bottom-=e}},Bi.prototype.overlaps=function(t){return this.left<t.right&&this.right>t.left&&this.top<t.bottom&&this.bottom>t.top},Bi.prototype.overlapsAny=function(t){for(var e=0;e<t.length;e++)if(this.overlaps(t[e]))return!0;return!1},Bi.prototype.within=function(t){return this.top>=t.top&&this.bottom<=t.bottom&&this.left>=t.left&&this.right<=t.right},Bi.prototype.overlapsOppositeAxis=function(t,e){switch(e){case"+x":return this.left<t.left;case"-x":return this.right>t.right;case"+y":return this.top<t.top;case"-y":return this.bottom>t.bottom}},Bi.prototype.intersectPercentage=function(t){return Math.max(0,Math.min(this.right,t.right)-Math.max(this.left,t.left))*Math.max(0,Math.min(this.bottom,t.bottom)-Math.max(this.top,t.top))/(this.height*this.width)},Bi.prototype.toCSSCompatValues=function(t){return{top:this.top-t.top,bottom:t.bottom-this.bottom,left:this.left-t.left,right:t.right-this.right,height:this.height,width:this.width}},Bi.getSimpleBoxPosition=function(t){var e=t.div?t.div.offsetHeight:t.tagName?t.offsetHeight:0,i=t.div?t.div.offsetWidth:t.tagName?t.offsetWidth:0,n=t.div?t.div.offsetTop:t.tagName?t.offsetTop:0;return{left:(t=t.div?t.div.getBoundingClientRect():t.tagName?t.getBoundingClientRect():t).left,right:t.right,top:t.top||n,height:t.height||e,bottom:t.bottom||n+(t.height||e),width:t.width||i}},Fi.StringDecoder=function(){return{decode:function(t){if(!t)return"";if("string"!=typeof t)throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(t))}}},Fi.convertCueToDOMTree=function(t,e){return t&&e?Mi(t,e):null};Fi.processCues=function(n,s,t){if(!n||!s||!t)return null;for(;t.firstChild;)t.removeChild(t.firstChild);var r=n.document.createElement("div");if(r.style.position="absolute",r.style.left="0",r.style.right="0",r.style.top="0",r.style.bottom="0",r.style.margin="1.5%",t.appendChild(r),function(t){for(var e=0;e<t.length;e++)if(t[e].hasBeenReset||!t[e].displayState)return!0;return!1}(s)){var a=[],o=Bi.getSimpleBoxPosition(r),l={font:Math.round(.05*o.height*100)/100+"px sans-serif"};!function(){for(var t,e,i=0;i<s.length;i++)e=s[i],t=new ji(n,e,l),r.appendChild(t.div),Hi(0,t,o,a),e.displayState=t.div,a.push(Bi.getSimpleBoxPosition(t))}()}else for(var e=0;e<s.length;e++)r.appendChild(s[e].displayState)},(Fi.Parser=function(t,e,i){i||(i=e,e={}),e=e||{},this.window=t,this.vttjs=e,this.state="INITIAL",this.buffer="",this.decoder=i||new TextDecoder("utf8"),this.regionList=[]}).prototype={reportOrThrowError:function(t){if(!(t instanceof Ci))throw t;this.onparsingerror&&this.onparsingerror(t)},parse:function(t){var n=this;function e(){for(var t=n.buffer,e=0;e<t.length&&"\r"!==t[e]&&"\n"!==t[e];)++e;var i=t.substr(0,e);return"\r"===t[e]&&++e,"\n"===t[e]&&++e,n.buffer=t.substr(e),i}function i(t){t.match(/X-TIMESTAMP-MAP/)?Di(t,function(t,e){switch(t){case"X-TIMESTAMP-MAP":!function(t){var i=new Ei;Di(t,function(t,e){switch(t){case"MPEGT":i.integer(t+"S",e);break;case"LOCA":i.set(t+"L",xi(e))}},/[^\d]:/,/,/),n.ontimestampmap&&n.ontimestampmap({MPEGTS:i.get("MPEGTS"),LOCAL:i.get("LOCAL")})}(e)}},/=/):Di(t,function(t,e){switch(t){case"Region":!function(t){var s=new Ei;if(Di(t,function(t,e){switch(t){case"id":s.set(t,e);break;case"width":s.percent(t,e);break;case"lines":s.integer(t,e);break;case"regionanchor":case"viewportanchor":var i=e.split(",");if(2!==i.length)break;var n=new Ei;if(n.percent("x",i[0]),n.percent("y",i[1]),!n.has("x")||!n.has("y"))break;s.set(t+"X",n.get("x")),s.set(t+"Y",n.get("y"));break;case"scroll":s.alt(t,e,["up"])}},/=/,/\s/),s.has("id")){var e=new(n.vttjs.VTTRegion||n.window.VTTRegion);e.width=s.get("width",100),e.lines=s.get("lines",3),e.regionAnchorX=s.get("regionanchorX",0),e.regionAnchorY=s.get("regionanchorY",100),e.viewportAnchorX=s.get("viewportanchorX",0),e.viewportAnchorY=s.get("viewportanchorY",100),e.scroll=s.get("scroll",""),n.onregion&&n.onregion(e),n.regionList.push({id:s.get("id"),region:e})}}(e)}},/:/)}t&&(n.buffer+=n.decoder.decode(t,{stream:!0}));try{var s;if("INITIAL"===n.state){if(!/\r\n|\n/.test(n.buffer))return this;var r=(s=e()).match(/^WEBVTT([ \t].*)?$/);if(!r||!r[0])throw new Ci(Ci.Errors.BadSignature);n.state="HEADER"}for(var a=!1;n.buffer;){if(!/\r\n|\n/.test(n.buffer))return this;switch(a?a=!1:s=e(),n.state){case"HEADER":/:/.test(s)?i(s):s||(n.state="ID");continue;case"NOTE":s||(n.state="ID");continue;case"ID":if(/^NOTE($|[ \t])/.test(s)){n.state="NOTE";break}if(!s)continue;if(n.cue=new(n.vttjs.VTTCue||n.window.VTTCue)(0,0,""),n.state="CUE",-1===s.indexOf("--\x3e")){n.cue.id=s;continue}case"CUE":try{Ai(s,n.cue,n.regionList)}catch(t){n.reportOrThrowError(t),n.cue=null,n.state="BADCUE";continue}n.state="CUETEXT";continue;case"CUETEXT":var o=-1!==s.indexOf("--\x3e");if(!s||o&&(a=!0)){n.oncue&&n.oncue(n.cue),n.cue=null,n.state="ID";continue}n.cue.text&&(n.cue.text+="\n"),n.cue.text+=s;continue;case"BADCUE":s||(n.state="ID");continue}}}catch(t){n.reportOrThrowError(t),"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 e=this;try{if(e.buffer+=e.decoder.decode(),!e.cue&&"HEADER"!==e.state||(e.buffer+="\n\n",e.parse()),"INITIAL"===e.state)throw new Ci(Ci.Errors.BadSignature)}catch(t){e.reportOrThrowError(t)}return e.onflush&&e.onflush(),this}};var zi=Fi,Wi={"":1,lr:1,rl:1},$i={start:1,middle:1,end:1,left:1,right:1};function qi(t){return"string"==typeof t&&(!!$i[t.toLowerCase()]&&t.toLowerCase())}function Vi(t,e,i){this.hasBeenReset=!1;var n="",s=!1,r=t,a=e,o=i,l=null,c="",u=!0,h="auto",d="start",p=50,f="middle",m=50,g="middle";Object.defineProperties(this,{id:{enumerable:!0,get:function(){return n},set:function(t){n=""+t}},pauseOnExit:{enumerable:!0,get:function(){return s},set:function(t){s=!!t}},startTime:{enumerable:!0,get:function(){return r},set:function(t){if("number"!=typeof t)throw new TypeError("Start time must be set to a number.");r=t,this.hasBeenReset=!0}},endTime:{enumerable:!0,get:function(){return a},set:function(t){if("number"!=typeof t)throw new TypeError("End time must be set to a number.");a=t,this.hasBeenReset=!0}},text:{enumerable:!0,get:function(){return o},set:function(t){o=""+t,this.hasBeenReset=!0}},region:{enumerable:!0,get:function(){return l},set:function(t){l=t,this.hasBeenReset=!0}},vertical:{enumerable:!0,get:function(){return c},set:function(t){var e=function(t){return"string"==typeof t&&(!!Wi[t.toLowerCase()]&&t.toLowerCase())}(t);if(!1===e)throw new SyntaxError("An invalid or illegal string was specified.");c=e,this.hasBeenReset=!0}},snapToLines:{enumerable:!0,get:function(){return u},set:function(t){u=!!t,this.hasBeenReset=!0}},line:{enumerable:!0,get:function(){return h},set:function(t){if("number"!=typeof t&&"auto"!==t)throw new SyntaxError("An invalid number or illegal string was specified.");h=t,this.hasBeenReset=!0}},lineAlign:{enumerable:!0,get:function(){return d},set:function(t){var e=qi(t);if(!e)throw new SyntaxError("An invalid or illegal string was specified.");d=e,this.hasBeenReset=!0}},position:{enumerable:!0,get:function(){return p},set:function(t){if(t<0||100<t)throw new Error("Position must be between 0 and 100.");p=t,this.hasBeenReset=!0}},positionAlign:{enumerable:!0,get:function(){return f},set:function(t){var e=qi(t);if(!e)throw new SyntaxError("An invalid or illegal string was specified.");f=e,this.hasBeenReset=!0}},size:{enumerable:!0,get:function(){return m},set:function(t){if(t<0||100<t)throw new Error("Size must be between 0 and 100.");m=t,this.hasBeenReset=!0}},align:{enumerable:!0,get:function(){return g},set:function(t){var e=qi(t);if(!e)throw new SyntaxError("An invalid or illegal string was specified.");g=e,this.hasBeenReset=!0}}}),this.displayState=void 0}Vi.prototype.getCueAsHTML=function(){return WebVTT.convertCueToDOMTree(window,this.text)};var Yi=Vi,Gi={"":!0,up:!0};function Xi(t){return"number"==typeof t&&0<=t&&t<=100}function Ki(){var e=100,i=3,n=0,s=100,r=0,a=100,o="";Object.defineProperties(this,{width:{enumerable:!0,get:function(){return e},set:function(t){if(!Xi(t))throw new Error("Width must be between 0 and 100.");e=t}},lines:{enumerable:!0,get:function(){return i},set:function(t){if("number"!=typeof t)throw new TypeError("Lines must be set to a number.");i=t}},regionAnchorY:{enumerable:!0,get:function(){return s},set:function(t){if(!Xi(t))throw new Error("RegionAnchorX must be between 0 and 100.");s=t}},regionAnchorX:{enumerable:!0,get:function(){return n},set:function(t){if(!Xi(t))throw new Error("RegionAnchorY must be between 0 and 100.");n=t}},viewportAnchorY:{enumerable:!0,get:function(){return a},set:function(t){if(!Xi(t))throw new Error("ViewportAnchorY must be between 0 and 100.");a=t}},viewportAnchorX:{enumerable:!0,get:function(){return r},set:function(t){if(!Xi(t))throw new Error("ViewportAnchorX must be between 0 and 100.");r=t}},scroll:{enumerable:!0,get:function(){return o},set:function(t){var e=function(t){return"string"==typeof t&&(!!Gi[t.toLowerCase()]&&t.toLowerCase())}(t);if(!1===e)throw new SyntaxError("An invalid or illegal string was specified.");o=e}}})}var Qi=Qe(function(t){var e=t.exports={WebVTT:zi,VTTCue:Yi,VTTRegion:Ki};y.vttjs=e,y.WebVTT=e.WebVTT;var i=e.VTTCue,n=e.VTTRegion,s=y.VTTCue,r=y.VTTRegion;e.shim=function(){y.VTTCue=i,y.VTTRegion=n},e.restore=function(){y.VTTCue=s,y.VTTRegion=r},y.VTTCue||e.shim()});Qi.WebVTT,Qi.VTTCue,Qi.VTTRegion;var Ji=function(e){function i(i,t){var n;return void 0===i&&(i={}),void 0===t&&(t=function(){}),i.reportTouchActivity=!1,(n=e.call(this,null,i,t)||this).hasStarted_=!1,n.on("playing",function(){this.hasStarted_=!0}),n.on("loadstart",function(){this.hasStarted_=!1}),wi.names.forEach(function(t){var e=wi[t];i&&i[e.getterName]&&(n[e.privateName]=i[e.getterName])}),n.featuresProgressEvents||n.manualProgressOn(),n.featuresTimeupdateEvents||n.manualTimeUpdatesOn(),["Text","Audio","Video"].forEach(function(t){!1===i["native"+t+"Tracks"]&&(n["featuresNative"+t+"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.autoRemoteTextTracks_=new wi.text.ListClass,n.initTrackListeners(),i.nativeControlsForTouch||n.emitTapEvents(),n.constructor&&(n.name_=n.constructor.name||"Unknown Tech"),n}p(i,e);var t=i.prototype;return t.triggerSourceset=function(t){var e=this;this.isReady_||this.one("ready",function(){return e.setTimeout(function(){return e.triggerSourceset(t)},1)}),this.trigger({src:t,type:"sourceset"})},t.manualProgressOn=function(){this.on("durationchange",this.onDurationChange),this.manualProgress=!0,this.one("ready",this.trackProgress)},t.manualProgressOff=function(){this.manualProgress=!1,this.stopTrackingProgress(),this.off("durationchange",this.onDurationChange)},t.trackProgress=function(){this.stopTrackingProgress(),this.progressInterval=this.setInterval(Tt(this,function(){var t=this.bufferedPercent();this.bufferedPercent_!==t&&this.trigger("progress"),1===(this.bufferedPercent_=t)&&this.stopTrackingProgress()}),500)},t.onDurationChange=function(){this.duration_=this.duration()},t.buffered=function(){return de(0,0)},t.bufferedPercent=function(){return pe(this.buffered(),this.duration_)},t.stopTrackingProgress=function(){this.clearInterval(this.progressInterval)},t.manualTimeUpdatesOn=function(){this.manualTimeUpdates=!0,this.on("play",this.trackCurrentTime),this.on("pause",this.stopTrackingCurrentTime)},t.manualTimeUpdatesOff=function(){this.manualTimeUpdates=!1,this.stopTrackingCurrentTime(),this.off("play",this.trackCurrentTime),this.off("pause",this.stopTrackingCurrentTime)},t.trackCurrentTime=function(){this.currentTimeInterval&&this.stopTrackingCurrentTime(),this.currentTimeInterval=this.setInterval(function(){this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})},250)},t.stopTrackingCurrentTime=function(){this.clearInterval(this.currentTimeInterval),this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})},t.dispose=function(){this.clearTracks(bi.names),this.manualProgress&&this.manualProgressOff(),this.manualTimeUpdates&&this.manualTimeUpdatesOff(),e.prototype.dispose.call(this)},t.clearTracks=function(t){var s=this;(t=[].concat(t)).forEach(function(t){for(var e=s[t+"Tracks"]()||[],i=e.length;i--;){var n=e[i];"text"===t&&s.removeRemoteTextTrack(n),e.removeTrack(n)}})},t.cleanupAutoTextTracks=function(){for(var t=this.autoRemoteTextTracks_||[],e=t.length;e--;){var i=t[e];this.removeRemoteTextTrack(i)}},t.reset=function(){},t.error=function(t){return void 0!==t&&(this.error_=new be(t),this.trigger("error")),this.error_},t.played=function(){return this.hasStarted_?de(0,0):de()},t.setCurrentTime=function(){this.manualTimeUpdates&&this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})},t.initTrackListeners=function(){var s=this;bi.names.forEach(function(t){function e(){s.trigger(t+"trackchange")}var i=bi[t],n=s[i.getterName]();n.addEventListener("removetrack",e),n.addEventListener("addtrack",e),s.on("dispose",function(){n.removeEventListener("removetrack",e),n.removeEventListener("addtrack",e)})})},t.addWebVttScript_=function(){var t=this;if(!y.WebVTT)if(d.body.contains(this.el())){if(!this.options_["vtt.js"]&&u(Qi)&&0<Object.keys(Qi).length)return void this.trigger("vttjsloaded");var e=d.createElement("script");e.src=this.options_["vtt.js"]||"https://vjs.zencdn.net/vttjs/0.14.1/vtt.min.js",e.onload=function(){t.trigger("vttjsloaded")},e.onerror=function(){t.trigger("vttjserror")},this.on("dispose",function(){e.onload=null,e.onerror=null}),y.WebVTT=!0,this.el().parentNode.appendChild(e)}else this.ready(this.addWebVttScript_)},t.emulateTextTracks=function(){function e(t){return n.addTrack(t.track)}function i(t){return n.removeTrack(t.track)}var t=this,n=this.textTracks(),s=this.remoteTextTracks();s.on("addtrack",e),s.on("removetrack",i),this.addWebVttScript_();function r(){return t.trigger("texttrackchange")}function a(){r();for(var t=0;t<n.length;t++){var e=n[t];e.removeEventListener("cuechange",r),"showing"===e.mode&&e.addEventListener("cuechange",r)}}a(),n.addEventListener("change",a),n.addEventListener("addtrack",a),n.addEventListener("removetrack",a),this.on("dispose",function(){s.off("addtrack",e),s.off("removetrack",i),n.removeEventListener("change",a),n.removeEventListener("addtrack",a),n.removeEventListener("removetrack",a);for(var t=0;t<n.length;t++){n[t].removeEventListener("cuechange",r)}})},t.addTextTrack=function(t,e,i){if(!t)throw new Error("TextTrack kind is required but was not provided");return function(t,e,i,n,s){void 0===s&&(s={});var r=t.textTracks();s.kind=e,i&&(s.label=i),n&&(s.language=n),s.tech=t;var a=new wi.text.TrackClass(s);return r.addTrack(a),a}(this,t,e,i)},t.createRemoteTextTrack=function(t){var e=jt(t,{tech:this});return new Ti.remoteTextEl.TrackClass(e)},t.addRemoteTextTrack=function(t,e){var i=this;void 0===t&&(t={});var n=this.createRemoteTextTrack(t);return!0!==e&&!1!==e&&(m.warn('Calling addRemoteTextTrack without explicitly setting the "manualCleanup" parameter to `true` is deprecated and default to `false` in future version of video.js'),e=!0),this.remoteTextTrackEls().addTrackElement_(n),this.remoteTextTracks().addTrack(n.track),!0!==e&&this.ready(function(){return i.autoRemoteTextTracks_.addTrack(n.track)}),n},t.removeRemoteTextTrack=function(t){var e=this.remoteTextTrackEls().getTrackElementByTrack_(t);this.remoteTextTrackEls().removeTrackElement_(e),this.remoteTextTracks().removeTrack(t),this.autoRemoteTextTracks_.removeTrack(t)},t.getVideoPlaybackQuality=function(){return{}},t.setPoster=function(){},t.playsinline=function(){},t.setPlaysinline=function(){},t.overrideNativeAudioTracks=function(){},t.overrideNativeVideoTracks=function(){},t.canPlayType=function(){return""},i.canPlayType=function(){return""},i.canPlaySource=function(t){return i.canPlayType(t.type)},i.isTech=function(t){return t.prototype instanceof i||t instanceof i||t===i},i.registerTech=function(t,e){if(i.techs_||(i.techs_={}),!i.isTech(e))throw new Error("Tech "+t+" 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 t=Ut(t),i.techs_[t]=e,"Tech"!==t&&i.defaultTechOrder_.push(t),e},i.getTech=function(t){if(t)return t=Ut(t),i.techs_&&i.techs_[t]?i.techs_[t]:y&&y.videojs&&y.videojs[t]?(m.warn("The "+t+" tech was added to the videojs object when it should be registered using videojs.registerTech(name, tech)"),y.videojs[t]):void 0},i}(Bt);wi.names.forEach(function(t){var e=wi[t];Ji.prototype[e.getterName]=function(){return this[e.privateName]=this[e.privateName]||new e.ListClass,this[e.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(s){s.registerSourceHandler=function(t,e){var i=s.sourceHandlers;i=i||(s.sourceHandlers=[]),void 0===e&&(e=i.length),i.splice(e,0,t)},s.canPlayType=function(t){for(var e,i=s.sourceHandlers||[],n=0;n<i.length;n++)if(e=i[n].canPlayType(t))return e;return""},s.selectSourceHandler=function(t,e){for(var i=s.sourceHandlers||[],n=0;n<i.length;n++)if(i[n].canHandleSource(t,e))return i[n];return null},s.canPlaySource=function(t,e){var i=s.selectSourceHandler(t,e);return i?i.canHandleSource(t,e):""};["seekable","seeking","duration"].forEach(function(t){var e=this[t];"function"==typeof e&&(this[t]=function(){return this.sourceHandler_&&this.sourceHandler_[t]?this.sourceHandler_[t].apply(this.sourceHandler_,arguments):e.apply(this,arguments)})},s.prototype),s.prototype.setSource=function(t){var e=s.selectSourceHandler(t,this.options_);e||(s.nativeSourceHandler?e=s.nativeSourceHandler:m.error("No source handler found for the current source.")),this.disposeSourceHandler(),this.off("dispose",this.disposeSourceHandler),e!==s.nativeSourceHandler&&(this.currentSource_=t),this.sourceHandler_=e.handleSource(t,this,this.options_),this.on("dispose",this.disposeSourceHandler)},s.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)}},Bt.registerComponent("Tech",Ji),Ji.registerTech("Tech",Ji),Ji.defaultTechOrder_=[];var Zi={},tn={},en={};function nn(t,e,i){t.setTimeout(function(){return function i(n,t,s,r,a,o){void 0===n&&(n={});void 0===t&&(t=[]);void 0===a&&(a=[]);void 0===o&&(o=!1);var e=t,l=e[0],c=e.slice(1);if("string"==typeof l)i(n,Zi[l],s,r,a,o);else if(l){var u=cn(r,l);if(!u.setSource)return a.push(u),i(n,c,s,r,a,o);u.setSource(_({},n),function(t,e){if(t)return i(n,c,s,r,a,o);a.push(u),i(e,n.type===e.type?c:Zi[e.type],s,r,a,o)})}else c.length?i(n,c,s,r,a,o):o?s(n,a):i(n,Zi["*"],s,r,a,!0)}(e,Zi[e.type],i,t)},1)}function sn(t,e,i,n){void 0===n&&(n=null);var s="call"+Ut(i),r=t.reduce(ln(s),n),a=r===en,o=a?null:e[i](r);return function(t,e,i,n){for(var s=t.length-1;0<=s;s--){var r=t[s];r[e]&&r[e](n,i)}}(t,i,o,a),o}var rn={buffered:1,currentTime:1,duration:1,seekable:1,played:1,paused:1},an={setCurrentTime:1},on={play:1,pause:1};function ln(i){return function(t,e){return t===en?en:e[i]?e[i](t):t}}function cn(t,e){var i=tn[t.id()],n=null;if(null==i)return n=e(t),tn[t.id()]=[[e,n]],n;for(var s=0;s<i.length;s++){var r=i[s],a=r[0],o=r[1];a===e&&(n=o)}return null===n&&(n=e(t),i.push([e,n])),n}function un(t){void 0===t&&(t="");var e=Re(t);return hn[e.toLowerCase()]||""}var hn={opus:"video/ogg",ogv:"video/ogg",mp4:"video/mp4",mov:"video/mp4",m4v:"video/mp4",mkv:"video/x-matroska",mp3:"audio/mpeg",aac:"audio/aac",oga:"audio/ogg",m3u8:"application/x-mpegURL"};function dn(t){var e=un(t.src);return!t.type&&e&&(t.type=e),t}var pn=function(c){function t(t,e,i){var n,s=jt({createEl:!1},e);if(n=c.call(this,t,s,i)||this,e.playerOptions.sources&&0!==e.playerOptions.sources.length)t.src(e.playerOptions.sources);else for(var r=0,a=e.playerOptions.techOrder;r<a.length;r++){var o=Ut(a[r]),l=Ji.getTech(o);if(o||(l=Bt.getComponent(o)),l&&l.isSupported()){t.loadTech_(o);break}}return n}return p(t,c),t}(Bt);Bt.registerComponent("MediaLoader",pn);var fn=function(s){function t(t,e){var i;return(i=s.call(this,t,e)||this).emitTapEvents(),i.enable(),i}p(t,s);var e=t.prototype;return e.createEl=function(t,e,i){void 0===t&&(t="div"),void 0===e&&(e={}),void 0===i&&(i={}),e=_({innerHTML:'<span aria-hidden="true" class="vjs-icon-placeholder"></span>',className:this.buildCSSClass(),tabIndex:0},e),"button"===t&&m.error("Creating a ClickableComponent with an HTML element of "+t+" is not supported; use a Button instead."),i=_({role:"button"},i),this.tabIndex_=e.tabIndex;var n=s.prototype.createEl.call(this,t,e,i);return this.createControlTextEl(n),n},e.dispose=function(){this.controlTextEl_=null,s.prototype.dispose.call(this)},e.createControlTextEl=function(t){return this.controlTextEl_=x("span",{className:"vjs-control-text"},{"aria-live":"polite"}),t&&t.appendChild(this.controlTextEl_),this.controlText(this.controlText_,t),this.controlTextEl_},e.controlText=function(t,e){if(void 0===e&&(e=this.el()),void 0===t)return this.controlText_||"Need Text";var i=this.localize(t);this.controlText_=t,E(this.controlTextEl_,i),this.nonIconControl||e.setAttribute("title",i)},e.buildCSSClass=function(){return"vjs-control vjs-button "+s.prototype.buildCSSClass.call(this)},e.enable=function(){this.enabled_||(this.enabled_=!0,this.removeClass("vjs-disabled"),this.el_.setAttribute("aria-disabled","false"),void 0!==this.tabIndex_&&this.el_.setAttribute("tabIndex",this.tabIndex_),this.on(["tap","click"],this.handleClick),this.on("focus",this.handleFocus),this.on("blur",this.handleBlur))},e.disable=function(){this.enabled_=!1,this.addClass("vjs-disabled"),this.el_.setAttribute("aria-disabled","true"),void 0!==this.tabIndex_&&this.el_.removeAttribute("tabIndex"),this.off(["tap","click"],this.handleClick),this.off("focus",this.handleFocus),this.off("blur",this.handleBlur)},e.handleClick=function(){},e.handleFocus=function(){ut(d,"keydown",Tt(this,this.handleKeyPress))},e.handleKeyPress=function(t){32===t.which||13===t.which?(t.preventDefault(),this.trigger("click")):s.prototype.handleKeyPress&&s.prototype.handleKeyPress.call(this,t)},e.handleBlur=function(){ht(d,"keydown",Tt(this,this.handleKeyPress))},t}(Bt);Bt.registerComponent("ClickableComponent",fn);var mn=function(n){function t(t,e){var i;return(i=n.call(this,t,e)||this).update(),t.on("posterchange",Tt(f(f(i)),i.update)),i}p(t,n);var e=t.prototype;return e.dispose=function(){this.player().off("posterchange",this.update),n.prototype.dispose.call(this)},e.createEl=function(){return x("div",{className:"vjs-poster",tabIndex:-1})},e.update=function(){var t=this.player().poster();this.setSrc(t),t?this.show():this.hide()},e.setSrc=function(t){var e="";t&&(e='url("'+t+'")'),this.el_.style.backgroundImage=e},e.handleClick=function(){this.player_.controls()&&(this.player_.paused()?Se(this.player_.play()):this.player_.pause())},t}(fn);Bt.registerComponent("PosterImage",mn);var gn={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 vn(t,e){var i;if(4===t.length)i=t[1]+t[1]+t[2]+t[2]+t[3]+t[3];else{if(7!==t.length)throw new Error("Invalid color code provided, "+t+"; must be formatted as e.g. #f0e or #f604e2.");i=t.slice(1)}return"rgba("+parseInt(i.slice(0,2),16)+","+parseInt(i.slice(2,4),16)+","+parseInt(i.slice(4,6),16)+","+e+")"}function yn(t,e,i){try{t.style[e]=i}catch(t){return}}var _n=function(r){function t(i,t,e){var n;n=r.call(this,i,t,e)||this;var s=Tt(f(f(n)),n.updateDisplay);return i.on("loadstart",Tt(f(f(n)),n.toggleDisplay)),i.on("texttrackchange",s),i.on("loadedmetadata",Tt(f(f(n)),n.preselectTrack)),i.ready(Tt(f(f(n)),function(){if(i.tech_&&i.tech_.featuresNativeTextTracks)this.hide();else{i.on("fullscreenchange",s),i.on("playerresize",s),y.addEventListener("orientationchange",s),i.on("dispose",function(){return y.removeEventListener("orientationchange",s)});for(var t=this.options_.playerOptions.tracks||[],e=0;e<t.length;e++)this.player_.addRemoteTextTrack(t[e],!0);this.preselectTrack()}})),n}p(t,r);var e=t.prototype;return e.preselectTrack=function(){for(var t,e,i,n={captions:1,subtitles:1},s=this.player_.textTracks(),r=this.player_.cache_.selectedLanguage,a=0;a<s.length;a++){var o=s[a];r&&r.enabled&&r.language&&r.language===o.language&&o.kind in n?i=o.kind===r.kind?o:i||o:r&&!r.enabled?e=t=i=null:o.default&&("descriptions"!==o.kind||t?o.kind in n&&!e&&(e=o):t=o)}i?i.mode="showing":e?e.mode="showing":t&&(t.mode="showing")},e.toggleDisplay=function(){this.player_.tech_&&this.player_.tech_.featuresNativeTextTracks?this.hide():this.show()},e.createEl=function(){return r.prototype.createEl.call(this,"div",{className:"vjs-text-track-display"},{"aria-live":"off","aria-atomic":"true"})},e.clearDisplay=function(){"function"==typeof y.WebVTT&&y.WebVTT.processCues(y,[],this.el_)},e.updateDisplay=function(){var t=this.player_.textTracks();this.clearDisplay();for(var e=null,i=null,n=t.length;n--;){var s=t[n];"showing"===s.mode&&("descriptions"===s.kind?e=s:i=s)}i?("off"!==this.getAttribute("aria-live")&&this.setAttribute("aria-live","off"),this.updateForTrack(i)):e&&("assertive"!==this.getAttribute("aria-live")&&this.setAttribute("aria-live","assertive"),this.updateForTrack(e))},e.updateForTrack=function(t){if("function"==typeof y.WebVTT&&t.activeCues){for(var e=[],i=0;i<t.activeCues.length;i++)e.push(t.activeCues[i]);if(y.WebVTT.processCues(y,e,this.el_),this.player_.textTrackSettings)for(var n=this.player_.textTrackSettings.getValues(),s=e.length;s--;){var r=e[s];if(r){var a=r.displayState;if(n.color&&(a.firstChild.style.color=n.color),n.textOpacity&&yn(a.firstChild,"color",vn(n.color||"#fff",n.textOpacity)),n.backgroundColor&&(a.firstChild.style.backgroundColor=n.backgroundColor),n.backgroundOpacity&&yn(a.firstChild,"backgroundColor",vn(n.backgroundColor||"#000",n.backgroundOpacity)),n.windowColor&&(n.windowOpacity?yn(a,"backgroundColor",vn(n.windowColor,n.windowOpacity)):a.style.backgroundColor=n.windowColor),n.edgeStyle&&("dropshadow"===n.edgeStyle?a.firstChild.style.textShadow="2px 2px 3px #222, 2px 2px 4px #222, 2px 2px 5px #222":"raised"===n.edgeStyle?a.firstChild.style.textShadow="1px 1px #222, 2px 2px #222, 3px 3px #222":"depressed"===n.edgeStyle?a.firstChild.style.textShadow="1px 1px #ccc, 0 1px #ccc, -1px -1px #222, 0 -1px #222":"uniform"===n.edgeStyle&&(a.firstChild.style.textShadow="0 0 4px #222, 0 0 4px #222, 0 0 4px #222, 0 0 4px #222")),n.fontPercent&&1!==n.fontPercent){var o=y.parseFloat(a.style.fontSize);a.style.fontSize=o*n.fontPercent+"px",a.style.height="auto",a.style.top="auto",a.style.bottom="2px"}n.fontFamily&&"default"!==n.fontFamily&&("small-caps"===n.fontFamily?a.firstChild.style.fontVariant="small-caps":a.firstChild.style.fontFamily=gn[n.fontFamily])}}}},t}(Bt);Bt.registerComponent("TextTrackDisplay",_n);var bn=function(s){function t(){return s.apply(this,arguments)||this}return p(t,s),t.prototype.createEl=function(){var t=this.player_.isAudio(),e=this.localize(t?"Audio Player":"Video Player"),i=x("span",{className:"vjs-control-text",innerHTML:this.localize("{1} is loading.",[e])}),n=s.prototype.createEl.call(this,"div",{className:"vjs-loading-spinner",dir:"ltr"});return n.appendChild(i),n},t}(Bt);Bt.registerComponent("LoadingSpinner",bn);var Tn=function(e){function t(){return e.apply(this,arguments)||this}p(t,e);var i=t.prototype;return i.createEl=function(t,e,i){void 0===e&&(e={}),void 0===i&&(i={}),e=_({innerHTML:'<span aria-hidden="true" class="vjs-icon-placeholder"></span>',className:this.buildCSSClass()},e),i=_({type:"button"},i);var n=Bt.prototype.createEl.call(this,"button",e,i);return this.createControlTextEl(n),n},i.addChild=function(t,e){void 0===e&&(e={});var i=this.constructor.name;return m.warn("Adding an actionable (user controllable) child to a Button ("+i+") is not supported; use a ClickableComponent instead."),Bt.prototype.addChild.call(this,t,e)},i.enable=function(){e.prototype.enable.call(this),this.el_.removeAttribute("disabled")},i.disable=function(){e.prototype.disable.call(this),this.el_.setAttribute("disabled","disabled")},i.handleKeyPress=function(t){32!==t.which&&13!==t.which&&e.prototype.handleKeyPress.call(this,t)},t}(fn);Bt.registerComponent("Button",Tn);var wn=function(n){function t(t,e){var i;return(i=n.call(this,t,e)||this).mouseused_=!1,i.on("mousedown",i.handleMouseDown),i}p(t,n);var e=t.prototype;return e.buildCSSClass=function(){return"vjs-big-play-button"},e.handleClick=function(t){var e=this.player_.play();if(this.mouseused_&&t.clientX&&t.clientY)Se(e);else{var i=this.player_.getChild("controlBar"),n=i&&i.getChild("playToggle");if(n){function s(){return n.focus()}ke(e)?e.then(s,function(){}):this.setTimeout(s,1)}else this.player_.focus()}},e.handleKeyPress=function(t){this.mouseused_=!1,n.prototype.handleKeyPress.call(this,t)},e.handleMouseDown=function(){this.mouseused_=!0},t}(Tn);wn.prototype.controlText_="Play Video",Bt.registerComponent("BigPlayButton",wn);var kn=function(n){function t(t,e){var i;return(i=n.call(this,t,e)||this).controlText(e&&e.controlText||i.localize("Close")),i}p(t,n);var e=t.prototype;return e.buildCSSClass=function(){return"vjs-close-button "+n.prototype.buildCSSClass.call(this)},e.handleClick=function(){this.trigger({type:"close",bubbles:!1})},t}(Tn);Bt.registerComponent("CloseButton",kn);var Sn=function(n){function t(t,e){var i;return void 0===e&&(e={}),i=n.call(this,t,e)||this,e.replay=void 0===e.replay||e.replay,i.on(t,"play",i.handlePlay),i.on(t,"pause",i.handlePause),e.replay&&i.on(t,"ended",i.handleEnded),i}p(t,n);var e=t.prototype;return e.buildCSSClass=function(){return"vjs-play-control "+n.prototype.buildCSSClass.call(this)},e.handleClick=function(){this.player_.paused()?this.player_.play():this.player_.pause()},e.handleSeeked=function(t){this.removeClass("vjs-ended"),this.player_.paused()?this.handlePause(t):this.handlePlay(t)},e.handlePlay=function(){this.removeClass("vjs-ended"),this.removeClass("vjs-paused"),this.addClass("vjs-playing"),this.controlText("Pause")},e.handlePause=function(){this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.controlText("Play")},e.handleEnded=function(){this.removeClass("vjs-playing"),this.addClass("vjs-ended"),this.controlText("Replay"),this.one(this.player_,"seeked",this.handleSeeked)},t}(Tn);Sn.prototype.controlText_="Play",Bt.registerComponent("PlayToggle",Sn);function Cn(t,e){t=t<0?0:t;var i=Math.floor(t%60),n=Math.floor(t/60%60),s=Math.floor(t/3600),r=Math.floor(e/60%60),a=Math.floor(e/3600);return!isNaN(t)&&t!==1/0||(s=n=i="-"),(s=0<s||0<a?s+":":"")+(n=((s||10<=r)&&n<10?"0"+n:n)+":")+(i=i<10?"0"+i:i)}var xn=Cn;function En(t,e){return void 0===e&&(e=t),xn(t,e)}var Dn=function(n){function t(t,e){var i;return(i=n.call(this,t,e)||this).throttledUpdateContent=wt(Tt(f(f(i)),i.updateContent),25),i.on(t,"timeupdate",i.throttledUpdateContent),i}p(t,n);var e=t.prototype;return e.createEl=function(){var t=this.buildCSSClass(),e=n.prototype.createEl.call(this,"div",{className:t+" vjs-time-control vjs-control",innerHTML:'<span class="vjs-control-text" role="presentation">'+this.localize(this.labelText_)+" </span>"});return this.contentEl_=x("span",{className:t+"-display"},{"aria-live":"off",role:"presentation"}),this.updateTextNode_(),e.appendChild(this.contentEl_),e},e.dispose=function(){this.contentEl_=null,this.textNode_=null,n.prototype.dispose.call(this)},e.updateTextNode_=function(){if(this.contentEl_){for(;this.contentEl_.firstChild;)this.contentEl_.removeChild(this.contentEl_.firstChild);this.textNode_=d.createTextNode(this.formattedTime_||this.formatTime_(0)),this.contentEl_.appendChild(this.textNode_)}},e.formatTime_=function(t){return En(t)},e.updateFormattedTime_=function(t){var e=this.formatTime_(t);e!==this.formattedTime_&&(this.formattedTime_=e,this.requestAnimationFrame(this.updateTextNode_))},e.updateContent=function(){},t}(Bt);Dn.prototype.labelText_="Time",Dn.prototype.controlText_="Time",Bt.registerComponent("TimeDisplay",Dn);var An=function(n){function t(t,e){var i;return(i=n.call(this,t,e)||this).on(t,"ended",i.handleEnded),i}p(t,n);var e=t.prototype;return e.buildCSSClass=function(){return"vjs-current-time"},e.updateContent=function(){var t=this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime();this.updateFormattedTime_(t)},e.handleEnded=function(){this.player_.duration()&&this.updateFormattedTime_(this.player_.duration())},t}(Dn);An.prototype.labelText_="Current Time",An.prototype.controlText_="Current Time",Bt.registerComponent("CurrentTimeDisplay",An);var In=function(n){function t(t,e){var i;return(i=n.call(this,t,e)||this).on(t,"durationchange",i.updateContent),i.on(t,"loadstart",i.updateContent),i.on(t,"loadedmetadata",i.throttledUpdateContent),i}p(t,n);var e=t.prototype;return e.buildCSSClass=function(){return"vjs-duration"},e.updateContent=function(){var t=this.player_.duration();this.duration_!==t&&(this.duration_=t,this.updateFormattedTime_(t))},t}(Dn);In.prototype.labelText_="Duration",In.prototype.controlText_="Duration",Bt.registerComponent("DurationDisplay",In);var On=function(t){function e(){return t.apply(this,arguments)||this}return p(e,t),e.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-time-control vjs-time-divider",innerHTML:"<div><span>/</span></div>"},{"aria-hidden":!0})},e}(Bt);Bt.registerComponent("TimeDivider",On);var Pn=function(n){function t(t,e){var i;return(i=n.call(this,t,e)||this).on(t,"durationchange",i.throttledUpdateContent),i.on(t,"ended",i.handleEnded),i}p(t,n);var e=t.prototype;return e.buildCSSClass=function(){return"vjs-remaining-time"},e.formatTime_=function(t){return"-"+n.prototype.formatTime_.call(this,t)},e.updateContent=function(){this.player_.duration()&&(this.player_.remainingTimeDisplay?this.updateFormattedTime_(this.player_.remainingTimeDisplay()):this.updateFormattedTime_(this.player_.remainingTime()))},e.handleEnded=function(){this.player_.duration()&&this.updateFormattedTime_(0)},t}(Dn);Pn.prototype.labelText_="Remaining Time",Pn.prototype.controlText_="Remaining Time",Bt.registerComponent("RemainingTimeDisplay",Pn);var Ln=function(n){function t(t,e){var i;return(i=n.call(this,t,e)||this).updateShowing(),i.on(i.player(),"durationchange",i.updateShowing),i}p(t,n);var e=t.prototype;return e.createEl=function(){var t=n.prototype.createEl.call(this,"div",{className:"vjs-live-control vjs-control"});return this.contentEl_=x("div",{className:"vjs-live-display",innerHTML:'<span class="vjs-control-text">'+this.localize("Stream Type")+" </span>"+this.localize("LIVE")},{"aria-live":"off"}),t.appendChild(this.contentEl_),t},e.dispose=function(){this.contentEl_=null,n.prototype.dispose.call(this)},e.updateShowing=function(){this.player().duration()===1/0?this.show():this.hide()},t}(Bt);Bt.registerComponent("LiveDisplay",Ln);var Mn=function(n){function t(t,e){var i;return(i=n.call(this,t,e)||this).updateLiveEdgeStatus(),i.player_.liveTracker&&i.on(i.player_.liveTracker,"liveedgechange",i.updateLiveEdgeStatus),i}p(t,n);var e=t.prototype;return e.createEl=function(){var t=n.prototype.createEl.call(this,"button",{className:"vjs-seek-to-live-control vjs-control"});return this.textEl_=x("span",{className:"vjs-seek-to-live-text",innerHTML:this.localize("LIVE")},{"aria-hidden":"true"}),t.appendChild(this.textEl_),t},e.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"))},e.handleClick=function(){this.player_.liveTracker.seekToLiveEdge()},e.dispose=function(){this.player_.liveTracker&&this.off(this.player_.liveTracker,"liveedgechange",this.updateLiveEdgeStatus),this.textEl_=null,n.prototype.dispose.call(this)},t}(Tn);Mn.prototype.controlText_="Seek to live, currently playing live",Bt.registerComponent("SeekToLive",Mn);var Nn=function(n){function t(t,e){var i;return(i=n.call(this,t,e)||this).bar=i.getChild(i.options_.barName),i.vertical(!!i.options_.vertical),i.enable(),i}p(t,n);var e=t.prototype;return e.enabled=function(){return this.enabled_},e.enable=function(){this.enabled()||(this.on("mousedown",this.handleMouseDown),this.on("touchstart",this.handleMouseDown),this.on("focus",this.handleFocus),this.on("blur",this.handleBlur),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)},e.disable=function(){if(this.enabled()){var t=this.bar.el_.ownerDocument;this.off("mousedown",this.handleMouseDown),this.off("touchstart",this.handleMouseDown),this.off("focus",this.handleFocus),this.off("blur",this.handleBlur),this.off("click",this.handleClick),this.off(this.player_,"controlsvisible",this.update),this.off(t,"mousemove",this.handleMouseMove),this.off(t,"mouseup",this.handleMouseUp),this.off(t,"touchmove",this.handleMouseMove),this.off(t,"touchend",this.handleMouseUp),this.removeAttribute("tabindex"),this.addClass("disabled"),this.playerEvent&&this.off(this.player_,this.playerEvent,this.update),this.enabled_=!1}},e.createEl=function(t,e,i){return void 0===e&&(e={}),void 0===i&&(i={}),e.className=e.className+" vjs-slider",e=_({tabIndex:0},e),i=_({role:"slider","aria-valuenow":0,"aria-valuemin":0,"aria-valuemax":100,tabIndex:0},i),n.prototype.createEl.call(this,t,e,i)},e.handleMouseDown=function(t){var e=this.bar.el_.ownerDocument;"mousedown"===t.type&&t.preventDefault(),"touchstart"!==t.type||ne||t.preventDefault(),j(),this.addClass("vjs-sliding"),this.trigger("slideractive"),this.on(e,"mousemove",this.handleMouseMove),this.on(e,"mouseup",this.handleMouseUp),this.on(e,"touchmove",this.handleMouseMove),this.on(e,"touchend",this.handleMouseUp),this.handleMouseMove(t)},e.handleMouseMove=function(){},e.handleMouseUp=function(){var t=this.bar.el_.ownerDocument;B(),this.removeClass("vjs-sliding"),this.trigger("sliderinactive"),this.off(t,"mousemove",this.handleMouseMove),this.off(t,"mouseup",this.handleMouseUp),this.off(t,"touchmove",this.handleMouseMove),this.off(t,"touchend",this.handleMouseUp),this.update()},e.update=function(){if(this.el_){var t=this.getPercent(),e=this.bar;if(e){("number"!=typeof t||t!=t||t<0||t===1/0)&&(t=0);var i=(100*t).toFixed(2)+"%",n=e.el().style;return this.vertical()?n.height=i:n.width=i,t}}},e.calculateDistance=function(t){var e=z(this.el_,t);return this.vertical()?e.y:e.x},e.handleFocus=function(){this.on(this.bar.el_.ownerDocument,"keydown",this.handleKeyPress)},e.handleKeyPress=function(t){37===t.which||40===t.which?(t.preventDefault(),this.stepBack()):38!==t.which&&39!==t.which||(t.preventDefault(),this.stepForward())},e.handleBlur=function(){this.off(this.bar.el_.ownerDocument,"keydown",this.handleKeyPress)},e.handleClick=function(t){t.stopImmediatePropagation(),t.preventDefault()},e.vertical=function(t){if(void 0===t)return this.vertical_||!1;this.vertical_=!!t,this.vertical_?this.addClass("vjs-slider-vertical"):this.addClass("vjs-slider-horizontal")},t}(Bt);Bt.registerComponent("Slider",Nn);var Rn=function(n){function t(t,e){var i;return(i=n.call(this,t,e)||this).partEls_=[],i.on(t,"progress",i.update),i}p(t,n);var e=t.prototype;return e.createEl=function(){return n.prototype.createEl.call(this,"div",{className:"vjs-load-progress",innerHTML:'<span class="vjs-control-text"><span>'+this.localize("Loaded")+'</span>: <span class="vjs-control-text-loaded-percentage">0%</span></span>'})},e.dispose=function(){this.partEls_=null,n.prototype.dispose.call(this)},e.update=function(){function t(t,e,i){var n=t/e||0;return n=100*(1<=n?1:n),i&&(n=n.toFixed(2)),n+"%"}var e=this.player_.liveTracker,i=this.player_.buffered(),n=e&&e.isLive()?e.seekableEnd():this.player_.duration(),s=this.player_.bufferedEnd(),r=this.partEls_,a=this.$(".vjs-control-text-loaded-percentage");this.el_.style.width=t(s,n),E(a,t(s,n,!0));for(var o=0;o<i.length;o++){var l=i.start(o),c=i.end(o),u=r[o];u||(u=this.el_.appendChild(x()),r[o]=u),u.style.left=t(l,s),u.style.width=t(c-l,s)}for(var h=r.length;h>i.length;h--)this.el_.removeChild(r[h-1]);r.length=i.length},t}(Bt);Bt.registerComponent("LoadProgressBar",Rn);var Un=function(t){function e(){return t.apply(this,arguments)||this}p(e,t);var i=e.prototype;return i.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-time-tooltip"},{"aria-hidden":"true"})},i.update=function(t,e,i){var n=H(this.el_),s=H(this.player_.el()),r=t.width*e;if(s&&n){var a=t.left-s.left+r,o=t.width-r+(s.right-t.right),l=n.width/2;a<l?l+=l-a:o<l&&(l=o),l<0?l=0:l>n.width&&(l=n.width),this.el_.style.right="-"+l+"px",E(this.el_,i)}},i.updateTime=function(s,r,a,o){var l=this;this.rafId_&&this.cancelAnimationFrame(this.rafId_),this.rafId_=this.requestAnimationFrame(function(){var t,e=l.player_.duration();if(l.player_.liveTracker&&l.player_.liveTracker.isLive()){var i=l.player_.liveTracker.liveWindow(),n=i-r*i;t=(n<1?"":"-")+En(n,i)}else t=En(a,e);l.update(s,r,t),o&&o()})},e}(Bt);Bt.registerComponent("TimeTooltip",Un);var jn=function(t){function e(){return t.apply(this,arguments)||this}p(e,t);var i=e.prototype;return i.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-play-progress vjs-slider-bar"},{"aria-hidden":"true"})},i.update=function(t,e){var i=this.getChild("timeTooltip");if(i){var n=this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime();i.updateTime(t,e,n)}},e}(Bt);jn.prototype.options_={children:[]},Kt||Jt||jn.prototype.options_.children.push("timeTooltip"),Bt.registerComponent("PlayProgressBar",jn);var Bn=function(n){function t(t,e){var i;return(i=n.call(this,t,e)||this).update=wt(Tt(f(f(i)),i.update),25),i}p(t,n);var e=t.prototype;return e.createEl=function(){return n.prototype.createEl.call(this,"div",{className:"vjs-mouse-display"})},e.update=function(t,e){var i=this,n=e*this.player_.duration();this.getChild("timeTooltip").updateTime(t,e,n,function(){i.el_.style.left=t.width*e+"px"})},t}(Bt);Bn.prototype.options_={children:["timeTooltip"]},Bt.registerComponent("MouseTimeDisplay",Bn);var Hn=function(n){function t(t,e){var i;return(i=n.call(this,t,e)||this).setEventHandlers_(),i}p(t,n);var e=t.prototype;return e.setEventHandlers_=function(){var e=this;this.update=wt(Tt(this,this.update),30),this.on(this.player_,"timeupdate",this.update),this.on(this.player_,"ended",this.handleEnded),this.on(this.player_,"durationchange",this.update),this.player_.liveTracker&&this.on(this.player_.liveTracker,"liveedgechange",this.update),this.updateInterval=null,this.on(this.player_,["playing"],function(){e.clearInterval(e.updateInterval),e.updateInterval=e.setInterval(function(){e.requestAnimationFrame(function(){e.update()})},30)}),this.on(this.player_,["ended","pause","waiting"],function(t){e.player_.liveTracker&&e.player_.liveTracker.isLive()&&"ended"!==t.type||e.clearInterval(e.updateInterval)}),this.on(this.player_,["timeupdate","ended"],this.update)},e.createEl=function(){return n.prototype.createEl.call(this,"div",{className:"vjs-progress-holder"},{"aria-label":this.localize("Progress Bar")})},e.update_=function(t,e){var i=this.player_.liveTracker,n=this.player_.duration();i&&i.isLive()&&(n=this.player_.liveTracker.liveCurrentTime()),i&&i.seekableEnd()===1/0?this.disable():this.enable(),this.el_.setAttribute("aria-valuenow",(100*e).toFixed(2)),this.el_.setAttribute("aria-valuetext",this.localize("progress bar timing: currentTime={1} duration={2}",[En(t,n),En(n,n)],"{1} of {2}")),this.bar.update(H(this.el_),e)},e.update=function(){var t=n.prototype.update.call(this);return this.update_(this.getCurrentTime_(),t),t},e.getCurrentTime_=function(){return this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime()},e.handleEnded=function(){this.update_(this.player_.duration(),1)},e.getPercent=function(){var t,e=this.getCurrentTime_(),i=this.player_.liveTracker;return i&&i.isLive()?(t=(e-i.seekableStart())/i.liveWindow(),i.atLiveEdge()&&(t=1)):t=e/this.player_.duration(),1<=t?1:t||0},e.handleMouseDown=function(t){G(t)&&(t.stopPropagation(),this.player_.scrubbing(!0),this.videoWasPlaying=!this.player_.paused(),this.player_.pause(),n.prototype.handleMouseDown.call(this,t))},e.handleMouseMove=function(t){if(G(t)){var e,i=this.calculateDistance(t),n=this.player_.liveTracker;if(n&&n.isLive()){var s=n.seekableStart(),r=n.liveCurrentTime();if(r<=(e=s+i*n.liveWindow())&&(e=r),e<=s&&(e=s+.1),e===1/0)return}else(e=i*this.player_.duration())===this.player_.duration()&&(e-=.1);this.player_.currentTime(e)}},e.enable=function(){n.prototype.enable.call(this);var t=this.getChild("mouseTimeDisplay");t&&t.show()},e.disable=function(){n.prototype.disable.call(this);var t=this.getChild("mouseTimeDisplay");t&&t.hide()},e.handleMouseUp=function(t){n.prototype.handleMouseUp.call(this,t),t&&t.stopPropagation(),this.player_.scrubbing(!1),this.player_.trigger({type:"timeupdate",target:this,manuallyTriggered:!0}),this.videoWasPlaying&&Se(this.player_.play())},e.stepForward=function(){this.player_.currentTime(this.player_.currentTime()+5)},e.stepBack=function(){this.player_.currentTime(this.player_.currentTime()-5)},e.handleAction=function(){this.player_.paused()?this.player_.play():this.player_.pause()},e.handleKeyPress=function(t){32===t.which||13===t.which?(t.preventDefault(),this.handleAction(t)):n.prototype.handleKeyPress&&n.prototype.handleKeyPress.call(this,t)},t}(Nn);Hn.prototype.options_={children:["loadProgressBar","playProgressBar"],barName:"playProgressBar"},Kt||Jt||Hn.prototype.options_.children.splice(1,0,"mouseTimeDisplay"),Hn.prototype.playerEvent="timeupdate",Bt.registerComponent("SeekBar",Hn);var Fn=function(n){function t(t,e){var i;return(i=n.call(this,t,e)||this).handleMouseMove=wt(Tt(f(f(i)),i.handleMouseMove),25),i.throttledHandleMouseSeek=wt(Tt(f(f(i)),i.handleMouseSeek),25),i.enable(),i}p(t,n);var e=t.prototype;return e.createEl=function(){return n.prototype.createEl.call(this,"div",{className:"vjs-progress-control vjs-control"})},e.handleMouseMove=function(t){var e=this.getChild("seekBar");if(e){var i=e.getChild("mouseTimeDisplay"),n=e.el(),s=H(n),r=z(n,t).x;1<r?r=1:r<0&&(r=0),i&&i.update(s,r)}},e.handleMouseSeek=function(t){var e=this.getChild("seekBar");e&&e.handleMouseMove(t)},e.enabled=function(){return this.enabled_},e.disable=function(){this.children().forEach(function(t){return t.disable&&t.disable()}),this.enabled()&&(this.off(["mousedown","touchstart"],this.handleMouseDown),this.off(this.el_,"mousemove",this.handleMouseMove),this.handleMouseUp(),this.addClass("disabled"),this.enabled_=!1)},e.enable=function(){this.children().forEach(function(t){return t.enable&&t.enable()}),this.enabled()||(this.on(["mousedown","touchstart"],this.handleMouseDown),this.on(this.el_,"mousemove",this.handleMouseMove),this.removeClass("disabled"),this.enabled_=!0)},e.handleMouseDown=function(t){var e=this.el_.ownerDocument,i=this.getChild("seekBar");i&&i.handleMouseDown(t),this.on(e,"mousemove",this.throttledHandleMouseSeek),this.on(e,"touchmove",this.throttledHandleMouseSeek),this.on(e,"mouseup",this.handleMouseUp),this.on(e,"touchend",this.handleMouseUp)},e.handleMouseUp=function(t){var e=this.el_.ownerDocument,i=this.getChild("seekBar");i&&i.handleMouseUp(t),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}(Bt);Fn.prototype.options_={children:["seekBar"]},Bt.registerComponent("ProgressControl",Fn);var zn=function(n){function t(t,e){var i;return(i=n.call(this,t,e)||this).on(t,"fullscreenchange",i.handleFullscreenChange),!1===d[me.fullscreenEnabled]&&i.disable(),i}p(t,n);var e=t.prototype;return e.buildCSSClass=function(){return"vjs-fullscreen-control "+n.prototype.buildCSSClass.call(this)},e.handleFullscreenChange=function(){this.player_.isFullscreen()?this.controlText("Non-Fullscreen"):this.controlText("Fullscreen")},e.handleClick=function(){this.player_.isFullscreen()?this.player_.exitFullscreen():this.player_.requestFullscreen()},t}(Tn);zn.prototype.controlText_="Fullscreen",Bt.registerComponent("FullscreenToggle",zn);var Wn=function(t){function e(){return t.apply(this,arguments)||this}return p(e,t),e.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-volume-level",innerHTML:'<span class="vjs-control-text"></span>'})},e}(Bt);Bt.registerComponent("VolumeLevel",Wn);var $n=function(n){function t(t,e){var i;return(i=n.call(this,t,e)||this).on("slideractive",i.updateLastVolume_),i.on(t,"volumechange",i.updateARIAAttributes),t.ready(function(){return i.updateARIAAttributes()}),i}p(t,n);var e=t.prototype;return e.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"})},e.handleMouseDown=function(t){G(t)&&n.prototype.handleMouseDown.call(this,t)},e.handleMouseMove=function(t){G(t)&&(this.checkMuted(),this.player_.volume(this.calculateDistance(t)))},e.checkMuted=function(){this.player_.muted()&&this.player_.muted(!1)},e.getPercent=function(){return this.player_.muted()?0:this.player_.volume()},e.stepForward=function(){this.checkMuted(),this.player_.volume(this.player_.volume()+.1)},e.stepBack=function(){this.checkMuted(),this.player_.volume(this.player_.volume()-.1)},e.updateARIAAttributes=function(){var t=this.player_.muted()?0:this.volumeAsPercentage_();this.el_.setAttribute("aria-valuenow",t),this.el_.setAttribute("aria-valuetext",t+"%")},e.volumeAsPercentage_=function(){return Math.round(100*this.player_.volume())},e.updateLastVolume_=function(){var t=this,e=this.player_.volume();this.one("sliderinactive",function(){0===t.player_.volume()&&t.player_.lastVolume_(e)})},t}(Nn);$n.prototype.options_={children:["volumeLevel"],barName:"volumeLevel"},$n.prototype.playerEvent="volumechange",Bt.registerComponent("VolumeBar",$n);var qn=function(n){function t(t,e){var i;return void 0===e&&(e={}),e.vertical=e.vertical||!1,void 0!==e.volumeBar&&!u(e.volumeBar)||(e.volumeBar=e.volumeBar||{},e.volumeBar.vertical=e.vertical),function(t,e){e.tech_&&!e.tech_.featuresVolumeControl&&t.addClass("vjs-hidden"),t.on(e,"loadstart",function(){e.tech_.featuresVolumeControl?t.removeClass("vjs-hidden"):t.addClass("vjs-hidden")})}(f(f(i=n.call(this,t,e)||this)),t),i.throttledHandleMouseMove=wt(Tt(f(f(i)),i.handleMouseMove),25),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}p(t,n);var e=t.prototype;return e.createEl=function(){var t="vjs-volume-horizontal";return this.options_.vertical&&(t="vjs-volume-vertical"),n.prototype.createEl.call(this,"div",{className:"vjs-volume-control vjs-control "+t})},e.handleMouseDown=function(){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)},e.handleMouseUp=function(){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)},e.handleMouseMove=function(t){this.volumeBar.handleMouseMove(t)},t}(Bt);qn.prototype.options_={children:["volumeBar"]},Bt.registerComponent("VolumeControl",qn);var Vn=function(n){function t(t,e){var i;return function(t,e){e.tech_&&!e.tech_.featuresMuteControl&&t.addClass("vjs-hidden"),t.on(e,"loadstart",function(){e.tech_.featuresMuteControl?t.removeClass("vjs-hidden"):t.addClass("vjs-hidden")})}(f(f(i=n.call(this,t,e)||this)),t),i.on(t,["loadstart","volumechange"],i.update),i}p(t,n);var e=t.prototype;return e.buildCSSClass=function(){return"vjs-mute-control "+n.prototype.buildCSSClass.call(this)},e.handleClick=function(){var t=this.player_.volume(),e=this.player_.lastVolume_();if(0===t){var i=e<.1?.1:e;this.player_.volume(i),this.player_.muted(!1)}else this.player_.muted(!this.player_.muted())},e.update=function(){this.updateIcon_(),this.updateControlText_()},e.updateIcon_=function(){var t=this.player_.volume(),e=3;Kt&&this.player_.muted(this.player_.tech_.el_.muted),0===t||this.player_.muted()?e=0:t<.33?e=1:t<.67&&(e=2);for(var i=0;i<4;i++)O(this.el_,"vjs-vol-"+i);I(this.el_,"vjs-vol-"+e)},e.updateControlText_=function(){var t=this.player_.muted()||0===this.player_.volume()?"Unmute":"Mute";this.controlText()!==t&&this.controlText(t)},t}(Tn);Vn.prototype.controlText_="Mute",Bt.registerComponent("MuteToggle",Vn);var Yn=function(n){function t(t,e){var i;return void 0===e&&(e={}),void 0!==e.inline?e.inline=e.inline:e.inline=!0,void 0!==e.volumeControl&&!u(e.volumeControl)||(e.volumeControl=e.volumeControl||{},e.volumeControl.vertical=!e.inline),(i=n.call(this,t,e)||this).on(t,["loadstart"],i.volumePanelState_),i.on(i.volumeControl,["slideractive"],i.sliderActive_),i.on(i.volumeControl,["sliderinactive"],i.sliderInactive_),i}p(t,n);var e=t.prototype;return e.sliderActive_=function(){this.addClass("vjs-slider-active")},e.sliderInactive_=function(){this.removeClass("vjs-slider-active")},e.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")},e.createEl=function(){var t="vjs-volume-panel-horizontal";return this.options_.inline||(t="vjs-volume-panel-vertical"),n.prototype.createEl.call(this,"div",{className:"vjs-volume-panel vjs-control "+t})},t}(Bt);Yn.prototype.options_={children:["muteToggle","volumeControl"]},Bt.registerComponent("VolumePanel",Yn);var Gn=function(n){function t(t,e){var i;return i=n.call(this,t,e)||this,e&&(i.menuButton_=e.menuButton),i.focusedChild_=-1,i.on("keydown",i.handleKeyPress),i}p(t,n);var e=t.prototype;return e.addItem=function(e){this.addChild(e),e.on("blur",Tt(this,this.handleBlur)),e.on(["tap","click"],Tt(this,function(t){this.menuButton_&&(this.menuButton_.unpressButton(),"CaptionSettingsMenuItem"!==e.name()&&this.menuButton_.focus())}))},e.createEl=function(){var t=this.options_.contentElType||"ul";this.contentEl_=x(t,{className:"vjs-menu-content"}),this.contentEl_.setAttribute("role","menu");var e=n.prototype.createEl.call(this,"div",{append:this.contentEl_,className:"vjs-menu"});return e.appendChild(this.contentEl_),ut(e,"click",function(t){t.preventDefault(),t.stopImmediatePropagation()}),e},e.dispose=function(){this.contentEl_=null,n.prototype.dispose.call(this)},e.handleBlur=function(t){var e=t.relatedTarget||d.activeElement;if(!this.children().some(function(t){return t.el()===e})){var i=this.menuButton_;i&&i.buttonPressed_&&e!==i.el().firstChild&&i.unpressButton()}},e.handleKeyPress=function(t){37===t.which||40===t.which?(t.preventDefault(),this.stepForward()):38!==t.which&&39!==t.which||(t.preventDefault(),this.stepBack())},e.stepForward=function(){var t=0;void 0!==this.focusedChild_&&(t=this.focusedChild_+1),this.focus(t)},e.stepBack=function(){var t=0;void 0!==this.focusedChild_&&(t=this.focusedChild_-1),this.focus(t)},e.focus=function(t){void 0===t&&(t=0);var e=this.children().slice();e.length&&e[0].className&&/vjs-menu-title/.test(e[0].className)&&e.shift(),0<e.length&&(t<0?t=0:t>=e.length&&(t=e.length-1),e[this.focusedChild_=t].el_.focus())},t}(Bt);Bt.registerComponent("Menu",Gn);var Xn=function(s){function t(t,e){var i;void 0===e&&(e={}),(i=s.call(this,t,e)||this).menuButton_=new Tn(t,e),i.menuButton_.controlText(i.controlText_),i.menuButton_.el_.setAttribute("aria-haspopup","true");var n=Tn.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_,"focus",i.handleFocus),i.on(i.menuButton_,"blur",i.handleBlur),i.on(i.menuButton_,"mouseenter",function(){i.menu.show()}),i.on("keydown",i.handleSubmenuKeyPress),i}p(t,s);var e=t.prototype;return e.update=function(){var t=this.createMenu();this.menu&&(this.menu.dispose(),this.removeChild(this.menu)),this.menu=t,this.addChild(t),this.buttonPressed_=!1,this.menuButton_.el_.setAttribute("aria-expanded","false"),this.items&&this.items.length<=this.hideThreshold_?this.hide():this.show()},e.createMenu=function(){var t=new Gn(this.player_,{menuButton:this});if(this.hideThreshold_=0,this.options_.title){var e=x("li",{className:"vjs-menu-title",innerHTML:Ut(this.options_.title),tabIndex:-1});this.hideThreshold_+=1,t.children_.unshift(e),D(e,t.contentEl())}if(this.items=this.createItems(),this.items)for(var i=0;i<this.items.length;i++)t.addItem(this.items[i]);return t},e.createItems=function(){},e.createEl=function(){return s.prototype.createEl.call(this,"div",{className:this.buildWrapperCSSClass()},{})},e.buildWrapperCSSClass=function(){var t="vjs-menu-button";return!0===this.options_.inline?t+="-inline":t+="-popup","vjs-menu-button "+t+" "+Tn.prototype.buildCSSClass()+" "+s.prototype.buildCSSClass.call(this)},e.buildCSSClass=function(){var t="vjs-menu-button";return!0===this.options_.inline?t+="-inline":t+="-popup","vjs-menu-button "+t+" "+s.prototype.buildCSSClass.call(this)},e.controlText=function(t,e){return void 0===e&&(e=this.menuButton_.el()),this.menuButton_.controlText(t,e)},e.handleClick=function(){this.buttonPressed_?this.unpressButton():this.pressButton()},e.focus=function(){this.menuButton_.focus()},e.blur=function(){this.menuButton_.blur()},e.handleFocus=function(){ut(d,"keydown",Tt(this,this.handleKeyPress))},e.handleBlur=function(){ht(d,"keydown",Tt(this,this.handleKeyPress))},e.handleKeyPress=function(t){27===t.which||9===t.which?(this.buttonPressed_&&this.unpressButton(),9!==t.which&&(t.preventDefault(),this.menuButton_.el_.focus())):13!==t.which&&38!==t.which&&40!==t.which||this.buttonPressed_||(this.pressButton(),t.preventDefault())},e.handleSubmenuKeyPress=function(t){27!==t.which&&9!==t.which||(this.buttonPressed_&&this.unpressButton(),9!==t.which&&(t.preventDefault(),this.menuButton_.el_.focus()))},e.pressButton=function(){if(this.enabled_){if(this.buttonPressed_=!0,this.menu.show(),this.menu.lockShowing(),this.menuButton_.el_.setAttribute("aria-expanded","true"),Kt&&S())return;this.menu.focus()}},e.unpressButton=function(){this.enabled_&&(this.buttonPressed_=!1,this.menu.unlockShowing(),this.menu.hide(),this.menuButton_.el_.setAttribute("aria-expanded","false"))},e.disable=function(){this.unpressButton(),this.enabled_=!1,this.addClass("vjs-disabled"),this.menuButton_.disable()},e.enable=function(){this.enabled_=!0,this.removeClass("vjs-disabled"),this.menuButton_.enable()},t}(Bt);Bt.registerComponent("MenuButton",Xn);var Kn=function(r){function t(t,e){var i,n=e.tracks;if((i=r.call(this,t,e)||this).items.length<=1&&i.hide(),!n)return f(i);var s=Tt(f(f(i)),i.update);return n.addEventListener("removetrack",s),n.addEventListener("addtrack",s),i.player_.on("ready",s),i.player_.on("dispose",function(){n.removeEventListener("removetrack",s),n.removeEventListener("addtrack",s)}),i}return p(t,r),t}(Xn);Bt.registerComponent("TrackButton",Kn);var Qn=function(n){function t(t,e){var i;return(i=n.call(this,t,e)||this).selectable=e.selectable,i.isSelected_=e.selected||!1,i.multiSelectable=e.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}p(t,n);var e=t.prototype;return e.createEl=function(t,e,i){return this.nonIconControl=!0,n.prototype.createEl.call(this,"li",_({className:"vjs-menu-item",innerHTML:'<span class="vjs-menu-item-text">'+this.localize(this.options_.label)+"</span>",tabIndex:-1},e),i)},e.handleClick=function(){this.selected(!0)},e.selected=function(t){this.selectable&&(t?(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))},t}(fn);Bt.registerComponent("MenuItem",Qn);var Jn=function(l){function t(t,e){var n,i=e.track,s=t.textTracks();e.label=i.label||i.language||"Unknown",e.selected="showing"===i.mode,(n=l.call(this,t,e)||this).track=i;function r(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];n.handleTracksChange.apply(f(f(n)),e)}function a(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];n.handleSelectedLanguageChange.apply(f(f(n)),e)}var o;t.on(["loadstart","texttrackchange"],r),s.addEventListener("change",r),s.addEventListener("selectedlanguagechange",a),n.on("dispose",function(){t.off(["loadstart","texttrackchange"],r),s.removeEventListener("change",r),s.removeEventListener("selectedlanguagechange",a)}),void 0===s.onchange&&n.on(["tap","click"],function(){if("object"!=typeof y.Event)try{o=new y.Event("change")}catch(t){}o||(o=d.createEvent("Event")).initEvent("change",!0,!0),s.dispatchEvent(o)});return n.handleTracksChange(),n}p(t,l);var e=t.prototype;return e.handleClick=function(t){var e=this.track.kind,i=this.track.kinds,n=this.player_.textTracks();if(i=i||[e],l.prototype.handleClick.call(this,t),n)for(var s=0;s<n.length;s++){var r=n[s];r===this.track&&-1<i.indexOf(r.kind)?"showing"!==r.mode&&(r.mode="showing"):"disabled"!==r.mode&&(r.mode="disabled")}},e.handleTracksChange=function(){var t="showing"===this.track.mode;t!==this.isSelected_&&this.selected(t)},e.handleSelectedLanguageChange=function(){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}}},e.dispose=function(){this.track=null,l.prototype.dispose.call(this)},t}(Qn);Bt.registerComponent("TextTrackMenuItem",Jn);var Zn=function(i){function t(t,e){return e.track={player:t,kind:e.kind,kinds:e.kinds,default:!1,mode:"disabled"},e.kinds||(e.kinds=[e.kind]),e.label?e.track.label=e.label:e.track.label=e.kinds.join(" and ")+" off",e.selectable=!0,e.multiSelectable=!1,i.call(this,t,e)||this}p(t,i);var e=t.prototype;return e.handleTracksChange=function(){for(var t=this.player().textTracks(),e=!0,i=0,n=t.length;i<n;i++){var s=t[i];if(-1<this.options_.kinds.indexOf(s.kind)&&"showing"===s.mode){e=!1;break}}e!==this.isSelected_&&this.selected(e)},e.handleSelectedLanguageChange=function(){for(var t=this.player().textTracks(),e=!0,i=0,n=t.length;i<n;i++){var s=t[i];if(-1<["captions","descriptions","subtitles"].indexOf(s.kind)&&"showing"===s.mode){e=!1;break}}e&&(this.player_.cache_.selectedLanguage={enabled:!1})},t}(Jn);Bt.registerComponent("OffTextTrackMenuItem",Zn);var ts=function(i){function t(t,e){return void 0===e&&(e={}),e.tracks=t.textTracks(),i.call(this,t,e)||this}return p(t,i),t.prototype.createItems=function(t,e){var i;void 0===t&&(t=[]),void 0===e&&(e=Jn),this.label_&&(i=this.label_+" off"),t.push(new Zn(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 s=0;s<n.length;s++){var r=n[s];if(-1<this.kinds_.indexOf(r.kind)){var a=new e(this.player_,{track:r,selectable:!0,multiSelectable:!1});a.addClass("vjs-"+r.kind+"-menu-item"),t.push(a)}}return t},t}(Kn);Bt.registerComponent("TextTrackButton",ts);var es=function(a){function t(t,e){var i,n=e.track,s=e.cue,r=t.currentTime();return e.selectable=!0,e.multiSelectable=!1,e.label=s.text,e.selected=s.startTime<=r&&r<s.endTime,(i=a.call(this,t,e)||this).track=n,i.cue=s,n.addEventListener("cuechange",Tt(f(f(i)),i.update)),i}p(t,a);var e=t.prototype;return e.handleClick=function(){a.prototype.handleClick.call(this),this.player_.currentTime(this.cue.startTime),this.update(this.cue.startTime)},e.update=function(){var t=this.cue,e=this.player_.currentTime();this.selected(t.startTime<=e&&e<t.endTime)},t}(Qn);Bt.registerComponent("ChaptersTrackMenuItem",es);var is=function(n){function t(t,e,i){return n.call(this,t,e,i)||this}p(t,n);var e=t.prototype;return e.buildCSSClass=function(){return"vjs-chapters-button "+n.prototype.buildCSSClass.call(this)},e.buildWrapperCSSClass=function(){return"vjs-chapters-button "+n.prototype.buildWrapperCSSClass.call(this)},e.update=function(t){this.track_&&(!t||"addtrack"!==t.type&&"removetrack"!==t.type)||this.setTrack(this.findChaptersTrack()),n.prototype.update.call(this)},e.setTrack=function(t){if(this.track_!==t){if(this.updateHandler_||(this.updateHandler_=this.update.bind(this)),this.track_){var e=this.player_.remoteTextTrackEls().getTrackElementByTrack_(this.track_);e&&e.removeEventListener("load",this.updateHandler_),this.track_=null}if(this.track_=t,this.track_){this.track_.mode="hidden";var i=this.player_.remoteTextTrackEls().getTrackElementByTrack_(this.track_);i&&i.addEventListener("load",this.updateHandler_)}}},e.findChaptersTrack=function(){for(var t=this.player_.textTracks()||[],e=t.length-1;0<=e;e--){var i=t[e];if(i.kind===this.kind_)return i}},e.getMenuCaption=function(){return this.track_&&this.track_.label?this.track_.label:this.localize(Ut(this.kind_))},e.createMenu=function(){return this.options_.title=this.getMenuCaption(),n.prototype.createMenu.call(this)},e.createItems=function(){var t=[];if(!this.track_)return t;var e=this.track_.cues;if(!e)return t;for(var i=0,n=e.length;i<n;i++){var s=e[i],r=new es(this.player_,{track:this.track_,cue:s});t.push(r)}return t},t}(ts);is.prototype.kind_="chapters",is.prototype.controlText_="Chapters",Bt.registerComponent("ChaptersButton",is);var ns=function(a){function t(t,e,i){var n;n=a.call(this,t,e,i)||this;var s=t.textTracks(),r=Tt(f(f(n)),n.handleTracksChange);return s.addEventListener("change",r),n.on("dispose",function(){s.removeEventListener("change",r)}),n}p(t,a);var e=t.prototype;return e.handleTracksChange=function(){for(var t=this.player().textTracks(),e=!1,i=0,n=t.length;i<n;i++){var s=t[i];if(s.kind!==this.kind_&&"showing"===s.mode){e=!0;break}}e?this.disable():this.enable()},e.buildCSSClass=function(){return"vjs-descriptions-button "+a.prototype.buildCSSClass.call(this)},e.buildWrapperCSSClass=function(){return"vjs-descriptions-button "+a.prototype.buildWrapperCSSClass.call(this)},t}(ts);ns.prototype.kind_="descriptions",ns.prototype.controlText_="Descriptions",Bt.registerComponent("DescriptionsButton",ns);var ss=function(n){function t(t,e,i){return n.call(this,t,e,i)||this}p(t,n);var e=t.prototype;return e.buildCSSClass=function(){return"vjs-subtitles-button "+n.prototype.buildCSSClass.call(this)},e.buildWrapperCSSClass=function(){return"vjs-subtitles-button "+n.prototype.buildWrapperCSSClass.call(this)},t}(ts);ss.prototype.kind_="subtitles",ss.prototype.controlText_="Subtitles",Bt.registerComponent("SubtitlesButton",ss);var rs=function(n){function t(t,e){var i;return e.track={player:t,kind:e.kind,label:e.kind+" settings",selectable:!1,default:!1,mode:"disabled"},e.selectable=!1,e.name="CaptionSettingsMenuItem",(i=n.call(this,t,e)||this).addClass("vjs-texttrack-settings"),i.controlText(", opens "+e.kind+" settings dialog"),i}return p(t,n),t.prototype.handleClick=function(){this.player().getChild("textTrackSettings").open()},t}(Jn);Bt.registerComponent("CaptionSettingsMenuItem",rs);var as=function(n){function t(t,e,i){return n.call(this,t,e,i)||this}p(t,n);var e=t.prototype;return e.buildCSSClass=function(){return"vjs-captions-button "+n.prototype.buildCSSClass.call(this)},e.buildWrapperCSSClass=function(){return"vjs-captions-button "+n.prototype.buildWrapperCSSClass.call(this)},e.createItems=function(){var t=[];return this.player().tech_&&this.player().tech_.featuresNativeTextTracks||!this.player().getChild("textTrackSettings")||(t.push(new rs(this.player_,{kind:this.kind_})),this.hideThreshold_+=1),n.prototype.createItems.call(this,t)},t}(ts);as.prototype.kind_="captions",as.prototype.controlText_="Captions",Bt.registerComponent("CaptionsButton",as);var os=function(s){function t(){return s.apply(this,arguments)||this}return p(t,s),t.prototype.createEl=function(t,e,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>",s.prototype.createEl.call(this,t,_({innerHTML:n},e),i)},t}(Jn);Bt.registerComponent("SubsCapsMenuItem",os);var ls=function(n){function t(t,e){var i;return void 0===e&&(e={}),(i=n.call(this,t,e)||this).label_="subtitles",-1<["en","en-us","en-ca","fr-ca"].indexOf(i.player_.language_)&&(i.label_="captions"),i.menuButton_.controlText(Ut(i.label_)),i}p(t,n);var e=t.prototype;return e.buildCSSClass=function(){return"vjs-subs-caps-button "+n.prototype.buildCSSClass.call(this)},e.buildWrapperCSSClass=function(){return"vjs-subs-caps-button "+n.prototype.buildWrapperCSSClass.call(this)},e.createItems=function(){var t=[];return this.player().tech_&&this.player().tech_.featuresNativeTextTracks||!this.player().getChild("textTrackSettings")||(t.push(new rs(this.player_,{kind:this.label_})),this.hideThreshold_+=1),t=n.prototype.createItems.call(this,t,os)},t}(ts);ls.prototype.kinds_=["captions","subtitles"],ls.prototype.controlText_="Subtitles",Bt.registerComponent("SubsCapsButton",ls);var cs=function(a){function t(t,e){var n,i=e.track,s=t.audioTracks();e.label=i.label||i.language||"Unknown",e.selected=i.enabled,(n=a.call(this,t,e)||this).track=i,n.addClass("vjs-"+i.kind+"-menu-item");function r(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];n.handleTracksChange.apply(f(f(n)),e)}return s.addEventListener("change",r),n.on("dispose",function(){s.removeEventListener("change",r)}),n}p(t,a);var e=t.prototype;return e.createEl=function(t,e,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>",a.prototype.createEl.call(this,t,_({innerHTML:n},e),i)},e.handleClick=function(t){var e=this.player_.audioTracks();a.prototype.handleClick.call(this,t);for(var i=0;i<e.length;i++){var n=e[i];n.enabled=n===this.track}},e.handleTracksChange=function(){this.selected(this.track.enabled)},t}(Qn);Bt.registerComponent("AudioTrackMenuItem",cs);var us=function(i){function t(t,e){return void 0===e&&(e={}),e.tracks=t.audioTracks(),i.call(this,t,e)||this}p(t,i);var e=t.prototype;return e.buildCSSClass=function(){return"vjs-audio-button "+i.prototype.buildCSSClass.call(this)},e.buildWrapperCSSClass=function(){return"vjs-audio-button "+i.prototype.buildWrapperCSSClass.call(this)},e.createItems=function(t){void 0===t&&(t=[]),this.hideThreshold_=1;for(var e=this.player_.audioTracks(),i=0;i<e.length;i++){var n=e[i];t.push(new cs(this.player_,{track:n,selectable:!0,multiSelectable:!1}))}return t},t}(Kn);us.prototype.controlText_="Audio Track",Bt.registerComponent("AudioTrackButton",us);var hs=function(r){function t(t,e){var i,n=e.rate,s=parseFloat(n,10);return e.label=n,e.selected=1===s,e.selectable=!0,e.multiSelectable=!1,(i=r.call(this,t,e)||this).label=n,i.rate=s,i.on(t,"ratechange",i.update),i}p(t,r);var e=t.prototype;return e.handleClick=function(){r.prototype.handleClick.call(this),this.player().playbackRate(this.rate)},e.update=function(){this.selected(this.player().playbackRate()===this.rate)},t}(Qn);hs.prototype.contentElType="button",Bt.registerComponent("PlaybackRateMenuItem",hs);var ds=function(n){function t(t,e){var i;return(i=n.call(this,t,e)||this).updateVisibility(),i.updateLabel(),i.on(t,"loadstart",i.updateVisibility),i.on(t,"ratechange",i.updateLabel),i}p(t,n);var e=t.prototype;return e.createEl=function(){var t=n.prototype.createEl.call(this);return this.labelEl_=x("div",{className:"vjs-playback-rate-value",innerHTML:"1x"}),t.appendChild(this.labelEl_),t},e.dispose=function(){this.labelEl_=null,n.prototype.dispose.call(this)},e.buildCSSClass=function(){return"vjs-playback-rate "+n.prototype.buildCSSClass.call(this)},e.buildWrapperCSSClass=function(){return"vjs-playback-rate "+n.prototype.buildWrapperCSSClass.call(this)},e.createMenu=function(){var t=new Gn(this.player()),e=this.playbackRates();if(e)for(var i=e.length-1;0<=i;i--)t.addChild(new hs(this.player(),{rate:e[i]+"x"}));return t},e.updateARIAAttributes=function(){this.el().setAttribute("aria-valuenow",this.player().playbackRate())},e.handleClick=function(){for(var t=this.player().playbackRate(),e=this.playbackRates(),i=e[0],n=0;n<e.length;n++)if(e[n]>t){i=e[n];break}this.player().playbackRate(i)},e.playbackRates=function(){return this.options_.playbackRates||this.options_.playerOptions&&this.options_.playerOptions.playbackRates},e.playbackRateSupported=function(){return this.player().tech_&&this.player().tech_.featuresPlaybackRate&&this.playbackRates()&&0<this.playbackRates().length},e.updateVisibility=function(){this.playbackRateSupported()?this.removeClass("vjs-hidden"):this.addClass("vjs-hidden")},e.updateLabel=function(){this.playbackRateSupported()&&(this.labelEl_.innerHTML=this.player().playbackRate()+"x")},t}(Xn);ds.prototype.controlText_="Playback Rate",Bt.registerComponent("PlaybackRateMenuButton",ds);var ps=function(t){function e(){return t.apply(this,arguments)||this}p(e,t);var i=e.prototype;return i.buildCSSClass=function(){return"vjs-spacer "+t.prototype.buildCSSClass.call(this)},i.createEl=function(){return t.prototype.createEl.call(this,"div",{className:this.buildCSSClass()})},e}(Bt);Bt.registerComponent("Spacer",ps);var fs=function(e){function t(){return e.apply(this,arguments)||this}p(t,e);var i=t.prototype;return i.buildCSSClass=function(){return"vjs-custom-control-spacer "+e.prototype.buildCSSClass.call(this)},i.createEl=function(){var t=e.prototype.createEl.call(this,{className:this.buildCSSClass()});return t.innerHTML=" ",t},t}(ps);Bt.registerComponent("CustomControlSpacer",fs);var ms=function(t){function e(){return t.apply(this,arguments)||this}return p(e,t),e.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-control-bar",dir:"ltr"})},e}(Bt);ms.prototype.options_={children:["playToggle","volumePanel","currentTimeDisplay","timeDivider","durationDisplay","progressControl","liveDisplay","seekToLive","remainingTimeDisplay","customControlSpacer","playbackRateMenuButton","chaptersButton","descriptionsButton","subsCapsButton","audioTrackButton","fullscreenToggle"]},Bt.registerComponent("ControlBar",ms);var gs=function(n){function t(t,e){var i;return(i=n.call(this,t,e)||this).on(t,"error",i.open),i}p(t,n);var e=t.prototype;return e.buildCSSClass=function(){return"vjs-error-display "+n.prototype.buildCSSClass.call(this)},e.content=function(){var t=this.player().error();return t?this.localize(t.message):""},t}(Ae);gs.prototype.options_=jt(Ae.prototype.options_,{pauseOnOpen:!1,fillAlways:!0,temporary:!1,uncloseable:!0}),Bt.registerComponent("ErrorDisplay",gs);var vs="vjs-text-track-settings",ys=["#000","Black"],_s=["#00F","Blue"],bs=["#0FF","Cyan"],Ts=["#0F0","Green"],ws=["#F0F","Magenta"],ks=["#F00","Red"],Ss=["#FFF","White"],Cs=["#FF0","Yellow"],xs=["1","Opaque"],Es=["0.5","Semi-Transparent"],Ds=["0","Transparent"],As={backgroundColor:{selector:".vjs-bg-color > select",id:"captions-background-color-%s",label:"Color",options:[ys,Ss,ks,Ts,_s,Cs,ws,bs]},backgroundOpacity:{selector:".vjs-bg-opacity > select",id:"captions-background-opacity-%s",label:"Transparency",options:[xs,Es,Ds]},color:{selector:".vjs-fg-color > select",id:"captions-foreground-color-%s",label:"Color",options:[Ss,ys,ks,Ts,_s,Cs,ws,bs]},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(t){return"1.00"===t?null:Number(t)}},textOpacity:{selector:".vjs-text-opacity > select",id:"captions-foreground-opacity-%s",label:"Transparency",options:[xs,Es]},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:[Ds,Es,xs]}};function Is(t,e){if(e&&(t=e(t)),t&&"none"!==t)return t}As.windowColor.options=As.backgroundColor.options;var Os=function(n){function t(t,e){var i;return e.temporary=!1,(i=n.call(this,t,e)||this).updateDisplay=Tt(f(f(i)),i.updateDisplay),i.fill(),i.hasBeenOpened_=i.hasBeenFilled_=!0,i.endDialog=x("p",{className:"vjs-control-text",textContent:i.localize("End of dialog window.")}),i.el().appendChild(i.endDialog),i.setDefaults(),void 0===e.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()}),s(As,function(t){i.on(i.$(t.selector),"change",i.updateDisplay)}),i.options_.persistTextTrackSettings&&i.restoreSettings(),i}p(t,n);var e=t.prototype;return e.dispose=function(){this.endDialog=null,n.prototype.dispose.call(this)},e.createElSelect_=function(t,e,i){var n=this;void 0===e&&(e=""),void 0===i&&(i="label");var s=As[t],r=s.id.replace("%s",this.id_),a=[e,r].join(" ").trim();return["<"+i+' id="'+r+'" class="'+("label"===i?"vjs-label":"")+'">',this.localize(s.label),"</"+i+">",'<select aria-labelledby="'+a+'">'].concat(s.options.map(function(t){var e=r+"-"+t[1].replace(/\W+/g,"");return['<option id="'+e+'" value="'+t[0]+'" ','aria-labelledby="'+a+" "+e+'">',n.localize(t[1]),"</option>"].join("")})).concat("</select>").join("")},e.createElFgColor_=function(){var t="captions-text-legend-"+this.id_;return['<fieldset class="vjs-fg-color vjs-track-setting">','<legend id="'+t+'">',this.localize("Text"),"</legend>",this.createElSelect_("color",t),'<span class="vjs-text-opacity vjs-opacity">',this.createElSelect_("textOpacity",t),"</span>","</fieldset>"].join("")},e.createElBgColor_=function(){var t="captions-background-"+this.id_;return['<fieldset class="vjs-bg-color vjs-track-setting">','<legend id="'+t+'">',this.localize("Background"),"</legend>",this.createElSelect_("backgroundColor",t),'<span class="vjs-bg-opacity vjs-opacity">',this.createElSelect_("backgroundOpacity",t),"</span>","</fieldset>"].join("")},e.createElWinColor_=function(){var t="captions-window-"+this.id_;return['<fieldset class="vjs-window-color vjs-track-setting">','<legend id="'+t+'">',this.localize("Window"),"</legend>",this.createElSelect_("windowColor",t),'<span class="vjs-window-opacity vjs-opacity">',this.createElSelect_("windowOpacity",t),"</span>","</fieldset>"].join("")},e.createElColors_=function(){return x("div",{className:"vjs-track-settings-colors",innerHTML:[this.createElFgColor_(),this.createElBgColor_(),this.createElWinColor_()].join("")})},e.createElFont_=function(){return x("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("")})},e.createElControls_=function(){var t=this.localize("restore all settings to the default values");return x("div",{className:"vjs-track-settings-controls",innerHTML:['<button type="button" class="vjs-default-button" title="'+t+'">',this.localize("Reset"),'<span class="vjs-control-text"> '+t+"</span>","</button>",'<button type="button" class="vjs-done-button">'+this.localize("Done")+"</button>"].join("")})},e.content=function(){return[this.createElColors_(),this.createElFont_(),this.createElControls_()]},e.label=function(){return this.localize("Caption Settings Dialog")},e.description=function(){return this.localize("Beginning of dialog window. Escape will cancel and close the window.")},e.buildCSSClass=function(){return n.prototype.buildCSSClass.call(this)+" vjs-text-track-settings"},e.getValues=function(){var s=this;return function(i,n,t){return void 0===t&&(t=0),o(i).reduce(function(t,e){return n(t,i[e],e)},t)}(As,function(t,e,i){var n=function(t,e){return Is(t.options[t.options.selectedIndex].value,e)}(s.$(e.selector),e.parser);return void 0!==n&&(t[i]=n),t},{})},e.setValues=function(i){var n=this;s(As,function(t,e){!function(t,e,i){if(e)for(var n=0;n<t.options.length;n++)if(Is(t.options[n].value,i)===e){t.selectedIndex=n;break}}(n.$(t.selector),i[e],t.parser)})},e.setDefaults=function(){var i=this;s(As,function(t){var e=t.hasOwnProperty("default")?t.default:0;i.$(t.selector).selectedIndex=e})},e.restoreSettings=function(){var t;try{t=JSON.parse(y.localStorage.getItem(vs))}catch(t){m.warn(t)}t&&this.setValues(t)},e.saveSettings=function(){if(this.options_.persistTextTrackSettings){var t=this.getValues();try{Object.keys(t).length?y.localStorage.setItem(vs,JSON.stringify(t)):y.localStorage.removeItem(vs)}catch(t){m.warn(t)}}},e.updateDisplay=function(){var t=this.player_.getChild("textTrackDisplay");t&&t.updateDisplay()},e.conditionalBlur_=function(){this.previouslyActiveEl_=null,this.off(d,"keydown",this.handleKeyDown);var t=this.player_.controlBar,e=t&&t.subsCapsButton,i=t&&t.captionsButton;e?e.focus():i&&i.focus()},t}(Ae);Bt.registerComponent("TextTrackSettings",Os);var Ps=function(r){function t(t,e){var i,n=e.ResizeObserver||y.ResizeObserver;null===e.ResizeObserver&&(n=!1);var s=jt({createEl:!n,reportTouchActivity:!1},e);return(i=r.call(this,t,s)||this).ResizeObserver=e.ResizeObserver||y.ResizeObserver,i.loadListener_=null,i.resizeObserver_=null,i.debouncedHandler_=kt(function(){i.resizeHandler()},100,!1,f(f(i))),n?(i.resizeObserver_=new i.ResizeObserver(i.debouncedHandler_),i.resizeObserver_.observe(t.el())):(i.loadListener_=function(){i.el_&&i.el_.contentWindow&&ut(i.el_.contentWindow,"resize",i.debouncedHandler_)},i.one("load",i.loadListener_)),i}p(t,r);var e=t.prototype;return e.createEl=function(){return r.prototype.createEl.call(this,"iframe",{className:"vjs-resize-manager"})},e.resizeHandler=function(){this.player_&&this.player_.trigger&&this.player_.trigger("playerresize")},e.dispose=function(){this.debouncedHandler_&&this.debouncedHandler_.cancel(),this.resizeObserver_&&(this.player_.el()&&this.resizeObserver_.unobserve(this.player_.el()),this.resizeObserver_.disconnect()),this.el_&&this.el_.contentWindow&&ht(this.el_.contentWindow,"resize",this.debouncedHandler_),this.loadListener_&&this.off("load",this.loadListener_),this.ResizeObserver=null,this.resizeObserver=null,this.debouncedHandler_=null,this.loadListener_=null},t}(Bt);Bt.registerComponent("ResizeManager",Ps);var Ls=function(s){function t(t,e){var i,n=jt({createEl:!1},e);return(i=s.call(this,t,n)||this).reset_(),i.on(i.player_,"durationchange",i.handleDurationchange),i}p(t,s);var e=t.prototype;return e.isBehind_=function(){if(!this.timeupdateSeen_)return!1;var t=this.liveCurrentTime(),e=this.player_.currentTime(),i=this.seekableIncrement_;return t!==1/0&&e<=t-(2*i+.07)},e.trackLive_=function(){this.pastSeekEnd_=this.pastSeekEnd_;var t=this.player_.seekable();if(t&&t.length){var e=this.seekableEnd();e!==this.lastSeekEnd_&&(this.lastSeekEnd_&&(this.seekableIncrement_=Math.abs(e-this.lastSeekEnd_)),this.pastSeekEnd_=0,this.lastSeekEnd_=e,this.trigger("seekableendchange")),this.pastSeekEnd_=this.pastSeekEnd()+.03,this.isBehind_()!==this.behindLiveEdge()&&(this.behindLiveEdge_=this.isBehind_(),this.trigger("liveedgechange"))}},e.handleDurationchange=function(){this.player_.duration()===1/0?this.startTracking():this.stopTracking()},e.startTracking=function(){var t=this;this.isTracking()||(this.trackingInterval_=this.setInterval(this.trackLive_,30),this.trackLive_(),this.on(this.player_,"play",this.trackLive_),this.on(this.player_,"pause",this.trackLive_),this.one(this.player_,"play",this.handlePlay),this.timeupdateSeen_||(this.handleTimeupdate=function(){t.timeupdateSeen_=!0,t.handleTimeupdate=null},this.one(this.player_,"timeupdate",this.handleTimeupdate)))},e.handlePlay=function(){this.one(this.player_,"timeupdate",this.seekToLiveEdge)},e.reset_=function(){this.pastSeekEnd_=0,this.lastSeekEnd_=null,this.behindLiveEdge_=null,this.timeupdateSeen_=!1,this.clearInterval(this.trackingInterval_),this.trackingInterval_=null,this.seekableIncrement_=12,this.off(this.player_,"play",this.trackLive_),this.off(this.player_,"pause",this.trackLive_),this.off(this.player_,"play",this.handlePlay),this.off(this.player_,"timeupdate",this.seekToLiveEdge),this.handleTimeupdate&&(this.off(this.player_,"timeupdate",this.handleTimeupdate),this.handleTimeupdate=null)},e.stopTracking=function(){this.isTracking()&&this.reset_()},e.seekableEnd=function(){for(var t=this.player_.seekable(),e=[],i=t?t.length:0;i--;)e.push(t.end(i));return e.length?e.sort()[e.length-1]:1/0},e.seekableStart=function(){for(var t=this.player_.seekable(),e=[],i=t?t.length:0;i--;)e.push(t.start(i));return e.length?e.sort()[0]:0},e.liveWindow=function(){var t=this.liveCurrentTime();return t===1/0?1/0:t-this.seekableStart()},e.isLive=function(){return this.isTracking()},e.atLiveEdge=function(){return!this.behindLiveEdge()},e.liveCurrentTime=function(){return this.pastSeekEnd()+this.seekableEnd()},e.pastSeekEnd=function(){return this.pastSeekEnd_},e.behindLiveEdge=function(){return this.behindLiveEdge_},e.isTracking=function(){return"number"==typeof this.trackingInterval_},e.seekToLiveEdge=function(){this.atLiveEdge()||(this.player_.currentTime(this.liveCurrentTime()),this.player_.paused()&&this.player_.play())},e.dispose=function(){this.stopTracking(),s.prototype.dispose.call(this)},t}(Bt);Bt.registerComponent("LiveTracker",Ls);function Ms(t){var e=t.el();if(e.hasAttribute("src"))return t.triggerSourceset(e.src),!0;var i=t.$$("source"),n=[],s="";if(!i.length)return!1;for(var r=0;r<i.length;r++){var a=i[r].src;a&&-1===n.indexOf(a)&&n.push(a)}return!!n.length&&(1===n.length&&(s=n[0]),t.triggerSourceset(s),!0)}function Ns(t,e){for(var i={},n=0;n<t.length&&!((i=Object.getOwnPropertyDescriptor(t[n],e))&&i.set&&i.get);n++);return i.enumerable=!0,i.configurable=!0,i}function Rs(r){var a=r.el();if(!a.resetSourceWatch_){function e(s){return function(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];var n=s.apply(a,e);return Ms(r),n}}var i={},t=function(t){return Ns([t.el(),y.HTMLMediaElement.prototype,y.Element.prototype,js],"innerHTML")}(r);["append","appendChild","insertAdjacentHTML"].forEach(function(t){a[t]&&(i[t]=a[t],a[t]=e(i[t]))}),Object.defineProperty(a,"innerHTML",jt(t,{set:e(t.set)})),a.resetSourceWatch_=function(){a.resetSourceWatch_=null,Object.keys(i).forEach(function(t){a[t]=i[t]}),Object.defineProperty(a,"innerHTML",t)},r.one("sourceset",a.resetSourceWatch_)}}function Us(n){if(n.featuresSourceset){var s=n.el();if(!s.resetSourceset_){var i=function(t){return Ns([t.el(),y.HTMLMediaElement.prototype,Bs],"src")}(n),r=s.setAttribute,e=s.load;Object.defineProperty(s,"src",jt(i,{set:function(t){var e=i.set.call(s,t);return n.triggerSourceset(s.src),e}})),s.setAttribute=function(t,e){var i=r.call(s,t,e);return/src/i.test(t)&&n.triggerSourceset(s.src),i},s.load=function(){var t=e.call(s);return Ms(n)||(n.triggerSourceset(""),Rs(n)),t},s.currentSrc?n.triggerSourceset(s.currentSrc):Ms(n)||Rs(n),s.resetSourceset_=function(){s.resetSourceset_=null,s.load=e,s.setAttribute=r,Object.defineProperty(s,"src",i),s.resetSourceWatch_&&s.resetSourceWatch_()}}}}var js=Object.defineProperty({},"innerHTML",{get:function(){return this.cloneNode(!0).innerHTML},set:function(t){var e=d.createElement(this.nodeName.toLowerCase());e.innerHTML=t;for(var i=d.createDocumentFragment();e.childNodes.length;)i.appendChild(e.childNodes[0]);return this.innerText="",y.Element.prototype.appendChild.call(this,i),this.innerHTML}}),Bs=Object.defineProperty({},"src",{get:function(){return this.hasAttribute("src")?Ne(y.Element.prototype.getAttribute.call(this,"src")):""},set:function(t){return y.Element.prototype.setAttribute.call(this,"src",t),t}});function Hs(){var t=e(["Text Tracks are being loaded from another origin but the crossorigin attribute isn't used.\n            This may prevent text tracks from loading."]);return Hs=function(){return t},t}var Fs=function(u){function o(t,e){var i;i=u.call(this,t,e)||this;var n=t.source,s=!1;if(n&&(i.el_.currentSrc!==n.src||t.tag&&3===t.tag.initNetworkState_)?i.setSource(n):i.handleLateInit_(i.el_),t.enableSourceset&&i.setupSourcesetHandling_(),i.el_.hasChildNodes()){for(var r=i.el_.childNodes,a=r.length,o=[];a--;){var l=r[a];"track"===l.nodeName.toLowerCase()&&(i.featuresNativeTextTracks?(i.remoteTextTrackEls().addTrackElement_(l),i.remoteTextTracks().addTrack(l.track),i.textTracks().addTrack(l.track),s||i.el_.hasAttribute("crossorigin")||!Ue(l.src)||(s=!0)):o.push(l))}for(var c=0;c<o.length;c++)i.el_.removeChild(o[c])}return i.proxyNativeTracks_(),i.featuresNativeTextTracks&&s&&m.warn(v(Hs())),i.restoreMetadataTracksInIOSNativePlayer_(),(le||Gt||te)&&!0===t.nativeControlsForTouch&&i.setControls(!0),i.proxyWebkitFullscreen_(),i.triggerReady(),i}p(o,u);var t=o.prototype;return t.dispose=function(){this.el_&&this.el_.resetSourceset_&&this.el_.resetSourceset_(),o.disposeMediaElement(this.el_),this.options_=null,u.prototype.dispose.call(this)},t.setupSourcesetHandling_=function(){Us(this)},t.restoreMetadataTracksInIOSNativePlayer_=function(){function t(){i=[];for(var t=0;t<n.length;t++){var e=n[t];"metadata"===e.kind&&i.push({track:e,storedMode:e.mode})}}var i,n=this.textTracks();t(),n.addEventListener("change",t),this.on("dispose",function(){return n.removeEventListener("change",t)});function s(){for(var t=0;t<i.length;t++){var e=i[t];"disabled"===e.track.mode&&e.track.mode!==e.storedMode&&(e.track.mode=e.storedMode)}n.removeEventListener("change",s)}this.on("webkitbeginfullscreen",function(){n.removeEventListener("change",t),n.removeEventListener("change",s),n.addEventListener("change",s)}),this.on("webkitendfullscreen",function(){n.removeEventListener("change",t),n.addEventListener("change",t),n.removeEventListener("change",s)})},t.overrideNative_=function(t,e){var i=this;if(e===this["featuresNative"+t+"Tracks"]){var n=t.toLowerCase();this[n+"TracksListeners_"]&&Object.keys(this[n+"TracksListeners_"]).forEach(function(t){i.el()[n+"Tracks"].removeEventListener(t,i[n+"TracksListeners_"][t])}),this["featuresNative"+t+"Tracks"]=!e,this[n+"TracksListeners_"]=null,this.proxyNativeTracksForType_(n)}},t.overrideNativeAudioTracks=function(t){this.overrideNative_("Audio",t)},t.overrideNativeVideoTracks=function(t){this.overrideNative_("Video",t)},t.proxyNativeTracksForType_=function(t){var n=this,e=bi[t],s=this.el()[e.getterName],r=this[e.getterName]();if(this["featuresNative"+e.capitalName+"Tracks"]&&s&&s.addEventListener){function i(){for(var t=[],e=0;e<r.length;e++){for(var i=!1,n=0;n<s.length;n++)if(s[n]===r[e]){i=!0;break}i||t.push(r[e])}for(;t.length;)r.removeTrack(t.shift())}var a={change:function(){r.trigger({type:"change",target:r,currentTarget:r,srcElement:r})},addtrack:function(t){r.addTrack(t.track)},removetrack:function(t){r.removeTrack(t.track)}};this[e.getterName+"Listeners_"]=a,Object.keys(a).forEach(function(e){var i=a[e];s.addEventListener(e,i),n.on("dispose",function(t){return s.removeEventListener(e,i)})}),this.on("loadstart",i),this.on("dispose",function(t){return n.off("loadstart",i)})}},t.proxyNativeTracks_=function(){var e=this;bi.names.forEach(function(t){e.proxyNativeTracksForType_(t)})},t.createEl=function(){var t=this.options_.tag;if(!t||!this.options_.playerElIngest&&!this.movingMediaElementInDOM){if(t){var e=t.cloneNode(!0);t.parentNode&&t.parentNode.insertBefore(e,t),o.disposeMediaElement(t),t=e}else{t=d.createElement("video");var i=jt({},this.options_.tag&&M(this.options_.tag));le&&!0===this.options_.nativeControlsForTouch||delete i.controls,L(t,_(i,{id:this.options_.techId,class:"vjs-tech"}))}t.playerId=this.options_.playerId}void 0!==this.options_.preload&&R(t,"preload",this.options_.preload);for(var n=["loop","muted","playsinline","autoplay"],s=0;s<n.length;s++){var r=n[s],a=this.options_[r];void 0!==a&&(a?R(t,r,r):U(t,r),t[r]=a)}return t},t.handleLateInit_=function(t){if(0!==t.networkState&&3!==t.networkState){if(0===t.readyState){function e(){i=!0}var i=!1;this.on("loadstart",e);function n(){i||this.trigger("loadstart")}return this.on("loadedmetadata",n),void this.ready(function(){this.off("loadstart",e),this.off("loadedmetadata",n),i||this.trigger("loadstart")})}var s=["loadstart"];s.push("loadedmetadata"),2<=t.readyState&&s.push("loadeddata"),3<=t.readyState&&s.push("canplay"),4<=t.readyState&&s.push("canplaythrough"),this.ready(function(){s.forEach(function(t){this.trigger(t)},this)})}},t.setCurrentTime=function(t){try{this.el_.currentTime=t}catch(t){m(t,"Video is not ready. (Video.js)")}},t.duration=function(){var e=this;if(this.el_.duration===1/0&&Jt&&ne&&0===this.el_.currentTime){return this.on("timeupdate",function t(){0<e.el_.currentTime&&(e.el_.duration===1/0&&e.trigger("durationchange"),e.off("timeupdate",t))}),NaN}return this.el_.duration||NaN},t.width=function(){return this.el_.offsetWidth},t.height=function(){return this.el_.offsetHeight},t.proxyWebkitFullscreen_=function(){var t=this;if("webkitDisplayingFullscreen"in this.el_){function e(){this.trigger("fullscreenchange",{isFullscreen:!1})}function i(){"webkitPresentationMode"in this.el_&&"picture-in-picture"!==this.el_.webkitPresentationMode&&(this.one("webkitendfullscreen",e),this.trigger("fullscreenchange",{isFullscreen:!0}))}this.on("webkitbeginfullscreen",i),this.on("dispose",function(){t.off("webkitbeginfullscreen",i),t.off("webkitendfullscreen",e)})}},t.supportsFullScreen=function(){if("function"==typeof this.el_.webkitEnterFullScreen){var t=y.navigator&&y.navigator.userAgent||"";if(/Android/.test(t)||!/Chrome|Mac OS X 10.5/.test(t))return!0}return!1},t.enterFullScreen=function(){var t=this.el_;t.paused&&t.networkState<=t.HAVE_METADATA?(this.el_.play(),this.setTimeout(function(){t.pause(),t.webkitEnterFullScreen()},0)):t.webkitEnterFullScreen()},t.exitFullScreen=function(){this.el_.webkitExitFullScreen()},t.src=function(t){if(void 0===t)return this.el_.src;this.setSrc(t)},t.reset=function(){o.resetMediaElement(this.el_)},t.currentSrc=function(){return this.currentSource_?this.currentSource_.src:this.el_.currentSrc},t.setControls=function(t){this.el_.controls=!!t},t.addTextTrack=function(t,e,i){return this.featuresNativeTextTracks?this.el_.addTextTrack(t,e,i):u.prototype.addTextTrack.call(this,t,e,i)},t.createRemoteTextTrack=function(t){if(!this.featuresNativeTextTracks)return u.prototype.createRemoteTextTrack.call(this,t);var e=d.createElement("track");return t.kind&&(e.kind=t.kind),t.label&&(e.label=t.label),(t.language||t.srclang)&&(e.srclang=t.language||t.srclang),t.default&&(e.default=t.default),t.id&&(e.id=t.id),t.src&&(e.src=t.src),e},t.addRemoteTextTrack=function(t,e){var i=u.prototype.addRemoteTextTrack.call(this,t,e);return this.featuresNativeTextTracks&&this.el().appendChild(i),i},t.removeRemoteTextTrack=function(t){if(u.prototype.removeRemoteTextTrack.call(this,t),this.featuresNativeTextTracks)for(var e=this.$$("track"),i=e.length;i--;)t!==e[i]&&t!==e[i].track||this.el().removeChild(e[i])},t.getVideoPlaybackQuality=function(){if("function"==typeof this.el().getVideoPlaybackQuality)return this.el().getVideoPlaybackQuality();var t={};return void 0!==this.el().webkitDroppedFrameCount&&void 0!==this.el().webkitDecodedFrameCount&&(t.droppedVideoFrames=this.el().webkitDroppedFrameCount,t.totalVideoFrames=this.el().webkitDecodedFrameCount),y.performance&&"function"==typeof y.performance.now?t.creationTime=y.performance.now():y.performance&&y.performance.timing&&"number"==typeof y.performance.timing.navigationStart&&(t.creationTime=y.Date.now()-y.performance.timing.navigationStart),t},o}(Ji);if(w()){Fs.TEST_VID=d.createElement("video");var zs=d.createElement("track");zs.kind="captions",zs.srclang="en",zs.label="English",Fs.TEST_VID.appendChild(zs)}Fs.isSupported=function(){try{Fs.TEST_VID.volume=.5}catch(t){return!1}return!(!Fs.TEST_VID||!Fs.TEST_VID.canPlayType)},Fs.canPlayType=function(t){return Fs.TEST_VID.canPlayType(t)},Fs.canPlaySource=function(t,e){return Fs.canPlayType(t.type)},Fs.canControlVolume=function(){try{var t=Fs.TEST_VID.volume;return Fs.TEST_VID.volume=t/2+.1,t!==Fs.TEST_VID.volume}catch(t){return!1}},Fs.canMuteVolume=function(){try{var t=Fs.TEST_VID.muted;return Fs.TEST_VID.muted=!t,Fs.TEST_VID.muted?R(Fs.TEST_VID,"muted","muted"):U(Fs.TEST_VID,"muted"),t!==Fs.TEST_VID.muted}catch(t){return!1}},Fs.canControlPlaybackRate=function(){if(Jt&&ne&&se<58)return!1;try{var t=Fs.TEST_VID.playbackRate;return Fs.TEST_VID.playbackRate=t/2+.1,t!==Fs.TEST_VID.playbackRate}catch(t){return!1}},Fs.canOverrideAttributes=function(){try{function t(){}Object.defineProperty(d.createElement("video"),"src",{get:t,set:t}),Object.defineProperty(d.createElement("audio"),"src",{get:t,set:t}),Object.defineProperty(d.createElement("video"),"innerHTML",{get:t,set:t}),Object.defineProperty(d.createElement("audio"),"innerHTML",{get:t,set:t})}catch(t){return!1}return!0},Fs.supportsNativeTextTracks=function(){return oe||Kt&&ne},Fs.supportsNativeVideoTracks=function(){return!(!Fs.TEST_VID||!Fs.TEST_VID.videoTracks)},Fs.supportsNativeAudioTracks=function(){return!(!Fs.TEST_VID||!Fs.TEST_VID.audioTracks)},Fs.Events=["loadstart","suspend","abort","error","emptied","stalled","loadedmetadata","loadeddata","canplay","canplaythrough","playing","waiting","seeking","seeked","ended","durationchange","timeupdate","progress","play","pause","ratechange","resize","volumechange"],Fs.prototype.featuresVolumeControl=Fs.canControlVolume(),Fs.prototype.featuresMuteControl=Fs.canMuteVolume(),Fs.prototype.featuresPlaybackRate=Fs.canControlPlaybackRate(),Fs.prototype.featuresSourceset=Fs.canOverrideAttributes(),Fs.prototype.movingMediaElementInDOM=!Kt,Fs.prototype.featuresFullscreenResize=!0,Fs.prototype.featuresProgressEvents=!0,Fs.prototype.featuresTimeupdateEvents=!0,Fs.prototype.featuresNativeTextTracks=Fs.supportsNativeTextTracks(),Fs.prototype.featuresNativeVideoTracks=Fs.supportsNativeVideoTracks(),Fs.prototype.featuresNativeAudioTracks=Fs.supportsNativeAudioTracks();var Ws=Fs.TEST_VID&&Fs.TEST_VID.constructor.prototype.canPlayType,$s=/^application\/(?:x-|vnd\.apple\.)mpegurl/i;function qs(){var t=e(["\n        Using the tech directly can be dangerous. I hope you know what you're doing.\n        See https://github.com/videojs/video.js/issues/2617 for more info.\n      "]);return qs=function(){return t},t}Fs.patchCanPlayType=function(){4<=Zt&&!ee&&!ne&&(Fs.TEST_VID.constructor.prototype.canPlayType=function(t){return t&&$s.test(t)?"maybe":Ws.call(this,t)})},Fs.unpatchCanPlayType=function(){var t=Fs.TEST_VID.constructor.prototype.canPlayType;return Fs.TEST_VID.constructor.prototype.canPlayType=Ws,t},Fs.patchCanPlayType(),Fs.disposeMediaElement=function(t){if(t){for(t.parentNode&&t.parentNode.removeChild(t);t.hasChildNodes();)t.removeChild(t.firstChild);t.removeAttribute("src"),"function"==typeof t.load&&function(){try{t.load()}catch(t){}}()}},Fs.resetMediaElement=function(t){if(t){for(var e=t.querySelectorAll("source"),i=e.length;i--;)t.removeChild(e[i]);t.removeAttribute("src"),"function"==typeof t.load&&function(){try{t.load()}catch(t){}}()}},["muted","defaultMuted","autoplay","controls","loop","playsinline"].forEach(function(t){Fs.prototype[t]=function(){return this.el_[t]||this.el_.hasAttribute(t)}}),["muted","defaultMuted","autoplay","loop","playsinline"].forEach(function(e){Fs.prototype["set"+Ut(e)]=function(t){(this.el_[e]=t)?this.el_.setAttribute(e,e):this.el_.removeAttribute(e)}}),["paused","currentTime","buffered","volume","poster","preload","error","seeking","seekable","ended","playbackRate","defaultPlaybackRate","played","networkState","readyState","videoWidth","videoHeight"].forEach(function(t){Fs.prototype[t]=function(){return this.el_[t]}}),["volume","src","poster","preload","playbackRate","defaultPlaybackRate"].forEach(function(e){Fs.prototype["set"+Ut(e)]=function(t){this.el_[e]=t}}),["pause","load","play"].forEach(function(t){Fs.prototype[t]=function(){return this.el_[t]()}}),Ji.withSourceHandlers(Fs),Fs.nativeSourceHandler={},Fs.nativeSourceHandler.canPlayType=function(t){try{return Fs.TEST_VID.canPlayType(t)}catch(t){return""}},Fs.nativeSourceHandler.canHandleSource=function(t,e){if(t.type)return Fs.nativeSourceHandler.canPlayType(t.type);if(t.src){var i=Re(t.src);return Fs.nativeSourceHandler.canPlayType("video/"+i)}return""},Fs.nativeSourceHandler.handleSource=function(t,e,i){e.setSrc(t.src)},Fs.nativeSourceHandler.dispose=function(){},Fs.registerSourceHandler(Fs.nativeSourceHandler),Ji.registerTech("Html5",Fs);var Vs=["progress","abort","suspend","emptied","stalled","loadedmetadata","loadeddata","timeupdate","resize","volumechange","texttrackchange"],Ys={canplay:"CanPlay",canplaythrough:"CanPlayThrough",playing:"Playing",seeked:"Seeked"},Gs=["tiny","xsmall","small","medium","large","xlarge","huge"],Xs={};Gs.forEach(function(t){var e="x"===t.charAt(0)?"x-"+t.substring(1):t;Xs[t]="vjs-layout-"+e});var Ks={tiny:210,xsmall:320,small:425,medium:768,large:1440,xlarge:2560,huge:1/0},Qs=function(u){function h(t,e,i){var n;if(t.id=t.id||e.id||"vjs_video_"+Z(),(e=_(h.getTagSettings(t),e)).initChildren=!1,e.createEl=!1,e.evented=!1,e.reportTouchActivity=!1,!e.language)if("function"==typeof t.closest){var s=t.closest("[lang]");s&&s.getAttribute&&(e.language=s.getAttribute("lang"))}else for(var r=t;r&&1===r.nodeType;){if(M(r).hasOwnProperty("lang")){e.language=r.getAttribute("lang");break}r=r.parentNode}if((n=u.call(this,null,e,i)||this).log=g(n.id_),n.isPosterFromTech_=!1,n.queuedCallbacks_=[],n.isReady_=!1,n.hasStarted_=!1,n.userActive_=!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=t,n.tagAttributes=t&&M(t),n.language(n.options_.language),e.languages){var a={};Object.getOwnPropertyNames(e.languages).forEach(function(t){a[t.toLowerCase()]=e.languages[t]}),n.languages_=a}else n.languages_=h.prototype.options_.languages;n.cache_={},n.poster_=e.poster||"",n.controls_=!!e.controls,n.cache_.lastVolume=1,t.controls=!1,t.removeAttribute("controls"),t.hasAttribute("autoplay")?n.options_.autoplay=!0:n.autoplay(n.options_.autoplay),n.scrubbing_=!1,n.el_=n.createEl(),n.cache_.lastPlaybackRate=n.defaultPlaybackRate(),Mt(f(f(n)),{eventBusKey:"el_"}),n.fluid_&&n.on("playerreset",n.updateStyleEl_);var o=jt(n.options_);if(e.plugins){var l=e.plugins;Object.keys(l).forEach(function(t){if("function"!=typeof this[t])throw new Error('plugin "'+t+'" does not exist');this[t](l[t])},f(f(n)))}n.options_.playerOptions=o,n.middleware_=[],n.initChildren(),n.isAudio("audio"===t.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"),Kt||n.addClass("vjs-workinghover"),h.players[n.id_]=f(f(n));var c="7.4.1".split(".")[0];return n.addClass("vjs-v"+c),n.userActive(!0),n.reportUserActivity(),n.one("play",n.listenForUserActivity_),n.on("fullscreenchange",n.handleFullscreenChange_),n.on("stageclick",n.handleStageClick_),n.breakpoints(n.options_.breakpoints),n.responsive(n.options_.responsive),n.changingSrc_=!1,n.playWaitingForReady_=!1,n.playOnLoadstart_=null,n}p(h,u);var t=h.prototype;return t.dispose=function(){this.trigger("dispose"),this.off("dispose"),this.styleEl_&&this.styleEl_.parentNode&&(this.styleEl_.parentNode.removeChild(this.styleEl_),this.styleEl_=null),h.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(t){tn[t.id()]=null}(this),u.prototype.dispose.call(this)},t.createEl=function(){var e,i=this.tag,t=this.playerElIngest_=i.parentNode&&i.parentNode.hasAttribute&&i.parentNode.hasAttribute("data-vjs-player"),n="video-js"===this.tag.tagName.toLowerCase();t?e=this.el_=i.parentNode:n||(e=this.el_=u.prototype.createEl.call(this,"div"));var s=M(i);if(n){for(e=this.el_=i,i=this.tag=d.createElement("video");e.children.length;)i.appendChild(e.firstChild);A(e,"video-js")||I(e,"video-js"),e.appendChild(i),t=this.playerElIngest_=e,Object.keys(e).forEach(function(t){i[t]=e[t]})}if(i.setAttribute("tabindex","-1"),s.tabindex="-1",re&&(i.setAttribute("role","application"),s.role="application"),i.removeAttribute("width"),i.removeAttribute("height"),"width"in s&&delete s.width,"height"in s&&delete s.height,Object.getOwnPropertyNames(s).forEach(function(t){n&&"class"===t||e.setAttribute(t,s[t]),n&&i.setAttribute(t,s[t])}),i.playerId=i.id,i.id+="_html5_api",i.className="vjs-tech",i.player=e.player=this,this.addClass("vjs-paused"),!0!==y.VIDEOJS_NO_DYNAMIC_STYLE){this.styleEl_=_t("vjs-styles-dimensions");var r=X(".vjs-styles-defaults"),a=X("head");a.insertBefore(this.styleEl_,r?r.nextSibling:a.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);for(var o=i.getElementsByTagName("a"),l=0;l<o.length;l++){var c=o.item(l);I(c,"vjs-hidden"),c.setAttribute("hidden","hidden")}return i.initNetworkState_=i.networkState,i.parentNode&&!t&&i.parentNode.insertBefore(e,i),D(i,e),this.children_.unshift(i),this.el_.setAttribute("lang",this.language_),this.el_=e},t.width=function(t){return this.dimension("width",t)},t.height=function(t){return this.dimension("height",t)},t.dimension=function(t,e){var i=t+"_";if(void 0===e)return this[i]||0;if(""===e)return this[i]=void 0,void this.updateStyleEl_();var n=parseFloat(e);isNaN(n)?m.error('Improper value "'+e+'" supplied for for '+t):(this[i]=n,this.updateStyleEl_())},t.fluid=function(t){if(void 0===t)return!!this.fluid_;this.fluid_=!!t,Pt(this)&&this.off("playerreset",this.updateStyleEl_),t?(this.addClass("vjs-fluid"),this.fill(!1),function(t,e){Pt(t)?e():(t.eventedCallbacks||(t.eventedCallbacks=[]),t.eventedCallbacks.push(e))}(function(){this.on("playerreset",this.updateStyleEl_)})):this.removeClass("vjs-fluid"),this.updateStyleEl_()},t.fill=function(t){if(void 0===t)return!!this.fill_;this.fill_=!!t,t?(this.addClass("vjs-fill"),this.fluid(!1)):this.removeClass("vjs-fill")},t.aspectRatio=function(t){if(void 0===t)return this.aspectRatio_;if(!/^\d+\:\d+$/.test(t))throw new Error("Improper value supplied for aspect ratio. The format should be width:height, for example 16:9.");this.aspectRatio_=t,this.fluid(!0),this.updateStyleEl_()},t.updateStyleEl_=function(){if(!0!==y.VIDEOJS_NO_DYNAMIC_STYLE){var t,e,i,n=(void 0!==this.aspectRatio_&&"auto"!==this.aspectRatio_?this.aspectRatio_:0<this.videoWidth()?this.videoWidth()+":"+this.videoHeight():"16:9").split(":"),s=n[1]/n[0];t=void 0!==this.width_?this.width_:void 0!==this.height_?this.height_/s:this.videoWidth()||300,e=void 0!==this.height_?this.height_:t*s,i=/^[^a-zA-Z]/.test(this.id())?"dimensions-"+this.id():this.id()+"-dimensions",this.addClass(i),bt(this.styleEl_,"\n      ."+i+" {\n        width: "+t+"px;\n        height: "+e+"px;\n      }\n\n      ."+i+".vjs-fluid {\n        padding-top: "+100*s+"%;\n      }\n    ")}else{var r="number"==typeof this.width_?this.width_:this.options_.width,a="number"==typeof this.height_?this.height_:this.options_.height,o=this.tech_&&this.tech_.el();o&&(0<=r&&(o.width=r),0<=a&&(o.height=a))}},t.loadTech_=function(t,e){var i=this;this.tech_&&this.unloadTech_();var n=Ut(t),s=t.charAt(0).toLowerCase()+t.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 r={source:e,autoplay:"string"!=typeof this.autoplay()&&this.autoplay(),nativeControlsForTouch:this.options_.nativeControlsForTouch,playerId:this.id(),techId:this.id()+"_"+s+"_api",playsinline:this.options_.playsinline,preload:this.options_.preload,loop:this.options_.loop,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};wi.names.forEach(function(t){var e=wi[t];r[e.getterName]=i[e.privateName]}),_(r,this.options_[n]),_(r,this.options_[s]),_(r,this.options_[t.toLowerCase()]),this.tag&&(r.tag=this.tag),e&&e.src===this.cache_.src&&0<this.cache_.currentTime&&(r.startTime=this.cache_.currentTime);var a=Ji.getTech(t);if(!a)throw new Error("No Tech named '"+n+"' exists! '"+n+"' should be registered using videojs.registerTech()'");this.tech_=new a(r),this.tech_.ready(Tt(this,this.handleTechReady_),!0),Ee(this.textTracksJson_||[],this.tech_),Vs.forEach(function(t){i.on(i.tech_,t,i["handleTech"+Ut(t)+"_"])}),Object.keys(Ys).forEach(function(e){i.on(i.tech_,e,function(t){0===i.tech_.playbackRate()&&i.tech_.seeking()?i.queuedCallbacks_.push({callback:i["handleTech"+Ys[e]+"_"].bind(i),event:t}):i["handleTech"+Ys[e]+"_"](t)})}),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_,"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||D(this.tech_.el(),this.el()),this.tag&&(this.tag.player=null,this.tag=null)},t.unloadTech_=function(){var i=this;wi.names.forEach(function(t){var e=wi[t];i[e.privateName]=i[e.getterName]()}),this.textTracksJson_=xe(this.tech_),this.isReady_=!1,this.tech_.dispose(),this.tech_=!1,this.isPosterFromTech_&&(this.poster_="",this.trigger("posterchange")),this.isPosterFromTech_=!1},t.tech=function(t){return void 0===t&&m.warn(v(qs())),this.tech_},t.addTechControlsListeners_=function(){this.removeTechControlsListeners_(),this.on(this.tech_,"mousedown",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_)},t.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_,"mousedown",this.handleTechClick_),this.off(this.tech_,"dblclick",this.handleTechDoubleClick_)},t.handleTechReady_=function(){this.triggerReady(),this.cache_.volume&&this.techCall_("setVolume",this.cache_.volume),this.handleTechPosterChange_(),this.handleTechDurationChange_()},t.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())},t.manualAutoplay_=function(e){var i=this;if(this.tech_&&"string"==typeof e){function t(){var e=i.muted();i.muted(!0);var t=i.play();if(t&&t.then&&t.catch)return t.catch(function(t){i.muted(e)})}var n;if("any"===e?(n=this.play())&&n.then&&n.catch&&n.catch(function(){return t()}):n="muted"===e?t():this.play(),n&&n.then&&n.catch)return n.then(function(){i.trigger({type:"autoplay-success",autoplay:e})}).catch(function(t){i.trigger({type:"autoplay-failure",autoplay:e})})}},t.updateSourceCaches_=function(t){void 0===t&&(t="");var e=t,i="";"string"!=typeof e&&(e=t.src,i=t.type),this.cache_.source=this.cache_.source||{},this.cache_.sources=this.cache_.sources||[],e&&!i&&(i=function(t,e){if(!e)return"";if(t.cache_.source.src===e&&t.cache_.source.type)return t.cache_.source.type;var i=t.cache_.sources.filter(function(t){return t.src===e});if(i.length)return i[0].type;for(var n=t.$$("source"),s=0;s<n.length;s++){var r=n[s];if(r.type&&r.src&&r.src===e)return r.type}return un(e)}(this,e)),this.cache_.source=jt({},t,{src:e,type:i});for(var n=this.cache_.sources.filter(function(t){return t.src&&t.src===e}),s=[],r=this.$$("source"),a=[],o=0;o<r.length;o++){var l=M(r[o]);s.push(l),l.src&&l.src===e&&a.push(l.src)}a.length&&!n.length?this.cache_.sources=s:n.length||(this.cache_.sources=[this.cache_.source]),this.cache_.src=e},t.handleTechSourceset_=function(t){var n=this;if(!this.changingSrc_){var e=function(t){return n.updateSourceCaches_(t)},i=this.currentSource().src,s=t.src;if(i&&!/^blob:/.test(i)&&/^blob:/.test(s)&&(this.lastSource_&&(this.lastSource_.tech===s||this.lastSource_.player===i)||(e=function(){})),e(s),!t.src){this.tech_.one(["sourceset","loadstart"],function t(e){if("sourceset"!==e.type){var i=n.techGet("currentSrc");n.lastSource_.tech=i,n.updateSourceCaches_(i)}n.tech_.off(["sourceset","loadstart"],t)})}}this.lastSource_={player:this.currentSource().src,tech:t.src},this.trigger({src:t.src,type:"sourceset"})},t.hasStarted=function(t){if(void 0===t)return this.hasStarted_;t!==this.hasStarted_&&(this.hasStarted_=t,this.hasStarted_?(this.addClass("vjs-has-started"),this.trigger("firstplay")):this.removeClass("vjs-has-started"))},t.handleTechPlay_=function(){this.removeClass("vjs-ended"),this.removeClass("vjs-paused"),this.addClass("vjs-playing"),this.hasStarted(!0),this.trigger("play")},t.handleTechRateChange_=function(){0<this.tech_.playbackRate()&&0===this.cache_.lastPlaybackRate&&(this.queuedCallbacks_.forEach(function(t){return t.callback(t.event)}),this.queuedCallbacks_=[]),this.cache_.lastPlaybackRate=this.tech_.playbackRate(),this.trigger("ratechange")},t.handleTechWaiting_=function(){var e=this;this.addClass("vjs-waiting"),this.trigger("waiting");var i=this.currentTime();this.on("timeupdate",function t(){i!==e.currentTime()&&(e.removeClass("vjs-waiting"),e.off("timeupdate",t))})},t.handleTechCanPlay_=function(){this.removeClass("vjs-waiting"),this.trigger("canplay")},t.handleTechCanPlayThrough_=function(){this.removeClass("vjs-waiting"),this.trigger("canplaythrough")},t.handleTechPlaying_=function(){this.removeClass("vjs-waiting"),this.trigger("playing")},t.handleTechSeeking_=function(){this.addClass("vjs-seeking"),this.trigger("seeking")},t.handleTechSeeked_=function(){this.removeClass("vjs-seeking"),this.trigger("seeked")},t.handleTechFirstPlay_=function(){this.options_.starttime&&(m.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")},t.handleTechPause_=function(){this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.trigger("pause")},t.handleTechEnded_=function(){this.addClass("vjs-ended"),this.options_.loop?(this.currentTime(0),this.play()):this.paused()||this.pause(),this.trigger("ended")},t.handleTechDurationChange_=function(){this.duration(this.techGet_("duration"))},t.handleTechClick_=function(t){G(t)&&this.controls_&&(this.paused()?Se(this.play()):this.pause())},t.handleTechDoubleClick_=function(e){this.controls_&&(Array.prototype.some.call(this.$$(".vjs-control-bar, .vjs-modal-dialog"),function(t){return t.contains(e.target)})||(this.isFullscreen()?this.exitFullscreen():this.requestFullscreen()))},t.handleTechTap_=function(){this.userActive(!this.userActive())},t.handleTechTouchStart_=function(){this.userWasActive=this.userActive()},t.handleTechTouchMove_=function(){this.userWasActive&&this.reportUserActivity()},t.handleTechTouchEnd_=function(t){t.preventDefault()},t.handleFullscreenChange_=function(){this.isFullscreen()?this.addClass("vjs-fullscreen"):this.removeClass("vjs-fullscreen")},t.handleStageClick_=function(){this.reportUserActivity()},t.handleTechFullscreenChange_=function(t,e){e&&this.isFullscreen(e.isFullscreen),this.trigger("fullscreenchange")},t.handleTechError_=function(){var t=this.tech_.error();this.error(t)},t.handleTechTextData_=function(t,e){var i=null;1<arguments.length&&(i=e),this.trigger("textdata",i)},t.getCache=function(){return this.cache_},t.techCall_=function(t,e){this.ready(function(){if(t in an)return function(t,e,i,n){return e[i](t.reduce(ln(i),n))}(this.middleware_,this.tech_,t,e);if(t in on)return sn(this.middleware_,this.tech_,t,e);try{this.tech_&&this.tech_[t](e)}catch(t){throw m(t),t}},!0)},t.techGet_=function(e){if(this.tech_&&this.tech_.isReady_){if(e in rn)return function(t,e,i){return t.reduceRight(ln(i),e[i]())}(this.middleware_,this.tech_,e);if(e in on)return sn(this.middleware_,this.tech_,e);try{return this.tech_[e]()}catch(t){if(void 0===this.tech_[e])throw m("Video.js: "+e+" method not defined for "+this.techName_+" playback technology.",t),t;if("TypeError"===t.name)throw m("Video.js: "+e+" unavailable on "+this.techName_+" playback technology element.",t),this.tech_.isReady_=!1,t;throw m(t),t}}},t.play=function(){var e=this,t=this.options_.Promise||y.Promise;return t?new t(function(t){e.play_(t)}):this.play_()},t.play_=function(t){var e=this;if(void 0===t&&(t=Se),this.playOnLoadstart_&&this.off("loadstart",this.playOnLoadstart_),this.isReady_){if(!this.changingSrc_&&(this.src()||this.currentSrc()))return void t(this.techGet_("play"));this.playOnLoadstart_=function(){e.playOnLoadstart_=null,t(e.play())},this.one("loadstart",this.playOnLoadstart_)}else{if(this.playWaitingForReady_)return;this.playWaitingForReady_=!0,this.ready(function(){e.playWaitingForReady_=!1,t(e.play())})}},t.pause=function(){this.techCall_("pause")},t.paused=function(){return!1!==this.techGet_("paused")},t.played=function(){return this.techGet_("played")||de(0,0)},t.scrubbing=function(t){if(void 0===t)return this.scrubbing_;this.scrubbing_=!!t,t?this.addClass("vjs-scrubbing"):this.removeClass("vjs-scrubbing")},t.currentTime=function(t){return void 0!==t?(t<0&&(t=0),void this.techCall_("setCurrentTime",t)):(this.cache_.currentTime=this.techGet_("currentTime")||0,this.cache_.currentTime)},t.duration=function(t){if(void 0===t)return void 0!==this.cache_.duration?this.cache_.duration:NaN;(t=parseFloat(t))<0&&(t=1/0),t!==this.cache_.duration&&((this.cache_.duration=t)===1/0?(this.addClass("vjs-live"),this.options_.liveui&&this.player_.liveTracker&&this.addClass("vjs-liveui")):(this.removeClass("vjs-live"),this.removeClass("vjs-liveui")),isNaN(t)||this.trigger("durationchange"))},t.remainingTime=function(){return this.duration()-this.currentTime()},t.remainingTimeDisplay=function(){return Math.floor(this.duration())-Math.floor(this.currentTime())},t.buffered=function(){var t=this.techGet_("buffered");return t&&t.length||(t=de(0,0)),t},t.bufferedPercent=function(){return pe(this.buffered(),this.duration())},t.bufferedEnd=function(){var t=this.buffered(),e=this.duration(),i=t.end(t.length-1);return e<i&&(i=e),i},t.volume=function(t){var e;return void 0!==t?(e=Math.max(0,Math.min(1,parseFloat(t))),this.cache_.volume=e,this.techCall_("setVolume",e),void(0<e&&this.lastVolume_(e))):(e=parseFloat(this.techGet_("volume")),isNaN(e)?1:e)},t.muted=function(t){if(void 0===t)return this.techGet_("muted")||!1;this.techCall_("setMuted",t)},t.defaultMuted=function(t){return void 0!==t?this.techCall_("setDefaultMuted",t):this.techGet_("defaultMuted")||!1},t.lastVolume_=function(t){if(void 0===t||0===t)return this.cache_.lastVolume;this.cache_.lastVolume=t},t.supportsFullScreen=function(){return this.techGet_("supportsFullScreen")||!1},t.isFullscreen=function(t){if(void 0===t)return!!this.isFullscreen_;this.isFullscreen_=!!t},t.requestFullscreen=function(){var i=me;this.isFullscreen(!0),i.requestFullscreen?(ut(d,i.fullscreenchange,Tt(this,function t(e){this.isFullscreen(d[i.fullscreenElement]),!1===this.isFullscreen()&&ht(d,i.fullscreenchange,t),this.trigger("fullscreenchange")})),this.el_[i.requestFullscreen]()):this.tech_.supportsFullScreen()?this.techCall_("enterFullScreen"):(this.enterFullWindow(),this.trigger("fullscreenchange"))},t.exitFullscreen=function(){var t=me;this.isFullscreen(!1),t.requestFullscreen?d[t.exitFullscreen]():this.tech_.supportsFullScreen()?this.techCall_("exitFullScreen"):(this.exitFullWindow(),this.trigger("fullscreenchange"))},t.enterFullWindow=function(){this.isFullWindow=!0,this.docOrigOverflow=d.documentElement.style.overflow,ut(d,"keydown",Tt(this,this.fullWindowOnEscKey)),d.documentElement.style.overflow="hidden",I(d.body,"vjs-full-window"),this.trigger("enterFullWindow")},t.fullWindowOnEscKey=function(t){27===t.keyCode&&(!0===this.isFullscreen()?this.exitFullscreen():this.exitFullWindow())},t.exitFullWindow=function(){this.isFullWindow=!1,ht(d,"keydown",this.fullWindowOnEscKey),d.documentElement.style.overflow=this.docOrigOverflow,O(d.body,"vjs-full-window"),this.trigger("exitFullWindow")},t.canPlayType=function(t){for(var e,i=0,n=this.options_.techOrder;i<n.length;i++){var s=n[i],r=Ji.getTech(s);if(r=r||Bt.getComponent(s)){if(r.isSupported()&&(e=r.canPlayType(t)))return e}else m.error('The "'+s+'" tech is undefined. Skipped browser support check for that tech.')}return""},t.selectSource=function(t){function e(t,i,n){var s;return t.some(function(e){return i.some(function(t){if(s=n(e,t))return!0})}),s}function i(t,e){var i=t[0];if(t[1].canPlaySource(e,s.options_[i.toLowerCase()]))return{source:e,tech:i}}var n,s=this,r=this.options_.techOrder.map(function(t){return[t,Ji.getTech(t)]}).filter(function(t){var e=t[0],i=t[1];return i?i.isSupported():(m.error('The "'+e+'" tech is undefined. Skipped browser support check for that tech.'),!1)});return(this.options_.sourceOrder?e(t,r,(n=i,function(t,e){return n(e,t)})):e(r,t,i))||!1},t.src=function(t){var i=this;if(void 0===t)return this.cache_.src||"";var n=function e(t){if(Array.isArray(t)){var i=[];t.forEach(function(t){t=e(t),Array.isArray(t)?i=i.concat(t):c(t)&&i.push(t)}),t=i}else t="string"==typeof t&&t.trim()?[dn({src:t})]:c(t)&&"string"==typeof t.src&&t.src&&t.src.trim()?[dn(t)]:[];return t}(t);n.length?(this.changingSrc_=!0,this.cache_.sources=n,this.updateSourceCaches_(n[0]),nn(this,n[0],function(t,e){if(i.middleware_=e,i.cache_.sources=n,i.updateSourceCaches_(t),i.src_(t))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(t,e){t.forEach(function(t){return t.setTech&&t.setTech(e)})}(e,i.tech_)})):this.setTimeout(function(){this.error({code:4,message:this.localize(this.options_.notSupportedMessage)})},0)},t.src_=function(t){var e=this,i=this.selectSource([t]);return!i||(function(t,e){return Ut(t)===Ut(e)}(i.tech,this.techName_)?this.ready(function(){this.tech_.constructor.prototype.hasOwnProperty("setSource")?this.techCall_("setSource",t):this.techCall_("src",t.src),this.changingSrc_=!1},!0):(this.changingSrc_=!0,this.loadTech_(i.tech,i.source),this.tech_.ready(function(){e.changingSrc_=!1})),!1)},t.load=function(){this.techCall_("load")},t.reset=function(){this.tech_&&this.tech_.clearTracks("text"),this.loadTech_(this.options_.techOrder[0],null),this.techCall_("reset"),Pt(this)&&this.trigger("playerreset")},t.currentSources=function(){var t=this.currentSource(),e=[];return 0!==Object.keys(t).length&&e.push(t),this.cache_.sources||e},t.currentSource=function(){return this.cache_.source||{}},t.currentSrc=function(){return this.currentSource()&&this.currentSource().src||""},t.currentType=function(){return this.currentSource()&&this.currentSource().type||""},t.preload=function(t){return void 0!==t?(this.techCall_("setPreload",t),void(this.options_.preload=t)):this.techGet_("preload")},t.autoplay=function(t){if(void 0===t)return this.options_.autoplay||!1;var e;"string"==typeof t&&/(any|play|muted)/.test(t)?(this.options_.autoplay=t,this.manualAutoplay_(t),e=!1):this.options_.autoplay=!!t,e=e||this.options_.autoplay,this.tech_&&this.techCall_("setAutoplay",e)},t.playsinline=function(t){return void 0!==t?(this.techCall_("setPlaysinline",t),this.options_.playsinline=t,this):this.techGet_("playsinline")},t.loop=function(t){return void 0!==t?(this.techCall_("setLoop",t),void(this.options_.loop=t)):this.techGet_("loop")},t.poster=function(t){if(void 0===t)return this.poster_;(t=t||"")!==this.poster_&&(this.poster_=t,this.techCall_("setPoster",t),this.isPosterFromTech_=!1,this.trigger("posterchange"))},t.handleTechPosterChange_=function(){if((!this.poster_||this.options_.techCanOverridePoster)&&this.tech_&&this.tech_.poster){var t=this.tech_.poster()||"";t!==this.poster_&&(this.poster_=t,this.isPosterFromTech_=!0,this.trigger("posterchange"))}},t.controls=function(t){if(void 0===t)return!!this.controls_;t=!!t,this.controls_!==t&&(this.controls_=t,this.usingNativeControls()&&this.techCall_("setControls",t),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_()))},t.usingNativeControls=function(t){if(void 0===t)return!!this.usingNativeControls_;t=!!t,this.usingNativeControls_!==t&&(this.usingNativeControls_=t,this.usingNativeControls_?(this.addClass("vjs-using-native-controls"),this.trigger("usingnativecontrols")):(this.removeClass("vjs-using-native-controls"),this.trigger("usingcustomcontrols")))},t.error=function(t){return void 0===t?this.error_||null:null===t?(this.error_=t,this.removeClass("vjs-error"),void(this.errorDisplay&&this.errorDisplay.close())):(this.error_=new be(t),this.addClass("vjs-error"),m.error("(CODE:"+this.error_.code+" "+be.errorTypes[this.error_.code]+")",this.error_.message,this.error_),void this.trigger("error"))},t.reportUserActivity=function(){this.userActivity_=!0},t.userActive=function(t){if(void 0===t)return this.userActive_;if((t=!!t)!==this.userActive_){if(this.userActive_=t,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(t){t.stopPropagation(),t.preventDefault()}),this.userActivity_=!1,this.removeClass("vjs-user-active"),this.addClass("vjs-user-inactive"),this.trigger("userinactive")}},t.listenForUserActivity_=function(){var t,e,i,n,s=Tt(this,this.reportUserActivity);this.on("mousedown",function(){s(),this.clearInterval(t),t=this.setInterval(s,250)}),this.on("mousemove",function(t){t.screenX===e&&t.screenY===i||(e=t.screenX,i=t.screenY,s())}),this.on("mouseup",function(){s(),this.clearInterval(t)}),this.on("keydown",s),this.on("keyup",s),this.setInterval(function(){if(this.userActivity_){this.userActivity_=!1,this.userActive(!0),this.clearTimeout(n);var t=this.options_.inactivityTimeout;t<=0||(n=this.setTimeout(function(){this.userActivity_||this.userActive(!1)},t))}},250)},t.playbackRate=function(t){if(void 0===t)return this.tech_&&this.tech_.featuresPlaybackRate?this.cache_.lastPlaybackRate||this.techGet_("playbackRate"):1;this.techCall_("setPlaybackRate",t)},t.defaultPlaybackRate=function(t){return void 0!==t?this.techCall_("setDefaultPlaybackRate",t):this.tech_&&this.tech_.featuresPlaybackRate?this.techGet_("defaultPlaybackRate"):1},t.isAudio=function(t){if(void 0===t)return!!this.isAudio_;this.isAudio_=!!t},t.addTextTrack=function(t,e,i){if(this.tech_)return this.tech_.addTextTrack(t,e,i)},t.addRemoteTextTrack=function(t,e){if(this.tech_)return this.tech_.addRemoteTextTrack(t,e)},t.removeRemoteTextTrack=function(t){void 0===t&&(t={});var e=t.track;if(e=e||t,this.tech_)return this.tech_.removeRemoteTextTrack(e)},t.getVideoPlaybackQuality=function(){return this.techGet_("getVideoPlaybackQuality")},t.videoWidth=function(){return this.tech_&&this.tech_.videoWidth&&this.tech_.videoWidth()||0},t.videoHeight=function(){return this.tech_&&this.tech_.videoHeight&&this.tech_.videoHeight()||0},t.language=function(t){if(void 0===t)return this.language_;this.language_=String(t).toLowerCase()},t.languages=function(){return jt(h.prototype.options_.languages,this.languages_)},t.toJSON=function(){var t=jt(this.options_),e=t.tracks;t.tracks=[];for(var i=0;i<e.length;i++){var n=e[i];(n=jt(n)).player=void 0,t.tracks[i]=n}return t},t.createModal=function(t,e){var i=this;(e=e||{}).content=t||"";var n=new Ae(this,e);return this.addChild(n),n.on("dispose",function(){i.removeChild(n)}),n.open(),n},t.updateCurrentBreakpoint_=function(){if(this.responsive())for(var t=this.currentBreakpoint(),e=this.currentWidth(),i=0;i<Gs.length;i++){var n=Gs[i];if(e<=this.breakpoints_[n]){if(t===n)return;t&&this.removeClass(Xs[t]),this.addClass(Xs[n]),this.breakpoint_=n;break}}},t.removeCurrentBreakpoint_=function(){var t=this.currentBreakpointClass();this.breakpoint_="",t&&this.removeClass(t)},t.breakpoints=function(t){return void 0===t||(this.breakpoint_="",this.breakpoints_=_({},Ks,t),this.updateCurrentBreakpoint_()),_(this.breakpoints_)},t.responsive=function(t){return void 0===t?this.responsive_:(t=Boolean(t))!==this.responsive_?((this.responsive_=t)?(this.on("playerresize",this.updateCurrentBreakpoint_),this.updateCurrentBreakpoint_()):(this.off("playerresize",this.updateCurrentBreakpoint_),this.removeCurrentBreakpoint_()),t):void 0},t.currentBreakpoint=function(){return this.breakpoint_},t.currentBreakpointClass=function(){return Xs[this.breakpoint_]||""},h.getTagSettings=function(t){var e={sources:[],tracks:[]},i=M(t),n=i["data-setup"];if(A(t,"vjs-fill")&&(i.fill=!0),A(t,"vjs-fluid")&&(i.fluid=!0),null!==n){var s=we(n||"{}"),r=s[0],a=s[1];r&&m.error(r),_(i,a)}if(_(e,i),t.hasChildNodes())for(var o=t.childNodes,l=0,c=o.length;l<c;l++){var u=o[l],h=u.nodeName.toLowerCase();"source"===h?e.sources.push(M(u)):"track"===h&&e.tracks.push(M(u))}return e},t.flexNotSupported_=function(){var t=d.createElement("i");return!("flexBasis"in t.style||"webkitFlexBasis"in t.style||"mozFlexBasis"in t.style||"msFlexBasis"in t.style||"msFlexOrder"in t.style)},h}(Bt);wi.names.forEach(function(t){var e=wi[t];Qs.prototype[e.getterName]=function(){return this.tech_?this.tech_[e.getterName]():(this[e.privateName]=this[e.privateName]||new e.ListClass,this[e.privateName])}}),Qs.players={};var Js=y.navigator;Qs.prototype.options_={techOrder:Ji.defaultTechOrder_,html5:{},flash:{},inactivityTimeout:2e3,playbackRates:[],liveui:!1,children:["mediaLoader","posterImage","textTrackDisplay","loadingSpinner","bigPlayButton","liveTracker","controlBar","errorDisplay","textTrackSettings","resizeManager"],language:Js&&(Js.languages&&Js.languages[0]||Js.userLanguage||Js.language)||"en",languages:{},notSupportedMessage:"No compatible source was found for this media.",breakpoints:{},responsive:!1},["ended","seeking","seekable","networkState","readyState"].forEach(function(t){Qs.prototype[t]=function(){return this.techGet_(t)}}),Vs.forEach(function(t){Qs.prototype["handleTech"+Ut(t)+"_"]=function(){return this.trigger(t)}}),Bt.registerComponent("Player",Qs);function Zs(t){return or.hasOwnProperty(t)}function tr(t){return Zs(t)?or[t]:void 0}function er(t,e){t[ar]=t[ar]||{},t[ar][e]=!0}function ir(t,e,i){var n=(i?"before":"")+"pluginsetup";t.trigger(n,e),t.trigger(n+":"+e.name,e)}function nr(e,i){function n(){ir(this,{name:e,plugin:i,instance:null},!0);var t=i.apply(this,arguments);return er(this,e),ir(this,{name:e,plugin:i,instance:t}),t}return Object.keys(i).forEach(function(t){n[t]=i[t]}),n}function sr(s,r){return r.prototype.name=s,function(){ir(this,{name:s,plugin:r,instance:null},!0);for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];var n=a(r,[this].concat(e));return this[s]=function(){return n},ir(this,n.getEventHash()),n}}var rr="plugin",ar="activePlugins_",or={},lr=function(){function i(t){if(this.constructor===i)throw new Error("Plugin must be sub-classed; not directly instantiated.");this.player=t,Mt(this),delete this.trigger,Rt(this,this.constructor.defaultState),er(t,this.name),this.dispose=Tt(this,this.dispose),t.on("dispose",this.dispose)}var t=i.prototype;return t.version=function(){return this.constructor.VERSION},t.getEventHash=function(t){return void 0===t&&(t={}),t.name=this.name,t.plugin=this.constructor,t.instance=this,t},t.trigger=function(t,e){return void 0===e&&(e={}),dt(this.eventBusEl_,t,this.getEventHash(e))},t.handleStateChanged=function(){},t.dispose=function(){var t=this.name,e=this.player;this.trigger("dispose"),this.off(),e.off("dispose",this.dispose),e[ar][t]=!1,this.player=this.state=null,e[t]=sr(t,or[t])},i.isBasic=function(t){var e="string"==typeof t?tr(t):t;return"function"==typeof e&&!i.prototype.isPrototypeOf(e.prototype)},i.registerPlugin=function(t,e){if("string"!=typeof t)throw new Error('Illegal plugin name, "'+t+'", must be a string, was '+typeof t+".");if(Zs(t))m.warn('A plugin named "'+t+'" already exists. You may want to avoid re-registering plugins!');else if(Qs.prototype.hasOwnProperty(t))throw new Error('Illegal plugin name, "'+t+'", cannot share a name with an existing player method!');if("function"!=typeof e)throw new Error('Illegal plugin for "'+t+'", must be a function, was '+typeof e+".");return or[t]=e,t!==rr&&(i.isBasic(e)?Qs.prototype[t]=nr(t,e):Qs.prototype[t]=sr(t,e)),e},i.deregisterPlugin=function(t){if(t===rr)throw new Error("Cannot de-register base plugin.");Zs(t)&&(delete or[t],delete Qs.prototype[t])},i.getPlugins=function(t){var i;return void 0===t&&(t=Object.keys(or)),t.forEach(function(t){var e=tr(t);e&&((i=i||{})[t]=e)}),i},i.getPluginVersion=function(t){var e=tr(t);return e&&e.VERSION||""},i}();lr.getPlugin=tr,lr.BASE_PLUGIN_NAME=rr,lr.registerPlugin(rr,lr),Qs.prototype.usingPlugin=function(t){return!!this[ar]&&!0===this[ar][t]},Qs.prototype.hasPlugin=function(t){return!!Zs(t)};var cr=function(t){return 0===t.indexOf("#")?t.slice(1):t};function ur(t,i,e){var n=ur.getPlayer(t);if(n)return i&&m.warn('Player "'+t+'" is already initialised. Options will not be applied.'),e&&n.ready(e),n;var s="string"==typeof t?X("#"+cr(t)):t;if(!k(s))throw new TypeError("The element or ID supplied is not valid. (videojs)");d.body.contains(s)||m.warn("The element supplied is not included in the DOM"),i=i||{},ur.hooks("beforesetup").forEach(function(t){var e=t(s,jt(i));c(e)&&!Array.isArray(e)?i=jt(i,e):m.error("please return an object in beforesetup hooks")});var r=Bt.getComponent("Player");return n=new r(s,i,e),ur.hooks("setup").forEach(function(t){return t(n)}),n}if(ur.hooks_={},ur.hooks=function(t,e){return ur.hooks_[t]=ur.hooks_[t]||[],e&&(ur.hooks_[t]=ur.hooks_[t].concat(e)),ur.hooks_[t]},ur.hook=function(t,e){ur.hooks(t,e)},ur.hookOnce=function(i,t){ur.hooks(i,[].concat(t).map(function(e){return function t(){return ur.removeHook(i,t),e.apply(void 0,arguments)}}))},ur.removeHook=function(t,e){var i=ur.hooks(t).indexOf(e);return!(i<=-1)&&(ur.hooks_[t]=ur.hooks_[t].slice(),ur.hooks_[t].splice(i,1),!0)},!0!==y.VIDEOJS_NO_DYNAMIC_STYLE&&w()){var hr=X(".vjs-styles-defaults");if(!hr){hr=_t("vjs-styles-defaults");var dr=X("head");dr&&dr.insertBefore(hr,dr.firstChild),bt(hr,"\n      .video-js {\n        width: 300px;\n        height: 150px;\n      }\n\n      .vjs-fluid {\n        padding-top: 56.25%\n      }\n    ")}}yt(1,ur),ur.VERSION="7.4.1",ur.options=Qs.prototype.options_,ur.getPlayers=function(){return Qs.players},ur.getPlayer=function(t){var e,i=Qs.players;if("string"==typeof t){var n=cr(t),s=i[n];if(s)return s;e=X("#"+n)}else e=t;if(k(e)){var r=e,a=r.player,o=r.playerId;if(a||i[o])return a||i[o]}},ur.getAllPlayers=function(){return Object.keys(Qs.players).map(function(t){return Qs.players[t]}).filter(Boolean)},ur.players=Qs.players,ur.getComponent=Bt.getComponent,ur.registerComponent=function(t,e){Ji.isTech(e)&&m.warn("The "+t+" tech was registered as a component. It should instead be registered using videojs.registerTech(name, tech)"),Bt.registerComponent.call(Bt,t,e)},ur.getTech=Ji.getTech,ur.registerTech=Ji.registerTech,ur.use=function(t,e){Zi[t]=Zi[t]||[],Zi[t].push(e)},Object.defineProperty(ur,"middleware",{value:{},writeable:!1,enumerable:!0}),Object.defineProperty(ur.middleware,"TERMINATOR",{value:en,writeable:!1,enumerable:!0}),ur.browser=ce,ur.TOUCH_ENABLED=le,ur.extend=function(t,e){void 0===e&&(e={});var i=function(){t.apply(this,arguments)},n={};for(var s in"object"==typeof e?(e.constructor!==Object.prototype.constructor&&(i=e.constructor),n=e):"function"==typeof e&&(i=e),function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(t.super_=e)}(i,t),n)n.hasOwnProperty(s)&&(i.prototype[s]=n[s]);return i},ur.mergeOptions=jt,ur.bind=Tt,ur.registerPlugin=lr.registerPlugin,ur.deregisterPlugin=lr.deregisterPlugin,ur.plugin=function(t,e){return m.warn("videojs.plugin() is deprecated; use videojs.registerPlugin() instead"),lr.registerPlugin(t,e)},ur.getPlugins=lr.getPlugins,ur.getPlugin=lr.getPlugin,ur.getPluginVersion=lr.getPluginVersion,ur.addLanguage=function(t,e){var i;return t=(""+t).toLowerCase(),ur.options.languages=jt(ur.options.languages,((i={})[t]=e,i)),ur.options.languages[t]},ur.log=m,ur.createLogger=g,ur.createTimeRange=ur.createTimeRanges=de,ur.formatTime=En,ur.setFormatTime=function(t){xn=t},ur.resetFormatTime=function(){xn=Cn},ur.parseUrl=Me,ur.isCrossOrigin=Ue,ur.EventTarget=St,ur.on=ut,ur.one=pt,ur.off=ht,ur.trigger=dt,ur.xhr=hi,ur.TextTrack=gi,ur.AudioTrack=vi,ur.VideoTrack=yi,["isEl","isTextNode","createEl","hasClass","addClass","removeClass","toggleClass","setAttributes","getAttributes","emptyEl","appendContent","insertContent"].forEach(function(t){ur[t]=function(){return m.warn("videojs."+t+"() is deprecated; use videojs.dom."+t+"() instead"),Q[t].apply(null,arguments)}}),ur.computedStyle=n,ur.dom=Q,ur.url=Ge;function pr(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function fr(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function mr(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}var gr=Qe(function(t,e){var i,u,n,s,h;i=/^((?:[a-zA-Z0-9+\-.]+:)?)(\/\/[^\/?#]*)?((?:[^\/\?#]*\/)*.*?)??(;.*?)?(\?.*?)?(#.*?)?$/,u=/^([^\/?#]*)(.*)$/,n=/(?:\/|^)\.(?=\/)/g,s=/(?:\/|^)\.\.\/(?!\.\.\/).*?(?=\/)/g,h={buildAbsoluteURL:function(t,e,i){if(i=i||{},t=t.trim(),!(e=e.trim())){if(!i.alwaysNormalize)return t;var n=h.parseURL(t);if(!n)throw new Error("Error trying to parse base URL.");return n.path=h.normalizePath(n.path),h.buildURLFromParts(n)}var s=h.parseURL(e);if(!s)throw new Error("Error trying to parse relative URL.");if(s.scheme)return i.alwaysNormalize?(s.path=h.normalizePath(s.path),h.buildURLFromParts(s)):e;var r=h.parseURL(t);if(!r)throw new Error("Error trying to parse base URL.");if(!r.netLoc&&r.path&&"/"!==r.path[0]){var a=u.exec(r.path);r.netLoc=a[1],r.path=a[2]}r.netLoc&&!r.path&&(r.path="/");var o={scheme:r.scheme,netLoc:s.netLoc,path:null,params:s.params,query:s.query,fragment:s.fragment};if(!s.netLoc&&(o.netLoc=r.netLoc,"/"!==s.path[0]))if(s.path){var l=r.path,c=l.substring(0,l.lastIndexOf("/")+1)+s.path;o.path=h.normalizePath(c)}else o.path=r.path,s.params||(o.params=r.params,s.query||(o.query=r.query));return null===o.path&&(o.path=i.alwaysNormalize?h.normalizePath(s.path):s.path),h.buildURLFromParts(o)},parseURL:function(t){var e=i.exec(t);return e?{scheme:e[1]||"",netLoc:e[2]||"",path:e[3]||"",params:e[4]||"",query:e[5]||"",fragment:e[6]||""}:null},normalizePath:function(t){for(t=t.split("").reverse().join("").replace(n,"");t.length!==(t=t.replace(s,"")).length;);return t.split("").reverse().join("")},buildURLFromParts:function(t){return t.scheme+t.netLoc+t.path+t.params+t.query+t.fragment}},t.exports=h}),vr=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(t[n]=i[n])}return t},yr=(_r.prototype.on=function(t,e){this.listeners[t]||(this.listeners[t]=[]),this.listeners[t].push(e)},_r.prototype.off=function(t,e){if(!this.listeners[t])return!1;var i=this.listeners[t].indexOf(e);return this.listeners[t].splice(i,1),-1<i},_r.prototype.trigger=function(t,e){var i=this.listeners[t],n=void 0,s=void 0,r=void 0;if(i)if(2===arguments.length)for(s=i.length,n=0;n<s;++n)i[n].call(this,e);else for(r=Array.prototype.slice.call(arguments,1),s=i.length,n=0;n<s;++n)i[n].apply(this,r)},_r.prototype.dispose=function(){this.listeners={}},_r.prototype.pipe=function(e){this.on("data",function(t){e.push(t)})},_r);function _r(){pr(this,_r),this.listeners={}}var br,Tr=(fr(wr,br=yr),wr.prototype.push=function(t){var e=void 0;for(this.buffer+=t,e=this.buffer.indexOf("\n");-1<e;e=this.buffer.indexOf("\n"))this.trigger("data",this.buffer.substring(0,e)),this.buffer=this.buffer.substring(e+1)},wr);function wr(){pr(this,wr);var t=mr(this,br.call(this));return t.buffer="",t}function kr(t){for(var e=t.split(new RegExp('(?:^|,)((?:[^=]*)=(?:"[^"]*"|[^,]*))')),i={},n=e.length,s=void 0;n--;)""!==e[n]&&((s=/([^=]*)=(.*)/.exec(e[n]).slice(1))[0]=s[0].replace(/^\s+|\s+$/g,""),s[1]=s[1].replace(/^\s+|\s+$/g,""),s[1]=s[1].replace(/^['"](.*)['"]$/g,"$1"),i[s[0]]=s[1]);return i}var Sr,Cr=(fr(xr,Sr=yr),xr.prototype.push=function(t){var e=void 0,i=void 0;if(0!==(t=t.replace(/^[\u0000\s]+|[\u0000\s]+$/g,"")).length)if("#"===t[0]){for(var n=0;n<this.customParsers.length;n++)if(this.customParsers[n].call(this,t))return;if(0===t.indexOf("#EXT"))if(t=t.replace("\r",""),e=/^#EXTM3U/.exec(t))this.trigger("data",{type:"tag",tagType:"m3u"});else{if(e=/^#EXTINF:?([0-9\.]*)?,?(.*)?$/.exec(t))return i={type:"tag",tagType:"inf"},e[1]&&(i.duration=parseFloat(e[1])),e[2]&&(i.title=e[2]),void this.trigger("data",i);if(e=/^#EXT-X-TARGETDURATION:?([0-9.]*)?/.exec(t))return i={type:"tag",tagType:"targetduration"},e[1]&&(i.duration=parseInt(e[1],10)),void this.trigger("data",i);if(e=/^#ZEN-TOTAL-DURATION:?([0-9.]*)?/.exec(t))return i={type:"tag",tagType:"totalduration"},e[1]&&(i.duration=parseInt(e[1],10)),void this.trigger("data",i);if(e=/^#EXT-X-VERSION:?([0-9.]*)?/.exec(t))return i={type:"tag",tagType:"version"},e[1]&&(i.version=parseInt(e[1],10)),void this.trigger("data",i);if(e=/^#EXT-X-MEDIA-SEQUENCE:?(\-?[0-9.]*)?/.exec(t))return i={type:"tag",tagType:"media-sequence"},e[1]&&(i.number=parseInt(e[1],10)),void this.trigger("data",i);if(e=/^#EXT-X-DISCONTINUITY-SEQUENCE:?(\-?[0-9.]*)?/.exec(t))return i={type:"tag",tagType:"discontinuity-sequence"},e[1]&&(i.number=parseInt(e[1],10)),void this.trigger("data",i);if(e=/^#EXT-X-PLAYLIST-TYPE:?(.*)?$/.exec(t))return i={type:"tag",tagType:"playlist-type"},e[1]&&(i.playlistType=e[1]),void this.trigger("data",i);if(e=/^#EXT-X-BYTERANGE:?([0-9.]*)?@?([0-9.]*)?/.exec(t))return i={type:"tag",tagType:"byterange"},e[1]&&(i.length=parseInt(e[1],10)),e[2]&&(i.offset=parseInt(e[2],10)),void this.trigger("data",i);if(e=/^#EXT-X-ALLOW-CACHE:?(YES|NO)?/.exec(t))return i={type:"tag",tagType:"allow-cache"},e[1]&&(i.allowed=!/NO/.test(e[1])),void this.trigger("data",i);if(e=/^#EXT-X-MAP:?(.*)$/.exec(t)){if(i={type:"tag",tagType:"map"},e[1]){var s=kr(e[1]);if(s.URI&&(i.uri=s.URI),s.BYTERANGE){var r=s.BYTERANGE.split("@"),a=r[0],o=r[1];i.byterange={},a&&(i.byterange.length=parseInt(a,10)),o&&(i.byterange.offset=parseInt(o,10))}}this.trigger("data",i)}else if(e=/^#EXT-X-STREAM-INF:?(.*)$/.exec(t)){if(i={type:"tag",tagType:"stream-inf"},e[1]){if(i.attributes=kr(e[1]),i.attributes.RESOLUTION){var l=i.attributes.RESOLUTION.split("x"),c={};l[0]&&(c.width=parseInt(l[0],10)),l[1]&&(c.height=parseInt(l[1],10)),i.attributes.RESOLUTION=c}i.attributes.BANDWIDTH&&(i.attributes.BANDWIDTH=parseInt(i.attributes.BANDWIDTH,10)),i.attributes["PROGRAM-ID"]&&(i.attributes["PROGRAM-ID"]=parseInt(i.attributes["PROGRAM-ID"],10))}this.trigger("data",i)}else{if(e=/^#EXT-X-MEDIA:?(.*)$/.exec(t))return i={type:"tag",tagType:"media"},e[1]&&(i.attributes=kr(e[1])),void this.trigger("data",i);if(e=/^#EXT-X-ENDLIST/.exec(t))this.trigger("data",{type:"tag",tagType:"endlist"});else if(e=/^#EXT-X-DISCONTINUITY/.exec(t))this.trigger("data",{type:"tag",tagType:"discontinuity"});else{if(e=/^#EXT-X-PROGRAM-DATE-TIME:?(.*)$/.exec(t))return i={type:"tag",tagType:"program-date-time"},e[1]&&(i.dateTimeString=e[1],i.dateTimeObject=new Date(e[1])),void this.trigger("data",i);if(e=/^#EXT-X-KEY:?(.*)$/.exec(t))return i={type:"tag",tagType:"key"},e[1]&&(i.attributes=kr(e[1]),i.attributes.IV&&("0x"===i.attributes.IV.substring(0,2).toLowerCase()&&(i.attributes.IV=i.attributes.IV.substring(2)),i.attributes.IV=i.attributes.IV.match(/.{8}/g),i.attributes.IV[0]=parseInt(i.attributes.IV[0],16),i.attributes.IV[1]=parseInt(i.attributes.IV[1],16),i.attributes.IV[2]=parseInt(i.attributes.IV[2],16),i.attributes.IV[3]=parseInt(i.attributes.IV[3],16),i.attributes.IV=new Uint32Array(i.attributes.IV))),void this.trigger("data",i);if(e=/^#EXT-X-START:?(.*)$/.exec(t))return i={type:"tag",tagType:"start"},e[1]&&(i.attributes=kr(e[1]),i.attributes["TIME-OFFSET"]=parseFloat(i.attributes["TIME-OFFSET"]),i.attributes.PRECISE=/YES/.test(i.attributes.PRECISE)),void this.trigger("data",i);if(e=/^#EXT-X-CUE-OUT-CONT:?(.*)?$/.exec(t))return i={type:"tag",tagType:"cue-out-cont"},e[1]?i.data=e[1]:i.data="",void this.trigger("data",i);if(e=/^#EXT-X-CUE-OUT:?(.*)?$/.exec(t))return i={type:"tag",tagType:"cue-out"},e[1]?i.data=e[1]:i.data="",void this.trigger("data",i);if(e=/^#EXT-X-CUE-IN:?(.*)?$/.exec(t))return i={type:"tag",tagType:"cue-in"},e[1]?i.data=e[1]:i.data="",void this.trigger("data",i);this.trigger("data",{type:"tag",data:t.slice(4)})}}}else this.trigger("data",{type:"comment",text:t.slice(1)})}else this.trigger("data",{type:"uri",uri:t})},xr.prototype.addParser=function(t){var e=this,i=t.expression,n=t.customType,s=t.dataParser,r=t.segment;"function"!=typeof s&&(s=function(t){return t}),this.customParsers.push(function(t){if(i.exec(t))return e.trigger("data",{type:"custom",data:s(t),customType:n,segment:r}),!0})},xr);function xr(){pr(this,xr);var t=mr(this,Sr.call(this));return t.customParsers=[],t}var Er,Dr=(fr(Ar,Er=yr),Ar.prototype.push=function(t){this.lineStream.push(t)},Ar.prototype.end=function(){this.lineStream.push("\n")},Ar.prototype.addParser=function(t){this.parseStream.addParser(t)},Ar);function Ar(){pr(this,Ar);var t=mr(this,Er.call(this));t.lineStream=new Tr,t.parseStream=new Cr,t.lineStream.pipe(t.parseStream);var s=t,r=[],a={},o=void 0,l=void 0,c={AUDIO:{},VIDEO:{},"CLOSED-CAPTIONS":{},SUBTITLES:{}},u=0;return t.manifest={allowCache:!0,discontinuityStarts:[],segments:[]},t.parseStream.on("data",function(e){var i=void 0,n=void 0;({tag:function(){({"allow-cache":function(){this.manifest.allowCache=e.allowed,"allowed"in e||(this.trigger("info",{message:"defaulting allowCache to YES"}),this.manifest.allowCache=!0)},byterange:function(){var t={};"length"in e&&((a.byterange=t).length=e.length,"offset"in e||(this.trigger("info",{message:"defaulting offset to zero"}),e.offset=0)),"offset"in e&&((a.byterange=t).offset=e.offset)},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<e.duration&&(a.duration=e.duration),0===e.duration&&(a.duration=.01,this.trigger("info",{message:"updating zero segment duration to a small value"})),this.manifest.segments=r},key:function(){e.attributes?"NONE"!==e.attributes.METHOD?e.attributes.URI?(e.attributes.METHOD||this.trigger("warn",{message:"defaulting key method to AES-128"}),l={method:e.attributes.METHOD||"AES-128",uri:e.attributes.URI},void 0!==e.attributes.IV&&(l.iv=e.attributes.IV)):this.trigger("warn",{message:"ignoring key declaration without URI"}):l=null:this.trigger("warn",{message:"ignoring key declaration without attribute list"})},"media-sequence":function(){isFinite(e.number)?this.manifest.mediaSequence=e.number:this.trigger("warn",{message:"ignoring invalid media sequence: "+e.number})},"discontinuity-sequence":function(){isFinite(e.number)?(this.manifest.discontinuitySequence=e.number,u=e.number):this.trigger("warn",{message:"ignoring invalid discontinuity sequence: "+e.number})},"playlist-type":function(){/VOD|EVENT/.test(e.playlistType)?this.manifest.playlistType=e.playlistType:this.trigger("warn",{message:"ignoring unknown playlist type: "+e.playlist})},map:function(){o={},e.uri&&(o.uri=e.uri),e.byterange&&(o.byterange=e.byterange)},"stream-inf":function(){this.manifest.playlists=r,this.manifest.mediaGroups=this.manifest.mediaGroups||c,e.attributes?(a.attributes||(a.attributes={}),vr(a.attributes,e.attributes)):this.trigger("warn",{message:"ignoring empty stream-inf attributes"})},media:function(){if(this.manifest.mediaGroups=this.manifest.mediaGroups||c,e.attributes&&e.attributes.TYPE&&e.attributes["GROUP-ID"]&&e.attributes.NAME){var t=this.manifest.mediaGroups[e.attributes.TYPE];t[e.attributes["GROUP-ID"]]=t[e.attributes["GROUP-ID"]]||{},i=t[e.attributes["GROUP-ID"]],(n={default:/yes/i.test(e.attributes.DEFAULT)}).default?n.autoselect=!0:n.autoselect=/yes/i.test(e.attributes.AUTOSELECT),e.attributes.LANGUAGE&&(n.language=e.attributes.LANGUAGE),e.attributes.URI&&(n.uri=e.attributes.URI),e.attributes["INSTREAM-ID"]&&(n.instreamId=e.attributes["INSTREAM-ID"]),e.attributes.CHARACTERISTICS&&(n.characteristics=e.attributes.CHARACTERISTICS),e.attributes.FORCED&&(n.forced=/yes/i.test(e.attributes.FORCED)),i[e.attributes.NAME]=n}else this.trigger("warn",{message:"ignoring incomplete or missing media group"})},discontinuity:function(){u+=1,a.discontinuity=!0,this.manifest.discontinuityStarts.push(r.length)},"program-date-time":function(){void 0===this.manifest.dateTimeString&&(this.manifest.dateTimeString=e.dateTimeString,this.manifest.dateTimeObject=e.dateTimeObject),a.dateTimeString=e.dateTimeString,a.dateTimeObject=e.dateTimeObject},targetduration:function(){!isFinite(e.duration)||e.duration<0?this.trigger("warn",{message:"ignoring invalid target duration: "+e.duration}):this.manifest.targetDuration=e.duration},totalduration:function(){!isFinite(e.duration)||e.duration<0?this.trigger("warn",{message:"ignoring invalid total duration: "+e.duration}):this.manifest.totalDuration=e.duration},start:function(){e.attributes&&!isNaN(e.attributes["TIME-OFFSET"])?this.manifest.start={timeOffset:e.attributes["TIME-OFFSET"],precise:e.attributes.PRECISE}:this.trigger("warn",{message:"ignoring start declaration without appropriate attribute list"})},"cue-out":function(){a.cueOut=e.data},"cue-out-cont":function(){a.cueOutCont=e.data},"cue-in":function(){a.cueIn=e.data}}[e.tagType]||function(){}).call(s)},uri:function(){a.uri=e.uri,r.push(a),!this.manifest.targetDuration||"duration"in a||(this.trigger("warn",{message:"defaulting segment duration to the target duration"}),a.duration=this.manifest.targetDuration),l&&(a.key=l),a.timeline=u,o&&(a.map=o),a={}},comment:function(){},custom:function(){e.segment?(a.custom=a.custom||{},a.custom[e.customType]=e.data):(this.manifest.custom=this.manifest.custom||{},this.manifest.custom[e.customType]=e.data)}})[e.type].call(s)}),t}function Ir(t){return!!t&&"object"==typeof t}function Or(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];return e.reduce(function(e,i){return Object.keys(i).forEach(function(t){Array.isArray(e[t])&&Array.isArray(i[t])?e[t]=e[t].concat(i[t]):Ir(e[t])&&Ir(i[t])?e[t]=Or(e[t],i[t]):e[t]=i[t]}),e},{})}function Pr(t){return t.reduce(function(t,e){return t.concat(e)},[])}function Lr(t){if(!t.length)return[];for(var e=[],i=0;i<t.length;i++)e.push(t[i]);return e}function Mr(t){return function(e){return Object.keys(e).map(function(t){return e[t]})}(t.reduce(function(t,e){var i,n=e.attributes.id+(e.attributes.lang||"");t[n]?(e.segments[0].discontinuity=!0,(i=t[n].segments).push.apply(i,e.segments),e.attributes.contentProtection&&(t[n].attributes.contentProtection=e.attributes.contentProtection)):t[n]=e;return t},{})).map(function(t){return t.discontinuityStarts=function(t,n){return t.reduce(function(t,e,i){return e[n]&&t.push(i),t},[])}(t.segments,"discontinuity"),t})}function Nr(t){var e,i=t.attributes,n=t.segments,s={attributes:(e={NAME:i.id,AUDIO:"audio",SUBTITLES:"subs",RESOLUTION:{width:i.width,height:i.height},CODECS:i.codecs,BANDWIDTH:i.bandwidth},e["PROGRAM-ID"]=1,e),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&&(s.contentProtection=i.contentProtection),s}function Rr(t,e){return/^[a-z]+:/i.test(e)?e:(/\/\//i.test(t)||(t=Kr.buildAbsoluteURL(y.location.href,t)),Kr.buildAbsoluteURL(t,e))}function Ur(t){var e=t.baseUrl,i=void 0===e?"":e,n=t.source,s=void 0===n?"":n,r=t.range,a=void 0===r?"":r,o={uri:s,resolvedUri:Rr(i||"",s)};if(a){var l=a.split("-"),c=parseInt(l[0],10),u=parseInt(l[1],10);o.byterange={length:u-c,offset:c}}return o}function jr(t,e){for(var i,n,s,r,a,o,l,c,u,h,d,p,f=t.type,m=void 0===f?"static":f,g=t.minimumUpdatePeriod,v=void 0===g?0:g,y=t.media,_=void 0===y?"":y,b=t.sourceDuration,T=t.timescale,w=void 0===T?1:T,k=t.startNumber,S=void 0===k?1:k,C=t.periodIndex,x=[],E=-1,D=0;D<e.length;D++){var A=e[D],I=A.d,O=A.r||0,P=A.t||0;E<0&&(E=P),P&&E<P&&(E=P);var L=void 0;if(O<0){var M=D+1;L=M===e.length?"dynamic"===m&&0<v&&0<_.indexOf("$Number$")?(n=E,s=I,void 0,r=(i=t).NOW,a=i.clientOffset,o=i.availabilityStartTime,l=i.timescale,c=void 0===l?1:l,u=i.start,h=void 0===u?0:u,d=i.minimumUpdatePeriod,p=(r+a)/1e3+(void 0===d?0:d)-(o+h),Math.ceil((p*c-n)/s)):(b*w-E)/I:(e[M].t-E)/I}else L=O+1;for(var N=S+x.length+L,R=S+x.length;R<N;)x.push({number:R,duration:I/w,time:E,timeline:C}),E+=I,R++}return x}function Br(t){var e=t.type,i=void 0===e?"static":e,n=t.duration,s=t.timescale,r=void 0===s?1:s,a=t.sourceDuration,o=Qr[i](t),l=function(t,e){for(var i=[],n=t;n<e;n++)i.push(n);return i}(o.start,o.end).map(function(o){return function(t,e){var i=o.duration,n=o.timescale,s=void 0===n?1:n,r=o.periodIndex,a=o.startNumber;return{number:(void 0===a?1:a)+t,duration:i/s,timeline:r,time:e*i}}}(t));if("static"===i){var c=l.length-1;l[c].duration=a-n/r*c}return l}function Hr(t,e){return t.replace(Jr,function(r){return function(t,e,i,n){if("$$"===t)return"$";if(void 0===r[e])return t;var s=""+r[e];return"RepresentationID"===e?s:(n=i?parseInt(n,10):1)<=s.length?s:new Array(n-s.length+1).join("0")+s}}(e))}function Fr(i,t){var n={RepresentationID:i.id,Bandwidth:i.bandwidth||0},e=i.initialization,s=void 0===e?{sourceURL:"",range:""}:e,r=Ur({baseUrl:i.baseUrl,source:Hr(s.sourceURL,n),range:s.range});return function(t,e){return t.duration||e?t.duration?Br(t):jr(t,e):[{number:t.startNumber||1,duration:t.sourceDuration,time:0,timeline:t.periodIndex}]}(i,t).map(function(t){n.Number=t.number,n.Time=t.time;var e=Hr(i.media||"",n);return{uri:e,timeline:t.timeline,duration:t.duration,resolvedUri:Rr(i.baseUrl||"",e),map:r,number:t.number}})}function zr(e,t){var i=e.duration,n=e.segmentUrls,s=void 0===n?[]:n;if(!i&&!t||i&&t)throw new Error(na);var r,a=s.map(function(t){return function(t,e){var i=t.baseUrl,n=t.initialization,s=void 0===n?{}:n,r=Ur({baseUrl:i,source:s.sourceURL,range:s.range}),a=Ur({baseUrl:i,source:e.media,range:e.mediaRange});return a.map=r,a}(e,t)});return i&&(r=Br(e)),t&&(r=jr(e,t)),r.map(function(t,e){if(a[e]){var i=a[e];return i.timeline=t.timeline,i.duration=t.duration,i.number=t.number,i}}).filter(function(t){return t})}function Wr(t){var e=t.baseUrl,i=t.initialization,n=void 0===i?{}:i,s=t.sourceDuration,r=t.timescale,a=void 0===r?1:r,o=t.indexRange,l=void 0===o?"":o,c=t.duration;if(!e)throw new Error(ia);var u=Ur({baseUrl:e,source:n.sourceURL,range:n.range}),h=Ur({baseUrl:e,source:e,range:l});if(h.map=u,c){var d=Br(t);d.length&&(h.duration=d[0].duration,h.timeline=d[0].timeline)}else s&&(h.duration=s/a,h.timeline=0);return h.number=0,[h]}function $r(t){var e,i,n=t.attributes,s=t.segmentInfo;if(s.template?(i=Fr,e=Or(n,s.template)):s.base?(i=Wr,e=Or(n,s.base)):s.list&&(i=zr,e=Or(n,s.list)),!i)return{attributes:n};var r=i(e,s.timeline);if(e.duration){var a=e,o=a.duration,l=a.timescale,c=void 0===l?1:l;e.duration=o/c}else r.length?e.duration=r.reduce(function(t,e){return Math.max(t,Math.ceil(e.duration))},0):e.duration=0;return{attributes:e,segments:r}}function qr(t,e){return Lr(t.childNodes).filter(function(t){return t.tagName===e})}function Vr(t){return t.textContent.trim()}function Yr(t){var e=/P(?:(\d*)Y)?(?:(\d*)M)?(?:(\d*)D)?(?:T(?:(\d*)H)?(?:(\d*)M)?(?:([\d.]*)S)?)?/.exec(t);if(!e)return 0;var i=e.slice(1),n=i[0],s=i[1],r=i[2],a=i[3],o=i[4],l=i[5];return 31536e3*parseFloat(n||0)+2592e3*parseFloat(s||0)+86400*parseFloat(r||0)+3600*parseFloat(a||0)+60*parseFloat(o||0)+parseFloat(l||0)}function Gr(t){return t&&t.attributes?Lr(t.attributes).reduce(function(t,e){var i=ra[e.name]||ra.DEFAULT;return t[e.name]=i(e.value),t},{}):{}}var Xr,Kr=(function(t,e){var i,u,n,s,h;i=/^((?:[a-zA-Z0-9+\-.]+:)?)(\/\/[^\/?#]*)?((?:[^\/\?#]*\/)*.*?)??(;.*?)?(\?.*?)?(#.*?)?$/,u=/^([^\/?#]*)(.*)$/,n=/(?:\/|^)\.(?=\/)/g,s=/(?:\/|^)\.\.\/(?!\.\.\/).*?(?=\/)/g,h={buildAbsoluteURL:function(t,e,i){if(i=i||{},t=t.trim(),!(e=e.trim())){if(!i.alwaysNormalize)return t;var n=h.parseURL(t);if(!n)throw new Error("Error trying to parse base URL.");return n.path=h.normalizePath(n.path),h.buildURLFromParts(n)}var s=h.parseURL(e);if(!s)throw new Error("Error trying to parse relative URL.");if(s.scheme)return i.alwaysNormalize?(s.path=h.normalizePath(s.path),h.buildURLFromParts(s)):e;var r=h.parseURL(t);if(!r)throw new Error("Error trying to parse base URL.");if(!r.netLoc&&r.path&&"/"!==r.path[0]){var a=u.exec(r.path);r.netLoc=a[1],r.path=a[2]}r.netLoc&&!r.path&&(r.path="/");var o={scheme:r.scheme,netLoc:s.netLoc,path:null,params:s.params,query:s.query,fragment:s.fragment};if(!s.netLoc&&(o.netLoc=r.netLoc,"/"!==s.path[0]))if(s.path){var l=r.path,c=l.substring(0,l.lastIndexOf("/")+1)+s.path;o.path=h.normalizePath(c)}else o.path=r.path,s.params||(o.params=r.params,s.query||(o.query=r.query));return null===o.path&&(o.path=i.alwaysNormalize?h.normalizePath(s.path):s.path),h.buildURLFromParts(o)},parseURL:function(t){var e=i.exec(t);return e?{scheme:e[1]||"",netLoc:e[2]||"",path:e[3]||"",params:e[4]||"",query:e[5]||"",fragment:e[6]||""}:null},normalizePath:function(t){for(t=t.split("").reverse().join("").replace(n,"");t.length!==(t=t.replace(s,"")).length;);return t.split("").reverse().join("")},buildURLFromParts:function(t){return t.scheme+t.netLoc+t.path+t.params+t.query+t.fragment}},t.exports=h}(Xr={exports:{}},Xr.exports),Xr.exports),Qr={static:function(t){var e=t.duration,i=t.timescale,n=void 0===i?1:i,s=t.sourceDuration;return{start:0,end:Math.ceil(s/(e/n))}},dynamic:function(t){var e=t.NOW,i=t.clientOffset,n=t.availabilityStartTime,s=t.timescale,r=void 0===s?1:s,a=t.duration,o=t.start,l=void 0===o?0:o,c=t.minimumUpdatePeriod,u=void 0===c?0:c,h=t.timeShiftBufferDepth,d=void 0===h?1/0:h,p=(e+i)/1e3,f=n+l,m=p+u-f,g=Math.ceil(m*r/a),v=Math.floor((p-f-d)*r/a),y=Math.floor((p-f)*r/a);return{start:Math.max(0,v),end:Math.min(g,y)}}},Jr=/\$([A-z]*)(?:(%0)([0-9]+)d)?\$/g,Zr="INVALID_NUMBER_OF_PERIOD",ta="DASH_EMPTY_MANIFEST",ea="DASH_INVALID_XML",ia="NO_BASE_URL",na="SEGMENT_TIME_UNSPECIFIED",sa="UNSUPPORTED_UTC_TIMING_SCHEME",ra={mediaPresentationDuration:function(t){return Yr(t)},availabilityStartTime:function(t){return function(t){return/^\d+-\d+-\d+T\d+:\d+:\d+(\.\d+)?$/.test(t)&&(t+="Z"),Date.parse(t)}(t)/1e3},minimumUpdatePeriod:function(t){return Yr(t)},timeShiftBufferDepth:function(t){return Yr(t)},start:function(t){return Yr(t)},width:function(t){return parseInt(t,10)},height:function(t){return parseInt(t,10)},bandwidth:function(t){return parseInt(t,10)},startNumber:function(t){return parseInt(t,10)},timescale:function(t){return parseInt(t,10)},duration:function(t){var e=parseInt(t,10);return isNaN(e)?Yr(t):e},d:function(t){return parseInt(t,10)},t:function(t){return parseInt(t,10)},r:function(t){return parseInt(t,10)},DEFAULT:function(t){return t}};function aa(t,i){return i.length?Pr(t.map(function(e){return i.map(function(t){return Rr(e,Vr(t))})})):t}function oa(t){var e=qr(t,"SegmentTemplate")[0],i=qr(t,"SegmentList")[0],n=i&&qr(i,"SegmentURL").map(function(t){return Or({tag:"SegmentURL"},Gr(t))}),s=qr(t,"SegmentBase")[0],r=i||e,a=r&&qr(r,"SegmentTimeline")[0],o=i||s||e,l=o&&qr(o,"Initialization")[0],c=e&&Gr(e);c&&l?c.initialization=l&&Gr(l):c&&c.initialization&&(c.initialization={sourceURL:c.initialization});var u={template:c,timeline:a&&qr(a,"S").map(function(t){return Gr(t)}),list:i&&Or(Gr(i),{segmentUrls:n,initialization:Gr(l)}),base:s&&Or(Gr(s),{initialization:Gr(l)})};return Object.keys(u).forEach(function(t){u[t]||delete u[t]}),u}function la(t){return t.reduce(function(t,e){var i=Gr(e),n=_a[i.schemeIdUri];if(n){t[n]={attributes:i};var s=qr(e,"cenc:pssh")[0];if(s){var r=Vr(s),a=r&&function(t){for(var e=y.atob(t),i=new Uint8Array(e.length),n=0;n<e.length;n++)i[n]=e.charCodeAt(n);return i}(r);t[n].pssh=a}}return t},{})}function ca(u,h,d){return function(t){var e=Gr(t),i=aa(h,qr(t,"BaseURL")),n=qr(t,"Role")[0],s={role:Gr(n)},r=Or(u,e,s),a=la(qr(t,"ContentProtection"));Object.keys(a).length&&(r=Or(r,{contentProtection:a}));var o=oa(t),l=qr(t,"Representation"),c=Or(d,o);return Pr(l.map(function(r,a,o){return function(t){var e=qr(t,"BaseURL"),i=aa(a,e),n=Or(r,Gr(t)),s=oa(t);return i.map(function(t){return{segmentInfo:Or(o,s),attributes:Or(n,{baseUrl:t})}})}}(r,i,c)))}}function ua(t,e){void 0===e&&(e={});var i=e,n=i.manifestUri,s=void 0===n?"":n,r=i.NOW,a=void 0===r?Date.now():r,o=i.clientOffset,l=void 0===o?0:o,c=qr(t,"Period");if(!c.length)throw new Error(Zr);var u=Gr(t),h=aa([s],qr(t,"BaseURL"));return u.sourceDuration=u.mediaPresentationDuration||0,u.NOW=a,u.clientOffset=l,Pr(c.map(function(c,u){return function(t,e){var i=aa(u,qr(t,"BaseURL")),n=Gr(t),s=parseInt(n.id,10),r=y.isNaN(s)?e:s,a=Or(c,{periodIndex:r}),o=qr(t,"AdaptationSet"),l=oa(t);return Pr(o.map(ca(a,i,l)))}}(u,h)))}function ha(t){if(""===t)throw new Error(ta);var e=(new y.DOMParser).parseFromString(t,"application/xml"),i=e&&"MPD"===e.documentElement.tagName?e.documentElement:null;if(!i||i&&0<i.getElementsByTagName("parsererror").length)throw new Error(ea);return i}function da(t,e){return function(t){var e;if(!t.length)return{};var i=t[0].attributes,n=i.sourceDuration,s=i.minimumUpdatePeriod,r=void 0===s?0:s,a=Mr(t.filter(function(t){var e=t.attributes;return"video/mp4"===e.mimeType||"video"===e.contentType})).map(Nr),o=Mr(t.filter(function(t){var e=t.attributes;return"audio/mp4"===e.mimeType||"audio"===e.contentType})),l=t.filter(function(t){var e=t.attributes;return"text/vtt"===e.mimeType||"text"===e.contentType}),c={allowCache:!0,discontinuityStarts:[],segments:[],endList:!0,mediaGroups:(e={AUDIO:{},VIDEO:{}},e["CLOSED-CAPTIONS"]={},e.SUBTITLES={},e),uri:"",duration:n,playlists:a,minimumUpdatePeriod:1e3*r};return o.length&&(c.mediaGroups.AUDIO.audio=function(t){return t.reduce(function(t,e){var i=e.attributes.role&&e.attributes.role.value||"main",n=e.attributes.lang||"",s="main";return n&&(s=e.attributes.lang+" ("+i+")"),t[s]&&t[s].playlists[0].attributes.BANDWIDTH>e.attributes.bandwidth||(t[s]={language:n,autoselect:!0,default:"main"===i,playlists:[function(t){var e,i=t.attributes,n=t.segments,s={attributes:(e={NAME:i.id,BANDWIDTH:i.bandwidth,CODECS:i.codecs},e["PROGRAM-ID"]=1,e),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&&(s.contentProtection=i.contentProtection),s}(e)],uri:""}),t},{})}(o)),l.length&&(c.mediaGroups.SUBTITLES.subs=function(t){return t.reduce(function(t,e){var i=e.attributes.lang||"text";return t[i]||(t[i]={language:i,default:!1,autoselect:!1,playlists:[function(t){var e,i=t.attributes,n=t.segments;return void 0===n&&(n=[{uri:i.baseUrl,timeline:i.periodIndex,resolvedUri:i.baseUrl||"",duration:i.sourceDuration,number:0}],i.duration=i.sourceDuration),{attributes:(e={NAME:i.id,BANDWIDTH:i.bandwidth},e["PROGRAM-ID"]=1,e),uri:"",endList:"static"===(i.type||"static"),timeline:i.periodIndex,resolvedUri:i.baseUrl||"",targetDuration:i.duration,segments:n,mediaSequence:n.length?n[0].number:1}}(e)],uri:""}),t},{})}(l)),c}(function(t){return t.map($r)}(ua(ha(t),e)))}function pa(t){return function(t){var e=qr(t,"UTCTiming")[0];if(!e)return null;var i=Gr(e);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(sa)}return i}(ha(t))}var fa,ma,ga,va,ya,_a={"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"},ba=function(t){return t>>>0};ga=function(t){return fa(t,["moov","trak"]).reduce(function(t,e){var i,n,s,r,a;return(i=fa(e,["tkhd"])[0])?(n=i[0],r=ba(i[s=0===n?12:20]<<24|i[s+1]<<16|i[s+2]<<8|i[s+3]),(a=fa(e,["mdia","mdhd"])[0])?(s=0===(n=a[0])?12:20,t[r]=ba(a[s]<<24|a[s+1]<<16|a[s+2]<<8|a[s+3]),t):null):null},{})},va=function(s,t){var e,i,n;return e=fa(t,["moof","traf"]),i=[].concat.apply([],e.map(function(n){return fa(n,["tfhd"]).map(function(t){var e,i;return e=ba(t[4]<<24|t[5]<<16|t[6]<<8|t[7]),i=s[e]||9e4,(fa(n,["tfdt"]).map(function(t){var e,i;return e=t[0],i=ba(t[4]<<24|t[5]<<16|t[6]<<8|t[7]),1===e&&(i*=Math.pow(2,32),i+=ba(t[8]<<24|t[9]<<16|t[10]<<8|t[11])),i})[0]||1/0)/i})})),n=Math.min.apply(null,i),isFinite(n)?n:0},ya=function(t){var e=fa(t,["moov","trak"]),o=[];return e.forEach(function(t){var e=fa(t,["mdia","hdlr"]),a=fa(t,["tkhd"]);e.forEach(function(t,e){var i,n,s=ma(t.subarray(8,12)),r=a[e];"vide"===s&&(n=0===(i=new DataView(r.buffer,r.byteOffset,r.byteLength)).getUint8(0)?i.getUint32(12):i.getUint32(20),o.push(n))})}),o};var Ta,wa,ka,Sa,Ca,xa,Ea,Da,Aa,Ia,Oa,Pa,La,Ma,Na,Ra,Ua,ja,Ba,Ha,Fa,za,Wa,$a,qa,Va,Ya,Ga,Xa,Ka,Qa,Ja,Za,to,eo,io,no,so,ro,ao,oo={findBox:fa=function(t,e){var i,n,s,r,a,o=[];if(!e.length)return null;for(i=0;i<t.byteLength;)n=ba(t[i]<<24|t[i+1]<<16|t[i+2]<<8|t[i+3]),s=ma(t.subarray(i+4,i+8)),r=1<n?i+n:t.byteLength,s===e[0]&&(1===e.length?o.push(t.subarray(i+8,r)):(a=fa(t.subarray(i+8,r),e.slice(1))).length&&(o=o.concat(a))),i=r;return o},parseType:ma=function(t){var e="";return e+=String.fromCharCode(t[0]),e+=String.fromCharCode(t[1]),e+=String.fromCharCode(t[2]),e+=String.fromCharCode(t[3])},timescale:ga,startTime:va,videoTrackIds:ya},lo=Math.pow(2,32)-1;!function(){var t;if(za={avc1:[],avcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],mvex:[],mvhd:[],sdtp:[],smhd:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],styp:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[]},"undefined"!=typeof Uint8Array){for(t in za)za.hasOwnProperty(t)&&(za[t]=[t.charCodeAt(0),t.charCodeAt(1),t.charCodeAt(2),t.charCodeAt(3)]);Wa=new Uint8Array(["i".charCodeAt(0),"s".charCodeAt(0),"o".charCodeAt(0),"m".charCodeAt(0)]),qa=new Uint8Array(["a".charCodeAt(0),"v".charCodeAt(0),"c".charCodeAt(0),"1".charCodeAt(0)]),$a=new Uint8Array([0,0,0,1]),Va=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]),Ya=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]),Ga={video:Va,audio:Ya},Qa=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),Ka=new Uint8Array([0,0,0,0,0,0,0,0]),Ja=new Uint8Array([0,0,0,0,0,0,0,0]),Za=Ja,to=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),eo=Ja,Xa=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0])}}(),Ta=function(t){var e,i,n=[],s=0;for(e=1;e<arguments.length;e++)n.push(arguments[e]);for(e=n.length;e--;)s+=n[e].byteLength;for(i=new Uint8Array(s+8),new DataView(i.buffer,i.byteOffset,i.byteLength).setUint32(0,i.byteLength),i.set(t,4),e=0,s=8;e<n.length;e++)i.set(n[e],s),s+=n[e].byteLength;return i},wa=function(){return Ta(za.dinf,Ta(za.dref,Qa))},ka=function(t){return Ta(za.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,t.audioobjecttype<<3|t.samplingfrequencyindex>>>1,t.samplingfrequencyindex<<7|t.channelcount<<3,6,1,2]))},Na=function(t){return Ta(za.hdlr,Ga[t])},Ma=function(t){var e=new Uint8Array([0,0,0,0,0,0,0,2,0,0,0,3,0,1,95,144,t.duration>>>24&255,t.duration>>>16&255,t.duration>>>8&255,255&t.duration,85,196,0,0]);return t.samplerate&&(e[12]=t.samplerate>>>24&255,e[13]=t.samplerate>>>16&255,e[14]=t.samplerate>>>8&255,e[15]=255&t.samplerate),Ta(za.mdhd,e)},La=function(t){return Ta(za.mdia,Ma(t),Na(t.type),xa(t))},Ca=function(t){return Ta(za.mfhd,new Uint8Array([0,0,0,0,(4278190080&t)>>24,(16711680&t)>>16,(65280&t)>>8,255&t]))},xa=function(t){return Ta(za.minf,"video"===t.type?Ta(za.vmhd,Xa):Ta(za.smhd,Ka),wa(),Ua(t))},Ea=function(t,e){for(var i=[],n=e.length;n--;)i[n]=Ba(e[n]);return Ta.apply(null,[za.moof,Ca(t)].concat(i))},Da=function(t){for(var e=t.length,i=[];e--;)i[e]=Oa(t[e]);return Ta.apply(null,[za.moov,Ia(4294967295)].concat(i).concat(Aa(t)))},Aa=function(t){for(var e=t.length,i=[];e--;)i[e]=Ha(t[e]);return Ta.apply(null,[za.mvex].concat(i))},Ia=function(t){var e=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,2,0,1,95,144,(4278190080&t)>>24,(16711680&t)>>16,(65280&t)>>8,255&t,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 Ta(za.mvhd,e)},Ra=function(t){var e,i,n=t.samples||[],s=new Uint8Array(4+n.length);for(i=0;i<n.length;i++)e=n[i].flags,s[i+4]=e.dependsOn<<4|e.isDependedOn<<2|e.hasRedundancy;return Ta(za.sdtp,s)},Ua=function(t){return Ta(za.stbl,ja(t),Ta(za.stts,eo),Ta(za.stsc,Za),Ta(za.stsz,to),Ta(za.stco,Ja))},ja=function(t){return Ta(za.stsd,new Uint8Array([0,0,0,0,0,0,0,1]),"video"===t.type?io(t):no(t))},io=function(t){var e,i=t.sps||[],n=t.pps||[],s=[],r=[];for(e=0;e<i.length;e++)s.push((65280&i[e].byteLength)>>>8),s.push(255&i[e].byteLength),s=s.concat(Array.prototype.slice.call(i[e]));for(e=0;e<n.length;e++)r.push((65280&n[e].byteLength)>>>8),r.push(255&n[e].byteLength),r=r.concat(Array.prototype.slice.call(n[e]));return Ta(za.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&t.width)>>8,255&t.width,(65280&t.height)>>8,255&t.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]),Ta(za.avcC,new Uint8Array([1,t.profileIdc,t.profileCompatibility,t.levelIdc,255].concat([i.length]).concat(s).concat([n.length]).concat(r))),Ta(za.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])))},no=function(t){return Ta(za.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,(65280&t.channelcount)>>8,255&t.channelcount,(65280&t.samplesize)>>8,255&t.samplesize,0,0,0,0,(65280&t.samplerate)>>8,255&t.samplerate,0,0]),ka(t))},Pa=function(t){var e=new Uint8Array([0,0,0,7,0,0,0,0,0,0,0,0,(4278190080&t.id)>>24,(16711680&t.id)>>16,(65280&t.id)>>8,255&t.id,0,0,0,0,(4278190080&t.duration)>>24,(16711680&t.duration)>>16,(65280&t.duration)>>8,255&t.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&t.width)>>8,255&t.width,0,0,(65280&t.height)>>8,255&t.height,0,0]);return Ta(za.tkhd,e)},Ba=function(t){var e,i,n,s,r,a;return e=Ta(za.tfhd,new Uint8Array([0,0,0,58,(4278190080&t.id)>>24,(16711680&t.id)>>16,(65280&t.id)>>8,255&t.id,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0])),r=Math.floor(t.baseMediaDecodeTime/(1+lo)),a=Math.floor(t.baseMediaDecodeTime%(1+lo)),i=Ta(za.tfdt,new Uint8Array([1,0,0,0,r>>>24&255,r>>>16&255,r>>>8&255,255&r,a>>>24&255,a>>>16&255,a>>>8&255,255&a])),92,"audio"===t.type?(n=Fa(t,92),Ta(za.traf,e,i,n)):(s=Ra(t),n=Fa(t,s.length+92),Ta(za.traf,e,i,n,s))},Oa=function(t){return t.duration=t.duration||4294967295,Ta(za.trak,Pa(t),La(t))},Ha=function(t){var e=new Uint8Array([0,0,0,0,(4278190080&t.id)>>24,(16711680&t.id)>>16,(65280&t.id)>>8,255&t.id,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]);return"video"!==t.type&&(e[e.length-1]=0),Ta(za.trex,e)},ao=function(t,e){var i=0,n=0,s=0,r=0;return t.length&&(void 0!==t[0].duration&&(i=1),void 0!==t[0].size&&(n=2),void 0!==t[0].flags&&(s=4),void 0!==t[0].compositionTimeOffset&&(r=8)),[0,0,i|n|s|r,1,(4278190080&t.length)>>>24,(16711680&t.length)>>>16,(65280&t.length)>>>8,255&t.length,(4278190080&e)>>>24,(16711680&e)>>>16,(65280&e)>>>8,255&e]},ro=function(t,e){var i,n,s,r;for(n=t.samples||[],i=ao(n,e+=20+16*n.length),r=0;r<n.length;r++)s=n[r],i=i.concat([(4278190080&s.duration)>>>24,(16711680&s.duration)>>>16,(65280&s.duration)>>>8,255&s.duration,(4278190080&s.size)>>>24,(16711680&s.size)>>>16,(65280&s.size)>>>8,255&s.size,s.flags.isLeading<<2|s.flags.dependsOn,s.flags.isDependedOn<<6|s.flags.hasRedundancy<<4|s.flags.paddingValue<<1|s.flags.isNonSyncSample,61440&s.flags.degradationPriority,15&s.flags.degradationPriority,(4278190080&s.compositionTimeOffset)>>>24,(16711680&s.compositionTimeOffset)>>>16,(65280&s.compositionTimeOffset)>>>8,255&s.compositionTimeOffset]);return Ta(za.trun,new Uint8Array(i))},so=function(t,e){var i,n,s,r;for(n=t.samples||[],i=ao(n,e+=20+8*n.length),r=0;r<n.length;r++)s=n[r],i=i.concat([(4278190080&s.duration)>>>24,(16711680&s.duration)>>>16,(65280&s.duration)>>>8,255&s.duration,(4278190080&s.size)>>>24,(16711680&s.size)>>>16,(65280&s.size)>>>8,255&s.size]);return Ta(za.trun,new Uint8Array(i))},Fa=function(t,e){return"audio"===t.type?so(t,e):ro(t,e)};function co(){this.init=function(){var r={};this.on=function(t,e){r[t]||(r[t]=[]),r[t]=r[t].concat(e)},this.off=function(t,e){var i;return!!r[t]&&(i=r[t].indexOf(e),r[t]=r[t].slice(),r[t].splice(i,1),-1<i)},this.trigger=function(t){var e,i,n,s;if(e=r[t])if(2===arguments.length)for(n=e.length,i=0;i<n;++i)e[i].call(this,arguments[1]);else{for(s=[],i=arguments.length,i=1;i<arguments.length;++i)s.push(arguments[i]);for(n=e.length,i=0;i<n;++i)e[i].apply(this,s)}},this.dispose=function(){r={}}}}var uo={ftyp:Sa=function(){return Ta(za.ftyp,Wa,$a,Wa,qa)},mdat:function(t){return Ta(za.mdat,t)},moof:Ea,moov:Da,initSegment:function(t){var e,i=Sa(),n=Da(t);return(e=new Uint8Array(i.byteLength+n.byteLength)).set(i),e.set(n,i.byteLength),e}};co.prototype.pipe=function(e){return this.on("data",function(t){e.push(t)}),this.on("done",function(t){e.flush(t)}),e},co.prototype.push=function(t){this.trigger("data",t)},co.prototype.flush=function(t){this.trigger("done",t)};function ho(t){for(var e=[];t--;)e.push(0);return e}function po(){po.prototype.init.call(this),this.captionPackets_=[],this.ccStreams_=[new Yo(0,0),new Yo(0,1),new Yo(1,0),new Yo(1,1)],this.reset(),this.ccStreams_.forEach(function(t){t.on("data",this.trigger.bind(this,"data")),t.on("done",this.trigger.bind(this,"done"))},this)}var fo,mo,go,vo,yo,_o=co,bo=function(t){var e,i,n=[],s=[];for(e=n.byteLength=0;e<t.length;e++)"access_unit_delimiter_rbsp"===(i=t[e]).nalUnitType?(n.length&&(n.duration=i.dts-n.dts,s.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 s.length&&(!n.duration||n.duration<=0)&&(n.duration=s[s.length-1].duration),s.push(n),s},To=function(t){var e,i,n=[],s=[];for(n.byteLength=0,n.nalCount=0,n.duration=0,n.pts=t[0].pts,n.dts=t[0].dts,s.byteLength=0,s.nalCount=0,s.duration=0,s.pts=t[0].pts,s.dts=t[0].dts,e=0;e<t.length;e++)(i=t[e]).keyFrame?(n.length&&(s.push(n),s.byteLength+=n.byteLength,s.nalCount+=n.nalCount,s.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 s.length&&n.duration<=0&&(n.duration=s[s.length-1].duration),s.byteLength+=n.byteLength,s.nalCount+=n.nalCount,s.duration+=n.duration,s.push(n),s},wo=function(t){var e;return!t[0][0].keyFrame&&1<t.length&&(e=t.shift(),t.byteLength-=e.byteLength,t.nalCount-=e.nalCount,t[0][0].dts=e.dts,t[0][0].pts=e.pts,t[0][0].duration+=e.duration),t},ko=function(t,e){var i,n,s,r,a,o,l,c=e||0,u=[];for(i=0;i<t.length;i++)for(r=t[i],n=0;n<r.length;n++)a=r[n],o=a,l=void 0,(l={size:0,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0,degradationPriority:0,isNonSyncSample:1}}).dataOffset=c,l.compositionTimeOffset=o.pts-o.dts,l.duration=o.duration,l.size=4*o.length,l.size+=o.byteLength,o.keyFrame&&(l.flags.dependsOn=2,l.flags.isNonSyncSample=0),c+=(s=l).size,u.push(s);return u},So=function(t){var e,i,n,s,r,a,o=0,l=t.byteLength,c=t.nalCount,u=new Uint8Array(l+4*c),h=new DataView(u.buffer);for(e=0;e<t.length;e++)for(s=t[e],i=0;i<s.length;i++)for(r=s[i],n=0;n<r.length;n++)a=r[n],h.setUint32(o,a.data.byteLength),o+=4,u.set(a.data,o),o+=a.data.byteLength;return u},Co=[33,16,5,32,164,27],xo=[33,65,108,84,1,2,4,8,168,2,4,8,17,191,252],Eo={96e3:[Co,[227,64],ho(154),[56]],88200:[Co,[231],ho(170),[56]],64e3:[Co,[248,192],ho(240),[56]],48e3:[Co,[255,192],ho(268),[55,148,128],ho(54),[112]],44100:[Co,[255,192],ho(268),[55,163,128],ho(84),[112]],32e3:[Co,[255,192],ho(268),[55,234],ho(226),[112]],24e3:[Co,[255,192],ho(268),[55,255,128],ho(268),[111,112],ho(126),[224]],16e3:[Co,[255,192],ho(268),[55,255,128],ho(268),[111,255],ho(269),[223,108],ho(195),[1,192]],12e3:[xo,ho(268),[3,127,248],ho(268),[6,255,240],ho(268),[13,255,224],ho(268),[27,253,128],ho(259),[56]],11025:[xo,ho(268),[3,127,248],ho(268),[6,255,240],ho(268),[13,255,224],ho(268),[27,255,192],ho(268),[55,175,128],ho(108),[112]],8e3:[xo,ho(268),[3,121,16],ho(47),[7]]},Do=(fo=Eo,Object.keys(fo).reduce(function(t,e){return t[e]=new Uint8Array(fo[e].reduce(function(t,e){return t.concat(e)},[])),t},{})),Ao=(mo=function(t){return 9e4*t},go=function(t,e){return t*e},vo=function(t){return t/9e4},yo=function(t,e){return t/e},function(t,e){return mo(yo(t,e))}),Io=function(t,e){return go(vo(t),e)},Oo=function(t,e,i,n){var s,r,a,o,l=0,c=0,u=0;if(e.length&&(s=Ao(t.baseMediaDecodeTime,t.samplerate),r=Math.ceil(9e4/(t.samplerate/1024)),i&&n&&(l=s-Math.max(i,n),u=(c=Math.floor(l/r))*r),!(c<1||45e3<u))){for(a=(a=Do[t.samplerate])||e[0].data,o=0;o<c;o++)e.splice(o,0,{data:a});t.baseMediaDecodeTime-=Math.floor(Io(u,t.samplerate))}},Po=function(t,e,i){return e.minSegmentDts>=i?t:(e.minSegmentDts=1/0,t.filter(function(t){return t.dts>=i&&(e.minSegmentDts=Math.min(e.minSegmentDts,t.dts),e.minSegmentPts=e.minSegmentDts,!0)}))},Lo=function(t){var e,i,n=[];for(e=0;e<t.length;e++)i=t[e],n.push({size:i.data.byteLength,duration:1024});return n},Mo=function(t){var e,i,n=0,s=new Uint8Array(function(t){var e,i=0;for(e=0;e<t.length;e++)i+=t[e].data.byteLength;return i}(t));for(e=0;e<t.length;e++)i=t[e],s.set(i.data,n),n+=i.data.byteLength;return s},No=function(t){delete t.minSegmentDts,delete t.maxSegmentDts,delete t.minSegmentPts,delete t.maxSegmentPts},Ro=function(t,e){var i,n=t.minSegmentDts;return e||(n-=t.timelineStartInfo.dts),i=t.timelineStartInfo.baseMediaDecodeTime,i+=n,i=Math.max(0,i),"audio"===t.type&&(i*=t.samplerate/9e4,i=Math.floor(i)),i},Uo=function(t,e){"number"==typeof e.pts&&(void 0===t.timelineStartInfo.pts&&(t.timelineStartInfo.pts=e.pts),void 0===t.minSegmentPts?t.minSegmentPts=e.pts:t.minSegmentPts=Math.min(t.minSegmentPts,e.pts),void 0===t.maxSegmentPts?t.maxSegmentPts=e.pts:t.maxSegmentPts=Math.max(t.maxSegmentPts,e.pts)),"number"==typeof e.dts&&(void 0===t.timelineStartInfo.dts&&(t.timelineStartInfo.dts=e.dts),void 0===t.minSegmentDts?t.minSegmentDts=e.dts:t.minSegmentDts=Math.min(t.minSegmentDts,e.dts),void 0===t.maxSegmentDts?t.maxSegmentDts=e.dts:t.maxSegmentDts=Math.max(t.maxSegmentDts,e.dts))},jo=function(t){for(var e=0,i={payloadType:-1,payloadSize:0},n=0,s=0;e<t.byteLength&&128!==t[e];){for(;255===t[e];)n+=255,e++;for(n+=t[e++];255===t[e];)s+=255,e++;if(s+=t[e++],!i.payload&&4===n){i.payloadType=n,i.payloadSize=s,i.payload=t.subarray(e,e+s);break}e+=s,s=n=0}return i},Bo=function(t){return 181!==t.payload[0]?null:49!=(t.payload[1]<<8|t.payload[2])?null:"GA94"!==String.fromCharCode(t.payload[3],t.payload[4],t.payload[5],t.payload[6])?null:3!==t.payload[7]?null:t.payload.subarray(8,t.payload.length-1)},Ho=function(t,e){var i,n,s,r,a=[];if(!(64&e[0]))return a;for(n=31&e[0],i=0;i<n;i++)r={type:3&e[2+(s=3*i)],pts:t},4&e[2+s]&&(r.ccData=e[3+s]<<8|e[4+s],a.push(r));return a},Fo=function(t){for(var e,i,n=t.byteLength,s=[],r=1;r<n-2;)0===t[r]&&0===t[r+1]&&3===t[r+2]?(s.push(r+2),r+=2):r++;if(0===s.length)return t;e=n-s.length,i=new Uint8Array(e);var a=0;for(r=0;r<e;a++,r++)a===s[0]&&(a++,s.shift()),i[r]=t[a];return i},zo=4;(po.prototype=new _o).push=function(t){var e,i,n;if("sei_rbsp"===t.nalUnitType&&(e=jo(t.escapedRBSP)).payloadType===zo&&(i=Bo(e)))if(t.dts<this.latestDts_)this.ignoreNextEqualDts_=!0;else{if(t.dts===this.latestDts_&&this.ignoreNextEqualDts_)return this.numSameDts_--,void(this.numSameDts_||(this.ignoreNextEqualDts_=!1));n=Ho(t.pts,i),this.captionPackets_=this.captionPackets_.concat(n),this.latestDts_!==t.dts&&(this.numSameDts_=0),this.numSameDts_++,this.latestDts_=t.dts}},po.prototype.flush=function(){this.captionPackets_.length?(this.captionPackets_.forEach(function(t,e){t.presortIndex=e}),this.captionPackets_.sort(function(t,e){return t.pts===e.pts?t.presortIndex-e.presortIndex:t.pts-e.pts}),this.captionPackets_.forEach(function(t){t.type<2&&this.dispatchCea608Packet(t)},this),this.captionPackets_.length=0,this.ccStreams_.forEach(function(t){t.flush()},this)):this.ccStreams_.forEach(function(t){t.flush()},this)},po.prototype.reset=function(){this.latestDts_=null,this.ignoreNextEqualDts_=!1,this.numSameDts_=0,this.activeCea608Channel_=[null,null],this.ccStreams_.forEach(function(t){t.reset()})},po.prototype.dispatchCea608Packet=function(t){this.setsChannel1Active(t)?this.activeCea608Channel_[t.type]=0:this.setsChannel2Active(t)&&(this.activeCea608Channel_[t.type]=1),null!==this.activeCea608Channel_[t.type]&&this.ccStreams_[(t.type<<1)+this.activeCea608Channel_[t.type]].push(t)},po.prototype.setsChannel1Active=function(t){return 4096==(30720&t.ccData)},po.prototype.setsChannel2Active=function(t){return 6144==(30720&t.ccData)};function Wo(t){return null===t?"":(t=qo[t]||t,String.fromCharCode(t))}function $o(){for(var t=[],e=15;e--;)t.push("");return t}var qo={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},Vo=[4352,4384,4608,4640,5376,5408,5632,5664,5888,5920,4096,4864,4896,5120,5152],Yo=function t(e,i){t.prototype.init.call(this),this.field_=e||0,this.dataChannel_=i||0,this.name_="CC"+(1+(this.field_<<1|this.dataChannel_)),this.setConstants(),this.reset(),this.push=function(t){var e,i,n,s,r;if((e=32639&t.ccData)!==this.lastControlCode_){if(4096==(61440&e)?this.lastControlCode_=e:e!==this.PADDING_&&(this.lastControlCode_=null),n=e>>>8,s=255&e,e!==this.PADDING_)if(e===this.RESUME_CAPTION_LOADING_)this.mode_="popOn";else if(e===this.END_OF_CAPTION_)this.mode_="popOn",this.clearFormatting(t.pts),this.flushDisplayed(t.pts),i=this.displayed_,this.displayed_=this.nonDisplayed_,this.nonDisplayed_=i,this.startPts_=t.pts;else if(e===this.ROLL_UP_2_ROWS_)this.rollUpRows_=2,this.setRollUp(t.pts);else if(e===this.ROLL_UP_3_ROWS_)this.rollUpRows_=3,this.setRollUp(t.pts);else if(e===this.ROLL_UP_4_ROWS_)this.rollUpRows_=4,this.setRollUp(t.pts);else if(e===this.CARRIAGE_RETURN_)this.clearFormatting(t.pts),this.flushDisplayed(t.pts),this.shiftRowsUp_(),this.startPts_=t.pts;else if(e===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(e===this.ERASE_DISPLAYED_MEMORY_)this.flushDisplayed(t.pts),this.displayed_=$o();else if(e===this.ERASE_NON_DISPLAYED_MEMORY_)this.nonDisplayed_=$o();else if(e===this.RESUME_DIRECT_CAPTIONING_)"paintOn"!==this.mode_&&(this.flushDisplayed(t.pts),this.displayed_=$o()),this.mode_="paintOn",this.startPts_=t.pts;else if(this.isSpecialCharacter(n,s))r=Wo((n=(3&n)<<8)|s),this[this.mode_](t.pts,r),this.column_++;else if(this.isExtCharacter(n,s))"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),r=Wo((n=(3&n)<<8)|s),this[this.mode_](t.pts,r),this.column_++;else if(this.isMidRowCode(n,s))this.clearFormatting(t.pts),this[this.mode_](t.pts," "),this.column_++,14==(14&s)&&this.addFormatting(t.pts,["i"]),1==(1&s)&&this.addFormatting(t.pts,["u"]);else if(this.isOffsetControlCode(n,s))this.column_+=3&s;else if(this.isPAC(n,s)){var a=Vo.indexOf(7968&e);"rollUp"===this.mode_&&(a-this.rollUpRows_+1<0&&(a=this.rollUpRows_-1),this.setRollUp(t.pts,a)),a!==this.row_&&(this.clearFormatting(t.pts),this.row_=a),1&s&&-1===this.formatting_.indexOf("u")&&this.addFormatting(t.pts,["u"]),16==(16&e)&&(this.column_=4*((14&e)>>1)),this.isColorPAC(s)&&14==(14&s)&&this.addFormatting(t.pts,["i"])}else this.isNormalChar(n)&&(0===s&&(s=null),r=Wo(n),r+=Wo(s),this[this.mode_](t.pts,r),this.column_+=r.length)}else this.lastControlCode_=null}};Yo.prototype=new _o,Yo.prototype.flushDisplayed=function(t){var e=this.displayed_.map(function(t){try{return t.trim()}catch(t){return console.error("Skipping malformed caption."),""}}).join("\n").replace(/^\n+|\n+$/g,"");e.length&&this.trigger("data",{startPts:this.startPts_,endPts:t,text:e,stream:this.name_})},Yo.prototype.reset=function(){this.mode_="popOn",this.topRow_=0,this.startPts_=0,this.displayed_=$o(),this.nonDisplayed_=$o(),this.lastControlCode_=null,this.column_=0,this.row_=14,this.rollUpRows_=2,this.formatting_=[]},Yo.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_},Yo.prototype.isSpecialCharacter=function(t,e){return t===this.EXT_&&48<=e&&e<=63},Yo.prototype.isExtCharacter=function(t,e){return(t===this.EXT_+1||t===this.EXT_+2)&&32<=e&&e<=63},Yo.prototype.isMidRowCode=function(t,e){return t===this.EXT_&&32<=e&&e<=47},Yo.prototype.isOffsetControlCode=function(t,e){return t===this.OFFSET_&&33<=e&&e<=35},Yo.prototype.isPAC=function(t,e){return t>=this.BASE_&&t<this.BASE_+8&&64<=e&&e<=127},Yo.prototype.isColorPAC=function(t){return 64<=t&&t<=79||96<=t&&t<=127},Yo.prototype.isNormalChar=function(t){return 32<=t&&t<=127},Yo.prototype.setRollUp=function(t,e){if("rollUp"!==this.mode_&&(this.row_=14,this.mode_="rollUp",this.flushDisplayed(t),this.nonDisplayed_=$o(),this.displayed_=$o()),void 0!==e&&e!==this.row_)for(var i=0;i<this.rollUpRows_;i++)this.displayed_[e-i]=this.displayed_[this.row_-i],this.displayed_[this.row_-i]="";void 0===e&&(e=this.row_),this.topRow_=e-this.rollUpRows_+1},Yo.prototype.addFormatting=function(t,e){this.formatting_=this.formatting_.concat(e);var i=e.reduce(function(t,e){return t+"<"+e+">"},"");this[this.mode_](t,i)},Yo.prototype.clearFormatting=function(t){if(this.formatting_.length){var e=this.formatting_.reverse().reduce(function(t,e){return t+"</"+e+">"},"");this.formatting_=[],this[this.mode_](t,e)}},Yo.prototype.popOn=function(t,e){var i=this.nonDisplayed_[this.row_];i+=e,this.nonDisplayed_[this.row_]=i},Yo.prototype.rollUp=function(t,e){var i=this.displayed_[this.row_];i+=e,this.displayed_[this.row_]=i},Yo.prototype.shiftRowsUp_=function(){var t;for(t=0;t<this.topRow_;t++)this.displayed_[t]="";for(t=this.row_+1;t<15;t++)this.displayed_[t]="";for(t=this.topRow_;t<this.row_;t++)this.displayed_[t]=this.displayed_[t+1];this.displayed_[this.row_]=""},Yo.prototype.paintOn=function(t,e){var i=this.displayed_[this.row_];i+=e,this.displayed_[this.row_]=i};function Go(t,e){var i=1;for(e<t&&(i=-1);4294967296<Math.abs(e-t);)t+=8589934592*i;return t}function Xo(t){var e,i;Xo.prototype.init.call(this),this.type_=t,this.push=function(t){t.type===this.type_&&(void 0===i&&(i=t.dts),t.dts=Go(t.dts,i),t.pts=Go(t.pts,i),e=t.dts,this.trigger("data",t))},this.flush=function(){i=e,this.trigger("done")},this.discontinuity=function(){e=i=void 0}}var Ko={CaptionStream:po,Cea608Stream:Yo},Qo={H264_STREAM_TYPE:27,ADTS_STREAM_TYPE:15,METADATA_STREAM_TYPE:21};Xo.prototype=new _o;function Jo(t,e,i){var n,s="";for(n=e;n<i;n++)s+="%"+("00"+t[n].toString(16)).slice(-2);return s}function Zo(t,e,i){return decodeURIComponent(Jo(t,e,i))}function tl(t){return t[0]<<21|t[1]<<14|t[2]<<7|t[3]}var el,il=Xo,nl=Go,sl={TXXX:function(t){var e;if(3===t.data[0]){for(e=1;e<t.data.length;e++)if(0===t.data[e]){t.description=Zo(t.data,1,e),t.value=Zo(t.data,e+1,t.data.length).replace(/\0*$/,"");break}t.data=t.value}},WXXX:function(t){var e;if(3===t.data[0])for(e=1;e<t.data.length;e++)if(0===t.data[e]){t.description=Zo(t.data,1,e),t.url=Zo(t.data,e+1,t.data.length);break}},PRIV:function(t){var e,i;for(e=0;e<t.data.length;e++)if(0===t.data[e]){t.owner=(i=t.data,unescape(Jo(i,0,e)));break}t.privateData=t.data.subarray(e+1),t.data=t.privateData}};(el=function(t){var e,l={debug:!(!t||!t.debug),descriptor:t&&t.descriptor},c=0,u=[],h=0;if(el.prototype.init.call(this),this.dispatchType=Qo.METADATA_STREAM_TYPE.toString(16),l.descriptor)for(e=0;e<l.descriptor.length;e++)this.dispatchType+=("00"+l.descriptor[e].toString(16)).slice(-2);this.push=function(t){var e,i,n,s,r;if("timed-metadata"===t.type)if(t.dataAlignmentIndicator&&(h=0,u.length=0),0===u.length&&(t.data.length<10||t.data[0]!=="I".charCodeAt(0)||t.data[1]!=="D".charCodeAt(0)||t.data[2]!=="3".charCodeAt(0)))l.debug&&console.log("Skipping unrecognized metadata packet");else if(u.push(t),h+=t.data.byteLength,1===u.length&&(c=tl(t.data.subarray(6,10)),c+=10),!(h<c)){for(e={data:new Uint8Array(c),frames:[],pts:u[0].pts,dts:u[0].dts},r=0;r<c;)e.data.set(u[0].data.subarray(0,c-r),r),r+=u[0].data.byteLength,h-=u[0].data.byteLength,u.shift();i=10,64&e.data[5]&&(i+=4,i+=tl(e.data.subarray(10,14)),c-=tl(e.data.subarray(16,20)));do{if((n=tl(e.data.subarray(i+4,i+8)))<1)return console.log("Malformed ID3 frame encountered. Skipping metadata parsing.");if((s={id:String.fromCharCode(e.data[i],e.data[i+1],e.data[i+2],e.data[i+3]),data:e.data.subarray(i+10,i+n+10)}).key=s.id,sl[s.id]&&(sl[s.id](s),"com.apple.streaming.transportStreamTimestamp"===s.owner)){var a=s.data,o=(1&a[3])<<30|a[4]<<22|a[5]<<14|a[6]<<6|a[7]>>>2;o*=4,o+=3&a[7],s.timeStamp=o,void 0===e.pts&&void 0===e.dts&&(e.pts=s.timeStamp,e.dts=s.timeStamp),this.trigger("timestamp",s)}e.frames.push(s),i+=10,i+=n}while(i<c);this.trigger("data",e)}}}).prototype=new _o;var rl,al,ol,ll=el,cl=il;(rl=function(){var s=new Uint8Array(188),r=0;rl.prototype.init.call(this),this.push=function(t){var e,i=0,n=188;for(r?((e=new Uint8Array(t.byteLength+r)).set(s.subarray(0,r)),e.set(t,r),r=0):e=t;n<e.byteLength;)71!==e[i]||71!==e[n]?(i++,n++):(this.trigger("data",e.subarray(i,n)),i+=188,n+=188);i<e.byteLength&&(s.set(e.subarray(i),0),r=e.byteLength-i)},this.flush=function(){188===r&&71===s[0]&&(this.trigger("data",s),r=0),this.trigger("done")}}).prototype=new _o,(al=function(){var n,s,r,a;al.prototype.init.call(this),(a=this).packetsWaitingForPmt=[],this.programMapTable=void 0,n=function(t,e){var i=0;e.payloadUnitStartIndicator&&(i+=t[i]+1),"pat"===e.type?s(t.subarray(i),e):r(t.subarray(i),e)},s=function(t,e){e.section_number=t[7],e.last_section_number=t[8],a.pmtPid=(31&t[10])<<8|t[11],e.pmtPid=a.pmtPid},r=function(t,e){var i,n;if(1&t[5]){for(a.programMapTable={video:null,audio:null,"timed-metadata":{}},i=3+((15&t[1])<<8|t[2])-4,n=12+((15&t[10])<<8|t[11]);n<i;){var s=t[n],r=(31&t[n+1])<<8|t[n+2];s===Qo.H264_STREAM_TYPE&&null===a.programMapTable.video?a.programMapTable.video=r:s===Qo.ADTS_STREAM_TYPE&&null===a.programMapTable.audio?a.programMapTable.audio=r:s===Qo.METADATA_STREAM_TYPE&&(a.programMapTable["timed-metadata"][r]=s),n+=5+((15&t[n+3])<<8|t[n+4])}e.programMapTable=a.programMapTable}},this.push=function(t){var e={},i=4;if(e.payloadUnitStartIndicator=!!(64&t[1]),e.pid=31&t[1],e.pid<<=8,e.pid|=t[2],1<(48&t[3])>>>4&&(i+=t[i]+1),0===e.pid)e.type="pat",n(t.subarray(i),e),this.trigger("data",e);else if(e.pid===this.pmtPid)for(e.type="pmt",n(t.subarray(i),e),this.trigger("data",e);this.packetsWaitingForPmt.length;)this.processPes_.apply(this,this.packetsWaitingForPmt.shift());else void 0===this.programMapTable?this.packetsWaitingForPmt.push([t,i,e]):this.processPes_(t,i,e)},this.processPes_=function(t,e,i){i.pid===this.programMapTable.video?i.streamType=Qo.H264_STREAM_TYPE:i.pid===this.programMapTable.audio?i.streamType=Qo.ADTS_STREAM_TYPE:i.streamType=this.programMapTable["timed-metadata"][i.pid],i.type="pes",i.data=t.subarray(e),this.trigger("data",i)}}).prototype=new _o,al.STREAM_TYPES={h264:27,adts:15},(ol=function(){function n(t,e,i){var n,s,r=new Uint8Array(t.size),a={type:e},o=0,l=0;if(t.data.length&&!(t.size<9)){for(a.trackId=t.data[0].pid,o=0;o<t.data.length;o++)s=t.data[o],r.set(s.data,l),l+=s.data.byteLength;!function(t,e){var i;e.packetLength=6+(t[4]<<8|t[5]),e.dataAlignmentIndicator=0!=(4&t[6]),192&(i=t[7])&&(e.pts=(14&t[9])<<27|(255&t[10])<<20|(254&t[11])<<12|(255&t[12])<<5|(254&t[13])>>>3,e.pts*=4,e.pts+=(6&t[13])>>>1,e.dts=e.pts,64&i&&(e.dts=(14&t[14])<<27|(255&t[15])<<20|(254&t[16])<<12|(255&t[17])<<5|(254&t[18])>>>3,e.dts*=4,e.dts+=(6&t[18])>>>1)),e.data=t.subarray(9+t[8])}(r,a),n="video"===e||a.packetLength<=t.size,(i||n)&&(t.size=0,t.data.length=0),n&&c.trigger("data",a)}}var c=this,s={data:[],size:0},r={data:[],size:0},a={data:[],size:0};ol.prototype.init.call(this),this.push=function(i){({pat:function(){},pes:function(){var t,e;switch(i.streamType){case Qo.H264_STREAM_TYPE:case Qo.H264_STREAM_TYPE:t=s,e="video";break;case Qo.ADTS_STREAM_TYPE:t=r,e="audio";break;case Qo.METADATA_STREAM_TYPE:t=a,e="timed-metadata";break;default:return}i.payloadUnitStartIndicator&&n(t,e,!0),t.data.push(i),t.size+=i.data.byteLength},pmt:function(){var t={type:"metadata",tracks:[]},e=i.programMapTable;null!==e.video&&t.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+e.video,codec:"avc",type:"video"}),null!==e.audio&&t.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+e.audio,codec:"adts",type:"audio"}),c.trigger("data",t)}})[i.type]()},this.flush=function(){n(s,"video"),n(r,"audio"),n(a,"timed-metadata"),this.trigger("done")}}).prototype=new _o;var ul={PAT_PID:0,MP2T_PACKET_LENGTH:188,TransportPacketStream:rl,TransportParseStream:al,ElementaryStream:ol,TimestampRolloverStream:cl,CaptionStream:Ko.CaptionStream,Cea608Stream:Ko.Cea608Stream,MetadataStream:ll};for(var hl in Qo)Qo.hasOwnProperty(hl)&&(ul[hl]=Qo[hl]);var dl,pl=ul,fl=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];(dl=function(){var c;dl.prototype.init.call(this),this.push=function(t){var e,i,n,s,r,a,o=0,l=0;if("audio"===t.type)for(c?(s=c,(c=new Uint8Array(s.byteLength+t.data.byteLength)).set(s),c.set(t.data,s.byteLength)):c=t.data;o+5<c.length;)if(255===c[o]&&240==(246&c[o+1])){if(i=2*(1&~c[o+1]),e=(3&c[o+3])<<11|c[o+4]<<3|(224&c[o+5])>>5,a=9e4*(r=1024*(1+(3&c[o+6])))/fl[(60&c[o+2])>>>2],n=o+e,c.byteLength<n)return;if(this.trigger("data",{pts:t.pts+l*a,dts:t.dts+l*a,sampleCount:r,audioobjecttype:1+(c[o+2]>>>6&3),channelcount:(1&c[o+2])<<2|(192&c[o+3])>>>6,samplerate:fl[(60&c[o+2])>>>2],samplingfrequencyindex:(60&c[o+2])>>>2,samplesize:16,data:c.subarray(o+7+i,n)}),c.byteLength===n)return void(c=void 0);l++,c=c.subarray(n)}else o++},this.flush=function(){this.trigger("done")}}).prototype=new _o;var ml,gl,vl,yl=dl,_l=function(n){var s=n.byteLength,r=0,a=0;this.length=function(){return 8*s},this.bitsAvailable=function(){return 8*s+a},this.loadWord=function(){var t=n.byteLength-s,e=new Uint8Array(4),i=Math.min(4,s);if(0===i)throw new Error("no bytes available");e.set(n.subarray(t,t+i)),r=new DataView(e.buffer).getUint32(0),a=8*i,s-=i},this.skipBits=function(t){var e;t<a||(t-=a,t-=8*(e=Math.floor(t/8)),s-=e,this.loadWord()),r<<=t,a-=t},this.readBits=function(t){var e=Math.min(a,t),i=r>>>32-e;return 0<(a-=e)?r<<=e:0<s&&this.loadWord(),0<(e=t-e)?i<<e|this.readBits(e):i},this.skipLeadingZeros=function(){var t;for(t=0;t<a;++t)if(0!=(r&2147483648>>>t))return r<<=t,a-=t,t;return this.loadWord(),t+this.skipLeadingZeros()},this.skipUnsignedExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros())},this.skipExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros())},this.readUnsignedExpGolomb=function(){var t=this.skipLeadingZeros();return this.readBits(t+1)-1},this.readExpGolomb=function(){var t=this.readUnsignedExpGolomb();return 1&t?1+t>>>1:-1*(t>>>1)},this.readBoolean=function(){return 1===this.readBits(1)},this.readUnsignedByte=function(){return this.readBits(8)},this.loadWord()};(gl=function(){var i,n,s=0;gl.prototype.init.call(this),this.push=function(t){var e;for(n=n?((e=new Uint8Array(n.byteLength+t.data.byteLength)).set(n),e.set(t.data,n.byteLength),e):t.data;s<n.byteLength-3;s++)if(1===n[s+2]){i=s+5;break}for(;i<n.byteLength;)switch(n[i]){case 0:if(0!==n[i-1]){i+=2;break}if(0!==n[i-2]){i++;break}for(s+3!==i-2&&this.trigger("data",n.subarray(s+3,i-2));1!==n[++i]&&i<n.length;);s=i-2,i+=3;break;case 1:if(0!==n[i-1]||0!==n[i-2]){i+=3;break}this.trigger("data",n.subarray(s+3,i-2)),s=i-2,i+=3;break;default:i+=3}n=n.subarray(s),i-=s,s=0},this.flush=function(){n&&3<n.byteLength&&this.trigger("data",n.subarray(s+3)),n=null,s=0,this.trigger("done")}}).prototype=new _o,vl={100:!0,110:!0,122:!0,244:!0,44:!0,83:!0,86:!0,118:!0,128:!0,138:!0,139:!0,134:!0},(ml=function(){var i,n,s,r,a,o,_,e=new gl;ml.prototype.init.call(this),(i=this).push=function(t){"video"===t.type&&(n=t.trackId,s=t.pts,r=t.dts,e.push(t))},e.on("data",function(t){var e={trackId:n,pts:s,dts:r,data:t};switch(31&t[0]){case 5:e.nalUnitType="slice_layer_without_partitioning_rbsp_idr";break;case 6:e.nalUnitType="sei_rbsp",e.escapedRBSP=a(t.subarray(1));break;case 7:e.nalUnitType="seq_parameter_set_rbsp",e.escapedRBSP=a(t.subarray(1)),e.config=o(e.escapedRBSP);break;case 8:e.nalUnitType="pic_parameter_set_rbsp";break;case 9:e.nalUnitType="access_unit_delimiter_rbsp"}i.trigger("data",e)}),e.on("done",function(){i.trigger("done")}),this.flush=function(){e.flush()},_=function(t,e){var i,n=8,s=8;for(i=0;i<t;i++)0!==s&&(s=(n+e.readExpGolomb()+256)%256),n=0===s?n:s},a=function(t){for(var e,i,n=t.byteLength,s=[],r=1;r<n-2;)0===t[r]&&0===t[r+1]&&3===t[r+2]?(s.push(r+2),r+=2):r++;if(0===s.length)return t;e=n-s.length,i=new Uint8Array(e);var a=0;for(r=0;r<e;a++,r++)a===s[0]&&(a++,s.shift()),i[r]=t[a];return i},o=function(t){var e,i,n,s,r,a,o,l,c,u,h,d,p,f=0,m=0,g=0,v=0,y=1;if(i=(e=new _l(t)).readUnsignedByte(),s=e.readUnsignedByte(),n=e.readUnsignedByte(),e.skipUnsignedExpGolomb(),vl[i]&&(3===(r=e.readUnsignedExpGolomb())&&e.skipBits(1),e.skipUnsignedExpGolomb(),e.skipUnsignedExpGolomb(),e.skipBits(1),e.readBoolean()))for(h=3!==r?8:12,p=0;p<h;p++)e.readBoolean()&&_(p<6?16:64,e);if(e.skipUnsignedExpGolomb(),0===(a=e.readUnsignedExpGolomb()))e.readUnsignedExpGolomb();else if(1===a)for(e.skipBits(1),e.skipExpGolomb(),e.skipExpGolomb(),o=e.readUnsignedExpGolomb(),p=0;p<o;p++)e.skipExpGolomb();if(e.skipUnsignedExpGolomb(),e.skipBits(1),l=e.readUnsignedExpGolomb(),c=e.readUnsignedExpGolomb(),0===(u=e.readBits(1))&&e.skipBits(1),e.skipBits(1),e.readBoolean()&&(f=e.readUnsignedExpGolomb(),m=e.readUnsignedExpGolomb(),g=e.readUnsignedExpGolomb(),v=e.readUnsignedExpGolomb()),e.readBoolean()&&e.readBoolean()){switch(e.readUnsignedByte()){case 1:d=[1,1];break;case 2:d=[12,11];break;case 3:d=[10,11];break;case 4:d=[16,11];break;case 5:d=[40,33];break;case 6:d=[24,11];break;case 7:d=[20,11];break;case 8:d=[32,11];break;case 9:d=[80,33];break;case 10:d=[18,11];break;case 11:d=[15,11];break;case 12:d=[64,33];break;case 13:d=[160,99];break;case 14:d=[4,3];break;case 15:d=[3,2];break;case 16:d=[2,1];break;case 255:d=[e.readUnsignedByte()<<8|e.readUnsignedByte(),e.readUnsignedByte()<<8|e.readUnsignedByte()]}d&&(y=d[0]/d[1])}return{profileIdc:i,levelIdc:n,profileCompatibility:s,width:Math.ceil((16*(l+1)-2*f-2*m)*y),height:(2-u)*(c+1)*16-2*g-2*v}}}).prototype=new _o;function bl(t){return t[0]<<21|t[1]<<14|t[2]<<7|t[3]}var Tl,wl={H264Stream:ml,NalByteStream:gl},kl=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350],Sl={isLikelyAacData:function(t){return t[0]==="I".charCodeAt(0)&&t[1]==="D".charCodeAt(0)&&t[2]==="3".charCodeAt(0)},parseId3TagSize:function(t,e){var i=t[e+6]<<21|t[e+7]<<14|t[e+8]<<7|t[e+9];return(16&t[e+5])>>4?20+i:10+i},parseAdtsSize:function(t,e){var i=(224&t[e+5])>>5,n=t[e+4]<<3;return 6144&t[e+3]|n|i},parseType:function(t,e){return t[e]==="I".charCodeAt(0)&&t[e+1]==="D".charCodeAt(0)&&t[e+2]==="3".charCodeAt(0)?"timed-metadata":!0&t[e]&&240==(240&t[e+1])?"audio":null},parseSampleRate:function(t){for(var e=0;e+5<t.length;){if(255===t[e]&&240==(246&t[e+1]))return kl[(60&t[e+2])>>>2];e++}return null},parseAacTimestamp:function(t){var e,i,n;e=10,64&t[5]&&(e+=4,e+=bl(t.subarray(10,14)));do{if((i=bl(t.subarray(e+4,e+8)))<1)return null;if("PRIV"===String.fromCharCode(t[e],t[e+1],t[e+2],t[e+3])){n=t.subarray(e+10,e+i+10);for(var s=0;s<n.byteLength;s++)if(0===n[s]){if("com.apple.streaming.transportStreamTimestamp"!==unescape(function(t,e,i){var n,s="";for(n=e;n<i;n++)s+="%"+("00"+t[n].toString(16)).slice(-2);return s}(n,0,s)))break;var r=n.subarray(s+1),a=(1&r[3])<<30|r[4]<<22|r[5]<<14|r[6]<<6|r[7]>>>2;return a*=4,a+=3&r[7]}}e+=10,e+=i}while(e<t.byteLength);return null}};(Tl=function(){var o=new Uint8Array,l=0;Tl.prototype.init.call(this),this.setTimestamp=function(t){l=t},this.push=function(t){var e,i,n,s,r=0,a=0;for(o.length?(s=o.length,(o=new Uint8Array(t.byteLength+s)).set(o.subarray(0,s)),o.set(t,s)):o=t;3<=o.length-a;)if(o[a]!=="I".charCodeAt(0)||o[a+1]!=="D".charCodeAt(0)||o[a+2]!=="3".charCodeAt(0))if(255!=(255&o[a])||240!=(240&o[a+1]))a++;else{if(o.length-a<7)break;if(a+(r=Sl.parseAdtsSize(o,a))>o.length)break;n={type:"audio",data:o.subarray(a,a+r),pts:l,dts:l},this.trigger("data",n),a+=r}else{if(o.length-a<10)break;if(a+(r=Sl.parseId3TagSize(o,a))>o.length)break;i={type:"timed-metadata",data:o.subarray(a,a+r)},this.trigger("data",i),a+=r}e=o.length-a,o=0<e?o.subarray(a):new Uint8Array}}).prototype=new _o;function Cl(t,e){var i;if(t.length!==e.length)return!1;for(i=0;i<t.length;i++)if(t[i]!==e[i])return!1;return!0}var xl,El,Dl,Al,Il=Tl,Ol=wl.H264Stream,Pl=Sl.isLikelyAacData,Ll=["audioobjecttype","channelcount","samplerate","samplingfrequencyindex","samplesize"],Ml=["width","height","profileIdc","levelIdc","profileCompatibility"];(El=function(s,r){var a=[],o=0,l=0,c=0,u=1/0;r=r||{},El.prototype.init.call(this),this.push=function(e){Uo(s,e),s&&Ll.forEach(function(t){s[t]=e[t]}),a.push(e)},this.setEarliestDts=function(t){l=t-s.timelineStartInfo.baseMediaDecodeTime},this.setVideoBaseMediaDecodeTime=function(t){u=t},this.setAudioAppendStart=function(t){c=t},this.flush=function(){var t,e,i,n;0!==a.length&&(t=Po(a,s,l),s.baseMediaDecodeTime=Ro(s,r.keepOriginalTimestamps),Oo(s,t,c,u),s.samples=Lo(t),i=uo.mdat(Mo(t)),a=[],e=uo.moof(o,[s]),n=new Uint8Array(e.byteLength+i.byteLength),o++,n.set(e),n.set(i,e.byteLength),No(s),this.trigger("data",{track:s,boxes:n})),this.trigger("done","AudioSegmentStream")}}).prototype=new _o,(xl=function(o,l){var e,i,c=0,u=[],h=[];l=l||{},xl.prototype.init.call(this),delete o.minPTS,this.gopCache_=[],this.push=function(t){Uo(o,t),"seq_parameter_set_rbsp"!==t.nalUnitType||e||(e=t.config,o.sps=[t.data],Ml.forEach(function(t){o[t]=e[t]},this)),"pic_parameter_set_rbsp"!==t.nalUnitType||i||(i=t.data,o.pps=[t.data]),u.push(t)},this.flush=function(){for(var t,e,i,n,s,r;u.length&&"access_unit_delimiter_rbsp"!==u[0].nalUnitType;)u.shift();if(0===u.length)return this.resetStream_(),void this.trigger("done","VideoSegmentStream");if(t=bo(u),(i=To(t))[0][0].keyFrame||((e=this.getGopForFusion_(u[0],o))?(i.unshift(e),i.byteLength+=e.byteLength,i.nalCount+=e.nalCount,i.pts=e.pts,i.dts=e.dts,i.duration+=e.duration):i=wo(i)),h.length){var a;if(!(a=l.alignGopsAtEnd?this.alignGopsAtEnd_(i):this.alignGopsAtStart_(i)))return this.gopCache_.unshift({gop:i.pop(),pps:o.pps,sps:o.sps}),this.gopCache_.length=Math.min(6,this.gopCache_.length),u=[],this.resetStream_(),void this.trigger("done","VideoSegmentStream");No(o),i=a}Uo(o,i),o.samples=ko(i),s=uo.mdat(So(i)),o.baseMediaDecodeTime=Ro(o,l.keepOriginalTimestamps),this.trigger("processedGopsInfo",i.map(function(t){return{pts:t.pts,dts:t.dts,byteLength:t.byteLength}})),this.gopCache_.unshift({gop:i.pop(),pps:o.pps,sps:o.sps}),this.gopCache_.length=Math.min(6,this.gopCache_.length),u=[],this.trigger("baseMediaDecodeTime",o.baseMediaDecodeTime),this.trigger("timelineStartInfo",o.timelineStartInfo),n=uo.moof(c,[o]),r=new Uint8Array(n.byteLength+s.byteLength),c++,r.set(n),r.set(s,n.byteLength),this.trigger("data",{track:o,boxes:r}),this.resetStream_(),this.trigger("done","VideoSegmentStream")},this.resetStream_=function(){No(o),i=e=void 0},this.getGopForFusion_=function(t){var e,i,n,s,r,a=1/0;for(r=0;r<this.gopCache_.length;r++)n=(s=this.gopCache_[r]).gop,o.pps&&Cl(o.pps[0],s.pps[0])&&o.sps&&Cl(o.sps[0],s.sps[0])&&(n.dts<o.timelineStartInfo.dts||-1e4<=(e=t.dts-n.dts-n.duration)&&e<=45e3&&(!i||e<a)&&(i=s,a=e));return i?i.gop:null},this.alignGopsAtStart_=function(t){var e,i,n,s,r,a,o,l;for(r=t.byteLength,a=t.nalCount,o=t.duration,e=i=0;e<h.length&&i<t.length&&(n=h[e],s=t[i],n.pts!==s.pts);)s.pts>n.pts?e++:(i++,r-=s.byteLength,a-=s.nalCount,o-=s.duration);return 0===i?t:i===t.length?null:((l=t.slice(i)).byteLength=r,l.duration=o,l.nalCount=a,l.pts=l[0].pts,l.dts=l[0].dts,l)},this.alignGopsAtEnd_=function(t){var e,i,n,s,r,a,o;for(e=h.length-1,i=t.length-1,r=null,a=!1;0<=e&&0<=i;){if(n=h[e],s=t[i],n.pts===s.pts){a=!0;break}n.pts>s.pts?e--:(e===h.length-1&&(r=i),i--)}if(!a&&null===r)return null;if(0===(o=a?i:r))return t;var l=t.slice(o),c=l.reduce(function(t,e){return t.byteLength+=e.byteLength,t.duration+=e.duration,t.nalCount+=e.nalCount,t},{byteLength:0,duration:0,nalCount:0});return l.byteLength=c.byteLength,l.duration=c.duration,l.nalCount=c.nalCount,l.pts=l[0].pts,l.dts=l[0].dts,l},this.alignGopsWith=function(t){h=t}}).prototype=new _o,(Al=function(t,e){this.numberOfTracks=0,this.metadataStream=e,void 0!==(t=t||{}).remux?this.remuxTracks=!!t.remux:this.remuxTracks=!0,"boolean"==typeof t.keepOriginalTimestamps&&(this.keepOriginalTimestamps=t.keepOriginalTimestamps),this.pendingTracks=[],this.videoTrack=null,this.pendingBoxes=[],this.pendingCaptions=[],this.pendingMetadata=[],this.pendingBytes=0,this.emittedTracks=0,Al.prototype.init.call(this),this.push=function(t){return t.text?this.pendingCaptions.push(t):t.frames?this.pendingMetadata.push(t):(this.pendingTracks.push(t.track),this.pendingBoxes.push(t.boxes),this.pendingBytes+=t.boxes.byteLength,"video"===t.track.type&&(this.videoTrack=t.track),void("audio"===t.track.type&&(this.audioTrack=t.track)))}}).prototype=new _o,Al.prototype.flush=function(t){var e,i,n,s,r=0,a={captions:[],captionStreams:{},metadata:[],info:{}},o=0;if(this.pendingTracks.length<this.numberOfTracks){if("VideoSegmentStream"!==t&&"AudioSegmentStream"!==t)return;if(this.remuxTracks)return;if(0===this.pendingTracks.length)return this.emittedTracks++,void(this.emittedTracks>=this.numberOfTracks&&(this.trigger("done"),this.emittedTracks=0))}for(this.videoTrack?(o=this.videoTrack.timelineStartInfo.pts,Ml.forEach(function(t){a.info[t]=this.videoTrack[t]},this)):this.audioTrack&&(o=this.audioTrack.timelineStartInfo.pts,Ll.forEach(function(t){a.info[t]=this.audioTrack[t]},this)),1===this.pendingTracks.length?a.type=this.pendingTracks[0].type:a.type="combined",this.emittedTracks+=this.pendingTracks.length,n=uo.initSegment(this.pendingTracks),a.initSegment=new Uint8Array(n.byteLength),a.initSegment.set(n),a.data=new Uint8Array(this.pendingBytes),s=0;s<this.pendingBoxes.length;s++)a.data.set(this.pendingBoxes[s],r),r+=this.pendingBoxes[s].byteLength;for(s=0;s<this.pendingCaptions.length;s++)(e=this.pendingCaptions[s]).startTime=e.startPts,this.keepOriginalTimestamps||(e.startTime-=o),e.startTime/=9e4,e.endTime=e.endPts,this.keepOriginalTimestamps||(e.endTime-=o),e.endTime/=9e4,a.captionStreams[e.stream]=!0,a.captions.push(e);for(s=0;s<this.pendingMetadata.length;s++)(i=this.pendingMetadata[s]).cueTime=i.pts,this.keepOriginalTimestamps||(i.cueTime-=o),i.cueTime/=9e4,a.metadata.push(i);a.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",a),this.emittedTracks>=this.numberOfTracks&&(this.trigger("done"),this.emittedTracks=0)},(Dl=function(n){var s,r,a=this,i=!0;Dl.prototype.init.call(this),n=n||{},this.baseMediaDecodeTime=n.baseMediaDecodeTime||0,this.transmuxPipeline_={},this.setupAacPipeline=function(){var e={};(this.transmuxPipeline_=e).type="aac",e.metadataStream=new pl.MetadataStream,e.aacStream=new Il,e.audioTimestampRolloverStream=new pl.TimestampRolloverStream("audio"),e.timedMetadataTimestampRolloverStream=new pl.TimestampRolloverStream("timed-metadata"),e.adtsStream=new yl,e.coalesceStream=new Al(n,e.metadataStream),e.headOfPipeline=e.aacStream,e.aacStream.pipe(e.audioTimestampRolloverStream).pipe(e.adtsStream),e.aacStream.pipe(e.timedMetadataTimestampRolloverStream).pipe(e.metadataStream).pipe(e.coalesceStream),e.metadataStream.on("timestamp",function(t){e.aacStream.setTimestamp(t.timeStamp)}),e.aacStream.on("data",function(t){"timed-metadata"!==t.type||e.audioSegmentStream||(r=r||{timelineStartInfo:{baseMediaDecodeTime:a.baseMediaDecodeTime},codec:"adts",type:"audio"},e.coalesceStream.numberOfTracks++,e.audioSegmentStream=new El(r,n),e.adtsStream.pipe(e.audioSegmentStream).pipe(e.coalesceStream))}),e.coalesceStream.on("data",this.trigger.bind(this,"data")),e.coalesceStream.on("done",this.trigger.bind(this,"done"))},this.setupTsPipeline=function(){var i={};(this.transmuxPipeline_=i).type="ts",i.metadataStream=new pl.MetadataStream,i.packetStream=new pl.TransportPacketStream,i.parseStream=new pl.TransportParseStream,i.elementaryStream=new pl.ElementaryStream,i.videoTimestampRolloverStream=new pl.TimestampRolloverStream("video"),i.audioTimestampRolloverStream=new pl.TimestampRolloverStream("audio"),i.timedMetadataTimestampRolloverStream=new pl.TimestampRolloverStream("timed-metadata"),i.adtsStream=new yl,i.h264Stream=new Ol,i.captionStream=new pl.CaptionStream,i.coalesceStream=new Al(n,i.metadataStream),i.headOfPipeline=i.packetStream,i.packetStream.pipe(i.parseStream).pipe(i.elementaryStream),i.elementaryStream.pipe(i.videoTimestampRolloverStream).pipe(i.h264Stream),i.elementaryStream.pipe(i.audioTimestampRolloverStream).pipe(i.adtsStream),i.elementaryStream.pipe(i.timedMetadataTimestampRolloverStream).pipe(i.metadataStream).pipe(i.coalesceStream),i.h264Stream.pipe(i.captionStream).pipe(i.coalesceStream),i.elementaryStream.on("data",function(t){var e;if("metadata"===t.type){for(e=t.tracks.length;e--;)s||"video"!==t.tracks[e].type?r||"audio"!==t.tracks[e].type||((r=t.tracks[e]).timelineStartInfo.baseMediaDecodeTime=a.baseMediaDecodeTime):(s=t.tracks[e]).timelineStartInfo.baseMediaDecodeTime=a.baseMediaDecodeTime;s&&!i.videoSegmentStream&&(i.coalesceStream.numberOfTracks++,i.videoSegmentStream=new xl(s,n),i.videoSegmentStream.on("timelineStartInfo",function(t){r&&(r.timelineStartInfo=t,i.audioSegmentStream.setEarliestDts(t.dts))}),i.videoSegmentStream.on("processedGopsInfo",a.trigger.bind(a,"gopInfo")),i.videoSegmentStream.on("baseMediaDecodeTime",function(t){r&&i.audioSegmentStream.setVideoBaseMediaDecodeTime(t)}),i.h264Stream.pipe(i.videoSegmentStream).pipe(i.coalesceStream)),r&&!i.audioSegmentStream&&(i.coalesceStream.numberOfTracks++,i.audioSegmentStream=new El(r,n),i.adtsStream.pipe(i.audioSegmentStream).pipe(i.coalesceStream))}}),i.coalesceStream.on("data",this.trigger.bind(this,"data")),i.coalesceStream.on("done",this.trigger.bind(this,"done"))},this.setBaseMediaDecodeTime=function(t){var e=this.transmuxPipeline_;n.keepOriginalTimestamps||(this.baseMediaDecodeTime=t),r&&(r.timelineStartInfo.dts=void 0,r.timelineStartInfo.pts=void 0,No(r),n.keepOriginalTimestamps||(r.timelineStartInfo.baseMediaDecodeTime=t),e.audioTimestampRolloverStream&&e.audioTimestampRolloverStream.discontinuity()),s&&(e.videoSegmentStream&&(e.videoSegmentStream.gopCache_=[],e.videoTimestampRolloverStream.discontinuity()),s.timelineStartInfo.dts=void 0,s.timelineStartInfo.pts=void 0,No(s),e.captionStream.reset(),n.keepOriginalTimestamps||(s.timelineStartInfo.baseMediaDecodeTime=t)),e.timedMetadataTimestampRolloverStream&&e.timedMetadataTimestampRolloverStream.discontinuity()},this.setAudioAppendStart=function(t){r&&this.transmuxPipeline_.audioSegmentStream.setAudioAppendStart(t)},this.alignGopsWith=function(t){s&&this.transmuxPipeline_.videoSegmentStream&&this.transmuxPipeline_.videoSegmentStream.alignGopsWith(t)},this.push=function(t){if(i){var e=Pl(t);e&&"aac"!==this.transmuxPipeline_.type?this.setupAacPipeline():e||"ts"===this.transmuxPipeline_.type||this.setupTsPipeline(),i=!1}this.transmuxPipeline_.headOfPipeline.push(t)},this.flush=function(){i=!0,this.transmuxPipeline_.headOfPipeline.flush()},this.resetCaptions=function(){this.transmuxPipeline_.captionStream&&this.transmuxPipeline_.captionStream.reset()}}).prototype=new _o;function Nl(t){return new Date(1e3*t-20828448e5)}function Rl(t){return{isLeading:(12&t[0])>>>2,dependsOn:3&t[0],isDependedOn:(192&t[1])>>>6,hasRedundancy:(48&t[1])>>>4,paddingValue:(14&t[1])>>>1,isNonSyncSample:1&t[1],degradationPriority:t[2]<<8|t[3]}}function Ul(t,e){for(var i=t,n=0;n<e.length;n++){var s=e[n];if(i<s.size)return s;i-=s.size}return null}function jl(t,u){var n=oo.findBox(t,["moof","traf"]),e=oo.findBox(t,["mdat"]),h={},s=[];return e.forEach(function(t,e){var i=n[e];s.push({mdat:t,traf:i})}),s.forEach(function(t){var e,i=t.mdat,n=t.traf,s=oo.findBox(n,["tfhd"]),r=Gl.parseTfhd(s[0]),a=r.trackId,o=oo.findBox(n,["tfdt"]),l=0<o.length?Gl.parseTfdt(o[0]).baseMediaDecodeTime:0,c=oo.findBox(n,["trun"]);u===a&&0<c.length&&(e=function(t,e,i){var n,s,r,a,o=new DataView(t.buffer,t.byteOffset,t.byteLength),l=[];for(s=0;s+4<t.length;s+=r)if(r=o.getUint32(s),s+=4,!(r<=0))switch(31&t[s]){case 6:var c=t.subarray(s+1,s+1+r),u=Ul(s,e);n={nalUnitType:"sei_rbsp",size:r,data:c,escapedRBSP:Xl(c),trackId:i},u?(n.pts=u.pts,n.dts=u.dts,a=u):(n.pts=a.pts,n.dts=a.dts),l.push(n)}return l}(i,function(t,e,i){var n=e,s=i.defaultSampleDuration||0,r=i.defaultSampleSize||0,a=i.trackId,o=[];return t.forEach(function(t){var e=Gl.parseTrun(t).samples;e.forEach(function(t){void 0===t.duration&&(t.duration=s),void 0===t.size&&(t.size=r),t.trackId=a,t.dts=n,void 0===t.compositionTimeOffset&&(t.compositionTimeOffset=0),t.pts=n+t.compositionTimeOffset,n+=t.duration}),o=o.concat(e)}),o}(c,l,r),a),h[a]||(h[a]=[]),h[a]=h[a].concat(e))}),h}function Bl(t){var e=31&t[1];return e<<=8,e|=t[2]}function Hl(t){return!!(64&t[1])}function Fl(t){var e=0;return 1<(48&t[3])>>>4&&(e+=t[4]+1),e}function zl(t){switch(t){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}}var Wl,$l,ql={Transmuxer:Dl,VideoSegmentStream:xl,AudioSegmentStream:El,AUDIO_PROPERTIES:Ll,VIDEO_PROPERTIES:Ml},Vl=oo.parseType,Yl={avc1:function(t){var e=new DataView(t.buffer,t.byteOffset,t.byteLength);return{dataReferenceIndex:e.getUint16(6),width:e.getUint16(24),height:e.getUint16(26),horizresolution:e.getUint16(28)+e.getUint16(30)/16,vertresolution:e.getUint16(32)+e.getUint16(34)/16,frameCount:e.getUint16(40),depth:e.getUint16(74),config:Wl(t.subarray(78,t.byteLength))}},avcC:function(t){var e,i,n,s,r=new DataView(t.buffer,t.byteOffset,t.byteLength),a={configurationVersion:t[0],avcProfileIndication:t[1],profileCompatibility:t[2],avcLevelIndication:t[3],lengthSizeMinusOne:3&t[4],sps:[],pps:[]},o=31&t[5];for(n=6,s=0;s<o;s++)i=r.getUint16(n),n+=2,a.sps.push(new Uint8Array(t.subarray(n,n+i))),n+=i;for(e=t[n],n++,s=0;s<e;s++)i=r.getUint16(n),n+=2,a.pps.push(new Uint8Array(t.subarray(n,n+i))),n+=i;return a},btrt:function(t){var e=new DataView(t.buffer,t.byteOffset,t.byteLength);return{bufferSizeDB:e.getUint32(0),maxBitrate:e.getUint32(4),avgBitrate:e.getUint32(8)}},esds:function(t){return{version:t[0],flags:new Uint8Array(t.subarray(1,4)),esId:t[6]<<8|t[7],streamPriority:31&t[8],decoderConfig:{objectProfileIndication:t[11],streamType:t[12]>>>2&63,bufferSize:t[13]<<16|t[14]<<8|t[15],maxBitrate:t[16]<<24|t[17]<<16|t[18]<<8|t[19],avgBitrate:t[20]<<24|t[21]<<16|t[22]<<8|t[23],decoderConfigDescriptor:{tag:t[24],length:t[25],audioObjectType:t[26]>>>3&31,samplingFrequencyIndex:(7&t[26])<<1|t[27]>>>7&1,channelConfiguration:t[27]>>>3&15}}}},ftyp:function(t){for(var e=new DataView(t.buffer,t.byteOffset,t.byteLength),i={majorBrand:Vl(t.subarray(0,4)),minorVersion:e.getUint32(4),compatibleBrands:[]},n=8;n<t.byteLength;)i.compatibleBrands.push(Vl(t.subarray(n,n+4))),n+=4;return i},dinf:function(t){return{boxes:Wl(t)}},dref:function(t){return{version:t[0],flags:new Uint8Array(t.subarray(1,4)),dataReferences:Wl(t.subarray(8))}},hdlr:function(t){var e={version:new DataView(t.buffer,t.byteOffset,t.byteLength).getUint8(0),flags:new Uint8Array(t.subarray(1,4)),handlerType:Vl(t.subarray(8,12)),name:""},i=8;for(i=24;i<t.byteLength;i++){if(0===t[i]){i++;break}e.name+=String.fromCharCode(t[i])}return e.name=decodeURIComponent(escape(e.name)),e},mdat:function(t){return{byteLength:t.byteLength,nals:function(t){var e,i,n=new DataView(t.buffer,t.byteOffset,t.byteLength),s=[];for(e=0;e+4<t.length;e+=i)if(i=n.getUint32(e),e+=4,i<=0)s.push("<span style='color:red;'>MALFORMED DATA</span>");else switch(31&t[e]){case 1:s.push("slice_layer_without_partitioning_rbsp");break;case 5:s.push("slice_layer_without_partitioning_rbsp_idr");break;case 6:s.push("sei_rbsp");break;case 7:s.push("seq_parameter_set_rbsp");break;case 8:s.push("pic_parameter_set_rbsp");break;case 9:s.push("access_unit_delimiter_rbsp");break;default:s.push("UNKNOWN NAL - "+t[e]&31)}return s}(t)}},mdhd:function(t){var e,i=new DataView(t.buffer,t.byteOffset,t.byteLength),n=4,s={version:i.getUint8(0),flags:new Uint8Array(t.subarray(1,4)),language:""};return 1===s.version?(n+=4,s.creationTime=Nl(i.getUint32(n)),n+=8,s.modificationTime=Nl(i.getUint32(n)),n+=4,s.timescale=i.getUint32(n),n+=8):(s.creationTime=Nl(i.getUint32(n)),n+=4,s.modificationTime=Nl(i.getUint32(n)),n+=4,s.timescale=i.getUint32(n),n+=4),s.duration=i.getUint32(n),n+=4,e=i.getUint16(n),s.language+=String.fromCharCode(96+(e>>10)),s.language+=String.fromCharCode(96+((992&e)>>5)),s.language+=String.fromCharCode(96+(31&e)),s},mdia:function(t){return{boxes:Wl(t)}},mfhd:function(t){return{version:t[0],flags:new Uint8Array(t.subarray(1,4)),sequenceNumber:t[4]<<24|t[5]<<16|t[6]<<8|t[7]}},minf:function(t){return{boxes:Wl(t)}},mp4a:function(t){var e=new DataView(t.buffer,t.byteOffset,t.byteLength),i={dataReferenceIndex:e.getUint16(6),channelcount:e.getUint16(16),samplesize:e.getUint16(18),samplerate:e.getUint16(24)+e.getUint16(26)/65536};return 28<t.byteLength&&(i.streamDescriptor=Wl(t.subarray(28))[0]),i},moof:function(t){return{boxes:Wl(t)}},moov:function(t){return{boxes:Wl(t)}},mvex:function(t){return{boxes:Wl(t)}},mvhd:function(t){var e=new DataView(t.buffer,t.byteOffset,t.byteLength),i=4,n={version:e.getUint8(0),flags:new Uint8Array(t.subarray(1,4))};return 1===n.version?(i+=4,n.creationTime=Nl(e.getUint32(i)),i+=8,n.modificationTime=Nl(e.getUint32(i)),i+=4,n.timescale=e.getUint32(i),i+=8):(n.creationTime=Nl(e.getUint32(i)),i+=4,n.modificationTime=Nl(e.getUint32(i)),i+=4,n.timescale=e.getUint32(i),i+=4),n.duration=e.getUint32(i),i+=4,n.rate=e.getUint16(i)+e.getUint16(i+2)/16,i+=4,n.volume=e.getUint8(i)+e.getUint8(i+1)/8,i+=2,i+=2,i+=8,n.matrix=new Uint32Array(t.subarray(i,i+36)),i+=36,i+=24,n.nextTrackId=e.getUint32(i),n},pdin:function(t){var e=new DataView(t.buffer,t.byteOffset,t.byteLength);return{version:e.getUint8(0),flags:new Uint8Array(t.subarray(1,4)),rate:e.getUint32(4),initialDelay:e.getUint32(8)}},sdtp:function(t){var e,i={version:t[0],flags:new Uint8Array(t.subarray(1,4)),samples:[]};for(e=4;e<t.byteLength;e++)i.samples.push({dependsOn:(48&t[e])>>4,isDependedOn:(12&t[e])>>2,hasRedundancy:3&t[e]});return i},sidx:function(t){var e,i=new DataView(t.buffer,t.byteOffset,t.byteLength),n={version:t[0],flags:new Uint8Array(t.subarray(1,4)),references:[],referenceId:i.getUint32(4),timescale:i.getUint32(8),earliestPresentationTime:i.getUint32(12),firstOffset:i.getUint32(16)},s=i.getUint16(22);for(e=24;s;e+=12,s--)n.references.push({referenceType:(128&t[e])>>>7,referencedSize:2147483647&i.getUint32(e),subsegmentDuration:i.getUint32(e+4),startsWithSap:!!(128&t[e+8]),sapType:(112&t[e+8])>>>4,sapDeltaTime:268435455&i.getUint32(e+8)});return n},smhd:function(t){return{version:t[0],flags:new Uint8Array(t.subarray(1,4)),balance:t[4]+t[5]/256}},stbl:function(t){return{boxes:Wl(t)}},stco:function(t){var e,i=new DataView(t.buffer,t.byteOffset,t.byteLength),n={version:t[0],flags:new Uint8Array(t.subarray(1,4)),chunkOffsets:[]},s=i.getUint32(4);for(e=8;s;e+=4,s--)n.chunkOffsets.push(i.getUint32(e));return n},stsc:function(t){var e,i=new DataView(t.buffer,t.byteOffset,t.byteLength),n=i.getUint32(4),s={version:t[0],flags:new Uint8Array(t.subarray(1,4)),sampleToChunks:[]};for(e=8;n;e+=12,n--)s.sampleToChunks.push({firstChunk:i.getUint32(e),samplesPerChunk:i.getUint32(e+4),sampleDescriptionIndex:i.getUint32(e+8)});return s},stsd:function(t){return{version:t[0],flags:new Uint8Array(t.subarray(1,4)),sampleDescriptions:Wl(t.subarray(8))}},stsz:function(t){var e,i=new DataView(t.buffer,t.byteOffset,t.byteLength),n={version:t[0],flags:new Uint8Array(t.subarray(1,4)),sampleSize:i.getUint32(4),entries:[]};for(e=12;e<t.byteLength;e+=4)n.entries.push(i.getUint32(e));return n},stts:function(t){var e,i=new DataView(t.buffer,t.byteOffset,t.byteLength),n={version:t[0],flags:new Uint8Array(t.subarray(1,4)),timeToSamples:[]},s=i.getUint32(4);for(e=8;s;e+=8,s--)n.timeToSamples.push({sampleCount:i.getUint32(e),sampleDelta:i.getUint32(e+4)});return n},styp:function(t){return Yl.ftyp(t)},tfdt:function(t){var e={version:t[0],flags:new Uint8Array(t.subarray(1,4)),baseMediaDecodeTime:t[4]<<24|t[5]<<16|t[6]<<8|t[7]};return 1===e.version&&(e.baseMediaDecodeTime*=Math.pow(2,32),e.baseMediaDecodeTime+=t[8]<<24|t[9]<<16|t[10]<<8|t[11]),e},tfhd:function(t){var e,i=new DataView(t.buffer,t.byteOffset,t.byteLength),n={version:t[0],flags:new Uint8Array(t.subarray(1,4)),trackId:i.getUint32(4)},s=1&n.flags[2],r=2&n.flags[2],a=8&n.flags[2],o=16&n.flags[2],l=32&n.flags[2],c=65536&n.flags[0],u=131072&n.flags[0];return e=8,s&&(e+=4,n.baseDataOffset=i.getUint32(12),e+=4),r&&(n.sampleDescriptionIndex=i.getUint32(e),e+=4),a&&(n.defaultSampleDuration=i.getUint32(e),e+=4),o&&(n.defaultSampleSize=i.getUint32(e),e+=4),l&&(n.defaultSampleFlags=i.getUint32(e)),c&&(n.durationIsEmpty=!0),!s&&u&&(n.baseDataOffsetIsMoof=!0),n},tkhd:function(t){var e=new DataView(t.buffer,t.byteOffset,t.byteLength),i=4,n={version:e.getUint8(0),flags:new Uint8Array(t.subarray(1,4))};return 1===n.version?(i+=4,n.creationTime=Nl(e.getUint32(i)),i+=8,n.modificationTime=Nl(e.getUint32(i)),i+=4,n.trackId=e.getUint32(i),i+=4,i+=8):(n.creationTime=Nl(e.getUint32(i)),i+=4,n.modificationTime=Nl(e.getUint32(i)),i+=4,n.trackId=e.getUint32(i),i+=4,i+=4),n.duration=e.getUint32(i),i+=4,i+=8,n.layer=e.getUint16(i),i+=2,n.alternateGroup=e.getUint16(i),i+=2,n.volume=e.getUint8(i)+e.getUint8(i+1)/8,i+=2,i+=2,n.matrix=new Uint32Array(t.subarray(i,i+36)),i+=36,n.width=e.getUint16(i)+e.getUint16(i+2)/16,i+=4,n.height=e.getUint16(i)+e.getUint16(i+2)/16,n},traf:function(t){return{boxes:Wl(t)}},trak:function(t){return{boxes:Wl(t)}},trex:function(t){var e=new DataView(t.buffer,t.byteOffset,t.byteLength);return{version:t[0],flags:new Uint8Array(t.subarray(1,4)),trackId:e.getUint32(4),defaultSampleDescriptionIndex:e.getUint32(8),defaultSampleDuration:e.getUint32(12),defaultSampleSize:e.getUint32(16),sampleDependsOn:3&t[20],sampleIsDependedOn:(192&t[21])>>6,sampleHasRedundancy:(48&t[21])>>4,samplePaddingValue:(14&t[21])>>1,sampleIsDifferenceSample:!!(1&t[21]),sampleDegradationPriority:e.getUint16(22)}},trun:function(t){var e,i={version:t[0],flags:new Uint8Array(t.subarray(1,4)),samples:[]},n=new DataView(t.buffer,t.byteOffset,t.byteLength),s=1&i.flags[2],r=4&i.flags[2],a=1&i.flags[1],o=2&i.flags[1],l=4&i.flags[1],c=8&i.flags[1],u=n.getUint32(4),h=8;for(s&&(i.dataOffset=n.getInt32(h),h+=4),r&&u&&(e={flags:Rl(t.subarray(h,h+4))},h+=4,a&&(e.duration=n.getUint32(h),h+=4),o&&(e.size=n.getUint32(h),h+=4),c&&(e.compositionTimeOffset=n.getUint32(h),h+=4),i.samples.push(e),u--);u--;)e={},a&&(e.duration=n.getUint32(h),h+=4),o&&(e.size=n.getUint32(h),h+=4),l&&(e.flags=Rl(t.subarray(h,h+4)),h+=4),c&&(e.compositionTimeOffset=n.getUint32(h),h+=4),i.samples.push(e);return i},"url ":function(t){return{version:t[0],flags:new Uint8Array(t.subarray(1,4))}},vmhd:function(t){var e=new DataView(t.buffer,t.byteOffset,t.byteLength);return{version:t[0],flags:new Uint8Array(t.subarray(1,4)),graphicsmode:e.getUint16(4),opcolor:new Uint16Array([e.getUint16(6),e.getUint16(8),e.getUint16(10)])}}},Gl={inspect:Wl=function(t){for(var e,i,n,s,r,a=0,o=[],l=new ArrayBuffer(t.length),c=new Uint8Array(l),u=0;u<t.length;++u)c[u]=t[u];for(e=new DataView(l);a<t.byteLength;)i=e.getUint32(a),n=Vl(t.subarray(a+4,a+8)),s=1<i?a+i:t.byteLength,(r=(Yl[n]||function(t){return{data:t}})(t.subarray(a+8,s))).size=i,r.type=n,o.push(r),a=s;return o},textify:$l=function(t,e){var r;return e=e||0,r=new Array(2*e+1).join(" "),t.map(function(s,t){return r+s.type+"\n"+Object.keys(s).filter(function(t){return"type"!==t&&"boxes"!==t}).map(function(t){var e=r+"  "+t+": ",i=s[t];if(i instanceof Uint8Array||i instanceof Uint32Array){var n=Array.prototype.slice.call(new Uint8Array(i.buffer,i.byteOffset,i.byteLength)).map(function(t){return" "+("00"+t.toString(16)).slice(-2)}).join("").match(/.{1,24}/g);return n?1===n.length?e+"<"+n.join("").slice(1)+">":e+"<\n"+n.map(function(t){return r+"  "+t}).join("\n")+"\n"+r+"  >":e+"<>"}return e+JSON.stringify(i,null,2).split("\n").map(function(t,e){return 0===e?t:r+"  "+t}).join("\n")}).join("\n")+(s.boxes?"\n"+$l(s.boxes,e+1):"")}).join("\n")},parseTfdt:Yl.tfdt,parseHdlr:Yl.hdlr,parseTfhd:Yl.tfhd,parseTrun:Yl.trun},Xl=Fo,Kl=Ko.CaptionStream,Ql={generator:uo,probe:oo,Transmuxer:ql.Transmuxer,AudioSegmentStream:ql.AudioSegmentStream,VideoSegmentStream:ql.VideoSegmentStream,CaptionParser:function(){var e,r,a,o,l,t=!1;this.isInitialized=function(){return t},this.init=function(){e=new Kl,t=!0,e.on("data",function(t){t.startTime=t.startPts/o,t.endTime=t.endPts/o,l.captions.push(t),l.captionStreams[t.stream]=!0})},this.isNewInit=function(t,e){return!(t&&0===t.length||e&&"object"==typeof e&&0===Object.keys(e).length)&&(a!==t[0]||o!==e[a])},this.parse=function(t,e,i){var n;if(!this.isInitialized())return null;if(!e||!i)return null;if(this.isNewInit(e,i))a=e[0],o=i[a];else if(!a||!o)return r.push(t),null;for(;0<r.length;){var s=r.shift();this.parse(s,e,i)}return null!==(n=function(t,e,i){return e?{seiNals:jl(t,e)[e],timescale:i}:null}(t,a,o))&&n.seiNals?(this.pushNals(n.seiNals),this.flushStream(),l):null},this.pushNals=function(t){if(!this.isInitialized()||!t||0===t.length)return null;t.forEach(function(t){e.push(t)})},this.flushStream=function(){if(!this.isInitialized())return null;e.flush()},this.clearParsedCaptions=function(){l.captions=[],l.captionStreams={}},this.resetCaptionStream=function(){if(!this.isInitialized())return null;e.reset()},this.clearAllCaptions=function(){this.clearParsedCaptions(),this.resetCaptionStream()},this.reset=function(){r=[],o=a=null,l?this.clearParsedCaptions():l={captions:[],captionStreams:{}},this.resetCaptionStream()},this.reset()}}.CaptionParser,Jl={parseType:function(t,e){var i=Bl(t);return 0===i?"pat":i===e?"pmt":e?"pes":null},parsePat:function(t){var e=Hl(t),i=4+Fl(t);return e&&(i+=t[i]+1),(31&t[i+10])<<8|t[i+11]},parsePmt:function(t){var e={},i=Hl(t),n=4+Fl(t);if(i&&(n+=t[n]+1),1&t[n+5]){var s;s=3+((15&t[n+1])<<8|t[n+2])-4;for(var r=12+((15&t[n+10])<<8|t[n+11]);r<s;){var a=n+r;e[(31&t[a+1])<<8|t[a+2]]=t[a],r+=5+((15&t[a+3])<<8|t[a+4])}return e}},parsePayloadUnitStartIndicator:Hl,parsePesType:function(t,e){switch(e[Bl(t)]){case Qo.H264_STREAM_TYPE:return"video";case Qo.ADTS_STREAM_TYPE:return"audio";case Qo.METADATA_STREAM_TYPE:return"timed-metadata";default:return null}},parsePesTime:function(t){if(!Hl(t))return null;var e=4+Fl(t);if(e>=t.byteLength)return null;var i,n=null;return 192&(i=t[e+7])&&((n={}).pts=(14&t[e+9])<<27|(255&t[e+10])<<20|(254&t[e+11])<<12|(255&t[e+12])<<5|(254&t[e+13])>>>3,n.pts*=4,n.pts+=(6&t[e+13])>>>1,n.dts=n.pts,64&i&&(n.dts=(14&t[e+14])<<27|(255&t[e+15])<<20|(254&t[e+16])<<12|(255&t[e+17])<<5|(254&t[e+18])>>>3,n.dts*=4,n.dts+=(6&t[e+18])>>>1)),n},videoPacketContainsKeyFrame:function(t){for(var e=4+Fl(t),i=t.subarray(e),n=0,s=0,r=!1;s<i.byteLength-3;s++)if(1===i[s+2]){n=s+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(s+3!==n-2&&"slice_layer_without_partitioning_rbsp_idr"===zl(31&i[s+3])&&(r=!0);1!==i[++n]&&n<i.length;);s=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"===zl(31&i[s+3])&&(r=!0),s=n-2,n+=3;break;default:n+=3}return i=i.subarray(s),n-=s,s=0,i&&3<i.byteLength&&"slice_layer_without_partitioning_rbsp_idr"===zl(31&i[s+3])&&(r=!0),r}},Zl=nl,tc={};tc.ts=Jl,tc.aac=Sl;function ec(t,e,i){for(var n,s,r,a,o=0,l=188,c=!1;l<=t.byteLength;)if(71!==t[o]||71!==t[l]&&l!==t.byteLength)o++,l++;else{switch(n=t.subarray(o,l),tc.ts.parseType(n,e.pid)){case"pes":s=tc.ts.parsePesType(n,e.table),r=tc.ts.parsePayloadUnitStartIndicator(n),"audio"===s&&r&&(a=tc.ts.parsePesTime(n))&&(a.type="audio",i.audio.push(a),c=!0)}if(c)break;o+=188,l+=188}for(o=(l=t.byteLength)-188,c=!1;0<=o;)if(71!==t[o]||71!==t[l]&&l!==t.byteLength)o--,l--;else{switch(n=t.subarray(o,l),tc.ts.parseType(n,e.pid)){case"pes":s=tc.ts.parsePesType(n,e.table),r=tc.ts.parsePayloadUnitStartIndicator(n),"audio"===s&&r&&(a=tc.ts.parsePesTime(n))&&(a.type="audio",i.audio.push(a),c=!0)}if(c)break;o-=188,l-=188}}function ic(t,e,i){for(var n,s,r,a,o,l,c,u=0,h=188,d=!1,p={data:[],size:0};h<t.byteLength;)if(71!==t[u]||71!==t[h])u++,h++;else{switch(n=t.subarray(u,h),tc.ts.parseType(n,e.pid)){case"pes":if(s=tc.ts.parsePesType(n,e.table),r=tc.ts.parsePayloadUnitStartIndicator(n),"video"===s&&(r&&!d&&(a=tc.ts.parsePesTime(n))&&(a.type="video",i.video.push(a),d=!0),!i.firstKeyFrame)){if(r&&0!==p.size){for(o=new Uint8Array(p.size),l=0;p.data.length;)c=p.data.shift(),o.set(c,l),l+=c.byteLength;tc.ts.videoPacketContainsKeyFrame(o)&&(i.firstKeyFrame=tc.ts.parsePesTime(o),i.firstKeyFrame.type="video"),p.size=0}p.data.push(n),p.size+=n.byteLength}}if(d&&i.firstKeyFrame)break;u+=188,h+=188}for(u=(h=t.byteLength)-188,d=!1;0<=u;)if(71!==t[u]||71!==t[h])u--,h--;else{switch(n=t.subarray(u,h),tc.ts.parseType(n,e.pid)){case"pes":s=tc.ts.parsePesType(n,e.table),r=tc.ts.parsePayloadUnitStartIndicator(n),"video"===s&&r&&(a=tc.ts.parsePesTime(n))&&(a.type="video",i.video.push(a),d=!0)}if(d)break;u-=188,h-=188}}function nc(t){var e={pid:null,table:null},i={};for(var n in!function(t,e){for(var i,n=0,s=188;s<t.byteLength;)if(71!==t[n]||71!==t[s])n++,s++;else{switch(i=t.subarray(n,s),tc.ts.parseType(i,e.pid)){case"pat":e.pid||(e.pid=tc.ts.parsePat(i));break;case"pmt":e.table||(e.table=tc.ts.parsePmt(i))}if(e.pid&&e.table)return;n+=188,s+=188}}(t,e),e.table){if(e.table.hasOwnProperty(n))switch(e.table[n]){case Qo.H264_STREAM_TYPE:i.video=[],ic(t,e,i),0===i.video.length&&delete i.video;break;case Qo.ADTS_STREAM_TYPE:i.audio=[],ec(t,e,i),0===i.audio.length&&delete i.audio}}return i}var sc=function(t,e){var i;return(i=tc.aac.isLikelyAacData(t)?function(t){for(var e,i=!1,n=0,s=null,r=null,a=0,o=0;3<=t.length-o;){switch(tc.aac.parseType(t,o)){case"timed-metadata":if(t.length-o<10){i=!0;break}if((a=tc.aac.parseId3TagSize(t,o))>t.length){i=!0;break}null===r&&(e=t.subarray(o,o+a),r=tc.aac.parseAacTimestamp(e)),o+=a;break;case"audio":if(t.length-o<7){i=!0;break}if((a=tc.aac.parseAdtsSize(t,o))>t.length){i=!0;break}null===s&&(e=t.subarray(o,o+a),s=tc.aac.parseSampleRate(e)),n++,o+=a;break;default:o++}if(i)return null}if(null===s||null===r)return null;var l=9e4/s;return{audio:[{type:"audio",dts:r,pts:r},{type:"audio",dts:r+1024*n*l,pts:r+1024*n*l}]}}(t):nc(t))&&(i.audio||i.video)?(function(t,e){if(t.audio&&t.audio.length){var i=e;void 0===i&&(i=t.audio[0].dts),t.audio.forEach(function(t){t.dts=Zl(t.dts,i),t.pts=Zl(t.pts,i),t.dtsTime=t.dts/9e4,t.ptsTime=t.pts/9e4})}if(t.video&&t.video.length){var n=e;if(void 0===n&&(n=t.video[0].dts),t.video.forEach(function(t){t.dts=Zl(t.dts,n),t.pts=Zl(t.pts,n),t.dtsTime=t.dts/9e4,t.ptsTime=t.pts/9e4}),t.firstKeyFrame){var s=t.firstKeyFrame;s.dts=Zl(s.dts,n),s.pts=Zl(s.pts,n),s.dtsTime=s.dts/9e4,s.ptsTime=s.dts/9e4}}}(i,e),i):null};function rc(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var ac=function(t,e,i){return e&&oc(t.prototype,e),i&&oc(t,i),t};function oc(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}var lc=null,cc=(uc.prototype.decrypt=function(t,e,i,n,s,r){var a=this._key[1],o=t^a[0],l=n^a[1],c=i^a[2],u=e^a[3],h=void 0,d=void 0,p=void 0,f=a.length/4-2,m=void 0,g=4,v=this._tables[1],y=v[0],_=v[1],b=v[2],T=v[3],w=v[4];for(m=0;m<f;m++)h=y[o>>>24]^_[l>>16&255]^b[c>>8&255]^T[255&u]^a[g],d=y[l>>>24]^_[c>>16&255]^b[u>>8&255]^T[255&o]^a[g+1],p=y[c>>>24]^_[u>>16&255]^b[o>>8&255]^T[255&l]^a[g+2],u=y[u>>>24]^_[o>>16&255]^b[l>>8&255]^T[255&c]^a[g+3],g+=4,o=h,l=d,c=p;for(m=0;m<4;m++)s[(3&-m)+r]=w[o>>>24]<<24^w[l>>16&255]<<16^w[c>>8&255]<<8^w[255&u]^a[g++],h=o,o=l,l=c,c=u,u=h},uc);function uc(t){rc(this,uc),lc=lc||function(){var t=[[[],[],[],[],[]],[[],[],[],[],[]]],e=t[0],i=t[1],n=e[4],s=i[4],r=void 0,a=void 0,o=void 0,l=[],c=[],u=void 0,h=void 0,d=void 0,p=void 0,f=void 0;for(r=0;r<256;r++)c[(l[r]=r<<1^283*(r>>7))^r]=r;for(a=o=0;!n[a];a^=u||1,o=c[o]||1)for(d=(d=o^o<<1^o<<2^o<<3^o<<4)>>8^255&d^99,f=16843009*l[h=l[u=l[s[n[a]=d]=a]]]^65537*h^257*u^16843008*a,p=257*l[d]^16843008*d,r=0;r<4;r++)e[r][a]=p=p<<24^p>>>8,i[r][d]=f=f<<24^f>>>8;for(r=0;r<5;r++)e[r]=e[r].slice(0),i[r]=i[r].slice(0);return t}(),this._tables=[[lc[0][0].slice(),lc[0][1].slice(),lc[0][2].slice(),lc[0][3].slice(),lc[0][4].slice()],[lc[1][0].slice(),lc[1][1].slice(),lc[1][2].slice(),lc[1][3].slice(),lc[1][4].slice()]];var e=void 0,i=void 0,n=void 0,s=void 0,r=void 0,a=this._tables[0][4],o=this._tables[1],l=t.length,c=1;if(4!==l&&6!==l&&8!==l)throw new Error("Invalid aes key size");for(s=t.slice(0),r=[],this._key=[s,r],e=l;e<4*l+28;e++)n=s[e-1],(e%l==0||8===l&&e%l==4)&&(n=a[n>>>24]<<24^a[n>>16&255]<<16^a[n>>8&255]<<8^a[255&n],e%l==0&&(n=n<<8^n>>>24^c<<24,c=c<<1^283*(c>>7))),s[e]=s[e-l]^n;for(i=0;e;i++,e--)n=s[3&i?e:e-4],r[i]=e<=4||i<4?n:o[0][a[n>>>24]]^o[1][a[n>>16&255]]^o[2][a[n>>8&255]]^o[3][a[255&n]]}var hc=(dc.prototype.on=function(t,e){this.listeners[t]||(this.listeners[t]=[]),this.listeners[t].push(e)},dc.prototype.off=function(t,e){if(!this.listeners[t])return!1;var i=this.listeners[t].indexOf(e);return this.listeners[t].splice(i,1),-1<i},dc.prototype.trigger=function(t,e){var i=this.listeners[t];if(i)if(2===arguments.length)for(var n=i.length,s=0;s<n;++s)i[s].call(this,e);else for(var r=Array.prototype.slice.call(arguments,1),a=i.length,o=0;o<a;++o)i[o].apply(this,r)},dc.prototype.dispose=function(){this.listeners={}},dc.prototype.pipe=function(e){this.on("data",function(t){e.push(t)})},dc);function dc(){rc(this,dc),this.listeners={}}var pc,fc=(function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(mc,pc=hc),mc.prototype.processJob_=function(){this.jobs.shift()(),this.jobs.length?this.timeout_=setTimeout(this.processJob_.bind(this),this.delay):this.timeout_=null},mc.prototype.push=function(t){this.jobs.push(t),this.timeout_||(this.timeout_=setTimeout(this.processJob_.bind(this),this.delay))},mc);function mc(){rc(this,mc);var t=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,pc.call(this,hc));return t.jobs=[],t.delay=1,t.timeout_=null,t}function gc(t){return t<<24|(65280&t)<<8|(16711680&t)>>8|t>>>24}function vc(t,e,i){var n=new Int32Array(t.buffer,t.byteOffset,t.byteLength>>2),s=new cc(Array.prototype.slice.call(e)),r=new Uint8Array(t.byteLength),a=new Int32Array(r.buffer),o=void 0,l=void 0,c=void 0,u=void 0,h=void 0,d=void 0,p=void 0,f=void 0,m=void 0;for(o=i[0],l=i[1],c=i[2],u=i[3],m=0;m<n.length;m+=4)h=gc(n[m]),d=gc(n[m+1]),p=gc(n[m+2]),f=gc(n[m+3]),s.decrypt(h,d,p,f,a,m),a[m]=gc(a[m]^o),a[m+1]=gc(a[m+1]^l),a[m+2]=gc(a[m+2]^c),a[m+3]=gc(a[m+3]^u),o=h,l=d,c=p,u=f;return r}var yc=(_c.prototype.decryptChunk_=function(e,i,n,s){return function(){var t=vc(e,i,n);s.set(t,e.byteOffset)}},ac(_c,null,[{key:"STEP",get:function(){return 32e3}}]),_c);function _c(t,e,i,n){rc(this,_c);var s=_c.STEP,r=new Int32Array(t.buffer),a=new Uint8Array(t.byteLength),o=0;for(this.asyncStream_=new fc,this.asyncStream_.push(this.decryptChunk_(r.subarray(o,o+s),e,i,a)),o=s;o<r.length;o+=s)i=new Uint32Array([gc(r[o-4]),gc(r[o-3]),gc(r[o-2]),gc(r[o-1])]),this.asyncStream_.push(this.decryptChunk_(r.subarray(o,o+s),e,i,a));this.asyncStream_.push(function(){n(null,function(t){return t.subarray(0,t.byteLength-t[t.byteLength-1])}(a))})}function bc(t,e){return/^[a-z]+:/i.test(e)?e:(/\/\//i.test(t)||(t=gr.buildAbsoluteURL(y.location.href,t)),gr.buildAbsoluteURL(t,e))}function Tc(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var wc=function(t,e,i){return e&&kc(t.prototype,e),i&&kc(t,i),t};function kc(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Sc(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function Cc(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function xc(s,r){["AUDIO","SUBTITLES"].forEach(function(t){for(var e in s.mediaGroups[t])for(var i in s.mediaGroups[t][e]){var n=s.mediaGroups[t][e][i];r(n,t,e,i)}})}function Ec(t,e){var i=Pc(t,{}),n=i.playlists[e.uri];if(!n)return null;if(n.segments&&e.segments&&n.segments.length===e.segments.length&&n.mediaSequence===e.mediaSequence)return null;var s=Pc(n,e);n.segments&&(s.segments=function(t,e,i){var n=e.slice();i=i||0;for(var s=Math.min(t.length,e.length+i),r=i;r<s;r++)n[r-i]=Pc(t[r],n[r-i]);return n}(n.segments,e.segments,e.mediaSequence-n.mediaSequence)),s.segments.forEach(function(t){!function(t,e){t.resolvedUri||(t.resolvedUri=bc(e,t.uri)),t.key&&!t.key.resolvedUri&&(t.key.resolvedUri=bc(e,t.key.uri)),t.map&&!t.map.resolvedUri&&(t.map.resolvedUri=bc(e,t.map.uri))}(t,s.resolvedUri)});for(var r=0;r<i.playlists.length;r++)i.playlists[r].uri===e.uri&&(i.playlists[r]=s);return i.playlists[e.uri]=s,i}function Dc(t){for(var e=t.playlists.length;e--;){var i=t.playlists[e];(t.playlists[i.uri]=i).resolvedUri=bc(t.uri,i.uri),i.id=e,i.attributes||(i.attributes={},Lc.warn("Invalid playlist STREAM-INF detected. Missing BANDWIDTH attribute."))}}function Ac(e){xc(e,function(t){t.uri&&(t.resolvedUri=bc(e.uri,t.uri))})}function Ic(t,e){var i=t.segments[t.segments.length-1];return e&&i&&i.duration?1e3*i.duration:500*(t.targetDuration||10)}var Oc=function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var i=[],n=!0,s=!1,r=void 0;try{for(var a,o=t[Symbol.iterator]();!(n=(a=o.next()).done)&&(i.push(a.value),!e||i.length!==e);n=!0);}catch(t){s=!0,r=t}finally{try{!n&&o.return&&o.return()}finally{if(s)throw r}}return i}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")},Pc=ur.mergeOptions,Lc=ur.log,Mc=(Sc(Nc,ur.EventTarget),wc(Nc,[{key:"playlistRequestError",value:function(t,e,i){this.request=null,i&&(this.state=i),this.error={playlist:this.master.playlists[e],status:t.status,message:"HLS playlist request error at URL: "+e,responseText:t.responseText,code:500<=t.status?4:2},this.trigger("error")}},{key:"haveMetadata",value:function(t,e){var i=this;this.request=null,this.state="HAVE_METADATA";var n=new Dr;n.push(t.responseText),n.end(),n.manifest.uri=e,n.manifest.attributes=n.manifest.attributes||{};var s=Ec(this.master,n.manifest);this.targetDuration=n.manifest.targetDuration,s?(this.master=s,this.media_=this.master.playlists[n.manifest.uri]):this.trigger("playlistunchanged"),this.media().endList||(y.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=y.setTimeout(function(){i.trigger("mediaupdatetimeout")},Ic(this.media(),!!s))),this.trigger("loadedplaylist")}},{key:"dispose",value:function(){this.stopRequest(),y.clearTimeout(this.mediaUpdateTimeout)}},{key:"stopRequest",value:function(){if(this.request){var t=this.request;this.request=null,t.onreadystatechange=null,t.abort()}}},{key:"media",value:function(i){var n=this;if(!i)return this.media_;if("HAVE_NOTHING"===this.state)throw new Error("Cannot switch media playlist from "+this.state);var s=this.state;if("string"==typeof i){if(!this.master.playlists[i])throw new Error("Unknown playlist URI: "+i);i=this.master.playlists[i]}var t=!this.media_||i.uri!==this.media_.uri;if(this.master.playlists[i.uri].endList)return this.request&&(this.request.onreadystatechange=null,this.request.abort(),this.request=null),this.state="HAVE_METADATA",this.media_=i,void(t&&(this.trigger("mediachanging"),this.trigger("mediachange")));if(t){if(this.state="SWITCHING_MEDIA",this.request){if(bc(this.master.uri,i.uri)===this.request.url)return;this.request.onreadystatechange=null,this.request.abort(),this.request=null}this.media_&&this.trigger("mediachanging"),this.request=this.hls_.xhr({uri:bc(this.master.uri,i.uri),withCredentials:this.withCredentials},function(t,e){if(n.request){if(t)return n.playlistRequestError(n.request,i.uri,s);n.haveMetadata(e,i.uri),"HAVE_MASTER"===s?n.trigger("loadedmetadata"):n.trigger("mediachange")}})}}},{key:"pause",value:function(){this.stopRequest(),y.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")}},{key:"load",value:function(t){var e=this;y.clearTimeout(this.mediaUpdateTimeout);var i=this.media();if(t){var n=i?i.targetDuration/2*1e3:5e3;this.mediaUpdateTimeout=y.setTimeout(function(){return e.load()},n)}else this.started?i&&!i.endList?this.trigger("mediaupdatetimeout"):this.trigger("loadedplaylist"):this.start()}},{key:"start",value:function(){var n=this;this.started=!0,this.request=this.hls_.xhr({uri:this.srcUrl,withCredentials:this.withCredentials},function(t,e){if(n.request){if(n.request=null,t)return n.error={status:e.status,message:"HLS playlist request error at URL: "+n.srcUrl,responseText:e.responseText,code:2},"HAVE_NOTHING"===n.state&&(n.started=!1),n.trigger("error");var i=new Dr;return i.push(e.responseText),i.end(),n.state="HAVE_MASTER",i.manifest.uri=n.srcUrl,i.manifest.playlists?(n.master=i.manifest,Dc(n.master),Ac(n.master),n.trigger("loadedplaylist"),void(n.request||n.media(i.manifest.playlists[0]))):(n.master={mediaGroups:{AUDIO:{},VIDEO:{},"CLOSED-CAPTIONS":{},SUBTITLES:{}},uri:y.location.href,playlists:[{uri:n.srcUrl,id:0}]},n.master.playlists[n.srcUrl]=n.master.playlists[0],n.master.playlists[0].resolvedUri=n.srcUrl,n.master.playlists[0].attributes=n.master.playlists[0].attributes||{},n.haveMetadata(e,n.srcUrl),n.trigger("loadedmetadata"))}})}}]),Nc);function Nc(t,e,i){Tc(this,Nc);var n=Cc(this,(Nc.__proto__||Object.getPrototypeOf(Nc)).call(this));if(n.srcUrl=t,n.hls_=e,n.withCredentials=i,!n.srcUrl)throw new Error("A non-empty playlist URL is required");return n.state="HAVE_NOTHING",n.on("mediaupdatetimeout",function(){"HAVE_METADATA"===n.state&&(n.state="HAVE_CURRENT_METADATA",n.request=n.hls_.xhr({uri:bc(n.master.uri,n.media().uri),withCredentials:n.withCredentials},function(t,e){if(n.request)return t?n.playlistRequestError(n.request,n.media().uri,"HAVE_METADATA"):void n.haveMetadata(n.request,n.media().uri)}))}),n}function Rc(t,e,i){var n,s;return void 0===e&&(e=t.mediaSequence+t.segments.length),e<t.mediaSequence?0:(n=function(t,e){var i=0,n=e-t.mediaSequence,s=t.segments[n];if(s){if(void 0!==s.start)return{result:s.start,precise:!0};if(void 0!==s.end)return{result:s.end-s.duration,precise:!0}}for(;n--;){if(void 0!==(s=t.segments[n]).end)return{result:i+s.end,precise:!0};if(i+=s.duration,void 0!==s.start)return{result:i+s.start,precise:!0}}return{result:i,precise:!1}}(t,e)).precise?n.result:(s=function(t,e){for(var i=0,n=void 0,s=e-t.mediaSequence;s<t.segments.length;s++){if(void 0!==(n=t.segments[s]).start)return{result:n.start-i,precise:!0};if(i+=n.duration,void 0!==n.end)return{result:n.end-i,precise:!0}}return{result:-1,precise:!1}}(t,e)).precise?s.result:n.result+i}function Uc(t,e,i){if(!t)return 0;if("number"!=typeof i&&(i=0),void 0===e){if(t.totalDuration)return t.totalDuration;if(!t.endList)return y.Infinity}return Rc(t,e,i)}function jc(t,e,i){var n=0;if(i<e){var s=[i,e];e=s[0],i=s[1]}if(e<0){for(var r=e;r<Math.min(0,i);r++)n+=t.targetDuration;e=0}for(var a=e;a<i;a++)n+=t.segments[a].duration;return n}function Bc(t){if(!t.segments.length)return 0;for(var e=t.segments.length-1,i=t.segments[e].duration||t.targetDuration,n=i+2*t.targetDuration;e--&&!(n<=(i+=t.segments[e].duration)););return Math.max(0,e)}function Hc(t,e,i){if(!t||!t.segments)return null;if(t.endList)return Uc(t);if(null===e)return null;e=e||0;var n=i?Bc(t):t.segments.length;return Rc(t,t.mediaSequence+n,e)}function Fc(t){return t-Math.floor(t)==0}function zc(t,e){if(Fc(e))return e+.1*t;for(var i=e.toString().split(".")[1].length,n=1;n<=i;n++){var s=Math.pow(10,n),r=e*s;if(Fc(r)||n===i)return(r+t)/s}}function Wc(t){return t.excludeUntil&&t.excludeUntil>Date.now()}function $c(t){return t.excludeUntil&&t.excludeUntil===1/0}function qc(t){var e=Wc(t);return!t.disabled&&!e}function Vc(t,e){return e.attributes&&e.attributes[t]}function Yc(t,e){if(1===t.playlists.length)return!0;var i=e.attributes.BANDWIDTH||Number.MAX_VALUE;return 0===t.playlists.filter(function(t){return!!qc(t)&&(t.attributes.BANDWIDTH||0)<i}).length}function Gc(){return function t(e,n){e=vu({timeout:45e3},e);var i=t.beforeRequest||ur.Hls.xhr.beforeRequest;if(i&&"function"==typeof i){var s=i(e);s&&(e=s)}var r=gu(e,function(t,e){var i=r.response;!t&&i&&(r.responseTime=Date.now(),r.roundTripTime=r.responseTime-r.requestTime,r.bytesReceived=i.byteLength||i.length,r.bandwidth||(r.bandwidth=Math.floor(r.bytesReceived/r.roundTripTime*8*1e3))),e.headers&&(r.responseHeaders=e.headers),t&&"ETIMEDOUT"===t.code&&(r.timedout=!0),t||r.aborted||200===e.statusCode||206===e.statusCode||0===e.statusCode||(t=new Error("XHR Failed with a response of: "+(r&&(i||r.responseText)))),n(t,r)}),a=r.abort;return r.abort=function(){return r.aborted=!0,a.apply(r,arguments)},r.uri=e.uri,r.requestTime=Date.now(),r}}function Xc(t,e){var i=t.toString(16);return"00".substring(0,2-i.length)+i+(e%2?" ":"")}function Kc(t){return 32<=t&&t<126?String.fromCharCode(t):"."}function Qc(i){var n={};return Object.keys(i).forEach(function(t){var e=i[t];ArrayBuffer.isView(e)?n[t]={bytes:e.buffer,byteOffset:e.byteOffset,byteLength:e.byteLength}:n[t]=e}),n}function Jc(t){var e=t.byterange||{length:1/0,offset:0};return[e.length,e.offset,t.resolvedUri].join(",")}function Zc(t){for(var e=Array.prototype.slice.call(t),i="",n=0;n<e.length/16;n++)i+=e.slice(16*n,16*n+16).map(Xc).join("")+" "+e.slice(16*n,16*n+16).map(Kc).join("")+"\n";return i}function tu(t,e,i,n){var s=void 0;if("stream"===e){s=new Date(1e3*n+i.getTime());var r=t.toISOString(),a=i.toISOString(),o=s.toISOString();return a<=r&&r<=o}if("player"===e)return s=n+i,i<=t&&t<=s}function eu(t,e,i){if(!i.segments||0===i.segments.length)return null;if("player"!==e&&"stream"!==e)return null;for(var n=0,s=0;s<i.segments.length;s++){var r=i.segments[s],a=n+r.duration,o=void 0,l=void 0;l="player"===e?(o=r.start,n):(o=r.dateTimeObject,r.dateTimeObject);var c=void 0!==r.start&&void 0!==r.end&&tu(t,e,o,r.end-r.start),u=tu(t,e,l,r.duration);if(c)return{segment:r,estimatedStart:l,type:"accurate"};if(u)return{segment:r,estimatedStart:l,type:"estimate"};n=a}return null}function iu(t){var e=t.playlist,i=t.time,n=void 0===i?void 0:i,s=t.callback;if(!s)throw new Error("getStreamTime: callback must be provided");if(!e||void 0===n)return s({message:"getStreamTime: playlist and time must be provided"});var r=function(t,e){return eu(t,"player",e)}(n,e);if(!r)return s({message:"valid streamTime was not found"});if("estimate"===r.type)return s({message:"Accurate streamTime could not be determined. Please seek to e.seekTime and try again",seekTime:r.estimatedStart});var a={mediaSeconds:n};return r.segment.dateTimeObject&&(a.programDateTime=r.segment.dateTimeObject.toISOString()),s(null,a)}function nu(t){var e=t.streamTime,i=t.playlist,n=t.retryCount,s=void 0===n?2:n,r=t.seekTo,a=t.pauseAfterSeek,o=void 0===a||a,l=t.tech,c=t.callback;if(!c)throw new Error("seekToStreamTime: callback must be provided");if(void 0===e||!i||!r)return c({message:"seekToStreamTime: streamTime, seekTo and playlist must be provided"});if(!i.endList&&!l.hasStarted_)return c({message:"player must be playing a live stream to start buffering"});if(!function(t){if(!t.segments||0===t.segments.length)return!1;for(var e=0;e<t.segments.length;e++){if(!t.segments[e].dateTimeObject)return!1}return!0}(i))return c({message:"programDateTime tags must be provided in the manifest "+i.resolvedUri});var u=function(t,e){var i=void 0;try{i=new Date(t)}catch(t){return null}return eu(i,"stream",e)}(e,i);if(!u)return c({message:e+" was not found in the stream"});if("estimate"===u.type)return 0===s?c({message:e+" is not buffered yet. Try again"}):nu({streamTime:e,playlist:i,retryCount:s-1,seekTo:r,pauseAfterSeek:o,tech:l,callback:c});var h=u.segment,d=function(t,e){var i=void 0,n=void 0;try{i=new Date(t),n=new Date(e)}catch(t){}var s=i.getTime();return(n.getTime()-s)/1e3}(h.dateTimeObject,e),p=h.start+d;l.one("seeked",function(){return c(null,l.currentTime())}),o&&l.pause(),r(p)}function su(t,e){var i=[],n=void 0;if(t&&t.length)for(n=0;n<t.length;n++)e(t.start(n),t.end(n))&&i.push([t.start(n),t.end(n)]);return ur.createTimeRanges(i)}function ru(t,i){return su(t,function(t,e){return t-1/30<=i&&i<=e+1/30})}function au(t,e){return su(t,function(t){return e<=t-1/30})}function ou(t){var e=[];if(!t||!t.length)return"";for(var i=0;i<t.length;i++)e.push(t.start(i)+" => "+t.end(i));return e.join(", ")}function lu(t){for(var e=[],i=0;i<t.length;i++)e.push({start:t.start(i),end:t.end(i)});return e}function cu(t,e,i){var n=void 0,s=void 0;if(i&&i.cues)for(n=i.cues.length;n--;)(s=i.cues[n]).startTime<=e&&s.endTime>=t&&i.removeCue(s)}function uu(t){return isNaN(t)||Math.abs(t)===1/0?Number.MAX_VALUE:t}function hu(t,e,i){var n=y.WebKitDataCue||y.VTTCue;if(e&&e.forEach(function(t){var e=t.stream;this.inbandTextTracks_[e].addCue(new n(t.startTime+this.timestampOffset,t.endTime+this.timestampOffset,t.text))},t),i){var s=uu(t.mediaSource_.duration);if(i.forEach(function(t){var i=t.cueTime+this.timestampOffset;t.frames.forEach(function(t){var e=new n(i,i,t.value||t.url||t.data||"");e.frame=t,e.value=t,function(t){Object.defineProperties(t.frame,{id:{get:function(){return ur.log.warn("cue.frame.id is deprecated. Use cue.value.key instead."),t.value.key}},value:{get:function(){return ur.log.warn("cue.frame.value is deprecated. Use cue.value.data instead."),t.value.data}},privateData:{get:function(){return ur.log.warn("cue.frame.privateData is deprecated. Use cue.value.data instead."),t.value.data}}})}(e),this.metadataTrack_.addCue(e)},this)},t),t.metadataTrack_&&t.metadataTrack_.cues&&t.metadataTrack_.cues.length){for(var r=t.metadataTrack_.cues,a=[],o=0;o<r.length;o++)r[o]&&a.push(r[o]);var l=a.reduce(function(t,e){var i=t[e.startTime]||[];return i.push(e),t[e.startTime]=i,t},{}),c=Object.keys(l).sort(function(t,e){return Number(t)-Number(e)});c.forEach(function(t,e){var i=l[t],n=Number(c[e+1])||s;i.forEach(function(t){t.endTime=n})})}}}var du=ur.createTimeRange,pu=zc.bind(null,1),fu=zc.bind(null,-1),mu={duration:Uc,seekable:function(t,e){var i=e||0,n=Hc(t,e,!0);return null===n?du():du(i,n)},safeLiveIndex:Bc,getMediaInfoForTime:function(t,e,i,n){var s=void 0,r=void 0,a=t.segments.length,o=e-n;if(o<0){if(0<i)for(s=i-1;0<=s;s--)if(r=t.segments[s],0<(o+=fu(r.duration)))return{mediaIndex:s,startTime:n-jc(t,i,s)};return{mediaIndex:0,startTime:e}}if(i<0){for(s=i;s<0;s++)if((o-=t.targetDuration)<0)return{mediaIndex:0,startTime:e};i=0}for(s=i;s<a;s++)if(r=t.segments[s],(o-=pu(r.duration))<0)return{mediaIndex:s,startTime:n+jc(t,i,s)};return{mediaIndex:a-1,startTime:e}},isEnabled:qc,isDisabled:function(t){return t.disabled},isBlacklisted:Wc,isIncompatible:$c,playlistEnd:Hc,isAes:function(t){for(var e=0;e<t.segments.length;e++)if(t.segments[e].key)return!0;return!1},isFmp4:function(t){for(var e=0;e<t.segments.length;e++)if(t.segments[e].map)return!0;return!1},hasAttribute:Vc,estimateSegmentRequestTime:function(t,e,i,n){var s=3<arguments.length&&void 0!==n?n:0;return Vc("BANDWIDTH",i)?(t*i.attributes.BANDWIDTH-8*s)/e:NaN},isLowestEnabledRendition:Yc},gu=ur.xhr,vu=ur.mergeOptions,yu=Object.freeze({createTransferableMessage:Qc,initSegmentId:Jc,hexDump:Zc,tagDump:function(t){var e=t.bytes;return Zc(e)},textRanges:function(t){var e,i,n="",s=void 0;for(s=0;s<t.length;s++)n+=(i=s,(e=t).start(i)+"-"+e.end(i)+" ");return n}}),_u="undefined"!=typeof window?window:{},bu="undefined"==typeof Symbol?"__target":Symbol(),Tu="application/javascript",wu=_u.BlobBuilder||_u.WebKitBlobBuilder||_u.MozBlobBuilder||_u.MSBlobBuilder,ku=_u.URL||_u.webkitURL||ku&&ku.msURL,Su=_u.Worker;function Cu(s,r){return function(t){var e=this;if(!r)return new Su(s);if(Su&&!t){var i=Au(r.toString().replace(/^function.+?{/,"").slice(0,-1));return this[bu]=new Su(i),function(t,e){if(!t||!e)return;var i=t.terminate;t.objURL=e,t.terminate=function(){t.objURL&&ku.revokeObjectURL(t.objURL),i.call(t)}}(this[bu],i),this[bu]}var n={postMessage:function(t){e.onmessage&&setTimeout(function(){e.onmessage({data:t,target:n})})}};r.call(n),this.postMessage=function(t){setTimeout(function(){n.onmessage({data:t,target:e})})},this.isThisThread=!0}}if(Su){var xu,Eu=Au("self.onmessage = function () {}"),Du=new Uint8Array(1);try{(xu=new Su(Eu)).postMessage(Du,[Du.buffer])}catch(t){Su=null}finally{ku.revokeObjectURL(Eu),xu&&xu.terminate()}}function Au(e){try{return ku.createObjectURL(new Blob([e],{type:Tu}))}catch(t){var i=new wu;return i.append(e),ku.createObjectURL(i.getBlob(type))}}function Iu(t){return t.map(function(t){return t.replace(/avc1\.(\d+)\.(\d+)/i,function(t,e,i){return"avc1."+("00"+Number(e).toString(16)).slice(-2)+"00"+("00"+Number(i).toString(16)).slice(-2)})})}function Ou(t){var e,i=0<arguments.length&&void 0!==t?t:"",n={codecCount:0};return n.codecCount=i.split(",").length,n.codecCount=n.codecCount||2,(e=/(^|\s|,)+(avc[13])([^ ,]*)/i.exec(i))&&(n.videoCodec=e[2],n.videoObjectTypeIndicator=e[3]),n.audioProfile=/(^|\s|,)+mp4a.[0-9A-Fa-f]+\.([0-9A-Fa-f]+)/i.exec(i),n.audioProfile=n.audioProfile&&n.audioProfile[2],n}function Pu(t,e,i){return t+"/"+e+'; codecs="'+i.filter(function(t){return!!t}).join(", ")+'"'}function Lu(t,e){var i=function(t){return t.segments&&t.segments.length&&t.segments[0].map?"mp4":"mp2t"}(e),n=function(t){var e=t.attributes||{};return e.CODECS?Ou(e.CODECS):ju}(e),s=e.attributes||{},r=!0,a=!1;if(!e)return[];if(t.mediaGroups.AUDIO&&s.AUDIO){var o=t.mediaGroups.AUDIO[s.AUDIO];if(o)for(var l in r=!(a=!0),o)if(!o[l].uri&&!o[l].playlists){r=!0;break}}a&&!n.audioProfile&&(r||(n.audioProfile=function(t,e){if(!t.mediaGroups.AUDIO||!e)return null;var i=t.mediaGroups.AUDIO[e];if(!i)return null;for(var n in i){var s=i[n];if(s.default&&s.playlists)return Ou(s.playlists[0].attributes.CODECS).audioProfile}return null}(t,s.AUDIO)),n.audioProfile||(ur.log.warn("Multiple audio tracks present but no audio codec string is specified. Attempting to use the default audio codec (mp4a.40.2)"),n.audioProfile=ju.audioProfile));var c={};n.videoCodec&&(c.video=""+n.videoCodec+n.videoObjectTypeIndicator),n.audioProfile&&(c.audio="mp4a.40."+n.audioProfile);var u=Pu("audio",i,[c.audio]),h=Pu("video",i,[c.video]),d=Pu("video",i,[c.video,c.audio]);return a?!r&&c.video?[h,u]:r||c.video?[d,u]:[u,u]:c.video?[d]:[u]}function Mu(t){return/mp4a\.\d+.\d+/i.test(t)}function Nu(t){return/avc1\.[\da-f]+/i.test(t)}function Ru(t,e){var i=t.addSourceBuffer(e),n=Object.create(null);function s(e){"function"==typeof i[e]?n[e]=function(){return i[e].apply(i,arguments)}:void 0===n[e]&&Object.defineProperty(n,e,{get:function(){return i[e]},set:function(t){return i[e]=t}})}for(var r in n.updating=!1,n.realBuffer_=i)s(r);return n}var Uu=new Cu("./transmuxer-worker.worker.js",function(t,e){var Me=this;!function(){var o,e,i,s,r,n,t,a,l,c,u,h,d,p,f,m,g,v,y,_,b,T,w,k,S,C,x,E,D,A,I,O,P,L,M,N,R,U,j,B,H=Math.pow(2,32)-1;!function(){var t;if(T={avc1:[],avcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],mvex:[],mvhd:[],sdtp:[],smhd:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],styp:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[]},"undefined"!=typeof Uint8Array){for(t in T)T.hasOwnProperty(t)&&(T[t]=[t.charCodeAt(0),t.charCodeAt(1),t.charCodeAt(2),t.charCodeAt(3)]);w=new Uint8Array(["i".charCodeAt(0),"s".charCodeAt(0),"o".charCodeAt(0),"m".charCodeAt(0)]),S=new Uint8Array(["a".charCodeAt(0),"v".charCodeAt(0),"c".charCodeAt(0),"1".charCodeAt(0)]),k=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]),x=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]),E={video:C,audio:x},I=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),A=new Uint8Array([0,0,0,0,0,0,0,0]),O=new Uint8Array([0,0,0,0,0,0,0,0]),P=O,L=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),M=O,D=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0])}}(),o=function(t){var e,i,n=[],s=0;for(e=1;e<arguments.length;e++)n.push(arguments[e]);for(e=n.length;e--;)s+=n[e].byteLength;for(i=new Uint8Array(s+8),new DataView(i.buffer,i.byteOffset,i.byteLength).setUint32(0,i.byteLength),i.set(t,4),e=0,s=8;e<n.length;e++)i.set(n[e],s),s+=n[e].byteLength;return i},e=function(){return o(T.dinf,o(T.dref,I))},i=function(t){return o(T.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,t.audioobjecttype<<3|t.samplingfrequencyindex>>>1,t.samplingfrequencyindex<<7|t.channelcount<<3,6,1,2]))},f=function(t){return o(T.hdlr,E[t])},p=function(t){var e=new Uint8Array([0,0,0,0,0,0,0,2,0,0,0,3,0,1,95,144,t.duration>>>24&255,t.duration>>>16&255,t.duration>>>8&255,255&t.duration,85,196,0,0]);return t.samplerate&&(e[12]=t.samplerate>>>24&255,e[13]=t.samplerate>>>16&255,e[14]=t.samplerate>>>8&255,e[15]=255&t.samplerate),o(T.mdhd,e)},d=function(t){return o(T.mdia,p(t),f(t.type),n(t))},r=function(t){return o(T.mfhd,new Uint8Array([0,0,0,0,(4278190080&t)>>24,(16711680&t)>>16,(65280&t)>>8,255&t]))},n=function(t){return o(T.minf,"video"===t.type?o(T.vmhd,D):o(T.smhd,A),e(),g(t))},t=function(t,e){for(var i=[],n=e.length;n--;)i[n]=y(e[n]);return o.apply(null,[T.moof,r(t)].concat(i))},a=function(t){for(var e=t.length,i=[];e--;)i[e]=u(t[e]);return o.apply(null,[T.moov,c(4294967295)].concat(i).concat(l(t)))},l=function(t){for(var e=t.length,i=[];e--;)i[e]=_(t[e]);return o.apply(null,[T.mvex].concat(i))},c=function(t){var e=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,2,0,1,95,144,(4278190080&t)>>24,(16711680&t)>>16,(65280&t)>>8,255&t,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 o(T.mvhd,e)},m=function(t){var e,i,n=t.samples||[],s=new Uint8Array(4+n.length);for(i=0;i<n.length;i++)e=n[i].flags,s[i+4]=e.dependsOn<<4|e.isDependedOn<<2|e.hasRedundancy;return o(T.sdtp,s)},g=function(t){return o(T.stbl,v(t),o(T.stts,M),o(T.stsc,P),o(T.stsz,L),o(T.stco,O))},v=function(t){return o(T.stsd,new Uint8Array([0,0,0,0,0,0,0,1]),"video"===t.type?N(t):R(t))},N=function(t){var e,i=t.sps||[],n=t.pps||[],s=[],r=[];for(e=0;e<i.length;e++)s.push((65280&i[e].byteLength)>>>8),s.push(255&i[e].byteLength),s=s.concat(Array.prototype.slice.call(i[e]));for(e=0;e<n.length;e++)r.push((65280&n[e].byteLength)>>>8),r.push(255&n[e].byteLength),r=r.concat(Array.prototype.slice.call(n[e]));return o(T.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&t.width)>>8,255&t.width,(65280&t.height)>>8,255&t.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]),o(T.avcC,new Uint8Array([1,t.profileIdc,t.profileCompatibility,t.levelIdc,255].concat([i.length]).concat(s).concat([n.length]).concat(r))),o(T.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])))},R=function(t){return o(T.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,(65280&t.channelcount)>>8,255&t.channelcount,(65280&t.samplesize)>>8,255&t.samplesize,0,0,0,0,(65280&t.samplerate)>>8,255&t.samplerate,0,0]),i(t))},h=function(t){var e=new Uint8Array([0,0,0,7,0,0,0,0,0,0,0,0,(4278190080&t.id)>>24,(16711680&t.id)>>16,(65280&t.id)>>8,255&t.id,0,0,0,0,(4278190080&t.duration)>>24,(16711680&t.duration)>>16,(65280&t.duration)>>8,255&t.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&t.width)>>8,255&t.width,0,0,(65280&t.height)>>8,255&t.height,0,0]);return o(T.tkhd,e)},y=function(t){var e,i,n,s,r,a;return e=o(T.tfhd,new Uint8Array([0,0,0,58,(4278190080&t.id)>>24,(16711680&t.id)>>16,(65280&t.id)>>8,255&t.id,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0])),r=Math.floor(t.baseMediaDecodeTime/(1+H)),a=Math.floor(t.baseMediaDecodeTime%(1+H)),i=o(T.tfdt,new Uint8Array([1,0,0,0,r>>>24&255,r>>>16&255,r>>>8&255,255&r,a>>>24&255,a>>>16&255,a>>>8&255,255&a])),92,"audio"===t.type?(n=b(t,92),o(T.traf,e,i,n)):(s=m(t),n=b(t,s.length+92),o(T.traf,e,i,n,s))},u=function(t){return t.duration=t.duration||4294967295,o(T.trak,h(t),d(t))},_=function(t){var e=new Uint8Array([0,0,0,0,(4278190080&t.id)>>24,(16711680&t.id)>>16,(65280&t.id)>>8,255&t.id,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]);return"video"!==t.type&&(e[e.length-1]=0),o(T.trex,e)},B=function(t,e){var i=0,n=0,s=0,r=0;return t.length&&(void 0!==t[0].duration&&(i=1),void 0!==t[0].size&&(n=2),void 0!==t[0].flags&&(s=4),void 0!==t[0].compositionTimeOffset&&(r=8)),[0,0,i|n|s|r,1,(4278190080&t.length)>>>24,(16711680&t.length)>>>16,(65280&t.length)>>>8,255&t.length,(4278190080&e)>>>24,(16711680&e)>>>16,(65280&e)>>>8,255&e]},j=function(t,e){var i,n,s,r;for(n=t.samples||[],i=B(n,e+=20+16*n.length),r=0;r<n.length;r++)s=n[r],i=i.concat([(4278190080&s.duration)>>>24,(16711680&s.duration)>>>16,(65280&s.duration)>>>8,255&s.duration,(4278190080&s.size)>>>24,(16711680&s.size)>>>16,(65280&s.size)>>>8,255&s.size,s.flags.isLeading<<2|s.flags.dependsOn,s.flags.isDependedOn<<6|s.flags.hasRedundancy<<4|s.flags.paddingValue<<1|s.flags.isNonSyncSample,61440&s.flags.degradationPriority,15&s.flags.degradationPriority,(4278190080&s.compositionTimeOffset)>>>24,(16711680&s.compositionTimeOffset)>>>16,(65280&s.compositionTimeOffset)>>>8,255&s.compositionTimeOffset]);return o(T.trun,new Uint8Array(i))},U=function(t,e){var i,n,s,r;for(n=t.samples||[],i=B(n,e+=20+8*n.length),r=0;r<n.length;r++)s=n[r],i=i.concat([(4278190080&s.duration)>>>24,(16711680&s.duration)>>>16,(65280&s.duration)>>>8,255&s.duration,(4278190080&s.size)>>>24,(16711680&s.size)>>>16,(65280&s.size)>>>8,255&s.size]);return o(T.trun,new Uint8Array(i))},b=function(t,e){return"audio"===t.type?U(t,e):j(t,e)};var F,z,W,$,q,V={ftyp:s=function(){return o(T.ftyp,w,k,w,S)},mdat:function(t){return o(T.mdat,t)},moof:t,moov:a,initSegment:function(t){var e,i=s(),n=a(t);return(e=new Uint8Array(i.byteLength+n.byteLength)).set(i),e.set(n,i.byteLength),e}},Y=function(t){return t>>>0};W=function(t){return F(t,["moov","trak"]).reduce(function(t,e){var i,n,s,r,a;return(i=F(e,["tkhd"])[0])?(n=i[0],r=Y(i[s=0===n?12:20]<<24|i[s+1]<<16|i[s+2]<<8|i[s+3]),(a=F(e,["mdia","mdhd"])[0])?(s=0===(n=a[0])?12:20,t[r]=Y(a[s]<<24|a[s+1]<<16|a[s+2]<<8|a[s+3]),t):null):null},{})},$=function(s,t){var e,i,n;return e=F(t,["moof","traf"]),i=[].concat.apply([],e.map(function(n){return F(n,["tfhd"]).map(function(t){var e,i;return e=Y(t[4]<<24|t[5]<<16|t[6]<<8|t[7]),i=s[e]||9e4,(F(n,["tfdt"]).map(function(t){var e,i;return e=t[0],i=Y(t[4]<<24|t[5]<<16|t[6]<<8|t[7]),1===e&&(i*=Math.pow(2,32),i+=Y(t[8]<<24|t[9]<<16|t[10]<<8|t[11])),i})[0]||1/0)/i})})),n=Math.min.apply(null,i),isFinite(n)?n:0},q=function(t){var e=F(t,["moov","trak"]),o=[];return e.forEach(function(t){var e=F(t,["mdia","hdlr"]),a=F(t,["tkhd"]);e.forEach(function(t,e){var i,n,s=z(t.subarray(8,12)),r=a[e];"vide"===s&&(n=0===(i=new DataView(r.buffer,r.byteOffset,r.byteLength)).getUint8(0)?i.getUint32(12):i.getUint32(20),o.push(n))})}),o};function G(){this.init=function(){var r={};this.on=function(t,e){r[t]||(r[t]=[]),r[t]=r[t].concat(e)},this.off=function(t,e){var i;return!!r[t]&&(i=r[t].indexOf(e),r[t]=r[t].slice(),r[t].splice(i,1),-1<i)},this.trigger=function(t){var e,i,n,s;if(e=r[t])if(2===arguments.length)for(n=e.length,i=0;i<n;++i)e[i].call(this,arguments[1]);else{for(s=[],i=arguments.length,i=1;i<arguments.length;++i)s.push(arguments[i]);for(n=e.length,i=0;i<n;++i)e[i].apply(this,s)}},this.dispose=function(){r={}}}}var X={findBox:F=function(t,e){var i,n,s,r,a,o=[];if(!e.length)return null;for(i=0;i<t.byteLength;)n=Y(t[i]<<24|t[i+1]<<16|t[i+2]<<8|t[i+3]),s=z(t.subarray(i+4,i+8)),r=1<n?i+n:t.byteLength,s===e[0]&&(1===e.length?o.push(t.subarray(i+8,r)):(a=F(t.subarray(i+8,r),e.slice(1))).length&&(o=o.concat(a))),i=r;return o},parseType:z=function(t){var e="";return e+=String.fromCharCode(t[0]),e+=String.fromCharCode(t[1]),e+=String.fromCharCode(t[2]),e+=String.fromCharCode(t[3])},timescale:W,startTime:$,videoTrackIds:q};G.prototype.pipe=function(e){return this.on("data",function(t){e.push(t)}),this.on("done",function(t){e.flush(t)}),e},G.prototype.push=function(t){this.trigger("data",t)},G.prototype.flush=function(t){this.trigger("done",t)};function K(t){for(var e=[];t--;)e.push(0);return e}function Q(){Q.prototype.init.call(this),this.captionPackets_=[],this.ccStreams_=[new Ot(0,0),new Ot(0,1),new Ot(1,0),new Ot(1,1)],this.reset(),this.ccStreams_.forEach(function(t){t.on("data",this.trigger.bind(this,"data")),t.on("done",this.trigger.bind(this,"done"))},this)}var J,Z,tt,et,it,nt=G,st=function(t){var e,i,n=[],s=[];for(e=n.byteLength=0;e<t.length;e++)"access_unit_delimiter_rbsp"===(i=t[e]).nalUnitType?(n.length&&(n.duration=i.dts-n.dts,s.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 s.length&&(!n.duration||n.duration<=0)&&(n.duration=s[s.length-1].duration),s.push(n),s},rt=function(t){var e,i,n=[],s=[];for(n.byteLength=0,n.nalCount=0,n.duration=0,n.pts=t[0].pts,n.dts=t[0].dts,s.byteLength=0,s.nalCount=0,s.duration=0,s.pts=t[0].pts,s.dts=t[0].dts,e=0;e<t.length;e++)(i=t[e]).keyFrame?(n.length&&(s.push(n),s.byteLength+=n.byteLength,s.nalCount+=n.nalCount,s.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 s.length&&n.duration<=0&&(n.duration=s[s.length-1].duration),s.byteLength+=n.byteLength,s.nalCount+=n.nalCount,s.duration+=n.duration,s.push(n),s},at=function(t){var e;return!t[0][0].keyFrame&&1<t.length&&(e=t.shift(),t.byteLength-=e.byteLength,t.nalCount-=e.nalCount,t[0][0].dts=e.dts,t[0][0].pts=e.pts,t[0][0].duration+=e.duration),t},ot=function(t,e){var i,n,s,r,a,o,l,c=e||0,u=[];for(i=0;i<t.length;i++)for(r=t[i],n=0;n<r.length;n++)a=r[n],o=a,l=void 0,(l={size:0,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0,degradationPriority:0,isNonSyncSample:1}}).dataOffset=c,l.compositionTimeOffset=o.pts-o.dts,l.duration=o.duration,l.size=4*o.length,l.size+=o.byteLength,o.keyFrame&&(l.flags.dependsOn=2,l.flags.isNonSyncSample=0),c+=(s=l).size,u.push(s);return u},lt=function(t){var e,i,n,s,r,a,o=0,l=t.byteLength,c=t.nalCount,u=new Uint8Array(l+4*c),h=new DataView(u.buffer);for(e=0;e<t.length;e++)for(s=t[e],i=0;i<s.length;i++)for(r=s[i],n=0;n<r.length;n++)a=r[n],h.setUint32(o,a.data.byteLength),o+=4,u.set(a.data,o),o+=a.data.byteLength;return u},ct=[33,16,5,32,164,27],ut=[33,65,108,84,1,2,4,8,168,2,4,8,17,191,252],ht={96e3:[ct,[227,64],K(154),[56]],88200:[ct,[231],K(170),[56]],64e3:[ct,[248,192],K(240),[56]],48e3:[ct,[255,192],K(268),[55,148,128],K(54),[112]],44100:[ct,[255,192],K(268),[55,163,128],K(84),[112]],32e3:[ct,[255,192],K(268),[55,234],K(226),[112]],24e3:[ct,[255,192],K(268),[55,255,128],K(268),[111,112],K(126),[224]],16e3:[ct,[255,192],K(268),[55,255,128],K(268),[111,255],K(269),[223,108],K(195),[1,192]],12e3:[ut,K(268),[3,127,248],K(268),[6,255,240],K(268),[13,255,224],K(268),[27,253,128],K(259),[56]],11025:[ut,K(268),[3,127,248],K(268),[6,255,240],K(268),[13,255,224],K(268),[27,255,192],K(268),[55,175,128],K(108),[112]],8e3:[ut,K(268),[3,121,16],K(47),[7]]},dt=(J=ht,Object.keys(J).reduce(function(t,e){return t[e]=new Uint8Array(J[e].reduce(function(t,e){return t.concat(e)},[])),t},{})),pt=(Z=function(t){return 9e4*t},tt=function(t,e){return t*e},et=function(t){return t/9e4},it=function(t,e){return t/e},function(t,e){return Z(it(t,e))}),ft=function(t,e){return tt(et(t),e)},mt=function(t,e,i,n){var s,r,a,o,l=0,c=0,u=0;if(e.length&&(s=pt(t.baseMediaDecodeTime,t.samplerate),r=Math.ceil(9e4/(t.samplerate/1024)),i&&n&&(l=s-Math.max(i,n),u=(c=Math.floor(l/r))*r),!(c<1||45e3<u))){for(a=(a=dt[t.samplerate])||e[0].data,o=0;o<c;o++)e.splice(o,0,{data:a});t.baseMediaDecodeTime-=Math.floor(ft(u,t.samplerate))}},gt=function(t,e,i){return e.minSegmentDts>=i?t:(e.minSegmentDts=1/0,t.filter(function(t){return t.dts>=i&&(e.minSegmentDts=Math.min(e.minSegmentDts,t.dts),e.minSegmentPts=e.minSegmentDts,!0)}))},vt=function(t){var e,i,n=[];for(e=0;e<t.length;e++)i=t[e],n.push({size:i.data.byteLength,duration:1024});return n},yt=function(t){var e,i,n=0,s=new Uint8Array(function(t){var e,i=0;for(e=0;e<t.length;e++)i+=t[e].data.byteLength;return i}(t));for(e=0;e<t.length;e++)i=t[e],s.set(i.data,n),n+=i.data.byteLength;return s},_t=function(t){delete t.minSegmentDts,delete t.maxSegmentDts,delete t.minSegmentPts,delete t.maxSegmentPts},bt=function(t,e){var i,n=t.minSegmentDts;return e||(n-=t.timelineStartInfo.dts),i=t.timelineStartInfo.baseMediaDecodeTime,i+=n,i=Math.max(0,i),"audio"===t.type&&(i*=t.samplerate/9e4,i=Math.floor(i)),i},Tt=function(t,e){"number"==typeof e.pts&&(void 0===t.timelineStartInfo.pts&&(t.timelineStartInfo.pts=e.pts),void 0===t.minSegmentPts?t.minSegmentPts=e.pts:t.minSegmentPts=Math.min(t.minSegmentPts,e.pts),void 0===t.maxSegmentPts?t.maxSegmentPts=e.pts:t.maxSegmentPts=Math.max(t.maxSegmentPts,e.pts)),"number"==typeof e.dts&&(void 0===t.timelineStartInfo.dts&&(t.timelineStartInfo.dts=e.dts),void 0===t.minSegmentDts?t.minSegmentDts=e.dts:t.minSegmentDts=Math.min(t.minSegmentDts,e.dts),void 0===t.maxSegmentDts?t.maxSegmentDts=e.dts:t.maxSegmentDts=Math.max(t.maxSegmentDts,e.dts))},wt=function(t){for(var e=0,i={payloadType:-1,payloadSize:0},n=0,s=0;e<t.byteLength&&128!==t[e];){for(;255===t[e];)n+=255,e++;for(n+=t[e++];255===t[e];)s+=255,e++;if(s+=t[e++],!i.payload&&4===n){i.payloadType=n,i.payloadSize=s,i.payload=t.subarray(e,e+s);break}e+=s,s=n=0}return i},kt=function(t){return 181!==t.payload[0]?null:49!=(t.payload[1]<<8|t.payload[2])?null:"GA94"!==String.fromCharCode(t.payload[3],t.payload[4],t.payload[5],t.payload[6])?null:3!==t.payload[7]?null:t.payload.subarray(8,t.payload.length-1)},St=function(t,e){var i,n,s,r,a=[];if(!(64&e[0]))return a;for(n=31&e[0],i=0;i<n;i++)r={type:3&e[2+(s=3*i)],pts:t},4&e[2+s]&&(r.ccData=e[3+s]<<8|e[4+s],a.push(r));return a},Ct=function(t){for(var e,i,n=t.byteLength,s=[],r=1;r<n-2;)0===t[r]&&0===t[r+1]&&3===t[r+2]?(s.push(r+2),r+=2):r++;if(0===s.length)return t;e=n-s.length,i=new Uint8Array(e);var a=0;for(r=0;r<e;a++,r++)a===s[0]&&(a++,s.shift()),i[r]=t[a];return i},xt=4;(Q.prototype=new nt).push=function(t){var e,i,n;if("sei_rbsp"===t.nalUnitType&&(e=wt(t.escapedRBSP)).payloadType===xt&&(i=kt(e)))if(t.dts<this.latestDts_)this.ignoreNextEqualDts_=!0;else{if(t.dts===this.latestDts_&&this.ignoreNextEqualDts_)return this.numSameDts_--,void(this.numSameDts_||(this.ignoreNextEqualDts_=!1));n=St(t.pts,i),this.captionPackets_=this.captionPackets_.concat(n),this.latestDts_!==t.dts&&(this.numSameDts_=0),this.numSameDts_++,this.latestDts_=t.dts}},Q.prototype.flush=function(){this.captionPackets_.length?(this.captionPackets_.forEach(function(t,e){t.presortIndex=e}),this.captionPackets_.sort(function(t,e){return t.pts===e.pts?t.presortIndex-e.presortIndex:t.pts-e.pts}),this.captionPackets_.forEach(function(t){t.type<2&&this.dispatchCea608Packet(t)},this),this.captionPackets_.length=0,this.ccStreams_.forEach(function(t){t.flush()},this)):this.ccStreams_.forEach(function(t){t.flush()},this)},Q.prototype.reset=function(){this.latestDts_=null,this.ignoreNextEqualDts_=!1,this.numSameDts_=0,this.activeCea608Channel_=[null,null],this.ccStreams_.forEach(function(t){t.reset()})},Q.prototype.dispatchCea608Packet=function(t){this.setsChannel1Active(t)?this.activeCea608Channel_[t.type]=0:this.setsChannel2Active(t)&&(this.activeCea608Channel_[t.type]=1),null!==this.activeCea608Channel_[t.type]&&this.ccStreams_[(t.type<<1)+this.activeCea608Channel_[t.type]].push(t)},Q.prototype.setsChannel1Active=function(t){return 4096==(30720&t.ccData)},Q.prototype.setsChannel2Active=function(t){return 6144==(30720&t.ccData)};function Et(t){return null===t?"":(t=At[t]||t,String.fromCharCode(t))}function Dt(){for(var t=[],e=15;e--;)t.push("");return t}var At={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},It=[4352,4384,4608,4640,5376,5408,5632,5664,5888,5920,4096,4864,4896,5120,5152],Ot=function t(e,i){t.prototype.init.call(this),this.field_=e||0,this.dataChannel_=i||0,this.name_="CC"+(1+(this.field_<<1|this.dataChannel_)),this.setConstants(),this.reset(),this.push=function(t){var e,i,n,s,r;if((e=32639&t.ccData)!==this.lastControlCode_){if(4096==(61440&e)?this.lastControlCode_=e:e!==this.PADDING_&&(this.lastControlCode_=null),n=e>>>8,s=255&e,e!==this.PADDING_)if(e===this.RESUME_CAPTION_LOADING_)this.mode_="popOn";else if(e===this.END_OF_CAPTION_)this.mode_="popOn",this.clearFormatting(t.pts),this.flushDisplayed(t.pts),i=this.displayed_,this.displayed_=this.nonDisplayed_,this.nonDisplayed_=i,this.startPts_=t.pts;else if(e===this.ROLL_UP_2_ROWS_)this.rollUpRows_=2,this.setRollUp(t.pts);else if(e===this.ROLL_UP_3_ROWS_)this.rollUpRows_=3,this.setRollUp(t.pts);else if(e===this.ROLL_UP_4_ROWS_)this.rollUpRows_=4,this.setRollUp(t.pts);else if(e===this.CARRIAGE_RETURN_)this.clearFormatting(t.pts),this.flushDisplayed(t.pts),this.shiftRowsUp_(),this.startPts_=t.pts;else if(e===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(e===this.ERASE_DISPLAYED_MEMORY_)this.flushDisplayed(t.pts),this.displayed_=Dt();else if(e===this.ERASE_NON_DISPLAYED_MEMORY_)this.nonDisplayed_=Dt();else if(e===this.RESUME_DIRECT_CAPTIONING_)"paintOn"!==this.mode_&&(this.flushDisplayed(t.pts),this.displayed_=Dt()),this.mode_="paintOn",this.startPts_=t.pts;else if(this.isSpecialCharacter(n,s))r=Et((n=(3&n)<<8)|s),this[this.mode_](t.pts,r),this.column_++;else if(this.isExtCharacter(n,s))"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),r=Et((n=(3&n)<<8)|s),this[this.mode_](t.pts,r),this.column_++;else if(this.isMidRowCode(n,s))this.clearFormatting(t.pts),this[this.mode_](t.pts," "),this.column_++,14==(14&s)&&this.addFormatting(t.pts,["i"]),1==(1&s)&&this.addFormatting(t.pts,["u"]);else if(this.isOffsetControlCode(n,s))this.column_+=3&s;else if(this.isPAC(n,s)){var a=It.indexOf(7968&e);"rollUp"===this.mode_&&(a-this.rollUpRows_+1<0&&(a=this.rollUpRows_-1),this.setRollUp(t.pts,a)),a!==this.row_&&(this.clearFormatting(t.pts),this.row_=a),1&s&&-1===this.formatting_.indexOf("u")&&this.addFormatting(t.pts,["u"]),16==(16&e)&&(this.column_=4*((14&e)>>1)),this.isColorPAC(s)&&14==(14&s)&&this.addFormatting(t.pts,["i"])}else this.isNormalChar(n)&&(0===s&&(s=null),r=Et(n),r+=Et(s),this[this.mode_](t.pts,r),this.column_+=r.length)}else this.lastControlCode_=null}};Ot.prototype=new nt,Ot.prototype.flushDisplayed=function(t){var e=this.displayed_.map(function(t){try{return t.trim()}catch(t){return console.error("Skipping malformed caption."),""}}).join("\n").replace(/^\n+|\n+$/g,"");e.length&&this.trigger("data",{startPts:this.startPts_,endPts:t,text:e,stream:this.name_})},Ot.prototype.reset=function(){this.mode_="popOn",this.topRow_=0,this.startPts_=0,this.displayed_=Dt(),this.nonDisplayed_=Dt(),this.lastControlCode_=null,this.column_=0,this.row_=14,this.rollUpRows_=2,this.formatting_=[]},Ot.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_},Ot.prototype.isSpecialCharacter=function(t,e){return t===this.EXT_&&48<=e&&e<=63},Ot.prototype.isExtCharacter=function(t,e){return(t===this.EXT_+1||t===this.EXT_+2)&&32<=e&&e<=63},Ot.prototype.isMidRowCode=function(t,e){return t===this.EXT_&&32<=e&&e<=47},Ot.prototype.isOffsetControlCode=function(t,e){return t===this.OFFSET_&&33<=e&&e<=35},Ot.prototype.isPAC=function(t,e){return t>=this.BASE_&&t<this.BASE_+8&&64<=e&&e<=127},Ot.prototype.isColorPAC=function(t){return 64<=t&&t<=79||96<=t&&t<=127},Ot.prototype.isNormalChar=function(t){return 32<=t&&t<=127},Ot.prototype.setRollUp=function(t,e){if("rollUp"!==this.mode_&&(this.row_=14,this.mode_="rollUp",this.flushDisplayed(t),this.nonDisplayed_=Dt(),this.displayed_=Dt()),void 0!==e&&e!==this.row_)for(var i=0;i<this.rollUpRows_;i++)this.displayed_[e-i]=this.displayed_[this.row_-i],this.displayed_[this.row_-i]="";void 0===e&&(e=this.row_),this.topRow_=e-this.rollUpRows_+1},Ot.prototype.addFormatting=function(t,e){this.formatting_=this.formatting_.concat(e);var i=e.reduce(function(t,e){return t+"<"+e+">"},"");this[this.mode_](t,i)},Ot.prototype.clearFormatting=function(t){if(this.formatting_.length){var e=this.formatting_.reverse().reduce(function(t,e){return t+"</"+e+">"},"");this.formatting_=[],this[this.mode_](t,e)}},Ot.prototype.popOn=function(t,e){var i=this.nonDisplayed_[this.row_];i+=e,this.nonDisplayed_[this.row_]=i},Ot.prototype.rollUp=function(t,e){var i=this.displayed_[this.row_];i+=e,this.displayed_[this.row_]=i},Ot.prototype.shiftRowsUp_=function(){var t;for(t=0;t<this.topRow_;t++)this.displayed_[t]="";for(t=this.row_+1;t<15;t++)this.displayed_[t]="";for(t=this.topRow_;t<this.row_;t++)this.displayed_[t]=this.displayed_[t+1];this.displayed_[this.row_]=""},Ot.prototype.paintOn=function(t,e){var i=this.displayed_[this.row_];i+=e,this.displayed_[this.row_]=i};function Pt(t,e){var i=1;for(e<t&&(i=-1);4294967296<Math.abs(e-t);)t+=8589934592*i;return t}function Lt(t){var e,i;Lt.prototype.init.call(this),this.type_=t,this.push=function(t){t.type===this.type_&&(void 0===i&&(i=t.dts),t.dts=Pt(t.dts,i),t.pts=Pt(t.pts,i),e=t.dts,this.trigger("data",t))},this.flush=function(){i=e,this.trigger("done")},this.discontinuity=function(){e=i=void 0}}var Mt={CaptionStream:Q,Cea608Stream:Ot},Nt={H264_STREAM_TYPE:27,ADTS_STREAM_TYPE:15,METADATA_STREAM_TYPE:21};Lt.prototype=new nt;function Rt(t,e,i){var n,s="";for(n=e;n<i;n++)s+="%"+("00"+t[n].toString(16)).slice(-2);return s}function Ut(t,e,i){return decodeURIComponent(Rt(t,e,i))}function jt(t){return t[0]<<21|t[1]<<14|t[2]<<7|t[3]}var Bt,Ht=Lt,Ft={TXXX:function(t){var e;if(3===t.data[0]){for(e=1;e<t.data.length;e++)if(0===t.data[e]){t.description=Ut(t.data,1,e),t.value=Ut(t.data,e+1,t.data.length).replace(/\0*$/,"");break}t.data=t.value}},WXXX:function(t){var e;if(3===t.data[0])for(e=1;e<t.data.length;e++)if(0===t.data[e]){t.description=Ut(t.data,1,e),t.url=Ut(t.data,e+1,t.data.length);break}},PRIV:function(t){var e,i;for(e=0;e<t.data.length;e++)if(0===t.data[e]){t.owner=(i=t.data,unescape(Rt(i,0,e)));break}t.privateData=t.data.subarray(e+1),t.data=t.privateData}};(Bt=function(t){var e,l={debug:!(!t||!t.debug),descriptor:t&&t.descriptor},c=0,u=[],h=0;if(Bt.prototype.init.call(this),this.dispatchType=Nt.METADATA_STREAM_TYPE.toString(16),l.descriptor)for(e=0;e<l.descriptor.length;e++)this.dispatchType+=("00"+l.descriptor[e].toString(16)).slice(-2);this.push=function(t){var e,i,n,s,r;if("timed-metadata"===t.type)if(t.dataAlignmentIndicator&&(h=0,u.length=0),0===u.length&&(t.data.length<10||t.data[0]!=="I".charCodeAt(0)||t.data[1]!=="D".charCodeAt(0)||t.data[2]!=="3".charCodeAt(0)))l.debug&&console.log("Skipping unrecognized metadata packet");else if(u.push(t),h+=t.data.byteLength,1===u.length&&(c=jt(t.data.subarray(6,10)),c+=10),!(h<c)){for(e={data:new Uint8Array(c),frames:[],pts:u[0].pts,dts:u[0].dts},r=0;r<c;)e.data.set(u[0].data.subarray(0,c-r),r),r+=u[0].data.byteLength,h-=u[0].data.byteLength,u.shift();i=10,64&e.data[5]&&(i+=4,i+=jt(e.data.subarray(10,14)),c-=jt(e.data.subarray(16,20)));do{if((n=jt(e.data.subarray(i+4,i+8)))<1)return console.log("Malformed ID3 frame encountered. Skipping metadata parsing.");if((s={id:String.fromCharCode(e.data[i],e.data[i+1],e.data[i+2],e.data[i+3]),data:e.data.subarray(i+10,i+n+10)}).key=s.id,Ft[s.id]&&(Ft[s.id](s),"com.apple.streaming.transportStreamTimestamp"===s.owner)){var a=s.data,o=(1&a[3])<<30|a[4]<<22|a[5]<<14|a[6]<<6|a[7]>>>2;o*=4,o+=3&a[7],s.timeStamp=o,void 0===e.pts&&void 0===e.dts&&(e.pts=s.timeStamp,e.dts=s.timeStamp),this.trigger("timestamp",s)}e.frames.push(s),i+=10,i+=n}while(i<c);this.trigger("data",e)}}}).prototype=new nt;var zt,Wt,$t,qt=Bt,Vt=Ht;(zt=function(){var s=new Uint8Array(188),r=0;zt.prototype.init.call(this),this.push=function(t){var e,i=0,n=188;for(r?((e=new Uint8Array(t.byteLength+r)).set(s.subarray(0,r)),e.set(t,r),r=0):e=t;n<e.byteLength;)71!==e[i]||71!==e[n]?(i++,n++):(this.trigger("data",e.subarray(i,n)),i+=188,n+=188);i<e.byteLength&&(s.set(e.subarray(i),0),r=e.byteLength-i)},this.flush=function(){188===r&&71===s[0]&&(this.trigger("data",s),r=0),this.trigger("done")}}).prototype=new nt,(Wt=function(){var n,s,r,a;Wt.prototype.init.call(this),(a=this).packetsWaitingForPmt=[],this.programMapTable=void 0,n=function(t,e){var i=0;e.payloadUnitStartIndicator&&(i+=t[i]+1),"pat"===e.type?s(t.subarray(i),e):r(t.subarray(i),e)},s=function(t,e){e.section_number=t[7],e.last_section_number=t[8],a.pmtPid=(31&t[10])<<8|t[11],e.pmtPid=a.pmtPid},r=function(t,e){var i,n;if(1&t[5]){for(a.programMapTable={video:null,audio:null,"timed-metadata":{}},i=3+((15&t[1])<<8|t[2])-4,n=12+((15&t[10])<<8|t[11]);n<i;){var s=t[n],r=(31&t[n+1])<<8|t[n+2];s===Nt.H264_STREAM_TYPE&&null===a.programMapTable.video?a.programMapTable.video=r:s===Nt.ADTS_STREAM_TYPE&&null===a.programMapTable.audio?a.programMapTable.audio=r:s===Nt.METADATA_STREAM_TYPE&&(a.programMapTable["timed-metadata"][r]=s),n+=5+((15&t[n+3])<<8|t[n+4])}e.programMapTable=a.programMapTable}},this.push=function(t){var e={},i=4;if(e.payloadUnitStartIndicator=!!(64&t[1]),e.pid=31&t[1],e.pid<<=8,e.pid|=t[2],1<(48&t[3])>>>4&&(i+=t[i]+1),0===e.pid)e.type="pat",n(t.subarray(i),e),this.trigger("data",e);else if(e.pid===this.pmtPid)for(e.type="pmt",n(t.subarray(i),e),this.trigger("data",e);this.packetsWaitingForPmt.length;)this.processPes_.apply(this,this.packetsWaitingForPmt.shift());else void 0===this.programMapTable?this.packetsWaitingForPmt.push([t,i,e]):this.processPes_(t,i,e)},this.processPes_=function(t,e,i){i.pid===this.programMapTable.video?i.streamType=Nt.H264_STREAM_TYPE:i.pid===this.programMapTable.audio?i.streamType=Nt.ADTS_STREAM_TYPE:i.streamType=this.programMapTable["timed-metadata"][i.pid],i.type="pes",i.data=t.subarray(e),this.trigger("data",i)}}).prototype=new nt,Wt.STREAM_TYPES={h264:27,adts:15},($t=function(){function n(t,e,i){var n,s,r=new Uint8Array(t.size),a={type:e},o=0,l=0;if(t.data.length&&!(t.size<9)){for(a.trackId=t.data[0].pid,o=0;o<t.data.length;o++)s=t.data[o],r.set(s.data,l),l+=s.data.byteLength;!function(t,e){var i;e.packetLength=6+(t[4]<<8|t[5]),e.dataAlignmentIndicator=0!=(4&t[6]),192&(i=t[7])&&(e.pts=(14&t[9])<<27|(255&t[10])<<20|(254&t[11])<<12|(255&t[12])<<5|(254&t[13])>>>3,e.pts*=4,e.pts+=(6&t[13])>>>1,e.dts=e.pts,64&i&&(e.dts=(14&t[14])<<27|(255&t[15])<<20|(254&t[16])<<12|(255&t[17])<<5|(254&t[18])>>>3,e.dts*=4,e.dts+=(6&t[18])>>>1)),e.data=t.subarray(9+t[8])}(r,a),n="video"===e||a.packetLength<=t.size,(i||n)&&(t.size=0,t.data.length=0),n&&c.trigger("data",a)}}var c=this,s={data:[],size:0},r={data:[],size:0},a={data:[],size:0};$t.prototype.init.call(this),this.push=function(i){({pat:function(){},pes:function(){var t,e;switch(i.streamType){case Nt.H264_STREAM_TYPE:case Nt.H264_STREAM_TYPE:t=s,e="video";break;case Nt.ADTS_STREAM_TYPE:t=r,e="audio";break;case Nt.METADATA_STREAM_TYPE:t=a,e="timed-metadata";break;default:return}i.payloadUnitStartIndicator&&n(t,e,!0),t.data.push(i),t.size+=i.data.byteLength},pmt:function(){var t={type:"metadata",tracks:[]},e=i.programMapTable;null!==e.video&&t.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+e.video,codec:"avc",type:"video"}),null!==e.audio&&t.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+e.audio,codec:"adts",type:"audio"}),c.trigger("data",t)}})[i.type]()},this.flush=function(){n(s,"video"),n(r,"audio"),n(a,"timed-metadata"),this.trigger("done")}}).prototype=new nt;var Yt={PAT_PID:0,MP2T_PACKET_LENGTH:188,TransportPacketStream:zt,TransportParseStream:Wt,ElementaryStream:$t,TimestampRolloverStream:Vt,CaptionStream:Mt.CaptionStream,Cea608Stream:Mt.Cea608Stream,MetadataStream:qt};for(var Gt in Nt)Nt.hasOwnProperty(Gt)&&(Yt[Gt]=Nt[Gt]);var Xt,Kt=Yt,Qt=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];(Xt=function(){var c;Xt.prototype.init.call(this),this.push=function(t){var e,i,n,s,r,a,o=0,l=0;if("audio"===t.type)for(c?(s=c,(c=new Uint8Array(s.byteLength+t.data.byteLength)).set(s),c.set(t.data,s.byteLength)):c=t.data;o+5<c.length;)if(255===c[o]&&240==(246&c[o+1])){if(i=2*(1&~c[o+1]),e=(3&c[o+3])<<11|c[o+4]<<3|(224&c[o+5])>>5,a=9e4*(r=1024*(1+(3&c[o+6])))/Qt[(60&c[o+2])>>>2],n=o+e,c.byteLength<n)return;if(this.trigger("data",{pts:t.pts+l*a,dts:t.dts+l*a,sampleCount:r,audioobjecttype:1+(c[o+2]>>>6&3),channelcount:(1&c[o+2])<<2|(192&c[o+3])>>>6,samplerate:Qt[(60&c[o+2])>>>2],samplingfrequencyindex:(60&c[o+2])>>>2,samplesize:16,data:c.subarray(o+7+i,n)}),c.byteLength===n)return void(c=void 0);l++,c=c.subarray(n)}else o++},this.flush=function(){this.trigger("done")}}).prototype=new nt;var Jt,Zt,te,ee=Xt,ie=function(n){var s=n.byteLength,r=0,a=0;this.length=function(){return 8*s},this.bitsAvailable=function(){return 8*s+a},this.loadWord=function(){var t=n.byteLength-s,e=new Uint8Array(4),i=Math.min(4,s);if(0===i)throw new Error("no bytes available");e.set(n.subarray(t,t+i)),r=new DataView(e.buffer).getUint32(0),a=8*i,s-=i},this.skipBits=function(t){var e;t<a||(t-=a,t-=8*(e=Math.floor(t/8)),s-=e,this.loadWord()),r<<=t,a-=t},this.readBits=function(t){var e=Math.min(a,t),i=r>>>32-e;return 0<(a-=e)?r<<=e:0<s&&this.loadWord(),0<(e=t-e)?i<<e|this.readBits(e):i},this.skipLeadingZeros=function(){var t;for(t=0;t<a;++t)if(0!=(r&2147483648>>>t))return r<<=t,a-=t,t;return this.loadWord(),t+this.skipLeadingZeros()},this.skipUnsignedExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros())},this.skipExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros())},this.readUnsignedExpGolomb=function(){var t=this.skipLeadingZeros();return this.readBits(t+1)-1},this.readExpGolomb=function(){var t=this.readUnsignedExpGolomb();return 1&t?1+t>>>1:-1*(t>>>1)},this.readBoolean=function(){return 1===this.readBits(1)},this.readUnsignedByte=function(){return this.readBits(8)},this.loadWord()};(Zt=function(){var i,n,s=0;Zt.prototype.init.call(this),this.push=function(t){var e;for(n=n?((e=new Uint8Array(n.byteLength+t.data.byteLength)).set(n),e.set(t.data,n.byteLength),e):t.data;s<n.byteLength-3;s++)if(1===n[s+2]){i=s+5;break}for(;i<n.byteLength;)switch(n[i]){case 0:if(0!==n[i-1]){i+=2;break}if(0!==n[i-2]){i++;break}for(s+3!==i-2&&this.trigger("data",n.subarray(s+3,i-2));1!==n[++i]&&i<n.length;);s=i-2,i+=3;break;case 1:if(0!==n[i-1]||0!==n[i-2]){i+=3;break}this.trigger("data",n.subarray(s+3,i-2)),s=i-2,i+=3;break;default:i+=3}n=n.subarray(s),i-=s,s=0},this.flush=function(){n&&3<n.byteLength&&this.trigger("data",n.subarray(s+3)),n=null,s=0,this.trigger("done")}}).prototype=new nt,te={100:!0,110:!0,122:!0,244:!0,44:!0,83:!0,86:!0,118:!0,128:!0,138:!0,139:!0,134:!0},(Jt=function(){var i,n,s,r,a,o,_,e=new Zt;Jt.prototype.init.call(this),(i=this).push=function(t){"video"===t.type&&(n=t.trackId,s=t.pts,r=t.dts,e.push(t))},e.on("data",function(t){var e={trackId:n,pts:s,dts:r,data:t};switch(31&t[0]){case 5:e.nalUnitType="slice_layer_without_partitioning_rbsp_idr";break;case 6:e.nalUnitType="sei_rbsp",e.escapedRBSP=a(t.subarray(1));break;case 7:e.nalUnitType="seq_parameter_set_rbsp",e.escapedRBSP=a(t.subarray(1)),e.config=o(e.escapedRBSP);break;case 8:e.nalUnitType="pic_parameter_set_rbsp";break;case 9:e.nalUnitType="access_unit_delimiter_rbsp"}i.trigger("data",e)}),e.on("done",function(){i.trigger("done")}),this.flush=function(){e.flush()},_=function(t,e){var i,n=8,s=8;for(i=0;i<t;i++)0!==s&&(s=(n+e.readExpGolomb()+256)%256),n=0===s?n:s},a=function(t){for(var e,i,n=t.byteLength,s=[],r=1;r<n-2;)0===t[r]&&0===t[r+1]&&3===t[r+2]?(s.push(r+2),r+=2):r++;if(0===s.length)return t;e=n-s.length,i=new Uint8Array(e);var a=0;for(r=0;r<e;a++,r++)a===s[0]&&(a++,s.shift()),i[r]=t[a];return i},o=function(t){var e,i,n,s,r,a,o,l,c,u,h,d,p,f=0,m=0,g=0,v=0,y=1;if(i=(e=new ie(t)).readUnsignedByte(),s=e.readUnsignedByte(),n=e.readUnsignedByte(),e.skipUnsignedExpGolomb(),te[i]&&(3===(r=e.readUnsignedExpGolomb())&&e.skipBits(1),e.skipUnsignedExpGolomb(),e.skipUnsignedExpGolomb(),e.skipBits(1),e.readBoolean()))for(h=3!==r?8:12,p=0;p<h;p++)e.readBoolean()&&_(p<6?16:64,e);if(e.skipUnsignedExpGolomb(),0===(a=e.readUnsignedExpGolomb()))e.readUnsignedExpGolomb();else if(1===a)for(e.skipBits(1),e.skipExpGolomb(),e.skipExpGolomb(),o=e.readUnsignedExpGolomb(),p=0;p<o;p++)e.skipExpGolomb();if(e.skipUnsignedExpGolomb(),e.skipBits(1),l=e.readUnsignedExpGolomb(),c=e.readUnsignedExpGolomb(),0===(u=e.readBits(1))&&e.skipBits(1),e.skipBits(1),e.readBoolean()&&(f=e.readUnsignedExpGolomb(),m=e.readUnsignedExpGolomb(),g=e.readUnsignedExpGolomb(),v=e.readUnsignedExpGolomb()),e.readBoolean()&&e.readBoolean()){switch(e.readUnsignedByte()){case 1:d=[1,1];break;case 2:d=[12,11];break;case 3:d=[10,11];break;case 4:d=[16,11];break;case 5:d=[40,33];break;case 6:d=[24,11];break;case 7:d=[20,11];break;case 8:d=[32,11];break;case 9:d=[80,33];break;case 10:d=[18,11];break;case 11:d=[15,11];break;case 12:d=[64,33];break;case 13:d=[160,99];break;case 14:d=[4,3];break;case 15:d=[3,2];break;case 16:d=[2,1];break;case 255:d=[e.readUnsignedByte()<<8|e.readUnsignedByte(),e.readUnsignedByte()<<8|e.readUnsignedByte()]}d&&(y=d[0]/d[1])}return{profileIdc:i,levelIdc:n,profileCompatibility:s,width:Math.ceil((16*(l+1)-2*f-2*m)*y),height:(2-u)*(c+1)*16-2*g-2*v}}}).prototype=new nt;var ne,se={H264Stream:Jt,NalByteStream:Zt},re=function(t){return t[0]==="I".charCodeAt(0)&&t[1]==="D".charCodeAt(0)&&t[2]==="3".charCodeAt(0)},ae=function(t,e){var i=t[e+6]<<21|t[e+7]<<14|t[e+8]<<7|t[e+9];return(16&t[e+5])>>4?20+i:10+i},oe=function(t,e){var i=(224&t[e+5])>>5,n=t[e+4]<<3;return 6144&t[e+3]|n|i};(ne=function(){var o=new Uint8Array,l=0;ne.prototype.init.call(this),this.setTimestamp=function(t){l=t},this.push=function(t){var e,i,n,s,r=0,a=0;for(o.length?(s=o.length,(o=new Uint8Array(t.byteLength+s)).set(o.subarray(0,s)),o.set(t,s)):o=t;3<=o.length-a;)if(o[a]!=="I".charCodeAt(0)||o[a+1]!=="D".charCodeAt(0)||o[a+2]!=="3".charCodeAt(0))if(255!=(255&o[a])||240!=(240&o[a+1]))a++;else{if(o.length-a<7)break;if(a+(r=oe(o,a))>o.length)break;n={type:"audio",data:o.subarray(a,a+r),pts:l,dts:l},this.trigger("data",n),a+=r}else{if(o.length-a<10)break;if(a+(r=ae(o,a))>o.length)break;i={type:"timed-metadata",data:o.subarray(a,a+r)},this.trigger("data",i),a+=r}e=o.length-a,o=0<e?o.subarray(a):new Uint8Array}}).prototype=new nt;function le(t,e){var i;if(t.length!==e.length)return!1;for(i=0;i<t.length;i++)if(t[i]!==e[i])return!1;return!0}var ce,ue,he,de,pe=ne,fe=se.H264Stream,me=re,ge=["audioobjecttype","channelcount","samplerate","samplingfrequencyindex","samplesize"],ve=["width","height","profileIdc","levelIdc","profileCompatibility"];(ue=function(s,r){var a=[],o=0,l=0,c=0,u=1/0;r=r||{},ue.prototype.init.call(this),this.push=function(e){Tt(s,e),s&&ge.forEach(function(t){s[t]=e[t]}),a.push(e)},this.setEarliestDts=function(t){l=t-s.timelineStartInfo.baseMediaDecodeTime},this.setVideoBaseMediaDecodeTime=function(t){u=t},this.setAudioAppendStart=function(t){c=t},this.flush=function(){var t,e,i,n;0!==a.length&&(t=gt(a,s,l),s.baseMediaDecodeTime=bt(s,r.keepOriginalTimestamps),mt(s,t,c,u),s.samples=vt(t),i=V.mdat(yt(t)),a=[],e=V.moof(o,[s]),n=new Uint8Array(e.byteLength+i.byteLength),o++,n.set(e),n.set(i,e.byteLength),_t(s),this.trigger("data",{track:s,boxes:n})),this.trigger("done","AudioSegmentStream")}}).prototype=new nt,(ce=function(o,l){var e,i,c=0,u=[],h=[];l=l||{},ce.prototype.init.call(this),delete o.minPTS,this.gopCache_=[],this.push=function(t){Tt(o,t),"seq_parameter_set_rbsp"!==t.nalUnitType||e||(e=t.config,o.sps=[t.data],ve.forEach(function(t){o[t]=e[t]},this)),"pic_parameter_set_rbsp"!==t.nalUnitType||i||(i=t.data,o.pps=[t.data]),u.push(t)},this.flush=function(){for(var t,e,i,n,s,r;u.length&&"access_unit_delimiter_rbsp"!==u[0].nalUnitType;)u.shift();if(0===u.length)return this.resetStream_(),void this.trigger("done","VideoSegmentStream");if(t=st(u),(i=rt(t))[0][0].keyFrame||((e=this.getGopForFusion_(u[0],o))?(i.unshift(e),i.byteLength+=e.byteLength,i.nalCount+=e.nalCount,i.pts=e.pts,i.dts=e.dts,i.duration+=e.duration):i=at(i)),h.length){var a;if(!(a=l.alignGopsAtEnd?this.alignGopsAtEnd_(i):this.alignGopsAtStart_(i)))return this.gopCache_.unshift({gop:i.pop(),pps:o.pps,sps:o.sps}),this.gopCache_.length=Math.min(6,this.gopCache_.length),u=[],this.resetStream_(),void this.trigger("done","VideoSegmentStream");_t(o),i=a}Tt(o,i),o.samples=ot(i),s=V.mdat(lt(i)),o.baseMediaDecodeTime=bt(o,l.keepOriginalTimestamps),this.trigger("processedGopsInfo",i.map(function(t){return{pts:t.pts,dts:t.dts,byteLength:t.byteLength}})),this.gopCache_.unshift({gop:i.pop(),pps:o.pps,sps:o.sps}),this.gopCache_.length=Math.min(6,this.gopCache_.length),u=[],this.trigger("baseMediaDecodeTime",o.baseMediaDecodeTime),this.trigger("timelineStartInfo",o.timelineStartInfo),n=V.moof(c,[o]),r=new Uint8Array(n.byteLength+s.byteLength),c++,r.set(n),r.set(s,n.byteLength),this.trigger("data",{track:o,boxes:r}),this.resetStream_(),this.trigger("done","VideoSegmentStream")},this.resetStream_=function(){_t(o),i=e=void 0},this.getGopForFusion_=function(t){var e,i,n,s,r,a=1/0;for(r=0;r<this.gopCache_.length;r++)n=(s=this.gopCache_[r]).gop,o.pps&&le(o.pps[0],s.pps[0])&&o.sps&&le(o.sps[0],s.sps[0])&&(n.dts<o.timelineStartInfo.dts||-1e4<=(e=t.dts-n.dts-n.duration)&&e<=45e3&&(!i||e<a)&&(i=s,a=e));return i?i.gop:null},this.alignGopsAtStart_=function(t){var e,i,n,s,r,a,o,l;for(r=t.byteLength,a=t.nalCount,o=t.duration,e=i=0;e<h.length&&i<t.length&&(n=h[e],s=t[i],n.pts!==s.pts);)s.pts>n.pts?e++:(i++,r-=s.byteLength,a-=s.nalCount,o-=s.duration);return 0===i?t:i===t.length?null:((l=t.slice(i)).byteLength=r,l.duration=o,l.nalCount=a,l.pts=l[0].pts,l.dts=l[0].dts,l)},this.alignGopsAtEnd_=function(t){var e,i,n,s,r,a,o;for(e=h.length-1,i=t.length-1,r=null,a=!1;0<=e&&0<=i;){if(n=h[e],s=t[i],n.pts===s.pts){a=!0;break}n.pts>s.pts?e--:(e===h.length-1&&(r=i),i--)}if(!a&&null===r)return null;if(0===(o=a?i:r))return t;var l=t.slice(o),c=l.reduce(function(t,e){return t.byteLength+=e.byteLength,t.duration+=e.duration,t.nalCount+=e.nalCount,t},{byteLength:0,duration:0,nalCount:0});return l.byteLength=c.byteLength,l.duration=c.duration,l.nalCount=c.nalCount,l.pts=l[0].pts,l.dts=l[0].dts,l},this.alignGopsWith=function(t){h=t}}).prototype=new nt,(de=function(t,e){this.numberOfTracks=0,this.metadataStream=e,void 0!==(t=t||{}).remux?this.remuxTracks=!!t.remux:this.remuxTracks=!0,"boolean"==typeof t.keepOriginalTimestamps&&(this.keepOriginalTimestamps=t.keepOriginalTimestamps),this.pendingTracks=[],this.videoTrack=null,this.pendingBoxes=[],this.pendingCaptions=[],this.pendingMetadata=[],this.pendingBytes=0,this.emittedTracks=0,de.prototype.init.call(this),this.push=function(t){return t.text?this.pendingCaptions.push(t):t.frames?this.pendingMetadata.push(t):(this.pendingTracks.push(t.track),this.pendingBoxes.push(t.boxes),this.pendingBytes+=t.boxes.byteLength,"video"===t.track.type&&(this.videoTrack=t.track),void("audio"===t.track.type&&(this.audioTrack=t.track)))}}).prototype=new nt,de.prototype.flush=function(t){var e,i,n,s,r=0,a={captions:[],captionStreams:{},metadata:[],info:{}},o=0;if(this.pendingTracks.length<this.numberOfTracks){if("VideoSegmentStream"!==t&&"AudioSegmentStream"!==t)return;if(this.remuxTracks)return;if(0===this.pendingTracks.length)return this.emittedTracks++,void(this.emittedTracks>=this.numberOfTracks&&(this.trigger("done"),this.emittedTracks=0))}for(this.videoTrack?(o=this.videoTrack.timelineStartInfo.pts,ve.forEach(function(t){a.info[t]=this.videoTrack[t]},this)):this.audioTrack&&(o=this.audioTrack.timelineStartInfo.pts,ge.forEach(function(t){a.info[t]=this.audioTrack[t]},this)),1===this.pendingTracks.length?a.type=this.pendingTracks[0].type:a.type="combined",this.emittedTracks+=this.pendingTracks.length,n=V.initSegment(this.pendingTracks),a.initSegment=new Uint8Array(n.byteLength),a.initSegment.set(n),a.data=new Uint8Array(this.pendingBytes),s=0;s<this.pendingBoxes.length;s++)a.data.set(this.pendingBoxes[s],r),r+=this.pendingBoxes[s].byteLength;for(s=0;s<this.pendingCaptions.length;s++)(e=this.pendingCaptions[s]).startTime=e.startPts,this.keepOriginalTimestamps||(e.startTime-=o),e.startTime/=9e4,e.endTime=e.endPts,this.keepOriginalTimestamps||(e.endTime-=o),e.endTime/=9e4,a.captionStreams[e.stream]=!0,a.captions.push(e);for(s=0;s<this.pendingMetadata.length;s++)(i=this.pendingMetadata[s]).cueTime=i.pts,this.keepOriginalTimestamps||(i.cueTime-=o),i.cueTime/=9e4,a.metadata.push(i);a.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",a),this.emittedTracks>=this.numberOfTracks&&(this.trigger("done"),this.emittedTracks=0)},(he=function(n){var s,r,a=this,i=!0;he.prototype.init.call(this),n=n||{},this.baseMediaDecodeTime=n.baseMediaDecodeTime||0,this.transmuxPipeline_={},this.setupAacPipeline=function(){var e={};(this.transmuxPipeline_=e).type="aac",e.metadataStream=new Kt.MetadataStream,e.aacStream=new pe,e.audioTimestampRolloverStream=new Kt.TimestampRolloverStream("audio"),e.timedMetadataTimestampRolloverStream=new Kt.TimestampRolloverStream("timed-metadata"),e.adtsStream=new ee,e.coalesceStream=new de(n,e.metadataStream),e.headOfPipeline=e.aacStream,e.aacStream.pipe(e.audioTimestampRolloverStream).pipe(e.adtsStream),e.aacStream.pipe(e.timedMetadataTimestampRolloverStream).pipe(e.metadataStream).pipe(e.coalesceStream),e.metadataStream.on("timestamp",function(t){e.aacStream.setTimestamp(t.timeStamp)}),e.aacStream.on("data",function(t){"timed-metadata"!==t.type||e.audioSegmentStream||(r=r||{timelineStartInfo:{baseMediaDecodeTime:a.baseMediaDecodeTime},codec:"adts",type:"audio"},e.coalesceStream.numberOfTracks++,e.audioSegmentStream=new ue(r,n),e.adtsStream.pipe(e.audioSegmentStream).pipe(e.coalesceStream))}),e.coalesceStream.on("data",this.trigger.bind(this,"data")),e.coalesceStream.on("done",this.trigger.bind(this,"done"))},this.setupTsPipeline=function(){var i={};(this.transmuxPipeline_=i).type="ts",i.metadataStream=new Kt.MetadataStream,i.packetStream=new Kt.TransportPacketStream,i.parseStream=new Kt.TransportParseStream,i.elementaryStream=new Kt.ElementaryStream,i.videoTimestampRolloverStream=new Kt.TimestampRolloverStream("video"),i.audioTimestampRolloverStream=new Kt.TimestampRolloverStream("audio"),i.timedMetadataTimestampRolloverStream=new Kt.TimestampRolloverStream("timed-metadata"),i.adtsStream=new ee,i.h264Stream=new fe,i.captionStream=new Kt.CaptionStream,i.coalesceStream=new de(n,i.metadataStream),i.headOfPipeline=i.packetStream,i.packetStream.pipe(i.parseStream).pipe(i.elementaryStream),i.elementaryStream.pipe(i.videoTimestampRolloverStream).pipe(i.h264Stream),i.elementaryStream.pipe(i.audioTimestampRolloverStream).pipe(i.adtsStream),i.elementaryStream.pipe(i.timedMetadataTimestampRolloverStream).pipe(i.metadataStream).pipe(i.coalesceStream),i.h264Stream.pipe(i.captionStream).pipe(i.coalesceStream),i.elementaryStream.on("data",function(t){var e;if("metadata"===t.type){for(e=t.tracks.length;e--;)s||"video"!==t.tracks[e].type?r||"audio"!==t.tracks[e].type||((r=t.tracks[e]).timelineStartInfo.baseMediaDecodeTime=a.baseMediaDecodeTime):(s=t.tracks[e]).timelineStartInfo.baseMediaDecodeTime=a.baseMediaDecodeTime;s&&!i.videoSegmentStream&&(i.coalesceStream.numberOfTracks++,i.videoSegmentStream=new ce(s,n),i.videoSegmentStream.on("timelineStartInfo",function(t){r&&(r.timelineStartInfo=t,i.audioSegmentStream.setEarliestDts(t.dts))}),i.videoSegmentStream.on("processedGopsInfo",a.trigger.bind(a,"gopInfo")),i.videoSegmentStream.on("baseMediaDecodeTime",function(t){r&&i.audioSegmentStream.setVideoBaseMediaDecodeTime(t)}),i.h264Stream.pipe(i.videoSegmentStream).pipe(i.coalesceStream)),r&&!i.audioSegmentStream&&(i.coalesceStream.numberOfTracks++,i.audioSegmentStream=new ue(r,n),i.adtsStream.pipe(i.audioSegmentStream).pipe(i.coalesceStream))}}),i.coalesceStream.on("data",this.trigger.bind(this,"data")),i.coalesceStream.on("done",this.trigger.bind(this,"done"))},this.setBaseMediaDecodeTime=function(t){var e=this.transmuxPipeline_;n.keepOriginalTimestamps||(this.baseMediaDecodeTime=t),r&&(r.timelineStartInfo.dts=void 0,r.timelineStartInfo.pts=void 0,_t(r),n.keepOriginalTimestamps||(r.timelineStartInfo.baseMediaDecodeTime=t),e.audioTimestampRolloverStream&&e.audioTimestampRolloverStream.discontinuity()),s&&(e.videoSegmentStream&&(e.videoSegmentStream.gopCache_=[],e.videoTimestampRolloverStream.discontinuity()),s.timelineStartInfo.dts=void 0,s.timelineStartInfo.pts=void 0,_t(s),e.captionStream.reset(),n.keepOriginalTimestamps||(s.timelineStartInfo.baseMediaDecodeTime=t)),e.timedMetadataTimestampRolloverStream&&e.timedMetadataTimestampRolloverStream.discontinuity()},this.setAudioAppendStart=function(t){r&&this.transmuxPipeline_.audioSegmentStream.setAudioAppendStart(t)},this.alignGopsWith=function(t){s&&this.transmuxPipeline_.videoSegmentStream&&this.transmuxPipeline_.videoSegmentStream.alignGopsWith(t)},this.push=function(t){if(i){var e=me(t);e&&"aac"!==this.transmuxPipeline_.type?this.setupAacPipeline():e||"ts"===this.transmuxPipeline_.type||this.setupTsPipeline(),i=!1}this.transmuxPipeline_.headOfPipeline.push(t)},this.flush=function(){i=!0,this.transmuxPipeline_.headOfPipeline.flush()},this.resetCaptions=function(){this.transmuxPipeline_.captionStream&&this.transmuxPipeline_.captionStream.reset()}}).prototype=new nt;function ye(t){return new Date(1e3*t-20828448e5)}function _e(t){return{isLeading:(12&t[0])>>>2,dependsOn:3&t[0],isDependedOn:(192&t[1])>>>6,hasRedundancy:(48&t[1])>>>4,paddingValue:(14&t[1])>>>1,isNonSyncSample:1&t[1],degradationPriority:t[2]<<8|t[3]}}function be(t,e){for(var i=t,n=0;n<e.length;n++){var s=e[n];if(i<s.size)return s;i-=s.size}return null}function Te(t,u){var n=X.findBox(t,["moof","traf"]),e=X.findBox(t,["mdat"]),h={},s=[];return e.forEach(function(t,e){var i=n[e];s.push({mdat:t,traf:i})}),s.forEach(function(t){var e,i=t.mdat,n=t.traf,s=X.findBox(n,["tfhd"]),r=Ee.parseTfhd(s[0]),a=r.trackId,o=X.findBox(n,["tfdt"]),l=0<o.length?Ee.parseTfdt(o[0]).baseMediaDecodeTime:0,c=X.findBox(n,["trun"]);u===a&&0<c.length&&(e=function(t,e,i){var n,s,r,a,o=new DataView(t.buffer,t.byteOffset,t.byteLength),l=[];for(s=0;s+4<t.length;s+=r)if(r=o.getUint32(s),s+=4,!(r<=0))switch(31&t[s]){case 6:var c=t.subarray(s+1,s+1+r),u=be(s,e);n={nalUnitType:"sei_rbsp",size:r,data:c,escapedRBSP:De(c),trackId:i},u?(n.pts=u.pts,n.dts=u.dts,a=u):(n.pts=a.pts,n.dts=a.dts),l.push(n)}return l}(i,function(t,e,i){var n=e,s=i.defaultSampleDuration||0,r=i.defaultSampleSize||0,a=i.trackId,o=[];return t.forEach(function(t){var e=Ee.parseTrun(t).samples;e.forEach(function(t){void 0===t.duration&&(t.duration=s),void 0===t.size&&(t.size=r),t.trackId=a,t.dts=n,void 0===t.compositionTimeOffset&&(t.compositionTimeOffset=0),t.pts=n+t.compositionTimeOffset,n+=t.duration}),o=o.concat(e)}),o}(c,l,r),a),h[a]||(h[a]=[]),h[a]=h[a].concat(e))}),h}var we,ke,Se={Transmuxer:he,VideoSegmentStream:ce,AudioSegmentStream:ue,AUDIO_PROPERTIES:ge,VIDEO_PROPERTIES:ve},Ce=X.parseType,xe={avc1:function(t){var e=new DataView(t.buffer,t.byteOffset,t.byteLength);return{dataReferenceIndex:e.getUint16(6),width:e.getUint16(24),height:e.getUint16(26),horizresolution:e.getUint16(28)+e.getUint16(30)/16,vertresolution:e.getUint16(32)+e.getUint16(34)/16,frameCount:e.getUint16(40),depth:e.getUint16(74),config:we(t.subarray(78,t.byteLength))}},avcC:function(t){var e,i,n,s,r=new DataView(t.buffer,t.byteOffset,t.byteLength),a={configurationVersion:t[0],avcProfileIndication:t[1],profileCompatibility:t[2],avcLevelIndication:t[3],lengthSizeMinusOne:3&t[4],sps:[],pps:[]},o=31&t[5];for(n=6,s=0;s<o;s++)i=r.getUint16(n),n+=2,a.sps.push(new Uint8Array(t.subarray(n,n+i))),n+=i;for(e=t[n],n++,s=0;s<e;s++)i=r.getUint16(n),n+=2,a.pps.push(new Uint8Array(t.subarray(n,n+i))),n+=i;return a},btrt:function(t){var e=new DataView(t.buffer,t.byteOffset,t.byteLength);return{bufferSizeDB:e.getUint32(0),maxBitrate:e.getUint32(4),avgBitrate:e.getUint32(8)}},esds:function(t){return{version:t[0],flags:new Uint8Array(t.subarray(1,4)),esId:t[6]<<8|t[7],streamPriority:31&t[8],decoderConfig:{objectProfileIndication:t[11],streamType:t[12]>>>2&63,bufferSize:t[13]<<16|t[14]<<8|t[15],maxBitrate:t[16]<<24|t[17]<<16|t[18]<<8|t[19],avgBitrate:t[20]<<24|t[21]<<16|t[22]<<8|t[23],decoderConfigDescriptor:{tag:t[24],length:t[25],audioObjectType:t[26]>>>3&31,samplingFrequencyIndex:(7&t[26])<<1|t[27]>>>7&1,channelConfiguration:t[27]>>>3&15}}}},ftyp:function(t){for(var e=new DataView(t.buffer,t.byteOffset,t.byteLength),i={majorBrand:Ce(t.subarray(0,4)),minorVersion:e.getUint32(4),compatibleBrands:[]},n=8;n<t.byteLength;)i.compatibleBrands.push(Ce(t.subarray(n,n+4))),n+=4;return i},dinf:function(t){return{boxes:we(t)}},dref:function(t){return{version:t[0],flags:new Uint8Array(t.subarray(1,4)),dataReferences:we(t.subarray(8))}},hdlr:function(t){var e={version:new DataView(t.buffer,t.byteOffset,t.byteLength).getUint8(0),flags:new Uint8Array(t.subarray(1,4)),handlerType:Ce(t.subarray(8,12)),name:""},i=8;for(i=24;i<t.byteLength;i++){if(0===t[i]){i++;break}e.name+=String.fromCharCode(t[i])}return e.name=decodeURIComponent(escape(e.name)),e},mdat:function(t){return{byteLength:t.byteLength,nals:function(t){var e,i,n=new DataView(t.buffer,t.byteOffset,t.byteLength),s=[];for(e=0;e+4<t.length;e+=i)if(i=n.getUint32(e),e+=4,i<=0)s.push("<span style='color:red;'>MALFORMED DATA</span>");else switch(31&t[e]){case 1:s.push("slice_layer_without_partitioning_rbsp");break;case 5:s.push("slice_layer_without_partitioning_rbsp_idr");break;case 6:s.push("sei_rbsp");break;case 7:s.push("seq_parameter_set_rbsp");break;case 8:s.push("pic_parameter_set_rbsp");break;case 9:s.push("access_unit_delimiter_rbsp");break;default:s.push("UNKNOWN NAL - "+t[e]&31)}return s}(t)}},mdhd:function(t){var e,i=new DataView(t.buffer,t.byteOffset,t.byteLength),n=4,s={version:i.getUint8(0),flags:new Uint8Array(t.subarray(1,4)),language:""};return 1===s.version?(n+=4,s.creationTime=ye(i.getUint32(n)),n+=8,s.modificationTime=ye(i.getUint32(n)),n+=4,s.timescale=i.getUint32(n),n+=8):(s.creationTime=ye(i.getUint32(n)),n+=4,s.modificationTime=ye(i.getUint32(n)),n+=4,s.timescale=i.getUint32(n),n+=4),s.duration=i.getUint32(n),n+=4,e=i.getUint16(n),s.language+=String.fromCharCode(96+(e>>10)),s.language+=String.fromCharCode(96+((992&e)>>5)),s.language+=String.fromCharCode(96+(31&e)),s},mdia:function(t){return{boxes:we(t)}},mfhd:function(t){return{version:t[0],flags:new Uint8Array(t.subarray(1,4)),sequenceNumber:t[4]<<24|t[5]<<16|t[6]<<8|t[7]}},minf:function(t){return{boxes:we(t)}},mp4a:function(t){var e=new DataView(t.buffer,t.byteOffset,t.byteLength),i={dataReferenceIndex:e.getUint16(6),channelcount:e.getUint16(16),samplesize:e.getUint16(18),samplerate:e.getUint16(24)+e.getUint16(26)/65536};return 28<t.byteLength&&(i.streamDescriptor=we(t.subarray(28))[0]),i},moof:function(t){return{boxes:we(t)}},moov:function(t){return{boxes:we(t)}},mvex:function(t){return{boxes:we(t)}},mvhd:function(t){var e=new DataView(t.buffer,t.byteOffset,t.byteLength),i=4,n={version:e.getUint8(0),flags:new Uint8Array(t.subarray(1,4))};return 1===n.version?(i+=4,n.creationTime=ye(e.getUint32(i)),i+=8,n.modificationTime=ye(e.getUint32(i)),i+=4,n.timescale=e.getUint32(i),i+=8):(n.creationTime=ye(e.getUint32(i)),i+=4,n.modificationTime=ye(e.getUint32(i)),i+=4,n.timescale=e.getUint32(i),i+=4),n.duration=e.getUint32(i),i+=4,n.rate=e.getUint16(i)+e.getUint16(i+2)/16,i+=4,n.volume=e.getUint8(i)+e.getUint8(i+1)/8,i+=2,i+=2,i+=8,n.matrix=new Uint32Array(t.subarray(i,i+36)),i+=36,i+=24,n.nextTrackId=e.getUint32(i),n},pdin:function(t){var e=new DataView(t.buffer,t.byteOffset,t.byteLength);return{version:e.getUint8(0),flags:new Uint8Array(t.subarray(1,4)),rate:e.getUint32(4),initialDelay:e.getUint32(8)}},sdtp:function(t){var e,i={version:t[0],flags:new Uint8Array(t.subarray(1,4)),samples:[]};for(e=4;e<t.byteLength;e++)i.samples.push({dependsOn:(48&t[e])>>4,isDependedOn:(12&t[e])>>2,hasRedundancy:3&t[e]});return i},sidx:function(t){var e,i=new DataView(t.buffer,t.byteOffset,t.byteLength),n={version:t[0],flags:new Uint8Array(t.subarray(1,4)),references:[],referenceId:i.getUint32(4),timescale:i.getUint32(8),earliestPresentationTime:i.getUint32(12),firstOffset:i.getUint32(16)},s=i.getUint16(22);for(e=24;s;e+=12,s--)n.references.push({referenceType:(128&t[e])>>>7,referencedSize:2147483647&i.getUint32(e),subsegmentDuration:i.getUint32(e+4),startsWithSap:!!(128&t[e+8]),sapType:(112&t[e+8])>>>4,sapDeltaTime:268435455&i.getUint32(e+8)});return n},smhd:function(t){return{version:t[0],flags:new Uint8Array(t.subarray(1,4)),balance:t[4]+t[5]/256}},stbl:function(t){return{boxes:we(t)}},stco:function(t){var e,i=new DataView(t.buffer,t.byteOffset,t.byteLength),n={version:t[0],flags:new Uint8Array(t.subarray(1,4)),chunkOffsets:[]},s=i.getUint32(4);for(e=8;s;e+=4,s--)n.chunkOffsets.push(i.getUint32(e));return n},stsc:function(t){var e,i=new DataView(t.buffer,t.byteOffset,t.byteLength),n=i.getUint32(4),s={version:t[0],flags:new Uint8Array(t.subarray(1,4)),sampleToChunks:[]};for(e=8;n;e+=12,n--)s.sampleToChunks.push({firstChunk:i.getUint32(e),samplesPerChunk:i.getUint32(e+4),sampleDescriptionIndex:i.getUint32(e+8)});return s},stsd:function(t){return{version:t[0],flags:new Uint8Array(t.subarray(1,4)),sampleDescriptions:we(t.subarray(8))}},stsz:function(t){var e,i=new DataView(t.buffer,t.byteOffset,t.byteLength),n={version:t[0],flags:new Uint8Array(t.subarray(1,4)),sampleSize:i.getUint32(4),entries:[]};for(e=12;e<t.byteLength;e+=4)n.entries.push(i.getUint32(e));return n},stts:function(t){var e,i=new DataView(t.buffer,t.byteOffset,t.byteLength),n={version:t[0],flags:new Uint8Array(t.subarray(1,4)),timeToSamples:[]},s=i.getUint32(4);for(e=8;s;e+=8,s--)n.timeToSamples.push({sampleCount:i.getUint32(e),sampleDelta:i.getUint32(e+4)});return n},styp:function(t){return xe.ftyp(t)},tfdt:function(t){var e={version:t[0],flags:new Uint8Array(t.subarray(1,4)),baseMediaDecodeTime:t[4]<<24|t[5]<<16|t[6]<<8|t[7]};return 1===e.version&&(e.baseMediaDecodeTime*=Math.pow(2,32),e.baseMediaDecodeTime+=t[8]<<24|t[9]<<16|t[10]<<8|t[11]),e},tfhd:function(t){var e,i=new DataView(t.buffer,t.byteOffset,t.byteLength),n={version:t[0],flags:new Uint8Array(t.subarray(1,4)),trackId:i.getUint32(4)},s=1&n.flags[2],r=2&n.flags[2],a=8&n.flags[2],o=16&n.flags[2],l=32&n.flags[2],c=65536&n.flags[0],u=131072&n.flags[0];return e=8,s&&(e+=4,n.baseDataOffset=i.getUint32(12),e+=4),r&&(n.sampleDescriptionIndex=i.getUint32(e),e+=4),a&&(n.defaultSampleDuration=i.getUint32(e),e+=4),o&&(n.defaultSampleSize=i.getUint32(e),e+=4),l&&(n.defaultSampleFlags=i.getUint32(e)),c&&(n.durationIsEmpty=!0),!s&&u&&(n.baseDataOffsetIsMoof=!0),n},tkhd:function(t){var e=new DataView(t.buffer,t.byteOffset,t.byteLength),i=4,n={version:e.getUint8(0),flags:new Uint8Array(t.subarray(1,4))};return 1===n.version?(i+=4,n.creationTime=ye(e.getUint32(i)),i+=8,n.modificationTime=ye(e.getUint32(i)),i+=4,n.trackId=e.getUint32(i),i+=4,i+=8):(n.creationTime=ye(e.getUint32(i)),i+=4,n.modificationTime=ye(e.getUint32(i)),i+=4,n.trackId=e.getUint32(i),i+=4,i+=4),n.duration=e.getUint32(i),i+=4,i+=8,n.layer=e.getUint16(i),i+=2,n.alternateGroup=e.getUint16(i),i+=2,n.volume=e.getUint8(i)+e.getUint8(i+1)/8,i+=2,i+=2,n.matrix=new Uint32Array(t.subarray(i,i+36)),i+=36,n.width=e.getUint16(i)+e.getUint16(i+2)/16,i+=4,n.height=e.getUint16(i)+e.getUint16(i+2)/16,n},traf:function(t){return{boxes:we(t)}},trak:function(t){return{boxes:we(t)}},trex:function(t){var e=new DataView(t.buffer,t.byteOffset,t.byteLength);return{version:t[0],flags:new Uint8Array(t.subarray(1,4)),trackId:e.getUint32(4),defaultSampleDescriptionIndex:e.getUint32(8),defaultSampleDuration:e.getUint32(12),defaultSampleSize:e.getUint32(16),sampleDependsOn:3&t[20],sampleIsDependedOn:(192&t[21])>>6,sampleHasRedundancy:(48&t[21])>>4,samplePaddingValue:(14&t[21])>>1,sampleIsDifferenceSample:!!(1&t[21]),sampleDegradationPriority:e.getUint16(22)}},trun:function(t){var e,i={version:t[0],flags:new Uint8Array(t.subarray(1,4)),samples:[]},n=new DataView(t.buffer,t.byteOffset,t.byteLength),s=1&i.flags[2],r=4&i.flags[2],a=1&i.flags[1],o=2&i.flags[1],l=4&i.flags[1],c=8&i.flags[1],u=n.getUint32(4),h=8;for(s&&(i.dataOffset=n.getInt32(h),h+=4),r&&u&&(e={flags:_e(t.subarray(h,h+4))},h+=4,a&&(e.duration=n.getUint32(h),h+=4),o&&(e.size=n.getUint32(h),h+=4),c&&(e.compositionTimeOffset=n.getUint32(h),h+=4),i.samples.push(e),u--);u--;)e={},a&&(e.duration=n.getUint32(h),h+=4),o&&(e.size=n.getUint32(h),h+=4),l&&(e.flags=_e(t.subarray(h,h+4)),h+=4),c&&(e.compositionTimeOffset=n.getUint32(h),h+=4),i.samples.push(e);return i},"url ":function(t){return{version:t[0],flags:new Uint8Array(t.subarray(1,4))}},vmhd:function(t){var e=new DataView(t.buffer,t.byteOffset,t.byteLength);return{version:t[0],flags:new Uint8Array(t.subarray(1,4)),graphicsmode:e.getUint16(4),opcolor:new Uint16Array([e.getUint16(6),e.getUint16(8),e.getUint16(10)])}}},Ee={inspect:we=function(t){for(var e,i,n,s,r,a=0,o=[],l=new ArrayBuffer(t.length),c=new Uint8Array(l),u=0;u<t.length;++u)c[u]=t[u];for(e=new DataView(l);a<t.byteLength;)i=e.getUint32(a),n=Ce(t.subarray(a+4,a+8)),s=1<i?a+i:t.byteLength,(r=(xe[n]||function(t){return{data:t}})(t.subarray(a+8,s))).size=i,r.type=n,o.push(r),a=s;return o},textify:ke=function(t,e){var r;return e=e||0,r=new Array(2*e+1).join(" "),t.map(function(s,t){return r+s.type+"\n"+Object.keys(s).filter(function(t){return"type"!==t&&"boxes"!==t}).map(function(t){var e=r+"  "+t+": ",i=s[t];if(i instanceof Uint8Array||i instanceof Uint32Array){var n=Array.prototype.slice.call(new Uint8Array(i.buffer,i.byteOffset,i.byteLength)).map(function(t){return" "+("00"+t.toString(16)).slice(-2)}).join("").match(/.{1,24}/g);return n?1===n.length?e+"<"+n.join("").slice(1)+">":e+"<\n"+n.map(function(t){return r+"  "+t}).join("\n")+"\n"+r+"  >":e+"<>"}return e+JSON.stringify(i,null,2).split("\n").map(function(t,e){return 0===e?t:r+"  "+t}).join("\n")}).join("\n")+(s.boxes?"\n"+ke(s.boxes,e+1):"")}).join("\n")},parseTfdt:xe.tfdt,parseHdlr:xe.hdlr,parseTfhd:xe.tfhd,parseTrun:xe.trun},De=Ct,Ae=Mt.CaptionStream,Ie={generator:V,probe:X,Transmuxer:Se.Transmuxer,AudioSegmentStream:Se.AudioSegmentStream,VideoSegmentStream:Se.VideoSegmentStream,CaptionParser:function(){var e,r,a,o,l,t=!1;this.isInitialized=function(){return t},this.init=function(){e=new Ae,t=!0,e.on("data",function(t){t.startTime=t.startPts/o,t.endTime=t.endPts/o,l.captions.push(t),l.captionStreams[t.stream]=!0})},this.isNewInit=function(t,e){return!(t&&0===t.length||e&&"object"==typeof e&&0===Object.keys(e).length)&&(a!==t[0]||o!==e[a])},this.parse=function(t,e,i){var n;if(!this.isInitialized())return null;if(!e||!i)return null;if(this.isNewInit(e,i))a=e[0],o=i[a];else if(!a||!o)return r.push(t),null;for(;0<r.length;){var s=r.shift();this.parse(s,e,i)}return null!==(n=function(t,e,i){return e?{seiNals:Te(t,e)[e],timescale:i}:null}(t,a,o))&&n.seiNals?(this.pushNals(n.seiNals),this.flushStream(),l):null},this.pushNals=function(t){if(!this.isInitialized()||!t||0===t.length)return null;t.forEach(function(t){e.push(t)})},this.flushStream=function(){if(!this.isInitialized())return null;e.flush()},this.clearParsedCaptions=function(){l.captions=[],l.captionStreams={}},this.resetCaptionStream=function(){if(!this.isInitialized())return null;e.reset()},this.clearAllCaptions=function(){this.clearParsedCaptions(),this.resetCaptionStream()},this.reset=function(){r=[],o=a=null,l?this.clearParsedCaptions():l={captions:[],captionStreams:{}},this.resetCaptionStream()},this.reset()}};function Oe(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}var Pe=(function(t,e,i){return e&&Oe(t.prototype,e),i&&Oe(t,i),t}(Le,[{key:"init",value:function(){this.transmuxer&&this.transmuxer.dispose(),this.transmuxer=new Ie.Transmuxer(this.options),function(n,t){t.on("data",function(t){var e=t.initSegment;t.initSegment={data:e.buffer,byteOffset:e.byteOffset,byteLength:e.byteLength};var i=t.data;t.data=i.buffer,n.postMessage({action:"data",segment:t,byteOffset:i.byteOffset,byteLength:i.byteLength},[t.data])}),t.captionStream&&t.captionStream.on("data",function(t){n.postMessage({action:"caption",data:t})}),t.on("done",function(t){n.postMessage({action:"done"})}),t.on("gopInfo",function(t){n.postMessage({action:"gopInfo",gopInfo:t})})}(this.self,this.transmuxer)}},{key:"push",value:function(t){var e=new Uint8Array(t.data,t.byteOffset,t.byteLength);this.transmuxer.push(e)}},{key:"reset",value:function(){this.init()}},{key:"setTimestampOffset",value:function(t){var e=t.timestampOffset||0;this.transmuxer.setBaseMediaDecodeTime(Math.round(9e4*e))}},{key:"setAudioAppendStart",value:function(t){this.transmuxer.setAudioAppendStart(Math.ceil(9e4*t.appendStart))}},{key:"flush",value:function(){this.transmuxer.flush()}},{key:"resetCaptions",value:function(){this.transmuxer.resetCaptions()}},{key:"alignGopsWith",value:function(t){this.transmuxer.alignGopsWith(t.gopsToAlignWith.slice())}}]),Le);function Le(t,e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,Le),this.options=e||{},this.self=t,this.init()}new function(e){e.onmessage=function(t){"init"===t.data.action&&t.data.options?this.messageHandlers=new Pe(e,t.data.options):(this.messageHandlers||(this.messageHandlers=new Pe(e)),t.data&&t.data.action&&"init"!==t.data.action&&this.messageHandlers[t.data.action]&&this.messageHandlers[t.data.action](t.data))}}(Me)}()}),ju={videoCodec:"avc1",videoObjectTypeIndicator:".4d400d",audioProfile:"2"},Bu=(Sc(Hu,ur.EventTarget),wc(Hu,[{key:"data_",value:function(t){var e=t.data.segment;e.data=new Uint8Array(e.data,t.data.byteOffset,t.data.byteLength),e.initSegment=new Uint8Array(e.initSegment.data,e.initSegment.byteOffset,e.initSegment.byteLength),function(t,e,i){var n=e.player_;if(i.captions&&i.captions.length)for(var s in t.inbandTextTracks_||(t.inbandTextTracks_={}),i.captionStreams)if(!t.inbandTextTracks_[s]){n.tech_.trigger({type:"usage",name:"hls-608"});var r=n.textTracks().getTrackById(s);t.inbandTextTracks_[s]=r||n.addRemoteTextTrack({kind:"captions",id:s,label:s},!1).track}i.metadata&&i.metadata.length&&!t.metadataTrack_&&(t.metadataTrack_=n.addRemoteTextTrack({kind:"metadata",label:"Timed Metadata"},!1).track,t.metadataTrack_.inBandMetadataTrackDispatchType=i.metadata.dispatchType)}(this,this.mediaSource_,e),this.pendingBuffers_.push(e)}},{key:"done_",value:function(){"closed"!==this.mediaSource_.readyState?this.processPendingSegments_():this.pendingBuffers_.length=0}},{key:"createRealSourceBuffers_",value:function(){var n=this,s=["audio","video"];s.forEach(function(e){if(n[e+"Codec_"]&&!n[e+"Buffer_"]){var i=null;if(n.mediaSource_[e+"Buffer_"])(i=n.mediaSource_[e+"Buffer_"]).updating=!1;else{var t=e+'/mp4;codecs="'+n[e+"Codec_"]+'"';i=Ru(n.mediaSource_.nativeMediaSource_,t),n.mediaSource_[e+"Buffer_"]=i}n[e+"Buffer_"]=i,["update","updatestart","updateend"].forEach(function(t){i.addEventListener(t,function(){if("audio"!==e||!n.audioDisabled_)return"updateend"===t&&(n[e+"Buffer_"].updating=!1),s.every(function(t){return!("audio"!==t||!n.audioDisabled_)||e===t||!n[t+"Buffer_"]||!n[t+"Buffer_"].updating})?n.trigger(t):void 0})})}})}},{key:"appendBuffer",value:function(t){if(this.bufferUpdating_=!0,this.audioBuffer_&&this.audioBuffer_.buffered.length){var e=this.audioBuffer_.buffered;this.transmuxer_.postMessage({action:"setAudioAppendStart",appendStart:e.end(e.length-1)})}this.videoBuffer_&&this.transmuxer_.postMessage({action:"alignGopsWith",gopsToAlignWith:function(t,e,i){if(null==e||!t.length)return[];var n=Math.ceil(9e4*(e-i+3)),s=void 0;for(s=0;s<t.length&&!(t[s].pts>n);s++);return t.slice(s)}(this.gopBuffer_,this.mediaSource_.player_?this.mediaSource_.player_.currentTime():null,this.timeMapping_)}),this.transmuxer_.postMessage({action:"push",data:t.buffer,byteOffset:t.byteOffset,byteLength:t.byteLength},[t.buffer]),this.transmuxer_.postMessage({action:"flush"})}},{key:"appendGopInfo_",value:function(t){this.gopBuffer_=function(t,e,i){if(!e.length)return t;if(i)return e.slice();for(var n=e[0].pts,s=0;s<t.length&&!(t[s].pts>=n);s++);return t.slice(0,s).concat(e)}(this.gopBuffer_,t.data.gopInfo,this.safeAppend_)}},{key:"remove",value:function(t,e){if(this.videoBuffer_&&(this.videoBuffer_.updating=!0,this.videoBuffer_.remove(t,e),this.gopBuffer_=function(t,e,i,n){for(var s=Math.ceil(9e4*(e-n)),r=Math.ceil(9e4*(i-n)),a=t.slice(),o=t.length;o--&&!(t[o].pts<=r););if(-1===o)return a;for(var l=o+1;l--&&!(t[l].pts<=s););return l=Math.max(l,0),a.splice(l,o-l+1),a}(this.gopBuffer_,t,e,this.timeMapping_)),!this.audioDisabled_&&this.audioBuffer_&&(this.audioBuffer_.updating=!0,this.audioBuffer_.remove(t,e)),cu(t,e,this.metadataTrack_),this.inbandTextTracks_)for(var i in this.inbandTextTracks_)cu(t,e,this.inbandTextTracks_[i])}},{key:"processPendingSegments_",value:function(){var t={video:{segments:[],bytes:0},audio:{segments:[],bytes:0},captions:[],metadata:[]};t=this.pendingBuffers_.reduce(function(t,e){var i=e.type,n=e.data,s=e.initSegment;return t[i].segments.push(n),t[i].bytes+=n.byteLength,t[i].initSegment=s,e.captions&&(t.captions=t.captions.concat(e.captions)),e.info&&(t[i].info=e.info),e.metadata&&(t.metadata=t.metadata.concat(e.metadata)),t},t),this.videoBuffer_||this.audioBuffer_||(0===t.video.bytes&&(this.videoCodec_=null),0===t.audio.bytes&&(this.audioCodec_=null),this.createRealSourceBuffers_()),t.audio.info&&this.mediaSource_.trigger({type:"audioinfo",info:t.audio.info}),t.video.info&&this.mediaSource_.trigger({type:"videoinfo",info:t.video.info}),this.appendAudioInitSegment_&&(!this.audioDisabled_&&this.audioBuffer_&&(t.audio.segments.unshift(t.audio.initSegment),t.audio.bytes+=t.audio.initSegment.byteLength),this.appendAudioInitSegment_=!1);var e=!1;this.videoBuffer_&&t.video.bytes?(t.video.segments.unshift(t.video.initSegment),t.video.bytes+=t.video.initSegment.byteLength,this.concatAndAppendSegments_(t.video,this.videoBuffer_),hu(this,t.captions,t.metadata)):!this.videoBuffer_||!this.audioDisabled_&&this.audioBuffer_||(e=!0),!this.audioDisabled_&&this.audioBuffer_&&this.concatAndAppendSegments_(t.audio,this.audioBuffer_),this.pendingBuffers_.length=0,e&&this.trigger("updateend"),this.bufferUpdating_=!1}},{key:"concatAndAppendSegments_",value:function(t,e){var i=0,n=void 0;if(t.bytes){n=new Uint8Array(t.bytes),t.segments.forEach(function(t){n.set(t,i),i+=t.byteLength});try{e.updating=!0,e.appendBuffer(n)}catch(t){this.mediaSource_.player_&&this.mediaSource_.player_.error({code:-3,type:"APPEND_BUFFER_ERR",message:t.message,originalError:t})}}}},{key:"abort",value:function(){this.videoBuffer_&&this.videoBuffer_.abort(),!this.audioDisabled_&&this.audioBuffer_&&this.audioBuffer_.abort(),this.transmuxer_&&this.transmuxer_.postMessage({action:"reset"}),this.pendingBuffers_.length=0,this.bufferUpdating_=!1}}]),Hu);function Hu(t,e){Tc(this,Hu);var i=Cc(this,(Hu.__proto__||Object.getPrototypeOf(Hu)).call(this,ur.EventTarget));i.timestampOffset_=0,i.pendingBuffers_=[],i.bufferUpdating_=!1,i.mediaSource_=t,i.codecs_=e,i.audioCodec_=null,i.videoCodec_=null,i.audioDisabled_=!1,i.appendAudioInitSegment_=!0,i.gopBuffer_=[],i.timeMapping_=0,i.safeAppend_=11<=ur.browser.IE_VERSION;var n={remux:!1,alignGopsAtEnd:i.safeAppend_};return i.codecs_.forEach(function(t){Mu(t)?i.audioCodec_=t:Nu(t)&&(i.videoCodec_=t)}),i.transmuxer_=new Uu,i.transmuxer_.postMessage({action:"init",options:n}),i.transmuxer_.onmessage=function(t){return"data"===t.data.action?i.data_(t):"done"===t.data.action?i.done_(t):"gopInfo"===t.data.action?i.appendGopInfo_(t):void 0},Object.defineProperty(i,"timestampOffset",{get:function(){return this.timestampOffset_},set:function(t){"number"==typeof t&&0<=t&&(this.timestampOffset_=t,this.appendAudioInitSegment_=!0,this.gopBuffer_.length=0,this.timeMapping_=0,this.transmuxer_.postMessage({action:"setTimestampOffset",timestampOffset:t}))}}),Object.defineProperty(i,"appendWindowStart",{get:function(){return(this.videoBuffer_||this.audioBuffer_).appendWindowStart},set:function(t){this.videoBuffer_&&(this.videoBuffer_.appendWindowStart=t),this.audioBuffer_&&(this.audioBuffer_.appendWindowStart=t)}}),Object.defineProperty(i,"updating",{get:function(){return!!(this.bufferUpdating_||!this.audioDisabled_&&this.audioBuffer_&&this.audioBuffer_.updating||this.videoBuffer_&&this.videoBuffer_.updating)}}),Object.defineProperty(i,"buffered",{get:function(){return function(t,e,i){var n=null,s=null,r=0,a=[],o=[];if(!t&&!e)return ur.createTimeRange();if(!t)return e.buffered;if(!e)return t.buffered;if(i)return t.buffered;if(0===t.buffered.length&&0===e.buffered.length)return ur.createTimeRange();for(var l=t.buffered,c=e.buffered,u=l.length;u--;)a.push({time:l.start(u),type:"start"}),a.push({time:l.end(u),type:"end"});for(u=c.length;u--;)a.push({time:c.start(u),type:"start"}),a.push({time:c.end(u),type:"end"});for(a.sort(function(t,e){return t.time-e.time}),u=0;u<a.length;u++)"start"===a[u].type?2===++r&&(n=a[u].time):"end"===a[u].type&&1===--r&&(s=a[u].time),null!==n&&null!==s&&(o.push([n,s]),s=n=null);return ur.createTimeRanges(o)}(this.videoBuffer_,this.audioBuffer_,this.audioDisabled_)}}),i}var Fu=(Sc(zu,ur.EventTarget),wc(zu,[{key:"addSeekableRange_",value:function(t,e){var i=void 0;if(this.duration!==1/0)throw(i=new Error("MediaSource.addSeekableRange() can only be invoked when the duration is Infinity")).name="InvalidStateError",i.code=11,i;(e>this.nativeMediaSource_.duration||isNaN(this.nativeMediaSource_.duration))&&(this.nativeMediaSource_.duration=e)}},{key:"addSourceBuffer",value:function(t){var e=void 0,i=function(t){var s={type:"",parameters:{}},e=t.trim().split(";");return s.type=e.shift().trim(),e.forEach(function(t){var e=t.trim().split("=");if(1<e.length){var i=e[0].replace(/"/g,"").trim(),n=e[1].replace(/"/g,"").trim();s.parameters[i]=n}}),s}(t);if(/^(video|audio)\/mp2t$/i.test(i.type)){var n=[];i.parameters&&i.parameters.codecs&&(n=i.parameters.codecs.split(","),n=(n=Iu(n)).filter(function(t){return Mu(t)||Nu(t)})),0===n.length&&(n=["avc1.4d400d","mp4a.40.2"]),e=new Bu(this,n),0!==this.sourceBuffers.length&&(this.sourceBuffers[0].createRealSourceBuffers_(),e.createRealSourceBuffers_(),this.sourceBuffers[0].audioDisabled_=!0)}else e=this.nativeMediaSource_.addSourceBuffer(t);return this.sourceBuffers.push(e),e}}]),zu);function zu(){Tc(this,zu);var r=Cc(this,(zu.__proto__||Object.getPrototypeOf(zu)).call(this)),t=void 0;for(t in r.nativeMediaSource_=new y.MediaSource,r.nativeMediaSource_)t in zu.prototype||"function"!=typeof r.nativeMediaSource_[t]||(r[t]=r.nativeMediaSource_[t].bind(r.nativeMediaSource_));return r.duration_=NaN,Object.defineProperty(r,"duration",{get:function(){return this.duration_===1/0?this.duration_:this.nativeMediaSource_.duration},set:function(t){(this.duration_=t)===1/0||(this.nativeMediaSource_.duration=t)}}),Object.defineProperty(r,"seekable",{get:function(){return this.duration_===1/0?ur.createTimeRanges([[0,this.nativeMediaSource_.duration]]):this.nativeMediaSource_.seekable}}),Object.defineProperty(r,"readyState",{get:function(){return this.nativeMediaSource_.readyState}}),Object.defineProperty(r,"activeSourceBuffers",{get:function(){return this.activeSourceBuffers_}}),r.sourceBuffers=[],r.activeSourceBuffers_=[],r.updateActiveSourceBuffers_=function(){if(r.activeSourceBuffers_.length=0,1===r.sourceBuffers.length){var t=r.sourceBuffers[0];return t.appendAudioInitSegment_=!0,t.audioDisabled_=!t.audioCodec_,void r.activeSourceBuffers_.push(t)}for(var i=!1,n=!0,e=0;e<r.player_.audioTracks().length;e++){var s=r.player_.audioTracks()[e];if(s.enabled&&"main"!==s.kind){n=!(i=!0);break}}r.sourceBuffers.forEach(function(t,e){if(t.appendAudioInitSegment_=!0,t.videoCodec_&&t.audioCodec_)t.audioDisabled_=i;else if(t.videoCodec_&&!t.audioCodec_)t.audioDisabled_=!0,n=!1;else if(!t.videoCodec_&&t.audioCodec_&&(t.audioDisabled_=e?n:!n,t.audioDisabled_))return;r.activeSourceBuffers_.push(t)})},r.onPlayerMediachange_=function(){r.sourceBuffers.forEach(function(t){t.appendAudioInitSegment_=!0})},r.onHlsReset_=function(){r.sourceBuffers.forEach(function(t){t.transmuxer_&&t.transmuxer_.postMessage({action:"resetCaptions"})})},r.onHlsSegmentTimeMapping_=function(e){r.sourceBuffers.forEach(function(t){return t.timeMapping_=e.mapping})},["sourceopen","sourceclose","sourceended"].forEach(function(t){this.nativeMediaSource_.addEventListener(t,this.trigger.bind(this))},r),r.on("sourceopen",function(t){var e=d.querySelector('[src="'+r.url_+'"]');e&&(r.player_=ur(e.parentNode),r.player_&&(r.player_.tech_.on("hls-reset",r.onHlsReset_),r.player_.tech_.on("hls-segment-time-mapping",r.onHlsSegmentTimeMapping_),r.player_.audioTracks&&r.player_.audioTracks()&&(r.player_.audioTracks().on("change",r.updateActiveSourceBuffers_),r.player_.audioTracks().on("addtrack",r.updateActiveSourceBuffers_),r.player_.audioTracks().on("removetrack",r.updateActiveSourceBuffers_)),r.player_.on("mediachange",r.onPlayerMediachange_)))}),r.on("sourceended",function(t){for(var e=uu(r.duration),i=0;i<r.sourceBuffers.length;i++){var n=r.sourceBuffers[i],s=n.metadataTrack_&&n.metadataTrack_.cues;s&&s.length&&(s[s.length-1].endTime=e)}}),r.on("sourceclose",function(t){this.sourceBuffers.forEach(function(t){t.transmuxer_&&t.transmuxer_.terminate()}),this.sourceBuffers.length=0,this.player_&&(this.player_.audioTracks&&this.player_.audioTracks()&&(this.player_.audioTracks().off("change",this.updateActiveSourceBuffers_),this.player_.audioTracks().off("addtrack",this.updateActiveSourceBuffers_),this.player_.audioTracks().off("removetrack",this.updateActiveSourceBuffers_)),this.player_.el_&&this.player_.off("mediachange",this.onPlayerMediachange_),this.player_.tech_&&this.player_.tech_.el_&&(this.player_.tech_.off("hls-reset",this.onHlsReset_),this.player_.tech_.off("hls-segment-time-mapping",this.onHlsSegmentTimeMapping_)))}),r}var Wu=0;ur.mediaSources={};function $u(t,e){var i=ur.mediaSources[t];if(!i)throw new Error("Media Source not found (Video.js)");i.trigger({type:"sourceopen",swfId:e})}function qu(){return!!y.MediaSource&&!!y.MediaSource.isTypeSupported&&y.MediaSource.isTypeSupported('video/mp4;codecs="avc1.4d400d,mp4a.40.2"')}function Vu(){if(this.MediaSource={open:$u,supportsNativeMediaSources:qu},qu())return new Fu;throw new Error("Cannot use create a virtual MediaSource for this video")}Vu.open=$u,Vu.supportsNativeMediaSources=qu;var Yu={createObjectURL:function(t){var e=void 0;return t instanceof Fu?(e=y.URL.createObjectURL(t.nativeMediaSource_),t.url_=e):t instanceof Fu?(e="blob:vjs-media-source/"+Wu,Wu++,ur.mediaSources[e]=t,e):(e=y.URL.createObjectURL(t),t.url_=e)}};ur.MediaSource=Vu,ur.URL=Yu;function Gu(t,e){for(var a=Xu(t,{duration:e.duration,minimumUpdatePeriod:e.minimumUpdatePeriod}),i=0;i<e.playlists.length;i++){var n=Ec(a,e.playlists[i]);n&&(a=n)}return xc(e,function(t,e,i,n){if(t.playlists&&t.playlists.length){var s=t.playlists[0].uri,r=Ec(a,t.playlists[0]);r&&((a=r).mediaGroups[e][i][n].playlists[0]=a.playlists[s])}}),a}var Xu=ur.mergeOptions,Ku=(Sc(Qu,ur.EventTarget),wc(Qu,[{key:"dispose",value:function(){this.stopRequest(),y.clearTimeout(this.mediaUpdateTimeout)}},{key:"stopRequest",value:function(){if(this.request){var t=this.request;this.request=null,t.onreadystatechange=null,t.abort()}}},{key:"media",value:function(t){if(!t)return this.media_;if("HAVE_NOTHING"===this.state)throw new Error("Cannot switch media playlist from "+this.state);var e=this.state;if("string"==typeof t){if(!this.master.playlists[t])throw new Error("Unknown playlist URI: "+t);t=this.master.playlists[t]}var i=!this.media_||t.uri!==this.media_.uri;this.state="HAVE_METADATA",i&&(this.media_&&this.trigger("mediachanging"),this.media_=t,this.refreshMedia_(),"HAVE_MASTER"!==e&&this.trigger("mediachange"))}},{key:"pause",value:function(){this.stopRequest(),y.clearTimeout(this.mediaUpdateTimeout),"HAVE_NOTHING"===this.state&&(this.started=!1)}},{key:"load",value:function(t){var e=this;y.clearTimeout(this.mediaUpdateTimeout);var i=this.media();if(t){var n=i?i.targetDuration/2*1e3:5e3;this.mediaUpdateTimeout=y.setTimeout(function(){return e.load()},n)}else this.started?this.trigger("loadedplaylist"):this.start()}},{key:"parseMasterXml",value:function(){var r=da(this.masterXml_,{manifestUri:this.srcUrl,clientOffset:this.clientOffset_});r.uri=this.srcUrl;for(var t=0;t<r.playlists.length;t++){var e="placeholder-uri-"+t;r.playlists[t].uri=e,r.playlists[e]=r.playlists[t]}return xc(r,function(t,e,i,n){if(t.playlists&&t.playlists.length){var s="placeholder-uri-"+e+"-"+i+"-"+n;t.playlists[0].uri=s,r.playlists[s]=t.playlists[0]}}),Dc(r),Ac(r),r}},{key:"start",value:function(){var i=this;this.started=!0,this.request=this.hls_.xhr({uri:this.srcUrl,withCredentials:this.withCredentials},function(t,e){if(i.request){if(i.request=null,t)return i.error={status:e.status,message:"DASH playlist request error at URL: "+i.srcUrl,responseText:e.responseText,code:2},"HAVE_NOTHING"===i.state&&(i.started=!1),i.trigger("error");i.masterXml_=e.responseText,e.responseHeaders&&e.responseHeaders.date?i.masterLoaded_=Date.parse(e.responseHeaders.date):i.masterLoaded_=Date.now(),i.syncClientServerClock_(i.onClientServerClockSync_.bind(i))}})}},{key:"syncClientServerClock_",value:function(n){var s=this,r=pa(this.masterXml_);return null===r?(this.clientOffset_=this.masterLoaded_-Date.now(),n()):"DIRECT"===r.method?(this.clientOffset_=r.value-Date.now(),n()):void(this.request=this.hls_.xhr({uri:bc(this.srcUrl,r.value),method:r.method,withCredentials:this.withCredentials},function(t,e){if(s.request){if(t)return s.clientOffset_=s.masterLoaded_-Date.now(),n();var i=void 0;i="HEAD"===r.method?e.responseHeaders&&e.responseHeaders.date?Date.parse(e.responseHeaders.date):s.masterLoaded_:Date.parse(e.responseText),s.clientOffset_=i-Date.now(),n()}}))}},{key:"onClientServerClockSync_",value:function(){var t=this;this.master=this.parseMasterXml(),this.state="HAVE_MASTER",this.trigger("loadedplaylist"),this.media_||this.media(this.master.playlists[0]),y.setTimeout(function(){t.trigger("loadedmetadata")},0),this.master.minimumUpdatePeriod&&y.setTimeout(function(){t.trigger("minimumUpdatePeriod")},this.master.minimumUpdatePeriod)}},{key:"refreshXml_",value:function(){var n=this;this.request=this.hls_.xhr({uri:this.srcUrl,withCredentials:this.withCredentials},function(t,e){if(n.request){if(n.request=null,t)return n.error={status:e.status,message:"DASH playlist request error at URL: "+n.srcUrl,responseText:e.responseText,code:2},"HAVE_NOTHING"===n.state&&(n.started=!1),n.trigger("error");n.masterXml_=e.responseText;var i=n.parseMasterXml();n.master=Gu(n.master,i),y.setTimeout(function(){n.trigger("minimumUpdatePeriod")},n.master.minimumUpdatePeriod)}})}},{key:"refreshMedia_",value:function(){var t=this,e=void 0,i=void 0;i=this.masterPlaylistLoader_?(e=this.masterPlaylistLoader_.master,this.masterPlaylistLoader_.parseMasterXml()):(e=this.master,this.parseMasterXml());var n=Gu(e,i);n?(this.masterPlaylistLoader_?this.masterPlaylistLoader_.master=n:this.master=n,this.media_=n.playlists[this.media_.uri]):this.trigger("playlistunchanged"),this.media().endList||(this.mediaUpdateTimeout=y.setTimeout(function(){t.trigger("mediaupdatetimeout")},Ic(this.media(),!!n))),this.trigger("loadedplaylist")}}]),Qu);function Qu(t,e,i,n){Tc(this,Qu);var s=Cc(this,(Qu.__proto__||Object.getPrototypeOf(Qu)).call(this));if(s.hls_=e,s.withCredentials=i,!t)throw new Error("A non-empty playlist URL or playlist is required");return s.on("minimumUpdatePeriod",function(){s.refreshXml_()}),s.on("mediaupdatetimeout",function(){s.refreshMedia_()}),"string"==typeof t?(s.srcUrl=t,s.state="HAVE_NOTHING",Cc(s)):(s.masterPlaylistLoader_=n,s.state="HAVE_METADATA",s.started=!0,s.media(t),y.setTimeout(function(){s.trigger("loadedmetadata")},0),s)}function Ju(t){return ur.log.debug?ur.log.debug.bind(ur,"VHS:",t+" >"):function(){}}function Zu(){}var th=(wc(eh,[{key:"createSourceBuffer_",value:function(t,e){var i=this;this.sourceBuffer_=this.mediaSource.addSourceBuffer(t),this.logger_("created SourceBuffer"),e&&(e.trigger("sourcebufferadded"),this.mediaSource.sourceBuffers.length<2)?e.on("sourcebufferadded",function(){i.start_()}):this.start_()}},{key:"start_",value:function(){var e=this;this.started_=!0,this.onUpdateendCallback_=function(){var t=e.pendingCallback_;e.pendingCallback_=null,e.logger_("buffered ["+ou(e.buffered())+"]"),t&&t(),e.runCallback_()},this.sourceBuffer_.addEventListener("updateend",this.onUpdateendCallback_),this.runCallback_()}},{key:"abort",value:function(t){var e=this;this.processedAppend_&&this.queueCallback_(function(){e.sourceBuffer_.abort()},t)}},{key:"appendBuffer",value:function(t,e){var i=this;this.processedAppend_=!0,this.queueCallback_(function(){i.sourceBuffer_.appendBuffer(t)},e)}},{key:"buffered",value:function(){return this.sourceBuffer_?this.sourceBuffer_.buffered:ur.createTimeRanges()}},{key:"remove",value:function(t,e,i){var n=this,s=2<arguments.length&&void 0!==i?i:Zu;this.processedAppend_&&this.queueCallback_(function(){n.logger_("remove ["+t+" => "+e+"]"),n.sourceBuffer_.remove(t,e)},s)}},{key:"updating",value:function(){return!this.sourceBuffer_||this.sourceBuffer_.updating||this.pendingCallback_}},{key:"timestampOffset",value:function(t){var e=this;return void 0!==t&&(this.queueCallback_(function(){e.sourceBuffer_.timestampOffset=t}),this.timestampOffset_=t),this.timestampOffset_}},{key:"queueCallback_",value:function(t,e){this.callbacks_.push([t.bind(this),e]),this.runCallback_()}},{key:"runCallback_",value:function(){var t=void 0;!this.updating()&&this.callbacks_.length&&this.started_&&(t=this.callbacks_.shift(),this.pendingCallback_=t[1],t[0]())}},{key:"dispose",value:function(){this.sourceBuffer_.removeEventListener("updateend",this.onUpdateendCallback_),this.sourceBuffer_&&"open"===this.mediaSource.readyState&&this.sourceBuffer_.abort()}}]),eh);function eh(t,e,i,n){Tc(this,eh),this.callbacks_=[],this.pendingCallback_=null,this.timestampOffset_=0,this.mediaSource=t,this.processedAppend_=!1,this.type_=i,this.mimeType_=e,this.logger_=Ju("SourceUpdater["+i+"]["+e+"]"),"closed"===t.readyState?t.addEventListener("sourceopen",this.createSourceBuffer_.bind(this,e,n)):this.createSourceBuffer_(e,n)}function ih(t){var e={};return t.byterange&&(e.Range=function(t){var e;return e=t.offset+t.length-1,"bytes="+t.offset+"-"+e}(t.byterange)),e}function nh(t){t.forEach(function(t){t.abort()})}function sh(t,e){return e.timedout?{status:e.status,message:"HLS request timed-out at URL: "+e.uri,code:mh,xhr:e}:e.aborted?{status:e.status,message:"HLS request aborted at URL: "+e.uri,code:gh,xhr:e}:t?{status:e.status,message:"HLS request errored at URL: "+e.uri,code:fh,xhr:e}:null}function rh(i,n,s){var r=0,a=!1;return function(t,e){if(!a)return t?(a=!0,nh(i),s(t,e)):(r+=1)===i.length?(e.endOfAllRequests=Date.now(),e.encryptedBytes?function(n,s,r){n.addEventListener("message",function t(e){if(e.data.source===s.requestId){n.removeEventListener("message",t);var i=e.data.decrypted;return s.bytes=new Uint8Array(i.bytes,i.byteOffset,i.byteLength),r(null,s)}}),n.postMessage(Qc({source:s.requestId,encrypted:s.encryptedBytes,key:s.key.bytes,iv:s.key.iv}),[s.encryptedBytes.buffer,s.key.bytes.buffer])}(n,e,s):s(null,e)):void 0}}function ah(e,i){return function(t){return e.stats=ur.mergeOptions(e.stats,function(t){var e=t.target,i={bandwidth:1/0,bytesReceived:0,roundTripTime:Date.now()-e.requestTime||0};return i.bytesReceived=t.loaded,i.bandwidth=Math.floor(i.bytesReceived/i.roundTripTime*8*1e3),i}(t)),!e.stats.firstBytesReceivedAt&&e.stats.bytesReceived&&(e.stats.firstBytesReceivedAt=Date.now()),i(t,e)}}function oh(t,e,i,n,s,r,a){var o=[],l=rh(o,i,a);if(s.key){var c=t(ur.mergeOptions(e,{uri:s.key.resolvedUri,responseType:"arraybuffer"}),function(r,a){return function(t,e){var i=e.response,n=sh(t,e);if(n)return a(n,r);if(16!==i.byteLength)return a({status:e.status,message:"Invalid HLS key at URL: "+e.uri,code:fh,xhr:e},r);var s=new DataView(i);return r.key.bytes=new Uint32Array([s.getUint32(0),s.getUint32(4),s.getUint32(8),s.getUint32(12)]),a(null,r)}}(s,l));o.push(c)}if(s.map&&!s.map.bytes){var u=t(ur.mergeOptions(e,{uri:s.map.resolvedUri,responseType:"arraybuffer",headers:ih(s.map)}),function(s,r,a){return function(t,e){var i=e.response,n=sh(t,e);return n?a(n,s):0===i.byteLength?a({status:e.status,message:"Empty HLS segment content at URL: "+e.uri,code:fh,xhr:e},s):(s.map.bytes=new Uint8Array(e.response),r.isInitialized()||r.init(),s.map.timescales=oo.timescale(s.map.bytes),s.map.videoTrackIds=oo.videoTrackIds(s.map.bytes),a(null,s))}}(s,n,l));o.push(u)}var h=t(ur.mergeOptions(e,{uri:s.resolvedUri,responseType:"arraybuffer",headers:ih(s)}),function(r,a,o){return function(t,e){var i=e.response,n=sh(t,e),s=void 0;return n?o(n,r):0===i.byteLength?o({status:e.status,message:"Empty HLS segment content at URL: "+e.uri,code:fh,xhr:e},r):(r.stats=function(t){return{bandwidth:t.bandwidth,bytesReceived:t.bytesReceived||0,roundTripTime:t.roundTripTime||0}}(e),r.key?r.encryptedBytes=new Uint8Array(e.response):r.bytes=new Uint8Array(e.response),r.map&&r.map.bytes&&(a.isInitialized()||a.init(),(s=a.parse(r.bytes,r.map.videoTrackIds,r.map.timescales))&&s.captions&&(r.captionStreams=s.captionStreams,r.fmp4Captions=s.captions)),o(null,r))}}(s,n,l));return h.addEventListener("progress",ah(s,r)),o.push(h),function(){return nh(o)}}function lh(t,e){var i;return t&&(i=y.getComputedStyle(t))?i[e]:""}function ch(t,n){var s=t.slice();t.sort(function(t,e){var i=n(t,e);return 0===i?s.indexOf(t)-s.indexOf(e):i})}function uh(t,e){var i=void 0,n=void 0;return t.attributes.BANDWIDTH&&(i=t.attributes.BANDWIDTH),i=i||y.Number.MAX_VALUE,e.attributes.BANDWIDTH&&(n=e.attributes.BANDWIDTH),i-(n=n||y.Number.MAX_VALUE)}function hh(t,e,i){if(!t||!e)return!1;var n=i===t.segments.length;return t.endList&&"open"===e.readyState&&n}function dh(t){return"number"==typeof t&&isFinite(t)}var ph={GOAL_BUFFER_LENGTH:30,MAX_GOAL_BUFFER_LENGTH:60,GOAL_BUFFER_LENGTH_RATE:1,INITIAL_BANDWIDTH:4194304,BANDWIDTH_VARIANCE:1.2,BUFFER_LOW_WATER_LINE:0,MAX_BUFFER_LOW_WATER_LINE:30,BUFFER_LOW_WATER_LINE_RATE:1},fh=2,mh=-101,gh=-102,vh=(Sc(yh,ur.EventTarget),wc(yh,[{key:"resetStats_",value:function(){this.mediaBytesTransferred=0,this.mediaRequests=0,this.mediaRequestsAborted=0,this.mediaRequestsTimedout=0,this.mediaRequestsErrored=0,this.mediaTransferDuration=0,this.mediaSecondsLoaded=0}},{key:"dispose",value:function(){this.state="DISPOSED",this.pause(),this.abort_(),this.sourceUpdater_&&this.sourceUpdater_.dispose(),this.resetStats_(),this.captionParser_.reset()}},{key:"abort",value:function(){"WAITING"===this.state?(this.abort_(),this.state="READY",this.paused()||this.monitorBuffer_()):this.pendingSegment_&&(this.pendingSegment_=null)}},{key:"abort_",value:function(){this.pendingSegment_&&this.pendingSegment_.abortRequests(),this.pendingSegment_=null}},{key:"error",value:function(t){return void 0!==t&&(this.error_=t),this.pendingSegment_=null,this.error_}},{key:"endOfStream",value:function(){this.ended_=!0,this.pause(),this.trigger("ended")}},{key:"buffered_",value:function(){return this.sourceUpdater_?this.sourceUpdater_.buffered():ur.createTimeRanges()}},{key:"initSegment",value:function(t,e){var i=1<arguments.length&&void 0!==e&&e;if(!t)return null;var n=Jc(t),s=this.initSegments_[n];return i&&!s&&t.bytes&&(this.initSegments_[n]=s={resolvedUri:t.resolvedUri,byterange:t.byterange,bytes:t.bytes,timescales:t.timescales,videoTrackIds:t.videoTrackIds}),s||t}},{key:"couldBeginLoading_",value:function(){return this.playlist_&&(this.sourceUpdater_||this.mimeType_&&"INIT"===this.state)&&!this.paused()}},{key:"load",value:function(){if(this.monitorBuffer_(),this.playlist_){if(this.syncController_.setDateTimeMapping(this.playlist_),"INIT"===this.state&&this.couldBeginLoading_())return this.init_();!this.couldBeginLoading_()||"READY"!==this.state&&"INIT"!==this.state||(this.state="READY")}}},{key:"init_",value:function(){return this.state="READY",this.sourceUpdater_=new th(this.mediaSource_,this.mimeType_,this.loaderType_,this.sourceBufferEmitter_),this.resetEverything(),this.monitorBuffer_()}},{key:"playlist",value:function(t,e){var i=1<arguments.length&&void 0!==e?e:{};if(t){var n=this.playlist_,s=this.pendingSegment_;this.playlist_=t,this.xhrOptions_=i,this.hasPlayed_()||(t.syncInfo={mediaSequence:t.mediaSequence,time:0});var r=n?n.id:null;if(this.logger_("playlist update ["+r+" => "+t.id+"]"),this.trigger("syncinfoupdate"),"INIT"===this.state&&this.couldBeginLoading_())return this.init_();if(n&&n.uri===t.uri){var a=t.mediaSequence-n.mediaSequence;this.logger_("live window shift ["+a+"]"),null!==this.mediaIndex&&(this.mediaIndex-=a),s&&(s.mediaIndex-=a,0<=s.mediaIndex&&(s.segment=t.segments[s.mediaIndex])),this.syncController_.saveExpiredSegmentInfo(n,t)}else null!==this.mediaIndex&&this.resyncLoader()}}},{key:"pause",value:function(){this.checkBufferTimeout_&&(y.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=null)}},{key:"paused",value:function(){return null===this.checkBufferTimeout_}},{key:"mimeType",value:function(t,e){this.mimeType_||(this.mimeType_=t,this.sourceBufferEmitter_=e,"INIT"===this.state&&this.couldBeginLoading_()&&this.init_())}},{key:"resetEverything",value:function(t){this.ended_=!1,this.resetLoader(),this.remove(0,this.duration_(),t),this.captionParser_.clearAllCaptions(),this.trigger("reseteverything")}},{key:"resetLoader",value:function(){this.fetchAtBuffer_=!1,this.resyncLoader()}},{key:"resyncLoader",value:function(){this.mediaIndex=null,this.syncPoint_=null,this.abort()}},{key:"remove",value:function(t,e,i){if(this.sourceUpdater_&&this.sourceUpdater_.remove(t,e,i),cu(t,e,this.segmentMetadataTrack_),this.inbandTextTracks_)for(var n in this.inbandTextTracks_)cu(t,e,this.inbandTextTracks_[n])}},{key:"monitorBuffer_",value:function(){this.checkBufferTimeout_&&y.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=y.setTimeout(this.monitorBufferTick_.bind(this),1)}},{key:"monitorBufferTick_",value:function(){"READY"===this.state&&this.fillBuffer_(),this.checkBufferTimeout_&&y.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=y.setTimeout(this.monitorBufferTick_.bind(this),500)}},{key:"fillBuffer_",value:function(){if(!this.sourceUpdater_.updating()){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_);t&&(hh(this.playlist_,this.mediaSource_,t.mediaIndex)?this.endOfStream():t.mediaIndex===this.playlist_.segments.length-1&&"ended"===this.mediaSource_.readyState&&!this.seeking_()||((t.timeline!==this.currentTimeline_||null!==t.startOfSegment&&t.startOfSegment<this.sourceUpdater_.timestampOffset())&&(this.syncController_.reset(),t.timestampOffset=t.startOfSegment,this.captionParser_.clearAllCaptions()),this.loadSegment_(t)))}}},{key:"checkBuffer_",value:function(t,e,i,n,s,r){var a=0,o=void 0;t.length&&(a=t.end(t.length-1));var l=Math.max(0,a-s);if(!e.segments.length)return null;if(l>=this.goalBufferLength_())return null;if(!n&&1<=l)return null;if(null===r)return i=this.getSyncSegmentCandidate_(e),this.generateSegmentInfo_(e,i,null,!0);if(null!==i){var c=e.segments[i];return o=c&&c.end?c.end:a,this.generateSegmentInfo_(e,i+1,o,!1)}if(this.fetchAtBuffer_){var u=mu.getMediaInfoForTime(e,a,r.segmentIndex,r.time);i=u.mediaIndex,o=u.startTime}else{var h=mu.getMediaInfoForTime(e,s,r.segmentIndex,r.time);i=h.mediaIndex,o=h.startTime}return this.generateSegmentInfo_(e,i,o,!1)}},{key:"getSyncSegmentCandidate_",value:function(t){var e=this;if(-1===this.currentTimeline_)return 0;var i=t.segments.map(function(t,e){return{timeline:t.timeline,segmentIndex:e}}).filter(function(t){return t.timeline===e.currentTimeline_});return i.length?i[Math.min(i.length-1,1)].segmentIndex:Math.max(t.segments.length-1,0)}},{key:"generateSegmentInfo_",value:function(t,e,i,n){if(e<0||e>=t.segments.length)return null;var s=t.segments[e];return{requestId:"segment-loader-"+Math.random(),uri:s.resolvedUri,mediaIndex:e,isSyncRequest:n,startOfSegment:i,playlist:t,bytes:null,encryptedBytes:null,timestampOffset:null,timeline:s.timeline,duration:s.duration,segment:s}}},{key:"abortRequestEarly_",value:function(t){if(this.hls_.tech_.paused()||!this.xhrOptions_.timeout||!this.playlist_.attributes.BANDWIDTH)return!1;if(Date.now()-(t.firstBytesReceivedAt||Date.now())<1e3)return!1;var e=this.currentTime_(),i=t.bandwidth,n=this.pendingSegment_.duration,s=mu.estimateSegmentRequestTime(n,i,this.playlist_,t.bytesReceived),r=function(t,e,i){var n=2<arguments.length&&void 0!==i?i:1;return((t.length?t.end(t.length-1):0)-e)/n}(this.buffered_(),e,this.hls_.tech_.playbackRate())-1;if(s<=r)return!1;var a=function(t){var e=t.master,i=t.currentTime,n=t.bandwidth,s=t.duration,r=t.segmentDuration,a=t.timeUntilRebuffer,o=t.currentTimeline,l=t.syncController,c=e.playlists.filter(function(t){return!mu.isIncompatible(t)}),u=c.filter(mu.isEnabled);u.length||(u=c.filter(function(t){return!mu.isDisabled(t)}));var h=u.filter(mu.hasAttribute.bind(null,"BANDWIDTH")).map(function(t){var e=l.getSyncPoint(t,s,o,i)?1:2;return{playlist:t,rebufferingImpact:mu.estimateSegmentRequestTime(r,n,t)*e-a}}),d=h.filter(function(t){return t.rebufferingImpact<=0});return ch(d,function(t,e){return uh(e.playlist,t.playlist)}),d.length?d[0]:(ch(h,function(t,e){return t.rebufferingImpact-e.rebufferingImpact}),h[0]||null)}({master:this.hls_.playlists.master,currentTime:e,bandwidth:i,duration:this.duration_(),segmentDuration:n,timeUntilRebuffer:r,currentTimeline:this.currentTimeline_,syncController:this.syncController_});if(a){var o=s-r-a.rebufferingImpact,l=.5;return r<=1/30&&(l=1),!(!a.playlist||a.playlist.uri===this.playlist_.uri||o<l)&&(this.bandwidth=a.playlist.attributes.BANDWIDTH*ph.BANDWIDTH_VARIANCE+1,this.abort(),this.trigger("earlyabort"),!0)}}},{key:"handleProgress_",value:function(t,e){this.pendingSegment_&&e.requestId===this.pendingSegment_.requestId&&!this.abortRequestEarly_(e.stats)&&this.trigger("progress")}},{key:"loadSegment_",value:function(t){this.state="WAITING",this.pendingSegment_=t,this.trimBackBuffer_(t),t.abortRequests=oh(this.hls_.xhr,this.xhrOptions_,this.decrypter_,this.captionParser_,this.createSimplifiedSegmentObj_(t),this.handleProgress_.bind(this),this.segmentRequestFinished_.bind(this))}},{key:"trimBackBuffer_",value:function(){var t=function(t,e,i){var n=void 0;return n=t.length&&0<t.start(0)&&t.start(0)<e?t.start(0):e-30,Math.min(n,e-i)}(this.seekable_(),this.currentTime_(),this.playlist_.targetDuration||10);0<t&&this.remove(0,t)}},{key:"createSimplifiedSegmentObj_",value:function(t){var e=t.segment,i={resolvedUri:e.resolvedUri,byterange:e.byterange,requestId:t.requestId};if(e.key){var n=e.key.iv||new Uint32Array([0,0,0,t.mediaIndex+t.playlist.mediaSequence]);i.key={resolvedUri:e.key.resolvedUri,iv:n}}return e.map&&(i.map=this.initSegment(e.map)),i}},{key:"segmentRequestFinished_",value:function(t,e){if(this.mediaRequests+=1,e.stats&&(this.mediaBytesTransferred+=e.stats.bytesReceived,this.mediaTransferDuration+=e.stats.roundTripTime),this.pendingSegment_){if(e.requestId===this.pendingSegment_.requestId){if(t)return this.pendingSegment_=null,this.state="READY",t.code===gh?void(this.mediaRequestsAborted+=1):(this.pause(),t.code===mh?(this.mediaRequestsTimedout+=1,this.bandwidth=1,this.roundTrip=NaN,void this.trigger("bandwidthupdate")):(this.mediaRequestsErrored+=1,this.error(t),void this.trigger("error")));this.bandwidth=e.stats.bandwidth,this.roundTrip=e.stats.roundTripTime,e.map&&(e.map=this.initSegment(e.map,!0)),this.processSegmentResponse_(e)}}else this.mediaRequestsAborted+=1}},{key:"processSegmentResponse_",value:function(t){var e=this.pendingSegment_;e.bytes=t.bytes,t.map&&(e.segment.map.bytes=t.map.bytes),e.endOfAllRequests=t.endOfAllRequests,t.fmp4Captions&&(function(t,e,i){for(var n in i)if(!t[n]){e.trigger({type:"usage",name:"hls-608"});var s=e.textTracks().getTrackById(n);t[n]=s||e.addRemoteTextTrack({kind:"captions",id:n,label:n},!1).track}}(this.inbandTextTracks_,this.hls_.tech_,t.captionStreams),function(t){var s=t.inbandTextTracks,e=t.captionArray,r=t.timestampOffset;if(e){var a=window.WebKitDataCue||window.VTTCue;e.forEach(function(t){var e=t.stream,i=t.startTime,n=t.endTime;s[e]&&(i+=r,n+=r,s[e].addCue(new a(i,n,t.text)))})}}({inbandTextTracks:this.inbandTextTracks_,captionArray:t.fmp4Captions,timestampOffset:0}),this.captionParser_.clearParsedCaptions()),this.handleSegment_()}},{key:"handleSegment_",value:function(){var t=this;if(this.pendingSegment_){var e=this.pendingSegment_,i=e.segment,n=this.syncController_.probeSegmentInfo(e);void 0===this.startingMedia_&&n&&(n.containsAudio||n.containsVideo)&&(this.startingMedia_={containsAudio:n.containsAudio,containsVideo:n.containsVideo});var s=function(t,e,i){return"main"===t&&e&&i?i.containsAudio||i.containsVideo?e.containsVideo&&!i.containsVideo?"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.":!e.containsVideo&&i.containsVideo?"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.startingMedia_,n);if(s)return this.error({message:s,blacklistDuration:1/0}),void this.trigger("error");if(e.isSyncRequest)return this.trigger("syncinfoupdate"),this.pendingSegment_=null,void(this.state="READY");null!==e.timestampOffset&&e.timestampOffset!==this.sourceUpdater_.timestampOffset()&&(this.sourceUpdater_.timestampOffset(e.timestampOffset),this.trigger("timestampoffset"));var r=this.syncController_.mappingForTimeline(e.timeline);if(null!==r&&this.trigger({type:"segmenttimemapping",mapping:r}),this.state="APPENDING",i.map){var a=Jc(i.map);if(!this.activeInitSegmentId_||this.activeInitSegmentId_!==a){var o=this.initSegment(i.map);this.sourceUpdater_.appendBuffer(o.bytes,function(){t.activeInitSegmentId_=a})}}e.byteLength=e.bytes.byteLength,"number"==typeof i.start&&"number"==typeof i.end?this.mediaSecondsLoaded+=i.end-i.start:this.mediaSecondsLoaded+=i.duration,this.logger_(function(t){var e=t.segment,i=e.start,n=e.end,s=t.playlist,r=s.mediaSequence,a=s.id,o=s.segments,l=void 0===o?[]:o,c=t.mediaIndex,u=t.timeline;return["appending ["+c+"] of ["+r+", "+(r+l.length)+"] from playlist ["+a+"]","["+i+" => "+n+"] in timeline ["+u+"]"].join(" ")}(e)),this.sourceUpdater_.appendBuffer(e.bytes,this.handleUpdateEnd_.bind(this))}else this.state="READY"}},{key:"handleUpdateEnd_",value:function(){if(!this.pendingSegment_)return this.state="READY",void(this.paused()||this.monitorBuffer_());var t=this.pendingSegment_,e=t.segment,i=null!==this.mediaIndex;this.pendingSegment_=null,this.recordThroughput_(t),this.addSegmentMetadataCue_(t),this.state="READY",this.mediaIndex=t.mediaIndex,this.fetchAtBuffer_=!0,this.currentTimeline_=t.timeline,this.trigger("syncinfoupdate"),e.end&&this.currentTime_()-e.end>3*t.playlist.targetDuration?this.resetEverything():(i&&this.trigger("bandwidthupdate"),this.trigger("progress"),hh(t.playlist,this.mediaSource_,t.mediaIndex+1)&&this.endOfStream(),this.paused()||this.monitorBuffer_())}},{key:"recordThroughput_",value:function(t){var e=this.throughput.rate,i=Date.now()-t.endOfAllRequests+1,n=Math.floor(t.byteLength/i*8*1e3);this.throughput.rate+=(n-e)/++this.throughput.count}},{key:"addSegmentMetadataCue_",value:function(t){if(this.segmentMetadataTrack_){var e=t.segment,i=e.start,n=e.end;if(dh(i)&&dh(n)){cu(i,n,this.segmentMetadataTrack_);var s=y.WebKitDataCue||y.VTTCue,r={dateTimeObject:e.dateTimeObject,dateTimeString:e.dateTimeString,bandwidth:t.playlist.attributes.BANDWIDTH,resolution:t.playlist.attributes.RESOLUTION,codecs:t.playlist.attributes.CODECS,byteLength:t.byteLength,uri:t.uri,timeline:t.timeline,playlist:t.playlist.uri,start:i,end:n},a=new s(i,n,JSON.stringify(r));a.value=r,this.segmentMetadataTrack_.addCue(a)}}}}]),yh);function yh(t){Tc(this,yh);var e=Cc(this,(yh.__proto__||Object.getPrototypeOf(yh)).call(this));if(!t)throw new TypeError("Initialization settings are required");if("function"!=typeof t.currentTime)throw new TypeError("No currentTime getter specified");if(!t.mediaSource)throw new TypeError("No MediaSource specified");return e.bandwidth=t.bandwidth,e.throughput={rate:0,count:0},e.roundTrip=NaN,e.resetStats_(),e.mediaIndex=null,e.hasPlayed_=t.hasPlayed,e.currentTime_=t.currentTime,e.seekable_=t.seekable,e.seeking_=t.seeking,e.duration_=t.duration,e.mediaSource_=t.mediaSource,e.hls_=t.hls,e.loaderType_=t.loaderType,e.startingMedia_=void 0,e.segmentMetadataTrack_=t.segmentMetadataTrack,e.goalBufferLength_=t.goalBufferLength,e.sourceType_=t.sourceType,e.inbandTextTracks_=t.inbandTextTracks,e.state_="INIT",e.checkBufferTimeout_=null,e.error_=void 0,e.currentTimeline_=-1,e.pendingSegment_=null,e.mimeType_=null,e.sourceUpdater_=null,e.xhrOptions_=null,e.activeInitSegmentId_=null,e.initSegments_={},e.captionParser_=new Ql,e.decrypter_=t.decrypter,e.syncController_=t.syncController,e.syncPoint_={segmentIndex:0,time:0},e.syncController_.on("syncinfoupdate",function(){return e.trigger("syncinfoupdate")}),e.mediaSource_.addEventListener("sourceopen",function(){return e.ended_=!1}),e.fetchAtBuffer_=!1,e.logger_=Ju("SegmentLoader["+e.loaderType_+"]"),Object.defineProperty(e,"state",{get:function(){return this.state_},set:function(t){t!==this.state_&&(this.logger_(this.state_+" -> "+t),this.state_=t)}}),e}function _h(t){return decodeURIComponent(escape(String.fromCharCode.apply(null,t)))}var bh=new Uint8Array("\n\n".split("").map(function(t){return t.charCodeAt(0)})),Th=(Sc(wh,vh),wc(wh,[{key:"buffered_",value:function(){if(!this.subtitlesTrack_||!this.subtitlesTrack_.cues.length)return ur.createTimeRanges();var t=this.subtitlesTrack_.cues,e=t[0].startTime,i=t[t.length-1].startTime;return ur.createTimeRanges([[e,i]])}},{key:"initSegment",value:function(t,e){var i=1<arguments.length&&void 0!==e&&e;if(!t)return null;var n=Jc(t),s=this.initSegments_[n];if(i&&!s&&t.bytes){var r=bh.byteLength+t.bytes.byteLength,a=new Uint8Array(r);a.set(t.bytes),a.set(bh,t.bytes.byteLength),this.initSegments_[n]=s={resolvedUri:t.resolvedUri,byterange:t.byterange,bytes:a}}return s||t}},{key:"couldBeginLoading_",value:function(){return this.playlist_&&this.subtitlesTrack_&&!this.paused()}},{key:"init_",value:function(){return this.state="READY",this.resetEverything(),this.monitorBuffer_()}},{key:"track",value:function(t){return void 0===t||(this.subtitlesTrack_=t,"INIT"===this.state&&this.couldBeginLoading_()&&this.init_()),this.subtitlesTrack_}},{key:"remove",value:function(t,e){cu(t,e,this.subtitlesTrack_)}},{key:"fillBuffer_",value:function(){var t=this;this.syncPoint_||(this.syncPoint_=this.syncController_.getSyncPoint(this.playlist_,this.duration_(),this.currentTimeline_,this.currentTime_()));var e=this.checkBuffer_(this.buffered_(),this.playlist_,this.mediaIndex,this.hasPlayed_(),this.currentTime_(),this.syncPoint_);if(e=this.skipEmptySegments_(e)){if(null===this.syncController_.timestampOffsetForTimeline(e.timeline))return this.syncController_.one("timestampoffset",function(){t.state="READY",t.paused()||t.monitorBuffer_()}),void(this.state="WAITING_ON_TIMELINE");this.loadSegment_(e)}}},{key:"skipEmptySegments_",value:function(t){for(;t&&t.segment.empty;)t=this.generateSegmentInfo_(t.playlist,t.mediaIndex+1,t.startOfSegment+t.duration,t.isSyncRequest);return t}},{key:"handleSegment_",value:function(){var e=this;if(this.pendingSegment_&&this.subtitlesTrack_){this.state="APPENDING";var t=this.pendingSegment_,i=t.segment;if("function"!=typeof y.WebVTT&&this.subtitlesTrack_&&this.subtitlesTrack_.tech_){function n(){e.handleSegment_()}return this.state="WAITING_ON_VTTJS",this.subtitlesTrack_.tech_.one("vttjsloaded",n),void this.subtitlesTrack_.tech_.one("vttjserror",function(){e.subtitlesTrack_.tech_.off("vttjsloaded",n),e.error({message:"Error loading vtt.js"}),e.state="READY",e.pause(),e.trigger("error")})}i.requested=!0;try{this.parseVTTCues_(t)}catch(t){return this.error({message:t.message}),this.state="READY",this.pause(),this.trigger("error")}if(this.updateTimeMapping_(t,this.syncController_.timelines[t.timeline],this.playlist_),t.isSyncRequest)return this.trigger("syncinfoupdate"),this.pendingSegment_=null,void(this.state="READY");t.byteLength=t.bytes.byteLength,this.mediaSecondsLoaded+=i.duration,t.cues.length&&this.remove(t.cues[0].endTime,t.cues[t.cues.length-1].endTime),t.cues.forEach(function(t){e.subtitlesTrack_.addCue(t)}),this.handleUpdateEnd_()}else this.state="READY"}},{key:"parseVTTCues_",value:function(e){var t=void 0,i=!1;"function"==typeof y.TextDecoder?t=new y.TextDecoder("utf8"):(t=y.WebVTT.StringDecoder(),i=!0);var n=new y.WebVTT.Parser(y,y.vttjs,t);if(e.cues=[],e.timestampmap={MPEGTS:0,LOCAL:0},n.oncue=e.cues.push.bind(e.cues),n.ontimestampmap=function(t){return e.timestampmap=t},n.onparsingerror=function(t){ur.log.warn("Error encountered when parsing cues: "+t.message)},e.segment.map){var s=e.segment.map.bytes;i&&(s=_h(s)),n.parse(s)}var r=e.bytes;i&&(r=_h(r)),n.parse(r),n.flush()}},{key:"updateTimeMapping_",value:function(t,e,i){var n=t.segment;if(e)if(t.cues.length){var s=t.timestampmap,r=s.MPEGTS/9e4-s.LOCAL+e.mapping;if(t.cues.forEach(function(t){t.startTime+=r,t.endTime+=r}),!i.syncInfo){var a=t.cues[0].startTime,o=t.cues[t.cues.length-1].startTime;i.syncInfo={mediaSequence:i.mediaSequence+t.mediaIndex,time:Math.min(a,o-n.duration)}}}else n.empty=!0}}]),wh);function wh(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};Tc(this,wh);var i=Cc(this,(wh.__proto__||Object.getPrototypeOf(wh)).call(this,t,e));return i.mediaSource_=null,i.subtitlesTrack_=null,i}function kh(t,e){for(var i=t.cues,n=0;n<i.length;n++){var s=i[n];if(e>=s.adStartTime&&e<=s.adEndTime)return s}return null}var Sh=sc,Ch=[{name:"VOD",run:function(t,e,i){if(i===1/0)return null;return{time:0,segmentIndex:0}}},{name:"ProgramDateTime",run:function(t,e,i,n,s){if(!t.datetimeToDisplayTime)return null;var r=e.segments||[],a=null,o=null;s=s||0;for(var l=0;l<r.length;l++){var c=r[l];if(c.dateTimeObject){var u=c.dateTimeObject.getTime()/1e3+t.datetimeToDisplayTime,h=Math.abs(s-u);if(null!==o&&o<h)break;o=h,a={time:u,segmentIndex:l}}}return a}},{name:"Segment",run:function(t,e,i,n,s){var r=e.segments||[],a=null,o=null;s=s||0;for(var l=0;l<r.length;l++){var c=r[l];if(c.timeline===n&&void 0!==c.start){var u=Math.abs(s-c.start);if(null!==o&&o<u)break;(!a||null===o||u<=o)&&(o=u,a={time:c.start,segmentIndex:l})}}return a}},{name:"Discontinuity",run:function(t,e,i,n,s){var r=null;if(s=s||0,e.discontinuityStarts&&e.discontinuityStarts.length)for(var a=null,o=0;o<e.discontinuityStarts.length;o++){var l=e.discontinuityStarts[o],c=e.discontinuitySequence+o+1,u=t.discontinuities[c];if(u){var h=Math.abs(s-u.time);if(null!==a&&a<h)break;(!r||null===a||h<=a)&&(a=h,r={time:u.time,segmentIndex:l})}}return r}},{name:"Playlist",run:function(t,e){return e.syncInfo?{time:e.syncInfo.time,segmentIndex:e.syncInfo.mediaSequence-e.mediaSequence}:null}}],xh=(Sc(Eh,ur.EventTarget),wc(Eh,[{key:"getSyncPoint",value:function(t,e,i,n){var s=this.runStrategies_(t,e,i,n);return s.length?this.selectSyncPoint_(s,{key:"time",value:n}):null}},{key:"getExpiredTime",value:function(t,e){if(!t||!t.segments)return null;var i=this.runStrategies_(t,e,t.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+jc(t,n.segmentIndex,0))}},{key:"runStrategies_",value:function(t,e,i,n){for(var s=[],r=0;r<Ch.length;r++){var a=Ch[r],o=a.run(this,t,e,i,n);o&&(o.strategy=a.name,s.push({strategy:a.name,syncPoint:o}))}return s}},{key:"selectSyncPoint_",value:function(t,e){for(var i=t[0].syncPoint,n=Math.abs(t[0].syncPoint[e.key]-e.value),s=t[0].strategy,r=1;r<t.length;r++){var a=Math.abs(t[r].syncPoint[e.key]-e.value);a<n&&(n=a,i=t[r].syncPoint,s=t[r].strategy)}return this.logger_("syncPoint for ["+e.key+": "+e.value+"] chosen with strategy ["+s+"]: [time:"+i.time+", segmentIndex:"+i.segmentIndex+"]"),i}},{key:"saveExpiredSegmentInfo",value:function(t,e){for(var i=e.mediaSequence-t.mediaSequence-1;0<=i;i--){var n=t.segments[i];if(n&&void 0!==n.start){e.syncInfo={mediaSequence:t.mediaSequence+i,time:n.start},this.logger_("playlist refresh sync: [time:"+e.syncInfo.time+", mediaSequence: "+e.syncInfo.mediaSequence+"]"),this.trigger("syncinfoupdate");break}}}},{key:"setDateTimeMapping",value:function(t){if(!this.datetimeToDisplayTime&&t.segments&&t.segments.length&&t.segments[0].dateTimeObject){var e=t.segments[0].dateTimeObject.getTime()/1e3;this.datetimeToDisplayTime=-e}}},{key:"reset",value:function(){this.inspectCache_=void 0}},{key:"probeSegmentInfo",value:function(t){var e=t.segment,i=t.playlist,n=void 0;return(n=e.map?this.probeMp4Segment_(t):this.probeTsSegment_(t))&&this.calculateSegmentTimeMapping_(t,n)&&(this.saveDiscontinuitySyncInfo_(t),i.syncInfo||(i.syncInfo={mediaSequence:i.mediaSequence+t.mediaIndex,time:e.start})),n}},{key:"probeMp4Segment_",value:function(t){var e=t.segment,i=oo.timescale(e.map.bytes),n=oo.startTime(i,t.bytes);return null!==t.timestampOffset&&(t.timestampOffset-=n),{start:n,end:n+e.duration}}},{key:"probeTsSegment_",value:function(t){var e=Sh(t.bytes,this.inspectCache_),i=void 0,n=void 0;return e?(e.video&&2===e.video.length?(this.inspectCache_=e.video[1].dts,i=e.video[0].dtsTime,n=e.video[1].dtsTime):e.audio&&2===e.audio.length&&(this.inspectCache_=e.audio[1].dts,i=e.audio[0].dtsTime,n=e.audio[1].dtsTime),{start:i,end:n,containsVideo:e.video&&2===e.video.length,containsAudio:e.audio&&2===e.audio.length}):null}},{key:"timestampOffsetForTimeline",value:function(t){return void 0===this.timelines[t]?null:this.timelines[t].time}},{key:"mappingForTimeline",value:function(t){return void 0===this.timelines[t]?null:this.timelines[t].mapping}},{key:"calculateSegmentTimeMapping_",value:function(t,e){var i=t.segment,n=this.timelines[t.timeline];if(null!==t.timestampOffset)n={time:t.startOfSegment,mapping:t.startOfSegment-e.start},this.timelines[t.timeline]=n,this.trigger("timestampoffset"),this.logger_("time mapping for timeline "+t.timeline+": [time: "+n.time+"] [mapping: "+n.mapping+"]"),i.start=t.startOfSegment,i.end=e.end+n.mapping;else{if(!n)return!1;i.start=e.start+n.mapping,i.end=e.end+n.mapping}return!0}},{key:"saveDiscontinuitySyncInfo_",value:function(t){var e=t.playlist,i=t.segment;if(i.discontinuity)this.discontinuities[i.timeline]={time:i.start,accuracy:0};else if(e.discontinuityStarts&&e.discontinuityStarts.length)for(var n=0;n<e.discontinuityStarts.length;n++){var s=e.discontinuityStarts[n],r=e.discontinuitySequence+n+1,a=s-t.mediaIndex,o=Math.abs(a);if(!this.discontinuities[r]||this.discontinuities[r].accuracy>o){var l=void 0;l=a<0?i.start-jc(e,t.mediaIndex,s):i.end+jc(e,t.mediaIndex+1,s),this.discontinuities[r]={time:l,accuracy:o}}}}}]),Eh);function Eh(){Tc(this,Eh);var t=Cc(this,(Eh.__proto__||Object.getPrototypeOf(Eh)).call(this));return t.inspectCache_=void 0,t.timelines=[],t.discontinuities=[],t.datetimeToDisplayTime=null,t.logger_=Ju("SyncController"),t}function Dh(t,e){t.abort(),t.pause(),e&&e.activePlaylistLoader&&(e.activePlaylistLoader.pause(),e.activePlaylistLoader=null)}function Ah(t,e){(e.activePlaylistLoader=t).load()}function Ih(e,i){return function(t){return t.attributes[e]===i}}function Oh(e){return function(t){return t.resolvedUri===e}}function Ph(e){["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach(function(t){Rh[t](t,e)});var i=e.mediaTypes,t=e.masterPlaylistLoader,n=e.tech,s=e.hls;["AUDIO","SUBTITLES"].forEach(function(t){i[t].activeGroup=function(r,a){return function(e){var t=a.masterPlaylistLoader,i=a.mediaTypes[r].groups,n=t.media();if(!n)return null;var s=null;return n.attributes[r]&&(s=i[n.attributes[r]]),s=s||i.main,void 0===e?s:null===e?null:s.filter(function(t){return t.id===e.id})[0]||null}}(t,e),i[t].activeTrack=Uh[t](t,e),i[t].onGroupChanged=function(o,l){return function(){var t=l.segmentLoaders,e=t[o],i=t.main,n=l.mediaTypes[o],s=n.activeTrack(),r=n.activeGroup(s),a=n.activePlaylistLoader;Dh(e,n),r&&(r.playlistLoader?(e.resyncLoader(),Ah(r.playlistLoader,n)):a&&i.resetEverything())}}(t,e),i[t].onTrackChanged=function(o,l){return function(){var t=l.segmentLoaders,e=t[o],i=t.main,n=l.mediaTypes[o],s=n.activeTrack(),r=n.activeGroup(s),a=n.activePlaylistLoader;Dh(e,n),r&&(r.playlistLoader?(a!==r.playlistLoader&&(e.track&&e.track(s),e.resetEverything()),Ah(r.playlistLoader,n)):i.resetEverything())}}(t,e)});var r=i.AUDIO.activeGroup(),a=(r.filter(function(t){return t.default})[0]||r[0]).id;function o(){i.AUDIO.onTrackChanged(),n.trigger({type:"usage",name:"hls-audio-change"})}for(var l in i.AUDIO.tracks[a].enabled=!0,i.AUDIO.onTrackChanged(),t.on("mediachange",function(){["AUDIO","SUBTITLES"].forEach(function(t){return i[t].onGroupChanged()})}),n.audioTracks().addEventListener("change",o),n.remoteTextTracks().addEventListener("change",i.SUBTITLES.onTrackChanged),s.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[l])}var Lh=new Cu("./decrypter-worker.worker.js",function(t,e){var i,u,g,n,s,l,a,r=this;i=function(t,e,i){return e&&o(t.prototype,e),i&&o(t,i),t},u=null,d.prototype.decrypt=function(t,e,i,n,s,r){var a=this._key[1],o=t^a[0],l=n^a[1],c=i^a[2],u=e^a[3],h=void 0,d=void 0,p=void 0,f=a.length/4-2,m=void 0,g=4,v=this._tables[1],y=v[0],_=v[1],b=v[2],T=v[3],w=v[4];for(m=0;m<f;m++)h=y[o>>>24]^_[l>>16&255]^b[c>>8&255]^T[255&u]^a[g],d=y[l>>>24]^_[c>>16&255]^b[u>>8&255]^T[255&o]^a[g+1],p=y[c>>>24]^_[u>>16&255]^b[o>>8&255]^T[255&l]^a[g+2],u=y[u>>>24]^_[o>>16&255]^b[l>>8&255]^T[255&c]^a[g+3],g+=4,o=h,l=d,c=p;for(m=0;m<4;m++)s[(3&-m)+r]=w[o>>>24]<<24^w[l>>16&255]<<16^w[c>>8&255]<<8^w[255&u]^a[g++],h=o,o=l,l=c,c=u,u=h},g=d,c.prototype.on=function(t,e){this.listeners[t]||(this.listeners[t]=[]),this.listeners[t].push(e)},c.prototype.off=function(t,e){if(!this.listeners[t])return!1;var i=this.listeners[t].indexOf(e);return this.listeners[t].splice(i,1),-1<i},c.prototype.trigger=function(t,e){var i=this.listeners[t];if(i)if(2===arguments.length)for(var n=i.length,s=0;s<n;++s)i[s].call(this,e);else for(var r=Array.prototype.slice.call(arguments,1),a=i.length,o=0;o<a;++o)i[o].apply(this,r)},c.prototype.dispose=function(){this.listeners={}},c.prototype.pipe=function(e){this.on("data",function(t){e.push(t)})},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(p,s=n=c),p.prototype.processJob_=function(){this.jobs.shift()(),this.jobs.length?this.timeout_=setTimeout(this.processJob_.bind(this),this.delay):this.timeout_=null},p.prototype.push=function(t){this.jobs.push(t),this.timeout_||(this.timeout_=setTimeout(this.processJob_.bind(this),this.delay))},l=p,f.prototype.decryptChunk_=function(e,i,n,s){return function(){var t=function(t,e,i){var n=new Int32Array(t.buffer,t.byteOffset,t.byteLength>>2),s=new g(Array.prototype.slice.call(e)),r=new Uint8Array(t.byteLength),a=new Int32Array(r.buffer),o=void 0,l=void 0,c=void 0,u=void 0,h=void 0,d=void 0,p=void 0,f=void 0,m=void 0;for(o=i[0],l=i[1],c=i[2],u=i[3],m=0;m<n.length;m+=4)h=v(n[m]),d=v(n[m+1]),p=v(n[m+2]),f=v(n[m+3]),s.decrypt(h,d,p,f,a,m),a[m]=v(a[m]^o),a[m+1]=v(a[m+1]^l),a[m+2]=v(a[m+2]^c),a[m+3]=v(a[m+3]^u),o=h,l=d,c=p,u=f;return r}(e,i,n);s.set(t,e.byteOffset)}},i(f,null,[{key:"STEP",get:function(){return 32e3}}]),a=f,new function(r){r.onmessage=function(t){var i=t.data,e=new Uint8Array(i.encrypted.bytes,i.encrypted.byteOffset,i.encrypted.byteLength),n=new Uint32Array(i.key.bytes,i.key.byteOffset,i.key.byteLength/4),s=new Uint32Array(i.iv.bytes,i.iv.byteOffset,i.iv.byteLength/4);new a(e,n,s,function(t,e){r.postMessage(function(i){var n={};return Object.keys(i).forEach(function(t){var e=i[t];ArrayBuffer.isView(e)?n[t]={bytes:e.buffer,byteOffset:e.byteOffset,byteLength:e.byteLength}:n[t]=e}),n}({source:i.source,decrypted:e}),[e.buffer])})}}(r);function h(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function d(t){h(this,d),u=u||function(){var t=[[[],[],[],[],[]],[[],[],[],[],[]]],e=t[0],i=t[1],n=e[4],s=i[4],r=void 0,a=void 0,o=void 0,l=[],c=[],u=void 0,h=void 0,d=void 0,p=void 0,f=void 0;for(r=0;r<256;r++)c[(l[r]=r<<1^283*(r>>7))^r]=r;for(a=o=0;!n[a];a^=u||1,o=c[o]||1)for(d=(d=o^o<<1^o<<2^o<<3^o<<4)>>8^255&d^99,f=16843009*l[h=l[u=l[s[n[a]=d]=a]]]^65537*h^257*u^16843008*a,p=257*l[d]^16843008*d,r=0;r<4;r++)e[r][a]=p=p<<24^p>>>8,i[r][d]=f=f<<24^f>>>8;for(r=0;r<5;r++)e[r]=e[r].slice(0),i[r]=i[r].slice(0);return t}(),this._tables=[[u[0][0].slice(),u[0][1].slice(),u[0][2].slice(),u[0][3].slice(),u[0][4].slice()],[u[1][0].slice(),u[1][1].slice(),u[1][2].slice(),u[1][3].slice(),u[1][4].slice()]];var e=void 0,i=void 0,n=void 0,s=void 0,r=void 0,a=this._tables[0][4],o=this._tables[1],l=t.length,c=1;if(4!==l&&6!==l&&8!==l)throw new Error("Invalid aes key size");for(s=t.slice(0),r=[],this._key=[s,r],e=l;e<4*l+28;e++)n=s[e-1],(e%l==0||8===l&&e%l==4)&&(n=a[n>>>24]<<24^a[n>>16&255]<<16^a[n>>8&255]<<8^a[255&n],e%l==0&&(n=n<<8^n>>>24^c<<24,c=c<<1^283*(c>>7))),s[e]=s[e-l]^n;for(i=0;e;i++,e--)n=s[3&i?e:e-4],r[i]=e<=4||i<4?n:o[0][a[n>>>24]]^o[1][a[n>>16&255]]^o[2][a[n>>8&255]]^o[3][a[255&n]]}function c(){h(this,c),this.listeners={}}function p(){h(this,p);var t=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,s.call(this,n));return t.jobs=[],t.delay=1,t.timeout_=null,t}function v(t){return t<<24|(65280&t)<<8|(16711680&t)>>8|t>>>24}function f(t,e,i,n){h(this,f);var s=f.STEP,r=new Int32Array(t.buffer),a=new Uint8Array(t.byteLength),o=0;for(this.asyncStream_=new l,this.asyncStream_.push(this.decryptChunk_(r.subarray(o,o+s),e,i,a)),o=s;o<r.length;o+=s)i=new Uint32Array([v(r[o-4]),v(r[o-3]),v(r[o-2]),v(r[o-1])]),this.asyncStream_.push(this.decryptChunk_(r.subarray(o,o+s),e,i,a));this.asyncStream_.push(function(){n(null,function(t){return t.subarray(0,t.byteLength-t[t.byteLength-1])}(a))})}}),Mh={AUDIO:function(l,c){return function(){var t=c.segmentLoaders[l],e=c.mediaTypes[l],i=c.blacklistCurrentPlaylist;Dh(t,e);var n=e.activeTrack(),s=e.activeGroup(),r=(s.filter(function(t){return t.default})[0]||s[0]).id,a=e.tracks[r];if(n!==a){for(var o in ur.log.warn("Problem encountered loading the alternate audio track.Switching back to default."),e.tracks)e.tracks[o].enabled=e.tracks[o]===a;e.onTrackChanged()}else i({message:"Problem encountered loading the default audio track."})}},SUBTITLES:function(n,s){return function(){var t=s.segmentLoaders[n],e=s.mediaTypes[n];ur.log.warn("Problem encountered loading the subtitle track.Disabling subtitle track."),Dh(t,e);var i=e.activeTrack();i&&(i.mode="disabled"),e.onTrackChanged()}}},Nh={AUDIO:function(t,e,i){if(e){var n=i.tech,s=i.requestOptions,r=i.segmentLoaders[t];e.on("loadedmetadata",function(){var t=e.media();r.playlist(t,s),(!n.paused()||t.endList&&"none"!==n.preload())&&r.load()}),e.on("loadedplaylist",function(){r.playlist(e.media(),s),n.paused()||r.load()}),e.on("error",Mh[t](t,i))}},SUBTITLES:function(t,e,i){var n=i.tech,s=i.requestOptions,r=i.segmentLoaders[t],a=i.mediaTypes[t];e.on("loadedmetadata",function(){var t=e.media();r.playlist(t,s),r.track(a.activeTrack()),(!n.paused()||t.endList&&"none"!==n.preload())&&r.load()}),e.on("loadedplaylist",function(){r.playlist(e.media(),s),n.paused()||r.load()}),e.on("error",Mh[t](t,i))}},Rh={AUDIO:function(t,e){var i,n,s=e.hls,r=e.sourceType,a=e.segmentLoaders[t],o=e.requestOptions.withCredentials,l=e.master,c=l.mediaGroups,u=l.playlists,h=e.mediaTypes[t],d=h.groups,p=h.tracks,f=e.masterPlaylistLoader;for(var m in c[t]&&0!==Object.keys(c[t]).length||(c[t]={main:{default:{default:!0}}}),c[t]){d[m]||(d[m]=[]);var g=u.filter(Ih(t,m));for(var v in c[t][m]){var y=c[t][m][v];g.filter(Oh(y.resolvedUri)).length&&delete y.resolvedUri;var _=void 0;if(_=y.resolvedUri?new Mc(y.resolvedUri,s,o):y.playlists&&"dash"===r?new Ku(y.playlists[0],s,o,f):null,y=ur.mergeOptions({id:v,playlistLoader:_},y),Nh[t](t,y.playlistLoader,e),d[m].push(y),void 0===p[v]){var b=new ur.AudioTrack({id:v,kind:(i=y,n=void 0,n=i.default?"main":"alternative",i.characteristics&&0<=i.characteristics.indexOf("public.accessibility.describes-video")&&(n="main-desc"),n),enabled:!1,language:y.language,default:y.default,label:v});p[v]=b}}}a.on("error",Mh[t](t,e))},SUBTITLES:function(t,e){var i=e.tech,n=e.hls,s=e.sourceType,r=e.segmentLoaders[t],a=e.requestOptions.withCredentials,o=e.master.mediaGroups,l=e.mediaTypes[t],c=l.groups,u=l.tracks,h=e.masterPlaylistLoader;for(var d in o[t])for(var p in c[d]||(c[d]=[]),o[t][d])if(!o[t][d][p].forced){var f=o[t][d][p],m=void 0;if("hls"===s?m=new Mc(f.resolvedUri,n,a):"dash"===s&&(m=new Ku(f.playlists[0],n,a,h)),f=ur.mergeOptions({id:p,playlistLoader:m},f),Nh[t](t,f.playlistLoader,e),c[d].push(f),void 0===u[p]){var g=i.addRemoteTextTrack({id:p,kind:"subtitles",default:f.default&&f.autoselect,language:f.language,label:p},!1).track;u[p]=g}}r.on("error",Mh[t](t,e))},"CLOSED-CAPTIONS":function(t,e){var i=e.tech,n=e.master.mediaGroups,s=e.mediaTypes[t],r=s.groups,a=s.tracks;for(var o in n[t])for(var l in r[o]||(r[o]=[]),n[t][o]){var c=n[t][o][l];if(c.instreamId.match(/CC\d/)&&(r[o].push(ur.mergeOptions({id:l},c)),void 0===a[l])){var u=i.addRemoteTextTrack({id:c.instreamId,kind:"captions",default:c.default&&c.autoselect,language:c.language,label:l},!1).track;a[l]=u}}}},Uh={AUDIO:function(i,n){return function(){var t=n.mediaTypes[i].tracks;for(var e in t)if(t[e].enabled)return t[e];return null}},SUBTITLES:function(i,n){return function(){var t=n.mediaTypes[i].tracks;for(var e in t)if("showing"===t[e].mode)return t[e];return null}}},jh=void 0,Bh=["mediaRequests","mediaRequestsAborted","mediaRequestsTimedout","mediaRequestsErrored","mediaTransferDuration","mediaBytesTransferred"],Hh=(Sc(Fh,ur.EventTarget),wc(Fh,[{key:"setupMasterPlaylistLoaderListeners_",value:function(){var n=this;this.masterPlaylistLoader_.on("loadedmetadata",function(){var t=n.masterPlaylistLoader_.media(),e=1.5*n.masterPlaylistLoader_.targetDuration*1e3;Yc(n.masterPlaylistLoader_.master,n.masterPlaylistLoader_.media())?n.requestOptions_.timeout=0:n.requestOptions_.timeout=e,t.endList&&"none"!==n.tech_.preload()&&(n.mainSegmentLoader_.playlist(t,n.requestOptions_),n.mainSegmentLoader_.load()),Ph({sourceType:n.sourceType_,segmentLoaders:{AUDIO:n.audioSegmentLoader_,SUBTITLES:n.subtitleSegmentLoader_,main:n.mainSegmentLoader_},tech:n.tech_,requestOptions:n.requestOptions_,masterPlaylistLoader:n.masterPlaylistLoader_,hls:n.hls_,master:n.master(),mediaTypes:n.mediaTypes_,blacklistCurrentPlaylist:n.blacklistCurrentPlaylist.bind(n)}),n.triggerPresenceUsage_(n.master(),t);try{n.setupSourceBuffers_()}catch(t){return ur.log.warn("Failed to create SourceBuffers",t),n.mediaSource.endOfStream("decode")}n.setupFirstPlay(),n.trigger("selectedinitialmedia")}),this.masterPlaylistLoader_.on("loadedplaylist",function(){var t=n.masterPlaylistLoader_.media();if(!t){n.excludeUnsupportedVariants_();var e=void 0;return n.enableLowInitialPlaylist&&(e=n.selectInitialPlaylist()),e=e||n.selectPlaylist(),n.initialMedia_=e,void n.masterPlaylistLoader_.media(n.initialMedia_)}if(n.useCueTags_&&n.updateAdCues_(t),n.mainSegmentLoader_.playlist(t,n.requestOptions_),n.updateDuration(),n.tech_.paused()||(n.mainSegmentLoader_.load(),n.audioSegmentLoader_&&n.audioSegmentLoader_.load()),!t.endList){function i(){var t=n.seekable();0!==t.length&&n.mediaSource.addSeekableRange_(t.start(0),t.end(0))}n.duration()!==1/0?n.tech_.one("durationchange",function t(){n.duration()===1/0?i():n.tech_.one("durationchange",t)}):i()}}),this.masterPlaylistLoader_.on("error",function(){n.blacklistCurrentPlaylist(n.masterPlaylistLoader_.error)}),this.masterPlaylistLoader_.on("mediachanging",function(){n.mainSegmentLoader_.abort(),n.mainSegmentLoader_.pause()}),this.masterPlaylistLoader_.on("mediachange",function(){var t=n.masterPlaylistLoader_.media(),e=1.5*n.masterPlaylistLoader_.targetDuration*1e3;Yc(n.masterPlaylistLoader_.master,n.masterPlaylistLoader_.media())?n.requestOptions_.timeout=0:n.requestOptions_.timeout=e,n.mainSegmentLoader_.playlist(t,n.requestOptions_),n.mainSegmentLoader_.load(),n.tech_.trigger({type:"mediachange",bubbles:!0})}),this.masterPlaylistLoader_.on("playlistunchanged",function(){var t=n.masterPlaylistLoader_.media();n.stuckAtPlaylistEnd_(t)&&(n.blacklistCurrentPlaylist({message:"Playlist no longer updating."}),n.tech_.trigger("playliststuck"))}),this.masterPlaylistLoader_.on("renditiondisabled",function(){n.tech_.trigger({type:"usage",name:"hls-rendition-disabled"})}),this.masterPlaylistLoader_.on("renditionenabled",function(){n.tech_.trigger({type:"usage",name:"hls-rendition-enabled"})})}},{key:"triggerPresenceUsage_",value:function(t,e){var i=t.mediaGroups||{},n=!0,s=Object.keys(i.AUDIO);for(var r in i.AUDIO)for(var a in i.AUDIO[r])i.AUDIO[r][a].uri||(n=!1);n&&this.tech_.trigger({type:"usage",name:"hls-demuxed"}),Object.keys(i.SUBTITLES).length&&this.tech_.trigger({type:"usage",name:"hls-webvtt"}),jh.Playlist.isAes(e)&&this.tech_.trigger({type:"usage",name:"hls-aes"}),jh.Playlist.isFmp4(e)&&this.tech_.trigger({type:"usage",name:"hls-fmp4"}),s.length&&1<Object.keys(i.AUDIO[s[0]]).length&&this.tech_.trigger({type:"usage",name:"hls-alternate-audio"}),this.useCueTags_&&this.tech_.trigger({type:"usage",name:"hls-playlist-cue-tags"})}},{key:"setupSegmentLoaderListeners_",value:function(){var r=this;this.mainSegmentLoader_.on("bandwidthupdate",function(){var t=r.selectPlaylist(),e=r.masterPlaylistLoader_.media(),i=r.tech_.buffered(),n=i.length?i.end(i.length-1)-r.tech_.currentTime():0,s=r.bufferLowWaterLine();(!e.endList||r.duration()<ph.MAX_BUFFER_LOW_WATER_LINE||t.attributes.BANDWIDTH<e.attributes.BANDWIDTH||s<=n)&&r.masterPlaylistLoader_.media(t),r.tech_.trigger("bandwidthupdate")}),this.mainSegmentLoader_.on("progress",function(){r.trigger("progress")}),this.mainSegmentLoader_.on("error",function(){r.blacklistCurrentPlaylist(r.mainSegmentLoader_.error())}),this.mainSegmentLoader_.on("syncinfoupdate",function(){r.onSyncInfoUpdate_()}),this.mainSegmentLoader_.on("timestampoffset",function(){r.tech_.trigger({type:"usage",name:"hls-timestamp-offset"})}),this.audioSegmentLoader_.on("syncinfoupdate",function(){r.onSyncInfoUpdate_()}),this.mainSegmentLoader_.on("ended",function(){r.onEndOfStream()}),this.mainSegmentLoader_.on("earlyabort",function(){r.blacklistCurrentPlaylist({message:"Aborted early because there isn't enough bandwidth to complete the request without rebuffering."},120)}),this.mainSegmentLoader_.on("reseteverything",function(){r.tech_.trigger("hls-reset")}),this.mainSegmentLoader_.on("segmenttimemapping",function(t){r.tech_.trigger({type:"hls-segment-time-mapping",mapping:t.mapping})}),this.audioSegmentLoader_.on("ended",function(){r.onEndOfStream()})}},{key:"mediaSecondsLoaded_",value:function(){return Math.max(this.audioSegmentLoader_.mediaSecondsLoaded+this.mainSegmentLoader_.mediaSecondsLoaded)}},{key:"load",value:function(){this.mainSegmentLoader_.load(),this.mediaTypes_.AUDIO.activePlaylistLoader&&this.audioSegmentLoader_.load(),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&this.subtitleSegmentLoader_.load()}},{key:"smoothQualityChange_",value:function(){var t=this.selectPlaylist();t!==this.masterPlaylistLoader_.media()&&(this.masterPlaylistLoader_.media(t),this.mainSegmentLoader_.resetLoader())}},{key:"fastQualityChange_",value:function(){var t=this,e=this.selectPlaylist();e!==this.masterPlaylistLoader_.media()&&(this.masterPlaylistLoader_.media(e),this.mainSegmentLoader_.resetEverything(function(){ur.browser.IE_VERSION||ur.browser.IS_EDGE?t.tech_.setCurrentTime(t.tech_.currentTime()+.04):t.tech_.setCurrentTime(t.tech_.currentTime())}))}},{key:"play",value:function(){if(!this.setupFirstPlay()){this.tech_.ended()&&this.seekTo_(0),this.hasPlayed_()&&this.load();var t=this.tech_.seekable();return this.tech_.duration()===1/0&&this.tech_.currentTime()<t.start(0)?this.seekTo_(t.end(t.length-1)):void 0}}},{key:"setupFirstPlay",value:function(){var t=this,e=this.masterPlaylistLoader_.media();if(!e||this.tech_.paused()||this.hasPlayed_())return!1;if(!e.endList){var i=this.seekable();if(!i.length)return!1;if(ur.browser.IE_VERSION&&0===this.tech_.readyState())return this.tech_.one("loadedmetadata",function(){t.trigger("firstplay"),t.seekTo_(i.end(0)),t.hasPlayed_=function(){return!0}}),!1;this.trigger("firstplay"),this.seekTo_(i.end(0))}return this.hasPlayed_=function(){return!0},this.load(),!0}},{key:"handleSourceOpen_",value:function(){try{this.setupSourceBuffers_()}catch(t){return ur.log.warn("Failed to create Source Buffers",t),this.mediaSource.endOfStream("decode")}if(this.tech_.autoplay()){var t=this.tech_.play();void 0!==t&&"function"==typeof t.then&&t.then(null,function(t){})}this.trigger("sourceopen")}},{key:"onEndOfStream",value:function(){var t=this.mainSegmentLoader_.ended_;this.mediaTypes_.AUDIO.activePlaylistLoader&&(t=!this.mainSegmentLoader_.startingMedia_||this.mainSegmentLoader_.startingMedia_.containsVideo?t&&this.audioSegmentLoader_.ended_:this.audioSegmentLoader_.ended_),t&&this.mediaSource.endOfStream()}},{key:"stuckAtPlaylistEnd_",value:function(t){if(!this.seekable().length)return!1;var e=this.syncController_.getExpiredTime(t,this.mediaSource.duration);if(null===e)return!1;var i=jh.Playlist.playlistEnd(t,e),n=this.tech_.currentTime(),s=this.tech_.buffered();if(!s.length)return i-n<=.1;var r=s.end(s.length-1);return r-n<=.1&&i-r<=.1}},{key:"blacklistCurrentPlaylist",value:function(t,e){var i,n=0<arguments.length&&void 0!==t?t:{},s=e,r=void 0;if(r=n.playlist||this.masterPlaylistLoader_.media(),s=s||n.blacklistDuration||this.blacklistDuration,!r){this.error=n;try{return this.mediaSource.endOfStream("network")}catch(t){return this.trigger("error")}}var a=1===this.masterPlaylistLoader_.master.playlists.filter(qc).length;return a?(ur.log.warn("Problem encountered with the current HLS playlist. Trying again since it is the final playlist."),this.tech_.trigger("retryplaylist"),this.masterPlaylistLoader_.load(a)):(r.excludeUntil=Date.now()+1e3*s,this.tech_.trigger("blacklistplaylist"),this.tech_.trigger({type:"usage",name:"hls-rendition-blacklisted"}),i=this.selectPlaylist(),ur.log.warn("Problem encountered with the current HLS playlist."+(n.message?" "+n.message:"")+" Switching to another playlist."),this.masterPlaylistLoader_.media(i))}},{key:"pauseLoading",value:function(){this.mainSegmentLoader_.pause(),this.mediaTypes_.AUDIO.activePlaylistLoader&&this.audioSegmentLoader_.pause(),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&this.subtitleSegmentLoader_.pause()}},{key:"setCurrentTime",value:function(t){var e=ru(this.tech_.buffered(),t);return this.masterPlaylistLoader_&&this.masterPlaylistLoader_.media()&&this.masterPlaylistLoader_.media().segments?e&&e.length?t:(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}},{key:"duration",value:function(){return this.masterPlaylistLoader_?this.mediaSource?this.mediaSource.duration:jh.Playlist.duration(this.masterPlaylistLoader_.media()):0}},{key:"seekable",value:function(){return this.seekable_}},{key:"onSyncInfoUpdate_",value:function(){var t=void 0,e=void 0;if(this.masterPlaylistLoader_){var i=this.masterPlaylistLoader_.media();if(i){var n=this.syncController_.getExpiredTime(i,this.mediaSource.duration);if(null!==n&&0!==(t=jh.Playlist.seekable(i,n)).length){if(this.mediaTypes_.AUDIO.activePlaylistLoader){if(i=this.mediaTypes_.AUDIO.activePlaylistLoader.media(),null===(n=this.syncController_.getExpiredTime(i,this.mediaSource.duration)))return;if(0===(e=jh.Playlist.seekable(i,n)).length)return}e?e.start(0)>t.end(0)||t.start(0)>e.end(0)?this.seekable_=t:this.seekable_=ur.createTimeRanges([[e.start(0)>t.start(0)?e.start(0):t.start(0),e.end(0)<t.end(0)?e.end(0):t.end(0)]]):this.seekable_=t,this.logger_("seekable updated ["+ou(this.seekable_)+"]"),this.tech_.trigger("seekablechanged")}}}}},{key:"updateDuration",value:function(){function t(){e.mediaSource.duration=n,e.tech_.trigger("durationchange"),e.mediaSource.removeEventListener("sourceopen",t)}var e=this,i=this.mediaSource.duration,n=jh.Playlist.duration(this.masterPlaylistLoader_.media()),s=this.tech_.buffered();0<s.length&&(n=Math.max(n,s.end(s.length-1))),i!==n&&("open"!==this.mediaSource.readyState?this.mediaSource.addEventListener("sourceopen",t):t())}},{key:"dispose",value:function(){var n=this;this.decrypter_.terminate(),this.masterPlaylistLoader_.dispose(),this.mainSegmentLoader_.dispose(),["AUDIO","SUBTITLES"].forEach(function(t){var e=n.mediaTypes_[t].groups;for(var i in e)e[i].forEach(function(t){t.playlistLoader&&t.playlistLoader.dispose()})}),this.audioSegmentLoader_.dispose(),this.subtitleSegmentLoader_.dispose()}},{key:"master",value:function(){return this.masterPlaylistLoader_.master}},{key:"media",value:function(){return this.masterPlaylistLoader_.media()||this.initialMedia_}},{key:"setupSourceBuffers_",value:function(){var t,e=this.masterPlaylistLoader_.media();if(e&&"open"===this.mediaSource.readyState){if((t=Lu(this.masterPlaylistLoader_.master,e)).length<1)return this.error="No compatible SourceBuffer configuration for the variant stream:"+e.resolvedUri,this.mediaSource.endOfStream("decode");this.configureLoaderMimeTypes_(t),this.excludeIncompatibleVariants_(e)}}},{key:"configureLoaderMimeTypes_",value:function(t){var e=1<t.length&&-1===t[0].indexOf(",")&&t[0]!==t[1]?new ur.EventTarget:null;this.mainSegmentLoader_.mimeType(t[0],e),t[1]&&this.audioSegmentLoader_.mimeType(t[1],e)}},{key:"excludeUnsupportedVariants_",value:function(){this.master().playlists.forEach(function(t){t.attributes.CODECS&&y.MediaSource&&y.MediaSource.isTypeSupported&&!y.MediaSource.isTypeSupported('video/mp4; codecs="'+function(t){return t.replace(/avc1\.(\d+)\.(\d+)/i,function(t){return Iu([t])[0]})}(t.attributes.CODECS)+'"')&&(t.excludeUntil=1/0)})}},{key:"excludeIncompatibleVariants_",value:function(t){var i=2,n=null,e=void 0;t.attributes.CODECS&&(e=Ou(t.attributes.CODECS),n=e.videoCodec,i=e.codecCount),this.master().playlists.forEach(function(t){var e={codecCount:2,videoCodec:null};t.attributes.CODECS&&(e=Ou(t.attributes.CODECS)),e.codecCount!==i&&(t.excludeUntil=1/0),e.videoCodec!==n&&(t.excludeUntil=1/0)})}},{key:"updateAdCues_",value:function(t){var e=0,i=this.seekable();i.length&&(e=i.start(0)),function(t,e,i){var n=2<arguments.length&&void 0!==i?i:0;if(t.segments)for(var s=n,r=void 0,a=0;a<t.segments.length;a++){var o=t.segments[a];if(r=r||kh(e,s+o.duration/2)){if("cueIn"in o){r.endTime=s,r.adEndTime=s,s+=o.duration,r=null;continue}if(s<r.endTime){s+=o.duration;continue}r.endTime+=o.duration}else if("cueOut"in o&&((r=new y.VTTCue(s,s+o.duration,o.cueOut)).adStartTime=s,r.adEndTime=s+parseFloat(o.cueOut),e.addCue(r)),"cueOutCont"in o){var l,c,u=o.cueOutCont.split("/").map(parseFloat),h=Oc(u,2);l=h[0],c=h[1],(r=new y.VTTCue(s,s+o.duration,"")).adStartTime=s-l,r.adEndTime=r.adStartTime+c,e.addCue(r)}s+=o.duration}}(t,this.cueTagsTrack_,e)}},{key:"goalBufferLength",value:function(){var t=this.tech_.currentTime(),e=ph.GOAL_BUFFER_LENGTH,i=ph.GOAL_BUFFER_LENGTH_RATE,n=Math.max(e,ph.MAX_GOAL_BUFFER_LENGTH);return Math.min(e+t*i,n)}},{key:"bufferLowWaterLine",value:function(){var t=this.tech_.currentTime(),e=ph.BUFFER_LOW_WATER_LINE,i=ph.BUFFER_LOW_WATER_LINE_RATE,n=Math.max(e,ph.MAX_BUFFER_LOW_WATER_LINE);return Math.min(e+t*i,n)}}]),Fh);function Fh(t){Tc(this,Fh);var e=Cc(this,(Fh.__proto__||Object.getPrototypeOf(Fh)).call(this)),i=t.url,n=t.withCredentials,s=t.tech,r=t.bandwidth,a=t.externHls,o=t.useCueTags,l=t.blacklistDuration,c=t.enableLowInitialPlaylist,u=t.sourceType,h=t.seekTo;if(!i)throw new Error("A non-empty playlist URL is required");jh=a,e.withCredentials=n,e.tech_=s,e.hls_=s.hls,e.seekTo_=h,e.sourceType_=u,e.useCueTags_=o,e.blacklistDuration=l,e.enableLowInitialPlaylist=c,e.useCueTags_&&(e.cueTagsTrack_=e.tech_.addTextTrack("metadata","ad-cues"),e.cueTagsTrack_.inBandMetadataTrackDispatchType=""),e.requestOptions_={withCredentials:e.withCredentials,timeout:null},e.mediaTypes_=function(){var e={};return["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach(function(t){e[t]={groups:{},tracks:{},activePlaylistLoader:null,activeGroup:Zu,activeTrack:Zu,onGroupChanged:Zu,onTrackChanged:Zu}}),e}(),e.mediaSource=new ur.MediaSource,e.mediaSource.addEventListener("sourceopen",e.handleSourceOpen_.bind(e)),e.seekable_=ur.createTimeRanges(),e.hasPlayed_=function(){return!1},e.syncController_=new xh(t),e.segmentMetadataTrack_=s.addRemoteTextTrack({kind:"metadata",label:"segment-metadata"},!1).track,e.decrypter_=new Lh,e.inbandTextTracks_={};var d={hls:e.hls_,mediaSource:e.mediaSource,currentTime:e.tech_.currentTime.bind(e.tech_),seekable:function(){return e.seekable()},seeking:function(){return e.tech_.seeking()},duration:function(){return e.mediaSource.duration},hasPlayed:function(){return e.hasPlayed_()},goalBufferLength:function(){return e.goalBufferLength()},bandwidth:r,syncController:e.syncController_,decrypter:e.decrypter_,sourceType:e.sourceType_,inbandTextTracks:e.inbandTextTracks_};return e.masterPlaylistLoader_="dash"===e.sourceType_?new Ku(i,e.hls_,e.withCredentials):new Mc(i,e.hls_,e.withCredentials),e.setupMasterPlaylistLoaderListeners_(),e.mainSegmentLoader_=new vh(ur.mergeOptions(d,{segmentMetadataTrack:e.segmentMetadataTrack_,loaderType:"main"}),t),e.audioSegmentLoader_=new vh(ur.mergeOptions(d,{loaderType:"audio"}),t),e.subtitleSegmentLoader_=new Th(ur.mergeOptions(d,{loaderType:"vtt"}),t),e.setupSegmentLoaderListeners_(),Bh.forEach(function(t){e[t+"_"]=function(t){return this.audioSegmentLoader_[t]+this.mainSegmentLoader_[t]}.bind(e,t)}),e.logger_=Ju("MPC"),e.masterPlaylistLoader_.load(),e}function zh(t,e,i){Tc(this,zh);var n=t.masterPlaylistController_,s=n[(t.options_.smoothQualityChange?"smooth":"fast")+"QualityChange_"].bind(n);if(e.attributes.RESOLUTION){var r=e.attributes.RESOLUTION;this.width=r.width,this.height=r.height}this.bandwidth=e.attributes.BANDWIDTH,this.id=i,this.enabled=function(s,r,a){return function(t){var e=s.master.playlists[r],i=$c(e),n=qc(e);return void 0===t?n:(t?delete e.disabled:e.disabled=!0,t===n||i||(a(),t?s.trigger("renditionenabled"):s.trigger("renditiondisabled")),t)}}(t.playlists,e.uri,s)}var Wh=["seeking","seeked","pause","playing","error"],$h=(wc(qh,[{key:"monitorCurrentTime_",value:function(){this.checkCurrentTime_(),this.checkCurrentTimeTimeout_&&y.clearTimeout(this.checkCurrentTimeTimeout_),this.checkCurrentTimeTimeout_=y.setTimeout(this.monitorCurrentTime_.bind(this),250)}},{key:"checkCurrentTime_",value: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 t=this.tech_.currentTime(),e=this.tech_.buffered();if(this.lastRecordedTime===t&&(!e.length||t+.1>=e.end(e.length-1)))return this.techWaiting_();5<=this.consecutiveUpdates&&t===this.lastRecordedTime?(this.consecutiveUpdates++,this.waiting_()):t===this.lastRecordedTime?this.consecutiveUpdates++:(this.consecutiveUpdates=0,this.lastRecordedTime=t)}}},{key:"cancelTimer_",value:function(){this.consecutiveUpdates=0,this.timer_&&(this.logger_("cancelTimer_"),clearTimeout(this.timer_)),this.timer_=null}},{key:"fixesBadSeeks_",value:function(){var t=this.tech_.seeking(),e=this.seekable(),i=this.tech_.currentTime(),n=void 0;return t&&this.afterSeekableWindow_(e,i)&&(n=e.end(e.length-1)),t&&this.beforeSeekableWindow_(e,i)&&(n=e.start(0)+.1),void 0!==n&&(this.logger_("Trying to seek outside of seekable at time "+i+" with seekable range "+ou(e)+". Seeking to "+n+"."),this.seekTo(n),!0)}},{key:"waiting_",value:function(){if(!this.techWaiting_()){var t=this.tech_.currentTime(),e=this.tech_.buffered(),i=ru(e,t);return i.length&&t+3<=i.end(0)?(this.cancelTimer_(),this.seekTo(t),this.logger_("Stopped at "+t+" while inside a buffered region ["+i.start(0)+" -> "+i.end(0)+"]. Attempting to resume playback by seeking to the current time."),void this.tech_.trigger({type:"usage",name:"hls-unknown-waiting"})):void 0}}},{key:"techWaiting_",value:function(){var t=this.seekable(),e=this.tech_.currentTime();if(this.tech_.seeking()&&this.fixesBadSeeks_())return!0;if(this.tech_.seeking()||null!==this.timer_)return!0;if(this.beforeSeekableWindow_(t,e)){var i=t.end(t.length-1);return this.logger_("Fell out of live window at time "+e+". Seeking to live point (seekable end) "+i),this.cancelTimer_(),this.seekTo(i),this.tech_.trigger({type:"usage",name:"hls-live-resync"}),!0}var n=this.tech_.buffered(),s=au(n,e);if(this.videoUnderflow_(s,n,e))return this.cancelTimer_(),this.seekTo(e),this.tech_.trigger({type:"usage",name:"hls-video-underflow"}),!0;if(0<s.length){var r=s.start(0)-e;return this.logger_("Stopped at "+e+", setting timer for "+r+", seeking to "+s.start(0)),this.timer_=setTimeout(this.skipTheGap_.bind(this),1e3*r,e),!0}return!1}},{key:"afterSeekableWindow_",value:function(t,e){return!!t.length&&e>t.end(t.length-1)+.1}},{key:"beforeSeekableWindow_",value:function(t,e){return!!(t.length&&0<t.start(0)&&e<t.start(0)-.1)}},{key:"videoUnderflow_",value:function(t,e,i){if(0===t.length){var n=this.gapFromVideoUnderflow_(e,i);if(n)return this.logger_("Encountered a gap in video from "+n.start+" to "+n.end+". Seeking to current time "+i),!0}return!1}},{key:"skipTheGap_",value:function(t){var e=this.tech_.buffered(),i=this.tech_.currentTime(),n=au(e,i);this.cancelTimer_(),0!==n.length&&i===t&&(this.logger_("skipTheGap_:","currentTime:",i,"scheduled currentTime:",t,"nextRange start:",n.start(0)),this.seekTo(n.start(0)+1/30),this.tech_.trigger({type:"usage",name:"hls-gap-skip"}))}},{key:"gapFromVideoUnderflow_",value:function(t,e){for(var i=function(t){if(t.length<2)return ur.createTimeRanges();for(var e=[],i=1;i<t.length;i++){var n=t.end(i-1),s=t.start(i);e.push([n,s])}return ur.createTimeRanges(e)}(t),n=0;n<i.length;n++){var s=i.start(n),r=i.end(n);if(e-s<4&&2<e-s)return{start:s,end:r}}return null}}]),qh);function qh(t){var e=this;Tc(this,qh),this.tech_=t.tech,this.seekable=t.seekable,this.seekTo=t.seekTo,this.consecutiveUpdates=0,this.lastRecordedTime=null,this.timer_=null,this.checkCurrentTimeTimeout_=null,this.logger_=Ju("PlaybackWatcher"),this.logger_("initialize");function i(){return e.monitorCurrentTime_()}function n(){return e.techWaiting_()}function s(){return e.cancelTimer_()}function r(){return e.fixesBadSeeks_()}this.tech_.on("seekablechanged",r),this.tech_.on("waiting",n),this.tech_.on(Wh,s),this.tech_.on("canplay",i),this.dispose=function(){e.logger_("dispose"),e.tech_.off("seekablechanged",r),e.tech_.off("waiting",n),e.tech_.off(Wh,s),e.tech_.off("canplay",i),e.checkCurrentTimeTimeout_&&y.clearTimeout(e.checkCurrentTimeTimeout_),e.cancelTimer_()}}function Vh(e,t){var i=0,n=0,s=ur.mergeOptions(Gh,t);function r(){n&&e.currentTime(n)}function a(t){null!=t&&(n=e.duration()!==1/0&&e.currentTime()||0,e.one("loadedmetadata",r),e.src(t),e.trigger({type:"usage",name:"hls-error-reload"}),e.play())}function o(){if(Date.now()-i<1e3*s.errorInterval)e.trigger({type:"usage",name:"hls-error-reload-canceled"});else{if(s.getSource&&"function"==typeof s.getSource)return i=Date.now(),s.getSource.call(e,a);ur.log.error("ERROR: reloadSourceOnError - The option getSource must be a function!")}}function l(){e.off("loadedmetadata",r),e.off("error",o),e.off("dispose",l)}e.ready(function(){e.trigger({type:"usage",name:"hls-error-reload-initialized"})}),e.on("error",o),e.on("dispose",l),e.reloadSourceOnError=function(t){l(),Vh(e,t)}}function Yh(t){Vh(this,t)}var Gh={errorInterval:30,getSource:function(t){return t(this.tech({IWillNotUseThisInPlugins:!0}).currentSource_)}};ur.use("*",function(e){return{setSource:function(t,e){e(null,t)},setCurrentTime:function(t){return e.vhs&&e.currentSource().src===e.vhs.source_.src&&e.vhs.setCurrentTime(t),t},play:function(){e.vhs&&e.currentSource().src===e.vhs.source_.src&&e.vhs.setCurrentTime(e.currentTime())}}});var Xh={PlaylistLoader:Mc,Playlist:mu,Decrypter:yc,AsyncStream:fc,decrypt:vc,utils:yu,STANDARD_PLAYLIST_SELECTOR:function(){return function(t,e,i,n,s){var r=t.playlists.map(function(t){var e,i;return e=t.attributes.RESOLUTION&&t.attributes.RESOLUTION.width,i=t.attributes.RESOLUTION&&t.attributes.RESOLUTION.height,{bandwidth:t.attributes.BANDWIDTH||y.Number.MAX_VALUE,width:e,height:i,playlist:t}});ch(r,function(t,e){return t.bandwidth-e.bandwidth});var a=(r=r.filter(function(t){return!mu.isIncompatible(t.playlist)})).filter(function(t){return mu.isEnabled(t.playlist)});a.length||(a=r.filter(function(t){return!mu.isDisabled(t.playlist)}));var o=a.filter(function(t){return t.bandwidth*ph.BANDWIDTH_VARIANCE<e}),l=o[o.length-1],c=o.filter(function(t){return t.bandwidth===l.bandwidth})[0];if(!1===s){var u=c||a[0]||r[0];return u?u.playlist:null}var h=o.filter(function(t){return t.width&&t.height});ch(h,function(t,e){return t.width-e.width});var d=h.filter(function(t){return t.width===i&&t.height===n});l=d[d.length-1];var p=d.filter(function(t){return t.bandwidth===l.bandwidth})[0],f=void 0,m=void 0,g=void 0;p||(m=(f=h.filter(function(t){return t.width>i||t.height>n})).filter(function(t){return t.width===f[0].width&&t.height===f[0].height}),l=m[m.length-1],g=m.filter(function(t){return t.bandwidth===l.bandwidth})[0]);var v=g||p||c||a[0]||r[0];return v?v.playlist:null}(this.playlists.master,this.systemBandwidth,parseInt(lh(this.tech_.el(),"width"),10),parseInt(lh(this.tech_.el(),"height"),10),this.limitRenditionByPlayerDimensions)},INITIAL_PLAYLIST_SELECTOR:function(){var t=this.playlists.master.playlists.filter(mu.isEnabled);return ch(t,function(t,e){return uh(t,e)}),t.filter(function(t){return Ou(t.attributes.CODECS).videoCodec})[0]||null},comparePlaylistBandwidth:uh,comparePlaylistResolution:function(t,e){var i=void 0,n=void 0;return t.attributes.RESOLUTION&&t.attributes.RESOLUTION.width&&(i=t.attributes.RESOLUTION.width),i=i||y.Number.MAX_VALUE,e.attributes.RESOLUTION&&e.attributes.RESOLUTION.width&&(n=e.attributes.RESOLUTION.width),i===(n=n||y.Number.MAX_VALUE)&&t.attributes.BANDWIDTH&&e.attributes.BANDWIDTH?t.attributes.BANDWIDTH-e.attributes.BANDWIDTH:i-n},xhr:Gc()};["GOAL_BUFFER_LENGTH","MAX_GOAL_BUFFER_LENGTH","GOAL_BUFFER_LENGTH_RATE","BUFFER_LOW_WATER_LINE","MAX_BUFFER_LOW_WATER_LINE","BUFFER_LOW_WATER_LINE_RATE","BANDWIDTH_VARIANCE"].forEach(function(e){Object.defineProperty(Xh,e,{get:function(){return ur.log.warn("using Hls."+e+" is UNSAFE be sure you know what you are doing"),ph[e]},set:function(t){ur.log.warn("using Hls."+e+" is UNSAFE be sure you know what you are doing"),"number"!=typeof t||t<0?ur.log.warn("value of Hls."+e+" must be greater than or equal to 0"):ph[e]=t}})});function Kh(t){return/^(audio|video|application)\/(x-|vnd\.apple\.)?mpegurl/i.test(t)?"hls":/^application\/dash\+xml/i.test(t)?"dash":null}function Qh(t,e){for(var i=e.media(),n=-1,s=0;s<t.length;s++)if(t[s].id===i.uri){n=s;break}t.selectedIndex_=n,t.trigger({selectedIndex:n,type:"change"})}var Jh="videojs-vhs";Xh.canPlaySource=function(){return ur.log.warn("HLS is no longer a tech. Please remove it from your player's techOrder.")};function Zh(t){if("dash"===t.options_.sourceType){var e=ur.players[t.tech_.options_.playerId];if(e.eme){var i=function(t,e,i){if(!t)return t;var n={};for(var s in t)n[s]={audioContentType:'audio/mp4; codecs="'+i.attributes.CODECS+'"',videoContentType:'video/mp4; codecs="'+e.attributes.CODECS+'"'},e.contentProtection&&e.contentProtection[s]&&e.contentProtection[s].pssh&&(n[s].pssh=e.contentProtection[s].pssh),"string"==typeof t[s]&&(n[s].url=t[s]);return ur.mergeOptions(t,n)}(t.source_.keySystems,t.playlists.media(),t.masterPlaylistController_.mediaTypes_.AUDIO.activePlaylistLoader.media());i&&(e.currentSource().keySystems=i,e.eme.initializeMediaKeys&&e.eme.initializeMediaKeys())}}}function td(){if(!window.localStorage)return null;var t=window.localStorage.getItem(Jh);if(!t)return null;try{return JSON.parse(t)}catch(t){return null}}Xh.supportsNativeHls=function(){var e=d.createElement("video");if(!ur.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(t){return/maybe|probably/i.test(e.canPlayType(t))})}(),Xh.supportsNativeDash=!!ur.getTech("Html5").isSupported()&&/maybe|probably/i.test(d.createElement("video").canPlayType("application/dash+xml")),Xh.supportsTypeNatively=function(t){return"hls"===t?Xh.supportsNativeHls:"dash"===t&&Xh.supportsNativeDash},Xh.isSupported=function(){return ur.log.warn("HLS is no longer a tech. Please remove it from your player's techOrder.")};var ed=ur.getComponent("Component"),id=(Sc(nd,ed),wc(nd,[{key:"setOptions_",value:function(){var e=this;if(this.options_.withCredentials=this.options_.withCredentials||!1,this.options_.limitRenditionByPlayerDimensions=!1!==this.options_.limitRenditionByPlayerDimensions,this.options_.smoothQualityChange=this.options_.smoothQualityChange||!1,this.options_.useBandwidthFromLocalStorage=void 0!==this.source_.useBandwidthFromLocalStorage?this.source_.useBandwidthFromLocalStorage:this.options_.useBandwidthFromLocalStorage||!1,"number"!=typeof this.options_.blacklistDuration&&(this.options_.blacklistDuration=300),"number"!=typeof this.options_.bandwidth&&this.options_.useBandwidthFromLocalStorage){var t=td();t&&t.bandwidth&&(this.options_.bandwidth=t.bandwidth,this.tech_.trigger({type:"usage",name:"hls-bandwidth-from-local-storage"})),t&&t.throughput&&(this.options_.throughput=t.throughput,this.tech_.trigger({type:"usage",name:"hls-throughput-from-local-storage"}))}"number"!=typeof this.options_.bandwidth&&(this.options_.bandwidth=ph.INITIAL_BANDWIDTH),this.options_.enableLowInitialPlaylist=this.options_.enableLowInitialPlaylist&&this.options_.bandwidth===ph.INITIAL_BANDWIDTH,["withCredentials","limitRenditionByPlayerDimensions","bandwidth","smoothQualityChange"].forEach(function(t){void 0!==e.source_[t]&&(e.options_[t]=e.source_[t])}),this.limitRenditionByPlayerDimensions=this.options_.limitRenditionByPlayerDimensions}},{key:"src",value:function(t,e){var i=this;t&&(this.setOptions_(),this.options_.url=this.source_.src,this.options_.tech=this.tech_,this.options_.externHls=Xh,this.options_.sourceType=Kh(e),this.options_.seekTo=function(t){i.tech_.setCurrentTime(t),i.setCurrentTime(t)},this.masterPlaylistController_=new Hh(this.options_),this.playbackWatcher_=new $h(ur.mergeOptions(this.options_,{seekable:function(){return i.seekable()}})),this.masterPlaylistController_.on("error",function(){ur.players[i.tech_.options_.playerId].error(i.masterPlaylistController_.error)}),this.masterPlaylistController_.selectPlaylist=this.selectPlaylist?this.selectPlaylist.bind(this):Xh.STANDARD_PLAYLIST_SELECTOR.bind(this),this.masterPlaylistController_.selectInitialPlaylist=Xh.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(t){this.masterPlaylistController_.selectPlaylist=t.bind(this)}},throughput:{get:function(){return this.masterPlaylistController_.mainSegmentLoader_.throughput.rate},set:function(t){this.masterPlaylistController_.mainSegmentLoader_.throughput.rate=t,this.masterPlaylistController_.mainSegmentLoader_.throughput.count=1}},bandwidth:{get:function(){return this.masterPlaylistController_.mainSegmentLoader_.bandwidth},set:function(t){this.masterPlaylistController_.mainSegmentLoader_.bandwidth=t,this.masterPlaylistController_.mainSegmentLoader_.throughput={rate:0,count:0}}},systemBandwidth:{get:function(){var t=1/(this.bandwidth||1),e=void 0;return e=0<this.throughput?1/this.throughput:0,Math.floor(1/(t+e))},set:function(){ur.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 lu(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 lu(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(t){if(window.localStorage){var e=td();e=e?ur.mergeOptions(e,t):t;try{window.localStorage.setItem(Jh,JSON.stringify(e))}catch(t){return}}}({bandwidth:i.bandwidth,throughput:Math.round(i.throughput)})}),this.masterPlaylistController_.on("selectedinitialmedia",function(){!function(i){var t=i.playlists;i.representations=function(){return t.master.playlists.filter(function(t){return!$c(t)}).map(function(t,e){return new zh(i,t,t.uri)})}}(i),Zh(i)}),this.on(this.masterPlaylistController_,"progress",function(){this.tech_.trigger("progress")}),this.tech_.ready(function(){return i.setupQualityLevels_()}),this.tech_.el()&&this.tech_.src(ur.URL.createObjectURL(this.masterPlaylistController_.mediaSource)))}},{key:"setupQualityLevels_",value:function(){var t=this,e=ur.players[this.tech_.options_.playerId];e&&e.qualityLevels&&(this.qualityLevels_=e.qualityLevels(),this.masterPlaylistController_.on("selectedinitialmedia",function(){!function(e,t){t.representations().forEach(function(t){e.addQualityLevel(t)}),Qh(e,t.playlists)}(t.qualityLevels_,t)}),this.playlists.on("mediachange",function(){Qh(t.qualityLevels_,t.playlists)}))}},{key:"play",value:function(){this.masterPlaylistController_.play()}},{key:"setCurrentTime",value:function(t){this.masterPlaylistController_.setCurrentTime(t)}},{key:"duration",value:function(){return this.masterPlaylistController_.duration()}},{key:"seekable",value:function(){return this.masterPlaylistController_.seekable()}},{key:"dispose",value: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_.hls&&delete this.tech_.hls,function t(e,i,n){null===e&&(e=Function.prototype);var s=Object.getOwnPropertyDescriptor(e,i);if(void 0===s){var r=Object.getPrototypeOf(e);return null===r?void 0:t(r,i,n)}if("value"in s)return s.value;var a=s.get;return void 0!==a?a.call(n):void 0}(nd.prototype.__proto__||Object.getPrototypeOf(nd.prototype),"dispose",this).call(this)}},{key:"convertToStreamTime",value:function(t,e){return iu({playlist:this.masterPlaylistController_.media(),time:t,callback:e})}},{key:"seekToStreamTime",value:function(t,e,i,n){var s=!(2<arguments.length&&void 0!==i)||i,r=3<arguments.length&&void 0!==n?n:2;return nu({streamTime:t,playlist:this.masterPlaylistController_.media(),retryCount:r,pauseAfterSeek:s,seekTo:this.options_.seekTo,tech:this.options_.tech,callback:e})}}]),nd);function nd(t,e,i){Tc(this,nd);var n=Cc(this,(nd.__proto__||Object.getPrototypeOf(nd)).call(this,e,i.hls));if(e.options_&&e.options_.playerId){var s=ur(e.options_.playerId);s.hasOwnProperty("hls")||Object.defineProperty(s,"hls",{get:function(){return ur.log.warn("player.hls is deprecated. Use player.tech().hls instead."),e.trigger({type:"usage",name:"hls-player-access"}),n},configurable:!0}),s.vhs=n,(s.dash=n).player_=s}if(n.tech_=e,n.source_=t,n.stats={},n.setOptions_(),n.options_.overrideNative&&e.overrideNativeAudioTracks&&e.overrideNativeVideoTracks)e.overrideNativeAudioTracks(!0),e.overrideNativeVideoTracks(!0);else if(n.options_.overrideNative&&(e.featuresNativeVideoTracks||e.featuresNativeAudioTracks))throw new Error("Overriding native HLS requires emulated tracks. See https://git.io/vMpjB");return n.on(d,["fullscreenchange","webkitfullscreenchange","mozfullscreenchange","MSFullscreenChange"],function(t){var e=d.fullscreenElement||d.webkitFullscreenElement||d.mozFullScreenElement||d.msFullscreenElement;e&&e.contains(n.tech_.el())&&n.masterPlaylistController_.smoothQualityChange_()}),n.on(n.tech_,"seeking",function(){this.tech_.seeking()&&0===this.tech_.currentTime()&&this.tech_.player_.loop()&&this.setCurrentTime(0)}),n.on(n.tech_,"error",function(){this.masterPlaylistController_&&this.masterPlaylistController_.pauseLoading()}),n.on(n.tech_,"play",n.play),n}var sd={name:"videojs-http-streaming",VERSION:"1.5.1",canHandleSource:function(t,e){var i=ur.mergeOptions(ur.options,1<arguments.length&&void 0!==e?e:{});return sd.canPlayType(t.type,i)},handleSource:function(t,e,i){var n=ur.mergeOptions(ur.options,2<arguments.length&&void 0!==i?i:{});return e.hls=new id(t,e,n),e.hls.xhr=Gc(),e.hls.src(t.src,t.type),e.hls},canPlayType:function(t,e){var i=ur.mergeOptions(ur.options,1<arguments.length&&void 0!==e?e:{}).hls.overrideNative,n=Kh(t);return n&&(!Xh.supportsTypeNatively(n)||i)?"maybe":""}};return void 0!==ur.MediaSource&&void 0!==ur.URL||(ur.MediaSource=Vu,ur.URL=Yu),Vu.supportsNativeMediaSources()&&ur.getTech("Html5").registerSourceHandler(sd,0),ur.HlsHandler=id,ur.HlsSourceHandler=sd,ur.Hls=Xh,ur.use||ur.registerComponent("Hls",Xh),ur.options.hls=ur.options.hls||{},ur.registerPlugin?ur.registerPlugin("reloadSourceOnError",Yh):ur.plugin("reloadSourceOnError",Yh),ur},i.exports=e(n(21),n(22))}).call(t,n(1))},function(t,e){},function(t,e){},,,function(t,e,i){i(29),t.exports=i(2)}]);