(()=>{var e=[,(e,t,i)=>{"use strict";i.r(t),i.d(t,{Alert:()=>V,Button:()=>X,Carousel:()=>ue,Collapse:()=>be,Dropdown:()=>Fe,Modal:()=>mt,Offcanvas:()=>wt,Popover:()=>Gt,ScrollSpy:()=>ri,Tab:()=>ci,Toast:()=>vi,Tooltip:()=>Wt});var n=i(2),r=i(58);const s="transitionend",a=e=>{let t=e.getAttribute("data-bs-target");if(!t||"#"===t){let i=e.getAttribute("href");if(!i||!i.includes("#")&&!i.startsWith("."))return null;i.includes("#")&&!i.startsWith("#")&&(i=`#${i.split("#")[1]}`),t=i&&"#"!==i?i.trim():null}return t},o=e=>{const t=a(e);return t&&document.querySelector(t)?t:null},l=e=>{const t=a(e);return t?document.querySelector(t):null},u=e=>{e.dispatchEvent(new Event(s))},c=e=>!(!e||"object"!=typeof e)&&(void 0!==e.jquery&&(e=e[0]),void 0!==e.nodeType),d=e=>c(e)?e.jquery?e[0]:e:"string"==typeof e&&e.length>0?document.querySelector(e):null,h=(e,t,i)=>{Object.keys(i).forEach((n=>{const r=i[n],s=t[n],a=s&&c(s)?"element":null==(o=s)?`${o}`:{}.toString.call(o).match(/\s([a-z]+)/i)[1].toLowerCase();var o;if(!new RegExp(r).test(a))throw new TypeError(`${e.toUpperCase()}: Option "${n}" provided type "${a}" but expected type "${r}".`)}))},p=e=>!(!c(e)||0===e.getClientRects().length)&&"visible"===getComputedStyle(e).getPropertyValue("visibility"),f=e=>!e||e.nodeType!==Node.ELEMENT_NODE||(!!e.classList.contains("disabled")||(void 0!==e.disabled?e.disabled:e.hasAttribute("disabled")&&"false"!==e.getAttribute("disabled"))),m=e=>{if(!document.documentElement.attachShadow)return null;if("function"==typeof e.getRootNode){const t=e.getRootNode();return t instanceof ShadowRoot?t:null}return e instanceof ShadowRoot?e:e.parentNode?m(e.parentNode):null},g=()=>{},v=e=>{e.offsetHeight},y=()=>{const{jQuery:e}=window;return e&&!document.body.hasAttribute("data-bs-no-jquery")?e:null},_=[],b=()=>"rtl"===document.documentElement.dir,T=e=>{var t;t=()=>{const t=y();if(t){const i=e.NAME,n=t.fn[i];t.fn[i]=e.jQueryInterface,t.fn[i].Constructor=e,t.fn[i].noConflict=()=>(t.fn[i]=n,e.jQueryInterface)}},"loading"===document.readyState?(_.length||document.addEventListener("DOMContentLoaded",(()=>{_.forEach((e=>e()))})),_.push(t)):t()},w=e=>{"function"==typeof e&&e()},S=(e,t,i=!0)=>{if(!i)return void w(e);const n=(e=>{if(!e)return 0;let{transitionDuration:t,transitionDelay:i}=window.getComputedStyle(e);const n=Number.parseFloat(t),r=Number.parseFloat(i);return n||r?(t=t.split(",")[0],i=i.split(",")[0],1e3*(Number.parseFloat(t)+Number.parseFloat(i))):0})(t)+5;let r=!1;const a=({target:i})=>{i===t&&(r=!0,t.removeEventListener(s,a),w(e))};t.addEventListener(s,a),setTimeout((()=>{r||u(t)}),n)},k=(e,t,i,n)=>{let r=e.indexOf(t);if(-1===r)return e[!i&&n?e.length-1:0];const s=e.length;return r+=i?1:-1,n&&(r=(r+s)%s),e[Math.max(0,Math.min(r,s-1))]},E=/[^.]*(?=\..*)\.|.*/,C=/\..*/,x=/::\d+$/,A={};let P=1;const I={mouseenter:"mouseover",mouseleave:"mouseout"},O=/^(mouseenter|mouseleave)/i,L=new Set(["click","dblclick","mouseup","mousedown","contextmenu","mousewheel","DOMMouseScroll","mouseover","mouseout","mousemove","selectstart","selectend","keydown","keypress","keyup","orientationchange","touchstart","touchmove","touchend","touchcancel","pointerdown","pointermove","pointerup","pointerleave","pointercancel","gesturestart","gesturechange","gestureend","focus","blur","change","reset","select","submit","focusin","focusout","load","unload","beforeunload","resize","move","DOMContentLoaded","readystatechange","error","abort","scroll"]);function D(e,t){return t&&`${t}::${P++}`||e.uidEvent||P++}function M(e){const t=D(e);return e.uidEvent=t,A[t]=A[t]||{},A[t]}function N(e,t,i=null){const n=Object.keys(e);for(let r=0,s=n.length;r<s;r++){const s=e[n[r]];if(s.originalHandler===t&&s.delegationSelector===i)return s}return null}function R(e,t,i){const n="string"==typeof t,r=n?i:t;let s=j(e);return L.has(s)||(s=e),[n,r,s]}function U(e,t,i,n,r){if("string"!=typeof t||!e)return;if(i||(i=n,n=null),O.test(t)){const e=e=>function(t){if(!t.relatedTarget||t.relatedTarget!==t.delegateTarget&&!t.delegateTarget.contains(t.relatedTarget))return e.call(this,t)};n?n=e(n):i=e(i)}const[s,a,o]=R(t,i,n),l=M(e),u=l[o]||(l[o]={}),c=N(u,a,s?i:null);if(c)return void(c.oneOff=c.oneOff&&r);const d=D(a,t.replace(E,"")),h=s?function(e,t,i){return function n(r){const s=e.querySelectorAll(t);for(let{target:a}=r;a&&a!==this;a=a.parentNode)for(let o=s.length;o--;)if(s[o]===a)return r.delegateTarget=a,n.oneOff&&F.off(e,r.type,t,i),i.apply(a,[r]);return null}}(e,i,n):function(e,t){return function i(n){return n.delegateTarget=e,i.oneOff&&F.off(e,n.type,t),t.apply(e,[n])}}(e,i);h.delegationSelector=s?i:null,h.originalHandler=a,h.oneOff=r,h.uidEvent=d,u[d]=h,e.addEventListener(o,h,s)}function B(e,t,i,n,r){const s=N(t[i],n,r);s&&(e.removeEventListener(i,s,Boolean(r)),delete t[i][s.uidEvent])}function j(e){return e=e.replace(C,""),I[e]||e}const F={on(e,t,i,n){U(e,t,i,n,!1)},one(e,t,i,n){U(e,t,i,n,!0)},off(e,t,i,n){if("string"!=typeof t||!e)return;const[r,s,a]=R(t,i,n),o=a!==t,l=M(e),u=t.startsWith(".");if(void 0!==s){if(!l||!l[a])return;return void B(e,l,a,s,r?i:null)}u&&Object.keys(l).forEach((i=>{!function(e,t,i,n){const r=t[i]||{};Object.keys(r).forEach((s=>{if(s.includes(n)){const n=r[s];B(e,t,i,n.originalHandler,n.delegationSelector)}}))}(e,l,i,t.slice(1))}));const c=l[a]||{};Object.keys(c).forEach((i=>{const n=i.replace(x,"");if(!o||t.includes(n)){const t=c[i];B(e,l,a,t.originalHandler,t.delegationSelector)}}))},trigger(e,t,i){if("string"!=typeof t||!e)return null;const n=y(),r=j(t),s=t!==r,a=L.has(r);let o,l=!0,u=!0,c=!1,d=null;return s&&n&&(o=n.Event(t,i),n(e).trigger(o),l=!o.isPropagationStopped(),u=!o.isImmediatePropagationStopped(),c=o.isDefaultPrevented()),a?(d=document.createEvent("HTMLEvents"),d.initEvent(r,l,!0)):d=new CustomEvent(t,{bubbles:l,cancelable:!0}),void 0!==i&&Object.keys(i).forEach((e=>{Object.defineProperty(d,e,{get:()=>i[e]})})),c&&d.preventDefault(),u&&e.dispatchEvent(d),d.defaultPrevented&&void 0!==o&&o.preventDefault(),d}},H=new Map,q={set(e,t,i){H.has(e)||H.set(e,new Map);const n=H.get(e);n.has(t)||0===n.size?n.set(t,i):console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(n.keys())[0]}.`)},get:(e,t)=>H.has(e)&&H.get(e).get(t)||null,remove(e,t){if(!H.has(e))return;const i=H.get(e);i.delete(t),0===i.size&&H.delete(e)}};class z{constructor(e){(e=d(e))&&(this._element=e,q.set(this._element,this.constructor.DATA_KEY,this))}dispose(){q.remove(this._element,this.constructor.DATA_KEY),F.off(this._element,this.constructor.EVENT_KEY),Object.getOwnPropertyNames(this).forEach((e=>{this[e]=null}))}_queueCallback(e,t,i=!0){S(e,t,i)}static getInstance(e){return q.get(d(e),this.DATA_KEY)}static getOrCreateInstance(e,t={}){return this.getInstance(e)||new this(e,"object"==typeof t?t:null)}static get VERSION(){return"5.1.3"}static get NAME(){throw new Error('You have to implement the static method "NAME", for each component!')}static get DATA_KEY(){return`bs.${this.NAME}`}static get EVENT_KEY(){return`.${this.DATA_KEY}`}}const W=(e,t="hide")=>{const i=`click.dismiss${e.EVENT_KEY}`,n=e.NAME;F.on(document,i,`[data-bs-dismiss="${n}"]`,(function(i){if(["A","AREA"].includes(this.tagName)&&i.preventDefault(),f(this))return;const r=l(this)||this.closest(`.${n}`);e.getOrCreateInstance(r)[t]()}))};class V extends z{static get NAME(){return"alert"}close(){if(F.trigger(this._element,"close.bs.alert").defaultPrevented)return;this._element.classList.remove("show");const e=this._element.classList.contains("fade");this._queueCallback((()=>this._destroyElement()),this._element,e)}_destroyElement(){this._element.remove(),F.trigger(this._element,"closed.bs.alert"),this.dispose()}static jQueryInterface(e){return this.each((function(){const t=V.getOrCreateInstance(this);if("string"==typeof e){if(void 0===t[e]||e.startsWith("_")||"constructor"===e)throw new TypeError(`No method named "${e}"`);t[e](this)}}))}}W(V,"close"),T(V);const $='[data-bs-toggle="button"]';class X extends z{static get NAME(){return"button"}toggle(){this._element.setAttribute("aria-pressed",this._element.classList.toggle("active"))}static jQueryInterface(e){return this.each((function(){const t=X.getOrCreateInstance(this);"toggle"===e&&t[e]()}))}}function G(e){return"true"===e||"false"!==e&&(e===Number(e).toString()?Number(e):""===e||"null"===e?null:e)}function Y(e){return e.replace(/[A-Z]/g,(e=>`-${e.toLowerCase()}`))}F.on(document,"click.bs.button.data-api",$,(e=>{e.preventDefault();const t=e.target.closest($);X.getOrCreateInstance(t).toggle()})),T(X);const K={setDataAttribute(e,t,i){e.setAttribute(`data-bs-${Y(t)}`,i)},removeDataAttribute(e,t){e.removeAttribute(`data-bs-${Y(t)}`)},getDataAttributes(e){if(!e)return{};const t={};return Object.keys(e.dataset).filter((e=>e.startsWith("bs"))).forEach((i=>{let n=i.replace(/^bs/,"");n=n.charAt(0).toLowerCase()+n.slice(1,n.length),t[n]=G(e.dataset[i])})),t},getDataAttribute:(e,t)=>G(e.getAttribute(`data-bs-${Y(t)}`)),offset(e){const t=e.getBoundingClientRect();return{top:t.top+window.pageYOffset,left:t.left+window.pageXOffset}},position:e=>({top:e.offsetTop,left:e.offsetLeft})},Q={find:(e,t=document.documentElement)=>[].concat(...Element.prototype.querySelectorAll.call(t,e)),findOne:(e,t=document.documentElement)=>Element.prototype.querySelector.call(t,e),children:(e,t)=>[].concat(...e.children).filter((e=>e.matches(t))),parents(e,t){const i=[];let n=e.parentNode;for(;n&&n.nodeType===Node.ELEMENT_NODE&&3!==n.nodeType;)n.matches(t)&&i.push(n),n=n.parentNode;return i},prev(e,t){let i=e.previousElementSibling;for(;i;){if(i.matches(t))return[i];i=i.previousElementSibling}return[]},next(e,t){let i=e.nextElementSibling;for(;i;){if(i.matches(t))return[i];i=i.nextElementSibling}return[]},focusableChildren(e){const t=["a","button","input","textarea","select","details","[tabindex]",'[contenteditable="true"]'].map((e=>`${e}:not([tabindex^="-"])`)).join(", ");return this.find(t,e).filter((e=>!f(e)&&p(e)))}},J="carousel",Z={interval:5e3,keyboard:!0,slide:!1,pause:"hover",wrap:!0,touch:!0},ee={interval:"(number|boolean)",keyboard:"boolean",slide:"(boolean|string)",pause:"(string|boolean)",wrap:"boolean",touch:"boolean"},te="next",ie="prev",ne="left",re="right",se={ArrowLeft:re,ArrowRight:ne},ae="slid.bs.carousel",oe="active",le=".active.carousel-item";class ue extends z{constructor(e,t){super(e),this._items=null,this._interval=null,this._activeElement=null,this._isPaused=!1,this._isSliding=!1,this.touchTimeout=null,this.touchStartX=0,this.touchDeltaX=0,this._config=this._getConfig(t),this._indicatorsElement=Q.findOne(".carousel-indicators",this._element),this._touchSupported="ontouchstart" in document.documentElement||navigator.maxTouchPoints>0,this._pointerEvent=Boolean(window.PointerEvent),this._addEventListeners()}static get Default(){return Z}static get NAME(){return J}next(){this._slide(te)}nextWhenVisible(){!document.hidden&&p(this._element)&&this.next()}prev(){this._slide(ie)}pause(e){e||(this._isPaused=!0),Q.findOne(".carousel-item-next, .carousel-item-prev",this._element)&&(u(this._element),this.cycle(!0)),clearInterval(this._interval),this._interval=null}cycle(e){e||(this._isPaused=!1),this._interval&&(clearInterval(this._interval),this._interval=null),this._config&&this._config.interval&&!this._isPaused&&(this._updateInterval(),this._interval=setInterval((document.visibilityState?this.nextWhenVisible:this.next).bind(this),this._config.interval))}to(e){this._activeElement=Q.findOne(le,this._element);const t=this._getItemIndex(this._activeElement);if(e>this._items.length-1||e<0)return;if(this._isSliding)return void F.one(this._element,ae,(()=>this.to(e)));if(t===e)return this.pause(),void this.cycle();const i=e>t?te:ie;this._slide(i,this._items[e])}_getConfig(e){return e={...Z,...K.getDataAttributes(this._element),..."object"==typeof e?e:{}},h(J,e,ee),e}_handleSwipe(){const e=Math.abs(this.touchDeltaX);if(e<=40)return;const t=e/this.touchDeltaX;this.touchDeltaX=0,t&&this._slide(t>0?re:ne)}_addEventListeners(){this._config.keyboard&&F.on(this._element,"keydown.bs.carousel",(e=>this._keydown(e))),"hover"===this._config.pause&&(F.on(this._element,"mouseenter.bs.carousel",(e=>this.pause(e))),F.on(this._element,"mouseleave.bs.carousel",(e=>this.cycle(e)))),this._config.touch&&this._touchSupported&&this._addTouchEventListeners()}_addTouchEventListeners(){const e=e=>this._pointerEvent&&("pen"===e.pointerType||"touch"===e.pointerType),t=t=>{e(t)?this.touchStartX=t.clientX:this._pointerEvent||(this.touchStartX=t.touches[0].clientX)},i=e=>{this.touchDeltaX=e.touches&&e.touches.length>1?0:e.touches[0].clientX-this.touchStartX},n=t=>{e(t)&&(this.touchDeltaX=t.clientX-this.touchStartX),this._handleSwipe(),"hover"===this._config.pause&&(this.pause(),this.touchTimeout&&clearTimeout(this.touchTimeout),this.touchTimeout=setTimeout((e=>this.cycle(e)),500+this._config.interval))};Q.find(".carousel-item img",this._element).forEach((e=>{F.on(e,"dragstart.bs.carousel",(e=>e.preventDefault()))})),this._pointerEvent?(F.on(this._element,"pointerdown.bs.carousel",(e=>t(e))),F.on(this._element,"pointerup.bs.carousel",(e=>n(e))),this._element.classList.add("pointer-event")):(F.on(this._element,"touchstart.bs.carousel",(e=>t(e))),F.on(this._element,"touchmove.bs.carousel",(e=>i(e))),F.on(this._element,"touchend.bs.carousel",(e=>n(e))))}_keydown(e){if(/input|textarea/i.test(e.target.tagName))return;const t=se[e.key];t&&(e.preventDefault(),this._slide(t))}_getItemIndex(e){return this._items=e&&e.parentNode?Q.find(".carousel-item",e.parentNode):[],this._items.indexOf(e)}_getItemByOrder(e,t){const i=e===te;return k(this._items,t,i,this._config.wrap)}_triggerSlideEvent(e,t){const i=this._getItemIndex(e),n=this._getItemIndex(Q.findOne(le,this._element));return F.trigger(this._element,"slide.bs.carousel",{relatedTarget:e,direction:t,from:n,to:i})}_setActiveIndicatorElement(e){if(this._indicatorsElement){const t=Q.findOne(".active",this._indicatorsElement);t.classList.remove(oe),t.removeAttribute("aria-current");const i=Q.find("[data-bs-target]",this._indicatorsElement);for(let t=0;t<i.length;t++)if(Number.parseInt(i[t].getAttribute("data-bs-slide-to"),10)===this._getItemIndex(e)){i[t].classList.add(oe),i[t].setAttribute("aria-current","true");break}}}_updateInterval(){const e=this._activeElement||Q.findOne(le,this._element);if(!e)return;const t=Number.parseInt(e.getAttribute("data-bs-interval"),10);t?(this._config.defaultInterval=this._config.defaultInterval||this._config.interval,this._config.interval=t):this._config.interval=this._config.defaultInterval||this._config.interval}_slide(e,t){const i=this._directionToOrder(e),n=Q.findOne(le,this._element),r=this._getItemIndex(n),s=t||this._getItemByOrder(i,n),a=this._getItemIndex(s),o=Boolean(this._interval),l=i===te,u=l?"carousel-item-start":"carousel-item-end",c=l?"carousel-item-next":"carousel-item-prev",d=this._orderToDirection(i);if(s&&s.classList.contains(oe))return void(this._isSliding=!1);if(this._isSliding)return;if(this._triggerSlideEvent(s,d).defaultPrevented)return;if(!n||!s)return;this._isSliding=!0,o&&this.pause(),this._setActiveIndicatorElement(s),this._activeElement=s;const h=()=>{F.trigger(this._element,ae,{relatedTarget:s,direction:d,from:r,to:a})};if(this._element.classList.contains("slide")){s.classList.add(c),v(s),n.classList.add(u),s.classList.add(u);const e=()=>{s.classList.remove(u,c),s.classList.add(oe),n.classList.remove(oe,c,u),this._isSliding=!1,setTimeout(h,0)};this._queueCallback(e,n,!0)}else n.classList.remove(oe),s.classList.add(oe),this._isSliding=!1,h();o&&this.cycle()}_directionToOrder(e){return[re,ne].includes(e)?b()?e===ne?ie:te:e===ne?te:ie:e}_orderToDirection(e){return[te,ie].includes(e)?b()?e===ie?ne:re:e===ie?re:ne:e}static carouselInterface(e,t){const i=ue.getOrCreateInstance(e,t);let{_config:n}=i;"object"==typeof t&&(n={...n,...t});const r="string"==typeof t?t:n.slide;if("number"==typeof t)i.to(t);else if("string"==typeof r){if(void 0===i[r])throw new TypeError(`No method named "${r}"`);i[r]()}else n.interval&&n.ride&&(i.pause(),i.cycle())}static jQueryInterface(e){return this.each((function(){ue.carouselInterface(this,e)}))}static dataApiClickHandler(e){const t=l(this);if(!t||!t.classList.contains("carousel"))return;const i={...K.getDataAttributes(t),...K.getDataAttributes(this)},n=this.getAttribute("data-bs-slide-to");n&&(i.interval=!1),ue.carouselInterface(t,i),n&&ue.getInstance(t).to(n),e.preventDefault()}}F.on(document,"click.bs.carousel.data-api","[data-bs-slide], [data-bs-slide-to]",ue.dataApiClickHandler),F.on(window,"load.bs.carousel.data-api",(()=>{const e=Q.find('[data-bs-ride="carousel"]');for(let t=0,i=e.length;t<i;t++)ue.carouselInterface(e[t],ue.getInstance(e[t]))})),T(ue);const ce="collapse",de="bs.collapse",he={toggle:!0,parent:null},pe={toggle:"boolean",parent:"(null|element)"},fe="show",me="collapse",ge="collapsing",ve="collapsed",ye=":scope .collapse .collapse",_e='[data-bs-toggle="collapse"]';class be extends z{constructor(e,t){super(e),this._isTransitioning=!1,this._config=this._getConfig(t),this._triggerArray=[];const i=Q.find(_e);for(let e=0,t=i.length;e<t;e++){const t=i[e],n=o(t),r=Q.find(n).filter((e=>e===this._element));null!==n&&r.length&&(this._selector=n,this._triggerArray.push(t))}this._initializeChildren(),this._config.parent||this._addAriaAndCollapsedClass(this._triggerArray,this._isShown()),this._config.toggle&&this.toggle()}static get Default(){return he}static get NAME(){return ce}toggle(){this._isShown()?this.hide():this.show()}show(){if(this._isTransitioning||this._isShown())return;let e,t=[];if(this._config.parent){const e=Q.find(ye,this._config.parent);t=Q.find(".collapse.show, .collapse.collapsing",this._config.parent).filter((t=>!e.includes(t)))}const i=Q.findOne(this._selector);if(t.length){const n=t.find((e=>i!==e));if(e=n?be.getInstance(n):null,e&&e._isTransitioning)return}if(F.trigger(this._element,"show.bs.collapse").defaultPrevented)return;t.forEach((t=>{i!==t&&be.getOrCreateInstance(t,{toggle:!1}).hide(),e||q.set(t,de,null)}));const n=this._getDimension();this._element.classList.remove(me),this._element.classList.add(ge),this._element.style[n]=0,this._addAriaAndCollapsedClass(this._triggerArray,!0),this._isTransitioning=!0;const r=`scroll${n[0].toUpperCase()+n.slice(1)}`;this._queueCallback((()=>{this._isTransitioning=!1,this._element.classList.remove(ge),this._element.classList.add(me,fe),this._element.style[n]="",F.trigger(this._element,"shown.bs.collapse")}),this._element,!0),this._element.style[n]=`${this._element[r]}px`}hide(){if(this._isTransitioning||!this._isShown())return;if(F.trigger(this._element,"hide.bs.collapse").defaultPrevented)return;const e=this._getDimension();this._element.style[e]=`${this._element.getBoundingClientRect()[e]}px`,v(this._element),this._element.classList.add(ge),this._element.classList.remove(me,fe);const t=this._triggerArray.length;for(let e=0;e<t;e++){const t=this._triggerArray[e],i=l(t);i&&!this._isShown(i)&&this._addAriaAndCollapsedClass([t],!1)}this._isTransitioning=!0;this._element.style[e]="",this._queueCallback((()=>{this._isTransitioning=!1,this._element.classList.remove(ge),this._element.classList.add(me),F.trigger(this._element,"hidden.bs.collapse")}),this._element,!0)}_isShown(e=this._element){return e.classList.contains(fe)}_getConfig(e){return(e={...he,...K.getDataAttributes(this._element),...e}).toggle=Boolean(e.toggle),e.parent=d(e.parent),h(ce,e,pe),e}_getDimension(){return this._element.classList.contains("collapse-horizontal")?"width":"height"}_initializeChildren(){if(!this._config.parent)return;const e=Q.find(ye,this._config.parent);Q.find(_e,this._config.parent).filter((t=>!e.includes(t))).forEach((e=>{const t=l(e);t&&this._addAriaAndCollapsedClass([e],this._isShown(t))}))}_addAriaAndCollapsedClass(e,t){e.length&&e.forEach((e=>{t?e.classList.remove(ve):e.classList.add(ve),e.setAttribute("aria-expanded",t)}))}static jQueryInterface(e){return this.each((function(){const t={};"string"==typeof e&&/show|hide/.test(e)&&(t.toggle=!1);const i=be.getOrCreateInstance(this,t);if("string"==typeof e){if(void 0===i[e])throw new TypeError(`No method named "${e}"`);i[e]()}}))}}F.on(document,"click.bs.collapse.data-api",_e,(function(e){("A"===e.target.tagName||e.delegateTarget&&"A"===e.delegateTarget.tagName)&&e.preventDefault();const t=o(this);Q.find(t).forEach((e=>{be.getOrCreateInstance(e,{toggle:!1}).toggle()}))})),T(be);const Te="dropdown",we="Escape",Se="Space",ke="ArrowUp",Ee="ArrowDown",Ce=new RegExp("ArrowUp|ArrowDown|Escape"),xe="click.bs.dropdown.data-api",Ae="keydown.bs.dropdown.data-api",Pe="show",Ie='[data-bs-toggle="dropdown"]',Oe=".dropdown-menu",Le=b()?"top-end":"top-start",De=b()?"top-start":"top-end",Me=b()?"bottom-end":"bottom-start",Ne=b()?"bottom-start":"bottom-end",Re=b()?"left-start":"right-start",Ue=b()?"right-start":"left-start",Be={offset:[0,2],boundary:"clippingParents",reference:"toggle",display:"dynamic",popperConfig:null,autoClose:!0},je={offset:"(array|string|function)",boundary:"(string|element)",reference:"(string|element|object)",display:"string",popperConfig:"(null|object|function)",autoClose:"(boolean|string)"};class Fe extends z{constructor(e,t){super(e),this._popper=null,this._config=this._getConfig(t),this._menu=this._getMenuElement(),this._inNavbar=this._detectNavbar()}static get Default(){return Be}static get DefaultType(){return je}static get NAME(){return Te}toggle(){return this._isShown()?this.hide():this.show()}show(){if(f(this._element)||this._isShown(this._menu))return;const e={relatedTarget:this._element};if(F.trigger(this._element,"show.bs.dropdown",e).defaultPrevented)return;const t=Fe.getParentFromElement(this._element);this._inNavbar?K.setDataAttribute(this._menu,"popper","none"):this._createPopper(t),"ontouchstart" in document.documentElement&&!t.closest(".navbar-nav")&&[].concat(...document.body.children).forEach((e=>F.on(e,"mouseover",g))),this._element.focus(),this._element.setAttribute("aria-expanded",!0),this._menu.classList.add(Pe),this._element.classList.add(Pe),F.trigger(this._element,"shown.bs.dropdown",e)}hide(){if(f(this._element)||!this._isShown(this._menu))return;const e={relatedTarget:this._element};this._completeHide(e)}dispose(){this._popper&&this._popper.destroy(),super.dispose()}update(){this._inNavbar=this._detectNavbar(),this._popper&&this._popper.update()}_completeHide(e){F.trigger(this._element,"hide.bs.dropdown",e).defaultPrevented||("ontouchstart" in document.documentElement&&[].concat(...document.body.children).forEach((e=>F.off(e,"mouseover",g))),this._popper&&this._popper.destroy(),this._menu.classList.remove(Pe),this._element.classList.remove(Pe),this._element.setAttribute("aria-expanded","false"),K.removeDataAttribute(this._menu,"popper"),F.trigger(this._element,"hidden.bs.dropdown",e))}_getConfig(e){if(e={...this.constructor.Default,...K.getDataAttributes(this._element),...e},h(Te,e,this.constructor.DefaultType),"object"==typeof e.reference&&!c(e.reference)&&"function"!=typeof e.reference.getBoundingClientRect)throw new TypeError(`${Te.toUpperCase()}: Option "reference" provided type "object" without a required "getBoundingClientRect" method.`);return e}_createPopper(e){if(void 0===n)throw new TypeError("Bootstrap's dropdowns require Popper (https://popper.js.org)");let t=this._element;"parent"===this._config.reference?t=e:c(this._config.reference)?t=d(this._config.reference):"object"==typeof this._config.reference&&(t=this._config.reference);const i=this._getPopperConfig(),s=i.modifiers.find((e=>"applyStyles"===e.name&&!1===e.enabled));this._popper=r.createPopper(t,this._menu,i),s&&K.setDataAttribute(this._menu,"popper","static")}_isShown(e=this._element){return e.classList.contains(Pe)}_getMenuElement(){return Q.next(this._element,Oe)[0]}_getPlacement(){const e=this._element.parentNode;if(e.classList.contains("dropend"))return Re;if(e.classList.contains("dropstart"))return Ue;const t="end"===getComputedStyle(this._menu).getPropertyValue("--bs-position").trim();return e.classList.contains("dropup")?t?De:Le:t?Ne:Me}_detectNavbar(){return null!==this._element.closest(".navbar")}_getOffset(){const{offset:e}=this._config;return"string"==typeof e?e.split(",").map((e=>Number.parseInt(e,10))):"function"==typeof e?t=>e(t,this._element):e}_getPopperConfig(){const e={placement:this._getPlacement(),modifiers:[{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"offset",options:{offset:this._getOffset()}}]};return"static"===this._config.display&&(e.modifiers=[{name:"applyStyles",enabled:!1}]),{...e,..."function"==typeof this._config.popperConfig?this._config.popperConfig(e):this._config.popperConfig}}_selectMenuItem({key:e,target:t}){const i=Q.find(".dropdown-menu .dropdown-item:not(.disabled):not(:disabled)",this._menu).filter(p);i.length&&k(i,t,e===Ee,!i.includes(t)).focus()}static jQueryInterface(e){return this.each((function(){const t=Fe.getOrCreateInstance(this,e);if("string"==typeof e){if(void 0===t[e])throw new TypeError(`No method named "${e}"`);t[e]()}}))}static clearMenus(e){if(e&&(2===e.button||"keyup"===e.type&&"Tab"!==e.key))return;const t=Q.find(Ie);for(let i=0,n=t.length;i<n;i++){const n=Fe.getInstance(t[i]);if(!n||!1===n._config.autoClose)continue;if(!n._isShown())continue;const r={relatedTarget:n._element};if(e){const t=e.composedPath(),i=t.includes(n._menu);if(t.includes(n._element)||"inside"===n._config.autoClose&&!i||"outside"===n._config.autoClose&&i)continue;if(n._menu.contains(e.target)&&("keyup"===e.type&&"Tab"===e.key||/input|select|option|textarea|form/i.test(e.target.tagName)))continue;"click"===e.type&&(r.clickEvent=e)}n._completeHide(r)}}static getParentFromElement(e){return l(e)||e.parentNode}static dataApiKeydownHandler(e){if(/input|textarea/i.test(e.target.tagName)?e.key===Se||e.key!==we&&(e.key!==Ee&&e.key!==ke||e.target.closest(Oe)):!Ce.test(e.key))return;const t=this.classList.contains(Pe);if(!t&&e.key===we)return;if(e.preventDefault(),e.stopPropagation(),f(this))return;const i=this.matches(Ie)?this:Q.prev(this,Ie)[0],n=Fe.getOrCreateInstance(i);if(e.key!==we)return e.key===ke||e.key===Ee?(t||n.show(),void n._selectMenuItem(e)):void(t&&e.key!==Se||Fe.clearMenus());n.hide()}}F.on(document,Ae,Ie,Fe.dataApiKeydownHandler),F.on(document,Ae,Oe,Fe.dataApiKeydownHandler),F.on(document,xe,Fe.clearMenus),F.on(document,"keyup.bs.dropdown.data-api",Fe.clearMenus),F.on(document,xe,Ie,(function(e){e.preventDefault(),Fe.getOrCreateInstance(this).toggle()})),T(Fe);const He=".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",qe=".sticky-top";class ze{constructor(){this._element=document.body}getWidth(){const e=document.documentElement.clientWidth;return Math.abs(window.innerWidth-e)}hide(){const e=this.getWidth();this._disableOverFlow(),this._setElementAttributes(this._element,"paddingRight",(t=>t+e)),this._setElementAttributes(He,"paddingRight",(t=>t+e)),this._setElementAttributes(qe,"marginRight",(t=>t-e))}_disableOverFlow(){this._saveInitialAttribute(this._element,"overflow"),this._element.style.overflow="hidden"}_setElementAttributes(e,t,i){const n=this.getWidth();this._applyManipulationCallback(e,(e=>{if(e!==this._element&&window.innerWidth>e.clientWidth+n)return;this._saveInitialAttribute(e,t);const r=window.getComputedStyle(e)[t];e.style[t]=`${i(Number.parseFloat(r))}px`}))}reset(){this._resetElementAttributes(this._element,"overflow"),this._resetElementAttributes(this._element,"paddingRight"),this._resetElementAttributes(He,"paddingRight"),this._resetElementAttributes(qe,"marginRight")}_saveInitialAttribute(e,t){const i=e.style[t];i&&K.setDataAttribute(e,t,i)}_resetElementAttributes(e,t){this._applyManipulationCallback(e,(e=>{const i=K.getDataAttribute(e,t);void 0===i?e.style.removeProperty(t):(K.removeDataAttribute(e,t),e.style[t]=i)}))}_applyManipulationCallback(e,t){c(e)?t(e):Q.find(e,this._element).forEach(t)}isOverflowing(){return this.getWidth()>0}}const We={className:"modal-backdrop",isVisible:!0,isAnimated:!1,rootElement:"body",clickCallback:null},Ve={className:"string",isVisible:"boolean",isAnimated:"boolean",rootElement:"(element|string)",clickCallback:"(function|null)"},$e="backdrop",Xe="show",Ge="mousedown.bs.backdrop";class Ye{constructor(e){this._config=this._getConfig(e),this._isAppended=!1,this._element=null}show(e){this._config.isVisible?(this._append(),this._config.isAnimated&&v(this._getElement()),this._getElement().classList.add(Xe),this._emulateAnimation((()=>{w(e)}))):w(e)}hide(e){this._config.isVisible?(this._getElement().classList.remove(Xe),this._emulateAnimation((()=>{this.dispose(),w(e)}))):w(e)}_getElement(){if(!this._element){const e=document.createElement("div");e.className=this._config.className,this._config.isAnimated&&e.classList.add("fade"),this._element=e}return this._element}_getConfig(e){return(e={...We,..."object"==typeof e?e:{}}).rootElement=d(e.rootElement),h($e,e,Ve),e}_append(){this._isAppended||(this._config.rootElement.append(this._getElement()),F.on(this._getElement(),Ge,(()=>{w(this._config.clickCallback)})),this._isAppended=!0)}dispose(){this._isAppended&&(F.off(this._element,Ge),this._element.remove(),this._isAppended=!1)}_emulateAnimation(e){S(e,this._getElement(),this._config.isAnimated)}}const Ke={trapElement:null,autofocus:!0},Qe={trapElement:"element",autofocus:"boolean"},Je=".bs.focustrap",Ze="backward";class et{constructor(e){this._config=this._getConfig(e),this._isActive=!1,this._lastTabNavDirection=null}activate(){const{trapElement:e,autofocus:t}=this._config;this._isActive||(t&&e.focus(),F.off(document,Je),F.on(document,"focusin.bs.focustrap",(e=>this._handleFocusin(e))),F.on(document,"keydown.tab.bs.focustrap",(e=>this._handleKeydown(e))),this._isActive=!0)}deactivate(){this._isActive&&(this._isActive=!1,F.off(document,Je))}_handleFocusin(e){const{target:t}=e,{trapElement:i}=this._config;if(t===document||t===i||i.contains(t))return;const n=Q.focusableChildren(i);0===n.length?i.focus():this._lastTabNavDirection===Ze?n[n.length-1].focus():n[0].focus()}_handleKeydown(e){"Tab"===e.key&&(this._lastTabNavDirection=e.shiftKey?Ze:"forward")}_getConfig(e){return e={...Ke,..."object"==typeof e?e:{}},h("focustrap",e,Qe),e}}const tt="modal",it=".bs.modal",nt="Escape",rt={backdrop:!0,keyboard:!0,focus:!0},st={backdrop:"(boolean|string)",keyboard:"boolean",focus:"boolean"},at="hidden.bs.modal",ot="show.bs.modal",lt="resize.bs.modal",ut="click.dismiss.bs.modal",ct="keydown.dismiss.bs.modal",dt="mousedown.dismiss.bs.modal",ht="modal-open",pt="show",ft="modal-static";class mt extends z{constructor(e,t){super(e),this._config=this._getConfig(t),this._dialog=Q.findOne(".modal-dialog",this._element),this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._isShown=!1,this._ignoreBackdropClick=!1,this._isTransitioning=!1,this._scrollBar=new ze}static get Default(){return rt}static get NAME(){return tt}toggle(e){return this._isShown?this.hide():this.show(e)}show(e){if(this._isShown||this._isTransitioning)return;F.trigger(this._element,ot,{relatedTarget:e}).defaultPrevented||(this._isShown=!0,this._isAnimated()&&(this._isTransitioning=!0),this._scrollBar.hide(),document.body.classList.add(ht),this._adjustDialog(),this._setEscapeEvent(),this._setResizeEvent(),F.on(this._dialog,dt,(()=>{F.one(this._element,"mouseup.dismiss.bs.modal",(e=>{e.target===this._element&&(this._ignoreBackdropClick=!0)}))})),this._showBackdrop((()=>this._showElement(e))))}hide(){if(!this._isShown||this._isTransitioning)return;if(F.trigger(this._element,"hide.bs.modal").defaultPrevented)return;this._isShown=!1;const e=this._isAnimated();e&&(this._isTransitioning=!0),this._setEscapeEvent(),this._setResizeEvent(),this._focustrap.deactivate(),this._element.classList.remove(pt),F.off(this._element,ut),F.off(this._dialog,dt),this._queueCallback((()=>this._hideModal()),this._element,e)}dispose(){[window,this._dialog].forEach((e=>F.off(e,it))),this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}handleUpdate(){this._adjustDialog()}_initializeBackDrop(){return new Ye({isVisible:Boolean(this._config.backdrop),isAnimated:this._isAnimated()})}_initializeFocusTrap(){return new et({trapElement:this._element})}_getConfig(e){return e={...rt,...K.getDataAttributes(this._element),..."object"==typeof e?e:{}},h(tt,e,st),e}_showElement(e){const t=this._isAnimated(),i=Q.findOne(".modal-body",this._dialog);this._element.parentNode&&this._element.parentNode.nodeType===Node.ELEMENT_NODE||document.body.append(this._element),this._element.style.display="block",this._element.removeAttribute("aria-hidden"),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.scrollTop=0,i&&(i.scrollTop=0),t&&v(this._element),this._element.classList.add(pt);this._queueCallback((()=>{this._config.focus&&this._focustrap.activate(),this._isTransitioning=!1,F.trigger(this._element,"shown.bs.modal",{relatedTarget:e})}),this._dialog,t)}_setEscapeEvent(){this._isShown?F.on(this._element,ct,(e=>{this._config.keyboard&&e.key===nt?(e.preventDefault(),this.hide()):this._config.keyboard||e.key!==nt||this._triggerBackdropTransition()})):F.off(this._element,ct)}_setResizeEvent(){this._isShown?F.on(window,lt,(()=>this._adjustDialog())):F.off(window,lt)}_hideModal(){this._element.style.display="none",this._element.setAttribute("aria-hidden",!0),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._isTransitioning=!1,this._backdrop.hide((()=>{document.body.classList.remove(ht),this._resetAdjustments(),this._scrollBar.reset(),F.trigger(this._element,at)}))}_showBackdrop(e){F.on(this._element,ut,(e=>{this._ignoreBackdropClick?this._ignoreBackdropClick=!1:e.target===e.currentTarget&&(!0===this._config.backdrop?this.hide():"static"===this._config.backdrop&&this._triggerBackdropTransition())})),this._backdrop.show(e)}_isAnimated(){return this._element.classList.contains("fade")}_triggerBackdropTransition(){if(F.trigger(this._element,"hidePrevented.bs.modal").defaultPrevented)return;const{classList:e,scrollHeight:t,style:i}=this._element,n=t>document.documentElement.clientHeight;!n&&"hidden"===i.overflowY||e.contains(ft)||(n||(i.overflowY="hidden"),e.add(ft),this._queueCallback((()=>{e.remove(ft),n||this._queueCallback((()=>{i.overflowY=""}),this._dialog)}),this._dialog),this._element.focus())}_adjustDialog(){const e=this._element.scrollHeight>document.documentElement.clientHeight,t=this._scrollBar.getWidth(),i=t>0;(!i&&e&&!b()||i&&!e&&b())&&(this._element.style.paddingLeft=`${t}px`),(i&&!e&&!b()||!i&&e&&b())&&(this._element.style.paddingRight=`${t}px`)}_resetAdjustments(){this._element.style.paddingLeft="",this._element.style.paddingRight=""}static jQueryInterface(e,t){return this.each((function(){const i=mt.getOrCreateInstance(this,e);if("string"==typeof e){if(void 0===i[e])throw new TypeError(`No method named "${e}"`);i[e](t)}}))}}F.on(document,"click.bs.modal.data-api",'[data-bs-toggle="modal"]',(function(e){const t=l(this);["A","AREA"].includes(this.tagName)&&e.preventDefault(),F.one(t,ot,(e=>{e.defaultPrevented||F.one(t,at,(()=>{p(this)&&this.focus()}))}));const i=Q.findOne(".modal.show");i&&mt.getInstance(i).hide();mt.getOrCreateInstance(t).toggle(this)})),W(mt),T(mt);const gt="offcanvas",vt={backdrop:!0,keyboard:!0,scroll:!1},yt={backdrop:"boolean",keyboard:"boolean",scroll:"boolean"},_t="show",bt=".offcanvas.show",Tt="hidden.bs.offcanvas";class wt extends z{constructor(e,t){super(e),this._config=this._getConfig(t),this._isShown=!1,this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._addEventListeners()}static get NAME(){return gt}static get Default(){return vt}toggle(e){return this._isShown?this.hide():this.show(e)}show(e){if(this._isShown)return;if(F.trigger(this._element,"show.bs.offcanvas",{relatedTarget:e}).defaultPrevented)return;this._isShown=!0,this._element.style.visibility="visible",this._backdrop.show(),this._config.scroll||(new ze).hide(),this._element.removeAttribute("aria-hidden"),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.classList.add(_t);this._queueCallback((()=>{this._config.scroll||this._focustrap.activate(),F.trigger(this._element,"shown.bs.offcanvas",{relatedTarget:e})}),this._element,!0)}hide(){if(!this._isShown)return;if(F.trigger(this._element,"hide.bs.offcanvas").defaultPrevented)return;this._focustrap.deactivate(),this._element.blur(),this._isShown=!1,this._element.classList.remove(_t),this._backdrop.hide();this._queueCallback((()=>{this._element.setAttribute("aria-hidden",!0),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._element.style.visibility="hidden",this._config.scroll||(new ze).reset(),F.trigger(this._element,Tt)}),this._element,!0)}dispose(){this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}_getConfig(e){return e={...vt,...K.getDataAttributes(this._element),..."object"==typeof e?e:{}},h(gt,e,yt),e}_initializeBackDrop(){return new Ye({className:"offcanvas-backdrop",isVisible:this._config.backdrop,isAnimated:!0,rootElement:this._element.parentNode,clickCallback:()=>this.hide()})}_initializeFocusTrap(){return new et({trapElement:this._element})}_addEventListeners(){F.on(this._element,"keydown.dismiss.bs.offcanvas",(e=>{this._config.keyboard&&"Escape"===e.key&&this.hide()}))}static jQueryInterface(e){return this.each((function(){const t=wt.getOrCreateInstance(this,e);if("string"==typeof e){if(void 0===t[e]||e.startsWith("_")||"constructor"===e)throw new TypeError(`No method named "${e}"`);t[e](this)}}))}}F.on(document,"click.bs.offcanvas.data-api",'[data-bs-toggle="offcanvas"]',(function(e){const t=l(this);if(["A","AREA"].includes(this.tagName)&&e.preventDefault(),f(this))return;F.one(t,Tt,(()=>{p(this)&&this.focus()}));const i=Q.findOne(bt);i&&i!==t&&wt.getInstance(i).hide();wt.getOrCreateInstance(t).toggle(this)})),F.on(window,"load.bs.offcanvas.data-api",(()=>Q.find(bt).forEach((e=>wt.getOrCreateInstance(e).show())))),W(wt),T(wt);const St=new Set(["background","cite","href","itemtype","longdesc","poster","src","xlink:href"]),kt=/^(?:(?:https?|mailto|ftp|tel|file|sms):|[^#&/:?]*(?:[#/?]|$))/i,Et=/^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[\d+/a-z]+=*$/i,Ct=(e,t)=>{const i=e.nodeName.toLowerCase();if(t.includes(i))return!St.has(i)||Boolean(kt.test(e.nodeValue)||Et.test(e.nodeValue));const n=t.filter((e=>e instanceof RegExp));for(let e=0,t=n.length;e<t;e++)if(n[e].test(i))return!0;return!1},xt={"*":["class","dir","id","lang","role",/^aria-[\w-]*$/i],a:["target","href","title","rel"],area:[],b:[],br:[],col:[],code:[],div:[],em:[],hr:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],i:[],img:["src","srcset","alt","title","width","height"],li:[],ol:[],p:[],pre:[],s:[],small:[],span:[],sub:[],sup:[],strong:[],u:[],ul:[]};function At(e,t,i){if(!e.length)return e;if(i&&"function"==typeof i)return i(e);const n=(new window.DOMParser).parseFromString(e,"text/html"),r=[].concat(...n.body.querySelectorAll("*"));for(let e=0,i=r.length;e<i;e++){const i=r[e],n=i.nodeName.toLowerCase();if(!Object.keys(t).includes(n)){i.remove();continue}const s=[].concat(...i.attributes),a=[].concat(t["*"]||[],t[n]||[]);s.forEach((e=>{Ct(e,a)||i.removeAttribute(e.nodeName)}))}return n.body.innerHTML}const Pt="tooltip",It=new Set(["sanitize","allowList","sanitizeFn"]),Ot={animation:"boolean",template:"string",title:"(string|element|function)",trigger:"string",delay:"(number|object)",html:"boolean",selector:"(string|boolean)",placement:"(string|function)",offset:"(array|string|function)",container:"(string|element|boolean)",fallbackPlacements:"array",boundary:"(string|element)",customClass:"(string|function)",sanitize:"boolean",sanitizeFn:"(null|function)",allowList:"object",popperConfig:"(null|object|function)"},Lt={AUTO:"auto",TOP:"top",RIGHT:b()?"left":"right",BOTTOM:"bottom",LEFT:b()?"right":"left"},Dt={animation:!0,template:'<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,selector:!1,placement:"top",offset:[0,0],container:!1,fallbackPlacements:["top","right","bottom","left"],boundary:"clippingParents",customClass:"",sanitize:!0,sanitizeFn:null,allowList:xt,popperConfig:null},Mt={HIDE:"hide.bs.tooltip",HIDDEN:"hidden.bs.tooltip",SHOW:"show.bs.tooltip",SHOWN:"shown.bs.tooltip",INSERTED:"inserted.bs.tooltip",CLICK:"click.bs.tooltip",FOCUSIN:"focusin.bs.tooltip",FOCUSOUT:"focusout.bs.tooltip",MOUSEENTER:"mouseenter.bs.tooltip",MOUSELEAVE:"mouseleave.bs.tooltip"},Nt="fade",Rt="show",Ut="show",Bt="out",jt=".tooltip-inner",Ft=".modal",Ht="hide.bs.modal",qt="hover",zt="focus";class Wt extends z{constructor(e,t){if(void 0===n)throw new TypeError("Bootstrap's tooltips require Popper (https://popper.js.org)");super(e),this._isEnabled=!0,this._timeout=0,this._hoverState="",this._activeTrigger={},this._popper=null,this._config=this._getConfig(t),this.tip=null,this._setListeners()}static get Default(){return Dt}static get NAME(){return Pt}static get Event(){return Mt}static get DefaultType(){return Ot}enable(){this._isEnabled=!0}disable(){this._isEnabled=!1}toggleEnabled(){this._isEnabled=!this._isEnabled}toggle(e){if(this._isEnabled)if(e){const t=this._initializeOnDelegatedTarget(e);t._activeTrigger.click=!t._activeTrigger.click,t._isWithActiveTrigger()?t._enter(null,t):t._leave(null,t)}else{if(this.getTipElement().classList.contains(Rt))return void this._leave(null,this);this._enter(null,this)}}dispose(){clearTimeout(this._timeout),F.off(this._element.closest(Ft),Ht,this._hideModalHandler),this.tip&&this.tip.remove(),this._disposePopper(),super.dispose()}show(){if("none"===this._element.style.display)throw new Error("Please use show on visible elements");if(!this.isWithContent()||!this._isEnabled)return;const e=F.trigger(this._element,this.constructor.Event.SHOW),t=m(this._element),i=null===t?this._element.ownerDocument.documentElement.contains(this._element):t.contains(this._element);if(e.defaultPrevented||!i)return;"tooltip"===this.constructor.NAME&&this.tip&&this.getTitle()!==this.tip.querySelector(jt).innerHTML&&(this._disposePopper(),this.tip.remove(),this.tip=null);const n=this.getTipElement(),s=(e=>{do{e+=Math.floor(1e6*Math.random())}while(document.getElementById(e));return e})(this.constructor.NAME);n.setAttribute("id",s),this._element.setAttribute("aria-describedby",s),this._config.animation&&n.classList.add(Nt);const a="function"==typeof this._config.placement?this._config.placement.call(this,n,this._element):this._config.placement,o=this._getAttachment(a);this._addAttachmentClass(o);const{container:l}=this._config;q.set(n,this.constructor.DATA_KEY,this),this._element.ownerDocument.documentElement.contains(this.tip)||(l.append(n),F.trigger(this._element,this.constructor.Event.INSERTED)),this._popper?this._popper.update():this._popper=r.createPopper(this._element,n,this._getPopperConfig(o)),n.classList.add(Rt);const u=this._resolvePossibleFunction(this._config.customClass);u&&n.classList.add(...u.split(" ")),"ontouchstart" in document.documentElement&&[].concat(...document.body.children).forEach((e=>{F.on(e,"mouseover",g)}));const c=this.tip.classList.contains(Nt);this._queueCallback((()=>{const e=this._hoverState;this._hoverState=null,F.trigger(this._element,this.constructor.Event.SHOWN),e===Bt&&this._leave(null,this)}),this.tip,c)}hide(){if(!this._popper)return;const e=this.getTipElement();if(F.trigger(this._element,this.constructor.Event.HIDE).defaultPrevented)return;e.classList.remove(Rt),"ontouchstart" in document.documentElement&&[].concat(...document.body.children).forEach((e=>F.off(e,"mouseover",g))),this._activeTrigger.click=!1,this._activeTrigger.focus=!1,this._activeTrigger.hover=!1;const t=this.tip.classList.contains(Nt);this._queueCallback((()=>{this._isWithActiveTrigger()||(this._hoverState!==Ut&&e.remove(),this._cleanTipClass(),this._element.removeAttribute("aria-describedby"),F.trigger(this._element,this.constructor.Event.HIDDEN),this._disposePopper())}),this.tip,t),this._hoverState=""}update(){null!==this._popper&&this._popper.update()}isWithContent(){return Boolean(this.getTitle())}getTipElement(){if(this.tip)return this.tip;const e=document.createElement("div");e.innerHTML=this._config.template;const t=e.children[0];return this.setContent(t),t.classList.remove(Nt,Rt),this.tip=t,this.tip}setContent(e){this._sanitizeAndSetContent(e,this.getTitle(),jt)}_sanitizeAndSetContent(e,t,i){const n=Q.findOne(i,e);t||!n?this.setElementContent(n,t):n.remove()}setElementContent(e,t){if(null!==e)return c(t)?(t=d(t),void(this._config.html?t.parentNode!==e&&(e.innerHTML="",e.append(t)):e.textContent=t.textContent)):void(this._config.html?(this._config.sanitize&&(t=At(t,this._config.allowList,this._config.sanitizeFn)),e.innerHTML=t):e.textContent=t)}getTitle(){const e=this._element.getAttribute("data-bs-original-title")||this._config.title;return this._resolvePossibleFunction(e)}updateAttachment(e){return"right"===e?"end":"left"===e?"start":e}_initializeOnDelegatedTarget(e,t){return t||this.constructor.getOrCreateInstance(e.delegateTarget,this._getDelegateConfig())}_getOffset(){const{offset:e}=this._config;return"string"==typeof e?e.split(",").map((e=>Number.parseInt(e,10))):"function"==typeof e?t=>e(t,this._element):e}_resolvePossibleFunction(e){return"function"==typeof e?e.call(this._element):e}_getPopperConfig(e){const t={placement:e,modifiers:[{name:"flip",options:{fallbackPlacements:this._config.fallbackPlacements}},{name:"offset",options:{offset:this._getOffset()}},{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"arrow",options:{element:`.${this.constructor.NAME}-arrow`}},{name:"onChange",enabled:!0,phase:"afterWrite",fn:e=>this._handlePopperPlacementChange(e)}],onFirstUpdate:e=>{e.options.placement!==e.placement&&this._handlePopperPlacementChange(e)}};return{...t,..."function"==typeof this._config.popperConfig?this._config.popperConfig(t):this._config.popperConfig}}_addAttachmentClass(e){this.getTipElement().classList.add(`${this._getBasicClassPrefix()}-${this.updateAttachment(e)}`)}_getAttachment(e){return Lt[e.toUpperCase()]}_setListeners(){this._config.trigger.split(" ").forEach((e=>{if("click"===e)F.on(this._element,this.constructor.Event.CLICK,this._config.selector,(e=>this.toggle(e)));else if("manual"!==e){const t=e===qt?this.constructor.Event.MOUSEENTER:this.constructor.Event.FOCUSIN,i=e===qt?this.constructor.Event.MOUSELEAVE:this.constructor.Event.FOCUSOUT;F.on(this._element,t,this._config.selector,(e=>this._enter(e))),F.on(this._element,i,this._config.selector,(e=>this._leave(e)))}})),this._hideModalHandler=()=>{this._element&&this.hide()},F.on(this._element.closest(Ft),Ht,this._hideModalHandler),this._config.selector?this._config={...this._config,trigger:"manual",selector:""}:this._fixTitle()}_fixTitle(){const e=this._element.getAttribute("title"),t=typeof this._element.getAttribute("data-bs-original-title");(e||"string"!==t)&&(this._element.setAttribute("data-bs-original-title",e||""),!e||this._element.getAttribute("aria-label")||this._element.textContent||this._element.setAttribute("aria-label",e),this._element.setAttribute("title",""))}_enter(e,t){t=this._initializeOnDelegatedTarget(e,t),e&&(t._activeTrigger["focusin"===e.type?zt:qt]=!0),t.getTipElement().classList.contains(Rt)||t._hoverState===Ut?t._hoverState=Ut:(clearTimeout(t._timeout),t._hoverState=Ut,t._config.delay&&t._config.delay.show?t._timeout=setTimeout((()=>{t._hoverState===Ut&&t.show()}),t._config.delay.show):t.show())}_leave(e,t){t=this._initializeOnDelegatedTarget(e,t),e&&(t._activeTrigger["focusout"===e.type?zt:qt]=t._element.contains(e.relatedTarget)),t._isWithActiveTrigger()||(clearTimeout(t._timeout),t._hoverState=Bt,t._config.delay&&t._config.delay.hide?t._timeout=setTimeout((()=>{t._hoverState===Bt&&t.hide()}),t._config.delay.hide):t.hide())}_isWithActiveTrigger(){for(const e in this._activeTrigger)if(this._activeTrigger[e])return!0;return!1}_getConfig(e){const t=K.getDataAttributes(this._element);return Object.keys(t).forEach((e=>{It.has(e)&&delete t[e]})),(e={...this.constructor.Default,...t,..."object"==typeof e&&e?e:{}}).container=!1===e.container?document.body:d(e.container),"number"==typeof e.delay&&(e.delay={show:e.delay,hide:e.delay}),"number"==typeof e.title&&(e.title=e.title.toString()),"number"==typeof e.content&&(e.content=e.content.toString()),h(Pt,e,this.constructor.DefaultType),e.sanitize&&(e.template=At(e.template,e.allowList,e.sanitizeFn)),e}_getDelegateConfig(){const e={};for(const t in this._config)this.constructor.Default[t]!==this._config[t]&&(e[t]=this._config[t]);return e}_cleanTipClass(){const e=this.getTipElement(),t=new RegExp(`(^|\\s)${this._getBasicClassPrefix()}\\S+`,"g"),i=e.getAttribute("class").match(t);null!==i&&i.length>0&&i.map((e=>e.trim())).forEach((t=>e.classList.remove(t)))}_getBasicClassPrefix(){return"bs-tooltip"}_handlePopperPlacementChange(e){const{state:t}=e;t&&(this.tip=t.elements.popper,this._cleanTipClass(),this._addAttachmentClass(this._getAttachment(t.placement)))}_disposePopper(){this._popper&&(this._popper.destroy(),this._popper=null)}static jQueryInterface(e){return this.each((function(){const t=Wt.getOrCreateInstance(this,e);if("string"==typeof e){if(void 0===t[e])throw new TypeError(`No method named "${e}"`);t[e]()}}))}}T(Wt);const Vt={...Wt.Default,placement:"right",offset:[0,8],trigger:"click",content:"",template:'<div class="popover" role="tooltip"><div class="popover-arrow"></div><h3 class="popover-header"></h3><div class="popover-body"></div></div>'},$t={...Wt.DefaultType,content:"(string|element|function)"},Xt={HIDE:"hide.bs.popover",HIDDEN:"hidden.bs.popover",SHOW:"show.bs.popover",SHOWN:"shown.bs.popover",INSERTED:"inserted.bs.popover",CLICK:"click.bs.popover",FOCUSIN:"focusin.bs.popover",FOCUSOUT:"focusout.bs.popover",MOUSEENTER:"mouseenter.bs.popover",MOUSELEAVE:"mouseleave.bs.popover"};class Gt extends Wt{static get Default(){return Vt}static get NAME(){return"popover"}static get Event(){return Xt}static get DefaultType(){return $t}isWithContent(){return this.getTitle()||this._getContent()}setContent(e){this._sanitizeAndSetContent(e,this.getTitle(),".popover-header"),this._sanitizeAndSetContent(e,this._getContent(),".popover-body")}_getContent(){return this._resolvePossibleFunction(this._config.content)}_getBasicClassPrefix(){return"bs-popover"}static jQueryInterface(e){return this.each((function(){const t=Gt.getOrCreateInstance(this,e);if("string"==typeof e){if(void 0===t[e])throw new TypeError(`No method named "${e}"`);t[e]()}}))}}T(Gt);const Yt="scrollspy",Kt=".bs.scrollspy",Qt={offset:10,method:"auto",target:""},Jt={offset:"number",method:"string",target:"(string|element)"},Zt="dropdown-item",ei="active",ti=".nav-link",ii=".nav-link, .list-group-item, .dropdown-item",ni="position";class ri extends z{constructor(e,t){super(e),this._scrollElement="BODY"===this._element.tagName?window:this._element,this._config=this._getConfig(t),this._offsets=[],this._targets=[],this._activeTarget=null,this._scrollHeight=0,F.on(this._scrollElement,"scroll.bs.scrollspy",(()=>this._process())),this.refresh(),this._process()}static get Default(){return Qt}static get NAME(){return Yt}refresh(){const e=this._scrollElement===this._scrollElement.window?"offset":ni,t="auto"===this._config.method?e:this._config.method,i=t===ni?this._getScrollTop():0;this._offsets=[],this._targets=[],this._scrollHeight=this._getScrollHeight();Q.find(ii,this._config.target).map((e=>{const n=o(e),r=n?Q.findOne(n):null;if(r){const e=r.getBoundingClientRect();if(e.width||e.height)return[K[t](r).top+i,n]}return null})).filter((e=>e)).sort(((e,t)=>e[0]-t[0])).forEach((e=>{this._offsets.push(e[0]),this._targets.push(e[1])}))}dispose(){F.off(this._scrollElement,Kt),super.dispose()}_getConfig(e){return(e={...Qt,...K.getDataAttributes(this._element),..."object"==typeof e&&e?e:{}}).target=d(e.target)||document.documentElement,h(Yt,e,Jt),e}_getScrollTop(){return this._scrollElement===window?this._scrollElement.pageYOffset:this._scrollElement.scrollTop}_getScrollHeight(){return this._scrollElement.scrollHeight||Math.max(document.body.scrollHeight,document.documentElement.scrollHeight)}_getOffsetHeight(){return this._scrollElement===window?window.innerHeight:this._scrollElement.getBoundingClientRect().height}_process(){const e=this._getScrollTop()+this._config.offset,t=this._getScrollHeight(),i=this._config.offset+t-this._getOffsetHeight();if(this._scrollHeight!==t&&this.refresh(),e>=i){const e=this._targets[this._targets.length-1];this._activeTarget!==e&&this._activate(e)}else{if(this._activeTarget&&e<this._offsets[0]&&this._offsets[0]>0)return this._activeTarget=null,void this._clear();for(let t=this._offsets.length;t--;){this._activeTarget!==this._targets[t]&&e>=this._offsets[t]&&(void 0===this._offsets[t+1]||e<this._offsets[t+1])&&this._activate(this._targets[t])}}}_activate(e){this._activeTarget=e,this._clear();const t=ii.split(",").map((t=>`${t}[data-bs-target="${e}"],${t}[href="${e}"]`)),i=Q.findOne(t.join(","),this._config.target);i.classList.add(ei),i.classList.contains(Zt)?Q.findOne(".dropdown-toggle",i.closest(".dropdown")).classList.add(ei):Q.parents(i,".nav, .list-group").forEach((e=>{Q.prev(e,".nav-link, .list-group-item").forEach((e=>e.classList.add(ei))),Q.prev(e,".nav-item").forEach((e=>{Q.children(e,ti).forEach((e=>e.classList.add(ei)))}))})),F.trigger(this._scrollElement,"activate.bs.scrollspy",{relatedTarget:e})}_clear(){Q.find(ii,this._config.target).filter((e=>e.classList.contains(ei))).forEach((e=>e.classList.remove(ei)))}static jQueryInterface(e){return this.each((function(){const t=ri.getOrCreateInstance(this,e);if("string"==typeof e){if(void 0===t[e])throw new TypeError(`No method named "${e}"`);t[e]()}}))}}F.on(window,"load.bs.scrollspy.data-api",(()=>{Q.find('[data-bs-spy="scroll"]').forEach((e=>new ri(e)))})),T(ri);const si="active",ai="fade",oi="show",li=".active",ui=":scope > li > .active";class ci extends z{static get NAME(){return"tab"}show(){if(this._element.parentNode&&this._element.parentNode.nodeType===Node.ELEMENT_NODE&&this._element.classList.contains(si))return;let e;const t=l(this._element),i=this._element.closest(".nav, .list-group");if(i){const t="UL"===i.nodeName||"OL"===i.nodeName?ui:li;e=Q.find(t,i),e=e[e.length-1]}const n=e?F.trigger(e,"hide.bs.tab",{relatedTarget:this._element}):null;if(F.trigger(this._element,"show.bs.tab",{relatedTarget:e}).defaultPrevented||null!==n&&n.defaultPrevented)return;this._activate(this._element,i);const r=()=>{F.trigger(e,"hidden.bs.tab",{relatedTarget:this._element}),F.trigger(this._element,"shown.bs.tab",{relatedTarget:e})};t?this._activate(t,t.parentNode,r):r()}_activate(e,t,i){const n=(!t||"UL"!==t.nodeName&&"OL"!==t.nodeName?Q.children(t,li):Q.find(ui,t))[0],r=i&&n&&n.classList.contains(ai),s=()=>this._transitionComplete(e,n,i);n&&r?(n.classList.remove(oi),this._queueCallback(s,e,!0)):s()}_transitionComplete(e,t,i){if(t){t.classList.remove(si);const e=Q.findOne(":scope > .dropdown-menu .active",t.parentNode);e&&e.classList.remove(si),"tab"===t.getAttribute("role")&&t.setAttribute("aria-selected",!1)}e.classList.add(si),"tab"===e.getAttribute("role")&&e.setAttribute("aria-selected",!0),v(e),e.classList.contains(ai)&&e.classList.add(oi);let n=e.parentNode;if(n&&"LI"===n.nodeName&&(n=n.parentNode),n&&n.classList.contains("dropdown-menu")){const t=e.closest(".dropdown");t&&Q.find(".dropdown-toggle",t).forEach((e=>e.classList.add(si))),e.setAttribute("aria-expanded",!0)}i&&i()}static jQueryInterface(e){return this.each((function(){const t=ci.getOrCreateInstance(this);if("string"==typeof e){if(void 0===t[e])throw new TypeError(`No method named "${e}"`);t[e]()}}))}}F.on(document,"click.bs.tab.data-api",'[data-bs-toggle="tab"], [data-bs-toggle="pill"], [data-bs-toggle="list"]',(function(e){if(["A","AREA"].includes(this.tagName)&&e.preventDefault(),f(this))return;ci.getOrCreateInstance(this).show()})),T(ci);const di="toast",hi="hide",pi="show",fi="showing",mi={animation:"boolean",autohide:"boolean",delay:"number"},gi={animation:!0,autohide:!0,delay:5e3};class vi extends z{constructor(e,t){super(e),this._config=this._getConfig(t),this._timeout=null,this._hasMouseInteraction=!1,this._hasKeyboardInteraction=!1,this._setListeners()}static get DefaultType(){return mi}static get Default(){return gi}static get NAME(){return di}show(){if(F.trigger(this._element,"show.bs.toast").defaultPrevented)return;this._clearTimeout(),this._config.animation&&this._element.classList.add("fade");this._element.classList.remove(hi),v(this._element),this._element.classList.add(pi),this._element.classList.add(fi),this._queueCallback((()=>{this._element.classList.remove(fi),F.trigger(this._element,"shown.bs.toast"),this._maybeScheduleHide()}),this._element,this._config.animation)}hide(){if(!this._element.classList.contains(pi))return;if(F.trigger(this._element,"hide.bs.toast").defaultPrevented)return;this._element.classList.add(fi),this._queueCallback((()=>{this._element.classList.add(hi),this._element.classList.remove(fi),this._element.classList.remove(pi),F.trigger(this._element,"hidden.bs.toast")}),this._element,this._config.animation)}dispose(){this._clearTimeout(),this._element.classList.contains(pi)&&this._element.classList.remove(pi),super.dispose()}_getConfig(e){return e={...gi,...K.getDataAttributes(this._element),..."object"==typeof e&&e?e:{}},h(di,e,this.constructor.DefaultType),e}_maybeScheduleHide(){this._config.autohide&&(this._hasMouseInteraction||this._hasKeyboardInteraction||(this._timeout=setTimeout((()=>{this.hide()}),this._config.delay)))}_onInteraction(e,t){switch(e.type){case"mouseover":case"mouseout":this._hasMouseInteraction=t;break;case"focusin":case"focusout":this._hasKeyboardInteraction=t}if(t)return void this._clearTimeout();const i=e.relatedTarget;this._element===i||this._element.contains(i)||this._maybeScheduleHide()}_setListeners(){F.on(this._element,"mouseover.bs.toast",(e=>this._onInteraction(e,!0))),F.on(this._element,"mouseout.bs.toast",(e=>this._onInteraction(e,!1))),F.on(this._element,"focusin.bs.toast",(e=>this._onInteraction(e,!0))),F.on(this._element,"focusout.bs.toast",(e=>this._onInteraction(e,!1)))}_clearTimeout(){clearTimeout(this._timeout),this._timeout=null}static jQueryInterface(e){return this.each((function(){const t=vi.getOrCreateInstance(this,e);if("string"==typeof e){if(void 0===t[e])throw new TypeError(`No method named "${e}"`);t[e](this)}}))}}W(vi),T(vi)},(e,t,i)=>{"use strict";i.r(t),i.d(t,{afterMain:()=>n.afterMain,afterRead:()=>n.afterRead,afterWrite:()=>n.afterWrite,applyStyles:()=>r.applyStyles,arrow:()=>r.arrow,auto:()=>n.auto,basePlacements:()=>n.basePlacements,beforeMain:()=>n.beforeMain,beforeRead:()=>n.beforeRead,beforeWrite:()=>n.beforeWrite,bottom:()=>n.bottom,clippingParents:()=>n.clippingParents,computeStyles:()=>r.computeStyles,createPopper:()=>o.createPopper,createPopperBase:()=>s.createPopper,createPopperLite:()=>l.createPopper,detectOverflow:()=>a.default,end:()=>n.end,eventListeners:()=>r.eventListeners,flip:()=>r.flip,hide:()=>r.hide,left:()=>n.left,main:()=>n.main,modifierPhases:()=>n.modifierPhases,offset:()=>r.offset,placements:()=>n.placements,popper:()=>n.popper,popperGenerator:()=>s.popperGenerator,popperOffsets:()=>r.popperOffsets,preventOverflow:()=>r.preventOverflow,read:()=>n.read,reference:()=>n.reference,right:()=>n.right,start:()=>n.start,top:()=>n.top,variationPlacements:()=>n.variationPlacements,viewport:()=>n.viewport,write:()=>n.write});var n=i(3),r=i(4),s=i(48),a=i(32),o=i(58),l=i(59)},(e,t,i)=>{"use strict";i.r(t),i.d(t,{afterMain:()=>w,afterRead:()=>_,afterWrite:()=>E,auto:()=>o,basePlacements:()=>l,beforeMain:()=>b,beforeRead:()=>v,beforeWrite:()=>S,bottom:()=>r,clippingParents:()=>d,end:()=>c,left:()=>a,main:()=>T,modifierPhases:()=>C,placements:()=>g,popper:()=>p,read:()=>y,reference:()=>f,right:()=>s,start:()=>u,top:()=>n,variationPlacements:()=>m,viewport:()=>h,write:()=>k});var n="top",r="bottom",s="right",a="left",o="auto",l=[n,r,s,a],u="start",c="end",d="clippingParents",h="viewport",p="popper",f="reference",m=l.reduce((function(e,t){return e.concat([t+"-"+u,t+"-"+c])}),[]),g=[].concat(l,[o]).reduce((function(e,t){return e.concat([t,t+"-"+u,t+"-"+c])}),[]),v="beforeRead",y="read",_="afterRead",b="beforeMain",T="main",w="afterMain",S="beforeWrite",k="write",E="afterWrite",C=[v,y,_,b,T,w,S,k,E]},(e,t,i)=>{"use strict";i.r(t),i.d(t,{applyStyles:()=>n.default,arrow:()=>r.default,computeStyles:()=>s.default,eventListeners:()=>a.default,flip:()=>o.default,hide:()=>l.default,offset:()=>u.default,popperOffsets:()=>c.default,preventOverflow:()=>d.default});var n=i(5),r=i(9),s=i(25),a=i(27),o=i(28),l=i(43),u=i(44),c=i(45),d=i(46)},(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>s});var n=i(8),r=i(6);const s={name:"applyStyles",enabled:!0,phase:"write",fn:function(e){var t=e.state;Object.keys(t.elements).forEach((function(e){var i=t.styles[e]||{},s=t.attributes[e]||{},a=t.elements[e];(0,r.isHTMLElement)(a)&&(0,n.default)(a)&&(Object.assign(a.style,i),Object.keys(s).forEach((function(e){var t=s[e];!1===t?a.removeAttribute(e):a.setAttribute(e,!0===t?"":t)})))}))},effect:function(e){var t=e.state,i={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,i.popper),t.styles=i,t.elements.arrow&&Object.assign(t.elements.arrow.style,i.arrow),function(){Object.keys(t.elements).forEach((function(e){var s=t.elements[e],a=t.attributes[e]||{},o=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:i[e]).reduce((function(e,t){return e[t]="",e}),{});(0,r.isHTMLElement)(s)&&(0,n.default)(s)&&(Object.assign(s.style,o),Object.keys(a).forEach((function(e){s.removeAttribute(e)})))}))}},requires:["computeStyles"]}},(e,t,i)=>{"use strict";i.r(t),i.d(t,{isElement:()=>r,isHTMLElement:()=>s,isShadowRoot:()=>a});var n=i(7);function r(e){return e instanceof(0,n.default)(e).Element||e instanceof Element}function s(e){return e instanceof(0,n.default)(e).HTMLElement||e instanceof HTMLElement}function a(e){return"undefined"!=typeof ShadowRoot&&(e instanceof(0,n.default)(e).ShadowRoot||e instanceof ShadowRoot)}},(e,t,i)=>{"use strict";function n(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}i.r(t),i.d(t,{default:()=>n})},(e,t,i)=>{"use strict";function n(e){return e?(e.nodeName||"").toLowerCase():null}i.r(t),i.d(t,{default:()=>n})},(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>p});var n=i(13),r=i(15),s=i(24),a=i(18),o=i(14),l=i(23),u=i(10),c=i(12),d=i(3),h=i(6);const p={name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,i=e.state,s=e.name,h=e.options,p=i.elements.arrow,f=i.modifiersData.popperOffsets,m=(0,n.default)(i.placement),g=(0,o.default)(m),v=[d.left,d.right].indexOf(m)>=0?"height":"width";if(p&&f){var y=function(e,t){return e="function"==typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e,(0,u.default)("number"!=typeof e?e:(0,c.default)(e,d.basePlacements))}(h.padding,i),_=(0,r.default)(p),b="y"===g?d.top:d.left,T="y"===g?d.bottom:d.right,w=i.rects.reference[v]+i.rects.reference[g]-f[g]-i.rects.popper[v],S=f[g]-i.rects.reference[g],k=(0,a.default)(p),E=k?"y"===g?k.clientHeight||0:k.clientWidth||0:0,C=w/2-S/2,x=y[b],A=E-_[v]-y[T],P=E/2-_[v]/2+C,I=(0,l.within)(x,P,A),O=g;i.modifiersData[s]=((t={})[O]=I,t.centerOffset=I-P,t)}},effect:function(e){var t=e.state,i=e.options.element,n=void 0===i?"[data-popper-arrow]":i;null!=n&&("string"!=typeof n||(n=t.elements.popper.querySelector(n)))&&("production"!==process.env.NODE_ENV&&((0,h.isHTMLElement)(n)||console.error(['Popper: "arrow" element must be an HTMLElement (not an SVGElement).',"To use an SVG arrow, wrap it in an HTMLElement that will be used as","the arrow."].join(" "))),(0,s.default)(t.elements.popper,n)?t.elements.arrow=n:"production"!==process.env.NODE_ENV&&console.error(['Popper: "arrow" modifier\'s `element` must be a child of the popper',"element."].join(" ")))},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]}},(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>r});var n=i(11);function r(e){return Object.assign({},(0,n.default)(),e)}},(e,t,i)=>{"use strict";function n(){return{top:0,right:0,bottom:0,left:0}}i.r(t),i.d(t,{default:()=>n})},(e,t,i)=>{"use strict";function n(e,t){return t.reduce((function(t,i){return t[i]=e,t}),{})}i.r(t),i.d(t,{default:()=>n})},(e,t,i)=>{"use strict";function n(e){return e.split("-")[0]}i.r(t),i.d(t,{default:()=>n})},(e,t,i)=>{"use strict";function n(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}i.r(t),i.d(t,{default:()=>n})},(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>r});var n=i(16);function r(e){var t=(0,n.default)(e),i=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-i)<=1&&(i=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:i,height:r}}},(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>s});var n=i(6),r=i(17);function s(e,t){void 0===t&&(t=!1);var i=e.getBoundingClientRect(),s=1,a=1;if((0,n.isHTMLElement)(e)&&t){var o=e.offsetHeight,l=e.offsetWidth;l>0&&(s=(0,r.round)(i.width)/l||1),o>0&&(a=(0,r.round)(i.height)/o||1)}return{width:i.width/s,height:i.height/a,top:i.top/a,right:i.right/s,bottom:i.bottom/a,left:i.left/s,x:i.left/s,y:i.top/a}}},(e,t,i)=>{"use strict";i.r(t),i.d(t,{max:()=>n,min:()=>r,round:()=>s});var n=Math.max,r=Math.min,s=Math.round},(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>c});var n=i(7),r=i(8),s=i(19),a=i(6),o=i(22),l=i(20);function u(e){return(0,a.isHTMLElement)(e)&&"fixed"!==(0,s.default)(e).position?e.offsetParent:null}function c(e){for(var t=(0,n.default)(e),i=u(e);i&&(0,o.default)(i)&&"static"===(0,s.default)(i).position;)i=u(i);return i&&("html"===(0,r.default)(i)||"body"===(0,r.default)(i)&&"static"===(0,s.default)(i).position)?t:i||function(e){var t=-1!==navigator.userAgent.toLowerCase().indexOf("firefox");if(-1!==navigator.userAgent.indexOf("Trident")&&(0,a.isHTMLElement)(e)&&"fixed"===(0,s.default)(e).position)return null;var i=(0,l.default)(e);for((0,a.isShadowRoot)(i)&&(i=i.host);(0,a.isHTMLElement)(i)&&["html","body"].indexOf((0,r.default)(i))<0;){var n=(0,s.default)(i);if("none"!==n.transform||"none"!==n.perspective||"paint"===n.contain||-1!==["transform","perspective"].indexOf(n.willChange)||t&&"filter"===n.willChange||t&&n.filter&&"none"!==n.filter)return i;i=i.parentNode}return null}(e)||t}},(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>r});var n=i(7);function r(e){return(0,n.default)(e).getComputedStyle(e)}},(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>a});var n=i(8),r=i(21),s=i(6);function a(e){return"html"===(0,n.default)(e)?e:e.assignedSlot||e.parentNode||((0,s.isShadowRoot)(e)?e.host:null)||(0,r.default)(e)}},(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>r});var n=i(6);function r(e){return(((0,n.isElement)(e)?e.ownerDocument:e.document)||window.document).documentElement}},(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>r});var n=i(8);function r(e){return["table","td","th"].indexOf((0,n.default)(e))>=0}},(e,t,i)=>{"use strict";i.r(t),i.d(t,{within:()=>r,withinMaxClamp:()=>s});var n=i(17);function r(e,t,i){return(0,n.max)(e,(0,n.min)(t,i))}function s(e,t,i){var n=r(e,t,i);return n>i?i:n}},(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>r});var n=i(6);function r(e,t){var i=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(i&&(0,n.isShadowRoot)(i)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}},(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>p,mapToStyles:()=>h});var n=i(3),r=i(18),s=i(7),a=i(21),o=i(19),l=i(13),u=i(26),c=i(17),d={top:"auto",right:"auto",bottom:"auto",left:"auto"};function h(e){var t,i=e.popper,l=e.popperRect,u=e.placement,h=e.variation,p=e.offsets,f=e.position,m=e.gpuAcceleration,g=e.adaptive,v=e.roundOffsets,y=e.isFixed,_=p.x,b=void 0===_?0:_,T=p.y,w=void 0===T?0:T,S="function"==typeof v?v({x:b,y:w}):{x:b,y:w};b=S.x,w=S.y;var k=p.hasOwnProperty("x"),E=p.hasOwnProperty("y"),C=n.left,x=n.top,A=window;if(g){var P=(0,r.default)(i),I="clientHeight",O="clientWidth";if(P===(0,s.default)(i)&&(P=(0,a.default)(i),"static"!==(0,o.default)(P).position&&"absolute"===f&&(I="scrollHeight",O="scrollWidth")),P=P,u===n.top||(u===n.left||u===n.right)&&h===n.end)x=n.bottom,w-=(y&&P===A&&A.visualViewport?A.visualViewport.height:P[I])-l.height,w*=m?1:-1;if(u===n.left||(u===n.top||u===n.bottom)&&h===n.end)C=n.right,b-=(y&&P===A&&A.visualViewport?A.visualViewport.width:P[O])-l.width,b*=m?1:-1}var L,D=Object.assign({position:f},g&&d),M=!0===v?function(e){var t=e.x,i=e.y,n=window.devicePixelRatio||1;return{x:(0,c.round)(t*n)/n||0,y:(0,c.round)(i*n)/n||0}}({x:b,y:w}):{x:b,y:w};return b=M.x,w=M.y,m?Object.assign({},D,((L={})[x]=E?"0":"",L[C]=k?"0":"",L.transform=(A.devicePixelRatio||1)<=1?"translate("+b+"px, "+w+"px)":"translate3d("+b+"px, "+w+"px, 0)",L)):Object.assign({},D,((t={})[x]=E?w+"px":"",t[C]=k?b+"px":"",t.transform="",t))}const p={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,i=e.options,n=i.gpuAcceleration,r=void 0===n||n,s=i.adaptive,a=void 0===s||s,c=i.roundOffsets,d=void 0===c||c;if("production"!==process.env.NODE_ENV){var p=(0,o.default)(t.elements.popper).transitionProperty||"";a&&["transform","top","right","bottom","left"].some((function(e){return p.indexOf(e)>=0}))&&console.warn(["Popper: Detected CSS transitions on at least one of the following",'CSS properties: "transform", "top", "right", "bottom", "left".',"\n\n",'Disable the "computeStyles" modifier\'s `adaptive` option to allow',"for smooth transitions, or remove these properties from the CSS","transition declaration on the popper element if only transitioning","opacity or background-color for example.","\n\n","We recommend using the popper element as a wrapper around an inner","element that can have any CSS property transitioned for animations."].join(" "))}var f={placement:(0,l.default)(t.placement),variation:(0,u.default)(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:r,isFixed:"fixed"===t.options.strategy};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,h(Object.assign({},f,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:d})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,h(Object.assign({},f,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:d})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}}},(e,t,i)=>{"use strict";function n(e){return e.split("-")[1]}i.r(t),i.d(t,{default:()=>n})},(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>s});var n=i(7),r={passive:!0};const s={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(e){var t=e.state,i=e.instance,s=e.options,a=s.scroll,o=void 0===a||a,l=s.resize,u=void 0===l||l,c=(0,n.default)(t.elements.popper),d=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&d.forEach((function(e){e.addEventListener("scroll",i.update,r)})),u&&c.addEventListener("resize",i.update,r),function(){o&&d.forEach((function(e){e.removeEventListener("scroll",i.update,r)})),u&&c.removeEventListener("resize",i.update,r)}},data:{}}},(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>c});var n=i(29),r=i(13),s=i(30),a=i(32),o=i(31),l=i(3),u=i(26);const c={name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,i=e.options,c=e.name;if(!t.modifiersData[c]._skip){for(var d=i.mainAxis,h=void 0===d||d,p=i.altAxis,f=void 0===p||p,m=i.fallbackPlacements,g=i.padding,v=i.boundary,y=i.rootBoundary,_=i.altBoundary,b=i.flipVariations,T=void 0===b||b,w=i.allowedAutoPlacements,S=t.options.placement,k=(0,r.default)(S),E=m||(k===S||!T?[(0,n.default)(S)]:function(e){if((0,r.default)(e)===l.auto)return[];var t=(0,n.default)(e);return[(0,s.default)(e),t,(0,s.default)(t)]}(S)),C=[S].concat(E).reduce((function(e,i){return e.concat((0,r.default)(i)===l.auto?(0,o.default)(t,{placement:i,boundary:v,rootBoundary:y,padding:g,flipVariations:T,allowedAutoPlacements:w}):i)}),[]),x=t.rects.reference,A=t.rects.popper,P=new Map,I=!0,O=C[0],L=0;L<C.length;L++){var D=C[L],M=(0,r.default)(D),N=(0,u.default)(D)===l.start,R=[l.top,l.bottom].indexOf(M)>=0,U=R?"width":"height",B=(0,a.default)(t,{placement:D,boundary:v,rootBoundary:y,altBoundary:_,padding:g}),j=R?N?l.right:l.left:N?l.bottom:l.top;x[U]>A[U]&&(j=(0,n.default)(j));var F=(0,n.default)(j),H=[];if(h&&H.push(B[M]<=0),f&&H.push(B[j]<=0,B[F]<=0),H.every((function(e){return e}))){O=D,I=!1;break}P.set(D,H)}if(I)for(var q=function(e){var t=C.find((function(t){var i=P.get(t);if(i)return i.slice(0,e).every((function(e){return e}))}));if(t)return O=t,"break"},z=T?3:1;z>0;z--){if("break"===q(z))break}t.placement!==O&&(t.modifiersData[c]._skip=!0,t.placement=O,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}}},(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>r});var n={left:"right",right:"left",bottom:"top",top:"bottom"};function r(e){return e.replace(/left|right|bottom|top/g,(function(e){return n[e]}))}},(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>r});var n={start:"end",end:"start"};function r(e){return e.replace(/start|end/g,(function(e){return n[e]}))}},(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>o});var n=i(26),r=i(3),s=i(32),a=i(13);function o(e,t){void 0===t&&(t={});var i=t,o=i.placement,l=i.boundary,u=i.rootBoundary,c=i.padding,d=i.flipVariations,h=i.allowedAutoPlacements,p=void 0===h?r.placements:h,f=(0,n.default)(o),m=f?d?r.variationPlacements:r.variationPlacements.filter((function(e){return(0,n.default)(e)===f})):r.basePlacements,g=m.filter((function(e){return p.indexOf(e)>=0}));0===g.length&&(g=m,"production"!==process.env.NODE_ENV&&console.error(["Popper: The `allowedAutoPlacements` option did not allow any","placements. Ensure the `placement` option matches the variation","of the allowed placements.",'For example, "auto" cannot be used to allow "bottom-start".','Use "auto-start" instead.'].join(" ")));var v=g.reduce((function(t,i){return t[i]=(0,s.default)(e,{placement:i,boundary:l,rootBoundary:u,padding:c})[(0,a.default)(i)],t}),{});return Object.keys(v).sort((function(e,t){return v[e]-v[t]}))}},(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>h});var n=i(33),r=i(21),s=i(16),a=i(42),o=i(34),l=i(3),u=i(6),c=i(10),d=i(12);function h(e,t){void 0===t&&(t={});var i=t,h=i.placement,p=void 0===h?e.placement:h,f=i.boundary,m=void 0===f?l.clippingParents:f,g=i.rootBoundary,v=void 0===g?l.viewport:g,y=i.elementContext,_=void 0===y?l.popper:y,b=i.altBoundary,T=void 0!==b&&b,w=i.padding,S=void 0===w?0:w,k=(0,c.default)("number"!=typeof S?S:(0,d.default)(S,l.basePlacements)),E=_===l.popper?l.reference:l.popper,C=e.rects.popper,x=e.elements[T?E:_],A=(0,n.default)((0,u.isElement)(x)?x:x.contextElement||(0,r.default)(e.elements.popper),m,v),P=(0,s.default)(e.elements.reference),I=(0,a.default)({reference:P,element:C,strategy:"absolute",placement:p}),O=(0,o.default)(Object.assign({},C,I)),L=_===l.popper?O:P,D={top:A.top-L.top+k.top,bottom:L.bottom-A.bottom+k.bottom,left:A.left-L.left+k.left,right:L.right-A.right+k.right},M=e.modifiersData.offset;if(_===l.popper&&M){var N=M[p];Object.keys(D).forEach((function(e){var t=[l.right,l.bottom].indexOf(e)>=0?1:-1,i=[l.top,l.bottom].indexOf(e)>=0?"y":"x";D[e]+=N[i]*t}))}return D}},(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>y});var n=i(3),r=i(35),s=i(38),a=i(39),o=i(18),l=i(21),u=i(19),c=i(6),d=i(16),h=i(20),p=i(24),f=i(8),m=i(34),g=i(17);function v(e,t){return t===n.viewport?(0,m.default)((0,r.default)(e)):(0,c.isElement)(t)?function(e){var t=(0,d.default)(e);return t.top=t.top+e.clientTop,t.left=t.left+e.clientLeft,t.bottom=t.top+e.clientHeight,t.right=t.left+e.clientWidth,t.width=e.clientWidth,t.height=e.clientHeight,t.x=t.left,t.y=t.top,t}(t):(0,m.default)((0,s.default)((0,l.default)(e)))}function y(e,t,i){var n="clippingParents"===t?function(e){var t=(0,a.default)((0,h.default)(e)),i=["absolute","fixed"].indexOf((0,u.default)(e).position)>=0&&(0,c.isHTMLElement)(e)?(0,o.default)(e):e;return(0,c.isElement)(i)?t.filter((function(e){return(0,c.isElement)(e)&&(0,p.default)(e,i)&&"body"!==(0,f.default)(e)})):[]}(e):[].concat(t),r=[].concat(n,[i]),s=r[0],l=r.reduce((function(t,i){var n=v(e,i);return t.top=(0,g.max)(n.top,t.top),t.right=(0,g.min)(n.right,t.right),t.bottom=(0,g.min)(n.bottom,t.bottom),t.left=(0,g.max)(n.left,t.left),t}),v(e,s));return l.width=l.right-l.left,l.height=l.bottom-l.top,l.x=l.left,l.y=l.top,l}},(e,t,i)=>{"use strict";function n(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}i.r(t),i.d(t,{default:()=>n})},(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>a});var n=i(7),r=i(21),s=i(36);function a(e){var t=(0,n.default)(e),i=(0,r.default)(e),a=t.visualViewport,o=i.clientWidth,l=i.clientHeight,u=0,c=0;return a&&(o=a.width,l=a.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(u=a.offsetLeft,c=a.offsetTop)),{width:o,height:l,x:u+(0,s.default)(e),y:c}}},(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>a});var n=i(16),r=i(21),s=i(37);function a(e){return(0,n.default)((0,r.default)(e)).left+(0,s.default)(e).scrollLeft}},(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>r});var n=i(7);function r(e){var t=(0,n.default)(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}},(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>l});var n=i(21),r=i(19),s=i(36),a=i(37),o=i(17);function l(e){var t,i=(0,n.default)(e),l=(0,a.default)(e),u=null==(t=e.ownerDocument)?void 0:t.body,c=(0,o.max)(i.scrollWidth,i.clientWidth,u?u.scrollWidth:0,u?u.clientWidth:0),d=(0,o.max)(i.scrollHeight,i.clientHeight,u?u.scrollHeight:0,u?u.clientHeight:0),h=-l.scrollLeft+(0,s.default)(e),p=-l.scrollTop;return"rtl"===(0,r.default)(u||i).direction&&(h+=(0,o.max)(i.clientWidth,u?u.clientWidth:0)-c),{width:c,height:d,x:h,y:p}}},(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>o});var n=i(40),r=i(20),s=i(7),a=i(41);function o(e,t){var i;void 0===t&&(t=[]);var l=(0,n.default)(e),u=l===(null==(i=e.ownerDocument)?void 0:i.body),c=(0,s.default)(l),d=u?[c].concat(c.visualViewport||[],(0,a.default)(l)?l:[]):l,h=t.concat(d);return u?h:h.concat(o((0,r.default)(d)))}},(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>o});var n=i(20),r=i(41),s=i(8),a=i(6);function o(e){return["html","body","#document"].indexOf((0,s.default)(e))>=0?e.ownerDocument.body:(0,a.isHTMLElement)(e)&&(0,r.default)(e)?e:o((0,n.default)(e))}},(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>r});var n=i(19);function r(e){var t=(0,n.default)(e),i=t.overflow,r=t.overflowX,s=t.overflowY;return/auto|scroll|overlay|hidden/.test(i+s+r)}},(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>o});var n=i(13),r=i(26),s=i(14),a=i(3);function o(e){var t,i=e.reference,o=e.element,l=e.placement,u=l?(0,n.default)(l):null,c=l?(0,r.default)(l):null,d=i.x+i.width/2-o.width/2,h=i.y+i.height/2-o.height/2;switch(u){case a.top:t={x:d,y:i.y-o.height};break;case a.bottom:t={x:d,y:i.y+i.height};break;case a.right:t={x:i.x+i.width,y:h};break;case a.left:t={x:i.x-o.width,y:h};break;default:t={x:i.x,y:i.y}}var p=u?(0,s.default)(u):null;if(null!=p){var f="y"===p?"height":"width";switch(c){case a.start:t[p]=t[p]-(i[f]/2-o[f]/2);break;case a.end:t[p]=t[p]+(i[f]/2-o[f]/2)}}return t}},(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>o});var n=i(3),r=i(32);function s(e,t,i){return void 0===i&&(i={x:0,y:0}),{top:e.top-t.height-i.y,right:e.right-t.width+i.x,bottom:e.bottom-t.height+i.y,left:e.left-t.width-i.x}}function a(e){return[n.top,n.right,n.bottom,n.left].some((function(t){return e[t]>=0}))}const o={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state,i=e.name,n=t.rects.reference,o=t.rects.popper,l=t.modifiersData.preventOverflow,u=(0,r.default)(t,{elementContext:"reference"}),c=(0,r.default)(t,{altBoundary:!0}),d=s(u,n),h=s(c,o,l),p=a(d),f=a(h);t.modifiersData[i]={referenceClippingOffsets:d,popperEscapeOffsets:h,isReferenceHidden:p,hasPopperEscaped:f},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":p,"data-popper-escaped":f})}}},(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>a,distanceAndSkiddingToXY:()=>s});var n=i(13),r=i(3);function s(e,t,i){var s=(0,n.default)(e),a=[r.left,r.top].indexOf(s)>=0?-1:1,o="function"==typeof i?i(Object.assign({},t,{placement:e})):i,l=o[0],u=o[1];return l=l||0,u=(u||0)*a,[r.left,r.right].indexOf(s)>=0?{x:u,y:l}:{x:l,y:u}}const a={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,i=e.options,n=e.name,a=i.offset,o=void 0===a?[0,0]:a,l=r.placements.reduce((function(e,i){return e[i]=s(i,t.rects,o),e}),{}),u=l[t.placement],c=u.x,d=u.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=c,t.modifiersData.popperOffsets.y+=d),t.modifiersData[n]=l}}},(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>r});var n=i(42);const r={name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state,i=e.name;t.modifiersData[i]=(0,n.default)({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}}},(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>f});var n=i(3),r=i(13),s=i(14),a=i(47),o=i(23),l=i(15),u=i(18),c=i(32),d=i(26),h=i(11),p=i(17);const f={name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,i=e.options,f=e.name,m=i.mainAxis,g=void 0===m||m,v=i.altAxis,y=void 0!==v&&v,_=i.boundary,b=i.rootBoundary,T=i.altBoundary,w=i.padding,S=i.tether,k=void 0===S||S,E=i.tetherOffset,C=void 0===E?0:E,x=(0,c.default)(t,{boundary:_,rootBoundary:b,padding:w,altBoundary:T}),A=(0,r.default)(t.placement),P=(0,d.default)(t.placement),I=!P,O=(0,s.default)(A),L=(0,a.default)(O),D=t.modifiersData.popperOffsets,M=t.rects.reference,N=t.rects.popper,R="function"==typeof C?C(Object.assign({},t.rects,{placement:t.placement})):C,U="number"==typeof R?{mainAxis:R,altAxis:R}:Object.assign({mainAxis:0,altAxis:0},R),B=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,j={x:0,y:0};if(D){if(g){var F,H="y"===O?n.top:n.left,q="y"===O?n.bottom:n.right,z="y"===O?"height":"width",W=D[O],V=W+x[H],$=W-x[q],X=k?-N[z]/2:0,G=P===n.start?M[z]:N[z],Y=P===n.start?-N[z]:-M[z],K=t.elements.arrow,Q=k&&K?(0,l.default)(K):{width:0,height:0},J=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:(0,h.default)(),Z=J[H],ee=J[q],te=(0,o.within)(0,M[z],Q[z]),ie=I?M[z]/2-X-te-Z-U.mainAxis:G-te-Z-U.mainAxis,ne=I?-M[z]/2+X+te+ee+U.mainAxis:Y+te+ee+U.mainAxis,re=t.elements.arrow&&(0,u.default)(t.elements.arrow),se=re?"y"===O?re.clientTop||0:re.clientLeft||0:0,ae=null!=(F=null==B?void 0:B[O])?F:0,oe=W+ie-ae-se,le=W+ne-ae,ue=(0,o.within)(k?(0,p.min)(V,oe):V,W,k?(0,p.max)($,le):$);D[O]=ue,j[O]=ue-W}if(y){var ce,de="x"===O?n.top:n.left,he="x"===O?n.bottom:n.right,pe=D[L],fe="y"===L?"height":"width",me=pe+x[de],ge=pe-x[he],ve=-1!==[n.top,n.left].indexOf(A),ye=null!=(ce=null==B?void 0:B[L])?ce:0,_e=ve?me:pe-M[fe]-N[fe]-ye+U.altAxis,be=ve?pe+M[fe]+N[fe]-ye-U.altAxis:ge,Te=k&&ve?(0,o.withinMaxClamp)(_e,pe,be):(0,o.within)(k?_e:me,pe,k?be:ge);D[L]=Te,j[L]=Te-pe}t.modifiersData[f]=j}},requiresIfExists:["offset"]}},(e,t,i)=>{"use strict";function n(e){return"x"===e?"y":"x"}i.r(t),i.d(t,{default:()=>n})},(e,t,i)=>{"use strict";i.r(t),i.d(t,{createPopper:()=>T,detectOverflow:()=>f.default,popperGenerator:()=>b});var n=i(54),r=i(15),s=i(39),a=i(18),o=i(19),l=i(49),u=i(57),c=i(52),d=i(51),h=i(13),p=i(50),f=i(32),m=i(6),g=i(3),v="Popper: Invalid reference or popper argument provided. They must be either a DOM element or virtual element.",y={placement:"bottom",modifiers:[],strategy:"absolute"};function _(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return!t.some((function(e){return!(e&&"function"==typeof e.getBoundingClientRect)}))}function b(e){void 0===e&&(e={});var t=e,i=t.defaultModifiers,f=void 0===i?[]:i,b=t.defaultOptions,T=void 0===b?y:b;return function(e,t,i){void 0===i&&(i=T);var b={placement:"bottom",orderedModifiers:[],options:Object.assign({},y,T),modifiersData:{},elements:{reference:e,popper:t},attributes:{},styles:{}},w=[],S=!1,k={state:b,setOptions:function(i){var n="function"==typeof i?i(b.options):i;E(),b.options=Object.assign({},T,b.options,n),b.scrollParents={reference:(0,m.isElement)(e)?(0,s.default)(e):e.contextElement?(0,s.default)(e.contextElement):[],popper:(0,s.default)(t)};var r=(0,l.default)((0,p.default)([].concat(f,b.options.modifiers)));if(b.orderedModifiers=r.filter((function(e){return e.enabled})),"production"!==process.env.NODE_ENV){var a=(0,d.default)([].concat(r,b.options.modifiers),(function(e){return e.name}));if((0,c.default)(a),(0,h.default)(b.options.placement)===g.auto)b.orderedModifiers.find((function(e){return"flip"===e.name}))||console.error(['Popper: "auto" placements require the "flip" modifier be',"present and enabled to work."].join(" "));var u=(0,o.default)(t);[u.marginTop,u.marginRight,u.marginBottom,u.marginLeft].some((function(e){return parseFloat(e)}))&&console.warn(['Popper: CSS "margin" styles cannot be used to apply padding',"between the popper and its reference element or boundary.","To replicate margin, use the `offset` modifier, as well as","the `padding` option in the `preventOverflow` and `flip`","modifiers."].join(" "))}return b.orderedModifiers.forEach((function(e){var t=e.name,i=e.options,n=void 0===i?{}:i,r=e.effect;if("function"==typeof r){var s=r({state:b,name:t,instance:k,options:n}),a=function(){};w.push(s||a)}})),k.update()},forceUpdate:function(){if(!S){var e=b.elements,t=e.reference,i=e.popper;if(_(t,i)){b.rects={reference:(0,n.default)(t,(0,a.default)(i),"fixed"===b.options.strategy),popper:(0,r.default)(i)},b.reset=!1,b.placement=b.options.placement,b.orderedModifiers.forEach((function(e){return b.modifiersData[e.name]=Object.assign({},e.data)}));for(var s=0,o=0;o<b.orderedModifiers.length;o++){if("production"!==process.env.NODE_ENV&&(s+=1)>100){console.error("Popper: An infinite loop in the modifiers cycle has been detected! The cycle has been interrupted to prevent a browser crash.");break}if(!0!==b.reset){var l=b.orderedModifiers[o],u=l.fn,c=l.options,d=void 0===c?{}:c,h=l.name;"function"==typeof u&&(b=u({state:b,options:d,name:h,instance:k})||b)}else b.reset=!1,o=-1}}else"production"!==process.env.NODE_ENV&&console.error(v)}},update:(0,u.default)((function(){return new Promise((function(e){k.forceUpdate(),e(b)}))})),destroy:function(){E(),S=!0}};if(!_(e,t))return"production"!==process.env.NODE_ENV&&console.error(v),k;function E(){w.forEach((function(e){return e()})),w=[]}return k.setOptions(i).then((function(e){!S&&i.onFirstUpdate&&i.onFirstUpdate(e)})),k}}var T=b()},(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>s});var n=i(3);function r(e){var t=new Map,i=new Set,n=[];function r(e){i.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach((function(e){if(!i.has(e)){var n=t.get(e);n&&r(n)}})),n.push(e)}return e.forEach((function(e){t.set(e.name,e)})),e.forEach((function(e){i.has(e.name)||r(e)})),n}function s(e){var t=r(e);return n.modifierPhases.reduce((function(e,i){return e.concat(t.filter((function(e){return e.phase===i})))}),[])}},(e,t,i)=>{"use strict";function n(e){var t=e.reduce((function(e,t){var i=e[t.name];return e[t.name]=i?Object.assign({},i,t,{options:Object.assign({},i.options,t.options),data:Object.assign({},i.data,t.data)}):t,e}),{});return Object.keys(t).map((function(e){return t[e]}))}i.r(t),i.d(t,{default:()=>n})},(e,t,i)=>{"use strict";function n(e,t){var i=new Set;return e.filter((function(e){var n=t(e);if(!i.has(n))return i.add(n),!0}))}i.r(t),i.d(t,{default:()=>n})},(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>o});var n=i(53),r=i(3),s='Popper: modifier "%s" provided an invalid %s property, expected %s but got %s',a=["name","enabled","phase","fn","effect","requires","options"];function o(e){e.forEach((function(t){[].concat(Object.keys(t),a).filter((function(e,t,i){return i.indexOf(e)===t})).forEach((function(i){switch(i){case"name":"string"!=typeof t.name&&console.error((0,n.default)(s,String(t.name),'"name"','"string"','"'+String(t.name)+'"'));break;case"enabled":"boolean"!=typeof t.enabled&&console.error((0,n.default)(s,t.name,'"enabled"','"boolean"','"'+String(t.enabled)+'"'));break;case"phase":r.modifierPhases.indexOf(t.phase)<0&&console.error((0,n.default)(s,t.name,'"phase"',"either "+r.modifierPhases.join(", "),'"'+String(t.phase)+'"'));break;case"fn":"function"!=typeof t.fn&&console.error((0,n.default)(s,t.name,'"fn"','"function"','"'+String(t.fn)+'"'));break;case"effect":null!=t.effect&&"function"!=typeof t.effect&&console.error((0,n.default)(s,t.name,'"effect"','"function"','"'+String(t.fn)+'"'));break;case"requires":null==t.requires||Array.isArray(t.requires)||console.error((0,n.default)(s,t.name,'"requires"','"array"','"'+String(t.requires)+'"'));break;case"requiresIfExists":Array.isArray(t.requiresIfExists)||console.error((0,n.default)(s,t.name,'"requiresIfExists"','"array"','"'+String(t.requiresIfExists)+'"'));break;case"options":case"data":break;default:console.error('PopperJS: an invalid property has been provided to the "'+t.name+'" modifier, valid properties are '+a.map((function(e){return'"'+e+'"'})).join(", ")+'; but "'+i+'" was provided.')}t.requires&&t.requires.forEach((function(i){null==e.find((function(e){return e.name===i}))&&console.error((0,n.default)('Popper: modifier "%s" requires "%s", but "%s" modifier is not available',String(t.name),i,i))}))}))}))}},(e,t,i)=>{"use strict";function n(e){for(var t=arguments.length,i=new Array(t>1?t-1:0),n=1;n<t;n++)i[n-1]=arguments[n];return[].concat(i).reduce((function(e,t){return e.replace(/%s/,t)}),e)}i.r(t),i.d(t,{default:()=>n})},(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>d});var n=i(16),r=i(55),s=i(8),a=i(6),o=i(36),l=i(21),u=i(41),c=i(17);function d(e,t,i){void 0===i&&(i=!1);var d=(0,a.isHTMLElement)(t),h=(0,a.isHTMLElement)(t)&&function(e){var t=e.getBoundingClientRect(),i=(0,c.round)(t.width)/e.offsetWidth||1,n=(0,c.round)(t.height)/e.offsetHeight||1;return 1!==i||1!==n}(t),p=(0,l.default)(t),f=(0,n.default)(e,h),m={scrollLeft:0,scrollTop:0},g={x:0,y:0};return(d||!d&&!i)&&(("body"!==(0,s.default)(t)||(0,u.default)(p))&&(m=(0,r.default)(t)),(0,a.isHTMLElement)(t)?((g=(0,n.default)(t,!0)).x+=t.clientLeft,g.y+=t.clientTop):p&&(g.x=(0,o.default)(p))),{x:f.left+m.scrollLeft-g.x,y:f.top+m.scrollTop-g.y,width:f.width,height:f.height}}},(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>o});var n=i(37),r=i(7),s=i(6),a=i(56);function o(e){return e!==(0,r.default)(e)&&(0,s.isHTMLElement)(e)?(0,a.default)(e):(0,n.default)(e)}},(e,t,i)=>{"use strict";function n(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}i.r(t),i.d(t,{default:()=>n})},(e,t,i)=>{"use strict";function n(e){var t;return function(){return t||(t=new Promise((function(i){Promise.resolve().then((function(){t=void 0,i(e())}))}))),t}}i.r(t),i.d(t,{default:()=>n})},(e,t,i)=>{"use strict";i.r(t),i.d(t,{applyStyles:()=>m.applyStyles,arrow:()=>m.arrow,computeStyles:()=>m.computeStyles,createPopper:()=>v,createPopperLite:()=>f.createPopper,defaultModifiers:()=>g,detectOverflow:()=>r.default,eventListeners:()=>m.eventListeners,flip:()=>m.flip,hide:()=>m.hide,offset:()=>m.offset,popperGenerator:()=>n.popperGenerator,popperOffsets:()=>m.popperOffsets,preventOverflow:()=>m.preventOverflow});var n=i(48),r=i(32),s=i(27),a=i(45),o=i(25),l=i(5),u=i(44),c=i(28),d=i(46),h=i(9),p=i(43),f=i(59),m=i(4),g=[s.default,a.default,o.default,l.default,u.default,c.default,d.default,h.default,p.default],v=(0,n.popperGenerator)({defaultModifiers:g})},(e,t,i)=>{"use strict";i.r(t),i.d(t,{createPopper:()=>c,defaultModifiers:()=>u,detectOverflow:()=>r.default,popperGenerator:()=>n.popperGenerator});var n=i(48),r=i(32),s=i(27),a=i(45),o=i(25),l=i(5),u=[s.default,a.default,o.default,l.default],c=(0,n.popperGenerator)({defaultModifiers:u})},(e,t,i)=>{"use strict";i.r(t)},function(e,t){var i;!function(t,i){"use strict";"object"==typeof e.exports?e.exports=t.document?i(t,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return i(e)}:i(t)}("undefined"!=typeof window?window:this,(function(n,r){"use strict";var s=[],a=Object.getPrototypeOf,o=s.slice,l=s.flat?function(e){return s.flat.call(e)}:function(e){return s.concat.apply([],e)},u=s.push,c=s.indexOf,d={},h=d.toString,p=d.hasOwnProperty,f=p.toString,m=f.call(Object),g={},v=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType&&"function"!=typeof e.item},y=function(e){return null!=e&&e===e.window},_=n.document,b={type:!0,src:!0,nonce:!0,noModule:!0};function T(e,t,i){var n,r,s=(i=i||_).createElement("script");if(s.text=e,t)for(n in b)(r=t[n]||t.getAttribute&&t.getAttribute(n))&&s.setAttribute(n,r);i.head.appendChild(s).parentNode.removeChild(s)}function w(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?d[h.call(e)]||"object":typeof e}var S="3.6.0",k=function(e,t){return new k.fn.init(e,t)};function E(e){var t=!!e&&"length" in e&&e.length,i=w(e);return!v(e)&&!y(e)&&("array"===i||0===t||"number"==typeof t&&t>0&&t-1 in e)}k.fn=k.prototype={jquery:S,constructor:k,length:0,toArray:function(){return o.call(this)},get:function(e){return null==e?o.call(this):e<0?this[e+this.length]:this[e]},pushStack:function(e){var t=k.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return k.each(this,e)},map:function(e){return this.pushStack(k.map(this,(function(t,i){return e.call(t,i,t)})))},slice:function(){return this.pushStack(o.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},even:function(){return this.pushStack(k.grep(this,(function(e,t){return(t+1)%2})))},odd:function(){return this.pushStack(k.grep(this,(function(e,t){return t%2})))},eq:function(e){var t=this.length,i=+e+(e<0?t:0);return this.pushStack(i>=0&&i<t?[this[i]]:[])},end:function(){return this.prevObject||this.constructor()},push:u,sort:s.sort,splice:s.splice},k.extend=k.fn.extend=function(){var e,t,i,n,r,s,a=arguments[0]||{},o=1,l=arguments.length,u=!1;for("boolean"==typeof a&&(u=a,a=arguments[o]||{},o++),"object"==typeof a||v(a)||(a={}),o===l&&(a=this,o--);o<l;o++)if(null!=(e=arguments[o]))for(t in e)n=e[t],"__proto__"!==t&&a!==n&&(u&&n&&(k.isPlainObject(n)||(r=Array.isArray(n)))?(i=a[t],s=r&&!Array.isArray(i)?[]:r||k.isPlainObject(i)?i:{},r=!1,a[t]=k.extend(u,s,n)):void 0!==n&&(a[t]=n));return a},k.extend({expando:"jQuery"+(S+Math.random()).replace(/\D/g,""),isReady:!0,error:function(e){throw new Error(e)},noop:function(){},isPlainObject:function(e){var t,i;return!(!e||"[object Object]"!==h.call(e))&&(!(t=a(e))||"function"==typeof(i=p.call(t,"constructor")&&t.constructor)&&f.call(i)===m)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},globalEval:function(e,t,i){T(e,{nonce:t&&t.nonce},i)},each:function(e,t){var i,n=0;if(E(e))for(i=e.length;n<i&&!1!==t.call(e[n],n,e[n]);n++);else for(n in e)if(!1===t.call(e[n],n,e[n]))break;return e},makeArray:function(e,t){var i=t||[];return null!=e&&(E(Object(e))?k.merge(i,"string"==typeof e?[e]:e):u.call(i,e)),i},inArray:function(e,t,i){return null==t?-1:c.call(t,e,i)},merge:function(e,t){for(var i=+t.length,n=0,r=e.length;n<i;n++)e[r++]=t[n];return e.length=r,e},grep:function(e,t,i){for(var n=[],r=0,s=e.length,a=!i;r<s;r++)!t(e[r],r)!==a&&n.push(e[r]);return n},map:function(e,t,i){var n,r,s=0,a=[];if(E(e))for(n=e.length;s<n;s++)null!=(r=t(e[s],s,i))&&a.push(r);else for(s in e)null!=(r=t(e[s],s,i))&&a.push(r);return l(a)},guid:1,support:g}),"function"==typeof Symbol&&(k.fn[Symbol.iterator]=s[Symbol.iterator]),k.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),(function(e,t){d["[object "+t+"]"]=t.toLowerCase()}));var C=function(e){var t,i,n,r,s,a,o,l,u,c,d,h,p,f,m,g,v,y,_,b="sizzle"+1*new Date,T=e.document,w=0,S=0,k=le(),E=le(),C=le(),x=le(),A=function(e,t){return e===t&&(d=!0),0},P={}.hasOwnProperty,I=[],O=I.pop,L=I.push,D=I.push,M=I.slice,N=function(e,t){for(var i=0,n=e.length;i<n;i++)if(e[i]===t)return i;return-1},R="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",U="[\\x20\\t\\r\\n\\f]",B="(?:\\\\[\\da-fA-F]{1,6}[\\x20\\t\\r\\n\\f]?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+",j="\\[[\\x20\\t\\r\\n\\f]*("+B+")(?:"+U+"*([*^$|!~]?=)"+U+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+B+"))|)"+U+"*\\]",F=":("+B+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+j+")*)|.*)\\)|)",H=new RegExp(U+"+","g"),q=new RegExp("^[\\x20\\t\\r\\n\\f]+|((?:^|[^\\\\])(?:\\\\.)*)[\\x20\\t\\r\\n\\f]+$","g"),z=new RegExp("^[\\x20\\t\\r\\n\\f]*,[\\x20\\t\\r\\n\\f]*"),W=new RegExp("^[\\x20\\t\\r\\n\\f]*([>+~]|[\\x20\\t\\r\\n\\f])[\\x20\\t\\r\\n\\f]*"),V=new RegExp(U+"|>"),$=new RegExp(F),X=new RegExp("^"+B+"$"),G={ID:new RegExp("^#("+B+")"),CLASS:new RegExp("^\\.("+B+")"),TAG:new RegExp("^("+B+"|[*])"),ATTR:new RegExp("^"+j),PSEUDO:new RegExp("^"+F),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\([\\x20\\t\\r\\n\\f]*(even|odd|(([+-]|)(\\d*)n|)[\\x20\\t\\r\\n\\f]*(?:([+-]|)[\\x20\\t\\r\\n\\f]*(\\d+)|))[\\x20\\t\\r\\n\\f]*\\)|)","i"),bool:new RegExp("^(?:"+R+")$","i"),needsContext:new RegExp("^[\\x20\\t\\r\\n\\f]*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\([\\x20\\t\\r\\n\\f]*((?:-\\d)?\\d*)[\\x20\\t\\r\\n\\f]*\\)|)(?=[^-]|$)","i")},Y=/HTML$/i,K=/^(?:input|select|textarea|button)$/i,Q=/^h\d$/i,J=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ee=/[+~]/,te=new RegExp("\\\\[\\da-fA-F]{1,6}[\\x20\\t\\r\\n\\f]?|\\\\([^\\r\\n\\f])","g"),ie=function(e,t){var i="0x"+e.slice(1)-65536;return t||(i<0?String.fromCharCode(i+65536):String.fromCharCode(i>>10|55296,1023&i|56320))},ne=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,re=function(e,t){return t?"\0"===e?"�":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},se=function(){h()},ae=be((function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()}),{dir:"parentNode",next:"legend"});try{D.apply(I=M.call(T.childNodes),T.childNodes),I[T.childNodes.length].nodeType}catch(e){D={apply:I.length?function(e,t){L.apply(e,M.call(t))}:function(e,t){for(var i=e.length,n=0;e[i++]=t[n++];);e.length=i-1}}}function oe(e,t,n,r){var s,o,u,c,d,f,v,y=t&&t.ownerDocument,T=t?t.nodeType:9;if(n=n||[],"string"!=typeof e||!e||1!==T&&9!==T&&11!==T)return n;if(!r&&(h(t),t=t||p,m)){if(11!==T&&(d=Z.exec(e)))if(s=d[1]){if(9===T){if(!(u=t.getElementById(s)))return n;if(u.id===s)return n.push(u),n}else if(y&&(u=y.getElementById(s))&&_(t,u)&&u.id===s)return n.push(u),n}else{if(d[2])return D.apply(n,t.getElementsByTagName(e)),n;if((s=d[3])&&i.getElementsByClassName&&t.getElementsByClassName)return D.apply(n,t.getElementsByClassName(s)),n}if(i.qsa&&!x[e+" "]&&(!g||!g.test(e))&&(1!==T||"object"!==t.nodeName.toLowerCase())){if(v=e,y=t,1===T&&(V.test(e)||W.test(e))){for((y=ee.test(e)&&ve(t.parentNode)||t)===t&&i.scope||((c=t.getAttribute("id"))?c=c.replace(ne,re):t.setAttribute("id",c=b)),o=(f=a(e)).length;o--;)f[o]=(c?"#"+c:":scope")+" "+_e(f[o]);v=f.join(",")}try{return D.apply(n,y.querySelectorAll(v)),n}catch(t){x(e,!0)}finally{c===b&&t.removeAttribute("id")}}}return l(e.replace(q,"$1"),t,n,r)}function le(){var e=[];return function t(i,r){return e.push(i+" ")>n.cacheLength&&delete t[e.shift()],t[i+" "]=r}}function ue(e){return e[b]=!0,e}function ce(e){var t=p.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function de(e,t){for(var i=e.split("|"),r=i.length;r--;)n.attrHandle[i[r]]=t}function he(e,t){var i=t&&e,n=i&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(n)return n;if(i)for(;i=i.nextSibling;)if(i===t)return-1;return e?1:-1}function pe(e){return function(t){return"input"===t.nodeName.toLowerCase()&&t.type===e}}function fe(e){return function(t){var i=t.nodeName.toLowerCase();return("input"===i||"button"===i)&&t.type===e}}function me(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&&ae(t)===e:t.disabled===e:"label" in t&&t.disabled===e}}function ge(e){return ue((function(t){return t=+t,ue((function(i,n){for(var r,s=e([],i.length,t),a=s.length;a--;)i[r=s[a]]&&(i[r]=!(n[r]=i[r]))}))}))}function ve(e){return e&&void 0!==e.getElementsByTagName&&e}for(t in i=oe.support={},s=oe.isXML=function(e){var t=e&&e.namespaceURI,i=e&&(e.ownerDocument||e).documentElement;return!Y.test(t||i&&i.nodeName||"HTML")},h=oe.setDocument=function(e){var t,r,a=e?e.ownerDocument||e:T;return a!=p&&9===a.nodeType&&a.documentElement?(f=(p=a).documentElement,m=!s(p),T!=p&&(r=p.defaultView)&&r.top!==r&&(r.addEventListener?r.addEventListener("unload",se,!1):r.attachEvent&&r.attachEvent("onunload",se)),i.scope=ce((function(e){return f.appendChild(e).appendChild(p.createElement("div")),void 0!==e.querySelectorAll&&!e.querySelectorAll(":scope fieldset div").length})),i.attributes=ce((function(e){return e.className="i",!e.getAttribute("className")})),i.getElementsByTagName=ce((function(e){return e.appendChild(p.createComment("")),!e.getElementsByTagName("*").length})),i.getElementsByClassName=J.test(p.getElementsByClassName),i.getById=ce((function(e){return f.appendChild(e).id=b,!p.getElementsByName||!p.getElementsByName(b).length})),i.getById?(n.filter.ID=function(e){var t=e.replace(te,ie);return function(e){return e.getAttribute("id")===t}},n.find.ID=function(e,t){if(void 0!==t.getElementById&&m){var i=t.getElementById(e);return i?[i]:[]}}):(n.filter.ID=function(e){var t=e.replace(te,ie);return function(e){var i=void 0!==e.getAttributeNode&&e.getAttributeNode("id");return i&&i.value===t}},n.find.ID=function(e,t){if(void 0!==t.getElementById&&m){var i,n,r,s=t.getElementById(e);if(s){if((i=s.getAttributeNode("id"))&&i.value===e)return[s];for(r=t.getElementsByName(e),n=0;s=r[n++];)if((i=s.getAttributeNode("id"))&&i.value===e)return[s]}return[]}}),n.find.TAG=i.getElementsByTagName?function(e,t){return void 0!==t.getElementsByTagName?t.getElementsByTagName(e):i.qsa?t.querySelectorAll(e):void 0}:function(e,t){var i,n=[],r=0,s=t.getElementsByTagName(e);if("*"===e){for(;i=s[r++];)1===i.nodeType&&n.push(i);return n}return s},n.find.CLASS=i.getElementsByClassName&&function(e,t){if(void 0!==t.getElementsByClassName&&m)return t.getElementsByClassName(e)},v=[],g=[],(i.qsa=J.test(p.querySelectorAll))&&(ce((function(e){var t;f.appendChild(e).innerHTML="<a id='"+b+"'></a><select id='"+b+"-\r\\' msallowcapture=''><option selected=''></option></select>",e.querySelectorAll("[msallowcapture^='']").length&&g.push("[*^$]=[\\x20\\t\\r\\n\\f]*(?:''|\"\")"),e.querySelectorAll("[selected]").length||g.push("\\[[\\x20\\t\\r\\n\\f]*(?:value|"+R+")"),e.querySelectorAll("[id~="+b+"-]").length||g.push("~="),(t=p.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||g.push("\\[[\\x20\\t\\r\\n\\f]*name[\\x20\\t\\r\\n\\f]*=[\\x20\\t\\r\\n\\f]*(?:''|\"\")"),e.querySelectorAll(":checked").length||g.push(":checked"),e.querySelectorAll("a#"+b+"+*").length||g.push(".#.+[+~]"),e.querySelectorAll("\\\f"),g.push("[\\r\\n\\f]")})),ce((function(e){e.innerHTML="<a href='' disabled='disabled'></a><select disabled='disabled'><option/></select>";var t=p.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&g.push("name[\\x20\\t\\r\\n\\f]*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&g.push(":enabled",":disabled"),f.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&g.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),g.push(",.*:")}))),(i.matchesSelector=J.test(y=f.matches||f.webkitMatchesSelector||f.mozMatchesSelector||f.oMatchesSelector||f.msMatchesSelector))&&ce((function(e){i.disconnectedMatch=y.call(e,"*"),y.call(e,"[s!='']:x"),v.push("!=",F)})),g=g.length&&new RegExp(g.join("|")),v=v.length&&new RegExp(v.join("|")),t=J.test(f.compareDocumentPosition),_=t||J.test(f.contains)?function(e,t){var i=9===e.nodeType?e.documentElement:e,n=t&&t.parentNode;return e===n||!(!n||1!==n.nodeType||!(i.contains?i.contains(n):e.compareDocumentPosition&&16&e.compareDocumentPosition(n)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},A=t?function(e,t){if(e===t)return d=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!i.sortDetached&&t.compareDocumentPosition(e)===n?e==p||e.ownerDocument==T&&_(T,e)?-1:t==p||t.ownerDocument==T&&_(T,t)?1:c?N(c,e)-N(c,t):0:4&n?-1:1)}:function(e,t){if(e===t)return d=!0,0;var i,n=0,r=e.parentNode,s=t.parentNode,a=[e],o=[t];if(!r||!s)return e==p?-1:t==p?1:r?-1:s?1:c?N(c,e)-N(c,t):0;if(r===s)return he(e,t);for(i=e;i=i.parentNode;)a.unshift(i);for(i=t;i=i.parentNode;)o.unshift(i);for(;a[n]===o[n];)n++;return n?he(a[n],o[n]):a[n]==T?-1:o[n]==T?1:0},p):p},oe.matches=function(e,t){return oe(e,null,null,t)},oe.matchesSelector=function(e,t){if(h(e),i.matchesSelector&&m&&!x[t+" "]&&(!v||!v.test(t))&&(!g||!g.test(t)))try{var n=y.call(e,t);if(n||i.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){x(t,!0)}return oe(t,p,null,[e]).length>0},oe.contains=function(e,t){return(e.ownerDocument||e)!=p&&h(e),_(e,t)},oe.attr=function(e,t){(e.ownerDocument||e)!=p&&h(e);var r=n.attrHandle[t.toLowerCase()],s=r&&P.call(n.attrHandle,t.toLowerCase())?r(e,t,!m):void 0;return void 0!==s?s:i.attributes||!m?e.getAttribute(t):(s=e.getAttributeNode(t))&&s.specified?s.value:null},oe.escape=function(e){return(e+"").replace(ne,re)},oe.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},oe.uniqueSort=function(e){var t,n=[],r=0,s=0;if(d=!i.detectDuplicates,c=!i.sortStable&&e.slice(0),e.sort(A),d){for(;t=e[s++];)t===e[s]&&(r=n.push(s));for(;r--;)e.splice(n[r],1)}return c=null,e},r=oe.getText=function(e){var t,i="",n=0,s=e.nodeType;if(s){if(1===s||9===s||11===s){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)i+=r(e)}else if(3===s||4===s)return e.nodeValue}else for(;t=e[n++];)i+=r(t);return i},n=oe.selectors={cacheLength:50,createPseudo:ue,match:G,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(te,ie),e[3]=(e[3]||e[4]||e[5]||"").replace(te,ie),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||oe.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&oe.error(e[0]),e},PSEUDO:function(e){var t,i=!e[6]&&e[2];return G.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":i&&$.test(i)&&(t=a(i,!0))&&(t=i.indexOf(")",i.length-t)-i.length)&&(e[0]=e[0].slice(0,t),e[2]=i.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(te,ie).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=k[e+" "];return t||(t=new RegExp("(^|[\\x20\\t\\r\\n\\f])"+e+"("+U+"|$)"))&&k(e,(function(e){return t.test("string"==typeof e.className&&e.className||void 0!==e.getAttribute&&e.getAttribute("class")||"")}))},ATTR:function(e,t,i){return function(n){var r=oe.attr(n,e);return null==r?"!="===t:!t||(r+="","="===t?r===i:"!="===t?r!==i:"^="===t?i&&0===r.indexOf(i):"*="===t?i&&r.indexOf(i)>-1:"$="===t?i&&r.slice(-i.length)===i:"~="===t?(" "+r.replace(H," ")+" ").indexOf(i)>-1:"|="===t&&(r===i||r.slice(0,i.length+1)===i+"-"))}},CHILD:function(e,t,i,n,r){var s="nth"!==e.slice(0,3),a="last"!==e.slice(-4),o="of-type"===t;return 1===n&&0===r?function(e){return!!e.parentNode}:function(t,i,l){var u,c,d,h,p,f,m=s!==a?"nextSibling":"previousSibling",g=t.parentNode,v=o&&t.nodeName.toLowerCase(),y=!l&&!o,_=!1;if(g){if(s){for(;m;){for(h=t;h=h[m];)if(o?h.nodeName.toLowerCase()===v:1===h.nodeType)return!1;f=m="only"===e&&!f&&"nextSibling"}return!0}if(f=[a?g.firstChild:g.lastChild],a&&y){for(_=(p=(u=(c=(d=(h=g)[b]||(h[b]={}))[h.uniqueID]||(d[h.uniqueID]={}))[e]||[])[0]===w&&u[1])&&u[2],h=p&&g.childNodes[p];h=++p&&h&&h[m]||(_=p=0)||f.pop();)if(1===h.nodeType&&++_&&h===t){c[e]=[w,p,_];break}}else if(y&&(_=p=(u=(c=(d=(h=t)[b]||(h[b]={}))[h.uniqueID]||(d[h.uniqueID]={}))[e]||[])[0]===w&&u[1]),!1===_)for(;(h=++p&&h&&h[m]||(_=p=0)||f.pop())&&((o?h.nodeName.toLowerCase()!==v:1!==h.nodeType)||!++_||(y&&((c=(d=h[b]||(h[b]={}))[h.uniqueID]||(d[h.uniqueID]={}))[e]=[w,_]),h!==t)););return(_-=r)===n||_%n==0&&_/n>=0}}},PSEUDO:function(e,t){var i,r=n.pseudos[e]||n.setFilters[e.toLowerCase()]||oe.error("unsupported pseudo: "+e);return r[b]?r(t):r.length>1?(i=[e,e,"",t],n.setFilters.hasOwnProperty(e.toLowerCase())?ue((function(e,i){for(var n,s=r(e,t),a=s.length;a--;)e[n=N(e,s[a])]=!(i[n]=s[a])})):function(e){return r(e,0,i)}):r}},pseudos:{not:ue((function(e){var t=[],i=[],n=o(e.replace(q,"$1"));return n[b]?ue((function(e,t,i,r){for(var s,a=n(e,null,r,[]),o=e.length;o--;)(s=a[o])&&(e[o]=!(t[o]=s))})):function(e,r,s){return t[0]=e,n(t,null,s,i),t[0]=null,!i.pop()}})),has:ue((function(e){return function(t){return oe(e,t).length>0}})),contains:ue((function(e){return e=e.replace(te,ie),function(t){return(t.textContent||r(t)).indexOf(e)>-1}})),lang:ue((function(e){return X.test(e||"")||oe.error("unsupported lang: "+e),e=e.replace(te,ie).toLowerCase(),function(t){var i;do{if(i=m?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return(i=i.toLowerCase())===e||0===i.indexOf(e+"-")}while((t=t.parentNode)&&1===t.nodeType);return!1}})),target:function(t){var i=e.location&&e.location.hash;return i&&i.slice(1)===t.id},root:function(e){return e===f},focus:function(e){return e===p.activeElement&&(!p.hasFocus||p.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:me(!1),disabled:me(!0),checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!n.pseudos.empty(e)},header:function(e){return Q.test(e.nodeName)},input:function(e){return K.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:ge((function(){return[0]})),last:ge((function(e,t){return[t-1]})),eq:ge((function(e,t,i){return[i<0?i+t:i]})),even:ge((function(e,t){for(var i=0;i<t;i+=2)e.push(i);return e})),odd:ge((function(e,t){for(var i=1;i<t;i+=2)e.push(i);return e})),lt:ge((function(e,t,i){for(var n=i<0?i+t:i>t?t:i;--n>=0;)e.push(n);return e})),gt:ge((function(e,t,i){for(var n=i<0?i+t:i;++n<t;)e.push(n);return e}))}},n.pseudos.nth=n.pseudos.eq,{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})n.pseudos[t]=pe(t);for(t in{submit:!0,reset:!0})n.pseudos[t]=fe(t);function ye(){}function _e(e){for(var t=0,i=e.length,n="";t<i;t++)n+=e[t].value;return n}function be(e,t,i){var n=t.dir,r=t.next,s=r||n,a=i&&"parentNode"===s,o=S++;return t.first?function(t,i,r){for(;t=t[n];)if(1===t.nodeType||a)return e(t,i,r);return!1}:function(t,i,l){var u,c,d,h=[w,o];if(l){for(;t=t[n];)if((1===t.nodeType||a)&&e(t,i,l))return!0}else for(;t=t[n];)if(1===t.nodeType||a)if(c=(d=t[b]||(t[b]={}))[t.uniqueID]||(d[t.uniqueID]={}),r&&r===t.nodeName.toLowerCase())t=t[n]||t;else{if((u=c[s])&&u[0]===w&&u[1]===o)return h[2]=u[2];if(c[s]=h,h[2]=e(t,i,l))return!0}return!1}}function Te(e){return e.length>1?function(t,i,n){for(var r=e.length;r--;)if(!e[r](t,i,n))return!1;return!0}:e[0]}function we(e,t,i,n,r){for(var s,a=[],o=0,l=e.length,u=null!=t;o<l;o++)(s=e[o])&&(i&&!i(s,n,r)||(a.push(s),u&&t.push(o)));return a}function Se(e,t,i,n,r,s){return n&&!n[b]&&(n=Se(n)),r&&!r[b]&&(r=Se(r,s)),ue((function(s,a,o,l){var u,c,d,h=[],p=[],f=a.length,m=s||function(e,t,i){for(var n=0,r=t.length;n<r;n++)oe(e,t[n],i);return i}(t||"*",o.nodeType?[o]:o,[]),g=!e||!s&&t?m:we(m,h,e,o,l),v=i?r||(s?e:f||n)?[]:a:g;if(i&&i(g,v,o,l),n)for(u=we(v,p),n(u,[],o,l),c=u.length;c--;)(d=u[c])&&(v[p[c]]=!(g[p[c]]=d));if(s){if(r||e){if(r){for(u=[],c=v.length;c--;)(d=v[c])&&u.push(g[c]=d);r(null,v=[],u,l)}for(c=v.length;c--;)(d=v[c])&&(u=r?N(s,d):h[c])>-1&&(s[u]=!(a[u]=d))}}else v=we(v===a?v.splice(f,v.length):v),r?r(null,a,v,l):D.apply(a,v)}))}function ke(e){for(var t,i,r,s=e.length,a=n.relative[e[0].type],o=a||n.relative[" "],l=a?1:0,c=be((function(e){return e===t}),o,!0),d=be((function(e){return N(t,e)>-1}),o,!0),h=[function(e,i,n){var r=!a&&(n||i!==u)||((t=i).nodeType?c(e,i,n):d(e,i,n));return t=null,r}];l<s;l++)if(i=n.relative[e[l].type])h=[be(Te(h),i)];else{if((i=n.filter[e[l].type].apply(null,e[l].matches))[b]){for(r=++l;r<s&&!n.relative[e[r].type];r++);return Se(l>1&&Te(h),l>1&&_e(e.slice(0,l-1).concat({value:" "===e[l-2].type?"*":""})).replace(q,"$1"),i,l<r&&ke(e.slice(l,r)),r<s&&ke(e=e.slice(r)),r<s&&_e(e))}h.push(i)}return Te(h)}return ye.prototype=n.filters=n.pseudos,n.setFilters=new ye,a=oe.tokenize=function(e,t){var i,r,s,a,o,l,u,c=E[e+" "];if(c)return t?0:c.slice(0);for(o=e,l=[],u=n.preFilter;o;){for(a in i&&!(r=z.exec(o))||(r&&(o=o.slice(r[0].length)||o),l.push(s=[])),i=!1,(r=W.exec(o))&&(i=r.shift(),s.push({value:i,type:r[0].replace(q," ")}),o=o.slice(i.length)),n.filter)!(r=G[a].exec(o))||u[a]&&!(r=u[a](r))||(i=r.shift(),s.push({value:i,type:a,matches:r}),o=o.slice(i.length));if(!i)break}return t?o.length:o?oe.error(e):E(e,l).slice(0)},o=oe.compile=function(e,t){var i,r=[],s=[],o=C[e+" "];if(!o){for(t||(t=a(e)),i=t.length;i--;)(o=ke(t[i]))[b]?r.push(o):s.push(o);o=C(e,function(e,t){var i=t.length>0,r=e.length>0,s=function(s,a,o,l,c){var d,f,g,v=0,y="0",_=s&&[],b=[],T=u,S=s||r&&n.find.TAG("*",c),k=w+=null==T?1:Math.random()||.1,E=S.length;for(c&&(u=a==p||a||c);y!==E&&null!=(d=S[y]);y++){if(r&&d){for(f=0,a||d.ownerDocument==p||(h(d),o=!m);g=e[f++];)if(g(d,a||p,o)){l.push(d);break}c&&(w=k)}i&&((d=!g&&d)&&v--,s&&_.push(d))}if(v+=y,i&&y!==v){for(f=0;g=t[f++];)g(_,b,a,o);if(s){if(v>0)for(;y--;)_[y]||b[y]||(b[y]=O.call(l));b=we(b)}D.apply(l,b),c&&!s&&b.length>0&&v+t.length>1&&oe.uniqueSort(l)}return c&&(w=k,u=T),_};return i?ue(s):s}(s,r)),o.selector=e}return o},l=oe.select=function(e,t,i,r){var s,l,u,c,d,h="function"==typeof e&&e,p=!r&&a(e=h.selector||e);if(i=i||[],1===p.length){if((l=p[0]=p[0].slice(0)).length>2&&"ID"===(u=l[0]).type&&9===t.nodeType&&m&&n.relative[l[1].type]){if(!(t=(n.find.ID(u.matches[0].replace(te,ie),t)||[])[0]))return i;h&&(t=t.parentNode),e=e.slice(l.shift().value.length)}for(s=G.needsContext.test(e)?0:l.length;s--&&(u=l[s],!n.relative[c=u.type]);)if((d=n.find[c])&&(r=d(u.matches[0].replace(te,ie),ee.test(l[0].type)&&ve(t.parentNode)||t))){if(l.splice(s,1),!(e=r.length&&_e(l)))return D.apply(i,r),i;break}}return(h||o(e,p))(r,t,!m,i,!t||ee.test(e)&&ve(t.parentNode)||t),i},i.sortStable=b.split("").sort(A).join("")===b,i.detectDuplicates=!!d,h(),i.sortDetached=ce((function(e){return 1&e.compareDocumentPosition(p.createElement("fieldset"))})),ce((function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")}))||de("type|href|height|width",(function(e,t,i){if(!i)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)})),i.attributes&&ce((function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")}))||de("value",(function(e,t,i){if(!i&&"input"===e.nodeName.toLowerCase())return e.defaultValue})),ce((function(e){return null==e.getAttribute("disabled")}))||de(R,(function(e,t,i){var n;if(!i)return!0===e[t]?t.toLowerCase():(n=e.getAttributeNode(t))&&n.specified?n.value:null})),oe}(n);k.find=C,k.expr=C.selectors,k.expr[":"]=k.expr.pseudos,k.uniqueSort=k.unique=C.uniqueSort,k.text=C.getText,k.isXMLDoc=C.isXML,k.contains=C.contains,k.escapeSelector=C.escape;var x=function(e,t,i){for(var n=[],r=void 0!==i;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(r&&k(e).is(i))break;n.push(e)}return n},A=function(e,t){for(var i=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&i.push(e);return i},P=k.expr.match.needsContext;function I(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}var O=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function L(e,t,i){return v(t)?k.grep(e,(function(e,n){return!!t.call(e,n,e)!==i})):t.nodeType?k.grep(e,(function(e){return e===t!==i})):"string"!=typeof t?k.grep(e,(function(e){return c.call(t,e)>-1!==i})):k.filter(t,e,i)}k.filter=function(e,t,i){var n=t[0];return i&&(e=":not("+e+")"),1===t.length&&1===n.nodeType?k.find.matchesSelector(n,e)?[n]:[]:k.find.matches(e,k.grep(t,(function(e){return 1===e.nodeType})))},k.fn.extend({find:function(e){var t,i,n=this.length,r=this;if("string"!=typeof e)return this.pushStack(k(e).filter((function(){for(t=0;t<n;t++)if(k.contains(r[t],this))return!0})));for(i=this.pushStack([]),t=0;t<n;t++)k.find(e,r[t],i);return n>1?k.uniqueSort(i):i},filter:function(e){return this.pushStack(L(this,e||[],!1))},not:function(e){return this.pushStack(L(this,e||[],!0))},is:function(e){return!!L(this,"string"==typeof e&&P.test(e)?k(e):e||[],!1).length}});var D,M=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(k.fn.init=function(e,t,i){var n,r;if(!e)return this;if(i=i||D,"string"==typeof e){if(!(n="<"===e[0]&&">"===e[e.length-1]&&e.length>=3?[null,e,null]:M.exec(e))||!n[1]&&t)return!t||t.jquery?(t||i).find(e):this.constructor(t).find(e);if(n[1]){if(t=t instanceof k?t[0]:t,k.merge(this,k.parseHTML(n[1],t&&t.nodeType?t.ownerDocument||t:_,!0)),O.test(n[1])&&k.isPlainObject(t))for(n in t)v(this[n])?this[n](t[n]):this.attr(n,t[n]);return this}return(r=_.getElementById(n[2]))&&(this[0]=r,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):v(e)?void 0!==i.ready?i.ready(e):e(k):k.makeArray(e,this)}).prototype=k.fn,D=k(_);var N=/^(?:parents|prev(?:Until|All))/,R={children:!0,contents:!0,next:!0,prev:!0};function U(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}k.fn.extend({has:function(e){var t=k(e,this),i=t.length;return this.filter((function(){for(var e=0;e<i;e++)if(k.contains(this,t[e]))return!0}))},closest:function(e,t){var i,n=0,r=this.length,s=[],a="string"!=typeof e&&k(e);if(!P.test(e))for(;n<r;n++)for(i=this[n];i&&i!==t;i=i.parentNode)if(i.nodeType<11&&(a?a.index(i)>-1:1===i.nodeType&&k.find.matchesSelector(i,e))){s.push(i);break}return this.pushStack(s.length>1?k.uniqueSort(s):s)},index:function(e){return e?"string"==typeof e?c.call(k(e),this[0]):c.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(k.uniqueSort(k.merge(this.get(),k(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),k.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return x(e,"parentNode")},parentsUntil:function(e,t,i){return x(e,"parentNode",i)},next:function(e){return U(e,"nextSibling")},prev:function(e){return U(e,"previousSibling")},nextAll:function(e){return x(e,"nextSibling")},prevAll:function(e){return x(e,"previousSibling")},nextUntil:function(e,t,i){return x(e,"nextSibling",i)},prevUntil:function(e,t,i){return x(e,"previousSibling",i)},siblings:function(e){return A((e.parentNode||{}).firstChild,e)},children:function(e){return A(e.firstChild)},contents:function(e){return null!=e.contentDocument&&a(e.contentDocument)?e.contentDocument:(I(e,"template")&&(e=e.content||e),k.merge([],e.childNodes))}},(function(e,t){k.fn[e]=function(i,n){var r=k.map(this,t,i);return"Until"!==e.slice(-5)&&(n=i),n&&"string"==typeof n&&(r=k.filter(n,r)),this.length>1&&(R[e]||k.uniqueSort(r),N.test(e)&&r.reverse()),this.pushStack(r)}}));var B=/[^\x20\t\r\n\f]+/g;function j(e){return e}function F(e){throw e}function H(e,t,i,n){var r;try{e&&v(r=e.promise)?r.call(e).done(t).fail(i):e&&v(r=e.then)?r.call(e,t,i):t.apply(void 0,[e].slice(n))}catch(e){i.apply(void 0,[e])}}k.Callbacks=function(e){e="string"==typeof e?function(e){var t={};return k.each(e.match(B)||[],(function(e,i){t[i]=!0})),t}(e):k.extend({},e);var t,i,n,r,s=[],a=[],o=-1,l=function(){for(r=r||e.once,n=t=!0;a.length;o=-1)for(i=a.shift();++o<s.length;)!1===s[o].apply(i[0],i[1])&&e.stopOnFalse&&(o=s.length,i=!1);e.memory||(i=!1),t=!1,r&&(s=i?[]:"")},u={add:function(){return s&&(i&&!t&&(o=s.length-1,a.push(i)),function t(i){k.each(i,(function(i,n){v(n)?e.unique&&u.has(n)||s.push(n):n&&n.length&&"string"!==w(n)&&t(n)}))}(arguments),i&&!t&&l()),this},remove:function(){return k.each(arguments,(function(e,t){for(var i;(i=k.inArray(t,s,i))>-1;)s.splice(i,1),i<=o&&o--})),this},has:function(e){return e?k.inArray(e,s)>-1:s.length>0},empty:function(){return s&&(s=[]),this},disable:function(){return r=a=[],s=i="",this},disabled:function(){return!s},lock:function(){return r=a=[],i||t||(s=i=""),this},locked:function(){return!!r},fireWith:function(e,i){return r||(i=[e,(i=i||[]).slice?i.slice():i],a.push(i),t||l()),this},fire:function(){return u.fireWith(this,arguments),this},fired:function(){return!!n}};return u},k.extend({Deferred:function(e){var t=[["notify","progress",k.Callbacks("memory"),k.Callbacks("memory"),2],["resolve","done",k.Callbacks("once memory"),k.Callbacks("once memory"),0,"resolved"],["reject","fail",k.Callbacks("once memory"),k.Callbacks("once memory"),1,"rejected"]],i="pending",r={state:function(){return i},always:function(){return s.done(arguments).fail(arguments),this},catch:function(e){return r.then(null,e)},pipe:function(){var e=arguments;return k.Deferred((function(i){k.each(t,(function(t,n){var r=v(e[n[4]])&&e[n[4]];s[n[1]]((function(){var e=r&&r.apply(this,arguments);e&&v(e.promise)?e.promise().progress(i.notify).done(i.resolve).fail(i.reject):i[n[0]+"With"](this,r?[e]:arguments)}))})),e=null})).promise()},then:function(e,i,r){var s=0;function a(e,t,i,r){return function(){var o=this,l=arguments,u=function(){var n,u;if(!(e<s)){if((n=i.apply(o,l))===t.promise())throw new TypeError("Thenable self-resolution");u=n&&("object"==typeof n||"function"==typeof n)&&n.then,v(u)?r?u.call(n,a(s,t,j,r),a(s,t,F,r)):(s++,u.call(n,a(s,t,j,r),a(s,t,F,r),a(s,t,j,t.notifyWith))):(i!==j&&(o=void 0,l=[n]),(r||t.resolveWith)(o,l))}},c=r?u:function(){try{u()}catch(n){k.Deferred.exceptionHook&&k.Deferred.exceptionHook(n,c.stackTrace),e+1>=s&&(i!==F&&(o=void 0,l=[n]),t.rejectWith(o,l))}};e?c():(k.Deferred.getStackHook&&(c.stackTrace=k.Deferred.getStackHook()),n.setTimeout(c))}}return k.Deferred((function(n){t[0][3].add(a(0,n,v(r)?r:j,n.notifyWith)),t[1][3].add(a(0,n,v(e)?e:j)),t[2][3].add(a(0,n,v(i)?i:F))})).promise()},promise:function(e){return null!=e?k.extend(e,r):r}},s={};return k.each(t,(function(e,n){var a=n[2],o=n[5];r[n[1]]=a.add,o&&a.add((function(){i=o}),t[3-e][2].disable,t[3-e][3].disable,t[0][2].lock,t[0][3].lock),a.add(n[3].fire),s[n[0]]=function(){return s[n[0]+"With"](this===s?void 0:this,arguments),this},s[n[0]+"With"]=a.fireWith})),r.promise(s),e&&e.call(s,s),s},when:function(e){var t=arguments.length,i=t,n=Array(i),r=o.call(arguments),s=k.Deferred(),a=function(e){return function(i){n[e]=this,r[e]=arguments.length>1?o.call(arguments):i,--t||s.resolveWith(n,r)}};if(t<=1&&(H(e,s.done(a(i)).resolve,s.reject,!t),"pending"===s.state()||v(r[i]&&r[i].then)))return s.then();for(;i--;)H(r[i],a(i),s.reject);return s.promise()}});var q=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;k.Deferred.exceptionHook=function(e,t){n.console&&n.console.warn&&e&&q.test(e.name)&&n.console.warn("jQuery.Deferred exception: "+e.message,e.stack,t)},k.readyException=function(e){n.setTimeout((function(){throw e}))};var z=k.Deferred();function W(){_.removeEventListener("DOMContentLoaded",W),n.removeEventListener("load",W),k.ready()}k.fn.ready=function(e){return z.then(e).catch((function(e){k.readyException(e)})),this},k.extend({isReady:!1,readyWait:1,ready:function(e){(!0===e?--k.readyWait:k.isReady)||(k.isReady=!0,!0!==e&&--k.readyWait>0||z.resolveWith(_,[k]))}}),k.ready.then=z.then,"complete"===_.readyState||"loading"!==_.readyState&&!_.documentElement.doScroll?n.setTimeout(k.ready):(_.addEventListener("DOMContentLoaded",W),n.addEventListener("load",W));var V=function(e,t,i,n,r,s,a){var o=0,l=e.length,u=null==i;if("object"===w(i))for(o in r=!0,i)V(e,t,o,i[o],!0,s,a);else if(void 0!==n&&(r=!0,v(n)||(a=!0),u&&(a?(t.call(e,n),t=null):(u=t,t=function(e,t,i){return u.call(k(e),i)})),t))for(;o<l;o++)t(e[o],i,a?n:n.call(e[o],o,t(e[o],i)));return r?e:u?t.call(e):l?t(e[0],i):s},$=/^-ms-/,X=/-([a-z])/g;function G(e,t){return t.toUpperCase()}function Y(e){return e.replace($,"ms-").replace(X,G)}var K=function(e){return 1===e.nodeType||9===e.nodeType||!+e.nodeType};function Q(){this.expando=k.expando+Q.uid++}Q.uid=1,Q.prototype={cache:function(e){var t=e[this.expando];return t||(t={},K(e)&&(e.nodeType?e[this.expando]=t:Object.defineProperty(e,this.expando,{value:t,configurable:!0}))),t},set:function(e,t,i){var n,r=this.cache(e);if("string"==typeof t)r[Y(t)]=i;else for(n in t)r[Y(n)]=t[n];return r},get:function(e,t){return void 0===t?this.cache(e):e[this.expando]&&e[this.expando][Y(t)]},access:function(e,t,i){return void 0===t||t&&"string"==typeof t&&void 0===i?this.get(e,t):(this.set(e,t,i),void 0!==i?i:t)},remove:function(e,t){var i,n=e[this.expando];if(void 0!==n){if(void 0!==t){i=(t=Array.isArray(t)?t.map(Y):(t=Y(t))in n?[t]:t.match(B)||[]).length;for(;i--;)delete n[t[i]]}(void 0===t||k.isEmptyObject(n))&&(e.nodeType?e[this.expando]=void 0:delete e[this.expando])}},hasData:function(e){var t=e[this.expando];return void 0!==t&&!k.isEmptyObject(t)}};var J=new Q,Z=new Q,ee=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,te=/[A-Z]/g;function ie(e,t,i){var n;if(void 0===i&&1===e.nodeType)if(n="data-"+t.replace(te,"-$&").toLowerCase(),"string"==typeof(i=e.getAttribute(n))){try{i=function(e){return"true"===e||"false"!==e&&("null"===e?null:e===+e+""?+e:ee.test(e)?JSON.parse(e):e)}(i)}catch(e){}Z.set(e,t,i)}else i=void 0;return i}k.extend({hasData:function(e){return Z.hasData(e)||J.hasData(e)},data:function(e,t,i){return Z.access(e,t,i)},removeData:function(e,t){Z.remove(e,t)},_data:function(e,t,i){return J.access(e,t,i)},_removeData:function(e,t){J.remove(e,t)}}),k.fn.extend({data:function(e,t){var i,n,r,s=this[0],a=s&&s.attributes;if(void 0===e){if(this.length&&(r=Z.get(s),1===s.nodeType&&!J.get(s,"hasDataAttrs"))){for(i=a.length;i--;)a[i]&&0===(n=a[i].name).indexOf("data-")&&(n=Y(n.slice(5)),ie(s,n,r[n]));J.set(s,"hasDataAttrs",!0)}return r}return"object"==typeof e?this.each((function(){Z.set(this,e)})):V(this,(function(t){var i;if(s&&void 0===t)return void 0!==(i=Z.get(s,e))||void 0!==(i=ie(s,e))?i:void 0;this.each((function(){Z.set(this,e,t)}))}),null,t,arguments.length>1,null,!0)},removeData:function(e){return this.each((function(){Z.remove(this,e)}))}}),k.extend({queue:function(e,t,i){var n;if(e)return t=(t||"fx")+"queue",n=J.get(e,t),i&&(!n||Array.isArray(i)?n=J.access(e,t,k.makeArray(i)):n.push(i)),n||[]},dequeue:function(e,t){t=t||"fx";var i=k.queue(e,t),n=i.length,r=i.shift(),s=k._queueHooks(e,t);"inprogress"===r&&(r=i.shift(),n--),r&&("fx"===t&&i.unshift("inprogress"),delete s.stop,r.call(e,(function(){k.dequeue(e,t)}),s)),!n&&s&&s.empty.fire()},_queueHooks:function(e,t){var i=t+"queueHooks";return J.get(e,i)||J.access(e,i,{empty:k.Callbacks("once memory").add((function(){J.remove(e,[t+"queue",i])}))})}}),k.fn.extend({queue:function(e,t){var i=2;return"string"!=typeof e&&(t=e,e="fx",i--),arguments.length<i?k.queue(this[0],e):void 0===t?this:this.each((function(){var i=k.queue(this,e,t);k._queueHooks(this,e),"fx"===e&&"inprogress"!==i[0]&&k.dequeue(this,e)}))},dequeue:function(e){return this.each((function(){k.dequeue(this,e)}))},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,t){var i,n=1,r=k.Deferred(),s=this,a=this.length,o=function(){--n||r.resolveWith(s,[s])};for("string"!=typeof e&&(t=e,e=void 0),e=e||"fx";a--;)(i=J.get(s[a],e+"queueHooks"))&&i.empty&&(n++,i.empty.add(o));return o(),r.promise(t)}});var ne=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,re=new RegExp("^(?:([+-])=|)("+ne+")([a-z%]*)$","i"),se=["Top","Right","Bottom","Left"],ae=_.documentElement,oe=function(e){return k.contains(e.ownerDocument,e)},le={composed:!0};ae.getRootNode&&(oe=function(e){return k.contains(e.ownerDocument,e)||e.getRootNode(le)===e.ownerDocument});var ue=function(e,t){return"none"===(e=t||e).style.display||""===e.style.display&&oe(e)&&"none"===k.css(e,"display")};function ce(e,t,i,n){var r,s,a=20,o=n?function(){return n.cur()}:function(){return k.css(e,t,"")},l=o(),u=i&&i[3]||(k.cssNumber[t]?"":"px"),c=e.nodeType&&(k.cssNumber[t]||"px"!==u&&+l)&&re.exec(k.css(e,t));if(c&&c[3]!==u){for(l/=2,u=u||c[3],c=+l||1;a--;)k.style(e,t,c+u),(1-s)*(1-(s=o()/l||.5))<=0&&(a=0),c/=s;c*=2,k.style(e,t,c+u),i=i||[]}return i&&(c=+c||+l||0,r=i[1]?c+(i[1]+1)*i[2]:+i[2],n&&(n.unit=u,n.start=c,n.end=r)),r}var de={};function he(e){var t,i=e.ownerDocument,n=e.nodeName,r=de[n];return r||(t=i.body.appendChild(i.createElement(n)),r=k.css(t,"display"),t.parentNode.removeChild(t),"none"===r&&(r="block"),de[n]=r,r)}function pe(e,t){for(var i,n,r=[],s=0,a=e.length;s<a;s++)(n=e[s]).style&&(i=n.style.display,t?("none"===i&&(r[s]=J.get(n,"display")||null,r[s]||(n.style.display="")),""===n.style.display&&ue(n)&&(r[s]=he(n))):"none"!==i&&(r[s]="none",J.set(n,"display",i)));for(s=0;s<a;s++)null!=r[s]&&(e[s].style.display=r[s]);return e}k.fn.extend({show:function(){return pe(this,!0)},hide:function(){return pe(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each((function(){ue(this)?k(this).show():k(this).hide()}))}});var fe,me,ge=/^(?:checkbox|radio)$/i,ve=/<([a-z][^\/\0>\x20\t\r\n\f]*)/i,ye=/^$|^module$|\/(?:java|ecma)script/i;fe=_.createDocumentFragment().appendChild(_.createElement("div")),(me=_.createElement("input")).setAttribute("type","radio"),me.setAttribute("checked","checked"),me.setAttribute("name","t"),fe.appendChild(me),g.checkClone=fe.cloneNode(!0).cloneNode(!0).lastChild.checked,fe.innerHTML="<textarea>x</textarea>",g.noCloneChecked=!!fe.cloneNode(!0).lastChild.defaultValue,fe.innerHTML="<option></option>",g.option=!!fe.lastChild;var _e={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 be(e,t){var i;return i=void 0!==e.getElementsByTagName?e.getElementsByTagName(t||"*"):void 0!==e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&I(e,t)?k.merge([e],i):i}function Te(e,t){for(var i=0,n=e.length;i<n;i++)J.set(e[i],"globalEval",!t||J.get(t[i],"globalEval"))}_e.tbody=_e.tfoot=_e.colgroup=_e.caption=_e.thead,_e.th=_e.td,g.option||(_e.optgroup=_e.option=[1,"<select multiple='multiple'>","</select>"]);var we=/<|&#?\w+;/;function Se(e,t,i,n,r){for(var s,a,o,l,u,c,d=t.createDocumentFragment(),h=[],p=0,f=e.length;p<f;p++)if((s=e[p])||0===s)if("object"===w(s))k.merge(h,s.nodeType?[s]:s);else if(we.test(s)){for(a=a||d.appendChild(t.createElement("div")),o=(ve.exec(s)||["",""])[1].toLowerCase(),l=_e[o]||_e._default,a.innerHTML=l[1]+k.htmlPrefilter(s)+l[2],c=l[0];c--;)a=a.lastChild;k.merge(h,a.childNodes),(a=d.firstChild).textContent=""}else h.push(t.createTextNode(s));for(d.textContent="",p=0;s=h[p++];)if(n&&k.inArray(s,n)>-1)r&&r.push(s);else if(u=oe(s),a=be(d.appendChild(s),"script"),u&&Te(a),i)for(c=0;s=a[c++];)ye.test(s.type||"")&&i.push(s);return d}var ke=/^([^.]*)(?:\.(.+)|)/;function Ee(){return!0}function Ce(){return!1}function xe(e,t){return e===function(){try{return _.activeElement}catch(e){}}()==("focus"===t)}function Ae(e,t,i,n,r,s){var a,o;if("object"==typeof t){for(o in"string"!=typeof i&&(n=n||i,i=void 0),t)Ae(e,o,i,n,t[o],s);return e}if(null==n&&null==r?(r=i,n=i=void 0):null==r&&("string"==typeof i?(r=n,n=void 0):(r=n,n=i,i=void 0)),!1===r)r=Ce;else if(!r)return e;return 1===s&&(a=r,r=function(e){return k().off(e),a.apply(this,arguments)},r.guid=a.guid||(a.guid=k.guid++)),e.each((function(){k.event.add(this,t,r,n,i)}))}function Pe(e,t,i){i?(J.set(e,t,!1),k.event.add(e,t,{namespace:!1,handler:function(e){var n,r,s=J.get(this,t);if(1&e.isTrigger&&this[t]){if(s.length)(k.event.special[t]||{}).delegateType&&e.stopPropagation();else if(s=o.call(arguments),J.set(this,t,s),n=i(this,t),this[t](),s!==(r=J.get(this,t))||n?J.set(this,t,!1):r={},s!==r)return e.stopImmediatePropagation(),e.preventDefault(),r&&r.value}else s.length&&(J.set(this,t,{value:k.event.trigger(k.extend(s[0],k.Event.prototype),s.slice(1),this)}),e.stopImmediatePropagation())}})):void 0===J.get(e,t)&&k.event.add(e,t,Ee)}k.event={global:{},add:function(e,t,i,n,r){var s,a,o,l,u,c,d,h,p,f,m,g=J.get(e);if(K(e))for(i.handler&&(i=(s=i).handler,r=s.selector),r&&k.find.matchesSelector(ae,r),i.guid||(i.guid=k.guid++),(l=g.events)||(l=g.events=Object.create(null)),(a=g.handle)||(a=g.handle=function(t){return void 0!==k&&k.event.triggered!==t.type?k.event.dispatch.apply(e,arguments):void 0}),u=(t=(t||"").match(B)||[""]).length;u--;)p=m=(o=ke.exec(t[u])||[])[1],f=(o[2]||"").split(".").sort(),p&&(d=k.event.special[p]||{},p=(r?d.delegateType:d.bindType)||p,d=k.event.special[p]||{},c=k.extend({type:p,origType:m,data:n,handler:i,guid:i.guid,selector:r,needsContext:r&&k.expr.match.needsContext.test(r),namespace:f.join(".")},s),(h=l[p])||((h=l[p]=[]).delegateCount=0,d.setup&&!1!==d.setup.call(e,n,f,a)||e.addEventListener&&e.addEventListener(p,a)),d.add&&(d.add.call(e,c),c.handler.guid||(c.handler.guid=i.guid)),r?h.splice(h.delegateCount++,0,c):h.push(c),k.event.global[p]=!0)},remove:function(e,t,i,n,r){var s,a,o,l,u,c,d,h,p,f,m,g=J.hasData(e)&&J.get(e);if(g&&(l=g.events)){for(u=(t=(t||"").match(B)||[""]).length;u--;)if(p=m=(o=ke.exec(t[u])||[])[1],f=(o[2]||"").split(".").sort(),p){for(d=k.event.special[p]||{},h=l[p=(n?d.delegateType:d.bindType)||p]||[],o=o[2]&&new RegExp("(^|\\.)"+f.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=s=h.length;s--;)c=h[s],!r&&m!==c.origType||i&&i.guid!==c.guid||o&&!o.test(c.namespace)||n&&n!==c.selector&&("**"!==n||!c.selector)||(h.splice(s,1),c.selector&&h.delegateCount--,d.remove&&d.remove.call(e,c));a&&!h.length&&(d.teardown&&!1!==d.teardown.call(e,f,g.handle)||k.removeEvent(e,p,g.handle),delete l[p])}else for(p in l)k.event.remove(e,p+t[u],i,n,!0);k.isEmptyObject(l)&&J.remove(e,"handle events")}},dispatch:function(e){var t,i,n,r,s,a,o=new Array(arguments.length),l=k.event.fix(e),u=(J.get(this,"events")||Object.create(null))[l.type]||[],c=k.event.special[l.type]||{};for(o[0]=l,t=1;t<arguments.length;t++)o[t]=arguments[t];if(l.delegateTarget=this,!c.preDispatch||!1!==c.preDispatch.call(this,l)){for(a=k.event.handlers.call(this,l,u),t=0;(r=a[t++])&&!l.isPropagationStopped();)for(l.currentTarget=r.elem,i=0;(s=r.handlers[i++])&&!l.isImmediatePropagationStopped();)l.rnamespace&&!1!==s.namespace&&!l.rnamespace.test(s.namespace)||(l.handleObj=s,l.data=s.data,void 0!==(n=((k.event.special[s.origType]||{}).handle||s.handler).apply(r.elem,o))&&!1===(l.result=n)&&(l.preventDefault(),l.stopPropagation()));return c.postDispatch&&c.postDispatch.call(this,l),l.result}},handlers:function(e,t){var i,n,r,s,a,o=[],l=t.delegateCount,u=e.target;if(l&&u.nodeType&&!("click"===e.type&&e.button>=1))for(;u!==this;u=u.parentNode||this)if(1===u.nodeType&&("click"!==e.type||!0!==u.disabled)){for(s=[],a={},i=0;i<l;i++)void 0===a[r=(n=t[i]).selector+" "]&&(a[r]=n.needsContext?k(r,this).index(u)>-1:k.find(r,this,null,[u]).length),a[r]&&s.push(n);s.length&&o.push({elem:u,handlers:s})}return u=this,l<t.length&&o.push({elem:u,handlers:t.slice(l)}),o},addProp:function(e,t){Object.defineProperty(k.Event.prototype,e,{enumerable:!0,configurable:!0,get:v(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(e){return e[k.expando]?e:new k.Event(e)},special:{load:{noBubble:!0},click:{setup:function(e){var t=this||e;return ge.test(t.type)&&t.click&&I(t,"input")&&Pe(t,"click",Ee),!1},trigger:function(e){var t=this||e;return ge.test(t.type)&&t.click&&I(t,"input")&&Pe(t,"click"),!0},_default:function(e){var t=e.target;return ge.test(t.type)&&t.click&&I(t,"input")&&J.get(t,"click")||I(t,"a")}},beforeunload:{postDispatch:function(e){void 0!==e.result&&e.originalEvent&&(e.originalEvent.returnValue=e.result)}}}},k.removeEvent=function(e,t,i){e.removeEventListener&&e.removeEventListener(t,i)},k.Event=function(e,t){if(!(this instanceof k.Event))return new k.Event(e,t);e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||void 0===e.defaultPrevented&&!1===e.returnValue?Ee:Ce,this.target=e.target&&3===e.target.nodeType?e.target.parentNode:e.target,this.currentTarget=e.currentTarget,this.relatedTarget=e.relatedTarget):this.type=e,t&&k.extend(this,t),this.timeStamp=e&&e.timeStamp||Date.now(),this[k.expando]=!0},k.Event.prototype={constructor:k.Event,isDefaultPrevented:Ce,isPropagationStopped:Ce,isImmediatePropagationStopped:Ce,isSimulated:!1,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=Ee,e&&!this.isSimulated&&e.preventDefault()},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=Ee,e&&!this.isSimulated&&e.stopPropagation()},stopImmediatePropagation:function(){var e=this.originalEvent;this.isImmediatePropagationStopped=Ee,e&&!this.isSimulated&&e.stopImmediatePropagation(),this.stopPropagation()}},k.each({altKey:!0,bubbles:!0,cancelable:!0,changedTouches:!0,ctrlKey:!0,detail:!0,eventPhase:!0,metaKey:!0,pageX:!0,pageY:!0,shiftKey:!0,view:!0,char:!0,code:!0,charCode:!0,key:!0,keyCode:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pointerId:!0,pointerType:!0,screenX:!0,screenY:!0,targetTouches:!0,toElement:!0,touches:!0,which:!0},k.event.addProp),k.each({focus:"focusin",blur:"focusout"},(function(e,t){k.event.special[e]={setup:function(){return Pe(this,e,xe),!1},trigger:function(){return Pe(this,e),!0},_default:function(){return!0},delegateType:t}})),k.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},(function(e,t){k.event.special[e]={delegateType:t,bindType:t,handle:function(e){var i,n=this,r=e.relatedTarget,s=e.handleObj;return r&&(r===n||k.contains(n,r))||(e.type=s.origType,i=s.handler.apply(this,arguments),e.type=t),i}}})),k.fn.extend({on:function(e,t,i,n){return Ae(this,e,t,i,n)},one:function(e,t,i,n){return Ae(this,e,t,i,n,1)},off:function(e,t,i){var n,r;if(e&&e.preventDefault&&e.handleObj)return n=e.handleObj,k(e.delegateTarget).off(n.namespace?n.origType+"."+n.namespace:n.origType,n.selector,n.handler),this;if("object"==typeof e){for(r in e)this.off(r,t,e[r]);return this}return!1!==t&&"function"!=typeof t||(i=t,t=void 0),!1===i&&(i=Ce),this.each((function(){k.event.remove(this,e,i,t)}))}});var Ie=/<script|<style|<link/i,Oe=/checked\s*(?:[^=]|=\s*.checked.)/i,Le=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;function De(e,t){return I(e,"table")&&I(11!==t.nodeType?t:t.firstChild,"tr")&&k(e).children("tbody")[0]||e}function Me(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function Ne(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Re(e,t){var i,n,r,s,a,o;if(1===t.nodeType){if(J.hasData(e)&&(o=J.get(e).events))for(r in J.remove(t,"handle events"),o)for(i=0,n=o[r].length;i<n;i++)k.event.add(t,r,o[r][i]);Z.hasData(e)&&(s=Z.access(e),a=k.extend({},s),Z.set(t,a))}}function Ue(e,t){var i=t.nodeName.toLowerCase();"input"===i&&ge.test(e.type)?t.checked=e.checked:"input"!==i&&"textarea"!==i||(t.defaultValue=e.defaultValue)}function Be(e,t,i,n){t=l(t);var r,s,a,o,u,c,d=0,h=e.length,p=h-1,f=t[0],m=v(f);if(m||h>1&&"string"==typeof f&&!g.checkClone&&Oe.test(f))return e.each((function(r){var s=e.eq(r);m&&(t[0]=f.call(this,r,s.html())),Be(s,t,i,n)}));if(h&&(s=(r=Se(t,e[0].ownerDocument,!1,e,n)).firstChild,1===r.childNodes.length&&(r=s),s||n)){for(o=(a=k.map(be(r,"script"),Me)).length;d<h;d++)u=r,d!==p&&(u=k.clone(u,!0,!0),o&&k.merge(a,be(u,"script"))),i.call(e[d],u,d);if(o)for(c=a[a.length-1].ownerDocument,k.map(a,Ne),d=0;d<o;d++)u=a[d],ye.test(u.type||"")&&!J.access(u,"globalEval")&&k.contains(c,u)&&(u.src&&"module"!==(u.type||"").toLowerCase()?k._evalUrl&&!u.noModule&&k._evalUrl(u.src,{nonce:u.nonce||u.getAttribute("nonce")},c):T(u.textContent.replace(Le,""),u,c))}return e}function je(e,t,i){for(var n,r=t?k.filter(t,e):e,s=0;null!=(n=r[s]);s++)i||1!==n.nodeType||k.cleanData(be(n)),n.parentNode&&(i&&oe(n)&&Te(be(n,"script")),n.parentNode.removeChild(n));return e}k.extend({htmlPrefilter:function(e){return e},clone:function(e,t,i){var n,r,s,a,o=e.cloneNode(!0),l=oe(e);if(!(g.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||k.isXMLDoc(e)))for(a=be(o),n=0,r=(s=be(e)).length;n<r;n++)Ue(s[n],a[n]);if(t)if(i)for(s=s||be(e),a=a||be(o),n=0,r=s.length;n<r;n++)Re(s[n],a[n]);else Re(e,o);return(a=be(o,"script")).length>0&&Te(a,!l&&be(e,"script")),o},cleanData:function(e){for(var t,i,n,r=k.event.special,s=0;void 0!==(i=e[s]);s++)if(K(i)){if(t=i[J.expando]){if(t.events)for(n in t.events)r[n]?k.event.remove(i,n):k.removeEvent(i,n,t.handle);i[J.expando]=void 0}i[Z.expando]&&(i[Z.expando]=void 0)}}}),k.fn.extend({detach:function(e){return je(this,e,!0)},remove:function(e){return je(this,e)},text:function(e){return V(this,(function(e){return void 0===e?k.text(this):this.empty().each((function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=e)}))}),null,e,arguments.length)},append:function(){return Be(this,arguments,(function(e){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||De(this,e).appendChild(e)}))},prepend:function(){return Be(this,arguments,(function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=De(this,e);t.insertBefore(e,t.firstChild)}}))},before:function(){return Be(this,arguments,(function(e){this.parentNode&&this.parentNode.insertBefore(e,this)}))},after:function(){return Be(this,arguments,(function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)}))},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(k.cleanData(be(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map((function(){return k.clone(this,e,t)}))},html:function(e){return V(this,(function(e){var t=this[0]||{},i=0,n=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!Ie.test(e)&&!_e[(ve.exec(e)||["",""])[1].toLowerCase()]){e=k.htmlPrefilter(e);try{for(;i<n;i++)1===(t=this[i]||{}).nodeType&&(k.cleanData(be(t,!1)),t.innerHTML=e);t=0}catch(e){}}t&&this.empty().append(e)}),null,e,arguments.length)},replaceWith:function(){var e=[];return Be(this,arguments,(function(t){var i=this.parentNode;k.inArray(this,e)<0&&(k.cleanData(be(this)),i&&i.replaceChild(t,this))}),e)}}),k.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},(function(e,t){k.fn[e]=function(e){for(var i,n=[],r=k(e),s=r.length-1,a=0;a<=s;a++)i=a===s?this:this.clone(!0),k(r[a])[t](i),u.apply(n,i.get());return this.pushStack(n)}}));var Fe=new RegExp("^("+ne+")(?!px)[a-z%]+$","i"),He=function(e){var t=e.ownerDocument.defaultView;return t&&t.opener||(t=n),t.getComputedStyle(e)},qe=function(e,t,i){var n,r,s={};for(r in t)s[r]=e.style[r],e.style[r]=t[r];for(r in n=i.call(e),t)e.style[r]=s[r];return n},ze=new RegExp(se.join("|"),"i");function We(e,t,i){var n,r,s,a,o=e.style;return(i=i||He(e))&&(""!==(a=i.getPropertyValue(t)||i[t])||oe(e)||(a=k.style(e,t)),!g.pixelBoxStyles()&&Fe.test(a)&&ze.test(t)&&(n=o.width,r=o.minWidth,s=o.maxWidth,o.minWidth=o.maxWidth=o.width=a,a=i.width,o.width=n,o.minWidth=r,o.maxWidth=s)),void 0!==a?a+"":a}function Ve(e,t){return{get:function(){if(!e())return(this.get=t).apply(this,arguments);delete this.get}}}!function(){function e(){if(c){u.style.cssText="position:absolute;left:-11111px;width:60px;margin-top:1px;padding:0;border:0",c.style.cssText="position:relative;display:block;box-sizing:border-box;overflow:scroll;margin:auto;border:1px;padding:1px;width:60%;top:1%",ae.appendChild(u).appendChild(c);var e=n.getComputedStyle(c);i="1%"!==e.top,l=12===t(e.marginLeft),c.style.right="60%",a=36===t(e.right),r=36===t(e.width),c.style.position="absolute",s=12===t(c.offsetWidth/3),ae.removeChild(u),c=null}}function t(e){return Math.round(parseFloat(e))}var i,r,s,a,o,l,u=_.createElement("div"),c=_.createElement("div");c.style&&(c.style.backgroundClip="content-box",c.cloneNode(!0).style.backgroundClip="",g.clearCloneStyle="content-box"===c.style.backgroundClip,k.extend(g,{boxSizingReliable:function(){return e(),r},pixelBoxStyles:function(){return e(),a},pixelPosition:function(){return e(),i},reliableMarginLeft:function(){return e(),l},scrollboxSize:function(){return e(),s},reliableTrDimensions:function(){var e,t,i,r;return null==o&&(e=_.createElement("table"),t=_.createElement("tr"),i=_.createElement("div"),e.style.cssText="position:absolute;left:-11111px;border-collapse:separate",t.style.cssText="border:1px solid",t.style.height="1px",i.style.height="9px",i.style.display="block",ae.appendChild(e).appendChild(t).appendChild(i),r=n.getComputedStyle(t),o=parseInt(r.height,10)+parseInt(r.borderTopWidth,10)+parseInt(r.borderBottomWidth,10)===t.offsetHeight,ae.removeChild(e)),o}}))}();var $e=["Webkit","Moz","ms"],Xe=_.createElement("div").style,Ge={};function Ye(e){var t=k.cssProps[e]||Ge[e];return t||(e in Xe?e:Ge[e]=function(e){for(var t=e[0].toUpperCase()+e.slice(1),i=$e.length;i--;)if((e=$e[i]+t)in Xe)return e}(e)||e)}var Ke=/^(none|table(?!-c[ea]).+)/,Qe=/^--/,Je={position:"absolute",visibility:"hidden",display:"block"},Ze={letterSpacing:"0",fontWeight:"400"};function et(e,t,i){var n=re.exec(t);return n?Math.max(0,n[2]-(i||0))+(n[3]||"px"):t}function tt(e,t,i,n,r,s){var a="width"===t?1:0,o=0,l=0;if(i===(n?"border":"content"))return 0;for(;a<4;a+=2)"margin"===i&&(l+=k.css(e,i+se[a],!0,r)),n?("content"===i&&(l-=k.css(e,"padding"+se[a],!0,r)),"margin"!==i&&(l-=k.css(e,"border"+se[a]+"Width",!0,r))):(l+=k.css(e,"padding"+se[a],!0,r),"padding"!==i?l+=k.css(e,"border"+se[a]+"Width",!0,r):o+=k.css(e,"border"+se[a]+"Width",!0,r));return!n&&s>=0&&(l+=Math.max(0,Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-s-l-o-.5))||0),l}function it(e,t,i){var n=He(e),r=(!g.boxSizingReliable()||i)&&"border-box"===k.css(e,"boxSizing",!1,n),s=r,a=We(e,t,n),o="offset"+t[0].toUpperCase()+t.slice(1);if(Fe.test(a)){if(!i)return a;a="auto"}return(!g.boxSizingReliable()&&r||!g.reliableTrDimensions()&&I(e,"tr")||"auto"===a||!parseFloat(a)&&"inline"===k.css(e,"display",!1,n))&&e.getClientRects().length&&(r="border-box"===k.css(e,"boxSizing",!1,n),(s=o in e)&&(a=e[o])),(a=parseFloat(a)||0)+tt(e,t,i||(r?"border":"content"),s,n,a)+"px"}function nt(e,t,i,n,r){return new nt.prototype.init(e,t,i,n,r)}k.extend({cssHooks:{opacity:{get:function(e,t){if(t){var i=We(e,"opacity");return""===i?"1":i}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{},style:function(e,t,i,n){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var r,s,a,o=Y(t),l=Qe.test(t),u=e.style;if(l||(t=Ye(o)),a=k.cssHooks[t]||k.cssHooks[o],void 0===i)return a&&"get" in a&&void 0!==(r=a.get(e,!1,n))?r:u[t];"string"===(s=typeof i)&&(r=re.exec(i))&&r[1]&&(i=ce(e,t,r),s="number"),null!=i&&i==i&&("number"!==s||l||(i+=r&&r[3]||(k.cssNumber[o]?"":"px")),g.clearCloneStyle||""!==i||0!==t.indexOf("background")||(u[t]="inherit"),a&&"set" in a&&void 0===(i=a.set(e,i,n))||(l?u.setProperty(t,i):u[t]=i))}},css:function(e,t,i,n){var r,s,a,o=Y(t);return Qe.test(t)||(t=Ye(o)),(a=k.cssHooks[t]||k.cssHooks[o])&&"get" in a&&(r=a.get(e,!0,i)),void 0===r&&(r=We(e,t,n)),"normal"===r&&t in Ze&&(r=Ze[t]),""===i||i?(s=parseFloat(r),!0===i||isFinite(s)?s||0:r):r}}),k.each(["height","width"],(function(e,t){k.cssHooks[t]={get:function(e,i,n){if(i)return!Ke.test(k.css(e,"display"))||e.getClientRects().length&&e.getBoundingClientRect().width?it(e,t,n):qe(e,Je,(function(){return it(e,t,n)}))},set:function(e,i,n){var r,s=He(e),a=!g.scrollboxSize()&&"absolute"===s.position,o=(a||n)&&"border-box"===k.css(e,"boxSizing",!1,s),l=n?tt(e,t,n,o,s):0;return o&&a&&(l-=Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-parseFloat(s[t])-tt(e,t,"border",!1,s)-.5)),l&&(r=re.exec(i))&&"px"!==(r[3]||"px")&&(e.style[t]=i,i=k.css(e,t)),et(0,i,l)}}})),k.cssHooks.marginLeft=Ve(g.reliableMarginLeft,(function(e,t){if(t)return(parseFloat(We(e,"marginLeft"))||e.getBoundingClientRect().left-qe(e,{marginLeft:0},(function(){return e.getBoundingClientRect().left})))+"px"})),k.each({margin:"",padding:"",border:"Width"},(function(e,t){k.cssHooks[e+t]={expand:function(i){for(var n=0,r={},s="string"==typeof i?i.split(" "):[i];n<4;n++)r[e+se[n]+t]=s[n]||s[n-2]||s[0];return r}},"margin"!==e&&(k.cssHooks[e+t].set=et)})),k.fn.extend({css:function(e,t){return V(this,(function(e,t,i){var n,r,s={},a=0;if(Array.isArray(t)){for(n=He(e),r=t.length;a<r;a++)s[t[a]]=k.css(e,t[a],!1,n);return s}return void 0!==i?k.style(e,t,i):k.css(e,t)}),e,t,arguments.length>1)}}),k.Tween=nt,nt.prototype={constructor:nt,init:function(e,t,i,n,r,s){this.elem=e,this.prop=i,this.easing=r||k.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=n,this.unit=s||(k.cssNumber[i]?"":"px")},cur:function(){var e=nt.propHooks[this.prop];return e&&e.get?e.get(this):nt.propHooks._default.get(this)},run:function(e){var t,i=nt.propHooks[this.prop];return this.options.duration?this.pos=t=k.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),i&&i.set?i.set(this):nt.propHooks._default.set(this),this}},nt.prototype.init.prototype=nt.prototype,nt.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=k.css(e.elem,e.prop,""))&&"auto"!==t?t:0},set:function(e){k.fx.step[e.prop]?k.fx.step[e.prop](e):1!==e.elem.nodeType||!k.cssHooks[e.prop]&&null==e.elem.style[Ye(e.prop)]?e.elem[e.prop]=e.now:k.style(e.elem,e.prop,e.now+e.unit)}}},nt.propHooks.scrollTop=nt.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},k.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},k.fx=nt.prototype.init,k.fx.step={};var rt,st,at=/^(?:toggle|show|hide)$/,ot=/queueHooks$/;function lt(){st&&(!1===_.hidden&&n.requestAnimationFrame?n.requestAnimationFrame(lt):n.setTimeout(lt,k.fx.interval),k.fx.tick())}function ut(){return n.setTimeout((function(){rt=void 0})),rt=Date.now()}function ct(e,t){var i,n=0,r={height:e};for(t=t?1:0;n<4;n+=2-t)r["margin"+(i=se[n])]=r["padding"+i]=e;return t&&(r.opacity=r.width=e),r}function dt(e,t,i){for(var n,r=(ht.tweeners[t]||[]).concat(ht.tweeners["*"]),s=0,a=r.length;s<a;s++)if(n=r[s].call(i,t,e))return n}function ht(e,t,i){var n,r,s=0,a=ht.prefilters.length,o=k.Deferred().always((function(){delete l.elem})),l=function(){if(r)return!1;for(var t=rt||ut(),i=Math.max(0,u.startTime+u.duration-t),n=1-(i/u.duration||0),s=0,a=u.tweens.length;s<a;s++)u.tweens[s].run(n);return o.notifyWith(e,[u,n,i]),n<1&&a?i:(a||o.notifyWith(e,[u,1,0]),o.resolveWith(e,[u]),!1)},u=o.promise({elem:e,props:k.extend({},t),opts:k.extend(!0,{specialEasing:{},easing:k.easing._default},i),originalProperties:t,originalOptions:i,startTime:rt||ut(),duration:i.duration,tweens:[],createTween:function(t,i){var n=k.Tween(e,u.opts,t,i,u.opts.specialEasing[t]||u.opts.easing);return u.tweens.push(n),n},stop:function(t){var i=0,n=t?u.tweens.length:0;if(r)return this;for(r=!0;i<n;i++)u.tweens[i].run(1);return t?(o.notifyWith(e,[u,1,0]),o.resolveWith(e,[u,t])):o.rejectWith(e,[u,t]),this}}),c=u.props;for(!function(e,t){var i,n,r,s,a;for(i in e)if(r=t[n=Y(i)],s=e[i],Array.isArray(s)&&(r=s[1],s=e[i]=s[0]),i!==n&&(e[n]=s,delete e[i]),(a=k.cssHooks[n])&&"expand" in a)for(i in s=a.expand(s),delete e[n],s)i in e||(e[i]=s[i],t[i]=r);else t[n]=r}(c,u.opts.specialEasing);s<a;s++)if(n=ht.prefilters[s].call(u,e,c,u.opts))return v(n.stop)&&(k._queueHooks(u.elem,u.opts.queue).stop=n.stop.bind(n)),n;return k.map(c,dt,u),v(u.opts.start)&&u.opts.start.call(e,u),u.progress(u.opts.progress).done(u.opts.done,u.opts.complete).fail(u.opts.fail).always(u.opts.always),k.fx.timer(k.extend(l,{elem:e,anim:u,queue:u.opts.queue})),u}k.Animation=k.extend(ht,{tweeners:{"*":[function(e,t){var i=this.createTween(e,t);return ce(i.elem,e,re.exec(t),i),i}]},tweener:function(e,t){v(e)?(t=e,e=["*"]):e=e.match(B);for(var i,n=0,r=e.length;n<r;n++)i=e[n],ht.tweeners[i]=ht.tweeners[i]||[],ht.tweeners[i].unshift(t)},prefilters:[function(e,t,i){var n,r,s,a,o,l,u,c,d="width" in t||"height" in t,h=this,p={},f=e.style,m=e.nodeType&&ue(e),g=J.get(e,"fxshow");for(n in i.queue||(null==(a=k._queueHooks(e,"fx")).unqueued&&(a.unqueued=0,o=a.empty.fire,a.empty.fire=function(){a.unqueued||o()}),a.unqueued++,h.always((function(){h.always((function(){a.unqueued--,k.queue(e,"fx").length||a.empty.fire()}))}))),t)if(r=t[n],at.test(r)){if(delete t[n],s=s||"toggle"===r,r===(m?"hide":"show")){if("show"!==r||!g||void 0===g[n])continue;m=!0}p[n]=g&&g[n]||k.style(e,n)}if((l=!k.isEmptyObject(t))||!k.isEmptyObject(p))for(n in d&&1===e.nodeType&&(i.overflow=[f.overflow,f.overflowX,f.overflowY],null==(u=g&&g.display)&&(u=J.get(e,"display")),"none"===(c=k.css(e,"display"))&&(u?c=u:(pe([e],!0),u=e.style.display||u,c=k.css(e,"display"),pe([e]))),("inline"===c||"inline-block"===c&&null!=u)&&"none"===k.css(e,"float")&&(l||(h.done((function(){f.display=u})),null==u&&(c=f.display,u="none"===c?"":c)),f.display="inline-block")),i.overflow&&(f.overflow="hidden",h.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=J.access(e,"fxshow",{display:u}),s&&(g.hidden=!m),m&&pe([e],!0),h.done((function(){for(n in m||pe([e]),J.remove(e,"fxshow"),p)k.style(e,n,p[n])}))),l=dt(m?g[n]:0,n,h),n in g||(g[n]=l.start,m&&(l.end=l.start,l.start=0))}],prefilter:function(e,t){t?ht.prefilters.unshift(e):ht.prefilters.push(e)}}),k.speed=function(e,t,i){var n=e&&"object"==typeof e?k.extend({},e):{complete:i||!i&&t||v(e)&&e,duration:e,easing:i&&t||t&&!v(t)&&t};return k.fx.off?n.duration=0:"number"!=typeof n.duration&&(n.duration in k.fx.speeds?n.duration=k.fx.speeds[n.duration]:n.duration=k.fx.speeds._default),null!=n.queue&&!0!==n.queue||(n.queue="fx"),n.old=n.complete,n.complete=function(){v(n.old)&&n.old.call(this),n.queue&&k.dequeue(this,n.queue)},n},k.fn.extend({fadeTo:function(e,t,i,n){return this.filter(ue).css("opacity",0).show().end().animate({opacity:t},e,i,n)},animate:function(e,t,i,n){var r=k.isEmptyObject(e),s=k.speed(t,i,n),a=function(){var t=ht(this,k.extend({},e),s);(r||J.get(this,"finish"))&&t.stop(!0)};return a.finish=a,r||!1===s.queue?this.each(a):this.queue(s.queue,a)},stop:function(e,t,i){var n=function(e){var t=e.stop;delete e.stop,t(i)};return"string"!=typeof e&&(i=t,t=e,e=void 0),t&&this.queue(e||"fx",[]),this.each((function(){var t=!0,r=null!=e&&e+"queueHooks",s=k.timers,a=J.get(this);if(r)a[r]&&a[r].stop&&n(a[r]);else for(r in a)a[r]&&a[r].stop&&ot.test(r)&&n(a[r]);for(r=s.length;r--;)s[r].elem!==this||null!=e&&s[r].queue!==e||(s[r].anim.stop(i),t=!1,s.splice(r,1));!t&&i||k.dequeue(this,e)}))},finish:function(e){return!1!==e&&(e=e||"fx"),this.each((function(){var t,i=J.get(this),n=i[e+"queue"],r=i[e+"queueHooks"],s=k.timers,a=n?n.length:0;for(i.finish=!0,k.queue(this,e,[]),r&&r.stop&&r.stop.call(this,!0),t=s.length;t--;)s[t].elem===this&&s[t].queue===e&&(s[t].anim.stop(!0),s.splice(t,1));for(t=0;t<a;t++)n[t]&&n[t].finish&&n[t].finish.call(this);delete i.finish}))}}),k.each(["toggle","show","hide"],(function(e,t){var i=k.fn[t];k.fn[t]=function(e,n,r){return null==e||"boolean"==typeof e?i.apply(this,arguments):this.animate(ct(t,!0),e,n,r)}})),k.each({slideDown:ct("show"),slideUp:ct("hide"),slideToggle:ct("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},(function(e,t){k.fn[e]=function(e,i,n){return this.animate(t,e,i,n)}})),k.timers=[],k.fx.tick=function(){var e,t=0,i=k.timers;for(rt=Date.now();t<i.length;t++)(e=i[t])()||i[t]!==e||i.splice(t--,1);i.length||k.fx.stop(),rt=void 0},k.fx.timer=function(e){k.timers.push(e),k.fx.start()},k.fx.interval=13,k.fx.start=function(){st||(st=!0,lt())},k.fx.stop=function(){st=null},k.fx.speeds={slow:600,fast:200,_default:400},k.fn.delay=function(e,t){return e=k.fx&&k.fx.speeds[e]||e,t=t||"fx",this.queue(t,(function(t,i){var r=n.setTimeout(t,e);i.stop=function(){n.clearTimeout(r)}}))},function(){var e=_.createElement("input"),t=_.createElement("select").appendChild(_.createElement("option"));e.type="checkbox",g.checkOn=""!==e.value,g.optSelected=t.selected,(e=_.createElement("input")).value="t",e.type="radio",g.radioValue="t"===e.value}();var pt,ft=k.expr.attrHandle;k.fn.extend({attr:function(e,t){return V(this,k.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each((function(){k.removeAttr(this,e)}))}}),k.extend({attr:function(e,t,i){var n,r,s=e.nodeType;if(3!==s&&8!==s&&2!==s)return void 0===e.getAttribute?k.prop(e,t,i):(1===s&&k.isXMLDoc(e)||(r=k.attrHooks[t.toLowerCase()]||(k.expr.match.bool.test(t)?pt:void 0)),void 0!==i?null===i?void k.removeAttr(e,t):r&&"set" in r&&void 0!==(n=r.set(e,i,t))?n:(e.setAttribute(t,i+""),i):r&&"get" in r&&null!==(n=r.get(e,t))?n:null==(n=k.find.attr(e,t))?void 0:n)},attrHooks:{type:{set:function(e,t){if(!g.radioValue&&"radio"===t&&I(e,"input")){var i=e.value;return e.setAttribute("type",t),i&&(e.value=i),t}}}},removeAttr:function(e,t){var i,n=0,r=t&&t.match(B);if(r&&1===e.nodeType)for(;i=r[n++];)e.removeAttribute(i)}}),pt={set:function(e,t,i){return!1===t?k.removeAttr(e,i):e.setAttribute(i,i),i}},k.each(k.expr.match.bool.source.match(/\w+/g),(function(e,t){var i=ft[t]||k.find.attr;ft[t]=function(e,t,n){var r,s,a=t.toLowerCase();return n||(s=ft[a],ft[a]=r,r=null!=i(e,t,n)?a:null,ft[a]=s),r}}));var mt=/^(?:input|select|textarea|button)$/i,gt=/^(?:a|area)$/i;function vt(e){return(e.match(B)||[]).join(" ")}function yt(e){return e.getAttribute&&e.getAttribute("class")||""}function _t(e){return Array.isArray(e)?e:"string"==typeof e&&e.match(B)||[]}k.fn.extend({prop:function(e,t){return V(this,k.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each((function(){delete this[k.propFix[e]||e]}))}}),k.extend({prop:function(e,t,i){var n,r,s=e.nodeType;if(3!==s&&8!==s&&2!==s)return 1===s&&k.isXMLDoc(e)||(t=k.propFix[t]||t,r=k.propHooks[t]),void 0!==i?r&&"set" in r&&void 0!==(n=r.set(e,i,t))?n:e[t]=i:r&&"get" in r&&null!==(n=r.get(e,t))?n:e[t]},propHooks:{tabIndex:{get:function(e){var t=k.find.attr(e,"tabindex");return t?parseInt(t,10):mt.test(e.nodeName)||gt.test(e.nodeName)&&e.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),g.optSelected||(k.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),k.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],(function(){k.propFix[this.toLowerCase()]=this})),k.fn.extend({addClass:function(e){var t,i,n,r,s,a,o,l=0;if(v(e))return this.each((function(t){k(this).addClass(e.call(this,t,yt(this)))}));if((t=_t(e)).length)for(;i=this[l++];)if(r=yt(i),n=1===i.nodeType&&" "+vt(r)+" "){for(a=0;s=t[a++];)n.indexOf(" "+s+" ")<0&&(n+=s+" ");r!==(o=vt(n))&&i.setAttribute("class",o)}return this},removeClass:function(e){var t,i,n,r,s,a,o,l=0;if(v(e))return this.each((function(t){k(this).removeClass(e.call(this,t,yt(this)))}));if(!arguments.length)return this.attr("class","");if((t=_t(e)).length)for(;i=this[l++];)if(r=yt(i),n=1===i.nodeType&&" "+vt(r)+" "){for(a=0;s=t[a++];)for(;n.indexOf(" "+s+" ")>-1;)n=n.replace(" "+s+" "," ");r!==(o=vt(n))&&i.setAttribute("class",o)}return this},toggleClass:function(e,t){var i=typeof e,n="string"===i||Array.isArray(e);return"boolean"==typeof t&&n?t?this.addClass(e):this.removeClass(e):v(e)?this.each((function(i){k(this).toggleClass(e.call(this,i,yt(this),t),t)})):this.each((function(){var t,r,s,a;if(n)for(r=0,s=k(this),a=_t(e);t=a[r++];)s.hasClass(t)?s.removeClass(t):s.addClass(t);else void 0!==e&&"boolean"!==i||((t=yt(this))&&J.set(this,"__className__",t),this.setAttribute&&this.setAttribute("class",t||!1===e?"":J.get(this,"__className__")||""))}))},hasClass:function(e){var t,i,n=0;for(t=" "+e+" ";i=this[n++];)if(1===i.nodeType&&(" "+vt(yt(i))+" ").indexOf(t)>-1)return!0;return!1}});var bt=/\r/g;k.fn.extend({val:function(e){var t,i,n,r=this[0];return arguments.length?(n=v(e),this.each((function(i){var r;1===this.nodeType&&(null==(r=n?e.call(this,i,k(this).val()):e)?r="":"number"==typeof r?r+="":Array.isArray(r)&&(r=k.map(r,(function(e){return null==e?"":e+""}))),(t=k.valHooks[this.type]||k.valHooks[this.nodeName.toLowerCase()])&&"set" in t&&void 0!==t.set(this,r,"value")||(this.value=r))}))):r?(t=k.valHooks[r.type]||k.valHooks[r.nodeName.toLowerCase()])&&"get" in t&&void 0!==(i=t.get(r,"value"))?i:"string"==typeof(i=r.value)?i.replace(bt,""):null==i?"":i:void 0}}),k.extend({valHooks:{option:{get:function(e){var t=k.find.attr(e,"value");return null!=t?t:vt(k.text(e))}},select:{get:function(e){var t,i,n,r=e.options,s=e.selectedIndex,a="select-one"===e.type,o=a?null:[],l=a?s+1:r.length;for(n=s<0?l:a?s:0;n<l;n++)if(((i=r[n]).selected||n===s)&&!i.disabled&&(!i.parentNode.disabled||!I(i.parentNode,"optgroup"))){if(t=k(i).val(),a)return t;o.push(t)}return o},set:function(e,t){for(var i,n,r=e.options,s=k.makeArray(t),a=r.length;a--;)((n=r[a]).selected=k.inArray(k.valHooks.option.get(n),s)>-1)&&(i=!0);return i||(e.selectedIndex=-1),s}}}}),k.each(["radio","checkbox"],(function(){k.valHooks[this]={set:function(e,t){if(Array.isArray(t))return e.checked=k.inArray(k(e).val(),t)>-1}},g.checkOn||(k.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})})),g.focusin="onfocusin" in n;var Tt=/^(?:focusinfocus|focusoutblur)$/,wt=function(e){e.stopPropagation()};k.extend(k.event,{trigger:function(e,t,i,r){var s,a,o,l,u,c,d,h,f=[i||_],m=p.call(e,"type")?e.type:e,g=p.call(e,"namespace")?e.namespace.split("."):[];if(a=h=o=i=i||_,3!==i.nodeType&&8!==i.nodeType&&!Tt.test(m+k.event.triggered)&&(m.indexOf(".")>-1&&(g=m.split("."),m=g.shift(),g.sort()),u=m.indexOf(":")<0&&"on"+m,(e=e[k.expando]?e:new k.Event(m,"object"==typeof e&&e)).isTrigger=r?2:3,e.namespace=g.join("."),e.rnamespace=e.namespace?new RegExp("(^|\\.)"+g.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=void 0,e.target||(e.target=i),t=null==t?[e]:k.makeArray(t,[e]),d=k.event.special[m]||{},r||!d.trigger||!1!==d.trigger.apply(i,t))){if(!r&&!d.noBubble&&!y(i)){for(l=d.delegateType||m,Tt.test(l+m)||(a=a.parentNode);a;a=a.parentNode)f.push(a),o=a;o===(i.ownerDocument||_)&&f.push(o.defaultView||o.parentWindow||n)}for(s=0;(a=f[s++])&&!e.isPropagationStopped();)h=a,e.type=s>1?l:d.bindType||m,(c=(J.get(a,"events")||Object.create(null))[e.type]&&J.get(a,"handle"))&&c.apply(a,t),(c=u&&a[u])&&c.apply&&K(a)&&(e.result=c.apply(a,t),!1===e.result&&e.preventDefault());return e.type=m,r||e.isDefaultPrevented()||d._default&&!1!==d._default.apply(f.pop(),t)||!K(i)||u&&v(i[m])&&!y(i)&&((o=i[u])&&(i[u]=null),k.event.triggered=m,e.isPropagationStopped()&&h.addEventListener(m,wt),i[m](),e.isPropagationStopped()&&h.removeEventListener(m,wt),k.event.triggered=void 0,o&&(i[u]=o)),e.result}},simulate:function(e,t,i){var n=k.extend(new k.Event,i,{type:e,isSimulated:!0});k.event.trigger(n,null,t)}}),k.fn.extend({trigger:function(e,t){return this.each((function(){k.event.trigger(e,t,this)}))},triggerHandler:function(e,t){var i=this[0];if(i)return k.event.trigger(e,t,i,!0)}}),g.focusin||k.each({focus:"focusin",blur:"focusout"},(function(e,t){var i=function(e){k.event.simulate(t,e.target,k.event.fix(e))};k.event.special[t]={setup:function(){var n=this.ownerDocument||this.document||this,r=J.access(n,t);r||n.addEventListener(e,i,!0),J.access(n,t,(r||0)+1)},teardown:function(){var n=this.ownerDocument||this.document||this,r=J.access(n,t)-1;r?J.access(n,t,r):(n.removeEventListener(e,i,!0),J.remove(n,t))}}}));var St=n.location,kt={guid:Date.now()},Et=/\?/;k.parseXML=function(e){var t,i;if(!e||"string"!=typeof e)return null;try{t=(new n.DOMParser).parseFromString(e,"text/xml")}catch(e){}return i=t&&t.getElementsByTagName("parsererror")[0],t&&!i||k.error("Invalid XML: "+(i?k.map(i.childNodes,(function(e){return e.textContent})).join("\n"):e)),t};var Ct=/\[\]$/,xt=/\r?\n/g,At=/^(?:submit|button|image|reset|file)$/i,Pt=/^(?:input|select|textarea|keygen)/i;function It(e,t,i,n){var r;if(Array.isArray(t))k.each(t,(function(t,r){i||Ct.test(e)?n(e,r):It(e+"["+("object"==typeof r&&null!=r?t:"")+"]",r,i,n)}));else if(i||"object"!==w(t))n(e,t);else for(r in t)It(e+"["+r+"]",t[r],i,n)}k.param=function(e,t){var i,n=[],r=function(e,t){var i=v(t)?t():t;n[n.length]=encodeURIComponent(e)+"="+encodeURIComponent(null==i?"":i)};if(null==e)return"";if(Array.isArray(e)||e.jquery&&!k.isPlainObject(e))k.each(e,(function(){r(this.name,this.value)}));else for(i in e)It(i,e[i],t,r);return n.join("&")},k.fn.extend({serialize:function(){return k.param(this.serializeArray())},serializeArray:function(){return this.map((function(){var e=k.prop(this,"elements");return e?k.makeArray(e):this})).filter((function(){var e=this.type;return this.name&&!k(this).is(":disabled")&&Pt.test(this.nodeName)&&!At.test(e)&&(this.checked||!ge.test(e))})).map((function(e,t){var i=k(this).val();return null==i?null:Array.isArray(i)?k.map(i,(function(e){return{name:t.name,value:e.replace(xt,"\r\n")}})):{name:t.name,value:i.replace(xt,"\r\n")}})).get()}});var Ot=/%20/g,Lt=/#.*$/,Dt=/([?&])_=[^&]*/,Mt=/^(.*?):[ \t]*([^\r\n]*)$/gm,Nt=/^(?:GET|HEAD)$/,Rt=/^\/\//,Ut={},Bt={},jt="*/".concat("*"),Ft=_.createElement("a");function Ht(e){return function(t,i){"string"!=typeof t&&(i=t,t="*");var n,r=0,s=t.toLowerCase().match(B)||[];if(v(i))for(;n=s[r++];)"+"===n[0]?(n=n.slice(1)||"*",(e[n]=e[n]||[]).unshift(i)):(e[n]=e[n]||[]).push(i)}}function qt(e,t,i,n){var r={},s=e===Bt;function a(o){var l;return r[o]=!0,k.each(e[o]||[],(function(e,o){var u=o(t,i,n);return"string"!=typeof u||s||r[u]?s?!(l=u):void 0:(t.dataTypes.unshift(u),a(u),!1)})),l}return a(t.dataTypes[0])||!r["*"]&&a("*")}function zt(e,t){var i,n,r=k.ajaxSettings.flatOptions||{};for(i in t)void 0!==t[i]&&((r[i]?e:n||(n={}))[i]=t[i]);return n&&k.extend(!0,e,n),e}Ft.href=St.href,k.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:St.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(St.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":jt,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":k.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?zt(zt(e,k.ajaxSettings),t):zt(k.ajaxSettings,e)},ajaxPrefilter:Ht(Ut),ajaxTransport:Ht(Bt),ajax:function(e,t){"object"==typeof e&&(t=e,e=void 0),t=t||{};var i,r,s,a,o,l,u,c,d,h,p=k.ajaxSetup({},t),f=p.context||p,m=p.context&&(f.nodeType||f.jquery)?k(f):k.event,g=k.Deferred(),v=k.Callbacks("once memory"),y=p.statusCode||{},b={},T={},w="canceled",S={readyState:0,getResponseHeader:function(e){var t;if(u){if(!a)for(a={};t=Mt.exec(s);)a[t[1].toLowerCase()+" "]=(a[t[1].toLowerCase()+" "]||[]).concat(t[2]);t=a[e.toLowerCase()+" "]}return null==t?null:t.join(", ")},getAllResponseHeaders:function(){return u?s:null},setRequestHeader:function(e,t){return null==u&&(e=T[e.toLowerCase()]=T[e.toLowerCase()]||e,b[e]=t),this},overrideMimeType:function(e){return null==u&&(p.mimeType=e),this},statusCode:function(e){var t;if(e)if(u)S.always(e[S.status]);else for(t in e)y[t]=[y[t],e[t]];return this},abort:function(e){var t=e||w;return i&&i.abort(t),E(0,t),this}};if(g.promise(S),p.url=((e||p.url||St.href)+"").replace(Rt,St.protocol+"//"),p.type=t.method||t.type||p.method||p.type,p.dataTypes=(p.dataType||"*").toLowerCase().match(B)||[""],null==p.crossDomain){l=_.createElement("a");try{l.href=p.url,l.href=l.href,p.crossDomain=Ft.protocol+"//"+Ft.host!=l.protocol+"//"+l.host}catch(e){p.crossDomain=!0}}if(p.data&&p.processData&&"string"!=typeof p.data&&(p.data=k.param(p.data,p.traditional)),qt(Ut,p,t,S),u)return S;for(d in(c=k.event&&p.global)&&0==k.active++&&k.event.trigger("ajaxStart"),p.type=p.type.toUpperCase(),p.hasContent=!Nt.test(p.type),r=p.url.replace(Lt,""),p.hasContent?p.data&&p.processData&&0===(p.contentType||"").indexOf("application/x-www-form-urlencoded")&&(p.data=p.data.replace(Ot,"+")):(h=p.url.slice(r.length),p.data&&(p.processData||"string"==typeof p.data)&&(r+=(Et.test(r)?"&":"?")+p.data,delete p.data),!1===p.cache&&(r=r.replace(Dt,"$1"),h=(Et.test(r)?"&":"?")+"_="+kt.guid+++h),p.url=r+h),p.ifModified&&(k.lastModified[r]&&S.setRequestHeader("If-Modified-Since",k.lastModified[r]),k.etag[r]&&S.setRequestHeader("If-None-Match",k.etag[r])),(p.data&&p.hasContent&&!1!==p.contentType||t.contentType)&&S.setRequestHeader("Content-Type",p.contentType),S.setRequestHeader("Accept",p.dataTypes[0]&&p.accepts[p.dataTypes[0]]?p.accepts[p.dataTypes[0]]+("*"!==p.dataTypes[0]?", "+jt+"; q=0.01":""):p.accepts["*"]),p.headers)S.setRequestHeader(d,p.headers[d]);if(p.beforeSend&&(!1===p.beforeSend.call(f,S,p)||u))return S.abort();if(w="abort",v.add(p.complete),S.done(p.success),S.fail(p.error),i=qt(Bt,p,t,S)){if(S.readyState=1,c&&m.trigger("ajaxSend",[S,p]),u)return S;p.async&&p.timeout>0&&(o=n.setTimeout((function(){S.abort("timeout")}),p.timeout));try{u=!1,i.send(b,E)}catch(e){if(u)throw e;E(-1,e)}}else E(-1,"No Transport");function E(e,t,a,l){var d,h,_,b,T,w=t;u||(u=!0,o&&n.clearTimeout(o),i=void 0,s=l||"",S.readyState=e>0?4:0,d=e>=200&&e<300||304===e,a&&(b=function(e,t,i){for(var n,r,s,a,o=e.contents,l=e.dataTypes;"*"===l[0];)l.shift(),void 0===n&&(n=e.mimeType||t.getResponseHeader("Content-Type"));if(n)for(r in o)if(o[r]&&o[r].test(n)){l.unshift(r);break}if(l[0]in i)s=l[0];else{for(r in i){if(!l[0]||e.converters[r+" "+l[0]]){s=r;break}a||(a=r)}s=s||a}if(s)return s!==l[0]&&l.unshift(s),i[s]}(p,S,a)),!d&&k.inArray("script",p.dataTypes)>-1&&k.inArray("json",p.dataTypes)<0&&(p.converters["text script"]=function(){}),b=function(e,t,i,n){var r,s,a,o,l,u={},c=e.dataTypes.slice();if(c[1])for(a in e.converters)u[a.toLowerCase()]=e.converters[a];for(s=c.shift();s;)if(e.responseFields[s]&&(i[e.responseFields[s]]=t),!l&&n&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),l=s,s=c.shift())if("*"===s)s=l;else if("*"!==l&&l!==s){if(!(a=u[l+" "+s]||u["* "+s]))for(r in u)if((o=r.split(" "))[1]===s&&(a=u[l+" "+o[0]]||u["* "+o[0]])){!0===a?a=u[r]:!0!==u[r]&&(s=o[0],c.unshift(o[1]));break}if(!0!==a)if(a&&e.throws)t=a(t);else try{t=a(t)}catch(e){return{state:"parsererror",error:a?e:"No conversion from "+l+" to "+s}}}return{state:"success",data:t}}(p,b,S,d),d?(p.ifModified&&((T=S.getResponseHeader("Last-Modified"))&&(k.lastModified[r]=T),(T=S.getResponseHeader("etag"))&&(k.etag[r]=T)),204===e||"HEAD"===p.type?w="nocontent":304===e?w="notmodified":(w=b.state,h=b.data,d=!(_=b.error))):(_=w,!e&&w||(w="error",e<0&&(e=0))),S.status=e,S.statusText=(t||w)+"",d?g.resolveWith(f,[h,w,S]):g.rejectWith(f,[S,w,_]),S.statusCode(y),y=void 0,c&&m.trigger(d?"ajaxSuccess":"ajaxError",[S,p,d?h:_]),v.fireWith(f,[S,w]),c&&(m.trigger("ajaxComplete",[S,p]),--k.active||k.event.trigger("ajaxStop")))}return S},getJSON:function(e,t,i){return k.get(e,t,i,"json")},getScript:function(e,t){return k.get(e,void 0,t,"script")}}),k.each(["get","post"],(function(e,t){k[t]=function(e,i,n,r){return v(i)&&(r=r||n,n=i,i=void 0),k.ajax(k.extend({url:e,type:t,dataType:r,data:i,success:n},k.isPlainObject(e)&&e))}})),k.ajaxPrefilter((function(e){var t;for(t in e.headers)"content-type"===t.toLowerCase()&&(e.contentType=e.headers[t]||"")})),k._evalUrl=function(e,t,i){return k.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,converters:{"text script":function(){}},dataFilter:function(e){k.globalEval(e,t,i)}})},k.fn.extend({wrapAll:function(e){var t;return this[0]&&(v(e)&&(e=e.call(this[0])),t=k(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map((function(){for(var e=this;e.firstElementChild;)e=e.firstElementChild;return e})).append(this)),this},wrapInner:function(e){return v(e)?this.each((function(t){k(this).wrapInner(e.call(this,t))})):this.each((function(){var t=k(this),i=t.contents();i.length?i.wrapAll(e):t.append(e)}))},wrap:function(e){var t=v(e);return this.each((function(i){k(this).wrapAll(t?e.call(this,i):e)}))},unwrap:function(e){return this.parent(e).not("body").each((function(){k(this).replaceWith(this.childNodes)})),this}}),k.expr.pseudos.hidden=function(e){return!k.expr.pseudos.visible(e)},k.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},k.ajaxSettings.xhr=function(){try{return new n.XMLHttpRequest}catch(e){}};var Wt={0:200,1223:204},Vt=k.ajaxSettings.xhr();g.cors=!!Vt&&"withCredentials" in Vt,g.ajax=Vt=!!Vt,k.ajaxTransport((function(e){var t,i;if(g.cors||Vt&&!e.crossDomain)return{send:function(r,s){var a,o=e.xhr();if(o.open(e.type,e.url,e.async,e.username,e.password),e.xhrFields)for(a in e.xhrFields)o[a]=e.xhrFields[a];for(a in e.mimeType&&o.overrideMimeType&&o.overrideMimeType(e.mimeType),e.crossDomain||r["X-Requested-With"]||(r["X-Requested-With"]="XMLHttpRequest"),r)o.setRequestHeader(a,r[a]);t=function(e){return function(){t&&(t=i=o.onload=o.onerror=o.onabort=o.ontimeout=o.onreadystatechange=null,"abort"===e?o.abort():"error"===e?"number"!=typeof o.status?s(0,"error"):s(o.status,o.statusText):s(Wt[o.status]||o.status,o.statusText,"text"!==(o.responseType||"text")||"string"!=typeof o.responseText?{binary:o.response}:{text:o.responseText},o.getAllResponseHeaders()))}},o.onload=t(),i=o.onerror=o.ontimeout=t("error"),void 0!==o.onabort?o.onabort=i:o.onreadystatechange=function(){4===o.readyState&&n.setTimeout((function(){t&&i()}))},t=t("abort");try{o.send(e.hasContent&&e.data||null)}catch(e){if(t)throw e}},abort:function(){t&&t()}}})),k.ajaxPrefilter((function(e){e.crossDomain&&(e.contents.script=!1)})),k.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){return k.globalEval(e),e}}}),k.ajaxPrefilter("script",(function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")})),k.ajaxTransport("script",(function(e){var t,i;if(e.crossDomain||e.scriptAttrs)return{send:function(n,r){t=k("<script>").attr(e.scriptAttrs||{}).prop({charset:e.scriptCharset,src:e.url}).on("load error",i=function(e){t.remove(),i=null,e&&r("error"===e.type?404:200,e.type)}),_.head.appendChild(t[0])},abort:function(){i&&i()}}}));var $t,Xt=[],Gt=/(=)\?(?=&|$)|\?\?/;k.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Xt.pop()||k.expando+"_"+kt.guid++;return this[e]=!0,e}}),k.ajaxPrefilter("json jsonp",(function(e,t,i){var r,s,a,o=!1!==e.jsonp&&(Gt.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Gt.test(e.data)&&"data");if(o||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=v(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,o?e[o]=e[o].replace(Gt,"$1"+r):!1!==e.jsonp&&(e.url+=(Et.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return a||k.error(r+" was not called"),a[0]},e.dataTypes[0]="json",s=n[r],n[r]=function(){a=arguments},i.always((function(){void 0===s?k(n).removeProp(r):n[r]=s,e[r]&&(e.jsonpCallback=t.jsonpCallback,Xt.push(r)),a&&v(s)&&s(a[0]),a=s=void 0})),"script"})),g.createHTMLDocument=(($t=_.implementation.createHTMLDocument("").body).innerHTML="<form></form><form></form>",2===$t.childNodes.length),k.parseHTML=function(e,t,i){return"string"!=typeof e?[]:("boolean"==typeof t&&(i=t,t=!1),t||(g.createHTMLDocument?((n=(t=_.implementation.createHTMLDocument("")).createElement("base")).href=_.location.href,t.head.appendChild(n)):t=_),s=!i&&[],(r=O.exec(e))?[t.createElement(r[1])]:(r=Se([e],t,s),s&&s.length&&k(s).remove(),k.merge([],r.childNodes)));var n,r,s},k.fn.load=function(e,t,i){var n,r,s,a=this,o=e.indexOf(" ");return o>-1&&(n=vt(e.slice(o)),e=e.slice(0,o)),v(t)?(i=t,t=void 0):t&&"object"==typeof t&&(r="POST"),a.length>0&&k.ajax({url:e,type:r||"GET",dataType:"html",data:t}).done((function(e){s=arguments,a.html(n?k("<div>").append(k.parseHTML(e)).find(n):e)})).always(i&&function(e,t){a.each((function(){i.apply(this,s||[e.responseText,t,e])}))}),this},k.expr.pseudos.animated=function(e){return k.grep(k.timers,(function(t){return e===t.elem})).length},k.offset={setOffset:function(e,t,i){var n,r,s,a,o,l,u=k.css(e,"position"),c=k(e),d={};"static"===u&&(e.style.position="relative"),o=c.offset(),s=k.css(e,"top"),l=k.css(e,"left"),("absolute"===u||"fixed"===u)&&(s+l).indexOf("auto")>-1?(a=(n=c.position()).top,r=n.left):(a=parseFloat(s)||0,r=parseFloat(l)||0),v(t)&&(t=t.call(e,i,k.extend({},o))),null!=t.top&&(d.top=t.top-o.top+a),null!=t.left&&(d.left=t.left-o.left+r),"using" in t?t.using.call(e,d):c.css(d)}},k.fn.extend({offset:function(e){if(arguments.length)return void 0===e?this:this.each((function(t){k.offset.setOffset(this,e,t)}));var t,i,n=this[0];return n?n.getClientRects().length?(t=n.getBoundingClientRect(),i=n.ownerDocument.defaultView,{top:t.top+i.pageYOffset,left:t.left+i.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,i,n=this[0],r={top:0,left:0};if("fixed"===k.css(n,"position"))t=n.getBoundingClientRect();else{for(t=this.offset(),i=n.ownerDocument,e=n.offsetParent||i.documentElement;e&&(e===i.body||e===i.documentElement)&&"static"===k.css(e,"position");)e=e.parentNode;e&&e!==n&&1===e.nodeType&&((r=k(e).offset()).top+=k.css(e,"borderTopWidth",!0),r.left+=k.css(e,"borderLeftWidth",!0))}return{top:t.top-r.top-k.css(n,"marginTop",!0),left:t.left-r.left-k.css(n,"marginLeft",!0)}}},offsetParent:function(){return this.map((function(){for(var e=this.offsetParent;e&&"static"===k.css(e,"position");)e=e.offsetParent;return e||ae}))}}),k.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},(function(e,t){var i="pageYOffset"===t;k.fn[e]=function(n){return V(this,(function(e,n,r){var s;if(y(e)?s=e:9===e.nodeType&&(s=e.defaultView),void 0===r)return s?s[t]:e[n];s?s.scrollTo(i?s.pageXOffset:r,i?r:s.pageYOffset):e[n]=r}),e,n,arguments.length)}})),k.each(["top","left"],(function(e,t){k.cssHooks[t]=Ve(g.pixelPosition,(function(e,i){if(i)return i=We(e,t),Fe.test(i)?k(e).position()[t]+"px":i}))})),k.each({Height:"height",Width:"width"},(function(e,t){k.each({padding:"inner"+e,content:t,"":"outer"+e},(function(i,n){k.fn[n]=function(r,s){var a=arguments.length&&(i||"boolean"!=typeof r),o=i||(!0===r||!0===s?"margin":"border");return V(this,(function(t,i,r){var s;return y(t)?0===n.indexOf("outer")?t["inner"+e]:t.document.documentElement["client"+e]:9===t.nodeType?(s=t.documentElement,Math.max(t.body["scroll"+e],s["scroll"+e],t.body["offset"+e],s["offset"+e],s["client"+e])):void 0===r?k.css(t,i,o):k.style(t,i,r,o)}),t,a?r:void 0,a)}}))})),k.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],(function(e,t){k.fn[t]=function(e){return this.on(t,e)}})),k.fn.extend({bind:function(e,t,i){return this.on(e,null,t,i)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,i,n){return this.on(t,e,i,n)},undelegate:function(e,t,i){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",i)},hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),k.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),(function(e,t){k.fn[t]=function(e,i){return arguments.length>0?this.on(t,null,e,i):this.trigger(t)}}));var Yt=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;k.proxy=function(e,t){var i,n,r;if("string"==typeof t&&(i=e[t],t=e,e=i),v(e))return n=o.call(arguments,2),r=function(){return e.apply(t||this,n.concat(o.call(arguments)))},r.guid=e.guid=e.guid||k.guid++,r},k.holdReady=function(e){e?k.readyWait++:k.ready(!0)},k.isArray=Array.isArray,k.parseJSON=JSON.parse,k.nodeName=I,k.isFunction=v,k.isWindow=y,k.camelCase=Y,k.type=w,k.now=Date.now,k.isNumeric=function(e){var t=k.type(e);return("number"===t||"string"===t)&&!isNaN(e-parseFloat(e))},k.trim=function(e){return null==e?"":(e+"").replace(Yt,"")},void 0===(i=function(){return k}.apply(t,[]))||(e.exports=i);var Kt=n.jQuery,Qt=n.$;return k.noConflict=function(e){return n.$===k&&(n.$=Qt),e&&n.jQuery===k&&(n.jQuery=Kt),k},void 0===r&&(n.jQuery=n.$=k),k}))},function(e){e.exports=function(){function e(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value" in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function t(t,i,n){return i&&e(t.prototype,i),n&&e(t,n),t}function i(){return(i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e}).apply(this,arguments)}function n(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function r(e){return(r=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function s(e,t){return(s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function a(e,t,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(e){return!1}}()?Reflect.construct:function(e,t,i){var n=[null];n.push.apply(n,t);var r=new(Function.bind.apply(e,n));return i&&s(r,i.prototype),r}).apply(null,arguments)}function o(e){var t="function"==typeof Map?new Map:void 0;return(o=function(e){if(null===e||-1===Function.toString.call(e).indexOf("[native code]"))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,i)}function i(){return a(e,arguments,r(this).constructor)}return i.prototype=Object.create(e.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),s(i,e)})(e)}function l(e,t){try{var i=e()}catch(e){return t(e)}return i&&i.then?i.then(void 0,t):i}"undefined"!=typeof Symbol&&(Symbol.iterator||(Symbol.iterator=Symbol("Symbol.iterator"))),"undefined"!=typeof Symbol&&(Symbol.asyncIterator||(Symbol.asyncIterator=Symbol("Symbol.asyncIterator")));var u,c="2.9.7",d=function(){};!function(e){e[e.off=0]="off",e[e.error=1]="error",e[e.warning=2]="warning",e[e.info=3]="info",e[e.debug=4]="debug"}(u||(u={}));var h=u.off,p=function(){function e(e){this.t=e}e.getLevel=function(){return h},e.setLevel=function(e){return h=u[e]};var t=e.prototype;return t.error=function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];this.i(console.error,u.error,t)},t.warn=function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];this.i(console.warn,u.warning,t)},t.info=function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];this.i(console.info,u.info,t)},t.debug=function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];this.i(console.log,u.debug,t)},t.i=function(t,i,n){i<=e.getLevel()&&t.apply(console,["["+this.t+"] "].concat(n))},e}(),f=A,m=w,g=T,v=S,y=x,_="/",b=new RegExp(["(\\\\.)","(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?"].join("|"),"g");function T(e,t){for(var i,n=[],r=0,s=0,a="",o=t&&t.delimiter||_,l=t&&t.whitelist||void 0,u=!1;null!==(i=b.exec(e));){var c=i[0],d=i[1],h=i.index;if(a+=e.slice(s,h),s=h+c.length,d)a+=d[1],u=!0;else{var p="",f=i[2],m=i[3],g=i[4],v=i[5];if(!u&&a.length){var y=a.length-1,T=a[y];(!l||l.indexOf(T)>-1)&&(p=T,a=a.slice(0,y))}a&&(n.push(a),a="",u=!1);var w=m||g,S=p||o;n.push({name:f||r++,prefix:p,delimiter:S,optional:"?"===v||"*"===v,repeat:"+"===v||"*"===v,pattern:w?E(w):"[^"+k(S===o?S:S+o)+"]+?"})}}return(a||s<e.length)&&n.push(a+e.substr(s)),n}function w(e,t){return function(i,n){var r=e.exec(i);if(!r)return!1;for(var s=r[0],a=r.index,o={},l=n&&n.decode||decodeURIComponent,u=1;u<r.length;u++)if(void 0!==r[u]){var c=t[u-1];o[c.name]=c.repeat?r[u].split(c.delimiter).map((function(e){return l(e,c)})):l(r[u],c)}return{path:s,index:a,params:o}}}function S(e,t){for(var i=new Array(e.length),n=0;n<e.length;n++)"object"==typeof e[n]&&(i[n]=new RegExp("^(?:"+e[n].pattern+")$",C(t)));return function(t,n){for(var r="",s=n&&n.encode||encodeURIComponent,a=!n||!1!==n.validate,o=0;o<e.length;o++){var l=e[o];if("string"!=typeof l){var u,c=t?t[l.name]:void 0;if(Array.isArray(c)){if(!l.repeat)throw new TypeError('Expected "'+l.name+'" to not repeat, but got array');if(0===c.length){if(l.optional)continue;throw new TypeError('Expected "'+l.name+'" to not be empty')}for(var d=0;d<c.length;d++){if(u=s(c[d],l),a&&!i[o].test(u))throw new TypeError('Expected all "'+l.name+'" to match "'+l.pattern+'"');r+=(0===d?l.prefix:l.delimiter)+u}}else if("string"!=typeof c&&"number"!=typeof c&&"boolean"!=typeof c){if(!l.optional)throw new TypeError('Expected "'+l.name+'" to be '+(l.repeat?"an array":"a string"))}else{if(u=s(String(c),l),a&&!i[o].test(u))throw new TypeError('Expected "'+l.name+'" to match "'+l.pattern+'", but got "'+u+'"');r+=l.prefix+u}}else r+=l}return r}}function k(e){return e.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1")}function E(e){return e.replace(/([=!:$/()])/g,"\\$1")}function C(e){return e&&e.sensitive?"":"i"}function x(e,t,i){for(var n=(i=i||{}).strict,r=!1!==i.start,s=!1!==i.end,a=i.delimiter||_,o=[].concat(i.endsWith||[]).map(k).concat("$").join("|"),l=r?"^":"",u=0;u<e.length;u++){var c=e[u];if("string"==typeof c)l+=k(c);else{var d=c.repeat?"(?:"+c.pattern+")(?:"+k(c.delimiter)+"(?:"+c.pattern+"))*":c.pattern;t&&t.push(c),l+=c.optional?c.prefix?"(?:"+k(c.prefix)+"("+d+"))?":"("+d+")?":k(c.prefix)+"("+d+")"}}if(s)n||(l+="(?:"+k(a)+")?"),l+="$"===o?"$":"(?="+o+")";else{var h=e[e.length-1],p="string"==typeof h?h[h.length-1]===a:void 0===h;n||(l+="(?:"+k(a)+"(?="+o+"))?"),p||(l+="(?="+k(a)+"|"+o+")")}return new RegExp(l,C(i))}function A(e,t,i){return e instanceof RegExp?function(e,t){if(!t)return e;var i=e.source.match(/\((?!\?)/g);if(i)for(var n=0;n<i.length;n++)t.push({name:n,prefix:null,delimiter:null,optional:!1,repeat:!1,pattern:null});return e}(e,t):Array.isArray(e)?function(e,t,i){for(var n=[],r=0;r<e.length;r++)n.push(A(e[r],t,i).source);return new RegExp("(?:"+n.join("|")+")",C(i))}(e,t,i):function(e,t,i){return x(T(e,i),t,i)}(e,t,i)}f.match=function(e,t){var i=[];return w(A(e,i,t),i)},f.regexpToFunction=m,f.parse=g,f.compile=function(e,t){return S(T(e,t),t)},f.tokensToFunction=v,f.tokensToRegExp=y;var P={container:"container",history:"history",namespace:"namespace",prefix:"data-barba",prevent:"prevent",wrapper:"wrapper"},I=new(function(){function e(){this.o=P,this.u=new DOMParser}var t=e.prototype;return t.toString=function(e){return e.outerHTML},t.toDocument=function(e){return this.u.parseFromString(e,"text/html")},t.toElement=function(e){var t=document.createElement("div");return t.innerHTML=e,t},t.getHtml=function(e){return void 0===e&&(e=document),this.toString(e.documentElement)},t.getWrapper=function(e){return void 0===e&&(e=document),e.querySelector("["+this.o.prefix+'="'+this.o.wrapper+'"]')},t.getContainer=function(e){return void 0===e&&(e=document),e.querySelector("["+this.o.prefix+'="'+this.o.container+'"]')},t.removeContainer=function(e){document.body.contains(e)&&e.parentNode.removeChild(e)},t.addContainer=function(e,t){var i=this.getContainer();i?this.s(e,i):t.appendChild(e)},t.getNamespace=function(e){void 0===e&&(e=document);var t=e.querySelector("["+this.o.prefix+"-"+this.o.namespace+"]");return t?t.getAttribute(this.o.prefix+"-"+this.o.namespace):null},t.getHref=function(e){if(e.tagName&&"a"===e.tagName.toLowerCase()){if("string"==typeof e.href)return e.href;var t=e.getAttribute("href")||e.getAttribute("xlink:href");if(t)return this.resolveUrl(t.baseVal||t)}return null},t.resolveUrl=function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];var n=t.length;if(0===n)throw new Error("resolveUrl requires at least one argument; got none.");var r=document.createElement("base");if(r.href=arguments[0],1===n)return r.href;var s=document.getElementsByTagName("head")[0];s.insertBefore(r,s.firstChild);for(var a,o=document.createElement("a"),l=1;l<n;l++)o.href=arguments[l],r.href=a=o.href;return s.removeChild(r),a},t.s=function(e,t){t.parentNode.insertBefore(e,t.nextSibling)},e}()),O=new(function(){function e(){this.h=[],this.v=-1}var n=e.prototype;return n.init=function(e,t){this.l="barba";var i={ns:t,scroll:{x:window.scrollX,y:window.scrollY},url:e};this.h.push(i),this.v=0;var n={from:this.l,index:0,states:[].concat(this.h)};window.history&&window.history.replaceState(n,"",e)},n.change=function(e,t,i){if(i&&i.state){var n=i.state,r=n.index;t=this.m(this.v-r),this.replace(n.states),this.v=r}else this.add(e,t);return t},n.add=function(e,t){var i=this.size,n=this.p(t),r={ns:"tmp",scroll:{x:window.scrollX,y:window.scrollY},url:e};this.h.push(r),this.v=i;var s={from:this.l,index:i,states:[].concat(this.h)};switch(n){case"push":window.history&&window.history.pushState(s,"",e);break;case"replace":window.history&&window.history.replaceState(s,"",e)}},n.update=function(e,t){var n=t||this.v,r=i({},this.get(n),{},e);this.set(n,r)},n.remove=function(e){e?this.h.splice(e,1):this.h.pop(),this.v--},n.clear=function(){this.h=[],this.v=-1},n.replace=function(e){this.h=e},n.get=function(e){return this.h[e]},n.set=function(e,t){return this.h[e]=t},n.p=function(e){var t="push",i=e,n=P.prefix+"-"+P.history;return i.hasAttribute&&i.hasAttribute(n)&&(t=i.getAttribute(n)),t},n.m=function(e){return Math.abs(e)>1?e>0?"forward":"back":0===e?"popstate":e>0?"back":"forward"},t(e,[{key:"current",get:function(){return this.h[this.v]}},{key:"state",get:function(){return this.h[this.h.length-1]}},{key:"previous",get:function(){return this.v<1?null:this.h[this.v-1]}},{key:"size",get:function(){return this.h.length}}]),e}()),L=function(e,t){try{var i=function(){if(!t.next.html)return Promise.resolve(e).then((function(e){var i=t.next;if(e){var n=I.toElement(e);i.namespace=I.getNamespace(n),i.container=I.getContainer(n),i.html=e,O.update({ns:i.namespace});var r=I.toDocument(e);document.title=r.title}}))}();return Promise.resolve(i&&i.then?i.then((function(){})):void 0)}catch(e){return Promise.reject(e)}},D=f,M={__proto__:null,update:L,nextTick:function(){return new Promise((function(e){window.requestAnimationFrame(e)}))},pathToRegexp:D},N=function(){return window.location.origin},R=function(e){return void 0===e&&(e=window.location.href),U(e).port},U=function(e){var t,i=e.match(/:\d+/);if(null===i)/^http/.test(e)&&(t=80),/^https/.test(e)&&(t=443);else{var n=i[0].substring(1);t=parseInt(n,10)}var r,s=e.replace(N(),""),a={},o=s.indexOf("#");o>=0&&(r=s.slice(o+1),s=s.slice(0,o));var l=s.indexOf("?");return l>=0&&(a=B(s.slice(l+1)),s=s.slice(0,l)),{hash:r,path:s,port:t,query:a}},B=function(e){return e.split("&").reduce((function(e,t){var i=t.split("=");return e[i[0]]=i[1],e}),{})},j=function(e){return void 0===e&&(e=window.location.href),e.replace(/(\/#.*|\/|#.*)$/,"")},F={__proto__:null,getHref:function(){return window.location.href},getOrigin:N,getPort:R,getPath:function(e){return void 0===e&&(e=window.location.href),U(e).path},parse:U,parseQuery:B,clean:j};function H(e,t,i){return void 0===t&&(t=2e3),new Promise((function(n,r){var s=new XMLHttpRequest;s.onreadystatechange=function(){if(s.readyState===XMLHttpRequest.DONE)if(200===s.status)n(s.responseText);else if(s.status){var t={status:s.status,statusText:s.statusText};i(e,t),r(t)}},s.ontimeout=function(){var n=new Error("Timeout error ["+t+"]");i(e,n),r(n)},s.onerror=function(){var t=new Error("Fetch error");i(e,t),r(t)},s.open("GET",e),s.timeout=t,s.setRequestHeader("Accept","text/html,application/xhtml+xml,application/xml"),s.setRequestHeader("x-barba","yes"),s.send()}))}var q=function(e){return!!e&&("object"==typeof e||"function"==typeof e)&&"function"==typeof e.then};function z(e,t){return void 0===t&&(t={}),function(){for(var i=arguments.length,n=new Array(i),r=0;r<i;r++)n[r]=arguments[r];var s=!1,a=new Promise((function(i,r){t.async=function(){return s=!0,function(e,t){e?r(e):i(t)}};var a=e.apply(t,n);s||(q(a)?a.then(i,r):i(a))}));return a}}var W=new(function(e){function t(){var t;return(t=e.call(this)||this).logger=new p("@barba/core"),t.all=["ready","page","reset","currentAdded","currentRemoved","nextAdded","nextRemoved","beforeOnce","once","afterOnce","before","beforeLeave","leave","afterLeave","beforeEnter","enter","afterEnter","after"],t.registered=new Map,t.init(),t}n(t,e);var i=t.prototype;return i.init=function(){var e=this;this.registered.clear(),this.all.forEach((function(t){e[t]||(e[t]=function(i,n){e.registered.has(t)||e.registered.set(t,new Set),e.registered.get(t).add({ctx:n||{},fn:i})})}))},i.do=function(e){for(var t=this,i=arguments.length,n=new Array(i>1?i-1:0),r=1;r<i;r++)n[r-1]=arguments[r];if(this.registered.has(e)){var s=Promise.resolve();return this.registered.get(e).forEach((function(e){s=s.then((function(){return z(e.fn,e.ctx).apply(void 0,n)}))})),s.catch((function(i){t.logger.debug("Hook error ["+e+"]"),t.logger.error(i)}))}return Promise.resolve()},i.clear=function(){var e=this;this.all.forEach((function(t){delete e[t]})),this.init()},i.help=function(){this.logger.info("Available hooks: "+this.all.join(","));var e=[];this.registered.forEach((function(t,i){return e.push(i)})),this.logger.info("Registered hooks: "+e.join(","))},t}(d)),V=function(){function e(e){if(this.P=[],"boolean"==typeof e)this.g=e;else{var t=Array.isArray(e)?e:[e];this.P=t.map((function(e){return D(e)}))}}return e.prototype.checkHref=function(e){if("boolean"==typeof this.g)return this.g;var t=U(e).path;return this.P.some((function(e){return null!==e.exec(t)}))},e}(),$=function(e){function t(t){var i;return(i=e.call(this,t)||this).k=new Map,i}n(t,e);var r=t.prototype;return r.set=function(e,t,i){return this.k.set(e,{action:i,request:t}),{action:i,request:t}},r.get=function(e){return this.k.get(e)},r.getRequest=function(e){return this.k.get(e).request},r.getAction=function(e){return this.k.get(e).action},r.has=function(e){return!this.checkHref(e)&&this.k.has(e)},r.delete=function(e){return this.k.delete(e)},r.update=function(e,t){var n=i({},this.k.get(e),{},t);return this.k.set(e,n),n},t}(V),X=function(){return!window.history.pushState},G=function(e){return!e.el||!e.href},Y=function(e){var t=e.event;return t.which>1||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey},K=function(e){var t=e.el;return t.hasAttribute("target")&&"_blank"===t.target},Q=function(e){var t=e.el;return void 0!==t.protocol&&window.location.protocol!==t.protocol||void 0!==t.hostname&&window.location.hostname!==t.hostname},J=function(e){var t=e.el;return void 0!==t.port&&R()!==R(t.href)},Z=function(e){var t=e.el;return t.getAttribute&&"string"==typeof t.getAttribute("download")},ee=function(e){return e.el.hasAttribute(P.prefix+"-"+P.prevent)},te=function(e){return Boolean(e.el.closest("["+P.prefix+"-"+P.prevent+'="all"]'))},ie=function(e){var t=e.href;return j(t)===j()&&R(t)===R()},ne=function(e){function t(t){var i;return(i=e.call(this,t)||this).suite=[],i.tests=new Map,i.init(),i}n(t,e);var i=t.prototype;return i.init=function(){this.add("pushState",X),this.add("exists",G),this.add("newTab",Y),this.add("blank",K),this.add("corsDomain",Q),this.add("corsPort",J),this.add("download",Z),this.add("preventSelf",ee),this.add("preventAll",te),this.add("sameUrl",ie,!1)},i.add=function(e,t,i){void 0===i&&(i=!0),this.tests.set(e,t),i&&this.suite.push(e)},i.run=function(e,t,i,n){return this.tests.get(e)({el:t,event:i,href:n})},i.checkLink=function(e,t,i){var n=this;return this.suite.some((function(r){return n.run(r,e,t,i)}))},t}(V),re=function(e){function t(i,n){var r;void 0===n&&(n="Barba error");for(var s=arguments.length,a=new Array(s>2?s-2:0),o=2;o<s;o++)a[o-2]=arguments[o];return(r=e.call.apply(e,[this].concat(a))||this).error=i,r.label=n,Error.captureStackTrace&&Error.captureStackTrace(function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(r),t),r.name="BarbaError",r}return n(t,e),t}(o(Error)),se=function(){function e(e){void 0===e&&(e=[]),this.logger=new p("@barba/core"),this.all=[],this.page=[],this.once=[],this.A=[{name:"namespace",type:"strings"},{name:"custom",type:"function"}],e&&(this.all=this.all.concat(e)),this.update()}var t=e.prototype;return t.add=function(e,t){"rule"===e?this.A.splice(t.position||0,0,t.value):this.all.push(t),this.update()},t.resolve=function(e,t){var i=this;void 0===t&&(t={});var n=t.once?this.once:this.page;n=n.filter(t.self?function(e){return e.name&&"self"===e.name}:function(e){return!e.name||"self"!==e.name});var r=new Map,s=n.find((function(n){var s=!0,a={};return!(!t.self||"self"!==n.name)||(i.A.reverse().forEach((function(t){s&&(s=i.R(n,t,e,a),n.from&&n.to&&(s=i.R(n,t,e,a,"from")&&i.R(n,t,e,a,"to")),n.from&&!n.to&&(s=i.R(n,t,e,a,"from")),!n.from&&n.to&&(s=i.R(n,t,e,a,"to")))})),r.set(n,a),s)})),a=r.get(s),o=[];if(o.push(t.once?"once":"page"),t.self&&o.push("self"),a){var l,u=[s];Object.keys(a).length>0&&u.push(a),(l=this.logger).info.apply(l,["Transition found ["+o.join(",")+"]"].concat(u))}else this.logger.info("No transition found ["+o.join(",")+"]");return s},t.update=function(){var e=this;this.all=this.all.map((function(t){return e.T(t)})).sort((function(e,t){return e.priority-t.priority})).reverse().map((function(e){return delete e.priority,e})),this.page=this.all.filter((function(e){return void 0!==e.leave||void 0!==e.enter})),this.once=this.all.filter((function(e){return void 0!==e.once}))},t.R=function(e,t,i,n,r){var s=!0,a=!1,o=e,l=t.name,u=l,c=l,d=l,h=r?o[r]:o,p="to"===r?i.next:i.current;if(r?h&&h[l]:h[l]){switch(t.type){case"strings":default:var f=Array.isArray(h[u])?h[u]:[h[u]];p[u]&&-1!==f.indexOf(p[u])&&(a=!0),-1===f.indexOf(p[u])&&(s=!1);break;case"object":var m=Array.isArray(h[c])?h[c]:[h[c]];p[c]?(p[c].name&&-1!==m.indexOf(p[c].name)&&(a=!0),-1===m.indexOf(p[c].name)&&(s=!1)):s=!1;break;case"function":h[d](i)?a=!0:s=!1}a&&(r?(n[r]=n[r]||{},n[r][l]=o[r][l]):n[l]=o[l])}return s},t.O=function(e,t,i){var n=0;return(e[t]||e.from&&e.from[t]||e.to&&e.to[t])&&(n+=Math.pow(10,i),e.from&&e.from[t]&&(n+=1),e.to&&e.to[t]&&(n+=2)),n},t.T=function(e){var t=this;e.priority=0;var i=0;return this.A.forEach((function(n,r){i+=t.O(e,n.name,r+1)})),e.priority=i,e},e}(),ae=function(){function e(e){void 0===e&&(e=[]),this.logger=new p("@barba/core"),this.S=!1,this.store=new se(e)}var i=e.prototype;return i.get=function(e,t){return this.store.resolve(e,t)},i.doOnce=function(e){var t=e.data,i=e.transition;try{var n=function(){r.S=!1},r=this,s=i||{};r.S=!0;var a=l((function(){return Promise.resolve(r.j("beforeOnce",t,s)).then((function(){return Promise.resolve(r.once(t,s)).then((function(){return Promise.resolve(r.j("afterOnce",t,s)).then((function(){}))}))}))}),(function(e){r.S=!1,r.logger.debug("Transition error [before/after/once]"),r.logger.error(e)}));return Promise.resolve(a&&a.then?a.then(n):n())}catch(e){return Promise.reject(e)}},i.doPage=function(e){var t=e.data,i=e.transition,n=e.page,r=e.wrapper;try{var s=function(e){if(a)return e;o.S=!1},a=!1,o=this,u=i||{},c=!0===u.sync||!1;o.S=!0;var d=l((function(){function e(){return Promise.resolve(o.j("before",t,u)).then((function(){var e=!1;function i(i){return e?i:Promise.resolve(o.remove(t)).then((function(){return Promise.resolve(o.j("after",t,u)).then((function(){}))}))}var s=function(){if(c)return l((function(){return Promise.resolve(o.add(t,r)).then((function(){return Promise.resolve(o.j("beforeLeave",t,u)).then((function(){return Promise.resolve(o.j("beforeEnter",t,u)).then((function(){return Promise.resolve(Promise.all([o.leave(t,u),o.enter(t,u)])).then((function(){return Promise.resolve(o.j("afterLeave",t,u)).then((function(){return Promise.resolve(o.j("afterEnter",t,u)).then((function(){}))}))}))}))}))}))}),(function(e){if(o.M(e))throw new re(e,"Transition error [sync]")}));var i=function(i){return e?i:l((function(){var e=function(){if(!1!==s)return Promise.resolve(o.add(t,r)).then((function(){return Promise.resolve(o.j("beforeEnter",t,u)).then((function(){return Promise.resolve(o.enter(t,u,s)).then((function(){return Promise.resolve(o.j("afterEnter",t,u)).then((function(){}))}))}))}))}();if(e&&e.then)return e.then((function(){}))}),(function(e){if(o.M(e))throw new re(e,"Transition error [before/after/enter]")}))},s=!1,a=l((function(){return Promise.resolve(o.j("beforeLeave",t,u)).then((function(){return Promise.resolve(Promise.all([o.leave(t,u),L(n,t)]).then((function(e){return e[0]}))).then((function(e){return s=e,Promise.resolve(o.j("afterLeave",t,u)).then((function(){}))}))}))}),(function(e){if(o.M(e))throw new re(e,"Transition error [before/after/leave]")}));return a&&a.then?a.then(i):i(a)}();return s&&s.then?s.then(i):i(s)}))}var i=function(){if(c)return Promise.resolve(L(n,t)).then((function(){}))}();return i&&i.then?i.then(e):e()}),(function(e){if(o.S=!1,e.name&&"BarbaError"===e.name)throw o.logger.debug(e.label),o.logger.error(e.error),e;throw o.logger.debug("Transition error [page]"),o.logger.error(e),e}));return Promise.resolve(d&&d.then?d.then(s):s(d))}catch(e){return Promise.reject(e)}},i.once=function(e,t){try{return Promise.resolve(W.do("once",e,t)).then((function(){return t.once?z(t.once,t)(e):Promise.resolve()}))}catch(e){return Promise.reject(e)}},i.leave=function(e,t){try{return Promise.resolve(W.do("leave",e,t)).then((function(){return t.leave?z(t.leave,t)(e):Promise.resolve()}))}catch(e){return Promise.reject(e)}},i.enter=function(e,t,i){try{return Promise.resolve(W.do("enter",e,t)).then((function(){return t.enter?z(t.enter,t)(e,i):Promise.resolve()}))}catch(e){return Promise.reject(e)}},i.add=function(e,t){try{return I.addContainer(e.next.container,t),W.do("nextAdded",e),Promise.resolve()}catch(e){return Promise.reject(e)}},i.remove=function(e){try{return I.removeContainer(e.current.container),W.do("currentRemoved",e),Promise.resolve()}catch(e){return Promise.reject(e)}},i.M=function(e){return e.message?!/Timeout error|Fetch error/.test(e.message):!e.status},i.j=function(e,t,i){try{return Promise.resolve(W.do(e,t,i)).then((function(){return i[e]?z(i[e],i)(t):Promise.resolve()}))}catch(e){return Promise.reject(e)}},t(e,[{key:"isRunning",get:function(){return this.S},set:function(e){this.S=e}},{key:"hasOnce",get:function(){return this.store.once.length>0}},{key:"hasSelf",get:function(){return this.store.all.some((function(e){return"self"===e.name}))}},{key:"shouldWait",get:function(){return this.store.all.some((function(e){return e.to&&!e.to.route||e.sync}))}}]),e}(),oe=function(){function e(e){var t=this;this.names=["beforeLeave","afterLeave","beforeEnter","afterEnter"],this.byNamespace=new Map,0!==e.length&&(e.forEach((function(e){t.byNamespace.set(e.namespace,e)})),this.names.forEach((function(e){W[e](t.L(e))})))}return e.prototype.L=function(e){var t=this;return function(i){var n=e.match(/enter/i)?i.next:i.current,r=t.byNamespace.get(n.namespace);return r&&r[e]?z(r[e],r)(i):Promise.resolve()}},e}();Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector),Element.prototype.closest||(Element.prototype.closest=function(e){var t=this;do{if(t.matches(e))return t;t=t.parentElement||t.parentNode}while(null!==t&&1===t.nodeType);return null});var le={container:null,html:"",namespace:"",url:{hash:"",href:"",path:"",port:null,query:{}}};return new(function(){function e(){this.version=c,this.schemaPage=le,this.Logger=p,this.logger=new p("@barba/core"),this.plugins=[],this.hooks=W,this.dom=I,this.helpers=M,this.history=O,this.request=H,this.url=F}var n=e.prototype;return n.use=function(e,t){var i=this.plugins;i.indexOf(e)>-1?this.logger.warn("Plugin ["+e.name+"] already installed."):"function"==typeof e.install?(e.install(this,t),i.push(e)):this.logger.warn("Plugin ["+e.name+'] has no "install" method.')},n.init=function(e){var t=void 0===e?{}:e,n=t.transitions,r=void 0===n?[]:n,s=t.views,a=void 0===s?[]:s,o=t.schema,l=void 0===o?P:o,u=t.requestError,c=t.timeout,d=void 0===c?2e3:c,h=t.cacheIgnore,f=void 0!==h&&h,m=t.prefetchIgnore,g=void 0!==m&&m,v=t.preventRunning,y=void 0!==v&&v,_=t.prevent,b=void 0===_?null:_,T=t.debug,w=t.logLevel;if(p.setLevel(!0===(void 0!==T&&T)?"debug":void 0===w?"off":w),this.logger.info(this.version),Object.keys(l).forEach((function(e){P[e]&&(P[e]=l[e])})),this.$=u,this.timeout=d,this.cacheIgnore=f,this.prefetchIgnore=g,this.preventRunning=y,this._=this.dom.getWrapper(),!this._)throw new Error("[@barba/core] No Barba wrapper found");this._.setAttribute("aria-live","polite"),this.q();var S=this.data.current;if(!S.container)throw new Error("[@barba/core] No Barba container found");if(this.cache=new $(f),this.prevent=new ne(g),this.transitions=new ae(r),this.views=new oe(a),null!==b){if("function"!=typeof b)throw new Error("[@barba/core] Prevent should be a function");this.prevent.add("preventCustom",b)}this.history.init(S.url.href,S.namespace),this.B=this.B.bind(this),this.U=this.U.bind(this),this.D=this.D.bind(this),this.F(),this.plugins.forEach((function(e){return e.init()}));var k=this.data;k.trigger="barba",k.next=k.current,k.current=i({},this.schemaPage),this.hooks.do("ready",k),this.once(k),this.q()},n.destroy=function(){this.q(),this.H(),this.history.clear(),this.hooks.clear(),this.plugins=[]},n.force=function(e){window.location.assign(e)},n.go=function(e,t,i){var n;if(void 0===t&&(t="barba"),this.transitions.isRunning)this.force(e);else if(!(n="popstate"===t?this.history.current&&this.url.getPath(this.history.current.url)===this.url.getPath(e):this.prevent.run("sameUrl",null,null,e))||this.transitions.hasSelf)return t=this.history.change(e,t,i),i&&(i.stopPropagation(),i.preventDefault()),this.page(e,t,n)},n.once=function(e){try{var t=this;return Promise.resolve(t.hooks.do("beforeEnter",e)).then((function(){function i(){return Promise.resolve(t.hooks.do("afterEnter",e)).then((function(){}))}var n=function(){if(t.transitions.hasOnce){var i=t.transitions.get(e,{once:!0});return Promise.resolve(t.transitions.doOnce({transition:i,data:e})).then((function(){}))}}();return n&&n.then?n.then(i):i()}))}catch(e){return Promise.reject(e)}},n.page=function(e,t,n){try{var r=function(){var e=s.data;return Promise.resolve(s.hooks.do("page",e)).then((function(){var t=l((function(){var t=s.transitions.get(e,{once:!1,self:n});return Promise.resolve(s.transitions.doPage({data:e,page:a,transition:t,wrapper:s._})).then((function(){s.q()}))}),(function(){0===p.getLevel()&&s.force(e.current.url.href)}));if(t&&t.then)return t.then((function(){}))}))},s=this;s.data.next.url=i({href:e},s.url.parse(e)),s.data.trigger=t;var a=s.cache.has(e)?s.cache.update(e,{action:"click"}).request:s.cache.set(e,s.request(e,s.timeout,s.onRequestError.bind(s,t)),"click").request,o=function(){if(s.transitions.shouldWait)return Promise.resolve(L(a,s.data)).then((function(){}))}();return Promise.resolve(o&&o.then?o.then(r):r())}catch(e){return Promise.reject(e)}},n.onRequestError=function(e){this.transitions.isRunning=!1;for(var t=arguments.length,i=new Array(t>1?t-1:0),n=1;n<t;n++)i[n-1]=arguments[n];var r=i[0],s=i[1],a=this.cache.getAction(r);return this.cache.delete(r),!(this.$&&!1===this.$(e,a,r,s)||("click"===a&&this.force(r),1))},n.prefetch=function(e){var t=this;this.cache.has(e)||this.cache.set(e,this.request(e,this.timeout,this.onRequestError.bind(this,"barba")).catch((function(e){t.logger.error(e)})),"prefetch")},n.F=function(){!0!==this.prefetchIgnore&&(document.addEventListener("mouseover",this.B),document.addEventListener("touchstart",this.B)),document.addEventListener("click",this.U),window.addEventListener("popstate",this.D)},n.H=function(){!0!==this.prefetchIgnore&&(document.removeEventListener("mouseover",this.B),document.removeEventListener("touchstart",this.B)),document.removeEventListener("click",this.U),window.removeEventListener("popstate",this.D)},n.B=function(e){var t=this,i=this.I(e);if(i){var n=this.dom.getHref(i);this.prevent.checkHref(n)||this.cache.has(n)||this.cache.set(n,this.request(n,this.timeout,this.onRequestError.bind(this,i)).catch((function(e){t.logger.error(e)})),"enter")}},n.U=function(e){var t=this.I(e);if(t)return this.transitions.isRunning&&this.preventRunning?(e.preventDefault(),void e.stopPropagation()):void this.go(this.dom.getHref(t),t,e)},n.D=function(e){this.go(this.url.getHref(),"popstate",e)},n.I=function(e){for(var t=e.target;t&&!this.dom.getHref(t);)t=t.parentNode;if(t&&!this.prevent.checkLink(t,e,this.dom.getHref(t)))return t},n.q=function(){var e=this.url.getHref(),t={container:this.dom.getContainer(),html:this.dom.getHtml(),namespace:this.dom.getNamespace(),url:i({href:e},this.url.parse(e))};this.C={current:t,next:i({},this.schemaPage),trigger:void 0},this.hooks.do("reset",this.data)},t(e,[{key:"data",get:function(){return this.C}},{key:"wrapper",get:function(){return this._}}]),e}())}()},(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>s});var n=i(61),r=i.n(n);i(64);const s={init:function(){setTimeout((function(){r()(".panels-container").length>0&&r()(".panels-container").each((function(){r()(this).slick({slidesToShow:1,dots:!0,slidesToScroll:1,infinite:!0,rtl:!0,autoplaySpeed:5e3,autoplay:!0,centerMode:!1,pauseOnHover:!1,responsive:!0,arrows:!1,appendDots:r()(this).parent().find(".dotswrap").find(".container")}).slick("slickPause"),r()(".panels-container").each((function(){let e=r()(this),t=!1,i=r()(window).scrollTop(),n=i+r()(window).height(),s=e.offset().top,a=s+e.height();r()(window).on("scroll",(function(){i=r()(window).scrollTop(),n=i+r()(window).height(),s=e.offset().top,a=s+e.height(),n>s&&i<a&&(t||(e.each((function(e){r()(this).find(".slick-current").addClass("forward"),r()(this).slick("slickPlay")})),t=!0))}))})),r()(this).on("beforeChange",(function(e,t,i,n){n>i?(r()(t.$slides[i]).prevAll().removeClass("backward").removeClass("forward"),r()(t.$slides[n]).nextAll().removeClass("backward").removeClass("forward"),r()(t.$slides[n]).removeClass("backward").addClass("forward")):i===t.$slides.length-1&&0===n?(r()(t.$slides[i]).prevAll().removeClass("backward").removeClass("forward"),r()(t.$slides[n]).addClass("forward")):(r()(t.$slides[n]).prevAll().removeClass("backward"),r()(t.$slides[n]).removeClass("forward").addClass("backward"))}))}))}),500)}}},(e,t,i)=>{var n,r,s;!function(a){"use strict";r=[i(61)],n=function(e){var t=window.Slick||{};(t=function(){var t=0;function i(i,n){var r,s=this;s.defaults={accessibility:!0,adaptiveHeight:!1,appendArrows:e(i),appendDots:e(i),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,i){return e('<button type="button" />').text(i+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},s.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},e.extend(s,s.initials),s.activeBreakpoint=null,s.animType=null,s.animProp=null,s.breakpoints=[],s.breakpointSettings=[],s.cssTransitions=!1,s.focussed=!1,s.interrupted=!1,s.hidden="hidden",s.paused=!0,s.positionProp=null,s.respondTo=null,s.rowCount=1,s.shouldClick=!0,s.$slider=e(i),s.$slidesCache=null,s.transformType=null,s.transitionType=null,s.visibilityChange="visibilitychange",s.windowWidth=0,s.windowTimer=null,r=e(i).data("slick")||{},s.options=e.extend({},s.defaults,n,r),s.currentSlide=s.options.initialSlide,s.originalSettings=s.options,void 0!==document.mozHidden?(s.hidden="mozHidden",s.visibilityChange="mozvisibilitychange"):void 0!==document.webkitHidden&&(s.hidden="webkitHidden",s.visibilityChange="webkitvisibilitychange"),s.autoPlay=e.proxy(s.autoPlay,s),s.autoPlayClear=e.proxy(s.autoPlayClear,s),s.autoPlayIterator=e.proxy(s.autoPlayIterator,s),s.changeSlide=e.proxy(s.changeSlide,s),s.clickHandler=e.proxy(s.clickHandler,s),s.selectHandler=e.proxy(s.selectHandler,s),s.setPosition=e.proxy(s.setPosition,s),s.swipeHandler=e.proxy(s.swipeHandler,s),s.dragHandler=e.proxy(s.dragHandler,s),s.keyHandler=e.proxy(s.keyHandler,s),s.instanceUid=t++,s.htmlExpr=/^(?:\s*(<[\w\W]+>)[^>]*)$/,s.registerBreakpoints(),s.init(!0)}return i}()).prototype.activateADA=function(){this.$slideTrack.find(".slick-active").attr({"aria-hidden":"false"}).find("a, input, button, select").attr({tabindex:"0"})},t.prototype.addSlide=t.prototype.slickAdd=function(t,i,n){var r=this;if("boolean"==typeof i)n=i,i=null;else if(i<0||i>=r.slideCount)return!1;r.unload(),"number"==typeof i?0===i&&0===r.$slides.length?e(t).appendTo(r.$slideTrack):n?e(t).insertBefore(r.$slides.eq(i)):e(t).insertAfter(r.$slides.eq(i)):!0===n?e(t).prependTo(r.$slideTrack):e(t).appendTo(r.$slideTrack),r.$slides=r.$slideTrack.children(this.options.slide),r.$slideTrack.children(this.options.slide).detach(),r.$slideTrack.append(r.$slides),r.$slides.each((function(t,i){e(i).attr("data-slick-index",t)})),r.$slidesCache=r.$slides,r.reinit()},t.prototype.animateHeight=function(){var e=this;if(1===e.options.slidesToShow&&!0===e.options.adaptiveHeight&&!1===e.options.vertical){var t=e.$slides.eq(e.currentSlide).outerHeight(!0);e.$list.animate({height:t},e.options.speed)}},t.prototype.animateSlide=function(t,i){var n={},r=this;r.animateHeight(),!0===r.options.rtl&&!1===r.options.vertical&&(t=-t),!1===r.transformsEnabled?!1===r.options.vertical?r.$slideTrack.animate({left:t},r.options.speed,r.options.easing,i):r.$slideTrack.animate({top:t},r.options.speed,r.options.easing,i):!1===r.cssTransitions?(!0===r.options.rtl&&(r.currentLeft=-r.currentLeft),e({animStart:r.currentLeft}).animate({animStart:t},{duration:r.options.speed,easing:r.options.easing,step:function(e){e=Math.ceil(e),!1===r.options.vertical?(n[r.animType]="translate("+e+"px, 0px)",r.$slideTrack.css(n)):(n[r.animType]="translate(0px,"+e+"px)",r.$slideTrack.css(n))},complete:function(){i&&i.call()}})):(r.applyTransition(),t=Math.ceil(t),!1===r.options.vertical?n[r.animType]="translate3d("+t+"px, 0px, 0px)":n[r.animType]="translate3d(0px,"+t+"px, 0px)",r.$slideTrack.css(n),i&&setTimeout((function(){r.disableTransition(),i.call()}),r.options.speed))},t.prototype.getNavTarget=function(){var t=this,i=t.options.asNavFor;return i&&null!==i&&(i=e(i).not(t.$slider)),i},t.prototype.asNavFor=function(t){var i=this.getNavTarget();null!==i&&"object"==typeof i&&i.each((function(){var i=e(this).slick("getSlick");i.unslicked||i.slideHandler(t,!0)}))},t.prototype.applyTransition=function(e){var t=this,i={};!1===t.options.fade?i[t.transitionType]=t.transformType+" "+t.options.speed+"ms "+t.options.cssEase:i[t.transitionType]="opacity "+t.options.speed+"ms "+t.options.cssEase,!1===t.options.fade?t.$slideTrack.css(i):t.$slides.eq(e).css(i)},t.prototype.autoPlay=function(){var e=this;e.autoPlayClear(),e.slideCount>e.options.slidesToShow&&(e.autoPlayTimer=setInterval(e.autoPlayIterator,e.options.autoplaySpeed))},t.prototype.autoPlayClear=function(){var e=this;e.autoPlayTimer&&clearInterval(e.autoPlayTimer)},t.prototype.autoPlayIterator=function(){var e=this,t=e.currentSlide+e.options.slidesToScroll;e.paused||e.interrupted||e.focussed||(!1===e.options.infinite&&(1===e.direction&&e.currentSlide+1===e.slideCount-1?e.direction=0:0===e.direction&&(t=e.currentSlide-e.options.slidesToScroll,e.currentSlide-1==0&&(e.direction=1))),e.slideHandler(t))},t.prototype.buildArrows=function(){var t=this;!0===t.options.arrows&&(t.$prevArrow=e(t.options.prevArrow).addClass("slick-arrow"),t.$nextArrow=e(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"}))},t.prototype.buildDots=function(){var t,i,n=this;if(!0===n.options.dots&&n.slideCount>n.options.slidesToShow){for(n.$slider.addClass("slick-dotted"),i=e("<ul />").addClass(n.options.dotsClass),t=0;t<=n.getDotCount();t+=1)i.append(e("<li />").append(n.options.customPaging.call(this,n,t)));n.$dots=i.appendTo(n.options.appendDots),n.$dots.find("li").first().addClass("slick-active")}},t.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,i){e(i).attr("data-slick-index",t).data("originalStyling",e(i).attr("style")||"")})),t.$slider.addClass("slick-slider"),t.$slideTrack=0===t.slideCount?e('<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),e("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")},t.prototype.buildRows=function(){var e,t,i,n,r,s,a,o=this;if(n=document.createDocumentFragment(),s=o.$slider.children(),o.options.rows>0){for(a=o.options.slidesPerRow*o.options.rows,r=Math.ceil(s.length/a),e=0;e<r;e++){var l=document.createElement("div");for(t=0;t<o.options.rows;t++){var u=document.createElement("div");for(i=0;i<o.options.slidesPerRow;i++){var c=e*a+(t*o.options.slidesPerRow+i);s.get(c)&&u.appendChild(s.get(c))}l.appendChild(u)}n.appendChild(l)}o.$slider.empty().append(n),o.$slider.children().children().children().css({width:100/o.options.slidesPerRow+"%",display:"inline-block"})}},t.prototype.checkResponsive=function(t,i){var n,r,s,a=this,o=!1,l=a.$slider.width(),u=window.innerWidth||e(window).width();if("window"===a.respondTo?s=u:"slider"===a.respondTo?s=l:"min"===a.respondTo&&(s=Math.min(u,l)),a.options.responsive&&a.options.responsive.length&&null!==a.options.responsive){for(n in r=null,a.breakpoints)a.breakpoints.hasOwnProperty(n)&&(!1===a.originalSettings.mobileFirst?s<a.breakpoints[n]&&(r=a.breakpoints[n]):s>a.breakpoints[n]&&(r=a.breakpoints[n]));null!==r?null!==a.activeBreakpoint?(r!==a.activeBreakpoint||i)&&(a.activeBreakpoint=r,"unslick"===a.breakpointSettings[r]?a.unslick(r):(a.options=e.extend({},a.originalSettings,a.breakpointSettings[r]),!0===t&&(a.currentSlide=a.options.initialSlide),a.refresh(t)),o=r):(a.activeBreakpoint=r,"unslick"===a.breakpointSettings[r]?a.unslick(r):(a.options=e.extend({},a.originalSettings,a.breakpointSettings[r]),!0===t&&(a.currentSlide=a.options.initialSlide),a.refresh(t)),o=r):null!==a.activeBreakpoint&&(a.activeBreakpoint=null,a.options=a.originalSettings,!0===t&&(a.currentSlide=a.options.initialSlide),a.refresh(t),o=r),t||!1===o||a.$slider.trigger("breakpoint",[a,o])}},t.prototype.changeSlide=function(t,i){var n,r,s=this,a=e(t.currentTarget);switch(a.is("a")&&t.preventDefault(),a.is("li")||(a=a.closest("li")),n=s.slideCount%s.options.slidesToScroll!=0?0:(s.slideCount-s.currentSlide)%s.options.slidesToScroll,t.data.message){case"previous":r=0===n?s.options.slidesToScroll:s.options.slidesToShow-n,s.slideCount>s.options.slidesToShow&&s.slideHandler(s.currentSlide-r,!1,i);break;case"next":r=0===n?s.options.slidesToScroll:n,s.slideCount>s.options.slidesToShow&&s.slideHandler(s.currentSlide+r,!1,i);break;case"index":var o=0===t.data.index?0:t.data.index||a.index()*s.options.slidesToScroll;s.slideHandler(s.checkNavigable(o),!1,i),a.children().trigger("focus");break;default:return}},t.prototype.checkNavigable=function(e){var t,i;if(i=0,e>(t=this.getNavigableIndexes())[t.length-1])e=t[t.length-1];else for(var n in t){if(e<t[n]){e=i;break}i=t[n]}return e},t.prototype.cleanUpEvents=function(){var t=this;t.options.dots&&null!==t.$dots&&(e("li",t.$dots).off("click.slick",t.changeSlide).off("mouseenter.slick",e.proxy(t.interrupt,t,!0)).off("mouseleave.slick",e.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),e(document).off(t.visibilityChange,t.visibility),t.cleanUpSlideEvents(),!0===t.options.accessibility&&t.$list.off("keydown.slick",t.keyHandler),!0===t.options.focusOnSelect&&e(t.$slideTrack).children().off("click.slick",t.selectHandler),e(window).off("orientationchange.slick.slick-"+t.instanceUid,t.orientationChange),e(window).off("resize.slick.slick-"+t.instanceUid,t.resize),e("[draggable!=true]",t.$slideTrack).off("dragstart",t.preventDefault),e(window).off("load.slick.slick-"+t.instanceUid,t.setPosition)},t.prototype.cleanUpSlideEvents=function(){var t=this;t.$list.off("mouseenter.slick",e.proxy(t.interrupt,t,!0)),t.$list.off("mouseleave.slick",e.proxy(t.interrupt,t,!1))},t.prototype.cleanUpRows=function(){var e,t=this;t.options.rows>0&&((e=t.$slides.children().children()).removeAttr("style"),t.$slider.empty().append(e))},t.prototype.clickHandler=function(e){!1===this.shouldClick&&(e.stopImmediatePropagation(),e.stopPropagation(),e.preventDefault())},t.prototype.destroy=function(t){var i=this;i.autoPlayClear(),i.touchObject={},i.cleanUpEvents(),e(".slick-cloned",i.$slider).detach(),i.$dots&&i.$dots.remove(),i.$prevArrow&&i.$prevArrow.length&&(i.$prevArrow.removeClass("slick-disabled slick-arrow slick-hidden").removeAttr("aria-hidden aria-disabled tabindex").css("display",""),i.htmlExpr.test(i.options.prevArrow)&&i.$prevArrow.remove()),i.$nextArrow&&i.$nextArrow.length&&(i.$nextArrow.removeClass("slick-disabled slick-arrow slick-hidden").removeAttr("aria-hidden aria-disabled tabindex").css("display",""),i.htmlExpr.test(i.options.nextArrow)&&i.$nextArrow.remove()),i.$slides&&(i.$slides.removeClass("slick-slide slick-active slick-center slick-visible slick-current").removeAttr("aria-hidden").removeAttr("data-slick-index").each((function(){e(this).attr("style",e(this).data("originalStyling"))})),i.$slideTrack.children(this.options.slide).detach(),i.$slideTrack.detach(),i.$list.detach(),i.$slider.append(i.$slides)),i.cleanUpRows(),i.$slider.removeClass("slick-slider"),i.$slider.removeClass("slick-initialized"),i.$slider.removeClass("slick-dotted"),i.unslicked=!0,t||i.$slider.trigger("destroy",[i])},t.prototype.disableTransition=function(e){var t=this,i={};i[t.transitionType]="",!1===t.options.fade?t.$slideTrack.css(i):t.$slides.eq(e).css(i)},t.prototype.fadeSlide=function(e,t){var i=this;!1===i.cssTransitions?(i.$slides.eq(e).css({zIndex:i.options.zIndex}),i.$slides.eq(e).animate({opacity:1},i.options.speed,i.options.easing,t)):(i.applyTransition(e),i.$slides.eq(e).css({opacity:1,zIndex:i.options.zIndex}),t&&setTimeout((function(){i.disableTransition(e),t.call()}),i.options.speed))},t.prototype.fadeSlideOut=function(e){var t=this;!1===t.cssTransitions?t.$slides.eq(e).animate({opacity:0,zIndex:t.options.zIndex-2},t.options.speed,t.options.easing):(t.applyTransition(e),t.$slides.eq(e).css({opacity:0,zIndex:t.options.zIndex-2}))},t.prototype.filterSlides=t.prototype.slickFilter=function(e){var t=this;null!==e&&(t.$slidesCache=t.$slides,t.unload(),t.$slideTrack.children(this.options.slide).detach(),t.$slidesCache.filter(e).appendTo(t.$slideTrack),t.reinit())},t.prototype.focusHandler=function(){var t=this;t.$slider.off("focus.slick blur.slick").on("focus.slick blur.slick","*",(function(i){i.stopImmediatePropagation();var n=e(this);setTimeout((function(){t.options.pauseOnFocus&&(t.focussed=n.is(":focus"),t.autoPlay())}),0)}))},t.prototype.getCurrent=t.prototype.slickCurrentSlide=function(){return this.currentSlide},t.prototype.getDotCount=function(){var e=this,t=0,i=0,n=0;if(!0===e.options.infinite)if(e.slideCount<=e.options.slidesToShow)++n;else for(;t<e.slideCount;)++n,t=i+e.options.slidesToScroll,i+=e.options.slidesToScroll<=e.options.slidesToShow?e.options.slidesToScroll:e.options.slidesToShow;else if(!0===e.options.centerMode)n=e.slideCount;else if(e.options.asNavFor)for(;t<e.slideCount;)++n,t=i+e.options.slidesToScroll,i+=e.options.slidesToScroll<=e.options.slidesToShow?e.options.slidesToScroll:e.options.slidesToShow;else n=1+Math.ceil((e.slideCount-e.options.slidesToShow)/e.options.slidesToScroll);return n-1},t.prototype.getLeft=function(e){var t,i,n,r,s=this,a=0;return s.slideOffset=0,i=s.$slides.first().outerHeight(!0),!0===s.options.infinite?(s.slideCount>s.options.slidesToShow&&(s.slideOffset=s.slideWidth*s.options.slidesToShow*-1,r=-1,!0===s.options.vertical&&!0===s.options.centerMode&&(2===s.options.slidesToShow?r=-1.5:1===s.options.slidesToShow&&(r=-2)),a=i*s.options.slidesToShow*r),s.slideCount%s.options.slidesToScroll!=0&&e+s.options.slidesToScroll>s.slideCount&&s.slideCount>s.options.slidesToShow&&(e>s.slideCount?(s.slideOffset=(s.options.slidesToShow-(e-s.slideCount))*s.slideWidth*-1,a=(s.options.slidesToShow-(e-s.slideCount))*i*-1):(s.slideOffset=s.slideCount%s.options.slidesToScroll*s.slideWidth*-1,a=s.slideCount%s.options.slidesToScroll*i*-1))):e+s.options.slidesToShow>s.slideCount&&(s.slideOffset=(e+s.options.slidesToShow-s.slideCount)*s.slideWidth,a=(e+s.options.slidesToShow-s.slideCount)*i),s.slideCount<=s.options.slidesToShow&&(s.slideOffset=0,a=0),!0===s.options.centerMode&&s.slideCount<=s.options.slidesToShow?s.slideOffset=s.slideWidth*Math.floor(s.options.slidesToShow)/2-s.slideWidth*s.slideCount/2:!0===s.options.centerMode&&!0===s.options.infinite?s.slideOffset+=s.slideWidth*Math.floor(s.options.slidesToShow/2)-s.slideWidth:!0===s.options.centerMode&&(s.slideOffset=0,s.slideOffset+=s.slideWidth*Math.floor(s.options.slidesToShow/2)),t=!1===s.options.vertical?e*s.slideWidth*-1+s.slideOffset:e*i*-1+a,!0===s.options.variableWidth&&(n=s.slideCount<=s.options.slidesToShow||!1===s.options.infinite?s.$slideTrack.children(".slick-slide").eq(e):s.$slideTrack.children(".slick-slide").eq(e+s.options.slidesToShow),t=!0===s.options.rtl?n[0]?-1*(s.$slideTrack.width()-n[0].offsetLeft-n.width()):0:n[0]?-1*n[0].offsetLeft:0,!0===s.options.centerMode&&(n=s.slideCount<=s.options.slidesToShow||!1===s.options.infinite?s.$slideTrack.children(".slick-slide").eq(e):s.$slideTrack.children(".slick-slide").eq(e+s.options.slidesToShow+1),t=!0===s.options.rtl?n[0]?-1*(s.$slideTrack.width()-n[0].offsetLeft-n.width()):0:n[0]?-1*n[0].offsetLeft:0,t+=(s.$list.width()-n.outerWidth())/2)),t},t.prototype.getOption=t.prototype.slickGetOption=function(e){return this.options[e]},t.prototype.getNavigableIndexes=function(){var e,t=this,i=0,n=0,r=[];for(!1===t.options.infinite?e=t.slideCount:(i=-1*t.options.slidesToScroll,n=-1*t.options.slidesToScroll,e=2*t.slideCount);i<e;)r.push(i),i=n+t.options.slidesToScroll,n+=t.options.slidesToScroll<=t.options.slidesToShow?t.options.slidesToScroll:t.options.slidesToShow;return r},t.prototype.getSlick=function(){return this},t.prototype.getSlideCount=function(){var t,i,n=this;return i=!0===n.options.centerMode?n.slideWidth*Math.floor(n.options.slidesToShow/2):0,!0===n.options.swipeToSlide?(n.$slideTrack.find(".slick-slide").each((function(r,s){if(s.offsetLeft-i+e(s).outerWidth()/2>-1*n.swipeLeft)return t=s,!1})),Math.abs(e(t).attr("data-slick-index")-n.currentSlide)||1):n.options.slidesToScroll},t.prototype.goTo=t.prototype.slickGoTo=function(e,t){this.changeSlide({data:{message:"index",index:parseInt(e)}},t)},t.prototype.init=function(t){var i=this;e(i.$slider).hasClass("slick-initialized")||(e(i.$slider).addClass("slick-initialized"),i.buildRows(),i.buildOut(),i.setProps(),i.startLoad(),i.loadSlider(),i.initializeEvents(),i.updateArrows(),i.updateDots(),i.checkResponsive(!0),i.focusHandler()),t&&i.$slider.trigger("init",[i]),!0===i.options.accessibility&&i.initADA(),i.options.autoplay&&(i.paused=!1,i.autoPlay())},t.prototype.initADA=function(){var t=this,i=Math.ceil(t.slideCount/t.options.slidesToShow),n=t.getNavigableIndexes().filter((function(e){return e>=0&&e<t.slideCount}));t.$slides.add(t.$slideTrack.find(".slick-cloned")).attr({"aria-hidden":"true",tabindex:"-1"}).find("a, input, button, select").attr({tabindex:"-1"}),null!==t.$dots&&(t.$slides.not(t.$slideTrack.find(".slick-cloned")).each((function(i){var r=n.indexOf(i);if(e(this).attr({role:"tabpanel",id:"slick-slide"+t.instanceUid+i,tabindex:-1}),-1!==r){var s="slick-slide-control"+t.instanceUid+r;e("#"+s).length&&e(this).attr({"aria-describedby":s})}})),t.$dots.attr("role","tablist").find("li").each((function(r){var s=n[r];e(this).attr({role:"presentation"}),e(this).find("button").first().attr({role:"tab",id:"slick-slide-control"+t.instanceUid+r,"aria-controls":"slick-slide"+t.instanceUid+s,"aria-label":r+1+" of "+i,"aria-selected":null,tabindex:"-1"})})).eq(t.currentSlide).find("button").attr({"aria-selected":"true",tabindex:"0"}).end());for(var r=t.currentSlide,s=r+t.options.slidesToShow;r<s;r++)t.options.focusOnChange?t.$slides.eq(r).attr({tabindex:"0"}):t.$slides.eq(r).removeAttr("tabindex");t.activateADA()},t.prototype.initArrowEvents=function(){var e=this;!0===e.options.arrows&&e.slideCount>e.options.slidesToShow&&(e.$prevArrow.off("click.slick").on("click.slick",{message:"previous"},e.changeSlide),e.$nextArrow.off("click.slick").on("click.slick",{message:"next"},e.changeSlide),!0===e.options.accessibility&&(e.$prevArrow.on("keydown.slick",e.keyHandler),e.$nextArrow.on("keydown.slick",e.keyHandler)))},t.prototype.initDotEvents=function(){var t=this;!0===t.options.dots&&t.slideCount>t.options.slidesToShow&&(e("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&&e("li",t.$dots).on("mouseenter.slick",e.proxy(t.interrupt,t,!0)).on("mouseleave.slick",e.proxy(t.interrupt,t,!1))},t.prototype.initSlideEvents=function(){var t=this;t.options.pauseOnHover&&(t.$list.on("mouseenter.slick",e.proxy(t.interrupt,t,!0)),t.$list.on("mouseleave.slick",e.proxy(t.interrupt,t,!1)))},t.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),e(document).on(t.visibilityChange,e.proxy(t.visibility,t)),!0===t.options.accessibility&&t.$list.on("keydown.slick",t.keyHandler),!0===t.options.focusOnSelect&&e(t.$slideTrack).children().on("click.slick",t.selectHandler),e(window).on("orientationchange.slick.slick-"+t.instanceUid,e.proxy(t.orientationChange,t)),e(window).on("resize.slick.slick-"+t.instanceUid,e.proxy(t.resize,t)),e("[draggable!=true]",t.$slideTrack).on("dragstart",t.preventDefault),e(window).on("load.slick.slick-"+t.instanceUid,t.setPosition),e(t.setPosition)},t.prototype.initUI=function(){var e=this;!0===e.options.arrows&&e.slideCount>e.options.slidesToShow&&(e.$prevArrow.show(),e.$nextArrow.show()),!0===e.options.dots&&e.slideCount>e.options.slidesToShow&&e.$dots.show()},t.prototype.keyHandler=function(e){var t=this;e.target.tagName.match("TEXTAREA|INPUT|SELECT")||(37===e.keyCode&&!0===t.options.accessibility?t.changeSlide({data:{message:!0===t.options.rtl?"next":"previous"}}):39===e.keyCode&&!0===t.options.accessibility&&t.changeSlide({data:{message:!0===t.options.rtl?"previous":"next"}}))},t.prototype.lazyLoad=function(){var t,i,n,r=this;function s(t){e("img[data-lazy]",t).each((function(){var t=e(this),i=e(this).attr("data-lazy"),n=e(this).attr("data-srcset"),s=e(this).attr("data-sizes")||r.$slider.attr("data-sizes"),a=document.createElement("img");a.onload=function(){t.animate({opacity:0},100,(function(){n&&(t.attr("srcset",n),s&&t.attr("sizes",s)),t.attr("src",i).animate({opacity:1},200,(function(){t.removeAttr("data-lazy data-srcset data-sizes").removeClass("slick-loading")})),r.$slider.trigger("lazyLoaded",[r,t,i])}))},a.onerror=function(){t.removeAttr("data-lazy").removeClass("slick-loading").addClass("slick-lazyload-error"),r.$slider.trigger("lazyLoadError",[r,t,i])},a.src=i}))}if(!0===r.options.centerMode?!0===r.options.infinite?n=(i=r.currentSlide+(r.options.slidesToShow/2+1))+r.options.slidesToShow+2:(i=Math.max(0,r.currentSlide-(r.options.slidesToShow/2+1)),n=r.options.slidesToShow/2+1+2+r.currentSlide):(i=r.options.infinite?r.options.slidesToShow+r.currentSlide:r.currentSlide,n=Math.ceil(i+r.options.slidesToShow),!0===r.options.fade&&(i>0&&i--,n<=r.slideCount&&n++)),t=r.$slider.find(".slick-slide").slice(i,n),"anticipated"===r.options.lazyLoad)for(var a=i-1,o=n,l=r.$slider.find(".slick-slide"),u=0;u<r.options.slidesToScroll;u++)a<0&&(a=r.slideCount-1),t=(t=t.add(l.eq(a))).add(l.eq(o)),a--,o++;s(t),r.slideCount<=r.options.slidesToShow?s(r.$slider.find(".slick-slide")):r.currentSlide>=r.slideCount-r.options.slidesToShow?s(r.$slider.find(".slick-cloned").slice(0,r.options.slidesToShow)):0===r.currentSlide&&s(r.$slider.find(".slick-cloned").slice(-1*r.options.slidesToShow))},t.prototype.loadSlider=function(){var e=this;e.setPosition(),e.$slideTrack.css({opacity:1}),e.$slider.removeClass("slick-loading"),e.initUI(),"progressive"===e.options.lazyLoad&&e.progressiveLazyLoad()},t.prototype.next=t.prototype.slickNext=function(){this.changeSlide({data:{message:"next"}})},t.prototype.orientationChange=function(){var e=this;e.checkResponsive(),e.setPosition()},t.prototype.pause=t.prototype.slickPause=function(){var e=this;e.autoPlayClear(),e.paused=!0},t.prototype.play=t.prototype.slickPlay=function(){var e=this;e.autoPlay(),e.options.autoplay=!0,e.paused=!1,e.focussed=!1,e.interrupted=!1},t.prototype.postSlide=function(t){var i=this;i.unslicked||(i.$slider.trigger("afterChange",[i,t]),i.animating=!1,i.slideCount>i.options.slidesToShow&&i.setPosition(),i.swipeLeft=null,i.options.autoplay&&i.autoPlay(),!0===i.options.accessibility&&(i.initADA(),i.options.focusOnChange&&e(i.$slides.get(i.currentSlide)).attr("tabindex",0).focus()))},t.prototype.prev=t.prototype.slickPrev=function(){this.changeSlide({data:{message:"previous"}})},t.prototype.preventDefault=function(e){e.preventDefault()},t.prototype.progressiveLazyLoad=function(t){t=t||1;var i,n,r,s,a,o=this,l=e("img[data-lazy]",o.$slider);l.length?(i=l.first(),n=i.attr("data-lazy"),r=i.attr("data-srcset"),s=i.attr("data-sizes")||o.$slider.attr("data-sizes"),(a=document.createElement("img")).onload=function(){r&&(i.attr("srcset",r),s&&i.attr("sizes",s)),i.attr("src",n).removeAttr("data-lazy data-srcset data-sizes").removeClass("slick-loading"),!0===o.options.adaptiveHeight&&o.setPosition(),o.$slider.trigger("lazyLoaded",[o,i,n]),o.progressiveLazyLoad()},a.onerror=function(){t<3?setTimeout((function(){o.progressiveLazyLoad(t+1)}),500):(i.removeAttr("data-lazy").removeClass("slick-loading").addClass("slick-lazyload-error"),o.$slider.trigger("lazyLoadError",[o,i,n]),o.progressiveLazyLoad())},a.src=n):o.$slider.trigger("allImagesLoaded",[o])},t.prototype.refresh=function(t){var i,n,r=this;n=r.slideCount-r.options.slidesToShow,!r.options.infinite&&r.currentSlide>n&&(r.currentSlide=n),r.slideCount<=r.options.slidesToShow&&(r.currentSlide=0),i=r.currentSlide,r.destroy(!0),e.extend(r,r.initials,{currentSlide:i}),r.init(),t||r.changeSlide({data:{message:"index",index:i}},!1)},t.prototype.registerBreakpoints=function(){var t,i,n,r=this,s=r.options.responsive||null;if("array"===e.type(s)&&s.length){for(t in r.respondTo=r.options.respondTo||"window",s)if(n=r.breakpoints.length-1,s.hasOwnProperty(t)){for(i=s[t].breakpoint;n>=0;)r.breakpoints[n]&&r.breakpoints[n]===i&&r.breakpoints.splice(n,1),n--;r.breakpoints.push(i),r.breakpointSettings[i]=s[t].settings}r.breakpoints.sort((function(e,t){return r.options.mobileFirst?e-t:t-e}))}},t.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&&e(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])},t.prototype.resize=function(){var t=this;e(window).width()!==t.windowWidth&&(clearTimeout(t.windowDelay),t.windowDelay=window.setTimeout((function(){t.windowWidth=e(window).width(),t.checkResponsive(),t.unslicked||t.setPosition()}),50))},t.prototype.removeSlide=t.prototype.slickRemove=function(e,t,i){var n=this;if(e="boolean"==typeof e?!0===(t=e)?0:n.slideCount-1:!0===t?--e:e,n.slideCount<1||e<0||e>n.slideCount-1)return!1;n.unload(),!0===i?n.$slideTrack.children().remove():n.$slideTrack.children(this.options.slide).eq(e).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()},t.prototype.setCSS=function(e){var t,i,n=this,r={};!0===n.options.rtl&&(e=-e),t="left"==n.positionProp?Math.ceil(e)+"px":"0px",i="top"==n.positionProp?Math.ceil(e)+"px":"0px",r[n.positionProp]=e,!1===n.transformsEnabled?n.$slideTrack.css(r):(r={},!1===n.cssTransitions?(r[n.animType]="translate("+t+", "+i+")",n.$slideTrack.css(r)):(r[n.animType]="translate3d("+t+", "+i+", 0px)",n.$slideTrack.css(r)))},t.prototype.setDimensions=function(){var e=this;!1===e.options.vertical?!0===e.options.centerMode&&e.$list.css({padding:"0px "+e.options.centerPadding}):(e.$list.height(e.$slides.first().outerHeight(!0)*e.options.slidesToShow),!0===e.options.centerMode&&e.$list.css({padding:e.options.centerPadding+" 0px"})),e.listWidth=e.$list.width(),e.listHeight=e.$list.height(),!1===e.options.vertical&&!1===e.options.variableWidth?(e.slideWidth=Math.ceil(e.listWidth/e.options.slidesToShow),e.$slideTrack.width(Math.ceil(e.slideWidth*e.$slideTrack.children(".slick-slide").length))):!0===e.options.variableWidth?e.$slideTrack.width(5e3*e.slideCount):(e.slideWidth=Math.ceil(e.listWidth),e.$slideTrack.height(Math.ceil(e.$slides.first().outerHeight(!0)*e.$slideTrack.children(".slick-slide").length)));var t=e.$slides.first().outerWidth(!0)-e.$slides.first().width();!1===e.options.variableWidth&&e.$slideTrack.children(".slick-slide").width(e.slideWidth-t)},t.prototype.setFade=function(){var t,i=this;i.$slides.each((function(n,r){t=i.slideWidth*n*-1,!0===i.options.rtl?e(r).css({position:"relative",right:t,top:0,zIndex:i.options.zIndex-2,opacity:0}):e(r).css({position:"relative",left:t,top:0,zIndex:i.options.zIndex-2,opacity:0})})),i.$slides.eq(i.currentSlide).css({zIndex:i.options.zIndex-1,opacity:1})},t.prototype.setHeight=function(){var e=this;if(1===e.options.slidesToShow&&!0===e.options.adaptiveHeight&&!1===e.options.vertical){var t=e.$slides.eq(e.currentSlide).outerHeight(!0);e.$list.css("height",t)}},t.prototype.setOption=t.prototype.slickSetOption=function(){var t,i,n,r,s,a=this,o=!1;if("object"===e.type(arguments[0])?(n=arguments[0],o=arguments[1],s="multiple"):"string"===e.type(arguments[0])&&(n=arguments[0],r=arguments[1],o=arguments[2],"responsive"===arguments[0]&&"array"===e.type(arguments[1])?s="responsive":void 0!==arguments[1]&&(s="single")),"single"===s)a.options[n]=r;else if("multiple"===s)e.each(n,(function(e,t){a.options[e]=t}));else if("responsive"===s)for(i in r)if("array"!==e.type(a.options.responsive))a.options.responsive=[r[i]];else{for(t=a.options.responsive.length-1;t>=0;)a.options.responsive[t].breakpoint===r[i].breakpoint&&a.options.responsive.splice(t,1),t--;a.options.responsive.push(r[i])}o&&(a.unload(),a.reinit())},t.prototype.setPosition=function(){var e=this;e.setDimensions(),e.setHeight(),!1===e.options.fade?e.setCSS(e.getLeft(e.currentSlide)):e.setFade(),e.$slider.trigger("setPosition",[e])},t.prototype.setProps=function(){var e=this,t=document.body.style;e.positionProp=!0===e.options.vertical?"top":"left","top"===e.positionProp?e.$slider.addClass("slick-vertical"):e.$slider.removeClass("slick-vertical"),void 0===t.WebkitTransition&&void 0===t.MozTransition&&void 0===t.msTransition||!0===e.options.useCSS&&(e.cssTransitions=!0),e.options.fade&&("number"==typeof e.options.zIndex?e.options.zIndex<3&&(e.options.zIndex=3):e.options.zIndex=e.defaults.zIndex),void 0!==t.OTransform&&(e.animType="OTransform",e.transformType="-o-transform",e.transitionType="OTransition",void 0===t.perspectiveProperty&&void 0===t.webkitPerspective&&(e.animType=!1)),void 0!==t.MozTransform&&(e.animType="MozTransform",e.transformType="-moz-transform",e.transitionType="MozTransition",void 0===t.perspectiveProperty&&void 0===t.MozPerspective&&(e.animType=!1)),void 0!==t.webkitTransform&&(e.animType="webkitTransform",e.transformType="-webkit-transform",e.transitionType="webkitTransition",void 0===t.perspectiveProperty&&void 0===t.webkitPerspective&&(e.animType=!1)),void 0!==t.msTransform&&(e.animType="msTransform",e.transformType="-ms-transform",e.transitionType="msTransition",void 0===t.msTransform&&(e.animType=!1)),void 0!==t.transform&&!1!==e.animType&&(e.animType="transform",e.transformType="transform",e.transitionType="transition"),e.transformsEnabled=e.options.useTransform&&null!==e.animType&&!1!==e.animType},t.prototype.setSlideClasses=function(e){var t,i,n,r,s=this;if(i=s.$slider.find(".slick-slide").removeClass("slick-active slick-center slick-current").attr("aria-hidden","true"),s.$slides.eq(e).addClass("slick-current"),!0===s.options.centerMode){var a=s.options.slidesToShow%2==0?1:0;t=Math.floor(s.options.slidesToShow/2),!0===s.options.infinite&&(e>=t&&e<=s.slideCount-1-t?s.$slides.slice(e-t+a,e+t+1).addClass("slick-active").attr("aria-hidden","false"):(n=s.options.slidesToShow+e,i.slice(n-t+1+a,n+t+2).addClass("slick-active").attr("aria-hidden","false")),0===e?i.eq(i.length-1-s.options.slidesToShow).addClass("slick-center"):e===s.slideCount-1&&i.eq(s.options.slidesToShow).addClass("slick-center")),s.$slides.eq(e).addClass("slick-center")}else e>=0&&e<=s.slideCount-s.options.slidesToShow?s.$slides.slice(e,e+s.options.slidesToShow).addClass("slick-active").attr("aria-hidden","false"):i.length<=s.options.slidesToShow?i.addClass("slick-active").attr("aria-hidden","false"):(r=s.slideCount%s.options.slidesToShow,n=!0===s.options.infinite?s.options.slidesToShow+e:e,s.options.slidesToShow==s.options.slidesToScroll&&s.slideCount-e<s.options.slidesToShow?i.slice(n-(s.options.slidesToShow-r),n+r).addClass("slick-active").attr("aria-hidden","false"):i.slice(n,n+s.options.slidesToShow).addClass("slick-active").attr("aria-hidden","false"));"ondemand"!==s.options.lazyLoad&&"anticipated"!==s.options.lazyLoad||s.lazyLoad()},t.prototype.setupInfinite=function(){var t,i,n,r=this;if(!0===r.options.fade&&(r.options.centerMode=!1),!0===r.options.infinite&&!1===r.options.fade&&(i=null,r.slideCount>r.options.slidesToShow)){for(n=!0===r.options.centerMode?r.options.slidesToShow+1:r.options.slidesToShow,t=r.slideCount;t>r.slideCount-n;t-=1)i=t-1,e(r.$slides[i]).clone(!0).attr("id","").attr("data-slick-index",i-r.slideCount).prependTo(r.$slideTrack).addClass("slick-cloned");for(t=0;t<n+r.slideCount;t+=1)i=t,e(r.$slides[i]).clone(!0).attr("id","").attr("data-slick-index",i+r.slideCount).appendTo(r.$slideTrack).addClass("slick-cloned");r.$slideTrack.find(".slick-cloned").find("[id]").each((function(){e(this).attr("id","")}))}},t.prototype.interrupt=function(e){var t=this;e||t.autoPlay(),t.interrupted=e},t.prototype.selectHandler=function(t){var i=this,n=e(t.target).is(".slick-slide")?e(t.target):e(t.target).parents(".slick-slide"),r=parseInt(n.attr("data-slick-index"));r||(r=0),i.slideCount<=i.options.slidesToShow?i.slideHandler(r,!1,!0):i.slideHandler(r)},t.prototype.slideHandler=function(e,t,i){var n,r,s,a,o,l=null,u=this;if(t=t||!1,!(!0===u.animating&&!0===u.options.waitForAnimate||!0===u.options.fade&&u.currentSlide===e))if(!1===t&&u.asNavFor(e),n=e,l=u.getLeft(n),a=u.getLeft(u.currentSlide),u.currentLeft=null===u.swipeLeft?a:u.swipeLeft,!1===u.options.infinite&&!1===u.options.centerMode&&(e<0||e>u.getDotCount()*u.options.slidesToScroll))!1===u.options.fade&&(n=u.currentSlide,!0!==i&&u.slideCount>u.options.slidesToShow?u.animateSlide(a,(function(){u.postSlide(n)})):u.postSlide(n));else if(!1===u.options.infinite&&!0===u.options.centerMode&&(e<0||e>u.slideCount-u.options.slidesToScroll))!1===u.options.fade&&(n=u.currentSlide,!0!==i&&u.slideCount>u.options.slidesToShow?u.animateSlide(a,(function(){u.postSlide(n)})):u.postSlide(n));else{if(u.options.autoplay&&clearInterval(u.autoPlayTimer),r=n<0?u.slideCount%u.options.slidesToScroll!=0?u.slideCount-u.slideCount%u.options.slidesToScroll:u.slideCount+n:n>=u.slideCount?u.slideCount%u.options.slidesToScroll!=0?0:n-u.slideCount:n,u.animating=!0,u.$slider.trigger("beforeChange",[u,u.currentSlide,r]),s=u.currentSlide,u.currentSlide=r,u.setSlideClasses(u.currentSlide),u.options.asNavFor&&(o=(o=u.getNavTarget()).slick("getSlick")).slideCount<=o.options.slidesToShow&&o.setSlideClasses(u.currentSlide),u.updateDots(),u.updateArrows(),!0===u.options.fade)return!0!==i?(u.fadeSlideOut(s),u.fadeSlide(r,(function(){u.postSlide(r)}))):u.postSlide(r),void u.animateHeight();!0!==i&&u.slideCount>u.options.slidesToShow?u.animateSlide(l,(function(){u.postSlide(r)})):u.postSlide(r)}},t.prototype.startLoad=function(){var e=this;!0===e.options.arrows&&e.slideCount>e.options.slidesToShow&&(e.$prevArrow.hide(),e.$nextArrow.hide()),!0===e.options.dots&&e.slideCount>e.options.slidesToShow&&e.$dots.hide(),e.$slider.addClass("slick-loading")},t.prototype.swipeDirection=function(){var e,t,i,n,r=this;return e=r.touchObject.startX-r.touchObject.curX,t=r.touchObject.startY-r.touchObject.curY,i=Math.atan2(t,e),(n=Math.round(180*i/Math.PI))<0&&(n=360-Math.abs(n)),n<=45&&n>=0||n<=360&&n>=315?!1===r.options.rtl?"left":"right":n>=135&&n<=225?!1===r.options.rtl?"right":"left":!0===r.options.verticalSwiping?n>=35&&n<=135?"down":"up":"vertical"},t.prototype.swipeEnd=function(e){var t,i,n=this;if(n.dragging=!1,n.swiping=!1,n.scrolling)return n.scrolling=!1,!1;if(n.interrupted=!1,n.shouldClick=!(n.touchObject.swipeLength>10),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":t=n.options.swipeToSlide?n.checkNavigable(n.currentSlide+n.getSlideCount()):n.currentSlide+n.getSlideCount(),n.currentDirection=0;break;case"right":case"up":t=n.options.swipeToSlide?n.checkNavigable(n.currentSlide-n.getSlideCount()):n.currentSlide-n.getSlideCount(),n.currentDirection=1}"vertical"!=i&&(n.slideHandler(t),n.touchObject={},n.$slider.trigger("swipe",[n,i]))}else n.touchObject.startX!==n.touchObject.curX&&(n.slideHandler(n.currentSlide),n.touchObject={})},t.prototype.swipeHandler=function(e){var t=this;if(!(!1===t.options.swipe||"ontouchend" in document&&!1===t.options.swipe||!1===t.options.draggable&&-1!==e.type.indexOf("mouse")))switch(t.touchObject.fingerCount=e.originalEvent&&void 0!==e.originalEvent.touches?e.originalEvent.touches.length:1,t.touchObject.minSwipe=t.listWidth/t.options.touchThreshold,!0===t.options.verticalSwiping&&(t.touchObject.minSwipe=t.listHeight/t.options.touchThreshold),e.data.action){case"start":t.swipeStart(e);break;case"move":t.swipeMove(e);break;case"end":t.swipeEnd(e)}},t.prototype.swipeMove=function(e){var t,i,n,r,s,a,o=this;return s=void 0!==e.originalEvent?e.originalEvent.touches:null,!(!o.dragging||o.scrolling||s&&1!==s.length)&&(t=o.getLeft(o.currentSlide),o.touchObject.curX=void 0!==s?s[0].pageX:e.clientX,o.touchObject.curY=void 0!==s?s[0].pageY:e.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&&a>4?(o.scrolling=!0,!1):(!0===o.options.verticalSwiping&&(o.touchObject.swipeLength=a),i=o.swipeDirection(),void 0!==e.originalEvent&&o.touchObject.swipeLength>4&&(o.swiping=!0,e.preventDefault()),r=(!1===o.options.rtl?1:-1)*(o.touchObject.curX>o.touchObject.startX?1:-1),!0===o.options.verticalSwiping&&(r=o.touchObject.curY>o.touchObject.startY?1:-1),n=o.touchObject.swipeLength,o.touchObject.edgeHit=!1,!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=t+n*r:o.swipeLeft=t+n*(o.$list.height()/o.listWidth)*r,!0===o.options.verticalSwiping&&(o.swipeLeft=t+n*r),!0!==o.options.fade&&!1!==o.options.touchMove&&(!0===o.animating?(o.swipeLeft=null,!1):void o.setCSS(o.swipeLeft))))},t.prototype.swipeStart=function(e){var t,i=this;if(i.interrupted=!0,1!==i.touchObject.fingerCount||i.slideCount<=i.options.slidesToShow)return i.touchObject={},!1;void 0!==e.originalEvent&&void 0!==e.originalEvent.touches&&(t=e.originalEvent.touches[0]),i.touchObject.startX=i.touchObject.curX=void 0!==t?t.pageX:e.clientX,i.touchObject.startY=i.touchObject.curY=void 0!==t?t.pageY:e.clientY,i.dragging=!0},t.prototype.unfilterSlides=t.prototype.slickUnfilter=function(){var e=this;null!==e.$slidesCache&&(e.unload(),e.$slideTrack.children(this.options.slide).detach(),e.$slidesCache.appendTo(e.$slideTrack),e.reinit())},t.prototype.unload=function(){var t=this;e(".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","")},t.prototype.unslick=function(e){var t=this;t.$slider.trigger("unslick",[t,e]),t.destroy()},t.prototype.updateArrows=function(){var e=this;Math.floor(e.options.slidesToShow/2),!0===e.options.arrows&&e.slideCount>e.options.slidesToShow&&!e.options.infinite&&(e.$prevArrow.removeClass("slick-disabled").attr("aria-disabled","false"),e.$nextArrow.removeClass("slick-disabled").attr("aria-disabled","false"),0===e.currentSlide?(e.$prevArrow.addClass("slick-disabled").attr("aria-disabled","true"),e.$nextArrow.removeClass("slick-disabled").attr("aria-disabled","false")):(e.currentSlide>=e.slideCount-e.options.slidesToShow&&!1===e.options.centerMode||e.currentSlide>=e.slideCount-1&&!0===e.options.centerMode)&&(e.$nextArrow.addClass("slick-disabled").attr("aria-disabled","true"),e.$prevArrow.removeClass("slick-disabled").attr("aria-disabled","false")))},t.prototype.updateDots=function(){var e=this;null!==e.$dots&&(e.$dots.find("li").removeClass("slick-active").end(),e.$dots.find("li").eq(Math.floor(e.currentSlide/e.options.slidesToScroll)).addClass("slick-active"))},t.prototype.visibility=function(){var e=this;e.options.autoplay&&(document[e.hidden]?e.interrupted=!0:e.interrupted=!1)},e.fn.slick=function(){var e,i,n=this,r=arguments[0],s=Array.prototype.slice.call(arguments,1),a=n.length;for(e=0;e<a;e++)if("object"==typeof r||void 0===r?n[e].slick=new t(n[e],r):i=n[e].slick[r].apply(n[e].slick,s),void 0!==i)return i;return n}},void 0===(s="function"==typeof n?n.apply(t,r):n)||(e.exports=s)}()},(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>s});i(66),i(113);var n=i(61),r=i.n(n);const s={init:function(){/(android)/i.test(navigator.userAgent);setTimeout((function(){0!==r()("video").length&&document.querySelectorAll("video").forEach(((e,t)=>{e.hasAttribute("autoplay")&&e.play()}))}),2e3)}}},(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>al});for(var n,r=i(67),s=i.n(r),a=i(68),o=i.n(a),l=i(70),u=i(71),c=i.n(u),d=i(72),h=i(73),p=i(75),f=i.n(p),m=i(76),g=i.n(m),v=i(80),y=i.n(v),_=i(84),b=i(86),T=i(87),w=i(89),S=i(92),k=i(93),E=i(94),C=i(102),x=i.n(C),A=i(104),P=i(106),I=i(105),O=i(112),L="7.18.1",D={},M=function(e,t){return D[e]=D[e]||[],t&&(D[e]=D[e].concat(t)),D[e]},N=function(e,t){var i=M(e).indexOf(t);return!(i<=-1)&&(D[e]=D[e].slice(),D[e].splice(i,1),!0)},R={prefixed:!0},U=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror","fullscreen"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror","-webkit-full-screen"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror","-moz-full-screen"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError","-ms-fullscreen"]],B=U[0],j=0;j<U.length;j++)if(U[j][1]in o()){n=U[j];break}if(n){for(var F=0;F<n.length;F++)R[B[F]]=n[F];R.prefixed=n[0]!==B[0]}var H=[];var q=function e(t){var i,n="info",r=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];i("log",n,t)};return i=function(e,t){return function(i,n,r){var a=t.levels[n],o=new RegExp("^("+a+")$");if("log"!==i&&r.unshift(i.toUpperCase()+":"),r.unshift(e+":"),H){H.push([].concat(r));var l=H.length-1e3;H.splice(0,l>0?l:0)}if(s().console){var u=s().console[i];u||"debug"!==i||(u=s().console.info||s().console.log),u&&a&&o.test(i)&&u[Array.isArray(r)?"apply":"call"](s().console,r)}}}(t,r),r.createLogger=function(i){return e(t+": "+i)},r.levels={all:"debug|log|warn|error",off:"",debug:"debug|log|warn|error",info:"log|warn|error",warn:"warn|error",error:"error",DEFAULT:n},r.level=function(e){if("string"==typeof e){if(!r.levels.hasOwnProperty(e))throw new Error('"'+e+'" in not a valid log level');n=e}return n},(r.history=function(){return H?[].concat(H):[]}).filter=function(e){return(H||[]).filter((function(t){return new RegExp(".*"+e+".*").test(t[0])}))},r.history.clear=function(){H&&(H.length=0)},r.history.disable=function(){null!==H&&(H.length=0,H=null)},r.history.enable=function(){null===H&&(H=[])},r.error=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return i("error",n,t)},r.warn=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return i("warn",n,t)},r.debug=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return i("debug",n,t)},r}("VIDEOJS"),z=q.createLogger,W=Object.prototype.toString,V=function(e){return G(e)?Object.keys(e):[]};function $(e,t){V(e).forEach((function(i){return t(e[i],i)}))}function X(e){for(var t=arguments.length,i=new Array(t>1?t-1:0),n=1;n<t;n++)i[n-1]=arguments[n];return Object.assign?l.default.apply(void 0,[e].concat(i)):(i.forEach((function(t){t&&$(t,(function(t,i){e[i]=t}))})),e)}function G(e){return!!e&&"object"==typeof e}function Y(e){return G(e)&&"[object Object]"===W.call(e)&&e.constructor===Object}function K(e,t){if(!e||!t)return"";if("function"==typeof s().getComputedStyle){var i;try{i=s().getComputedStyle(e)}catch(e){return""}return i?i.getPropertyValue(t)||i[t]:""}return""}var Q,J=s().navigator&&s().navigator.userAgent||"",Z=/AppleWebKit\/([\d.]+)/i.exec(J),ee=Z?parseFloat(Z.pop()):null,te=/iPod/i.test(J),ie=(Q=J.match(/OS (\d+)_/i))&&Q[1]?Q[1]:null,ne=/Android/i.test(J),re=function(){var e=J.match(/Android (\d+)(?:\.(\d+))?(?:\.(\d+))*/i);if(!e)return null;var t=e[1]&&parseFloat(e[1]),i=e[2]&&parseFloat(e[2]);return t&&i?parseFloat(e[1]+"."+e[2]):t||null}(),se=ne&&re<5&&ee<537,ae=/Firefox/i.test(J),oe=/Edg/i.test(J),le=!oe&&(/Chrome/i.test(J)||/CriOS/i.test(J)),ue=function(){var e=J.match(/(Chrome|CriOS)\/(\d+)/);return e&&e[2]?parseFloat(e[2]):null}(),ce=function(){var e=/MSIE\s(\d+)\.\d/.exec(J),t=e&&parseFloat(e[1]);return!t&&/Trident\/7.0/i.test(J)&&/rv:11.0/.test(J)&&(t=11),t}(),de=/Safari/i.test(J)&&!le&&!ne&&!oe,he=/Windows/i.test(J),pe=Boolean(Te()&&("ontouchstart" in s()||s().navigator.maxTouchPoints||s().DocumentTouch&&s().document instanceof s().DocumentTouch)),fe=/iPad/i.test(J)||de&&pe&&!/iPhone/i.test(J),me=/iPhone/i.test(J)&&!fe,ge=me||fe||te,ve=(de||ge)&&!le,ye=Object.freeze({__proto__:null,IS_IPOD:te,IOS_VERSION:ie,IS_ANDROID:ne,ANDROID_VERSION:re,IS_NATIVE_ANDROID:se,IS_FIREFOX:ae,IS_EDGE:oe,IS_CHROME:le,CHROME_VERSION:ue,IE_VERSION:ce,IS_SAFARI:de,IS_WINDOWS:he,TOUCH_ENABLED:pe,IS_IPAD:fe,IS_IPHONE:me,IS_IOS:ge,IS_ANY_SAFARI:ve});function _e(e){return"string"==typeof e&&Boolean(e.trim())}function be(e){if(e.indexOf(" ")>=0)throw new Error("class has illegal whitespace characters")}function Te(){return o()===s().document}function we(e){return G(e)&&1===e.nodeType}function Se(){try{return s().parent!==s().self}catch(e){return!0}}function ke(e){return function(t,i){if(!_e(t))return o()[e](null);_e(i)&&(i=o().querySelector(i));var n=we(i)?i:o();return n[e]&&n[e](t)}}function Ee(e,t,i,n){void 0===e&&(e="div"),void 0===t&&(t={}),void 0===i&&(i={});var r=o().createElement(e);return Object.getOwnPropertyNames(t).forEach((function(e){var i=t[e];-1!==e.indexOf("aria-")||"role"===e||"type"===e?(q.warn("Setting attributes in the second argument of createEl()\nhas been deprecated. Use the third argument instead.\ncreateEl(type, properties, attributes). Attempting to set "+e+" to "+i+"."),r.setAttribute(e,i)):"textContent"===e?Ce(r,i):r[e]===i&&"tabIndex"!==e||(r[e]=i)})),Object.getOwnPropertyNames(i).forEach((function(e){r.setAttribute(e,i[e])})),n&&Ve(r,n),r}function Ce(e,t){return void 0===e.textContent?e.innerText=t:e.textContent=t,e}function xe(e,t){t.firstChild?t.insertBefore(e,t.firstChild):t.appendChild(e)}function Ae(e,t){return be(t),e.classList?e.classList.contains(t):(i=t,new RegExp("(^|\\s)"+i+"($|\\s)")).test(e.className);var i}function Pe(e,t){return e.classList?e.classList.add(t):Ae(e,t)||(e.className=(e.className+" "+t).trim()),e}function Ie(e,t){return e?(e.classList?e.classList.remove(t):(be(t),e.className=e.className.split(/\s+/).filter((function(e){return e!==t})).join(" ")),e):(q.warn("removeClass was called with an element that doesn't exist"),null)}function Oe(e,t,i){var n=Ae(e,t);if("function"==typeof i&&(i=i(e,t)),"boolean"!=typeof i&&(i=!n),i!==n)return i?Pe(e,t):Ie(e,t),e}function Le(e,t){Object.getOwnPropertyNames(t).forEach((function(i){var n=t[i];null==n||!1===n?e.removeAttribute(i):e.setAttribute(i,!0===n?"":n)}))}function De(e){var t={},i=",autoplay,controls,playsinline,loop,muted,default,defaultMuted,";if(e&&e.attributes&&e.attributes.length>0)for(var n=e.attributes,r=n.length-1;r>=0;r--){var s=n[r].name,a=n[r].value;"boolean"!=typeof e[s]&&-1===i.indexOf(","+s+",")||(a=null!==a),t[s]=a}return t}function Me(e,t){return e.getAttribute(t)}function Ne(e,t,i){e.setAttribute(t,i)}function Re(e,t){e.removeAttribute(t)}function Ue(){o().body.focus(),o().onselectstart=function(){return!1}}function Be(){o().onselectstart=function(){return!0}}function je(e){if(e&&e.getBoundingClientRect&&e.parentNode){var t=e.getBoundingClientRect(),i={};return["bottom","height","left","right","top","width"].forEach((function(e){void 0!==t[e]&&(i[e]=t[e])})),i.height||(i.height=parseFloat(K(e,"height"))),i.width||(i.width=parseFloat(K(e,"width"))),i}}function Fe(e){if(!e||e&&!e.offsetParent)return{left:0,top:0,width:0,height:0};for(var t=e.offsetWidth,i=e.offsetHeight,n=0,r=0;e.offsetParent&&e!==o()[R.fullscreenElement];)n+=e.offsetLeft,r+=e.offsetTop,e=e.offsetParent;return{left:n,top:r,width:t,height:i}}function He(e,t){var i={x:0,y:0};if(ge)for(var n=e;n&&"html"!==n.nodeName.toLowerCase();){var r=K(n,"transform");if(/^matrix/.test(r)){var s=r.slice(7,-1).split(/,\s/).map(Number);i.x+=s[4],i.y+=s[5]}else if(/^matrix3d/.test(r)){var a=r.slice(9,-1).split(/,\s/).map(Number);i.x+=a[12],i.y+=a[13]}n=n.parentNode}var o={},l=Fe(t.target),u=Fe(e),c=u.width,d=u.height,h=t.offsetY-(u.top-l.top),p=t.offsetX-(u.left-l.left);return t.changedTouches&&(p=t.changedTouches[0].pageX-u.left,h=t.changedTouches[0].pageY+u.top,ge&&(p-=i.x,h-=i.y)),o.y=1-Math.max(0,Math.min(1,h/d)),o.x=Math.max(0,Math.min(1,p/c)),o}function qe(e){return G(e)&&3===e.nodeType}function ze(e){for(;e.firstChild;)e.removeChild(e.firstChild);return e}function We(e){return"function"==typeof e&&(e=e()),(Array.isArray(e)?e:[e]).map((function(e){return"function"==typeof e&&(e=e()),we(e)||qe(e)?e:"string"==typeof e&&/\S/.test(e)?o().createTextNode(e):void 0})).filter((function(e){return e}))}function Ve(e,t){return We(t).forEach((function(t){return e.appendChild(t)})),e}function $e(e,t){return Ve(ze(e),t)}function Xe(e){return void 0===e.button&&void 0===e.buttons||(0===e.button&&void 0===e.buttons||("mouseup"===e.type&&0===e.button&&0===e.buttons||0===e.button&&1===e.buttons))}var Ge,Ye=ke("querySelector"),Ke=ke("querySelectorAll"),Qe=Object.freeze({__proto__:null,isReal:Te,isEl:we,isInFrame:Se,createEl:Ee,textContent:Ce,prependTo:xe,hasClass:Ae,addClass:Pe,removeClass:Ie,toggleClass:Oe,setAttributes:Le,getAttributes:De,getAttribute:Me,setAttribute:Ne,removeAttribute:Re,blockTextSelection:Ue,unblockTextSelection:Be,getBoundingClientRect:je,findPosition:Fe,getPointerPosition:He,isTextNode:qe,emptyEl:ze,normalizeContent:We,appendContent:Ve,insertContent:$e,isSingleLeftClick:Xe,$:Ye,$$:Ke}),Je=!1,Ze=function(){if(!1!==Ge.options.autoSetup){var e=Array.prototype.slice.call(o().getElementsByTagName("video")),t=Array.prototype.slice.call(o().getElementsByTagName("audio")),i=Array.prototype.slice.call(o().getElementsByTagName("video-js")),n=e.concat(t,i);if(n&&n.length>0)for(var r=0,s=n.length;r<s;r++){var a=n[r];if(!a||!a.getAttribute){et(1);break}void 0===a.player&&null!==a.getAttribute("data-setup")&&Ge(a)}else Je||et(1)}};function et(e,t){Te()&&(t&&(Ge=t),s().setTimeout(Ze,e))}function tt(){Je=!0,s().removeEventListener("load",tt)}Te()&&("complete"===o().readyState?tt():s().addEventListener("load",tt));var it,nt=function(e){var t=o().createElement("style");return t.className=e,t},rt=function(e,t){e.styleSheet?e.styleSheet.cssText=t:e.textContent=t},st=3;function at(){return st++}s().WeakMap||(it=function(){function e(){this.vdata="vdata"+Math.floor(s().performance&&s().performance.now()||Date.now()),this.data={}}var t=e.prototype;return t.set=function(e,t){var i=e[this.vdata]||at();return e[this.vdata]||(e[this.vdata]=i),this.data[i]=t,this},t.get=function(e){var t=e[this.vdata];if(t)return this.data[t];q("We have no data for this element",e)},t.has=function(e){return e[this.vdata]in this.data},t.delete=function(e){var t=e[this.vdata];t&&(delete this.data[t],delete e[this.vdata])},e}());var ot,lt=s().WeakMap?new WeakMap:new it;function ut(e,t){if(lt.has(e)){var i=lt.get(e);0===i.handlers[t].length&&(delete i.handlers[t],e.removeEventListener?e.removeEventListener(t,i.dispatcher,!1):e.detachEvent&&e.detachEvent("on"+t,i.dispatcher)),Object.getOwnPropertyNames(i.handlers).length<=0&&(delete i.handlers,delete i.dispatcher,delete i.disabled),0===Object.getOwnPropertyNames(i).length&&lt.delete(e)}}function ct(e,t,i,n){i.forEach((function(i){e(t,i,n)}))}function dt(e){if(e.fixed_)return e;function t(){return!0}function i(){return!1}if(!e||!e.isPropagationStopped||!e.isImmediatePropagationStopped){var n=e||s().event;for(var r in e={},n)"layerX"!==r&&"layerY"!==r&&"keyLocation"!==r&&"webkitMovementX"!==r&&"webkitMovementY"!==r&&("returnValue"===r&&n.preventDefault||(e[r]=n[r]));if(e.target||(e.target=e.srcElement||o()),e.relatedTarget||(e.relatedTarget=e.fromElement===e.target?e.toElement:e.fromElement),e.preventDefault=function(){n.preventDefault&&n.preventDefault(),e.returnValue=!1,n.returnValue=!1,e.defaultPrevented=!0},e.defaultPrevented=!1,e.stopPropagation=function(){n.stopPropagation&&n.stopPropagation(),e.cancelBubble=!0,n.cancelBubble=!0,e.isPropagationStopped=t},e.isPropagationStopped=i,e.stopImmediatePropagation=function(){n.stopImmediatePropagation&&n.stopImmediatePropagation(),e.isImmediatePropagationStopped=t,e.stopPropagation()},e.isImmediatePropagationStopped=i,null!==e.clientX&&void 0!==e.clientX){var a=o().documentElement,l=o().body;e.pageX=e.clientX+(a&&a.scrollLeft||l&&l.scrollLeft||0)-(a&&a.clientLeft||l&&l.clientLeft||0),e.pageY=e.clientY+(a&&a.scrollTop||l&&l.scrollTop||0)-(a&&a.clientTop||l&&l.clientTop||0)}e.which=e.charCode||e.keyCode,null!==e.button&&void 0!==e.button&&(e.button=1&e.button?0:4&e.button?1:2&e.button?2:0)}return e.fixed_=!0,e}var ht=["touchstart","touchmove"];function pt(e,t,i){if(Array.isArray(t))return ct(pt,e,t,i);lt.has(e)||lt.set(e,{});var n=lt.get(e);if(n.handlers||(n.handlers={}),n.handlers[t]||(n.handlers[t]=[]),i.guid||(i.guid=at()),n.handlers[t].push(i),n.dispatcher||(n.disabled=!1,n.dispatcher=function(t,i){if(!n.disabled){t=dt(t);var r=n.handlers[t.type];if(r)for(var s=r.slice(0),a=0,o=s.length;a<o&&!t.isImmediatePropagationStopped();a++)try{s[a].call(e,t,i)}catch(e){q.error(e)}}}),1===n.handlers[t].length)if(e.addEventListener){var r=!1;(function(){if("boolean"!=typeof ot){ot=!1;try{var e=Object.defineProperty({},"passive",{get:function(){ot=!0}});s().addEventListener("test",null,e),s().removeEventListener("test",null,e)}catch(e){}}return ot})()&&ht.indexOf(t)>-1&&(r={passive:!0}),e.addEventListener(t,n.dispatcher,r)}else e.attachEvent&&e.attachEvent("on"+t,n.dispatcher)}function ft(e,t,i){if(lt.has(e)){var n=lt.get(e);if(n.handlers){if(Array.isArray(t))return ct(ft,e,t,i);var r=function(e,t){n.handlers[t]=[],ut(e,t)};if(void 0!==t){var s=n.handlers[t];if(s)if(i){if(i.guid)for(var a=0;a<s.length;a++)s[a].guid===i.guid&&s.splice(a--,1);ut(e,t)}else r(e,t)}else for(var o in n.handlers)Object.prototype.hasOwnProperty.call(n.handlers||{},o)&&r(e,o)}}}function mt(e,t,i){var n=lt.has(e)?lt.get(e):{},r=e.parentNode||e.ownerDocument;if("string"==typeof t?t={type:t,target:e}:t.target||(t.target=e),t=dt(t),n.dispatcher&&n.dispatcher.call(e,t,i),r&&!t.isPropagationStopped()&&!0===t.bubbles)mt.call(null,r,t,i);else if(!r&&!t.defaultPrevented&&t.target&&t.target[t.type]){lt.has(t.target)||lt.set(t.target,{});var s=lt.get(t.target);t.target[t.type]&&(s.disabled=!0,"function"==typeof t.target[t.type]&&t.target[t.type](),s.disabled=!1)}return!t.defaultPrevented}function gt(e,t,i){if(Array.isArray(t))return ct(gt,e,t,i);var n=function n(){ft(e,t,n),i.apply(this,arguments)};n.guid=i.guid=i.guid||at(),pt(e,t,n)}function vt(e,t,i){var n=function n(){ft(e,t,n),i.apply(this,arguments)};n.guid=i.guid=i.guid||at(),pt(e,t,n)}var yt,_t=Object.freeze({__proto__:null,fixEvent:dt,on:pt,off:ft,trigger:mt,one:gt,any:vt}),bt=30,Tt=function(e,t,i){t.guid||(t.guid=at());var n=t.bind(e);return n.guid=i?i+"_"+t.guid:t.guid,n},wt=function(e,t){var i=s().performance.now();return function(){var n=s().performance.now();n-i>=t&&(e.apply(void 0,arguments),i=n)}},St=function(){};St.prototype.allowedEvents_={},St.prototype.on=function(e,t){var i=this.addEventListener;this.addEventListener=function(){},pt(this,e,t),this.addEventListener=i},St.prototype.addEventListener=St.prototype.on,St.prototype.off=function(e,t){ft(this,e,t)},St.prototype.removeEventListener=St.prototype.off,St.prototype.one=function(e,t){var i=this.addEventListener;this.addEventListener=function(){},gt(this,e,t),this.addEventListener=i},St.prototype.any=function(e,t){var i=this.addEventListener;this.addEventListener=function(){},vt(this,e,t),this.addEventListener=i},St.prototype.trigger=function(e){var t=e.type||e;"string"==typeof e&&(e={type:t}),e=dt(e),this.allowedEvents_[t]&&this["on"+t]&&this["on"+t](e),mt(this,e)},St.prototype.dispatchEvent=St.prototype.trigger,St.prototype.queueTrigger=function(e){var t=this;yt||(yt=new Map);var i=e.type||e,n=yt.get(this);n||(n=new Map,yt.set(this,n));var r=n.get(i);n.delete(i),s().clearTimeout(r);var a=s().setTimeout((function(){0===n.size&&(n=null,yt.delete(t)),t.trigger(e)}),0);n.set(i,a)};var kt=function(e){return"function"==typeof e.name?e.name():"string"==typeof e.name?e.name:e.name_?e.name_:e.constructor&&e.constructor.name?e.constructor.name:typeof e},Et=function(e){return e instanceof St||!!e.eventBusEl_&&["on","one","off","trigger"].every((function(t){return"function"==typeof e[t]}))},Ct=function(e){return"string"==typeof e&&/\S/.test(e)||Array.isArray(e)&&!!e.length},xt=function(e,t,i){if(!e||!e.nodeName&&!Et(e))throw new Error("Invalid target for "+kt(t)+"#"+i+"; must be a DOM node or evented object.")},At=function(e,t,i){if(!Ct(e))throw new Error("Invalid event type for "+kt(t)+"#"+i+"; must be a non-empty string or array.")},Pt=function(e,t,i){if("function"!=typeof e)throw new Error("Invalid listener for "+kt(t)+"#"+i+"; must be a function.")},It=function(e,t,i){var n,r,s,a=t.length<3||t[0]===e||t[0]===e.eventBusEl_;return a?(n=e.eventBusEl_,t.length>=3&&t.shift(),r=t[0],s=t[1]):(n=t[0],r=t[1],s=t[2]),xt(n,e,i),At(r,e,i),Pt(s,e,i),{isTargetingSelf:a,target:n,type:r,listener:s=Tt(e,s)}},Ot=function(e,t,i,n){xt(e,e,t),e.nodeName?_t[t](e,i,n):e[t](i,n)},Lt={on:function(){for(var e=this,t=arguments.length,i=new Array(t),n=0;n<t;n++)i[n]=arguments[n];var r=It(this,i,"on"),s=r.isTargetingSelf,a=r.target,o=r.type,l=r.listener;if(Ot(a,"on",o,l),!s){var u=function(){return e.off(a,o,l)};u.guid=l.guid;var c=function(){return e.off("dispose",u)};c.guid=l.guid,Ot(this,"on","dispose",u),Ot(a,"on","dispose",c)}},one:function(){for(var e=this,t=arguments.length,i=new Array(t),n=0;n<t;n++)i[n]=arguments[n];var r=It(this,i,"one"),s=r.isTargetingSelf,a=r.target,o=r.type,l=r.listener;if(s)Ot(a,"one",o,l);else{var u=function t(){e.off(a,o,t);for(var i=arguments.length,n=new Array(i),r=0;r<i;r++)n[r]=arguments[r];l.apply(null,n)};u.guid=l.guid,Ot(a,"one",o,u)}},any:function(){for(var e=this,t=arguments.length,i=new Array(t),n=0;n<t;n++)i[n]=arguments[n];var r=It(this,i,"any"),s=r.isTargetingSelf,a=r.target,o=r.type,l=r.listener;if(s)Ot(a,"any",o,l);else{var u=function t(){e.off(a,o,t);for(var i=arguments.length,n=new Array(i),r=0;r<i;r++)n[r]=arguments[r];l.apply(null,n)};u.guid=l.guid,Ot(a,"any",o,u)}},off:function(e,t,i){if(!e||Ct(e))ft(this.eventBusEl_,e,t);else{var n=e,r=t;xt(n,this,"off"),At(r,this,"off"),Pt(i,this,"off"),i=Tt(this,i),this.off("dispose",i),n.nodeName?(ft(n,r,i),ft(n,"dispose",i)):Et(n)&&(n.off(r,i),n.off("dispose",i))}},trigger:function(e,t){xt(this.eventBusEl_,this,"trigger");var i=e&&"string"!=typeof e?e.type:e;if(!Ct(i)){var n="Invalid event type for "+kt(this)+"#trigger; must be a non-empty string or object with a type key that has a non-empty value.";if(!e)throw new Error(n);(this.log||q).error(n)}return mt(this.eventBusEl_,e,t)}};function Dt(e,t){void 0===t&&(t={});var i=t.eventBusKey;if(i){if(!e[i].nodeName)throw new Error('The eventBusKey "'+i+'" does not refer to an element.');e.eventBusEl_=e[i]}else e.eventBusEl_=Ee("span",{className:"vjs-event-bus"});return X(e,Lt),e.eventedCallbacks&&e.eventedCallbacks.forEach((function(e){e()})),e.on("dispose",(function(){e.off(),[e,e.el_,e.eventBusEl_].forEach((function(e){e&&lt.has(e)&&lt.delete(e)})),s().setTimeout((function(){e.eventBusEl_=null}),0)})),e}var Mt={state:{},setState:function(e){var t,i=this;return"function"==typeof e&&(e=e()),$(e,(function(e,n){i.state[n]!==e&&((t=t||{})[n]={from:i.state[n],to:e}),i.state[n]=e})),t&&Et(this)&&this.trigger({changes:t,type:"statechanged"}),t}};function Nt(e,t){return X(e,Mt),e.state=X({},e.state,t),"function"==typeof e.handleStateChanged&&Et(e)&&e.on("statechanged",e.handleStateChanged),e}var Rt=function(e){return"string"!=typeof e?e:e.replace(/./,(function(e){return e.toLowerCase()}))},Ut=function(e){return"string"!=typeof e?e:e.replace(/./,(function(e){return e.toUpperCase()}))};function Bt(){for(var e={},t=arguments.length,i=new Array(t),n=0;n<t;n++)i[n]=arguments[n];return i.forEach((function(t){t&&$(t,(function(t,i){Y(t)?(Y(e[i])||(e[i]={}),e[i]=Bt(e[i],t)):e[i]=t}))})),e}var jt=function(){function e(){this.map_={}}var t=e.prototype;return t.has=function(e){return e in this.map_},t.delete=function(e){var t=this.has(e);return delete this.map_[e],t},t.set=function(e,t){return this.map_[e]=t,this},t.forEach=function(e,t){for(var i in this.map_)e.call(t,this.map_[i],i,this)},e}(),Ft=s().Map?s().Map:jt,Ht=function(){function e(){this.set_={}}var t=e.prototype;return t.has=function(e){return e in this.set_},t.delete=function(e){var t=this.has(e);return delete this.set_[e],t},t.add=function(e){return this.set_[e]=1,this},t.forEach=function(e,t){for(var i in this.set_)e.call(t,i,i,this)},e}(),qt=s().Set?s().Set:Ht,zt=function(){function e(e,t,i){if(!e&&this.play?this.player_=e=this:this.player_=e,this.isDisposed_=!1,this.parentComponent_=null,this.options_=Bt({},this.options_),t=this.options_=Bt(this.options_,t),this.id_=t.id||t.el&&t.el.id,!this.id_){var n=e&&e.id&&e.id()||"no_player";this.id_=n+"_component_"+at()}this.name_=t.name||null,t.el?this.el_=t.el:!1!==t.createEl&&(this.el_=this.createEl()),!1!==t.evented&&(Dt(this,{eventBusKey:this.el_?"el_":null}),this.handleLanguagechange=this.handleLanguagechange.bind(this),this.on(this.player_,"languagechange",this.handleLanguagechange)),Nt(this,this.constructor.defaultState),this.children_=[],this.childIndex_={},this.childNameIndex_={},this.setTimeoutIds_=new qt,this.setIntervalIds_=new qt,this.rafIds_=new qt,this.namedRafs_=new Ft,this.clearingTimersOnDispose_=!1,!1!==t.initChildren&&this.initChildren(),this.ready(i),!1!==t.reportTouchActivity&&this.enableTouchActivity()}var t=e.prototype;return t.dispose=function(){if(!this.isDisposed_){if(this.readyQueue_&&(this.readyQueue_.length=0),this.trigger({type:"dispose",bubbles:!1}),this.isDisposed_=!0,this.children_)for(var e=this.children_.length-1;e>=0;e--)this.children_[e].dispose&&this.children_[e].dispose();this.children_=null,this.childIndex_=null,this.childNameIndex_=null,this.parentComponent_=null,this.el_&&(this.el_.parentNode&&this.el_.parentNode.removeChild(this.el_),this.el_=null),this.player_=null}},t.isDisposed=function(){return Boolean(this.isDisposed_)},t.player=function(){return this.player_},t.options=function(e){return e?(this.options_=Bt(this.options_,e),this.options_):this.options_},t.el=function(){return this.el_},t.createEl=function(e,t,i){return Ee(e,t,i)},t.localize=function(e,t,i){void 0===i&&(i=e);var n=this.player_.language&&this.player_.language(),r=this.player_.languages&&this.player_.languages(),s=r&&r[n],a=n&&n.split("-")[0],o=r&&r[a],l=i;return s&&s[e]?l=s[e]:o&&o[e]&&(l=o[e]),t&&(l=l.replace(/\{(\d+)\}/g,(function(e,i){var n=t[i-1],r=n;return void 0===n&&(r=e),r}))),l},t.handleLanguagechange=function(){},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(e){return this.childIndex_[e]},t.getChild=function(e){if(e)return this.childNameIndex_[e]},t.getDescendant=function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];t=t.reduce((function(e,t){return e.concat(t)}),[]);for(var n=this,r=0;r<t.length;r++)if(!(n=n.getChild(t[r]))||!n.getChild)return;return n},t.addChild=function(t,i,n){var r,s;if(void 0===i&&(i={}),void 0===n&&(n=this.children_.length),"string"==typeof t){s=Ut(t);var a=i.componentClass||s;i.name=s;var o=e.getComponent(a);if(!o)throw new Error("Component "+a+" does not exist");if("function"!=typeof o)return null;r=new o(this.player_||this,i)}else r=t;if(r.parentComponent_&&r.parentComponent_.removeChild(r),this.children_.splice(n,0,r),r.parentComponent_=this,"function"==typeof r.id&&(this.childIndex_[r.id()]=r),(s=s||r.name&&Ut(r.name()))&&(this.childNameIndex_[s]=r,this.childNameIndex_[Rt(s)]=r),"function"==typeof r.el&&r.el()){var l=null;this.children_[n+1]&&(this.children_[n+1].el_?l=this.children_[n+1].el_:we(this.children_[n+1])&&(l=this.children_[n+1])),this.contentEl().insertBefore(r.el(),l)}return r},t.removeChild=function(e){if("string"==typeof e&&(e=this.getChild(e)),e&&this.children_){for(var t=!1,i=this.children_.length-1;i>=0;i--)if(this.children_[i]===e){t=!0,this.children_.splice(i,1);break}if(t){e.parentComponent_=null,this.childIndex_[e.id()]=null,this.childNameIndex_[Ut(e.name())]=null,this.childNameIndex_[Rt(e.name())]=null;var n=e.el();n&&n.parentNode===this.contentEl()&&this.contentEl().removeChild(e.el())}}},t.initChildren=function(){var t=this,i=this.options_.children;if(i){var n,r=this.options_,s=e.getComponent("Tech");(n=Array.isArray(i)?i:Object.keys(i)).concat(Object.keys(this.options_).filter((function(e){return!n.some((function(t){return"string"==typeof t?e===t:e===t.name}))}))).map((function(e){var n,r;return"string"==typeof e?r=i[n=e]||t.options_[n]||{}:(n=e.name,r=e),{name:n,opts:r}})).filter((function(t){var i=e.getComponent(t.opts.componentClass||Ut(t.name));return i&&!s.isTech(i)})).forEach((function(e){var i=e.name,n=e.opts;if(void 0!==r[i]&&(n=r[i]),!1!==n){!0===n&&(n={}),n.playerOptions=t.options_.playerOptions;var s=t.addChild(i,n);s&&(t[i]=s)}}))}},t.buildCSSClass=function(){return""},t.ready=function(e,t){if(void 0===t&&(t=!1),e)return this.isReady_?void(t?e.call(this):this.setTimeout(e,1)):(this.readyQueue_=this.readyQueue_||[],void this.readyQueue_.push(e))},t.triggerReady=function(){this.isReady_=!0,this.setTimeout((function(){var e=this.readyQueue_;this.readyQueue_=[],e&&e.length>0&&e.forEach((function(e){e.call(this)}),this),this.trigger("ready")}),1)},t.$=function(e,t){return Ye(e,t||this.contentEl())},t.$$=function(e,t){return Ke(e,t||this.contentEl())},t.hasClass=function(e){return Ae(this.el_,e)},t.addClass=function(e){Pe(this.el_,e)},t.removeClass=function(e){Ie(this.el_,e)},t.toggleClass=function(e,t){Oe(this.el_,e,t)},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(e){return Me(this.el_,e)},t.setAttribute=function(e,t){Ne(this.el_,e,t)},t.removeAttribute=function(e){Re(this.el_,e)},t.width=function(e,t){return this.dimension("width",e,t)},t.height=function(e,t){return this.dimension("height",e,t)},t.dimensions=function(e,t){this.width(e,!0),this.height(t)},t.dimension=function(e,t,i){if(void 0!==t)return null!==t&&t==t||(t=0),-1!==(""+t).indexOf("%")||-1!==(""+t).indexOf("px")?this.el_.style[e]=t:this.el_.style[e]="auto"===t?"":t+"px",void(i||this.trigger("componentresize"));if(!this.el_)return 0;var n=this.el_.style[e],r=n.indexOf("px");return-1!==r?parseInt(n.slice(0,r),10):parseInt(this.el_["offset"+Ut(e)],10)},t.currentDimension=function(e){var t=0;if("width"!==e&&"height"!==e)throw new Error("currentDimension only accepts width or height value");if(t=K(this.el_,e),0===(t=parseFloat(t))||isNaN(t)){var i="offset"+Ut(e);t=this.el_[i]}return t},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.handleKeyDown=function(e){this.player_&&(c().isEventKey(e,"Tab")||e.stopPropagation(),this.player_.handleKeyDown(e))},t.handleKeyPress=function(e){this.handleKeyDown(e)},t.emitTapEvents=function(){var e,t=0,i=null;this.on("touchstart",(function(n){1===n.touches.length&&(i={pageX:n.touches[0].pageX,pageY:n.touches[0].pageY},t=s().performance.now(),e=!0)})),this.on("touchmove",(function(t){if(t.touches.length>1)e=!1;else if(i){var n=t.touches[0].pageX-i.pageX,r=t.touches[0].pageY-i.pageY;Math.sqrt(n*n+r*r)>10&&(e=!1)}}));var n=function(){e=!1};this.on("touchleave",n),this.on("touchcancel",n),this.on("touchend",(function(n){(i=null,!0===e)&&(s().performance.now()-t<200&&(n.preventDefault(),this.trigger("tap")))}))},t.enableTouchActivity=function(){if(this.player()&&this.player().reportUserActivity){var e,t=Tt(this.player(),this.player().reportUserActivity);this.on("touchstart",(function(){t(),this.clearInterval(e),e=this.setInterval(t,250)}));var i=function(i){t(),this.clearInterval(e)};this.on("touchmove",t),this.on("touchend",i),this.on("touchcancel",i)}},t.setTimeout=function(e,t){var i,n=this;return e=Tt(this,e),this.clearTimersOnDispose_(),i=s().setTimeout((function(){n.setTimeoutIds_.has(i)&&n.setTimeoutIds_.delete(i),e()}),t),this.setTimeoutIds_.add(i),i},t.clearTimeout=function(e){return this.setTimeoutIds_.has(e)&&(this.setTimeoutIds_.delete(e),s().clearTimeout(e)),e},t.setInterval=function(e,t){e=Tt(this,e),this.clearTimersOnDispose_();var i=s().setInterval(e,t);return this.setIntervalIds_.add(i),i},t.clearInterval=function(e){return this.setIntervalIds_.has(e)&&(this.setIntervalIds_.delete(e),s().clearInterval(e)),e},t.requestAnimationFrame=function(e){var t,i=this;return this.supportsRaf_?(this.clearTimersOnDispose_(),e=Tt(this,e),t=s().requestAnimationFrame((function(){i.rafIds_.has(t)&&i.rafIds_.delete(t),e()})),this.rafIds_.add(t),t):this.setTimeout(e,1e3/60)},t.requestNamedAnimationFrame=function(e,t){var i=this;if(!this.namedRafs_.has(e)){this.clearTimersOnDispose_(),t=Tt(this,t);var n=this.requestAnimationFrame((function(){t(),i.namedRafs_.has(e)&&i.namedRafs_.delete(e)}));return this.namedRafs_.set(e,n),e}},t.cancelNamedAnimationFrame=function(e){this.namedRafs_.has(e)&&(this.cancelAnimationFrame(this.namedRafs_.get(e)),this.namedRafs_.delete(e))},t.cancelAnimationFrame=function(e){return this.supportsRaf_?(this.rafIds_.has(e)&&(this.rafIds_.delete(e),s().cancelAnimationFrame(e)),e):this.clearTimeout(e)},t.clearTimersOnDispose_=function(){var e=this;this.clearingTimersOnDispose_||(this.clearingTimersOnDispose_=!0,this.one("dispose",(function(){[["namedRafs_","cancelNamedAnimationFrame"],["rafIds_","cancelAnimationFrame"],["setTimeoutIds_","clearTimeout"],["setIntervalIds_","clearInterval"]].forEach((function(t){var i=t[0],n=t[1];e[i].forEach((function(t,i){return e[n](i)}))})),e.clearingTimersOnDispose_=!1})))},e.registerComponent=function(t,i){if("string"!=typeof t||!t)throw new Error('Illegal component name, "'+t+'"; must be a non-empty string.');var n,r=e.getComponent("Tech"),s=r&&r.isTech(i),a=e===i||e.prototype.isPrototypeOf(i.prototype);if(s||!a)throw n=s?"techs must be registered using Tech.registerTech()":"must be a Component subclass",new Error('Illegal component, "'+t+'"; '+n+".");t=Ut(t),e.components_||(e.components_={});var o=e.getComponent("Player");if("Player"===t&&o&&o.players){var l=o.players,u=Object.keys(l);if(l&&u.length>0&&u.map((function(e){return l[e]})).every(Boolean))throw new Error("Can not register Player component after player has been created.")}return e.components_[t]=i,e.components_[Rt(t)]=i,i},e.getComponent=function(t){if(t&&e.components_)return e.components_[t]},e}();function Wt(e,t,i,n){return function(e,t,i){if("number"!=typeof t||t<0||t>i)throw new Error("Failed to execute '"+e+"' on 'TimeRanges': The index provided ("+t+") is non-numeric or out of bounds (0-"+i+").")}(e,n,i.length-1),i[n][t]}function Vt(e){var t;return t=void 0===e||0===e.length?{length:0,start:function(){throw new Error("This TimeRanges object is empty")},end:function(){throw new Error("This TimeRanges object is empty")}}:{length:e.length,start:Wt.bind(null,"start",0,e),end:Wt.bind(null,"end",1,e)},s().Symbol&&s().Symbol.iterator&&(t[s().Symbol.iterator]=function(){return(e||[]).values()}),t}function $t(e,t){return Array.isArray(e)?Vt(e):void 0===e||void 0===t?Vt():Vt([[e,t]])}function Xt(e,t){var i,n,r=0;if(!t)return 0;e&&e.length||(e=$t(0,0));for(var s=0;s<e.length;s++)i=e.start(s),(n=e.end(s))>t&&(n=t),r+=n-i;return r/t}function Gt(e){if(e instanceof Gt)return e;"number"==typeof e?this.code=e:"string"==typeof e?this.message=e:G(e)&&("number"==typeof e.code&&(this.code=e.code),X(this,e)),this.message||(this.message=Gt.defaultMessages[this.code]||"")}zt.prototype.supportsRaf_="function"==typeof s().requestAnimationFrame&&"function"==typeof s().cancelAnimationFrame,zt.registerComponent("Component",zt),Gt.prototype.code=0,Gt.prototype.message="",Gt.prototype.status=null,Gt.errorTypes=["MEDIA_ERR_CUSTOM","MEDIA_ERR_ABORTED","MEDIA_ERR_NETWORK","MEDIA_ERR_DECODE","MEDIA_ERR_SRC_NOT_SUPPORTED","MEDIA_ERR_ENCRYPTED"],Gt.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 Yt=0;Yt<Gt.errorTypes.length;Yt++)Gt[Gt.errorTypes[Yt]]=Yt,Gt.prototype[Gt.errorTypes[Yt]]=Yt;function Kt(e){return null!=e&&"function"==typeof e.then}function Qt(e){Kt(e)&&e.then(null,(function(e){}))}var Jt=function(e){return["kind","label","language","id","inBandMetadataTrackDispatchType","mode","src"].reduce((function(t,i,n){return e[i]&&(t[i]=e[i]),t}),{cues:e.cues&&Array.prototype.map.call(e.cues,(function(e){return{startTime:e.startTime,endTime:e.endTime,text:e.text,id:e.id}}))})},Zt=function(e){var t=e.$$("track"),i=Array.prototype.map.call(t,(function(e){return e.track}));return Array.prototype.map.call(t,(function(e){var t=Jt(e.track);return e.src&&(t.src=e.src),t})).concat(Array.prototype.filter.call(e.textTracks(),(function(e){return-1===i.indexOf(e)})).map(Jt))},ei=function(e,t){return e.forEach((function(e){var i=t.addRemoteTextTrack(e).track;!e.src&&e.cues&&e.cues.forEach((function(e){return i.addCue(e)}))})),t.textTracks()},ti=function(e){function t(t,i){var n;return(n=e.call(this,t,i)||this).handleKeyDown_=function(e){return n.handleKeyDown(e)},n.close_=function(e){return n.close(e)},n.opened_=n.hasBeenOpened_=n.hasBeenFilled_=!1,n.closeable(!n.options_.uncloseable),n.content(n.options_.content),n.contentEl_=Ee("div",{className:"vjs-modal-dialog-content"},{role:"document"}),n.descEl_=Ee("p",{className:"vjs-modal-dialog-description vjs-control-text",id:n.el().getAttribute("aria-describedby")}),Ce(n.descEl_,n.description()),n.el_.appendChild(n.descEl_),n.el_.appendChild(n.contentEl_),n}(0,h.default)(t,e);var i=t.prototype;return i.createEl=function(){return e.prototype.createEl.call(this,"div",{className:this.buildCSSClass(),tabIndex:-1},{"aria-describedby":this.id()+"_description","aria-hidden":"true","aria-label":this.label(),role:"dialog"})},i.dispose=function(){this.contentEl_=null,this.descEl_=null,this.previouslyActiveEl_=null,e.prototype.dispose.call(this)},i.buildCSSClass=function(){return"vjs-modal-dialog vjs-hidden "+e.prototype.buildCSSClass.call(this)},i.label=function(){return this.localize(this.options_.label||"Modal Window")},i.description=function(){var e=this.options_.description||this.localize("This is a modal window.");return this.closeable()&&(e+=" "+this.localize("This modal can be closed by pressing the Escape key or activating the close button.")),e},i.open=function(){if(!this.opened_){var e=this.player();this.trigger("beforemodalopen"),this.opened_=!0,(this.options_.fillAlways||!this.hasBeenOpened_&&!this.hasBeenFilled_)&&this.fill(),this.wasPlaying_=!e.paused(),this.options_.pauseOnOpen&&this.wasPlaying_&&e.pause(),this.on("keydown",this.handleKeyDown_),this.hadControls_=e.controls(),e.controls(!1),this.show(),this.conditionalFocus_(),this.el().setAttribute("aria-hidden","false"),this.trigger("modalopen"),this.hasBeenOpened_=!0}},i.opened=function(e){return"boolean"==typeof e&&this[e?"open":"close"](),this.opened_},i.close=function(){if(this.opened_){var e=this.player();this.trigger("beforemodalclose"),this.opened_=!1,this.wasPlaying_&&this.options_.pauseOnOpen&&e.play(),this.off("keydown",this.handleKeyDown_),this.hadControls_&&e.controls(!0),this.hide(),this.el().setAttribute("aria-hidden","true"),this.trigger("modalclose"),this.conditionalBlur_(),this.options_.temporary&&this.dispose()}},i.closeable=function(e){if("boolean"==typeof e){var t=this.closeable_=!!e,i=this.getChild("closeButton");if(t&&!i){var n=this.contentEl_;this.contentEl_=this.el_,i=this.addChild("closeButton",{controlText:"Close Modal Dialog"}),this.contentEl_=n,this.on(i,"close",this.close_)}!t&&i&&(this.off(i,"close",this.close_),this.removeChild(i),i.dispose())}return this.closeable_},i.fill=function(){this.fillWith(this.content())},i.fillWith=function(e){var t=this.contentEl(),i=t.parentNode,n=t.nextSibling;this.trigger("beforemodalfill"),this.hasBeenFilled_=!0,i.removeChild(t),this.empty(),$e(t,e),this.trigger("modalfill"),n?i.insertBefore(t,n):i.appendChild(t);var r=this.getChild("closeButton");r&&i.appendChild(r.el_)},i.empty=function(){this.trigger("beforemodalempty"),ze(this.contentEl()),this.trigger("modalempty")},i.content=function(e){return void 0!==e&&(this.content_=e),this.content_},i.conditionalFocus_=function(){var e=o().activeElement,t=this.player_.el_;this.previouslyActiveEl_=null,(t.contains(e)||t===e)&&(this.previouslyActiveEl_=e,this.focus())},i.conditionalBlur_=function(){this.previouslyActiveEl_&&(this.previouslyActiveEl_.focus(),this.previouslyActiveEl_=null)},i.handleKeyDown=function(e){if(e.stopPropagation(),c().isEventKey(e,"Escape")&&this.closeable())return e.preventDefault(),void this.close();if(c().isEventKey(e,"Tab")){for(var t,i=this.focusableEls_(),n=this.el_.querySelector(":focus"),r=0;r<i.length;r++)if(n===i[r]){t=r;break}o().activeElement===this.el_&&(t=0),e.shiftKey&&0===t?(i[i.length-1].focus(),e.preventDefault()):e.shiftKey||t!==i.length-1||(i[0].focus(),e.preventDefault())}},i.focusableEls_=function(){var e=this.el_.querySelectorAll("*");return Array.prototype.filter.call(e,(function(e){return(e instanceof s().HTMLAnchorElement||e instanceof s().HTMLAreaElement)&&e.hasAttribute("href")||(e instanceof s().HTMLInputElement||e instanceof s().HTMLSelectElement||e instanceof s().HTMLTextAreaElement||e instanceof s().HTMLButtonElement)&&!e.hasAttribute("disabled")||e instanceof s().HTMLIFrameElement||e instanceof s().HTMLObjectElement||e instanceof s().HTMLEmbedElement||e.hasAttribute("tabindex")&&-1!==e.getAttribute("tabindex")||e.hasAttribute("contenteditable")}))},t}(zt);ti.prototype.options_={pauseOnOpen:!0,temporary:!0},zt.registerComponent("ModalDialog",ti);var ii=function(e){function t(t){var i;void 0===t&&(t=[]),(i=e.call(this)||this).tracks_=[],Object.defineProperty((0,d.default)(i),"length",{get:function(){return this.tracks_.length}});for(var n=0;n<t.length;n++)i.addTrack(t[n]);return i}(0,h.default)(t,e);var i=t.prototype;return i.addTrack=function(e){var t=this,i=this.tracks_.length;""+i in this||Object.defineProperty(this,i,{get:function(){return this.tracks_[i]}}),-1===this.tracks_.indexOf(e)&&(this.tracks_.push(e),this.trigger({track:e,type:"addtrack",target:this})),e.labelchange_=function(){t.trigger({track:e,type:"labelchange",target:t})},Et(e)&&e.addEventListener("labelchange",e.labelchange_)},i.removeTrack=function(e){for(var t,i=0,n=this.length;i<n;i++)if(this[i]===e){(t=this[i]).off&&t.off(),this.tracks_.splice(i,1);break}t&&this.trigger({track:t,type:"removetrack",target:this})},i.getTrackById=function(e){for(var t=null,i=0,n=this.length;i<n;i++){var r=this[i];if(r.id===e){t=r;break}}return t},t}(St);for(var ni in ii.prototype.allowedEvents_={change:"change",addtrack:"addtrack",removetrack:"removetrack",labelchange:"labelchange"},ii.prototype.allowedEvents_)ii.prototype["on"+ni]=null;var ri=function(e,t){for(var i=0;i<e.length;i++)Object.keys(e[i]).length&&t.id!==e[i].id&&(e[i].enabled=!1)},si=function(e){function t(t){var i;void 0===t&&(t=[]);for(var n=t.length-1;n>=0;n--)if(t[n].enabled){ri(t,t[n]);break}return(i=e.call(this,t)||this).changing_=!1,i}(0,h.default)(t,e);var i=t.prototype;return i.addTrack=function(t){var i=this;t.enabled&&ri(this,t),e.prototype.addTrack.call(this,t),t.addEventListener&&(t.enabledChange_=function(){i.changing_||(i.changing_=!0,ri(i,t),i.changing_=!1,i.trigger("change"))},t.addEventListener("enabledchange",t.enabledChange_))},i.removeTrack=function(t){e.prototype.removeTrack.call(this,t),t.removeEventListener&&t.enabledChange_&&(t.removeEventListener("enabledchange",t.enabledChange_),t.enabledChange_=null)},t}(ii),ai=function(e,t){for(var i=0;i<e.length;i++)Object.keys(e[i]).length&&t.id!==e[i].id&&(e[i].selected=!1)},oi=function(e){function t(t){var i;void 0===t&&(t=[]);for(var n=t.length-1;n>=0;n--)if(t[n].selected){ai(t,t[n]);break}return(i=e.call(this,t)||this).changing_=!1,Object.defineProperty((0,d.default)(i),"selectedIndex",{get:function(){for(var e=0;e<this.length;e++)if(this[e].selected)return e;return-1},set:function(){}}),i}(0,h.default)(t,e);var i=t.prototype;return i.addTrack=function(t){var i=this;t.selected&&ai(this,t),e.prototype.addTrack.call(this,t),t.addEventListener&&(t.selectedChange_=function(){i.changing_||(i.changing_=!0,ai(i,t),i.changing_=!1,i.trigger("change"))},t.addEventListener("selectedchange",t.selectedChange_))},i.removeTrack=function(t){e.prototype.removeTrack.call(this,t),t.removeEventListener&&t.selectedChange_&&(t.removeEventListener("selectedchange",t.selectedChange_),t.selectedChange_=null)},t}(ii),li=function(e){function t(){return e.apply(this,arguments)||this}(0,h.default)(t,e);var i=t.prototype;return i.addTrack=function(t){var i=this;e.prototype.addTrack.call(this,t),this.queueChange_||(this.queueChange_=function(){return i.queueTrigger("change")}),this.triggerSelectedlanguagechange||(this.triggerSelectedlanguagechange_=function(){return i.trigger("selectedlanguagechange")}),t.addEventListener("modechange",this.queueChange_);-1===["metadata","chapters"].indexOf(t.kind)&&t.addEventListener("modechange",this.triggerSelectedlanguagechange_)},i.removeTrack=function(t){e.prototype.removeTrack.call(this,t),t.removeEventListener&&(this.queueChange_&&t.removeEventListener("modechange",this.queueChange_),this.selectedlanguagechange_&&t.removeEventListener("modechange",this.triggerSelectedlanguagechange_))},t}(ii),ui=function(){function e(e){void 0===e&&(e=[]),this.trackElements_=[],Object.defineProperty(this,"length",{get:function(){return this.trackElements_.length}});for(var t=0,i=e.length;t<i;t++)this.addTrackElement_(e[t])}var t=e.prototype;return t.addTrackElement_=function(e){var t=this.trackElements_.length;""+t in this||Object.defineProperty(this,t,{get:function(){return this.trackElements_[t]}}),-1===this.trackElements_.indexOf(e)&&this.trackElements_.push(e)},t.getTrackElementByTrack_=function(e){for(var t,i=0,n=this.trackElements_.length;i<n;i++)if(e===this.trackElements_[i].track){t=this.trackElements_[i];break}return t},t.removeTrackElement_=function(e){for(var t=0,i=this.trackElements_.length;t<i;t++)if(e===this.trackElements_[t]){this.trackElements_[t].track&&"function"==typeof this.trackElements_[t].track.off&&this.trackElements_[t].track.off(),"function"==typeof this.trackElements_[t].off&&this.trackElements_[t].off(),this.trackElements_.splice(t,1);break}},e}(),ci=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(e){var t=this.length||0,i=0,n=e.length;this.cues_=e,this.length_=e.length;var r=function(e){""+e in this||Object.defineProperty(this,""+e,{get:function(){return this.cues_[e]}})};if(t<n)for(i=t;i<n;i++)r.call(this,i)},t.getCueById=function(e){for(var t=null,i=0,n=this.length;i<n;i++){var r=this[i];if(r.id===e){t=r;break}}return t},e}(),di={alternative:"alternative",captions:"captions",main:"main",sign:"sign",subtitles:"subtitles",commentary:"commentary"},hi={alternative:"alternative",descriptions:"descriptions",main:"main","main-desc":"main-desc",translation:"translation",commentary:"commentary"},pi={subtitles:"subtitles",captions:"captions",descriptions:"descriptions",chapters:"chapters",metadata:"metadata"},fi={disabled:"disabled",hidden:"hidden",showing:"showing"},mi=function(e){function t(t){var i;void 0===t&&(t={}),i=e.call(this)||this;var n={id:t.id||"vjs_track_"+at(),kind:t.kind||"",language:t.language||""},r=t.label||"",s=function(e){Object.defineProperty((0,d.default)(i),e,{get:function(){return n[e]},set:function(){}})};for(var a in n)s(a);return Object.defineProperty((0,d.default)(i),"label",{get:function(){return r},set:function(e){e!==r&&(r=e,this.trigger("labelchange"))}}),i}return(0,h.default)(t,e),t}(St),gi=function(e){var t=["protocol","hostname","port","pathname","search","hash","host"],i=o().createElement("a");i.href=e;for(var n={},r=0;r<t.length;r++)n[t[r]]=i[t[r]];return"http:"===n.protocol&&(n.host=n.host.replace(/:80$/,"")),"https:"===n.protocol&&(n.host=n.host.replace(/:443$/,"")),n.protocol||(n.protocol=s().location.protocol),n.host||(n.host=s().location.host),n},vi=function(e){if(!e.match(/^https?:\/\//)){var t=o().createElement("a");t.href=e,e=t.href}return e},yi=function(e){if("string"==typeof e){var t=/^(\/?)([\s\S]*?)((?:\.{1,2}|[^\/]+?)(\.([^\.\/\?]+)))(?:[\/]*|[\?].*)$/.exec(e);if(t)return t.pop().toLowerCase()}return""},_i=function(e,t){void 0===t&&(t=s().location);var i=gi(e);return(":"===i.protocol?t.protocol:i.protocol)+i.host!==t.protocol+t.host},bi=Object.freeze({__proto__:null,parseUrl:gi,getAbsoluteURL:vi,getFileExtension:yi,isCrossOrigin:_i}),Ti=function(e,t){var i=new(s().WebVTT.Parser)(s(),s().vttjs,s().WebVTT.StringDecoder()),n=[];i.oncue=function(e){t.addCue(e)},i.onparsingerror=function(e){n.push(e)},i.onflush=function(){t.trigger({type:"loadeddata",target:t})},i.parse(e),n.length>0&&(s().console&&s().console.groupCollapsed&&s().console.groupCollapsed("Text Track parsing errors for "+t.src),n.forEach((function(e){return q.error(e)})),s().console&&s().console.groupEnd&&s().console.groupEnd()),i.flush()},wi=function(e,t){var i={uri:e},n=_i(e);n&&(i.cors=n);var r="use-credentials"===t.tech_.crossOrigin();r&&(i.withCredentials=r),g()(i,Tt(this,(function(e,i,n){if(e)return q.error(e,i);t.loaded_=!0,"function"!=typeof s().WebVTT?t.tech_&&t.tech_.any(["vttjsloaded","vttjserror"],(function(e){if("vttjserror"!==e.type)return Ti(n,t);q.error("vttjs failed to load, stopping trying to process "+t.src)})):Ti(n,t)})))},Si=function(e){function t(t){var i;if(void 0===t&&(t={}),!t.tech)throw new Error("A tech was not provided.");var n=Bt(t,{kind:pi[t.kind]||"subtitles",language:t.language||t.srclang||""}),r=fi[n.mode]||"disabled",s=n.default;"metadata"!==n.kind&&"chapters"!==n.kind||(r="hidden"),(i=e.call(this,n)||this).tech_=n.tech,i.cues_=[],i.activeCues_=[],i.preload_=!1!==i.tech_.preloadTextTracks;var a=new ci(i.cues_),o=new ci(i.activeCues_),l=!1,u=Tt((0,d.default)(i),(function(){this.tech_.isReady_&&!this.tech_.isDisposed()&&(this.activeCues=this.activeCues,l&&(this.trigger("cuechange"),l=!1))}));return i.tech_.one("dispose",(function(){i.tech_.off("timeupdate",u)})),"disabled"!==r&&i.tech_.on("timeupdate",u),Object.defineProperties((0,d.default)(i),{default:{get:function(){return s},set:function(){}},mode:{get:function(){return r},set:function(e){fi[e]&&r!==e&&(r=e,this.preload_||"disabled"===r||0!==this.cues.length||wi(this.src,this),this.tech_.off("timeupdate",u),"disabled"!==r&&this.tech_.on("timeupdate",u),this.trigger("modechange"))}},cues:{get:function(){return this.loaded_?a:null},set:function(){}},activeCues:{get:function(){if(!this.loaded_)return null;if(0===this.cues.length)return o;for(var e=this.tech_.currentTime(),t=[],i=0,n=this.cues.length;i<n;i++){var r=this.cues[i];(r.startTime<=e&&r.endTime>=e||r.startTime===r.endTime&&r.startTime<=e&&r.startTime+.5>=e)&&t.push(r)}if(l=!1,t.length!==this.activeCues_.length)l=!0;else for(var s=0;s<t.length;s++)-1===this.activeCues_.indexOf(t[s])&&(l=!0);return this.activeCues_=t,o.setCues_(this.activeCues_),o},set:function(){}}}),n.src?(i.src=n.src,i.preload_||(i.loaded_=!0),(i.preload_||"subtitles"!==n.kind&&"captions"!==n.kind)&&wi(i.src,(0,d.default)(i))):i.loaded_=!0,i}(0,h.default)(t,e);var i=t.prototype;return i.addCue=function(e){var t=e;if(s().vttjs&&!(e instanceof s().vttjs.VTTCue)){for(var i in t=new(s().vttjs.VTTCue)(e.startTime,e.endTime,e.text),e)i in t||(t[i]=e[i]);t.id=e.id,t.originalCue_=e}for(var n=this.tech_.textTracks(),r=0;r<n.length;r++)n[r]!==this&&n[r].removeCue(t);this.cues_.push(t),this.cues.setCues_(this.cues_)},i.removeCue=function(e){for(var t=this.cues_.length;t--;){var i=this.cues_[t];if(i===e||i.originalCue_&&i.originalCue_===e){this.cues_.splice(t,1),this.cues.setCues_(this.cues_);break}}},t}(mi);Si.prototype.allowedEvents_={cuechange:"cuechange"};var ki=function(e){function t(t){var i;void 0===t&&(t={});var n=Bt(t,{kind:hi[t.kind]||""});i=e.call(this,n)||this;var r=!1;return Object.defineProperty((0,d.default)(i),"enabled",{get:function(){return r},set:function(e){"boolean"==typeof e&&e!==r&&(r=e,this.trigger("enabledchange"))}}),n.enabled&&(i.enabled=n.enabled),i.loaded_=!0,i}return(0,h.default)(t,e),t}(mi),Ei=function(e){function t(t){var i;void 0===t&&(t={});var n=Bt(t,{kind:di[t.kind]||""});i=e.call(this,n)||this;var r=!1;return Object.defineProperty((0,d.default)(i),"selected",{get:function(){return r},set:function(e){"boolean"==typeof e&&e!==r&&(r=e,this.trigger("selectedchange"))}}),n.selected&&(i.selected=n.selected),i}return(0,h.default)(t,e),t}(mi),Ci=function(e){function t(t){var i,n;void 0===t&&(t={}),i=e.call(this)||this;var r=new Si(t);return i.kind=r.kind,i.src=r.src,i.srclang=r.language,i.label=r.label,i.default=r.default,Object.defineProperties((0,d.default)(i),{readyState:{get:function(){return n}},track:{get:function(){return r}}}),n=0,r.addEventListener("loadeddata",(function(){n=2,i.trigger({type:"load",target:(0,d.default)(i)})})),i}return(0,h.default)(t,e),t}(St);Ci.prototype.allowedEvents_={load:"load"},Ci.NONE=0,Ci.LOADING=1,Ci.LOADED=2,Ci.ERROR=3;var xi={audio:{ListClass:si,TrackClass:ki,capitalName:"Audio"},video:{ListClass:oi,TrackClass:Ei,capitalName:"Video"},text:{ListClass:li,TrackClass:Si,capitalName:"Text"}};Object.keys(xi).forEach((function(e){xi[e].getterName=e+"Tracks",xi[e].privateName=e+"Tracks_"}));var Ai={remoteText:{ListClass:li,TrackClass:Si,capitalName:"RemoteText",getterName:"remoteTextTracks",privateName:"remoteTextTracks_"},remoteTextEl:{ListClass:ui,TrackClass:Ci,capitalName:"RemoteTextTrackEls",getterName:"remoteTextTrackEls",privateName:"remoteTextTrackEls_"}},Pi=(0,l.default)({},xi,Ai);Ai.names=Object.keys(Ai),xi.names=Object.keys(xi),Pi.names=[].concat(Ai.names).concat(xi.names);var Ii=function(e){function t(t,i){var n;return void 0===t&&(t={}),void 0===i&&(i=function(){}),t.reportTouchActivity=!1,(n=e.call(this,null,t,i)||this).onDurationChange_=function(e){return n.onDurationChange(e)},n.trackProgress_=function(e){return n.trackProgress(e)},n.trackCurrentTime_=function(e){return n.trackCurrentTime(e)},n.stopTrackingCurrentTime_=function(e){return n.stopTrackingCurrentTime(e)},n.disposeSourceHandler_=function(e){return n.disposeSourceHandler(e)},n.hasStarted_=!1,n.on("playing",(function(){this.hasStarted_=!0})),n.on("loadstart",(function(){this.hasStarted_=!1})),Pi.names.forEach((function(e){var i=Pi[e];t&&t[i.getterName]&&(n[i.privateName]=t[i.getterName])})),n.featuresProgressEvents||n.manualProgressOn(),n.featuresTimeupdateEvents||n.manualTimeUpdatesOn(),["Text","Audio","Video"].forEach((function(e){!1===t["native"+e+"Tracks"]&&(n["featuresNative"+e+"Tracks"]=!1)})),!1===t.nativeCaptions||!1===t.nativeTextTracks?n.featuresNativeTextTracks=!1:!0!==t.nativeCaptions&&!0!==t.nativeTextTracks||(n.featuresNativeTextTracks=!0),n.featuresNativeTextTracks||n.emulateTextTracks(),n.preloadTextTracks=!1!==t.preloadTextTracks,n.autoRemoteTextTracks_=new Pi.text.ListClass,n.initTrackListeners(),t.nativeControlsForTouch||n.emitTapEvents(),n.constructor&&(n.name_=n.constructor.name||"Unknown Tech"),n}(0,h.default)(t,e);var i=t.prototype;return i.triggerSourceset=function(e){var t=this;this.isReady_||this.one("ready",(function(){return t.setTimeout((function(){return t.triggerSourceset(e)}),1)})),this.trigger({src:e,type:"sourceset"})},i.manualProgressOn=function(){this.on("durationchange",this.onDurationChange_),this.manualProgress=!0,this.one("ready",this.trackProgress_)},i.manualProgressOff=function(){this.manualProgress=!1,this.stopTrackingProgress(),this.off("durationchange",this.onDurationChange_)},i.trackProgress=function(e){this.stopTrackingProgress(),this.progressInterval=this.setInterval(Tt(this,(function(){var e=this.bufferedPercent();this.bufferedPercent_!==e&&this.trigger("progress"),this.bufferedPercent_=e,1===e&&this.stopTrackingProgress()})),500)},i.onDurationChange=function(e){this.duration_=this.duration()},i.buffered=function(){return $t(0,0)},i.bufferedPercent=function(){return Xt(this.buffered(),this.duration_)},i.stopTrackingProgress=function(){this.clearInterval(this.progressInterval)},i.manualTimeUpdatesOn=function(){this.manualTimeUpdates=!0,this.on("play",this.trackCurrentTime_),this.on("pause",this.stopTrackingCurrentTime_)},i.manualTimeUpdatesOff=function(){this.manualTimeUpdates=!1,this.stopTrackingCurrentTime(),this.off("play",this.trackCurrentTime_),this.off("pause",this.stopTrackingCurrentTime_)},i.trackCurrentTime=function(){this.currentTimeInterval&&this.stopTrackingCurrentTime(),this.currentTimeInterval=this.setInterval((function(){this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})}),250)},i.stopTrackingCurrentTime=function(){this.clearInterval(this.currentTimeInterval),this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})},i.dispose=function(){this.clearTracks(xi.names),this.manualProgress&&this.manualProgressOff(),this.manualTimeUpdates&&this.manualTimeUpdatesOff(),e.prototype.dispose.call(this)},i.clearTracks=function(e){var t=this;(e=[].concat(e)).forEach((function(e){for(var i=t[e+"Tracks"]()||[],n=i.length;n--;){var r=i[n];"text"===e&&t.removeRemoteTextTrack(r),i.removeTrack(r)}}))},i.cleanupAutoTextTracks=function(){for(var e=this.autoRemoteTextTracks_||[],t=e.length;t--;){var i=e[t];this.removeRemoteTextTrack(i)}},i.reset=function(){},i.crossOrigin=function(){},i.setCrossOrigin=function(){},i.error=function(e){return void 0!==e&&(this.error_=new Gt(e),this.trigger("error")),this.error_},i.played=function(){return this.hasStarted_?$t(0,0):$t()},i.play=function(){},i.setScrubbing=function(){},i.scrubbing=function(){},i.setCurrentTime=function(){this.manualTimeUpdates&&this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})},i.initTrackListeners=function(){var e=this;xi.names.forEach((function(t){var i=xi[t],n=function(){e.trigger(t+"trackchange")},r=e[i.getterName]();r.addEventListener("removetrack",n),r.addEventListener("addtrack",n),e.on("dispose",(function(){r.removeEventListener("removetrack",n),r.removeEventListener("addtrack",n)}))}))},i.addWebVttScript_=function(){var e=this;if(!s().WebVTT)if(o().body.contains(this.el())){if(!this.options_["vtt.js"]&&Y(y())&&Object.keys(y()).length>0)return void this.trigger("vttjsloaded");var t=o().createElement("script");t.src=this.options_["vtt.js"]||"https://vjs.zencdn.net/vttjs/0.14.1/vtt.min.js",t.onload=function(){e.trigger("vttjsloaded")},t.onerror=function(){e.trigger("vttjserror")},this.on("dispose",(function(){t.onload=null,t.onerror=null})),s().WebVTT=!0,this.el().parentNode.appendChild(t)}else this.ready(this.addWebVttScript_)},i.emulateTextTracks=function(){var e=this,t=this.textTracks(),i=this.remoteTextTracks(),n=function(e){return t.addTrack(e.track)},r=function(e){return t.removeTrack(e.track)};i.on("addtrack",n),i.on("removetrack",r),this.addWebVttScript_();var s=function(){return e.trigger("texttrackchange")},a=function(){s();for(var e=0;e<t.length;e++){var i=t[e];i.removeEventListener("cuechange",s),"showing"===i.mode&&i.addEventListener("cuechange",s)}};a(),t.addEventListener("change",a),t.addEventListener("addtrack",a),t.addEventListener("removetrack",a),this.on("dispose",(function(){i.off("addtrack",n),i.off("removetrack",r),t.removeEventListener("change",a),t.removeEventListener("addtrack",a),t.removeEventListener("removetrack",a);for(var e=0;e<t.length;e++){t[e].removeEventListener("cuechange",s)}}))},i.addTextTrack=function(e,t,i){if(!e)throw new Error("TextTrack kind is required but was not provided");return function(e,t,i,n,r){void 0===r&&(r={});var s=e.textTracks();r.kind=t,i&&(r.label=i),n&&(r.language=n),r.tech=e;var a=new Pi.text.TrackClass(r);return s.addTrack(a),a}(this,e,t,i)},i.createRemoteTextTrack=function(e){var t=Bt(e,{tech:this});return new Ai.remoteTextEl.TrackClass(t)},i.addRemoteTextTrack=function(e,t){var i=this;void 0===e&&(e={});var n=this.createRemoteTextTrack(e);return!0!==t&&!1!==t&&(q.warn('Calling addRemoteTextTrack without explicitly setting the "manualCleanup" parameter to `true` is deprecated and default to `false` in future version of video.js'),t=!0),this.remoteTextTrackEls().addTrackElement_(n),this.remoteTextTracks().addTrack(n.track),!0!==t&&this.ready((function(){return i.autoRemoteTextTracks_.addTrack(n.track)})),n},i.removeRemoteTextTrack=function(e){var t=this.remoteTextTrackEls().getTrackElementByTrack_(e);this.remoteTextTrackEls().removeTrackElement_(t),this.remoteTextTracks().removeTrack(e),this.autoRemoteTextTracks_.removeTrack(e)},i.getVideoPlaybackQuality=function(){return{}},i.requestPictureInPicture=function(){var e=this.options_.Promise||s().Promise;if(e)return e.reject()},i.disablePictureInPicture=function(){return!0},i.setDisablePictureInPicture=function(){},i.setPoster=function(){},i.playsinline=function(){},i.setPlaysinline=function(){},i.overrideNativeAudioTracks=function(){},i.overrideNativeVideoTracks=function(){},i.canPlayType=function(){return""},t.canPlayType=function(){return""},t.canPlaySource=function(e,i){return t.canPlayType(e.type)},t.isTech=function(e){return e.prototype instanceof t||e instanceof t||e===t},t.registerTech=function(e,i){if(t.techs_||(t.techs_={}),!t.isTech(i))throw new Error("Tech "+e+" must be a Tech");if(!t.canPlayType)throw new Error("Techs must have a static canPlayType method on them");if(!t.canPlaySource)throw new Error("Techs must have a static canPlaySource method on them");return e=Ut(e),t.techs_[e]=i,t.techs_[Rt(e)]=i,"Tech"!==e&&t.defaultTechOrder_.push(e),i},t.getTech=function(e){if(e)return t.techs_&&t.techs_[e]?t.techs_[e]:(e=Ut(e),s()&&s().videojs&&s().videojs[e]?(q.warn("The "+e+" tech was added to the videojs object when it should be registered using videojs.registerTech(name, tech)"),s().videojs[e]):void 0)},t}(zt);Pi.names.forEach((function(e){var t=Pi[e];Ii.prototype[t.getterName]=function(){return this[t.privateName]=this[t.privateName]||new t.ListClass,this[t.privateName]}})),Ii.prototype.featuresVolumeControl=!0,Ii.prototype.featuresMuteControl=!0,Ii.prototype.featuresFullscreenResize=!1,Ii.prototype.featuresPlaybackRate=!1,Ii.prototype.featuresProgressEvents=!1,Ii.prototype.featuresSourceset=!1,Ii.prototype.featuresTimeupdateEvents=!1,Ii.prototype.featuresNativeTextTracks=!1,Ii.withSourceHandlers=function(e){e.registerSourceHandler=function(t,i){var n=e.sourceHandlers;n||(n=e.sourceHandlers=[]),void 0===i&&(i=n.length),n.splice(i,0,t)},e.canPlayType=function(t){for(var i,n=e.sourceHandlers||[],r=0;r<n.length;r++)if(i=n[r].canPlayType(t))return i;return""},e.selectSourceHandler=function(t,i){for(var n=e.sourceHandlers||[],r=0;r<n.length;r++)if(n[r].canHandleSource(t,i))return n[r];return null},e.canPlaySource=function(t,i){var n=e.selectSourceHandler(t,i);return n?n.canHandleSource(t,i):""};["seekable","seeking","duration"].forEach((function(e){var t=this[e];"function"==typeof t&&(this[e]=function(){return this.sourceHandler_&&this.sourceHandler_[e]?this.sourceHandler_[e].apply(this.sourceHandler_,arguments):t.apply(this,arguments)})}),e.prototype),e.prototype.setSource=function(t){var i=e.selectSourceHandler(t,this.options_);i||(e.nativeSourceHandler?i=e.nativeSourceHandler:q.error("No source handler found for the current source.")),this.disposeSourceHandler(),this.off("dispose",this.disposeSourceHandler_),i!==e.nativeSourceHandler&&(this.currentSource_=t),this.sourceHandler_=i.handleSource(t,this,this.options_),this.one("dispose",this.disposeSourceHandler_)},e.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)}},zt.registerComponent("Tech",Ii),Ii.registerTech("Tech",Ii),Ii.defaultTechOrder_=[];var Oi={},Li={},Di={};function Mi(e,t,i){e.setTimeout((function(){return Fi(t,Oi[t.type],i,e)}),1)}function Ni(e,t,i,n){void 0===n&&(n=null);var r="call"+Ut(i),s=e.reduce(ji(r),n),a=s===Di,o=a?null:t[i](s);return function(e,t,i,n){for(var r=e.length-1;r>=0;r--){var s=e[r];s[t]&&s[t](n,i)}}(e,i,o,a),o}var Ri={buffered:1,currentTime:1,duration:1,muted:1,played:1,paused:1,seekable:1,volume:1,ended:1},Ui={setCurrentTime:1,setMuted:1,setVolume:1},Bi={play:1,pause:1};function ji(e){return function(t,i){return t===Di?Di:i[e]?i[e](t):t}}function Fi(e,t,i,n,r,s){void 0===e&&(e={}),void 0===t&&(t=[]),void 0===r&&(r=[]),void 0===s&&(s=!1);var a=t,o=a[0],l=a.slice(1);if("string"==typeof o)Fi(e,Oi[o],i,n,r,s);else if(o){var u=function(e,t){var i=Li[e.id()],n=null;if(null==i)return n=t(e),Li[e.id()]=[[t,n]],n;for(var r=0;r<i.length;r++){var s=i[r],a=s[0],o=s[1];a===t&&(n=o)}return null===n&&(n=t(e),i.push([t,n])),n}(n,o);if(!u.setSource)return r.push(u),Fi(e,l,i,n,r,s);u.setSource(X({},e),(function(t,a){if(t)return Fi(e,l,i,n,r,s);r.push(u),Fi(a,e.type===a.type?l:Oi[a.type],i,n,r,s)}))}else l.length?Fi(e,l,i,n,r,s):s?i(e,r):Fi(e,Oi["*"],i,n,r,!0)}var Hi={opus:"video/ogg",ogv:"video/ogg",mp4:"video/mp4",mov:"video/mp4",m4v:"video/mp4",mkv:"video/x-matroska",m4a:"audio/mp4",mp3:"audio/mpeg",aac:"audio/aac",caf:"audio/x-caf",flac:"audio/flac",oga:"audio/ogg",wav:"audio/wav",m3u8:"application/x-mpegURL",jpg:"image/jpeg",jpeg:"image/jpeg",gif:"image/gif",png:"image/png",svg:"image/svg+xml",webp:"image/webp"},qi=function(e){void 0===e&&(e="");var t=yi(e);return Hi[t.toLowerCase()]||""},zi=function e(t){if(Array.isArray(t)){var i=[];t.forEach((function(t){t=e(t),Array.isArray(t)?i=i.concat(t):G(t)&&i.push(t)})),t=i}else t="string"==typeof t&&t.trim()?[Wi({src:t})]:G(t)&&"string"==typeof t.src&&t.src&&t.src.trim()?[Wi(t)]:[];return t};function Wi(e){if(!e.type){var t=qi(e.src);t&&(e.type=t)}return e}var Vi=function(e){function t(t,i,n){var r,s=Bt({createEl:!1},i);if(r=e.call(this,t,s,n)||this,i.playerOptions.sources&&0!==i.playerOptions.sources.length)t.src(i.playerOptions.sources);else for(var a=0,o=i.playerOptions.techOrder;a<o.length;a++){var l=Ut(o[a]),u=Ii.getTech(l);if(l||(u=zt.getComponent(l)),u&&u.isSupported()){t.loadTech_(l);break}}return r}return(0,h.default)(t,e),t}(zt);zt.registerComponent("MediaLoader",Vi);var $i=function(e){function t(t,i){var n;return(n=e.call(this,t,i)||this).handleMouseOver_=function(e){return n.handleMouseOver(e)},n.handleMouseOut_=function(e){return n.handleMouseOut(e)},n.handleClick_=function(e){return n.handleClick(e)},n.handleKeyDown_=function(e){return n.handleKeyDown(e)},n.emitTapEvents(),n.enable(),n}(0,h.default)(t,e);var i=t.prototype;return i.createEl=function(e,t,i){void 0===e&&(e="div"),void 0===t&&(t={}),void 0===i&&(i={}),t=X({className:this.buildCSSClass(),tabIndex:0},t),"button"===e&&q.error("Creating a ClickableComponent with an HTML element of "+e+" is not supported; use a Button instead."),i=X({role:"button"},i),this.tabIndex_=t.tabIndex;var n=Ee(e,t,i);return n.appendChild(Ee("span",{className:"vjs-icon-placeholder"},{"aria-hidden":!0})),this.createControlTextEl(n),n},i.dispose=function(){this.controlTextEl_=null,e.prototype.dispose.call(this)},i.createControlTextEl=function(e){return this.controlTextEl_=Ee("span",{className:"vjs-control-text"},{"aria-live":"polite"}),e&&e.appendChild(this.controlTextEl_),this.controlText(this.controlText_,e),this.controlTextEl_},i.controlText=function(e,t){if(void 0===t&&(t=this.el()),void 0===e)return this.controlText_||"Need Text";var i=this.localize(e);this.controlText_=e,Ce(this.controlTextEl_,i),this.nonIconControl||this.player_.options_.noUITitleAttributes||t.setAttribute("title",i)},i.buildCSSClass=function(){return"vjs-control vjs-button "+e.prototype.buildCSSClass.call(this)},i.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("keydown",this.handleKeyDown_))},i.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("mouseover",this.handleMouseOver_),this.off("mouseout",this.handleMouseOut_),this.off(["tap","click"],this.handleClick_),this.off("keydown",this.handleKeyDown_)},i.handleLanguagechange=function(){this.controlText(this.controlText_)},i.handleClick=function(e){this.options_.clickHandler&&this.options_.clickHandler.call(this,arguments)},i.handleKeyDown=function(t){c().isEventKey(t,"Space")||c().isEventKey(t,"Enter")?(t.preventDefault(),t.stopPropagation(),this.trigger("click")):e.prototype.handleKeyDown.call(this,t)},t}(zt);zt.registerComponent("ClickableComponent",$i);var Xi=function(e){function t(t,i){var n;return(n=e.call(this,t,i)||this).update(),n.update_=function(e){return n.update(e)},t.on("posterchange",n.update_),n}(0,h.default)(t,e);var i=t.prototype;return i.dispose=function(){this.player().off("posterchange",this.update_),e.prototype.dispose.call(this)},i.createEl=function(){return Ee("div",{className:"vjs-poster",tabIndex:-1})},i.update=function(e){var t=this.player().poster();this.setSrc(t),t?this.show():this.hide()},i.setSrc=function(e){var t="";e&&(t='url("'+e+'")'),this.el_.style.backgroundImage=t},i.handleClick=function(e){if(this.player_.controls()){var t=this.player_.usingPlugin("eme")&&this.player_.eme.sessions&&this.player_.eme.sessions.length>0;!this.player_.tech(!0)||(ce||oe)&&t||this.player_.tech(!0).focus(),this.player_.paused()?Qt(this.player_.play()):this.player_.pause()}},t}($i);zt.registerComponent("PosterImage",Xi);var Gi={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 Yi(e,t){var i;if(4===e.length)i=e[1]+e[1]+e[2]+e[2]+e[3]+e[3];else{if(7!==e.length)throw new Error("Invalid color code provided, "+e+"; must be formatted as e.g. #f0e or #f604e2.");i=e.slice(1)}return"rgba("+parseInt(i.slice(0,2),16)+","+parseInt(i.slice(2,4),16)+","+parseInt(i.slice(4,6),16)+","+t+")"}function Ki(e,t,i){try{e.style[t]=i}catch(e){return}}var Qi=function(e){function t(t,i,n){var r;r=e.call(this,t,i,n)||this;var a=function(e){return r.updateDisplay(e)};return t.on("loadstart",(function(e){return r.toggleDisplay(e)})),t.on("texttrackchange",a),t.on("loadedmetadata",(function(e){return r.preselectTrack(e)})),t.ready(Tt((0,d.default)(r),(function(){if(t.tech_&&t.tech_.featuresNativeTextTracks)this.hide();else{t.on("fullscreenchange",a),t.on("playerresize",a),s().addEventListener("orientationchange",a),t.on("dispose",(function(){return s().removeEventListener("orientationchange",a)}));for(var e=this.options_.playerOptions.tracks||[],i=0;i<e.length;i++)this.player_.addRemoteTextTrack(e[i],!0);this.preselectTrack()}}))),r}(0,h.default)(t,e);var i=t.prototype;return i.preselectTrack=function(){for(var e,t,i,n={captions:1,subtitles:1},r=this.player_.textTracks(),s=this.player_.cache_.selectedLanguage,a=0;a<r.length;a++){var o=r[a];s&&s.enabled&&s.language&&s.language===o.language&&o.kind in n?o.kind===s.kind?i=o:i||(i=o):s&&!s.enabled?(i=null,e=null,t=null):o.default&&("descriptions"!==o.kind||e?o.kind in n&&!t&&(t=o):e=o)}i?i.mode="showing":t?t.mode="showing":e&&(e.mode="showing")},i.toggleDisplay=function(){this.player_.tech_&&this.player_.tech_.featuresNativeTextTracks?this.hide():this.show()},i.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-text-track-display"},{translate:"yes","aria-live":"off","aria-atomic":"true"})},i.clearDisplay=function(){"function"==typeof s().WebVTT&&s().WebVTT.processCues(s(),[],this.el_)},i.updateDisplay=function(){var e=this.player_.textTracks(),t=this.options_.allowMultipleShowingTracks;if(this.clearDisplay(),t){for(var i=[],n=0;n<e.length;++n){var r=e[n];"showing"===r.mode&&i.push(r)}this.updateForTrack(i)}else{for(var s=null,a=null,o=e.length;o--;){var l=e[o];"showing"===l.mode&&("descriptions"===l.kind?s=l:a=l)}a?("off"!==this.getAttribute("aria-live")&&this.setAttribute("aria-live","off"),this.updateForTrack(a)):s&&("assertive"!==this.getAttribute("aria-live")&&this.setAttribute("aria-live","assertive"),this.updateForTrack(s))}},i.updateDisplayState=function(e){for(var t=this.player_.textTrackSettings.getValues(),i=e.activeCues,n=i.length;n--;){var r=i[n];if(r){var a=r.displayState;if(t.color&&(a.firstChild.style.color=t.color),t.textOpacity&&Ki(a.firstChild,"color",Yi(t.color||"#fff",t.textOpacity)),t.backgroundColor&&(a.firstChild.style.backgroundColor=t.backgroundColor),t.backgroundOpacity&&Ki(a.firstChild,"backgroundColor",Yi(t.backgroundColor||"#000",t.backgroundOpacity)),t.windowColor&&(t.windowOpacity?Ki(a,"backgroundColor",Yi(t.windowColor,t.windowOpacity)):a.style.backgroundColor=t.windowColor),t.edgeStyle&&("dropshadow"===t.edgeStyle?a.firstChild.style.textShadow="2px 2px 3px #222, 2px 2px 4px #222, 2px 2px 5px #222":"raised"===t.edgeStyle?a.firstChild.style.textShadow="1px 1px #222, 2px 2px #222, 3px 3px #222":"depressed"===t.edgeStyle?a.firstChild.style.textShadow="1px 1px #ccc, 0 1px #ccc, -1px -1px #222, 0 -1px #222":"uniform"===t.edgeStyle&&(a.firstChild.style.textShadow="0 0 4px #222, 0 0 4px #222, 0 0 4px #222, 0 0 4px #222")),t.fontPercent&&1!==t.fontPercent){var o=s().parseFloat(a.style.fontSize);a.style.fontSize=o*t.fontPercent+"px",a.style.height="auto",a.style.top="auto"}t.fontFamily&&"default"!==t.fontFamily&&("small-caps"===t.fontFamily?a.firstChild.style.fontVariant="small-caps":a.firstChild.style.fontFamily=Gi[t.fontFamily])}}},i.updateForTrack=function(e){if(Array.isArray(e)||(e=[e]),"function"==typeof s().WebVTT&&!e.every((function(e){return!e.activeCues}))){for(var t=[],i=0;i<e.length;++i)for(var n=e[i],r=0;r<n.activeCues.length;++r)t.push(n.activeCues[r]);s().WebVTT.processCues(s(),t,this.el_);for(var a=0;a<e.length;++a){for(var o=e[a],l=0;l<o.activeCues.length;++l){var u=o.activeCues[l].displayState;Pe(u,"vjs-text-track-cue"),Pe(u,"vjs-text-track-cue-"+(o.language?o.language:a)),o.language&&Ne(u,"lang",o.language)}this.player_.textTrackSettings&&this.updateDisplayState(o)}}},t}(zt);zt.registerComponent("TextTrackDisplay",Qi);var Ji=function(e){function t(){return e.apply(this,arguments)||this}return(0,h.default)(t,e),t.prototype.createEl=function(){var t=this.player_.isAudio(),i=this.localize(t?"Audio Player":"Video Player"),n=Ee("span",{className:"vjs-control-text",textContent:this.localize("{1} is loading.",[i])}),r=e.prototype.createEl.call(this,"div",{className:"vjs-loading-spinner",dir:"ltr"});return r.appendChild(n),r},t}(zt);zt.registerComponent("LoadingSpinner",Ji);var Zi=function(e){function t(){return e.apply(this,arguments)||this}(0,h.default)(t,e);var i=t.prototype;return i.createEl=function(e,t,i){void 0===t&&(t={}),void 0===i&&(i={});var n=Ee("button",t=X({className:this.buildCSSClass()},t),i=X({type:"button"},i));return n.appendChild(Ee("span",{className:"vjs-icon-placeholder"},{"aria-hidden":!0})),this.createControlTextEl(n),n},i.addChild=function(e,t){void 0===t&&(t={});var i=this.constructor.name;return q.warn("Adding an actionable (user controllable) child to a Button ("+i+") is not supported; use a ClickableComponent instead."),zt.prototype.addChild.call(this,e,t)},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.handleKeyDown=function(t){c().isEventKey(t,"Space")||c().isEventKey(t,"Enter")?t.stopPropagation():e.prototype.handleKeyDown.call(this,t)},t}($i);zt.registerComponent("Button",Zi);var en=function(e){function t(t,i){var n;return(n=e.call(this,t,i)||this).mouseused_=!1,n.on("mousedown",(function(e){return n.handleMouseDown(e)})),n}(0,h.default)(t,e);var i=t.prototype;return i.buildCSSClass=function(){return"vjs-big-play-button"},i.handleClick=function(e){var t=this.player_.play();if(this.mouseused_&&e.clientX&&e.clientY){var i=this.player_.usingPlugin("eme")&&this.player_.eme.sessions&&this.player_.eme.sessions.length>0;return Qt(t),void(!this.player_.tech(!0)||(ce||oe)&&i||this.player_.tech(!0).focus())}var n=this.player_.getChild("controlBar"),r=n&&n.getChild("playToggle");if(r){var s=function(){return r.focus()};Kt(t)?t.then(s,(function(){})):this.setTimeout(s,1)}else this.player_.tech(!0).focus()},i.handleKeyDown=function(t){this.mouseused_=!1,e.prototype.handleKeyDown.call(this,t)},i.handleMouseDown=function(e){this.mouseused_=!0},t}(Zi);en.prototype.controlText_="Play Video",zt.registerComponent("BigPlayButton",en);var tn=function(e){function t(t,i){var n;return(n=e.call(this,t,i)||this).controlText(i&&i.controlText||n.localize("Close")),n}(0,h.default)(t,e);var i=t.prototype;return i.buildCSSClass=function(){return"vjs-close-button "+e.prototype.buildCSSClass.call(this)},i.handleClick=function(e){this.trigger({type:"close",bubbles:!1})},i.handleKeyDown=function(t){c().isEventKey(t,"Esc")?(t.preventDefault(),t.stopPropagation(),this.trigger("click")):e.prototype.handleKeyDown.call(this,t)},t}(Zi);zt.registerComponent("CloseButton",tn);var nn=function(e){function t(t,i){var n;return void 0===i&&(i={}),n=e.call(this,t,i)||this,i.replay=void 0===i.replay||i.replay,n.on(t,"play",(function(e){return n.handlePlay(e)})),n.on(t,"pause",(function(e){return n.handlePause(e)})),i.replay&&n.on(t,"ended",(function(e){return n.handleEnded(e)})),n}(0,h.default)(t,e);var i=t.prototype;return i.buildCSSClass=function(){return"vjs-play-control "+e.prototype.buildCSSClass.call(this)},i.handleClick=function(e){this.player_.paused()?Qt(this.player_.play()):this.player_.pause()},i.handleSeeked=function(e){this.removeClass("vjs-ended"),this.player_.paused()?this.handlePause(e):this.handlePlay(e)},i.handlePlay=function(e){this.removeClass("vjs-ended"),this.removeClass("vjs-paused"),this.addClass("vjs-playing"),this.controlText("Pause")},i.handlePause=function(e){this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.controlText("Play")},i.handleEnded=function(e){var t=this;this.removeClass("vjs-playing"),this.addClass("vjs-ended"),this.controlText("Replay"),this.one(this.player_,"seeked",(function(e){return t.handleSeeked(e)}))},t}(Zi);nn.prototype.controlText_="Play",zt.registerComponent("PlayToggle",nn);var rn=function(e,t){e=e<0?0:e;var i=Math.floor(e%60),n=Math.floor(e/60%60),r=Math.floor(e/3600),s=Math.floor(t/60%60),a=Math.floor(t/3600);return(isNaN(e)||e===1/0)&&(r=n=i="-"),(r=r>0||a>0?r+":":"")+(n=((r||s>=10)&&n<10?"0"+n:n)+":")+(i=i<10?"0"+i:i)},sn=rn;function an(e,t){return void 0===t&&(t=e),sn(e,t)}var on=function(e){function t(t,i){var n;return(n=e.call(this,t,i)||this).on(t,["timeupdate","ended"],(function(e){return n.updateContent(e)})),n.updateTextNode_(),n}(0,h.default)(t,e);var i=t.prototype;return i.createEl=function(){var t=this.buildCSSClass(),i=e.prototype.createEl.call(this,"div",{className:t+" vjs-time-control vjs-control"}),n=Ee("span",{className:"vjs-control-text",textContent:this.localize(this.labelText_)+" "},{role:"presentation"});return i.appendChild(n),this.contentEl_=Ee("span",{className:t+"-display"},{"aria-live":"off",role:"presentation"}),i.appendChild(this.contentEl_),i},i.dispose=function(){this.contentEl_=null,this.textNode_=null,e.prototype.dispose.call(this)},i.updateTextNode_=function(e){var t=this;void 0===e&&(e=0),e=an(e),this.formattedTime_!==e&&(this.formattedTime_=e,this.requestNamedAnimationFrame("TimeDisplay#updateTextNode_",(function(){if(t.contentEl_){var e=t.textNode_;e&&t.contentEl_.firstChild!==e&&(e=null,q.warn("TimeDisplay#updateTextnode_: Prevented replacement of text node element since it was no longer a child of this node. Appending a new node instead.")),t.textNode_=o().createTextNode(t.formattedTime_),t.textNode_&&(e?t.contentEl_.replaceChild(t.textNode_,e):t.contentEl_.appendChild(t.textNode_))}})))},i.updateContent=function(e){},t}(zt);on.prototype.labelText_="Time",on.prototype.controlText_="Time",zt.registerComponent("TimeDisplay",on);var ln=function(e){function t(){return e.apply(this,arguments)||this}(0,h.default)(t,e);var i=t.prototype;return i.buildCSSClass=function(){return"vjs-current-time"},i.updateContent=function(e){var t;t=this.player_.ended()?this.player_.duration():this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime(),this.updateTextNode_(t)},t}(on);ln.prototype.labelText_="Current Time",ln.prototype.controlText_="Current Time",zt.registerComponent("CurrentTimeDisplay",ln);var un=function(e){function t(t,i){var n,r=function(e){return n.updateContent(e)};return(n=e.call(this,t,i)||this).on(t,"durationchange",r),n.on(t,"loadstart",r),n.on(t,"loadedmetadata",r),n}(0,h.default)(t,e);var i=t.prototype;return i.buildCSSClass=function(){return"vjs-duration"},i.updateContent=function(e){var t=this.player_.duration();this.updateTextNode_(t)},t}(on);un.prototype.labelText_="Duration",un.prototype.controlText_="Duration",zt.registerComponent("DurationDisplay",un);var cn=function(e){function t(){return e.apply(this,arguments)||this}return(0,h.default)(t,e),t.prototype.createEl=function(){var t=e.prototype.createEl.call(this,"div",{className:"vjs-time-control vjs-time-divider"},{"aria-hidden":!0}),i=e.prototype.createEl.call(this,"div"),n=e.prototype.createEl.call(this,"span",{textContent:"/"});return i.appendChild(n),t.appendChild(i),t},t}(zt);zt.registerComponent("TimeDivider",cn);var dn=function(e){function t(t,i){var n;return(n=e.call(this,t,i)||this).on(t,"durationchange",(function(e){return n.updateContent(e)})),n}(0,h.default)(t,e);var i=t.prototype;return i.buildCSSClass=function(){return"vjs-remaining-time"},i.createEl=function(){var t=e.prototype.createEl.call(this);return!1!==this.options_.displayNegative&&t.insertBefore(Ee("span",{},{"aria-hidden":!0},"-"),this.contentEl_),t},i.updateContent=function(e){var t;"number"==typeof this.player_.duration()&&(t=this.player_.ended()?0:this.player_.remainingTimeDisplay?this.player_.remainingTimeDisplay():this.player_.remainingTime(),this.updateTextNode_(t))},t}(on);dn.prototype.labelText_="Remaining Time",dn.prototype.controlText_="Remaining Time",zt.registerComponent("RemainingTimeDisplay",dn);var hn=function(e){function t(t,i){var n;return(n=e.call(this,t,i)||this).updateShowing(),n.on(n.player(),"durationchange",(function(e){return n.updateShowing(e)})),n}(0,h.default)(t,e);var i=t.prototype;return i.createEl=function(){var t=e.prototype.createEl.call(this,"div",{className:"vjs-live-control vjs-control"});return this.contentEl_=Ee("div",{className:"vjs-live-display"},{"aria-live":"off"}),this.contentEl_.appendChild(Ee("span",{className:"vjs-control-text",textContent:this.localize("Stream Type")+" "})),this.contentEl_.appendChild(o().createTextNode(this.localize("LIVE"))),t.appendChild(this.contentEl_),t},i.dispose=function(){this.contentEl_=null,e.prototype.dispose.call(this)},i.updateShowing=function(e){this.player().duration()===1/0?this.show():this.hide()},t}(zt);zt.registerComponent("LiveDisplay",hn);var pn=function(e){function t(t,i){var n;return(n=e.call(this,t,i)||this).updateLiveEdgeStatus(),n.player_.liveTracker&&(n.updateLiveEdgeStatusHandler_=function(e){return n.updateLiveEdgeStatus(e)},n.on(n.player_.liveTracker,"liveedgechange",n.updateLiveEdgeStatusHandler_)),n}(0,h.default)(t,e);var i=t.prototype;return i.createEl=function(){var t=e.prototype.createEl.call(this,"button",{className:"vjs-seek-to-live-control vjs-control"});return this.textEl_=Ee("span",{className:"vjs-seek-to-live-text",textContent:this.localize("LIVE")},{"aria-hidden":"true"}),t.appendChild(this.textEl_),t},i.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"))},i.handleClick=function(){this.player_.liveTracker.seekToLiveEdge()},i.dispose=function(){this.player_.liveTracker&&this.off(this.player_.liveTracker,"liveedgechange",this.updateLiveEdgeStatusHandler_),this.textEl_=null,e.prototype.dispose.call(this)},t}(Zi);pn.prototype.controlText_="Seek to live, currently playing live",zt.registerComponent("SeekToLive",pn);var fn=function(e,t,i){return e=Number(e),Math.min(i,Math.max(t,isNaN(e)?t:e))},mn=function(e){function t(t,i){var n;return(n=e.call(this,t,i)||this).handleMouseDown_=function(e){return n.handleMouseDown(e)},n.handleMouseUp_=function(e){return n.handleMouseUp(e)},n.handleKeyDown_=function(e){return n.handleKeyDown(e)},n.handleClick_=function(e){return n.handleClick(e)},n.handleMouseMove_=function(e){return n.handleMouseMove(e)},n.update_=function(e){return n.update(e)},n.bar=n.getChild(n.options_.barName),n.vertical(!!n.options_.vertical),n.enable(),n}(0,h.default)(t,e);var i=t.prototype;return i.enabled=function(){return this.enabled_},i.enable=function(){this.enabled()||(this.on("mousedown",this.handleMouseDown_),this.on("touchstart",this.handleMouseDown_),this.on("keydown",this.handleKeyDown_),this.on("click",this.handleClick_),this.on(this.player_,"controlsvisible",this.update),this.playerEvent&&this.on(this.player_,this.playerEvent,this.update),this.removeClass("disabled"),this.setAttribute("tabindex",0),this.enabled_=!0)},i.disable=function(){if(this.enabled()){var e=this.bar.el_.ownerDocument;this.off("mousedown",this.handleMouseDown_),this.off("touchstart",this.handleMouseDown_),this.off("keydown",this.handleKeyDown_),this.off("click",this.handleClick_),this.off(this.player_,"controlsvisible",this.update_),this.off(e,"mousemove",this.handleMouseMove_),this.off(e,"mouseup",this.handleMouseUp_),this.off(e,"touchmove",this.handleMouseMove_),this.off(e,"touchend",this.handleMouseUp_),this.removeAttribute("tabindex"),this.addClass("disabled"),this.playerEvent&&this.off(this.player_,this.playerEvent,this.update),this.enabled_=!1}},i.createEl=function(t,i,n){return void 0===i&&(i={}),void 0===n&&(n={}),i.className=i.className+" vjs-slider",i=X({tabIndex:0},i),n=X({role:"slider","aria-valuenow":0,"aria-valuemin":0,"aria-valuemax":100,tabIndex:0},n),e.prototype.createEl.call(this,t,i,n)},i.handleMouseDown=function(e){var t=this.bar.el_.ownerDocument;"mousedown"===e.type&&e.preventDefault(),"touchstart"!==e.type||le||e.preventDefault(),Ue(),this.addClass("vjs-sliding"),this.trigger("slideractive"),this.on(t,"mousemove",this.handleMouseMove_),this.on(t,"mouseup",this.handleMouseUp_),this.on(t,"touchmove",this.handleMouseMove_),this.on(t,"touchend",this.handleMouseUp_),this.handleMouseMove(e,!0)},i.handleMouseMove=function(e){},i.handleMouseUp=function(){var e=this.bar.el_.ownerDocument;Be(),this.removeClass("vjs-sliding"),this.trigger("sliderinactive"),this.off(e,"mousemove",this.handleMouseMove_),this.off(e,"mouseup",this.handleMouseUp_),this.off(e,"touchmove",this.handleMouseMove_),this.off(e,"touchend",this.handleMouseUp_),this.update()},i.update=function(){var e=this;if(this.el_&&this.bar){var t=this.getProgress();return t===this.progress_||(this.progress_=t,this.requestNamedAnimationFrame("Slider#update",(function(){var i=e.vertical()?"height":"width";e.bar.el().style[i]=(100*t).toFixed(2)+"%"}))),t}},i.getProgress=function(){return Number(fn(this.getPercent(),0,1).toFixed(4))},i.calculateDistance=function(e){var t=He(this.el_,e);return this.vertical()?t.y:t.x},i.handleKeyDown=function(t){c().isEventKey(t,"Left")||c().isEventKey(t,"Down")?(t.preventDefault(),t.stopPropagation(),this.stepBack()):c().isEventKey(t,"Right")||c().isEventKey(t,"Up")?(t.preventDefault(),t.stopPropagation(),this.stepForward()):e.prototype.handleKeyDown.call(this,t)},i.handleClick=function(e){e.stopPropagation(),e.preventDefault()},i.vertical=function(e){if(void 0===e)return this.vertical_||!1;this.vertical_=!!e,this.vertical_?this.addClass("vjs-slider-vertical"):this.addClass("vjs-slider-horizontal")},t}(zt);zt.registerComponent("Slider",mn);var gn=function(e,t){return fn(e/t*100,0,100).toFixed(2)+"%"},vn=function(e){function t(t,i){var n;return(n=e.call(this,t,i)||this).partEls_=[],n.on(t,"progress",(function(e){return n.update(e)})),n}(0,h.default)(t,e);var i=t.prototype;return i.createEl=function(){var t=e.prototype.createEl.call(this,"div",{className:"vjs-load-progress"}),i=Ee("span",{className:"vjs-control-text"}),n=Ee("span",{textContent:this.localize("Loaded")}),r=o().createTextNode(": ");return this.percentageEl_=Ee("span",{className:"vjs-control-text-loaded-percentage",textContent:"0%"}),t.appendChild(i),i.appendChild(n),i.appendChild(r),i.appendChild(this.percentageEl_),t},i.dispose=function(){this.partEls_=null,this.percentageEl_=null,e.prototype.dispose.call(this)},i.update=function(e){var t=this;this.requestNamedAnimationFrame("LoadProgressBar#update",(function(){var e=t.player_.liveTracker,i=t.player_.buffered(),n=e&&e.isLive()?e.seekableEnd():t.player_.duration(),r=t.player_.bufferedEnd(),s=t.partEls_,a=gn(r,n);t.percent_!==a&&(t.el_.style.width=a,Ce(t.percentageEl_,a),t.percent_=a);for(var o=0;o<i.length;o++){var l=i.start(o),u=i.end(o),c=s[o];c||(c=t.el_.appendChild(Ee()),s[o]=c),c.dataset.start===l&&c.dataset.end===u||(c.dataset.start=l,c.dataset.end=u,c.style.left=gn(l,r),c.style.width=gn(u-l,r))}for(var d=s.length;d>i.length;d--)t.el_.removeChild(s[d-1]);s.length=i.length}))},t}(zt);zt.registerComponent("LoadProgressBar",vn);var yn=function(e){function t(t,i){var n;return(n=e.call(this,t,i)||this).update=wt(Tt((0,d.default)(n),n.update),bt),n}(0,h.default)(t,e);var i=t.prototype;return i.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-time-tooltip"},{"aria-hidden":"true"})},i.update=function(e,t,i){var n=Fe(this.el_),r=je(this.player_.el()),s=e.width*t;if(r&&n){var a=e.left-r.left+s,o=e.width-s+(r.right-e.right),l=n.width/2;a<l?l+=l-a:o<l&&(l=o),l<0?l=0:l>n.width&&(l=n.width),l=Math.round(l),this.el_.style.right="-"+l+"px",this.write(i)}},i.write=function(e){Ce(this.el_,e)},i.updateTime=function(e,t,i,n){var r=this;this.requestNamedAnimationFrame("TimeTooltip#updateTime",(function(){var s,a=r.player_.duration();if(r.player_.liveTracker&&r.player_.liveTracker.isLive()){var o=r.player_.liveTracker.liveWindow(),l=o-t*o;s=(l<1?"":"-")+an(l,o)}else s=an(i,a);r.update(e,t,s),n&&n()}))},t}(zt);zt.registerComponent("TimeTooltip",yn);var _n=function(e){function t(t,i){var n;return(n=e.call(this,t,i)||this).update=wt(Tt((0,d.default)(n),n.update),bt),n}(0,h.default)(t,e);var i=t.prototype;return i.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-play-progress vjs-slider-bar"},{"aria-hidden":"true"})},i.update=function(e,t){var i=this.getChild("timeTooltip");if(i){var n=this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime();i.updateTime(e,t,n)}},t}(zt);_n.prototype.options_={children:[]},ge||ne||_n.prototype.options_.children.push("timeTooltip"),zt.registerComponent("PlayProgressBar",_n);var bn=function(e){function t(t,i){var n;return(n=e.call(this,t,i)||this).update=wt(Tt((0,d.default)(n),n.update),bt),n}(0,h.default)(t,e);var i=t.prototype;return i.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-mouse-display"})},i.update=function(e,t){var i=this,n=t*this.player_.duration();this.getChild("timeTooltip").updateTime(e,t,n,(function(){i.el_.style.left=e.width*t+"px"}))},t}(zt);bn.prototype.options_={children:["timeTooltip"]},zt.registerComponent("MouseTimeDisplay",bn);var Tn=function(e){function t(t,i){var n;return(n=e.call(this,t,i)||this).setEventHandlers_(),n}(0,h.default)(t,e);var i=t.prototype;return i.setEventHandlers_=function(){var e=this;this.update_=Tt(this,this.update),this.update=wt(this.update_,bt),this.on(this.player_,["ended","durationchange","timeupdate"],this.update),this.player_.liveTracker&&this.on(this.player_.liveTracker,"liveedgechange",this.update),this.updateInterval=null,this.enableIntervalHandler_=function(t){return e.enableInterval_(t)},this.disableIntervalHandler_=function(t){return e.disableInterval_(t)},this.on(this.player_,["playing"],this.enableIntervalHandler_),this.on(this.player_,["ended","pause","waiting"],this.disableIntervalHandler_),"hidden" in o()&&"visibilityState" in o()&&this.on(o(),"visibilitychange",this.toggleVisibility_)},i.toggleVisibility_=function(e){"hidden"===o().visibilityState?(this.cancelNamedAnimationFrame("SeekBar#update"),this.cancelNamedAnimationFrame("Slider#update"),this.disableInterval_(e)):(this.player_.ended()||this.player_.paused()||this.enableInterval_(),this.update())},i.enableInterval_=function(){this.updateInterval||(this.updateInterval=this.setInterval(this.update,bt))},i.disableInterval_=function(e){this.player_.liveTracker&&this.player_.liveTracker.isLive()&&e&&"ended"!==e.type||this.updateInterval&&(this.clearInterval(this.updateInterval),this.updateInterval=null)},i.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-progress-holder"},{"aria-label":this.localize("Progress Bar")})},i.update=function(t){var i=this;if("hidden"!==o().visibilityState){var n=e.prototype.update.call(this);return this.requestNamedAnimationFrame("SeekBar#update",(function(){var e=i.player_.ended()?i.player_.duration():i.getCurrentTime_(),t=i.player_.liveTracker,r=i.player_.duration();t&&t.isLive()&&(r=i.player_.liveTracker.liveCurrentTime()),i.percent_!==n&&(i.el_.setAttribute("aria-valuenow",(100*n).toFixed(2)),i.percent_=n),i.currentTime_===e&&i.duration_===r||(i.el_.setAttribute("aria-valuetext",i.localize("progress bar timing: currentTime={1} duration={2}",[an(e,r),an(r,r)],"{1} of {2}")),i.currentTime_=e,i.duration_=r),i.bar&&i.bar.update(je(i.el()),i.getProgress())})),n}},i.userSeek_=function(e){this.player_.liveTracker&&this.player_.liveTracker.isLive()&&this.player_.liveTracker.nextSeekedFromUser(),this.player_.currentTime(e)},i.getCurrentTime_=function(){return this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime()},i.getPercent=function(){var e,t=this.getCurrentTime_(),i=this.player_.liveTracker;return i&&i.isLive()?(e=(t-i.seekableStart())/i.liveWindow(),i.atLiveEdge()&&(e=1)):e=t/this.player_.duration(),e},i.handleMouseDown=function(t){Xe(t)&&(t.stopPropagation(),this.videoWasPlaying=!this.player_.paused(),this.player_.pause(),e.prototype.handleMouseDown.call(this,t))},i.handleMouseMove=function(e,t){if(void 0===t&&(t=!1),Xe(e)){var i;t||this.player_.scrubbing()||this.player_.scrubbing(!0);var n=this.calculateDistance(e),r=this.player_.liveTracker;if(r&&r.isLive()){if(n>=.99)return void r.seekToLiveEdge();var s=r.seekableStart(),a=r.liveCurrentTime();if((i=s+n*r.liveWindow())>=a&&(i=a),i<=s&&(i=s+.1),i===1/0)return}else(i=n*this.player_.duration())===this.player_.duration()&&(i-=.1);this.userSeek_(i)}},i.enable=function(){e.prototype.enable.call(this);var t=this.getChild("mouseTimeDisplay");t&&t.show()},i.disable=function(){e.prototype.disable.call(this);var t=this.getChild("mouseTimeDisplay");t&&t.hide()},i.handleMouseUp=function(t){e.prototype.handleMouseUp.call(this,t),t&&t.stopPropagation(),this.player_.scrubbing(!1),this.player_.trigger({type:"timeupdate",target:this,manuallyTriggered:!0}),this.videoWasPlaying?Qt(this.player_.play()):this.update_()},i.stepForward=function(){this.userSeek_(this.player_.currentTime()+5)},i.stepBack=function(){this.userSeek_(this.player_.currentTime()-5)},i.handleAction=function(e){this.player_.paused()?this.player_.play():this.player_.pause()},i.handleKeyDown=function(t){var i=this.player_.liveTracker;if(c().isEventKey(t,"Space")||c().isEventKey(t,"Enter"))t.preventDefault(),t.stopPropagation(),this.handleAction(t);else if(c().isEventKey(t,"Home"))t.preventDefault(),t.stopPropagation(),this.userSeek_(0);else if(c().isEventKey(t,"End"))t.preventDefault(),t.stopPropagation(),i&&i.isLive()?this.userSeek_(i.liveCurrentTime()):this.userSeek_(this.player_.duration());else if(/^[0-9]$/.test(c()(t))){t.preventDefault(),t.stopPropagation();var n=10*(c().codes[c()(t)]-c().codes[0])/100;i&&i.isLive()?this.userSeek_(i.seekableStart()+i.liveWindow()*n):this.userSeek_(this.player_.duration()*n)}else c().isEventKey(t,"PgDn")?(t.preventDefault(),t.stopPropagation(),this.userSeek_(this.player_.currentTime()-60)):c().isEventKey(t,"PgUp")?(t.preventDefault(),t.stopPropagation(),this.userSeek_(this.player_.currentTime()+60)):e.prototype.handleKeyDown.call(this,t)},i.dispose=function(){this.disableInterval_(),this.off(this.player_,["ended","durationchange","timeupdate"],this.update),this.player_.liveTracker&&this.off(this.player_.liveTracker,"liveedgechange",this.update),this.off(this.player_,["playing"],this.enableIntervalHandler_),this.off(this.player_,["ended","pause","waiting"],this.disableIntervalHandler_),"hidden" in o()&&"visibilityState" in o()&&this.off(o(),"visibilitychange",this.toggleVisibility_),e.prototype.dispose.call(this)},t}(mn);Tn.prototype.options_={children:["loadProgressBar","playProgressBar"],barName:"playProgressBar"},ge||ne||Tn.prototype.options_.children.splice(1,0,"mouseTimeDisplay"),zt.registerComponent("SeekBar",Tn);var wn=function(e){function t(t,i){var n;return(n=e.call(this,t,i)||this).handleMouseMove=wt(Tt((0,d.default)(n),n.handleMouseMove),bt),n.throttledHandleMouseSeek=wt(Tt((0,d.default)(n),n.handleMouseSeek),bt),n.handleMouseUpHandler_=function(e){return n.handleMouseUp(e)},n.handleMouseDownHandler_=function(e){return n.handleMouseDown(e)},n.enable(),n}(0,h.default)(t,e);var i=t.prototype;return i.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-progress-control vjs-control"})},i.handleMouseMove=function(e){var t=this.getChild("seekBar");if(t){var i=t.getChild("playProgressBar"),n=t.getChild("mouseTimeDisplay");if(i||n){var r=t.el(),s=Fe(r),a=He(r,e).x;a=fn(a,0,1),n&&n.update(s,a),i&&i.update(s,t.getProgress())}}},i.handleMouseSeek=function(e){var t=this.getChild("seekBar");t&&t.handleMouseMove(e)},i.enabled=function(){return this.enabled_},i.disable=function(){if(this.children().forEach((function(e){return e.disable&&e.disable()})),this.enabled()&&(this.off(["mousedown","touchstart"],this.handleMouseDownHandler_),this.off(this.el_,"mousemove",this.handleMouseMove),this.removeListenersAddedOnMousedownAndTouchstart(),this.addClass("disabled"),this.enabled_=!1,this.player_.scrubbing())){var e=this.getChild("seekBar");this.player_.scrubbing(!1),e.videoWasPlaying&&Qt(this.player_.play())}},i.enable=function(){this.children().forEach((function(e){return e.enable&&e.enable()})),this.enabled()||(this.on(["mousedown","touchstart"],this.handleMouseDownHandler_),this.on(this.el_,"mousemove",this.handleMouseMove),this.removeClass("disabled"),this.enabled_=!0)},i.removeListenersAddedOnMousedownAndTouchstart=function(){var e=this.el_.ownerDocument;this.off(e,"mousemove",this.throttledHandleMouseSeek),this.off(e,"touchmove",this.throttledHandleMouseSeek),this.off(e,"mouseup",this.handleMouseUpHandler_),this.off(e,"touchend",this.handleMouseUpHandler_)},i.handleMouseDown=function(e){var t=this.el_.ownerDocument,i=this.getChild("seekBar");i&&i.handleMouseDown(e),this.on(t,"mousemove",this.throttledHandleMouseSeek),this.on(t,"touchmove",this.throttledHandleMouseSeek),this.on(t,"mouseup",this.handleMouseUpHandler_),this.on(t,"touchend",this.handleMouseUpHandler_)},i.handleMouseUp=function(e){var t=this.getChild("seekBar");t&&t.handleMouseUp(e),this.removeListenersAddedOnMousedownAndTouchstart()},t}(zt);wn.prototype.options_={children:["seekBar"]},zt.registerComponent("ProgressControl",wn);var Sn=function(e){function t(t,i){var n;return(n=e.call(this,t,i)||this).on(t,["enterpictureinpicture","leavepictureinpicture"],(function(e){return n.handlePictureInPictureChange(e)})),n.on(t,["disablepictureinpicturechanged","loadedmetadata"],(function(e){return n.handlePictureInPictureEnabledChange(e)})),n.disable(),n}(0,h.default)(t,e);var i=t.prototype;return i.buildCSSClass=function(){return"vjs-picture-in-picture-control "+e.prototype.buildCSSClass.call(this)},i.handlePictureInPictureEnabledChange=function(){o().pictureInPictureEnabled&&!1===this.player_.disablePictureInPicture()?this.enable():this.disable()},i.handlePictureInPictureChange=function(e){this.player_.isInPictureInPicture()?this.controlText("Exit Picture-in-Picture"):this.controlText("Picture-in-Picture"),this.handlePictureInPictureEnabledChange()},i.handleClick=function(e){this.player_.isInPictureInPicture()?this.player_.exitPictureInPicture():this.player_.requestPictureInPicture()},t}(Zi);Sn.prototype.controlText_="Picture-in-Picture",zt.registerComponent("PictureInPictureToggle",Sn);var kn=function(e){function t(t,i){var n;return(n=e.call(this,t,i)||this).on(t,"fullscreenchange",(function(e){return n.handleFullscreenChange(e)})),!1===o()[t.fsApi_.fullscreenEnabled]&&n.disable(),n}(0,h.default)(t,e);var i=t.prototype;return i.buildCSSClass=function(){return"vjs-fullscreen-control "+e.prototype.buildCSSClass.call(this)},i.handleFullscreenChange=function(e){this.player_.isFullscreen()?this.controlText("Non-Fullscreen"):this.controlText("Fullscreen")},i.handleClick=function(e){this.player_.isFullscreen()?this.player_.exitFullscreen():this.player_.requestFullscreen()},t}(Zi);kn.prototype.controlText_="Fullscreen",zt.registerComponent("FullscreenToggle",kn);var En=function(e){function t(){return e.apply(this,arguments)||this}return(0,h.default)(t,e),t.prototype.createEl=function(){var t=e.prototype.createEl.call(this,"div",{className:"vjs-volume-level"});return t.appendChild(e.prototype.createEl.call(this,"span",{className:"vjs-control-text"})),t},t}(zt);zt.registerComponent("VolumeLevel",En);var Cn=function(e){function t(t,i){var n;return(n=e.call(this,t,i)||this).update=wt(Tt((0,d.default)(n),n.update),bt),n}(0,h.default)(t,e);var i=t.prototype;return i.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-volume-tooltip"},{"aria-hidden":"true"})},i.update=function(e,t,i,n){if(!i){var r=je(this.el_),s=je(this.player_.el()),a=e.width*t;if(!s||!r)return;var o=e.left-s.left+a,l=e.width-a+(s.right-e.right),u=r.width/2;o<u?u+=u-o:l<u&&(u=l),u<0?u=0:u>r.width&&(u=r.width),this.el_.style.right="-"+u+"px"}this.write(n+"%")},i.write=function(e){Ce(this.el_,e)},i.updateVolume=function(e,t,i,n,r){var s=this;this.requestNamedAnimationFrame("VolumeLevelTooltip#updateVolume",(function(){s.update(e,t,i,n.toFixed(0)),r&&r()}))},t}(zt);zt.registerComponent("VolumeLevelTooltip",Cn);var xn=function(e){function t(t,i){var n;return(n=e.call(this,t,i)||this).update=wt(Tt((0,d.default)(n),n.update),bt),n}(0,h.default)(t,e);var i=t.prototype;return i.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-mouse-display"})},i.update=function(e,t,i){var n=this,r=100*t;this.getChild("volumeLevelTooltip").updateVolume(e,t,i,r,(function(){i?n.el_.style.bottom=e.height*t+"px":n.el_.style.left=e.width*t+"px"}))},t}(zt);xn.prototype.options_={children:["volumeLevelTooltip"]},zt.registerComponent("MouseVolumeLevelDisplay",xn);var An=function(e){function t(t,i){var n;return(n=e.call(this,t,i)||this).on("slideractive",(function(e){return n.updateLastVolume_(e)})),n.on(t,"volumechange",(function(e){return n.updateARIAAttributes(e)})),t.ready((function(){return n.updateARIAAttributes()})),n}(0,h.default)(t,e);var i=t.prototype;return i.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-volume-bar vjs-slider-bar"},{"aria-label":this.localize("Volume Level"),"aria-live":"polite"})},i.handleMouseDown=function(t){Xe(t)&&e.prototype.handleMouseDown.call(this,t)},i.handleMouseMove=function(e){var t=this.getChild("mouseVolumeLevelDisplay");if(t){var i=this.el(),n=je(i),r=this.vertical(),s=He(i,e);s=r?s.y:s.x,s=fn(s,0,1),t.update(n,s,r)}Xe(e)&&(this.checkMuted(),this.player_.volume(this.calculateDistance(e)))},i.checkMuted=function(){this.player_.muted()&&this.player_.muted(!1)},i.getPercent=function(){return this.player_.muted()?0:this.player_.volume()},i.stepForward=function(){this.checkMuted(),this.player_.volume(this.player_.volume()+.1)},i.stepBack=function(){this.checkMuted(),this.player_.volume(this.player_.volume()-.1)},i.updateARIAAttributes=function(e){var t=this.player_.muted()?0:this.volumeAsPercentage_();this.el_.setAttribute("aria-valuenow",t),this.el_.setAttribute("aria-valuetext",t+"%")},i.volumeAsPercentage_=function(){return Math.round(100*this.player_.volume())},i.updateLastVolume_=function(){var e=this,t=this.player_.volume();this.one("sliderinactive",(function(){0===e.player_.volume()&&e.player_.lastVolume_(t)}))},t}(mn);An.prototype.options_={children:["volumeLevel"],barName:"volumeLevel"},ge||ne||An.prototype.options_.children.splice(0,0,"mouseVolumeLevelDisplay"),An.prototype.playerEvent="volumechange",zt.registerComponent("VolumeBar",An);var Pn=function(e){function t(t,i){var n;return void 0===i&&(i={}),i.vertical=i.vertical||!1,(void 0===i.volumeBar||Y(i.volumeBar))&&(i.volumeBar=i.volumeBar||{},i.volumeBar.vertical=i.vertical),n=e.call(this,t,i)||this,function(e,t){t.tech_&&!t.tech_.featuresVolumeControl&&e.addClass("vjs-hidden"),e.on(t,"loadstart",(function(){t.tech_.featuresVolumeControl?e.removeClass("vjs-hidden"):e.addClass("vjs-hidden")}))}((0,d.default)(n),t),n.throttledHandleMouseMove=wt(Tt((0,d.default)(n),n.handleMouseMove),bt),n.handleMouseUpHandler_=function(e){return n.handleMouseUp(e)},n.on("mousedown",(function(e){return n.handleMouseDown(e)})),n.on("touchstart",(function(e){return n.handleMouseDown(e)})),n.on("mousemove",(function(e){return n.handleMouseMove(e)})),n.on(n.volumeBar,["focus","slideractive"],(function(){n.volumeBar.addClass("vjs-slider-active"),n.addClass("vjs-slider-active"),n.trigger("slideractive")})),n.on(n.volumeBar,["blur","sliderinactive"],(function(){n.volumeBar.removeClass("vjs-slider-active"),n.removeClass("vjs-slider-active"),n.trigger("sliderinactive")})),n}(0,h.default)(t,e);var i=t.prototype;return i.createEl=function(){var t="vjs-volume-horizontal";return this.options_.vertical&&(t="vjs-volume-vertical"),e.prototype.createEl.call(this,"div",{className:"vjs-volume-control vjs-control "+t})},i.handleMouseDown=function(e){var t=this.el_.ownerDocument;this.on(t,"mousemove",this.throttledHandleMouseMove),this.on(t,"touchmove",this.throttledHandleMouseMove),this.on(t,"mouseup",this.handleMouseUpHandler_),this.on(t,"touchend",this.handleMouseUpHandler_)},i.handleMouseUp=function(e){var t=this.el_.ownerDocument;this.off(t,"mousemove",this.throttledHandleMouseMove),this.off(t,"touchmove",this.throttledHandleMouseMove),this.off(t,"mouseup",this.handleMouseUpHandler_),this.off(t,"touchend",this.handleMouseUpHandler_)},i.handleMouseMove=function(e){this.volumeBar.handleMouseMove(e)},t}(zt);Pn.prototype.options_={children:["volumeBar"]},zt.registerComponent("VolumeControl",Pn);var In=function(e){function t(t,i){var n;return n=e.call(this,t,i)||this,function(e,t){t.tech_&&!t.tech_.featuresMuteControl&&e.addClass("vjs-hidden"),e.on(t,"loadstart",(function(){t.tech_.featuresMuteControl?e.removeClass("vjs-hidden"):e.addClass("vjs-hidden")}))}((0,d.default)(n),t),n.on(t,["loadstart","volumechange"],(function(e){return n.update(e)})),n}(0,h.default)(t,e);var i=t.prototype;return i.buildCSSClass=function(){return"vjs-mute-control "+e.prototype.buildCSSClass.call(this)},i.handleClick=function(e){var t=this.player_.volume(),i=this.player_.lastVolume_();if(0===t){var n=i<.1?.1:i;this.player_.volume(n),this.player_.muted(!1)}else this.player_.muted(!this.player_.muted())},i.update=function(e){this.updateIcon_(),this.updateControlText_()},i.updateIcon_=function(){var e=this.player_.volume(),t=3;ge&&this.player_.tech_&&this.player_.tech_.el_&&this.player_.muted(this.player_.tech_.el_.muted),0===e||this.player_.muted()?t=0:e<.33?t=1:e<.67&&(t=2);for(var i=0;i<4;i++)Ie(this.el_,"vjs-vol-"+i);Pe(this.el_,"vjs-vol-"+t)},i.updateControlText_=function(){var e=this.player_.muted()||0===this.player_.volume()?"Unmute":"Mute";this.controlText()!==e&&this.controlText(e)},t}(Zi);In.prototype.controlText_="Mute",zt.registerComponent("MuteToggle",In);var On=function(e){function t(t,i){var n;return void 0===i&&(i={}),void 0!==i.inline?i.inline=i.inline:i.inline=!0,(void 0===i.volumeControl||Y(i.volumeControl))&&(i.volumeControl=i.volumeControl||{},i.volumeControl.vertical=!i.inline),(n=e.call(this,t,i)||this).handleKeyPressHandler_=function(e){return n.handleKeyPress(e)},n.on(t,["loadstart"],(function(e){return n.volumePanelState_(e)})),n.on(n.muteToggle,"keyup",(function(e){return n.handleKeyPress(e)})),n.on(n.volumeControl,"keyup",(function(e){return n.handleVolumeControlKeyUp(e)})),n.on("keydown",(function(e){return n.handleKeyPress(e)})),n.on("mouseover",(function(e){return n.handleMouseOver(e)})),n.on("mouseout",(function(e){return n.handleMouseOut(e)})),n.on(n.volumeControl,["slideractive"],n.sliderActive_),n.on(n.volumeControl,["sliderinactive"],n.sliderInactive_),n}(0,h.default)(t,e);var i=t.prototype;return i.sliderActive_=function(){this.addClass("vjs-slider-active")},i.sliderInactive_=function(){this.removeClass("vjs-slider-active")},i.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")},i.createEl=function(){var t="vjs-volume-panel-horizontal";return this.options_.inline||(t="vjs-volume-panel-vertical"),e.prototype.createEl.call(this,"div",{className:"vjs-volume-panel vjs-control "+t})},i.dispose=function(){this.handleMouseOut(),e.prototype.dispose.call(this)},i.handleVolumeControlKeyUp=function(e){c().isEventKey(e,"Esc")&&this.muteToggle.focus()},i.handleMouseOver=function(e){this.addClass("vjs-hover"),pt(o(),"keyup",this.handleKeyPressHandler_)},i.handleMouseOut=function(e){this.removeClass("vjs-hover"),ft(o(),"keyup",this.handleKeyPressHandler_)},i.handleKeyPress=function(e){c().isEventKey(e,"Esc")&&this.handleMouseOut()},t}(zt);On.prototype.options_={children:["muteToggle","volumeControl"]},zt.registerComponent("VolumePanel",On);var Ln=function(e){function t(t,i){var n;return n=e.call(this,t,i)||this,i&&(n.menuButton_=i.menuButton),n.focusedChild_=-1,n.on("keydown",(function(e){return n.handleKeyDown(e)})),n.boundHandleBlur_=function(e){return n.handleBlur(e)},n.boundHandleTapClick_=function(e){return n.handleTapClick(e)},n}(0,h.default)(t,e);var i=t.prototype;return i.addEventListenerForItem=function(e){e instanceof zt&&(this.on(e,"blur",this.boundHandleBlur_),this.on(e,["tap","click"],this.boundHandleTapClick_))},i.removeEventListenerForItem=function(e){e instanceof zt&&(this.off(e,"blur",this.boundHandleBlur_),this.off(e,["tap","click"],this.boundHandleTapClick_))},i.removeChild=function(t){"string"==typeof t&&(t=this.getChild(t)),this.removeEventListenerForItem(t),e.prototype.removeChild.call(this,t)},i.addItem=function(e){var t=this.addChild(e);t&&this.addEventListenerForItem(t)},i.createEl=function(){var t=this.options_.contentElType||"ul";this.contentEl_=Ee(t,{className:"vjs-menu-content"}),this.contentEl_.setAttribute("role","menu");var i=e.prototype.createEl.call(this,"div",{append:this.contentEl_,className:"vjs-menu"});return i.appendChild(this.contentEl_),pt(i,"click",(function(e){e.preventDefault(),e.stopImmediatePropagation()})),i},i.dispose=function(){this.contentEl_=null,this.boundHandleBlur_=null,this.boundHandleTapClick_=null,e.prototype.dispose.call(this)},i.handleBlur=function(e){var t=e.relatedTarget||o().activeElement;if(!this.children().some((function(e){return e.el()===t}))){var i=this.menuButton_;i&&i.buttonPressed_&&t!==i.el().firstChild&&i.unpressButton()}},i.handleTapClick=function(e){if(this.menuButton_){this.menuButton_.unpressButton();var t=this.children();if(!Array.isArray(t))return;var i=t.filter((function(t){return t.el()===e.target}))[0];if(!i)return;"CaptionSettingsMenuItem"!==i.name()&&this.menuButton_.focus()}},i.handleKeyDown=function(e){c().isEventKey(e,"Left")||c().isEventKey(e,"Down")?(e.preventDefault(),e.stopPropagation(),this.stepForward()):(c().isEventKey(e,"Right")||c().isEventKey(e,"Up"))&&(e.preventDefault(),e.stopPropagation(),this.stepBack())},i.stepForward=function(){var e=0;void 0!==this.focusedChild_&&(e=this.focusedChild_+1),this.focus(e)},i.stepBack=function(){var e=0;void 0!==this.focusedChild_&&(e=this.focusedChild_-1),this.focus(e)},i.focus=function(e){void 0===e&&(e=0);var t=this.children().slice();t.length&&t[0].hasClass("vjs-menu-title")&&t.shift(),t.length>0&&(e<0?e=0:e>=t.length&&(e=t.length-1),this.focusedChild_=e,t[e].el_.focus())},t}(zt);zt.registerComponent("Menu",Ln);var Dn=function(e){function t(t,i){var n;void 0===i&&(i={}),(n=e.call(this,t,i)||this).menuButton_=new Zi(t,i),n.menuButton_.controlText(n.controlText_),n.menuButton_.el_.setAttribute("aria-haspopup","true");var r=Zi.prototype.buildCSSClass();n.menuButton_.el_.className=n.buildCSSClass()+" "+r,n.menuButton_.removeClass("vjs-control"),n.addChild(n.menuButton_),n.update(),n.enabled_=!0;var s=function(e){return n.handleClick(e)};return n.handleMenuKeyUp_=function(e){return n.handleMenuKeyUp(e)},n.on(n.menuButton_,"tap",s),n.on(n.menuButton_,"click",s),n.on(n.menuButton_,"keydown",(function(e){return n.handleKeyDown(e)})),n.on(n.menuButton_,"mouseenter",(function(){n.addClass("vjs-hover"),n.menu.show(),pt(o(),"keyup",n.handleMenuKeyUp_)})),n.on("mouseleave",(function(e){return n.handleMouseLeave(e)})),n.on("keydown",(function(e){return n.handleSubmenuKeyDown(e)})),n}(0,h.default)(t,e);var i=t.prototype;return i.update=function(){var e=this.createMenu();this.menu&&(this.menu.dispose(),this.removeChild(this.menu)),this.menu=e,this.addChild(e),this.buttonPressed_=!1,this.menuButton_.el_.setAttribute("aria-expanded","false"),this.items&&this.items.length<=this.hideThreshold_?this.hide():this.show()},i.createMenu=function(){var e=new Ln(this.player_,{menuButton:this});if(this.hideThreshold_=0,this.options_.title){var t=Ee("li",{className:"vjs-menu-title",textContent:Ut(this.options_.title),tabIndex:-1}),i=new zt(this.player_,{el:t});e.addItem(i)}if(this.items=this.createItems(),this.items)for(var n=0;n<this.items.length;n++)e.addItem(this.items[n]);return e},i.createItems=function(){},i.createEl=function(){return e.prototype.createEl.call(this,"div",{className:this.buildWrapperCSSClass()},{})},i.buildWrapperCSSClass=function(){var t="vjs-menu-button";return!0===this.options_.inline?t+="-inline":t+="-popup","vjs-menu-button "+t+" "+Zi.prototype.buildCSSClass()+" "+e.prototype.buildCSSClass.call(this)},i.buildCSSClass=function(){var t="vjs-menu-button";return!0===this.options_.inline?t+="-inline":t+="-popup","vjs-menu-button "+t+" "+e.prototype.buildCSSClass.call(this)},i.controlText=function(e,t){return void 0===t&&(t=this.menuButton_.el()),this.menuButton_.controlText(e,t)},i.dispose=function(){this.handleMouseLeave(),e.prototype.dispose.call(this)},i.handleClick=function(e){this.buttonPressed_?this.unpressButton():this.pressButton()},i.handleMouseLeave=function(e){this.removeClass("vjs-hover"),ft(o(),"keyup",this.handleMenuKeyUp_)},i.focus=function(){this.menuButton_.focus()},i.blur=function(){this.menuButton_.blur()},i.handleKeyDown=function(e){c().isEventKey(e,"Esc")||c().isEventKey(e,"Tab")?(this.buttonPressed_&&this.unpressButton(),c().isEventKey(e,"Tab")||(e.preventDefault(),this.menuButton_.focus())):(c().isEventKey(e,"Up")||c().isEventKey(e,"Down"))&&(this.buttonPressed_||(e.preventDefault(),this.pressButton()))},i.handleMenuKeyUp=function(e){(c().isEventKey(e,"Esc")||c().isEventKey(e,"Tab"))&&this.removeClass("vjs-hover")},i.handleSubmenuKeyPress=function(e){this.handleSubmenuKeyDown(e)},i.handleSubmenuKeyDown=function(e){(c().isEventKey(e,"Esc")||c().isEventKey(e,"Tab"))&&(this.buttonPressed_&&this.unpressButton(),c().isEventKey(e,"Tab")||(e.preventDefault(),this.menuButton_.focus()))},i.pressButton=function(){if(this.enabled_){if(this.buttonPressed_=!0,this.menu.show(),this.menu.lockShowing(),this.menuButton_.el_.setAttribute("aria-expanded","true"),ge&&Se())return;this.menu.focus()}},i.unpressButton=function(){this.enabled_&&(this.buttonPressed_=!1,this.menu.unlockShowing(),this.menu.hide(),this.menuButton_.el_.setAttribute("aria-expanded","false"))},i.disable=function(){this.unpressButton(),this.enabled_=!1,this.addClass("vjs-disabled"),this.menuButton_.disable()},i.enable=function(){this.enabled_=!0,this.removeClass("vjs-disabled"),this.menuButton_.enable()},t}(zt);zt.registerComponent("MenuButton",Dn);var Mn=function(e){function t(t,i){var n,r=i.tracks;if((n=e.call(this,t,i)||this).items.length<=1&&n.hide(),!r)return(0,d.default)(n);var s=Tt((0,d.default)(n),n.update);return r.addEventListener("removetrack",s),r.addEventListener("addtrack",s),r.addEventListener("labelchange",s),n.player_.on("ready",s),n.player_.on("dispose",(function(){r.removeEventListener("removetrack",s),r.removeEventListener("addtrack",s),r.removeEventListener("labelchange",s)})),n}return(0,h.default)(t,e),t}(Dn);zt.registerComponent("TrackButton",Mn);var Nn=["Tab","Esc","Up","Down","Right","Left"],Rn=function(e){function t(t,i){var n;return(n=e.call(this,t,i)||this).selectable=i.selectable,n.isSelected_=i.selected||!1,n.multiSelectable=i.multiSelectable,n.selected(n.isSelected_),n.selectable?n.multiSelectable?n.el_.setAttribute("role","menuitemcheckbox"):n.el_.setAttribute("role","menuitemradio"):n.el_.setAttribute("role","menuitem"),n}(0,h.default)(t,e);var i=t.prototype;return i.createEl=function(t,i,n){this.nonIconControl=!0;var r=e.prototype.createEl.call(this,"li",X({className:"vjs-menu-item",tabIndex:-1},i),n);return r.replaceChild(Ee("span",{className:"vjs-menu-item-text",textContent:this.localize(this.options_.label)}),r.querySelector(".vjs-icon-placeholder")),r},i.handleKeyDown=function(t){Nn.some((function(e){return c().isEventKey(t,e)}))||e.prototype.handleKeyDown.call(this,t)},i.handleClick=function(e){this.selected(!0)},i.selected=function(e){this.selectable&&(e?(this.addClass("vjs-selected"),this.el_.setAttribute("aria-checked","true"),this.controlText(", selected"),this.isSelected_=!0):(this.removeClass("vjs-selected"),this.el_.setAttribute("aria-checked","false"),this.controlText(""),this.isSelected_=!1))},t}($i);zt.registerComponent("MenuItem",Rn);var Un=function(e){function t(t,i){var n,r=i.track,a=t.textTracks();i.label=r.label||r.language||"Unknown",i.selected="showing"===r.mode,(n=e.call(this,t,i)||this).track=r,n.kinds=(i.kinds||[i.kind||n.track.kind]).filter(Boolean);var l,u=function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];n.handleTracksChange.apply((0,d.default)(n),t)},c=function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];n.handleSelectedLanguageChange.apply((0,d.default)(n),t)};(t.on(["loadstart","texttrackchange"],u),a.addEventListener("change",u),a.addEventListener("selectedlanguagechange",c),n.on("dispose",(function(){t.off(["loadstart","texttrackchange"],u),a.removeEventListener("change",u),a.removeEventListener("selectedlanguagechange",c)})),void 0===a.onchange)&&n.on(["tap","click"],(function(){if("object"!=typeof s().Event)try{l=new(s().Event)("change")}catch(e){}l||(l=o().createEvent("Event")).initEvent("change",!0,!0),a.dispatchEvent(l)}));return n.handleTracksChange(),n}(0,h.default)(t,e);var i=t.prototype;return i.handleClick=function(t){var i=this.track,n=this.player_.textTracks();if(e.prototype.handleClick.call(this,t),n)for(var r=0;r<n.length;r++){var s=n[r];-1!==this.kinds.indexOf(s.kind)&&(s===i?"showing"!==s.mode&&(s.mode="showing"):"disabled"!==s.mode&&(s.mode="disabled"))}},i.handleTracksChange=function(e){var t="showing"===this.track.mode;t!==this.isSelected_&&this.selected(t)},i.handleSelectedLanguageChange=function(e){if("showing"===this.track.mode){var t=this.player_.cache_.selectedLanguage;if(t&&t.enabled&&t.language===this.track.language&&t.kind!==this.track.kind)return;this.player_.cache_.selectedLanguage={enabled:!0,language:this.track.language,kind:this.track.kind}}},i.dispose=function(){this.track=null,e.prototype.dispose.call(this)},t}(Rn);zt.registerComponent("TextTrackMenuItem",Un);var Bn=function(e){function t(t,i){return i.track={player:t,kind:i.kind,kinds:i.kinds,default:!1,mode:"disabled"},i.kinds||(i.kinds=[i.kind]),i.label?i.track.label=i.label:i.track.label=i.kinds.join(" and ")+" off",i.selectable=!0,i.multiSelectable=!1,e.call(this,t,i)||this}(0,h.default)(t,e);var i=t.prototype;return i.handleTracksChange=function(e){for(var t=this.player().textTracks(),i=!0,n=0,r=t.length;n<r;n++){var s=t[n];if(this.options_.kinds.indexOf(s.kind)>-1&&"showing"===s.mode){i=!1;break}}i!==this.isSelected_&&this.selected(i)},i.handleSelectedLanguageChange=function(e){for(var t=this.player().textTracks(),i=!0,n=0,r=t.length;n<r;n++){var s=t[n];if(["captions","descriptions","subtitles"].indexOf(s.kind)>-1&&"showing"===s.mode){i=!1;break}}i&&(this.player_.cache_.selectedLanguage={enabled:!1})},t}(Un);zt.registerComponent("OffTextTrackMenuItem",Bn);var jn=function(e){function t(t,i){return void 0===i&&(i={}),i.tracks=t.textTracks(),e.call(this,t,i)||this}return(0,h.default)(t,e),t.prototype.createItems=function(e,t){var i;void 0===e&&(e=[]),void 0===t&&(t=Un),this.label_&&(i=this.label_+" off"),e.push(new Bn(this.player_,{kinds:this.kinds_,kind:this.kind_,label:i})),this.hideThreshold_+=1;var n=this.player_.textTracks();Array.isArray(this.kinds_)||(this.kinds_=[this.kind_]);for(var r=0;r<n.length;r++){var s=n[r];if(this.kinds_.indexOf(s.kind)>-1){var a=new t(this.player_,{track:s,kinds:this.kinds_,kind:this.kind_,selectable:!0,multiSelectable:!1});a.addClass("vjs-"+s.kind+"-menu-item"),e.push(a)}}return e},t}(Mn);zt.registerComponent("TextTrackButton",jn);var Fn=function(e){function t(t,i){var n,r=i.track,s=i.cue,a=t.currentTime();return i.selectable=!0,i.multiSelectable=!1,i.label=s.text,i.selected=s.startTime<=a&&a<s.endTime,(n=e.call(this,t,i)||this).track=r,n.cue=s,r.addEventListener("cuechange",Tt((0,d.default)(n),n.update)),n}(0,h.default)(t,e);var i=t.prototype;return i.handleClick=function(t){e.prototype.handleClick.call(this),this.player_.currentTime(this.cue.startTime),this.update(this.cue.startTime)},i.update=function(e){var t=this.cue,i=this.player_.currentTime();this.selected(t.startTime<=i&&i<t.endTime)},t}(Rn);zt.registerComponent("ChaptersTrackMenuItem",Fn);var Hn=function(e){function t(t,i,n){return e.call(this,t,i,n)||this}(0,h.default)(t,e);var i=t.prototype;return i.buildCSSClass=function(){return"vjs-chapters-button "+e.prototype.buildCSSClass.call(this)},i.buildWrapperCSSClass=function(){return"vjs-chapters-button "+e.prototype.buildWrapperCSSClass.call(this)},i.update=function(t){this.track_&&(!t||"addtrack"!==t.type&&"removetrack"!==t.type)||this.setTrack(this.findChaptersTrack()),e.prototype.update.call(this)},i.setTrack=function(e){if(this.track_!==e){if(this.updateHandler_||(this.updateHandler_=this.update.bind(this)),this.track_){var t=this.player_.remoteTextTrackEls().getTrackElementByTrack_(this.track_);t&&t.removeEventListener("load",this.updateHandler_),this.track_=null}if(this.track_=e,this.track_){this.track_.mode="hidden";var i=this.player_.remoteTextTrackEls().getTrackElementByTrack_(this.track_);i&&i.addEventListener("load",this.updateHandler_)}}},i.findChaptersTrack=function(){for(var e=this.player_.textTracks()||[],t=e.length-1;t>=0;t--){var i=e[t];if(i.kind===this.kind_)return i}},i.getMenuCaption=function(){return this.track_&&this.track_.label?this.track_.label:this.localize(Ut(this.kind_))},i.createMenu=function(){return this.options_.title=this.getMenuCaption(),e.prototype.createMenu.call(this)},i.createItems=function(){var e=[];if(!this.track_)return e;var t=this.track_.cues;if(!t)return e;for(var i=0,n=t.length;i<n;i++){var r=t[i],s=new Fn(this.player_,{track:this.track_,cue:r});e.push(s)}return e},t}(jn);Hn.prototype.kind_="chapters",Hn.prototype.controlText_="Chapters",zt.registerComponent("ChaptersButton",Hn);var qn=function(e){function t(t,i,n){var r;r=e.call(this,t,i,n)||this;var s=t.textTracks(),a=Tt((0,d.default)(r),r.handleTracksChange);return s.addEventListener("change",a),r.on("dispose",(function(){s.removeEventListener("change",a)})),r}(0,h.default)(t,e);var i=t.prototype;return i.handleTracksChange=function(e){for(var t=this.player().textTracks(),i=!1,n=0,r=t.length;n<r;n++){var s=t[n];if(s.kind!==this.kind_&&"showing"===s.mode){i=!0;break}}i?this.disable():this.enable()},i.buildCSSClass=function(){return"vjs-descriptions-button "+e.prototype.buildCSSClass.call(this)},i.buildWrapperCSSClass=function(){return"vjs-descriptions-button "+e.prototype.buildWrapperCSSClass.call(this)},t}(jn);qn.prototype.kind_="descriptions",qn.prototype.controlText_="Descriptions",zt.registerComponent("DescriptionsButton",qn);var zn=function(e){function t(t,i,n){return e.call(this,t,i,n)||this}(0,h.default)(t,e);var i=t.prototype;return i.buildCSSClass=function(){return"vjs-subtitles-button "+e.prototype.buildCSSClass.call(this)},i.buildWrapperCSSClass=function(){return"vjs-subtitles-button "+e.prototype.buildWrapperCSSClass.call(this)},t}(jn);zn.prototype.kind_="subtitles",zn.prototype.controlText_="Subtitles",zt.registerComponent("SubtitlesButton",zn);var Wn=function(e){function t(t,i){var n;return i.track={player:t,kind:i.kind,label:i.kind+" settings",selectable:!1,default:!1,mode:"disabled"},i.selectable=!1,i.name="CaptionSettingsMenuItem",(n=e.call(this,t,i)||this).addClass("vjs-texttrack-settings"),n.controlText(", opens "+i.kind+" settings dialog"),n}return(0,h.default)(t,e),t.prototype.handleClick=function(e){this.player().getChild("textTrackSettings").open()},t}(Un);zt.registerComponent("CaptionSettingsMenuItem",Wn);var Vn=function(e){function t(t,i,n){return e.call(this,t,i,n)||this}(0,h.default)(t,e);var i=t.prototype;return i.buildCSSClass=function(){return"vjs-captions-button "+e.prototype.buildCSSClass.call(this)},i.buildWrapperCSSClass=function(){return"vjs-captions-button "+e.prototype.buildWrapperCSSClass.call(this)},i.createItems=function(){var t=[];return this.player().tech_&&this.player().tech_.featuresNativeTextTracks||!this.player().getChild("textTrackSettings")||(t.push(new Wn(this.player_,{kind:this.kind_})),this.hideThreshold_+=1),e.prototype.createItems.call(this,t)},t}(jn);Vn.prototype.kind_="captions",Vn.prototype.controlText_="Captions",zt.registerComponent("CaptionsButton",Vn);var $n=function(e){function t(){return e.apply(this,arguments)||this}return(0,h.default)(t,e),t.prototype.createEl=function(t,i,n){var r=e.prototype.createEl.call(this,t,i,n),s=r.querySelector(".vjs-menu-item-text");return"captions"===this.options_.track.kind&&(s.appendChild(Ee("span",{className:"vjs-icon-placeholder"},{"aria-hidden":!0})),s.appendChild(Ee("span",{className:"vjs-control-text",textContent:" "+this.localize("Captions")}))),r},t}(Un);zt.registerComponent("SubsCapsMenuItem",$n);var Xn=function(e){function t(t,i){var n;return void 0===i&&(i={}),(n=e.call(this,t,i)||this).label_="subtitles",["en","en-us","en-ca","fr-ca"].indexOf(n.player_.language_)>-1&&(n.label_="captions"),n.menuButton_.controlText(Ut(n.label_)),n}(0,h.default)(t,e);var i=t.prototype;return i.buildCSSClass=function(){return"vjs-subs-caps-button "+e.prototype.buildCSSClass.call(this)},i.buildWrapperCSSClass=function(){return"vjs-subs-caps-button "+e.prototype.buildWrapperCSSClass.call(this)},i.createItems=function(){var t=[];return this.player().tech_&&this.player().tech_.featuresNativeTextTracks||!this.player().getChild("textTrackSettings")||(t.push(new Wn(this.player_,{kind:this.label_})),this.hideThreshold_+=1),t=e.prototype.createItems.call(this,t,$n)},t}(jn);Xn.prototype.kinds_=["captions","subtitles"],Xn.prototype.controlText_="Subtitles",zt.registerComponent("SubsCapsButton",Xn);var Gn=function(e){function t(t,i){var n,r=i.track,s=t.audioTracks();i.label=r.label||r.language||"Unknown",i.selected=r.enabled,(n=e.call(this,t,i)||this).track=r,n.addClass("vjs-"+r.kind+"-menu-item");var a=function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];n.handleTracksChange.apply((0,d.default)(n),t)};return s.addEventListener("change",a),n.on("dispose",(function(){s.removeEventListener("change",a)})),n}(0,h.default)(t,e);var i=t.prototype;return i.createEl=function(t,i,n){var r=e.prototype.createEl.call(this,t,i,n),s=r.querySelector(".vjs-menu-item-text");return"main-desc"===this.options_.track.kind&&(s.appendChild(Ee("span",{className:"vjs-icon-placeholder"},{"aria-hidden":!0})),s.appendChild(Ee("span",{className:"vjs-control-text",textContent:" "+this.localize("Descriptions")}))),r},i.handleClick=function(t){if(e.prototype.handleClick.call(this,t),this.track.enabled=!0,this.player_.tech_.featuresNativeAudioTracks)for(var i=this.player_.audioTracks(),n=0;n<i.length;n++){var r=i[n];r!==this.track&&(r.enabled=r===this.track)}},i.handleTracksChange=function(e){this.selected(this.track.enabled)},t}(Rn);zt.registerComponent("AudioTrackMenuItem",Gn);var Yn=function(e){function t(t,i){return void 0===i&&(i={}),i.tracks=t.audioTracks(),e.call(this,t,i)||this}(0,h.default)(t,e);var i=t.prototype;return i.buildCSSClass=function(){return"vjs-audio-button "+e.prototype.buildCSSClass.call(this)},i.buildWrapperCSSClass=function(){return"vjs-audio-button "+e.prototype.buildWrapperCSSClass.call(this)},i.createItems=function(e){void 0===e&&(e=[]),this.hideThreshold_=1;for(var t=this.player_.audioTracks(),i=0;i<t.length;i++){var n=t[i];e.push(new Gn(this.player_,{track:n,selectable:!0,multiSelectable:!1}))}return e},t}(Mn);Yn.prototype.controlText_="Audio Track",zt.registerComponent("AudioTrackButton",Yn);var Kn=function(e){function t(t,i){var n,r=i.rate,s=parseFloat(r,10);return i.label=r,i.selected=s===t.playbackRate(),i.selectable=!0,i.multiSelectable=!1,(n=e.call(this,t,i)||this).label=r,n.rate=s,n.on(t,"ratechange",(function(e){return n.update(e)})),n}(0,h.default)(t,e);var i=t.prototype;return i.handleClick=function(t){e.prototype.handleClick.call(this),this.player().playbackRate(this.rate)},i.update=function(e){this.selected(this.player().playbackRate()===this.rate)},t}(Rn);Kn.prototype.contentElType="button",zt.registerComponent("PlaybackRateMenuItem",Kn);var Qn=function(e){function t(t,i){var n;return(n=e.call(this,t,i)||this).menuButton_.el_.setAttribute("aria-describedby",n.labelElId_),n.updateVisibility(),n.updateLabel(),n.on(t,"loadstart",(function(e){return n.updateVisibility(e)})),n.on(t,"ratechange",(function(e){return n.updateLabel(e)})),n.on(t,"playbackrateschange",(function(e){return n.handlePlaybackRateschange(e)})),n}(0,h.default)(t,e);var i=t.prototype;return i.createEl=function(){var t=e.prototype.createEl.call(this);return this.labelElId_="vjs-playback-rate-value-label-"+this.id_,this.labelEl_=Ee("div",{className:"vjs-playback-rate-value",id:this.labelElId_,textContent:"1x"}),t.appendChild(this.labelEl_),t},i.dispose=function(){this.labelEl_=null,e.prototype.dispose.call(this)},i.buildCSSClass=function(){return"vjs-playback-rate "+e.prototype.buildCSSClass.call(this)},i.buildWrapperCSSClass=function(){return"vjs-playback-rate "+e.prototype.buildWrapperCSSClass.call(this)},i.createItems=function(){for(var e=this.playbackRates(),t=[],i=e.length-1;i>=0;i--)t.push(new Kn(this.player(),{rate:e[i]+"x"}));return t},i.updateARIAAttributes=function(){this.el().setAttribute("aria-valuenow",this.player().playbackRate())},i.handleClick=function(e){var t=this.player().playbackRate(),i=this.playbackRates(),n=(i.indexOf(t)+1)%i.length;this.player().playbackRate(i[n])},i.handlePlaybackRateschange=function(e){this.update()},i.playbackRates=function(){var e=this.player();return e.playbackRates&&e.playbackRates()||[]},i.playbackRateSupported=function(){return this.player().tech_&&this.player().tech_.featuresPlaybackRate&&this.playbackRates()&&this.playbackRates().length>0},i.updateVisibility=function(e){this.playbackRateSupported()?this.removeClass("vjs-hidden"):this.addClass("vjs-hidden")},i.updateLabel=function(e){this.playbackRateSupported()&&(this.labelEl_.textContent=this.player().playbackRate()+"x")},t}(Dn);Qn.prototype.controlText_="Playback Rate",zt.registerComponent("PlaybackRateMenuButton",Qn);var Jn=function(e){function t(){return e.apply(this,arguments)||this}(0,h.default)(t,e);var i=t.prototype;return i.buildCSSClass=function(){return"vjs-spacer "+e.prototype.buildCSSClass.call(this)},i.createEl=function(t,i,n){return void 0===t&&(t="div"),void 0===i&&(i={}),void 0===n&&(n={}),i.className||(i.className=this.buildCSSClass()),e.prototype.createEl.call(this,t,i,n)},t}(zt);zt.registerComponent("Spacer",Jn);var Zn=function(e){function t(){return e.apply(this,arguments)||this}(0,h.default)(t,e);var i=t.prototype;return i.buildCSSClass=function(){return"vjs-custom-control-spacer "+e.prototype.buildCSSClass.call(this)},i.createEl=function(){return e.prototype.createEl.call(this,"div",{className:this.buildCSSClass(),textContent:" "})},t}(Jn);zt.registerComponent("CustomControlSpacer",Zn);var er=function(e){function t(){return e.apply(this,arguments)||this}return(0,h.default)(t,e),t.prototype.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-control-bar",dir:"ltr"})},t}(zt);er.prototype.options_={children:["playToggle","volumePanel","currentTimeDisplay","timeDivider","durationDisplay","progressControl","liveDisplay","seekToLive","remainingTimeDisplay","customControlSpacer","playbackRateMenuButton","chaptersButton","descriptionsButton","subsCapsButton","audioTrackButton","fullscreenToggle"]},"exitPictureInPicture" in o()&&er.prototype.options_.children.splice(er.prototype.options_.children.length-1,0,"pictureInPictureToggle"),zt.registerComponent("ControlBar",er);var tr=function(e){function t(t,i){var n;return(n=e.call(this,t,i)||this).on(t,"error",(function(e){return n.open(e)})),n}(0,h.default)(t,e);var i=t.prototype;return i.buildCSSClass=function(){return"vjs-error-display "+e.prototype.buildCSSClass.call(this)},i.content=function(){var e=this.player().error();return e?this.localize(e.message):""},t}(ti);tr.prototype.options_=(0,l.default)({},ti.prototype.options_,{pauseOnOpen:!1,fillAlways:!0,temporary:!1,uncloseable:!0}),zt.registerComponent("ErrorDisplay",tr);var ir="vjs-text-track-settings",nr=["#000","Black"],rr=["#00F","Blue"],sr=["#0FF","Cyan"],ar=["#0F0","Green"],or=["#F0F","Magenta"],lr=["#F00","Red"],ur=["#FFF","White"],cr=["#FF0","Yellow"],dr=["1","Opaque"],hr=["0.5","Semi-Transparent"],pr=["0","Transparent"],fr={backgroundColor:{selector:".vjs-bg-color > select",id:"captions-background-color-%s",label:"Color",options:[nr,ur,lr,ar,rr,cr,or,sr]},backgroundOpacity:{selector:".vjs-bg-opacity > select",id:"captions-background-opacity-%s",label:"Transparency",options:[dr,hr,pr]},color:{selector:".vjs-fg-color > select",id:"captions-foreground-color-%s",label:"Color",options:[ur,nr,lr,ar,rr,cr,or,sr]},edgeStyle:{selector:".vjs-edge-style > select",id:"%s",label:"Text Edge Style",options:[["none","None"],["raised","Raised"],["depressed","Depressed"],["uniform","Uniform"],["dropshadow","Dropshadow"]]},fontFamily:{selector:".vjs-font-family > select",id:"captions-font-family-%s",label:"Font Family",options:[["proportionalSansSerif","Proportional Sans-Serif"],["monospaceSansSerif","Monospace Sans-Serif"],["proportionalSerif","Proportional Serif"],["monospaceSerif","Monospace Serif"],["casual","Casual"],["script","Script"],["small-caps","Small Caps"]]},fontPercent:{selector:".vjs-font-percent > select",id:"captions-font-size-%s",label:"Font Size",options:[["0.50","50%"],["0.75","75%"],["1.00","100%"],["1.25","125%"],["1.50","150%"],["1.75","175%"],["2.00","200%"],["3.00","300%"],["4.00","400%"]],default:2,parser:function(e){return"1.00"===e?null:Number(e)}},textOpacity:{selector:".vjs-text-opacity > select",id:"captions-foreground-opacity-%s",label:"Transparency",options:[dr,hr]},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:[pr,hr,dr]}};function mr(e,t){if(t&&(e=t(e)),e&&"none"!==e)return e}fr.windowColor.options=fr.backgroundColor.options;var gr=function(e){function t(t,i){var n;return i.temporary=!1,(n=e.call(this,t,i)||this).updateDisplay=n.updateDisplay.bind((0,d.default)(n)),n.fill(),n.hasBeenOpened_=n.hasBeenFilled_=!0,n.endDialog=Ee("p",{className:"vjs-control-text",textContent:n.localize("End of dialog window.")}),n.el().appendChild(n.endDialog),n.setDefaults(),void 0===i.persistTextTrackSettings&&(n.options_.persistTextTrackSettings=n.options_.playerOptions.persistTextTrackSettings),n.on(n.$(".vjs-done-button"),"click",(function(){n.saveSettings(),n.close()})),n.on(n.$(".vjs-default-button"),"click",(function(){n.setDefaults(),n.updateDisplay()})),$(fr,(function(e){n.on(n.$(e.selector),"change",n.updateDisplay)})),n.options_.persistTextTrackSettings&&n.restoreSettings(),n}(0,h.default)(t,e);var i=t.prototype;return i.dispose=function(){this.endDialog=null,e.prototype.dispose.call(this)},i.createElSelect_=function(e,t,i){var n=this;void 0===t&&(t=""),void 0===i&&(i="label");var r=fr[e],s=r.id.replace("%s",this.id_),a=[t,s].join(" ").trim();return["<"+i+' id="'+s+'" class="'+("label"===i?"vjs-label":"")+'">',this.localize(r.label),"</"+i+">",'<select aria-labelledby="'+a+'">'].concat(r.options.map((function(e){var t=s+"-"+e[1].replace(/\W+/g,"");return['<option id="'+t+'" value="'+e[0]+'" ','aria-labelledby="'+a+" "+t+'">',n.localize(e[1]),"</option>"].join("")}))).concat("</select>").join("")},i.createElFgColor_=function(){var e="captions-text-legend-"+this.id_;return['<fieldset class="vjs-fg-color vjs-track-setting">','<legend id="'+e+'">',this.localize("Text"),"</legend>",this.createElSelect_("color",e),'<span class="vjs-text-opacity vjs-opacity">',this.createElSelect_("textOpacity",e),"</span>","</fieldset>"].join("")},i.createElBgColor_=function(){var e="captions-background-"+this.id_;return['<fieldset class="vjs-bg-color vjs-track-setting">','<legend id="'+e+'">',this.localize("Background"),"</legend>",this.createElSelect_("backgroundColor",e),'<span class="vjs-bg-opacity vjs-opacity">',this.createElSelect_("backgroundOpacity",e),"</span>","</fieldset>"].join("")},i.createElWinColor_=function(){var e="captions-window-"+this.id_;return['<fieldset class="vjs-window-color vjs-track-setting">','<legend id="'+e+'">',this.localize("Window"),"</legend>",this.createElSelect_("windowColor",e),'<span class="vjs-window-opacity vjs-opacity">',this.createElSelect_("windowOpacity",e),"</span>","</fieldset>"].join("")},i.createElColors_=function(){return Ee("div",{className:"vjs-track-settings-colors",innerHTML:[this.createElFgColor_(),this.createElBgColor_(),this.createElWinColor_()].join("")})},i.createElFont_=function(){return Ee("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("")})},i.createElControls_=function(){var e=this.localize("restore all settings to the default values");return Ee("div",{className:"vjs-track-settings-controls",innerHTML:['<button type="button" class="vjs-default-button" title="'+e+'">',this.localize("Reset"),'<span class="vjs-control-text"> '+e+"</span>","</button>",'<button type="button" class="vjs-done-button">'+this.localize("Done")+"</button>"].join("")})},i.content=function(){return[this.createElColors_(),this.createElFont_(),this.createElControls_()]},i.label=function(){return this.localize("Caption Settings Dialog")},i.description=function(){return this.localize("Beginning of dialog window. Escape will cancel and close the window.")},i.buildCSSClass=function(){return e.prototype.buildCSSClass.call(this)+" vjs-text-track-settings"},i.getValues=function(){var e,t,i,n=this;return t=function(e,t,i){var r,s,a=(r=n.$(t.selector),s=t.parser,mr(r.options[r.options.selectedIndex].value,s));return void 0!==a&&(e[i]=a),e},void 0===(i={})&&(i=0),V(e=fr).reduce((function(i,n){return t(i,e[n],n)}),i)},i.setValues=function(e){var t=this;$(fr,(function(i,n){!function(e,t,i){if(t)for(var n=0;n<e.options.length;n++)if(mr(e.options[n].value,i)===t){e.selectedIndex=n;break}}(t.$(i.selector),e[n],i.parser)}))},i.setDefaults=function(){var e=this;$(fr,(function(t){var i=t.hasOwnProperty("default")?t.default:0;e.$(t.selector).selectedIndex=i}))},i.restoreSettings=function(){var e;try{e=JSON.parse(s().localStorage.getItem(ir))}catch(e){q.warn(e)}e&&this.setValues(e)},i.saveSettings=function(){if(this.options_.persistTextTrackSettings){var e=this.getValues();try{Object.keys(e).length?s().localStorage.setItem(ir,JSON.stringify(e)):s().localStorage.removeItem(ir)}catch(e){q.warn(e)}}},i.updateDisplay=function(){var e=this.player_.getChild("textTrackDisplay");e&&e.updateDisplay()},i.conditionalBlur_=function(){this.previouslyActiveEl_=null;var e=this.player_.controlBar,t=e&&e.subsCapsButton,i=e&&e.captionsButton;t?t.focus():i&&i.focus()},t}(ti);zt.registerComponent("TextTrackSettings",gr);var vr=function(e){function t(t,i){var n,r=i.ResizeObserver||s().ResizeObserver;null===i.ResizeObserver&&(r=!1);var a=Bt({createEl:!r,reportTouchActivity:!1},i);return(n=e.call(this,t,a)||this).ResizeObserver=i.ResizeObserver||s().ResizeObserver,n.loadListener_=null,n.resizeObserver_=null,n.debouncedHandler_=function(e,t,i,n){var r;void 0===n&&(n=s());var a=function(){var s=this,a=arguments,o=function(){r=null,o=null,i||e.apply(s,a)};!r&&i&&e.apply(s,a),n.clearTimeout(r),r=n.setTimeout(o,t)};return a.cancel=function(){n.clearTimeout(r),r=null},a}((function(){n.resizeHandler()}),100,!1,(0,d.default)(n)),r?(n.resizeObserver_=new n.ResizeObserver(n.debouncedHandler_),n.resizeObserver_.observe(t.el())):(n.loadListener_=function(){if(n.el_&&n.el_.contentWindow){var e=n.debouncedHandler_,t=n.unloadListener_=function(){ft(this,"resize",e),ft(this,"unload",t),t=null};pt(n.el_.contentWindow,"unload",t),pt(n.el_.contentWindow,"resize",e)}},n.one("load",n.loadListener_)),n}(0,h.default)(t,e);var i=t.prototype;return i.createEl=function(){return e.prototype.createEl.call(this,"iframe",{className:"vjs-resize-manager",tabIndex:-1},{"aria-hidden":"true"})},i.resizeHandler=function(){this.player_&&this.player_.trigger&&this.player_.trigger("playerresize")},i.dispose=function(){this.debouncedHandler_&&this.debouncedHandler_.cancel(),this.resizeObserver_&&(this.player_.el()&&this.resizeObserver_.unobserve(this.player_.el()),this.resizeObserver_.disconnect()),this.loadListener_&&this.off("load",this.loadListener_),this.el_&&this.el_.contentWindow&&this.unloadListener_&&this.unloadListener_.call(this.el_.contentWindow),this.ResizeObserver=null,this.resizeObserver=null,this.debouncedHandler_=null,this.loadListener_=null,e.prototype.dispose.call(this)},t}(zt);zt.registerComponent("ResizeManager",vr);var yr={trackingThreshold:20,liveTolerance:15},_r=function(e){function t(t,i){var n,r=Bt(yr,i,{createEl:!1});return(n=e.call(this,t,r)||this).handleVisibilityChange_=function(e){return n.handleVisibilityChange(e)},n.trackLiveHandler_=function(){return n.trackLive_()},n.handlePlay_=function(e){return n.handlePlay(e)},n.handleFirstTimeupdate_=function(e){return n.handleFirstTimeupdate(e)},n.handleSeeked_=function(e){return n.handleSeeked(e)},n.seekToLiveEdge_=function(e){return n.seekToLiveEdge(e)},n.reset_(),n.on(n.player_,"durationchange",(function(e){return n.handleDurationchange(e)})),n.on(n.player_,"canplay",(function(){return n.toggleTracking()})),ce&&"hidden" in o()&&"visibilityState" in o()&&n.on(o(),"visibilitychange",n.handleVisibilityChange_),n}(0,h.default)(t,e);var i=t.prototype;return i.handleVisibilityChange=function(){this.player_.duration()===1/0&&(o().hidden?this.stopTracking():this.startTracking())},i.trackLive_=function(){var e=this.player_.seekable();if(e&&e.length){var t=Number(s().performance.now().toFixed(4)),i=-1===this.lastTime_?0:(t-this.lastTime_)/1e3;this.lastTime_=t,this.pastSeekEnd_=this.pastSeekEnd()+i;var n=this.liveCurrentTime(),r=this.player_.currentTime(),a=this.player_.paused()||this.seekedBehindLive_||Math.abs(n-r)>this.options_.liveTolerance;this.timeupdateSeen_&&n!==1/0||(a=!1),a!==this.behindLiveEdge_&&(this.behindLiveEdge_=a,this.trigger("liveedgechange"))}},i.handleDurationchange=function(){this.toggleTracking()},i.toggleTracking=function(){this.player_.duration()===1/0&&this.liveWindow()>=this.options_.trackingThreshold?(this.player_.options_.liveui&&this.player_.addClass("vjs-liveui"),this.startTracking()):(this.player_.removeClass("vjs-liveui"),this.stopTracking())},i.startTracking=function(){this.isTracking()||(this.timeupdateSeen_||(this.timeupdateSeen_=this.player_.hasStarted()),this.trackingInterval_=this.setInterval(this.trackLiveHandler_,bt),this.trackLive_(),this.on(this.player_,["play","pause"],this.trackLiveHandler_),this.timeupdateSeen_?this.on(this.player_,"seeked",this.handleSeeked_):(this.one(this.player_,"play",this.handlePlay_),this.one(this.player_,"timeupdate",this.handleFirstTimeupdate_)))},i.handleFirstTimeupdate=function(){this.timeupdateSeen_=!0,this.on(this.player_,"seeked",this.handleSeeked_)},i.handleSeeked=function(){var e=Math.abs(this.liveCurrentTime()-this.player_.currentTime());this.seekedBehindLive_=this.nextSeekedFromUser_&&e>2,this.nextSeekedFromUser_=!1,this.trackLive_()},i.handlePlay=function(){this.one(this.player_,"timeupdate",this.seekToLiveEdge_)},i.reset_=function(){this.lastTime_=-1,this.pastSeekEnd_=0,this.lastSeekEnd_=-1,this.behindLiveEdge_=!0,this.timeupdateSeen_=!1,this.seekedBehindLive_=!1,this.nextSeekedFromUser_=!1,this.clearInterval(this.trackingInterval_),this.trackingInterval_=null,this.off(this.player_,["play","pause"],this.trackLiveHandler_),this.off(this.player_,"seeked",this.handleSeeked_),this.off(this.player_,"play",this.handlePlay_),this.off(this.player_,"timeupdate",this.handleFirstTimeupdate_),this.off(this.player_,"timeupdate",this.seekToLiveEdge_)},i.nextSeekedFromUser=function(){this.nextSeekedFromUser_=!0},i.stopTracking=function(){this.isTracking()&&(this.reset_(),this.trigger("liveedgechange"))},i.seekableEnd=function(){for(var e=this.player_.seekable(),t=[],i=e?e.length:0;i--;)t.push(e.end(i));return t.length?t.sort()[t.length-1]:1/0},i.seekableStart=function(){for(var e=this.player_.seekable(),t=[],i=e?e.length:0;i--;)t.push(e.start(i));return t.length?t.sort()[0]:0},i.liveWindow=function(){var e=this.liveCurrentTime();return e===1/0?0:e-this.seekableStart()},i.isLive=function(){return this.isTracking()},i.atLiveEdge=function(){return!this.behindLiveEdge()},i.liveCurrentTime=function(){return this.pastSeekEnd()+this.seekableEnd()},i.pastSeekEnd=function(){var e=this.seekableEnd();return-1!==this.lastSeekEnd_&&e!==this.lastSeekEnd_&&(this.pastSeekEnd_=0),this.lastSeekEnd_=e,this.pastSeekEnd_},i.behindLiveEdge=function(){return this.behindLiveEdge_},i.isTracking=function(){return"number"==typeof this.trackingInterval_},i.seekToLiveEdge=function(){this.seekedBehindLive_=!1,this.atLiveEdge()||(this.nextSeekedFromUser_=!1,this.player_.currentTime(this.liveCurrentTime()))},i.dispose=function(){this.off(o(),"visibilitychange",this.handleVisibilityChange_),this.stopTracking(),e.prototype.dispose.call(this)},t}(zt);zt.registerComponent("LiveTracker",_r);var br,Tr=function(e){var t=e.el();if(t.hasAttribute("src"))return e.triggerSourceset(t.src),!0;var i=e.$$("source"),n=[],r="";if(!i.length)return!1;for(var s=0;s<i.length;s++){var a=i[s].src;a&&-1===n.indexOf(a)&&n.push(a)}return!!n.length&&(1===n.length&&(r=n[0]),e.triggerSourceset(r),!0)},wr=Object.defineProperty({},"innerHTML",{get:function(){return this.cloneNode(!0).innerHTML},set:function(e){var t=o().createElement(this.nodeName.toLowerCase());t.innerHTML=e;for(var i=o().createDocumentFragment();t.childNodes.length;)i.appendChild(t.childNodes[0]);return this.innerText="",s().Element.prototype.appendChild.call(this,i),this.innerHTML}}),Sr=function(e,t){for(var i={},n=0;n<e.length&&!((i=Object.getOwnPropertyDescriptor(e[n],t))&&i.set&&i.get);n++);return i.enumerable=!0,i.configurable=!0,i},kr=function(e){var t=e.el();if(!t.resetSourceWatch_){var i={},n=function(e){return Sr([e.el(),s().HTMLMediaElement.prototype,s().Element.prototype,wr],"innerHTML")}(e),r=function(i){return function(){for(var n=arguments.length,r=new Array(n),s=0;s<n;s++)r[s]=arguments[s];var a=i.apply(t,r);return Tr(e),a}};["append","appendChild","insertAdjacentHTML"].forEach((function(e){t[e]&&(i[e]=t[e],t[e]=r(i[e]))})),Object.defineProperty(t,"innerHTML",Bt(n,{set:r(n.set)})),t.resetSourceWatch_=function(){t.resetSourceWatch_=null,Object.keys(i).forEach((function(e){t[e]=i[e]})),Object.defineProperty(t,"innerHTML",n)},e.one("sourceset",t.resetSourceWatch_)}},Er=Object.defineProperty({},"src",{get:function(){return this.hasAttribute("src")?vi(s().Element.prototype.getAttribute.call(this,"src")):""},set:function(e){return s().Element.prototype.setAttribute.call(this,"src",e),e}}),Cr=function(e){if(e.featuresSourceset){var t=e.el();if(!t.resetSourceset_){var i=function(e){return Sr([e.el(),s().HTMLMediaElement.prototype,Er],"src")}(e),n=t.setAttribute,r=t.load;Object.defineProperty(t,"src",Bt(i,{set:function(n){var r=i.set.call(t,n);return e.triggerSourceset(t.src),r}})),t.setAttribute=function(i,r){var s=n.call(t,i,r);return/src/i.test(i)&&e.triggerSourceset(t.src),s},t.load=function(){var i=r.call(t);return Tr(e)||(e.triggerSourceset(""),kr(e)),i},t.currentSrc?e.triggerSourceset(t.currentSrc):Tr(e)||kr(e),t.resetSourceset_=function(){t.resetSourceset_=null,t.load=r,t.setAttribute=n,Object.defineProperty(t,"src",i),t.resetSourceWatch_&&t.resetSourceWatch_()}}}},xr=function(e,t,i,n){void 0===n&&(n=!0);var r=function(i){return Object.defineProperty(e,t,{value:i,enumerable:!0,writable:!0})},s={configurable:!0,enumerable:!0,get:function(){var e=i();return r(e),e}};return n&&(s.set=r),Object.defineProperty(e,t,s)},Ar=function(e){function t(t,i){var n;n=e.call(this,t,i)||this;var r=t.source,s=!1;if(r&&(n.el_.currentSrc!==r.src||t.tag&&3===t.tag.initNetworkState_)?n.setSource(r):n.handleLateInit_(n.el_),t.enableSourceset&&n.setupSourcesetHandling_(),n.isScrubbing_=!1,n.el_.hasChildNodes()){for(var a=n.el_.childNodes,o=a.length,l=[];o--;){var u=a[o];"track"===u.nodeName.toLowerCase()&&(n.featuresNativeTextTracks?(n.remoteTextTrackEls().addTrackElement_(u),n.remoteTextTracks().addTrack(u.track),n.textTracks().addTrack(u.track),s||n.el_.hasAttribute("crossorigin")||!_i(u.src)||(s=!0)):l.push(u))}for(var c=0;c<l.length;c++)n.el_.removeChild(l[c])}return n.proxyNativeTracks_(),n.featuresNativeTextTracks&&s&&q.warn("Text Tracks are being loaded from another origin but the crossorigin attribute isn't used.\nThis may prevent text tracks from loading."),n.restoreMetadataTracksInIOSNativePlayer_(),(pe||me||se)&&!0===t.nativeControlsForTouch&&n.setControls(!0),n.proxyWebkitFullscreen_(),n.triggerReady(),n}(0,h.default)(t,e);var i=t.prototype;return i.dispose=function(){this.el_&&this.el_.resetSourceset_&&this.el_.resetSourceset_(),t.disposeMediaElement(this.el_),this.options_=null,e.prototype.dispose.call(this)},i.setupSourcesetHandling_=function(){Cr(this)},i.restoreMetadataTracksInIOSNativePlayer_=function(){var e,t=this.textTracks(),i=function(){e=[];for(var i=0;i<t.length;i++){var n=t[i];"metadata"===n.kind&&e.push({track:n,storedMode:n.mode})}};i(),t.addEventListener("change",i),this.on("dispose",(function(){return t.removeEventListener("change",i)}));var n=function i(){for(var n=0;n<e.length;n++){var r=e[n];"disabled"===r.track.mode&&r.track.mode!==r.storedMode&&(r.track.mode=r.storedMode)}t.removeEventListener("change",i)};this.on("webkitbeginfullscreen",(function(){t.removeEventListener("change",i),t.removeEventListener("change",n),t.addEventListener("change",n)})),this.on("webkitendfullscreen",(function(){t.removeEventListener("change",i),t.addEventListener("change",i),t.removeEventListener("change",n)}))},i.overrideNative_=function(e,t){var i=this;if(t===this["featuresNative"+e+"Tracks"]){var n=e.toLowerCase();this[n+"TracksListeners_"]&&Object.keys(this[n+"TracksListeners_"]).forEach((function(e){i.el()[n+"Tracks"].removeEventListener(e,i[n+"TracksListeners_"][e])})),this["featuresNative"+e+"Tracks"]=!t,this[n+"TracksListeners_"]=null,this.proxyNativeTracksForType_(n)}},i.overrideNativeAudioTracks=function(e){this.overrideNative_("Audio",e)},i.overrideNativeVideoTracks=function(e){this.overrideNative_("Video",e)},i.proxyNativeTracksForType_=function(e){var t=this,i=xi[e],n=this.el()[i.getterName],r=this[i.getterName]();if(this["featuresNative"+i.capitalName+"Tracks"]&&n&&n.addEventListener){var s={change:function(i){var n={type:"change",target:r,currentTarget:r,srcElement:r};r.trigger(n),"text"===e&&t[Ai.remoteText.getterName]().trigger(n)},addtrack:function(e){r.addTrack(e.track)},removetrack:function(e){r.removeTrack(e.track)}},a=function(){for(var e=[],t=0;t<r.length;t++){for(var i=!1,s=0;s<n.length;s++)if(n[s]===r[t]){i=!0;break}i||e.push(r[t])}for(;e.length;)r.removeTrack(e.shift())};this[i.getterName+"Listeners_"]=s,Object.keys(s).forEach((function(e){var i=s[e];n.addEventListener(e,i),t.on("dispose",(function(t){return n.removeEventListener(e,i)}))})),this.on("loadstart",a),this.on("dispose",(function(e){return t.off("loadstart",a)}))}},i.proxyNativeTracks_=function(){var e=this;xi.names.forEach((function(t){e.proxyNativeTracksForType_(t)}))},i.createEl=function(){var e=this.options_.tag;if(!e||!this.options_.playerElIngest&&!this.movingMediaElementInDOM){if(e){var i=e.cloneNode(!0);e.parentNode&&e.parentNode.insertBefore(i,e),t.disposeMediaElement(e),e=i}else{e=o().createElement("video");var n=Bt({},this.options_.tag&&De(this.options_.tag));pe&&!0===this.options_.nativeControlsForTouch||delete n.controls,Le(e,X(n,{id:this.options_.techId,class:"vjs-tech"}))}e.playerId=this.options_.playerId}void 0!==this.options_.preload&&Ne(e,"preload",this.options_.preload),void 0!==this.options_.disablePictureInPicture&&(e.disablePictureInPicture=this.options_.disablePictureInPicture);for(var r=["loop","muted","playsinline","autoplay"],s=0;s<r.length;s++){var a=r[s],l=this.options_[a];void 0!==l&&(l?Ne(e,a,a):Re(e,a),e[a]=l)}return e},i.handleLateInit_=function(e){if(0!==e.networkState&&3!==e.networkState){if(0===e.readyState){var t=!1,i=function(){t=!0};this.on("loadstart",i);var n=function(){t||this.trigger("loadstart")};return this.on("loadedmetadata",n),void this.ready((function(){this.off("loadstart",i),this.off("loadedmetadata",n),t||this.trigger("loadstart")}))}var r=["loadstart"];r.push("loadedmetadata"),e.readyState>=2&&r.push("loadeddata"),e.readyState>=3&&r.push("canplay"),e.readyState>=4&&r.push("canplaythrough"),this.ready((function(){r.forEach((function(e){this.trigger(e)}),this)}))}},i.setScrubbing=function(e){this.isScrubbing_=e},i.scrubbing=function(){return this.isScrubbing_},i.setCurrentTime=function(e){try{this.isScrubbing_&&this.el_.fastSeek&&ve?this.el_.fastSeek(e):this.el_.currentTime=e}catch(e){q(e,"Video is not ready. (Video.js)")}},i.duration=function(){var e=this;if(this.el_.duration===1/0&&ne&&le&&0===this.el_.currentTime){return this.on("timeupdate",(function t(){e.el_.currentTime>0&&(e.el_.duration===1/0&&e.trigger("durationchange"),e.off("timeupdate",t))})),NaN}return this.el_.duration||NaN},i.width=function(){return this.el_.offsetWidth},i.height=function(){return this.el_.offsetHeight},i.proxyWebkitFullscreen_=function(){var e=this;if("webkitDisplayingFullscreen" in this.el_){var t=function(){this.trigger("fullscreenchange",{isFullscreen:!1}),this.el_.controls&&!this.options_.nativeControlsForTouch&&this.controls()&&(this.el_.controls=!1)},i=function(){"webkitPresentationMode" in this.el_&&"picture-in-picture"!==this.el_.webkitPresentationMode&&(this.one("webkitendfullscreen",t),this.trigger("fullscreenchange",{isFullscreen:!0,nativeIOSFullscreen:!0}))};this.on("webkitbeginfullscreen",i),this.on("dispose",(function(){e.off("webkitbeginfullscreen",i),e.off("webkitendfullscreen",t)}))}},i.supportsFullScreen=function(){if("function"==typeof this.el_.webkitEnterFullScreen){var e=s().navigator&&s().navigator.userAgent||"";if(/Android/.test(e)||!/Chrome|Mac OS X 10.5/.test(e))return!0}return!1},i.enterFullScreen=function(){var e=this.el_;if(e.paused&&e.networkState<=e.HAVE_METADATA)Qt(this.el_.play()),this.setTimeout((function(){e.pause();try{e.webkitEnterFullScreen()}catch(e){this.trigger("fullscreenerror",e)}}),0);else try{e.webkitEnterFullScreen()}catch(e){this.trigger("fullscreenerror",e)}},i.exitFullScreen=function(){this.el_.webkitDisplayingFullscreen?this.el_.webkitExitFullScreen():this.trigger("fullscreenerror",new Error("The video is not fullscreen"))},i.requestPictureInPicture=function(){return this.el_.requestPictureInPicture()},i.src=function(e){if(void 0===e)return this.el_.src;this.setSrc(e)},i.reset=function(){t.resetMediaElement(this.el_)},i.currentSrc=function(){return this.currentSource_?this.currentSource_.src:this.el_.currentSrc},i.setControls=function(e){this.el_.controls=!!e},i.addTextTrack=function(t,i,n){return this.featuresNativeTextTracks?this.el_.addTextTrack(t,i,n):e.prototype.addTextTrack.call(this,t,i,n)},i.createRemoteTextTrack=function(t){if(!this.featuresNativeTextTracks)return e.prototype.createRemoteTextTrack.call(this,t);var i=o().createElement("track");return t.kind&&(i.kind=t.kind),t.label&&(i.label=t.label),(t.language||t.srclang)&&(i.srclang=t.language||t.srclang),t.default&&(i.default=t.default),t.id&&(i.id=t.id),t.src&&(i.src=t.src),i},i.addRemoteTextTrack=function(t,i){var n=e.prototype.addRemoteTextTrack.call(this,t,i);return this.featuresNativeTextTracks&&this.el().appendChild(n),n},i.removeRemoteTextTrack=function(t){if(e.prototype.removeRemoteTextTrack.call(this,t),this.featuresNativeTextTracks)for(var i=this.$$("track"),n=i.length;n--;)t!==i[n]&&t!==i[n].track||this.el().removeChild(i[n])},i.getVideoPlaybackQuality=function(){if("function"==typeof this.el().getVideoPlaybackQuality)return this.el().getVideoPlaybackQuality();var e={};return void 0!==this.el().webkitDroppedFrameCount&&void 0!==this.el().webkitDecodedFrameCount&&(e.droppedVideoFrames=this.el().webkitDroppedFrameCount,e.totalVideoFrames=this.el().webkitDecodedFrameCount),s().performance&&"function"==typeof s().performance.now?e.creationTime=s().performance.now():s().performance&&s().performance.timing&&"number"==typeof s().performance.timing.navigationStart&&(e.creationTime=s().Date.now()-s().performance.timing.navigationStart),e},t}(Ii);xr(Ar,"TEST_VID",(function(){if(Te()){var e=o().createElement("video"),t=o().createElement("track");return t.kind="captions",t.srclang="en",t.label="English",e.appendChild(t),e}})),Ar.isSupported=function(){try{Ar.TEST_VID.volume=.5}catch(e){return!1}return!(!Ar.TEST_VID||!Ar.TEST_VID.canPlayType)},Ar.canPlayType=function(e){return Ar.TEST_VID.canPlayType(e)},Ar.canPlaySource=function(e,t){return Ar.canPlayType(e.type)},Ar.canControlVolume=function(){try{var e=Ar.TEST_VID.volume;Ar.TEST_VID.volume=e/2+.1;var t=e!==Ar.TEST_VID.volume;return t&&ge?(s().setTimeout((function(){Ar&&Ar.prototype&&(Ar.prototype.featuresVolumeControl=e!==Ar.TEST_VID.volume)})),!1):t}catch(e){return!1}},Ar.canMuteVolume=function(){try{var e=Ar.TEST_VID.muted;return Ar.TEST_VID.muted=!e,Ar.TEST_VID.muted?Ne(Ar.TEST_VID,"muted","muted"):Re(Ar.TEST_VID,"muted"),e!==Ar.TEST_VID.muted}catch(e){return!1}},Ar.canControlPlaybackRate=function(){if(ne&&le&&ue<58)return!1;try{var e=Ar.TEST_VID.playbackRate;return Ar.TEST_VID.playbackRate=e/2+.1,e!==Ar.TEST_VID.playbackRate}catch(e){return!1}},Ar.canOverrideAttributes=function(){try{var e=function(){};Object.defineProperty(o().createElement("video"),"src",{get:e,set:e}),Object.defineProperty(o().createElement("audio"),"src",{get:e,set:e}),Object.defineProperty(o().createElement("video"),"innerHTML",{get:e,set:e}),Object.defineProperty(o().createElement("audio"),"innerHTML",{get:e,set:e})}catch(e){return!1}return!0},Ar.supportsNativeTextTracks=function(){return ve||ge&&le},Ar.supportsNativeVideoTracks=function(){return!(!Ar.TEST_VID||!Ar.TEST_VID.videoTracks)},Ar.supportsNativeAudioTracks=function(){return!(!Ar.TEST_VID||!Ar.TEST_VID.audioTracks)},Ar.Events=["loadstart","suspend","abort","error","emptied","stalled","loadedmetadata","loadeddata","canplay","canplaythrough","playing","waiting","seeking","seeked","ended","durationchange","timeupdate","progress","play","pause","ratechange","resize","volumechange"],[["featuresMuteControl","canMuteVolume"],["featuresPlaybackRate","canControlPlaybackRate"],["featuresSourceset","canOverrideAttributes"],["featuresNativeTextTracks","supportsNativeTextTracks"],["featuresNativeVideoTracks","supportsNativeVideoTracks"],["featuresNativeAudioTracks","supportsNativeAudioTracks"]].forEach((function(e){var t=e[0],i=e[1];xr(Ar.prototype,t,(function(){return Ar[i]()}),!0)})),Ar.prototype.featuresVolumeControl=Ar.canControlVolume(),Ar.prototype.movingMediaElementInDOM=!ge,Ar.prototype.featuresFullscreenResize=!0,Ar.prototype.featuresProgressEvents=!0,Ar.prototype.featuresTimeupdateEvents=!0,Ar.patchCanPlayType=function(){re>=4&&!ae&&!le&&(br=Ar.TEST_VID&&Ar.TEST_VID.constructor.prototype.canPlayType,Ar.TEST_VID.constructor.prototype.canPlayType=function(e){return e&&/^application\/(?:x-|vnd\.apple\.)mpegurl/i.test(e)?"maybe":br.call(this,e)})},Ar.unpatchCanPlayType=function(){var e=Ar.TEST_VID.constructor.prototype.canPlayType;return br&&(Ar.TEST_VID.constructor.prototype.canPlayType=br),e},Ar.patchCanPlayType(),Ar.disposeMediaElement=function(e){if(e){for(e.parentNode&&e.parentNode.removeChild(e);e.hasChildNodes();)e.removeChild(e.firstChild);e.removeAttribute("src"),"function"==typeof e.load&&function(){try{e.load()}catch(e){}}()}},Ar.resetMediaElement=function(e){if(e){for(var t=e.querySelectorAll("source"),i=t.length;i--;)e.removeChild(t[i]);e.removeAttribute("src"),"function"==typeof e.load&&function(){try{e.load()}catch(e){}}()}},["muted","defaultMuted","autoplay","controls","loop","playsinline"].forEach((function(e){Ar.prototype[e]=function(){return this.el_[e]||this.el_.hasAttribute(e)}})),["muted","defaultMuted","autoplay","loop","playsinline"].forEach((function(e){Ar.prototype["set"+Ut(e)]=function(t){this.el_[e]=t,t?this.el_.setAttribute(e,e):this.el_.removeAttribute(e)}})),["paused","currentTime","buffered","volume","poster","preload","error","seeking","seekable","ended","playbackRate","defaultPlaybackRate","disablePictureInPicture","played","networkState","readyState","videoWidth","videoHeight","crossOrigin"].forEach((function(e){Ar.prototype[e]=function(){return this.el_[e]}})),["volume","src","poster","preload","playbackRate","defaultPlaybackRate","disablePictureInPicture","crossOrigin"].forEach((function(e){Ar.prototype["set"+Ut(e)]=function(t){this.el_[e]=t}})),["pause","load","play"].forEach((function(e){Ar.prototype[e]=function(){return this.el_[e]()}})),Ii.withSourceHandlers(Ar),Ar.nativeSourceHandler={},Ar.nativeSourceHandler.canPlayType=function(e){try{return Ar.TEST_VID.canPlayType(e)}catch(e){return""}},Ar.nativeSourceHandler.canHandleSource=function(e,t){if(e.type)return Ar.nativeSourceHandler.canPlayType(e.type);if(e.src){var i=yi(e.src);return Ar.nativeSourceHandler.canPlayType("video/"+i)}return""},Ar.nativeSourceHandler.handleSource=function(e,t,i){t.setSrc(e.src)},Ar.nativeSourceHandler.dispose=function(){},Ar.registerSourceHandler(Ar.nativeSourceHandler),Ii.registerTech("Html5",Ar);var Pr=["progress","abort","suspend","emptied","stalled","loadedmetadata","loadeddata","timeupdate","resize","volumechange","texttrackchange"],Ir={canplay:"CanPlay",canplaythrough:"CanPlayThrough",playing:"Playing",seeked:"Seeked"},Or=["tiny","xsmall","small","medium","large","xlarge","huge"],Lr={};Or.forEach((function(e){var t="x"===e.charAt(0)?"x-"+e.substring(1):e;Lr[e]="vjs-layout-"+t}));var Dr={tiny:210,xsmall:320,small:425,medium:768,large:1440,xlarge:2560,huge:1/0},Mr=function(e){function t(i,n,r){var s;if(i.id=i.id||n.id||"vjs_video_"+at(),(n=X(t.getTagSettings(i),n)).initChildren=!1,n.createEl=!1,n.evented=!1,n.reportTouchActivity=!1,!n.language)if("function"==typeof i.closest){var a=i.closest("[lang]");a&&a.getAttribute&&(n.language=a.getAttribute("lang"))}else for(var l=i;l&&1===l.nodeType;){if(De(l).hasOwnProperty("lang")){n.language=l.getAttribute("lang");break}l=l.parentNode}if((s=e.call(this,null,n,r)||this).boundDocumentFullscreenChange_=function(e){return s.documentFullscreenChange_(e)},s.boundFullWindowOnEscKey_=function(e){return s.fullWindowOnEscKey(e)},s.boundUpdateStyleEl_=function(e){return s.updateStyleEl_(e)},s.boundApplyInitTime_=function(e){return s.applyInitTime_(e)},s.boundUpdateCurrentBreakpoint_=function(e){return s.updateCurrentBreakpoint_(e)},s.boundHandleTechClick_=function(e){return s.handleTechClick_(e)},s.boundHandleTechDoubleClick_=function(e){return s.handleTechDoubleClick_(e)},s.boundHandleTechTouchStart_=function(e){return s.handleTechTouchStart_(e)},s.boundHandleTechTouchMove_=function(e){return s.handleTechTouchMove_(e)},s.boundHandleTechTouchEnd_=function(e){return s.handleTechTouchEnd_(e)},s.boundHandleTechTap_=function(e){return s.handleTechTap_(e)},s.isFullscreen_=!1,s.log=z(s.id_),s.fsApi_=R,s.isPosterFromTech_=!1,s.queuedCallbacks_=[],s.isReady_=!1,s.hasStarted_=!1,s.userActive_=!1,s.debugEnabled_=!1,!s.options_||!s.options_.techOrder||!s.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(s.tag=i,s.tagAttributes=i&&De(i),s.language(s.options_.language),n.languages){var u={};Object.getOwnPropertyNames(n.languages).forEach((function(e){u[e.toLowerCase()]=n.languages[e]})),s.languages_=u}else s.languages_=t.prototype.options_.languages;s.resetCache_(),s.poster_=n.poster||"",s.controls_=!!n.controls,i.controls=!1,i.removeAttribute("controls"),s.changingSrc_=!1,s.playCallbacks_=[],s.playTerminatedQueue_=[],i.hasAttribute("autoplay")?s.autoplay(!0):s.autoplay(s.options_.autoplay),n.plugins&&Object.keys(n.plugins).forEach((function(e){if("function"!=typeof s[e])throw new Error('plugin "'+e+'" does not exist')})),s.scrubbing_=!1,s.el_=s.createEl(),Dt((0,d.default)(s),{eventBusKey:"el_"}),s.fsApi_.requestFullscreen&&(pt(o(),s.fsApi_.fullscreenchange,s.boundDocumentFullscreenChange_),s.on(s.fsApi_.fullscreenchange,s.boundDocumentFullscreenChange_)),s.fluid_&&s.on(["playerreset","resize"],s.boundUpdateStyleEl_);var c=Bt(s.options_);n.plugins&&Object.keys(n.plugins).forEach((function(e){s[e](n.plugins[e])})),n.debug&&s.debug(!0),s.options_.playerOptions=c,s.middleware_=[],s.playbackRates(n.playbackRates),s.initChildren(),s.isAudio("audio"===i.nodeName.toLowerCase()),s.controls()?s.addClass("vjs-controls-enabled"):s.addClass("vjs-controls-disabled"),s.el_.setAttribute("role","region"),s.isAudio()?s.el_.setAttribute("aria-label",s.localize("Audio Player")):s.el_.setAttribute("aria-label",s.localize("Video Player")),s.isAudio()&&s.addClass("vjs-audio"),s.flexNotSupported_()&&s.addClass("vjs-no-flex"),pe&&s.addClass("vjs-touch-enabled"),ge||s.addClass("vjs-workinghover"),t.players[s.id_]=(0,d.default)(s);var h=L.split(".")[0];return s.addClass("vjs-v"+h),s.userActive(!0),s.reportUserActivity(),s.one("play",(function(e){return s.listenForUserActivity_(e)})),s.on("stageclick",(function(e){return s.handleStageClick_(e)})),s.on("keydown",(function(e){return s.handleKeyDown(e)})),s.on("languagechange",(function(e){return s.handleLanguagechange(e)})),s.breakpoints(s.options_.breakpoints),s.responsive(s.options_.responsive),s}(0,h.default)(t,e);var i=t.prototype;return i.dispose=function(){var i=this;this.trigger("dispose"),this.off("dispose"),ft(o(),this.fsApi_.fullscreenchange,this.boundDocumentFullscreenChange_),ft(o(),"keydown",this.boundFullWindowOnEscKey_),this.styleEl_&&this.styleEl_.parentNode&&(this.styleEl_.parentNode.removeChild(this.styleEl_),this.styleEl_=null),t.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),Li[this.id()]=null,Pi.names.forEach((function(e){var t=Pi[e],n=i[t.getterName]();n&&n.off&&n.off()})),e.prototype.dispose.call(this)},i.createEl=function(){var t,i=this.tag,n=this.playerElIngest_=i.parentNode&&i.parentNode.hasAttribute&&i.parentNode.hasAttribute("data-vjs-player"),r="video-js"===this.tag.tagName.toLowerCase();n?t=this.el_=i.parentNode:r||(t=this.el_=e.prototype.createEl.call(this,"div"));var a=De(i);if(r){for(t=this.el_=i,i=this.tag=o().createElement("video");t.children.length;)i.appendChild(t.firstChild);Ae(t,"video-js")||Pe(t,"video-js"),t.appendChild(i),n=this.playerElIngest_=t,Object.keys(t).forEach((function(e){try{i[e]=t[e]}catch(e){}}))}if(i.setAttribute("tabindex","-1"),a.tabindex="-1",(ce||le&&he)&&(i.setAttribute("role","application"),a.role="application"),i.removeAttribute("width"),i.removeAttribute("height"),"width" in a&&delete a.width,"height" in a&&delete a.height,Object.getOwnPropertyNames(a).forEach((function(e){r&&"class"===e||t.setAttribute(e,a[e]),r&&i.setAttribute(e,a[e])})),i.playerId=i.id,i.id+="_html5_api",i.className="vjs-tech",i.player=t.player=this,this.addClass("vjs-paused"),!0!==s().VIDEOJS_NO_DYNAMIC_STYLE){this.styleEl_=nt("vjs-styles-dimensions");var l=Ye(".vjs-styles-defaults"),u=Ye("head");u.insertBefore(this.styleEl_,l?l.nextSibling:u.firstChild)}this.fill_=!1,this.fluid_=!1,this.width(this.options_.width),this.height(this.options_.height),this.fill(this.options_.fill),this.fluid(this.options_.fluid),this.aspectRatio(this.options_.aspectRatio),this.crossOrigin(this.options_.crossOrigin||this.options_.crossorigin);for(var c=i.getElementsByTagName("a"),d=0;d<c.length;d++){var h=c.item(d);Pe(h,"vjs-hidden"),h.setAttribute("hidden","hidden")}return i.initNetworkState_=i.networkState,i.parentNode&&!n&&i.parentNode.insertBefore(t,i),xe(i,t),this.children_.unshift(i),this.el_.setAttribute("lang",this.language_),this.el_.setAttribute("translate","no"),this.el_=t,t},i.crossOrigin=function(e){if(!e)return this.techGet_("crossOrigin");"anonymous"===e||"use-credentials"===e?this.techCall_("setCrossOrigin",e):q.warn('crossOrigin must be "anonymous" or "use-credentials", given "'+e+'"')},i.width=function(e){return this.dimension("width",e)},i.height=function(e){return this.dimension("height",e)},i.dimension=function(e,t){var i=e+"_";if(void 0===t)return this[i]||0;if(""===t||"auto"===t)return this[i]=void 0,void this.updateStyleEl_();var n=parseFloat(t);isNaN(n)?q.error('Improper value "'+t+'" supplied for for '+e):(this[i]=n,this.updateStyleEl_())},i.fluid=function(e){var t,i,n=this;if(void 0===e)return!!this.fluid_;this.fluid_=!!e,Et(this)&&this.off(["playerreset","resize"],this.boundUpdateStyleEl_),e?(this.addClass("vjs-fluid"),this.fill(!1),i=function(){n.on(["playerreset","resize"],n.boundUpdateStyleEl_)},Et(t=this)?i():(t.eventedCallbacks||(t.eventedCallbacks=[]),t.eventedCallbacks.push(i))):this.removeClass("vjs-fluid"),this.updateStyleEl_()},i.fill=function(e){if(void 0===e)return!!this.fill_;this.fill_=!!e,e?(this.addClass("vjs-fill"),this.fluid(!1)):this.removeClass("vjs-fill")},i.aspectRatio=function(e){if(void 0===e)return this.aspectRatio_;if(!/^\d+\:\d+$/.test(e))throw new Error("Improper value supplied for aspect ratio. The format should be width:height, for example 16:9.");this.aspectRatio_=e,this.fluid(!0),this.updateStyleEl_()},i.updateStyleEl_=function(){if(!0!==s().VIDEOJS_NO_DYNAMIC_STYLE){var e,t,i,n=(void 0!==this.aspectRatio_&&"auto"!==this.aspectRatio_?this.aspectRatio_:this.videoWidth()>0?this.videoWidth()+":"+this.videoHeight():"16:9").split(":"),r=n[1]/n[0];e=void 0!==this.width_?this.width_:void 0!==this.height_?this.height_/r:this.videoWidth()||300,t=void 0!==this.height_?this.height_:e*r,i=/^[^a-zA-Z]/.test(this.id())?"dimensions-"+this.id():this.id()+"-dimensions",this.addClass(i),rt(this.styleEl_,"\n      ."+i+" {\n        width: "+e+"px;\n        height: "+t+"px;\n      }\n\n      ."+i+".vjs-fluid {\n        padding-top: "+100*r+"%;\n      }\n    ")}else{var a="number"==typeof this.width_?this.width_:this.options_.width,o="number"==typeof this.height_?this.height_:this.options_.height,l=this.tech_&&this.tech_.el();l&&(a>=0&&(l.width=a),o>=0&&(l.height=o))}},i.loadTech_=function(e,t){var i=this;this.tech_&&this.unloadTech_();var n=Ut(e),r=e.charAt(0).toLowerCase()+e.slice(1);"Html5"!==n&&this.tag&&(Ii.getTech("Html5").disposeMediaElement(this.tag),this.tag.player=null,this.tag=null),this.techName_=n,this.isReady_=!1;var s=this.autoplay();("string"==typeof this.autoplay()||!0===this.autoplay()&&this.options_.normalizeAutoplay)&&(s=!1);var a={source:t,autoplay:s,nativeControlsForTouch:this.options_.nativeControlsForTouch,playerId:this.id(),techId:this.id()+"_"+r+"_api",playsinline:this.options_.playsinline,preload:this.options_.preload,loop:this.options_.loop,disablePictureInPicture:this.options_.disablePictureInPicture,muted:this.options_.muted,poster:this.poster(),language:this.language(),playerElIngest:this.playerElIngest_||!1,"vtt.js":this.options_["vtt.js"],canOverridePoster:!!this.options_.techCanOverridePoster,enableSourceset:this.options_.enableSourceset,Promise:this.options_.Promise};Pi.names.forEach((function(e){var t=Pi[e];a[t.getterName]=i[t.privateName]})),X(a,this.options_[n]),X(a,this.options_[r]),X(a,this.options_[e.toLowerCase()]),this.tag&&(a.tag=this.tag),t&&t.src===this.cache_.src&&this.cache_.currentTime>0&&(a.startTime=this.cache_.currentTime);var o=Ii.getTech(e);if(!o)throw new Error("No Tech named '"+n+"' exists! '"+n+"' should be registered using videojs.registerTech()'");this.tech_=new o(a),this.tech_.ready(Tt(this,this.handleTechReady_),!0),ei(this.textTracksJson_||[],this.tech_),Pr.forEach((function(e){i.on(i.tech_,e,(function(t){return i["handleTech"+Ut(e)+"_"](t)}))})),Object.keys(Ir).forEach((function(e){i.on(i.tech_,e,(function(t){0===i.tech_.playbackRate()&&i.tech_.seeking()?i.queuedCallbacks_.push({callback:i["handleTech"+Ir[e]+"_"].bind(i),event:t}):i["handleTech"+Ir[e]+"_"](t)}))})),this.on(this.tech_,"loadstart",(function(e){return i.handleTechLoadStart_(e)})),this.on(this.tech_,"sourceset",(function(e){return i.handleTechSourceset_(e)})),this.on(this.tech_,"waiting",(function(e){return i.handleTechWaiting_(e)})),this.on(this.tech_,"ended",(function(e){return i.handleTechEnded_(e)})),this.on(this.tech_,"seeking",(function(e){return i.handleTechSeeking_(e)})),this.on(this.tech_,"play",(function(e){return i.handleTechPlay_(e)})),this.on(this.tech_,"firstplay",(function(e){return i.handleTechFirstPlay_(e)})),this.on(this.tech_,"pause",(function(e){return i.handleTechPause_(e)})),this.on(this.tech_,"durationchange",(function(e){return i.handleTechDurationChange_(e)})),this.on(this.tech_,"fullscreenchange",(function(e,t){return i.handleTechFullscreenChange_(e,t)})),this.on(this.tech_,"fullscreenerror",(function(e,t){return i.handleTechFullscreenError_(e,t)})),this.on(this.tech_,"enterpictureinpicture",(function(e){return i.handleTechEnterPictureInPicture_(e)})),this.on(this.tech_,"leavepictureinpicture",(function(e){return i.handleTechLeavePictureInPicture_(e)})),this.on(this.tech_,"error",(function(e){return i.handleTechError_(e)})),this.on(this.tech_,"posterchange",(function(e){return i.handleTechPosterChange_(e)})),this.on(this.tech_,"textdata",(function(e){return i.handleTechTextData_(e)})),this.on(this.tech_,"ratechange",(function(e){return i.handleTechRateChange_(e)})),this.on(this.tech_,"loadedmetadata",this.boundUpdateStyleEl_),this.usingNativeControls(this.techGet_("controls")),this.controls()&&!this.usingNativeControls()&&this.addTechControlsListeners_(),this.tech_.el().parentNode===this.el()||"Html5"===n&&this.tag||xe(this.tech_.el(),this.el()),this.tag&&(this.tag.player=null,this.tag=null)},i.unloadTech_=function(){var e=this;Pi.names.forEach((function(t){var i=Pi[t];e[i.privateName]=e[i.getterName]()})),this.textTracksJson_=Zt(this.tech_),this.isReady_=!1,this.tech_.dispose(),this.tech_=!1,this.isPosterFromTech_&&(this.poster_="",this.trigger("posterchange")),this.isPosterFromTech_=!1},i.tech=function(e){return void 0===e&&q.warn("Using the tech directly can be dangerous. I hope you know what you're doing.\nSee https://github.com/videojs/video.js/issues/2617 for more info.\n"),this.tech_},i.addTechControlsListeners_=function(){this.removeTechControlsListeners_(),this.on(this.tech_,"click",this.boundHandleTechClick_),this.on(this.tech_,"dblclick",this.boundHandleTechDoubleClick_),this.on(this.tech_,"touchstart",this.boundHandleTechTouchStart_),this.on(this.tech_,"touchmove",this.boundHandleTechTouchMove_),this.on(this.tech_,"touchend",this.boundHandleTechTouchEnd_),this.on(this.tech_,"tap",this.boundHandleTechTap_)},i.removeTechControlsListeners_=function(){this.off(this.tech_,"tap",this.boundHandleTechTap_),this.off(this.tech_,"touchstart",this.boundHandleTechTouchStart_),this.off(this.tech_,"touchmove",this.boundHandleTechTouchMove_),this.off(this.tech_,"touchend",this.boundHandleTechTouchEnd_),this.off(this.tech_,"click",this.boundHandleTechClick_),this.off(this.tech_,"dblclick",this.boundHandleTechDoubleClick_)},i.handleTechReady_=function(){this.triggerReady(),this.cache_.volume&&this.techCall_("setVolume",this.cache_.volume),this.handleTechPosterChange_(),this.handleTechDurationChange_()},i.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_(!0===this.autoplay()&&this.options_.normalizeAutoplay?"play":this.autoplay())},i.manualAutoplay_=function(e){var t=this;if(this.tech_&&"string"==typeof e){var i,n=function(){var e=t.muted();t.muted(!0);var i=function(){t.muted(e)};t.playTerminatedQueue_.push(i);var n=t.play();if(Kt(n))return n.catch((function(e){throw i(),new Error("Rejection at manualAutoplay. Restoring muted value. "+(e||""))}))};if("any"!==e||this.muted()?i="muted"!==e||this.muted()?this.play():n():Kt(i=this.play())&&(i=i.catch(n)),Kt(i))return i.then((function(){t.trigger({type:"autoplay-success",autoplay:e})})).catch((function(){t.trigger({type:"autoplay-failure",autoplay:e})}))}},i.updateSourceCaches_=function(e){void 0===e&&(e="");var t=e,i="";"string"!=typeof t&&(t=e.src,i=e.type),this.cache_.source=this.cache_.source||{},this.cache_.sources=this.cache_.sources||[],t&&!i&&(i=function(e,t){if(!t)return"";if(e.cache_.source.src===t&&e.cache_.source.type)return e.cache_.source.type;var i=e.cache_.sources.filter((function(e){return e.src===t}));if(i.length)return i[0].type;for(var n=e.$$("source"),r=0;r<n.length;r++){var s=n[r];if(s.type&&s.src&&s.src===t)return s.type}return qi(t)}(this,t)),this.cache_.source=Bt({},e,{src:t,type:i});for(var n=this.cache_.sources.filter((function(e){return e.src&&e.src===t})),r=[],s=this.$$("source"),a=[],o=0;o<s.length;o++){var l=De(s[o]);r.push(l),l.src&&l.src===t&&a.push(l.src)}a.length&&!n.length?this.cache_.sources=r:n.length||(this.cache_.sources=[this.cache_.source]),this.cache_.src=t},i.handleTechSourceset_=function(e){var t=this;if(!this.changingSrc_){var i=function(e){return t.updateSourceCaches_(e)},n=this.currentSource().src,r=e.src;n&&!/^blob:/.test(n)&&/^blob:/.test(r)&&(!this.lastSource_||this.lastSource_.tech!==r&&this.lastSource_.player!==n)&&(i=function(){}),i(r),e.src||this.tech_.any(["sourceset","loadstart"],(function(e){if("sourceset"!==e.type){var i=t.techGet("currentSrc");t.lastSource_.tech=i,t.updateSourceCaches_(i)}}))}this.lastSource_={player:this.currentSource().src,tech:e.src},this.trigger({src:e.src,type:"sourceset"})},i.hasStarted=function(e){if(void 0===e)return this.hasStarted_;e!==this.hasStarted_&&(this.hasStarted_=e,this.hasStarted_?(this.addClass("vjs-has-started"),this.trigger("firstplay")):this.removeClass("vjs-has-started"))},i.handleTechPlay_=function(){this.removeClass("vjs-ended"),this.removeClass("vjs-paused"),this.addClass("vjs-playing"),this.hasStarted(!0),this.trigger("play")},i.handleTechRateChange_=function(){this.tech_.playbackRate()>0&&0===this.cache_.lastPlaybackRate&&(this.queuedCallbacks_.forEach((function(e){return e.callback(e.event)})),this.queuedCallbacks_=[]),this.cache_.lastPlaybackRate=this.tech_.playbackRate(),this.trigger("ratechange")},i.handleTechWaiting_=function(){var e=this;this.addClass("vjs-waiting"),this.trigger("waiting");var t=this.currentTime();this.on("timeupdate",(function i(){t!==e.currentTime()&&(e.removeClass("vjs-waiting"),e.off("timeupdate",i))}))},i.handleTechCanPlay_=function(){this.removeClass("vjs-waiting"),this.trigger("canplay")},i.handleTechCanPlayThrough_=function(){this.removeClass("vjs-waiting"),this.trigger("canplaythrough")},i.handleTechPlaying_=function(){this.removeClass("vjs-waiting"),this.trigger("playing")},i.handleTechSeeking_=function(){this.addClass("vjs-seeking"),this.trigger("seeking")},i.handleTechSeeked_=function(){this.removeClass("vjs-seeking"),this.removeClass("vjs-ended"),this.trigger("seeked")},i.handleTechFirstPlay_=function(){this.options_.starttime&&(q.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")},i.handleTechPause_=function(){this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.trigger("pause")},i.handleTechEnded_=function(){this.addClass("vjs-ended"),this.removeClass("vjs-waiting"),this.options_.loop?(this.currentTime(0),this.play()):this.paused()||this.pause(),this.trigger("ended")},i.handleTechDurationChange_=function(){this.duration(this.techGet_("duration"))},i.handleTechClick_=function(e){this.controls_&&(void 0!==this.options_&&void 0!==this.options_.userActions&&void 0!==this.options_.userActions.click&&!1===this.options_.userActions.click||(void 0!==this.options_&&void 0!==this.options_.userActions&&"function"==typeof this.options_.userActions.click?this.options_.userActions.click.call(this,e):this.paused()?Qt(this.play()):this.pause()))},i.handleTechDoubleClick_=function(e){this.controls_&&(Array.prototype.some.call(this.$$(".vjs-control-bar, .vjs-modal-dialog"),(function(t){return t.contains(e.target)}))||void 0!==this.options_&&void 0!==this.options_.userActions&&void 0!==this.options_.userActions.doubleClick&&!1===this.options_.userActions.doubleClick||(void 0!==this.options_&&void 0!==this.options_.userActions&&"function"==typeof this.options_.userActions.doubleClick?this.options_.userActions.doubleClick.call(this,e):this.isFullscreen()?this.exitFullscreen():this.requestFullscreen()))},i.handleTechTap_=function(){this.userActive(!this.userActive())},i.handleTechTouchStart_=function(){this.userWasActive=this.userActive()},i.handleTechTouchMove_=function(){this.userWasActive&&this.reportUserActivity()},i.handleTechTouchEnd_=function(e){e.cancelable&&e.preventDefault()},i.handleStageClick_=function(){this.reportUserActivity()},i.toggleFullscreenClass_=function(){this.isFullscreen()?this.addClass("vjs-fullscreen"):this.removeClass("vjs-fullscreen")},i.documentFullscreenChange_=function(e){var t=e.target.player;if(!t||t===this){var i=this.el(),n=o()[this.fsApi_.fullscreenElement]===i;!n&&i.matches?n=i.matches(":"+this.fsApi_.fullscreen):!n&&i.msMatchesSelector&&(n=i.msMatchesSelector(":"+this.fsApi_.fullscreen)),this.isFullscreen(n)}},i.handleTechFullscreenChange_=function(e,t){var i=this;t&&(t.nativeIOSFullscreen&&(this.addClass("vjs-ios-native-fs"),this.tech_.one("webkitendfullscreen",(function(){i.removeClass("vjs-ios-native-fs")}))),this.isFullscreen(t.isFullscreen))},i.handleTechFullscreenError_=function(e,t){this.trigger("fullscreenerror",t)},i.togglePictureInPictureClass_=function(){this.isInPictureInPicture()?this.addClass("vjs-picture-in-picture"):this.removeClass("vjs-picture-in-picture")},i.handleTechEnterPictureInPicture_=function(e){this.isInPictureInPicture(!0)},i.handleTechLeavePictureInPicture_=function(e){this.isInPictureInPicture(!1)},i.handleTechError_=function(){var e=this.tech_.error();this.error(e)},i.handleTechTextData_=function(){var e=null;arguments.length>1&&(e=arguments[1]),this.trigger("textdata",e)},i.getCache=function(){return this.cache_},i.resetCache_=function(){this.cache_={currentTime:0,initTime:0,inactivityTimeout:this.options_.inactivityTimeout,duration:NaN,lastVolume:1,lastPlaybackRate:this.defaultPlaybackRate(),media:null,src:"",source:{},sources:[],playbackRates:[],volume:1}},i.techCall_=function(e,t){this.ready((function(){if(e in Ui)return function(e,t,i,n){return t[i](e.reduce(ji(i),n))}(this.middleware_,this.tech_,e,t);if(e in Bi)return Ni(this.middleware_,this.tech_,e,t);try{this.tech_&&this.tech_[e](t)}catch(e){throw q(e),e}}),!0)},i.techGet_=function(e){if(this.tech_&&this.tech_.isReady_){if(e in Ri)return function(e,t,i){return e.reduceRight(ji(i),t[i]())}(this.middleware_,this.tech_,e);if(e in Bi)return Ni(this.middleware_,this.tech_,e);try{return this.tech_[e]()}catch(t){if(void 0===this.tech_[e])throw q("Video.js: "+e+" method not defined for "+this.techName_+" playback technology.",t),t;if("TypeError"===t.name)throw q("Video.js: "+e+" unavailable on "+this.techName_+" playback technology element.",t),this.tech_.isReady_=!1,t;throw q(t),t}}},i.play=function(){var e=this,t=this.options_.Promise||s().Promise;return t?new t((function(t){e.play_(t)})):this.play_()},i.play_=function(e){var t=this;void 0===e&&(e=Qt),this.playCallbacks_.push(e);var i=Boolean(!this.changingSrc_&&(this.src()||this.currentSrc()));if(this.waitToPlay_&&(this.off(["ready","loadstart"],this.waitToPlay_),this.waitToPlay_=null),!this.isReady_||!i)return this.waitToPlay_=function(e){t.play_()},this.one(["ready","loadstart"],this.waitToPlay_),void(i||!ve&&!ge||this.load());var n=this.techGet_("play");null===n?this.runPlayTerminatedQueue_():this.runPlayCallbacks_(n)},i.runPlayTerminatedQueue_=function(){var e=this.playTerminatedQueue_.slice(0);this.playTerminatedQueue_=[],e.forEach((function(e){e()}))},i.runPlayCallbacks_=function(e){var t=this.playCallbacks_.slice(0);this.playCallbacks_=[],this.playTerminatedQueue_=[],t.forEach((function(t){t(e)}))},i.pause=function(){this.techCall_("pause")},i.paused=function(){return!1!==this.techGet_("paused")},i.played=function(){return this.techGet_("played")||$t(0,0)},i.scrubbing=function(e){if(void 0===e)return this.scrubbing_;this.scrubbing_=!!e,this.techCall_("setScrubbing",this.scrubbing_),e?this.addClass("vjs-scrubbing"):this.removeClass("vjs-scrubbing")},i.currentTime=function(e){return void 0!==e?(e<0&&(e=0),this.isReady_&&!this.changingSrc_&&this.tech_&&this.tech_.isReady_?(this.techCall_("setCurrentTime",e),void(this.cache_.initTime=0)):(this.cache_.initTime=e,this.off("canplay",this.boundApplyInitTime_),void this.one("canplay",this.boundApplyInitTime_))):(this.cache_.currentTime=this.techGet_("currentTime")||0,this.cache_.currentTime)},i.applyInitTime_=function(){this.currentTime(this.cache_.initTime)},i.duration=function(e){if(void 0===e)return void 0!==this.cache_.duration?this.cache_.duration:NaN;(e=parseFloat(e))<0&&(e=1/0),e!==this.cache_.duration&&(this.cache_.duration=e,e===1/0?this.addClass("vjs-live"):this.removeClass("vjs-live"),isNaN(e)||this.trigger("durationchange"))},i.remainingTime=function(){return this.duration()-this.currentTime()},i.remainingTimeDisplay=function(){return Math.floor(this.duration())-Math.floor(this.currentTime())},i.buffered=function(){var e=this.techGet_("buffered");return e&&e.length||(e=$t(0,0)),e},i.bufferedPercent=function(){return Xt(this.buffered(),this.duration())},i.bufferedEnd=function(){var e=this.buffered(),t=this.duration(),i=e.end(e.length-1);return i>t&&(i=t),i},i.volume=function(e){var t;return void 0!==e?(t=Math.max(0,Math.min(1,parseFloat(e))),this.cache_.volume=t,this.techCall_("setVolume",t),void(t>0&&this.lastVolume_(t))):(t=parseFloat(this.techGet_("volume")),isNaN(t)?1:t)},i.muted=function(e){if(void 0===e)return this.techGet_("muted")||!1;this.techCall_("setMuted",e)},i.defaultMuted=function(e){return void 0!==e?this.techCall_("setDefaultMuted",e):this.techGet_("defaultMuted")||!1},i.lastVolume_=function(e){if(void 0===e||0===e)return this.cache_.lastVolume;this.cache_.lastVolume=e},i.supportsFullScreen=function(){return this.techGet_("supportsFullScreen")||!1},i.isFullscreen=function(e){if(void 0!==e){var t=this.isFullscreen_;return this.isFullscreen_=Boolean(e),this.isFullscreen_!==t&&this.fsApi_.prefixed&&this.trigger("fullscreenchange"),void this.toggleFullscreenClass_()}return this.isFullscreen_},i.requestFullscreen=function(e){var t=this.options_.Promise||s().Promise;if(t){var i=this;return new t((function(t,n){function r(){i.off("fullscreenerror",a),i.off("fullscreenchange",s)}function s(){r(),t()}function a(e,t){r(),n(t)}i.one("fullscreenchange",s),i.one("fullscreenerror",a);var o=i.requestFullscreenHelper_(e);o&&(o.then(r,r),o.then(t,n))}))}return this.requestFullscreenHelper_()},i.requestFullscreenHelper_=function(e){var t,i=this;if(this.fsApi_.prefixed||(t=this.options_.fullscreen&&this.options_.fullscreen.options||{},void 0!==e&&(t=e)),this.fsApi_.requestFullscreen){var n=this.el_[this.fsApi_.requestFullscreen](t);return n&&n.then((function(){return i.isFullscreen(!0)}),(function(){return i.isFullscreen(!1)})),n}this.tech_.supportsFullScreen()&&!0==!this.options_.preferFullWindow?this.techCall_("enterFullScreen"):this.enterFullWindow()},i.exitFullscreen=function(){var e=this.options_.Promise||s().Promise;if(e){var t=this;return new e((function(e,i){function n(){t.off("fullscreenerror",s),t.off("fullscreenchange",r)}function r(){n(),e()}function s(e,t){n(),i(t)}t.one("fullscreenchange",r),t.one("fullscreenerror",s);var a=t.exitFullscreenHelper_();a&&(a.then(n,n),a.then(e,i))}))}return this.exitFullscreenHelper_()},i.exitFullscreenHelper_=function(){var e=this;if(this.fsApi_.requestFullscreen){var t=o()[this.fsApi_.exitFullscreen]();return t&&Qt(t.then((function(){return e.isFullscreen(!1)}))),t}this.tech_.supportsFullScreen()&&!0==!this.options_.preferFullWindow?this.techCall_("exitFullScreen"):this.exitFullWindow()},i.enterFullWindow=function(){this.isFullscreen(!0),this.isFullWindow=!0,this.docOrigOverflow=o().documentElement.style.overflow,pt(o(),"keydown",this.boundFullWindowOnEscKey_),o().documentElement.style.overflow="hidden",Pe(o().body,"vjs-full-window"),this.trigger("enterFullWindow")},i.fullWindowOnEscKey=function(e){c().isEventKey(e,"Esc")&&!0===this.isFullscreen()&&(this.isFullWindow?this.exitFullWindow():this.exitFullscreen())},i.exitFullWindow=function(){this.isFullscreen(!1),this.isFullWindow=!1,ft(o(),"keydown",this.boundFullWindowOnEscKey_),o().documentElement.style.overflow=this.docOrigOverflow,Ie(o().body,"vjs-full-window"),this.trigger("exitFullWindow")},i.disablePictureInPicture=function(e){if(void 0===e)return this.techGet_("disablePictureInPicture");this.techCall_("setDisablePictureInPicture",e),this.options_.disablePictureInPicture=e,this.trigger("disablepictureinpicturechanged")},i.isInPictureInPicture=function(e){return void 0!==e?(this.isInPictureInPicture_=!!e,void this.togglePictureInPictureClass_()):!!this.isInPictureInPicture_},i.requestPictureInPicture=function(){if("pictureInPictureEnabled" in o()&&!1===this.disablePictureInPicture())return this.techGet_("requestPictureInPicture")},i.exitPictureInPicture=function(){if("pictureInPictureEnabled" in o())return o().exitPictureInPicture()},i.handleKeyDown=function(e){var t=this.options_.userActions;if(t&&t.hotkeys){(function(e){var t=e.tagName.toLowerCase();if(e.isContentEditable)return!0;if("input"===t)return-1===["button","checkbox","hidden","radio","reset","submit"].indexOf(e.type);return-1!==["textarea"].indexOf(t)})(this.el_.ownerDocument.activeElement)||("function"==typeof t.hotkeys?t.hotkeys.call(this,e):this.handleHotkeys(e))}},i.handleHotkeys=function(e){var t=this.options_.userActions?this.options_.userActions.hotkeys:{},i=t.fullscreenKey,n=void 0===i?function(e){return c().isEventKey(e,"f")}:i,r=t.muteKey,s=void 0===r?function(e){return c().isEventKey(e,"m")}:r,a=t.playPauseKey,l=void 0===a?function(e){return c().isEventKey(e,"k")||c().isEventKey(e,"Space")}:a;if(n.call(this,e)){e.preventDefault(),e.stopPropagation();var u=zt.getComponent("FullscreenToggle");!1!==o()[this.fsApi_.fullscreenEnabled]&&u.prototype.handleClick.call(this,e)}else if(s.call(this,e)){e.preventDefault(),e.stopPropagation(),zt.getComponent("MuteToggle").prototype.handleClick.call(this,e)}else if(l.call(this,e)){e.preventDefault(),e.stopPropagation(),zt.getComponent("PlayToggle").prototype.handleClick.call(this,e)}},i.canPlayType=function(e){for(var t,i=0,n=this.options_.techOrder;i<n.length;i++){var r=n[i],s=Ii.getTech(r);if(s||(s=zt.getComponent(r)),s){if(s.isSupported()&&(t=s.canPlayType(e)))return t}else q.error('The "'+r+'" tech is undefined. Skipped browser support check for that tech.')}return""},i.selectSource=function(e){var t,i=this,n=this.options_.techOrder.map((function(e){return[e,Ii.getTech(e)]})).filter((function(e){var t=e[0],i=e[1];return i?i.isSupported():(q.error('The "'+t+'" tech is undefined. Skipped browser support check for that tech.'),!1)})),r=function(e,t,i){var n;return e.some((function(e){return t.some((function(t){if(n=i(e,t))return!0}))})),n},s=function(e,t){var n=e[0];if(e[1].canPlaySource(t,i.options_[n.toLowerCase()]))return{source:t,tech:n}};return(this.options_.sourceOrder?r(e,n,(t=s,function(e,i){return t(i,e)})):r(n,e,s))||!1},i.handleSrc_=function(e,t){var i=this;if(void 0===e)return this.cache_.src||"";this.resetRetryOnError_&&this.resetRetryOnError_();var n=zi(e);if(n.length){if(this.changingSrc_=!0,t||(this.cache_.sources=n),this.updateSourceCaches_(n[0]),Mi(this,n[0],(function(e,r){var s,a;if(i.middleware_=r,t||(i.cache_.sources=n),i.updateSourceCaches_(e),i.src_(e))return n.length>1?i.handleSrc_(n.slice(1)):(i.changingSrc_=!1,i.setTimeout((function(){this.error({code:4,message:this.localize(this.options_.notSupportedMessage)})}),0),void i.triggerReady());s=r,a=i.tech_,s.forEach((function(e){return e.setTech&&e.setTech(a)}))})),this.options_.retryOnError&&n.length>1){var r=function(){i.error(null),i.handleSrc_(n.slice(1),!0)},s=function(){i.off("error",r)};this.one("error",r),this.one("playing",s),this.resetRetryOnError_=function(){i.off("error",r),i.off("playing",s)}}}else this.setTimeout((function(){this.error({code:4,message:this.localize(this.options_.notSupportedMessage)})}),0)},i.src=function(e){return this.handleSrc_(e,!1)},i.src_=function(e){var t,i,n=this,r=this.selectSource([e]);return!r||(t=r.tech,i=this.techName_,Ut(t)!==Ut(i)?(this.changingSrc_=!0,this.loadTech_(r.tech,r.source),this.tech_.ready((function(){n.changingSrc_=!1})),!1):(this.ready((function(){this.tech_.constructor.prototype.hasOwnProperty("setSource")?this.techCall_("setSource",e):this.techCall_("src",e.src),this.changingSrc_=!1}),!0),!1))},i.load=function(){this.techCall_("load")},i.reset=function(){var e=this,t=this.options_.Promise||s().Promise;this.paused()||!t?this.doReset_():Qt(this.play().then((function(){return e.doReset_()})))},i.doReset_=function(){this.tech_&&this.tech_.clearTracks("text"),this.resetCache_(),this.poster(""),this.loadTech_(this.options_.techOrder[0],null),this.techCall_("reset"),this.resetControlBarUI_(),Et(this)&&this.trigger("playerreset")},i.resetControlBarUI_=function(){this.resetProgressBar_(),this.resetPlaybackRate_(),this.resetVolumeBar_()},i.resetProgressBar_=function(){this.currentTime(0);var e=this.controlBar,t=e.durationDisplay,i=e.remainingTimeDisplay;t&&t.updateContent(),i&&i.updateContent()},i.resetPlaybackRate_=function(){this.playbackRate(this.defaultPlaybackRate()),this.handleTechRateChange_()},i.resetVolumeBar_=function(){this.volume(1),this.trigger("volumechange")},i.currentSources=function(){var e=this.currentSource(),t=[];return 0!==Object.keys(e).length&&t.push(e),this.cache_.sources||t},i.currentSource=function(){return this.cache_.source||{}},i.currentSrc=function(){return this.currentSource()&&this.currentSource().src||""},i.currentType=function(){return this.currentSource()&&this.currentSource().type||""},i.preload=function(e){return void 0!==e?(this.techCall_("setPreload",e),void(this.options_.preload=e)):this.techGet_("preload")},i.autoplay=function(e){if(void 0===e)return this.options_.autoplay||!1;var t;"string"==typeof e&&/(any|play|muted)/.test(e)||!0===e&&this.options_.normalizeAutoplay?(this.options_.autoplay=e,this.manualAutoplay_("string"==typeof e?e:"play"),t=!1):this.options_.autoplay=!!e,t=void 0===t?this.options_.autoplay:t,this.tech_&&this.techCall_("setAutoplay",t)},i.playsinline=function(e){return void 0!==e?(this.techCall_("setPlaysinline",e),this.options_.playsinline=e,this):this.techGet_("playsinline")},i.loop=function(e){return void 0!==e?(this.techCall_("setLoop",e),void(this.options_.loop=e)):this.techGet_("loop")},i.poster=function(e){if(void 0===e)return this.poster_;e||(e=""),e!==this.poster_&&(this.poster_=e,this.techCall_("setPoster",e),this.isPosterFromTech_=!1,this.trigger("posterchange"))},i.handleTechPosterChange_=function(){if((!this.poster_||this.options_.techCanOverridePoster)&&this.tech_&&this.tech_.poster){var e=this.tech_.poster()||"";e!==this.poster_&&(this.poster_=e,this.isPosterFromTech_=!0,this.trigger("posterchange"))}},i.controls=function(e){if(void 0===e)return!!this.controls_;e=!!e,this.controls_!==e&&(this.controls_=e,this.usingNativeControls()&&this.techCall_("setControls",e),this.controls_?(this.removeClass("vjs-controls-disabled"),this.addClass("vjs-controls-enabled"),this.trigger("controlsenabled"),this.usingNativeControls()||this.addTechControlsListeners_()):(this.removeClass("vjs-controls-enabled"),this.addClass("vjs-controls-disabled"),this.trigger("controlsdisabled"),this.usingNativeControls()||this.removeTechControlsListeners_()))},i.usingNativeControls=function(e){if(void 0===e)return!!this.usingNativeControls_;e=!!e,this.usingNativeControls_!==e&&(this.usingNativeControls_=e,this.usingNativeControls_?(this.addClass("vjs-using-native-controls"),this.trigger("usingnativecontrols")):(this.removeClass("vjs-using-native-controls"),this.trigger("usingcustomcontrols")))},i.error=function(e){var t=this;if(void 0===e)return this.error_||null;if(M("beforeerror").forEach((function(i){var n=i(t,e);G(n)&&!Array.isArray(n)||"string"==typeof n||"number"==typeof n||null===n?e=n:t.log.error("please return a value that MediaError expects in beforeerror hooks")})),this.options_.suppressNotSupportedError&&e&&4===e.code){var i=function(){this.error(e)};return this.options_.suppressNotSupportedError=!1,this.any(["click","touchstart"],i),void this.one("loadstart",(function(){this.off(["click","touchstart"],i)}))}if(null===e)return this.error_=e,this.removeClass("vjs-error"),void(this.errorDisplay&&this.errorDisplay.close());this.error_=new Gt(e),this.addClass("vjs-error"),q.error("(CODE:"+this.error_.code+" "+Gt.errorTypes[this.error_.code]+")",this.error_.message,this.error_),this.trigger("error"),M("error").forEach((function(e){return e(t,t.error_)}))},i.reportUserActivity=function(e){this.userActivity_=!0},i.userActive=function(e){if(void 0===e)return this.userActive_;if((e=!!e)!==this.userActive_){if(this.userActive_=e,this.userActive_)return this.userActivity_=!0,this.removeClass("vjs-user-inactive"),this.addClass("vjs-user-active"),void this.trigger("useractive");this.tech_&&this.tech_.one("mousemove",(function(e){e.stopPropagation(),e.preventDefault()})),this.userActivity_=!1,this.removeClass("vjs-user-active"),this.addClass("vjs-user-inactive"),this.trigger("userinactive")}},i.listenForUserActivity_=function(){var e,t,i,n=Tt(this,this.reportUserActivity),r=function(t){n(),this.clearInterval(e)};this.on("mousedown",(function(){n(),this.clearInterval(e),e=this.setInterval(n,250)})),this.on("mousemove",(function(e){e.screenX===t&&e.screenY===i||(t=e.screenX,i=e.screenY,n())})),this.on("mouseup",r),this.on("mouseleave",r);var s,a=this.getChild("controlBar");!a||ge||ne||(a.on("mouseenter",(function(e){0!==this.player().options_.inactivityTimeout&&(this.player().cache_.inactivityTimeout=this.player().options_.inactivityTimeout),this.player().options_.inactivityTimeout=0})),a.on("mouseleave",(function(e){this.player().options_.inactivityTimeout=this.player().cache_.inactivityTimeout}))),this.on("keydown",n),this.on("keyup",n),this.setInterval((function(){if(this.userActivity_){this.userActivity_=!1,this.userActive(!0),this.clearTimeout(s);var e=this.options_.inactivityTimeout;e<=0||(s=this.setTimeout((function(){this.userActivity_||this.userActive(!1)}),e))}}),250)},i.playbackRate=function(e){if(void 0===e)return this.tech_&&this.tech_.featuresPlaybackRate?this.cache_.lastPlaybackRate||this.techGet_("playbackRate"):1;this.techCall_("setPlaybackRate",e)},i.defaultPlaybackRate=function(e){return void 0!==e?this.techCall_("setDefaultPlaybackRate",e):this.tech_&&this.tech_.featuresPlaybackRate?this.techGet_("defaultPlaybackRate"):1},i.isAudio=function(e){if(void 0===e)return!!this.isAudio_;this.isAudio_=!!e},i.addTextTrack=function(e,t,i){if(this.tech_)return this.tech_.addTextTrack(e,t,i)},i.addRemoteTextTrack=function(e,t){if(this.tech_)return this.tech_.addRemoteTextTrack(e,t)},i.removeRemoteTextTrack=function(e){void 0===e&&(e={});var t=e.track;if(t||(t=e),this.tech_)return this.tech_.removeRemoteTextTrack(t)},i.getVideoPlaybackQuality=function(){return this.techGet_("getVideoPlaybackQuality")},i.videoWidth=function(){return this.tech_&&this.tech_.videoWidth&&this.tech_.videoWidth()||0},i.videoHeight=function(){return this.tech_&&this.tech_.videoHeight&&this.tech_.videoHeight()||0},i.language=function(e){if(void 0===e)return this.language_;this.language_!==String(e).toLowerCase()&&(this.language_=String(e).toLowerCase(),Et(this)&&this.trigger("languagechange"))},i.languages=function(){return Bt(t.prototype.options_.languages,this.languages_)},i.toJSON=function(){var e=Bt(this.options_),t=e.tracks;e.tracks=[];for(var i=0;i<t.length;i++){var n=t[i];(n=Bt(n)).player=void 0,e.tracks[i]=n}return e},i.createModal=function(e,t){var i=this;(t=t||{}).content=e||"";var n=new ti(this,t);return this.addChild(n),n.on("dispose",(function(){i.removeChild(n)})),n.open(),n},i.updateCurrentBreakpoint_=function(){if(this.responsive())for(var e=this.currentBreakpoint(),t=this.currentWidth(),i=0;i<Or.length;i++){var n=Or[i];if(t<=this.breakpoints_[n]){if(e===n)return;e&&this.removeClass(Lr[e]),this.addClass(Lr[n]),this.breakpoint_=n;break}}},i.removeCurrentBreakpoint_=function(){var e=this.currentBreakpointClass();this.breakpoint_="",e&&this.removeClass(e)},i.breakpoints=function(e){return void 0===e||(this.breakpoint_="",this.breakpoints_=X({},Dr,e),this.updateCurrentBreakpoint_()),X(this.breakpoints_)},i.responsive=function(e){return void 0===e?this.responsive_:(e=Boolean(e))!==this.responsive_?(this.responsive_=e,e?(this.on("playerresize",this.boundUpdateCurrentBreakpoint_),this.updateCurrentBreakpoint_()):(this.off("playerresize",this.boundUpdateCurrentBreakpoint_),this.removeCurrentBreakpoint_()),e):void 0},i.currentBreakpoint=function(){return this.breakpoint_},i.currentBreakpointClass=function(){return Lr[this.breakpoint_]||""},i.loadMedia=function(e,t){var i=this;if(e&&"object"==typeof e){this.reset(),this.cache_.media=Bt(e);var n=this.cache_.media,r=n.artwork,s=n.poster,a=n.src,o=n.textTracks;!r&&s&&(this.cache_.media.artwork=[{src:s,type:qi(s)}]),a&&this.src(a),s&&this.poster(s),Array.isArray(o)&&o.forEach((function(e){return i.addRemoteTextTrack(e,!1)})),this.ready(t)}},i.getMedia=function(){if(!this.cache_.media){var e=this.poster(),t={src:this.currentSources(),textTracks:Array.prototype.map.call(this.remoteTextTracks(),(function(e){return{kind:e.kind,label:e.label,language:e.language,src:e.src}}))};return e&&(t.poster=e,t.artwork=[{src:t.poster,type:qi(t.poster)}]),t}return Bt(this.cache_.media)},t.getTagSettings=function(e){var t={sources:[],tracks:[]},i=De(e),n=i["data-setup"];if(Ae(e,"vjs-fill")&&(i.fill=!0),Ae(e,"vjs-fluid")&&(i.fluid=!0),null!==n){var r=f()(n||"{}"),s=r[0],a=r[1];s&&q.error(s),X(i,a)}if(X(t,i),e.hasChildNodes())for(var o=e.childNodes,l=0,u=o.length;l<u;l++){var c=o[l],d=c.nodeName.toLowerCase();"source"===d?t.sources.push(De(c)):"track"===d&&t.tracks.push(De(c))}return t},i.flexNotSupported_=function(){var e=o().createElement("i");return!("flexBasis" in e.style||"webkitFlexBasis" in e.style||"mozFlexBasis" in e.style||"msFlexBasis" in e.style||"msFlexOrder" in e.style)},i.debug=function(e){if(void 0===e)return this.debugEnabled_;e?(this.trigger("debugon"),this.previousLogLevel_=this.log.level,this.log.level("debug"),this.debugEnabled_=!0):(this.trigger("debugoff"),this.log.level(this.previousLogLevel_),this.previousLogLevel_=void 0,this.debugEnabled_=!1)},i.playbackRates=function(e){if(void 0===e)return this.cache_.playbackRates;Array.isArray(e)&&e.every((function(e){return"number"==typeof e}))&&(this.cache_.playbackRates=e,this.trigger("playbackrateschange"))},t}(zt);Pi.names.forEach((function(e){var t=Pi[e];Mr.prototype[t.getterName]=function(){return this.tech_?this.tech_[t.getterName]():(this[t.privateName]=this[t.privateName]||new t.ListClass,this[t.privateName])}})),Mr.prototype.crossorigin=Mr.prototype.crossOrigin,Mr.players={};var Nr=s().navigator;Mr.prototype.options_={techOrder:Ii.defaultTechOrder_,html5:{},inactivityTimeout:2e3,playbackRates:[],liveui:!1,children:["mediaLoader","posterImage","textTrackDisplay","loadingSpinner","bigPlayButton","liveTracker","controlBar","errorDisplay","textTrackSettings","resizeManager"],language:Nr&&(Nr.languages&&Nr.languages[0]||Nr.userLanguage||Nr.language)||"en",languages:{},notSupportedMessage:"No compatible source was found for this media.",normalizeAutoplay:!1,fullscreen:{options:{navigationUI:"hide"}},breakpoints:{},responsive:!1},["ended","seeking","seekable","networkState","readyState"].forEach((function(e){Mr.prototype[e]=function(){return this.techGet_(e)}})),Pr.forEach((function(e){Mr.prototype["handleTech"+Ut(e)+"_"]=function(){return this.trigger(e)}})),zt.registerComponent("Player",Mr);var Rr="plugin",Ur={},Br=function(e){return Ur.hasOwnProperty(e)},jr=function(e){return Br(e)?Ur[e]:void 0},Fr=function(e,t){e.activePlugins_=e.activePlugins_||{},e.activePlugins_[t]=!0},Hr=function(e,t,i){var n=(i?"before":"")+"pluginsetup";e.trigger(n,t),e.trigger(n+":"+t.name,t)},qr=function(e,t){return t.prototype.name=e,function(){Hr(this,{name:e,plugin:t,instance:null},!0);for(var i=arguments.length,n=new Array(i),r=0;r<i;r++)n[r]=arguments[r];var s=(0,_.default)(t,[this].concat(n));return this[e]=function(){return s},Hr(this,s.getEventHash()),s}},zr=function(){function e(t){if(this.constructor===e)throw new Error("Plugin must be sub-classed; not directly instantiated.");this.player=t,this.log||(this.log=this.player.log.createLogger(this.name)),Dt(this),delete this.trigger,Nt(this,this.constructor.defaultState),Fr(t,this.name),this.dispose=this.dispose.bind(this),t.on("dispose",this.dispose)}var t=e.prototype;return t.version=function(){return this.constructor.VERSION},t.getEventHash=function(e){return void 0===e&&(e={}),e.name=this.name,e.plugin=this.constructor,e.instance=this,e},t.trigger=function(e,t){return void 0===t&&(t={}),mt(this.eventBusEl_,e,this.getEventHash(t))},t.handleStateChanged=function(e){},t.dispose=function(){var e=this.name,t=this.player;this.trigger("dispose"),this.off(),t.off("dispose",this.dispose),t.activePlugins_[e]=!1,this.player=this.state=null,t[e]=qr(e,Ur[e])},e.isBasic=function(t){var i="string"==typeof t?jr(t):t;return"function"==typeof i&&!e.prototype.isPrototypeOf(i.prototype)},e.registerPlugin=function(t,i){if("string"!=typeof t)throw new Error('Illegal plugin name, "'+t+'", must be a string, was '+typeof t+".");if(Br(t))q.warn('A plugin named "'+t+'" already exists. You may want to avoid re-registering plugins!');else if(Mr.prototype.hasOwnProperty(t))throw new Error('Illegal plugin name, "'+t+'", cannot share a name with an existing player method!');if("function"!=typeof i)throw new Error('Illegal plugin for "'+t+'", must be a function, was '+typeof i+".");return Ur[t]=i,t!==Rr&&(e.isBasic(i)?Mr.prototype[t]=function(e,t){var i=function(){Hr(this,{name:e,plugin:t,instance:null},!0);var i=t.apply(this,arguments);return Fr(this,e),Hr(this,{name:e,plugin:t,instance:i}),i};return Object.keys(t).forEach((function(e){i[e]=t[e]})),i}(t,i):Mr.prototype[t]=qr(t,i)),i},e.deregisterPlugin=function(e){if(e===Rr)throw new Error("Cannot de-register base plugin.");Br(e)&&(delete Ur[e],delete Mr.prototype[e])},e.getPlugins=function(e){var t;return void 0===e&&(e=Object.keys(Ur)),e.forEach((function(e){var i=jr(e);i&&((t=t||{})[e]=i)})),t},e.getPluginVersion=function(e){var t=jr(e);return t&&t.VERSION||""},e}();zr.getPlugin=jr,zr.BASE_PLUGIN_NAME=Rr,zr.registerPlugin(Rr,zr),Mr.prototype.usingPlugin=function(e){return!!this.activePlugins_&&!0===this.activePlugins_[e]},Mr.prototype.hasPlugin=function(e){return!!Br(e)};var Wr=function(e){return 0===e.indexOf("#")?e.slice(1):e};function Vr(e,t,i){var n=Vr.getPlayer(e);if(n)return t&&q.warn('Player "'+e+'" is already initialised. Options will not be applied.'),i&&n.ready(i),n;var r="string"==typeof e?Ye("#"+Wr(e)):e;if(!we(r))throw new TypeError("The element or ID supplied is not valid. (videojs)");r.ownerDocument.defaultView&&r.ownerDocument.body.contains(r)||q.warn("The element supplied is not included in the DOM"),t=t||{},M("beforesetup").forEach((function(e){var i=e(r,Bt(t));G(i)&&!Array.isArray(i)?t=Bt(t,i):q.error("please return an object in beforesetup hooks")}));var s=zt.getComponent("Player");return n=new s(r,t,i),M("setup").forEach((function(e){return e(n)})),n}if(Vr.hooks_=D,Vr.hooks=M,Vr.hook=function(e,t){M(e,t)},Vr.hookOnce=function(e,t){M(e,[].concat(t).map((function(t){return function i(){return N(e,i),t.apply(void 0,arguments)}})))},Vr.removeHook=N,!0!==s().VIDEOJS_NO_DYNAMIC_STYLE&&Te()){var $r=Ye(".vjs-styles-defaults");if(!$r){$r=nt("vjs-styles-defaults");var Xr=Ye("head");Xr&&Xr.insertBefore($r,Xr.firstChild),rt($r,"\n      .video-js {\n        width: 300px;\n        height: 150px;\n      }\n\n      .vjs-fluid {\n        padding-top: 56.25%\n      }\n    ")}}et(1,Vr),Vr.VERSION=L,Vr.options=Mr.prototype.options_,Vr.getPlayers=function(){return Mr.players},Vr.getPlayer=function(e){var t,i=Mr.players;if("string"==typeof e){var n=Wr(e),r=i[n];if(r)return r;t=Ye("#"+n)}else t=e;if(we(t)){var s=t,a=s.player,o=s.playerId;if(a||i[o])return a||i[o]}},Vr.getAllPlayers=function(){return Object.keys(Mr.players).map((function(e){return Mr.players[e]})).filter(Boolean)},Vr.players=Mr.players,Vr.getComponent=zt.getComponent,Vr.registerComponent=function(e,t){Ii.isTech(t)&&q.warn("The "+e+" tech was registered as a component. It should instead be registered using videojs.registerTech(name, tech)"),zt.registerComponent.call(zt,e,t)},Vr.getTech=Ii.getTech,Vr.registerTech=Ii.registerTech,Vr.use=function(e,t){Oi[e]=Oi[e]||[],Oi[e].push(t)},Object.defineProperty(Vr,"middleware",{value:{},writeable:!1,enumerable:!0}),Object.defineProperty(Vr.middleware,"TERMINATOR",{value:Di,writeable:!1,enumerable:!0}),Vr.browser=ye,Vr.TOUCH_ENABLED=pe,Vr.extend=function(e,t){void 0===t&&(t={});var i=function(){e.apply(this,arguments)},n={};for(var r in"object"==typeof t?(t.constructor!==Object.prototype.constructor&&(i=t.constructor),n=t):"function"==typeof t&&(i=t),(0,b.default)(i,e),e&&(i.super_=e),n)n.hasOwnProperty(r)&&(i.prototype[r]=n[r]);return i},Vr.mergeOptions=Bt,Vr.bind=Tt,Vr.registerPlugin=zr.registerPlugin,Vr.deregisterPlugin=zr.deregisterPlugin,Vr.plugin=function(e,t){return q.warn("videojs.plugin() is deprecated; use videojs.registerPlugin() instead"),zr.registerPlugin(e,t)},Vr.getPlugins=zr.getPlugins,Vr.getPlugin=zr.getPlugin,Vr.getPluginVersion=zr.getPluginVersion,Vr.addLanguage=function(e,t){var i;return e=(""+e).toLowerCase(),Vr.options.languages=Bt(Vr.options.languages,((i={})[e]=t,i)),Vr.options.languages[e]},Vr.log=q,Vr.createLogger=z,Vr.createTimeRange=Vr.createTimeRanges=$t,Vr.formatTime=an,Vr.setFormatTime=function(e){sn=e},Vr.resetFormatTime=function(){sn=rn},Vr.parseUrl=gi,Vr.isCrossOrigin=_i,Vr.EventTarget=St,Vr.on=pt,Vr.one=gt,Vr.off=ft,Vr.trigger=mt,Vr.xhr=g(),Vr.TextTrack=Si,Vr.AudioTrack=ki,Vr.VideoTrack=Ei,["isEl","isTextNode","createEl","hasClass","addClass","removeClass","toggleClass","setAttributes","getAttributes","emptyEl","appendContent","insertContent"].forEach((function(e){Vr[e]=function(){return q.warn("videojs."+e+"() is deprecated; use videojs.dom."+e+"() instead"),Qe[e].apply(null,arguments)}})),Vr.computedStyle=K,Vr.dom=Qe,Vr.url=bi,Vr.defineLazyProperty=xr,Vr.addLanguage("en",{"Non-Fullscreen":"Exit Fullscreen"});var Gr=T.default,Yr=function(e,t,i){return e&&i&&i.responseURL&&t!==i.responseURL?i.responseURL:t},Kr=function(e){return Vr.log.debug?Vr.log.debug.bind(Vr,"VHS:",e+" >"):function(){}},Qr=1/30,Jr=.1,Zr=function(e,t){var i,n=[];if(e&&e.length)for(i=0;i<e.length;i++)t(e.start(i),e.end(i))&&n.push([e.start(i),e.end(i)]);return Vr.createTimeRanges(n)},es=function(e,t){return Zr(e,(function(e,i){return e-Jr<=t&&i+Jr>=t}))},ts=function(e,t){return Zr(e,(function(e){return e-Qr>=t}))},is=function(e){var t=[];if(!e||!e.length)return"";for(var i=0;i<e.length;i++)t.push(e.start(i)+" => "+e.end(i));return t.join(", ")},ns=function(e){for(var t=[],i=0;i<e.length;i++)t.push({start:e.start(i),end:e.end(i)});return t},rs=function(e){if(e&&e.length&&e.end)return e.end(e.length-1)},ss=function(e,t){var i=0;if(!e||!e.length)return i;for(var n=0;n<e.length;n++){var r=e.start(n),s=e.end(n);t>s||(i+=t>r&&t<=s?s-t:s-r)}return i},as=Vr.createTimeRange,os=function(e,t){if(!t.preload)return t.duration;var i=0;return(t.parts||[]).forEach((function(e){i+=e.duration})),(t.preloadHints||[]).forEach((function(t){"PART"===t.type&&(i+=e.partTargetDuration)})),i},ls=function(e){return(e.segments||[]).reduce((function(e,t,i){return t.parts?t.parts.forEach((function(n,r){e.push({duration:n.duration,segmentIndex:i,partIndex:r,part:n,segment:t})})):e.push({duration:t.duration,segmentIndex:i,partIndex:null,segment:t,part:null}),e}),[])},us=function(e){var t=e.segments&&e.segments.length&&e.segments[e.segments.length-1];return t&&t.parts||[]},cs=function(e){var t=e.preloadSegment;if(t){var i=t.parts,n=(t.preloadHints||[]).reduce((function(e,t){return e+("PART"===t.type?1:0)}),0);return n+=i&&i.length?i.length:0}},ds=function(e,t){if(t.endList)return 0;if(e&&e.suggestedPresentationDelay)return e.suggestedPresentationDelay;var i=us(t).length>0;return i&&t.serverControl&&t.serverControl.partHoldBack?t.serverControl.partHoldBack:i&&t.partTargetDuration?3*t.partTargetDuration:t.serverControl&&t.serverControl.holdBack?t.serverControl.holdBack:t.targetDuration?3*t.targetDuration:0},hs=function(e,t,i){if(void 0===t&&(t=e.mediaSequence+e.segments.length),t<e.mediaSequence)return 0;var n=function(e,t){var i=0,n=t-e.mediaSequence,r=e.segments[n];if(r){if(void 0!==r.start)return{result:r.start,precise:!0};if(void 0!==r.end)return{result:r.end-r.duration,precise:!0}}for(;n--;){if(void 0!==(r=e.segments[n]).end)return{result:i+r.end,precise:!0};if(i+=os(e,r),void 0!==r.start)return{result:i+r.start,precise:!0}}return{result:i,precise:!1}}(e,t);if(n.precise)return n.result;var r=function(e,t){for(var i,n=0,r=t-e.mediaSequence;r<e.segments.length;r++){if(void 0!==(i=e.segments[r]).start)return{result:i.start-n,precise:!0};if(n+=os(e,i),void 0!==i.end)return{result:i.end-n,precise:!0}}return{result:-1,precise:!1}}(e,t);return r.precise?r.result:n.result+i},ps=function(e,t,i){if(!e)return 0;if("number"!=typeof i&&(i=0),void 0===t){if(e.totalDuration)return e.totalDuration;if(!e.endList)return s()[1/0]}return hs(e,t,i)},fs=function(e){var t=e.defaultDuration,i=e.durationList,n=e.startIndex,r=e.endIndex,s=0;if(n>r){var a=[r,n];n=a[0],r=a[1]}if(n<0){for(var o=n;o<Math.min(0,r);o++)s+=t;n=0}for(var l=n;l<r;l++)s+=i[l].duration;return s},ms=function(e,t,i,n){if(!e||!e.segments)return null;if(e.endList)return ps(e);if(null===t)return null;t=t||0;var r=hs(e,e.mediaSequence+e.segments.length,t);return i&&(r-=n="number"==typeof n?n:ds(null,e)),Math.max(0,r)},gs=function(e){return e.excludeUntil&&e.excludeUntil>Date.now()},vs=function(e){return e.excludeUntil&&e.excludeUntil===1/0},ys=function(e){var t=gs(e);return!e.disabled&&!t},_s=function(e,t){return t.attributes&&t.attributes[e]},bs=function(e,t){if(1===e.playlists.length)return!0;var i=t.attributes.BANDWIDTH||Number.MAX_VALUE;return 0===e.playlists.filter((function(e){return!!ys(e)&&(e.attributes.BANDWIDTH||0)<i})).length},Ts=function(e,t){return!(!e&&!t||!e&&t||e&&!t)&&(e===t||(!(!e.id||!t.id||e.id!==t.id)||(!(!e.resolvedUri||!t.resolvedUri||e.resolvedUri!==t.resolvedUri)||!(!e.uri||!t.uri||e.uri!==t.uri))))},ws=function(e,t){var i=e&&e.mediaGroups&&e.mediaGroups.AUDIO||{},n=!1;for(var r in i){for(var s in i[r])if(n=t(i[r][s]))break;if(n)break}return!!n},Ss=function(e){if(!e||!e.playlists||!e.playlists.length)return ws(e,(function(e){return e.playlists&&e.playlists.length||e.uri}));for(var t=function(t){var i=e.playlists[t],n=i.attributes&&i.attributes.CODECS;return n&&n.split(",").every((function(e){return(0,S.isAudioCodec)(e)}))||ws(e,(function(e){return Ts(i,e)}))?"continue":{v:!1}},i=0;i<e.playlists.length;i++){var n=t(i);if("continue"!==n&&"object"==typeof n)return n.v}return!0},ks={liveEdgeDelay:ds,duration:ps,seekable:function(e,t,i){var n=t||0,r=ms(e,t,!0,i);return null===r?as():as(n,r)},getMediaInfoForTime:function(e){for(var t=e.playlist,i=e.currentTime,n=e.startingSegmentIndex,r=e.startingPartIndex,s=e.startTime,a=e.experimentalExactManifestTimings,o=i-s,l=ls(t),u=0,c=0;c<l.length;c++){var d=l[c];if(n===d.segmentIndex&&("number"!=typeof r||"number"!=typeof d.partIndex||r===d.partIndex)){u=c;break}}if(o<0){if(u>0)for(var h=u-1;h>=0;h--){var p=l[h];if(o+=p.duration,a){if(o<0)continue}else if(o+Qr<=0)continue;return{partIndex:p.partIndex,segmentIndex:p.segmentIndex,startTime:s-fs({defaultDuration:t.targetDuration,durationList:l,startIndex:u,endIndex:h})}}return{partIndex:l[0]&&l[0].partIndex||null,segmentIndex:l[0]&&l[0].segmentIndex||0,startTime:i}}if(u<0){for(var f=u;f<0;f++)if((o-=t.targetDuration)<0)return{partIndex:l[0]&&l[0].partIndex||null,segmentIndex:l[0]&&l[0].segmentIndex||0,startTime:i};u=0}for(var m=u;m<l.length;m++){var g=l[m];if(o-=g.duration,a){if(o>0)continue}else if(o-Qr>=0)continue;return{partIndex:g.partIndex,segmentIndex:g.segmentIndex,startTime:s+fs({defaultDuration:t.targetDuration,durationList:l,startIndex:u,endIndex:m})}}return{segmentIndex:l[l.length-1].segmentIndex,partIndex:l[l.length-1].partIndex,startTime:i}},isEnabled:ys,isDisabled:function(e){return e.disabled},isBlacklisted:gs,isIncompatible:vs,playlistEnd:ms,isAes:function(e){for(var t=0;t<e.segments.length;t++)if(e.segments[t].key)return!0;return!1},hasAttribute:_s,estimateSegmentRequestTime:function(e,t,i,n){return void 0===n&&(n=0),_s("BANDWIDTH",i)?(e*i.attributes.BANDWIDTH-8*n)/t:NaN},isLowestEnabledRendition:bs,isAudioOnly:Ss,playlistMatch:Ts,segmentDurationWithParts:os},Es=Vr.log,Cs=function(e,t){return e+"-"+t},xs=function(e,t){e.mediaGroups&&["AUDIO","SUBTITLES"].forEach((function(i){if(e.mediaGroups[i])for(var n in e.mediaGroups[i])for(var r in e.mediaGroups[i][n]){var s=e.mediaGroups[i][n][r];t(s,i,n,r)}}))},As=function(e){var t=e.playlist,i=e.uri,n=e.id;t.id=n,t.playlistErrors_=0,i&&(t.uri=i),t.attributes=t.attributes||{}},Ps=function(e,t){e.uri=t;for(var i=0;i<e.playlists.length;i++)if(!e.playlists[i].uri){var n="placeholder-uri-"+i;e.playlists[i].uri=n}var r=Ss(e);xs(e,(function(t,i,n,s){var a="placeholder-uri-"+i+"-"+n+"-"+s;if(!t.playlists||!t.playlists.length){if(r&&"AUDIO"===i&&!t.uri)for(var o=0;o<e.playlists.length;o++){var u=e.playlists[o];if(u.attributes&&u.attributes.AUDIO&&u.attributes.AUDIO===n)return}t.playlists=[(0,l.default)({},t)]}t.playlists.forEach((function(t,i){var n=Cs(i,a);t.uri?t.resolvedUri=t.resolvedUri||Gr(e.uri,t.uri):(t.uri=0===i?a:n,t.resolvedUri=t.uri),t.id=t.id||n,t.attributes=t.attributes||{},e.playlists[t.id]=t,e.playlists[t.uri]=t}))})),function(e){for(var t=e.playlists.length;t--;){var i=e.playlists[t];As({playlist:i,id:Cs(t,i.uri)}),i.resolvedUri=Gr(e.uri,i.uri),e.playlists[i.id]=i,e.playlists[i.uri]=i,i.attributes.BANDWIDTH||Es.warn("Invalid playlist STREAM-INF detected. Missing BANDWIDTH attribute.")}}(e),function(e){xs(e,(function(t){t.uri&&(t.resolvedUri=Gr(e.uri,t.uri))}))}(e)},Is=Vr.mergeOptions,Os=Vr.EventTarget,Ls=function(e,t){if(!e)return t;var i=Is(e,t);if(e.preloadHints&&!t.preloadHints&&delete i.preloadHints,e.parts&&!t.parts)delete i.parts;else if(e.parts&&t.parts)for(var n=0;n<t.parts.length;n++)e.parts&&e.parts[n]&&(i.parts[n]=Is(e.parts[n],t.parts[n]));return!e.skipped&&t.skipped&&(i.skipped=!1),e.preload&&!t.preload&&(i.preload=!1),i},Ds=function(e,t){!e.resolvedUri&&e.uri&&(e.resolvedUri=Gr(t,e.uri)),e.key&&!e.key.resolvedUri&&(e.key.resolvedUri=Gr(t,e.key.uri)),e.map&&!e.map.resolvedUri&&(e.map.resolvedUri=Gr(t,e.map.uri)),e.map&&e.map.key&&!e.map.key.resolvedUri&&(e.map.key.resolvedUri=Gr(t,e.map.key.uri)),e.parts&&e.parts.length&&e.parts.forEach((function(e){e.resolvedUri||(e.resolvedUri=Gr(t,e.uri))})),e.preloadHints&&e.preloadHints.length&&e.preloadHints.forEach((function(e){e.resolvedUri||(e.resolvedUri=Gr(t,e.uri))}))},Ms=function(e){var t=e.segments||[],i=e.preloadSegment;if(i&&i.parts&&i.parts.length){if(i.preloadHints)for(var n=0;n<i.preloadHints.length;n++)if("MAP"===i.preloadHints[n].type)return t;i.duration=e.targetDuration,i.preload=!0,t.push(i)}return t},Ns=function(e,t){return e===t||e.segments&&t.segments&&e.segments.length===t.segments.length&&e.endList===t.endList&&e.mediaSequence===t.mediaSequence&&e.preloadSegment===t.preloadSegment},Rs=function(e,t,i){void 0===i&&(i=Ns);var n=Is(e,{}),r=n.playlists[t.id];if(!r)return null;if(i(r,t))return null;t.segments=Ms(t);var s=Is(r,t);if(s.preloadSegment&&!t.preloadSegment&&delete s.preloadSegment,r.segments){if(t.skip){t.segments=t.segments||[];for(var a=0;a<t.skip.skippedSegments;a++)t.segments.unshift({skipped:!0})}s.segments=function(e,t,i){var n=e.slice(),r=t.slice();i=i||0;for(var s,a=[],o=0;o<r.length;o++){var l=n[o+i],u=r[o];l?(s=l.map||s,a.push(Ls(l,u))):(s&&!u.map&&(u.map=s),a.push(u))}return a}(r.segments,t.segments,t.mediaSequence-r.mediaSequence)}s.segments.forEach((function(e){Ds(e,s.resolvedUri)}));for(var o=0;o<n.playlists.length;o++)n.playlists[o].id===t.id&&(n.playlists[o]=s);return n.playlists[t.id]=s,n.playlists[t.uri]=s,xs(e,(function(e,i,n,r){if(e.playlists)for(var s=0;s<e.playlists.length;s++)t.id===e.playlists[s].id&&(e.playlists[s]=t)})),n},Us=function(e,t){var i=e.segments||[],n=i[i.length-1],r=n&&n.parts&&n.parts[n.parts.length-1],s=r&&r.duration||n&&n.duration;return t&&s?1e3*s:500*(e.partTargetDuration||e.targetDuration||10)},Bs=function(e){function t(t,i,n){var r;if(void 0===n&&(n={}),r=e.call(this)||this,!t)throw new Error("A non-empty playlist URL or object is required");r.logger_=Kr("PlaylistLoader");var s=n,a=s.withCredentials,o=void 0!==a&&a,l=s.handleManifestRedirects,u=void 0!==l&&l;r.src=t,r.vhs_=i,r.withCredentials=o,r.handleManifestRedirects=u;var c=i.options_;return r.customTagParsers=c&&c.customTagParsers||[],r.customTagMappers=c&&c.customTagMappers||[],r.experimentalLLHLS=c&&c.experimentalLLHLS||!1,Vr.browser.IE_VERSION&&(r.experimentalLLHLS=!1),r.state="HAVE_NOTHING",r.handleMediaupdatetimeout_=r.handleMediaupdatetimeout_.bind((0,d.default)(r)),r.on("mediaupdatetimeout",r.handleMediaupdatetimeout_),r}(0,h.default)(t,e);var i=t.prototype;return i.handleMediaupdatetimeout_=function(){var e=this;if("HAVE_METADATA"===this.state){var t=this.media(),i=Gr(this.master.uri,t.uri);this.experimentalLLHLS&&(i=function(e,t){if(t.endList||!t.serverControl)return e;var i={};if(t.serverControl.canBlockReload){var n=t.preloadSegment,r=t.mediaSequence+t.segments.length;if(n){var a=n.parts||[],o=cs(t)-1;o>-1&&o!==a.length-1&&(i._HLS_part=o),(o>-1||a.length)&&r--}i._HLS_msn=r}if(t.serverControl&&t.serverControl.canSkipUntil&&(i._HLS_skip=t.serverControl.canSkipDateranges?"v2":"YES"),Object.keys(i).length){var l=new(s().URL)(e);["_HLS_skip","_HLS_msn","_HLS_part"].forEach((function(e){i.hasOwnProperty(e)&&l.searchParams.set(e,i[e])})),e=l.toString()}return e}(i,t)),this.state="HAVE_CURRENT_METADATA",this.request=this.vhs_.xhr({uri:i,withCredentials:this.withCredentials},(function(t,i){if(e.request)return t?e.playlistRequestError(e.request,e.media(),"HAVE_METADATA"):void e.haveMetadata({playlistString:e.request.responseText,url:e.media().uri,id:e.media().id})}))}},i.playlistRequestError=function(e,t,i){var n=t.uri,r=t.id;this.request=null,i&&(this.state=i),this.error={playlist:this.master.playlists[r],status:e.status,message:"HLS playlist request error at URL: "+n+".",responseText:e.responseText,code:e.status>=500?4:2},this.trigger("error")},i.parseManifest_=function(e){var t=this,i=e.url;return function(e){var t=e.onwarn,i=e.oninfo,n=e.manifestString,r=e.customTagParsers,s=void 0===r?[]:r,a=e.customTagMappers,o=void 0===a?[]:a,l=e.experimentalLLHLS,u=new w.Parser;t&&u.on("warn",t),i&&u.on("info",i),s.forEach((function(e){return u.addParser(e)})),o.forEach((function(e){return u.addTagMapper(e)})),u.push(n),u.end();var c=u.manifest;if(l||(["preloadSegment","skip","serverControl","renditionReports","partInf","partTargetDuration"].forEach((function(e){c.hasOwnProperty(e)&&delete c[e]})),c.segments&&c.segments.forEach((function(e){["parts","preloadHints"].forEach((function(t){e.hasOwnProperty(t)&&delete e[t]}))}))),!c.targetDuration){var d=10;c.segments&&c.segments.length&&(d=c.segments.reduce((function(e,t){return Math.max(e,t.duration)}),0)),t&&t("manifest has no targetDuration defaulting to "+d),c.targetDuration=d}var h=us(c);if(h.length&&!c.partTargetDuration){var p=h.reduce((function(e,t){return Math.max(e,t.duration)}),0);t&&(t("manifest has no partTargetDuration defaulting to "+p),Es.error("LL-HLS manifest has parts but lacks required #EXT-X-PART-INF:PART-TARGET value. See https://datatracker.ietf.org/doc/html/draft-pantos-hls-rfc8216bis-09#section-4.4.3.7. Playback is not guaranteed.")),c.partTargetDuration=p}return c}({onwarn:function(e){var n=e.message;return t.logger_("m3u8-parser warn for "+i+": "+n)},oninfo:function(e){var n=e.message;return t.logger_("m3u8-parser info for "+i+": "+n)},manifestString:e.manifestString,customTagParsers:this.customTagParsers,customTagMappers:this.customTagMappers,experimentalLLHLS:this.experimentalLLHLS})},i.haveMetadata=function(e){var t=e.playlistString,i=e.playlistObject,n=e.url,r=e.id;this.request=null,this.state="HAVE_METADATA";var s=i||this.parseManifest_({url:n,manifestString:t});s.lastRequest=Date.now(),As({playlist:s,uri:n,id:r});var a=Rs(this.master,s);this.targetDuration=s.partTargetDuration||s.targetDuration,this.pendingMedia_=null,a?(this.master=a,this.media_=this.master.playlists[r]):this.trigger("playlistunchanged"),this.updateMediaUpdateTimeout_(Us(this.media(),!!a)),this.trigger("loadedplaylist")},i.dispose=function(){this.trigger("dispose"),this.stopRequest(),s().clearTimeout(this.mediaUpdateTimeout),s().clearTimeout(this.finalRenditionTimeout),this.off()},i.stopRequest=function(){if(this.request){var e=this.request;this.request=null,e.onreadystatechange=null,e.abort()}},i.media=function(e,t){var i=this;if(!e)return this.media_;if("HAVE_NOTHING"===this.state)throw new Error("Cannot switch media playlist from "+this.state);if("string"==typeof e){if(!this.master.playlists[e])throw new Error("Unknown playlist URI: "+e);e=this.master.playlists[e]}if(s().clearTimeout(this.finalRenditionTimeout),t){var n=(e.partTargetDuration||e.targetDuration)/2*1e3||5e3;this.finalRenditionTimeout=s().setTimeout(this.media.bind(this,e,!1),n)}else{var r=this.state,a=!this.media_||e.id!==this.media_.id,o=this.master.playlists[e.id];if(o&&o.endList||e.endList&&e.segments.length)return this.request&&(this.request.onreadystatechange=null,this.request.abort(),this.request=null),this.state="HAVE_METADATA",this.media_=e,void(a&&(this.trigger("mediachanging"),"HAVE_MASTER"===r?this.trigger("loadedmetadata"):this.trigger("mediachange")));if(this.updateMediaUpdateTimeout_(Us(e,!0)),a){if(this.state="SWITCHING_MEDIA",this.request){if(e.resolvedUri===this.request.url)return;this.request.onreadystatechange=null,this.request.abort(),this.request=null}this.media_&&this.trigger("mediachanging"),this.pendingMedia_=e,this.request=this.vhs_.xhr({uri:e.resolvedUri,withCredentials:this.withCredentials},(function(t,n){if(i.request){if(e.lastRequest=Date.now(),e.resolvedUri=Yr(i.handleManifestRedirects,e.resolvedUri,n),t)return i.playlistRequestError(i.request,e,r);i.haveMetadata({playlistString:n.responseText,url:e.uri,id:e.id}),"HAVE_MASTER"===r?i.trigger("loadedmetadata"):i.trigger("mediachange")}}))}}},i.pause=function(){this.mediaUpdateTimeout&&(s().clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null),this.stopRequest(),"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")},i.load=function(e){var t=this;this.mediaUpdateTimeout&&(s().clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null);var i=this.media();if(e){var n=i?(i.partTargetDuration||i.targetDuration)/2*1e3:5e3;this.mediaUpdateTimeout=s().setTimeout((function(){t.mediaUpdateTimeout=null,t.load()}),n)}else this.started?i&&!i.endList?this.trigger("mediaupdatetimeout"):this.trigger("loadedplaylist"):this.start()},i.updateMediaUpdateTimeout_=function(e){var t=this;this.mediaUpdateTimeout&&(s().clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null),this.media()&&!this.media().endList&&(this.mediaUpdateTimeout=s().setTimeout((function(){t.mediaUpdateTimeout=null,t.trigger("mediaupdatetimeout"),t.updateMediaUpdateTimeout_(e)}),e))},i.start=function(){var e=this;if(this.started=!0,"object"==typeof this.src)return this.src.uri||(this.src.uri=s().location.href),this.src.resolvedUri=this.src.uri,void setTimeout((function(){e.setupInitialPlaylist(e.src)}),0);this.request=this.vhs_.xhr({uri:this.src,withCredentials:this.withCredentials},(function(t,i){if(e.request){if(e.request=null,t)return e.error={status:i.status,message:"HLS playlist request error at URL: "+e.src+".",responseText:i.responseText,code:2},"HAVE_NOTHING"===e.state&&(e.started=!1),e.trigger("error");e.src=Yr(e.handleManifestRedirects,e.src,i);var n=e.parseManifest_({manifestString:i.responseText,url:e.src});e.setupInitialPlaylist(n)}}))},i.srcUri=function(){return"string"==typeof this.src?this.src:this.src.uri},i.setupInitialPlaylist=function(e){if(this.state="HAVE_MASTER",e.playlists)return this.master=e,Ps(this.master,this.srcUri()),e.playlists.forEach((function(e){e.segments=Ms(e),e.segments.forEach((function(t){Ds(t,e.resolvedUri)}))})),this.trigger("loadedplaylist"),void(this.request||this.media(this.master.playlists[0]));var t=this.srcUri()||s().location.href;this.master=function(e,t){var i=Cs(0,t),n={mediaGroups:{AUDIO:{},VIDEO:{},"CLOSED-CAPTIONS":{},SUBTITLES:{}},uri:s().location.href,resolvedUri:s().location.href,playlists:[{uri:t,id:i,resolvedUri:t,attributes:{}}]};return n.playlists[i]=n.playlists[0],n.playlists[t]=n.playlists[0],n}(0,t),this.haveMetadata({playlistObject:e,url:t,id:this.master.playlists[0].id}),this.trigger("loadedmetadata")},t}(Os),js=Vr.xhr,Fs=Vr.mergeOptions,Hs=function(e,t,i,n){var r="arraybuffer"===e.responseType?e.response:e.responseText;!t&&r&&(e.responseTime=Date.now(),e.roundTripTime=e.responseTime-e.requestTime,e.bytesReceived=r.byteLength||r.length,e.bandwidth||(e.bandwidth=Math.floor(e.bytesReceived/e.roundTripTime*8*1e3))),i.headers&&(e.responseHeaders=i.headers),t&&"ETIMEDOUT"===t.code&&(e.timedout=!0),t||e.aborted||200===i.statusCode||206===i.statusCode||0===i.statusCode||(t=new Error("XHR Failed with a response of: "+(e&&(r||e.responseText)))),n(t,e)},qs=function(){var e=function e(t,i){t=Fs({timeout:45e3},t);var n=e.beforeRequest||Vr.Vhs.xhr.beforeRequest;if(n&&"function"==typeof n){var r=n(t);r&&(t=r)}var s=(!0===Vr.Vhs.xhr.original?js:Vr.Vhs.xhr)(t,(function(e,t){return Hs(s,e,t,i)})),a=s.abort;return s.abort=function(){return s.aborted=!0,a.apply(s,arguments)},s.uri=t.uri,s.requestTime=Date.now(),s};return e.original=!0,e},zs=function(e){var t,i={};return e.byterange&&(i.Range="bytes="+(t=e.byterange).offset+"-"+("bigint"==typeof t.offset||"bigint"==typeof t.length?s().BigInt(t.offset)+s().BigInt(t.length)-s().BigInt(1):t.offset+t.length-1)),i},Ws=function(e,t){return e.start(t)+"-"+e.end(t)},Vs=function(e,t){var i=e.toString(16);return"00".substring(0,2-i.length)+i+(t%2?" ":"")},$s=function(e){return e>=32&&e<126?String.fromCharCode(e):"."},Xs=function(e){var t={};return Object.keys(e).forEach((function(i){var n=e[i];ArrayBuffer.isView(n)?t[i]={bytes:n.buffer,byteOffset:n.byteOffset,byteLength:n.byteLength}:t[i]=n})),t},Gs=function(e){var t=e.byterange||{length:1/0,offset:0};return[t.length,t.offset,e.resolvedUri].join(",")},Ys=function(e){return e.resolvedUri},Ks=function(e){for(var t=Array.prototype.slice.call(e),i=16,n="",r=0;r<t.length/i;r++)n+=t.slice(r*i,r*i+i).map(Vs).join("")+" "+t.slice(r*i,r*i+i).map($s).join("")+"\n";return n},Qs=Object.freeze({__proto__:null,createTransferableMessage:Xs,initSegmentId:Gs,segmentKeyId:Ys,hexDump:Ks,tagDump:function(e){var t=e.bytes;return Ks(t)},textRanges:function(e){var t,i="";for(t=0;t<e.length;t++)i+=Ws(e,t)+" ";return i}}),Js=function(e){var t=e.playlist,i=e.time,n=void 0===i?void 0:i,r=e.callback;if(!r)throw new Error("getProgramTime: callback must be provided");if(!t||void 0===n)return r({message:"getProgramTime: playlist and time must be provided"});var s=function(e,t){if(!t||!t.segments||0===t.segments.length)return null;for(var i,n=0,r=0;r<t.segments.length&&!(e<=(n=(i=t.segments[r]).videoTimingInfo?i.videoTimingInfo.transmuxedPresentationEnd:n+i.duration));r++);var s=t.segments[t.segments.length-1];if(s.videoTimingInfo&&s.videoTimingInfo.transmuxedPresentationEnd<e)return null;if(e>n){if(e>n+.25*s.duration)return null;i=s}return{segment:i,estimatedStart:i.videoTimingInfo?i.videoTimingInfo.transmuxedPresentationStart:n-i.duration,type:i.videoTimingInfo?"accurate":"estimate"}}(n,t);if(!s)return r({message:"valid programTime was not found"});if("estimate"===s.type)return r({message:"Accurate programTime could not be determined. Please seek to e.seekTime and try again",seekTime:s.estimatedStart});var a={mediaSeconds:n},o=function(e,t){if(!t.dateTimeObject)return null;var i=t.videoTimingInfo.transmuxerPrependedSeconds,n=e-(t.videoTimingInfo.transmuxedPresentationStart+i);return new Date(t.dateTimeObject.getTime()+1e3*n)}(n,s.segment);return o&&(a.programDateTime=o.toISOString()),r(null,a)},Zs=function e(t){var i=t.programTime,n=t.playlist,r=t.retryCount,s=void 0===r?2:r,a=t.seekTo,o=t.pauseAfterSeek,l=void 0===o||o,u=t.tech,c=t.callback;if(!c)throw new Error("seekToProgramTime: callback must be provided");if(void 0===i||!n||!a)return c({message:"seekToProgramTime: programTime, seekTo and playlist must be provided"});if(!n.endList&&!u.hasStarted_)return c({message:"player must be playing a live stream to start buffering"});if(!function(e){if(!e.segments||0===e.segments.length)return!1;for(var t=0;t<e.segments.length;t++)if(!e.segments[t].dateTimeObject)return!1;return!0}(n))return c({message:"programDateTime tags must be provided in the manifest "+n.resolvedUri});var d=function(e,t){var i;try{i=new Date(e)}catch(e){return null}if(!t||!t.segments||0===t.segments.length)return null;var n=t.segments[0];if(i<n.dateTimeObject)return null;for(var r=0;r<t.segments.length-1&&(n=t.segments[r],!(i<t.segments[r+1].dateTimeObject));r++);var s,a=t.segments[t.segments.length-1],o=a.dateTimeObject,l=a.videoTimingInfo?(s=a.videoTimingInfo).transmuxedPresentationEnd-s.transmuxedPresentationStart-s.transmuxerPrependedSeconds:a.duration+.25*a.duration;return i>new Date(o.getTime()+1e3*l)?null:(i>o&&(n=a),{segment:n,estimatedStart:n.videoTimingInfo?n.videoTimingInfo.transmuxedPresentationStart:ks.duration(t,t.mediaSequence+t.segments.indexOf(n)),type:n.videoTimingInfo?"accurate":"estimate"})}(i,n);if(!d)return c({message:i+" was not found in the stream"});var h=d.segment,p=function(e,t){var i,n;try{i=new Date(e),n=new Date(t)}catch(e){}var r=i.getTime();return(n.getTime()-r)/1e3}(h.dateTimeObject,i);if("estimate"===d.type)return 0===s?c({message:i+" is not buffered yet. Try again"}):(a(d.estimatedStart+p),void u.one("seeked",(function(){e({programTime:i,playlist:n,retryCount:s-1,seekTo:a,pauseAfterSeek:l,tech:u,callback:c})})));var f=h.start+p;u.one("seeked",(function(){return c(null,u.currentTime())})),l&&u.pause(),a(f)},ea=function(e,t){if(4===e.readyState)return t()},ta=Vr.EventTarget,ia=Vr.mergeOptions,na=function(e,t){if(!Ns(e,t))return!1;if(e.sidx&&t.sidx&&(e.sidx.offset!==t.sidx.offset||e.sidx.length!==t.sidx.length))return!1;if(!e.sidx&&t.sidx||e.sidx&&!t.sidx)return!1;if(e.segments&&!t.segments||!e.segments&&t.segments)return!1;if(!e.segments&&!t.segments)return!0;for(var i=0;i<e.segments.length;i++){var n=e.segments[i],r=t.segments[i];if(n.uri!==r.uri)return!1;if(n.byterange||r.byterange){var s=n.byterange,a=r.byterange;if(s&&!a||!s&&a)return!1;if(s.offset!==a.offset||s.length!==a.length)return!1}}return!0},ra=function(e,t){var i,n,r={};for(var s in e){var a=e[s].sidx;if(a){var o=(0,E.generateSidxKey)(a);if(!t[o])break;var l=t[o].sidxInfo;i=l,n=a,(Boolean(!i.map&&!n.map)||Boolean(i.map&&n.map&&i.map.byterange.offset===n.map.byterange.offset&&i.map.byterange.length===n.map.byterange.length))&&i.uri===n.uri&&i.byterange.offset===n.byterange.offset&&i.byterange.length===n.byterange.length&&(r[o]=t[o])}}return r},sa=function(e){function t(t,i,n,r){var s;void 0===n&&(n={}),(s=e.call(this)||this).masterPlaylistLoader_=r||(0,d.default)(s),r||(s.isMaster_=!0);var a=n,o=a.withCredentials,l=void 0!==o&&o,u=a.handleManifestRedirects,c=void 0!==u&&u;if(s.vhs_=i,s.withCredentials=l,s.handleManifestRedirects=c,!t)throw new Error("A non-empty playlist URL or object is required");return s.on("minimumUpdatePeriod",(function(){s.refreshXml_()})),s.on("mediaupdatetimeout",(function(){s.refreshMedia_(s.media().id)})),s.state="HAVE_NOTHING",s.loadedPlaylists_={},s.logger_=Kr("DashPlaylistLoader"),s.isMaster_?(s.masterPlaylistLoader_.srcUrl=t,s.masterPlaylistLoader_.sidxMapping_={}):s.childPlaylist_=t,s}(0,h.default)(t,e);var i=t.prototype;return i.requestErrored_=function(e,t,i){return!this.request||(this.request=null,e?(this.error="object"!=typeof e||e instanceof Error?{status:t.status,message:"DASH request error at URL: "+t.uri,response:t.response,code:2}:e,i&&(this.state=i),this.trigger("error"),!0):void 0)},i.addSidxSegments_=function(e,t,i){var n=this,r=e.sidx&&(0,E.generateSidxKey)(e.sidx);if(e.sidx&&r&&!this.masterPlaylistLoader_.sidxMapping_[r]){var a=Yr(this.handleManifestRedirects,e.sidx.resolvedUri),o=function(s,a){if(!n.requestErrored_(s,a,t)){var o,l=n.masterPlaylistLoader_.sidxMapping_;try{o=x()((0,I.toUint8)(a.response).subarray(8))}catch(e){return void n.requestErrored_(e,a,t)}return l[r]={sidxInfo:e.sidx,sidx:o},(0,E.addSidxSegmentsToPlaylist)(e,o,e.sidx.resolvedUri),i(!0)}};this.request=function(e,t,i){var n,r=[],s=!1,a=function(e,t,n,r){return t.abort(),s=!0,i(e,t,n,r)},o=function(e,t){if(!s){if(e)return a(e,t,"",r);var i=t.responseText.substring(r&&r.byteLength||0,t.responseText.length);if(r=(0,I.concatTypedArrays)(r,(0,I.stringToBytes)(i,!0)),n=n||(0,A.getId3Offset)(r),r.length<10||n&&r.length<n+2)return ea(t,(function(){return a(e,t,"",r)}));var o=(0,P.detectContainerForBytes)(r);return"ts"===o&&r.length<188||!o&&r.length<376?ea(t,(function(){return a(e,t,"",r)})):a(null,t,o,r)}},l={uri:e,beforeSend:function(e){e.overrideMimeType("text/plain; charset=x-user-defined"),e.addEventListener("progress",(function(t){return t.total,t.loaded,Hs(e,null,{statusCode:e.status},o)}))}},u=t(l,(function(e,t){return Hs(u,e,t,o)}));return u}(a,this.vhs_.xhr,(function(t,i,r,s){if(t)return o(t,i);if(!r||"mp4"!==r)return o({status:i.status,message:"Unsupported "+(r||"unknown")+" container type for sidx segment at URL: "+a,response:"",playlist:e,internal:!0,blacklistDuration:1/0,code:2},i);var l=e.sidx.byterange,u=l.offset,c=l.length;if(s.length>=c+u)return o(t,{response:s.subarray(u,u+c),status:i.status,uri:i.uri});n.request=n.vhs_.xhr({uri:a,responseType:"arraybuffer",headers:zs({byterange:e.sidx.byterange})},o)}))}else this.mediaRequest_=s().setTimeout((function(){return i(!1)}),0)},i.dispose=function(){this.trigger("dispose"),this.stopRequest(),this.loadedPlaylists_={},s().clearTimeout(this.minimumUpdatePeriodTimeout_),s().clearTimeout(this.mediaRequest_),s().clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null,this.mediaRequest_=null,this.minimumUpdatePeriodTimeout_=null,this.masterPlaylistLoader_.createMupOnMedia_&&(this.off("loadedmetadata",this.masterPlaylistLoader_.createMupOnMedia_),this.masterPlaylistLoader_.createMupOnMedia_=null),this.off()},i.hasPendingRequest=function(){return this.request||this.mediaRequest_},i.stopRequest=function(){if(this.request){var e=this.request;this.request=null,e.onreadystatechange=null,e.abort()}},i.media=function(e){var t=this;if(!e)return this.media_;if("HAVE_NOTHING"===this.state)throw new Error("Cannot switch media playlist from "+this.state);var i=this.state;if("string"==typeof e){if(!this.masterPlaylistLoader_.master.playlists[e])throw new Error("Unknown playlist URI: "+e);e=this.masterPlaylistLoader_.master.playlists[e]}var n=!this.media_||e.id!==this.media_.id;if(n&&this.loadedPlaylists_[e.id]&&this.loadedPlaylists_[e.id].endList)return this.state="HAVE_METADATA",this.media_=e,void(n&&(this.trigger("mediachanging"),this.trigger("mediachange")));n&&(this.media_&&this.trigger("mediachanging"),this.addSidxSegments_(e,i,(function(n){t.haveMetadata({startingState:i,playlist:e})})))},i.haveMetadata=function(e){var t=e.startingState,i=e.playlist;this.state="HAVE_METADATA",this.loadedPlaylists_[i.id]=i,this.mediaRequest_=null,this.refreshMedia_(i.id),"HAVE_MASTER"===t?this.trigger("loadedmetadata"):this.trigger("mediachange")},i.pause=function(){this.masterPlaylistLoader_.createMupOnMedia_&&(this.off("loadedmetadata",this.masterPlaylistLoader_.createMupOnMedia_),this.masterPlaylistLoader_.createMupOnMedia_=null),this.stopRequest(),s().clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null,this.isMaster_&&(s().clearTimeout(this.masterPlaylistLoader_.minimumUpdatePeriodTimeout_),this.masterPlaylistLoader_.minimumUpdatePeriodTimeout_=null),"HAVE_NOTHING"===this.state&&(this.started=!1)},i.load=function(e){var t=this;s().clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null;var i=this.media();if(e){var n=i?i.targetDuration/2*1e3:5e3;this.mediaUpdateTimeout=s().setTimeout((function(){return t.load()}),n)}else this.started?i&&!i.endList?(this.isMaster_&&!this.minimumUpdatePeriodTimeout_&&(this.trigger("minimumUpdatePeriod"),this.updateMinimumUpdatePeriodTimeout_()),this.trigger("mediaupdatetimeout")):this.trigger("loadedplaylist"):this.start()},i.start=function(){var e=this;this.started=!0,this.isMaster_?this.requestMaster_((function(t,i){e.haveMaster_(),e.hasPendingRequest()||e.media_||e.media(e.masterPlaylistLoader_.master.playlists[0])})):this.mediaRequest_=s().setTimeout((function(){return e.haveMaster_()}),0)},i.requestMaster_=function(e){var t=this;this.request=this.vhs_.xhr({uri:this.masterPlaylistLoader_.srcUrl,withCredentials:this.withCredentials},(function(i,n){if(!t.requestErrored_(i,n)){var r=n.responseText!==t.masterPlaylistLoader_.masterXml_;return t.masterPlaylistLoader_.masterXml_=n.responseText,n.responseHeaders&&n.responseHeaders.date?t.masterLoaded_=Date.parse(n.responseHeaders.date):t.masterLoaded_=Date.now(),t.masterPlaylistLoader_.srcUrl=Yr(t.handleManifestRedirects,t.masterPlaylistLoader_.srcUrl,n),r?(t.handleMaster_(),void t.syncClientServerClock_((function(){return e(n,r)}))):e(n,r)}"HAVE_NOTHING"===t.state&&(t.started=!1)}))},i.syncClientServerClock_=function(e){var t=this,i=(0,E.parseUTCTiming)(this.masterPlaylistLoader_.masterXml_);return null===i?(this.masterPlaylistLoader_.clientOffset_=this.masterLoaded_-Date.now(),e()):"DIRECT"===i.method?(this.masterPlaylistLoader_.clientOffset_=i.value-Date.now(),e()):void(this.request=this.vhs_.xhr({uri:Gr(this.masterPlaylistLoader_.srcUrl,i.value),method:i.method,withCredentials:this.withCredentials},(function(n,r){if(t.request){if(n)return t.masterPlaylistLoader_.clientOffset_=t.masterLoaded_-Date.now(),e();var s;s="HEAD"===i.method?r.responseHeaders&&r.responseHeaders.date?Date.parse(r.responseHeaders.date):t.masterLoaded_:Date.parse(r.responseText),t.masterPlaylistLoader_.clientOffset_=s-Date.now(),e()}})))},i.haveMaster_=function(){this.state="HAVE_MASTER",this.isMaster_?this.trigger("loadedplaylist"):this.media_||this.media(this.childPlaylist_)},i.handleMaster_=function(){this.mediaRequest_=null;var e,t,i,n,r,s,a,o=this.masterPlaylistLoader_.master,l=(e={masterXml:this.masterPlaylistLoader_.masterXml_,srcUrl:this.masterPlaylistLoader_.srcUrl,clientOffset:this.masterPlaylistLoader_.clientOffset_,sidxMapping:this.masterPlaylistLoader_.sidxMapping_,previousManifest:o},t=e.masterXml,i=e.srcUrl,n=e.clientOffset,r=e.sidxMapping,s=e.previousManifest,a=(0,E.parse)(t,{manifestUri:i,clientOffset:n,sidxMapping:r,previousManifest:s}),Ps(a,i),a);o&&(l=function(e,t,i){for(var n=!0,r=ia(e,{duration:t.duration,minimumUpdatePeriod:t.minimumUpdatePeriod,timelineStarts:t.timelineStarts}),s=0;s<t.playlists.length;s++){var a=t.playlists[s];if(a.sidx){var o=(0,E.generateSidxKey)(a.sidx);i&&i[o]&&i[o].sidx&&(0,E.addSidxSegmentsToPlaylist)(a,i[o].sidx,a.sidx.resolvedUri)}var l=Rs(r,a,na);l&&(r=l,n=!1)}return xs(t,(function(e,t,i,s){if(e.playlists&&e.playlists.length){var a=e.playlists[0].id,o=Rs(r,e.playlists[0],na);o&&((r=o).mediaGroups[t][i][s].playlists[0]=r.playlists[a],n=!1)}})),t.minimumUpdatePeriod!==e.minimumUpdatePeriod&&(n=!1),n?null:r}(o,l,this.masterPlaylistLoader_.sidxMapping_)),this.masterPlaylistLoader_.master=l||o;var u=this.masterPlaylistLoader_.master.locations&&this.masterPlaylistLoader_.master.locations[0];return u&&u!==this.masterPlaylistLoader_.srcUrl&&(this.masterPlaylistLoader_.srcUrl=u),(!o||l&&l.minimumUpdatePeriod!==o.minimumUpdatePeriod)&&this.updateMinimumUpdatePeriodTimeout_(),Boolean(l)},i.updateMinimumUpdatePeriodTimeout_=function(){var e=this.masterPlaylistLoader_;e.createMupOnMedia_&&(e.off("loadedmetadata",e.createMupOnMedia_),e.createMupOnMedia_=null),e.minimumUpdatePeriodTimeout_&&(s().clearTimeout(e.minimumUpdatePeriodTimeout_),e.minimumUpdatePeriodTimeout_=null);var t=e.master&&e.master.minimumUpdatePeriod;0===t&&(e.media()?t=1e3*e.media().targetDuration:(e.createMupOnMedia_=e.updateMinimumUpdatePeriodTimeout_,e.one("loadedmetadata",e.createMupOnMedia_))),"number"!=typeof t||t<=0?t<0&&this.logger_("found invalid minimumUpdatePeriod of "+t+", not setting a timeout"):this.createMUPTimeout_(t)},i.createMUPTimeout_=function(e){var t=this.masterPlaylistLoader_;t.minimumUpdatePeriodTimeout_=s().setTimeout((function(){t.minimumUpdatePeriodTimeout_=null,t.trigger("minimumUpdatePeriod"),t.createMUPTimeout_(e)}),e)},i.refreshXml_=function(){var e=this;this.requestMaster_((function(t,i){var n,r,s;i&&(e.media_&&(e.media_=e.masterPlaylistLoader_.master.playlists[e.media_.id]),e.masterPlaylistLoader_.sidxMapping_=(n=e.masterPlaylistLoader_.master,r=e.masterPlaylistLoader_.sidxMapping_,s=ra(n.playlists,r),xs(n,(function(e,t,i,n){if(e.playlists&&e.playlists.length){var a=e.playlists;s=ia(s,ra(a,r))}})),s),e.addSidxSegments_(e.media(),e.state,(function(t){e.refreshMedia_(e.media().id)})))}))},i.refreshMedia_=function(e){var t=this;if(!e)throw new Error("refreshMedia_ must take a media id");this.media_&&this.isMaster_&&this.handleMaster_();var i=this.masterPlaylistLoader_.master.playlists,n=!this.media_||this.media_!==i[e];if(n?this.media_=i[e]:this.trigger("playlistunchanged"),!this.mediaUpdateTimeout){!function e(){t.media().endList||(t.mediaUpdateTimeout=s().setTimeout((function(){t.trigger("mediaupdatetimeout"),e()}),Us(t.media(),Boolean(n))))}()}this.trigger("loadedplaylist")},t}(ta),aa={GOAL_BUFFER_LENGTH:30,MAX_GOAL_BUFFER_LENGTH:60,BACK_BUFFER_LENGTH:30,GOAL_BUFFER_LENGTH_RATE:1,INITIAL_BANDWIDTH:4194304,BANDWIDTH_VARIANCE:1.2,BUFFER_LOW_WATER_LINE:0,MAX_BUFFER_LOW_WATER_LINE:30,EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE:16,BUFFER_LOW_WATER_LINE_RATE:1,BUFFER_HIGH_WATER_LINE:30},oa=function(e){return e.on=e.addEventListener,e.off=e.removeEventListener,e},la=function(e){return function(){var t=function(e){try{return URL.createObjectURL(new Blob([e],{type:"application/javascript"}))}catch(i){var t=new BlobBuilder;return t.append(e),URL.createObjectURL(t.getBlob())}}(e),i=oa(new Worker(t));i.objURL=t;var n=i.terminate;return i.on=i.addEventListener,i.off=i.removeEventListener,i.terminate=function(){return URL.revokeObjectURL(t),n.call(this)},i}},ua=function(e){return"var browserWorkerPolyFill = "+oa.toString()+";\nbrowserWorkerPolyFill(self);\n"+e},ca=function(e){return e.toString().replace(/^function.+?{/,"").slice(0,-1)},da=ua(ca((function(){var e=function(){this.init=function(){var e={};this.on=function(t,i){e[t]||(e[t]=[]),e[t]=e[t].concat(i)},this.off=function(t,i){var n;return!!e[t]&&(n=e[t].indexOf(i),e[t]=e[t].slice(),e[t].splice(n,1),n>-1)},this.trigger=function(t){var i,n,r,s;if(i=e[t])if(2===arguments.length)for(r=i.length,n=0;n<r;++n)i[n].call(this,arguments[1]);else{for(s=[],n=arguments.length,n=1;n<arguments.length;++n)s.push(arguments[n]);for(r=i.length,n=0;n<r;++n)i[n].apply(this,s)}},this.dispose=function(){e={}}}};e.prototype.pipe=function(e){return this.on("data",(function(t){e.push(t)})),this.on("done",(function(t){e.flush(t)})),this.on("partialdone",(function(t){e.partialFlush(t)})),this.on("endedtimeline",(function(t){e.endTimeline(t)})),this.on("reset",(function(t){e.reset(t)})),e},e.prototype.push=function(e){this.trigger("data",e)},e.prototype.flush=function(e){this.trigger("done",e)},e.prototype.partialFlush=function(e){this.trigger("partialdone",e)},e.prototype.endTimeline=function(e){this.trigger("endedtimeline",e)},e.prototype.reset=function(e){this.trigger("reset",e)};var t,n,r,s,a,o,l,u,c,d,h,p,f,m,g,v,y,_,b,T,w,S,k,E,C,x,A,P,I,O,L,D,M,N,R,U,B,j,F,H,q=e,z=Math.pow(2,32),W={getUint64:function(e){var t,i=new DataView(e.buffer,e.byteOffset,e.byteLength);return i.getBigUint64?(t=i.getBigUint64(0))<Number.MAX_SAFE_INTEGER?Number(t):t:i.getUint32(0)*z+i.getUint32(4)},MAX_UINT32:z},V=W.MAX_UINT32;!function(){var e;if(S={avc1:[],avcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],mvex:[],mvhd:[],pasp:[],sdtp:[],smhd:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],styp:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[]},"undefined"!=typeof Uint8Array){for(e in S)S.hasOwnProperty(e)&&(S[e]=[e.charCodeAt(0),e.charCodeAt(1),e.charCodeAt(2),e.charCodeAt(3)]);k=new Uint8Array(["i".charCodeAt(0),"s".charCodeAt(0),"o".charCodeAt(0),"m".charCodeAt(0)]),C=new Uint8Array(["a".charCodeAt(0),"v".charCodeAt(0),"c".charCodeAt(0),"1".charCodeAt(0)]),E=new Uint8Array([0,0,0,1]),x=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]),A=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]),P={video:x,audio:A},L=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),O=new Uint8Array([0,0,0,0,0,0,0,0]),D=new Uint8Array([0,0,0,0,0,0,0,0]),M=D,N=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),R=D,I=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0])}}(),t=function(e){var t,i,n=[],r=0;for(t=1;t<arguments.length;t++)n.push(arguments[t]);for(t=n.length;t--;)r+=n[t].byteLength;for(i=new Uint8Array(r+8),new DataView(i.buffer,i.byteOffset,i.byteLength).setUint32(0,i.byteLength),i.set(e,4),t=0,r=8;t<n.length;t++)i.set(n[t],r),r+=n[t].byteLength;return i},n=function(){return t(S.dinf,t(S.dref,L))},r=function(e){return t(S.esds,new Uint8Array([0,0,0,0,3,25,0,0,0,4,17,64,21,0,6,0,0,0,218,192,0,0,218,192,5,2,e.audioobjecttype<<3|e.samplingfrequencyindex>>>1,e.samplingfrequencyindex<<7|e.channelcount<<3,6,1,2]))},g=function(e){return t(S.hdlr,P[e])},m=function(e){var i=new Uint8Array([0,0,0,0,0,0,0,2,0,0,0,3,0,1,95,144,e.duration>>>24&255,e.duration>>>16&255,e.duration>>>8&255,255&e.duration,85,196,0,0]);return e.samplerate&&(i[12]=e.samplerate>>>24&255,i[13]=e.samplerate>>>16&255,i[14]=e.samplerate>>>8&255,i[15]=255&e.samplerate),t(S.mdhd,i)},f=function(e){return t(S.mdia,m(e),g(e.type),o(e))},a=function(e){return t(S.mfhd,new Uint8Array([0,0,0,0,(4278190080&e)>>24,(16711680&e)>>16,(65280&e)>>8,255&e]))},o=function(e){return t(S.minf,"video"===e.type?t(S.vmhd,I):t(S.smhd,O),n(),y(e))},l=function(e,i){for(var n=[],r=i.length;r--;)n[r]=b(i[r]);return t.apply(null,[S.moof,a(e)].concat(n))},u=function(e){for(var i=e.length,n=[];i--;)n[i]=h(e[i]);return t.apply(null,[S.moov,d(4294967295)].concat(n).concat(c(e)))},c=function(e){for(var i=e.length,n=[];i--;)n[i]=T(e[i]);return t.apply(null,[S.mvex].concat(n))},d=function(e){var i=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,2,0,1,95,144,(4278190080&e)>>24,(16711680&e)>>16,(65280&e)>>8,255&e,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]);return t(S.mvhd,i)},v=function(e){var i,n,r=e.samples||[],s=new Uint8Array(4+r.length);for(n=0;n<r.length;n++)i=r[n].flags,s[n+4]=i.dependsOn<<4|i.isDependedOn<<2|i.hasRedundancy;return t(S.sdtp,s)},y=function(e){return t(S.stbl,_(e),t(S.stts,R),t(S.stsc,M),t(S.stsz,N),t(S.stco,D))},_=function(e){return t(S.stsd,new Uint8Array([0,0,0,0,0,0,0,1]),"video"===e.type?U(e):B(e))},U=function(e){var i,n,r=e.sps||[],s=e.pps||[],a=[],o=[];for(i=0;i<r.length;i++)a.push((65280&r[i].byteLength)>>>8),a.push(255&r[i].byteLength),a=a.concat(Array.prototype.slice.call(r[i]));for(i=0;i<s.length;i++)o.push((65280&s[i].byteLength)>>>8),o.push(255&s[i].byteLength),o=o.concat(Array.prototype.slice.call(s[i]));if(n=[S.avc1,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,(65280&e.width)>>8,255&e.width,(65280&e.height)>>8,255&e.height,0,72,0,0,0,72,0,0,0,0,0,0,0,1,19,118,105,100,101,111,106,115,45,99,111,110,116,114,105,98,45,104,108,115,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]),t(S.avcC,new Uint8Array([1,e.profileIdc,e.profileCompatibility,e.levelIdc,255].concat([r.length],a,[s.length],o))),t(S.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192]))],e.sarRatio){var l=e.sarRatio[0],u=e.sarRatio[1];n.push(t(S.pasp,new Uint8Array([(4278190080&l)>>24,(16711680&l)>>16,(65280&l)>>8,255&l,(4278190080&u)>>24,(16711680&u)>>16,(65280&u)>>8,255&u])))}return t.apply(null,n)},B=function(e){return t(S.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,(65280&e.channelcount)>>8,255&e.channelcount,(65280&e.samplesize)>>8,255&e.samplesize,0,0,0,0,(65280&e.samplerate)>>8,255&e.samplerate,0,0]),r(e))},p=function(e){var i=new Uint8Array([0,0,0,7,0,0,0,0,0,0,0,0,(4278190080&e.id)>>24,(16711680&e.id)>>16,(65280&e.id)>>8,255&e.id,0,0,0,0,(4278190080&e.duration)>>24,(16711680&e.duration)>>16,(65280&e.duration)>>8,255&e.duration,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,(65280&e.width)>>8,255&e.width,0,0,(65280&e.height)>>8,255&e.height,0,0]);return t(S.tkhd,i)},b=function(e){var i,n,r,s,a,o;return i=t(S.tfhd,new Uint8Array([0,0,0,58,(4278190080&e.id)>>24,(16711680&e.id)>>16,(65280&e.id)>>8,255&e.id,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0])),a=Math.floor(e.baseMediaDecodeTime/V),o=Math.floor(e.baseMediaDecodeTime%V),n=t(S.tfdt,new Uint8Array([1,0,0,0,a>>>24&255,a>>>16&255,a>>>8&255,255&a,o>>>24&255,o>>>16&255,o>>>8&255,255&o])),92,"audio"===e.type?(r=w(e,92),t(S.traf,i,n,r)):(s=v(e),r=w(e,s.length+92),t(S.traf,i,n,r,s))},h=function(e){return e.duration=e.duration||4294967295,t(S.trak,p(e),f(e))},T=function(e){var i=new Uint8Array([0,0,0,0,(4278190080&e.id)>>24,(16711680&e.id)>>16,(65280&e.id)>>8,255&e.id,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]);return"video"!==e.type&&(i[i.length-1]=0),t(S.trex,i)},H=function(e,t){var i=0,n=0,r=0,s=0;return e.length&&(void 0!==e[0].duration&&(i=1),void 0!==e[0].size&&(n=2),void 0!==e[0].flags&&(r=4),void 0!==e[0].compositionTimeOffset&&(s=8)),[0,0,i|n|r|s,1,(4278190080&e.length)>>>24,(16711680&e.length)>>>16,(65280&e.length)>>>8,255&e.length,(4278190080&t)>>>24,(16711680&t)>>>16,(65280&t)>>>8,255&t]},F=function(e,i){var n,r,s,a,o,l;for(i+=20+16*(a=e.samples||[]).length,s=H(a,i),(r=new Uint8Array(s.length+16*a.length)).set(s),n=s.length,l=0;l<a.length;l++)o=a[l],r[n++]=(4278190080&o.duration)>>>24,r[n++]=(16711680&o.duration)>>>16,r[n++]=(65280&o.duration)>>>8,r[n++]=255&o.duration,r[n++]=(4278190080&o.size)>>>24,r[n++]=(16711680&o.size)>>>16,r[n++]=(65280&o.size)>>>8,r[n++]=255&o.size,r[n++]=o.flags.isLeading<<2|o.flags.dependsOn,r[n++]=o.flags.isDependedOn<<6|o.flags.hasRedundancy<<4|o.flags.paddingValue<<1|o.flags.isNonSyncSample,r[n++]=61440&o.flags.degradationPriority,r[n++]=15&o.flags.degradationPriority,r[n++]=(4278190080&o.compositionTimeOffset)>>>24,r[n++]=(16711680&o.compositionTimeOffset)>>>16,r[n++]=(65280&o.compositionTimeOffset)>>>8,r[n++]=255&o.compositionTimeOffset;return t(S.trun,r)},j=function(e,i){var n,r,s,a,o,l;for(i+=20+8*(a=e.samples||[]).length,s=H(a,i),(n=new Uint8Array(s.length+8*a.length)).set(s),r=s.length,l=0;l<a.length;l++)o=a[l],n[r++]=(4278190080&o.duration)>>>24,n[r++]=(16711680&o.duration)>>>16,n[r++]=(65280&o.duration)>>>8,n[r++]=255&o.duration,n[r++]=(4278190080&o.size)>>>24,n[r++]=(16711680&o.size)>>>16,n[r++]=(65280&o.size)>>>8,n[r++]=255&o.size;return t(S.trun,n)},w=function(e,t){return"audio"===e.type?j(e,t):F(e,t)};s=function(){return t(S.ftyp,k,E,k,C)};var $,X,G,Y,K,Q,J,Z,ee=function(e){return t(S.mdat,e)},te=l,ie=function(e){var t,i=s(),n=u(e);return(t=new Uint8Array(i.byteLength+n.byteLength)).set(i),t.set(n,i.byteLength),t},ne=function(e,t){var i={size:0,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0,degradationPriority:0,isNonSyncSample:1}};return i.dataOffset=t,i.compositionTimeOffset=e.pts-e.dts,i.duration=e.duration,i.size=4*e.length,i.size+=e.byteLength,e.keyFrame&&(i.flags.dependsOn=2,i.flags.isNonSyncSample=0),i},re=function(e){var t,i,n=[],r=[];for(r.byteLength=0,r.nalCount=0,r.duration=0,n.byteLength=0,t=0;t<e.length;t++)"access_unit_delimiter_rbsp"===(i=e[t]).nalUnitType?(n.length&&(n.duration=i.dts-n.dts,r.byteLength+=n.byteLength,r.nalCount+=n.length,r.duration+=n.duration,r.push(n)),(n=[i]).byteLength=i.data.byteLength,n.pts=i.pts,n.dts=i.dts):("slice_layer_without_partitioning_rbsp_idr"===i.nalUnitType&&(n.keyFrame=!0),n.duration=i.dts-n.dts,n.byteLength+=i.data.byteLength,n.push(i));return r.length&&(!n.duration||n.duration<=0)&&(n.duration=r[r.length-1].duration),r.byteLength+=n.byteLength,r.nalCount+=n.length,r.duration+=n.duration,r.push(n),r},se=function(e){var t,i,n=[],r=[];for(n.byteLength=0,n.nalCount=0,n.duration=0,n.pts=e[0].pts,n.dts=e[0].dts,r.byteLength=0,r.nalCount=0,r.duration=0,r.pts=e[0].pts,r.dts=e[0].dts,t=0;t<e.length;t++)(i=e[t]).keyFrame?(n.length&&(r.push(n),r.byteLength+=n.byteLength,r.nalCount+=n.nalCount,r.duration+=n.duration),(n=[i]).nalCount=i.length,n.byteLength=i.byteLength,n.pts=i.pts,n.dts=i.dts,n.duration=i.duration):(n.duration+=i.duration,n.nalCount+=i.length,n.byteLength+=i.byteLength,n.push(i));return r.length&&n.duration<=0&&(n.duration=r[r.length-1].duration),r.byteLength+=n.byteLength,r.nalCount+=n.nalCount,r.duration+=n.duration,r.push(n),r},ae=function(e){var t;return!e[0][0].keyFrame&&e.length>1&&(t=e.shift(),e.byteLength-=t.byteLength,e.nalCount-=t.nalCount,e[0][0].dts=t.dts,e[0][0].pts=t.pts,e[0][0].duration+=t.duration),e},oe=function(e,t){var i,n,r,s,a,o=t||0,l=[];for(i=0;i<e.length;i++)for(s=e[i],n=0;n<s.length;n++)a=s[n],o+=(r=ne(a,o)).size,l.push(r);return l},le=function(e){var t,i,n,r,s,a,o=0,l=e.byteLength,u=e.nalCount,c=new Uint8Array(l+4*u),d=new DataView(c.buffer);for(t=0;t<e.length;t++)for(r=e[t],i=0;i<r.length;i++)for(s=r[i],n=0;n<s.length;n++)a=s[n],d.setUint32(o,a.data.byteLength),o+=4,c.set(a.data,o),o+=a.data.byteLength;return c},ue=[33,16,5,32,164,27],ce=[33,65,108,84,1,2,4,8,168,2,4,8,17,191,252],de=function(e){for(var t=[];e--;)t.push(0);return t},he=function(){if(!$){var e={96e3:[ue,[227,64],de(154),[56]],88200:[ue,[231],de(170),[56]],64e3:[ue,[248,192],de(240),[56]],48e3:[ue,[255,192],de(268),[55,148,128],de(54),[112]],44100:[ue,[255,192],de(268),[55,163,128],de(84),[112]],32e3:[ue,[255,192],de(268),[55,234],de(226),[112]],24e3:[ue,[255,192],de(268),[55,255,128],de(268),[111,112],de(126),[224]],16e3:[ue,[255,192],de(268),[55,255,128],de(268),[111,255],de(269),[223,108],de(195),[1,192]],12e3:[ce,de(268),[3,127,248],de(268),[6,255,240],de(268),[13,255,224],de(268),[27,253,128],de(259),[56]],11025:[ce,de(268),[3,127,248],de(268),[6,255,240],de(268),[13,255,224],de(268),[27,255,192],de(268),[55,175,128],de(108),[112]],8e3:[ce,de(268),[3,121,16],de(47),[7]]};t=e,$=Object.keys(t).reduce((function(e,i){return e[i]=new Uint8Array(t[i].reduce((function(e,t){return e.concat(t)}),[])),e}),{})}var t;return $},pe=9e4;Q=function(e,t){return X(K(e,t))},J=function(e,t){return G(Y(e),t)},Z=function(e,t,i){return Y(i?e:e-t)};var fe=pe,me=X=function(e){return e*pe},ge=(G=function(e,t){return e*t},Y=function(e){return e/pe}),ve=(K=function(e,t){return e/t},Q),ye=J,_e=Z,be=function(e,t,i,n){var r,s,a,o,l,u=0,c=0,d=0;if(t.length&&(r=ve(e.baseMediaDecodeTime,e.samplerate),s=Math.ceil(fe/(e.samplerate/1024)),i&&n&&(u=r-Math.max(i,n),d=(c=Math.floor(u/s))*s),!(c<1||d>fe/2))){for((a=he()[e.samplerate])||(a=t[0].data),o=0;o<c;o++)l=t[0],t.splice(0,0,{data:a,dts:l.dts-s,pts:l.pts-s});return e.baseMediaDecodeTime-=Math.floor(ye(d,e.samplerate)),d}},Te=function(e,t,i){return t.minSegmentDts>=i?e:(t.minSegmentDts=1/0,e.filter((function(e){return e.dts>=i&&(t.minSegmentDts=Math.min(t.minSegmentDts,e.dts),t.minSegmentPts=t.minSegmentDts,!0)})))},we=function(e){var t,i,n=[];for(t=0;t<e.length;t++)i=e[t],n.push({size:i.data.byteLength,duration:1024});return n},Se=function(e){var t,i,n=0,r=new Uint8Array(function(e){var t,i=0;for(t=0;t<e.length;t++)i+=e[t].data.byteLength;return i}(e));for(t=0;t<e.length;t++)i=e[t],r.set(i.data,n),n+=i.data.byteLength;return r},ke=fe,Ee=function(e){delete e.minSegmentDts,delete e.maxSegmentDts,delete e.minSegmentPts,delete e.maxSegmentPts},Ce=function(e,t){var i,n=e.minSegmentDts;return t||(n-=e.timelineStartInfo.dts),i=e.timelineStartInfo.baseMediaDecodeTime,i+=n,i=Math.max(0,i),"audio"===e.type&&(i*=e.samplerate/ke,i=Math.floor(i)),i},xe=function(e,t){"number"==typeof t.pts&&(void 0===e.timelineStartInfo.pts&&(e.timelineStartInfo.pts=t.pts),void 0===e.minSegmentPts?e.minSegmentPts=t.pts:e.minSegmentPts=Math.min(e.minSegmentPts,t.pts),void 0===e.maxSegmentPts?e.maxSegmentPts=t.pts:e.maxSegmentPts=Math.max(e.maxSegmentPts,t.pts)),"number"==typeof t.dts&&(void 0===e.timelineStartInfo.dts&&(e.timelineStartInfo.dts=t.dts),void 0===e.minSegmentDts?e.minSegmentDts=t.dts:e.minSegmentDts=Math.min(e.minSegmentDts,t.dts),void 0===e.maxSegmentDts?e.maxSegmentDts=t.dts:e.maxSegmentDts=Math.max(e.maxSegmentDts,t.dts))},Ae=function(e){for(var t=0,i={payloadType:-1,payloadSize:0},n=0,r=0;t<e.byteLength&&128!==e[t];){for(;255===e[t];)n+=255,t++;for(n+=e[t++];255===e[t];)r+=255,t++;if(r+=e[t++],!i.payload&&4===n){if("GA94"===String.fromCharCode(e[t+3],e[t+4],e[t+5],e[t+6])){i.payloadType=n,i.payloadSize=r,i.payload=e.subarray(t,t+r);break}i.payload=void 0}t+=r,n=0,r=0}return i},Pe=function(e){return 181!==e.payload[0]||49!=(e.payload[1]<<8|e.payload[2])||"GA94"!==String.fromCharCode(e.payload[3],e.payload[4],e.payload[5],e.payload[6])||3!==e.payload[7]?null:e.payload.subarray(8,e.payload.length-1)},Ie=function(e,t){var i,n,r,s,a=[];if(!(64&t[0]))return a;for(n=31&t[0],i=0;i<n;i++)s={type:3&t[(r=3*i)+2],pts:e},4&t[r+2]&&(s.ccData=t[r+3]<<8|t[r+4],a.push(s));return a},Oe=function(e){for(var t,i,n=e.byteLength,r=[],s=1;s<n-2;)0===e[s]&&0===e[s+1]&&3===e[s+2]?(r.push(s+2),s+=2):s++;if(0===r.length)return e;t=n-r.length,i=new Uint8Array(t);var a=0;for(s=0;s<t;a++,s++)a===r[0]&&(a++,r.shift()),i[s]=e[a];return i},Le=4,De=function e(t){t=t||{},e.prototype.init.call(this),this.parse708captions_="boolean"!=typeof t.parse708captions||t.parse708captions,this.captionPackets_=[],this.ccStreams_=[new ze(0,0),new ze(0,1),new ze(1,0),new ze(1,1)],this.parse708captions_&&(this.cc708Stream_=new Be({captionServices:t.captionServices})),this.reset(),this.ccStreams_.forEach((function(e){e.on("data",this.trigger.bind(this,"data")),e.on("partialdone",this.trigger.bind(this,"partialdone")),e.on("done",this.trigger.bind(this,"done"))}),this),this.parse708captions_&&(this.cc708Stream_.on("data",this.trigger.bind(this,"data")),this.cc708Stream_.on("partialdone",this.trigger.bind(this,"partialdone")),this.cc708Stream_.on("done",this.trigger.bind(this,"done")))};(De.prototype=new q).push=function(e){var t,i,n;if("sei_rbsp"===e.nalUnitType&&(t=Ae(e.escapedRBSP)).payload&&t.payloadType===Le&&(i=Pe(t)))if(e.dts<this.latestDts_)this.ignoreNextEqualDts_=!0;else{if(e.dts===this.latestDts_&&this.ignoreNextEqualDts_)return this.numSameDts_--,void(this.numSameDts_||(this.ignoreNextEqualDts_=!1));n=Ie(e.pts,i),this.captionPackets_=this.captionPackets_.concat(n),this.latestDts_!==e.dts&&(this.numSameDts_=0),this.numSameDts_++,this.latestDts_=e.dts}},De.prototype.flushCCStreams=function(e){this.ccStreams_.forEach((function(t){return"flush"===e?t.flush():t.partialFlush()}),this)},De.prototype.flushStream=function(e){this.captionPackets_.length?(this.captionPackets_.forEach((function(e,t){e.presortIndex=t})),this.captionPackets_.sort((function(e,t){return e.pts===t.pts?e.presortIndex-t.presortIndex:e.pts-t.pts})),this.captionPackets_.forEach((function(e){e.type<2?this.dispatchCea608Packet(e):this.dispatchCea708Packet(e)}),this),this.captionPackets_.length=0,this.flushCCStreams(e)):this.flushCCStreams(e)},De.prototype.flush=function(){return this.flushStream("flush")},De.prototype.partialFlush=function(){return this.flushStream("partialFlush")},De.prototype.reset=function(){this.latestDts_=null,this.ignoreNextEqualDts_=!1,this.numSameDts_=0,this.activeCea608Channel_=[null,null],this.ccStreams_.forEach((function(e){e.reset()}))},De.prototype.dispatchCea608Packet=function(e){this.setsTextOrXDSActive(e)?this.activeCea608Channel_[e.type]=null:this.setsChannel1Active(e)?this.activeCea608Channel_[e.type]=0:this.setsChannel2Active(e)&&(this.activeCea608Channel_[e.type]=1),null!==this.activeCea608Channel_[e.type]&&this.ccStreams_[(e.type<<1)+this.activeCea608Channel_[e.type]].push(e)},De.prototype.setsChannel1Active=function(e){return 4096==(30720&e.ccData)},De.prototype.setsChannel2Active=function(e){return 6144==(30720&e.ccData)},De.prototype.setsTextOrXDSActive=function(e){return 256==(28928&e.ccData)||4138==(30974&e.ccData)||6186==(30974&e.ccData)},De.prototype.dispatchCea708Packet=function(e){this.parse708captions_&&this.cc708Stream_.push(e)};var Me={127:9834,4128:32,4129:160,4133:8230,4138:352,4140:338,4144:9608,4145:8216,4146:8217,4147:8220,4148:8221,4149:8226,4153:8482,4154:353,4156:339,4157:8480,4159:376,4214:8539,4215:8540,4216:8541,4217:8542,4218:9168,4219:9124,4220:9123,4221:9135,4222:9126,4223:9121,4256:12600},Ne=function(e){return 32<=e&&e<=127||160<=e&&e<=255},Re=function(e){this.windowNum=e,this.reset()};Re.prototype.reset=function(){this.clearText(),this.pendingNewLine=!1,this.winAttr={},this.penAttr={},this.penLoc={},this.penColor={},this.visible=0,this.rowLock=0,this.columnLock=0,this.priority=0,this.relativePositioning=0,this.anchorVertical=0,this.anchorHorizontal=0,this.anchorPoint=0,this.rowCount=1,this.virtualRowCount=this.rowCount+1,this.columnCount=41,this.windowStyle=0,this.penStyle=0},Re.prototype.getText=function(){return this.rows.join("\n")},Re.prototype.clearText=function(){this.rows=[""],this.rowIdx=0},Re.prototype.newLine=function(e){for(this.rows.length>=this.virtualRowCount&&"function"==typeof this.beforeRowOverflow&&this.beforeRowOverflow(e),this.rows.length>0&&(this.rows.push(""),this.rowIdx++);this.rows.length>this.virtualRowCount;)this.rows.shift(),this.rowIdx--},Re.prototype.isEmpty=function(){return 0===this.rows.length||1===this.rows.length&&""===this.rows[0]},Re.prototype.addText=function(e){this.rows[this.rowIdx]+=e},Re.prototype.backspace=function(){if(!this.isEmpty()){var e=this.rows[this.rowIdx];this.rows[this.rowIdx]=e.substr(0,e.length-1)}};var Ue=function(e,t,i){this.serviceNum=e,this.text="",this.currentWindow=new Re(-1),this.windows=[],this.stream=i,"string"==typeof t&&this.createTextDecoder(t)};Ue.prototype.init=function(e,t){this.startPts=e;for(var i=0;i<8;i++)this.windows[i]=new Re(i),"function"==typeof t&&(this.windows[i].beforeRowOverflow=t)},Ue.prototype.setCurrentWindow=function(e){this.currentWindow=this.windows[e]},Ue.prototype.createTextDecoder=function(e){if("undefined"==typeof TextDecoder)this.stream.trigger("log",{level:"warn",message:"The `encoding` option is unsupported without TextDecoder support"});else try{this.textDecoder_=new TextDecoder(e)}catch(t){this.stream.trigger("log",{level:"warn",message:"TextDecoder could not be created with "+e+" encoding. "+t})}};var Be=function e(t){t=t||{},e.prototype.init.call(this);var i,n=this,r=t.captionServices||{},s={};Object.keys(r).forEach((function(e){i=r[e],/^SERVICE/.test(e)&&(s[e]=i.encoding)})),this.serviceEncodings=s,this.current708Packet=null,this.services={},this.push=function(e){3===e.type?(n.new708Packet(),n.add708Bytes(e)):(null===n.current708Packet&&n.new708Packet(),n.add708Bytes(e))}};Be.prototype=new q,Be.prototype.new708Packet=function(){null!==this.current708Packet&&this.push708Packet(),this.current708Packet={data:[],ptsVals:[]}},Be.prototype.add708Bytes=function(e){var t=e.ccData,i=t>>>8,n=255&t;this.current708Packet.ptsVals.push(e.pts),this.current708Packet.data.push(i),this.current708Packet.data.push(n)},Be.prototype.push708Packet=function(){var e=this.current708Packet,t=e.data,i=null,n=null,r=0,s=t[r++];for(e.seq=s>>6,e.sizeCode=63&s;r<t.length;r++)n=31&(s=t[r++]),7===(i=s>>5)&&n>0&&(i=s=t[r++]),this.pushServiceBlock(i,r,n),n>0&&(r+=n-1)},Be.prototype.pushServiceBlock=function(e,t,i){var n,r=t,s=this.current708Packet.data,a=this.services[e];for(a||(a=this.initService(e,r));r<t+i&&r<s.length;r++)n=s[r],Ne(n)?r=this.handleText(r,a):24===n?r=this.multiByteCharacter(r,a):16===n?r=this.extendedCommands(r,a):128<=n&&n<=135?r=this.setCurrentWindow(r,a):152<=n&&n<=159?r=this.defineWindow(r,a):136===n?r=this.clearWindows(r,a):140===n?r=this.deleteWindows(r,a):137===n?r=this.displayWindows(r,a):138===n?r=this.hideWindows(r,a):139===n?r=this.toggleWindows(r,a):151===n?r=this.setWindowAttributes(r,a):144===n?r=this.setPenAttributes(r,a):145===n?r=this.setPenColor(r,a):146===n?r=this.setPenLocation(r,a):143===n?a=this.reset(r,a):8===n?a.currentWindow.backspace():12===n?a.currentWindow.clearText():13===n?a.currentWindow.pendingNewLine=!0:14===n?a.currentWindow.clearText():141===n&&r++},Be.prototype.extendedCommands=function(e,t){var i=this.current708Packet.data[++e];return Ne(i)&&(e=this.handleText(e,t,{isExtended:!0})),e},Be.prototype.getPts=function(e){return this.current708Packet.ptsVals[Math.floor(e/2)]},Be.prototype.initService=function(e,t){var i,n,r=this;return(i="SERVICE"+e)in this.serviceEncodings&&(n=this.serviceEncodings[i]),this.services[e]=new Ue(e,n,r),this.services[e].init(this.getPts(t),(function(t){r.flushDisplayed(t,r.services[e])})),this.services[e]},Be.prototype.handleText=function(e,t,i){var n,r,s,a,o=i&&i.isExtended,l=i&&i.isMultiByte,u=this.current708Packet.data,c=o?4096:0,d=u[e],h=u[e+1],p=t.currentWindow;return t.textDecoder_&&!o?(l?(r=[d,h],e++):r=[d],n=t.textDecoder_.decode(new Uint8Array(r))):(a=Me[s=c|d]||s,n=4096&s&&s===a?"":String.fromCharCode(a)),p.pendingNewLine&&!p.isEmpty()&&p.newLine(this.getPts(e)),p.pendingNewLine=!1,p.addText(n),e},Be.prototype.multiByteCharacter=function(e,t){var i=this.current708Packet.data,n=i[e+1],r=i[e+2];return Ne(n)&&Ne(r)&&(e=this.handleText(++e,t,{isMultiByte:!0})),e},Be.prototype.setCurrentWindow=function(e,t){var i=7&this.current708Packet.data[e];return t.setCurrentWindow(i),e},Be.prototype.defineWindow=function(e,t){var i=this.current708Packet.data,n=i[e],r=7&n;t.setCurrentWindow(r);var s=t.currentWindow;return n=i[++e],s.visible=(32&n)>>5,s.rowLock=(16&n)>>4,s.columnLock=(8&n)>>3,s.priority=7&n,n=i[++e],s.relativePositioning=(128&n)>>7,s.anchorVertical=127&n,n=i[++e],s.anchorHorizontal=n,n=i[++e],s.anchorPoint=(240&n)>>4,s.rowCount=15&n,n=i[++e],s.columnCount=63&n,n=i[++e],s.windowStyle=(56&n)>>3,s.penStyle=7&n,s.virtualRowCount=s.rowCount+1,e},Be.prototype.setWindowAttributes=function(e,t){var i=this.current708Packet.data,n=i[e],r=t.currentWindow.winAttr;return n=i[++e],r.fillOpacity=(192&n)>>6,r.fillRed=(48&n)>>4,r.fillGreen=(12&n)>>2,r.fillBlue=3&n,n=i[++e],r.borderType=(192&n)>>6,r.borderRed=(48&n)>>4,r.borderGreen=(12&n)>>2,r.borderBlue=3&n,n=i[++e],r.borderType+=(128&n)>>5,r.wordWrap=(64&n)>>6,r.printDirection=(48&n)>>4,r.scrollDirection=(12&n)>>2,r.justify=3&n,n=i[++e],r.effectSpeed=(240&n)>>4,r.effectDirection=(12&n)>>2,r.displayEffect=3&n,e},Be.prototype.flushDisplayed=function(e,t){for(var i=[],n=0;n<8;n++)t.windows[n].visible&&!t.windows[n].isEmpty()&&i.push(t.windows[n].getText());t.endPts=e,t.text=i.join("\n\n"),this.pushCaption(t),t.startPts=e},Be.prototype.pushCaption=function(e){""!==e.text&&(this.trigger("data",{startPts:e.startPts,endPts:e.endPts,text:e.text,stream:"cc708_"+e.serviceNum}),e.text="",e.startPts=e.endPts)},Be.prototype.displayWindows=function(e,t){var i=this.current708Packet.data[++e],n=this.getPts(e);this.flushDisplayed(n,t);for(var r=0;r<8;r++)i&1<<r&&(t.windows[r].visible=1);return e},Be.prototype.hideWindows=function(e,t){var i=this.current708Packet.data[++e],n=this.getPts(e);this.flushDisplayed(n,t);for(var r=0;r<8;r++)i&1<<r&&(t.windows[r].visible=0);return e},Be.prototype.toggleWindows=function(e,t){var i=this.current708Packet.data[++e],n=this.getPts(e);this.flushDisplayed(n,t);for(var r=0;r<8;r++)i&1<<r&&(t.windows[r].visible^=1);return e},Be.prototype.clearWindows=function(e,t){var i=this.current708Packet.data[++e],n=this.getPts(e);this.flushDisplayed(n,t);for(var r=0;r<8;r++)i&1<<r&&t.windows[r].clearText();return e},Be.prototype.deleteWindows=function(e,t){var i=this.current708Packet.data[++e],n=this.getPts(e);this.flushDisplayed(n,t);for(var r=0;r<8;r++)i&1<<r&&t.windows[r].reset();return e},Be.prototype.setPenAttributes=function(e,t){var i=this.current708Packet.data,n=i[e],r=t.currentWindow.penAttr;return n=i[++e],r.textTag=(240&n)>>4,r.offset=(12&n)>>2,r.penSize=3&n,n=i[++e],r.italics=(128&n)>>7,r.underline=(64&n)>>6,r.edgeType=(56&n)>>3,r.fontStyle=7&n,e},Be.prototype.setPenColor=function(e,t){var i=this.current708Packet.data,n=i[e],r=t.currentWindow.penColor;return n=i[++e],r.fgOpacity=(192&n)>>6,r.fgRed=(48&n)>>4,r.fgGreen=(12&n)>>2,r.fgBlue=3&n,n=i[++e],r.bgOpacity=(192&n)>>6,r.bgRed=(48&n)>>4,r.bgGreen=(12&n)>>2,r.bgBlue=3&n,n=i[++e],r.edgeRed=(48&n)>>4,r.edgeGreen=(12&n)>>2,r.edgeBlue=3&n,e},Be.prototype.setPenLocation=function(e,t){var i=this.current708Packet.data,n=i[e],r=t.currentWindow.penLoc;return t.currentWindow.pendingNewLine=!0,n=i[++e],r.row=15&n,n=i[++e],r.column=63&n,e},Be.prototype.reset=function(e,t){var i=this.getPts(e);return this.flushDisplayed(i,t),this.initService(t.serviceNum,e)};var je={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},Fe=function(e){return null===e?"":(e=je[e]||e,String.fromCharCode(e))},He=[4352,4384,4608,4640,5376,5408,5632,5664,5888,5920,4096,4864,4896,5120,5152],qe=function(){for(var e=[],t=15;t--;)e.push("");return e},ze=function e(t,i){e.prototype.init.call(this),this.field_=t||0,this.dataChannel_=i||0,this.name_="CC"+(1+(this.field_<<1|this.dataChannel_)),this.setConstants(),this.reset(),this.push=function(e){var t,i,n,r,s;if((t=32639&e.ccData)!==this.lastControlCode_){if(4096==(61440&t)?this.lastControlCode_=t:t!==this.PADDING_&&(this.lastControlCode_=null),n=t>>>8,r=255&t,t!==this.PADDING_)if(t===this.RESUME_CAPTION_LOADING_)this.mode_="popOn";else if(t===this.END_OF_CAPTION_)this.mode_="popOn",this.clearFormatting(e.pts),this.flushDisplayed(e.pts),i=this.displayed_,this.displayed_=this.nonDisplayed_,this.nonDisplayed_=i,this.startPts_=e.pts;else if(t===this.ROLL_UP_2_ROWS_)this.rollUpRows_=2,this.setRollUp(e.pts);else if(t===this.ROLL_UP_3_ROWS_)this.rollUpRows_=3,this.setRollUp(e.pts);else if(t===this.ROLL_UP_4_ROWS_)this.rollUpRows_=4,this.setRollUp(e.pts);else if(t===this.CARRIAGE_RETURN_)this.clearFormatting(e.pts),this.flushDisplayed(e.pts),this.shiftRowsUp_(),this.startPts_=e.pts;else if(t===this.BACKSPACE_)"popOn"===this.mode_?this.nonDisplayed_[this.row_]=this.nonDisplayed_[this.row_].slice(0,-1):this.displayed_[this.row_]=this.displayed_[this.row_].slice(0,-1);else if(t===this.ERASE_DISPLAYED_MEMORY_)this.flushDisplayed(e.pts),this.displayed_=qe();else if(t===this.ERASE_NON_DISPLAYED_MEMORY_)this.nonDisplayed_=qe();else if(t===this.RESUME_DIRECT_CAPTIONING_)"paintOn"!==this.mode_&&(this.flushDisplayed(e.pts),this.displayed_=qe()),this.mode_="paintOn",this.startPts_=e.pts;else if(this.isSpecialCharacter(n,r))s=Fe((n=(3&n)<<8)|r),this[this.mode_](e.pts,s),this.column_++;else if(this.isExtCharacter(n,r))"popOn"===this.mode_?this.nonDisplayed_[this.row_]=this.nonDisplayed_[this.row_].slice(0,-1):this.displayed_[this.row_]=this.displayed_[this.row_].slice(0,-1),s=Fe((n=(3&n)<<8)|r),this[this.mode_](e.pts,s),this.column_++;else if(this.isMidRowCode(n,r))this.clearFormatting(e.pts),this[this.mode_](e.pts," "),this.column_++,14==(14&r)&&this.addFormatting(e.pts,["i"]),1==(1&r)&&this.addFormatting(e.pts,["u"]);else if(this.isOffsetControlCode(n,r))this.column_+=3&r;else if(this.isPAC(n,r)){var a=He.indexOf(7968&t);"rollUp"===this.mode_&&(a-this.rollUpRows_+1<0&&(a=this.rollUpRows_-1),this.setRollUp(e.pts,a)),a!==this.row_&&(this.clearFormatting(e.pts),this.row_=a),1&r&&-1===this.formatting_.indexOf("u")&&this.addFormatting(e.pts,["u"]),16==(16&t)&&(this.column_=4*((14&t)>>1)),this.isColorPAC(r)&&14==(14&r)&&this.addFormatting(e.pts,["i"])}else this.isNormalChar(n)&&(0===r&&(r=null),s=Fe(n),s+=Fe(r),this[this.mode_](e.pts,s),this.column_+=s.length)}else this.lastControlCode_=null}};ze.prototype=new q,ze.prototype.flushDisplayed=function(e){var t=this.displayed_.map((function(e,t){try{return e.trim()}catch(e){return this.trigger("log",{level:"warn",message:"Skipping a malformed 608 caption at index "+t+"."}),""}}),this).join("\n").replace(/^\n+|\n+$/g,"");t.length&&this.trigger("data",{startPts:this.startPts_,endPts:e,text:t,stream:this.name_})},ze.prototype.reset=function(){this.mode_="popOn",this.topRow_=0,this.startPts_=0,this.displayed_=qe(),this.nonDisplayed_=qe(),this.lastControlCode_=null,this.column_=0,this.row_=14,this.rollUpRows_=2,this.formatting_=[]},ze.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_},ze.prototype.isSpecialCharacter=function(e,t){return e===this.EXT_&&t>=48&&t<=63},ze.prototype.isExtCharacter=function(e,t){return(e===this.EXT_+1||e===this.EXT_+2)&&t>=32&&t<=63},ze.prototype.isMidRowCode=function(e,t){return e===this.EXT_&&t>=32&&t<=47},ze.prototype.isOffsetControlCode=function(e,t){return e===this.OFFSET_&&t>=33&&t<=35},ze.prototype.isPAC=function(e,t){return e>=this.BASE_&&e<this.BASE_+8&&t>=64&&t<=127},ze.prototype.isColorPAC=function(e){return e>=64&&e<=79||e>=96&&e<=127},ze.prototype.isNormalChar=function(e){return e>=32&&e<=127},ze.prototype.setRollUp=function(e,t){if("rollUp"!==this.mode_&&(this.row_=14,this.mode_="rollUp",this.flushDisplayed(e),this.nonDisplayed_=qe(),this.displayed_=qe()),void 0!==t&&t!==this.row_)for(var i=0;i<this.rollUpRows_;i++)this.displayed_[t-i]=this.displayed_[this.row_-i],this.displayed_[this.row_-i]="";void 0===t&&(t=this.row_),this.topRow_=t-this.rollUpRows_+1},ze.prototype.addFormatting=function(e,t){this.formatting_=this.formatting_.concat(t);var i=t.reduce((function(e,t){return e+"<"+t+">"}),"");this[this.mode_](e,i)},ze.prototype.clearFormatting=function(e){if(this.formatting_.length){var t=this.formatting_.reverse().reduce((function(e,t){return e+"</"+t+">"}),"");this.formatting_=[],this[this.mode_](e,t)}},ze.prototype.popOn=function(e,t){var i=this.nonDisplayed_[this.row_];i+=t,this.nonDisplayed_[this.row_]=i},ze.prototype.rollUp=function(e,t){var i=this.displayed_[this.row_];i+=t,this.displayed_[this.row_]=i},ze.prototype.shiftRowsUp_=function(){var e;for(e=0;e<this.topRow_;e++)this.displayed_[e]="";for(e=this.row_+1;e<15;e++)this.displayed_[e]="";for(e=this.topRow_;e<this.row_;e++)this.displayed_[e]=this.displayed_[e+1];this.displayed_[this.row_]=""},ze.prototype.paintOn=function(e,t){var i=this.displayed_[this.row_];i+=t,this.displayed_[this.row_]=i};var We={CaptionStream:De,Cea608Stream:ze,Cea708Stream:Be},Ve={H264_STREAM_TYPE:27,ADTS_STREAM_TYPE:15,METADATA_STREAM_TYPE:21},$e="shared",Xe=function(e,t){var i=1;for(e>t&&(i=-1);Math.abs(t-e)>4294967296;)e+=8589934592*i;return e},Ge=function e(t){var i,n;e.prototype.init.call(this),this.type_=t||$e,this.push=function(e){this.type_!==$e&&e.type!==this.type_||(void 0===n&&(n=e.dts),e.dts=Xe(e.dts,n),e.pts=Xe(e.pts,n),i=e.dts,this.trigger("data",e))},this.flush=function(){n=i,this.trigger("done")},this.endTimeline=function(){this.flush(),this.trigger("endedtimeline")},this.discontinuity=function(){n=void 0,i=void 0},this.reset=function(){this.discontinuity(),this.trigger("reset")}};Ge.prototype=new q;var Ye,Ke=Ge,Qe=Xe,Je=function(e,t,i){var n,r="";for(n=t;n<i;n++)r+="%"+("00"+e[n].toString(16)).slice(-2);return r},Ze=function(e,t,i){return decodeURIComponent(Je(e,t,i))},et=function(e){return e[0]<<21|e[1]<<14|e[2]<<7|e[3]},tt={TXXX:function(e){var t;if(3===e.data[0]){for(t=1;t<e.data.length;t++)if(0===e.data[t]){e.description=Ze(e.data,1,t),e.value=Ze(e.data,t+1,e.data.length).replace(/\0*$/,"");break}e.data=e.value}},WXXX:function(e){var t;if(3===e.data[0])for(t=1;t<e.data.length;t++)if(0===e.data[t]){e.description=Ze(e.data,1,t),e.url=Ze(e.data,t+1,e.data.length);break}},PRIV:function(e){var t,i;for(t=0;t<e.data.length;t++)if(0===e.data[t]){e.owner=(i=e.data,unescape(Je(i,0,t)));break}e.privateData=e.data.subarray(t+1),e.data=e.privateData}};Ye=function(e){var t,i={descriptor:e&&e.descriptor},n=0,r=[],s=0;if(Ye.prototype.init.call(this),this.dispatchType=Ve.METADATA_STREAM_TYPE.toString(16),i.descriptor)for(t=0;t<i.descriptor.length;t++)this.dispatchType+=("00"+i.descriptor[t].toString(16)).slice(-2);this.push=function(e){var t,i,a,o,l;if("timed-metadata"===e.type)if(e.dataAlignmentIndicator&&(s=0,r.length=0),0===r.length&&(e.data.length<10||e.data[0]!=="I".charCodeAt(0)||e.data[1]!=="D".charCodeAt(0)||e.data[2]!=="3".charCodeAt(0)))this.trigger("log",{level:"warn",message:"Skipping unrecognized metadata packet"});else if(r.push(e),s+=e.data.byteLength,1===r.length&&(n=et(e.data.subarray(6,10)),n+=10),!(s<n)){for(t={data:new Uint8Array(n),frames:[],pts:r[0].pts,dts:r[0].dts},l=0;l<n;)t.data.set(r[0].data.subarray(0,n-l),l),l+=r[0].data.byteLength,s-=r[0].data.byteLength,r.shift();i=10,64&t.data[5]&&(i+=4,i+=et(t.data.subarray(10,14)),n-=et(t.data.subarray(16,20)));do{if((a=et(t.data.subarray(i+4,i+8)))<1)return void this.trigger("log",{level:"warn",message:"Malformed ID3 frame encountered. Skipping metadata parsing."});if((o={id:String.fromCharCode(t.data[i],t.data[i+1],t.data[i+2],t.data[i+3]),data:t.data.subarray(i+10,i+a+10)}).key=o.id,tt[o.id]&&(tt[o.id](o),"com.apple.streaming.transportStreamTimestamp"===o.owner)){var u=o.data,c=(1&u[3])<<30|u[4]<<22|u[5]<<14|u[6]<<6|u[7]>>>2;c*=4,c+=3&u[7],o.timeStamp=c,void 0===t.pts&&void 0===t.dts&&(t.pts=o.timeStamp,t.dts=o.timeStamp),this.trigger("timestamp",o)}t.frames.push(o),i+=10,i+=a}while(i<n);this.trigger("data",t)}}},Ye.prototype=new q;var it,nt,rt,st=Ye,at=Ke,ot=188;(it=function(){var e=new Uint8Array(ot),t=0;it.prototype.init.call(this),this.push=function(i){var n,r=0,s=ot;for(t?((n=new Uint8Array(i.byteLength+t)).set(e.subarray(0,t)),n.set(i,t),t=0):n=i;s<n.byteLength;)71!==n[r]||71!==n[s]?(r++,s++):(this.trigger("data",n.subarray(r,s)),r+=ot,s+=ot);r<n.byteLength&&(e.set(n.subarray(r),0),t=n.byteLength-r)},this.flush=function(){t===ot&&71===e[0]&&(this.trigger("data",e),t=0),this.trigger("done")},this.endTimeline=function(){this.flush(),this.trigger("endedtimeline")},this.reset=function(){t=0,this.trigger("reset")}}).prototype=new q,nt=function(){var e,t,i,n;nt.prototype.init.call(this),n=this,this.packetsWaitingForPmt=[],this.programMapTable=void 0,e=function(e,n){var r=0;n.payloadUnitStartIndicator&&(r+=e[r]+1),"pat"===n.type?t(e.subarray(r),n):i(e.subarray(r),n)},t=function(e,t){t.section_number=e[7],t.last_section_number=e[8],n.pmtPid=(31&e[10])<<8|e[11],t.pmtPid=n.pmtPid},i=function(e,t){var i,r;if(1&e[5]){for(n.programMapTable={video:null,audio:null,"timed-metadata":{}},i=3+((15&e[1])<<8|e[2])-4,r=12+((15&e[10])<<8|e[11]);r<i;){var s=e[r],a=(31&e[r+1])<<8|e[r+2];s===Ve.H264_STREAM_TYPE&&null===n.programMapTable.video?n.programMapTable.video=a:s===Ve.ADTS_STREAM_TYPE&&null===n.programMapTable.audio?n.programMapTable.audio=a:s===Ve.METADATA_STREAM_TYPE&&(n.programMapTable["timed-metadata"][a]=s),r+=5+((15&e[r+3])<<8|e[r+4])}t.programMapTable=n.programMapTable}},this.push=function(t){var i={},n=4;if(i.payloadUnitStartIndicator=!!(64&t[1]),i.pid=31&t[1],i.pid<<=8,i.pid|=t[2],(48&t[3])>>>4>1&&(n+=t[n]+1),0===i.pid)i.type="pat",e(t.subarray(n),i),this.trigger("data",i);else if(i.pid===this.pmtPid)for(i.type="pmt",e(t.subarray(n),i),this.trigger("data",i);this.packetsWaitingForPmt.length;)this.processPes_.apply(this,this.packetsWaitingForPmt.shift());else void 0===this.programMapTable?this.packetsWaitingForPmt.push([t,n,i]):this.processPes_(t,n,i)},this.processPes_=function(e,t,i){i.pid===this.programMapTable.video?i.streamType=Ve.H264_STREAM_TYPE:i.pid===this.programMapTable.audio?i.streamType=Ve.ADTS_STREAM_TYPE:i.streamType=this.programMapTable["timed-metadata"][i.pid],i.type="pes",i.data=e.subarray(t),this.trigger("data",i)}},nt.prototype=new q,nt.STREAM_TYPES={h264:27,adts:15},rt=function(){var e,t=this,i=!1,n={data:[],size:0},r={data:[],size:0},s={data:[],size:0},a=function(e,i,n){var r,s,a=new Uint8Array(e.size),o={type:i},l=0,u=0;if(e.data.length&&!(e.size<9)){for(o.trackId=e.data[0].pid,l=0;l<e.data.length;l++)s=e.data[l],a.set(s.data,u),u+=s.data.byteLength;var c,d,h,p;d=o,p=(c=a)[0]<<16|c[1]<<8|c[2],d.data=new Uint8Array,1===p&&(d.packetLength=6+(c[4]<<8|c[5]),d.dataAlignmentIndicator=0!=(4&c[6]),192&(h=c[7])&&(d.pts=(14&c[9])<<27|(255&c[10])<<20|(254&c[11])<<12|(255&c[12])<<5|(254&c[13])>>>3,d.pts*=4,d.pts+=(6&c[13])>>>1,d.dts=d.pts,64&h&&(d.dts=(14&c[14])<<27|(255&c[15])<<20|(254&c[16])<<12|(255&c[17])<<5|(254&c[18])>>>3,d.dts*=4,d.dts+=(6&c[18])>>>1)),d.data=c.subarray(9+c[8])),r="video"===i||o.packetLength<=e.size,(n||r)&&(e.size=0,e.data.length=0),r&&t.trigger("data",o)}};rt.prototype.init.call(this),this.push=function(o){({pat:function(){},pes:function(){var e,t;switch(o.streamType){case Ve.H264_STREAM_TYPE:e=n,t="video";break;case Ve.ADTS_STREAM_TYPE:e=r,t="audio";break;case Ve.METADATA_STREAM_TYPE:e=s,t="timed-metadata";break;default:return}o.payloadUnitStartIndicator&&a(e,t,!0),e.data.push(o),e.size+=o.data.byteLength},pmt:function(){var n={type:"metadata",tracks:[]};null!==(e=o.programMapTable).video&&n.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+e.video,codec:"avc",type:"video"}),null!==e.audio&&n.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+e.audio,codec:"adts",type:"audio"}),i=!0,t.trigger("data",n)}})[o.type]()},this.reset=function(){n.size=0,n.data.length=0,r.size=0,r.data.length=0,this.trigger("reset")},this.flushStreams_=function(){a(n,"video"),a(r,"audio"),a(s,"timed-metadata")},this.flush=function(){if(!i&&e){var n={type:"metadata",tracks:[]};null!==e.video&&n.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+e.video,codec:"avc",type:"video"}),null!==e.audio&&n.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+e.audio,codec:"adts",type:"audio"}),t.trigger("data",n)}i=!1,this.flushStreams_(),this.trigger("done")}},rt.prototype=new q;var lt={PAT_PID:0,MP2T_PACKET_LENGTH:ot,TransportPacketStream:it,TransportParseStream:nt,ElementaryStream:rt,TimestampRolloverStream:at,CaptionStream:We.CaptionStream,Cea608Stream:We.Cea608Stream,Cea708Stream:We.Cea708Stream,MetadataStream:st};for(var ut in Ve)Ve.hasOwnProperty(ut)&&(lt[ut]=Ve[ut]);var ct,dt=lt,ht=fe,pt=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];ct=function(e){var t,i=0;ct.prototype.init.call(this),this.skipWarn_=function(e,t){this.trigger("log",{level:"warn",message:"adts skiping bytes "+e+" to "+t+" in frame "+i+" outside syncword"})},this.push=function(n){var r,s,a,o,l,u=0;if(e||(i=0),"audio"===n.type){var c;for(t&&t.length?(a=t,(t=new Uint8Array(a.byteLength+n.data.byteLength)).set(a),t.set(n.data,a.byteLength)):t=n.data;u+7<t.length;)if(255===t[u]&&240==(246&t[u+1])){if("number"==typeof c&&(this.skipWarn_(c,u),c=null),s=2*(1&~t[u+1]),r=(3&t[u+3])<<11|t[u+4]<<3|(224&t[u+5])>>5,l=(o=1024*(1+(3&t[u+6])))*ht/pt[(60&t[u+2])>>>2],t.byteLength-u<r)break;this.trigger("data",{pts:n.pts+i*l,dts:n.dts+i*l,sampleCount:o,audioobjecttype:1+(t[u+2]>>>6&3),channelcount:(1&t[u+2])<<2|(192&t[u+3])>>>6,samplerate:pt[(60&t[u+2])>>>2],samplingfrequencyindex:(60&t[u+2])>>>2,samplesize:16,data:t.subarray(u+7+s,u+r)}),i++,u+=r}else"number"!=typeof c&&(c=u),u++;"number"==typeof c&&(this.skipWarn_(c,u),c=null),t=t.subarray(u)}},this.flush=function(){i=0,this.trigger("done")},this.reset=function(){t=void 0,this.trigger("reset")},this.endTimeline=function(){t=void 0,this.trigger("endedtimeline")}},ct.prototype=new q;var ft,mt,gt,vt=ct,yt=function(e){var t=e.byteLength,i=0,n=0;this.length=function(){return 8*t},this.bitsAvailable=function(){return 8*t+n},this.loadWord=function(){var r=e.byteLength-t,s=new Uint8Array(4),a=Math.min(4,t);if(0===a)throw new Error("no bytes available");s.set(e.subarray(r,r+a)),i=new DataView(s.buffer).getUint32(0),n=8*a,t-=a},this.skipBits=function(e){var r;n>e?(i<<=e,n-=e):(e-=n,e-=8*(r=Math.floor(e/8)),t-=r,this.loadWord(),i<<=e,n-=e)},this.readBits=function(e){var r=Math.min(n,e),s=i>>>32-r;return(n-=r)>0?i<<=r:t>0&&this.loadWord(),(r=e-r)>0?s<<r|this.readBits(r):s},this.skipLeadingZeros=function(){var e;for(e=0;e<n;++e)if(0!=(i&2147483648>>>e))return i<<=e,n-=e,e;return this.loadWord(),e+this.skipLeadingZeros()},this.skipUnsignedExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros())},this.skipExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros())},this.readUnsignedExpGolomb=function(){var e=this.skipLeadingZeros();return this.readBits(e+1)-1},this.readExpGolomb=function(){var e=this.readUnsignedExpGolomb();return 1&e?1+e>>>1:-1*(e>>>1)},this.readBoolean=function(){return 1===this.readBits(1)},this.readUnsignedByte=function(){return this.readBits(8)},this.loadWord()};mt=function(){var e,t,i=0;mt.prototype.init.call(this),this.push=function(n){var r;t?((r=new Uint8Array(t.byteLength+n.data.byteLength)).set(t),r.set(n.data,t.byteLength),t=r):t=n.data;for(var s=t.byteLength;i<s-3;i++)if(1===t[i+2]){e=i+5;break}for(;e<s;)switch(t[e]){case 0:if(0!==t[e-1]){e+=2;break}if(0!==t[e-2]){e++;break}i+3!==e-2&&this.trigger("data",t.subarray(i+3,e-2));do{e++}while(1!==t[e]&&e<s);i=e-2,e+=3;break;case 1:if(0!==t[e-1]||0!==t[e-2]){e+=3;break}this.trigger("data",t.subarray(i+3,e-2)),i=e-2,e+=3;break;default:e+=3}t=t.subarray(i),e-=i,i=0},this.reset=function(){t=null,i=0,this.trigger("reset")},this.flush=function(){t&&t.byteLength>3&&this.trigger("data",t.subarray(i+3)),t=null,i=0,this.trigger("done")},this.endTimeline=function(){this.flush(),this.trigger("endedtimeline")}},mt.prototype=new q,gt={100:!0,110:!0,122:!0,244:!0,44:!0,83:!0,86:!0,118:!0,128:!0,138:!0,139:!0,134:!0},ft=function(){var e,t,i,n,r,s,a,o=new mt;ft.prototype.init.call(this),e=this,this.push=function(e){"video"===e.type&&(t=e.trackId,i=e.pts,n=e.dts,o.push(e))},o.on("data",(function(a){var o={trackId:t,pts:i,dts:n,data:a,nalUnitTypeCode:31&a[0]};switch(o.nalUnitTypeCode){case 5:o.nalUnitType="slice_layer_without_partitioning_rbsp_idr";break;case 6:o.nalUnitType="sei_rbsp",o.escapedRBSP=r(a.subarray(1));break;case 7:o.nalUnitType="seq_parameter_set_rbsp",o.escapedRBSP=r(a.subarray(1)),o.config=s(o.escapedRBSP);break;case 8:o.nalUnitType="pic_parameter_set_rbsp";break;case 9:o.nalUnitType="access_unit_delimiter_rbsp"}e.trigger("data",o)})),o.on("done",(function(){e.trigger("done")})),o.on("partialdone",(function(){e.trigger("partialdone")})),o.on("reset",(function(){e.trigger("reset")})),o.on("endedtimeline",(function(){e.trigger("endedtimeline")})),this.flush=function(){o.flush()},this.partialFlush=function(){o.partialFlush()},this.reset=function(){o.reset()},this.endTimeline=function(){o.endTimeline()},a=function(e,t){var i,n=8,r=8;for(i=0;i<e;i++)0!==r&&(r=(n+t.readExpGolomb()+256)%256),n=0===r?n:r},r=function(e){for(var t,i,n=e.byteLength,r=[],s=1;s<n-2;)0===e[s]&&0===e[s+1]&&3===e[s+2]?(r.push(s+2),s+=2):s++;if(0===r.length)return e;t=n-r.length,i=new Uint8Array(t);var a=0;for(s=0;s<t;a++,s++)a===r[0]&&(a++,r.shift()),i[s]=e[a];return i},s=function(e){var t,i,n,r,s,o,l,u,c,d,h,p,f=0,m=0,g=0,v=0,y=[1,1];if(i=(t=new yt(e)).readUnsignedByte(),r=t.readUnsignedByte(),n=t.readUnsignedByte(),t.skipUnsignedExpGolomb(),gt[i]&&(3===(s=t.readUnsignedExpGolomb())&&t.skipBits(1),t.skipUnsignedExpGolomb(),t.skipUnsignedExpGolomb(),t.skipBits(1),t.readBoolean()))for(h=3!==s?8:12,p=0;p<h;p++)t.readBoolean()&&a(p<6?16:64,t);if(t.skipUnsignedExpGolomb(),0===(o=t.readUnsignedExpGolomb()))t.readUnsignedExpGolomb();else if(1===o)for(t.skipBits(1),t.skipExpGolomb(),t.skipExpGolomb(),l=t.readUnsignedExpGolomb(),p=0;p<l;p++)t.skipExpGolomb();if(t.skipUnsignedExpGolomb(),t.skipBits(1),u=t.readUnsignedExpGolomb(),c=t.readUnsignedExpGolomb(),0===(d=t.readBits(1))&&t.skipBits(1),t.skipBits(1),t.readBoolean()&&(f=t.readUnsignedExpGolomb(),m=t.readUnsignedExpGolomb(),g=t.readUnsignedExpGolomb(),v=t.readUnsignedExpGolomb()),t.readBoolean()&&t.readBoolean()){switch(t.readUnsignedByte()){case 1:y=[1,1];break;case 2:y=[12,11];break;case 3:y=[10,11];break;case 4:y=[16,11];break;case 5:y=[40,33];break;case 6:y=[24,11];break;case 7:y=[20,11];break;case 8:y=[32,11];break;case 9:y=[80,33];break;case 10:y=[18,11];break;case 11:y=[15,11];break;case 12:y=[64,33];break;case 13:y=[160,99];break;case 14:y=[4,3];break;case 15:y=[3,2];break;case 16:y=[2,1];break;case 255:y=[t.readUnsignedByte()<<8|t.readUnsignedByte(),t.readUnsignedByte()<<8|t.readUnsignedByte()]}y&&(y[0],y[1])}return{profileIdc:i,levelIdc:n,profileCompatibility:r,width:16*(u+1)-2*f-2*m,height:(2-d)*(c+1)*16-2*g-2*v,sarRatio:y}}},ft.prototype=new q;var _t,bt={H264Stream:ft,NalByteStream:mt},Tt=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350],wt=function(e,t){var i=e[t+6]<<21|e[t+7]<<14|e[t+8]<<7|e[t+9];return i=i>=0?i:0,(16&e[t+5])>>4?i+20:i+10},St=function e(t,i){return t.length-i<10||t[i]!=="I".charCodeAt(0)||t[i+1]!=="D".charCodeAt(0)||t[i+2]!=="3".charCodeAt(0)?i:e(t,i+=wt(t,i))},kt=function(e){return e[0]<<21|e[1]<<14|e[2]<<7|e[3]},Et={isLikelyAacData:function(e){var t=St(e,0);return e.length>=t+2&&255==(255&e[t])&&240==(240&e[t+1])&&16==(22&e[t+1])},parseId3TagSize:wt,parseAdtsSize:function(e,t){var i=(224&e[t+5])>>5,n=e[t+4]<<3;return 6144&e[t+3]|n|i},parseType:function(e,t){return e[t]==="I".charCodeAt(0)&&e[t+1]==="D".charCodeAt(0)&&e[t+2]==="3".charCodeAt(0)?"timed-metadata":!0&e[t]&&240==(240&e[t+1])?"audio":null},parseSampleRate:function(e){for(var t=0;t+5<e.length;){if(255===e[t]&&240==(246&e[t+1]))return Tt[(60&e[t+2])>>>2];t++}return null},parseAacTimestamp:function(e){var t,i,n;t=10,64&e[5]&&(t+=4,t+=kt(e.subarray(10,14)));do{if((i=kt(e.subarray(t+4,t+8)))<1)return null;if("PRIV"===String.fromCharCode(e[t],e[t+1],e[t+2],e[t+3])){n=e.subarray(t+10,t+i+10);for(var r=0;r<n.byteLength;r++)if(0===n[r]){var s=unescape(function(e,t,i){var n,r="";for(n=t;n<i;n++)r+="%"+("00"+e[n].toString(16)).slice(-2);return r}(n,0,r));if("com.apple.streaming.transportStreamTimestamp"===s){var a=n.subarray(r+1),o=(1&a[3])<<30|a[4]<<22|a[5]<<14|a[6]<<6|a[7]>>>2;return o*=4,o+=3&a[7]}break}}t+=10,t+=i}while(t<e.byteLength);return null}};(_t=function(){var e=new Uint8Array,t=0;_t.prototype.init.call(this),this.setTimestamp=function(e){t=e},this.push=function(i){var n,r,s,a,o=0,l=0;for(e.length?(a=e.length,(e=new Uint8Array(i.byteLength+a)).set(e.subarray(0,a)),e.set(i,a)):e=i;e.length-l>=3;)if(e[l]!=="I".charCodeAt(0)||e[l+1]!=="D".charCodeAt(0)||e[l+2]!=="3".charCodeAt(0))if(255!=(255&e[l])||240!=(240&e[l+1]))l++;else{if(e.length-l<7)break;if(l+(o=Et.parseAdtsSize(e,l))>e.length)break;s={type:"audio",data:e.subarray(l,l+o),pts:t,dts:t},this.trigger("data",s),l+=o}else{if(e.length-l<10)break;if(l+(o=Et.parseId3TagSize(e,l))>e.length)break;r={type:"timed-metadata",data:e.subarray(l,l+o)},this.trigger("data",r),l+=o}n=e.length-l,e=n>0?e.subarray(l):new Uint8Array},this.reset=function(){e=new Uint8Array,this.trigger("reset")},this.endTimeline=function(){e=new Uint8Array,this.trigger("endedtimeline")}}).prototype=new q;var Ct,xt,At,Pt,It=_t,Ot=["audioobjecttype","channelcount","samplerate","samplingfrequencyindex","samplesize"],Lt=["width","height","profileIdc","levelIdc","profileCompatibility","sarRatio"],Dt=bt.H264Stream,Mt=Et.isLikelyAacData,Nt=fe,Rt=function(e,t){t.stream=e,this.trigger("log",t)},Ut=function(e,t){for(var i=Object.keys(t),n=0;n<i.length;n++){var r=i[n];"headOfPipeline"!==r&&t[r].on&&t[r].on("log",Rt.bind(e,r))}},Bt=function(e,t){var i;if(e.length!==t.length)return!1;for(i=0;i<e.length;i++)if(e[i]!==t[i])return!1;return!0},jt=function(e,t,i,n,r,s){return{start:{dts:e,pts:e+(i-t)},end:{dts:e+(n-t),pts:e+(r-i)},prependedContentDuration:s,baseMediaDecodeTime:e}};xt=function(e,t){var i,n=[],r=0,s=0,a=1/0;i=(t=t||{}).firstSequenceNumber||0,xt.prototype.init.call(this),this.push=function(t){xe(e,t),e&&Ot.forEach((function(i){e[i]=t[i]})),n.push(t)},this.setEarliestDts=function(e){r=e},this.setVideoBaseMediaDecodeTime=function(e){a=e},this.setAudioAppendStart=function(e){s=e},this.flush=function(){var o,l,u,c,d,h,p;0!==n.length?(o=Te(n,e,r),e.baseMediaDecodeTime=Ce(e,t.keepOriginalTimestamps),p=be(e,o,s,a),e.samples=we(o),u=ee(Se(o)),n=[],l=te(i,[e]),c=new Uint8Array(l.byteLength+u.byteLength),i++,c.set(l),c.set(u,l.byteLength),Ee(e),d=Math.ceil(1024*Nt/e.samplerate),o.length&&(h=o.length*d,this.trigger("segmentTimingInfo",jt(ve(e.baseMediaDecodeTime,e.samplerate),o[0].dts,o[0].pts,o[0].dts+h,o[0].pts+h,p||0)),this.trigger("timingInfo",{start:o[0].pts,end:o[0].pts+h})),this.trigger("data",{track:e,boxes:c}),this.trigger("done","AudioSegmentStream")):this.trigger("done","AudioSegmentStream")},this.reset=function(){Ee(e),n=[],this.trigger("reset")}},xt.prototype=new q,Ct=function(e,t){var i,n,r,s=[],a=[];i=(t=t||{}).firstSequenceNumber||0,Ct.prototype.init.call(this),delete e.minPTS,this.gopCache_=[],this.push=function(t){xe(e,t),"seq_parameter_set_rbsp"!==t.nalUnitType||n||(n=t.config,e.sps=[t.data],Lt.forEach((function(t){e[t]=n[t]}),this)),"pic_parameter_set_rbsp"!==t.nalUnitType||r||(r=t.data,e.pps=[t.data]),s.push(t)},this.flush=function(){for(var n,r,o,l,u,c,d,h,p=0;s.length&&"access_unit_delimiter_rbsp"!==s[0].nalUnitType;)s.shift();if(0===s.length)return this.resetStream_(),void this.trigger("done","VideoSegmentStream");if(n=re(s),(o=se(n))[0][0].keyFrame||((r=this.getGopForFusion_(s[0],e))?(p=r.duration,o.unshift(r),o.byteLength+=r.byteLength,o.nalCount+=r.nalCount,o.pts=r.pts,o.dts=r.dts,o.duration+=r.duration):o=ae(o)),a.length){var f;if(!(f=t.alignGopsAtEnd?this.alignGopsAtEnd_(o):this.alignGopsAtStart_(o)))return this.gopCache_.unshift({gop:o.pop(),pps:e.pps,sps:e.sps}),this.gopCache_.length=Math.min(6,this.gopCache_.length),s=[],this.resetStream_(),void this.trigger("done","VideoSegmentStream");Ee(e),o=f}xe(e,o),e.samples=oe(o),u=ee(le(o)),e.baseMediaDecodeTime=Ce(e,t.keepOriginalTimestamps),this.trigger("processedGopsInfo",o.map((function(e){return{pts:e.pts,dts:e.dts,byteLength:e.byteLength}}))),d=o[0],h=o[o.length-1],this.trigger("segmentTimingInfo",jt(e.baseMediaDecodeTime,d.dts,d.pts,h.dts+h.duration,h.pts+h.duration,p)),this.trigger("timingInfo",{start:o[0].pts,end:o[o.length-1].pts+o[o.length-1].duration}),this.gopCache_.unshift({gop:o.pop(),pps:e.pps,sps:e.sps}),this.gopCache_.length=Math.min(6,this.gopCache_.length),s=[],this.trigger("baseMediaDecodeTime",e.baseMediaDecodeTime),this.trigger("timelineStartInfo",e.timelineStartInfo),l=te(i,[e]),c=new Uint8Array(l.byteLength+u.byteLength),i++,c.set(l),c.set(u,l.byteLength),this.trigger("data",{track:e,boxes:c}),this.resetStream_(),this.trigger("done","VideoSegmentStream")},this.reset=function(){this.resetStream_(),s=[],this.gopCache_.length=0,a.length=0,this.trigger("reset")},this.resetStream_=function(){Ee(e),n=void 0,r=void 0},this.getGopForFusion_=function(t){var i,n,r,s,a,o=1/0;for(a=0;a<this.gopCache_.length;a++)r=(s=this.gopCache_[a]).gop,e.pps&&Bt(e.pps[0],s.pps[0])&&e.sps&&Bt(e.sps[0],s.sps[0])&&(r.dts<e.timelineStartInfo.dts||(i=t.dts-r.dts-r.duration)>=-1e4&&i<=45e3&&(!n||o>i)&&(n=s,o=i));return n?n.gop:null},this.alignGopsAtStart_=function(e){var t,i,n,r,s,o,l,u;for(s=e.byteLength,o=e.nalCount,l=e.duration,t=i=0;t<a.length&&i<e.length&&(n=a[t],r=e[i],n.pts!==r.pts);)r.pts>n.pts?t++:(i++,s-=r.byteLength,o-=r.nalCount,l-=r.duration);return 0===i?e:i===e.length?null:((u=e.slice(i)).byteLength=s,u.duration=l,u.nalCount=o,u.pts=u[0].pts,u.dts=u[0].dts,u)},this.alignGopsAtEnd_=function(e){var t,i,n,r,s,o,l;for(t=a.length-1,i=e.length-1,s=null,o=!1;t>=0&&i>=0;){if(n=a[t],r=e[i],n.pts===r.pts){o=!0;break}n.pts>r.pts?t--:(t===a.length-1&&(s=i),i--)}if(!o&&null===s)return null;if(0===(l=o?i:s))return e;var u=e.slice(l),c=u.reduce((function(e,t){return e.byteLength+=t.byteLength,e.duration+=t.duration,e.nalCount+=t.nalCount,e}),{byteLength:0,duration:0,nalCount:0});return u.byteLength=c.byteLength,u.duration=c.duration,u.nalCount=c.nalCount,u.pts=u[0].pts,u.dts=u[0].dts,u},this.alignGopsWith=function(e){a=e}},Ct.prototype=new q,Pt=function(e,t){this.numberOfTracks=0,this.metadataStream=t,void 0!==(e=e||{}).remux?this.remuxTracks=!!e.remux:this.remuxTracks=!0,"boolean"==typeof e.keepOriginalTimestamps?this.keepOriginalTimestamps=e.keepOriginalTimestamps:this.keepOriginalTimestamps=!1,this.pendingTracks=[],this.videoTrack=null,this.pendingBoxes=[],this.pendingCaptions=[],this.pendingMetadata=[],this.pendingBytes=0,this.emittedTracks=0,Pt.prototype.init.call(this),this.push=function(e){return e.text?this.pendingCaptions.push(e):e.frames?this.pendingMetadata.push(e):(this.pendingTracks.push(e.track),this.pendingBytes+=e.boxes.byteLength,"video"===e.track.type&&(this.videoTrack=e.track,this.pendingBoxes.push(e.boxes)),void("audio"===e.track.type&&(this.audioTrack=e.track,this.pendingBoxes.unshift(e.boxes))))}},Pt.prototype=new q,Pt.prototype.flush=function(e){var t,i,n,r,s=0,a={captions:[],captionStreams:{},metadata:[],info:{}},o=0;if(this.pendingTracks.length<this.numberOfTracks){if("VideoSegmentStream"!==e&&"AudioSegmentStream"!==e)return;if(this.remuxTracks)return;if(0===this.pendingTracks.length)return this.emittedTracks++,void(this.emittedTracks>=this.numberOfTracks&&(this.trigger("done"),this.emittedTracks=0))}if(this.videoTrack?(o=this.videoTrack.timelineStartInfo.pts,Lt.forEach((function(e){a.info[e]=this.videoTrack[e]}),this)):this.audioTrack&&(o=this.audioTrack.timelineStartInfo.pts,Ot.forEach((function(e){a.info[e]=this.audioTrack[e]}),this)),this.videoTrack||this.audioTrack){for(1===this.pendingTracks.length?a.type=this.pendingTracks[0].type:a.type="combined",this.emittedTracks+=this.pendingTracks.length,n=ie(this.pendingTracks),a.initSegment=new Uint8Array(n.byteLength),a.initSegment.set(n),a.data=new Uint8Array(this.pendingBytes),r=0;r<this.pendingBoxes.length;r++)a.data.set(this.pendingBoxes[r],s),s+=this.pendingBoxes[r].byteLength;for(r=0;r<this.pendingCaptions.length;r++)(t=this.pendingCaptions[r]).startTime=_e(t.startPts,o,this.keepOriginalTimestamps),t.endTime=_e(t.endPts,o,this.keepOriginalTimestamps),a.captionStreams[t.stream]=!0,a.captions.push(t);for(r=0;r<this.pendingMetadata.length;r++)(i=this.pendingMetadata[r]).cueTime=_e(i.pts,o,this.keepOriginalTimestamps),a.metadata.push(i);for(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),r=0;r<a.captions.length;r++)t=a.captions[r],this.trigger("caption",t);for(r=0;r<a.metadata.length;r++)i=a.metadata[r],this.trigger("id3Frame",i)}this.emittedTracks>=this.numberOfTracks&&(this.trigger("done"),this.emittedTracks=0)},Pt.prototype.setRemux=function(e){this.remuxTracks=e},At=function(e){var t,i,n=this,r=!0;At.prototype.init.call(this),e=e||{},this.baseMediaDecodeTime=e.baseMediaDecodeTime||0,this.transmuxPipeline_={},this.setupAacPipeline=function(){var r={};this.transmuxPipeline_=r,r.type="aac",r.metadataStream=new dt.MetadataStream,r.aacStream=new It,r.audioTimestampRolloverStream=new dt.TimestampRolloverStream("audio"),r.timedMetadataTimestampRolloverStream=new dt.TimestampRolloverStream("timed-metadata"),r.adtsStream=new vt,r.coalesceStream=new Pt(e,r.metadataStream),r.headOfPipeline=r.aacStream,r.aacStream.pipe(r.audioTimestampRolloverStream).pipe(r.adtsStream),r.aacStream.pipe(r.timedMetadataTimestampRolloverStream).pipe(r.metadataStream).pipe(r.coalesceStream),r.metadataStream.on("timestamp",(function(e){r.aacStream.setTimestamp(e.timeStamp)})),r.aacStream.on("data",(function(s){"timed-metadata"!==s.type&&"audio"!==s.type||r.audioSegmentStream||(i=i||{timelineStartInfo:{baseMediaDecodeTime:n.baseMediaDecodeTime},codec:"adts",type:"audio"},r.coalesceStream.numberOfTracks++,r.audioSegmentStream=new xt(i,e),r.audioSegmentStream.on("log",n.getLogTrigger_("audioSegmentStream")),r.audioSegmentStream.on("timingInfo",n.trigger.bind(n,"audioTimingInfo")),r.adtsStream.pipe(r.audioSegmentStream).pipe(r.coalesceStream),n.trigger("trackinfo",{hasAudio:!!i,hasVideo:!!t}))})),r.coalesceStream.on("data",this.trigger.bind(this,"data")),r.coalesceStream.on("done",this.trigger.bind(this,"done")),Ut(this,r)},this.setupTsPipeline=function(){var r={};this.transmuxPipeline_=r,r.type="ts",r.metadataStream=new dt.MetadataStream,r.packetStream=new dt.TransportPacketStream,r.parseStream=new dt.TransportParseStream,r.elementaryStream=new dt.ElementaryStream,r.timestampRolloverStream=new dt.TimestampRolloverStream,r.adtsStream=new vt,r.h264Stream=new Dt,r.captionStream=new dt.CaptionStream(e),r.coalesceStream=new Pt(e,r.metadataStream),r.headOfPipeline=r.packetStream,r.packetStream.pipe(r.parseStream).pipe(r.elementaryStream).pipe(r.timestampRolloverStream),r.timestampRolloverStream.pipe(r.h264Stream),r.timestampRolloverStream.pipe(r.adtsStream),r.timestampRolloverStream.pipe(r.metadataStream).pipe(r.coalesceStream),r.h264Stream.pipe(r.captionStream).pipe(r.coalesceStream),r.elementaryStream.on("data",(function(s){var a;if("metadata"===s.type){for(a=s.tracks.length;a--;)t||"video"!==s.tracks[a].type?i||"audio"!==s.tracks[a].type||((i=s.tracks[a]).timelineStartInfo.baseMediaDecodeTime=n.baseMediaDecodeTime):(t=s.tracks[a]).timelineStartInfo.baseMediaDecodeTime=n.baseMediaDecodeTime;t&&!r.videoSegmentStream&&(r.coalesceStream.numberOfTracks++,r.videoSegmentStream=new Ct(t,e),r.videoSegmentStream.on("log",n.getLogTrigger_("videoSegmentStream")),r.videoSegmentStream.on("timelineStartInfo",(function(t){i&&!e.keepOriginalTimestamps&&(i.timelineStartInfo=t,r.audioSegmentStream.setEarliestDts(t.dts-n.baseMediaDecodeTime))})),r.videoSegmentStream.on("processedGopsInfo",n.trigger.bind(n,"gopInfo")),r.videoSegmentStream.on("segmentTimingInfo",n.trigger.bind(n,"videoSegmentTimingInfo")),r.videoSegmentStream.on("baseMediaDecodeTime",(function(e){i&&r.audioSegmentStream.setVideoBaseMediaDecodeTime(e)})),r.videoSegmentStream.on("timingInfo",n.trigger.bind(n,"videoTimingInfo")),r.h264Stream.pipe(r.videoSegmentStream).pipe(r.coalesceStream)),i&&!r.audioSegmentStream&&(r.coalesceStream.numberOfTracks++,r.audioSegmentStream=new xt(i,e),r.audioSegmentStream.on("log",n.getLogTrigger_("audioSegmentStream")),r.audioSegmentStream.on("timingInfo",n.trigger.bind(n,"audioTimingInfo")),r.audioSegmentStream.on("segmentTimingInfo",n.trigger.bind(n,"audioSegmentTimingInfo")),r.adtsStream.pipe(r.audioSegmentStream).pipe(r.coalesceStream)),n.trigger("trackinfo",{hasAudio:!!i,hasVideo:!!t})}})),r.coalesceStream.on("data",this.trigger.bind(this,"data")),r.coalesceStream.on("id3Frame",(function(e){e.dispatchType=r.metadataStream.dispatchType,n.trigger("id3Frame",e)})),r.coalesceStream.on("caption",this.trigger.bind(this,"caption")),r.coalesceStream.on("done",this.trigger.bind(this,"done")),Ut(this,r)},this.setBaseMediaDecodeTime=function(n){var r=this.transmuxPipeline_;e.keepOriginalTimestamps||(this.baseMediaDecodeTime=n),i&&(i.timelineStartInfo.dts=void 0,i.timelineStartInfo.pts=void 0,Ee(i),r.audioTimestampRolloverStream&&r.audioTimestampRolloverStream.discontinuity()),t&&(r.videoSegmentStream&&(r.videoSegmentStream.gopCache_=[]),t.timelineStartInfo.dts=void 0,t.timelineStartInfo.pts=void 0,Ee(t),r.captionStream.reset()),r.timestampRolloverStream&&r.timestampRolloverStream.discontinuity()},this.setAudioAppendStart=function(e){i&&this.transmuxPipeline_.audioSegmentStream.setAudioAppendStart(e)},this.setRemux=function(t){var i=this.transmuxPipeline_;e.remux=t,i&&i.coalesceStream&&i.coalesceStream.setRemux(t)},this.alignGopsWith=function(e){t&&this.transmuxPipeline_.videoSegmentStream&&this.transmuxPipeline_.videoSegmentStream.alignGopsWith(e)},this.getLogTrigger_=function(e){var t=this;return function(i){i.stream=e,t.trigger("log",i)}},this.push=function(e){if(r){var t=Mt(e);t&&"aac"!==this.transmuxPipeline_.type?this.setupAacPipeline():t||"ts"===this.transmuxPipeline_.type||this.setupTsPipeline(),r=!1}this.transmuxPipeline_.headOfPipeline.push(e)},this.flush=function(){r=!0,this.transmuxPipeline_.headOfPipeline.flush()},this.endTimeline=function(){this.transmuxPipeline_.headOfPipeline.endTimeline()},this.reset=function(){this.transmuxPipeline_.headOfPipeline&&this.transmuxPipeline_.headOfPipeline.reset()},this.resetCaptions=function(){this.transmuxPipeline_.captionStream&&this.transmuxPipeline_.captionStream.reset()}},At.prototype=new q;var Ft,Ht,qt,zt={Transmuxer:At,VideoSegmentStream:Ct,AudioSegmentStream:xt,AUDIO_PROPERTIES:Ot,VIDEO_PROPERTIES:Lt,generateSegmentTimingInfo:jt},Wt=function(e){return e>>>0},Vt=function(e){return("00"+e.toString(16)).slice(-2)},$t=function(e){var t="";return t+=String.fromCharCode(e[0]),t+=String.fromCharCode(e[1]),t+=String.fromCharCode(e[2]),t+=String.fromCharCode(e[3])},Xt=Wt,Gt=function e(t,i){var n,r,s,a,o,l=[];if(!i.length)return null;for(n=0;n<t.byteLength;)r=Xt(t[n]<<24|t[n+1]<<16|t[n+2]<<8|t[n+3]),s=$t(t.subarray(n+4,n+8)),a=r>1?n+r:t.byteLength,s===i[0]&&(1===i.length?l.push(t.subarray(n+8,a)):(o=e(t.subarray(n+8,a),i.slice(1))).length&&(l=l.concat(o))),n=a;return l},Yt=Wt,Kt=W.getUint64,Qt=function(e){var t={version:e[0],flags:new Uint8Array(e.subarray(1,4))};return 1===t.version?t.baseMediaDecodeTime=Kt(e.subarray(4)):t.baseMediaDecodeTime=Yt(e[4]<<24|e[5]<<16|e[6]<<8|e[7]),t},Jt=function(e){return{isLeading:(12&e[0])>>>2,dependsOn:3&e[0],isDependedOn:(192&e[1])>>>6,hasRedundancy:(48&e[1])>>>4,paddingValue:(14&e[1])>>>1,isNonSyncSample:1&e[1],degradationPriority:e[2]<<8|e[3]}},Zt=function(e){var t,i={version:e[0],flags:new Uint8Array(e.subarray(1,4)),samples:[]},n=new DataView(e.buffer,e.byteOffset,e.byteLength),r=1&i.flags[2],s=4&i.flags[2],a=1&i.flags[1],o=2&i.flags[1],l=4&i.flags[1],u=8&i.flags[1],c=n.getUint32(4),d=8;for(r&&(i.dataOffset=n.getInt32(d),d+=4),s&&c&&(t={flags:Jt(e.subarray(d,d+4))},d+=4,a&&(t.duration=n.getUint32(d),d+=4),o&&(t.size=n.getUint32(d),d+=4),u&&(1===i.version?t.compositionTimeOffset=n.getInt32(d):t.compositionTimeOffset=n.getUint32(d),d+=4),i.samples.push(t),c--);c--;)t={},a&&(t.duration=n.getUint32(d),d+=4),o&&(t.size=n.getUint32(d),d+=4),l&&(t.flags=Jt(e.subarray(d,d+4)),d+=4),u&&(1===i.version?t.compositionTimeOffset=n.getInt32(d):t.compositionTimeOffset=n.getUint32(d),d+=4),i.samples.push(t);return i},ei=function(e){var t,i=new DataView(e.buffer,e.byteOffset,e.byteLength),n={version:e[0],flags:new Uint8Array(e.subarray(1,4)),trackId:i.getUint32(4)},r=1&n.flags[2],s=2&n.flags[2],a=8&n.flags[2],o=16&n.flags[2],l=32&n.flags[2],u=65536&n.flags[0],c=131072&n.flags[0];return t=8,r&&(t+=4,n.baseDataOffset=i.getUint32(12),t+=4),s&&(n.sampleDescriptionIndex=i.getUint32(t),t+=4),a&&(n.defaultSampleDuration=i.getUint32(t),t+=4),o&&(n.defaultSampleSize=i.getUint32(t),t+=4),l&&(n.defaultSampleFlags=i.getUint32(t)),u&&(n.durationIsEmpty=!0),!r&&c&&(n.baseDataOffsetIsMoof=!0),n},ti="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==i.g?i.g:"undefined"!=typeof self?self:{},ii="undefined"!=typeof window?window:void 0!==ti?ti:"undefined"!=typeof self?self:{},ni=Oe,ri=We.CaptionStream,si=function(e,t){for(var i=e,n=0;n<t.length;n++){var r=t[n];if(i<r.size)return r;i-=r.size}return null},ai=function(e,t){var i=Gt(e,["moof","traf"]),n=Gt(e,["mdat"]),r={},s=[];return n.forEach((function(e,t){var n=i[t];s.push({mdat:e,traf:n})})),s.forEach((function(e){var i,n,s=e.mdat,a=e.traf,o=Gt(a,["tfhd"]),l=ei(o[0]),u=l.trackId,c=Gt(a,["tfdt"]),d=c.length>0?Qt(c[0]).baseMediaDecodeTime:0,h=Gt(a,["trun"]);t===u&&h.length>0&&(i=function(e,t,i){var n=t,r=i.defaultSampleDuration||0,s=i.defaultSampleSize||0,a=i.trackId,o=[];return e.forEach((function(e){var t=Zt(e).samples;t.forEach((function(e){void 0===e.duration&&(e.duration=r),void 0===e.size&&(e.size=s),e.trackId=a,e.dts=n,void 0===e.compositionTimeOffset&&(e.compositionTimeOffset=0),"bigint"==typeof n?(e.pts=n+ii.BigInt(e.compositionTimeOffset),n+=ii.BigInt(e.duration)):(e.pts=n+e.compositionTimeOffset,n+=e.duration)})),o=o.concat(t)})),o}(h,d,l),n=function(e,t,i){var n,r,s,a,o=new DataView(e.buffer,e.byteOffset,e.byteLength),l={logs:[],seiNals:[]};for(r=0;r+4<e.length;r+=s)if(s=o.getUint32(r),r+=4,!(s<=0))switch(31&e[r]){case 6:var u=e.subarray(r+1,r+1+s),c=si(r,t);if(n={nalUnitType:"sei_rbsp",size:s,data:u,escapedRBSP:ni(u),trackId:i},c)n.pts=c.pts,n.dts=c.dts,a=c;else{if(!a){l.logs.push({level:"warn",message:"We've encountered a nal unit without data at "+r+" for trackId "+i+". See mux.js#223."});break}n.pts=a.pts,n.dts=a.dts}l.seiNals.push(n)}return l}(s,i,u),r[u]||(r[u]={seiNals:[],logs:[]}),r[u].seiNals=r[u].seiNals.concat(n.seiNals),r[u].logs=r[u].logs.concat(n.logs))})),r},oi=function(){var e,t,i,n,r,s,a=!1;this.isInitialized=function(){return a},this.init=function(t){e=new ri,a=!0,s=!!t&&t.isPartial,e.on("data",(function(e){e.startTime=e.startPts/n,e.endTime=e.endPts/n,r.captions.push(e),r.captionStreams[e.stream]=!0})),e.on("log",(function(e){r.logs.push(e)}))},this.isNewInit=function(e,t){return!(e&&0===e.length||t&&"object"==typeof t&&0===Object.keys(t).length)&&(i!==e[0]||n!==t[i])},this.parse=function(e,s,a){var o;if(!this.isInitialized())return null;if(!s||!a)return null;if(this.isNewInit(s,a))i=s[0],n=a[i];else if(null===i||!n)return t.push(e),null;for(;t.length>0;){var l=t.shift();this.parse(l,s,a)}return o=function(e,t,i){if(null===t)return null;var n=ai(e,t)[t]||{};return{seiNals:n.seiNals,logs:n.logs,timescale:i}}(e,i,n),o&&o.logs&&(r.logs=r.logs.concat(o.logs)),null!==o&&o.seiNals?(this.pushNals(o.seiNals),this.flushStream(),r):r.logs.length?{logs:r.logs,captions:[],captionStreams:[]}: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;s?e.partialFlush():e.flush()},this.clearParsedCaptions=function(){r.captions=[],r.captionStreams={},r.logs=[]},this.resetCaptionStream=function(){if(!this.isInitialized())return null;e.reset()},this.clearAllCaptions=function(){this.clearParsedCaptions(),this.resetCaptionStream()},this.reset=function(){t=[],i=null,n=null,r?this.clearParsedCaptions():r={captions:[],captionStreams:{},logs:[]},this.resetCaptionStream()},this.reset()},li=Wt,ui=Vt,ci=W.getUint64;Ft=function(e,t){var i=Gt(t,["moof","traf"]).reduce((function(t,i){var n,r,s=Gt(i,["tfhd"])[0],a=li(s[4]<<24|s[5]<<16|s[6]<<8|s[7]),o=e[a]||9e4,l=Gt(i,["tfdt"])[0],u=new DataView(l.buffer,l.byteOffset,l.byteLength);return"bigint"==typeof(n=1===l[0]?ci(l.subarray(4,12)):u.getUint32(4))?r=n/ii.BigInt(o):"number"!=typeof n||isNaN(n)||(r=n/o),r<Number.MAX_SAFE_INTEGER&&(r=Number(r)),r<t&&(t=r),t}),1/0);return"bigint"==typeof i||isFinite(i)?i:0},qt=function(e){var t=0===e[0]?12:20;return li(e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3])},Ht=function(e){var t=Gt(e,["moov","trak"]),i=[];return t.forEach((function(e){var t,n,r={},s=Gt(e,["tkhd"])[0];s&&(n=(t=new DataView(s.buffer,s.byteOffset,s.byteLength)).getUint8(0),r.id=0===n?t.getUint32(12):t.getUint32(20));var a=Gt(e,["mdia","hdlr"])[0];if(a){var o=$t(a.subarray(8,12));r.type="vide"===o?"video":"soun"===o?"audio":o}var l=Gt(e,["mdia","minf","stbl","stsd"])[0];if(l){var u=l.subarray(8);r.codec=$t(u.subarray(4,8));var c,d=Gt(u,[r.codec])[0];d&&(/^[asm]vc[1-9]$/i.test(r.codec)?(c=d.subarray(78),"avcC"===$t(c.subarray(4,8))&&c.length>11?(r.codec+=".",r.codec+=ui(c[9]),r.codec+=ui(c[10]),r.codec+=ui(c[11])):r.codec="avc1.4d400d"):/^mp4[a,v]$/i.test(r.codec)?(c=d.subarray(28),"esds"===$t(c.subarray(4,8))&&c.length>20&&0!==c[19]?(r.codec+="."+ui(c[19]),r.codec+="."+ui(c[20]>>>2&63).replace(/^0/,"")):r.codec="mp4a.40.2"):r.codec=r.codec.toLowerCase())}var h=Gt(e,["mdia","mdhd"])[0];h&&(r.timescale=qt(h)),i.push(r)})),i};var di=Ft,hi=Ht,pi=function(e){var t=31&e[1];return t<<=8,t|=e[2]},fi=function(e){return!!(64&e[1])},mi=function(e){var t=0;return(48&e[3])>>>4>1&&(t+=e[4]+1),t},gi=function(e){switch(e){case 5:return"slice_layer_without_partitioning_rbsp_idr";case 6:return"sei_rbsp";case 7:return"seq_parameter_set_rbsp";case 8:return"pic_parameter_set_rbsp";case 9:return"access_unit_delimiter_rbsp";default:return null}},vi={parseType:function(e,t){var i=pi(e);return 0===i?"pat":i===t?"pmt":t?"pes":null},parsePat:function(e){var t=fi(e),i=4+mi(e);return t&&(i+=e[i]+1),(31&e[i+10])<<8|e[i+11]},parsePmt:function(e){var t={},i=fi(e),n=4+mi(e);if(i&&(n+=e[n]+1),1&e[n+5]){var r;r=3+((15&e[n+1])<<8|e[n+2])-4;for(var s=12+((15&e[n+10])<<8|e[n+11]);s<r;){var a=n+s;t[(31&e[a+1])<<8|e[a+2]]=e[a],s+=5+((15&e[a+3])<<8|e[a+4])}return t}},parsePayloadUnitStartIndicator:fi,parsePesType:function(e,t){switch(t[pi(e)]){case Ve.H264_STREAM_TYPE:return"video";case Ve.ADTS_STREAM_TYPE:return"audio";case Ve.METADATA_STREAM_TYPE:return"timed-metadata";default:return null}},parsePesTime:function(e){if(!fi(e))return null;var t=4+mi(e);if(t>=e.byteLength)return null;var i,n=null;return 192&(i=e[t+7])&&((n={}).pts=(14&e[t+9])<<27|(255&e[t+10])<<20|(254&e[t+11])<<12|(255&e[t+12])<<5|(254&e[t+13])>>>3,n.pts*=4,n.pts+=(6&e[t+13])>>>1,n.dts=n.pts,64&i&&(n.dts=(14&e[t+14])<<27|(255&e[t+15])<<20|(254&e[t+16])<<12|(255&e[t+17])<<5|(254&e[t+18])>>>3,n.dts*=4,n.dts+=(6&e[t+18])>>>1)),n},videoPacketContainsKeyFrame:function(e){for(var t=4+mi(e),i=e.subarray(t),n=0,r=0,s=!1;r<i.byteLength-3;r++)if(1===i[r+2]){n=r+5;break}for(;n<i.byteLength;)switch(i[n]){case 0:if(0!==i[n-1]){n+=2;break}if(0!==i[n-2]){n++;break}r+3!==n-2&&"slice_layer_without_partitioning_rbsp_idr"===gi(31&i[r+3])&&(s=!0);do{n++}while(1!==i[n]&&n<i.length);r=n-2,n+=3;break;case 1:if(0!==i[n-1]||0!==i[n-2]){n+=3;break}"slice_layer_without_partitioning_rbsp_idr"===gi(31&i[r+3])&&(s=!0),r=n-2,n+=3;break;default:n+=3}return i=i.subarray(r),n-=r,r=0,i&&i.byteLength>3&&"slice_layer_without_partitioning_rbsp_idr"===gi(31&i[r+3])&&(s=!0),s}},yi=Qe,_i={};_i.ts=vi,_i.aac=Et;var bi=fe,Ti=188,wi=71,Si=function(e,t,i){for(var n,r,s,a,o=0,l=Ti,u=!1;l<=e.byteLength;)if(e[o]!==wi||e[l]!==wi&&l!==e.byteLength)o++,l++;else{if(n=e.subarray(o,l),"pes"===_i.ts.parseType(n,t.pid))r=_i.ts.parsePesType(n,t.table),s=_i.ts.parsePayloadUnitStartIndicator(n),"audio"===r&&s&&(a=_i.ts.parsePesTime(n))&&(a.type="audio",i.audio.push(a),u=!0);if(u)break;o+=Ti,l+=Ti}for(o=(l=e.byteLength)-Ti,u=!1;o>=0;)if(e[o]!==wi||e[l]!==wi&&l!==e.byteLength)o--,l--;else{if(n=e.subarray(o,l),"pes"===_i.ts.parseType(n,t.pid))r=_i.ts.parsePesType(n,t.table),s=_i.ts.parsePayloadUnitStartIndicator(n),"audio"===r&&s&&(a=_i.ts.parsePesTime(n))&&(a.type="audio",i.audio.push(a),u=!0);if(u)break;o-=Ti,l-=Ti}},ki=function(e,t,i){for(var n,r,s,a,o,l,u,c=0,d=Ti,h=!1,p={data:[],size:0};d<e.byteLength;)if(e[c]!==wi||e[d]!==wi)c++,d++;else{if(n=e.subarray(c,d),"pes"===_i.ts.parseType(n,t.pid))if(r=_i.ts.parsePesType(n,t.table),s=_i.ts.parsePayloadUnitStartIndicator(n),"video"===r&&(s&&!h&&(a=_i.ts.parsePesTime(n))&&(a.type="video",i.video.push(a),h=!0),!i.firstKeyFrame)){if(s&&0!==p.size){for(o=new Uint8Array(p.size),l=0;p.data.length;)u=p.data.shift(),o.set(u,l),l+=u.byteLength;if(_i.ts.videoPacketContainsKeyFrame(o)){var f=_i.ts.parsePesTime(o);f?(i.firstKeyFrame=f,i.firstKeyFrame.type="video"):console.warn("Failed to extract PTS/DTS from PES at first keyframe. This could be an unusual TS segment, or else mux.js did not parse your TS segment correctly. If you know your TS segments do contain PTS/DTS on keyframes please file a bug report! You can try ffprobe to double check for yourself.")}p.size=0}p.data.push(n),p.size+=n.byteLength}if(h&&i.firstKeyFrame)break;c+=Ti,d+=Ti}for(c=(d=e.byteLength)-Ti,h=!1;c>=0;)if(e[c]!==wi||e[d]!==wi)c--,d--;else{if(n=e.subarray(c,d),"pes"===_i.ts.parseType(n,t.pid))r=_i.ts.parsePesType(n,t.table),s=_i.ts.parsePayloadUnitStartIndicator(n),"video"===r&&s&&(a=_i.ts.parsePesTime(n))&&(a.type="video",i.video.push(a),h=!0);if(h)break;c-=Ti,d-=Ti}},Ei=function(e){var t={pid:null,table:null},i={};for(var n in function(e,t){for(var i,n=0,r=Ti;r<e.byteLength;)if(e[n]!==wi||e[r]!==wi)n++,r++;else{switch(i=e.subarray(n,r),_i.ts.parseType(i,t.pid)){case"pat":t.pid=_i.ts.parsePat(i);break;case"pmt":var s=_i.ts.parsePmt(i);t.table=t.table||{},Object.keys(s).forEach((function(e){t.table[e]=s[e]}))}n+=Ti,r+=Ti}}(e,t),t.table){if(t.table.hasOwnProperty(n))switch(t.table[n]){case Ve.H264_STREAM_TYPE:i.video=[],ki(e,t,i),0===i.video.length&&delete i.video;break;case Ve.ADTS_STREAM_TYPE:i.audio=[],Si(e,t,i),0===i.audio.length&&delete i.audio}}return i},Ci=function(e,t){var i;return i=_i.aac.isLikelyAacData(e)?function(e){for(var t,i=!1,n=0,r=null,s=null,a=0,o=0;e.length-o>=3;){switch(_i.aac.parseType(e,o)){case"timed-metadata":if(e.length-o<10){i=!0;break}if((a=_i.aac.parseId3TagSize(e,o))>e.length){i=!0;break}null===s&&(t=e.subarray(o,o+a),s=_i.aac.parseAacTimestamp(t)),o+=a;break;case"audio":if(e.length-o<7){i=!0;break}if((a=_i.aac.parseAdtsSize(e,o))>e.length){i=!0;break}null===r&&(t=e.subarray(o,o+a),r=_i.aac.parseSampleRate(t)),n++,o+=a;break;default:o++}if(i)return null}if(null===r||null===s)return null;var l=bi/r;return{audio:[{type:"audio",dts:s,pts:s},{type:"audio",dts:s+1024*n*l,pts:s+1024*n*l}]}}(e):Ei(e),i&&(i.audio||i.video)?(function(e,t){if(e.audio&&e.audio.length){var i=t;(void 0===i||isNaN(i))&&(i=e.audio[0].dts),e.audio.forEach((function(e){e.dts=yi(e.dts,i),e.pts=yi(e.pts,i),e.dtsTime=e.dts/bi,e.ptsTime=e.pts/bi}))}if(e.video&&e.video.length){var n=t;if((void 0===n||isNaN(n))&&(n=e.video[0].dts),e.video.forEach((function(e){e.dts=yi(e.dts,n),e.pts=yi(e.pts,n),e.dtsTime=e.dts/bi,e.ptsTime=e.pts/bi})),e.firstKeyFrame){var r=e.firstKeyFrame;r.dts=yi(r.dts,n),r.pts=yi(r.pts,n),r.dtsTime=r.dts/bi,r.ptsTime=r.pts/bi}}}(i,t),i):null},xi=function(){function e(e,t){this.options=t||{},this.self=e,this.init()}var t=e.prototype;return t.init=function(){this.transmuxer&&this.transmuxer.dispose(),this.transmuxer=new zt.Transmuxer(this.options),function(e,t){t.on("data",(function(t){var i=t.initSegment;t.initSegment={data:i.buffer,byteOffset:i.byteOffset,byteLength:i.byteLength};var n=t.data;t.data=n.buffer,e.postMessage({action:"data",segment:t,byteOffset:n.byteOffset,byteLength:n.byteLength},[t.data])})),t.on("done",(function(t){e.postMessage({action:"done"})})),t.on("gopInfo",(function(t){e.postMessage({action:"gopInfo",gopInfo:t})})),t.on("videoSegmentTimingInfo",(function(t){var i={start:{decode:ge(t.start.dts),presentation:ge(t.start.pts)},end:{decode:ge(t.end.dts),presentation:ge(t.end.pts)},baseMediaDecodeTime:ge(t.baseMediaDecodeTime)};t.prependedContentDuration&&(i.prependedContentDuration=ge(t.prependedContentDuration)),e.postMessage({action:"videoSegmentTimingInfo",videoSegmentTimingInfo:i})})),t.on("audioSegmentTimingInfo",(function(t){var i={start:{decode:ge(t.start.dts),presentation:ge(t.start.pts)},end:{decode:ge(t.end.dts),presentation:ge(t.end.pts)},baseMediaDecodeTime:ge(t.baseMediaDecodeTime)};t.prependedContentDuration&&(i.prependedContentDuration=ge(t.prependedContentDuration)),e.postMessage({action:"audioSegmentTimingInfo",audioSegmentTimingInfo:i})})),t.on("id3Frame",(function(t){e.postMessage({action:"id3Frame",id3Frame:t})})),t.on("caption",(function(t){e.postMessage({action:"caption",caption:t})})),t.on("trackinfo",(function(t){e.postMessage({action:"trackinfo",trackInfo:t})})),t.on("audioTimingInfo",(function(t){e.postMessage({action:"audioTimingInfo",audioTimingInfo:{start:ge(t.start),end:ge(t.end)}})})),t.on("videoTimingInfo",(function(t){e.postMessage({action:"videoTimingInfo",videoTimingInfo:{start:ge(t.start),end:ge(t.end)}})})),t.on("log",(function(t){e.postMessage({action:"log",log:t})}))}(this.self,this.transmuxer)},t.pushMp4Captions=function(e){this.captionParser||(this.captionParser=new oi,this.captionParser.init());var t=new Uint8Array(e.data,e.byteOffset,e.byteLength),i=this.captionParser.parse(t,e.trackIds,e.timescales);this.self.postMessage({action:"mp4Captions",captions:i&&i.captions||[],logs:i&&i.logs||[],data:t.buffer},[t.buffer])},t.probeMp4StartTime=function(e){var t=e.timescales,i=e.data,n=di(t,i);this.self.postMessage({action:"probeMp4StartTime",startTime:n,data:i},[i.buffer])},t.probeMp4Tracks=function(e){var t=e.data,i=hi(t);this.self.postMessage({action:"probeMp4Tracks",tracks:i,data:t},[t.buffer])},t.probeTs=function(e){var t=e.data,i=e.baseStartTime,n="number"!=typeof i||isNaN(i)?void 0:i*fe,r=Ci(t,n),s=null;r&&((s={hasVideo:r.video&&2===r.video.length||!1,hasAudio:r.audio&&2===r.audio.length||!1}).hasVideo&&(s.videoStart=r.video[0].ptsTime),s.hasAudio&&(s.audioStart=r.audio[0].ptsTime)),this.self.postMessage({action:"probeTs",result:s,data:t},[t.buffer])},t.clearAllMp4Captions=function(){this.captionParser&&this.captionParser.clearAllCaptions()},t.clearParsedMp4Captions=function(){this.captionParser&&this.captionParser.clearParsedCaptions()},t.push=function(e){var t=new Uint8Array(e.data,e.byteOffset,e.byteLength);this.transmuxer.push(t)},t.reset=function(){this.transmuxer.reset()},t.setTimestampOffset=function(e){var t=e.timestampOffset||0;this.transmuxer.setBaseMediaDecodeTime(Math.round(me(t)))},t.setAudioAppendStart=function(e){this.transmuxer.setAudioAppendStart(Math.ceil(me(e.appendStart)))},t.setRemux=function(e){this.transmuxer.setRemux(e.remux)},t.flush=function(e){this.transmuxer.flush(),self.postMessage({action:"done",type:"transmuxed"})},t.endTimeline=function(){this.transmuxer.endTimeline(),self.postMessage({action:"endedtimeline",type:"transmuxed"})},t.alignGopsWith=function(e){this.transmuxer.alignGopsWith(e.gopsToAlignWith.slice())},e}();self.onmessage=function(e){"init"===e.data.action&&e.data.options?this.messageHandlers=new xi(self,e.data.options):(this.messageHandlers||(this.messageHandlers=new xi(self)),e.data&&e.data.action&&"init"!==e.data.action&&this.messageHandlers[e.data.action]&&this.messageHandlers[e.data.action](e.data))}}))),ha=la(da),pa=function(e){var t=e.transmuxer,i=e.bytes,n=e.audioAppendStart,r=e.gopsToAlignWith,s=e.remux,a=e.onData,o=e.onTrackInfo,l=e.onAudioTimingInfo,u=e.onVideoTimingInfo,c=e.onVideoSegmentTimingInfo,d=e.onAudioSegmentTimingInfo,h=e.onId3,p=e.onCaptions,f=e.onDone,m=e.onEndedTimeline,g=e.onTransmuxerLog,v=e.isEndOfTimeline,y={buffer:[]},_=v;if(t.onmessage=function(i){t.currentTransmux===e&&("data"===i.data.action&&function(e,t,i){var n=e.data.segment,r=n.type,s=n.initSegment,a=n.captions,o=n.captionStreams,l=n.metadata,u=n.videoFrameDtsTime,c=n.videoFramePtsTime;t.buffer.push({captions:a,captionStreams:o,metadata:l});var d=e.data.segment.boxes||{data:e.data.segment.data},h={type:r,data:new Uint8Array(d.data,d.data.byteOffset,d.data.byteLength),initSegment:new Uint8Array(s.data,s.byteOffset,s.byteLength)};void 0!==u&&(h.videoFrameDtsTime=u),void 0!==c&&(h.videoFramePtsTime=c),i(h)}(i,y,a),"trackinfo"===i.data.action&&o(i.data.trackInfo),"gopInfo"===i.data.action&&function(e,t){t.gopInfo=e.data.gopInfo}(i,y),"audioTimingInfo"===i.data.action&&l(i.data.audioTimingInfo),"videoTimingInfo"===i.data.action&&u(i.data.videoTimingInfo),"videoSegmentTimingInfo"===i.data.action&&c(i.data.videoSegmentTimingInfo),"audioSegmentTimingInfo"===i.data.action&&d(i.data.audioSegmentTimingInfo),"id3Frame"===i.data.action&&h([i.data.id3Frame],i.data.id3Frame.dispatchType),"caption"===i.data.action&&p(i.data.caption),"endedtimeline"===i.data.action&&(_=!1,m()),"log"===i.data.action&&g(i.data.log),"transmuxed"===i.data.type&&(_||(t.onmessage=null,function(e){var t=e.transmuxedData,i=e.callback;t.buffer=[],i(t)}({transmuxedData:y,callback:f}),fa(t))))},n&&t.postMessage({action:"setAudioAppendStart",appendStart:n}),Array.isArray(r)&&t.postMessage({action:"alignGopsWith",gopsToAlignWith:r}),void 0!==s&&t.postMessage({action:"setRemux",remux:s}),i.byteLength){var b=i instanceof ArrayBuffer?i:i.buffer,T=i instanceof ArrayBuffer?0:i.byteOffset;t.postMessage({action:"push",data:b,byteOffset:T,byteLength:i.byteLength},[b])}v&&t.postMessage({action:"endTimeline"}),t.postMessage({action:"flush"})},fa=function(e){e.currentTransmux=null,e.transmuxQueue.length&&(e.currentTransmux=e.transmuxQueue.shift(),"function"==typeof e.currentTransmux?e.currentTransmux():pa(e.currentTransmux))},ma=function(e,t){e.postMessage({action:t}),fa(e)},ga=function(e,t){if(!t.currentTransmux)return t.currentTransmux=e,void ma(t,e);t.transmuxQueue.push(ma.bind(null,t,e))},va=function(e){if(!e.transmuxer.currentTransmux)return e.transmuxer.currentTransmux=e,void pa(e);e.transmuxer.transmuxQueue.push(e)},ya=function(e){ga("reset",e)},_a=function(e){var t=new ha;t.currentTransmux=null,t.transmuxQueue=[];var i=t.terminate;return t.terminate=function(){return t.currentTransmux=null,t.transmuxQueue.length=0,i.call(t)},t.postMessage({action:"init",options:e}),t},ba=function(e){var t=e.transmuxer,i=e.endAction||e.action,n=e.callback,r=(0,l.default)({},e,{endAction:null,transmuxer:null,callback:null});if(t.addEventListener("message",(function r(s){s.data.action===i&&(t.removeEventListener("message",r),s.data.data&&(s.data.data=new Uint8Array(s.data.data,e.byteOffset||0,e.byteLength||s.data.data.byteLength),e.data&&(e.data=s.data.data)),n(s.data))})),e.data){var s=e.data instanceof ArrayBuffer;r.byteOffset=s?0:e.data.byteOffset,r.byteLength=e.data.byteLength;var a=[s?e.data:e.data.buffer];t.postMessage(r,a)}else t.postMessage(r)},Ta=2,wa=-101,Sa=-102,ka=function(e){e.forEach((function(e){e.abort()}))},Ea=function(e,t){return t.timedout?{status:t.status,message:"HLS request timed-out at URL: "+t.uri,code:wa,xhr:t}:t.aborted?{status:t.status,message:"HLS request aborted at URL: "+t.uri,code:Sa,xhr:t}:e?{status:t.status,message:"HLS request errored at URL: "+t.uri,code:Ta,xhr:t}:"arraybuffer"===t.responseType&&0===t.response.byteLength?{status:t.status,message:"Empty HLS response at URL: "+t.uri,code:Ta,xhr:t}:null},Ca=function(e,t,i){return function(n,r){var s=r.response,a=Ea(n,r);if(a)return i(a,e);if(16!==s.byteLength)return i({status:r.status,message:"Invalid HLS key at URL: "+r.uri,code:Ta,xhr:r},e);for(var o=new DataView(s),l=new Uint32Array([o.getUint32(0),o.getUint32(4),o.getUint32(8),o.getUint32(12)]),u=0;u<t.length;u++)t[u].bytes=l;return i(null,e)}},xa=function(e,t){var i=(0,P.detectContainerForBytes)(e.map.bytes);if("mp4"!==i){var n=e.map.resolvedUri||e.map.uri;return t({internal:!0,message:"Found unsupported "+(i||"unknown")+" container for initialization segment at URL: "+n,code:Ta})}ba({action:"probeMp4Tracks",data:e.map.bytes,transmuxer:e.transmuxer,callback:function(i){var n=i.tracks,r=i.data;return e.map.bytes=r,n.forEach((function(t){e.map.tracks=e.map.tracks||{},e.map.tracks[t.type]||(e.map.tracks[t.type]=t,"number"==typeof t.id&&t.timescale&&(e.map.timescales=e.map.timescales||{},e.map.timescales[t.id]=t.timescale))})),t(null)}})},Aa=function(e){var t=e.segment,i=e.finishProcessingFn,n=e.responseType;return function(e,r){var s=Ea(e,r);if(s)return i(s,t);var a="arraybuffer"!==n&&r.responseText?function(e){for(var t=new Uint8Array(new ArrayBuffer(e.length)),i=0;i<e.length;i++)t[i]=e.charCodeAt(i);return t.buffer}(r.responseText.substring(t.lastReachedChar||0)):r.response;return t.stats=function(e){return{bandwidth:e.bandwidth,bytesReceived:e.bytesReceived||0,roundTripTime:e.roundTripTime||0}}(r),t.key?t.encryptedBytes=new Uint8Array(a):t.bytes=new Uint8Array(a),i(null,t)}},Pa=function(e){var t=e.segment,i=e.bytes,n=e.trackInfoFn,r=e.timingInfoFn,s=e.videoSegmentTimingInfoFn,a=e.audioSegmentTimingInfoFn,o=e.id3Fn,l=e.captionsFn,u=e.isEndOfTimeline,c=e.endedTimelineFn,d=e.dataFn,h=e.doneFn,p=e.onTransmuxerLog,f=t.map&&t.map.tracks||{},m=Boolean(f.audio&&f.video),g=r.bind(null,t,"audio","start"),v=r.bind(null,t,"audio","end"),y=r.bind(null,t,"video","start"),_=r.bind(null,t,"video","end");ba({action:"probeTs",transmuxer:t.transmuxer,data:i,baseStartTime:t.baseStartTime,callback:function(e){t.bytes=i=e.data;var r=e.result;r&&(n(t,{hasAudio:r.hasAudio,hasVideo:r.hasVideo,isMuxed:m}),n=null,r.hasAudio&&!m&&g(r.audioStart),r.hasVideo&&y(r.videoStart),g=null,y=null),va({bytes:i,transmuxer:t.transmuxer,audioAppendStart:t.audioAppendStart,gopsToAlignWith:t.gopsToAlignWith,remux:m,onData:function(e){e.type="combined"===e.type?"video":e.type,d(t,e)},onTrackInfo:function(e){n&&(m&&(e.isMuxed=!0),n(t,e))},onAudioTimingInfo:function(e){g&&void 0!==e.start&&(g(e.start),g=null),v&&void 0!==e.end&&v(e.end)},onVideoTimingInfo:function(e){y&&void 0!==e.start&&(y(e.start),y=null),_&&void 0!==e.end&&_(e.end)},onVideoSegmentTimingInfo:function(e){s(e)},onAudioSegmentTimingInfo:function(e){a(e)},onId3:function(e,i){o(t,e,i)},onCaptions:function(e){l(t,[e])},isEndOfTimeline:u,onEndedTimeline:function(){c()},onTransmuxerLog:p,onDone:function(e){h&&(e.type="combined"===e.type?"video":e.type,h(null,t,e))}})}})},Ia=function(e){var t=e.segment,i=e.bytes,n=e.trackInfoFn,r=e.timingInfoFn,s=e.videoSegmentTimingInfoFn,a=e.audioSegmentTimingInfoFn,o=e.id3Fn,l=e.captionsFn,u=e.isEndOfTimeline,c=e.endedTimelineFn,d=e.dataFn,h=e.doneFn,p=e.onTransmuxerLog,f=new Uint8Array(i);if((0,P.isLikelyFmp4MediaSegment)(f)){t.isFmp4=!0;var m=t.map.tracks,g={isFmp4:!0,hasVideo:!!m.video,hasAudio:!!m.audio};m.audio&&m.audio.codec&&"enca"!==m.audio.codec&&(g.audioCodec=m.audio.codec),m.video&&m.video.codec&&"encv"!==m.video.codec&&(g.videoCodec=m.video.codec),m.video&&m.audio&&(g.isMuxed=!0),n(t,g);var v=function(e){d(t,{data:f,type:g.hasAudio&&!g.isMuxed?"audio":"video"}),e&&e.length&&l(t,e),h(null,t,{})};ba({action:"probeMp4StartTime",timescales:t.map.timescales,data:f,transmuxer:t.transmuxer,callback:function(e){var n=e.data,s=e.startTime;i=n.buffer,t.bytes=f=n,g.hasAudio&&!g.isMuxed&&r(t,"audio","start",s),g.hasVideo&&r(t,"video","start",s),m.video&&n.byteLength&&t.transmuxer?ba({action:"pushMp4Captions",endAction:"mp4Captions",transmuxer:t.transmuxer,data:f,timescales:t.map.timescales,trackIds:[m.video.id],callback:function(e){i=e.data.buffer,t.bytes=f=e.data,e.logs.forEach((function(e){p(Vr.mergeOptions(e,{stream:"mp4CaptionParser"}))})),v(e.captions)}}):v()}})}else if(t.transmuxer){if(void 0===t.container&&(t.container=(0,P.detectContainerForBytes)(f)),"ts"!==t.container&&"aac"!==t.container)return n(t,{hasAudio:!1,hasVideo:!1}),void h(null,t,{});Pa({segment:t,bytes:i,trackInfoFn:n,timingInfoFn:r,videoSegmentTimingInfoFn:s,audioSegmentTimingInfoFn:a,id3Fn:o,captionsFn:l,isEndOfTimeline:u,endedTimelineFn:c,dataFn:d,doneFn:h,onTransmuxerLog:p})}else h(null,t,{})},Oa=function(e,t){var i,n=e.id,r=e.key,s=e.encryptedBytes,a=e.decryptionWorker;a.addEventListener("message",(function e(i){if(i.data.source===n){a.removeEventListener("message",e);var r=i.data.decrypted;t(new Uint8Array(r.bytes,r.byteOffset,r.byteLength))}})),i=r.bytes.slice?r.bytes.slice():new Uint32Array(Array.prototype.slice.call(r.bytes)),a.postMessage(Xs({source:n,encrypted:s,key:i,iv:r.iv}),[s.buffer,i.buffer])},La=function(e){var t=e.activeXhrs,i=e.decryptionWorker,n=e.trackInfoFn,r=e.timingInfoFn,s=e.videoSegmentTimingInfoFn,a=e.audioSegmentTimingInfoFn,o=e.id3Fn,l=e.captionsFn,u=e.isEndOfTimeline,c=e.endedTimelineFn,d=e.dataFn,h=e.doneFn,p=e.onTransmuxerLog,f=0,m=!1;return function(e,g){if(!m){if(e)return m=!0,ka(t),h(e,g);if((f+=1)===t.length){var v=function(){if(g.encryptedBytes)return function(e){var t=e.decryptionWorker,i=e.segment,n=e.trackInfoFn,r=e.timingInfoFn,s=e.videoSegmentTimingInfoFn,a=e.audioSegmentTimingInfoFn,o=e.id3Fn,l=e.captionsFn,u=e.isEndOfTimeline,c=e.endedTimelineFn,d=e.dataFn,h=e.doneFn,p=e.onTransmuxerLog;Oa({id:i.requestId,key:i.key,encryptedBytes:i.encryptedBytes,decryptionWorker:t},(function(e){i.bytes=e,Ia({segment:i,bytes:i.bytes,trackInfoFn:n,timingInfoFn:r,videoSegmentTimingInfoFn:s,audioSegmentTimingInfoFn:a,id3Fn:o,captionsFn:l,isEndOfTimeline:u,endedTimelineFn:c,dataFn:d,doneFn:h,onTransmuxerLog:p})}))}({decryptionWorker:i,segment:g,trackInfoFn:n,timingInfoFn:r,videoSegmentTimingInfoFn:s,audioSegmentTimingInfoFn:a,id3Fn:o,captionsFn:l,isEndOfTimeline:u,endedTimelineFn:c,dataFn:d,doneFn:h,onTransmuxerLog:p});Ia({segment:g,bytes:g.bytes,trackInfoFn:n,timingInfoFn:r,videoSegmentTimingInfoFn:s,audioSegmentTimingInfoFn:a,id3Fn:o,captionsFn:l,isEndOfTimeline:u,endedTimelineFn:c,dataFn:d,doneFn:h,onTransmuxerLog:p})};if(g.endOfAllRequests=Date.now(),g.map&&g.map.encryptedBytes&&!g.map.bytes)return Oa({decryptionWorker:i,id:g.requestId+"-init",encryptedBytes:g.map.encryptedBytes,key:g.map.key},(function(e){g.map.bytes=e,xa(g,(function(e){if(e)return ka(t),h(e,g);v()}))}));v()}}}},Da=function(e){var t=e.segment,i=e.progressFn;return e.trackInfoFn,e.timingInfoFn,e.videoSegmentTimingInfoFn,e.audioSegmentTimingInfoFn,e.id3Fn,e.captionsFn,e.isEndOfTimeline,e.endedTimelineFn,e.dataFn,function(e){if(!e.target.aborted)return t.stats=Vr.mergeOptions(t.stats,function(e){var t=e.target,i={bandwidth:1/0,bytesReceived:0,roundTripTime:Date.now()-t.requestTime||0};return i.bytesReceived=e.loaded,i.bandwidth=Math.floor(i.bytesReceived/i.roundTripTime*8*1e3),i}(e)),!t.stats.firstBytesReceivedAt&&t.stats.bytesReceived&&(t.stats.firstBytesReceivedAt=Date.now()),i(e,t)}},Ma=function(e){var t=e.xhr,i=e.xhrOptions,n=e.decryptionWorker,r=e.segment,s=e.abortFn,a=e.progressFn,o=e.trackInfoFn,l=e.timingInfoFn,u=e.videoSegmentTimingInfoFn,c=e.audioSegmentTimingInfoFn,d=e.id3Fn,h=e.captionsFn,p=e.isEndOfTimeline,f=e.endedTimelineFn,m=e.dataFn,g=e.doneFn,v=e.onTransmuxerLog,y=[],_=La({activeXhrs:y,decryptionWorker:n,trackInfoFn:o,timingInfoFn:l,videoSegmentTimingInfoFn:u,audioSegmentTimingInfoFn:c,id3Fn:d,captionsFn:h,isEndOfTimeline:p,endedTimelineFn:f,dataFn:m,doneFn:g,onTransmuxerLog:v});if(r.key&&!r.key.bytes){var b=[r.key];r.map&&!r.map.bytes&&r.map.key&&r.map.key.resolvedUri===r.key.resolvedUri&&b.push(r.map.key);var T=t(Vr.mergeOptions(i,{uri:r.key.resolvedUri,responseType:"arraybuffer"}),Ca(r,b,_));y.push(T)}if(r.map&&!r.map.bytes){if(r.map.key&&(!r.key||r.key.resolvedUri!==r.map.key.resolvedUri)){var w=t(Vr.mergeOptions(i,{uri:r.map.key.resolvedUri,responseType:"arraybuffer"}),Ca(r,[r.map.key],_));y.push(w)}var S=Vr.mergeOptions(i,{uri:r.map.resolvedUri,responseType:"arraybuffer",headers:zs(r.map)}),k=function(e){var t=e.segment,i=e.finishProcessingFn;return function(e,n){var r=Ea(e,n);if(r)return i(r,t);var s=new Uint8Array(n.response);if(t.map.key)return t.map.encryptedBytes=s,i(null,t);t.map.bytes=s,xa(t,(function(e){if(e)return e.xhr=n,e.status=n.status,i(e,t);i(null,t)}))}}({segment:r,finishProcessingFn:_}),E=t(S,k);y.push(E)}var C=Vr.mergeOptions(i,{uri:r.part&&r.part.resolvedUri||r.resolvedUri,responseType:"arraybuffer",headers:zs(r)}),x=t(C,Aa({segment:r,finishProcessingFn:_,responseType:C.responseType}));x.addEventListener("progress",Da({segment:r,progressFn:a,trackInfoFn:o,timingInfoFn:l,videoSegmentTimingInfoFn:u,audioSegmentTimingInfoFn:c,id3Fn:d,captionsFn:h,isEndOfTimeline:p,endedTimelineFn:f,dataFn:m})),y.push(x);var A={};return y.forEach((function(e){e.addEventListener("loadend",function(e){var t=e.loadendState,i=e.abortFn;return function(e){e.target.aborted&&i&&!t.calledAbortFn&&(i(),t.calledAbortFn=!0)}}({loadendState:A,abortFn:s}))})),function(){return ka(y)}},Na=Kr("CodecUtils"),Ra=function(e,t){var i=t.attributes||{};return e&&e.mediaGroups&&e.mediaGroups.AUDIO&&i.AUDIO&&e.mediaGroups.AUDIO[i.AUDIO]},Ua=function(e){var t={};return e.forEach((function(e){var i=e.mediaType,n=e.type,r=e.details;t[i]=t[i]||[],t[i].push((0,S.translateLegacyCodec)(""+n+r))})),Object.keys(t).forEach((function(e){if(t[e].length>1)return Na("multiple "+e+" codecs found as attributes: "+t[e].join(", ")+". Setting playlist codecs to null so that we wait for mux.js to probe segments for real codecs."),void(t[e]=null);t[e]=t[e][0]})),t},Ba=function(e){var t=0;return e.audio&&t++,e.video&&t++,t},ja=function(e,t){var i=t.attributes||{},n=Ua(function(e){var t=e.attributes||{};if(t.CODECS)return(0,S.parseCodecs)(t.CODECS)}(t)||[]);if(Ra(e,t)&&!n.audio&&!function(e,t){if(!Ra(e,t))return!0;var i=t.attributes||{},n=e.mediaGroups.AUDIO[i.AUDIO];for(var r in n)if(!n[r].uri&&!n[r].playlists)return!0;return!1}(e,t)){var r=Ua((0,S.codecsFromDefault)(e,i.AUDIO)||[]);r.audio&&(n.audio=r.audio)}return n},Fa=Kr("PlaylistSelector"),Ha=function(e){if(e&&e.playlist){var t=e.playlist;return JSON.stringify({id:t.id,bandwidth:e.bandwidth,width:e.width,height:e.height,codecs:t.attributes&&t.attributes.CODECS||""})}},qa=function(e,t){if(!e)return"";var i=s().getComputedStyle(e);return i?i[t]:""},za=function(e,t){var i=e.slice();e.sort((function(e,n){var r=t(e,n);return 0===r?i.indexOf(e)-i.indexOf(n):r}))},Wa=function(e,t){var i,n;return e.attributes.BANDWIDTH&&(i=e.attributes.BANDWIDTH),i=i||s().Number.MAX_VALUE,t.attributes.BANDWIDTH&&(n=t.attributes.BANDWIDTH),i-(n=n||s().Number.MAX_VALUE)},Va=function(e,t,i,n,r,a){if(e){var o={bandwidth:t,width:i,height:n,limitRenditionByPlayerDimensions:r},l=e.playlists;ks.isAudioOnly(e)&&(l=a.getAudioTrackPlaylists_(),o.audioOnly=!0);var u=l.map((function(e){var t=e.attributes&&e.attributes.RESOLUTION&&e.attributes.RESOLUTION.width,i=e.attributes&&e.attributes.RESOLUTION&&e.attributes.RESOLUTION.height;return{bandwidth:e.attributes&&e.attributes.BANDWIDTH||s().Number.MAX_VALUE,width:t,height:i,playlist:e}}));za(u,(function(e,t){return e.bandwidth-t.bandwidth}));var c=(u=u.filter((function(e){return!ks.isIncompatible(e.playlist)}))).filter((function(e){return ks.isEnabled(e.playlist)}));c.length||(c=u.filter((function(e){return!ks.isDisabled(e.playlist)})));var d=c.filter((function(e){return e.bandwidth*aa.BANDWIDTH_VARIANCE<t})),h=d[d.length-1],p=d.filter((function(e){return e.bandwidth===h.bandwidth}))[0];if(!1===r){var f=p||c[0]||u[0];if(f&&f.playlist){var m="sortedPlaylistReps";return p&&(m="bandwidthBestRep"),c[0]&&(m="enabledPlaylistReps"),Fa("choosing "+Ha(f)+" using "+m+" with options",o),f.playlist}return Fa("could not choose a playlist with options",o),null}var g=d.filter((function(e){return e.width&&e.height}));za(g,(function(e,t){return e.width-t.width}));var v=g.filter((function(e){return e.width===i&&e.height===n}));h=v[v.length-1];var y,_,b,T,w=v.filter((function(e){return e.bandwidth===h.bandwidth}))[0];if(w||(_=(y=g.filter((function(e){return e.width>i||e.height>n}))).filter((function(e){return e.width===y[0].width&&e.height===y[0].height})),h=_[_.length-1],b=_.filter((function(e){return e.bandwidth===h.bandwidth}))[0]),a.experimentalLeastPixelDiffSelector){var S=g.map((function(e){return e.pixelDiff=Math.abs(e.width-i)+Math.abs(e.height-n),e}));za(S,(function(e,t){return e.pixelDiff===t.pixelDiff?t.bandwidth-e.bandwidth:e.pixelDiff-t.pixelDiff})),T=S[0]}var k=T||b||w||p||c[0]||u[0];if(k&&k.playlist){var E="sortedPlaylistReps";return T?E="leastPixelDiffRep":b?E="resolutionPlusOneRep":w?E="resolutionBestRep":p?E="bandwidthBestRep":c[0]&&(E="enabledPlaylistReps"),Fa("choosing "+Ha(k)+" using "+E+" with options",o),k.playlist}return Fa("could not choose a playlist with options",o),null}},$a=function(){var e=this.useDevicePixelRatio&&s().devicePixelRatio||1;return Va(this.playlists.master,this.systemBandwidth,parseInt(qa(this.tech_.el(),"width"),10)*e,parseInt(qa(this.tech_.el(),"height"),10)*e,this.limitRenditionByPlayerDimensions,this.masterPlaylistController_)},Xa=function(e){var t=e.inbandTextTracks,i=e.metadataArray,n=e.timestampOffset,r=e.videoDuration;if(i){var a=s().WebKitDataCue||s().VTTCue,o=t.metadataTrack_;if(o&&(i.forEach((function(e){var t=e.cueTime+n;!("number"!=typeof t||s().isNaN(t)||t<0)&&t<1/0&&e.frames.forEach((function(e){var i=new a(t,t,e.value||e.url||e.data||"");i.frame=e,i.value=e,function(e){Object.defineProperties(e.frame,{id:{get:function(){return Vr.log.warn("cue.frame.id is deprecated. Use cue.value.key instead."),e.value.key}},value:{get:function(){return Vr.log.warn("cue.frame.value is deprecated. Use cue.value.data instead."),e.value.data}},privateData:{get:function(){return Vr.log.warn("cue.frame.privateData is deprecated. Use cue.value.data instead."),e.value.data}}})}(i),o.addCue(i)}))})),o.cues&&o.cues.length)){for(var l=o.cues,u=[],c=0;c<l.length;c++)l[c]&&u.push(l[c]);var d=u.reduce((function(e,t){var i=e[t.startTime]||[];return i.push(t),e[t.startTime]=i,e}),{}),h=Object.keys(d).sort((function(e,t){return Number(e)-Number(t)}));h.forEach((function(e,t){var i=d[e],n=Number(h[t+1])||r;i.forEach((function(e){e.endTime=n}))}))}}},Ga=function(e,t,i){var n,r;if(i&&i.cues)for(n=i.cues.length;n--;)(r=i.cues[n]).startTime>=e&&r.endTime<=t&&i.removeCue(r)},Ya=function(e){return"number"==typeof e&&isFinite(e)},Ka=1/60,Qa=function(e){var t=e.startOfSegment,i=e.duration,n=e.segment,r=e.part,s=e.playlist,a=s.mediaSequence,o=s.id,l=s.segments,u=void 0===l?[]:l,c=e.mediaIndex,d=e.partIndex,h=e.timeline,p=u.length-1,f="mediaIndex/partIndex increment";e.getMediaInfoForTime?f="getMediaInfoForTime ("+e.getMediaInfoForTime+")":e.isSyncRequest&&(f="getSyncSegmentCandidate (isSyncRequest)"),e.independent&&(f+=" with independent "+e.independent);var m="number"==typeof d,g=e.segment.uri?"segment":"pre-segment",v=m?cs({preloadSegment:n})-1:0;return g+" ["+(a+c)+"/"+(a+p)+"]"+(m?" part ["+d+"/"+v+"]":"")+" segment start/end ["+n.start+" => "+n.end+"]"+(m?" part start/end ["+r.start+" => "+r.end+"]":"")+" startOfSegment ["+t+"] duration ["+i+"] timeline ["+h+"] selected by ["+f+"] playlist ["+o+"]"},Ja=function(e){return e+"TimingInfo"},Za=function(e){var t=e.timelineChangeController,i=e.currentTimeline,n=e.segmentTimeline,r=e.loaderType,s=e.audioDisabled;if(i===n)return!1;if("audio"===r){var a=t.lastTimelineChange({type:"main"});return!a||a.to!==n}if("main"===r&&s){var o=t.pendingTimelineChange({type:"audio"});return!o||o.to!==n}return!1},eo=function(e){var t=e.segmentDuration,i=e.maxDuration;return!!t&&Math.round(t)>i+Qr},to=function(e,t){if("hls"!==t)return null;var i,n,r=(i={audioTimingInfo:e.audioTimingInfo,videoTimingInfo:e.videoTimingInfo},n=0,["video","audio"].forEach((function(e){var t=i[e+"TimingInfo"];if(t){var r,a=t.start,o=t.end;"bigint"==typeof a||"bigint"==typeof o?r=s().BigInt(o)-s().BigInt(a):"number"==typeof a&&"number"==typeof o&&(r=o-a),void 0!==r&&r>n&&(n=r)}})),"bigint"==typeof n&&n<Number.MAX_SAFE_INTEGER&&(n=Number(n)),n);if(!r)return null;var a=e.playlist.targetDuration,o=eo({segmentDuration:r,maxDuration:2*a}),l=eo({segmentDuration:r,maxDuration:a}),u="Segment with index "+e.mediaIndex+" from playlist "+e.playlist.id+" has a duration of "+r+" when the reported duration is "+e.duration+" and the target duration is "+a+". For HLS content, a duration in excess of the target duration may result in playback issues. See the HLS specification section on EXT-X-TARGETDURATION for more details: https://tools.ietf.org/html/draft-pantos-http-live-streaming-23#section-4.3.3.1";return o||l?{severity:o?"warn":"info",message:u}:null},io=function(e){function t(t,i){var n;if(n=e.call(this)||this,!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 n.bandwidth=t.bandwidth,n.throughput={rate:0,count:0},n.roundTrip=NaN,n.resetStats_(),n.mediaIndex=null,n.partIndex=null,n.hasPlayed_=t.hasPlayed,n.currentTime_=t.currentTime,n.seekable_=t.seekable,n.seeking_=t.seeking,n.duration_=t.duration,n.mediaSource_=t.mediaSource,n.vhs_=t.vhs,n.loaderType_=t.loaderType,n.currentMediaInfo_=void 0,n.startingMediaInfo_=void 0,n.segmentMetadataTrack_=t.segmentMetadataTrack,n.goalBufferLength_=t.goalBufferLength,n.sourceType_=t.sourceType,n.sourceUpdater_=t.sourceUpdater,n.inbandTextTracks_=t.inbandTextTracks,n.state_="INIT",n.timelineChangeController_=t.timelineChangeController,n.shouldSaveSegmentTimingInfo_=!0,n.parse708captions_=t.parse708captions,n.captionServices_=t.captionServices,n.experimentalExactManifestTimings=t.experimentalExactManifestTimings,n.checkBufferTimeout_=null,n.error_=void 0,n.currentTimeline_=-1,n.pendingSegment_=null,n.xhrOptions_=null,n.pendingSegments_=[],n.audioDisabled_=!1,n.isPendingTimestampOffset_=!1,n.gopBuffer_=[],n.timeMapping_=0,n.safeAppend_=Vr.browser.IE_VERSION>=11,n.appendInitSegment_={audio:!0,video:!0},n.playlistOfLastInitSegment_={audio:null,video:null},n.callQueue_=[],n.loadQueue_=[],n.metadataQueue_={id3:[],caption:[]},n.waitingOnRemove_=!1,n.quotaExceededErrorRetryTimeout_=null,n.activeInitSegmentId_=null,n.initSegments_={},n.cacheEncryptionKeys_=t.cacheEncryptionKeys,n.keyCache_={},n.decrypter_=t.decrypter,n.syncController_=t.syncController,n.syncPoint_={segmentIndex:0,time:0},n.transmuxer_=n.createTransmuxer_(),n.triggerSyncInfoUpdate_=function(){return n.trigger("syncinfoupdate")},n.syncController_.on("syncinfoupdate",n.triggerSyncInfoUpdate_),n.mediaSource_.addEventListener("sourceopen",(function(){n.isEndOfStream_()||(n.ended_=!1)})),n.fetchAtBuffer_=!1,n.logger_=Kr("SegmentLoader["+n.loaderType_+"]"),Object.defineProperty((0,d.default)(n),"state",{get:function(){return this.state_},set:function(e){e!==this.state_&&(this.logger_(this.state_+" -> "+e),this.state_=e,this.trigger("statechange"))}}),n.sourceUpdater_.on("ready",(function(){n.hasEnoughInfoToAppend_()&&n.processCallQueue_()})),"main"===n.loaderType_&&n.timelineChangeController_.on("pendingtimelinechange",(function(){n.hasEnoughInfoToAppend_()&&n.processCallQueue_()})),"audio"===n.loaderType_&&n.timelineChangeController_.on("timelinechange",(function(){n.hasEnoughInfoToLoad_()&&n.processLoadQueue_(),n.hasEnoughInfoToAppend_()&&n.processCallQueue_()})),n}(0,h.default)(t,e);var i=t.prototype;return i.createTransmuxer_=function(){return _a({remux:!1,alignGopsAtEnd:this.safeAppend_,keepOriginalTimestamps:!0,parse708captions:this.parse708captions_,captionServices:this.captionServices_})},i.resetStats_=function(){this.mediaBytesTransferred=0,this.mediaRequests=0,this.mediaRequestsAborted=0,this.mediaRequestsTimedout=0,this.mediaRequestsErrored=0,this.mediaTransferDuration=0,this.mediaSecondsLoaded=0,this.mediaAppends=0},i.dispose=function(){this.trigger("dispose"),this.state="DISPOSED",this.pause(),this.abort_(),this.transmuxer_&&this.transmuxer_.terminate(),this.resetStats_(),this.checkBufferTimeout_&&s().clearTimeout(this.checkBufferTimeout_),this.syncController_&&this.triggerSyncInfoUpdate_&&this.syncController_.off("syncinfoupdate",this.triggerSyncInfoUpdate_),this.off()},i.setAudio=function(e){this.audioDisabled_=!e,e?this.appendInitSegment_.audio=!0:this.sourceUpdater_.removeAudio(0,this.duration_())},i.abort=function(){"WAITING"===this.state?(this.abort_(),this.state="READY",this.paused()||this.monitorBuffer_()):this.pendingSegment_&&(this.pendingSegment_=null)},i.abort_=function(){this.pendingSegment_&&this.pendingSegment_.abortRequests&&this.pendingSegment_.abortRequests(),this.pendingSegment_=null,this.callQueue_=[],this.loadQueue_=[],this.metadataQueue_.id3=[],this.metadataQueue_.caption=[],this.timelineChangeController_.clearPendingTimelineChange(this.loaderType_),this.waitingOnRemove_=!1,s().clearTimeout(this.quotaExceededErrorRetryTimeout_),this.quotaExceededErrorRetryTimeout_=null},i.checkForAbort_=function(e){return"APPENDING"!==this.state||this.pendingSegment_?!this.pendingSegment_||this.pendingSegment_.requestId!==e:(this.state="READY",!0)},i.error=function(e){return void 0!==e&&(this.logger_("error occurred:",e),this.error_=e),this.pendingSegment_=null,this.error_},i.endOfStream=function(){this.ended_=!0,this.transmuxer_&&ya(this.transmuxer_),this.gopBuffer_.length=0,this.pause(),this.trigger("ended")},i.buffered_=function(){var e=this.getMediaInfo_();if(!this.sourceUpdater_||!e)return Vr.createTimeRanges();if("main"===this.loaderType_){var t=e.hasAudio,i=e.hasVideo,n=e.isMuxed;if(i&&t&&!this.audioDisabled_&&!n)return this.sourceUpdater_.buffered();if(i)return this.sourceUpdater_.videoBuffered()}return this.sourceUpdater_.audioBuffered()},i.initSegmentForMap=function(e,t){if(void 0===t&&(t=!1),!e)return null;var i=Gs(e),n=this.initSegments_[i];return t&&!n&&e.bytes&&(this.initSegments_[i]=n={resolvedUri:e.resolvedUri,byterange:e.byterange,bytes:e.bytes,tracks:e.tracks,timescales:e.timescales}),n||e},i.segmentKey=function(e,t){if(void 0===t&&(t=!1),!e)return null;var i=Ys(e),n=this.keyCache_[i];this.cacheEncryptionKeys_&&t&&!n&&e.bytes&&(this.keyCache_[i]=n={resolvedUri:e.resolvedUri,bytes:e.bytes});var r={resolvedUri:(n||e).resolvedUri};return n&&(r.bytes=n.bytes),r},i.couldBeginLoading_=function(){return this.playlist_&&!this.paused()},i.load=function(){if(this.monitorBuffer_(),this.playlist_)return"INIT"===this.state&&this.couldBeginLoading_()?this.init_():void(!this.couldBeginLoading_()||"READY"!==this.state&&"INIT"!==this.state||(this.state="READY"))},i.init_=function(){return this.state="READY",this.resetEverything(),this.monitorBuffer_()},i.playlist=function(e,t){if(void 0===t&&(t={}),e){var i=this.playlist_,n=this.pendingSegment_;this.playlist_=e,this.xhrOptions_=t,"INIT"===this.state&&(e.syncInfo={mediaSequence:e.mediaSequence,time:0},"main"===this.loaderType_&&this.syncController_.setDateTimeMappingForStart(e));var r=null;if(i&&(i.id?r=i.id:i.uri&&(r=i.uri)),this.logger_("playlist update ["+r+" => "+(e.id||e.uri)+"]"),this.trigger("syncinfoupdate"),"INIT"===this.state&&this.couldBeginLoading_())return this.init_();if(!i||i.uri!==e.uri)return null!==this.mediaIndex&&(e.endList?this.resyncLoader():this.resetLoader()),this.currentMediaInfo_=void 0,void this.trigger("playlistupdate");var s=e.mediaSequence-i.mediaSequence;if(this.logger_("live window shift ["+s+"]"),null!==this.mediaIndex)if(this.mediaIndex-=s,this.mediaIndex<0)this.mediaIndex=null,this.partIndex=null;else{var a=this.playlist_.segments[this.mediaIndex];if(this.partIndex&&(!a.parts||!a.parts.length||!a.parts[this.partIndex])){var o=this.mediaIndex;this.logger_("currently processing part (index "+this.partIndex+") no longer exists."),this.resetLoader(),this.mediaIndex=o}}n&&(n.mediaIndex-=s,n.mediaIndex<0?(n.mediaIndex=null,n.partIndex=null):(n.mediaIndex>=0&&(n.segment=e.segments[n.mediaIndex]),n.partIndex>=0&&n.segment.parts&&(n.part=n.segment.parts[n.partIndex]))),this.syncController_.saveExpiredSegmentInfo(i,e)}},i.pause=function(){this.checkBufferTimeout_&&(s().clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=null)},i.paused=function(){return null===this.checkBufferTimeout_},i.resetEverything=function(e){this.ended_=!1,this.appendInitSegment_={audio:!0,video:!0},this.resetLoader(),this.remove(0,1/0,e),this.transmuxer_&&(this.transmuxer_.postMessage({action:"clearAllMp4Captions"}),this.transmuxer_.postMessage({action:"reset"}))},i.resetLoader=function(){this.fetchAtBuffer_=!1,this.resyncLoader()},i.resyncLoader=function(){this.transmuxer_&&ya(this.transmuxer_),this.mediaIndex=null,this.partIndex=null,this.syncPoint_=null,this.isPendingTimestampOffset_=!1,this.callQueue_=[],this.loadQueue_=[],this.metadataQueue_.id3=[],this.metadataQueue_.caption=[],this.abort(),this.transmuxer_&&this.transmuxer_.postMessage({action:"clearParsedMp4Captions"})},i.remove=function(e,t,i,n){if(void 0===i&&(i=function(){}),void 0===n&&(n=!1),t===1/0&&(t=this.duration_()),t<=e)this.logger_("skipping remove because end ${end} is <= start ${start}");else if(this.sourceUpdater_&&this.getMediaInfo_()){var r=1,s=function(){0===--r&&i()};for(var a in!n&&this.audioDisabled_||(r++,this.sourceUpdater_.removeAudio(e,t,s)),(n||"main"===this.loaderType_)&&(this.gopBuffer_=function(e,t,i,n){for(var r=Math.ceil((t-n)*O.ONE_SECOND_IN_TS),s=Math.ceil((i-n)*O.ONE_SECOND_IN_TS),a=e.slice(),o=e.length;o--&&!(e[o].pts<=s););if(-1===o)return a;for(var l=o+1;l--&&!(e[l].pts<=r););return l=Math.max(l,0),a.splice(l,o-l+1),a}(this.gopBuffer_,e,t,this.timeMapping_),r++,this.sourceUpdater_.removeVideo(e,t,s)),this.inbandTextTracks_)Ga(e,t,this.inbandTextTracks_[a]);Ga(e,t,this.segmentMetadataTrack_),s()}else this.logger_("skipping remove because no source updater or starting media info")},i.monitorBuffer_=function(){this.checkBufferTimeout_&&s().clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=s().setTimeout(this.monitorBufferTick_.bind(this),1)},i.monitorBufferTick_=function(){"READY"===this.state&&this.fillBuffer_(),this.checkBufferTimeout_&&s().clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=s().setTimeout(this.monitorBufferTick_.bind(this),500)},i.fillBuffer_=function(){if(!this.sourceUpdater_.updating()){var e=this.chooseNextRequest_();e&&("number"==typeof e.timestampOffset&&(this.isPendingTimestampOffset_=!1,this.timelineChangeController_.pendingTimelineChange({type:this.loaderType_,from:this.currentTimeline_,to:e.timeline})),this.loadSegment_(e))}},i.isEndOfStream_=function(e,t,i){if(void 0===e&&(e=this.mediaIndex),void 0===t&&(t=this.playlist_),void 0===i&&(i=this.partIndex),!t||!this.mediaSource_)return!1;var n="number"==typeof e&&t.segments[e],r=e+1===t.segments.length,s=!n||!n.parts||i+1===n.parts.length;return t.endList&&"open"===this.mediaSource_.readyState&&r&&s},i.chooseNextRequest_=function(){var e=this.buffered_(),t=rs(e)||0,i=ss(e,this.currentTime_()),n=!this.hasPlayed_()&&i>=1,r=i>=this.goalBufferLength_(),s=this.playlist_.segments;if(!s.length||n||r)return null;this.syncPoint_=this.syncPoint_||this.syncController_.getSyncPoint(this.playlist_,this.duration_(),this.currentTimeline_,this.currentTime_());var a={partIndex:null,mediaIndex:null,startOfSegment:null,playlist:this.playlist_,isSyncRequest:Boolean(!this.syncPoint_)};if(a.isSyncRequest)a.mediaIndex=function(e,t,i){t=t||[];for(var n=[],r=0,s=0;s<t.length;s++){var a=t[s];if(e===a.timeline&&(n.push(s),(r+=a.duration)>i))return s}return 0===n.length?0:n[n.length-1]}(this.currentTimeline_,s,t);else if(null!==this.mediaIndex){var o=s[this.mediaIndex],l="number"==typeof this.partIndex?this.partIndex:-1;a.startOfSegment=o.end?o.end:t,o.parts&&o.parts[l+1]?(a.mediaIndex=this.mediaIndex,a.partIndex=l+1):a.mediaIndex=this.mediaIndex+1}else{var u=ks.getMediaInfoForTime({experimentalExactManifestTimings:this.experimentalExactManifestTimings,playlist:this.playlist_,currentTime:this.fetchAtBuffer_?t:this.currentTime_(),startingPartIndex:this.syncPoint_.partIndex,startingSegmentIndex:this.syncPoint_.segmentIndex,startTime:this.syncPoint_.time}),c=u.segmentIndex,d=u.startTime,h=u.partIndex;a.getMediaInfoForTime=this.fetchAtBuffer_?"bufferedEnd "+t:"currentTime "+this.currentTime_(),a.mediaIndex=c,a.startOfSegment=d,a.partIndex=h}var p=s[a.mediaIndex],f=p&&"number"==typeof a.partIndex&&p.parts&&p.parts[a.partIndex];if(!p||"number"==typeof a.partIndex&&!f)return null;if("number"!=typeof a.partIndex&&p.parts&&(a.partIndex=0,f=p.parts[0]),!i&&f&&!f.independent)if(0===a.partIndex){var m=s[a.mediaIndex-1],g=m.parts&&m.parts.length&&m.parts[m.parts.length-1];g&&g.independent&&(a.mediaIndex-=1,a.partIndex=m.parts.length-1,a.independent="previous segment")}else p.parts[a.partIndex-1].independent&&(a.partIndex-=1,a.independent="previous part");var v=this.mediaSource_&&"ended"===this.mediaSource_.readyState;return a.mediaIndex>=s.length-1&&v&&!this.seeking_()?null:this.generateSegmentInfo_(a)},i.generateSegmentInfo_=function(e){var t=e.independent,i=e.playlist,n=e.mediaIndex,r=e.startOfSegment,s=e.isSyncRequest,a=e.partIndex,o=e.forceTimestampOffset,l=e.getMediaInfoForTime,u=i.segments[n],c="number"==typeof a&&u.parts[a],d={requestId:"segment-loader-"+Math.random(),uri:c&&c.resolvedUri||u.resolvedUri,mediaIndex:n,partIndex:c?a:null,isSyncRequest:s,startOfSegment:r,playlist:i,bytes:null,encryptedBytes:null,timestampOffset:null,timeline:u.timeline,duration:c&&c.duration||u.duration,segment:u,part:c,byteLength:0,transmuxer:this.transmuxer_,getMediaInfoForTime:l,independent:t},h=void 0!==o?o:this.isPendingTimestampOffset_;d.timestampOffset=this.timestampOffsetForSegment_({segmentTimeline:u.timeline,currentTimeline:this.currentTimeline_,startOfSegment:r,buffered:this.buffered_(),overrideCheck:h});var p=rs(this.sourceUpdater_.audioBuffered());return"number"==typeof p&&(d.audioAppendStart=p-this.sourceUpdater_.audioTimestampOffset()),this.sourceUpdater_.videoBuffered().length&&(d.gopsToAlignWith=function(e,t,i){if(null==t||!e.length)return[];var n,r=Math.ceil((t-i+3)*O.ONE_SECOND_IN_TS);for(n=0;n<e.length&&!(e[n].pts>r);n++);return e.slice(n)}(this.gopBuffer_,this.currentTime_()-this.sourceUpdater_.videoTimestampOffset(),this.timeMapping_)),d},i.timestampOffsetForSegment_=function(e){return i=(t=e).segmentTimeline,n=t.currentTimeline,r=t.startOfSegment,s=t.buffered,t.overrideCheck||i!==n?i<n?r:s.length?s.end(s.length-1):r:null;var t,i,n,r,s},i.earlyAbortWhenNeeded_=function(e){if(!this.vhs_.tech_.paused()&&this.xhrOptions_.timeout&&this.playlist_.attributes.BANDWIDTH&&!(Date.now()-(e.firstBytesReceivedAt||Date.now())<1e3)){var t=this.currentTime_(),i=e.bandwidth,n=this.pendingSegment_.duration,r=ks.estimateSegmentRequestTime(n,i,this.playlist_,e.bytesReceived),s=function(e,t,i){return void 0===i&&(i=1),((e.length?e.end(e.length-1):0)-t)/i}(this.buffered_(),t,this.vhs_.tech_.playbackRate())-1;if(!(r<=s)){var a=function(e){var t=e.master,i=e.currentTime,n=e.bandwidth,r=e.duration,s=e.segmentDuration,a=e.timeUntilRebuffer,o=e.currentTimeline,l=e.syncController,u=t.playlists.filter((function(e){return!ks.isIncompatible(e)})),c=u.filter(ks.isEnabled);c.length||(c=u.filter((function(e){return!ks.isDisabled(e)})));var d=c.filter(ks.hasAttribute.bind(null,"BANDWIDTH")).map((function(e){var t=l.getSyncPoint(e,r,o,i)?1:2;return{playlist:e,rebufferingImpact:ks.estimateSegmentRequestTime(s,n,e)*t-a}})),h=d.filter((function(e){return e.rebufferingImpact<=0}));return za(h,(function(e,t){return Wa(t.playlist,e.playlist)})),h.length?h[0]:(za(d,(function(e,t){return e.rebufferingImpact-t.rebufferingImpact})),d[0]||null)}({master:this.vhs_.playlists.master,currentTime:t,bandwidth:i,duration:this.duration_(),segmentDuration:n,timeUntilRebuffer:s,currentTimeline:this.currentTimeline_,syncController:this.syncController_});if(a){var o=r-s-a.rebufferingImpact,l=.5;s<=Qr&&(l=1),!a.playlist||a.playlist.uri===this.playlist_.uri||o<l||(this.bandwidth=a.playlist.attributes.BANDWIDTH*aa.BANDWIDTH_VARIANCE+1,this.trigger("earlyabort"))}}}},i.handleAbort_=function(e){this.logger_("Aborting "+Qa(e)),this.mediaRequestsAborted+=1},i.handleProgress_=function(e,t){this.earlyAbortWhenNeeded_(t.stats),this.checkForAbort_(t.requestId)||this.trigger("progress")},i.handleTrackInfo_=function(e,t){this.earlyAbortWhenNeeded_(e.stats),this.checkForAbort_(e.requestId)||this.checkForIllegalMediaSwitch(t)||(t=t||{},function(e,t){if(!e&&!t||!e&&t||e&&!t)return!1;if(e===t)return!0;var i=Object.keys(e).sort(),n=Object.keys(t).sort();if(i.length!==n.length)return!1;for(var r=0;r<i.length;r++){var s=i[r];if(s!==n[r])return!1;if(e[s]!==t[s])return!1}return!0}(this.currentMediaInfo_,t)||(this.appendInitSegment_={audio:!0,video:!0},this.startingMediaInfo_=t,this.currentMediaInfo_=t,this.logger_("trackinfo update",t),this.trigger("trackinfo")),this.checkForAbort_(e.requestId)||(this.pendingSegment_.trackInfo=t,this.hasEnoughInfoToAppend_()&&this.processCallQueue_()))},i.handleTimingInfo_=function(e,t,i,n){if(this.earlyAbortWhenNeeded_(e.stats),!this.checkForAbort_(e.requestId)){var r=this.pendingSegment_,s=Ja(t);r[s]=r[s]||{},r[s][i]=n,this.logger_("timinginfo: "+t+" - "+i+" - "+n),this.hasEnoughInfoToAppend_()&&this.processCallQueue_()}},i.handleCaptions_=function(e,t){var i=this;if(this.earlyAbortWhenNeeded_(e.stats),!this.checkForAbort_(e.requestId))if(0!==t.length)if(this.pendingSegment_.hasAppendedData_){var n=null===this.sourceUpdater_.videoTimestampOffset()?this.sourceUpdater_.audioTimestampOffset():this.sourceUpdater_.videoTimestampOffset(),r={};t.forEach((function(e){r[e.stream]=r[e.stream]||{startTime:1/0,captions:[],endTime:0};var t=r[e.stream];t.startTime=Math.min(t.startTime,e.startTime+n),t.endTime=Math.max(t.endTime,e.endTime+n),t.captions.push(e)})),Object.keys(r).forEach((function(e){var t=r[e],a=t.startTime,o=t.endTime,l=t.captions,u=i.inbandTextTracks_;i.logger_("adding cues from "+a+" -> "+o+" for "+e),function(e,t,i){if(!e[i]){t.trigger({type:"usage",name:"vhs-608"}),t.trigger({type:"usage",name:"hls-608"});var n=i;/^cc708_/.test(i)&&(n="SERVICE"+i.split("_")[1]);var r=t.textTracks().getTrackById(n);if(r)e[i]=r;else{var s=i,a=i,o=!1,l=(t.options_.vhs&&t.options_.vhs.captionServices||{})[n];l&&(s=l.label,a=l.language,o=l.default),e[i]=t.addRemoteTextTrack({kind:"captions",id:n,default:o,label:s,language:a},!1).track}}}(u,i.vhs_.tech_,e),Ga(a,o,u[e]),function(e){var t=e.inbandTextTracks,i=e.captionArray,n=e.timestampOffset;if(i){var r=s().WebKitDataCue||s().VTTCue;i.forEach((function(e){var i=e.stream;t[i].addCue(new r(e.startTime+n,e.endTime+n,e.text))}))}}({captionArray:l,inbandTextTracks:u,timestampOffset:n})})),this.transmuxer_&&this.transmuxer_.postMessage({action:"clearParsedMp4Captions"})}else this.metadataQueue_.caption.push(this.handleCaptions_.bind(this,e,t));else this.logger_("SegmentLoader received no captions from a caption event")},i.handleId3_=function(e,t,i){if(this.earlyAbortWhenNeeded_(e.stats),!this.checkForAbort_(e.requestId))if(this.pendingSegment_.hasAppendedData_){var n=null===this.sourceUpdater_.videoTimestampOffset()?this.sourceUpdater_.audioTimestampOffset():this.sourceUpdater_.videoTimestampOffset();!function(e,t,i){e.metadataTrack_||(e.metadataTrack_=i.addRemoteTextTrack({kind:"metadata",label:"Timed Metadata"},!1).track,e.metadataTrack_.inBandMetadataTrackDispatchType=t)}(this.inbandTextTracks_,i,this.vhs_.tech_),Xa({inbandTextTracks:this.inbandTextTracks_,metadataArray:t,timestampOffset:n,videoDuration:this.duration_()})}else this.metadataQueue_.id3.push(this.handleId3_.bind(this,e,t,i))},i.processMetadataQueue_=function(){this.metadataQueue_.id3.forEach((function(e){return e()})),this.metadataQueue_.caption.forEach((function(e){return e()})),this.metadataQueue_.id3=[],this.metadataQueue_.caption=[]},i.processCallQueue_=function(){var e=this.callQueue_;this.callQueue_=[],e.forEach((function(e){return e()}))},i.processLoadQueue_=function(){var e=this.loadQueue_;this.loadQueue_=[],e.forEach((function(e){return e()}))},i.hasEnoughInfoToLoad_=function(){if("audio"!==this.loaderType_)return!0;var e=this.pendingSegment_;return!!e&&(!this.getCurrentMediaInfo_()||!Za({timelineChangeController:this.timelineChangeController_,currentTimeline:this.currentTimeline_,segmentTimeline:e.timeline,loaderType:this.loaderType_,audioDisabled:this.audioDisabled_}))},i.getCurrentMediaInfo_=function(e){return void 0===e&&(e=this.pendingSegment_),e&&e.trackInfo||this.currentMediaInfo_},i.getMediaInfo_=function(e){return void 0===e&&(e=this.pendingSegment_),this.getCurrentMediaInfo_(e)||this.startingMediaInfo_},i.hasEnoughInfoToAppend_=function(){if(!this.sourceUpdater_.ready())return!1;if(this.waitingOnRemove_||this.quotaExceededErrorRetryTimeout_)return!1;var e=this.pendingSegment_,t=this.getCurrentMediaInfo_();if(!e||!t)return!1;var i=t.hasAudio,n=t.hasVideo,r=t.isMuxed;return!(n&&!e.videoTimingInfo)&&(!(i&&!this.audioDisabled_&&!r&&!e.audioTimingInfo)&&!Za({timelineChangeController:this.timelineChangeController_,currentTimeline:this.currentTimeline_,segmentTimeline:e.timeline,loaderType:this.loaderType_,audioDisabled:this.audioDisabled_}))},i.handleData_=function(e,t){if(this.earlyAbortWhenNeeded_(e.stats),!this.checkForAbort_(e.requestId))if(!this.callQueue_.length&&this.hasEnoughInfoToAppend_()){var i=this.pendingSegment_;if(this.setTimeMapping_(i.timeline),this.updateMediaSecondsLoaded_(i.part||i.segment),"closed"!==this.mediaSource_.readyState){if(e.map&&(e.map=this.initSegmentForMap(e.map,!0),i.segment.map=e.map),e.key&&this.segmentKey(e.key,!0),i.isFmp4=e.isFmp4,i.timingInfo=i.timingInfo||{},i.isFmp4)this.trigger("fmp4"),i.timingInfo.start=i[Ja(t.type)].start;else{var n,r=this.getCurrentMediaInfo_(),s="main"===this.loaderType_&&r&&r.hasVideo;s&&(n=i.videoTimingInfo.start),i.timingInfo.start=this.trueSegmentStart_({currentStart:i.timingInfo.start,playlist:i.playlist,mediaIndex:i.mediaIndex,currentVideoTimestampOffset:this.sourceUpdater_.videoTimestampOffset(),useVideoTimingInfo:s,firstVideoFrameTimeForData:n,videoTimingInfo:i.videoTimingInfo,audioTimingInfo:i.audioTimingInfo})}if(this.updateAppendInitSegmentStatus(i,t.type),this.updateSourceBufferTimestampOffset_(i),i.isSyncRequest){this.updateTimingInfoEnd_(i),this.syncController_.saveSegmentTimingInfo({segmentInfo:i,shouldSaveTimelineMapping:"main"===this.loaderType_});var a=this.chooseNextRequest_();if(a.mediaIndex!==i.mediaIndex||a.partIndex!==i.partIndex)return void this.logger_("sync segment was incorrect, not appending");this.logger_("sync segment was correct, appending")}i.hasAppendedData_=!0,this.processMetadataQueue_(),this.appendData_(i,t)}}else this.callQueue_.push(this.handleData_.bind(this,e,t))},i.updateAppendInitSegmentStatus=function(e,t){"main"!==this.loaderType_||"number"!=typeof e.timestampOffset||e.changedTimestampOffset||(this.appendInitSegment_={audio:!0,video:!0}),this.playlistOfLastInitSegment_[t]!==e.playlist&&(this.appendInitSegment_[t]=!0)},i.getInitSegmentAndUpdateState_=function(e){var t=e.type,i=e.initSegment,n=e.map,r=e.playlist;if(n){var s=Gs(n);if(this.activeInitSegmentId_===s)return null;i=this.initSegmentForMap(n,!0).bytes,this.activeInitSegmentId_=s}return i&&this.appendInitSegment_[t]?(this.playlistOfLastInitSegment_[t]=r,this.appendInitSegment_[t]=!1,this.activeInitSegmentId_=null,i):null},i.handleQuotaExceededError_=function(e,t){var i=this,n=e.segmentInfo,r=e.type,a=e.bytes,o=this.sourceUpdater_.audioBuffered(),l=this.sourceUpdater_.videoBuffered();o.length>1&&this.logger_("On QUOTA_EXCEEDED_ERR, found gaps in the audio buffer: "+ns(o).join(", ")),l.length>1&&this.logger_("On QUOTA_EXCEEDED_ERR, found gaps in the video buffer: "+ns(l).join(", "));var u=o.length?o.start(0):0,c=o.length?o.end(o.length-1):0,d=l.length?l.start(0):0,h=l.length?l.end(l.length-1):0;if(c-u<=1&&h-d<=1)return this.logger_("On QUOTA_EXCEEDED_ERR, single segment too large to append to buffer, triggering an error. Appended byte length: "+a.byteLength+", audio buffer: "+ns(o).join(", ")+", video buffer: "+ns(l).join(", ")+", "),this.error({message:"Quota exceeded error with append of a single segment of content",excludeUntil:1/0}),void this.trigger("error");this.waitingOnRemove_=!0,this.callQueue_.push(this.appendToSourceBuffer_.bind(this,{segmentInfo:n,type:r,bytes:a}));var p=this.currentTime_()-1;this.logger_("On QUOTA_EXCEEDED_ERR, removing audio/video from 0 to "+p),this.remove(0,p,(function(){i.logger_("On QUOTA_EXCEEDED_ERR, retrying append in 1s"),i.waitingOnRemove_=!1,i.quotaExceededErrorRetryTimeout_=s().setTimeout((function(){i.logger_("On QUOTA_EXCEEDED_ERR, re-processing call queue"),i.quotaExceededErrorRetryTimeout_=null,i.processCallQueue_()}),1e3)}),!0)},i.handleAppendError_=function(e,t){var i=e.segmentInfo,n=e.type,r=e.bytes;t&&(22!==t.code?(this.logger_("Received non QUOTA_EXCEEDED_ERR on append",t),this.error(n+" append of "+r.length+"b failed for segment #"+i.mediaIndex+" in playlist "+i.playlist.id),this.trigger("appenderror")):this.handleQuotaExceededError_({segmentInfo:i,type:n,bytes:r}))},i.appendToSourceBuffer_=function(e){var t,i,n,r=e.segmentInfo,s=e.type,a=e.initSegment,o=e.data,l=e.bytes;if(!l){var u=[o],c=o.byteLength;a&&(u.unshift(a),c+=a.byteLength),n=0,(t={bytes:c,segments:u}).bytes&&(i=new Uint8Array(t.bytes),t.segments.forEach((function(e){i.set(e,n),n+=e.byteLength}))),l=i}this.sourceUpdater_.appendBuffer({segmentInfo:r,type:s,bytes:l},this.handleAppendError_.bind(this,{segmentInfo:r,type:s,bytes:l}))},i.handleSegmentTimingInfo_=function(e,t,i){if(this.pendingSegment_&&t===this.pendingSegment_.requestId){var n=this.pendingSegment_.segment,r=e+"TimingInfo";n[r]||(n[r]={}),n[r].transmuxerPrependedSeconds=i.prependedContentDuration||0,n[r].transmuxedPresentationStart=i.start.presentation,n[r].transmuxedDecodeStart=i.start.decode,n[r].transmuxedPresentationEnd=i.end.presentation,n[r].transmuxedDecodeEnd=i.end.decode,n[r].baseMediaDecodeTime=i.baseMediaDecodeTime}},i.appendData_=function(e,t){var i=t.type,n=t.data;if(n&&n.byteLength&&("audio"!==i||!this.audioDisabled_)){var r=this.getInitSegmentAndUpdateState_({type:i,initSegment:t.initSegment,playlist:e.playlist,map:e.isFmp4?e.segment.map:null});this.appendToSourceBuffer_({segmentInfo:e,type:i,initSegment:r,data:n})}},i.loadSegment_=function(e){var t=this;this.state="WAITING",this.pendingSegment_=e,this.trimBackBuffer_(e),"number"==typeof e.timestampOffset&&this.transmuxer_&&this.transmuxer_.postMessage({action:"clearAllMp4Captions"}),this.hasEnoughInfoToLoad_()?this.updateTransmuxerAndRequestSegment_(e):this.loadQueue_.push((function(){var i=(0,l.default)({},e,{forceTimestampOffset:!0});(0,l.default)(e,t.generateSegmentInfo_(i)),t.isPendingTimestampOffset_=!1,t.updateTransmuxerAndRequestSegment_(e)}))},i.updateTransmuxerAndRequestSegment_=function(e){var t=this;this.shouldUpdateTransmuxerTimestampOffset_(e.timestampOffset)&&(this.gopBuffer_.length=0,e.gopsToAlignWith=[],this.timeMapping_=0,this.transmuxer_.postMessage({action:"reset"}),this.transmuxer_.postMessage({action:"setTimestampOffset",timestampOffset:e.timestampOffset}));var i=this.createSimplifiedSegmentObj_(e),n=this.isEndOfStream_(e.mediaIndex,e.playlist,e.partIndex),r=null!==this.mediaIndex,s=e.timeline!==this.currentTimeline_&&e.timeline>0,a=n||r&&s;this.logger_("Requesting "+Qa(e)),i.map&&!i.map.bytes&&(this.logger_("going to request init segment."),this.appendInitSegment_={video:!0,audio:!0}),e.abortRequests=Ma({xhr:this.vhs_.xhr,xhrOptions:this.xhrOptions_,decryptionWorker:this.decrypter_,segment:i,abortFn:this.handleAbort_.bind(this,e),progressFn:this.handleProgress_.bind(this),trackInfoFn:this.handleTrackInfo_.bind(this),timingInfoFn:this.handleTimingInfo_.bind(this),videoSegmentTimingInfoFn:this.handleSegmentTimingInfo_.bind(this,"video",e.requestId),audioSegmentTimingInfoFn:this.handleSegmentTimingInfo_.bind(this,"audio",e.requestId),captionsFn:this.handleCaptions_.bind(this),isEndOfTimeline:a,endedTimelineFn:function(){t.logger_("received endedtimeline callback")},id3Fn:this.handleId3_.bind(this),dataFn:this.handleData_.bind(this),doneFn:this.segmentRequestFinished_.bind(this),onTransmuxerLog:function(i){var n=i.message,r=i.level,s=i.stream;t.logger_(Qa(e)+" logged from transmuxer stream "+s+" as a "+r+": "+n)}})},i.trimBackBuffer_=function(e){var t=function(e,t,i){var n=t-aa.BACK_BUFFER_LENGTH;e.length&&(n=Math.max(n,e.start(0)));var r=t-i;return Math.min(r,n)}(this.seekable_(),this.currentTime_(),this.playlist_.targetDuration||10);t>0&&this.remove(0,t)},i.createSimplifiedSegmentObj_=function(e){var t=e.segment,i=e.part,n={resolvedUri:i?i.resolvedUri:t.resolvedUri,byterange:i?i.byterange:t.byterange,requestId:e.requestId,transmuxer:e.transmuxer,audioAppendStart:e.audioAppendStart,gopsToAlignWith:e.gopsToAlignWith,part:e.part},r=e.playlist.segments[e.mediaIndex-1];if(r&&r.timeline===t.timeline&&(r.videoTimingInfo?n.baseStartTime=r.videoTimingInfo.transmuxedDecodeEnd:r.audioTimingInfo&&(n.baseStartTime=r.audioTimingInfo.transmuxedDecodeEnd)),t.key){var s=t.key.iv||new Uint32Array([0,0,0,e.mediaIndex+e.playlist.mediaSequence]);n.key=this.segmentKey(t.key),n.key.iv=s}return t.map&&(n.map=this.initSegmentForMap(t.map)),n},i.saveTransferStats_=function(e){this.mediaRequests+=1,e&&(this.mediaBytesTransferred+=e.bytesReceived,this.mediaTransferDuration+=e.roundTripTime)},i.saveBandwidthRelatedStats_=function(e,t){this.pendingSegment_.byteLength=t.bytesReceived,e<Ka?this.logger_("Ignoring segment's bandwidth because its duration of "+e+" is less than the min to record 0.016666666666666666"):(this.bandwidth=t.bandwidth,this.roundTrip=t.roundTripTime)},i.handleTimeout_=function(){this.mediaRequestsTimedout+=1,this.bandwidth=1,this.roundTrip=NaN,this.trigger("bandwidthupdate")},i.segmentRequestFinished_=function(e,t,i){if(this.callQueue_.length)this.callQueue_.push(this.segmentRequestFinished_.bind(this,e,t,i));else if(this.saveTransferStats_(t.stats),this.pendingSegment_&&t.requestId===this.pendingSegment_.requestId){if(e){if(this.pendingSegment_=null,this.state="READY",e.code===Sa)return;return this.pause(),e.code===wa?void this.handleTimeout_():(this.mediaRequestsErrored+=1,this.error(e),void this.trigger("error"))}var n=this.pendingSegment_;this.saveBandwidthRelatedStats_(n.duration,t.stats),n.endOfAllRequests=t.endOfAllRequests,i.gopInfo&&(this.gopBuffer_=function(e,t,i){if(!t.length)return e;if(i)return t.slice();for(var n=t[0].pts,r=0;r<e.length&&!(e[r].pts>=n);r++);return e.slice(0,r).concat(t)}(this.gopBuffer_,i.gopInfo,this.safeAppend_)),this.state="APPENDING",this.trigger("appending"),this.waitForAppendsToComplete_(n)}},i.setTimeMapping_=function(e){var t=this.syncController_.mappingForTimeline(e);null!==t&&(this.timeMapping_=t)},i.updateMediaSecondsLoaded_=function(e){"number"==typeof e.start&&"number"==typeof e.end?this.mediaSecondsLoaded+=e.end-e.start:this.mediaSecondsLoaded+=e.duration},i.shouldUpdateTransmuxerTimestampOffset_=function(e){return null!==e&&("main"===this.loaderType_&&e!==this.sourceUpdater_.videoTimestampOffset()||!this.audioDisabled_&&e!==this.sourceUpdater_.audioTimestampOffset())},i.trueSegmentStart_=function(e){var t=e.currentStart,i=e.playlist,n=e.mediaIndex,r=e.firstVideoFrameTimeForData,s=e.currentVideoTimestampOffset,a=e.useVideoTimingInfo,o=e.videoTimingInfo,l=e.audioTimingInfo;if(void 0!==t)return t;if(!a)return l.start;var u=i.segments[n-1];return 0!==n&&u&&void 0!==u.start&&u.end===r+s?o.start:r},i.waitForAppendsToComplete_=function(e){var t=this.getCurrentMediaInfo_(e);if(!t)return this.error({message:"No starting media returned, likely due to an unsupported media format.",blacklistDuration:1/0}),void this.trigger("error");var i=t.hasAudio,n=t.hasVideo,r=t.isMuxed,s="main"===this.loaderType_&&n,a=!this.audioDisabled_&&i&&!r;if(e.waitingOnAppends=0,!e.hasAppendedData_)return e.timingInfo||"number"!=typeof e.timestampOffset||(this.isPendingTimestampOffset_=!0),e.timingInfo={start:0},e.waitingOnAppends++,this.isPendingTimestampOffset_||(this.updateSourceBufferTimestampOffset_(e),this.processMetadataQueue_()),void this.checkAppendsDone_(e);s&&e.waitingOnAppends++,a&&e.waitingOnAppends++,s&&this.sourceUpdater_.videoQueueCallback(this.checkAppendsDone_.bind(this,e)),a&&this.sourceUpdater_.audioQueueCallback(this.checkAppendsDone_.bind(this,e))},i.checkAppendsDone_=function(e){this.checkForAbort_(e.requestId)||(e.waitingOnAppends--,0===e.waitingOnAppends&&this.handleAppendsDone_())},i.checkForIllegalMediaSwitch=function(e){var t=function(e,t,i){return"main"===e&&t&&i?i.hasAudio||i.hasVideo?t.hasVideo&&!i.hasVideo?"Only audio found in segment when we expected video. We can't switch to audio only from a stream that had video. To get rid of this message, please add codec information to the manifest.":!t.hasVideo&&i.hasVideo?"Video found in segment when we expected only audio. We can't switch to a stream with video from an audio only stream. To get rid of this message, please add codec information to the manifest.":null:"Neither audio nor video found in segment.":null}(this.loaderType_,this.getCurrentMediaInfo_(),e);return!!t&&(this.error({message:t,blacklistDuration:1/0}),this.trigger("error"),!0)},i.updateSourceBufferTimestampOffset_=function(e){if(null!==e.timestampOffset&&"number"==typeof e.timingInfo.start&&!e.changedTimestampOffset&&"main"===this.loaderType_){var t=!1;e.timestampOffset-=e.timingInfo.start,e.changedTimestampOffset=!0,e.timestampOffset!==this.sourceUpdater_.videoTimestampOffset()&&(this.sourceUpdater_.videoTimestampOffset(e.timestampOffset),t=!0),e.timestampOffset!==this.sourceUpdater_.audioTimestampOffset()&&(this.sourceUpdater_.audioTimestampOffset(e.timestampOffset),t=!0),t&&this.trigger("timestampoffset")}},i.updateTimingInfoEnd_=function(e){e.timingInfo=e.timingInfo||{};var t=this.getMediaInfo_(),i="main"===this.loaderType_&&t&&t.hasVideo&&e.videoTimingInfo?e.videoTimingInfo:e.audioTimingInfo;i&&(e.timingInfo.end="number"==typeof i.end?i.end:i.start+e.duration)},i.handleAppendsDone_=function(){if(this.pendingSegment_&&this.trigger("appendsdone"),!this.pendingSegment_)return this.state="READY",void(this.paused()||this.monitorBuffer_());var e=this.pendingSegment_;this.updateTimingInfoEnd_(e),this.shouldSaveSegmentTimingInfo_&&this.syncController_.saveSegmentTimingInfo({segmentInfo:e,shouldSaveTimelineMapping:"main"===this.loaderType_});var t=to(e,this.sourceType_);if(t&&("warn"===t.severity?Vr.log.warn(t.message):this.logger_(t.message)),this.recordThroughput_(e),this.pendingSegment_=null,this.state="READY",!e.isSyncRequest||(this.trigger("syncinfoupdate"),e.hasAppendedData_)){this.logger_("Appended "+Qa(e)),this.addSegmentMetadataCue_(e),this.fetchAtBuffer_=!0,this.currentTimeline_!==e.timeline&&(this.timelineChangeController_.lastTimelineChange({type:this.loaderType_,from:this.currentTimeline_,to:e.timeline}),"main"!==this.loaderType_||this.audioDisabled_||this.timelineChangeController_.lastTimelineChange({type:"audio",from:this.currentTimeline_,to:e.timeline})),this.currentTimeline_=e.timeline,this.trigger("syncinfoupdate");var i=e.segment,n=e.part,r=i.end&&this.currentTime_()-i.end>3*e.playlist.targetDuration,s=n&&n.end&&this.currentTime_()-n.end>3*e.playlist.partTargetDuration;if(r||s)return this.logger_("bad "+(r?"segment":"part")+" "+Qa(e)),void this.resetEverything();null!==this.mediaIndex&&this.trigger("bandwidthupdate"),this.trigger("progress"),this.mediaIndex=e.mediaIndex,this.partIndex=e.partIndex,this.isEndOfStream_(e.mediaIndex,e.playlist,e.partIndex)&&this.endOfStream(),this.trigger("appended"),e.hasAppendedData_&&this.mediaAppends++,this.paused()||this.monitorBuffer_()}else this.logger_("Throwing away un-appended sync request "+Qa(e))},i.recordThroughput_=function(e){if(e.duration<Ka)this.logger_("Ignoring segment's throughput because its duration of "+e.duration+" is less than the min to record 0.016666666666666666");else{var t=this.throughput.rate,i=Date.now()-e.endOfAllRequests+1,n=Math.floor(e.byteLength/i*8*1e3);this.throughput.rate+=(n-t)/++this.throughput.count}},i.addSegmentMetadataCue_=function(e){if(this.segmentMetadataTrack_){var t=e.segment,i=t.start,n=t.end;if(Ya(i)&&Ya(n)){Ga(i,n,this.segmentMetadataTrack_);var r=s().WebKitDataCue||s().VTTCue,a={custom:t.custom,dateTimeObject:t.dateTimeObject,dateTimeString:t.dateTimeString,bandwidth:e.playlist.attributes.BANDWIDTH,resolution:e.playlist.attributes.RESOLUTION,codecs:e.playlist.attributes.CODECS,byteLength:e.byteLength,uri:e.uri,timeline:e.timeline,playlist:e.playlist.id,start:i,end:n},o=new r(i,n,JSON.stringify(a));o.value=a,this.segmentMetadataTrack_.addCue(o)}}},t}(Vr.EventTarget);function no(){}var ro,so=function(e){return"string"!=typeof e?e:e.replace(/./,(function(e){return e.toUpperCase()}))},ao=["video","audio"],oo=function(e,t){var i=t[e+"Buffer"];return i&&i.updating||t.queuePending[e]},lo=function e(t,i){if(0!==i.queue.length){var n=0,r=i.queue[n];if("mediaSource"!==r.type){if("mediaSource"!==t&&i.ready()&&"closed"!==i.mediaSource.readyState&&!oo(t,i)){if(r.type!==t){if(n=function(e,t){for(var i=0;i<t.length;i++){var n=t[i];if("mediaSource"===n.type)return null;if(n.type===e)return i}return null}(t,i.queue),null===n)return;r=i.queue[n]}return i.queue.splice(n,1),i.queuePending[t]=r,r.action(t,i),r.doneFn?void 0:(i.queuePending[t]=null,void e(t,i))}}else i.updating()||"closed"===i.mediaSource.readyState||(i.queue.shift(),r.action(i),r.doneFn&&r.doneFn(),e("audio",i),e("video",i))}},uo=function(e,t){var i=t[e+"Buffer"],n=so(e);i&&(i.removeEventListener("updateend",t["on"+n+"UpdateEnd_"]),i.removeEventListener("error",t["on"+n+"Error_"]),t.codecs[e]=null,t[e+"Buffer"]=null)},co=function(e,t){return e&&t&&-1!==Array.prototype.indexOf.call(e.sourceBuffers,t)},ho=function(e,t,i){return function(n,r){var s=r[n+"Buffer"];if(co(r.mediaSource,s)){r.logger_("Appending segment "+t.mediaIndex+"'s "+e.length+" bytes to "+n+"Buffer");try{s.appendBuffer(e)}catch(e){r.logger_("Error with code "+e.code+" "+(22===e.code?"(QUOTA_EXCEEDED_ERR) ":"")+"when appending segment "+t.mediaIndex+" to "+n+"Buffer"),r.queuePending[n]=null,i(e)}}}},po=function(e,t){return function(i,n){var r=n[i+"Buffer"];if(co(n.mediaSource,r)){n.logger_("Removing "+e+" to "+t+" from "+i+"Buffer");try{r.remove(e,t)}catch(r){n.logger_("Remove "+e+" to "+t+" from "+i+"Buffer failed")}}}},fo=function(e){return function(t,i){var n=i[t+"Buffer"];co(i.mediaSource,n)&&(i.logger_("Setting "+t+"timestampOffset to "+e),n.timestampOffset=e)}},mo=function(e){return function(t,i){e()}},go=function(e){return function(t){if("open"===t.mediaSource.readyState){t.logger_("Calling mediaSource endOfStream("+(e||"")+")");try{t.mediaSource.endOfStream(e)}catch(e){Vr.log.warn("Failed to call media source endOfStream",e)}}}},vo=function(e){return function(t){t.logger_("Setting mediaSource duration to "+e);try{t.mediaSource.duration=e}catch(e){Vr.log.warn("Failed to set media source duration",e)}}},yo=function(){return function(e,t){if("open"===t.mediaSource.readyState){var i=t[e+"Buffer"];if(co(t.mediaSource,i)){t.logger_("calling abort on "+e+"Buffer");try{i.abort()}catch(t){Vr.log.warn("Failed to abort on "+e+"Buffer",t)}}}}},_o=function(e,t){return function(i){var n=so(e),r=(0,S.getMimeForCodec)(t);i.logger_("Adding "+e+"Buffer with codec "+t+" to mediaSource");var s=i.mediaSource.addSourceBuffer(r);s.addEventListener("updateend",i["on"+n+"UpdateEnd_"]),s.addEventListener("error",i["on"+n+"Error_"]),i.codecs[e]=t,i[e+"Buffer"]=s}},bo=function(e){return function(t){var i=t[e+"Buffer"];if(uo(e,t),co(t.mediaSource,i)){t.logger_("Removing "+e+"Buffer with codec "+t.codecs[e]+" from mediaSource");try{t.mediaSource.removeSourceBuffer(i)}catch(t){Vr.log.warn("Failed to removeSourceBuffer "+e+"Buffer",t)}}}},To=function(e){return function(t,i){var n=i[t+"Buffer"],r=(0,S.getMimeForCodec)(e);co(i.mediaSource,n)&&i.codecs[t]!==e&&(i.logger_("changing "+t+"Buffer codec from "+i.codecs[t]+" to "+e),n.changeType(r),i.codecs[t]=e)}},wo=function(e){var t=e.type,i=e.sourceUpdater,n=e.action,r=e.doneFn,s=e.name;i.queue.push({type:t,action:n,doneFn:r,name:s}),lo(t,i)},So=function(e,t){return function(i){if(t.queuePending[e]){var n=t.queuePending[e].doneFn;t.queuePending[e]=null,n&&n(t[e+"Error_"])}lo(e,t)}},ko=function(e){function t(t){var i;return(i=e.call(this)||this).mediaSource=t,i.sourceopenListener_=function(){return lo("mediaSource",(0,d.default)(i))},i.mediaSource.addEventListener("sourceopen",i.sourceopenListener_),i.logger_=Kr("SourceUpdater"),i.audioTimestampOffset_=0,i.videoTimestampOffset_=0,i.queue=[],i.queuePending={audio:null,video:null},i.delayedAudioAppendQueue_=[],i.videoAppendQueued_=!1,i.codecs={},i.onVideoUpdateEnd_=So("video",(0,d.default)(i)),i.onAudioUpdateEnd_=So("audio",(0,d.default)(i)),i.onVideoError_=function(e){i.videoError_=e},i.onAudioError_=function(e){i.audioError_=e},i.createdSourceBuffers_=!1,i.initializedEme_=!1,i.triggeredReady_=!1,i}(0,h.default)(t,e);var i=t.prototype;return i.initializedEme=function(){this.initializedEme_=!0,this.triggerReady()},i.hasCreatedSourceBuffers=function(){return this.createdSourceBuffers_},i.hasInitializedAnyEme=function(){return this.initializedEme_},i.ready=function(){return this.hasCreatedSourceBuffers()&&this.hasInitializedAnyEme()},i.createSourceBuffers=function(e){this.hasCreatedSourceBuffers()||(this.addOrChangeSourceBuffers(e),this.createdSourceBuffers_=!0,this.trigger("createdsourcebuffers"),this.triggerReady())},i.triggerReady=function(){this.ready()&&!this.triggeredReady_&&(this.triggeredReady_=!0,this.trigger("ready"))},i.addSourceBuffer=function(e,t){wo({type:"mediaSource",sourceUpdater:this,action:_o(e,t),name:"addSourceBuffer"})},i.abort=function(e){wo({type:e,sourceUpdater:this,action:yo(e),name:"abort"})},i.removeSourceBuffer=function(e){this.canRemoveSourceBuffer()?wo({type:"mediaSource",sourceUpdater:this,action:bo(e),name:"removeSourceBuffer"}):Vr.log.error("removeSourceBuffer is not supported!")},i.canRemoveSourceBuffer=function(){return!Vr.browser.IE_VERSION&&!Vr.browser.IS_FIREFOX&&s().MediaSource&&s().MediaSource.prototype&&"function"==typeof s().MediaSource.prototype.removeSourceBuffer},t.canChangeType=function(){return s().SourceBuffer&&s().SourceBuffer.prototype&&"function"==typeof s().SourceBuffer.prototype.changeType},i.canChangeType=function(){return this.constructor.canChangeType()},i.changeType=function(e,t){this.canChangeType()?wo({type:e,sourceUpdater:this,action:To(t),name:"changeType"}):Vr.log.error("changeType is not supported!")},i.addOrChangeSourceBuffers=function(e){var t=this;if(!e||"object"!=typeof e||0===Object.keys(e).length)throw new Error("Cannot addOrChangeSourceBuffers to undefined codecs");Object.keys(e).forEach((function(i){var n=e[i];if(!t.hasCreatedSourceBuffers())return t.addSourceBuffer(i,n);t.canChangeType()&&t.changeType(i,n)}))},i.appendBuffer=function(e,t){var i=this,n=e.segmentInfo,r=e.type,s=e.bytes;if(this.processedAppend_=!0,"audio"===r&&this.videoBuffer&&!this.videoAppendQueued_)return this.delayedAudioAppendQueue_.push([e,t]),void this.logger_("delayed audio append of "+s.length+" until video append");if(wo({type:r,sourceUpdater:this,action:ho(s,n||{mediaIndex:-1},t),doneFn:t,name:"appendBuffer"}),"video"===r){if(this.videoAppendQueued_=!0,!this.delayedAudioAppendQueue_.length)return;var a=this.delayedAudioAppendQueue_.slice();this.logger_("queuing delayed audio "+a.length+" appendBuffers"),this.delayedAudioAppendQueue_.length=0,a.forEach((function(e){i.appendBuffer.apply(i,e)}))}},i.audioBuffered=function(){return co(this.mediaSource,this.audioBuffer)&&this.audioBuffer.buffered?this.audioBuffer.buffered:Vr.createTimeRange()},i.videoBuffered=function(){return co(this.mediaSource,this.videoBuffer)&&this.videoBuffer.buffered?this.videoBuffer.buffered:Vr.createTimeRange()},i.buffered=function(){var e=co(this.mediaSource,this.videoBuffer)?this.videoBuffer:null,t=co(this.mediaSource,this.audioBuffer)?this.audioBuffer:null;return t&&!e?this.audioBuffered():e&&!t?this.videoBuffered():function(e,t){var i=null,n=null,r=0,s=[],a=[];if(!(e&&e.length&&t&&t.length))return Vr.createTimeRange();for(var o=e.length;o--;)s.push({time:e.start(o),type:"start"}),s.push({time:e.end(o),type:"end"});for(o=t.length;o--;)s.push({time:t.start(o),type:"start"}),s.push({time:t.end(o),type:"end"});for(s.sort((function(e,t){return e.time-t.time})),o=0;o<s.length;o++)"start"===s[o].type?2==++r&&(i=s[o].time):"end"===s[o].type&&1==--r&&(n=s[o].time),null!==i&&null!==n&&(a.push([i,n]),i=null,n=null);return Vr.createTimeRanges(a)}(this.audioBuffered(),this.videoBuffered())},i.setDuration=function(e,t){void 0===t&&(t=no),wo({type:"mediaSource",sourceUpdater:this,action:vo(e),name:"duration",doneFn:t})},i.endOfStream=function(e,t){void 0===e&&(e=null),void 0===t&&(t=no),"string"!=typeof e&&(e=void 0),wo({type:"mediaSource",sourceUpdater:this,action:go(e),name:"endOfStream",doneFn:t})},i.removeAudio=function(e,t,i){void 0===i&&(i=no),this.audioBuffered().length&&0!==this.audioBuffered().end(0)?wo({type:"audio",sourceUpdater:this,action:po(e,t),doneFn:i,name:"remove"}):i()},i.removeVideo=function(e,t,i){void 0===i&&(i=no),this.videoBuffered().length&&0!==this.videoBuffered().end(0)?wo({type:"video",sourceUpdater:this,action:po(e,t),doneFn:i,name:"remove"}):i()},i.updating=function(){return!(!oo("audio",this)&&!oo("video",this))},i.audioTimestampOffset=function(e){return void 0!==e&&this.audioBuffer&&this.audioTimestampOffset_!==e&&(wo({type:"audio",sourceUpdater:this,action:fo(e),name:"timestampOffset"}),this.audioTimestampOffset_=e),this.audioTimestampOffset_},i.videoTimestampOffset=function(e){return void 0!==e&&this.videoBuffer&&this.videoTimestampOffset!==e&&(wo({type:"video",sourceUpdater:this,action:fo(e),name:"timestampOffset"}),this.videoTimestampOffset_=e),this.videoTimestampOffset_},i.audioQueueCallback=function(e){this.audioBuffer&&wo({type:"audio",sourceUpdater:this,action:mo(e),name:"callback"})},i.videoQueueCallback=function(e){this.videoBuffer&&wo({type:"video",sourceUpdater:this,action:mo(e),name:"callback"})},i.dispose=function(){var e=this;this.trigger("dispose"),ao.forEach((function(t){e.abort(t),e.canRemoveSourceBuffer()?e.removeSourceBuffer(t):e[t+"QueueCallback"]((function(){return uo(t,e)}))})),this.videoAppendQueued_=!1,this.delayedAudioAppendQueue_.length=0,this.sourceopenListener_&&this.mediaSource.removeEventListener("sourceopen",this.sourceopenListener_),this.off()},t}(Vr.EventTarget),Eo=function(e){return decodeURIComponent(escape(String.fromCharCode.apply(null,e)))},Co=new Uint8Array("\n\n".split("").map((function(e){return e.charCodeAt(0)}))),xo=function(e){function t(t,i){var n;return void 0===i&&(i={}),(n=e.call(this,t,i)||this).mediaSource_=null,n.subtitlesTrack_=null,n.loaderType_="subtitle",n.featuresNativeTextTracks_=t.featuresNativeTextTracks,n.shouldSaveSegmentTimingInfo_=!1,n}(0,h.default)(t,e);var i=t.prototype;return i.createTransmuxer_=function(){return null},i.buffered_=function(){if(!this.subtitlesTrack_||!this.subtitlesTrack_.cues||!this.subtitlesTrack_.cues.length)return Vr.createTimeRanges();var e=this.subtitlesTrack_.cues,t=e[0].startTime,i=e[e.length-1].startTime;return Vr.createTimeRanges([[t,i]])},i.initSegmentForMap=function(e,t){if(void 0===t&&(t=!1),!e)return null;var i=Gs(e),n=this.initSegments_[i];if(t&&!n&&e.bytes){var r=Co.byteLength+e.bytes.byteLength,s=new Uint8Array(r);s.set(e.bytes),s.set(Co,e.bytes.byteLength),this.initSegments_[i]=n={resolvedUri:e.resolvedUri,byterange:e.byterange,bytes:s}}return n||e},i.couldBeginLoading_=function(){return this.playlist_&&this.subtitlesTrack_&&!this.paused()},i.init_=function(){return this.state="READY",this.resetEverything(),this.monitorBuffer_()},i.track=function(e){return void 0===e||(this.subtitlesTrack_=e,"INIT"===this.state&&this.couldBeginLoading_()&&this.init_()),this.subtitlesTrack_},i.remove=function(e,t){Ga(e,t,this.subtitlesTrack_)},i.fillBuffer_=function(){var e=this,t=this.chooseNextRequest_();if(t){if(null===this.syncController_.timestampOffsetForTimeline(t.timeline)){return this.syncController_.one("timestampoffset",(function(){e.state="READY",e.paused()||e.monitorBuffer_()})),void(this.state="WAITING_ON_TIMELINE")}this.loadSegment_(t)}},i.timestampOffsetForSegment_=function(){return null},i.chooseNextRequest_=function(){return this.skipEmptySegments_(e.prototype.chooseNextRequest_.call(this))},i.skipEmptySegments_=function(e){for(;e&&e.segment.empty;){if(e.mediaIndex+1>=e.playlist.segments.length){e=null;break}e=this.generateSegmentInfo_({playlist:e.playlist,mediaIndex:e.mediaIndex+1,startOfSegment:e.startOfSegment+e.duration,isSyncRequest:e.isSyncRequest})}return e},i.stopForError=function(e){this.error(e),this.state="READY",this.pause(),this.trigger("error")},i.segmentRequestFinished_=function(e,t,i){var n=this;if(this.subtitlesTrack_){if(this.saveTransferStats_(t.stats),!this.pendingSegment_)return this.state="READY",void(this.mediaRequestsAborted+=1);if(e)return e.code===wa&&this.handleTimeout_(),e.code===Sa?this.mediaRequestsAborted+=1:this.mediaRequestsErrored+=1,void this.stopForError(e);var r=this.pendingSegment_;this.saveBandwidthRelatedStats_(r.duration,t.stats),this.state="APPENDING",this.trigger("appending");var a=r.segment;if(a.map&&(a.map.bytes=t.map.bytes),r.bytes=t.bytes,"function"!=typeof s().WebVTT&&this.subtitlesTrack_&&this.subtitlesTrack_.tech_){var o,l=function(){n.subtitlesTrack_.tech_.off("vttjsloaded",o),n.stopForError({message:"Error loading vtt.js"})};return o=function(){n.subtitlesTrack_.tech_.off("vttjserror",l),n.segmentRequestFinished_(e,t,i)},this.state="WAITING_ON_VTTJS",this.subtitlesTrack_.tech_.one("vttjsloaded",o),void this.subtitlesTrack_.tech_.one("vttjserror",l)}a.requested=!0;try{this.parseVTTCues_(r)}catch(e){return void this.stopForError({message:e.message})}if(this.updateTimeMapping_(r,this.syncController_.timelines[r.timeline],this.playlist_),r.cues.length?r.timingInfo={start:r.cues[0].startTime,end:r.cues[r.cues.length-1].endTime}:r.timingInfo={start:r.startOfSegment,end:r.startOfSegment+r.duration},r.isSyncRequest)return this.trigger("syncinfoupdate"),this.pendingSegment_=null,void(this.state="READY");r.byteLength=r.bytes.byteLength,this.mediaSecondsLoaded+=a.duration,r.cues.forEach((function(e){n.subtitlesTrack_.addCue(n.featuresNativeTextTracks_?new(s().VTTCue)(e.startTime,e.endTime,e.text):e)})),function(e){var t=e.cues;if(t)for(var i=0;i<t.length;i++){for(var n=[],r=0,s=0;s<t.length;s++)t[i].startTime===t[s].startTime&&t[i].endTime===t[s].endTime&&t[i].text===t[s].text&&++r>1&&n.push(t[s]);n.length&&n.forEach((function(t){return e.removeCue(t)}))}}(this.subtitlesTrack_),this.handleAppendsDone_()}else this.state="READY"},i.handleData_=function(){},i.updateTimingInfoEnd_=function(){},i.parseVTTCues_=function(e){var t,i=!1;"function"==typeof s().TextDecoder?t=new(s().TextDecoder)("utf8"):(t=s().WebVTT.StringDecoder(),i=!0);var n=new(s().WebVTT.Parser)(s(),s().vttjs,t);if(e.cues=[],e.timestampmap={MPEGTS:0,LOCAL:0},n.oncue=e.cues.push.bind(e.cues),n.ontimestampmap=function(t){e.timestampmap=t},n.onparsingerror=function(e){Vr.log.warn("Error encountered when parsing cues: "+e.message)},e.segment.map){var r=e.segment.map.bytes;i&&(r=Eo(r)),n.parse(r)}var a=e.bytes;i&&(a=Eo(a)),n.parse(a),n.flush()},i.updateTimeMapping_=function(e,t,i){var n=e.segment;if(t)if(e.cues.length){var r=e.timestampmap,s=r.MPEGTS/O.ONE_SECOND_IN_TS-r.LOCAL+t.mapping;if(e.cues.forEach((function(e){e.startTime+=s,e.endTime+=s})),!i.syncInfo){var a=e.cues[0].startTime,o=e.cues[e.cues.length-1].startTime;i.syncInfo={mediaSequence:i.mediaSequence+e.mediaIndex,time:Math.min(a,o-n.duration)}}}else n.empty=!0},t}(io),Ao=function(e,t){for(var i=e.cues,n=0;n<i.length;n++){var r=i[n];if(t>=r.adStartTime&&t<=r.adEndTime)return r}return null},Po=[{name:"VOD",run:function(e,t,i,n,r){if(i!==1/0){return{time:0,segmentIndex:0,partIndex:null}}return null}},{name:"ProgramDateTime",run:function(e,t,i,n,r){if(!Object.keys(e.timelineToDatetimeMappings).length)return null;var s=null,a=null,o=ls(t);r=r||0;for(var l=0;l<o.length;l++){var u=o[t.endList||0===r?l:o.length-(l+1)],c=u.segment,d=e.timelineToDatetimeMappings[c.timeline];if(d&&c.dateTimeObject){var h=c.dateTimeObject.getTime()/1e3+d;if(c.parts&&"number"==typeof u.partIndex)for(var p=0;p<u.partIndex;p++)h+=c.parts[p].duration;var f=Math.abs(r-h);if(null!==a&&(0===f||a<f))break;a=f,s={time:h,segmentIndex:u.segmentIndex,partIndex:u.partIndex}}}return s}},{name:"Segment",run:function(e,t,i,n,r){var s=null,a=null;r=r||0;for(var o=ls(t),l=0;l<o.length;l++){var u=o[t.endList||0===r?l:o.length-(l+1)],c=u.segment,d=u.part&&u.part.start||c&&c.start;if(c.timeline===n&&void 0!==d){var h=Math.abs(r-d);if(null!==a&&a<h)break;(!s||null===a||a>=h)&&(a=h,s={time:d,segmentIndex:u.segmentIndex,partIndex:u.partIndex})}}return s}},{name:"Discontinuity",run:function(e,t,i,n,r){var s=null;if(r=r||0,t.discontinuityStarts&&t.discontinuityStarts.length)for(var a=null,o=0;o<t.discontinuityStarts.length;o++){var l=t.discontinuityStarts[o],u=t.discontinuitySequence+o+1,c=e.discontinuities[u];if(c){var d=Math.abs(r-c.time);if(null!==a&&a<d)break;(!s||null===a||a>=d)&&(a=d,s={time:c.time,segmentIndex:l,partIndex:null})}}return s}},{name:"Playlist",run:function(e,t,i,n,r){return t.syncInfo?{time:t.syncInfo.time,segmentIndex:t.syncInfo.mediaSequence-t.mediaSequence,partIndex:null}:null}}],Io=function(e){function t(t){var i;return(i=e.call(this)||this).timelines=[],i.discontinuities=[],i.timelineToDatetimeMappings={},i.logger_=Kr("SyncController"),i}(0,h.default)(t,e);var i=t.prototype;return i.getSyncPoint=function(e,t,i,n){var r=this.runStrategies_(e,t,i,n);return r.length?this.selectSyncPoint_(r,{key:"time",value:n}):null},i.getExpiredTime=function(e,t){if(!e||!e.segments)return null;var i=this.runStrategies_(e,t,e.discontinuitySequence,0);if(!i.length)return null;var n=this.selectSyncPoint_(i,{key:"segmentIndex",value:0});return n.segmentIndex>0&&(n.time*=-1),Math.abs(n.time+fs({defaultDuration:e.targetDuration,durationList:e.segments,startIndex:n.segmentIndex,endIndex:0}))},i.runStrategies_=function(e,t,i,n){for(var r=[],s=0;s<Po.length;s++){var a=Po[s],o=a.run(this,e,t,i,n);o&&(o.strategy=a.name,r.push({strategy:a.name,syncPoint:o}))}return r},i.selectSyncPoint_=function(e,t){for(var i=e[0].syncPoint,n=Math.abs(e[0].syncPoint[t.key]-t.value),r=e[0].strategy,s=1;s<e.length;s++){var a=Math.abs(e[s].syncPoint[t.key]-t.value);a<n&&(n=a,i=e[s].syncPoint,r=e[s].strategy)}return this.logger_("syncPoint for ["+t.key+": "+t.value+"] chosen with strategy ["+r+"]: [time:"+i.time+", segmentIndex:"+i.segmentIndex+("number"==typeof i.partIndex?",partIndex:"+i.partIndex:"")+"]"),i},i.saveExpiredSegmentInfo=function(e,t){var i=t.mediaSequence-e.mediaSequence;if(i>86400)Vr.log.warn("Not saving expired segment info. Media sequence gap "+i+" is too large.");else for(var n=i-1;n>=0;n--){var r=e.segments[n];if(r&&void 0!==r.start){t.syncInfo={mediaSequence:e.mediaSequence+n,time:r.start},this.logger_("playlist refresh sync: [time:"+t.syncInfo.time+", mediaSequence: "+t.syncInfo.mediaSequence+"]"),this.trigger("syncinfoupdate");break}}},i.setDateTimeMappingForStart=function(e){if(this.timelineToDatetimeMappings={},e.segments&&e.segments.length&&e.segments[0].dateTimeObject){var t=e.segments[0],i=t.dateTimeObject.getTime()/1e3;this.timelineToDatetimeMappings[t.timeline]=-i}},i.saveSegmentTimingInfo=function(e){var t=e.segmentInfo,i=e.shouldSaveTimelineMapping,n=this.calculateSegmentTimeMapping_(t,t.timingInfo,i),r=t.segment;n&&(this.saveDiscontinuitySyncInfo_(t),t.playlist.syncInfo||(t.playlist.syncInfo={mediaSequence:t.playlist.mediaSequence+t.mediaIndex,time:r.start}));var s=r.dateTimeObject;r.discontinuity&&i&&s&&(this.timelineToDatetimeMappings[r.timeline]=-s.getTime()/1e3)},i.timestampOffsetForTimeline=function(e){return void 0===this.timelines[e]?null:this.timelines[e].time},i.mappingForTimeline=function(e){return void 0===this.timelines[e]?null:this.timelines[e].mapping},i.calculateSegmentTimeMapping_=function(e,t,i){var n,r,s=e.segment,a=e.part,o=this.timelines[e.timeline];if("number"==typeof e.timestampOffset)o={time:e.startOfSegment,mapping:e.startOfSegment-t.start},i&&(this.timelines[e.timeline]=o,this.trigger("timestampoffset"),this.logger_("time mapping for timeline "+e.timeline+": [time: "+o.time+"] [mapping: "+o.mapping+"]")),n=e.startOfSegment,r=t.end+o.mapping;else{if(!o)return!1;n=t.start+o.mapping,r=t.end+o.mapping}return a&&(a.start=n,a.end=r),(!s.start||n<s.start)&&(s.start=n),s.end=r,!0},i.saveDiscontinuitySyncInfo_=function(e){var t=e.playlist,i=e.segment;if(i.discontinuity)this.discontinuities[i.timeline]={time:i.start,accuracy:0};else if(t.discontinuityStarts&&t.discontinuityStarts.length)for(var n=0;n<t.discontinuityStarts.length;n++){var r=t.discontinuityStarts[n],s=t.discontinuitySequence+n+1,a=r-e.mediaIndex,o=Math.abs(a);if(!this.discontinuities[s]||this.discontinuities[s].accuracy>o){var l=void 0;l=a<0?i.start-fs({defaultDuration:t.targetDuration,durationList:t.segments,startIndex:e.mediaIndex,endIndex:r}):i.end+fs({defaultDuration:t.targetDuration,durationList:t.segments,startIndex:e.mediaIndex+1,endIndex:r}),this.discontinuities[s]={time:l,accuracy:o}}}},i.dispose=function(){this.trigger("dispose"),this.off()},t}(Vr.EventTarget),Oo=function(e){function t(){var t;return(t=e.call(this)||this).pendingTimelineChanges_={},t.lastTimelineChanges_={},t}(0,h.default)(t,e);var i=t.prototype;return i.clearPendingTimelineChange=function(e){this.pendingTimelineChanges_[e]=null,this.trigger("pendingtimelinechange")},i.pendingTimelineChange=function(e){var t=e.type,i=e.from,n=e.to;return"number"==typeof i&&"number"==typeof n&&(this.pendingTimelineChanges_[t]={type:t,from:i,to:n},this.trigger("pendingtimelinechange")),this.pendingTimelineChanges_[t]},i.lastTimelineChange=function(e){var t=e.type,i=e.from,n=e.to;return"number"==typeof i&&"number"==typeof n&&(this.lastTimelineChanges_[t]={type:t,from:i,to:n},delete this.pendingTimelineChanges_[t],this.trigger("timelinechange")),this.lastTimelineChanges_[t]},i.dispose=function(){this.trigger("dispose"),this.pendingTimelineChanges_={},this.lastTimelineChanges_={},this.off()},t}(Vr.EventTarget),Lo=ua(ca((function(){function e(e,t,i){return e(i={path:t,exports:{},require:function(e,t){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(null==t&&i.path)}},i.exports),i.exports}var t=e((function(e){function t(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value" in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}e.exports=function(e,i,n){return i&&t(e.prototype,i),n&&t(e,n),e},e.exports.default=e.exports,e.exports.__esModule=!0})),i=e((function(e){function t(i,n){return e.exports=t=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},e.exports.default=e.exports,e.exports.__esModule=!0,t(i,n)}e.exports=t,e.exports.default=e.exports,e.exports.__esModule=!0})),n=e((function(e){e.exports=function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,i(e,t)},e.exports.default=e.exports,e.exports.__esModule=!0})),r=function(){function e(){this.listeners={}}var t=e.prototype;return t.on=function(e,t){this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push(t)},t.off=function(e,t){if(!this.listeners[e])return!1;var i=this.listeners[e].indexOf(t);return this.listeners[e]=this.listeners[e].slice(0),this.listeners[e].splice(i,1),i>-1},t.trigger=function(e){var t=this.listeners[e];if(t)if(2===arguments.length)for(var i=t.length,n=0;n<i;++n)t[n].call(this,arguments[1]);else for(var r=Array.prototype.slice.call(arguments,1),s=t.length,a=0;a<s;++a)t[a].apply(this,r)},t.dispose=function(){this.listeners={}},t.pipe=function(e){this.on("data",(function(t){e.push(t)}))},e}();var s=null,a=function(){function e(e){var t,i,n;s||(s=function(){var e,t,i,n,r,s,a,o,l=[[[],[],[],[],[]],[[],[],[],[],[]]],u=l[0],c=l[1],d=u[4],h=c[4],p=[],f=[];for(e=0;e<256;e++)f[(p[e]=e<<1^283*(e>>7))^e]=e;for(t=i=0;!d[t];t^=n||1,i=f[i]||1)for(s=(s=i^i<<1^i<<2^i<<3^i<<4)>>8^255&s^99,d[t]=s,h[s]=t,o=16843009*p[r=p[n=p[t]]]^65537*r^257*n^16843008*t,a=257*p[s]^16843008*s,e=0;e<4;e++)u[e][t]=a=a<<24^a>>>8,c[e][s]=o=o<<24^o>>>8;for(e=0;e<5;e++)u[e]=u[e].slice(0),c[e]=c[e].slice(0);return l}()),this._tables=[[s[0][0].slice(),s[0][1].slice(),s[0][2].slice(),s[0][3].slice(),s[0][4].slice()],[s[1][0].slice(),s[1][1].slice(),s[1][2].slice(),s[1][3].slice(),s[1][4].slice()]];var r=this._tables[0][4],a=this._tables[1],o=e.length,l=1;if(4!==o&&6!==o&&8!==o)throw new Error("Invalid aes key size");var u=e.slice(0),c=[];for(this._key=[u,c],t=o;t<4*o+28;t++)n=u[t-1],(t%o==0||8===o&&t%o==4)&&(n=r[n>>>24]<<24^r[n>>16&255]<<16^r[n>>8&255]<<8^r[255&n],t%o==0&&(n=n<<8^n>>>24^l<<24,l=l<<1^283*(l>>7))),u[t]=u[t-o]^n;for(i=0;t;i++,t--)n=u[3&i?t:t-4],c[i]=t<=4||i<4?n:a[0][r[n>>>24]]^a[1][r[n>>16&255]]^a[2][r[n>>8&255]]^a[3][r[255&n]]}return e.prototype.decrypt=function(e,t,i,n,r,s){var a,o,l,u,c=this._key[1],d=e^c[0],h=n^c[1],p=i^c[2],f=t^c[3],m=c.length/4-2,g=4,v=this._tables[1],y=v[0],_=v[1],b=v[2],T=v[3],w=v[4];for(u=0;u<m;u++)a=y[d>>>24]^_[h>>16&255]^b[p>>8&255]^T[255&f]^c[g],o=y[h>>>24]^_[p>>16&255]^b[f>>8&255]^T[255&d]^c[g+1],l=y[p>>>24]^_[f>>16&255]^b[d>>8&255]^T[255&h]^c[g+2],f=y[f>>>24]^_[d>>16&255]^b[h>>8&255]^T[255&p]^c[g+3],g+=4,d=a,h=o,p=l;for(u=0;u<4;u++)r[(3&-u)+s]=w[d>>>24]<<24^w[h>>16&255]<<16^w[p>>8&255]<<8^w[255&f]^c[g++],a=d,d=h,h=p,p=f,f=a},e}(),o=function(e){function t(){var t;return(t=e.call(this,r)||this).jobs=[],t.delay=1,t.timeout_=null,t}n(t,e);var i=t.prototype;return i.processJob_=function(){this.jobs.shift()(),this.jobs.length?this.timeout_=setTimeout(this.processJob_.bind(this),this.delay):this.timeout_=null},i.push=function(e){this.jobs.push(e),this.timeout_||(this.timeout_=setTimeout(this.processJob_.bind(this),this.delay))},t}(r),l=function(e){return e<<24|(65280&e)<<8|(16711680&e)>>8|e>>>24},u=function(){function e(t,i,n,r){var s=e.STEP,a=new Int32Array(t.buffer),u=new Uint8Array(t.byteLength),c=0;for(this.asyncStream_=new o,this.asyncStream_.push(this.decryptChunk_(a.subarray(c,c+s),i,n,u)),c=s;c<a.length;c+=s)n=new Uint32Array([l(a[c-4]),l(a[c-3]),l(a[c-2]),l(a[c-1])]),this.asyncStream_.push(this.decryptChunk_(a.subarray(c,c+s),i,n,u));this.asyncStream_.push((function(){var e;r(null,(e=u).subarray(0,e.byteLength-e[e.byteLength-1]))}))}return e.prototype.decryptChunk_=function(e,t,i,n){return function(){var r=function(e,t,i){var n,r,s,o,u,c,d,h,p,f=new Int32Array(e.buffer,e.byteOffset,e.byteLength>>2),m=new a(Array.prototype.slice.call(t)),g=new Uint8Array(e.byteLength),v=new Int32Array(g.buffer);for(n=i[0],r=i[1],s=i[2],o=i[3],p=0;p<f.length;p+=4)u=l(f[p]),c=l(f[p+1]),d=l(f[p+2]),h=l(f[p+3]),m.decrypt(u,c,d,h,v,p),v[p]=l(v[p]^n),v[p+1]=l(v[p+1]^r),v[p+2]=l(v[p+2]^s),v[p+3]=l(v[p+3]^o),n=u,r=c,s=d,o=h;return g}(e,t,i);n.set(r,e.byteOffset)}},t(e,null,[{key:"STEP",get:function(){return 32e3}}]),e}();self.onmessage=function(e){var t=e.data,i=new Uint8Array(t.encrypted.bytes,t.encrypted.byteOffset,t.encrypted.byteLength),n=new Uint32Array(t.key.bytes,t.key.byteOffset,t.key.byteLength/4),r=new Uint32Array(t.iv.bytes,t.iv.byteOffset,t.iv.byteLength/4);new u(i,n,r,(function(e,i){var n,r;self.postMessage((n={source:t.source,decrypted:i},r={},Object.keys(n).forEach((function(e){var t=n[e];ArrayBuffer.isView(t)?r[e]={bytes:t.buffer,byteOffset:t.byteOffset,byteLength:t.byteLength}:r[e]=t})),r),[i.buffer])}))}}))),Do=la(Lo),Mo=function(e){var t=e.default?"main":"alternative";return e.characteristics&&e.characteristics.indexOf("public.accessibility.describes-video")>=0&&(t="main-desc"),t},No=function(e,t){e.abort(),e.pause(),t&&t.activePlaylistLoader&&(t.activePlaylistLoader.pause(),t.activePlaylistLoader=null)},Ro=function(e,t){t.activePlaylistLoader=e,e.load()},Uo={AUDIO:function(e,t){return function(){var i=t.segmentLoaders[e],n=t.mediaTypes[e],r=t.blacklistCurrentPlaylist;No(i,n);var s=n.activeTrack(),a=n.activeGroup(),o=(a.filter((function(e){return e.default}))[0]||a[0]).id,l=n.tracks[o];if(s!==l){for(var u in Vr.log.warn("Problem encountered loading the alternate audio track.Switching back to default."),n.tracks)n.tracks[u].enabled=n.tracks[u]===l;n.onTrackChanged()}else r({message:"Problem encountered loading the default audio track."})}},SUBTITLES:function(e,t){return function(){var i=t.segmentLoaders[e],n=t.mediaTypes[e];Vr.log.warn("Problem encountered loading the subtitle track.Disabling subtitle track."),No(i,n);var r=n.activeTrack();r&&(r.mode="disabled"),n.onTrackChanged()}}},Bo={AUDIO:function(e,t,i){if(t){var n=i.tech,r=i.requestOptions,s=i.segmentLoaders[e];t.on("loadedmetadata",(function(){var e=t.media();s.playlist(e,r),(!n.paused()||e.endList&&"none"!==n.preload())&&s.load()})),t.on("loadedplaylist",(function(){s.playlist(t.media(),r),n.paused()||s.load()})),t.on("error",Uo[e](e,i))}},SUBTITLES:function(e,t,i){var n=i.tech,r=i.requestOptions,s=i.segmentLoaders[e],a=i.mediaTypes[e];t.on("loadedmetadata",(function(){var e=t.media();s.playlist(e,r),s.track(a.activeTrack()),(!n.paused()||e.endList&&"none"!==n.preload())&&s.load()})),t.on("loadedplaylist",(function(){s.playlist(t.media(),r),n.paused()||s.load()})),t.on("error",Uo[e](e,i))}},jo={AUDIO:function(e,t){var i=t.vhs,n=t.sourceType,r=t.segmentLoaders[e],s=t.requestOptions,a=t.master.mediaGroups,o=t.mediaTypes[e],l=o.groups,u=o.tracks,c=o.logger_,d=t.masterPlaylistLoader,h=Ss(d.master);for(var p in a[e]&&0!==Object.keys(a[e]).length||(a[e]={main:{default:{default:!0}}},h&&(a[e].main.default.playlists=d.master.playlists)),a[e])for(var f in l[p]||(l[p]=[]),a[e][p]){var m=a[e][p][f],g=void 0;if(h?(c("AUDIO group '"+p+"' label '"+f+"' is a master playlist"),m.isMasterPlaylist=!0,g=null):g="vhs-json"===n&&m.playlists?new Bs(m.playlists[0],i,s):m.resolvedUri?new Bs(m.resolvedUri,i,s):m.playlists&&"dash"===n?new sa(m.playlists[0],i,s,d):null,m=Vr.mergeOptions({id:f,playlistLoader:g},m),Bo[e](e,m.playlistLoader,t),l[p].push(m),void 0===u[f]){var v=new Vr.AudioTrack({id:f,kind:Mo(m),enabled:!1,language:m.language,default:m.default,label:f});u[f]=v}}r.on("error",Uo[e](e,t))},SUBTITLES:function(e,t){var i=t.tech,n=t.vhs,r=t.sourceType,s=t.segmentLoaders[e],a=t.requestOptions,o=t.master.mediaGroups,l=t.mediaTypes[e],u=l.groups,c=l.tracks,d=t.masterPlaylistLoader;for(var h in o[e])for(var p in u[h]||(u[h]=[]),o[e][h])if(!o[e][h][p].forced){var f=o[e][h][p],m=void 0;if("hls"===r)m=new Bs(f.resolvedUri,n,a);else if("dash"===r){if(!f.playlists.filter((function(e){return e.excludeUntil!==1/0})).length)return;m=new sa(f.playlists[0],n,a,d)}else"vhs-json"===r&&(m=new Bs(f.playlists?f.playlists[0]:f.resolvedUri,n,a));if(f=Vr.mergeOptions({id:p,playlistLoader:m},f),Bo[e](e,f.playlistLoader,t),u[h].push(f),void 0===c[p]){var g=i.addRemoteTextTrack({id:p,kind:"subtitles",default:f.default&&f.autoselect,language:f.language,label:p},!1).track;c[p]=g}}s.on("error",Uo[e](e,t))},"CLOSED-CAPTIONS":function(e,t){var i=t.tech,n=t.master.mediaGroups,r=t.mediaTypes[e],s=r.groups,a=r.tracks;for(var o in n[e])for(var l in s[o]||(s[o]=[]),n[e][o]){var u=n[e][o][l];if(/^(?:CC|SERVICE)/.test(u.instreamId)){var c=i.options_.vhs&&i.options_.vhs.captionServices||{},d={label:l,language:u.language,instreamId:u.instreamId,default:u.default&&u.autoselect};if(c[d.instreamId]&&(d=Vr.mergeOptions(d,c[d.instreamId])),void 0===d.default&&delete d.default,s[o].push(Vr.mergeOptions({id:l},u)),void 0===a[l]){var h=i.addRemoteTextTrack({id:d.instreamId,kind:"captions",default:d.default,language:d.language,label:d.label},!1).track;a[l]=h}}}}},Fo=function e(t,i){for(var n=0;n<t.length;n++){if(Ts(i,t[n]))return!0;if(t[n].playlists&&e(t[n].playlists,i))return!0}return!1},Ho={AUDIO:function(e,t){return function(){var i=t.mediaTypes[e].tracks;for(var n in i)if(i[n].enabled)return i[n];return null}},SUBTITLES:function(e,t){return function(){var i=t.mediaTypes[e].tracks;for(var n in i)if("showing"===i[n].mode||"hidden"===i[n].mode)return i[n];return null}}},qo=function(e){["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach((function(t){jo[t](t,e)}));var t=e.mediaTypes,i=e.masterPlaylistLoader,n=e.tech,r=e.vhs,s=e.segmentLoaders,a=s.AUDIO,o=s.main;["AUDIO","SUBTITLES"].forEach((function(i){t[i].activeGroup=function(e,t){return function(i){var n=t.masterPlaylistLoader,r=t.mediaTypes[e].groups,s=n.media();if(!s)return null;var a=null;s.attributes[e]&&(a=r[s.attributes[e]]);var o=Object.keys(r);if(!a)if("AUDIO"===e&&o.length>1&&Ss(t.master))for(var l=0;l<o.length;l++){var u=r[o[l]];if(Fo(u,s)){a=u;break}}else r.main?a=r.main:1===o.length&&(a=r[o[0]]);return void 0===i?a:null!==i&&a&&a.filter((function(e){return e.id===i.id}))[0]||null}}(i,e),t[i].activeTrack=Ho[i](i,e),t[i].onGroupChanged=function(e,t){return function(){var i=t.segmentLoaders,n=i[e],r=i.main,s=t.mediaTypes[e],a=s.activeTrack(),o=s.getActiveGroup(),l=s.activePlaylistLoader,u=s.lastGroup_;o&&u&&o.id===u.id||(s.lastGroup_=o,s.lastTrack_=a,No(n,s),o&&!o.isMasterPlaylist&&(o.playlistLoader?(n.resyncLoader(),Ro(o.playlistLoader,s)):l&&r.resetEverything()))}}(i,e),t[i].onGroupChanging=function(e,t){return function(){var i=t.segmentLoaders[e];t.mediaTypes[e].lastGroup_=null,i.abort(),i.pause()}}(i,e),t[i].onTrackChanged=function(e,t){return function(){var i=t.masterPlaylistLoader,n=t.segmentLoaders,r=n[e],s=n.main,a=t.mediaTypes[e],o=a.activeTrack(),l=a.getActiveGroup(),u=a.activePlaylistLoader,c=a.lastTrack_;if((!c||!o||c.id!==o.id)&&(a.lastGroup_=l,a.lastTrack_=o,No(r,a),l)){if(l.isMasterPlaylist){if(!o||!c||o.id===c.id)return;var d=t.vhs.masterPlaylistController_,h=d.selectPlaylist();if(d.media()===h)return;return a.logger_("track change. Switching master audio from "+c.id+" to "+o.id),i.pause(),s.resetEverything(),void d.fastQualityChange_(h)}if("AUDIO"===e){if(!l.playlistLoader)return s.setAudio(!0),void s.resetEverything();r.setAudio(!0),s.setAudio(!1)}u!==l.playlistLoader?(r.track&&r.track(o),r.resetEverything(),Ro(l.playlistLoader,a)):Ro(l.playlistLoader,a)}}}(i,e),t[i].getActiveGroup=function(e,t){var i=t.mediaTypes;return function(){var t=i[e].activeTrack();return t?i[e].activeGroup(t):null}}(i,e)}));var l=t.AUDIO.activeGroup();if(l){var u=(l.filter((function(e){return e.default}))[0]||l[0]).id;t.AUDIO.tracks[u].enabled=!0,t.AUDIO.onGroupChanged(),t.AUDIO.onTrackChanged(),t.AUDIO.getActiveGroup().playlistLoader?(o.setAudio(!1),a.setAudio(!0)):o.setAudio(!0)}i.on("mediachange",(function(){["AUDIO","SUBTITLES"].forEach((function(e){return t[e].onGroupChanged()}))})),i.on("mediachanging",(function(){["AUDIO","SUBTITLES"].forEach((function(e){return t[e].onGroupChanging()}))}));var c=function(){t.AUDIO.onTrackChanged(),n.trigger({type:"usage",name:"vhs-audio-change"}),n.trigger({type:"usage",name:"hls-audio-change"})};for(var d in n.audioTracks().addEventListener("change",c),n.remoteTextTracks().addEventListener("change",t.SUBTITLES.onTrackChanged),r.on("dispose",(function(){n.audioTracks().removeEventListener("change",c),n.remoteTextTracks().removeEventListener("change",t.SUBTITLES.onTrackChanged)})),n.clearTracks("audio"),t.AUDIO.tracks)n.audioTracks().addTrack(t.AUDIO.tracks[d])},zo=["mediaRequests","mediaRequestsAborted","mediaRequestsTimedout","mediaRequestsErrored","mediaTransferDuration","mediaBytesTransferred","mediaAppends"],Wo=function(e){return this.audioSegmentLoader_[e]+this.mainSegmentLoader_[e]},Vo=function(e){function t(t){var i;i=e.call(this)||this;var n=t.src,r=t.handleManifestRedirects,a=t.withCredentials,o=t.tech,l=t.bandwidth,u=t.externVhs,c=t.useCueTags,h=t.blacklistDuration,p=t.enableLowInitialPlaylist,f=t.sourceType,m=t.cacheEncryptionKeys,g=t.experimentalBufferBasedABR,v=t.experimentalLeastPixelDiffSelector,y=t.captionServices;if(!n)throw new Error("A non-empty playlist URL or JSON manifest string is required");var _,b=t.maxPlaylistRetries;null==b&&(b=1/0),ro=u,i.experimentalBufferBasedABR=Boolean(g),i.experimentalLeastPixelDiffSelector=Boolean(v),i.withCredentials=a,i.tech_=o,i.vhs_=o.vhs,i.sourceType_=f,i.useCueTags_=c,i.blacklistDuration=h,i.maxPlaylistRetries=b,i.enableLowInitialPlaylist=p,i.useCueTags_&&(i.cueTagsTrack_=i.tech_.addTextTrack("metadata","ad-cues"),i.cueTagsTrack_.inBandMetadataTrackDispatchType=""),i.requestOptions_={withCredentials:a,handleManifestRedirects:r,maxPlaylistRetries:b,timeout:null},i.on("error",i.pauseLoading),i.mediaTypes_=(_={},["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach((function(e){_[e]={groups:{},tracks:{},activePlaylistLoader:null,activeGroup:no,activeTrack:no,getActiveGroup:no,onGroupChanged:no,onTrackChanged:no,lastTrack_:null,logger_:Kr("MediaGroups["+e+"]")}})),_),i.mediaSource=new(s().MediaSource),i.handleDurationChange_=i.handleDurationChange_.bind((0,d.default)(i)),i.handleSourceOpen_=i.handleSourceOpen_.bind((0,d.default)(i)),i.handleSourceEnded_=i.handleSourceEnded_.bind((0,d.default)(i)),i.mediaSource.addEventListener("durationchange",i.handleDurationChange_),i.mediaSource.addEventListener("sourceopen",i.handleSourceOpen_),i.mediaSource.addEventListener("sourceended",i.handleSourceEnded_),i.seekable_=Vr.createTimeRanges(),i.hasPlayed_=!1,i.syncController_=new Io(t),i.segmentMetadataTrack_=o.addRemoteTextTrack({kind:"metadata",label:"segment-metadata"},!1).track,i.decrypter_=new Do,i.sourceUpdater_=new ko(i.mediaSource),i.inbandTextTracks_={},i.timelineChangeController_=new Oo;var T={vhs:i.vhs_,parse708captions:t.parse708captions,captionServices:y,mediaSource:i.mediaSource,currentTime:i.tech_.currentTime.bind(i.tech_),seekable:function(){return i.seekable()},seeking:function(){return i.tech_.seeking()},duration:function(){return i.duration()},hasPlayed:function(){return i.hasPlayed_},goalBufferLength:function(){return i.goalBufferLength()},bandwidth:l,syncController:i.syncController_,decrypter:i.decrypter_,sourceType:i.sourceType_,inbandTextTracks:i.inbandTextTracks_,cacheEncryptionKeys:m,sourceUpdater:i.sourceUpdater_,timelineChangeController:i.timelineChangeController_,experimentalExactManifestTimings:t.experimentalExactManifestTimings};i.masterPlaylistLoader_="dash"===i.sourceType_?new sa(n,i.vhs_,i.requestOptions_):new Bs(n,i.vhs_,i.requestOptions_),i.setupMasterPlaylistLoaderListeners_(),i.mainSegmentLoader_=new io(Vr.mergeOptions(T,{segmentMetadataTrack:i.segmentMetadataTrack_,loaderType:"main"}),t),i.audioSegmentLoader_=new io(Vr.mergeOptions(T,{loaderType:"audio"}),t),i.subtitleSegmentLoader_=new xo(Vr.mergeOptions(T,{loaderType:"vtt",featuresNativeTextTracks:i.tech_.featuresNativeTextTracks}),t),i.setupSegmentLoaderListeners_(),i.experimentalBufferBasedABR&&(i.masterPlaylistLoader_.one("loadedplaylist",(function(){return i.startABRTimer_()})),i.tech_.on("pause",(function(){return i.stopABRTimer_()})),i.tech_.on("play",(function(){return i.startABRTimer_()}))),zo.forEach((function(e){i[e+"_"]=Wo.bind((0,d.default)(i),e)})),i.logger_=Kr("MPC"),i.triggeredFmp4Usage=!1,"none"===i.tech_.preload()?(i.loadOnPlay_=function(){i.loadOnPlay_=null,i.masterPlaylistLoader_.load()},i.tech_.one("play",i.loadOnPlay_)):i.masterPlaylistLoader_.load(),i.timeToLoadedData__=-1,i.mainAppendsToLoadedData__=-1,i.audioAppendsToLoadedData__=-1;var w="none"===i.tech_.preload()?"play":"loadstart";return i.tech_.one(w,(function(){var e=Date.now();i.tech_.one("loadeddata",(function(){i.timeToLoadedData__=Date.now()-e,i.mainAppendsToLoadedData__=i.mainSegmentLoader_.mediaAppends,i.audioAppendsToLoadedData__=i.audioSegmentLoader_.mediaAppends}))})),i}(0,h.default)(t,e);var i=t.prototype;return i.mainAppendsToLoadedData_=function(){return this.mainAppendsToLoadedData__},i.audioAppendsToLoadedData_=function(){return this.audioAppendsToLoadedData__},i.appendsToLoadedData_=function(){var e=this.mainAppendsToLoadedData_(),t=this.audioAppendsToLoadedData_();return-1===e||-1===t?-1:e+t},i.timeToLoadedData_=function(){return this.timeToLoadedData__},i.checkABR_=function(){var e=this.selectPlaylist();e&&this.shouldSwitchToMedia_(e)&&this.switchMedia_(e,"abr")},i.switchMedia_=function(e,t,i){var n=this.media(),r=n&&(n.id||n.uri),s=e.id||e.uri;r&&r!==s&&(this.logger_("switch media "+r+" -> "+s+" from "+t),this.tech_.trigger({type:"usage",name:"vhs-rendition-change-"+t})),this.masterPlaylistLoader_.media(e,i)},i.startABRTimer_=function(){var e=this;this.stopABRTimer_(),this.abrTimer_=s().setInterval((function(){return e.checkABR_()}),250)},i.stopABRTimer_=function(){this.tech_.scrubbing&&this.tech_.scrubbing()||(s().clearInterval(this.abrTimer_),this.abrTimer_=null)},i.getAudioTrackPlaylists_=function(){var e=this.master(),t=e&&e.playlists||[];if(!e||!e.mediaGroups||!e.mediaGroups.AUDIO)return t;var i,n=e.mediaGroups.AUDIO,r=Object.keys(n);if(Object.keys(this.mediaTypes_.AUDIO.groups).length)i=this.mediaTypes_.AUDIO.activeTrack();else{var s=n.main||r.length&&n[r[0]];for(var a in s)if(s[a].default){i={label:a};break}}if(!i)return t;var o=[];for(var l in n)if(n[l][i.label]){var u=n[l][i.label];if(u.playlists&&u.playlists.length)o.push.apply(o,u.playlists);else if(u.uri)o.push(u);else if(e.playlists.length)for(var c=0;c<e.playlists.length;c++){var d=e.playlists[c];d.attributes&&d.attributes.AUDIO&&d.attributes.AUDIO===l&&o.push(d)}}return o.length?o:t},i.setupMasterPlaylistLoaderListeners_=function(){var e=this;this.masterPlaylistLoader_.on("loadedmetadata",(function(){var t=e.masterPlaylistLoader_.media(),i=1.5*t.targetDuration*1e3;bs(e.masterPlaylistLoader_.master,e.masterPlaylistLoader_.media())?e.requestOptions_.timeout=0:e.requestOptions_.timeout=i,t.endList&&"none"!==e.tech_.preload()&&(e.mainSegmentLoader_.playlist(t,e.requestOptions_),e.mainSegmentLoader_.load()),qo({sourceType:e.sourceType_,segmentLoaders:{AUDIO:e.audioSegmentLoader_,SUBTITLES:e.subtitleSegmentLoader_,main:e.mainSegmentLoader_},tech:e.tech_,requestOptions:e.requestOptions_,masterPlaylistLoader:e.masterPlaylistLoader_,vhs:e.vhs_,master:e.master(),mediaTypes:e.mediaTypes_,blacklistCurrentPlaylist:e.blacklistCurrentPlaylist.bind(e)}),e.triggerPresenceUsage_(e.master(),t),e.setupFirstPlay(),!e.mediaTypes_.AUDIO.activePlaylistLoader||e.mediaTypes_.AUDIO.activePlaylistLoader.media()?e.trigger("selectedinitialmedia"):e.mediaTypes_.AUDIO.activePlaylistLoader.one("loadedmetadata",(function(){e.trigger("selectedinitialmedia")}))})),this.masterPlaylistLoader_.on("loadedplaylist",(function(){e.loadOnPlay_&&e.tech_.off("play",e.loadOnPlay_);var t=e.masterPlaylistLoader_.media();if(!t){var i;if(e.excludeUnsupportedVariants_(),e.enableLowInitialPlaylist&&(i=e.selectInitialPlaylist()),i||(i=e.selectPlaylist()),!i||!e.shouldSwitchToMedia_(i))return;if(e.initialMedia_=i,e.switchMedia_(e.initialMedia_,"initial"),!("vhs-json"===e.sourceType_&&e.initialMedia_.segments))return;t=e.initialMedia_}e.handleUpdatedMediaPlaylist(t)})),this.masterPlaylistLoader_.on("error",(function(){e.blacklistCurrentPlaylist(e.masterPlaylistLoader_.error)})),this.masterPlaylistLoader_.on("mediachanging",(function(){e.mainSegmentLoader_.abort(),e.mainSegmentLoader_.pause()})),this.masterPlaylistLoader_.on("mediachange",(function(){var t=e.masterPlaylistLoader_.media(),i=1.5*t.targetDuration*1e3;bs(e.masterPlaylistLoader_.master,e.masterPlaylistLoader_.media())?e.requestOptions_.timeout=0:e.requestOptions_.timeout=i,e.mainSegmentLoader_.playlist(t,e.requestOptions_),e.mainSegmentLoader_.load(),e.tech_.trigger({type:"mediachange",bubbles:!0})})),this.masterPlaylistLoader_.on("playlistunchanged",(function(){var t=e.masterPlaylistLoader_.media();"playlist-unchanged"!==t.lastExcludeReason_&&(e.stuckAtPlaylistEnd_(t)&&(e.blacklistCurrentPlaylist({message:"Playlist no longer updating.",reason:"playlist-unchanged"}),e.tech_.trigger("playliststuck")))})),this.masterPlaylistLoader_.on("renditiondisabled",(function(){e.tech_.trigger({type:"usage",name:"vhs-rendition-disabled"}),e.tech_.trigger({type:"usage",name:"hls-rendition-disabled"})})),this.masterPlaylistLoader_.on("renditionenabled",(function(){e.tech_.trigger({type:"usage",name:"vhs-rendition-enabled"}),e.tech_.trigger({type:"usage",name:"hls-rendition-enabled"})}))},i.handleUpdatedMediaPlaylist=function(e){this.useCueTags_&&this.updateAdCues_(e),this.mainSegmentLoader_.playlist(e,this.requestOptions_),this.updateDuration(!e.endList),this.tech_.paused()||(this.mainSegmentLoader_.load(),this.audioSegmentLoader_&&this.audioSegmentLoader_.load())},i.triggerPresenceUsage_=function(e,t){var i=e.mediaGroups||{},n=!0,r=Object.keys(i.AUDIO);for(var s in i.AUDIO)for(var a in i.AUDIO[s]){i.AUDIO[s][a].uri||(n=!1)}n&&(this.tech_.trigger({type:"usage",name:"vhs-demuxed"}),this.tech_.trigger({type:"usage",name:"hls-demuxed"})),Object.keys(i.SUBTITLES).length&&(this.tech_.trigger({type:"usage",name:"vhs-webvtt"}),this.tech_.trigger({type:"usage",name:"hls-webvtt"})),ro.Playlist.isAes(t)&&(this.tech_.trigger({type:"usage",name:"vhs-aes"}),this.tech_.trigger({type:"usage",name:"hls-aes"})),r.length&&Object.keys(i.AUDIO[r[0]]).length>1&&(this.tech_.trigger({type:"usage",name:"vhs-alternate-audio"}),this.tech_.trigger({type:"usage",name:"hls-alternate-audio"})),this.useCueTags_&&(this.tech_.trigger({type:"usage",name:"vhs-playlist-cue-tags"}),this.tech_.trigger({type:"usage",name:"hls-playlist-cue-tags"}))},i.shouldSwitchToMedia_=function(e){var t=this.masterPlaylistLoader_.media()||this.masterPlaylistLoader_.pendingMedia_,i=this.tech_.currentTime(),n=this.bufferLowWaterLine(),r=this.bufferHighWaterLine();return function(e){var t=e.currentPlaylist,i=e.buffered,n=e.currentTime,r=e.nextPlaylist,s=e.bufferLowWaterLine,a=e.bufferHighWaterLine,o=e.duration,l=e.experimentalBufferBasedABR,u=e.log;if(!r)return Vr.log.warn("We received no playlist to switch to. Please check your stream."),!1;var c="allowing switch "+(t&&t.id||"null")+" -> "+r.id;if(!t)return u(c+" as current playlist is not set"),!0;if(r.id===t.id)return!1;var d=Boolean(es(i,n).length);if(!t.endList)return d||"number"!=typeof t.partTargetDuration?(u(c+" as current playlist is live"),!0):(u("not "+c+" as current playlist is live llhls, but currentTime isn't in buffered."),!1);var h=ss(i,n),p=l?aa.EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE:aa.MAX_BUFFER_LOW_WATER_LINE;if(o<p)return u(c+" as duration < max low water line ("+o+" < "+p+")"),!0;var f=r.attributes.BANDWIDTH,m=t.attributes.BANDWIDTH;if(f<m&&(!l||h<a)){var g=c+" as next bandwidth < current bandwidth ("+f+" < "+m+")";return l&&(g+=" and forwardBuffer < bufferHighWaterLine ("+h+" < "+a+")"),u(g),!0}if((!l||f>m)&&h>=s){var v=c+" as forwardBuffer >= bufferLowWaterLine ("+h+" >= "+s+")";return l&&(v+=" and next bandwidth > current bandwidth ("+f+" > "+m+")"),u(v),!0}return u("not "+c+" as no switching criteria met"),!1}({buffered:this.tech_.buffered(),currentTime:i,currentPlaylist:t,nextPlaylist:e,bufferLowWaterLine:n,bufferHighWaterLine:r,duration:this.duration(),experimentalBufferBasedABR:this.experimentalBufferBasedABR,log:this.logger_})},i.setupSegmentLoaderListeners_=function(){var e=this;this.experimentalBufferBasedABR||(this.mainSegmentLoader_.on("bandwidthupdate",(function(){var t=e.selectPlaylist();e.shouldSwitchToMedia_(t)&&e.switchMedia_(t,"bandwidthupdate"),e.tech_.trigger("bandwidthupdate")})),this.mainSegmentLoader_.on("progress",(function(){e.trigger("progress")}))),this.mainSegmentLoader_.on("error",(function(){e.blacklistCurrentPlaylist(e.mainSegmentLoader_.error())})),this.mainSegmentLoader_.on("appenderror",(function(){e.error=e.mainSegmentLoader_.error_,e.trigger("error")})),this.mainSegmentLoader_.on("syncinfoupdate",(function(){e.onSyncInfoUpdate_()})),this.mainSegmentLoader_.on("timestampoffset",(function(){e.tech_.trigger({type:"usage",name:"vhs-timestamp-offset"}),e.tech_.trigger({type:"usage",name:"hls-timestamp-offset"})})),this.audioSegmentLoader_.on("syncinfoupdate",(function(){e.onSyncInfoUpdate_()})),this.audioSegmentLoader_.on("appenderror",(function(){e.error=e.audioSegmentLoader_.error_,e.trigger("error")})),this.mainSegmentLoader_.on("ended",(function(){e.logger_("main segment loader ended"),e.onEndOfStream()})),this.mainSegmentLoader_.on("earlyabort",(function(t){e.experimentalBufferBasedABR||(e.delegateLoaders_("all",["abort"]),e.blacklistCurrentPlaylist({message:"Aborted early because there isn't enough bandwidth to complete the request without rebuffering."},120))}));var t=function(){if(!e.sourceUpdater_.hasCreatedSourceBuffers())return e.tryToCreateSourceBuffers_();var t=e.getCodecsOrExclude_();t&&e.sourceUpdater_.addOrChangeSourceBuffers(t)};this.mainSegmentLoader_.on("trackinfo",t),this.audioSegmentLoader_.on("trackinfo",t),this.mainSegmentLoader_.on("fmp4",(function(){e.triggeredFmp4Usage||(e.tech_.trigger({type:"usage",name:"vhs-fmp4"}),e.tech_.trigger({type:"usage",name:"hls-fmp4"}),e.triggeredFmp4Usage=!0)})),this.audioSegmentLoader_.on("fmp4",(function(){e.triggeredFmp4Usage||(e.tech_.trigger({type:"usage",name:"vhs-fmp4"}),e.tech_.trigger({type:"usage",name:"hls-fmp4"}),e.triggeredFmp4Usage=!0)})),this.audioSegmentLoader_.on("ended",(function(){e.logger_("audioSegmentLoader ended"),e.onEndOfStream()}))},i.mediaSecondsLoaded_=function(){return Math.max(this.audioSegmentLoader_.mediaSecondsLoaded+this.mainSegmentLoader_.mediaSecondsLoaded)},i.load=function(){this.mainSegmentLoader_.load(),this.mediaTypes_.AUDIO.activePlaylistLoader&&this.audioSegmentLoader_.load(),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&this.subtitleSegmentLoader_.load()},i.smoothQualityChange_=function(e){void 0===e&&(e=this.selectPlaylist()),this.fastQualityChange_(e)},i.fastQualityChange_=function(e){var t=this;void 0===e&&(e=this.selectPlaylist()),e!==this.masterPlaylistLoader_.media()?(this.switchMedia_(e,"fast-quality"),this.mainSegmentLoader_.resetEverything((function(){Vr.browser.IE_VERSION||Vr.browser.IS_EDGE?t.tech_.setCurrentTime(t.tech_.currentTime()+.04):t.tech_.setCurrentTime(t.tech_.currentTime())}))):this.logger_("skipping fastQualityChange because new media is same as old")},i.play=function(){if(!this.setupFirstPlay()){this.tech_.ended()&&this.tech_.setCurrentTime(0),this.hasPlayed_&&this.load();var e=this.tech_.seekable();return this.tech_.duration()===1/0&&this.tech_.currentTime()<e.start(0)?this.tech_.setCurrentTime(e.end(e.length-1)):void 0}},i.setupFirstPlay=function(){var e=this,t=this.masterPlaylistLoader_.media();if(!t||this.tech_.paused()||this.hasPlayed_)return!1;if(!t.endList){var i=this.seekable();if(!i.length)return!1;if(Vr.browser.IE_VERSION&&0===this.tech_.readyState())return this.tech_.one("loadedmetadata",(function(){e.trigger("firstplay"),e.tech_.setCurrentTime(i.end(0)),e.hasPlayed_=!0})),!1;this.trigger("firstplay"),this.tech_.setCurrentTime(i.end(0))}return this.hasPlayed_=!0,this.load(),!0},i.handleSourceOpen_=function(){if(this.tryToCreateSourceBuffers_(),this.tech_.autoplay()){var e=this.tech_.play();void 0!==e&&"function"==typeof e.then&&e.then(null,(function(e){}))}this.trigger("sourceopen")},i.handleSourceEnded_=function(){if(this.inbandTextTracks_.metadataTrack_){var e=this.inbandTextTracks_.metadataTrack_.cues;if(e&&e.length){var t=this.duration();e[e.length-1].endTime=isNaN(t)||Math.abs(t)===1/0?Number.MAX_VALUE:t}}},i.handleDurationChange_=function(){this.tech_.trigger("durationchange")},i.onEndOfStream=function(){var e=this.mainSegmentLoader_.ended_;if(this.mediaTypes_.AUDIO.activePlaylistLoader){var t=this.mainSegmentLoader_.getCurrentMediaInfo_();e=!t||t.hasVideo?e&&this.audioSegmentLoader_.ended_:this.audioSegmentLoader_.ended_}e&&(this.stopABRTimer_(),this.sourceUpdater_.endOfStream())},i.stuckAtPlaylistEnd_=function(e){if(!this.seekable().length)return!1;var t=this.syncController_.getExpiredTime(e,this.duration());if(null===t)return!1;var i=ro.Playlist.playlistEnd(e,t),n=this.tech_.currentTime(),r=this.tech_.buffered();if(!r.length)return i-n<=Jr;var s=r.end(r.length-1);return s-n<=Jr&&i-s<=Jr},i.blacklistCurrentPlaylist=function(e,t){void 0===e&&(e={});var i=e.playlist||this.masterPlaylistLoader_.media();if(t=t||e.blacklistDuration||this.blacklistDuration,!i)return this.error=e,void("open"!==this.mediaSource.readyState?this.trigger("error"):this.sourceUpdater_.endOfStream("network"));i.playlistErrors_++;var n,r=this.masterPlaylistLoader_.master.playlists,s=r.filter(ys),a=1===s.length&&s[0]===i;if(1===r.length&&t!==1/0)return Vr.log.warn("Problem encountered with playlist "+i.id+". Trying again since it is the only playlist."),this.tech_.trigger("retryplaylist"),this.masterPlaylistLoader_.load(a);if(a){var o=!1;r.forEach((function(e){if(e!==i){var t=e.excludeUntil;void 0!==t&&t!==1/0&&(o=!0,delete e.excludeUntil)}})),o&&(Vr.log.warn("Removing other playlists from the exclusion list because the last rendition is about to be excluded."),this.tech_.trigger("retryplaylist"))}n=i.playlistErrors_>this.maxPlaylistRetries?1/0:Date.now()+1e3*t,i.excludeUntil=n,e.reason&&(i.lastExcludeReason_=e.reason),this.tech_.trigger("blacklistplaylist"),this.tech_.trigger({type:"usage",name:"vhs-rendition-blacklisted"}),this.tech_.trigger({type:"usage",name:"hls-rendition-blacklisted"});var l=this.selectPlaylist();if(!l)return this.error="Playback cannot continue. No available working or supported playlists.",void this.trigger("error");var u=e.internal?this.logger_:Vr.log.warn,c=e.message?" "+e.message:"";u((e.internal?"Internal problem":"Problem")+" encountered with playlist "+i.id+"."+c+" Switching to playlist "+l.id+"."),l.attributes.AUDIO!==i.attributes.AUDIO&&this.delegateLoaders_("audio",["abort","pause"]),l.attributes.SUBTITLES!==i.attributes.SUBTITLES&&this.delegateLoaders_("subtitle",["abort","pause"]),this.delegateLoaders_("main",["abort","pause"]);var d=l.targetDuration/2*1e3||5e3,h="number"==typeof l.lastRequest&&Date.now()-l.lastRequest<=d;return this.switchMedia_(l,"exclude",a||h)},i.pauseLoading=function(){this.delegateLoaders_("all",["abort","pause"]),this.stopABRTimer_()},i.delegateLoaders_=function(e,t){var i=this,n=[],r="all"===e;(r||"main"===e)&&n.push(this.masterPlaylistLoader_);var s=[];(r||"audio"===e)&&s.push("AUDIO"),(r||"subtitle"===e)&&(s.push("CLOSED-CAPTIONS"),s.push("SUBTITLES")),s.forEach((function(e){var t=i.mediaTypes_[e]&&i.mediaTypes_[e].activePlaylistLoader;t&&n.push(t)})),["main","audio","subtitle"].forEach((function(t){var r=i[t+"SegmentLoader_"];!r||e!==t&&"all"!==e||n.push(r)})),n.forEach((function(e){return t.forEach((function(t){"function"==typeof e[t]&&e[t]()}))}))},i.setCurrentTime=function(e){var t=es(this.tech_.buffered(),e);return this.masterPlaylistLoader_&&this.masterPlaylistLoader_.media()&&this.masterPlaylistLoader_.media().segments?t&&t.length?e:(this.mainSegmentLoader_.resetEverything(),this.mainSegmentLoader_.abort(),this.mediaTypes_.AUDIO.activePlaylistLoader&&(this.audioSegmentLoader_.resetEverything(),this.audioSegmentLoader_.abort()),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&(this.subtitleSegmentLoader_.resetEverything(),this.subtitleSegmentLoader_.abort()),void this.load()):0},i.duration=function(){if(!this.masterPlaylistLoader_)return 0;var e=this.masterPlaylistLoader_.media();return e?e.endList?this.mediaSource?this.mediaSource.duration:ro.Playlist.duration(e):1/0:0},i.seekable=function(){return this.seekable_},i.onSyncInfoUpdate_=function(){var e;if(this.masterPlaylistLoader_){var t=this.masterPlaylistLoader_.media();if(t){var i=this.syncController_.getExpiredTime(t,this.duration());if(null!==i){var n=this.masterPlaylistLoader_.master,r=ro.Playlist.seekable(t,i,ro.Playlist.liveEdgeDelay(n,t));if(0!==r.length){if(this.mediaTypes_.AUDIO.activePlaylistLoader){if(t=this.mediaTypes_.AUDIO.activePlaylistLoader.media(),null===(i=this.syncController_.getExpiredTime(t,this.duration())))return;if(0===(e=ro.Playlist.seekable(t,i,ro.Playlist.liveEdgeDelay(n,t))).length)return}var s,a;this.seekable_&&this.seekable_.length&&(s=this.seekable_.end(0),a=this.seekable_.start(0)),e?e.start(0)>r.end(0)||r.start(0)>e.end(0)?this.seekable_=r:this.seekable_=Vr.createTimeRanges([[e.start(0)>r.start(0)?e.start(0):r.start(0),e.end(0)<r.end(0)?e.end(0):r.end(0)]]):this.seekable_=r,this.seekable_&&this.seekable_.length&&this.seekable_.end(0)===s&&this.seekable_.start(0)===a||(this.logger_("seekable updated ["+is(this.seekable_)+"]"),this.tech_.trigger("seekablechanged"))}}}}},i.updateDuration=function(e){if(this.updateDuration_&&(this.mediaSource.removeEventListener("sourceopen",this.updateDuration_),this.updateDuration_=null),"open"!==this.mediaSource.readyState)return this.updateDuration_=this.updateDuration.bind(this,e),void this.mediaSource.addEventListener("sourceopen",this.updateDuration_);if(e){var t=this.seekable();if(!t.length)return;(isNaN(this.mediaSource.duration)||this.mediaSource.duration<t.end(t.length-1))&&this.sourceUpdater_.setDuration(t.end(t.length-1))}else{var i=this.tech_.buffered(),n=ro.Playlist.duration(this.masterPlaylistLoader_.media());i.length>0&&(n=Math.max(n,i.end(i.length-1))),this.mediaSource.duration!==n&&this.sourceUpdater_.setDuration(n)}},i.dispose=function(){var e=this;this.trigger("dispose"),this.decrypter_.terminate(),this.masterPlaylistLoader_.dispose(),this.mainSegmentLoader_.dispose(),this.loadOnPlay_&&this.tech_.off("play",this.loadOnPlay_),["AUDIO","SUBTITLES"].forEach((function(t){var i=e.mediaTypes_[t].groups;for(var n in i)i[n].forEach((function(e){e.playlistLoader&&e.playlistLoader.dispose()}))})),this.audioSegmentLoader_.dispose(),this.subtitleSegmentLoader_.dispose(),this.sourceUpdater_.dispose(),this.timelineChangeController_.dispose(),this.stopABRTimer_(),this.updateDuration_&&this.mediaSource.removeEventListener("sourceopen",this.updateDuration_),this.mediaSource.removeEventListener("durationchange",this.handleDurationChange_),this.mediaSource.removeEventListener("sourceopen",this.handleSourceOpen_),this.mediaSource.removeEventListener("sourceended",this.handleSourceEnded_),this.off()},i.master=function(){return this.masterPlaylistLoader_.master},i.media=function(){return this.masterPlaylistLoader_.media()||this.initialMedia_},i.areMediaTypesKnown_=function(){var e=!!this.mediaTypes_.AUDIO.activePlaylistLoader,t=!!this.mainSegmentLoader_.getCurrentMediaInfo_(),i=!e||!!this.audioSegmentLoader_.getCurrentMediaInfo_();return!(!t||!i)},i.getCodecsOrExclude_=function(){var e=this,t={main:this.mainSegmentLoader_.getCurrentMediaInfo_()||{},audio:this.audioSegmentLoader_.getCurrentMediaInfo_()||{}};t.video=t.main;var i=ja(this.master(),this.media()),n={},r=!!this.mediaTypes_.AUDIO.activePlaylistLoader;if(t.main.hasVideo&&(n.video=i.video||t.main.videoCodec||S.DEFAULT_VIDEO_CODEC),t.main.isMuxed&&(n.video+=","+(i.audio||t.main.audioCodec||S.DEFAULT_AUDIO_CODEC)),(t.main.hasAudio&&!t.main.isMuxed||t.audio.hasAudio||r)&&(n.audio=i.audio||t.main.audioCodec||t.audio.audioCodec||S.DEFAULT_AUDIO_CODEC,t.audio.isFmp4=t.main.hasAudio&&!t.main.isMuxed?t.main.isFmp4:t.audio.isFmp4),n.audio||n.video){var s,a={};if(["video","audio"].forEach((function(e){if(n.hasOwnProperty(e)&&(r=t[e].isFmp4,o=n[e],!(r?(0,S.browserSupportsCodec)(o):(0,S.muxerSupportsCodec)(o)))){var i=t[e].isFmp4?"browser":"muxer";a[i]=a[i]||[],a[i].push(n[e]),"audio"===e&&(s=i)}var r,o})),r&&s&&this.media().attributes.AUDIO){var o=this.media().attributes.AUDIO;this.master().playlists.forEach((function(t){(t.attributes&&t.attributes.AUDIO)===o&&t!==e.media()&&(t.excludeUntil=1/0)})),this.logger_("excluding audio group "+o+" as "+s+' does not support codec(s): "'+n.audio+'"')}if(!Object.keys(a).length){if(this.sourceUpdater_.hasCreatedSourceBuffers()&&!this.sourceUpdater_.canChangeType()){var l=[];if(["video","audio"].forEach((function(t){var i=((0,S.parseCodecs)(e.sourceUpdater_.codecs[t]||"")[0]||{}).type,r=((0,S.parseCodecs)(n[t]||"")[0]||{}).type;i&&r&&i.toLowerCase()!==r.toLowerCase()&&l.push('"'+e.sourceUpdater_.codecs[t]+'" -> "'+n[t]+'"')})),l.length)return void this.blacklistCurrentPlaylist({playlist:this.media(),message:"Codec switching not supported: "+l.join(", ")+".",blacklistDuration:1/0,internal:!0})}return n}var u=Object.keys(a).reduce((function(e,t){return e&&(e+=", "),e+=t+' does not support codec(s): "'+a[t].join(",")+'"'}),"")+".";this.blacklistCurrentPlaylist({playlist:this.media(),internal:!0,message:u,blacklistDuration:1/0})}else this.blacklistCurrentPlaylist({playlist:this.media(),message:"Could not determine codecs for playlist.",blacklistDuration:1/0})},i.tryToCreateSourceBuffers_=function(){if("open"===this.mediaSource.readyState&&!this.sourceUpdater_.hasCreatedSourceBuffers()&&this.areMediaTypesKnown_()){var e=this.getCodecsOrExclude_();if(e){this.sourceUpdater_.createSourceBuffers(e);var t=[e.video,e.audio].filter(Boolean).join(",");this.excludeIncompatibleVariants_(t)}}},i.excludeUnsupportedVariants_=function(){var e=this,t=this.master().playlists,i=[];Object.keys(t).forEach((function(n){var r=t[n];if(-1===i.indexOf(r.id)){i.push(r.id);var s=ja(e.master,r),a=[];!s.audio||(0,S.muxerSupportsCodec)(s.audio)||(0,S.browserSupportsCodec)(s.audio)||a.push("audio codec "+s.audio),!s.video||(0,S.muxerSupportsCodec)(s.video)||(0,S.browserSupportsCodec)(s.video)||a.push("video codec "+s.video),s.text&&"stpp.ttml.im1t"===s.text&&a.push("text codec "+s.text),a.length&&(r.excludeUntil=1/0,e.logger_("excluding "+r.id+" for unsupported: "+a.join(", ")))}}))},i.excludeIncompatibleVariants_=function(e){var t=this,i=[],n=this.master().playlists,r=Ua((0,S.parseCodecs)(e)),s=Ba(r),a=r.video&&(0,S.parseCodecs)(r.video)[0]||null,o=r.audio&&(0,S.parseCodecs)(r.audio)[0]||null;Object.keys(n).forEach((function(e){var r=n[e];if(-1===i.indexOf(r.id)&&r.excludeUntil!==1/0){i.push(r.id);var l=[],u=ja(t.masterPlaylistLoader_.master,r),c=Ba(u);if(u.audio||u.video){if(c!==s&&l.push('codec count "'+c+'" !== "'+s+'"'),!t.sourceUpdater_.canChangeType()){var d=u.video&&(0,S.parseCodecs)(u.video)[0]||null,h=u.audio&&(0,S.parseCodecs)(u.audio)[0]||null;d&&a&&d.type.toLowerCase()!==a.type.toLowerCase()&&l.push('video codec "'+d.type+'" !== "'+a.type+'"'),h&&o&&h.type.toLowerCase()!==o.type.toLowerCase()&&l.push('audio codec "'+h.type+'" !== "'+o.type+'"')}l.length&&(r.excludeUntil=1/0,t.logger_("blacklisting "+r.id+": "+l.join(" && ")))}}}))},i.updateAdCues_=function(e){var t=0,i=this.seekable();i.length&&(t=i.start(0)),function(e,t,i){if(void 0===i&&(i=0),e.segments)for(var n,r=i,a=0;a<e.segments.length;a++){var o=e.segments[a];if(n||(n=Ao(t,r+o.duration/2)),n){if("cueIn" in o){n.endTime=r,n.adEndTime=r,r+=o.duration,n=null;continue}if(r<n.endTime){r+=o.duration;continue}n.endTime+=o.duration}else if("cueOut" in o&&((n=new(s().VTTCue)(r,r+o.duration,o.cueOut)).adStartTime=r,n.adEndTime=r+parseFloat(o.cueOut),t.addCue(n)),"cueOutCont" in o){var l=o.cueOutCont.split("/").map(parseFloat),u=l[0],c=l[1];(n=new(s().VTTCue)(r,r+o.duration,"")).adStartTime=r-u,n.adEndTime=n.adStartTime+c,t.addCue(n)}r+=o.duration}}(e,this.cueTagsTrack_,t)},i.goalBufferLength=function(){var e=this.tech_.currentTime(),t=aa.GOAL_BUFFER_LENGTH,i=aa.GOAL_BUFFER_LENGTH_RATE,n=Math.max(t,aa.MAX_GOAL_BUFFER_LENGTH);return Math.min(t+e*i,n)},i.bufferLowWaterLine=function(){var e=this.tech_.currentTime(),t=aa.BUFFER_LOW_WATER_LINE,i=aa.BUFFER_LOW_WATER_LINE_RATE,n=Math.max(t,aa.MAX_BUFFER_LOW_WATER_LINE),r=Math.max(t,aa.EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE);return Math.min(t+e*i,this.experimentalBufferBasedABR?r:n)},i.bufferHighWaterLine=function(){return aa.BUFFER_HIGH_WATER_LINE},t}(Vr.EventTarget),$o=function(e,t,i){var n,r,s,a=e.masterPlaylistController_,o=a[(e.options_.smoothQualityChange?"smooth":"fast")+"QualityChange_"].bind(a);if(t.attributes){var l=t.attributes.RESOLUTION;this.width=l&&l.width,this.height=l&&l.height,this.bandwidth=t.attributes.BANDWIDTH}this.codecs=ja(a.master(),t),this.playlist=t,this.id=i,this.enabled=(n=e.playlists,r=t.id,s=o,function(e){var t=n.master.playlists[r],i=vs(t),a=ys(t);return void 0===e?a:(e?delete t.disabled:t.disabled=!0,e===a||i||(s(),e?n.trigger("renditionenabled"):n.trigger("renditiondisabled")),e)})},Xo=["seeking","seeked","pause","playing","error"],Go=function(){function e(e){var t=this;this.masterPlaylistController_=e.masterPlaylistController,this.tech_=e.tech,this.seekable=e.seekable,this.allowSeeksWithinUnsafeLiveWindow=e.allowSeeksWithinUnsafeLiveWindow,this.liveRangeSafeTimeDelta=e.liveRangeSafeTimeDelta,this.media=e.media,this.consecutiveUpdates=0,this.lastRecordedTime=null,this.timer_=null,this.checkCurrentTimeTimeout_=null,this.logger_=Kr("PlaybackWatcher"),this.logger_("initialize");var i=function(){return t.monitorCurrentTime_()},n=function(){return t.monitorCurrentTime_()},r=function(){return t.techWaiting_()},a=function(){return t.cancelTimer_()},o=this.masterPlaylistController_,l=["main","subtitle","audio"],u={};l.forEach((function(e){u[e]={reset:function(){return t.resetSegmentDownloads_(e)},updateend:function(){return t.checkSegmentDownloads_(e)}},o[e+"SegmentLoader_"].on("appendsdone",u[e].updateend),o[e+"SegmentLoader_"].on("playlistupdate",u[e].reset),t.tech_.on(["seeked","seeking"],u[e].reset)}));var c=function(e){["main","audio"].forEach((function(i){o[i+"SegmentLoader_"][e]("appended",t.seekingAppendCheck_)}))};this.seekingAppendCheck_=function(){t.fixesBadSeeks_()&&(t.consecutiveUpdates=0,t.lastRecordedTime=t.tech_.currentTime(),c("off"))},this.clearSeekingAppendCheck_=function(){return c("off")},this.watchForBadSeeking_=function(){t.clearSeekingAppendCheck_(),c("on")},this.tech_.on("seeked",this.clearSeekingAppendCheck_),this.tech_.on("seeking",this.watchForBadSeeking_),this.tech_.on("waiting",r),this.tech_.on(Xo,a),this.tech_.on("canplay",n),this.tech_.one("play",i),this.dispose=function(){t.clearSeekingAppendCheck_(),t.logger_("dispose"),t.tech_.off("waiting",r),t.tech_.off(Xo,a),t.tech_.off("canplay",n),t.tech_.off("play",i),t.tech_.off("seeking",t.watchForBadSeeking_),t.tech_.off("seeked",t.clearSeekingAppendCheck_),l.forEach((function(e){o[e+"SegmentLoader_"].off("appendsdone",u[e].updateend),o[e+"SegmentLoader_"].off("playlistupdate",u[e].reset),t.tech_.off(["seeked","seeking"],u[e].reset)})),t.checkCurrentTimeTimeout_&&s().clearTimeout(t.checkCurrentTimeTimeout_),t.cancelTimer_()}}var t=e.prototype;return t.monitorCurrentTime_=function(){this.checkCurrentTime_(),this.checkCurrentTimeTimeout_&&s().clearTimeout(this.checkCurrentTimeTimeout_),this.checkCurrentTimeTimeout_=s().setTimeout(this.monitorCurrentTime_.bind(this),250)},t.resetSegmentDownloads_=function(e){var t=this.masterPlaylistController_[e+"SegmentLoader_"];this[e+"StalledDownloads_"]>0&&this.logger_("resetting possible stalled download count for "+e+" loader"),this[e+"StalledDownloads_"]=0,this[e+"Buffered_"]=t.buffered_()},t.checkSegmentDownloads_=function(e){var t=this.masterPlaylistController_,i=t[e+"SegmentLoader_"],n=i.buffered_(),r=function(e,t){if(e===t)return!1;if(!e&&t||!t&&e)return!0;if(e.length!==t.length)return!0;for(var i=0;i<e.length;i++)if(e.start(i)!==t.start(i)||e.end(i)!==t.end(i))return!0;return!1}(this[e+"Buffered_"],n);this[e+"Buffered_"]=n,r?this.resetSegmentDownloads_(e):(this[e+"StalledDownloads_"]++,this.logger_("found #"+this[e+"StalledDownloads_"]+" "+e+" appends that did not increase buffer (possible stalled download)",{playlistId:i.playlist_&&i.playlist_.id,buffered:ns(n)}),this[e+"StalledDownloads_"]<10||(this.logger_(e+" loader stalled download exclusion"),this.resetSegmentDownloads_(e),this.tech_.trigger({type:"usage",name:"vhs-"+e+"-download-exclusion"}),"subtitle"!==e&&t.blacklistCurrentPlaylist({message:"Excessive "+e+" segment downloading detected."},1/0)))},t.checkCurrentTime_=function(){if(!this.tech_.paused()&&!this.tech_.seeking()){var e=this.tech_.currentTime(),t=this.tech_.buffered();if(this.lastRecordedTime===e&&(!t.length||e+Jr>=t.end(t.length-1)))return this.techWaiting_();this.consecutiveUpdates>=5&&e===this.lastRecordedTime?(this.consecutiveUpdates++,this.waiting_()):e===this.lastRecordedTime?this.consecutiveUpdates++:(this.consecutiveUpdates=0,this.lastRecordedTime=e)}},t.cancelTimer_=function(){this.consecutiveUpdates=0,this.timer_&&(this.logger_("cancelTimer_"),clearTimeout(this.timer_)),this.timer_=null},t.fixesBadSeeks_=function(){if(!this.tech_.seeking())return!1;var e,t=this.seekable(),i=this.tech_.currentTime();this.afterSeekableWindow_(t,i,this.media(),this.allowSeeksWithinUnsafeLiveWindow)&&(e=t.end(t.length-1));if(this.beforeSeekableWindow_(t,i)){var n=t.start(0);e=n+(n===t.end(0)?0:Jr)}if(void 0!==e)return this.logger_("Trying to seek outside of seekable at time "+i+" with seekable range "+is(t)+". Seeking to "+e+"."),this.tech_.setCurrentTime(e),!0;for(var r=this.masterPlaylistController_.sourceUpdater_,s=this.tech_.buffered(),a=r.audioBuffer?r.audioBuffered():null,o=r.videoBuffer?r.videoBuffered():null,l=this.media(),u=l.partTargetDuration?l.partTargetDuration:2*(l.targetDuration-Qr),c=[a,o],d=0;d<c.length;d++){if(c[d])if(ss(c[d],i)<u)return!1}var h=ts(s,i);return 0!==h.length&&(e=h.start(0)+Jr,this.logger_("Buffered region starts ("+h.start(0)+")  just beyond seek point ("+i+"). Seeking to "+e+"."),this.tech_.setCurrentTime(e),!0)},t.waiting_=function(){if(!this.techWaiting_()){var e=this.tech_.currentTime(),t=this.tech_.buffered(),i=es(t,e);return i.length&&e+3<=i.end(0)?(this.cancelTimer_(),this.tech_.setCurrentTime(e),this.logger_("Stopped at "+e+" while inside a buffered region ["+i.start(0)+" -> "+i.end(0)+"]. Attempting to resume playback by seeking to the current time."),this.tech_.trigger({type:"usage",name:"vhs-unknown-waiting"}),void this.tech_.trigger({type:"usage",name:"hls-unknown-waiting"})):void 0}},t.techWaiting_=function(){var e=this.seekable(),t=this.tech_.currentTime();if(this.tech_.seeking()||null!==this.timer_)return!0;if(this.beforeSeekableWindow_(e,t)){var i=e.end(e.length-1);return this.logger_("Fell out of live window at time "+t+". Seeking to live point (seekable end) "+i),this.cancelTimer_(),this.tech_.setCurrentTime(i),this.tech_.trigger({type:"usage",name:"vhs-live-resync"}),this.tech_.trigger({type:"usage",name:"hls-live-resync"}),!0}var n=this.tech_.vhs.masterPlaylistController_.sourceUpdater_,r=this.tech_.buffered();if(this.videoUnderflow_({audioBuffered:n.audioBuffered(),videoBuffered:n.videoBuffered(),currentTime:t}))return this.cancelTimer_(),this.tech_.setCurrentTime(t),this.tech_.trigger({type:"usage",name:"vhs-video-underflow"}),this.tech_.trigger({type:"usage",name:"hls-video-underflow"}),!0;var s=ts(r,t);if(s.length>0){var a=s.start(0)-t;return this.logger_("Stopped at "+t+", setting timer for "+a+", seeking to "+s.start(0)),this.cancelTimer_(),this.timer_=setTimeout(this.skipTheGap_.bind(this),1e3*a,t),!0}return!1},t.afterSeekableWindow_=function(e,t,i,n){if(void 0===n&&(n=!1),!e.length)return!1;var r=e.end(e.length-1)+Jr;return!i.endList&&n&&(r=e.end(e.length-1)+3*i.targetDuration),t>r},t.beforeSeekableWindow_=function(e,t){return!!(e.length&&e.start(0)>0&&t<e.start(0)-this.liveRangeSafeTimeDelta)},t.videoUnderflow_=function(e){var t=e.videoBuffered,i=e.audioBuffered,n=e.currentTime;if(t){var r;if(t.length&&i.length){var s=es(t,n-3),a=es(t,n),o=es(i,n);o.length&&!a.length&&s.length&&(r={start:s.end(0),end:o.end(0)})}else{ts(t,n).length||(r=this.gapFromVideoUnderflow_(t,n))}return!!r&&(this.logger_("Encountered a gap in video from "+r.start+" to "+r.end+". Seeking to current time "+n),!0)}},t.skipTheGap_=function(e){var t=this.tech_.buffered(),i=this.tech_.currentTime(),n=ts(t,i);this.cancelTimer_(),0!==n.length&&i===e&&(this.logger_("skipTheGap_:","currentTime:",i,"scheduled currentTime:",e,"nextRange start:",n.start(0)),this.tech_.setCurrentTime(n.start(0)+Qr),this.tech_.trigger({type:"usage",name:"vhs-gap-skip"}),this.tech_.trigger({type:"usage",name:"hls-gap-skip"}))},t.gapFromVideoUnderflow_=function(e,t){for(var i=function(e){if(e.length<2)return Vr.createTimeRanges();for(var t=[],i=1;i<e.length;i++){var n=e.end(i-1),r=e.start(i);t.push([n,r])}return Vr.createTimeRanges(t)}(e),n=0;n<i.length;n++){var r=i.start(n),s=i.end(n);if(t-r<4&&t-r>2)return{start:r,end:s}}return null},e}(),Yo={errorInterval:30,getSource:function(e){return e(this.tech({IWillNotUseThisInPlugins:!0}).currentSource_||this.currentSource())}},Ko=function e(t,i){var n=0,r=0,s=Vr.mergeOptions(Yo,i);t.ready((function(){t.trigger({type:"usage",name:"vhs-error-reload-initialized"}),t.trigger({type:"usage",name:"hls-error-reload-initialized"})}));var a=function(){r&&t.currentTime(r)},o=function(e){null!=e&&(r=t.duration()!==1/0&&t.currentTime()||0,t.one("loadedmetadata",a),t.src(e),t.trigger({type:"usage",name:"vhs-error-reload"}),t.trigger({type:"usage",name:"hls-error-reload"}),t.play())},l=function(){return Date.now()-n<1e3*s.errorInterval?(t.trigger({type:"usage",name:"vhs-error-reload-canceled"}),void t.trigger({type:"usage",name:"hls-error-reload-canceled"})):s.getSource&&"function"==typeof s.getSource?(n=Date.now(),s.getSource.call(t,o)):void Vr.log.error("ERROR: reloadSourceOnError - The option getSource must be a function!")},u=function e(){t.off("loadedmetadata",a),t.off("error",l),t.off("dispose",e)};t.on("error",l),t.on("dispose",u),t.reloadSourceOnError=function(i){u(),e(t,i)}},Qo="2.13.1",Jo={PlaylistLoader:Bs,Playlist:ks,utils:Qs,STANDARD_PLAYLIST_SELECTOR:$a,INITIAL_PLAYLIST_SELECTOR:function(){var e=this,t=this.playlists.master.playlists.filter(ks.isEnabled);return za(t,(function(e,t){return Wa(e,t)})),t.filter((function(t){return!!ja(e.playlists.master,t).video}))[0]||null},lastBandwidthSelector:$a,movingAverageBandwidthSelector:function(e){var t=-1,i=-1;if(e<0||e>1)throw new Error("Moving average bandwidth decay must be between 0 and 1.");return function(){var n=this.useDevicePixelRatio&&s().devicePixelRatio||1;return t<0&&(t=this.systemBandwidth,i=this.systemBandwidth),this.systemBandwidth>0&&this.systemBandwidth!==i&&(t=e*this.systemBandwidth+(1-e)*t,i=this.systemBandwidth),Va(this.playlists.master,t,parseInt(qa(this.tech_.el(),"width"),10)*n,parseInt(qa(this.tech_.el(),"height"),10)*n,this.limitRenditionByPlayerDimensions,this.masterPlaylistController_)}},comparePlaylistBandwidth:Wa,comparePlaylistResolution:function(e,t){var i,n;return e.attributes.RESOLUTION&&e.attributes.RESOLUTION.width&&(i=e.attributes.RESOLUTION.width),i=i||s().Number.MAX_VALUE,t.attributes.RESOLUTION&&t.attributes.RESOLUTION.width&&(n=t.attributes.RESOLUTION.width),i===(n=n||s().Number.MAX_VALUE)&&e.attributes.BANDWIDTH&&t.attributes.BANDWIDTH?e.attributes.BANDWIDTH-t.attributes.BANDWIDTH:i-n},xhr:qs()};Object.keys(aa).forEach((function(e){Object.defineProperty(Jo,e,{get:function(){return Vr.log.warn("using Vhs."+e+" is UNSAFE be sure you know what you are doing"),aa[e]},set:function(t){Vr.log.warn("using Vhs."+e+" is UNSAFE be sure you know what you are doing"),"number"!=typeof t||t<0?Vr.log.warn("value of Vhs."+e+" must be greater than or equal to 0"):aa[e]=t}})}));var Zo="videojs-vhs",el=function(e,t){for(var i=t.media(),n=-1,r=0;r<e.length;r++)if(e[r].id===i.id){n=r;break}e.selectedIndex_=n,e.trigger({selectedIndex:n,type:"change"})};Jo.canPlaySource=function(){return Vr.log.warn("HLS is no longer a tech. Please remove it from your player's techOrder.")};var tl=function(e){var t=e.player,i=e.sourceKeySystems,n=e.audioMedia,r=e.mainPlaylists;if(!t.eme.initializeMediaKeys)return Promise.resolve();var s=function(e,t){return e.reduce((function(e,i){if(!i.contentProtection)return e;var n=t.reduce((function(e,t){var n=i.contentProtection[t];return n&&n.pssh&&(e[t]={pssh:n.pssh}),e}),{});return Object.keys(n).length&&e.push(n),e}),[])}(n?r.concat([n]):r,Object.keys(i)),a=[],o=[];return s.forEach((function(e){o.push(new Promise((function(e,i){t.tech_.one("keysessioncreated",e)}))),a.push(new Promise((function(i,n){t.eme.initializeMediaKeys({keySystems:e},(function(e){e?n(e):i()}))})))})),Promise.race([Promise.all(a),Promise.race(o)])},il=function(e){var t=e.player,i=function(e,t,i){if(!e)return e;var n={};t&&t.attributes&&t.attributes.CODECS&&(n=Ua((0,S.parseCodecs)(t.attributes.CODECS))),i&&i.attributes&&i.attributes.CODECS&&(n.audio=i.attributes.CODECS);var r=(0,S.getMimeForCodec)(n.video),s=(0,S.getMimeForCodec)(n.audio),a={};for(var o in e)a[o]={},s&&(a[o].audioContentType=s),r&&(a[o].videoContentType=r),t.contentProtection&&t.contentProtection[o]&&t.contentProtection[o].pssh&&(a[o].pssh=t.contentProtection[o].pssh),"string"==typeof e[o]&&(a[o].url=e[o]);return Vr.mergeOptions(e,a)}(e.sourceKeySystems,e.media,e.audioMedia);return!!i&&(t.currentSource().keySystems=i,!(i&&!t.eme)||(Vr.log.warn("DRM encrypted source cannot be decrypted without a DRM plugin"),!1))},nl=function(){if(!s().localStorage)return null;var e=s().localStorage.getItem(Zo);if(!e)return null;try{return JSON.parse(e)}catch(e){return null}};Jo.supportsNativeHls=function(){if(!o()||!o().createElement)return!1;var e=o().createElement("video");if(!Vr.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))}))}(),Jo.supportsNativeDash=!!(o()&&o().createElement&&Vr.getTech("Html5").isSupported())&&/maybe|probably/i.test(o().createElement("video").canPlayType("application/dash+xml")),Jo.supportsTypeNatively=function(e){return"hls"===e?Jo.supportsNativeHls:"dash"===e&&Jo.supportsNativeDash},Jo.isSupported=function(){return Vr.log.warn("HLS is no longer a tech. Please remove it from your player's techOrder.")};var rl=function(e){function t(t,i,n){var r;if(r=e.call(this,i,Vr.mergeOptions(n.hls,n.vhs))||this,n.hls&&Object.keys(n.hls).length&&Vr.log.warn("Using hls options is deprecated. Use vhs instead."),"number"==typeof n.initialBandwidth&&(r.options_.bandwidth=n.initialBandwidth),r.logger_=Kr("VhsHandler"),i.options_&&i.options_.playerId){var s=Vr(i.options_.playerId);s.hasOwnProperty("hls")||Object.defineProperty(s,"hls",{get:function(){return Vr.log.warn("player.hls is deprecated. Use player.tech().vhs instead."),i.trigger({type:"usage",name:"hls-player-access"}),(0,d.default)(r)},configurable:!0}),s.hasOwnProperty("vhs")||Object.defineProperty(s,"vhs",{get:function(){return Vr.log.warn("player.vhs is deprecated. Use player.tech().vhs instead."),i.trigger({type:"usage",name:"vhs-player-access"}),(0,d.default)(r)},configurable:!0}),s.hasOwnProperty("dash")||Object.defineProperty(s,"dash",{get:function(){return Vr.log.warn("player.dash is deprecated. Use player.tech().vhs instead."),(0,d.default)(r)},configurable:!0}),r.player_=s}if(r.tech_=i,r.source_=t,r.stats={},r.ignoreNextSeekingEvent_=!1,r.setOptions_(),r.options_.overrideNative&&i.overrideNativeAudioTracks&&i.overrideNativeVideoTracks)i.overrideNativeAudioTracks(!0),i.overrideNativeVideoTracks(!0);else if(r.options_.overrideNative&&(i.featuresNativeVideoTracks||i.featuresNativeAudioTracks))throw new Error("Overriding native HLS requires emulated tracks. See https://git.io/vMpjB");return r.on(o(),["fullscreenchange","webkitfullscreenchange","mozfullscreenchange","MSFullscreenChange"],(function(e){var t=o().fullscreenElement||o().webkitFullscreenElement||o().mozFullScreenElement||o().msFullscreenElement;t&&t.contains(r.tech_.el())?r.masterPlaylistController_.fastQualityChange_():r.masterPlaylistController_.checkABR_()})),r.on(r.tech_,"seeking",(function(){this.ignoreNextSeekingEvent_?this.ignoreNextSeekingEvent_=!1:this.setCurrentTime(this.tech_.currentTime())})),r.on(r.tech_,"error",(function(){this.tech_.error()&&this.masterPlaylistController_&&this.masterPlaylistController_.pauseLoading()})),r.on(r.tech_,"play",r.play),r}(0,h.default)(t,e);var i=t.prototype;return i.setOptions_=function(){var e=this;if(this.options_.withCredentials=this.options_.withCredentials||!1,this.options_.handleManifestRedirects=!1!==this.options_.handleManifestRedirects,this.options_.limitRenditionByPlayerDimensions=!1!==this.options_.limitRenditionByPlayerDimensions,this.options_.useDevicePixelRatio=this.options_.useDevicePixelRatio||!1,this.options_.smoothQualityChange=this.options_.smoothQualityChange||!1,this.options_.useBandwidthFromLocalStorage=void 0!==this.source_.useBandwidthFromLocalStorage?this.source_.useBandwidthFromLocalStorage:this.options_.useBandwidthFromLocalStorage||!1,this.options_.useNetworkInformationApi=this.options_.useNetworkInformationApi||!1,this.options_.customTagParsers=this.options_.customTagParsers||[],this.options_.customTagMappers=this.options_.customTagMappers||[],this.options_.cacheEncryptionKeys=this.options_.cacheEncryptionKeys||!1,"number"!=typeof this.options_.blacklistDuration&&(this.options_.blacklistDuration=300),"number"!=typeof this.options_.bandwidth&&this.options_.useBandwidthFromLocalStorage){var t=nl();t&&t.bandwidth&&(this.options_.bandwidth=t.bandwidth,this.tech_.trigger({type:"usage",name:"vhs-bandwidth-from-local-storage"}),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:"vhs-throughput-from-local-storage"}),this.tech_.trigger({type:"usage",name:"hls-throughput-from-local-storage"}))}"number"!=typeof this.options_.bandwidth&&(this.options_.bandwidth=aa.INITIAL_BANDWIDTH),this.options_.enableLowInitialPlaylist=this.options_.enableLowInitialPlaylist&&this.options_.bandwidth===aa.INITIAL_BANDWIDTH,["withCredentials","useDevicePixelRatio","limitRenditionByPlayerDimensions","bandwidth","smoothQualityChange","customTagParsers","customTagMappers","handleManifestRedirects","cacheEncryptionKeys","playlistSelector","initialPlaylistSelector","experimentalBufferBasedABR","liveRangeSafeTimeDelta","experimentalLLHLS","useNetworkInformationApi","experimentalExactManifestTimings","experimentalLeastPixelDiffSelector"].forEach((function(t){void 0!==e.source_[t]&&(e.options_[t]=e.source_[t])})),this.limitRenditionByPlayerDimensions=this.options_.limitRenditionByPlayerDimensions,this.useDevicePixelRatio=this.options_.useDevicePixelRatio},i.src=function(e,t){var i=this;if(e){var n;this.setOptions_(),this.options_.src=0===(n=this.source_.src).toLowerCase().indexOf("data:application/vnd.videojs.vhs+json,")?JSON.parse(n.substring(n.indexOf(",")+1)):n,this.options_.tech=this.tech_,this.options_.externVhs=Jo,this.options_.sourceType=(0,k.simpleTypeFromSourceType)(t),this.options_.seekTo=function(e){i.tech_.setCurrentTime(e)},this.options_.smoothQualityChange&&Vr.log.warn("smoothQualityChange is deprecated and will be removed in the next major version"),this.masterPlaylistController_=new Vo(this.options_);var r=Vr.mergeOptions({liveRangeSafeTimeDelta:Jr},this.options_,{seekable:function(){return i.seekable()},media:function(){return i.masterPlaylistController_.media()},masterPlaylistController:this.masterPlaylistController_});this.playbackWatcher_=new Go(r),this.masterPlaylistController_.on("error",(function(){var e=Vr.players[i.tech_.options_.playerId],t=i.masterPlaylistController_.error;"object"!=typeof t||t.code?"string"==typeof t&&(t={message:t,code:3}):t.code=3,e.error(t)}));var a=this.options_.experimentalBufferBasedABR?Jo.movingAverageBandwidthSelector(.55):Jo.STANDARD_PLAYLIST_SELECTOR;this.masterPlaylistController_.selectPlaylist=this.selectPlaylist?this.selectPlaylist.bind(this):a.bind(this),this.masterPlaylistController_.selectInitialPlaylist=Jo.INITIAL_PLAYLIST_SELECTOR.bind(this),this.playlists=this.masterPlaylistController_.masterPlaylistLoader_,this.mediaSource=this.masterPlaylistController_.mediaSource,Object.defineProperties(this,{selectPlaylist:{get:function(){return this.masterPlaylistController_.selectPlaylist},set:function(e){this.masterPlaylistController_.selectPlaylist=e.bind(this)}},throughput:{get:function(){return this.masterPlaylistController_.mainSegmentLoader_.throughput.rate},set:function(e){this.masterPlaylistController_.mainSegmentLoader_.throughput.rate=e,this.masterPlaylistController_.mainSegmentLoader_.throughput.count=1}},bandwidth:{get:function(){var e=this.masterPlaylistController_.mainSegmentLoader_.bandwidth,t=s().navigator.connection||s().navigator.mozConnection||s().navigator.webkitConnection,i=1e7;if(this.options_.useNetworkInformationApi&&t){var n=1e3*t.downlink*1e3;e=n>=i&&e>=i?Math.max(e,n):n}return e},set:function(e){this.masterPlaylistController_.mainSegmentLoader_.bandwidth=e,this.masterPlaylistController_.mainSegmentLoader_.throughput={rate:0,count:0}}},systemBandwidth:{get:function(){var e,t=1/(this.bandwidth||1);return e=this.throughput>0?1/this.throughput:0,Math.floor(1/(t+e))},set:function(){Vr.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},mediaAppends:{get:function(){return i.masterPlaylistController_.mediaAppends_()||0},enumerable:!0},mainAppendsToLoadedData:{get:function(){return i.masterPlaylistController_.mainAppendsToLoadedData_()||0},enumerable:!0},audioAppendsToLoadedData:{get:function(){return i.masterPlaylistController_.audioAppendsToLoadedData_()||0},enumerable:!0},appendsToLoadedData:{get:function(){return i.masterPlaylistController_.appendsToLoadedData_()||0},enumerable:!0},timeToLoadedData:{get:function(){return i.masterPlaylistController_.timeToLoadedData_()||0},enumerable:!0},buffered:{get:function(){return ns(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 ns(i.tech_.seekable())},enumerable:!0},timestamp:{get:function(){return Date.now()},enumerable:!0},videoPlaybackQuality:{get:function(){return i.tech_.getVideoPlaybackQuality()},enumerable:!0}}),this.tech_.one("canplay",this.masterPlaylistController_.setupFirstPlay.bind(this.masterPlaylistController_)),this.tech_.on("bandwidthupdate",(function(){i.options_.useBandwidthFromLocalStorage&&function(e){if(!s().localStorage)return!1;var t=nl();t=t?Vr.mergeOptions(t,e):e;try{s().localStorage.setItem(Zo,JSON.stringify(t))}catch(e){return!1}}({bandwidth:i.bandwidth,throughput:Math.round(i.throughput)})})),this.masterPlaylistController_.on("selectedinitialmedia",(function(){var e;(e=i).representations=function(){var t=e.masterPlaylistController_.master(),i=Ss(t)?e.masterPlaylistController_.getAudioTrackPlaylists_():t.playlists;return i?i.filter((function(e){return!vs(e)})).map((function(t,i){return new $o(e,t,t.id)})):[]}})),this.masterPlaylistController_.sourceUpdater_.on("createdsourcebuffers",(function(){i.setupEme_()})),this.on(this.masterPlaylistController_,"progress",(function(){this.tech_.trigger("progress")})),this.on(this.masterPlaylistController_,"firstplay",(function(){this.ignoreNextSeekingEvent_=!0})),this.setupQualityLevels_(),this.tech_.el()&&(this.mediaSourceUrl_=s().URL.createObjectURL(this.masterPlaylistController_.mediaSource),this.tech_.src(this.mediaSourceUrl_))}},i.createKeySessions_=function(){var e=this,t=this.masterPlaylistController_.mediaTypes_.AUDIO.activePlaylistLoader;this.logger_("waiting for EME key session creation"),tl({player:this.player_,sourceKeySystems:this.source_.keySystems,audioMedia:t&&t.media(),mainPlaylists:this.playlists.master.playlists}).then((function(){e.logger_("created EME key session"),e.masterPlaylistController_.sourceUpdater_.initializedEme()})).catch((function(t){e.logger_("error while creating EME key session",t),e.player_.error({message:"Failed to initialize media keys for EME",code:3})}))},i.handleWaitingForKey_=function(){this.logger_("waitingforkey fired, attempting to create any new key sessions"),this.createKeySessions_()},i.setupEme_=function(){var e=this,t=this.masterPlaylistController_.mediaTypes_.AUDIO.activePlaylistLoader,i=il({player:this.player_,sourceKeySystems:this.source_.keySystems,media:this.playlists.media(),audioMedia:t&&t.media()});this.player_.tech_.on("keystatuschange",(function(t){"output-restricted"===t.status&&e.masterPlaylistController_.blacklistCurrentPlaylist({playlist:e.masterPlaylistController_.media(),message:"DRM keystatus changed to "+t.status+". Playlist will fail to play. Check for HDCP content.",blacklistDuration:1/0})})),this.handleWaitingForKey_=this.handleWaitingForKey_.bind(this),this.player_.tech_.on("waitingforkey",this.handleWaitingForKey_),11!==Vr.browser.IE_VERSION&&i?this.createKeySessions_():this.masterPlaylistController_.sourceUpdater_.initializedEme()},i.setupQualityLevels_=function(){var e=this,t=Vr.players[this.tech_.options_.playerId];t&&t.qualityLevels&&!this.qualityLevels_&&(this.qualityLevels_=t.qualityLevels(),this.masterPlaylistController_.on("selectedinitialmedia",(function(){var t,i;t=e.qualityLevels_,(i=e).representations().forEach((function(e){t.addQualityLevel(e)})),el(t,i.playlists)})),this.playlists.on("mediachange",(function(){el(e.qualityLevels_,e.playlists)})))},t.version=function(){return{"@videojs/http-streaming":Qo,"mux.js":"6.0.1","mpd-parser":"0.21.0","m3u8-parser":"4.7.0","aes-decrypter":"3.1.2"}},i.version=function(){return this.constructor.version()},i.canChangeType=function(){return ko.canChangeType()},i.play=function(){this.masterPlaylistController_.play()},i.setCurrentTime=function(e){this.masterPlaylistController_.setCurrentTime(e)},i.duration=function(){return this.masterPlaylistController_.duration()},i.seekable=function(){return this.masterPlaylistController_.seekable()},i.dispose=function(){this.playbackWatcher_&&this.playbackWatcher_.dispose(),this.masterPlaylistController_&&this.masterPlaylistController_.dispose(),this.qualityLevels_&&this.qualityLevels_.dispose(),this.player_&&(delete this.player_.vhs,delete this.player_.dash,delete this.player_.hls),this.tech_&&this.tech_.vhs&&delete this.tech_.vhs,this.tech_&&delete this.tech_.hls,this.mediaSourceUrl_&&s().URL.revokeObjectURL&&(s().URL.revokeObjectURL(this.mediaSourceUrl_),this.mediaSourceUrl_=null),this.tech_&&this.tech_.off("waitingforkey",this.handleWaitingForKey_),e.prototype.dispose.call(this)},i.convertToProgramTime=function(e,t){return Js({playlist:this.masterPlaylistController_.media(),time:e,callback:t})},i.seekToProgramTime=function(e,t,i,n){return void 0===i&&(i=!0),void 0===n&&(n=2),Zs({programTime:e,playlist:this.masterPlaylistController_.media(),retryCount:n,pauseAfterSeek:i,seekTo:this.options_.seekTo,tech:this.options_.tech,callback:t})},t}(Vr.getComponent("Component")),sl={name:"videojs-http-streaming",VERSION:Qo,canHandleSource:function(e,t){void 0===t&&(t={});var i=Vr.mergeOptions(Vr.options,t);return sl.canPlayType(e.type,i)},handleSource:function(e,t,i){void 0===i&&(i={});var n=Vr.mergeOptions(Vr.options,i);return t.vhs=new rl(e,t,n),Vr.hasOwnProperty("hls")||Object.defineProperty(t,"hls",{get:function(){return Vr.log.warn("player.tech().hls is deprecated. Use player.tech().vhs instead."),t.vhs},configurable:!0}),t.vhs.xhr=qs(),t.vhs.src(e.src,e.type),t.vhs},canPlayType:function(e,t){void 0===t&&(t={});var i=Vr.mergeOptions(Vr.options,t),n=i.vhs,r=(n=void 0===n?{}:n).overrideNative,s=void 0===r?!Vr.browser.IS_ANY_SAFARI:r,a=i.hls,o=(a=void 0===a?{}:a).overrideNative,l=void 0!==o&&o,u=(0,k.simpleTypeFromSourceType)(e);return u&&(!Jo.supportsTypeNatively(u)||l||s)?"maybe":""}};((0,S.browserSupportsCodec)("avc1.4d400d,mp4a.40.2")&&Vr.getTech("Html5").registerSourceHandler(sl,0),Vr.VhsHandler=rl,Object.defineProperty(Vr,"HlsHandler",{get:function(){return Vr.log.warn("videojs.HlsHandler is deprecated. Use videojs.VhsHandler instead."),rl},configurable:!0}),Vr.VhsSourceHandler=sl,Object.defineProperty(Vr,"HlsSourceHandler",{get:function(){return Vr.log.warn("videojs.HlsSourceHandler is deprecated. Use videojs.VhsSourceHandler instead."),sl},configurable:!0}),Vr.Vhs=Jo,Object.defineProperty(Vr,"Hls",{get:function(){return Vr.log.warn("videojs.Hls is deprecated. Use videojs.Vhs instead."),Jo},configurable:!0}),Vr.use||(Vr.registerComponent("Hls",Jo),Vr.registerComponent("Vhs",Jo)),Vr.options.vhs=Vr.options.vhs||{},Vr.options.hls=Vr.options.hls||{},Vr.getPlugin&&Vr.getPlugin("reloadSourceOnError"))||(Vr.registerPlugin||Vr.plugin)("reloadSourceOnError",(function(e){Ko(this,e)}));const al=Vr},(e,t,i)=>{var n;n="undefined"!=typeof window?window:void 0!==i.g?i.g:"undefined"!=typeof self?self:{},e.exports=n},(e,t,i)=>{var n,r=void 0!==i.g?i.g:"undefined"!=typeof window?window:{},s=i(69);"undefined"!=typeof document?n=document:(n=r["__GLOBAL_DOCUMENT_CACHE@4"])||(n=r["__GLOBAL_DOCUMENT_CACHE@4"]=s),e.exports=n},()=>{},(e,t,i)=>{"use strict";function n(){return n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},n.apply(this,arguments)}i.r(t),i.d(t,{default:()=>n})},(e,t)=>{function i(e){if(e&&"object"==typeof e){var t=e.which||e.keyCode||e.charCode;t&&(e=t)}if("number"==typeof e)return a[e];var i,s=String(e);return(i=n[s.toLowerCase()])?i:(i=r[s.toLowerCase()])||(1===s.length?s.charCodeAt(0):void 0)}i.isEventKey=function(e,t){if(e&&"object"==typeof e){var i=e.which||e.keyCode||e.charCode;if(null==i)return!1;if("string"==typeof t){var s;if(s=n[t.toLowerCase()])return s===i;if(s=r[t.toLowerCase()])return s===i}else if("number"==typeof t)return t===i;return!1}};var n=(t=e.exports=i).code=t.codes={backspace:8,tab:9,enter:13,shift:16,ctrl:17,alt:18,"pause/break":19,"caps lock":20,esc:27,space:32,"page up":33,"page down":34,end:35,home:36,left:37,up:38,right:39,down:40,insert:45,delete:46,command:91,"left command":91,"right command":93,"numpad *":106,"numpad +":107,"numpad -":109,"numpad .":110,"numpad /":111,"num lock":144,"scroll lock":145,"my computer":182,"my calculator":183,";":186,"=":187,",":188,"-":189,".":190,"/":191,"`":192,"[":219,"\\":220,"]":221,"'":222},r=t.aliases={windows:91,"⇧":16,"⌥":18,"⌃":17,"⌘":91,ctl:17,control:17,option:18,pause:19,break:19,caps:20,return:13,escape:27,spc:32,spacebar:32,pgup:33,pgdn:34,ins:45,del:46,cmd:91};for(s=97;s<123;s++)n[String.fromCharCode(s)]=s-32;for(var s=48;s<58;s++)n[s-48]=s;for(s=1;s<13;s++)n["f"+s]=s+111;for(s=0;s<10;s++)n["numpad "+s]=s+96;var a=t.names=t.title={};for(s in n)a[n[s]]=s;for(var o in r)n[o]=r[o]},(e,t,i)=>{"use strict";function n(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}i.r(t),i.d(t,{default:()=>n})},(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>r});var n=i(74);function r(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,(0,n.default)(e,t)}},(e,t,i)=>{"use strict";function n(e,t){return n=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},n(e,t)}i.r(t),i.d(t,{default:()=>n})},e=>{e.exports=function(e,t){var i,n=null;try{i=JSON.parse(e,t)}catch(e){n=e}return[n,i]}},(e,t,i)=>{"use strict";var n=i(67),r=i(77),s=i(78);o.httpHandler=i(79);function a(e,t,i){var n=e;return s(t)?(i=t,"string"==typeof e&&(n={uri:e})):n=r({},t,{uri:e}),n.callback=i,n}function o(e,t,i){return l(t=a(e,t,i))}function l(e){if(void 0===e.callback)throw new Error("callback argument missing");var t=!1,i=function(i,n,r){t||(t=!0,e.callback(i,n,r))};function n(){var e=void 0;if(e=u.response?u.response:u.responseText||function(e){try{if("document"===e.responseType)return e.responseXML;var t=e.responseXML&&"parsererror"===e.responseXML.documentElement.nodeName;if(""===e.responseType&&!t)return e.responseXML}catch(e){}return null}(u),g)try{e=JSON.parse(e)}catch(e){}return e}function r(e){return clearTimeout(c),e instanceof Error||(e=new Error(""+(e||"Unknown XMLHttpRequest Error"))),e.statusCode=0,i(e,v)}function s(){if(!l){var t;clearTimeout(c),t=e.useXDR&&void 0===u.status?200:1223===u.status?204:u.status;var r=v,s=null;return 0!==t?(r={body:n(),statusCode:t,method:h,headers:{},url:d,rawRequest:u},u.getAllResponseHeaders&&(r.headers=function(e){var t={};return e?(e.trim().split("\n").forEach((function(e){var i=e.indexOf(":"),n=e.slice(0,i).trim().toLowerCase(),r=e.slice(i+1).trim();void 0===t[n]?t[n]=r:Array.isArray(t[n])?t[n].push(r):t[n]=[t[n],r]})),t):t}(u.getAllResponseHeaders()))):s=new Error("Internal XMLHttpRequest Error"),i(s,r,r.body)}}var a,l,u=e.xhr||null;u||(u=e.cors||e.useXDR?new o.XDomainRequest:new o.XMLHttpRequest);var c,d=u.url=e.uri||e.url,h=u.method=e.method||"GET",p=e.body||e.data,f=u.headers=e.headers||{},m=!!e.sync,g=!1,v={body:void 0,headers:{},statusCode:0,method:h,url:d,rawRequest:u};if("json" in e&&!1!==e.json&&(g=!0,f.accept||f.Accept||(f.Accept="application/json"),"GET"!==h&&"HEAD"!==h&&(f["content-type"]||f["Content-Type"]||(f["Content-Type"]="application/json"),p=JSON.stringify(!0===e.json?p:e.json))),u.onreadystatechange=function(){4===u.readyState&&setTimeout(s,0)},u.onload=s,u.onerror=r,u.onprogress=function(){},u.onabort=function(){l=!0},u.ontimeout=r,u.open(h,d,!m,e.username,e.password),m||(u.withCredentials=!!e.withCredentials),!m&&e.timeout>0&&(c=setTimeout((function(){if(!l){l=!0,u.abort("timeout");var e=new Error("XMLHttpRequest timeout");e.code="ETIMEDOUT",r(e)}}),e.timeout)),u.setRequestHeader)for(a in f)f.hasOwnProperty(a)&&u.setRequestHeader(a,f[a]);else if(e.headers&&!function(e){for(var t in e)if(e.hasOwnProperty(t))return!1;return!0}(e.headers))throw new Error("Headers cannot be set on an XDomainRequest object");return"responseType" in e&&(u.responseType=e.responseType),"beforeSend" in e&&"function"==typeof e.beforeSend&&e.beforeSend(u),u.send(p||null),u}e.exports=o,e.exports.default=o,o.XMLHttpRequest=n.XMLHttpRequest||function(){},o.XDomainRequest="withCredentials" in new o.XMLHttpRequest?o.XMLHttpRequest:n.XDomainRequest,function(e,t){for(var i=0;i<e.length;i++)t(e[i])}(["get","put","post","patch","head","delete"],(function(e){o["delete"===e?"del":e]=function(t,i,n){return(i=a(t,i,n)).method=e.toUpperCase(),l(i)}}))},e=>{function t(){return e.exports=t=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},e.exports.__esModule=!0,e.exports.default=e.exports,t.apply(this,arguments)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},e=>{e.exports=function(e){if(!e)return!1;var i=t.call(e);return"[object Function]"===i||"function"==typeof e&&"[object RegExp]"!==i||"undefined"!=typeof window&&(e===window.setTimeout||e===window.alert||e===window.confirm||e===window.prompt)};var t=Object.prototype.toString},(e,t,i)=>{"use strict";var n=i(67);e.exports=function(e,t){return void 0===t&&(t=!1),function(i,r,s){if(i)e(i);else if(r.statusCode>=400&&r.statusCode<=599){var a=s;if(t)if(n.TextDecoder){var o=function(e){void 0===e&&(e="");return e.toLowerCase().split(";").reduce((function(e,t){var i=t.split("="),n=i[0],r=i[1];return"charset"===n.trim()?r.trim():e}),"utf-8")}(r.headers&&r.headers["content-type"]);try{a=new TextDecoder(o).decode(s)}catch(e){}}else a=String.fromCharCode.apply(null,new Uint8Array(s));e({cause:a})}else e(null,s)}}},(e,t,i)=>{var n=i(67),r=e.exports={WebVTT:i(81),VTTCue:i(82),VTTRegion:i(83)};n.vttjs=r,n.WebVTT=r.WebVTT;var s=r.VTTCue,a=r.VTTRegion,o=n.VTTCue,l=n.VTTRegion;r.shim=function(){n.VTTCue=s,n.VTTRegion=a},r.restore=function(){n.VTTCue=o,n.VTTRegion=l},n.VTTCue||r.shim()},(e,t,i)=>{var n=i(68),r=Object.create||function(){function e(){}return function(t){if(1!==arguments.length)throw new Error("Object.create shim only accepts one parameter.");return e.prototype=t,new e}}();function s(e,t){this.name="ParsingError",this.code=e.code,this.message=t||e.message}function a(e){function t(e,t,i,n){return 3600*(0|e)+60*(0|t)+(0|i)+(0|n)/1e3}var i=e.match(/^(\d+):(\d{1,2})(:\d{1,2})?\.(\d{3})/);return i?i[3]?t(i[1],i[2],i[3].replace(":",""),i[4]):i[1]>59?t(i[1],i[2],0,i[4]):t(0,i[1],i[2],i[4]):null}function o(){this.values=r(null)}function l(e,t,i,n){var r=n?e.split(n):[e];for(var s in r)if("string"==typeof r[s]){var a=r[s].split(i);if(2===a.length)t(a[0],a[1])}}function u(e,t,i){var n=e;function r(){var t=a(e);if(null===t)throw new s(s.Errors.BadTimeStamp,"Malformed timestamp: "+n);return e=e.replace(/^[^\sa-zA-Z-]+/,""),t}function u(){e=e.replace(/^\s+/,"")}if(u(),t.startTime=r(),u(),"--\x3e"!==e.substr(0,3))throw new s(s.Errors.BadTimeStamp,"Malformed time stamp (time stamps must be separated by '--\x3e'): "+n);e=e.substr(3),u(),t.endTime=r(),u(),function(e,t){var n=new o;l(e,(function(e,t){switch(e){case"region":for(var r=i.length-1;r>=0;r--)if(i[r].id===t){n.set(e,i[r].region);break}break;case"vertical":n.alt(e,t,["rl","lr"]);break;case"line":var s=t.split(","),a=s[0];n.integer(e,a),n.percent(e,a)&&n.set("snapToLines",!1),n.alt(e,a,["auto"]),2===s.length&&n.alt("lineAlign",s[1],["start","center","end"]);break;case"position":s=t.split(","),n.percent(e,s[0]),2===s.length&&n.alt("positionAlign",s[1],["start","center","end"]);break;case"size":n.percent(e,t);break;case"align":n.alt(e,t,["start","center","end","left","right"])}}),/:/,/\s/),t.region=n.get("region",null),t.vertical=n.get("vertical","");try{t.line=n.get("line","auto")}catch(e){}t.lineAlign=n.get("lineAlign","start"),t.snapToLines=n.get("snapToLines",!0),t.size=n.get("size",100);try{t.align=n.get("align","center")}catch(e){t.align=n.get("align","middle")}try{t.position=n.get("position","auto")}catch(e){t.position=n.get("position",{start:0,left:0,center:50,middle:50,end:100,right:100},t.align)}t.positionAlign=n.get("positionAlign",{start:"start",left:"start",center:"center",middle:"center",end:"end",right:"end"},t.align)}(e,t)}s.prototype=r(Error.prototype),s.prototype.constructor=s,s.Errors={BadSignature:{code:0,message:"Malformed WebVTT signature."},BadTimeStamp:{code:1,message:"Malformed time stamp."}},o.prototype={set:function(e,t){this.get(e)||""===t||(this.values[e]=t)},get:function(e,t,i){return i?this.has(e)?this.values[e]:t[i]:this.has(e)?this.values[e]:t},has:function(e){return e in this.values},alt:function(e,t,i){for(var n=0;n<i.length;++n)if(t===i[n]){this.set(e,t);break}},integer:function(e,t){/^-?\d+$/.test(t)&&this.set(e,parseInt(t,10))},percent:function(e,t){return!!(t.match(/^([\d]{1,3})(\.[\d]*)?%$/)&&(t=parseFloat(t))>=0&&t<=100)&&(this.set(e,t),!0)}};var c=n.createElement&&n.createElement("textarea"),d={c:"span",i:"i",b:"b",u:"u",ruby:"ruby",rt:"rt",v:"span",lang:"span"},h={white:"rgba(255,255,255,1)",lime:"rgba(0,255,0,1)",cyan:"rgba(0,255,255,1)",red:"rgba(255,0,0,1)",yellow:"rgba(255,255,0,1)",magenta:"rgba(255,0,255,1)",blue:"rgba(0,0,255,1)",black:"rgba(0,0,0,1)"},p={v:"title",lang:"lang"},f={rt:"ruby"};function m(e,t){function i(){if(!t)return null;var e,i=t.match(/^([^<]*)(<[^>]*>?)?/);return e=i[1]?i[1]:i[2],t=t.substr(e.length),e}function n(e,t){return!f[t.localName]||f[t.localName]===e.localName}function r(t,i){var n=d[t];if(!n)return null;var r=e.document.createElement(n),s=p[t];return s&&i&&(r[s]=i.trim()),r}for(var s,o,l=e.document.createElement("div"),u=l,m=[];null!==(s=i());)if("<"!==s[0])u.appendChild(e.document.createTextNode((o=s,c.innerHTML=o,o=c.textContent,c.textContent="",o)));else{if("/"===s[1]){m.length&&m[m.length-1]===s.substr(2).replace(">","")&&(m.pop(),u=u.parentNode);continue}var g,v=a(s.substr(1,s.length-2));if(v){g=e.document.createProcessingInstruction("timestamp",v),u.appendChild(g);continue}var y=s.match(/^<([^.\s/0-9>]+)(\.[^\s\\>]+)?([^>\\]+)?(\\?)>?$/);if(!y)continue;if(!(g=r(y[1],y[3])))continue;if(!n(u,g))continue;if(y[2]){var _=y[2].split(".");_.forEach((function(e){var t=/^bg_/.test(e),i=t?e.slice(3):e;if(h.hasOwnProperty(i)){var n=t?"background-color":"color",r=h[i];g.style[n]=r}})),g.className=_.join(" ")}m.push(y[1]),u.appendChild(g),u=g}return l}var g=[[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 v(e){for(var t=0;t<g.length;t++){var i=g[t];if(e>=i[0]&&e<=i[1])return!0}return!1}function y(e){var t=[],i="";if(!e||!e.childNodes)return"ltr";function n(e,t){for(var i=t.childNodes.length-1;i>=0;i--)e.push(t.childNodes[i])}function r(e){if(!e||!e.length)return null;var t=e.pop(),i=t.textContent||t.innerText;if(i){var s=i.match(/^.*(\n|\r)/);return s?(e.length=0,s[0]):i}return"ruby"===t.tagName?r(e):t.childNodes?(n(e,t),r(e)):void 0}for(n(t,e);i=r(t);)for(var s=0;s<i.length;s++)if(v(i.charCodeAt(s)))return"rtl";return"ltr"}function _(){}function b(e,t,i){_.call(this),this.cue=t,this.cueDiv=m(e,t.text);var n={color:"rgba(255, 255, 255, 1)",backgroundColor:"rgba(0, 0, 0, 0.8)",position:"relative",left:0,right:0,top:0,bottom:0,display:"inline",writingMode:""===t.vertical?"horizontal-tb":"lr"===t.vertical?"vertical-lr":"vertical-rl",unicodeBidi:"plaintext"};this.applyStyles(n,this.cueDiv),this.div=e.document.createElement("div"),n={direction:y(this.cueDiv),writingMode:""===t.vertical?"horizontal-tb":"lr"===t.vertical?"vertical-lr":"vertical-rl",unicodeBidi:"plaintext",textAlign:"middle"===t.align?"center":t.align,font:i.font,whiteSpace:"pre-line",position:"absolute"},this.applyStyles(n),this.div.appendChild(this.cueDiv);var r=0;switch(t.positionAlign){case"start":r=t.position;break;case"center":r=t.position-t.size/2;break;case"end":r=t.position-t.size}""===t.vertical?this.applyStyles({left:this.formatStyle(r,"%"),width:this.formatStyle(t.size,"%")}):this.applyStyles({top:this.formatStyle(r,"%"),height:this.formatStyle(t.size,"%")}),this.move=function(e){this.applyStyles({top:this.formatStyle(e.top,"px"),bottom:this.formatStyle(e.bottom,"px"),left:this.formatStyle(e.left,"px"),right:this.formatStyle(e.right,"px"),height:this.formatStyle(e.height,"px"),width:this.formatStyle(e.width,"px")})}}function T(e){var t,i,n,r;if(e.div){i=e.div.offsetHeight,n=e.div.offsetWidth,r=e.div.offsetTop;var s=(s=e.div.childNodes)&&(s=s[0])&&s.getClientRects&&s.getClientRects();e=e.div.getBoundingClientRect(),t=s?Math.max(s[0]&&s[0].height||0,e.height/s.length):0}this.left=e.left,this.right=e.right,this.top=e.top||r,this.height=e.height||i,this.bottom=e.bottom||r+(e.height||i),this.width=e.width||n,this.lineHeight=void 0!==t?t:e.lineHeight}function w(e,t,i,n){var r=new T(t),s=t.cue,a=function(e){if("number"==typeof e.line&&(e.snapToLines||e.line>=0&&e.line<=100))return e.line;if(!e.track||!e.track.textTrackList||!e.track.textTrackList.mediaElement)return-1;for(var t=e.track,i=t.textTrackList,n=0,r=0;r<i.length&&i[r]!==t;r++)"showing"===i[r].mode&&n++;return-1*++n}(s),o=[];if(s.snapToLines){var l;switch(s.vertical){case"":o=["+y","-y"],l="height";break;case"rl":o=["+x","-x"],l="width";break;case"lr":o=["-x","+x"],l="width"}var u=r.lineHeight,c=u*Math.round(a),d=i[l]+u,h=o[0];Math.abs(c)>d&&(c=c<0?-1:1,c*=Math.ceil(d/u)*u),a<0&&(c+=""===s.vertical?i.height:i.width,o=o.reverse()),r.move(h,c)}else{var p=r.lineHeight/i.height*100;switch(s.lineAlign){case"center":a-=p/2;break;case"end":a-=p}switch(s.vertical){case"":t.applyStyles({top:t.formatStyle(a,"%")});break;case"rl":t.applyStyles({left:t.formatStyle(a,"%")});break;case"lr":t.applyStyles({right:t.formatStyle(a,"%")})}o=["+y","-x","+x","-y"],r=new T(t)}var f=function(e,t){for(var r,s=new T(e),a=1,o=0;o<t.length;o++){for(;e.overlapsOppositeAxis(i,t[o])||e.within(i)&&e.overlapsAny(n);)e.move(t[o]);if(e.within(i))return e;var l=e.intersectPercentage(i);a>l&&(r=new T(e),a=l),e=new T(s)}return r||s}(r,o);t.move(f.toCSSCompatValues(i))}function S(){}_.prototype.applyStyles=function(e,t){for(var i in t=t||this.div,e)e.hasOwnProperty(i)&&(t.style[i]=e[i])},_.prototype.formatStyle=function(e,t){return 0===e?0:e+t},b.prototype=r(_.prototype),b.prototype.constructor=b,T.prototype.move=function(e,t){switch(t=void 0!==t?t:this.lineHeight,e){case"+x":this.left+=t,this.right+=t;break;case"-x":this.left-=t,this.right-=t;break;case"+y":this.top+=t,this.bottom+=t;break;case"-y":this.top-=t,this.bottom-=t}},T.prototype.overlaps=function(e){return this.left<e.right&&this.right>e.left&&this.top<e.bottom&&this.bottom>e.top},T.prototype.overlapsAny=function(e){for(var t=0;t<e.length;t++)if(this.overlaps(e[t]))return!0;return!1},T.prototype.within=function(e){return this.top>=e.top&&this.bottom<=e.bottom&&this.left>=e.left&&this.right<=e.right},T.prototype.overlapsOppositeAxis=function(e,t){switch(t){case"+x":return this.left<e.left;case"-x":return this.right>e.right;case"+y":return this.top<e.top;case"-y":return this.bottom>e.bottom}},T.prototype.intersectPercentage=function(e){return Math.max(0,Math.min(this.right,e.right)-Math.max(this.left,e.left))*Math.max(0,Math.min(this.bottom,e.bottom)-Math.max(this.top,e.top))/(this.height*this.width)},T.prototype.toCSSCompatValues=function(e){return{top:this.top-e.top,bottom:e.bottom-this.bottom,left:this.left-e.left,right:e.right-this.right,height:this.height,width:this.width}},T.getSimpleBoxPosition=function(e){var t=e.div?e.div.offsetHeight:e.tagName?e.offsetHeight:0,i=e.div?e.div.offsetWidth:e.tagName?e.offsetWidth:0,n=e.div?e.div.offsetTop:e.tagName?e.offsetTop:0;return{left:(e=e.div?e.div.getBoundingClientRect():e.tagName?e.getBoundingClientRect():e).left,right:e.right,top:e.top||n,height:e.height||t,bottom:e.bottom||n+(e.height||t),width:e.width||i}},S.StringDecoder=function(){return{decode:function(e){if(!e)return"";if("string"!=typeof e)throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(e))}}},S.convertCueToDOMTree=function(e,t){return e&&t?m(e,t):null};S.processCues=function(e,t,i){if(!e||!t||!i)return null;for(;i.firstChild;)i.removeChild(i.firstChild);var n=e.document.createElement("div");if(n.style.position="absolute",n.style.left="0",n.style.right="0",n.style.top="0",n.style.bottom="0",n.style.margin="1.5%",i.appendChild(n),function(e){for(var t=0;t<e.length;t++)if(e[t].hasBeenReset||!e[t].displayState)return!0;return!1}(t)){var r=[],s=T.getSimpleBoxPosition(n),a={font:Math.round(.05*s.height*100)/100+"px sans-serif"};!function(){for(var i,o,l=0;l<t.length;l++)o=t[l],i=new b(e,o,a),n.appendChild(i.div),w(0,i,s,r),o.displayState=i.div,r.push(T.getSimpleBoxPosition(i))}()}else for(var o=0;o<t.length;o++)n.appendChild(t[o].displayState)},S.Parser=function(e,t,i){i||(i=t,t={}),t||(t={}),this.window=e,this.vttjs=t,this.state="INITIAL",this.buffer="",this.decoder=i||new TextDecoder("utf8"),this.regionList=[]},S.Parser.prototype={reportOrThrowError:function(e){if(!(e instanceof s))throw e;this.onparsingerror&&this.onparsingerror(e)},parse:function(e){var t=this;function i(){for(var e=t.buffer,i=0;i<e.length&&"\r"!==e[i]&&"\n"!==e[i];)++i;var n=e.substr(0,i);return"\r"===e[i]&&++i,"\n"===e[i]&&++i,t.buffer=e.substr(i),n}function n(e){e.match(/X-TIMESTAMP-MAP/)?l(e,(function(e,i){if("X-TIMESTAMP-MAP"===e)!function(e){var i=new o;l(e,(function(e,t){switch(e){case"MPEGT":i.integer(e+"S",t);break;case"LOCA":i.set(e+"L",a(t))}}),/[^\d]:/,/,/),t.ontimestampmap&&t.ontimestampmap({MPEGTS:i.get("MPEGTS"),LOCAL:i.get("LOCAL")})}(i)}),/=/):l(e,(function(e,i){if("Region"===e)!function(e){var i=new o;if(l(e,(function(e,t){switch(e){case"id":i.set(e,t);break;case"width":i.percent(e,t);break;case"lines":i.integer(e,t);break;case"regionanchor":case"viewportanchor":var n=t.split(",");if(2!==n.length)break;var r=new o;if(r.percent("x",n[0]),r.percent("y",n[1]),!r.has("x")||!r.has("y"))break;i.set(e+"X",r.get("x")),i.set(e+"Y",r.get("y"));break;case"scroll":i.alt(e,t,["up"])}}),/=/,/\s/),i.has("id")){var n=new(t.vttjs.VTTRegion||t.window.VTTRegion);n.width=i.get("width",100),n.lines=i.get("lines",3),n.regionAnchorX=i.get("regionanchorX",0),n.regionAnchorY=i.get("regionanchorY",100),n.viewportAnchorX=i.get("viewportanchorX",0),n.viewportAnchorY=i.get("viewportanchorY",100),n.scroll=i.get("scroll",""),t.onregion&&t.onregion(n),t.regionList.push({id:i.get("id"),region:n})}}(i)}),/:/)}e&&(t.buffer+=t.decoder.decode(e,{stream:!0}));try{var r;if("INITIAL"===t.state){if(!/\r\n|\n/.test(t.buffer))return this;var c=(r=i()).match(/^WEBVTT([ \t].*)?$/);if(!c||!c[0])throw new s(s.Errors.BadSignature);t.state="HEADER"}for(var d=!1;t.buffer;){if(!/\r\n|\n/.test(t.buffer))return this;switch(d?d=!1:r=i(),t.state){case"HEADER":/:/.test(r)?n(r):r||(t.state="ID");continue;case"NOTE":r||(t.state="ID");continue;case"ID":if(/^NOTE($|[ \t])/.test(r)){t.state="NOTE";break}if(!r)continue;t.cue=new(t.vttjs.VTTCue||t.window.VTTCue)(0,0,"");try{t.cue.align="center"}catch(e){t.cue.align="middle"}if(t.state="CUE",-1===r.indexOf("--\x3e")){t.cue.id=r;continue}case"CUE":try{u(r,t.cue,t.regionList)}catch(e){t.reportOrThrowError(e),t.cue=null,t.state="BADCUE";continue}t.state="CUETEXT";continue;case"CUETEXT":var h=-1!==r.indexOf("--\x3e");if(!r||h&&(d=!0)){t.oncue&&t.oncue(t.cue),t.cue=null,t.state="ID";continue}t.cue.text&&(t.cue.text+="\n"),t.cue.text+=r.replace(/\u2028/g,"\n").replace(/u2029/g,"\n");continue;case"BADCUE":r||(t.state="ID");continue}}}catch(e){t.reportOrThrowError(e),"CUETEXT"===t.state&&t.cue&&t.oncue&&t.oncue(t.cue),t.cue=null,t.state="INITIAL"===t.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 s(s.Errors.BadSignature)}catch(t){e.reportOrThrowError(t)}return e.onflush&&e.onflush(),this}},e.exports=S},e=>{var t={"":1,lr:1,rl:1},i={start:1,center:1,end:1,left:1,right:1,auto:1,"line-left":1,"line-right":1};function n(e){return"string"==typeof e&&(!!i[e.toLowerCase()]&&e.toLowerCase())}function r(e,i,r){this.hasBeenReset=!1;var s="",a=!1,o=e,l=i,u=r,c=null,d="",h=!0,p="auto",f="start",m="auto",g="auto",v=100,y="center";Object.defineProperties(this,{id:{enumerable:!0,get:function(){return s},set:function(e){s=""+e}},pauseOnExit:{enumerable:!0,get:function(){return a},set:function(e){a=!!e}},startTime:{enumerable:!0,get:function(){return o},set:function(e){if("number"!=typeof e)throw new TypeError("Start time must be set to a number.");o=e,this.hasBeenReset=!0}},endTime:{enumerable:!0,get:function(){return l},set:function(e){if("number"!=typeof e)throw new TypeError("End time must be set to a number.");l=e,this.hasBeenReset=!0}},text:{enumerable:!0,get:function(){return u},set:function(e){u=""+e,this.hasBeenReset=!0}},region:{enumerable:!0,get:function(){return c},set:function(e){c=e,this.hasBeenReset=!0}},vertical:{enumerable:!0,get:function(){return d},set:function(e){var i=function(e){return"string"==typeof e&&!!t[e.toLowerCase()]&&e.toLowerCase()}(e);if(!1===i)throw new SyntaxError("Vertical: an invalid or illegal direction string was specified.");d=i,this.hasBeenReset=!0}},snapToLines:{enumerable:!0,get:function(){return h},set:function(e){h=!!e,this.hasBeenReset=!0}},line:{enumerable:!0,get:function(){return p},set:function(e){if("number"!=typeof e&&"auto"!==e)throw new SyntaxError("Line: an invalid number or illegal string was specified.");p=e,this.hasBeenReset=!0}},lineAlign:{enumerable:!0,get:function(){return f},set:function(e){var t=n(e);t?(f=t,this.hasBeenReset=!0):console.warn("lineAlign: an invalid or illegal string was specified.")}},position:{enumerable:!0,get:function(){return m},set:function(e){if(e<0||e>100)throw new Error("Position must be between 0 and 100.");m=e,this.hasBeenReset=!0}},positionAlign:{enumerable:!0,get:function(){return g},set:function(e){var t=n(e);t?(g=t,this.hasBeenReset=!0):console.warn("positionAlign: an invalid or illegal string was specified.")}},size:{enumerable:!0,get:function(){return v},set:function(e){if(e<0||e>100)throw new Error("Size must be between 0 and 100.");v=e,this.hasBeenReset=!0}},align:{enumerable:!0,get:function(){return y},set:function(e){var t=n(e);if(!t)throw new SyntaxError("align: an invalid or illegal alignment string was specified.");y=t,this.hasBeenReset=!0}}}),this.displayState=void 0}r.prototype.getCueAsHTML=function(){return WebVTT.convertCueToDOMTree(window,this.text)},e.exports=r},e=>{var t={"":!0,up:!0};function i(e){return"number"==typeof e&&e>=0&&e<=100}e.exports=function(){var e=100,n=3,r=0,s=100,a=0,o=100,l="";Object.defineProperties(this,{width:{enumerable:!0,get:function(){return e},set:function(t){if(!i(t))throw new Error("Width must be between 0 and 100.");e=t}},lines:{enumerable:!0,get:function(){return n},set:function(e){if("number"!=typeof e)throw new TypeError("Lines must be set to a number.");n=e}},regionAnchorY:{enumerable:!0,get:function(){return s},set:function(e){if(!i(e))throw new Error("RegionAnchorX must be between 0 and 100.");s=e}},regionAnchorX:{enumerable:!0,get:function(){return r},set:function(e){if(!i(e))throw new Error("RegionAnchorY must be between 0 and 100.");r=e}},viewportAnchorY:{enumerable:!0,get:function(){return o},set:function(e){if(!i(e))throw new Error("ViewportAnchorY must be between 0 and 100.");o=e}},viewportAnchorX:{enumerable:!0,get:function(){return a},set:function(e){if(!i(e))throw new Error("ViewportAnchorX must be between 0 and 100.");a=e}},scroll:{enumerable:!0,get:function(){return l},set:function(e){var i=function(e){return"string"==typeof e&&!!t[e.toLowerCase()]&&e.toLowerCase()}(e);!1===i?console.warn("Scroll: an invalid or illegal string was specified."):l=i}}})}},(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>s});var n=i(74),r=i(85);function s(e,t,i){return s=(0,r.default)()?Reflect.construct:function(e,t,i){var r=[null];r.push.apply(r,t);var s=new(Function.bind.apply(e,r));return i&&(0,n.default)(s,i.prototype),s},s.apply(null,arguments)}},(e,t,i)=>{"use strict";function n(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}i.r(t),i.d(t,{default:()=>n})},(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>r});var n=i(74);function r(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&(0,n.default)(e,t)}},(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>l});var n=i(88),r=i.n(n),s=i(67),a=i.n(s),o="http://example.com";const l=function(e,t){if(/^[a-z]+:/i.test(t))return t;/^data:/.test(e)&&(e=a().location&&a().location.href||"");var i="function"==typeof a().URL,n=/^\/\//.test(e),s=!a().location&&!/\/\//i.test(e);if(i?e=new(a().URL)(e,a().location||o):/\/\//i.test(e)||(e=r().buildAbsoluteURL(a().location&&a().location.href||"",e)),i){var l=new URL(t,e);return s?l.href.slice(o.length):n?l.href.slice(l.protocol.length):l.href}return r().buildAbsoluteURL(e,t)}},function(e){var t,i,n,r,s;t=/^(?=((?:[a-zA-Z0-9+\-.]+:)?))\1(?=((?:\/\/[^\/?#]*)?))\2(?=((?:(?:[^?#\/]*\/)*[^;?#\/]*)?))\3((?:;[^?#]*)?)(\?[^#]*)?(#[^]*)?$/,i=/^(?=([^\/?#]*))\1([^]*)$/,n=/(?:\/|^)\.(?=\/)/g,r=/(?:\/|^)\.\.\/(?!\.\.\/)[^\/]*(?=\/)/g,s={buildAbsoluteURL:function(e,t,n){if(n=n||{},e=e.trim(),!(t=t.trim())){if(!n.alwaysNormalize)return e;var r=s.parseURL(e);if(!r)throw new Error("Error trying to parse base URL.");return r.path=s.normalizePath(r.path),s.buildURLFromParts(r)}var a=s.parseURL(t);if(!a)throw new Error("Error trying to parse relative URL.");if(a.scheme)return n.alwaysNormalize?(a.path=s.normalizePath(a.path),s.buildURLFromParts(a)):t;var o=s.parseURL(e);if(!o)throw new Error("Error trying to parse base URL.");if(!o.netLoc&&o.path&&"/"!==o.path[0]){var l=i.exec(o.path);o.netLoc=l[1],o.path=l[2]}o.netLoc&&!o.path&&(o.path="/");var u={scheme:o.scheme,netLoc:a.netLoc,path:null,params:a.params,query:a.query,fragment:a.fragment};if(!a.netLoc&&(u.netLoc=o.netLoc,"/"!==a.path[0]))if(a.path){var c=o.path,d=c.substring(0,c.lastIndexOf("/")+1)+a.path;u.path=s.normalizePath(d)}else u.path=o.path,a.params||(u.params=o.params,a.query||(u.query=o.query));return null===u.path&&(u.path=n.alwaysNormalize?s.normalizePath(a.path):a.path),s.buildURLFromParts(u)},parseURL:function(e){var i=t.exec(e);return i?{scheme:i[1]||"",netLoc:i[2]||"",path:i[3]||"",params:i[4]||"",query:i[5]||"",fragment:i[6]||""}:null},normalizePath:function(e){for(e=e.split("").reverse().join("").replace(n,"");e.length!==(e=e.replace(r,"")).length;);return e.split("").reverse().join("")},buildURLFromParts:function(e){return e.scheme+e.netLoc+e.path+e.params+e.query+e.fragment}},e.exports=s},(e,t,i)=>{"use strict";i.r(t),i.d(t,{LineStream:()=>l,ParseStream:()=>h,Parser:()=>m});var n=i(73),r=i(90),s=i(70),a=i(72),o=i(91),l=function(e){function t(){var t;return(t=e.call(this)||this).buffer="",t}return(0,n.default)(t,e),t.prototype.push=function(e){var t;for(this.buffer+=e,t=this.buffer.indexOf("\n");t>-1;t=this.buffer.indexOf("\n"))this.trigger("data",this.buffer.substring(0,t)),this.buffer=this.buffer.substring(t+1)},t}(r.default),u=String.fromCharCode(9),c=function(e){var t=/([0-9.]*)?@?([0-9.]*)?/.exec(e||""),i={};return t[1]&&(i.length=parseInt(t[1],10)),t[2]&&(i.offset=parseInt(t[2],10)),i},d=function(e){for(var t,i=e.split(new RegExp('(?:^|,)((?:[^=]*)=(?:"[^"]*"|[^,]*))')),n={},r=i.length;r--;)""!==i[r]&&((t=/([^=]*)=(.*)/.exec(i[r]).slice(1))[0]=t[0].replace(/^\s+|\s+$/g,""),t[1]=t[1].replace(/^\s+|\s+$/g,""),t[1]=t[1].replace(/^['"](.*)['"]$/g,"$1"),n[t[0]]=t[1]);return n},h=function(e){function t(){var t;return(t=e.call(this)||this).customParsers=[],t.tagMappers=[],t}(0,n.default)(t,e);var i=t.prototype;return i.push=function(e){var t,i,n=this;0!==(e=e.trim()).length&&("#"===e[0]?this.tagMappers.reduce((function(t,i){var n=i(e);return n===e?t:t.concat([n])}),[e]).forEach((function(e){for(var r=0;r<n.customParsers.length;r++)if(n.customParsers[r].call(n,e))return;if(0===e.indexOf("#EXT"))if(e=e.replace("\r",""),t=/^#EXTM3U/.exec(e))n.trigger("data",{type:"tag",tagType:"m3u"});else{if(t=/^#EXTINF:?([0-9\.]*)?,?(.*)?$/.exec(e))return i={type:"tag",tagType:"inf"},t[1]&&(i.duration=parseFloat(t[1])),t[2]&&(i.title=t[2]),void n.trigger("data",i);if(t=/^#EXT-X-TARGETDURATION:?([0-9.]*)?/.exec(e))return i={type:"tag",tagType:"targetduration"},t[1]&&(i.duration=parseInt(t[1],10)),void n.trigger("data",i);if(t=/^#EXT-X-VERSION:?([0-9.]*)?/.exec(e))return i={type:"tag",tagType:"version"},t[1]&&(i.version=parseInt(t[1],10)),void n.trigger("data",i);if(t=/^#EXT-X-MEDIA-SEQUENCE:?(\-?[0-9.]*)?/.exec(e))return i={type:"tag",tagType:"media-sequence"},t[1]&&(i.number=parseInt(t[1],10)),void n.trigger("data",i);if(t=/^#EXT-X-DISCONTINUITY-SEQUENCE:?(\-?[0-9.]*)?/.exec(e))return i={type:"tag",tagType:"discontinuity-sequence"},t[1]&&(i.number=parseInt(t[1],10)),void n.trigger("data",i);if(t=/^#EXT-X-PLAYLIST-TYPE:?(.*)?$/.exec(e))return i={type:"tag",tagType:"playlist-type"},t[1]&&(i.playlistType=t[1]),void n.trigger("data",i);if(t=/^#EXT-X-BYTERANGE:?(.*)?$/.exec(e))return i=(0,s.default)(c(t[1]),{type:"tag",tagType:"byterange"}),void n.trigger("data",i);if(t=/^#EXT-X-ALLOW-CACHE:?(YES|NO)?/.exec(e))return i={type:"tag",tagType:"allow-cache"},t[1]&&(i.allowed=!/NO/.test(t[1])),void n.trigger("data",i);if(t=/^#EXT-X-MAP:?(.*)$/.exec(e)){if(i={type:"tag",tagType:"map"},t[1]){var a=d(t[1]);a.URI&&(i.uri=a.URI),a.BYTERANGE&&(i.byterange=c(a.BYTERANGE))}n.trigger("data",i)}else if(t=/^#EXT-X-STREAM-INF:?(.*)$/.exec(e)){if(i={type:"tag",tagType:"stream-inf"},t[1]){if(i.attributes=d(t[1]),i.attributes.RESOLUTION){var o=i.attributes.RESOLUTION.split("x"),l={};o[0]&&(l.width=parseInt(o[0],10)),o[1]&&(l.height=parseInt(o[1],10)),i.attributes.RESOLUTION=l}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))}n.trigger("data",i)}else{if(t=/^#EXT-X-MEDIA:?(.*)$/.exec(e))return i={type:"tag",tagType:"media"},t[1]&&(i.attributes=d(t[1])),void n.trigger("data",i);if(t=/^#EXT-X-ENDLIST/.exec(e))n.trigger("data",{type:"tag",tagType:"endlist"});else if(t=/^#EXT-X-DISCONTINUITY/.exec(e))n.trigger("data",{type:"tag",tagType:"discontinuity"});else{if(t=/^#EXT-X-PROGRAM-DATE-TIME:?(.*)$/.exec(e))return i={type:"tag",tagType:"program-date-time"},t[1]&&(i.dateTimeString=t[1],i.dateTimeObject=new Date(t[1])),void n.trigger("data",i);if(t=/^#EXT-X-KEY:?(.*)$/.exec(e))return i={type:"tag",tagType:"key"},t[1]&&(i.attributes=d(t[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 n.trigger("data",i);if(t=/^#EXT-X-START:?(.*)$/.exec(e))return i={type:"tag",tagType:"start"},t[1]&&(i.attributes=d(t[1]),i.attributes["TIME-OFFSET"]=parseFloat(i.attributes["TIME-OFFSET"]),i.attributes.PRECISE=/YES/.test(i.attributes.PRECISE)),void n.trigger("data",i);if(t=/^#EXT-X-CUE-OUT-CONT:?(.*)?$/.exec(e))return i={type:"tag",tagType:"cue-out-cont"},t[1]?i.data=t[1]:i.data="",void n.trigger("data",i);if(t=/^#EXT-X-CUE-OUT:?(.*)?$/.exec(e))return i={type:"tag",tagType:"cue-out"},t[1]?i.data=t[1]:i.data="",void n.trigger("data",i);if(t=/^#EXT-X-CUE-IN:?(.*)?$/.exec(e))return i={type:"tag",tagType:"cue-in"},t[1]?i.data=t[1]:i.data="",void n.trigger("data",i);if((t=/^#EXT-X-SKIP:(.*)$/.exec(e))&&t[1])return(i={type:"tag",tagType:"skip"}).attributes=d(t[1]),i.attributes.hasOwnProperty("SKIPPED-SEGMENTS")&&(i.attributes["SKIPPED-SEGMENTS"]=parseInt(i.attributes["SKIPPED-SEGMENTS"],10)),i.attributes.hasOwnProperty("RECENTLY-REMOVED-DATERANGES")&&(i.attributes["RECENTLY-REMOVED-DATERANGES"]=i.attributes["RECENTLY-REMOVED-DATERANGES"].split(u)),void n.trigger("data",i);if((t=/^#EXT-X-PART:(.*)$/.exec(e))&&t[1])return(i={type:"tag",tagType:"part"}).attributes=d(t[1]),["DURATION"].forEach((function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=parseFloat(i.attributes[e]))})),["INDEPENDENT","GAP"].forEach((function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=/YES/.test(i.attributes[e]))})),i.attributes.hasOwnProperty("BYTERANGE")&&(i.attributes.byterange=c(i.attributes.BYTERANGE)),void n.trigger("data",i);if((t=/^#EXT-X-SERVER-CONTROL:(.*)$/.exec(e))&&t[1])return(i={type:"tag",tagType:"server-control"}).attributes=d(t[1]),["CAN-SKIP-UNTIL","PART-HOLD-BACK","HOLD-BACK"].forEach((function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=parseFloat(i.attributes[e]))})),["CAN-SKIP-DATERANGES","CAN-BLOCK-RELOAD"].forEach((function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=/YES/.test(i.attributes[e]))})),void n.trigger("data",i);if((t=/^#EXT-X-PART-INF:(.*)$/.exec(e))&&t[1])return(i={type:"tag",tagType:"part-inf"}).attributes=d(t[1]),["PART-TARGET"].forEach((function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=parseFloat(i.attributes[e]))})),void n.trigger("data",i);if((t=/^#EXT-X-PRELOAD-HINT:(.*)$/.exec(e))&&t[1])return(i={type:"tag",tagType:"preload-hint"}).attributes=d(t[1]),["BYTERANGE-START","BYTERANGE-LENGTH"].forEach((function(e){if(i.attributes.hasOwnProperty(e)){i.attributes[e]=parseInt(i.attributes[e],10);var t="BYTERANGE-LENGTH"===e?"length":"offset";i.attributes.byterange=i.attributes.byterange||{},i.attributes.byterange[t]=i.attributes[e],delete i.attributes[e]}})),void n.trigger("data",i);if((t=/^#EXT-X-RENDITION-REPORT:(.*)$/.exec(e))&&t[1])return(i={type:"tag",tagType:"rendition-report"}).attributes=d(t[1]),["LAST-MSN","LAST-PART"].forEach((function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=parseInt(i.attributes[e],10))})),void n.trigger("data",i);n.trigger("data",{type:"tag",data:e.slice(4)})}}}else n.trigger("data",{type:"comment",text:e.slice(1)})})):this.trigger("data",{type:"uri",uri:e}))},i.addParser=function(e){var t=this,i=e.expression,n=e.customType,r=e.dataParser,s=e.segment;"function"!=typeof r&&(r=function(e){return e}),this.customParsers.push((function(e){if(i.exec(e))return t.trigger("data",{type:"custom",data:r(e),customType:n,segment:s}),!0}))},i.addTagMapper=function(e){var t=e.expression,i=e.map;this.tagMappers.push((function(e){return t.test(e)?i(e):e}))},t}(r.default),p=function(e){var t={};return Object.keys(e).forEach((function(i){var n;t[(n=i,n.toLowerCase().replace(/-(\w)/g,(function(e){return e[1].toUpperCase()})))]=e[i]})),t},f=function(e){var t=e.serverControl,i=e.targetDuration,n=e.partTargetDuration;if(t){var r="#EXT-X-SERVER-CONTROL",s="holdBack",a="partHoldBack",o=i&&3*i,l=n&&2*n;i&&!t.hasOwnProperty(s)&&(t[s]=o,this.trigger("info",{message:r+" defaulting HOLD-BACK to targetDuration * 3 ("+o+")."})),o&&t[s]<o&&(this.trigger("warn",{message:r+" clamping HOLD-BACK ("+t[s]+") to targetDuration * 3 ("+o+")"}),t[s]=o),n&&!t.hasOwnProperty(a)&&(t[a]=3*n,this.trigger("info",{message:r+" defaulting PART-HOLD-BACK to partTargetDuration * 3 ("+t[a]+")."})),n&&t[a]<l&&(this.trigger("warn",{message:r+" clamping PART-HOLD-BACK ("+t[a]+") to partTargetDuration * 2 ("+l+")."}),t[a]=l)}},m=function(e){function t(){var t;(t=e.call(this)||this).lineStream=new l,t.parseStream=new h,t.lineStream.pipe(t.parseStream);var i,n,r=(0,a.default)(t),u=[],c={},d=!1,m=function(){},g={AUDIO:{},VIDEO:{},"CLOSED-CAPTIONS":{},SUBTITLES:{}},v=0;t.manifest={allowCache:!0,discontinuityStarts:[],segments:[]};var y=0,_=0;return t.on("end",(function(){c.uri||!c.parts&&!c.preloadHints||(!c.map&&i&&(c.map=i),!c.key&&n&&(c.key=n),c.timeline||"number"!=typeof v||(c.timeline=v),t.manifest.preloadSegment=c)})),t.parseStream.on("data",(function(e){var t,a;({tag:function(){({version:function(){e.version&&(this.manifest.version=e.version)},"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&&(c.byterange=t,t.length=e.length,"offset" in e||(e.offset=y)),"offset" in e&&(c.byterange=t,t.offset=e.offset),y=t.offset+t.length},endlist:function(){this.manifest.endList=!0},inf:function(){"mediaSequence" in this.manifest||(this.manifest.mediaSequence=0,this.trigger("info",{message:"defaulting media sequence to zero"})),"discontinuitySequence" in this.manifest||(this.manifest.discontinuitySequence=0,this.trigger("info",{message:"defaulting discontinuity sequence to zero"})),e.duration>0&&(c.duration=e.duration),0===e.duration&&(c.duration=.01,this.trigger("info",{message:"updating zero segment duration to a small value"})),this.manifest.segments=u},key:function(){if(e.attributes)if("NONE"!==e.attributes.METHOD)if(e.attributes.URI){if("com.apple.streamingkeydelivery"===e.attributes.KEYFORMAT)return this.manifest.contentProtection=this.manifest.contentProtection||{},void(this.manifest.contentProtection["com.apple.fps.1_0"]={attributes:e.attributes});if("urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed"===e.attributes.KEYFORMAT){return-1===["SAMPLE-AES","SAMPLE-AES-CTR","SAMPLE-AES-CENC"].indexOf(e.attributes.METHOD)?void this.trigger("warn",{message:"invalid key method provided for Widevine"}):("SAMPLE-AES-CENC"===e.attributes.METHOD&&this.trigger("warn",{message:"SAMPLE-AES-CENC is deprecated, please use SAMPLE-AES-CTR instead"}),"data:text/plain;base64,"!==e.attributes.URI.substring(0,23)?void this.trigger("warn",{message:"invalid key URI provided for Widevine"}):e.attributes.KEYID&&"0x"===e.attributes.KEYID.substring(0,2)?(this.manifest.contentProtection=this.manifest.contentProtection||{},void(this.manifest.contentProtection["com.widevine.alpha"]={attributes:{schemeIdUri:e.attributes.KEYFORMAT,keyId:e.attributes.KEYID.substring(2)},pssh:(0,o.default)(e.attributes.URI.split(",")[1])})):void this.trigger("warn",{message:"invalid key ID provided for Widevine"}))}e.attributes.METHOD||this.trigger("warn",{message:"defaulting key method to AES-128"}),n={method:e.attributes.METHOD||"AES-128",uri:e.attributes.URI},void 0!==e.attributes.IV&&(n.iv=e.attributes.IV)}else this.trigger("warn",{message:"ignoring key declaration without URI"});else n=null;else 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,v=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(){i={},e.uri&&(i.uri=e.uri),e.byterange&&(i.byterange=e.byterange),n&&(i.key=n)},"stream-inf":function(){this.manifest.playlists=u,this.manifest.mediaGroups=this.manifest.mediaGroups||g,e.attributes?(c.attributes||(c.attributes={}),(0,s.default)(c.attributes,e.attributes)):this.trigger("warn",{message:"ignoring empty stream-inf attributes"})},media:function(){if(this.manifest.mediaGroups=this.manifest.mediaGroups||g,e.attributes&&e.attributes.TYPE&&e.attributes["GROUP-ID"]&&e.attributes.NAME){var i=this.manifest.mediaGroups[e.attributes.TYPE];i[e.attributes["GROUP-ID"]]=i[e.attributes["GROUP-ID"]]||{},t=i[e.attributes["GROUP-ID"]],(a={default:/yes/i.test(e.attributes.DEFAULT)}).default?a.autoselect=!0:a.autoselect=/yes/i.test(e.attributes.AUTOSELECT),e.attributes.LANGUAGE&&(a.language=e.attributes.LANGUAGE),e.attributes.URI&&(a.uri=e.attributes.URI),e.attributes["INSTREAM-ID"]&&(a.instreamId=e.attributes["INSTREAM-ID"]),e.attributes.CHARACTERISTICS&&(a.characteristics=e.attributes.CHARACTERISTICS),e.attributes.FORCED&&(a.forced=/yes/i.test(e.attributes.FORCED)),t[e.attributes.NAME]=a}else this.trigger("warn",{message:"ignoring incomplete or missing media group"})},discontinuity:function(){v+=1,c.discontinuity=!0,this.manifest.discontinuityStarts.push(u.length)},"program-date-time":function(){void 0===this.manifest.dateTimeString&&(this.manifest.dateTimeString=e.dateTimeString,this.manifest.dateTimeObject=e.dateTimeObject),c.dateTimeString=e.dateTimeString,c.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,f.call(this,this.manifest))},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(){c.cueOut=e.data},"cue-out-cont":function(){c.cueOutCont=e.data},"cue-in":function(){c.cueIn=e.data},skip:function(){this.manifest.skip=p(e.attributes),this.warnOnMissingAttributes_("#EXT-X-SKIP",e.attributes,["SKIPPED-SEGMENTS"])},part:function(){var t=this;d=!0;var i=this.manifest.segments.length,n=p(e.attributes);c.parts=c.parts||[],c.parts.push(n),n.byterange&&(n.byterange.hasOwnProperty("offset")||(n.byterange.offset=_),_=n.byterange.offset+n.byterange.length);var r=c.parts.length-1;this.warnOnMissingAttributes_("#EXT-X-PART #"+r+" for segment #"+i,e.attributes,["URI","DURATION"]),this.manifest.renditionReports&&this.manifest.renditionReports.forEach((function(e,i){e.hasOwnProperty("lastPart")||t.trigger("warn",{message:"#EXT-X-RENDITION-REPORT #"+i+" lacks required attribute(s): LAST-PART"})}))},"server-control":function(){var t=this.manifest.serverControl=p(e.attributes);t.hasOwnProperty("canBlockReload")||(t.canBlockReload=!1,this.trigger("info",{message:"#EXT-X-SERVER-CONTROL defaulting CAN-BLOCK-RELOAD to false"})),f.call(this,this.manifest),t.canSkipDateranges&&!t.hasOwnProperty("canSkipUntil")&&this.trigger("warn",{message:"#EXT-X-SERVER-CONTROL lacks required attribute CAN-SKIP-UNTIL which is required when CAN-SKIP-DATERANGES is set"})},"preload-hint":function(){var t=this.manifest.segments.length,i=p(e.attributes),n=i.type&&"PART"===i.type;c.preloadHints=c.preloadHints||[],c.preloadHints.push(i),i.byterange&&(i.byterange.hasOwnProperty("offset")||(i.byterange.offset=n?_:0,n&&(_=i.byterange.offset+i.byterange.length)));var r=c.preloadHints.length-1;if(this.warnOnMissingAttributes_("#EXT-X-PRELOAD-HINT #"+r+" for segment #"+t,e.attributes,["TYPE","URI"]),i.type)for(var s=0;s<c.preloadHints.length-1;s++){var a=c.preloadHints[s];a.type&&(a.type===i.type&&this.trigger("warn",{message:"#EXT-X-PRELOAD-HINT #"+r+" for segment #"+t+" has the same TYPE "+i.type+" as preload hint #"+s}))}},"rendition-report":function(){var t=p(e.attributes);this.manifest.renditionReports=this.manifest.renditionReports||[],this.manifest.renditionReports.push(t);var i=this.manifest.renditionReports.length-1,n=["LAST-MSN","URI"];d&&n.push("LAST-PART"),this.warnOnMissingAttributes_("#EXT-X-RENDITION-REPORT #"+i,e.attributes,n)},"part-inf":function(){this.manifest.partInf=p(e.attributes),this.warnOnMissingAttributes_("#EXT-X-PART-INF",e.attributes,["PART-TARGET"]),this.manifest.partInf.partTarget&&(this.manifest.partTargetDuration=this.manifest.partInf.partTarget),f.call(this,this.manifest)}}[e.tagType]||m).call(r)},uri:function(){c.uri=e.uri,u.push(c),this.manifest.targetDuration&&!("duration" in c)&&(this.trigger("warn",{message:"defaulting segment duration to the target duration"}),c.duration=this.manifest.targetDuration),n&&(c.key=n),c.timeline=v,i&&(c.map=i),_=0,c={}},comment:function(){},custom:function(){e.segment?(c.custom=c.custom||{},c.custom[e.customType]=e.data):(this.manifest.custom=this.manifest.custom||{},this.manifest.custom[e.customType]=e.data)}})[e.type].call(r)})),t}(0,n.default)(t,e);var i=t.prototype;return i.warnOnMissingAttributes_=function(e,t,i){var n=[];i.forEach((function(e){t.hasOwnProperty(e)||n.push(e)})),n.length&&this.trigger("warn",{message:e+" lacks required attribute(s): "+n.join(", ")})},i.push=function(e){this.lineStream.push(e)},i.end=function(){this.lineStream.push("\n"),this.trigger("end")},i.addParser=function(e){this.parseStream.addParser(e)},i.addTagMapper=function(e){this.parseStream.addTagMapper(e)},t}(r.default)},(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>n});var n=function(){function e(){this.listeners={}}var t=e.prototype;return t.on=function(e,t){this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push(t)},t.off=function(e,t){if(!this.listeners[e])return!1;var i=this.listeners[e].indexOf(t);return this.listeners[e]=this.listeners[e].slice(0),this.listeners[e].splice(i,1),i>-1},t.trigger=function(e){var t=this.listeners[e];if(t)if(2===arguments.length)for(var i=t.length,n=0;n<i;++n)t[n].call(this,arguments[1]);else for(var r=Array.prototype.slice.call(arguments,1),s=t.length,a=0;a<s;++a)t[a].apply(this,r)},t.dispose=function(){this.listeners={}},t.pipe=function(e){this.on("data",(function(t){e.push(t)}))},e}()},(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>s});var n=i(67),r=i.n(n);function s(e){for(var t,i=(t=e,r().atob?r().atob(t):Buffer.from(t,"base64").toString("binary")),n=new Uint8Array(i.length),s=0;s<i.length;s++)n[s]=i.charCodeAt(s);return n}},(e,t,i)=>{"use strict";i.r(t),i.d(t,{DEFAULT_AUDIO_CODEC:()=>_,DEFAULT_VIDEO_CODEC:()=>b,browserSupportsCodec:()=>v,codecsFromDefault:()=>h,getMimeForCodec:()=>g,isAudioCodec:()=>f,isTextCodec:()=>m,isVideoCodec:()=>p,mapLegacyAvcCodecs:()=>c,muxerSupportsCodec:()=>y,parseCodecs:()=>d,translateLegacyCodec:()=>l,translateLegacyCodecs:()=>u});var n=i(67),r=i.n(n),s={mp4:/^(av0?1|avc0?[1234]|vp0?9|flac|opus|mp3|mp4a|mp4v|stpp.ttml.im1t)/,webm:/^(vp0?[89]|av0?1|opus|vorbis)/,ogg:/^(vp0?[89]|theora|flac|opus|vorbis)/,video:/^(av0?1|avc0?[1234]|vp0?[89]|hvc1|hev1|theora|mp4v)/,audio:/^(mp4a|flac|vorbis|opus|ac-[34]|ec-3|alac|mp3|speex|aac)/,text:/^(stpp.ttml.im1t)/,muxerVideo:/^(avc0?1)/,muxerAudio:/^(mp4a)/,muxerText:/a^/},a=["video","audio","text"],o=["Video","Audio","Text"],l=function(e){return e?e.replace(/avc1\.(\d+)\.(\d+)/i,(function(e,t,i){return"avc1."+("00"+Number(t).toString(16)).slice(-2)+"00"+("00"+Number(i).toString(16)).slice(-2)})):e},u=function(e){return e.map(l)},c=function(e){return e.replace(/avc1\.(\d+)\.(\d+)/i,(function(e){return u([e])[0]}))},d=function(e){void 0===e&&(e="");var t=e.split(","),i=[];return t.forEach((function(e){var t;e=e.trim(),a.forEach((function(n){var r=s[n].exec(e.toLowerCase());if(r&&!(r.length<=1)){t=n;var a=e.substring(0,r[1].length),o=e.replace(a,"");i.push({type:a,details:o,mediaType:n})}})),t||i.push({type:e,details:"",mediaType:"unknown"})})),i},h=function(e,t){if(!e.mediaGroups.AUDIO||!t)return null;var i=e.mediaGroups.AUDIO[t];if(!i)return null;for(var n in i){var r=i[n];if(r.default&&r.playlists)return d(r.playlists[0].attributes.CODECS)}return null},p=function(e){return void 0===e&&(e=""),s.video.test(e.trim().toLowerCase())},f=function(e){return void 0===e&&(e=""),s.audio.test(e.trim().toLowerCase())},m=function(e){return void 0===e&&(e=""),s.text.test(e.trim().toLowerCase())},g=function(e){if(e&&"string"==typeof e){var t=e.toLowerCase().split(",").map((function(e){return l(e.trim())})),i="video";1===t.length&&f(t[0])?i="audio":1===t.length&&m(t[0])&&(i="application");var n="mp4";return t.every((function(e){return s.mp4.test(e)}))?n="mp4":t.every((function(e){return s.webm.test(e)}))?n="webm":t.every((function(e){return s.ogg.test(e)}))&&(n="ogg"),i+"/"+n+';codecs="'+e+'"'}},v=function(e){return void 0===e&&(e=""),r().MediaSource&&r().MediaSource.isTypeSupported&&r().MediaSource.isTypeSupported(g(e))||!1},y=function(e){return void 0===e&&(e=""),e.toLowerCase().split(",").every((function(e){e=e.trim();for(var t=0;t<o.length;t++){if(s["muxer"+o[t]].test(e))return!0}return!1}))},_="mp4a.40.2",b="avc1.4d400d"},(e,t,i)=>{"use strict";i.r(t),i.d(t,{simpleTypeFromSourceType:()=>s});var n=/^(audio|video|application)\/(x-|vnd\.apple\.)?mpegurl/i,r=/^application\/dash\+xml/i,s=function(e){return n.test(e)?"hls":r.test(e)?"dash":"application/vnd.videojs.vhs+json"===e?"vhs-json":null}},(e,t,i)=>{"use strict";i.r(t),i.d(t,{VERSION:()=>le,addSidxSegmentsToPlaylist:()=>C,generateSidxKey:()=>L,inheritAttributes:()=>ae,parse:()=>ue,parseUTCTiming:()=>ce,stringToMpdXml:()=>oe,toM3u8:()=>H,toPlaylists:()=>Y});var n=i(87),r=i(67),s=i.n(r),a=i(95),o=i(91),l=i(96),u=function(e){return!!e&&"object"==typeof e},c=function e(){for(var t=arguments.length,i=new Array(t),n=0;n<t;n++)i[n]=arguments[n];return i.reduce((function(t,i){return"object"!=typeof i||Object.keys(i).forEach((function(n){Array.isArray(t[n])&&Array.isArray(i[n])?t[n]=t[n].concat(i[n]):u(t[n])&&u(i[n])?t[n]=e(t[n],i[n]):t[n]=i[n]})),t}),{})},d=function(e){return Object.keys(e).map((function(t){return e[t]}))},h=function(e){return e.reduce((function(e,t){return e.concat(t)}),[])},p=function(e){if(!e.length)return[];for(var t=[],i=0;i<e.length;i++)t.push(e[i]);return t},f=function(e,t){for(var i=0;i<e.length;i++)if(t(e[i]))return i;return-1},m="INVALID_NUMBER_OF_PERIOD",g="DASH_EMPTY_MANIFEST",v="DASH_INVALID_XML",y="NO_BASE_URL",_="SEGMENT_TIME_UNSPECIFIED",b="UNSUPPORTED_UTC_TIMING_SCHEME",T=function(e){var t=e.baseUrl,i=void 0===t?"":t,r=e.source,a=void 0===r?"":r,o=e.range,l=void 0===o?"":o,u=e.indexRange,c=void 0===u?"":u,d={uri:a,resolvedUri:(0,n.default)(i||"",a)};if(l||c){var h,p=(l||c).split("-"),f=s().BigInt?s().BigInt(p[0]):parseInt(p[0],10),m=s().BigInt?s().BigInt(p[1]):parseInt(p[1],10);f<Number.MAX_SAFE_INTEGER&&"bigint"==typeof f&&(f=Number(f)),m<Number.MAX_SAFE_INTEGER&&"bigint"==typeof m&&(m=Number(m)),"bigint"==typeof(h="bigint"==typeof m||"bigint"==typeof f?s().BigInt(m)-s().BigInt(f)+s().BigInt(1):m-f+1)&&h<Number.MAX_SAFE_INTEGER&&(h=Number(h)),d.byterange={length:h,offset:f}}return d},w=function(e){return e&&"number"!=typeof e&&(e=parseInt(e,10)),isNaN(e)?null:e},S={static:function(e){var t=e.duration,i=e.timescale,n=void 0===i?1:i,r=e.sourceDuration,s=e.periodDuration,a=w(e.endNumber),o=t/n;return"number"==typeof a?{start:0,end:a}:"number"==typeof s?{start:0,end:s/o}:{start:0,end:r/o}},dynamic:function(e){var t=e.NOW,i=e.clientOffset,n=e.availabilityStartTime,r=e.timescale,s=void 0===r?1:r,a=e.duration,o=e.periodStart,l=void 0===o?0:o,u=e.minimumUpdatePeriod,c=void 0===u?0:u,d=e.timeShiftBufferDepth,h=void 0===d?1/0:d,p=w(e.endNumber),f=(t+i)/1e3,m=n+l,g=f+c-m,v=Math.ceil(g*s/a),y=Math.floor((f-m-h)*s/a),_=Math.floor((f-m)*s/a);return{start:Math.max(0,y),end:"number"==typeof p?p:Math.min(v,_)}}},k=function(e){var t=e.type,i=e.duration,n=e.timescale,r=void 0===n?1:n,s=e.periodDuration,a=e.sourceDuration,o=S[t](e),l=function(e,t){for(var i=[],n=e;n<t;n++)i.push(n);return i}(o.start,o.end).map(function(e){return function(t){var i=e.duration,n=e.timescale,r=void 0===n?1:n,s=e.periodStart,a=e.startNumber;return{number:(void 0===a?1:a)+t,duration:i/r,timeline:s,time:t*i}}}(e));if("static"===t){var u=l.length-1,c="number"==typeof s?s:a;l[u].duration=c-i/r*u}return l},E=function(e){var t=e.baseUrl,i=e.initialization,n=void 0===i?{}:i,r=e.sourceDuration,s=e.indexRange,a=void 0===s?"":s,o=e.periodStart,l=e.presentationTime,u=e.number,c=void 0===u?0:u,d=e.duration;if(!t)throw new Error(y);var h=T({baseUrl:t,source:n.sourceURL,range:n.range}),p=T({baseUrl:t,source:t,indexRange:a});if(p.map=h,d){var f=k(e);f.length&&(p.duration=f[0].duration,p.timeline=f[0].timeline)}else r&&(p.duration=r,p.timeline=o);return p.presentationTime=l||o,p.number=c,[p]},C=function(e,t,i){var n,r=e.sidx.map?e.sidx.map:null,a=e.sidx.duration,o=e.timeline||0,l=e.sidx.byterange,u=l.offset+l.length,c=t.timescale,d=t.references.filter((function(e){return 1!==e.referenceType})),h=[],p=e.endList?"static":"dynamic",f=e.sidx.timeline,m=f,g=e.mediaSequence||0;n="bigint"==typeof t.firstOffset?s().BigInt(u)+t.firstOffset:u+t.firstOffset;for(var v=0;v<d.length;v++){var y=t.references[v],_=y.referencedSize,b=y.subsegmentDuration,T=void 0;T="bigint"==typeof n?n+s().BigInt(_)-s().BigInt(1):n+_-1;var w=E({baseUrl:i,timescale:c,timeline:o,periodStart:f,presentationTime:m,number:g,duration:b,sourceDuration:a,indexRange:n+"-"+T,type:p})[0];r&&(w.map=r),h.push(w),n+="bigint"==typeof n?s().BigInt(_):_,m+=b/c,g++}return e.segments=h,e},x=["AUDIO","SUBTITLES"],A=function(e){return(t=e,i=function(e){return e.timeline},d(t.reduce((function(e,t){return t.forEach((function(t){e[i(t)]=t})),e}),{}))).sort((function(e,t){return e.timeline>t.timeline?1:-1}));var t,i},P=function(e){var t=[];return(0,a.forEachMediaGroup)(e,x,(function(e,i,n,r){t=t.concat(e.playlists||[])})),t},I=function(e){var t=e.playlist,i=e.mediaSequence;t.mediaSequence=i,t.segments.forEach((function(e,i){e.number=t.mediaSequence+i}))},O=function(e){var t=e.oldManifest,i=e.newManifest,n=t.playlists.concat(P(t)),r=i.playlists.concat(P(i));return i.timelineStarts=A([t.timelineStarts,i.timelineStarts]),function(e){var t=e.oldPlaylists,i=e.newPlaylists,n=e.timelineStarts;i.forEach((function(e){e.discontinuitySequence=f(n,(function(t){return t.timeline===e.timeline}));var i=function(e,t){for(var i=0;i<e.length;i++)if(e[i].attributes.NAME===t)return e[i];return null}(t,e.attributes.NAME);if(i&&!e.sidx){var r=e.segments[0],s=f(i.segments,(function(e){return Math.abs(e.presentationTime-r.presentationTime)<.016666666666666666}));if(-1===s)return I({playlist:e,mediaSequence:i.mediaSequence+i.segments.length}),e.segments[0].discontinuity=!0,e.discontinuityStarts.unshift(0),void((!i.segments.length&&e.timeline>i.timeline||i.segments.length&&e.timeline>i.segments[i.segments.length-1].timeline)&&e.discontinuitySequence--);i.segments[s].discontinuity&&!r.discontinuity&&(r.discontinuity=!0,e.discontinuityStarts.unshift(0),e.discontinuitySequence--),I({playlist:e,mediaSequence:i.segments[s].number})}}))}({oldPlaylists:n,newPlaylists:r,timelineStarts:i.timelineStarts}),i},L=function(e){return e&&e.uri+"-"+(t=e.byterange,i="bigint"==typeof t.offset||"bigint"==typeof t.length?s().BigInt(t.offset)+s().BigInt(t.length)-s().BigInt(1):t.offset+t.length-1,t.offset+"-"+i);var t,i},D=function(e){return d(e.reduce((function(e,t){var i=t.attributes.id+(t.attributes.lang||"");if(e[i]){var n;if(t.segments)t.segments[0]&&(t.segments[0].discontinuity=!0),(n=e[i].segments).push.apply(n,t.segments);t.attributes.contentProtection&&(e[i].attributes.contentProtection=t.attributes.contentProtection)}else e[i]=t,e[i].attributes.timelineStarts=[];return e[i].attributes.timelineStarts.push({start:t.attributes.periodStart,timeline:t.attributes.periodStart}),e}),{})).map((function(e){var t,i;return e.discontinuityStarts=(t=e.segments||[],i="discontinuity",t.reduce((function(e,t,n){return t[i]&&e.push(n),e}),[])),e}))},M=function(e,t){var i=L(e.sidx),n=i&&t[i]&&t[i].sidx;return n&&C(e,n,e.sidx.resolvedUri),e},N=function(e,t){if(void 0===t&&(t={}),!Object.keys(t).length)return e;for(var i in e)e[i]=M(e[i],t);return e},R=function(e){var t,i=e.attributes,n=e.segments,r=e.sidx,s=e.discontinuityStarts,a={attributes:(t={NAME:i.id,AUDIO:"audio",SUBTITLES:"subs",RESOLUTION:{width:i.width,height:i.height},CODECS:i.codecs,BANDWIDTH:i.bandwidth},t["PROGRAM-ID"]=1,t),uri:"",endList:"static"===i.type,timeline:i.periodStart,resolvedUri:"",targetDuration:i.duration,discontinuityStarts:s,timelineStarts:i.timelineStarts,segments:n};return i.contentProtection&&(a.contentProtection=i.contentProtection),r&&(a.sidx=r),a},U=function(e){var t=e.attributes;return"video/mp4"===t.mimeType||"video/webm"===t.mimeType||"video"===t.contentType},B=function(e){var t=e.attributes;return"audio/mp4"===t.mimeType||"audio/webm"===t.mimeType||"audio"===t.contentType},j=function(e){var t=e.attributes;return"text/vtt"===t.mimeType||"text"===t.contentType},F=function(e){return e?Object.keys(e).reduce((function(t,i){var n=e[i];return t.concat(n.playlists)}),[]):[]},H=function(e){var t,i=e.dashPlaylists,n=e.locations,r=e.sidxMapping,s=void 0===r?{}:r,a=e.previousManifest;if(!i.length)return{};var o=i[0].attributes,l=o.sourceDuration,u=o.type,c=o.suggestedPresentationDelay,d=o.minimumUpdatePeriod,h=D(i.filter(U)).map(R),p=D(i.filter(B)),m=D(i.filter(j)),g=i.map((function(e){return e.attributes.captionServices})).filter(Boolean),v={allowCache:!0,discontinuityStarts:[],segments:[],endList:!0,mediaGroups:(t={AUDIO:{},VIDEO:{}},t["CLOSED-CAPTIONS"]={},t.SUBTITLES={},t),uri:"",duration:l,playlists:N(h,s)};d>=0&&(v.minimumUpdatePeriod=1e3*d),n&&(v.locations=n),"dynamic"===u&&(v.suggestedPresentationDelay=c);var y,_,b=0===v.playlists.length,T=p.length?function(e,t,i){var n;void 0===t&&(t={}),void 0===i&&(i=!1);var r=e.reduce((function(e,r){var s=r.attributes.role&&r.attributes.role.value||"",a=r.attributes.lang||"",o=r.attributes.label||"main";if(a&&!r.attributes.label){var l=s?" ("+s+")":"";o=""+r.attributes.lang+l}e[o]||(e[o]={language:a,autoselect:!0,default:"main"===s,playlists:[],uri:""});var u=M(function(e,t){var i,n=e.attributes,r=e.segments,s=e.sidx,a=e.mediaSequence,o=e.discontinuitySequence,l=e.discontinuityStarts,u={attributes:(i={NAME:n.id,BANDWIDTH:n.bandwidth,CODECS:n.codecs},i["PROGRAM-ID"]=1,i),uri:"",endList:"static"===n.type,timeline:n.periodStart,resolvedUri:"",targetDuration:n.duration,discontinuitySequence:o,discontinuityStarts:l,timelineStarts:n.timelineStarts,mediaSequence:a,segments:r};return n.contentProtection&&(u.contentProtection=n.contentProtection),s&&(u.sidx=s),t&&(u.attributes.AUDIO="audio",u.attributes.SUBTITLES="subs"),u}(r,i),t);return e[o].playlists.push(u),void 0===n&&"main"===s&&((n=r).default=!0),e}),{});return n||(r[Object.keys(r)[0]].default=!0),r}(p,s,b):null,w=m.length?function(e,t){return void 0===t&&(t={}),e.reduce((function(e,i){var n=i.attributes.lang||"text";return e[n]||(e[n]={language:n,default:!1,autoselect:!1,playlists:[],uri:""}),e[n].playlists.push(M(function(e){var t,i=e.attributes,n=e.segments,r=e.mediaSequence,s=e.discontinuityStarts,a=e.discontinuitySequence;void 0===n&&(n=[{uri:i.baseUrl,timeline:i.periodStart,resolvedUri:i.baseUrl||"",duration:i.sourceDuration,number:0}],i.duration=i.sourceDuration);var o=((t={NAME:i.id,BANDWIDTH:i.bandwidth})["PROGRAM-ID"]=1,t);return i.codecs&&(o.CODECS=i.codecs),{attributes:o,uri:"",endList:"static"===i.type,timeline:i.periodStart,resolvedUri:i.baseUrl||"",targetDuration:i.duration,timelineStarts:i.timelineStarts,discontinuityStarts:s,discontinuitySequence:a,mediaSequence:r,segments:n}}(i),t)),e}),{})}(m,s):null,S=h.concat(F(T),F(w)),k=S.map((function(e){return e.timelineStarts}));return v.timelineStarts=A(k),y=S,_=v.timelineStarts,y.forEach((function(e){e.mediaSequence=0,e.discontinuitySequence=f(_,(function(t){return t.timeline===e.timeline})),e.segments&&e.segments.forEach((function(e,t){e.number=t}))})),T&&(v.mediaGroups.AUDIO.audio=T),w&&(v.mediaGroups.SUBTITLES.subs=w),g.length&&(v.mediaGroups["CLOSED-CAPTIONS"].cc=g.reduce((function(e,t){return t?(t.forEach((function(t){var i=t.channel,n=t.language;e[n]={autoselect:!1,default:!1,instreamId:i,language:n},t.hasOwnProperty("aspectRatio")&&(e[n].aspectRatio=t.aspectRatio),t.hasOwnProperty("easyReader")&&(e[n].easyReader=t.easyReader),t.hasOwnProperty("3D")&&(e[n]["3D"]=t["3D"])})),e):e}),{})),a?O({oldManifest:a,newManifest:v}):v},q=function(e,t,i){var n=e.NOW,r=e.clientOffset,s=e.availabilityStartTime,a=e.timescale,o=void 0===a?1:a,l=e.periodStart,u=void 0===l?0:l,c=e.minimumUpdatePeriod,d=(n+r)/1e3+(void 0===c?0:c)-(s+u);return Math.ceil((d*o-t)/i)},z=function(e,t){for(var i=e.type,n=e.minimumUpdatePeriod,r=void 0===n?0:n,s=e.media,a=void 0===s?"":s,o=e.sourceDuration,l=e.timescale,u=void 0===l?1:l,c=e.startNumber,d=void 0===c?1:c,h=e.periodStart,p=[],f=-1,m=0;m<t.length;m++){var g=t[m],v=g.d,y=g.r||0,_=g.t||0;f<0&&(f=_),_&&_>f&&(f=_);var b=void 0;if(y<0){var T=m+1;b=T===t.length?"dynamic"===i&&r>0&&a.indexOf("$Number$")>0?q(e,f,v):(o*u-f)/v:(t[T].t-f)/v}else b=y+1;for(var w=d+p.length+b,S=d+p.length;S<w;)p.push({number:S,duration:v/u,time:f,timeline:h}),f+=v,S++}return p},W=/\$([A-z]*)(?:(%0)([0-9]+)d)?\$/g,V=function(e,t){return e.replace(W,function(e){return function(t,i,n,r){if("$$"===t)return"$";if(void 0===e[i])return t;var s=""+e[i];return"RepresentationID"===i?s:(r=n?parseInt(r,10):1,s.length>=r?s:""+new Array(r-s.length+1).join("0")+s)}}(t))},$=function(e,t){var i={RepresentationID:e.id,Bandwidth:e.bandwidth||0},r=e.initialization,s=void 0===r?{sourceURL:"",range:""}:r,a=T({baseUrl:e.baseUrl,source:V(s.sourceURL,i),range:s.range}),o=function(e,t){return e.duration||t?e.duration?k(e):z(e,t):[{number:e.startNumber||1,duration:e.sourceDuration,time:0,timeline:e.periodStart}]}(e,t);return o.map((function(t){i.Number=t.number,i.Time=t.time;var r=V(e.media||"",i),s=e.timescale||1,o=e.presentationTimeOffset||0,l=e.periodStart+(t.time-o)/s;return{uri:r,timeline:t.timeline,duration:t.duration,resolvedUri:(0,n.default)(e.baseUrl||"",r),map:a,number:t.number,presentationTime:l}}))},X=function(e,t){var i=e.duration,n=e.segmentUrls,r=void 0===n?[]:n,s=e.periodStart;if(!i&&!t||i&&t)throw new Error(_);var a,o=r.map((function(t){return function(e,t){var i=e.baseUrl,n=e.initialization,r=void 0===n?{}:n,s=T({baseUrl:i,source:r.sourceURL,range:r.range}),a=T({baseUrl:i,source:t.media,range:t.mediaRange});return a.map=s,a}(e,t)}));return i&&(a=k(e)),t&&(a=z(e,t)),a.map((function(t,i){if(o[i]){var n=o[i],r=e.timescale||1,a=e.presentationTimeOffset||0;return n.timeline=t.timeline,n.duration=t.duration,n.number=t.number,n.presentationTime=s+(t.time-a)/r,n}})).filter((function(e){return e}))},G=function(e){var t,i,n=e.attributes,r=e.segmentInfo;r.template?(i=$,t=c(n,r.template)):r.base?(i=E,t=c(n,r.base)):r.list&&(i=X,t=c(n,r.list));var s={attributes:n};if(!i)return s;var a=i(t,r.segmentTimeline);if(t.duration){var o=t,l=o.duration,u=o.timescale,d=void 0===u?1:u;t.duration=l/d}else a.length?t.duration=a.reduce((function(e,t){return Math.max(e,Math.ceil(t.duration))}),0):t.duration=0;return s.attributes=t,s.segments=a,r.base&&t.indexRange&&(s.sidx=a[0],s.segments=[]),s},Y=function(e){return e.map(G)},K=function(e,t){return p(e.childNodes).filter((function(e){return e.tagName===t}))},Q=function(e){return e.textContent.trim()},J=function(e){var t=/P(?:(\d*)Y)?(?:(\d*)M)?(?:(\d*)D)?(?:T(?:(\d*)H)?(?:(\d*)M)?(?:([\d.]*)S)?)?/.exec(e);if(!t)return 0;var i=t.slice(1),n=i[0],r=i[1],s=i[2],a=i[3],o=i[4],l=i[5];return 31536e3*parseFloat(n||0)+2592e3*parseFloat(r||0)+86400*parseFloat(s||0)+3600*parseFloat(a||0)+60*parseFloat(o||0)+parseFloat(l||0)},Z={mediaPresentationDuration:function(e){return J(e)},availabilityStartTime:function(e){return/^\d+-\d+-\d+T\d+:\d+:\d+(\.\d+)?$/.test(t=e)&&(t+="Z"),Date.parse(t)/1e3;var t},minimumUpdatePeriod:function(e){return J(e)},suggestedPresentationDelay:function(e){return J(e)},type:function(e){return e},timeShiftBufferDepth:function(e){return J(e)},start:function(e){return J(e)},width:function(e){return parseInt(e,10)},height:function(e){return parseInt(e,10)},bandwidth:function(e){return parseInt(e,10)},startNumber:function(e){return parseInt(e,10)},timescale:function(e){return parseInt(e,10)},presentationTimeOffset:function(e){return parseInt(e,10)},duration:function(e){var t=parseInt(e,10);return isNaN(t)?J(e):t},d:function(e){return parseInt(e,10)},t:function(e){return parseInt(e,10)},r:function(e){return parseInt(e,10)},DEFAULT:function(e){return e}},ee=function(e){return e&&e.attributes?p(e.attributes).reduce((function(e,t){var i=Z[t.name]||Z.DEFAULT;return e[t.name]=i(t.value),e}),{}):{}},te={"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"},ie=function(e,t){return t.length?h(e.map((function(e){return t.map((function(t){return(0,n.default)(e,Q(t))}))}))):e},ne=function(e){var t=K(e,"SegmentTemplate")[0],i=K(e,"SegmentList")[0],n=i&&K(i,"SegmentURL").map((function(e){return c({tag:"SegmentURL"},ee(e))})),r=K(e,"SegmentBase")[0],s=i||t,a=s&&K(s,"SegmentTimeline")[0],o=i||r||t,l=o&&K(o,"Initialization")[0],u=t&&ee(t);u&&l?u.initialization=l&&ee(l):u&&u.initialization&&(u.initialization={sourceURL:u.initialization});var d={template:u,segmentTimeline:a&&K(a,"S").map((function(e){return ee(e)})),list:i&&c(ee(i),{segmentUrls:n,initialization:ee(l)}),base:r&&c(ee(r),{initialization:ee(l)})};return Object.keys(d).forEach((function(e){d[e]||delete d[e]})),d},re=function(e,t,i){return function(n){var r,s=ee(n),a=ie(t,K(n,"BaseURL")),l=K(n,"Role")[0],u={role:ee(l)},d=c(e,s,u),p=K(n,"Accessibility")[0],f="urn:scte:dash:cc:cea-608:2015"===(r=ee(p)).schemeIdUri?("string"!=typeof r.value?[]:r.value.split(";")).map((function(e){var t,i;if(i=e,/^CC\d=/.test(e)){var n=e.split("=");t=n[0],i=n[1]}else/^CC\d$/.test(e)&&(t=e);return{channel:t,language:i}})):"urn:scte:dash:cc:cea-708:2015"===r.schemeIdUri?("string"!=typeof r.value?[]:r.value.split(";")).map((function(e){var t={channel:void 0,language:void 0,aspectRatio:1,easyReader:0,"3D":0};if(/=/.test(e)){var i=e.split("="),n=i[0],r=i[1],s=void 0===r?"":r;t.channel=n,t.language=e,s.split(",").forEach((function(e){var i=e.split(":"),n=i[0],r=i[1];"lang"===n?t.language=r:"er"===n?t.easyReader=Number(r):"war"===n?t.aspectRatio=Number(r):"3D"===n&&(t["3D"]=Number(r))}))}else t.language=e;return t.channel&&(t.channel="SERVICE"+t.channel),t})):void 0;f&&(d=c(d,{captionServices:f}));var m=K(n,"Label")[0];if(m&&m.childNodes.length){var g=m.childNodes[0].nodeValue.trim();d=c(d,{label:g})}var v=K(n,"ContentProtection").reduce((function(e,t){var i=ee(t),n=te[i.schemeIdUri];if(n){e[n]={attributes:i};var r=K(t,"cenc:pssh")[0];if(r){var s=Q(r),a=s&&(0,o.default)(s);e[n].pssh=a}}return e}),{});Object.keys(v).length&&(d=c(d,{contentProtection:v}));var y=ne(n),_=K(n,"Representation"),b=c(i,y);return h(_.map(function(e,t,i){return function(n){var r=K(n,"BaseURL"),s=ie(t,r),a=c(e,ee(n)),o=ne(n);return s.map((function(e){return{segmentInfo:c(i,o),attributes:c(a,{baseUrl:e})}}))}}(d,a,b)))}},se=function(e,t){return function(i,n){var r=ie(t,K(i.node,"BaseURL")),s=c(e,{periodStart:i.attributes.start});"number"==typeof i.attributes.duration&&(s.periodDuration=i.attributes.duration);var a=K(i.node,"AdaptationSet"),o=ne(i.node);return h(a.map(re(s,r,o)))}},ae=function(e,t){void 0===t&&(t={});var i=t,n=i.manifestUri,r=void 0===n?"":n,s=i.NOW,a=void 0===s?Date.now():s,o=i.clientOffset,l=void 0===o?0:o,u=K(e,"Period");if(!u.length)throw new Error(m);var c=K(e,"Location"),d=ee(e),p=ie([r],K(e,"BaseURL"));d.type=d.type||"static",d.sourceDuration=d.mediaPresentationDuration||0,d.NOW=a,d.clientOffset=l,c.length&&(d.locations=c.map(Q));var f=[];return u.forEach((function(e,t){var i=ee(e),n=f[t-1];i.start=function(e){var t=e.attributes,i=e.priorPeriodAttributes,n=e.mpdType;return"number"==typeof t.start?t.start:i&&"number"==typeof i.start&&"number"==typeof i.duration?i.start+i.duration:i||"static"!==n?null:0}({attributes:i,priorPeriodAttributes:n?n.attributes:null,mpdType:d.type}),f.push({node:e,attributes:i})})),{locations:d.locations,representationInfo:h(f.map(se(d,p)))}},oe=function(e){if(""===e)throw new Error(g);var t,i,n=new l.DOMParser;try{i=(t=n.parseFromString(e,"application/xml"))&&"MPD"===t.documentElement.tagName?t.documentElement:null}catch(e){}if(!i||i&&i.getElementsByTagName("parsererror").length>0)throw new Error(v);return i},le="0.21.0",ue=function(e,t){void 0===t&&(t={});var i=ae(oe(e),t),n=Y(i.representationInfo);return H({dashPlaylists:n,locations:i.locations,sidxMapping:t.sidxMapping,previousManifest:t.previousManifest})},ce=function(e){return function(e){var t=K(e,"UTCTiming")[0];if(!t)return null;var i=ee(t);switch(i.schemeIdUri){case"urn:mpeg:dash:utc:http-head:2014":case"urn:mpeg:dash:utc:http-head:2012":i.method="HEAD";break;case"urn:mpeg:dash:utc:http-xsdate:2014":case"urn:mpeg:dash:utc:http-iso:2014":case"urn:mpeg:dash:utc:http-xsdate:2012":case"urn:mpeg:dash:utc:http-iso:2012":i.method="GET";break;case"urn:mpeg:dash:utc:direct:2014":case"urn:mpeg:dash:utc:direct:2012":i.method="DIRECT",i.value=Date.parse(i.value);break;default:throw new Error(b)}return i}(oe(e))}},(e,t,i)=>{"use strict";i.r(t),i.d(t,{forEachMediaGroup:()=>n});var n=function(e,t,i){t.forEach((function(t){for(var n in e.mediaGroups[t])for(var r in e.mediaGroups[t][n]){var s=e.mediaGroups[t][n][r];i(s,t,n,r)}}))}},(e,t,i)=>{var n=i(97);t.DOMImplementation=n.DOMImplementation,t.XMLSerializer=n.XMLSerializer,t.DOMParser=i(99).DOMParser},(e,t,i)=>{var n=i(98).NAMESPACE;function r(e){return""!==e}function s(e,t){return e.hasOwnProperty(t)||(e[t]=!0),e}function a(e){if(!e)return[];var t=function(e){return e?e.split(/[\t\n\f\r ]+/).filter(r):[]}(e);return Object.keys(t.reduce(s,{}))}function o(e,t){for(var i in e)t[i]=e[i]}function l(e,t){var i=e.prototype;if(!(i instanceof t)){function n(){}n.prototype=t.prototype,o(i,n=new n),e.prototype=i=n}i.constructor!=e&&("function"!=typeof e&&console.error("unknown Class:"+e),i.constructor=e)}var u={},c=u.ELEMENT_NODE=1,d=u.ATTRIBUTE_NODE=2,h=u.TEXT_NODE=3,p=u.CDATA_SECTION_NODE=4,f=u.ENTITY_REFERENCE_NODE=5,m=u.ENTITY_NODE=6,g=u.PROCESSING_INSTRUCTION_NODE=7,v=u.COMMENT_NODE=8,y=u.DOCUMENT_NODE=9,_=u.DOCUMENT_TYPE_NODE=10,b=u.DOCUMENT_FRAGMENT_NODE=11,T=u.NOTATION_NODE=12,w={},S={},k=(w.INDEX_SIZE_ERR=(S[1]="Index size error",1),w.DOMSTRING_SIZE_ERR=(S[2]="DOMString size error",2),w.HIERARCHY_REQUEST_ERR=(S[3]="Hierarchy request error",3)),E=(w.WRONG_DOCUMENT_ERR=(S[4]="Wrong document",4),w.INVALID_CHARACTER_ERR=(S[5]="Invalid character",5),w.NO_DATA_ALLOWED_ERR=(S[6]="No data allowed",6),w.NO_MODIFICATION_ALLOWED_ERR=(S[7]="No modification allowed",7),w.NOT_FOUND_ERR=(S[8]="Not found",8)),C=(w.NOT_SUPPORTED_ERR=(S[9]="Not supported",9),w.INUSE_ATTRIBUTE_ERR=(S[10]="Attribute in use",10));w.INVALID_STATE_ERR=(S[11]="Invalid state",11),w.SYNTAX_ERR=(S[12]="Syntax error",12),w.INVALID_MODIFICATION_ERR=(S[13]="Invalid modification",13),w.NAMESPACE_ERR=(S[14]="Invalid namespace",14),w.INVALID_ACCESS_ERR=(S[15]="Invalid access",15);function x(e,t){if(t instanceof Error)var i=t;else i=this,Error.call(this,S[e]),this.message=S[e],Error.captureStackTrace&&Error.captureStackTrace(this,x);return i.code=e,t&&(this.message=this.message+": "+t),i}function A(){}function P(e,t){this._node=e,this._refresh=t,I(this)}function I(e){var t=e._node._inc||e._node.ownerDocument._inc;if(e._inc!=t){var i=e._refresh(e._node);ue(e,"length",i.length),o(i,e),e._inc=t}}function O(){}function L(e,t){for(var i=e.length;i--;)if(e[i]===t)return i}function D(e,t,i,r){if(r?t[L(t,r)]=i:t[t.length++]=i,e){i.ownerElement=e;var s=e.ownerDocument;s&&(r&&F(s,e,r),function(e,t,i){e&&e._inc++,i.namespaceURI===n.XMLNS&&(t._nsMap[i.prefix?i.localName:""]=i.value)}(s,e,i))}}function M(e,t,i){var n=L(t,i);if(!(n>=0))throw x(E,new Error(e.tagName+"@"+i));for(var r=t.length-1;n<r;)t[n]=t[++n];if(t.length=r,e){var s=e.ownerDocument;s&&(F(s,e,i),i.ownerElement=null)}}function N(){}function R(){}function U(e){return("<"==e?"&lt;":">"==e&&"&gt;")||"&"==e&&"&amp;"||'"'==e&&"&quot;"||"&#"+e.charCodeAt()+";"}function B(e,t){if(t(e))return!0;if(e=e.firstChild)do{if(B(e,t))return!0}while(e=e.nextSibling)}function j(){}function F(e,t,i,r){e&&e._inc++,i.namespaceURI===n.XMLNS&&delete t._nsMap[i.prefix?i.localName:""]}function H(e,t,i){if(e&&e._inc){e._inc++;var n=t.childNodes;if(i)n[n.length++]=i;else{for(var r=t.firstChild,s=0;r;)n[s++]=r,r=r.nextSibling;n.length=s}}}function q(e,t){var i=t.previousSibling,n=t.nextSibling;return i?i.nextSibling=n:e.firstChild=n,n?n.previousSibling=i:e.lastChild=i,H(e.ownerDocument,e),t}function z(e,t,i){var n=t.parentNode;if(n&&n.removeChild(t),t.nodeType===b){var r=t.firstChild;if(null==r)return t;var s=t.lastChild}else r=s=t;var a=i?i.previousSibling:e.lastChild;r.previousSibling=a,s.nextSibling=i,a?a.nextSibling=r:e.firstChild=r,null==i?e.lastChild=s:i.previousSibling=s;do{r.parentNode=e}while(r!==s&&(r=r.nextSibling));return H(e.ownerDocument||e,e),t.nodeType==b&&(t.firstChild=t.lastChild=null),t}function W(){this._nsMap={}}function V(){}function $(){}function X(){}function G(){}function Y(){}function K(){}function Q(){}function J(){}function Z(){}function ee(){}function te(){}function ie(){}function ne(e,t){var i=[],n=9==this.nodeType&&this.documentElement||this,r=n.prefix,s=n.namespaceURI;if(s&&null==r&&null==(r=n.lookupPrefix(s)))var a=[{namespace:s,prefix:null}];return ae(this,i,e,t,a),i.join("")}function re(e,t,i){var r=e.prefix||"",s=e.namespaceURI;if(!s)return!1;if("xml"===r&&s===n.XML||s===n.XMLNS)return!1;for(var a=i.length;a--;){var o=i[a];if(o.prefix===r)return o.namespace!==s}return!0}function se(e,t,i){e.push(" ",t,'="',i.replace(/[<&"]/g,U),'"')}function ae(e,t,i,r,s){if(s||(s=[]),r){if(!(e=r(e)))return;if("string"==typeof e)return void t.push(e)}switch(e.nodeType){case c:var a=e.attributes,o=a.length,l=e.firstChild,u=e.tagName,m=u;if(!(i=n.isHTML(e.namespaceURI)||i)&&!e.prefix&&e.namespaceURI){for(var T,w=0;w<a.length;w++)if("xmlns"===a.item(w).name){T=a.item(w).value;break}if(!T)for(var S=s.length-1;S>=0;S--){if(""===(k=s[S]).prefix&&k.namespace===e.namespaceURI){T=k.namespace;break}}if(T!==e.namespaceURI)for(S=s.length-1;S>=0;S--){var k;if((k=s[S]).namespace===e.namespaceURI){k.prefix&&(m=k.prefix+":"+u);break}}}t.push("<",m);for(var E=0;E<o;E++){"xmlns"==(C=a.item(E)).prefix?s.push({prefix:C.localName,namespace:C.value}):"xmlns"==C.nodeName&&s.push({prefix:"",namespace:C.value})}for(E=0;E<o;E++){var C,x,A;if(re(C=a.item(E),0,s))se(t,(x=C.prefix||"")?"xmlns:"+x:"xmlns",A=C.namespaceURI),s.push({prefix:x,namespace:A});ae(C,t,i,r,s)}if(u===m&&re(e,0,s))se(t,(x=e.prefix||"")?"xmlns:"+x:"xmlns",A=e.namespaceURI),s.push({prefix:x,namespace:A});if(l||i&&!/^(?:meta|link|img|br|hr|input)$/i.test(u)){if(t.push(">"),i&&/^script$/i.test(u))for(;l;)l.data?t.push(l.data):ae(l,t,i,r,s.slice()),l=l.nextSibling;else for(;l;)ae(l,t,i,r,s.slice()),l=l.nextSibling;t.push("</",m,">")}else t.push("/>");return;case y:case b:for(l=e.firstChild;l;)ae(l,t,i,r,s.slice()),l=l.nextSibling;return;case d:return se(t,e.name,e.value);case h:return t.push(e.data.replace(/[<&]/g,U).replace(/]]>/g,"]]&gt;"));case p:return t.push("<![CDATA[",e.data,"]]>");case v:return t.push("\x3c!--",e.data,"--\x3e");case _:var P=e.publicId,I=e.systemId;if(t.push("<!DOCTYPE ",e.name),P)t.push(" PUBLIC ",P),I&&"."!=I&&t.push(" ",I),t.push(">");else if(I&&"."!=I)t.push(" SYSTEM ",I,">");else{var O=e.internalSubset;O&&t.push(" [",O,"]"),t.push(">")}return;case g:return t.push("<?",e.target," ",e.data,"?>");case f:return t.push("&",e.nodeName,";");default:t.push("??",e.nodeName)}}function oe(e,t,i){var n;switch(t.nodeType){case c:(n=t.cloneNode(!1)).ownerDocument=e;case b:break;case d:i=!0}if(n||(n=t.cloneNode(!1)),n.ownerDocument=e,n.parentNode=null,i)for(var r=t.firstChild;r;)n.appendChild(oe(e,r,i)),r=r.nextSibling;return n}function le(e,t,i){var n=new t.constructor;for(var r in t){var s=t[r];"object"!=typeof s&&s!=n[r]&&(n[r]=s)}switch(t.childNodes&&(n.childNodes=new A),n.ownerDocument=e,n.nodeType){case c:var a=t.attributes,o=n.attributes=new O,l=a.length;o._ownerElement=n;for(var u=0;u<l;u++)n.setAttributeNode(le(e,a.item(u),!0));break;case d:i=!0}if(i)for(var h=t.firstChild;h;)n.appendChild(le(e,h,i)),h=h.nextSibling;return n}function ue(e,t,i){e[t]=i}x.prototype=Error.prototype,o(w,x),A.prototype={length:0,item:function(e){return this[e]||null},toString:function(e,t){for(var i=[],n=0;n<this.length;n++)ae(this[n],i,e,t);return i.join("")}},P.prototype.item=function(e){return I(this),this[e]},l(P,A),O.prototype={length:0,item:A.prototype.item,getNamedItem:function(e){for(var t=this.length;t--;){var i=this[t];if(i.nodeName==e)return i}},setNamedItem:function(e){var t=e.ownerElement;if(t&&t!=this._ownerElement)throw new x(C);var i=this.getNamedItem(e.nodeName);return D(this._ownerElement,this,e,i),i},setNamedItemNS:function(e){var t,i=e.ownerElement;if(i&&i!=this._ownerElement)throw new x(C);return t=this.getNamedItemNS(e.namespaceURI,e.localName),D(this._ownerElement,this,e,t),t},removeNamedItem:function(e){var t=this.getNamedItem(e);return M(this._ownerElement,this,t),t},removeNamedItemNS:function(e,t){var i=this.getNamedItemNS(e,t);return M(this._ownerElement,this,i),i},getNamedItemNS:function(e,t){for(var i=this.length;i--;){var n=this[i];if(n.localName==t&&n.namespaceURI==e)return n}return null}},N.prototype={hasFeature:function(e,t){return!0},createDocument:function(e,t,i){var n=new j;if(n.implementation=this,n.childNodes=new A,n.doctype=i||null,i&&n.appendChild(i),t){var r=n.createElementNS(e,t);n.appendChild(r)}return n},createDocumentType:function(e,t,i){var n=new K;return n.name=e,n.nodeName=e,n.publicId=t||"",n.systemId=i||"",n}},R.prototype={firstChild:null,lastChild:null,previousSibling:null,nextSibling:null,attributes:null,parentNode:null,childNodes:null,ownerDocument:null,nodeValue:null,namespaceURI:null,prefix:null,localName:null,insertBefore:function(e,t){return z(this,e,t)},replaceChild:function(e,t){this.insertBefore(e,t),t&&this.removeChild(t)},removeChild:function(e){return q(this,e)},appendChild:function(e){return this.insertBefore(e,null)},hasChildNodes:function(){return null!=this.firstChild},cloneNode:function(e){return le(this.ownerDocument||this,this,e)},normalize:function(){for(var e=this.firstChild;e;){var t=e.nextSibling;t&&t.nodeType==h&&e.nodeType==h?(this.removeChild(t),e.appendData(t.data)):(e.normalize(),e=t)}},isSupported:function(e,t){return this.ownerDocument.implementation.hasFeature(e,t)},hasAttributes:function(){return this.attributes.length>0},lookupPrefix:function(e){for(var t=this;t;){var i=t._nsMap;if(i)for(var n in i)if(i[n]==e)return n;t=t.nodeType==d?t.ownerDocument:t.parentNode}return null},lookupNamespaceURI:function(e){for(var t=this;t;){var i=t._nsMap;if(i&&e in i)return i[e];t=t.nodeType==d?t.ownerDocument:t.parentNode}return null},isDefaultNamespace:function(e){return null==this.lookupPrefix(e)}},o(u,R),o(u,R.prototype),j.prototype={nodeName:"#document",nodeType:y,doctype:null,documentElement:null,_inc:1,insertBefore:function(e,t){if(e.nodeType==b){for(var i=e.firstChild;i;){var n=i.nextSibling;this.insertBefore(i,t),i=n}return e}return null==this.documentElement&&e.nodeType==c&&(this.documentElement=e),z(this,e,t),e.ownerDocument=this,e},removeChild:function(e){return this.documentElement==e&&(this.documentElement=null),q(this,e)},importNode:function(e,t){return oe(this,e,t)},getElementById:function(e){var t=null;return B(this.documentElement,(function(i){if(i.nodeType==c&&i.getAttribute("id")==e)return t=i,!0})),t},getElementsByClassName:function(e){var t=a(e);return new P(this,(function(i){var n=[];return t.length>0&&B(i.documentElement,(function(r){if(r!==i&&r.nodeType===c){var s=r.getAttribute("class");if(s){var o=e===s;if(!o){var l=a(s);o=t.every((u=l,function(e){return u&&-1!==u.indexOf(e)}))}o&&n.push(r)}}var u})),n}))},createElement:function(e){var t=new W;return t.ownerDocument=this,t.nodeName=e,t.tagName=e,t.localName=e,t.childNodes=new A,(t.attributes=new O)._ownerElement=t,t},createDocumentFragment:function(){var e=new ee;return e.ownerDocument=this,e.childNodes=new A,e},createTextNode:function(e){var t=new X;return t.ownerDocument=this,t.appendData(e),t},createComment:function(e){var t=new G;return t.ownerDocument=this,t.appendData(e),t},createCDATASection:function(e){var t=new Y;return t.ownerDocument=this,t.appendData(e),t},createProcessingInstruction:function(e,t){var i=new te;return i.ownerDocument=this,i.tagName=i.target=e,i.nodeValue=i.data=t,i},createAttribute:function(e){var t=new V;return t.ownerDocument=this,t.name=e,t.nodeName=e,t.localName=e,t.specified=!0,t},createEntityReference:function(e){var t=new Z;return t.ownerDocument=this,t.nodeName=e,t},createElementNS:function(e,t){var i=new W,n=t.split(":"),r=i.attributes=new O;return i.childNodes=new A,i.ownerDocument=this,i.nodeName=t,i.tagName=t,i.namespaceURI=e,2==n.length?(i.prefix=n[0],i.localName=n[1]):i.localName=t,r._ownerElement=i,i},createAttributeNS:function(e,t){var i=new V,n=t.split(":");return i.ownerDocument=this,i.nodeName=t,i.name=t,i.namespaceURI=e,i.specified=!0,2==n.length?(i.prefix=n[0],i.localName=n[1]):i.localName=t,i}},l(j,R),W.prototype={nodeType:c,hasAttribute:function(e){return null!=this.getAttributeNode(e)},getAttribute:function(e){var t=this.getAttributeNode(e);return t&&t.value||""},getAttributeNode:function(e){return this.attributes.getNamedItem(e)},setAttribute:function(e,t){var i=this.ownerDocument.createAttribute(e);i.value=i.nodeValue=""+t,this.setAttributeNode(i)},removeAttribute:function(e){var t=this.getAttributeNode(e);t&&this.removeAttributeNode(t)},appendChild:function(e){return e.nodeType===b?this.insertBefore(e,null):function(e,t){var i=t.parentNode;if(i){var n=e.lastChild;i.removeChild(t),n=e.lastChild}return n=e.lastChild,t.parentNode=e,t.previousSibling=n,t.nextSibling=null,n?n.nextSibling=t:e.firstChild=t,e.lastChild=t,H(e.ownerDocument,e,t),t}(this,e)},setAttributeNode:function(e){return this.attributes.setNamedItem(e)},setAttributeNodeNS:function(e){return this.attributes.setNamedItemNS(e)},removeAttributeNode:function(e){return this.attributes.removeNamedItem(e.nodeName)},removeAttributeNS:function(e,t){var i=this.getAttributeNodeNS(e,t);i&&this.removeAttributeNode(i)},hasAttributeNS:function(e,t){return null!=this.getAttributeNodeNS(e,t)},getAttributeNS:function(e,t){var i=this.getAttributeNodeNS(e,t);return i&&i.value||""},setAttributeNS:function(e,t,i){var n=this.ownerDocument.createAttributeNS(e,t);n.value=n.nodeValue=""+i,this.setAttributeNode(n)},getAttributeNodeNS:function(e,t){return this.attributes.getNamedItemNS(e,t)},getElementsByTagName:function(e){return new P(this,(function(t){var i=[];return B(t,(function(n){n===t||n.nodeType!=c||"*"!==e&&n.tagName!=e||i.push(n)})),i}))},getElementsByTagNameNS:function(e,t){return new P(this,(function(i){var n=[];return B(i,(function(r){r===i||r.nodeType!==c||"*"!==e&&r.namespaceURI!==e||"*"!==t&&r.localName!=t||n.push(r)})),n}))}},j.prototype.getElementsByTagName=W.prototype.getElementsByTagName,j.prototype.getElementsByTagNameNS=W.prototype.getElementsByTagNameNS,l(W,R),V.prototype.nodeType=d,l(V,R),$.prototype={data:"",substringData:function(e,t){return this.data.substring(e,e+t)},appendData:function(e){e=this.data+e,this.nodeValue=this.data=e,this.length=e.length},insertData:function(e,t){this.replaceData(e,0,t)},appendChild:function(e){throw new Error(S[k])},deleteData:function(e,t){this.replaceData(e,t,"")},replaceData:function(e,t,i){i=this.data.substring(0,e)+i+this.data.substring(e+t),this.nodeValue=this.data=i,this.length=i.length}},l($,R),X.prototype={nodeName:"#text",nodeType:h,splitText:function(e){var t=this.data,i=t.substring(e);t=t.substring(0,e),this.data=this.nodeValue=t,this.length=t.length;var n=this.ownerDocument.createTextNode(i);return this.parentNode&&this.parentNode.insertBefore(n,this.nextSibling),n}},l(X,$),G.prototype={nodeName:"#comment",nodeType:v},l(G,$),Y.prototype={nodeName:"#cdata-section",nodeType:p},l(Y,$),K.prototype.nodeType=_,l(K,R),Q.prototype.nodeType=T,l(Q,R),J.prototype.nodeType=m,l(J,R),Z.prototype.nodeType=f,l(Z,R),ee.prototype.nodeName="#document-fragment",ee.prototype.nodeType=b,l(ee,R),te.prototype.nodeType=g,l(te,R),ie.prototype.serializeToString=function(e,t,i){return ne.call(e,t,i)},R.prototype.toString=ne;try{if(Object.defineProperty){function ce(e){switch(e.nodeType){case c:case b:var t=[];for(e=e.firstChild;e;)7!==e.nodeType&&8!==e.nodeType&&t.push(ce(e)),e=e.nextSibling;return t.join("");default:return e.nodeValue}}Object.defineProperty(P.prototype,"length",{get:function(){return I(this),this.$$length}}),Object.defineProperty(R.prototype,"textContent",{get:function(){return ce(this)},set:function(e){switch(this.nodeType){case c:case b:for(;this.firstChild;)this.removeChild(this.firstChild);(e||String(e))&&this.appendChild(this.ownerDocument.createTextNode(e));break;default:this.data=e,this.value=e,this.nodeValue=e}}}),ue=function(e,t,i){e["$$"+t]=i}}}catch(de){}t.DocumentType=K,t.DOMException=x,t.DOMImplementation=N,t.Element=W,t.Node=R,t.NodeList=A,t.XMLSerializer=ie},(e,t)=>{"use strict";function i(e,t){return void 0===t&&(t=Object),t&&"function"==typeof t.freeze?t.freeze(e):e}var n=i({HTML:"text/html",isHTML:function(e){return e===n.HTML},XML_APPLICATION:"application/xml",XML_TEXT:"text/xml",XML_XHTML_APPLICATION:"application/xhtml+xml",XML_SVG_IMAGE:"image/svg+xml"}),r=i({HTML:"http://www.w3.org/1999/xhtml",isHTML:function(e){return e===r.HTML},SVG:"http://www.w3.org/2000/svg",XML:"http://www.w3.org/XML/1998/namespace",XMLNS:"http://www.w3.org/2000/xmlns/"});t.freeze=i,t.MIME_TYPE=n,t.NAMESPACE=r},(e,t,i)=>{var n=i(98),r=i(97),s=i(100),a=i(101),o=r.DOMImplementation,l=n.NAMESPACE,u=a.ParseError,c=a.XMLReader;function d(e){this.options=e||{locator:{}}}function h(){this.cdata=!1}function p(e,t){t.lineNumber=e.lineNumber,t.columnNumber=e.columnNumber}function f(e){if(e)return"\n@"+(e.systemId||"")+"#[line:"+e.lineNumber+",col:"+e.columnNumber+"]"}function m(e,t,i){return"string"==typeof e?e.substr(t,i):e.length>=t+i||t?new java.lang.String(e,t,i)+"":e}function g(e,t){e.currentElement?e.currentElement.appendChild(t):e.doc.appendChild(t)}d.prototype.parseFromString=function(e,t){var i=this.options,n=new c,r=i.domBuilder||new h,a=i.errorHandler,o=i.locator,u=i.xmlns||{},d=/\/x?html?$/.test(t),p=d?s.HTML_ENTITIES:s.XML_ENTITIES;return o&&r.setDocumentLocator(o),n.errorHandler=function(e,t,i){if(!e){if(t instanceof h)return t;e=t}var n={},r=e instanceof Function;function s(t){var s=e[t];!s&&r&&(s=2==e.length?function(i){e(t,i)}:e),n[t]=s&&function(e){s("[xmldom "+t+"]\t"+e+f(i))}||function(){}}return i=i||{},s("warning"),s("error"),s("fatalError"),n}(a,r,o),n.domBuilder=i.domBuilder||r,d&&(u[""]=l.HTML),u.xml=u.xml||l.XML,e&&"string"==typeof e?n.parse(e,u,p):n.errorHandler.error("invalid doc source"),r.doc},h.prototype={startDocument:function(){this.doc=(new o).createDocument(null,null,null),this.locator&&(this.doc.documentURI=this.locator.systemId)},startElement:function(e,t,i,n){var r=this.doc,s=r.createElementNS(e,i||t),a=n.length;g(this,s),this.currentElement=s,this.locator&&p(this.locator,s);for(var o=0;o<a;o++){e=n.getURI(o);var l=n.getValue(o),u=(i=n.getQName(o),r.createAttributeNS(e,i));this.locator&&p(n.getLocator(o),u),u.value=u.nodeValue=l,s.setAttributeNode(u)}},endElement:function(e,t,i){var n=this.currentElement;n.tagName;this.currentElement=n.parentNode},startPrefixMapping:function(e,t){},endPrefixMapping:function(e){},processingInstruction:function(e,t){var i=this.doc.createProcessingInstruction(e,t);this.locator&&p(this.locator,i),g(this,i)},ignorableWhitespace:function(e,t,i){},characters:function(e,t,i){if(e=m.apply(this,arguments)){if(this.cdata)var n=this.doc.createCDATASection(e);else n=this.doc.createTextNode(e);this.currentElement?this.currentElement.appendChild(n):/^\s*$/.test(e)&&this.doc.appendChild(n),this.locator&&p(this.locator,n)}},skippedEntity:function(e){},endDocument:function(){this.doc.normalize()},setDocumentLocator:function(e){(this.locator=e)&&(e.lineNumber=0)},comment:function(e,t,i){e=m.apply(this,arguments);var n=this.doc.createComment(e);this.locator&&p(this.locator,n),g(this,n)},startCDATA:function(){this.cdata=!0},endCDATA:function(){this.cdata=!1},startDTD:function(e,t,i){var n=this.doc.implementation;if(n&&n.createDocumentType){var r=n.createDocumentType(e,t,i);this.locator&&p(this.locator,r),g(this,r),this.doc.doctype=r}},warning:function(e){console.warn("[xmldom warning]\t"+e,f(this.locator))},error:function(e){console.error("[xmldom error]\t"+e,f(this.locator))},fatalError:function(e){throw new u(e,this.locator)}},"endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl".replace(/\w+/g,(function(e){h.prototype[e]=function(){return null}})),t.__DOMHandler=h,t.DOMParser=d,t.DOMImplementation=r.DOMImplementation,t.XMLSerializer=r.XMLSerializer},(e,t,i)=>{var n=i(98).freeze;t.XML_ENTITIES=n({amp:"&",apos:"'",gt:">",lt:"<",quot:'"'}),t.HTML_ENTITIES=n({lt:"<",gt:">",amp:"&",quot:'"',apos:"'",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"­­",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",times:"×",divide:"÷",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",fnof:"ƒ",circ:"ˆ",tilde:"˜",ensp:" ",emsp:" ",thinsp:" ",zwnj:"‌",zwj:"‍",lrm:"‎",rlm:"‏",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",bull:"•",hellip:"…",permil:"‰",prime:"′",Prime:"″",lsaquo:"‹",rsaquo:"›",oline:"‾",euro:"€",trade:"™",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦"}),t.entityMap=t.HTML_ENTITIES},(e,t,i)=>{var n=i(98).NAMESPACE,r=/[A-Z_a-z\xC0-\xD6\xD8-\xF6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,s=new RegExp("[\\-\\.0-9"+r.source.slice(1,-1)+"\\u00B7\\u0300-\\u036F\\u203F-\\u2040]"),a=new RegExp("^"+r.source+s.source+"*(?::"+r.source+s.source+"*)?$");function o(e,t){this.message=e,this.locator=t,Error.captureStackTrace&&Error.captureStackTrace(this,o)}function l(){}function u(e,t){return t.lineNumber=e.lineNumber,t.columnNumber=e.columnNumber,t}function c(e,t,i,r,s,a){function o(e,t,n){i.attributeNames.hasOwnProperty(e)&&a.fatalError("Attribute "+e+" redefined"),i.addValue(e,t,n)}for(var l,u=++t,c=0;;){var d=e.charAt(u);switch(d){case"=":if(1===c)l=e.slice(t,u),c=3;else{if(2!==c)throw new Error("attribute equal must after attrName");c=3}break;case"'":case'"':if(3===c||1===c){if(1===c&&(a.warning('attribute value must after "="'),l=e.slice(t,u)),t=u+1,!((u=e.indexOf(d,t))>0))throw new Error("attribute value no end '"+d+"' match");o(l,h=e.slice(t,u).replace(/&#?\w+;/g,s),t-1),c=5}else{if(4!=c)throw new Error('attribute value must after "="');o(l,h=e.slice(t,u).replace(/&#?\w+;/g,s),t),a.warning('attribute "'+l+'" missed start quot('+d+")!!"),t=u+1,c=5}break;case"/":switch(c){case 0:i.setTagName(e.slice(t,u));case 5:case 6:case 7:c=7,i.closed=!0;case 4:case 1:case 2:break;default:throw new Error("attribute invalid close char('/')")}break;case"":return a.error("unexpected end of input"),0==c&&i.setTagName(e.slice(t,u)),u;case">":switch(c){case 0:i.setTagName(e.slice(t,u));case 5:case 6:case 7:break;case 4:case 1:"/"===(h=e.slice(t,u)).slice(-1)&&(i.closed=!0,h=h.slice(0,-1));case 2:2===c&&(h=l),4==c?(a.warning('attribute "'+h+'" missed quot(")!'),o(l,h.replace(/&#?\w+;/g,s),t)):(n.isHTML(r[""])&&h.match(/^(?:disabled|checked|selected)$/i)||a.warning('attribute "'+h+'" missed value!! "'+h+'" instead!!'),o(h,h,t));break;case 3:throw new Error("attribute value missed!!")}return u;case"":d=" ";default:if(d<=" ")switch(c){case 0:i.setTagName(e.slice(t,u)),c=6;break;case 1:l=e.slice(t,u),c=2;break;case 4:var h=e.slice(t,u).replace(/&#?\w+;/g,s);a.warning('attribute "'+h+'" missed quot(")!!'),o(l,h,t);case 5:c=6}else switch(c){case 2:i.tagName;n.isHTML(r[""])&&l.match(/^(?:disabled|checked|selected)$/i)||a.warning('attribute "'+l+'" missed value!! "'+l+'" instead2!!'),o(l,l,t),t=u,c=1;break;case 5:a.warning('attribute space is required"'+l+'"!!');case 6:c=1,t=u;break;case 3:c=4,t=u;break;case 7:throw new Error("elements closed character '/' and '>' must be connected to")}}u++}}function d(e,t,i){for(var r=e.tagName,s=null,a=e.length;a--;){var o=e[a],l=o.qName,u=o.value;if((p=l.indexOf(":"))>0)var c=o.prefix=l.slice(0,p),d=l.slice(p+1),h="xmlns"===c&&d;else d=l,c=null,h="xmlns"===l&&"";o.localName=d,!1!==h&&(null==s&&(s={},f(i,i={})),i[h]=s[h]=u,o.uri=n.XMLNS,t.startPrefixMapping(h,u))}for(a=e.length;a--;){(c=(o=e[a]).prefix)&&("xml"===c&&(o.uri=n.XML),"xmlns"!==c&&(o.uri=i[c||""]))}var p;(p=r.indexOf(":"))>0?(c=e.prefix=r.slice(0,p),d=e.localName=r.slice(p+1)):(c=null,d=e.localName=r);var m=e.uri=i[c||""];if(t.startElement(m,d,r,e),!e.closed)return e.currentNSMap=i,e.localNSMap=s,!0;if(t.endElement(m,d,r),s)for(c in s)t.endPrefixMapping(c)}function h(e,t,i,n,r){if(/^(?:script|textarea)$/i.test(i)){var s=e.indexOf("</"+i+">",t),a=e.substring(t+1,s);if(/[&<]/.test(a))return/^script$/i.test(i)?(r.characters(a,0,a.length),s):(a=a.replace(/&#?\w+;/g,n),r.characters(a,0,a.length),s)}return t+1}function p(e,t,i,n){var r=n[i];return null==r&&((r=e.lastIndexOf("</"+i+">"))<t&&(r=e.lastIndexOf("</"+i)),n[i]=r),r<t}function f(e,t){for(var i in e)t[i]=e[i]}function m(e,t,i,n){if("-"===e.charAt(t+2))return"-"===e.charAt(t+3)?(r=e.indexOf("--\x3e",t+4))>t?(i.comment(e,t+4,r-t-4),r+3):(n.error("Unclosed comment"),-1):-1;if("CDATA["==e.substr(t+3,6)){var r=e.indexOf("]]>",t+9);return i.startCDATA(),i.characters(e,t+9,r-t-9),i.endCDATA(),r+3}var s=function(e,t){var i,n=[],r=/'[^']+'|"[^"]+"|[^\s<>\/=]+=?|(\/?\s*>|<)/g;r.lastIndex=t,r.exec(e);for(;i=r.exec(e);)if(n.push(i),i[1])return n}(e,t),a=s.length;if(a>1&&/!doctype/i.test(s[0][0])){var o=s[1][0],l=!1,u=!1;a>3&&(/^public$/i.test(s[2][0])?(l=s[3][0],u=a>4&&s[4][0]):/^system$/i.test(s[2][0])&&(u=s[3][0]));var c=s[a-1];return i.startDTD(o,l,u),i.endDTD(),c.index+c[0].length}return-1}function g(e,t,i){var n=e.indexOf("?>",t);if(n){var r=e.substring(t,n).match(/^<\?(\S*)\s*([\s\S]*?)\s*$/);if(r){r[0].length;return i.processingInstruction(r[1],r[2]),n+2}return-1}return-1}function v(){this.attributeNames={}}o.prototype=new Error,o.prototype.name=o.name,l.prototype={parse:function(e,t,i){var r=this.domBuilder;r.startDocument(),f(t,t={}),function(e,t,i,r,s){function a(e){if(e>65535){var t=55296+((e-=65536)>>10),i=56320+(1023&e);return String.fromCharCode(t,i)}return String.fromCharCode(e)}function l(e){var t=e.slice(1,-1);return t in i?i[t]:"#"===t.charAt(0)?a(parseInt(t.substr(1).replace("x","0x"))):(s.error("entity not found:"+e),e)}function f(t){if(t>E){var i=e.substring(E,t).replace(/&#?\w+;/g,l);w&&y(E),r.characters(i,0,t-E),E=t}}function y(t,i){for(;t>=b&&(i=T.exec(e));)_=i.index,b=_+i[0].length,w.lineNumber++;w.columnNumber=t-_+1}var _=0,b=0,T=/.*(?:\r\n?|\n)|.*$/g,w=r.locator,S=[{currentNSMap:t}],k={},E=0;for(;;){try{var C=e.indexOf("<",E);if(C<0){if(!e.substr(E).match(/^\s*$/)){var x=r.doc,A=x.createTextNode(e.substr(E));x.appendChild(A),r.currentElement=A}return}switch(C>E&&f(C),e.charAt(C+1)){case"/":var P=e.indexOf(">",C+3),I=e.substring(C+2,P).replace(/[ \t\n\r]+$/g,""),O=S.pop();P<0?(I=e.substring(C+2).replace(/[\s<].*/,""),s.error("end tag name: "+I+" is not complete:"+O.tagName),P=C+1+I.length):I.match(/\s</)&&(I=I.replace(/[\s<].*/,""),s.error("end tag name: "+I+" maybe not complete"),P=C+1+I.length);var L=O.localNSMap,D=O.tagName==I;if(D||O.tagName&&O.tagName.toLowerCase()==I.toLowerCase()){if(r.endElement(O.uri,O.localName,I),L)for(var M in L)r.endPrefixMapping(M);D||s.fatalError("end tag name: "+I+" is not match the current start tagName:"+O.tagName)}else S.push(O);P++;break;case"?":w&&y(C),P=g(e,C,r);break;case"!":w&&y(C),P=m(e,C,r,s);break;default:w&&y(C);var N=new v,R=S[S.length-1].currentNSMap,U=(P=c(e,C,N,R,l,s),N.length);if(!N.closed&&p(e,P,N.tagName,k)&&(N.closed=!0,i.nbsp||s.warning("unclosed xml attribute")),w&&U){for(var B=u(w,{}),j=0;j<U;j++){var F=N[j];y(F.offset),F.locator=u(w,{})}r.locator=B,d(N,r,R)&&S.push(N),r.locator=w}else d(N,r,R)&&S.push(N);n.isHTML(N.uri)&&!N.closed?P=h(e,P,N.tagName,l,r):P++}}catch(e){if(e instanceof o)throw e;s.error("element parse error: "+e),P=-1}P>E?E=P:f(Math.max(C,E)+1)}}(e,t,i,r,this.errorHandler),r.endDocument()}},v.prototype={setTagName:function(e){if(!a.test(e))throw new Error("invalid tagName:"+e);this.tagName=e},addValue:function(e,t,i){if(!a.test(e))throw new Error("invalid attribute:"+e);this.attributeNames[e]=this.length,this[this.length++]={qName:e,value:t,offset:i}},length:0,getLocalName:function(e){return this[e].localName},getLocator:function(e){return this[e].locator},getQName:function(e){return this[e].qName},getURI:function(e){return this[e].uri},getValue:function(e){return this[e].value}},t.XMLReader=l,t.ParseError=o},(e,t,i)=>{var n=i(103).getUint64;e.exports=function(e){var t=new DataView(e.buffer,e.byteOffset,e.byteLength),i={version:e[0],flags:new Uint8Array(e.subarray(1,4)),references:[],referenceId:t.getUint32(4),timescale:t.getUint32(8)},r=12;0===i.version?(i.earliestPresentationTime=t.getUint32(r),i.firstOffset=t.getUint32(r+4),r+=8):(i.earliestPresentationTime=n(e.subarray(r)),i.firstOffset=n(e.subarray(r+8)),r+=16),r+=2;var s=t.getUint16(r);for(r+=2;s>0;r+=12,s--)i.references.push({referenceType:(128&e[r])>>>7,referencedSize:2147483647&t.getUint32(r),subsegmentDuration:t.getUint32(r+4),startsWithSap:!!(128&e[r+8]),sapType:(112&e[r+8])>>>4,sapDeltaTime:268435455&t.getUint32(r+8)});return i}},e=>{var t=Math.pow(2,32);e.exports={getUint64:function(e){var i,n=new DataView(e.buffer,e.byteOffset,e.byteLength);return n.getBigUint64?(i=n.getBigUint64(0))<Number.MAX_SAFE_INTEGER?Number(i):i:n.getUint32(0)*t+n.getUint32(4)},MAX_UINT32:t}},(e,t,i)=>{"use strict";i.r(t),i.d(t,{getId3Offset:()=>a,getId3Size:()=>s});var n=i(105),r=(0,n.toUint8)([73,68,51]),s=function(e,t){void 0===t&&(t=0);var i=(e=(0,n.toUint8)(e))[t+5],r=e[t+6]<<21|e[t+7]<<14|e[t+8]<<7|e[t+9];return(16&i)>>4?r+20:r+10},a=function e(t,i){return void 0===i&&(i=0),(t=(0,n.toUint8)(t)).length-i<10||!(0,n.bytesMatch)(t,r,{offset:i})?i:e(t,i+=s(t,i))}},(e,t,i)=>{"use strict";i.r(t),i.d(t,{ENDIANNESS:()=>g,IS_BIG_ENDIAN:()=>v,IS_LITTLE_ENDIAN:()=>y,bytesMatch:()=>k,bytesToNumber:()=>_,bytesToString:()=>T,concatTypedArrays:()=>S,countBits:()=>a,countBytes:()=>o,isArrayBufferView:()=>u,isTypedArray:()=>c,numberToBytes:()=>b,padStart:()=>l,reverseBytes:()=>C,sliceBytes:()=>E,stringToBytes:()=>w,toBinaryString:()=>p,toHexString:()=>h,toUint8:()=>d});var n,r,s=i(67),a=function(e){return e.toString(2).length},o=function(e){return Math.ceil(a(e)/8)},l=function(e,t,i){return void 0===i&&(i=" "),(function(e,t){for(var i="";t--;)i+=e;return i}(i,t)+e.toString()).slice(-t)},u=function(e){return"function"===ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer},c=function(e){return u(e)},d=function(e){return e instanceof Uint8Array?e:(Array.isArray(e)||c(e)||e instanceof ArrayBuffer||(e="number"!=typeof e||"number"==typeof e&&e!=e?0:[e]),new Uint8Array(e&&e.buffer||e,e&&e.byteOffset||0,e&&e.byteLength||0))},h=function(e){e=d(e);for(var t="",i=0;i<e.length;i++)t+=l(e[i].toString(16),2,"0");return t},p=function(e){e=d(e);for(var t="",i=0;i<e.length;i++)t+=l(e[i].toString(2),8,"0");return t},f=i.n(s)().BigInt||Number,m=[f("0x1"),f("0x100"),f("0x10000"),f("0x1000000"),f("0x100000000"),f("0x10000000000"),f("0x1000000000000"),f("0x100000000000000"),f("0x10000000000000000")],g=(n=new Uint16Array([65484]),255===(r=new Uint8Array(n.buffer,n.byteOffset,n.byteLength))[0]?"big":204===r[0]?"little":"unknown"),v="big"===g,y="little"===g,_=function(e,t){var i=void 0===t?{}:t,n=i.signed,r=void 0!==n&&n,s=i.le,a=void 0!==s&&s;e=d(e);var o=a?"reduce":"reduceRight",l=(e[o]?e[o]:Array.prototype[o]).call(e,(function(t,i,n){var r=a?n:Math.abs(n+1-e.length);return t+f(i)*m[r]}),f(0));if(r){var u=m[e.length]/f(2)-f(1);(l=f(l))>u&&(l-=u,l-=u,l-=f(2))}return Number(l)},b=function(e,t){var i=(void 0===t?{}:t).le,n=void 0!==i&&i;("bigint"!=typeof e&&"number"!=typeof e||"number"==typeof e&&e!=e)&&(e=0),e=f(e);for(var r=o(e),s=new Uint8Array(new ArrayBuffer(r)),a=0;a<r;a++){var l=n?a:Math.abs(a+1-s.length);s[l]=Number(e/m[a]&f(255)),e<0&&(s[l]=Math.abs(~s[l]),s[l]-=0===a?1:2)}return s},T=function(e){if(!e)return"";e=Array.prototype.slice.call(e);var t=String.fromCharCode.apply(null,d(e));try{return decodeURIComponent(escape(t))}catch(e){}return t},w=function(e,t){if("string"!=typeof e&&e&&"function"==typeof e.toString&&(e=e.toString()),"string"!=typeof e)return new Uint8Array;t||(e=unescape(encodeURIComponent(e)));for(var i=new Uint8Array(e.length),n=0;n<e.length;n++)i[n]=e.charCodeAt(n);return i},S=function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];if(t=t.filter((function(e){return e&&(e.byteLength||e.length)&&"string"!=typeof e})),t.length<=1)return d(t[0]);var n=t.reduce((function(e,t,i){return e+(t.byteLength||t.length)}),0),r=new Uint8Array(n),s=0;return t.forEach((function(e){e=d(e),r.set(e,s),s+=e.byteLength})),r},k=function(e,t,i){var n=void 0===i?{}:i,r=n.offset,s=void 0===r?0:r,a=n.mask,o=void 0===a?[]:a;e=d(e);var l=(t=d(t)).every?t.every:Array.prototype.every;return t.length&&e.length-s>=t.length&&l.call(t,(function(t,i){return t===(o[i]?o[i]&e[s+i]:e[s+i])}))},E=function(e,t,i){return Uint8Array.prototype.slice?Uint8Array.prototype.slice.call(e,t,i):new Uint8Array(Array.prototype.slice.call(e,t,i))},C=function(e){return e.reverse?e.reverse():Array.prototype.reverse.call(e)}},(e,t,i)=>{"use strict";i.r(t),i.d(t,{detectContainerForBytes:()=>h,isLikely:()=>d,isLikelyFmp4MediaSegment:()=>p});var n=i(105),r=i(107),s=i(110),a=i(104),o=i(111),l={webm:(0,n.toUint8)([119,101,98,109]),matroska:(0,n.toUint8)([109,97,116,114,111,115,107,97]),flac:(0,n.toUint8)([102,76,97,67]),ogg:(0,n.toUint8)([79,103,103,83]),ac3:(0,n.toUint8)([11,119]),riff:(0,n.toUint8)([82,73,70,70]),avi:(0,n.toUint8)([65,86,73]),wav:(0,n.toUint8)([87,65,86,69]),"3gp":(0,n.toUint8)([102,116,121,112,51,103]),mp4:(0,n.toUint8)([102,116,121,112]),fmp4:(0,n.toUint8)([115,116,121,112]),mov:(0,n.toUint8)([102,116,121,112,113,116]),moov:(0,n.toUint8)([109,111,111,118]),moof:(0,n.toUint8)([109,111,111,102])},u={aac:function(e){var t=(0,a.getId3Offset)(e);return(0,n.bytesMatch)(e,[255,16],{offset:t,mask:[255,22]})},mp3:function(e){var t=(0,a.getId3Offset)(e);return(0,n.bytesMatch)(e,[255,2],{offset:t,mask:[255,6]})},webm:function(e){var t=(0,s.findEbml)(e,[s.EBML_TAGS.EBML,s.EBML_TAGS.DocType])[0];return(0,n.bytesMatch)(t,l.webm)},mkv:function(e){var t=(0,s.findEbml)(e,[s.EBML_TAGS.EBML,s.EBML_TAGS.DocType])[0];return(0,n.bytesMatch)(t,l.matroska)},mp4:function(e){return!u["3gp"](e)&&!u.mov(e)&&(!(!(0,n.bytesMatch)(e,l.mp4,{offset:4})&&!(0,n.bytesMatch)(e,l.fmp4,{offset:4}))||(!(!(0,n.bytesMatch)(e,l.moof,{offset:4})&&!(0,n.bytesMatch)(e,l.moov,{offset:4}))||void 0))},mov:function(e){return(0,n.bytesMatch)(e,l.mov,{offset:4})},"3gp":function(e){return(0,n.bytesMatch)(e,l["3gp"],{offset:4})},ac3:function(e){var t=(0,a.getId3Offset)(e);return(0,n.bytesMatch)(e,l.ac3,{offset:t})},ts:function(e){if(e.length<189&&e.length>=1)return 71===e[0];for(var t=0;t+188<e.length&&t<188;){if(71===e[t]&&71===e[t+188])return!0;t+=1}return!1},flac:function(e){var t=(0,a.getId3Offset)(e);return(0,n.bytesMatch)(e,l.flac,{offset:t})},ogg:function(e){return(0,n.bytesMatch)(e,l.ogg)},avi:function(e){return(0,n.bytesMatch)(e,l.riff)&&(0,n.bytesMatch)(e,l.avi,{offset:8})},wav:function(e){return(0,n.bytesMatch)(e,l.riff)&&(0,n.bytesMatch)(e,l.wav,{offset:8})},h264:function(e){return(0,o.findH264Nal)(e,7,3).length},h265:function(e){return(0,o.findH265Nal)(e,[32,33],3).length}},c=Object.keys(u).filter((function(e){return"ts"!==e&&"h264"!==e&&"h265"!==e})).concat(["ts","h264","h265"]);c.forEach((function(e){var t=u[e];u[e]=function(e){return t((0,n.toUint8)(e))}}));var d=u,h=function(e){e=(0,n.toUint8)(e);for(var t=0;t<c.length;t++){var i=c[t];if(d[i](e))return i}return""},p=function(e){return(0,r.findBox)(e,["moof"]).length>0}},(e,t,i)=>{"use strict";i.r(t),i.d(t,{addSampleDescription:()=>p,buildFrameTable:()=>h,findBox:()=>u,findNamedBox:()=>c,parseDescriptors:()=>l,parseMediaInfo:()=>m,parseTracks:()=>f});var n,r=i(105),s=i(108),a=i(109),o=function(e){return"string"==typeof e?(0,r.stringToBytes)(e):e},l=function(e){e=(0,r.toUint8)(e);for(var t=[],i=0;e.length>i;){var s=e[i],a=0,o=0,l=e[++o];for(o++;128&l;)a=(127&l)<<7,l=e[o],o++;a+=127&l;for(var u=0;u<n.length;u++){var c=n[u],d=c.id,h=c.parser;if(s===d){t.push(h(e.subarray(o,o+a)));break}}i+=a+o}return t};n=[{id:3,parser:function(e){var t={tag:3,id:e[0]<<8|e[1],flags:e[2],size:3,dependsOnEsId:0,ocrEsId:0,descriptors:[],url:""};if(128&t.flags&&(t.dependsOnEsId=e[t.size]<<8|e[t.size+1],t.size+=2),64&t.flags){var i=e[t.size];t.url=(0,r.bytesToString)(e.subarray(t.size+1,t.size+1+i)),t.size+=i}return 32&t.flags&&(t.ocrEsId=e[t.size]<<8|e[t.size+1],t.size+=2),t.descriptors=l(e.subarray(t.size))||[],t}},{id:4,parser:function(e){return{tag:4,oti:e[0],streamType:e[1],bufferSize:e[2]<<16|e[3]<<8|e[4],maxBitrate:e[5]<<24|e[6]<<16|e[7]<<8|e[8],avgBitrate:e[9]<<24|e[10]<<16|e[11]<<8|e[12],descriptors:l(e.subarray(13))}}},{id:5,parser:function(e){return{tag:5,bytes:e}}},{id:6,parser:function(e){return{tag:6,bytes:e}}}];var u=function e(t,i,n){void 0===n&&(n=!1),i=function(e){return Array.isArray(e)?e.map((function(e){return o(e)})):[o(e)]}(i),t=(0,r.toUint8)(t);var s=[];if(!i.length)return s;for(var a=0;a<t.length;){var l=(t[a]<<24|t[a+1]<<16|t[a+2]<<8|t[a+3])>>>0,u=t.subarray(a+4,a+8);if(0===l)break;var c=a+l;if(c>t.length){if(n)break;c=t.length}var d=t.subarray(a+8,c);(0,r.bytesMatch)(u,i[0])&&(1===i.length?s.push(d):s.push.apply(s,e(d,i.slice(1),n))),a=c}return s},c=function(e,t){if(!(t=o(t)).length)return e.subarray(e.length);for(var i=0;i<e.length;){if((0,r.bytesMatch)(e.subarray(i,i+t.length),t)){var n=(e[i-4]<<24|e[i-3]<<16|e[i-2]<<8|e[i-1])>>>0,s=n>1?i+n:e.byteLength;return e.subarray(i+4,s)}i++}return e.subarray(e.length)},d=function(e,t,i){void 0===t&&(t=4),void 0===i&&(i=function(e){return(0,r.bytesToNumber)(e)});var n=[];if(!e||!e.length)return n;for(var s=(0,r.bytesToNumber)(e.subarray(4,8)),a=8;s;a+=t,s--)n.push(i(e.subarray(a,a+t)));return n},h=function(e,t){for(var i=d(u(e,["stss"])[0]),n=d(u(e,["stco"])[0]),s=d(u(e,["stts"])[0],8,(function(e){return{sampleCount:(0,r.bytesToNumber)(e.subarray(0,4)),sampleDelta:(0,r.bytesToNumber)(e.subarray(4,8))}})),a=d(u(e,["stsc"])[0],12,(function(e){return{firstChunk:(0,r.bytesToNumber)(e.subarray(0,4)),samplesPerChunk:(0,r.bytesToNumber)(e.subarray(4,8)),sampleDescriptionIndex:(0,r.bytesToNumber)(e.subarray(8,12))}})),o=u(e,["stsz"])[0],l=d(o&&o.length&&o.subarray(4)||null),c=[],h=0;h<n.length;h++){for(var p=void 0,f=0;f<a.length;f++){var m=a[f];if(h+1>=m.firstChunk&&(f+1>=a.length||h+1<a[f+1].firstChunk)){p=m.samplesPerChunk;break}}for(var g=n[h],v=0;v<p;v++){var y=l[c.length],_=!i.length;i.length&&-1!==i.indexOf(c.length+1)&&(_=!0);for(var b={keyframe:_,start:g,end:g+y},T=0;T<s.length;T++){var w=s[T],S=w.sampleCount,k=w.sampleDelta;if(c.length<=S){var E=c.length?c[c.length-1].timestamp:0;b.timestamp=E+k/t*1e3,b.duration=k;break}}c.push(b),g+=y}}return c},p=function(e,t){var i=(0,r.bytesToString)(t.subarray(0,4));if("video"===e.type?(e.info=e.info||{},e.info.width=t[28]<<8|t[29],e.info.height=t[30]<<8|t[31]):"audio"===e.type&&(e.info=e.info||{},e.info.channels=t[20]<<8|t[21],e.info.bitDepth=t[22]<<8|t[23],e.info.sampleRate=t[28]<<8|t[29]),"avc1"===i){var n=c(t,"avcC");i+="."+(0,s.getAvcCodec)(n),e.info.avcC=n}else if("hvc1"===i||"hev1"===i)i+="."+(0,s.getHvcCodec)(c(t,"hvcC"));else if("mp4a"===i||"mp4v"===i){var o=c(t,"esds"),u=l(o.subarray(4))[0],d=u&&u.descriptors.filter((function(e){return 4===e.tag}))[0];d?(i+="."+(0,r.toHexString)(d.oti),64===d.oti?i+="."+(d.descriptors[0].bytes[0]>>3).toString():32===d.oti?i+="."+d.descriptors[0].bytes[4].toString():221===d.oti&&(i="vorbis")):"audio"===e.type?i+=".40.2":i+=".20.9"}else if("av01"===i)i+="."+(0,s.getAv1Codec)(c(t,"av1C"));else if("vp09"===i){var h=c(t,"vpcC"),p=h[0],f=h[1],m=h[2]>>4,g=(15&h[2])>>1,v=(15&h[2])>>3,y=h[3],_=h[4],b=h[5];i+="."+(0,r.padStart)(p,2,"0"),i+="."+(0,r.padStart)(f,2,"0"),i+="."+(0,r.padStart)(m,2,"0"),i+="."+(0,r.padStart)(g,2,"0"),i+="."+(0,r.padStart)(y,2,"0"),i+="."+(0,r.padStart)(_,2,"0"),i+="."+(0,r.padStart)(b,2,"0"),i+="."+(0,r.padStart)(v,2,"0")}else if("theo"===i)i="theora";else if("spex"===i)i="speex";else if(".mp3"===i)i="mp4a.40.34";else if("msVo"===i)i="vorbis";else if("Opus"===i){i="opus";var T=c(t,"dOps");e.info.opus=(0,a.parseOpusHead)(T),e.info.codecDelay=65e5}else i=i.toLowerCase();e.codec=i},f=function(e,t){void 0===t&&(t=!0),e=(0,r.toUint8)(e);var i=u(e,["moov","trak"],!0),n=[];return i.forEach((function(e){var i={bytes:e},s=u(e,["mdia"])[0],a=u(s,["hdlr"])[0],o=(0,r.bytesToString)(a.subarray(8,12));i.type="soun"===o?"audio":"vide"===o?"video":o;var l=u(e,["tkhd"])[0];if(l){var c=new DataView(l.buffer,l.byteOffset,l.byteLength),d=c.getUint8(0);i.number=0===d?c.getUint32(12):c.getUint32(20)}var f=u(s,["mdhd"])[0];if(f){var m=0===f[0]?12:20;i.timescale=(f[m]<<24|f[m+1]<<16|f[m+2]<<8|f[m+3])>>>0}for(var g=u(s,["minf","stbl"])[0],v=u(g,["stsd"])[0],y=(0,r.bytesToNumber)(v.subarray(4,8)),_=8;y--;){var b=(0,r.bytesToNumber)(v.subarray(_,_+4)),T=v.subarray(_+4,_+4+b);p(i,T),_+=4+b}t&&(i.frameTable=h(g,i.timescale)),n.push(i)})),n},m=function(e){var t=u(e,["moov","mvhd"],!0)[0];if(t&&t.length){var i={};return 1===t[0]?(i.timestampScale=(0,r.bytesToNumber)(t.subarray(20,24)),i.duration=(0,r.bytesToNumber)(t.subarray(24,32))):(i.timestampScale=(0,r.bytesToNumber)(t.subarray(12,16)),i.duration=(0,r.bytesToNumber)(t.subarray(16,20))),i.bytes=t,i}}},(e,t,i)=>{"use strict";i.r(t),i.d(t,{getAv1Codec:()=>r,getAvcCodec:()=>s,getHvcCodec:()=>a});var n=i(105),r=function(e){var t,i="",r=e[1]>>>3,s=31&e[1],a=e[2]>>>7,o=(64&e[2])>>6,l=(32&e[2])>>5,u=(16&e[2])>>4,c=(8&e[2])>>3,d=(4&e[2])>>2,h=3&e[2];return i+=r+"."+(0,n.padStart)(s,2,"0"),0===a?i+="M":1===a&&(i+="H"),t=2===r&&o?l?12:10:o?10:8,i+="."+(0,n.padStart)(t,2,"0"),i+="."+u,i+="."+c+d+h},s=function(e){return""+(0,n.toHexString)(e[1])+(0,n.toHexString)(252&e[2])+(0,n.toHexString)(e[3])},a=function(e){var t="",i=e[1]>>6,r=31&e[1],s=(32&e[1])>>5,a=e.subarray(2,6),o=e.subarray(6,12),l=e[12];1===i?t+="A":2===i?t+="B":3===i&&(t+="C"),t+=r+".";var u=parseInt((0,n.toBinaryString)(a).split("").reverse().join(""),2);u>255&&(u=parseInt((0,n.toBinaryString)(a),2)),t+=u.toString(16)+".",t+=0===s?"L":"H",t+=l;for(var c="",d=0;d<o.length;d++){var h=o[d];h&&(c&&(c+="."),c+=h.toString(16))}return c&&(t+="."+c),t}},(e,t,i)=>{"use strict";i.r(t),i.d(t,{OPUS_HEAD:()=>n,parseOpusHead:()=>r,setOpusHead:()=>s});var n=new Uint8Array([79,112,117,115,72,101,97,100]),r=function(e){var t=new DataView(e.buffer,e.byteOffset,e.byteLength),i=t.getUint8(0),n=0!==i,r={version:i,channels:t.getUint8(1),preSkip:t.getUint16(2,n),sampleRate:t.getUint32(4,n),outputGain:t.getUint16(8,n),channelMappingFamily:t.getUint8(10)};if(r.channelMappingFamily>0&&e.length>10){r.streamCount=t.getUint8(11),r.twoChannelStreamCount=t.getUint8(12),r.channelMapping=[];for(var s=0;s<r.channels;s++)r.channelMapping.push(t.getUint8(13+s))}return r},s=function(e){var t=e.channelMappingFamily<=0?11:12+e.channels,i=new DataView(new ArrayBuffer(t)),n=0!==e.version;return i.setUint8(0,e.version),i.setUint8(1,e.channels),i.setUint16(2,e.preSkip,n),i.setUint32(4,e.sampleRate,n),i.setUint16(8,e.outputGain,n),i.setUint8(10,e.channelMappingFamily),e.channelMappingFamily>0&&(i.setUint8(11,e.streamCount),e.channelMapping.foreach((function(e,t){i.setUint8(12+t,e)}))),new Uint8Array(i.buffer)}},(e,t,i)=>{"use strict";i.r(t),i.d(t,{EBML_TAGS:()=>s,decodeBlock:()=>d,findEbml:()=>c,parseData:()=>p,parseTracks:()=>h});var n=i(105),r=i(108),s={EBML:(0,n.toUint8)([26,69,223,163]),DocType:(0,n.toUint8)([66,130]),Segment:(0,n.toUint8)([24,83,128,103]),SegmentInfo:(0,n.toUint8)([21,73,169,102]),Tracks:(0,n.toUint8)([22,84,174,107]),Track:(0,n.toUint8)([174]),TrackNumber:(0,n.toUint8)([215]),DefaultDuration:(0,n.toUint8)([35,227,131]),TrackEntry:(0,n.toUint8)([174]),TrackType:(0,n.toUint8)([131]),FlagDefault:(0,n.toUint8)([136]),CodecID:(0,n.toUint8)([134]),CodecPrivate:(0,n.toUint8)([99,162]),VideoTrack:(0,n.toUint8)([224]),AudioTrack:(0,n.toUint8)([225]),Cluster:(0,n.toUint8)([31,67,182,117]),Timestamp:(0,n.toUint8)([231]),TimestampScale:(0,n.toUint8)([42,215,177]),BlockGroup:(0,n.toUint8)([160]),BlockDuration:(0,n.toUint8)([155]),Block:(0,n.toUint8)([161]),SimpleBlock:(0,n.toUint8)([163])},a=[128,64,32,16,8,4,2,1],o=function(e,t,i,r){void 0===i&&(i=!0),void 0===r&&(r=!1);var s=function(e){for(var t=1,i=0;i<a.length&&!(e&a[i]);i++)t++;return t}(e[t]),o=e.subarray(t,t+s);return i&&((o=Array.prototype.slice.call(e,t,t+s))[0]^=a[s-1]),{length:s,value:(0,n.bytesToNumber)(o,{signed:r}),bytes:o}},l=function e(t){return"string"==typeof t?t.match(/.{1,2}/g).map((function(t){return e(t)})):"number"==typeof t?(0,n.numberToBytes)(t):t},u=function e(t,i,r){if(r>=i.length)return i.length;var s=o(i,r,!1);if((0,n.bytesMatch)(t.bytes,s.bytes))return r;var a=o(i,r+s.length);return e(t,i,r+a.length+a.value+s.length)},c=function e(t,i){i=function(e){return Array.isArray(e)?e.map((function(e){return l(e)})):[l(e)]}(i),t=(0,n.toUint8)(t);var r=[];if(!i.length)return r;for(var s=0;s<t.length;){var a=o(t,s,!1),c=o(t,s+a.length),d=s+a.length+c.length;127===c.value&&(c.value=u(a,t,d),c.value!==t.length&&(c.value-=d));var h=d+c.value>t.length?t.length:d+c.value,p=t.subarray(d,h);(0,n.bytesMatch)(i[0],a.bytes)&&(1===i.length?r.push(p):r=r.concat(e(p,i.slice(1)))),s+=a.length+c.length+p.length}return r},d=function(e,t,i,r){var a;"group"===t&&((a=c(e,[s.BlockDuration])[0])&&(a=1/i*(a=(0,n.bytesToNumber)(a))*i/1e3),e=c(e,[s.Block])[0],t="block");var l=new DataView(e.buffer,e.byteOffset,e.byteLength),u=o(e,0),d=l.getInt16(u.length,!1),h=e[u.length+2],p=e.subarray(u.length+3),f=1/i*(r+d)*i/1e3,m={duration:a,trackNumber:u.value,keyframe:"simple"===t&&h>>7==1,invisible:(8&h)>>3==1,lacing:(6&h)>>1,discardable:"simple"===t&&1==(1&h),frames:[],pts:f,dts:f,timestamp:d};if(!m.lacing)return m.frames.push(p),m;var g=p[0]+1,v=[],y=1;if(2===m.lacing)for(var _=(p.length-y)/g,b=0;b<g;b++)v.push(_);if(1===m.lacing)for(var T=0;T<g-1;T++){var w=0;do{w+=p[y],y++}while(255===p[y-1]);v.push(w)}if(3===m.lacing)for(var S=0,k=0;k<g-1;k++){var E=0===k?o(p,y):o(p,y,!0,!0);S+=E.value,v.push(S),y+=E.length}return v.forEach((function(e){m.frames.push(p.subarray(y,y+e)),y+=e})),m},h=function(e){e=(0,n.toUint8)(e);var t=[],i=c(e,[s.Segment,s.Tracks,s.Track]);return i.length||(i=c(e,[s.Tracks,s.Track])),i.length||(i=c(e,[s.Track])),i.length?(i.forEach((function(e){var i=c(e,s.TrackType)[0];if(i&&i.length){if(1===i[0])i="video";else if(2===i[0])i="audio";else{if(17!==i[0])return;i="subtitle"}var a={rawCodec:(0,n.bytesToString)(c(e,[s.CodecID])[0]),type:i,codecPrivate:c(e,[s.CodecPrivate])[0],number:(0,n.bytesToNumber)(c(e,[s.TrackNumber])[0]),defaultDuration:(0,n.bytesToNumber)(c(e,[s.DefaultDuration])[0]),default:c(e,[s.FlagDefault])[0],rawData:e},o="";if(/V_MPEG4\/ISO\/AVC/.test(a.rawCodec))o="avc1."+(0,r.getAvcCodec)(a.codecPrivate);else if(/V_MPEGH\/ISO\/HEVC/.test(a.rawCodec))o="hev1."+(0,r.getHvcCodec)(a.codecPrivate);else if(/V_MPEG4\/ISO\/ASP/.test(a.rawCodec))o=a.codecPrivate?"mp4v.20."+a.codecPrivate[4].toString():"mp4v.20.9";else if(/^V_THEORA/.test(a.rawCodec))o="theora";else if(/^V_VP8/.test(a.rawCodec))o="vp8";else if(/^V_VP9/.test(a.rawCodec))if(a.codecPrivate){var l=function(e){for(var t=0,i={};t<e.length;){var n=127&e[t],r=e[t+1],s=void 0;s=1===r?e[t+2]:e.subarray(t+2,t+2+r),1===n?i.profile=s:2===n?i.level=s:3===n?i.bitDepth=s:4===n?i.chromaSubsampling=s:i[n]=s,t+=2+r}return i}(a.codecPrivate),u=l.profile,d=l.level,h=l.bitDepth,p=l.chromaSubsampling;o="vp09.",o+=(0,n.padStart)(u,2,"0")+".",o+=(0,n.padStart)(d,2,"0")+".",o+=(0,n.padStart)(h,2,"0")+".",o+=""+(0,n.padStart)(p,2,"0");var f=c(e,[224,[85,176],[85,177]])[0]||[],m=c(e,[224,[85,176],[85,185]])[0]||[],g=c(e,[224,[85,176],[85,186]])[0]||[],v=c(e,[224,[85,176],[85,187]])[0]||[];(f.length||m.length||g.length||v.length)&&(o+="."+(0,n.padStart)(v[0],2,"0"),o+="."+(0,n.padStart)(g[0],2,"0"),o+="."+(0,n.padStart)(f[0],2,"0"),o+="."+(0,n.padStart)(m[0],2,"0"))}else o="vp9";else/^V_AV1/.test(a.rawCodec)?o="av01."+(0,r.getAv1Codec)(a.codecPrivate):/A_ALAC/.test(a.rawCodec)?o="alac":/A_MPEG\/L2/.test(a.rawCodec)?o="mp2":/A_MPEG\/L3/.test(a.rawCodec)?o="mp3":/^A_AAC/.test(a.rawCodec)?o=a.codecPrivate?"mp4a.40."+(a.codecPrivate[0]>>>3).toString():"mp4a.40.2":/^A_AC3/.test(a.rawCodec)?o="ac-3":/^A_PCM/.test(a.rawCodec)?o="pcm":/^A_MS\/ACM/.test(a.rawCodec)?o="speex":/^A_EAC3/.test(a.rawCodec)?o="ec-3":/^A_VORBIS/.test(a.rawCodec)?o="vorbis":/^A_FLAC/.test(a.rawCodec)?o="flac":/^A_OPUS/.test(a.rawCodec)&&(o="opus");a.codec=o,t.push(a)}})),t.sort((function(e,t){return e.number-t.number}))):t},p=function(e,t){var i=[],r=c(e,[s.Segment])[0],a=c(r,[s.SegmentInfo,s.TimestampScale])[0];a=a&&a.length?(0,n.bytesToNumber)(a):1e6;var o=c(r,[s.Cluster]);return t||(t=h(r)),o.forEach((function(e,t){var r=c(e,[s.SimpleBlock]).map((function(e){return{type:"simple",data:e}})),o=c(e,[s.BlockGroup]).map((function(e){return{type:"group",data:e}})),l=c(e,[s.Timestamp])[0]||0;l&&l.length&&(l=(0,n.bytesToNumber)(l)),r.concat(o).sort((function(e,t){return e.data.byteOffset-t.data.byteOffset})).forEach((function(e,t){var n=d(e.data,e.type,a,l);i.push(n)}))})),{tracks:t,blocks:i}}},(e,t,i)=>{"use strict";i.r(t),i.d(t,{EMULATION_PREVENTION:()=>a,NAL_TYPE_ONE:()=>r,NAL_TYPE_TWO:()=>s,discardEmulationPreventionBytes:()=>o,findH264Nal:()=>u,findH265Nal:()=>c,findNal:()=>l});var n=i(105),r=(0,n.toUint8)([0,0,0,1]),s=(0,n.toUint8)([0,0,1]),a=(0,n.toUint8)([0,0,3]),o=function(e){for(var t=[],i=1;i<e.length-2;)(0,n.bytesMatch)(e.subarray(i,i+3),a)&&(t.push(i+2),i++),i++;if(0===t.length)return e;var r=e.length-t.length,s=new Uint8Array(r),o=0;for(i=0;i<r;o++,i++)o===t[0]&&(o++,t.shift()),s[i]=e[o];return s},l=function(e,t,i,a){void 0===a&&(a=1/0),e=(0,n.toUint8)(e),i=[].concat(i);for(var l,u=0,c=0;u<e.length&&(c<a||l);){var d=void 0;if((0,n.bytesMatch)(e.subarray(u),r)?d=4:(0,n.bytesMatch)(e.subarray(u),s)&&(d=3),d){if(c++,l)return o(e.subarray(l,u));var h=void 0;"h264"===t?h=31&e[u+d]:"h265"===t&&(h=e[u+d]>>1&63),-1!==i.indexOf(h)&&(l=u+d),u+=d+("h264"===t?1:2)}else u++}return e.subarray(0,0)},u=function(e,t,i){return l(e,"h264",t,i)},c=function(e,t,i){return l(e,"h265",t,i)}},e=>{var t,i,n,r,s,a,o,l=9e4;t=function(e){return e*l},i=function(e,t){return e*t},n=function(e){return e/l},r=function(e,t){return e/t},s=function(e,i){return t(r(e,i))},a=function(e,t){return i(n(e),t)},o=function(e,t,i){return n(i?e:e-t)},e.exports={ONE_SECOND_IN_TS:l,secondsToVideoTs:t,secondsToAudioTs:i,videoTsToSeconds:n,audioTsToSeconds:r,audioTsToVideoTs:s,videoTsToAudioTs:a,metadataTsToSeconds:o}},(e,t,i)=>{"use strict";i.r(t)},(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>s});var n=i(61),r=i.n(n);i(64);const s={init:function(){setTimeout((function(){if(r()(".slider-section").length>0){var e=r()(".slider-slide").width(),t=r()(".slider-slide").height();r()(".slider-container li span").css({width:e,height:t});var i=0;r()(".slider-container").each((function(){i++,r()(this).addClass("slider-"+i).slick({slidesToShow:1,dots:!1,slidesToScroll:1,infinite:!0,asNavFor:".slider-for.slider-"+i,rtl:!0,autoplaySpeed:5e3,autoplay:!0,centerMode:!0,pauseOnHover:!1,responsive:!0,arrows:!1,cssEase:"ease-in-out",variableWidth:!0,lazyLoad:"ondemand",speed:800}).slick("slickPause")})),i=0,r()(".slider-for").each((function(){i++,r()(this).addClass("slider-"+i).slick({slidesToShow:1,slidesToScroll:1,arrows:!1,fade:!0,autoplaySpeed:5e3,autoplay:!0,responsive:!0,infinite:!0,arrows:!1,pauseOnHover:!1,speed:800,asNavFor:".slider-container.slider-"+i}).slick("slickPause")})),i=0,r()(".slider-"+i),r()(".slider-container").each((function(){i++;let e=r()(".slider-"+i),t=!1,n=r()(window).scrollTop(),s=n+r()(window).height(),a=e.offset().top,o=a+e.height();r()(window).on("scroll",(function(){n=r()(window).scrollTop(),s=n+r()(window).height(),a=e.offset().top,o=a+e.height(),s>a&&n<o?t||(e.each((function(e){r()(this).find(".firstImgReveal").addClass("doReveal"),r()(this).slick("slickPlay")})),t=!0):t&&(e.each((function(){r()(this).slick("slickPause")})),t=!1)}))})),r()(".slider-container li").on("click",(function(){var e=r()(this).parentsUntil(".container"),t=r()(this).attr("data-slide");r()("."+e[4].classList[1]).slick("slickGoTo",parseInt(t))}))}}),1500)}}},(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>o});var n=i(61),r=i.n(n),s=i(116),a=i(119);s.gsap.registerPlugin(a.default);const o={init:function(){setTimeout((function(){var e=document.getElementsByClassName("navigation-box")[0].getElementsByTagName("nav")[0].getElementsByTagName("ul");if(e[0].children.length>0){for(var t=window.location.href.split("?")[0],i=0;i<e[0].children.length;i++)e[0].children[i].className="";for(i=0;i<e[0].children.length;i++)t==e[0].children[i].getAttribute("data-url")&&(e[0].children[i].className="active")}const n=r()(".navigation-block");if(0!==n.length){var o=!0;r()(".logo a").on("click",(function(){r()(".menu").removeClass("active"),l(),r()("body").removeClass("hide-scroller")})),r()(".menu, nav li a").on("click",(function(){o?(r()(".menu").addClass("active"),s.gsap.fromTo(".navigation-box",{left:"-100%",ease:"expo.inOut",duration:.5},{left:0,ease:"expo.inOut",duration:.5,onComplete:function(){o=!1,s.gsap.fromTo(".navigation-box ul li",{transform:"translateX(-100%)",opacity:0,ease:'CustomEase.create("custom", "M0,0 C0.11,0.494 0.04,0.762 0.166,0.888 0.298,1.02 0.504,1 1,1 ")'},{stagger:.2,transform:"translateX(0)",opacity:1,ease:'CustomEase.create("custom", "M0,0 C0.11,0.494 0.04,0.762 0.166,0.888 0.298,1.02 0.504,1 1,1 ")'})}}),r()("body").addClass("hide-scroller")):(r()(".menu").removeClass("active"),l(),r()("body").removeClass("hide-scroller"))}))}function l(){s.gsap.fromTo(".navigation-box",{left:0},{left:"100%",ease:"expo.inOut",duration:.5,onComplete:function(){o=!0,s.gsap.to(".navigation-box ul li",{transform:"translateX(-50px)",opacity:0})}})}var u=n.attr("data-bg-color");a.default.create({start:"top top",end:99999,onUpdate:e=>{u=n.attr("data-bg-color"),-1===e.direction&&e.progress>=.003?(r()(".navigation-block").addClass("scrolled"),r()(".scrolled").css("background",u)):(r()(".scrolled").css("background","transparent"),r()(".navigation-block").removeClass("scrolled"))},onLeaveBack:function(){r()(".scrolled").css("background","transparent"),r()(".navigation-block").removeClass("scrolled")}})}),1500)}}},(e,t,i)=>{"use strict";i.r(t),i.d(t,{Back:()=>n.Back,Bounce:()=>n.Bounce,CSSPlugin:()=>r.CSSPlugin,Circ:()=>n.Circ,Cubic:()=>n.Cubic,Elastic:()=>n.Elastic,Expo:()=>n.Expo,Linear:()=>n.Linear,Power0:()=>n.Power0,Power1:()=>n.Power1,Power2:()=>n.Power2,Power3:()=>n.Power3,Power4:()=>n.Power4,Quad:()=>n.Quad,Quart:()=>n.Quart,Quint:()=>n.Quint,Sine:()=>n.Sine,SteppedEase:()=>n.SteppedEase,Strong:()=>n.Strong,TimelineLite:()=>n.TimelineLite,TimelineMax:()=>n.TimelineMax,TweenLite:()=>n.TweenLite,TweenMax:()=>a,default:()=>s,gsap:()=>s});var n=i(117),r=i(118),s=n.gsap.registerPlugin(r.CSSPlugin)||n.gsap,a=s.core.Tween},(e,t,i)=>{"use strict";function n(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function r(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}i.r(t),i.d(t,{Animation:()=>ii,Back:()=>Vi,Bounce:()=>Xi,Circ:()=>Ki,Cubic:()=>Fi,Elastic:()=>Wi,Expo:()=>Yi,GSCache:()=>ti,Linear:()=>Bi,Power0:()=>Di,Power1:()=>Mi,Power2:()=>Ni,Power3:()=>Ri,Power4:()=>Ui,PropTween:()=>Ai,Quad:()=>ji,Quart:()=>Hi,Quint:()=>qi,Sine:()=>Gi,SteppedEase:()=>$i,Strong:()=>zi,Timeline:()=>ni,TimelineLite:()=>ni,TimelineMax:()=>ni,Tween:()=>fi,TweenLite:()=>fi,TweenMax:()=>fi,_checkPlugin:()=>li,_colorExp:()=>jt,_colorStringFilter:()=>Ht,_config:()=>D,_forEachName:()=>ke,_getCache:()=>we,_getProperty:()=>Se,_getSetter:()=>_i,_isString:()=>z,_isUndefined:()=>$,_missingPlugin:()=>ue,_numExp:()=>ee,_numWithUnitExp:()=>te,_parseRelative:()=>xe,_plugins:()=>ge,_relExp:()=>ne,_removeLinkedListItem:()=>je,_renderComplexString:()=>wi,_replaceRandom:()=>Ct,_round:()=>Ee,_roundModifier:()=>vt,_setDefaults:()=>De,_sortPropTweensByPriority:()=>xi,_ticker:()=>qt,clamp:()=>ut,default:()=>Li,distribute:()=>gt,getUnit:()=>lt,gsap:()=>Li,interpolate:()=>At,mapRange:()=>xt,normalize:()=>wt,pipe:()=>bt,random:()=>_t,selector:()=>ft,shuffle:()=>mt,snap:()=>yt,splitColor:()=>Rt,toArray:()=>pt,unitize:()=>Tt,wrap:()=>kt,wrapYoyo:()=>Et});var s,a,o,l,u,c,d,h,p,f,m,g,v,y,_,b,T,w,S,k,E,C,x,A,P,I,O,L,D={autoSleep:120,force3D:"auto",nullTargetWarn:1,units:{lineHeight:""}},M={duration:.5,overwrite:!1,delay:0},N=1e8,R=1e-8,U=2*Math.PI,B=U/4,j=0,F=Math.sqrt,H=Math.cos,q=Math.sin,z=function(e){return"string"==typeof e},W=function(e){return"function"==typeof e},V=function(e){return"number"==typeof e},$=function(e){return void 0===e},X=function(e){return"object"==typeof e},G=function(e){return!1!==e},Y=function(){return"undefined"!=typeof window},K=function(e){return W(e)||z(e)},Q="function"==typeof ArrayBuffer&&ArrayBuffer.isView||function(){},J=Array.isArray,Z=/(?:-?\.?\d|\.)+/gi,ee=/[-+=.]*\d+[.e\-+]*\d*[e\-+]*\d*/g,te=/[-+=.]*\d+[.e-]*\d*[a-z%]*/g,ie=/[-+=.]*\d+\.?\d*(?:e-|e\+)?\d*/gi,ne=/[+-]=-?[.\d]+/,re=/[^,'"\[\]\s]+/gi,se=/^[+\-=e\s\d]*\d+[.\d]*([a-z]*|%)\s*$/i,ae={},oe={},le=function(e){return(oe=Me(e,ae))&&Li},ue=function(e,t){return console.warn("Invalid property",e,"set to",t,"Missing plugin? gsap.registerPlugin()")},ce=function(e,t){return!t&&console.warn(e)},de=function(e,t){return e&&(ae[e]=t)&&oe&&(oe[e]=t)||ae},he=function(){return 0},pe={},fe=[],me={},ge={},ve={},ye=30,_e=[],be="",Te=function(e){var t,i,n=e[0];if(X(n)||W(n)||(e=[e]),!(t=(n._gsap||{}).harness)){for(i=_e.length;i--&&!_e[i].targetTest(n););t=_e[i]}for(i=e.length;i--;)e[i]&&(e[i]._gsap||(e[i]._gsap=new ti(e[i],t)))||e.splice(i,1);return e},we=function(e){return e._gsap||Te(pt(e))[0]._gsap},Se=function(e,t,i){return(i=e[t])&&W(i)?e[t]():$(i)&&e.getAttribute&&e.getAttribute(t)||i},ke=function(e,t){return(e=e.split(",")).forEach(t)||e},Ee=function(e){return Math.round(1e5*e)/1e5||0},Ce=function(e){return Math.round(1e7*e)/1e7||0},xe=function(e,t){var i=t.charAt(0),n=parseFloat(t.substr(2));return e=parseFloat(e),"+"===i?e+n:"-"===i?e-n:"*"===i?e*n:e/n},Ae=function(e,t){for(var i=t.length,n=0;e.indexOf(t[n])<0&&++n<i;);return n<i},Pe=function(){var e,t,i=fe.length,n=fe.slice(0);for(me={},fe.length=0,e=0;e<i;e++)(t=n[e])&&t._lazy&&(t.render(t._lazy[0],t._lazy[1],!0)._lazy=0)},Ie=function(e,t,i,n){fe.length&&Pe(),e.render(t,i,n),fe.length&&Pe()},Oe=function(e){var t=parseFloat(e);return(t||0===t)&&(e+"").match(re).length<2?t:z(e)?e.trim():e},Le=function(e){return e},De=function(e,t){for(var i in t)i in e||(e[i]=t[i]);return e},Me=function(e,t){for(var i in t)e[i]=t[i];return e},Ne=function e(t,i){for(var n in i)"__proto__"!==n&&"constructor"!==n&&"prototype"!==n&&(t[n]=X(i[n])?e(t[n]||(t[n]={}),i[n]):i[n]);return t},Re=function(e,t){var i,n={};for(i in e)i in t||(n[i]=e[i]);return n},Ue=function(e){var t,i=e.parent||a,n=e.keyframes?(t=J(e.keyframes),function(e,i){for(var n in i)n in e||"duration"===n&&t||"ease"===n||(e[n]=i[n])}):De;if(G(e.inherit))for(;i;)n(e,i.vars.defaults),i=i.parent||i._dp;return e},Be=function(e,t,i,n,r){void 0===i&&(i="_first"),void 0===n&&(n="_last");var s,a=e[n];if(r)for(s=t[r];a&&a[r]>s;)a=a._prev;return a?(t._next=a._next,a._next=t):(t._next=e[i],e[i]=t),t._next?t._next._prev=t:e[n]=t,t._prev=a,t.parent=t._dp=e,t},je=function(e,t,i,n){void 0===i&&(i="_first"),void 0===n&&(n="_last");var r=t._prev,s=t._next;r?r._next=s:e[i]===t&&(e[i]=s),s?s._prev=r:e[n]===t&&(e[n]=r),t._next=t._prev=t.parent=null},Fe=function(e,t){e.parent&&(!t||e.parent.autoRemoveChildren)&&e.parent.remove(e),e._act=0},He=function(e,t){if(e&&(!t||t._end>e._dur||t._start<0))for(var i=e;i;)i._dirty=1,i=i.parent;return e},qe=function(e){for(var t=e.parent;t&&t.parent;)t._dirty=1,t.totalDuration(),t=t.parent;return e},ze=function e(t){return!t||t._ts&&e(t.parent)},We=function(e){return e._repeat?Ve(e._tTime,e=e.duration()+e._rDelay)*e:0},Ve=function(e,t){var i=Math.floor(e/=t);return e&&i===e?i-1:i},$e=function(e,t){return(e-t._start)*t._ts+(t._ts>=0?0:t._dirty?t.totalDuration():t._tDur)},Xe=function(e){return e._end=Ce(e._start+(e._tDur/Math.abs(e._ts||e._rts||R)||0))},Ge=function(e,t){var i=e._dp;return i&&i.smoothChildTiming&&e._ts&&(e._start=Ce(i._time-(e._ts>0?t/e._ts:((e._dirty?e.totalDuration():e._tDur)-t)/-e._ts)),Xe(e),i._dirty||He(i,e)),e},Ye=function(e,t){var i;if((t._time||t._initted&&!t._dur)&&(i=$e(e.rawTime(),t),(!t._dur||ot(0,t.totalDuration(),i)-t._tTime>R)&&t.render(i,!0)),He(e,t)._dp&&e._initted&&e._time>=e._dur&&e._ts){if(e._dur<e.duration())for(i=e;i._dp;)i.rawTime()>=0&&i.totalTime(i._tTime),i=i._dp;e._zTime=-1e-8}},Ke=function(e,t,i,n){return t.parent&&Fe(t),t._start=Ce((V(i)?i:i||e!==a?rt(e,i,t):e._time)+t._delay),t._end=Ce(t._start+(t.totalDuration()/Math.abs(t.timeScale())||0)),Be(e,t,"_first","_last",e._sort?"_start":0),et(t)||(e._recent=t),n||Ye(e,t),e},Qe=function(e,t){return(ae.ScrollTrigger||ue("scrollTrigger",t))&&ae.ScrollTrigger.create(t,e)},Je=function(e,t,i,n){return ui(e,t),e._initted?!i&&e._pt&&(e._dur&&!1!==e.vars.lazy||!e._dur&&e.vars.lazy)&&d!==qt.frame?(fe.push(e),e._lazy=[t,n],1):void 0:1},Ze=function e(t){var i=t.parent;return i&&i._ts&&i._initted&&!i._lock&&(i.rawTime()<0||e(i))},et=function(e){var t=e.data;return"isFromStart"===t||"isStart"===t},tt=function(e,t,i,n){var r=e._repeat,s=Ce(t)||0,a=e._tTime/e._tDur;return a&&!n&&(e._time*=s/e._dur),e._dur=s,e._tDur=r?r<0?1e10:Ce(s*(r+1)+e._rDelay*r):s,a>0&&!n?Ge(e,e._tTime=e._tDur*a):e.parent&&Xe(e),i||He(e.parent,e),e},it=function(e){return e instanceof ni?He(e):tt(e,e._dur)},nt={_start:0,endTime:he,totalDuration:he},rt=function e(t,i,n){var r,s,a,o=t.labels,l=t._recent||nt,u=t.duration()>=N?l.endTime(!1):t._dur;return z(i)&&(isNaN(i)||i in o)?(s=i.charAt(0),a="%"===i.substr(-1),r=i.indexOf("="),"<"===s||">"===s?(r>=0&&(i=i.replace(/=/,"")),("<"===s?l._start:l.endTime(l._repeat>=0))+(parseFloat(i.substr(1))||0)*(a?(r<0?l:n).totalDuration()/100:1)):r<0?(i in o||(o[i]=u),o[i]):(s=parseFloat(i.charAt(r-1)+i.substr(r+1)),a&&n&&(s=s/100*(J(n)?n[0]:n).totalDuration()),r>1?e(t,i.substr(0,r-1),n)+s:u+s)):null==i?u:+i},st=function(e,t,i){var n,r,s=V(t[1]),a=(s?2:1)+(e<2?0:1),o=t[a];if(s&&(o.duration=t[1]),o.parent=i,e){for(n=o,r=i;r&&!("immediateRender" in n);)n=r.vars.defaults||{},r=G(r.vars.inherit)&&r.parent;o.immediateRender=G(n.immediateRender),e<2?o.runBackwards=1:o.startAt=t[a-1]}return new fi(t[0],o,t[a+1])},at=function(e,t){return e||0===e?t(e):t},ot=function(e,t,i){return i<e?e:i>t?t:i},lt=function(e,t){return z(e)&&(t=se.exec(e))?t[1]:""},ut=function(e,t,i){return at(i,(function(i){return ot(e,t,i)}))},ct=[].slice,dt=function(e,t){return e&&X(e)&&"length" in e&&(!t&&!e.length||e.length-1 in e&&X(e[0]))&&!e.nodeType&&e!==o},ht=function(e,t,i){return void 0===i&&(i=[]),e.forEach((function(e){var n;return z(e)&&!t||dt(e,1)?(n=i).push.apply(n,pt(e)):i.push(e)}))||i},pt=function(e,t,i){return!z(e)||i||!l&&zt()?J(e)?ht(e,i):dt(e)?ct.call(e,0):e?[e]:[]:ct.call((t||u).querySelectorAll(e),0)},ft=function(e){return e=pt(e)[0]||ce("Invalid scope")||{},function(t){var i=e.current||e.nativeElement||e;return pt(t,i.querySelectorAll?i:i===e?ce("Invalid scope")||u.createElement("div"):e)}},mt=function(e){return e.sort((function(){return.5-Math.random()}))},gt=function(e){if(W(e))return e;var t=X(e)?e:{each:e},i=Kt(t.ease),n=t.from||0,r=parseFloat(t.base)||0,s={},a=n>0&&n<1,o=isNaN(n)||a,l=t.axis,u=n,c=n;return z(n)?u=c={center:.5,edges:.5,end:1}[n]||0:!a&&o&&(u=n[0],c=n[1]),function(e,a,d){var h,p,f,m,g,v,y,_,b,T=(d||t).length,w=s[T];if(!w){if(!(b="auto"===t.grid?0:(t.grid||[1,N])[1])){for(y=-N;y<(y=d[b++].getBoundingClientRect().left)&&b<T;);b--}for(w=s[T]=[],h=o?Math.min(b,T)*u-.5:n%b,p=b===N?0:o?T*c/b-.5:n/b|0,y=0,_=N,v=0;v<T;v++)f=v%b-h,m=p-(v/b|0),w[v]=g=l?Math.abs("y"===l?m:f):F(f*f+m*m),g>y&&(y=g),g<_&&(_=g);"random"===n&&mt(w),w.max=y-_,w.min=_,w.v=T=(parseFloat(t.amount)||parseFloat(t.each)*(b>T?T-1:l?"y"===l?T/b:b:Math.max(b,T/b))||0)*("edges"===n?-1:1),w.b=T<0?r-T:r,w.u=lt(t.amount||t.each)||0,i=i&&T<0?Gt(i):i}return T=(w[e]-w.min)/w.max||0,Ce(w.b+(i?i(T):T)*w.v)+w.u}},vt=function(e){var t=Math.pow(10,((e+"").split(".")[1]||"").length);return function(i){var n=Math.round(parseFloat(i)/e)*e*t;return(n-n%1)/t+(V(i)?0:lt(i))}},yt=function(e,t){var i,n,r=J(e);return!r&&X(e)&&(i=r=e.radius||N,e.values?(e=pt(e.values),(n=!V(e[0]))&&(i*=i)):e=vt(e.increment)),at(t,r?W(e)?function(t){return n=e(t),Math.abs(n-t)<=i?n:t}:function(t){for(var r,s,a=parseFloat(n?t.x:t),o=parseFloat(n?t.y:0),l=N,u=0,c=e.length;c--;)(r=n?(r=e[c].x-a)*r+(s=e[c].y-o)*s:Math.abs(e[c]-a))<l&&(l=r,u=c);return u=!i||l<=i?e[u]:t,n||u===t||V(t)?u:u+lt(t)}:vt(e))},_t=function(e,t,i,n){return at(J(e)?!t:!0===i?!!(i=0):!n,(function(){return J(e)?e[~~(Math.random()*e.length)]:(i=i||1e-5)&&(n=i<1?Math.pow(10,(i+"").length-2):1)&&Math.floor(Math.round((e-i/2+Math.random()*(t-e+.99*i))/i)*i*n)/n}))},bt=function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return function(e){return t.reduce((function(e,t){return t(e)}),e)}},Tt=function(e,t){return function(i){return e(parseFloat(i))+(t||lt(i))}},wt=function(e,t,i){return xt(e,t,0,1,i)},St=function(e,t,i){return at(i,(function(i){return e[~~t(i)]}))},kt=function e(t,i,n){var r=i-t;return J(t)?St(t,e(0,t.length),i):at(n,(function(e){return(r+(e-t)%r)%r+t}))},Et=function e(t,i,n){var r=i-t,s=2*r;return J(t)?St(t,e(0,t.length-1),i):at(n,(function(e){return t+((e=(s+(e-t)%s)%s||0)>r?s-e:e)}))},Ct=function(e){for(var t,i,n,r,s=0,a="";~(t=e.indexOf("random(",s));)n=e.indexOf(")",t),r="["===e.charAt(t+7),i=e.substr(t+7,n-t-7).match(r?re:Z),a+=e.substr(s,t-s)+_t(r?i:+i[0],r?0:+i[1],+i[2]||1e-5),s=n+1;return a+e.substr(s,e.length-s)},xt=function(e,t,i,n,r){var s=t-e,a=n-i;return at(r,(function(t){return i+((t-e)/s*a||0)}))},At=function e(t,i,n,r){var s=isNaN(t+i)?0:function(e){return(1-e)*t+e*i};if(!s){var a,o,l,u,c,d=z(t),h={};if(!0===n&&(r=1)&&(n=null),d)t={p:t},i={p:i};else if(J(t)&&!J(i)){for(l=[],u=t.length,c=u-2,o=1;o<u;o++)l.push(e(t[o-1],t[o]));u--,s=function(e){e*=u;var t=Math.min(c,~~e);return l[t](e-t)},n=i}else r||(t=Me(J(t)?[]:{},t));if(!l){for(a in i)oi.call(h,t,a,"get",i[a]);s=function(e){return Si(e,h)||(d?t.p:t)}}}return at(n,s)},Pt=function(e,t,i){var n,r,s,a=e.labels,o=N;for(n in a)(r=a[n]-t)<0==!!i&&r&&o>(r=Math.abs(r))&&(s=n,o=r);return s},It=function(e,t,i){var n,r,s=e.vars,a=s[t];if(a)return n=s[t+"Params"],r=s.callbackScope||e,i&&fe.length&&Pe(),n?a.apply(r,n):a.call(r)},Ot=function(e){return Fe(e),e.scrollTrigger&&e.scrollTrigger.kill(!1),e.progress()<1&&It(e,"onInterrupt"),e},Lt=function(e){var t=(e=!e.name&&e.default||e).name,i=W(e),n=t&&!i&&e.init?function(){this._props=[]}:e,r={init:he,render:Si,add:oi,kill:Ei,modifier:ki,rawVars:0},s={targetTest:0,get:0,getSetter:_i,aliases:{},register:0};if(zt(),e!==n){if(ge[t])return;De(n,De(Re(e,r),s)),Me(n.prototype,Me(r,Re(e,s))),ge[n.prop=t]=n,e.targetTest&&(_e.push(n),pe[t]=1),t=("css"===t?"CSS":t.charAt(0).toUpperCase()+t.substr(1))+"Plugin"}de(t,n),e.register&&e.register(Li,n,Ai)},Dt=255,Mt={aqua:[0,Dt,Dt],lime:[0,Dt,0],silver:[192,192,192],black:[0,0,0],maroon:[128,0,0],teal:[0,128,128],blue:[0,0,Dt],navy:[0,0,128],white:[Dt,Dt,Dt],olive:[128,128,0],yellow:[Dt,Dt,0],orange:[Dt,165,0],gray:[128,128,128],purple:[128,0,128],green:[0,128,0],red:[Dt,0,0],pink:[Dt,192,203],cyan:[0,Dt,Dt],transparent:[Dt,Dt,Dt,0]},Nt=function(e,t,i){return(6*(e+=e<0?1:e>1?-1:0)<1?t+(i-t)*e*6:e<.5?i:3*e<2?t+(i-t)*(2/3-e)*6:t)*Dt+.5|0},Rt=function(e,t,i){var n,r,s,a,o,l,u,c,d,h,p=e?V(e)?[e>>16,e>>8&Dt,e&Dt]:0:Mt.black;if(!p){if(","===e.substr(-1)&&(e=e.substr(0,e.length-1)),Mt[e])p=Mt[e];else if("#"===e.charAt(0)){if(e.length<6&&(n=e.charAt(1),r=e.charAt(2),s=e.charAt(3),e="#"+n+n+r+r+s+s+(5===e.length?e.charAt(4)+e.charAt(4):"")),9===e.length)return[(p=parseInt(e.substr(1,6),16))>>16,p>>8&Dt,p&Dt,parseInt(e.substr(7),16)/255];p=[(e=parseInt(e.substr(1),16))>>16,e>>8&Dt,e&Dt]}else if("hsl"===e.substr(0,3))if(p=h=e.match(Z),t){if(~e.indexOf("="))return p=e.match(ee),i&&p.length<4&&(p[3]=1),p}else a=+p[0]%360/360,o=+p[1]/100,n=2*(l=+p[2]/100)-(r=l<=.5?l*(o+1):l+o-l*o),p.length>3&&(p[3]*=1),p[0]=Nt(a+1/3,n,r),p[1]=Nt(a,n,r),p[2]=Nt(a-1/3,n,r);else p=e.match(Z)||Mt.transparent;p=p.map(Number)}return t&&!h&&(n=p[0]/Dt,r=p[1]/Dt,s=p[2]/Dt,l=((u=Math.max(n,r,s))+(c=Math.min(n,r,s)))/2,u===c?a=o=0:(d=u-c,o=l>.5?d/(2-u-c):d/(u+c),a=u===n?(r-s)/d+(r<s?6:0):u===r?(s-n)/d+2:(n-r)/d+4,a*=60),p[0]=~~(a+.5),p[1]=~~(100*o+.5),p[2]=~~(100*l+.5)),i&&p.length<4&&(p[3]=1),p},Ut=function(e){var t=[],i=[],n=-1;return e.split(jt).forEach((function(e){var r=e.match(te)||[];t.push.apply(t,r),i.push(n+=r.length+1)})),t.c=i,t},Bt=function(e,t,i){var n,r,s,a,o="",l=(e+o).match(jt),u=t?"hsla(":"rgba(",c=0;if(!l)return e;if(l=l.map((function(e){return(e=Rt(e,t,1))&&u+(t?e[0]+","+e[1]+"%,"+e[2]+"%,"+e[3]:e.join(","))+")"})),i&&(s=Ut(e),(n=i.c).join(o)!==s.c.join(o)))for(a=(r=e.replace(jt,"1").split(te)).length-1;c<a;c++)o+=r[c]+(~n.indexOf(c)?l.shift()||u+"0,0,0,0)":(s.length?s:l.length?l:i).shift());if(!r)for(a=(r=e.split(jt)).length-1;c<a;c++)o+=r[c]+l[c];return o+r[a]},jt=function(){var e,t="(?:\\b(?:(?:rgb|rgba|hsl|hsla)\\(.+?\\))|\\B#(?:[0-9a-f]{3,4}){1,2}\\b";for(e in Mt)t+="|"+e+"\\b";return new RegExp(t+")","gi")}(),Ft=/hsl[a]?\(/,Ht=function(e){var t,i=e.join(" ");if(jt.lastIndex=0,jt.test(i))return t=Ft.test(i),e[1]=Bt(e[1],t),e[0]=Bt(e[0],t,Ut(e[1])),!0},qt=(b=Date.now,T=500,w=33,S=b(),k=S,C=E=1e3/240,A=function e(t){var i,n,r,s,a=b()-k,o=!0===t;if(a>T&&(S+=a-w),((i=(r=(k+=a)-S)-C)>0||o)&&(s=++v.frame,y=r-1e3*v.time,v.time=r/=1e3,C+=i+(i>=E?4:E-i),n=1),o||(f=m(e)),n)for(_=0;_<x.length;_++)x[_](r,y,s,t)},v={time:0,frame:0,tick:function(){A(!0)},deltaRatio:function(e){return y/(1e3/(e||60))},wake:function(){c&&(!l&&Y()&&(o=l=window,u=o.document||{},ae.gsap=Li,(o.gsapVersions||(o.gsapVersions=[])).push(Li.version),le(oe||o.GreenSockGlobals||!o.gsap&&o||{}),g=o.requestAnimationFrame),f&&v.sleep(),m=g||function(e){return setTimeout(e,C-1e3*v.time+1|0)},p=1,A(2))},sleep:function(){(g?o.cancelAnimationFrame:clearTimeout)(f),p=0,m=he},lagSmoothing:function(e,t){T=e||1e8,w=Math.min(t,T,0)},fps:function(e){E=1e3/(e||240),C=1e3*v.time+E},add:function(e,t,i){var n=t?function(t,i,r,s){e(t,i,r,s),v.remove(n)}:e;return v.remove(e),x[i?"unshift":"push"](n),zt(),n},remove:function(e,t){~(t=x.indexOf(e))&&x.splice(t,1)&&_>=t&&_--},_listeners:x=[]}),zt=function(){return!p&&qt.wake()},Wt={},Vt=/^[\d.\-M][\d.\-,\s]/,$t=/["']/g,Xt=function(e){for(var t,i,n,r={},s=e.substr(1,e.length-3).split(":"),a=s[0],o=1,l=s.length;o<l;o++)i=s[o],t=o!==l-1?i.lastIndexOf(","):i.length,n=i.substr(0,t),r[a]=isNaN(n)?n.replace($t,"").trim():+n,a=i.substr(t+1).trim();return r},Gt=function(e){return function(t){return 1-e(1-t)}},Yt=function e(t,i){for(var n,r=t._first;r;)r instanceof ni?e(r,i):!r.vars.yoyoEase||r._yoyo&&r._repeat||r._yoyo===i||(r.timeline?e(r.timeline,i):(n=r._ease,r._ease=r._yEase,r._yEase=n,r._yoyo=i)),r=r._next},Kt=function(e,t){return e&&(W(e)?e:Wt[e]||function(e){var t,i,n,r,s=(e+"").split("("),a=Wt[s[0]];return a&&s.length>1&&a.config?a.config.apply(null,~e.indexOf("{")?[Xt(s[1])]:(t=e,i=t.indexOf("(")+1,n=t.indexOf(")"),r=t.indexOf("(",i),t.substring(i,~r&&r<n?t.indexOf(")",n+1):n)).split(",").map(Oe)):Wt._CE&&Vt.test(e)?Wt._CE("",e):a}(e))||t},Qt=function(e,t,i,n){void 0===i&&(i=function(e){return 1-t(1-e)}),void 0===n&&(n=function(e){return e<.5?t(2*e)/2:1-t(2*(1-e))/2});var r,s={easeIn:t,easeOut:i,easeInOut:n};return ke(e,(function(e){for(var t in Wt[e]=ae[e]=s,Wt[r=e.toLowerCase()]=i,s)Wt[r+("easeIn"===t?".in":"easeOut"===t?".out":".inOut")]=Wt[e+"."+t]=s[t]})),s},Jt=function(e){return function(t){return t<.5?(1-e(1-2*t))/2:.5+e(2*(t-.5))/2}},Zt=function e(t,i,n){var r=i>=1?i:1,s=(n||(t?.3:.45))/(i<1?i:1),a=s/U*(Math.asin(1/r)||0),o=function(e){return 1===e?1:r*Math.pow(2,-10*e)*q((e-a)*s)+1},l="out"===t?o:"in"===t?function(e){return 1-o(1-e)}:Jt(o);return s=U/s,l.config=function(i,n){return e(t,i,n)},l},ei=function e(t,i){void 0===i&&(i=1.70158);var n=function(e){return e?--e*e*((i+1)*e+i)+1:0},r="out"===t?n:"in"===t?function(e){return 1-n(1-e)}:Jt(n);return r.config=function(i){return e(t,i)},r};ke("Linear,Quad,Cubic,Quart,Quint,Strong",(function(e,t){var i=t<5?t+1:t;Qt(e+",Power"+(i-1),t?function(e){return Math.pow(e,i)}:function(e){return e},(function(e){return 1-Math.pow(1-e,i)}),(function(e){return e<.5?Math.pow(2*e,i)/2:1-Math.pow(2*(1-e),i)/2}))})),Wt.Linear.easeNone=Wt.none=Wt.Linear.easeIn,Qt("Elastic",Zt("in"),Zt("out"),Zt()),P=7.5625,O=1/(I=2.75),Qt("Bounce",(function(e){return 1-L(1-e)}),L=function(e){return e<O?P*e*e:e<.7272727272727273?P*Math.pow(e-1.5/I,2)+.75:e<.9090909090909092?P*(e-=2.25/I)*e+.9375:P*Math.pow(e-2.625/I,2)+.984375}),Qt("Expo",(function(e){return e?Math.pow(2,10*(e-1)):0})),Qt("Circ",(function(e){return-(F(1-e*e)-1)})),Qt("Sine",(function(e){return 1===e?1:1-H(e*B)})),Qt("Back",ei("in"),ei("out"),ei()),Wt.SteppedEase=Wt.steps=ae.SteppedEase={config:function(e,t){void 0===e&&(e=1);var i=1/e,n=e+(t?0:1),r=t?1:0;return function(e){return((n*ot(0,.99999999,e)|0)+r)*i}}},M.ease=Wt["quad.out"],ke("onComplete,onUpdate,onStart,onRepeat,onReverseComplete,onInterrupt",(function(e){return be+=e+","+e+"Params,"}));var ti=function(e,t){this.id=j++,e._gsap=this,this.target=e,this.harness=t,this.get=t?t.get:Se,this.set=t?t.getSetter:_i},ii=function(){function e(e){this.vars=e,this._delay=+e.delay||0,(this._repeat=e.repeat===1/0?-2:e.repeat||0)&&(this._rDelay=e.repeatDelay||0,this._yoyo=!!e.yoyo||!!e.yoyoEase),this._ts=1,tt(this,+e.duration,1,1),this.data=e.data,p||qt.wake()}var t=e.prototype;return t.delay=function(e){return e||0===e?(this.parent&&this.parent.smoothChildTiming&&this.startTime(this._start+e-this._delay),this._delay=e,this):this._delay},t.duration=function(e){return arguments.length?this.totalDuration(this._repeat>0?e+(e+this._rDelay)*this._repeat:e):this.totalDuration()&&this._dur},t.totalDuration=function(e){return arguments.length?(this._dirty=0,tt(this,this._repeat<0?e:(e-this._repeat*this._rDelay)/(this._repeat+1))):this._tDur},t.totalTime=function(e,t){if(zt(),!arguments.length)return this._tTime;var i=this._dp;if(i&&i.smoothChildTiming&&this._ts){for(Ge(this,e),!i._dp||i.parent||Ye(i,this);i&&i.parent;)i.parent._time!==i._start+(i._ts>=0?i._tTime/i._ts:(i.totalDuration()-i._tTime)/-i._ts)&&i.totalTime(i._tTime,!0),i=i.parent;!this.parent&&this._dp.autoRemoveChildren&&(this._ts>0&&e<this._tDur||this._ts<0&&e>0||!this._tDur&&!e)&&Ke(this._dp,this,this._start-this._delay)}return(this._tTime!==e||!this._dur&&!t||this._initted&&Math.abs(this._zTime)===R||!e&&!this._initted&&(this.add||this._ptLookup))&&(this._ts||(this._pTime=e),Ie(this,e,t)),this},t.time=function(e,t){return arguments.length?this.totalTime(Math.min(this.totalDuration(),e+We(this))%(this._dur+this._rDelay)||(e?this._dur:0),t):this._time},t.totalProgress=function(e,t){return arguments.length?this.totalTime(this.totalDuration()*e,t):this.totalDuration()?Math.min(1,this._tTime/this._tDur):this.ratio},t.progress=function(e,t){return arguments.length?this.totalTime(this.duration()*(!this._yoyo||1&this.iteration()?e:1-e)+We(this),t):this.duration()?Math.min(1,this._time/this._dur):this.ratio},t.iteration=function(e,t){var i=this.duration()+this._rDelay;return arguments.length?this.totalTime(this._time+(e-1)*i,t):this._repeat?Ve(this._tTime,i)+1:1},t.timeScale=function(e){if(!arguments.length)return-1e-8===this._rts?0:this._rts;if(this._rts===e)return this;var t=this.parent&&this._ts?$e(this.parent._time,this):this._tTime;return this._rts=+e||0,this._ts=this._ps||-1e-8===e?0:this._rts,this.totalTime(ot(-this._delay,this._tDur,t),!0),Xe(this),qe(this)},t.paused=function(e){return arguments.length?(this._ps!==e&&(this._ps=e,e?(this._pTime=this._tTime||Math.max(-this._delay,this.rawTime()),this._ts=this._act=0):(zt(),this._ts=this._rts,this.totalTime(this.parent&&!this.parent.smoothChildTiming?this.rawTime():this._tTime||this._pTime,1===this.progress()&&Math.abs(this._zTime)!==R&&(this._tTime-=R)))),this):this._ps},t.startTime=function(e){if(arguments.length){this._start=e;var t=this.parent||this._dp;return t&&(t._sort||!this.parent)&&Ke(t,this,e-this._delay),this}return this._start},t.endTime=function(e){return this._start+(G(e)?this.totalDuration():this.duration())/Math.abs(this._ts||1)},t.rawTime=function(e){var t=this.parent||this._dp;return t?e&&(!this._ts||this._repeat&&this._time&&this.totalProgress()<1)?this._tTime%(this._dur+this._rDelay):this._ts?$e(t.rawTime(e),this):this._tTime:this._tTime},t.globalTime=function(e){for(var t=this,i=arguments.length?e:t.rawTime();t;)i=t._start+i/(t._ts||1),t=t._dp;return i},t.repeat=function(e){return arguments.length?(this._repeat=e===1/0?-2:e,it(this)):-2===this._repeat?1/0:this._repeat},t.repeatDelay=function(e){if(arguments.length){var t=this._time;return this._rDelay=e,it(this),t?this.time(t):this}return this._rDelay},t.yoyo=function(e){return arguments.length?(this._yoyo=e,this):this._yoyo},t.seek=function(e,t){return this.totalTime(rt(this,e),G(t))},t.restart=function(e,t){return this.play().totalTime(e?-this._delay:0,G(t))},t.play=function(e,t){return null!=e&&this.seek(e,t),this.reversed(!1).paused(!1)},t.reverse=function(e,t){return null!=e&&this.seek(e||this.totalDuration(),t),this.reversed(!0).paused(!1)},t.pause=function(e,t){return null!=e&&this.seek(e,t),this.paused(!0)},t.resume=function(){return this.paused(!1)},t.reversed=function(e){return arguments.length?(!!e!==this.reversed()&&this.timeScale(-this._rts||(e?-1e-8:0)),this):this._rts<0},t.invalidate=function(){return this._initted=this._act=0,this._zTime=-1e-8,this},t.isActive=function(){var e,t=this.parent||this._dp,i=this._start;return!(t&&!(this._ts&&this._initted&&t.isActive()&&(e=t.rawTime(!0))>=i&&e<this.endTime(!0)-R))},t.eventCallback=function(e,t,i){var n=this.vars;return arguments.length>1?(t?(n[e]=t,i&&(n[e+"Params"]=i),"onUpdate"===e&&(this._onUpdate=t)):delete n[e],this):n[e]},t.then=function(e){var t=this;return new Promise((function(i){var n=W(e)?e:Le,r=function(){var e=t.then;t.then=null,W(n)&&(n=n(t))&&(n.then||n===t)&&(t.then=e),i(n),t.then=e};t._initted&&1===t.totalProgress()&&t._ts>=0||!t._tTime&&t._ts<0?r():t._prom=r}))},t.kill=function(){Ot(this)},e}();De(ii.prototype,{_time:0,_start:0,_end:0,_tTime:0,_tDur:0,_dirty:0,_repeat:0,_yoyo:!1,parent:null,_initted:!1,_rDelay:0,_ts:1,_dp:0,ratio:0,_zTime:-1e-8,_prom:0,_ps:!1,_rts:1});var ni=function(e){function t(t,i){var r;return void 0===t&&(t={}),(r=e.call(this,t)||this).labels={},r.smoothChildTiming=!!t.smoothChildTiming,r.autoRemoveChildren=!!t.autoRemoveChildren,r._sort=G(t.sortChildren),a&&Ke(t.parent||a,n(r),i),t.reversed&&r.reverse(),t.paused&&r.paused(!0),t.scrollTrigger&&Qe(n(r),t.scrollTrigger),r}r(t,e);var i=t.prototype;return i.to=function(e,t,i){return st(0,arguments,this),this},i.from=function(e,t,i){return st(1,arguments,this),this},i.fromTo=function(e,t,i,n){return st(2,arguments,this),this},i.set=function(e,t,i){return t.duration=0,t.parent=this,Ue(t).repeatDelay||(t.repeat=0),t.immediateRender=!!t.immediateRender,new fi(e,t,rt(this,i),1),this},i.call=function(e,t,i){return Ke(this,fi.delayedCall(0,e,t),i)},i.staggerTo=function(e,t,i,n,r,s,a){return i.duration=t,i.stagger=i.stagger||n,i.onComplete=s,i.onCompleteParams=a,i.parent=this,new fi(e,i,rt(this,r)),this},i.staggerFrom=function(e,t,i,n,r,s,a){return i.runBackwards=1,Ue(i).immediateRender=G(i.immediateRender),this.staggerTo(e,t,i,n,r,s,a)},i.staggerFromTo=function(e,t,i,n,r,s,a,o){return n.startAt=i,Ue(n).immediateRender=G(n.immediateRender),this.staggerTo(e,t,n,r,s,a,o)},i.render=function(e,t,i){var n,r,s,o,l,u,c,d,h,p,f,m,g=this._time,v=this._dirty?this.totalDuration():this._tDur,y=this._dur,_=e<=0?0:Ce(e),b=this._zTime<0!=e<0&&(this._initted||!y);if(this!==a&&_>v&&e>=0&&(_=v),_!==this._tTime||i||b){if(g!==this._time&&y&&(_+=this._time-g,e+=this._time-g),n=_,h=this._start,u=!(d=this._ts),b&&(y||(g=this._zTime),(e||!t)&&(this._zTime=e)),this._repeat){if(f=this._yoyo,l=y+this._rDelay,this._repeat<-1&&e<0)return this.totalTime(100*l+e,t,i);if(n=Ce(_%l),_===v?(o=this._repeat,n=y):((o=~~(_/l))&&o===_/l&&(n=y,o--),n>y&&(n=y)),p=Ve(this._tTime,l),!g&&this._tTime&&p!==o&&(p=o),f&&1&o&&(n=y-n,m=1),o!==p&&!this._lock){var T=f&&1&p,w=T===(f&&1&o);if(o<p&&(T=!T),g=T?0:y,this._lock=1,this.render(g||(m?0:Ce(o*l)),t,!y)._lock=0,this._tTime=_,!t&&this.parent&&It(this,"onRepeat"),this.vars.repeatRefresh&&!m&&(this.invalidate()._lock=1),g&&g!==this._time||u!==!this._ts||this.vars.onRepeat&&!this.parent&&!this._act)return this;if(y=this._dur,v=this._tDur,w&&(this._lock=2,g=T?y:-1e-4,this.render(g,!0),this.vars.repeatRefresh&&!m&&this.invalidate()),this._lock=0,!this._ts&&!u)return this;Yt(this,m)}}if(this._hasPause&&!this._forcing&&this._lock<2&&(c=function(e,t,i){var n;if(i>t)for(n=e._first;n&&n._start<=i;){if("isPause"===n.data&&n._start>t)return n;n=n._next}else for(n=e._last;n&&n._start>=i;){if("isPause"===n.data&&n._start<t)return n;n=n._prev}}(this,Ce(g),Ce(n)),c&&(_-=n-(n=c._start))),this._tTime=_,this._time=n,this._act=!d,this._initted||(this._onUpdate=this.vars.onUpdate,this._initted=1,this._zTime=e,g=0),!g&&n&&!t&&(It(this,"onStart"),this._tTime!==_))return this;if(n>=g&&e>=0)for(r=this._first;r;){if(s=r._next,(r._act||n>=r._start)&&r._ts&&c!==r){if(r.parent!==this)return this.render(e,t,i);if(r.render(r._ts>0?(n-r._start)*r._ts:(r._dirty?r.totalDuration():r._tDur)+(n-r._start)*r._ts,t,i),n!==this._time||!this._ts&&!u){c=0,s&&(_+=this._zTime=-1e-8);break}}r=s}else{r=this._last;for(var S=e<0?e:n;r;){if(s=r._prev,(r._act||S<=r._end)&&r._ts&&c!==r){if(r.parent!==this)return this.render(e,t,i);if(r.render(r._ts>0?(S-r._start)*r._ts:(r._dirty?r.totalDuration():r._tDur)+(S-r._start)*r._ts,t,i),n!==this._time||!this._ts&&!u){c=0,s&&(_+=this._zTime=S?-1e-8:R);break}}r=s}}if(c&&!t&&(this.pause(),c.render(n>=g?0:-1e-8)._zTime=n>=g?1:-1,this._ts))return this._start=h,Xe(this),this.render(e,t,i);this._onUpdate&&!t&&It(this,"onUpdate",!0),(_===v&&this._tTime>=this.totalDuration()||!_&&g)&&(h!==this._start&&Math.abs(d)===Math.abs(this._ts)||this._lock||((e||!y)&&(_===v&&this._ts>0||!_&&this._ts<0)&&Fe(this,1),t||e<0&&!g||!_&&!g&&v||(It(this,_===v&&e>=0?"onComplete":"onReverseComplete",!0),this._prom&&!(_<v&&this.timeScale()>0)&&this._prom())))}return this},i.add=function(e,t){var i=this;if(V(t)||(t=rt(this,t,e)),!(e instanceof ii)){if(J(e))return e.forEach((function(e){return i.add(e,t)})),this;if(z(e))return this.addLabel(e,t);if(!W(e))return this;e=fi.delayedCall(0,e)}return this!==e?Ke(this,e,t):this},i.getChildren=function(e,t,i,n){void 0===e&&(e=!0),void 0===t&&(t=!0),void 0===i&&(i=!0),void 0===n&&(n=-N);for(var r=[],s=this._first;s;)s._start>=n&&(s instanceof fi?t&&r.push(s):(i&&r.push(s),e&&r.push.apply(r,s.getChildren(!0,t,i)))),s=s._next;return r},i.getById=function(e){for(var t=this.getChildren(1,1,1),i=t.length;i--;)if(t[i].vars.id===e)return t[i]},i.remove=function(e){return z(e)?this.removeLabel(e):W(e)?this.killTweensOf(e):(je(this,e),e===this._recent&&(this._recent=this._last),He(this))},i.totalTime=function(t,i){return arguments.length?(this._forcing=1,!this._dp&&this._ts&&(this._start=Ce(qt.time-(this._ts>0?t/this._ts:(this.totalDuration()-t)/-this._ts))),e.prototype.totalTime.call(this,t,i),this._forcing=0,this):this._tTime},i.addLabel=function(e,t){return this.labels[e]=rt(this,t),this},i.removeLabel=function(e){return delete this.labels[e],this},i.addPause=function(e,t,i){var n=fi.delayedCall(0,t||he,i);return n.data="isPause",this._hasPause=1,Ke(this,n,rt(this,e))},i.removePause=function(e){var t=this._first;for(e=rt(this,e);t;)t._start===e&&"isPause"===t.data&&Fe(t),t=t._next},i.killTweensOf=function(e,t,i){for(var n=this.getTweensOf(e,i),r=n.length;r--;)ri!==n[r]&&n[r].kill(e,t);return this},i.getTweensOf=function(e,t){for(var i,n=[],r=pt(e),s=this._first,a=V(t);s;)s instanceof fi?Ae(s._targets,r)&&(a?(!ri||s._initted&&s._ts)&&s.globalTime(0)<=t&&s.globalTime(s.totalDuration())>t:!t||s.isActive())&&n.push(s):(i=s.getTweensOf(r,t)).length&&n.push.apply(n,i),s=s._next;return n},i.tweenTo=function(e,t){t=t||{};var i,n=this,r=rt(n,e),s=t,a=s.startAt,o=s.onStart,l=s.onStartParams,u=s.immediateRender,c=fi.to(n,De({ease:t.ease||"none",lazy:!1,immediateRender:!1,time:r,overwrite:"auto",duration:t.duration||Math.abs((r-(a&&"time" in a?a.time:n._time))/n.timeScale())||R,onStart:function(){if(n.pause(),!i){var e=t.duration||Math.abs((r-(a&&"time" in a?a.time:n._time))/n.timeScale());c._dur!==e&&tt(c,e,0,1).render(c._time,!0,!0),i=1}o&&o.apply(c,l||[])}},t));return u?c.render(0):c},i.tweenFromTo=function(e,t,i){return this.tweenTo(t,De({startAt:{time:rt(this,e)}},i))},i.recent=function(){return this._recent},i.nextLabel=function(e){return void 0===e&&(e=this._time),Pt(this,rt(this,e))},i.previousLabel=function(e){return void 0===e&&(e=this._time),Pt(this,rt(this,e),1)},i.currentLabel=function(e){return arguments.length?this.seek(e,!0):this.previousLabel(this._time+R)},i.shiftChildren=function(e,t,i){void 0===i&&(i=0);for(var n,r=this._first,s=this.labels;r;)r._start>=i&&(r._start+=e,r._end+=e),r=r._next;if(t)for(n in s)s[n]>=i&&(s[n]+=e);return He(this)},i.invalidate=function(){var t=this._first;for(this._lock=0;t;)t.invalidate(),t=t._next;return e.prototype.invalidate.call(this)},i.clear=function(e){void 0===e&&(e=!0);for(var t,i=this._first;i;)t=i._next,this.remove(i),i=t;return this._dp&&(this._time=this._tTime=this._pTime=0),e&&(this.labels={}),He(this)},i.totalDuration=function(e){var t,i,n,r=0,s=this,o=s._last,l=N;if(arguments.length)return s.timeScale((s._repeat<0?s.duration():s.totalDuration())/(s.reversed()?-e:e));if(s._dirty){for(n=s.parent;o;)t=o._prev,o._dirty&&o.totalDuration(),(i=o._start)>l&&s._sort&&o._ts&&!s._lock?(s._lock=1,Ke(s,o,i-o._delay,1)._lock=0):l=i,i<0&&o._ts&&(r-=i,(!n&&!s._dp||n&&n.smoothChildTiming)&&(s._start+=i/s._ts,s._time-=i,s._tTime-=i),s.shiftChildren(-i,!1,-Infinity),l=0),o._end>r&&o._ts&&(r=o._end),o=t;tt(s,s===a&&s._time>r?s._time:r,1,1),s._dirty=0}return s._tDur},t.updateRoot=function(e){if(a._ts&&(Ie(a,$e(e,a)),d=qt.frame),qt.frame>=ye){ye+=D.autoSleep||120;var t=a._first;if((!t||!t._ts)&&D.autoSleep&&qt._listeners.length<2){for(;t&&!t._ts;)t=t._next;t||qt.sleep()}}},t}(ii);De(ni.prototype,{_lock:0,_hasPause:0,_forcing:0});var ri,si,ai=function(e,t,i,n,r,s,a){var o,l,u,c,d,h,p,f,m=new Ai(this._pt,e,t,0,1,wi,null,r),g=0,v=0;for(m.b=i,m.e=n,i+="",(p=~(n+="").indexOf("random("))&&(n=Ct(n)),s&&(s(f=[i,n],e,t),i=f[0],n=f[1]),l=i.match(ie)||[];o=ie.exec(n);)c=o[0],d=n.substring(g,o.index),u?u=(u+1)%5:"rgba("===d.substr(-5)&&(u=1),c!==l[v++]&&(h=parseFloat(l[v-1])||0,m._pt={_next:m._pt,p:d||1===v?d:",",s:h,c:"="===c.charAt(1)?xe(h,c)-h:parseFloat(c)-h,m:u&&u<4?Math.round:0},g=ie.lastIndex);return m.c=g<n.length?n.substring(g,n.length):"",m.fp=a,(ne.test(n)||p)&&(m.e=0),this._pt=m,m},oi=function(e,t,i,n,r,s,a,o,l){W(n)&&(n=n(r||0,e,s));var u,c=e[t],d="get"!==i?i:W(c)?l?e[t.indexOf("set")||!W(e["get"+t.substr(3)])?t:"get"+t.substr(3)](l):e[t]():c,h=W(c)?l?vi:gi:mi;if(z(n)&&(~n.indexOf("random(")&&(n=Ct(n)),"="===n.charAt(1)&&((u=xe(d,n)+(lt(d)||0))||0===u)&&(n=u)),d!==n||si)return isNaN(d*n)||""===n?(!c&&!(t in e)&&ue(t,n),ai.call(this,e,t,d,n,h,o||D.stringFilter,l)):(u=new Ai(this._pt,e,t,+d||0,n-(d||0),"boolean"==typeof c?Ti:bi,0,h),l&&(u.fp=l),a&&u.modifier(a,this,e),this._pt=u)},li=function(e,t,i,n,r,s){var a,o,l,u;if(ge[e]&&!1!==(a=new ge[e]).init(r,a.rawVars?t[e]:function(e,t,i,n,r){if(W(e)&&(e=di(e,r,t,i,n)),!X(e)||e.style&&e.nodeType||J(e)||Q(e))return z(e)?di(e,r,t,i,n):e;var s,a={};for(s in e)a[s]=di(e[s],r,t,i,n);return a}(t[e],n,r,s,i),i,n,s)&&(i._pt=o=new Ai(i._pt,r,e,0,1,a.render,a,0,a.priority),i!==h))for(l=i._ptLookup[i._targets.indexOf(r)],u=a._props.length;u--;)l[a._props[u]]=o;return a},ui=function e(t,i){var n,r,o,l,u,c,d,h,p,f,m,g,v,y=t.vars,_=y.ease,b=y.startAt,T=y.immediateRender,w=y.lazy,S=y.onUpdate,k=y.onUpdateParams,E=y.callbackScope,C=y.runBackwards,x=y.yoyoEase,A=y.keyframes,P=y.autoRevert,I=t._dur,O=t._startAt,L=t._targets,D=t.parent,U=D&&"nested"===D.data?D.parent._targets:L,B="auto"===t._overwrite&&!s,j=t.timeline;if(j&&(!A||!_)&&(_="none"),t._ease=Kt(_,M.ease),t._yEase=x?Gt(Kt(!0===x?_:x,M.ease)):0,x&&t._yoyo&&!t._repeat&&(x=t._yEase,t._yEase=t._ease,t._ease=x),t._from=!j&&!!y.runBackwards,!j||A&&!y.stagger){if(g=(h=L[0]?we(L[0]).harness:0)&&y[h.prop],n=Re(y,pe),O&&(Fe(O.render(-1,!0)),O._lazy=0),b)if(Fe(t._startAt=fi.set(L,De({data:"isStart",overwrite:!1,parent:D,immediateRender:!0,lazy:G(w),startAt:null,delay:0,onUpdate:S,onUpdateParams:k,callbackScope:E,stagger:0},b))),i<0&&!T&&!P&&t._startAt.render(-1,!0),T){if(i>0&&!P&&(t._startAt=0),I&&i<=0)return void(i&&(t._zTime=i))}else!1===P&&(t._startAt=0);else if(C&&I)if(O)!P&&(t._startAt=0);else if(i&&(T=!1),o=De({overwrite:!1,data:"isFromStart",lazy:T&&G(w),immediateRender:T,stagger:0,parent:D},n),g&&(o[h.prop]=g),Fe(t._startAt=fi.set(L,o)),i<0&&t._startAt.render(-1,!0),t._zTime=i,T){if(!i)return}else e(t._startAt,R);for(t._pt=t._ptCache=0,w=I&&G(w)||w&&!I,r=0;r<L.length;r++){if(d=(u=L[r])._gsap||Te(L)[r]._gsap,t._ptLookup[r]=f={},me[d.id]&&fe.length&&Pe(),m=U===L?r:U.indexOf(u),h&&!1!==(p=new h).init(u,g||n,t,m,U)&&(t._pt=l=new Ai(t._pt,u,p.name,0,1,p.render,p,0,p.priority),p._props.forEach((function(e){f[e]=l})),p.priority&&(c=1)),!h||g)for(o in n)ge[o]&&(p=li(o,n,t,m,u,U))?p.priority&&(c=1):f[o]=l=oi.call(t,u,o,"get",n[o],m,U,0,y.stringFilter);t._op&&t._op[r]&&t.kill(u,t._op[r]),B&&t._pt&&(ri=t,a.killTweensOf(u,f,t.globalTime(i)),v=!t.parent,ri=0),t._pt&&w&&(me[d.id]=1)}c&&xi(t),t._onInit&&t._onInit(t)}t._onUpdate=S,t._initted=(!t._op||t._pt)&&!v,A&&i<=0&&j.render(N,!0,!0)},ci=function(e,t,i,n){var r,s,a=t.ease||n||"power1.inOut";if(J(t))s=i[e]||(i[e]=[]),t.forEach((function(e,i){return s.push({t:i/(t.length-1)*100,v:e,e:a})}));else for(r in t)s=i[r]||(i[r]=[]),"ease"===r||s.push({t:parseFloat(e),v:t[r],e:a})},di=function(e,t,i,n,r){return W(e)?e.call(t,i,n,r):z(e)&&~e.indexOf("random(")?Ct(e):e},hi=be+"repeat,repeatDelay,yoyo,repeatRefresh,yoyoEase,autoRevert",pi={};ke(hi+",id,stagger,delay,duration,paused,scrollTrigger",(function(e){return pi[e]=1}));var fi=function(e){function t(t,i,r,o){var l;"number"==typeof i&&(r.duration=i,i=r,r=null);var u,c,d,h,p,f,m,g,v=(l=e.call(this,o?i:Ue(i))||this).vars,y=v.duration,_=v.delay,b=v.immediateRender,T=v.stagger,w=v.overwrite,S=v.keyframes,k=v.defaults,E=v.scrollTrigger,C=v.yoyoEase,x=i.parent||a,A=(J(t)||Q(t)?V(t[0]):"length" in i)?[t]:pt(t);if(l._targets=A.length?Te(A):ce("GSAP target "+t+" not found. https://greensock.com",!D.nullTargetWarn)||[],l._ptLookup=[],l._overwrite=w,S||T||K(y)||K(_)){if(i=l.vars,(u=l.timeline=new ni({data:"nested",defaults:k||{}})).kill(),u.parent=u._dp=n(l),u._start=0,T||K(y)||K(_)){if(h=A.length,m=T&&gt(T),X(T))for(p in T)~hi.indexOf(p)&&(g||(g={}),g[p]=T[p]);for(c=0;c<h;c++)(d=Re(i,pi)).stagger=0,C&&(d.yoyoEase=C),g&&Me(d,g),f=A[c],d.duration=+di(y,n(l),c,f,A),d.delay=(+di(_,n(l),c,f,A)||0)-l._delay,!T&&1===h&&d.delay&&(l._delay=_=d.delay,l._start+=_,d.delay=0),u.to(f,d,m?m(c,f,A):0),u._ease=Wt.none;u.duration()?y=_=0:l.timeline=0}else if(S){Ue(De(u.vars.defaults,{ease:"none"})),u._ease=Kt(S.ease||i.ease||"none");var P,I,O,L=0;if(J(S))S.forEach((function(e){return u.to(A,e,">")}));else{for(p in d={},S)"ease"===p||"easeEach"===p||ci(p,S[p],d,S.easeEach);for(p in d)for(P=d[p].sort((function(e,t){return e.t-t.t})),L=0,c=0;c<P.length;c++)(O={ease:(I=P[c]).e,duration:(I.t-(c?P[c-1].t:0))/100*y})[p]=I.v,u.to(A,O,L),L+=O.duration;u.duration()<y&&u.to({},{duration:y-u.duration()})}}y||l.duration(y=u.duration())}else l.timeline=0;return!0!==w||s||(ri=n(l),a.killTweensOf(A),ri=0),Ke(x,n(l),r),i.reversed&&l.reverse(),i.paused&&l.paused(!0),(b||!y&&!S&&l._start===Ce(x._time)&&G(b)&&ze(n(l))&&"nested"!==x.data)&&(l._tTime=-1e-8,l.render(Math.max(0,-_))),E&&Qe(n(l),E),l}r(t,e);var i=t.prototype;return i.render=function(e,t,i){var n,r,s,a,o,l,u,c,d,h=this._time,p=this._tDur,f=this._dur,m=e>p-R&&e>=0?p:e<R?0:e;if(f){if(m!==this._tTime||!e||i||!this._initted&&this._tTime||this._startAt&&this._zTime<0!=e<0){if(n=m,c=this.timeline,this._repeat){if(a=f+this._rDelay,this._repeat<-1&&e<0)return this.totalTime(100*a+e,t,i);if(n=Ce(m%a),m===p?(s=this._repeat,n=f):((s=~~(m/a))&&s===m/a&&(n=f,s--),n>f&&(n=f)),(l=this._yoyo&&1&s)&&(d=this._yEase,n=f-n),o=Ve(this._tTime,a),n===h&&!i&&this._initted)return this._tTime=m,this;s!==o&&(c&&this._yEase&&Yt(c,l),!this.vars.repeatRefresh||l||this._lock||(this._lock=i=1,this.render(Ce(a*s),!0).invalidate()._lock=0))}if(!this._initted){if(Je(this,e<0?e:n,i,t))return this._tTime=0,this;if(h!==this._time)return this;if(f!==this._dur)return this.render(e,t,i)}if(this._tTime=m,this._time=n,!this._act&&this._ts&&(this._act=1,this._lazy=0),this.ratio=u=(d||this._ease)(n/f),this._from&&(this.ratio=u=1-u),n&&!h&&!t&&(It(this,"onStart"),this._tTime!==m))return this;for(r=this._pt;r;)r.r(u,r.d),r=r._next;c&&c.render(e<0?e:!n&&l?-1e-8:c._dur*c._ease(n/this._dur),t,i)||this._startAt&&(this._zTime=e),this._onUpdate&&!t&&(e<0&&this._startAt&&this._startAt.render(e,!0,i),It(this,"onUpdate")),this._repeat&&s!==o&&this.vars.onRepeat&&!t&&this.parent&&It(this,"onRepeat"),m!==this._tDur&&m||this._tTime!==m||(e<0&&this._startAt&&!this._onUpdate&&this._startAt.render(e,!0,!0),(e||!f)&&(m===this._tDur&&this._ts>0||!m&&this._ts<0)&&Fe(this,1),t||e<0&&!h||!m&&!h||(It(this,m===p?"onComplete":"onReverseComplete",!0),this._prom&&!(m<p&&this.timeScale()>0)&&this._prom()))}}else!function(e,t,i,n){var r,s,a,o=e.ratio,l=t<0||!t&&(!e._start&&Ze(e)&&(e._initted||!et(e))||(e._ts<0||e._dp._ts<0)&&!et(e))?0:1,u=e._rDelay,c=0;if(u&&e._repeat&&(c=ot(0,e._tDur,t),s=Ve(c,u),e._yoyo&&1&s&&(l=1-l),s!==Ve(e._tTime,u)&&(o=1-l,e.vars.repeatRefresh&&e._initted&&e.invalidate())),l!==o||n||e._zTime===R||!t&&e._zTime){if(!e._initted&&Je(e,t,n,i))return;for(a=e._zTime,e._zTime=t||(i?R:0),i||(i=t&&!a),e.ratio=l,e._from&&(l=1-l),e._time=0,e._tTime=c,r=e._pt;r;)r.r(l,r.d),r=r._next;e._startAt&&t<0&&e._startAt.render(t,!0,!0),e._onUpdate&&!i&&It(e,"onUpdate"),c&&e._repeat&&!i&&e.parent&&It(e,"onRepeat"),(t>=e._tDur||t<0)&&e.ratio===l&&(l&&Fe(e,1),i||(It(e,l?"onComplete":"onReverseComplete",!0),e._prom&&e._prom()))}else e._zTime||(e._zTime=t)}(this,e,t,i);return this},i.targets=function(){return this._targets},i.invalidate=function(){return this._pt=this._op=this._startAt=this._onUpdate=this._lazy=this.ratio=0,this._ptLookup=[],this.timeline&&this.timeline.invalidate(),e.prototype.invalidate.call(this)},i.resetTo=function(e,t,i,n){p||qt.wake(),this._ts||this.play();var r=Math.min(this._dur,(this._dp._time-this._start)*this._ts);return this._initted||ui(this,r),function(e,t,i,n,r,s,a){var o,l,u,c=(e._pt&&e._ptCache||(e._ptCache={}))[t];if(!c)for(c=e._ptCache[t]=[],l=e._ptLookup,u=e._targets.length;u--;){if((o=l[u][t])&&o.d&&o.d._pt)for(o=o.d._pt;o&&o.p!==t;)o=o._next;if(!o)return si=1,e.vars[t]="+=0",ui(e,a),si=0,1;c.push(o)}for(u=c.length;u--;)(o=c[u]).s=!n&&0!==n||r?o.s+(n||0)+s*o.c:n,o.c=i-o.s,o.e&&(o.e=Ee(i)+lt(o.e)),o.b&&(o.b=o.s+lt(o.b))}(this,e,t,i,n,this._ease(r/this._dur),r)?this.resetTo(e,t,i,n):(Ge(this,0),this.parent||Be(this._dp,this,"_first","_last",this._dp._sort?"_start":0),this.render(0))},i.kill=function(e,t){if(void 0===t&&(t="all"),!(e||t&&"all"!==t))return this._lazy=this._pt=0,this.parent?Ot(this):this;if(this.timeline){var i=this.timeline.totalDuration();return this.timeline.killTweensOf(e,t,ri&&!0!==ri.vars.overwrite)._first||Ot(this),this.parent&&i!==this.timeline.totalDuration()&&tt(this,this._dur*this.timeline._tDur/i,0,1),this}var n,r,s,a,o,l,u,c=this._targets,d=e?pt(e):c,h=this._ptLookup,p=this._pt;if((!t||"all"===t)&&function(e,t){for(var i=e.length,n=i===t.length;n&&i--&&e[i]===t[i];);return i<0}(c,d))return"all"===t&&(this._pt=0),Ot(this);for(n=this._op=this._op||[],"all"!==t&&(z(t)&&(o={},ke(t,(function(e){return o[e]=1})),t=o),t=function(e,t){var i,n,r,s,a=e[0]?we(e[0]).harness:0,o=a&&a.aliases;if(!o)return t;for(n in i=Me({},t),o)if(n in i)for(r=(s=o[n].split(",")).length;r--;)i[s[r]]=i[n];return i}(c,t)),u=c.length;u--;)if(~d.indexOf(c[u]))for(o in r=h[u],"all"===t?(n[u]=t,a=r,s={}):(s=n[u]=n[u]||{},a=t),a)(l=r&&r[o])&&("kill" in l.d&&!0!==l.d.kill(o)||je(this,l,"_pt"),delete r[o]),"all"!==s&&(s[o]=1);return this._initted&&!this._pt&&p&&Ot(this),this},t.to=function(e,i){return new t(e,i,arguments[2])},t.from=function(e,t){return st(1,arguments)},t.delayedCall=function(e,i,n,r){return new t(i,0,{immediateRender:!1,lazy:!1,overwrite:!1,delay:e,onComplete:i,onReverseComplete:i,onCompleteParams:n,onReverseCompleteParams:n,callbackScope:r})},t.fromTo=function(e,t,i){return st(2,arguments)},t.set=function(e,i){return i.duration=0,i.repeatDelay||(i.repeat=0),new t(e,i)},t.killTweensOf=function(e,t,i){return a.killTweensOf(e,t,i)},t}(ii);De(fi.prototype,{_targets:[],_lazy:0,_startAt:0,_op:0,_onInit:0}),ke("staggerTo,staggerFrom,staggerFromTo",(function(e){fi[e]=function(){var t=new ni,i=ct.call(arguments,0);return i.splice("staggerFromTo"===e?5:4,0,0),t[e].apply(t,i)}}));var mi=function(e,t,i){return e[t]=i},gi=function(e,t,i){return e[t](i)},vi=function(e,t,i,n){return e[t](n.fp,i)},yi=function(e,t,i){return e.setAttribute(t,i)},_i=function(e,t){return W(e[t])?gi:$(e[t])&&e.setAttribute?yi:mi},bi=function(e,t){return t.set(t.t,t.p,Math.round(1e6*(t.s+t.c*e))/1e6,t)},Ti=function(e,t){return t.set(t.t,t.p,!!(t.s+t.c*e),t)},wi=function(e,t){var i=t._pt,n="";if(!e&&t.b)n=t.b;else if(1===e&&t.e)n=t.e;else{for(;i;)n=i.p+(i.m?i.m(i.s+i.c*e):Math.round(1e4*(i.s+i.c*e))/1e4)+n,i=i._next;n+=t.c}t.set(t.t,t.p,n,t)},Si=function(e,t){for(var i=t._pt;i;)i.r(e,i.d),i=i._next},ki=function(e,t,i,n){for(var r,s=this._pt;s;)r=s._next,s.p===n&&s.modifier(e,t,i),s=r},Ei=function(e){for(var t,i,n=this._pt;n;)i=n._next,n.p===e&&!n.op||n.op===e?je(this,n,"_pt"):n.dep||(t=1),n=i;return!t},Ci=function(e,t,i,n){n.mSet(e,t,n.m.call(n.tween,i,n.mt),n)},xi=function(e){for(var t,i,n,r,s=e._pt;s;){for(t=s._next,i=n;i&&i.pr>s.pr;)i=i._next;(s._prev=i?i._prev:r)?s._prev._next=s:n=s,(s._next=i)?i._prev=s:r=s,s=t}e._pt=n},Ai=function(){function e(e,t,i,n,r,s,a,o,l){this.t=t,this.s=n,this.c=r,this.p=i,this.r=s||bi,this.d=a||this,this.set=o||mi,this.pr=l||0,this._next=e,e&&(e._prev=this)}return e.prototype.modifier=function(e,t,i){this.mSet=this.mSet||this.set,this.set=Ci,this.m=e,this.mt=i,this.tween=t},e}();ke(be+"parent,duration,ease,delay,overwrite,runBackwards,startAt,yoyo,immediateRender,repeat,repeatDelay,data,paused,reversed,lazy,callbackScope,stringFilter,id,yoyoEase,stagger,inherit,repeatRefresh,keyframes,autoRevert,scrollTrigger",(function(e){return pe[e]=1})),ae.TweenMax=ae.TweenLite=fi,ae.TimelineLite=ae.TimelineMax=ni,a=new ni({sortChildren:!1,defaults:M,autoRemoveChildren:!0,id:"root",smoothChildTiming:!0}),D.stringFilter=Ht;var Pi={registerPlugin:function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];t.forEach((function(e){return Lt(e)}))},timeline:function(e){return new ni(e)},getTweensOf:function(e,t){return a.getTweensOf(e,t)},getProperty:function(e,t,i,n){z(e)&&(e=pt(e)[0]);var r=we(e||{}).get,s=i?Le:Oe;return"native"===i&&(i=""),e?t?s((ge[t]&&ge[t].get||r)(e,t,i,n)):function(t,i,n){return s((ge[t]&&ge[t].get||r)(e,t,i,n))}:e},quickSetter:function(e,t,i){if((e=pt(e)).length>1){var n=e.map((function(e){return Li.quickSetter(e,t,i)})),r=n.length;return function(e){for(var t=r;t--;)n[t](e)}}e=e[0]||{};var s=ge[t],a=we(e),o=a.harness&&(a.harness.aliases||{})[t]||t,l=s?function(t){var n=new s;h._pt=0,n.init(e,i?t+i:t,h,0,[e]),n.render(1,n),h._pt&&Si(1,h)}:a.set(e,o);return s?l:function(t){return l(e,o,i?t+i:t,a,1)}},quickTo:function(e,t,i){var n,r=Li.to(e,Me(((n={})[t]="+=0.1",n.paused=!0,n),i||{})),s=function(e,i,n){return r.resetTo(t,e,i,n)};return s.tween=r,s},isTweening:function(e){return a.getTweensOf(e,!0).length>0},defaults:function(e){return e&&e.ease&&(e.ease=Kt(e.ease,M.ease)),Ne(M,e||{})},config:function(e){return Ne(D,e||{})},registerEffect:function(e){var t=e.name,i=e.effect,n=e.plugins,r=e.defaults,s=e.extendTimeline;(n||"").split(",").forEach((function(e){return e&&!ge[e]&&!ae[e]&&ce(t+" effect requires "+e+" plugin.")})),ve[t]=function(e,t,n){return i(pt(e),De(t||{},r),n)},s&&(ni.prototype[t]=function(e,i,n){return this.add(ve[t](e,X(i)?i:(n=i)&&{},this),n)})},registerEase:function(e,t){Wt[e]=Kt(t)},parseEase:function(e,t){return arguments.length?Kt(e,t):Wt},getById:function(e){return a.getById(e)},exportRoot:function(e,t){void 0===e&&(e={});var i,n,r=new ni(e);for(r.smoothChildTiming=G(e.smoothChildTiming),a.remove(r),r._dp=0,r._time=r._tTime=a._time,i=a._first;i;)n=i._next,!t&&!i._dur&&i instanceof fi&&i.vars.onComplete===i._targets[0]||Ke(r,i,i._start-i._delay),i=n;return Ke(a,r,0),r},utils:{wrap:kt,wrapYoyo:Et,distribute:gt,random:_t,snap:yt,normalize:wt,getUnit:lt,clamp:ut,splitColor:Rt,toArray:pt,selector:ft,mapRange:xt,pipe:bt,unitize:Tt,interpolate:At,shuffle:mt},install:le,effects:ve,ticker:qt,updateRoot:ni.updateRoot,plugins:ge,globalTimeline:a,core:{PropTween:Ai,globals:de,Tween:fi,Timeline:ni,Animation:ii,getCache:we,_removeLinkedListItem:je,suppressOverwrites:function(e){return s=e}}};ke("to,from,fromTo,delayedCall,set,killTweensOf",(function(e){return Pi[e]=fi[e]})),qt.add(ni.updateRoot),h=Pi.to({},{duration:0});var Ii=function(e,t){for(var i=e._pt;i&&i.p!==t&&i.op!==t&&i.fp!==t;)i=i._next;return i},Oi=function(e,t){return{name:e,rawVars:1,init:function(e,i,n){n._onInit=function(e){var n,r;if(z(i)&&(n={},ke(i,(function(e){return n[e]=1})),i=n),t){for(r in n={},i)n[r]=t(i[r]);i=n}!function(e,t){var i,n,r,s=e._targets;for(i in t)for(n=s.length;n--;)(r=e._ptLookup[n][i])&&(r=r.d)&&(r._pt&&(r=Ii(r,i)),r&&r.modifier&&r.modifier(t[i],e,s[n],i))}(e,i)}}}},Li=Pi.registerPlugin({name:"attr",init:function(e,t,i,n,r){var s,a;for(s in t)(a=this.add(e,"setAttribute",(e.getAttribute(s)||0)+"",t[s],n,r,0,0,s))&&(a.op=s),this._props.push(s)}},{name:"endArray",init:function(e,t){for(var i=t.length;i--;)this.add(e,i,e[i]||0,t[i])}},Oi("roundProps",vt),Oi("modifiers"),Oi("snap",yt))||Pi;fi.version=ni.version=Li.version="3.10.4",c=1,Y()&&zt();var Di=Wt.Power0,Mi=Wt.Power1,Ni=Wt.Power2,Ri=Wt.Power3,Ui=Wt.Power4,Bi=Wt.Linear,ji=Wt.Quad,Fi=Wt.Cubic,Hi=Wt.Quart,qi=Wt.Quint,zi=Wt.Strong,Wi=Wt.Elastic,Vi=Wt.Back,$i=Wt.SteppedEase,Xi=Wt.Bounce,Gi=Wt.Sine,Yi=Wt.Expo,Ki=Wt.Circ},(e,t,i)=>{"use strict";i.r(t),i.d(t,{CSSPlugin:()=>ye,_createElement:()=>D,_getBBox:()=>F,checkPrefix:()=>R,default:()=>ye});var n,r,s,a,o,l,u,c=i(117),d={},h=180/Math.PI,p=Math.PI/180,f=Math.atan2,m=/([A-Z])/g,g=/(left|right|width|margin|padding|x)/i,v=/[\s,\(]\S/,y={autoAlpha:"opacity,visibility",scale:"scaleX,scaleY",alpha:"opacity"},_=function(e,t){return t.set(t.t,t.p,Math.round(1e4*(t.s+t.c*e))/1e4+t.u,t)},b=function(e,t){return t.set(t.t,t.p,1===e?t.e:Math.round(1e4*(t.s+t.c*e))/1e4+t.u,t)},T=function(e,t){return t.set(t.t,t.p,e?Math.round(1e4*(t.s+t.c*e))/1e4+t.u:t.b,t)},w=function(e,t){var i=t.s+t.c*e;t.set(t.t,t.p,~~(i+(i<0?-.5:.5))+t.u,t)},S=function(e,t){return t.set(t.t,t.p,e?t.e:t.b,t)},k=function(e,t){return t.set(t.t,t.p,1!==e?t.b:t.e,t)},E=function(e,t,i){return e.style[t]=i},C=function(e,t,i){return e.style.setProperty(t,i)},x=function(e,t,i){return e._gsap[t]=i},A=function(e,t,i){return e._gsap.scaleX=e._gsap.scaleY=i},P=function(e,t,i,n,r){var s=e._gsap;s.scaleX=s.scaleY=i,s.renderTransform(r,s)},I=function(e,t,i,n,r){var s=e._gsap;s[t]=i,s.renderTransform(r,s)},O="transform",L=O+"Origin",D=function(e,t){var i=r.createElementNS?r.createElementNS((t||"http://www.w3.org/1999/xhtml").replace(/^https/,"http"),e):r.createElement(e);return i.style?i:r.createElement(e)},M=function e(t,i,n){var r=getComputedStyle(t);return r[i]||r.getPropertyValue(i.replace(m,"-$1").toLowerCase())||r.getPropertyValue(i)||!n&&e(t,R(i)||i,1)||""},N="O,Moz,ms,Ms,Webkit".split(","),R=function(e,t,i){var n=(t||o).style,r=5;if(e in n&&!i)return e;for(e=e.charAt(0).toUpperCase()+e.substr(1);r--&&!(N[r]+e in n););return r<0?null:(3===r?"ms":r>=0?N[r]:"")+e},U=function(){"undefined"!=typeof window&&window.document&&(n=window,r=n.document,s=r.documentElement,o=D("div")||{style:{}},D("div"),O=R(O),L=O+"Origin",o.style.cssText="border-width:0;line-height:0;position:absolute;padding:0",u=!!R("perspective"),a=1)},B=function e(t){var i,n=D("svg",this.ownerSVGElement&&this.ownerSVGElement.getAttribute("xmlns")||"http://www.w3.org/2000/svg"),r=this.parentNode,a=this.nextSibling,o=this.style.cssText;if(s.appendChild(n),n.appendChild(this),this.style.display="block",t)try{i=this.getBBox(),this._gsapBBox=this.getBBox,this.getBBox=e}catch(e){}else this._gsapBBox&&(i=this._gsapBBox());return r&&(a?r.insertBefore(this,a):r.appendChild(this)),s.removeChild(n),this.style.cssText=o,i},j=function(e,t){for(var i=t.length;i--;)if(e.hasAttribute(t[i]))return e.getAttribute(t[i])},F=function(e){var t;try{t=e.getBBox()}catch(i){t=B.call(e,!0)}return t&&(t.width||t.height)||e.getBBox===B||(t=B.call(e,!0)),!t||t.width||t.x||t.y?t:{x:+j(e,["x","cx","x1"])||0,y:+j(e,["y","cy","y1"])||0,width:0,height:0}},H=function(e){return!(!e.getCTM||e.parentNode&&!e.ownerSVGElement||!F(e))},q=function(e,t){if(t){var i=e.style;t in d&&t!==L&&(t=O),i.removeProperty?("ms"!==t.substr(0,2)&&"webkit"!==t.substr(0,6)||(t="-"+t),i.removeProperty(t.replace(m,"-$1").toLowerCase())):i.removeAttribute(t)}},z=function(e,t,i,n,r,s){var a=new c.PropTween(e._pt,t,i,0,1,s?k:S);return e._pt=a,a.b=n,a.e=r,e._props.push(i),a},W={deg:1,rad:1,turn:1},V=function e(t,i,n,s){var a,l,u,h,p=parseFloat(n)||0,f=(n+"").trim().substr((p+"").length)||"px",m=o.style,v=g.test(i),y="svg"===t.tagName.toLowerCase(),_=(y?"client":"offset")+(v?"Width":"Height"),b=100,T="px"===s,w="%"===s;return s===f||!p||W[s]||W[f]?p:("px"!==f&&!T&&(p=e(t,i,n,"px")),h=t.getCTM&&H(t),!w&&"%"!==f||!d[i]&&!~i.indexOf("adius")?(m[v?"width":"height"]=b+(T?f:s),l=~i.indexOf("adius")||"em"===s&&t.appendChild&&!y?t:t.parentNode,h&&(l=(t.ownerSVGElement||{}).parentNode),l&&l!==r&&l.appendChild||(l=r.body),(u=l._gsap)&&w&&u.width&&v&&u.time===c._ticker.time?(0,c._round)(p/u.width*b):((w||"%"===f)&&(m.position=M(t,"position")),l===t&&(m.position="static"),l.appendChild(o),a=o[_],l.removeChild(o),m.position="absolute",v&&w&&((u=(0,c._getCache)(l)).time=c._ticker.time,u.width=l[_]),(0,c._round)(T?a*p/b:a&&p?b/a*p:0))):(a=h?t.getBBox()[v?"width":"height"]:t[_],(0,c._round)(w?p/a*b:p/100*a)))},$=function(e,t,i,n){var r;return a||U(),t in y&&"transform"!==t&&~(t=y[t]).indexOf(",")&&(t=t.split(",")[0]),d[t]&&"transform"!==t?(r=ne(e,n),r="transformOrigin"!==t?r[t]:r.svg?r.origin:re(M(e,L))+" "+r.zOrigin+"px"):(!(r=e.style[t])||"auto"===r||n||~(r+"").indexOf("calc("))&&(r=K[t]&&K[t](e,t,i)||M(e,t)||(0,c._getProperty)(e,t)||("opacity"===t?1:0)),i&&!~(r+"").trim().indexOf(" ")?V(e,t,r,i)+i:r},X=function(e,t,i,n){if(!i||"none"===i){var r=R(t,e,1),s=r&&M(e,r,1);s&&s!==i?(t=r,i=s):"borderColor"===t&&(i=M(e,"borderTopColor"))}var a,o,l,u,d,h,p,f,m,g,v,y=new c.PropTween(this._pt,e.style,t,0,1,c._renderComplexString),_=0,b=0;if(y.b=i,y.e=n,i+="","auto"===(n+="")&&(e.style[t]=n,n=M(e,t)||n,e.style[t]=i),a=[i,n],(0,c._colorStringFilter)(a),n=a[1],l=(i=a[0]).match(c._numWithUnitExp)||[],(n.match(c._numWithUnitExp)||[]).length){for(;o=c._numWithUnitExp.exec(n);)p=o[0],m=n.substring(_,o.index),d?d=(d+1)%5:"rgba("!==m.substr(-5)&&"hsla("!==m.substr(-5)||(d=1),p!==(h=l[b++]||"")&&(u=parseFloat(h)||0,v=h.substr((u+"").length),"="===p.charAt(1)&&(p=(0,c._parseRelative)(u,p)+v),f=parseFloat(p),g=p.substr((f+"").length),_=c._numWithUnitExp.lastIndex-g.length,g||(g=g||c._config.units[t]||v,_===n.length&&(n+=g,y.e+=g)),v!==g&&(u=V(e,t,h,g)||0),y._pt={_next:y._pt,p:m||1===b?m:",",s:u,c:f-u,m:d&&d<4||"zIndex"===t?Math.round:0});y.c=_<n.length?n.substring(_,n.length):""}else y.r="display"===t&&"none"===n?k:S;return c._relExp.test(n)&&(y.e=0),this._pt=y,y},G={top:"0%",bottom:"100%",left:"0%",right:"100%",center:"50%"},Y=function(e,t){if(t.tween&&t.tween._time===t.tween._dur){var i,n,r,s=t.t,a=s.style,o=t.u,l=s._gsap;if("all"===o||!0===o)a.cssText="",n=1;else for(r=(o=o.split(",")).length;--r>-1;)i=o[r],d[i]&&(n=1,i="transformOrigin"===i?L:O),q(s,i);n&&(q(s,O),l&&(l.svg&&s.removeAttribute("transform"),ne(s,1),l.uncache=1))}},K={clearProps:function(e,t,i,n,r){if("isFromStart"!==r.data){var s=e._pt=new c.PropTween(e._pt,t,i,0,0,Y);return s.u=n,s.pr=-10,s.tween=r,e._props.push(i),1}}},Q=[1,0,0,1,0,0],J={},Z=function(e){return"matrix(1, 0, 0, 1, 0, 0)"===e||"none"===e||!e},ee=function(e){var t=M(e,O);return Z(t)?Q:t.substr(7).match(c._numExp).map(c._round)},te=function(e,t){var i,n,r,a,o=e._gsap||(0,c._getCache)(e),l=e.style,u=ee(e);return o.svg&&e.getAttribute("transform")?"1,0,0,1,0,0"===(u=[(r=e.transform.baseVal.consolidate().matrix).a,r.b,r.c,r.d,r.e,r.f]).join(",")?Q:u:(u!==Q||e.offsetParent||e===s||o.svg||(r=l.display,l.display="block",(i=e.parentNode)&&e.offsetParent||(a=1,n=e.nextSibling,s.appendChild(e)),u=ee(e),r?l.display=r:q(e,"display"),a&&(n?i.insertBefore(e,n):i?i.appendChild(e):s.removeChild(e))),t&&u.length>6?[u[0],u[1],u[4],u[5],u[12],u[13]]:u)},ie=function(e,t,i,n,r,s){var a,o,l,u=e._gsap,c=r||te(e,!0),d=u.xOrigin||0,h=u.yOrigin||0,p=u.xOffset||0,f=u.yOffset||0,m=c[0],g=c[1],v=c[2],y=c[3],_=c[4],b=c[5],T=t.split(" "),w=parseFloat(T[0])||0,S=parseFloat(T[1])||0;i?c!==Q&&(o=m*y-g*v)&&(l=w*(-g/o)+S*(m/o)-(m*b-g*_)/o,w=w*(y/o)+S*(-v/o)+(v*b-y*_)/o,S=l):(w=(a=F(e)).x+(~T[0].indexOf("%")?w/100*a.width:w),S=a.y+(~(T[1]||T[0]).indexOf("%")?S/100*a.height:S)),n||!1!==n&&u.smooth?(_=w-d,b=S-h,u.xOffset=p+(_*m+b*v)-_,u.yOffset=f+(_*g+b*y)-b):u.xOffset=u.yOffset=0,u.xOrigin=w,u.yOrigin=S,u.smooth=!!n,u.origin=t,u.originIsAbsolute=!!i,e.style[L]="0px 0px",s&&(z(s,u,"xOrigin",d,w),z(s,u,"yOrigin",h,S),z(s,u,"xOffset",p,u.xOffset),z(s,u,"yOffset",f,u.yOffset)),e.setAttribute("data-svg-origin",w+" "+S)},ne=function(e,t){var i=e._gsap||new c.GSCache(e);if("x" in i&&!t&&!i.uncache)return i;var n,r,s,a,o,l,d,m,g,v,y,_,b,T,w,S,k,E,C,x,A,P,I,D,N,R,U,B,j,F,q,z,W=e.style,V=i.scaleX<0,$="px",X="deg",G=M(e,L)||"0";return n=r=s=l=d=m=g=v=y=0,a=o=1,i.svg=!(!e.getCTM||!H(e)),T=te(e,i.svg),i.svg&&(D=(!i.uncache||"0px 0px"===G)&&!t&&e.getAttribute("data-svg-origin"),ie(e,D||G,!!D||i.originIsAbsolute,!1!==i.smooth,T)),_=i.xOrigin||0,b=i.yOrigin||0,T!==Q&&(E=T[0],C=T[1],x=T[2],A=T[3],n=P=T[4],r=I=T[5],6===T.length?(a=Math.sqrt(E*E+C*C),o=Math.sqrt(A*A+x*x),l=E||C?f(C,E)*h:0,(g=x||A?f(x,A)*h+l:0)&&(o*=Math.abs(Math.cos(g*p))),i.svg&&(n-=_-(_*E+b*x),r-=b-(_*C+b*A))):(z=T[6],F=T[7],U=T[8],B=T[9],j=T[10],q=T[11],n=T[12],r=T[13],s=T[14],d=(w=f(z,j))*h,w&&(D=P*(S=Math.cos(-w))+U*(k=Math.sin(-w)),N=I*S+B*k,R=z*S+j*k,U=P*-k+U*S,B=I*-k+B*S,j=z*-k+j*S,q=F*-k+q*S,P=D,I=N,z=R),m=(w=f(-x,j))*h,w&&(S=Math.cos(-w),q=A*(k=Math.sin(-w))+q*S,E=D=E*S-U*k,C=N=C*S-B*k,x=R=x*S-j*k),l=(w=f(C,E))*h,w&&(D=E*(S=Math.cos(w))+C*(k=Math.sin(w)),N=P*S+I*k,C=C*S-E*k,I=I*S-P*k,E=D,P=N),d&&Math.abs(d)+Math.abs(l)>359.9&&(d=l=0,m=180-m),a=(0,c._round)(Math.sqrt(E*E+C*C+x*x)),o=(0,c._round)(Math.sqrt(I*I+z*z)),w=f(P,I),g=Math.abs(w)>2e-4?w*h:0,y=q?1/(q<0?-q:q):0),i.svg&&(D=e.getAttribute("transform"),i.forceCSS=e.setAttribute("transform","")||!Z(M(e,O)),D&&e.setAttribute("transform",D))),Math.abs(g)>90&&Math.abs(g)<270&&(V?(a*=-1,g+=l<=0?180:-180,l+=l<=0?180:-180):(o*=-1,g+=g<=0?180:-180)),t=t||i.uncache,i.x=n-((i.xPercent=n&&(!t&&i.xPercent||(Math.round(e.offsetWidth/2)===Math.round(-n)?-50:0)))?e.offsetWidth*i.xPercent/100:0)+$,i.y=r-((i.yPercent=r&&(!t&&i.yPercent||(Math.round(e.offsetHeight/2)===Math.round(-r)?-50:0)))?e.offsetHeight*i.yPercent/100:0)+$,i.z=s+$,i.scaleX=(0,c._round)(a),i.scaleY=(0,c._round)(o),i.rotation=(0,c._round)(l)+X,i.rotationX=(0,c._round)(d)+X,i.rotationY=(0,c._round)(m)+X,i.skewX=g+X,i.skewY=v+X,i.transformPerspective=y+$,(i.zOrigin=parseFloat(G.split(" ")[2])||0)&&(W[L]=re(G)),i.xOffset=i.yOffset=0,i.force3D=c._config.force3D,i.renderTransform=i.svg?de:u?ce:ae,i.uncache=0,i},re=function(e){return(e=e.split(" "))[0]+" "+e[1]},se=function(e,t,i){var n=(0,c.getUnit)(t);return(0,c._round)(parseFloat(t)+parseFloat(V(e,"x",i+"px",n)))+n},ae=function(e,t){t.z="0px",t.rotationY=t.rotationX="0deg",t.force3D=0,ce(e,t)},oe="0deg",le="0px",ue=") ",ce=function(e,t){var i=t||this,n=i.xPercent,r=i.yPercent,s=i.x,a=i.y,o=i.z,l=i.rotation,u=i.rotationY,c=i.rotationX,d=i.skewX,h=i.skewY,f=i.scaleX,m=i.scaleY,g=i.transformPerspective,v=i.force3D,y=i.target,_=i.zOrigin,b="",T="auto"===v&&e&&1!==e||!0===v;if(_&&(c!==oe||u!==oe)){var w,S=parseFloat(u)*p,k=Math.sin(S),E=Math.cos(S);S=parseFloat(c)*p,w=Math.cos(S),s=se(y,s,k*w*-_),a=se(y,a,-Math.sin(S)*-_),o=se(y,o,E*w*-_+_)}g!==le&&(b+="perspective("+g+ue),(n||r)&&(b+="translate("+n+"%, "+r+"%) "),(T||s!==le||a!==le||o!==le)&&(b+=o!==le||T?"translate3d("+s+", "+a+", "+o+") ":"translate("+s+", "+a+ue),l!==oe&&(b+="rotate("+l+ue),u!==oe&&(b+="rotateY("+u+ue),c!==oe&&(b+="rotateX("+c+ue),d===oe&&h===oe||(b+="skew("+d+", "+h+ue),1===f&&1===m||(b+="scale("+f+", "+m+ue),y.style[O]=b||"translate(0, 0)"},de=function(e,t){var i,n,r,s,a,o=t||this,l=o.xPercent,u=o.yPercent,d=o.x,h=o.y,f=o.rotation,m=o.skewX,g=o.skewY,v=o.scaleX,y=o.scaleY,_=o.target,b=o.xOrigin,T=o.yOrigin,w=o.xOffset,S=o.yOffset,k=o.forceCSS,E=parseFloat(d),C=parseFloat(h);f=parseFloat(f),m=parseFloat(m),(g=parseFloat(g))&&(m+=g=parseFloat(g),f+=g),f||m?(f*=p,m*=p,i=Math.cos(f)*v,n=Math.sin(f)*v,r=Math.sin(f-m)*-y,s=Math.cos(f-m)*y,m&&(g*=p,a=Math.tan(m-g),r*=a=Math.sqrt(1+a*a),s*=a,g&&(a=Math.tan(g),i*=a=Math.sqrt(1+a*a),n*=a)),i=(0,c._round)(i),n=(0,c._round)(n),r=(0,c._round)(r),s=(0,c._round)(s)):(i=v,s=y,n=r=0),(E&&!~(d+"").indexOf("px")||C&&!~(h+"").indexOf("px"))&&(E=V(_,"x",d,"px"),C=V(_,"y",h,"px")),(b||T||w||S)&&(E=(0,c._round)(E+b-(b*i+T*r)+w),C=(0,c._round)(C+T-(b*n+T*s)+S)),(l||u)&&(a=_.getBBox(),E=(0,c._round)(E+l/100*a.width),C=(0,c._round)(C+u/100*a.height)),a="matrix("+i+","+n+","+r+","+s+","+E+","+C+")",_.setAttribute("transform",a),k&&(_.style[O]=a)},he=function(e,t,i,n,r){var s,a,o=360,l=(0,c._isString)(r),u=parseFloat(r)*(l&&~r.indexOf("rad")?h:1)-n,d=n+u+"deg";return l&&("short"===(s=r.split("_")[1])&&(u%=o)!==u%180&&(u+=u<0?o:-360),"cw"===s&&u<0?u=(u+36e9)%o-~~(u/o)*o:"ccw"===s&&u>0&&(u=(u-36e9)%o-~~(u/o)*o)),e._pt=a=new c.PropTween(e._pt,t,i,n,u,b),a.e=d,a.u="deg",e._props.push(i),a},pe=function(e,t){for(var i in t)e[i]=t[i];return e},fe=function(e,t,i){var n,r,s,a,o,l,u,h=pe({},i._gsap),p=i.style;for(r in h.svg?(s=i.getAttribute("transform"),i.setAttribute("transform",""),p[O]=t,n=ne(i,1),q(i,O),i.setAttribute("transform",s)):(s=getComputedStyle(i)[O],p[O]=t,n=ne(i,1),p[O]=s),d)(s=h[r])!==(a=n[r])&&"perspective,force3D,transformOrigin,svgOrigin".indexOf(r)<0&&(o=(0,c.getUnit)(s)!==(u=(0,c.getUnit)(a))?V(i,r,s,u):parseFloat(s),l=parseFloat(a),e._pt=new c.PropTween(e._pt,n,r,o,l-o,_),e._pt.u=u||0,e._props.push(r));pe(n,h)};(0,c._forEachName)("padding,margin,Width,Radius",(function(e,t){var i="Top",n="Right",r="Bottom",s="Left",a=(t<3?[i,n,r,s]:[i+s,i+n,r+n,r+s]).map((function(i){return t<2?e+i:"border"+i+e}));K[t>1?"border"+e:e]=function(e,t,i,n,r){var s,o;if(arguments.length<4)return s=a.map((function(t){return $(e,t,i)})),5===(o=s.join(" ")).split(s[0]).length?s[0]:o;s=(n+"").split(" "),o={},a.forEach((function(e,t){return o[e]=s[t]=s[t]||s[(t-1)/2|0]})),e.init(t,o,r)}}));var me,ge,ve,ye={name:"css",register:U,targetTest:function(e){return e.style&&e.nodeType},init:function(e,t,i,n,r){var s,o,l,u,h,p,f,m,g,b,S,k,E,C,x,A,P,I,L,D=this._props,M=e.style,N=i.vars.startAt;for(f in a||U(),t)if("autoRound"!==f&&(o=t[f],!c._plugins[f]||!(0,c._checkPlugin)(f,t,i,n,e,r)))if(h=typeof o,p=K[f],"function"===h&&(h=typeof(o=o.call(i,n,e,r))),"string"===h&&~o.indexOf("random(")&&(o=(0,c._replaceRandom)(o)),p)p(this,e,f,o,i)&&(x=1);else if("--"===f.substr(0,2))s=(getComputedStyle(e).getPropertyValue(f)+"").trim(),o+="",c._colorExp.lastIndex=0,c._colorExp.test(s)||(m=(0,c.getUnit)(s),g=(0,c.getUnit)(o)),g?m!==g&&(s=V(e,f,s,g)+g):m&&(o+=m),this.add(M,"setProperty",s,o,n,r,0,0,f),D.push(f);else if("undefined"!==h){if(N&&f in N?(s="function"==typeof N[f]?N[f].call(i,n,e,r):N[f],(0,c._isString)(s)&&~s.indexOf("random(")&&(s=(0,c._replaceRandom)(s)),(0,c.getUnit)(s+"")||(s+=c._config.units[f]||(0,c.getUnit)($(e,f))||""),"="===(s+"").charAt(1)&&(s=$(e,f))):s=$(e,f),u=parseFloat(s),(b="string"===h&&"="===o.charAt(1)&&o.substr(0,2))&&(o=o.substr(2)),l=parseFloat(o),f in y&&("autoAlpha"===f&&(1===u&&"hidden"===$(e,"visibility")&&l&&(u=0),z(this,M,"visibility",u?"inherit":"hidden",l?"inherit":"hidden",!l)),"scale"!==f&&"transform"!==f&&~(f=y[f]).indexOf(",")&&(f=f.split(",")[0])),S=f in d)if(k||((E=e._gsap).renderTransform&&!t.parseTransform||ne(e,t.parseTransform),C=!1!==t.smoothOrigin&&E.smooth,(k=this._pt=new c.PropTween(this._pt,M,O,0,1,E.renderTransform,E,0,-1)).dep=1),"scale"===f)this._pt=new c.PropTween(this._pt,E,"scaleY",E.scaleY,(b?(0,c._parseRelative)(E.scaleY,b+l):l)-E.scaleY||0),D.push("scaleY",f),f+="X";else{if("transformOrigin"===f){P=void 0,I=void 0,L=void 0,P=(A=o).split(" "),I=P[0],L=P[1]||"50%","top"!==I&&"bottom"!==I&&"left"!==L&&"right"!==L||(A=I,I=L,L=A),P[0]=G[I]||I,P[1]=G[L]||L,o=P.join(" "),E.svg?ie(e,o,0,C,0,this):((g=parseFloat(o.split(" ")[2])||0)!==E.zOrigin&&z(this,E,"zOrigin",E.zOrigin,g),z(this,M,f,re(s),re(o)));continue}if("svgOrigin"===f){ie(e,o,1,C,0,this);continue}if(f in J){he(this,E,f,u,b?(0,c._parseRelative)(u,b+o):o);continue}if("smoothOrigin"===f){z(this,E,"smooth",E.smooth,o);continue}if("force3D"===f){E[f]=o;continue}if("transform"===f){fe(this,o,e);continue}}else f in M||(f=R(f)||f);if(S||(l||0===l)&&(u||0===u)&&!v.test(o)&&f in M)l||(l=0),(m=(s+"").substr((u+"").length))!==(g=(0,c.getUnit)(o)||(f in c._config.units?c._config.units[f]:m))&&(u=V(e,f,s,g)),this._pt=new c.PropTween(this._pt,S?E:M,f,u,(b?(0,c._parseRelative)(u,b+l):l)-u,S||"px"!==g&&"zIndex"!==f||!1===t.autoRound?_:w),this._pt.u=g||0,m!==g&&"%"!==g&&(this._pt.b=s,this._pt.r=T);else if(f in M)X.call(this,e,f,s,b?b+o:o);else{if(!(f in e)){(0,c._missingPlugin)(f,o);continue}this.add(e,f,s||e[f],b?b+o:o,n,r)}D.push(f)}x&&(0,c._sortPropTweensByPriority)(this)},get:$,aliases:y,getSetter:function(e,t,i){var n=y[t];return n&&n.indexOf(",")<0&&(t=n),t in d&&t!==L&&(e._gsap.x||$(e,"x"))?i&&l===i?"scale"===t?A:x:(l=i||{})&&("scale"===t?P:I):e.style&&!(0,c._isUndefined)(e.style[t])?E:~t.indexOf("-")?C:(0,c._getSetter)(e,t)},core:{_removeProperty:q,_getMatrix:te}};c.gsap.utils.checkPrefix=R,me="x,y,z,scale,scaleX,scaleY,xPercent,yPercent",ge="rotation,rotationX,rotationY,skewX,skewY",ve=(0,c._forEachName)(me+","+ge+",transform,transformOrigin,svgOrigin,force3D,smoothOrigin,transformPerspective",(function(e){d[e]=1})),(0,c._forEachName)(ge,(function(e){c._config.units[e]="deg",J[e]=1})),y[ve[13]]=me+","+ge,(0,c._forEachName)("0:translateX,1:translateY,2:translateZ,8:rotate,8:rotationZ,8:rotateZ,9:rotateX,10:rotateY",(function(e){var t=e.split(":");y[t[1]]=ve[t[0]]})),(0,c._forEachName)("x,y,z,top,right,bottom,left,width,height,fontSize,padding,margin,perspective",(function(e){c._config.units[e]="px"})),c.gsap.registerPlugin(ye)},(e,t,i)=>{"use strict";i.r(t),i.d(t,{ScrollTrigger:()=>ct,default:()=>ct});var n,r,s,a,o,l,u,c,d,h,p,f,m,g,v,y,_,b,T,w,S,k,E,C,x,A,P,I,O,L,D,M,N,R=i(120),U=1,B=Date.now,j=B(),F=0,H=0,q=function(){return g=1},z=function(){return g=0},W=function(e){return e},V=function(e){return Math.round(1e5*e)/1e5||0},$=function(){return"undefined"!=typeof window},X=function(){return n||$()&&(n=window.gsap)&&n.registerPlugin&&n},G=function(e){return!!~u.indexOf(e)},Y=function(e){return(0,R._getProxyProp)(e,"getBoundingClientRect")||(G(e)?function(){return st.width=s.innerWidth,st.height=s.innerHeight,st}:function(){return ye(e)})},K=function(e,t){var i=t.s,n=t.d2,r=t.d,a=t.a;return(i="scroll"+n)&&(a=(0,R._getProxyProp)(e,i))?a()-Y(e)()[r]:G(e)?(o[i]||l[i])-(s["inner"+n]||o["client"+n]||l["client"+n]):e[i]-e["offset"+n]},Q=function(e,t){for(var i=0;i<T.length;i+=3)(!t||~t.indexOf(T[i+1]))&&e(T[i],T[i+1],T[i+2])},J=function(e){return"string"==typeof e},Z=function(e){return"function"==typeof e},ee=function(e){return"number"==typeof e},te=function(e){return"object"==typeof e},ie=function(e){return Z(e)&&e()},ne=function(e,t){return function(){var i=ie(e),n=ie(t);return function(){ie(i),ie(n)}}},re=function(e,t,i){return e&&e.progress(t?0:1)&&i&&e.pause()},se=function(e,t){if(e.enabled){var i=t(e);i&&i.totalTime&&(e.callbackAnimation=i)}},ae=Math.abs,oe="left",le="right",ue="bottom",ce="width",de="height",he="padding",pe="margin",fe="Width",me="px",ge=function(e){return s.getComputedStyle(e)},ve=function(e,t){for(var i in t)i in e||(e[i]=t[i]);return e},ye=function(e,t){var i=t&&"matrix(1, 0, 0, 1, 0, 0)"!==ge(e)[v]&&n.to(e,{x:0,y:0,xPercent:0,yPercent:0,rotation:0,rotationX:0,rotationY:0,scale:1,skewX:0,skewY:0}).progress(1),r=e.getBoundingClientRect();return i&&i.progress(0).kill(),r},_e=function(e,t){var i=t.d2;return e["offset"+i]||e["client"+i]||0},be=function(e){var t,i=[],n=e.labels,r=e.duration();for(t in n)i.push(n[t]/r);return i},Te=function(e){var t=n.utils.snap(e),i=Array.isArray(e)&&e.slice(0).sort((function(e,t){return e-t}));return i?function(e,n,r){var s;if(void 0===r&&(r=.001),!n)return t(e);if(n>0){for(e-=r,s=0;s<i.length;s++)if(i[s]>=e)return i[s];return i[s-1]}for(s=i.length,e+=r;s--;)if(i[s]<=e)return i[s];return i[0]}:function(i,n,r){void 0===r&&(r=.001);var s=t(i);return!n||Math.abs(s-i)<r||s-i<0==n<0?s:t(n<0?i-e:i+e)}},we=function(e,t,i,n){return i.split(",").forEach((function(i){return e(t,i,n)}))},Se=function(e,t,i,n,r){return e.addEventListener(t,i,{passive:!n,capture:!!r})},ke=function(e,t,i,n){return e.removeEventListener(t,i,!!n)},Ee=function(e,t,i){return i&&i.wheelHandler&&e(t,"wheel",i)},Ce={startColor:"green",endColor:"red",indent:0,fontSize:"16px",fontWeight:"normal"},xe={toggleActions:"play",anticipatePin:0},Ae={top:0,left:0,center:.5,bottom:1,right:1},Pe=function(e,t){if(J(e)){var i=e.indexOf("="),n=~i?+(e.charAt(i-1)+1)*parseFloat(e.substr(i+1)):0;~i&&(e.indexOf("%")>i&&(n*=t/100),e=e.substr(0,i-1)),e=n+(e in Ae?Ae[e]*t:~e.indexOf("%")?parseFloat(e)*t/100:parseFloat(e)||0)}return e},Ie=function(e,t,i,n,r,s,o,u){var c=r.startColor,d=r.endColor,h=r.fontSize,p=r.indent,f=r.fontWeight,m=a.createElement("div"),g=G(i)||"fixed"===(0,R._getProxyProp)(i,"pinType"),v=-1!==e.indexOf("scroller"),y=g?l:i,_=-1!==e.indexOf("start"),b=_?c:d,T="border-color:"+b+";font-size:"+h+";color:"+b+";font-weight:"+f+";pointer-events:none;white-space:nowrap;font-family:sans-serif,Arial;z-index:1000;padding:4px 8px;border-width:0;border-style:solid;";return T+="position:"+((v||u)&&g?"fixed;":"absolute;"),(v||u||!g)&&(T+=(n===R._vertical?le:ue)+":"+(s+parseFloat(p))+"px;"),o&&(T+="box-sizing:border-box;text-align:left;width:"+o.offsetWidth+"px;"),m._isStart=_,m.setAttribute("class","gsap-marker-"+e+(t?" marker-"+t:"")),m.style.cssText=T,m.innerText=t||0===t?e+"-"+t:e,y.children[0]?y.insertBefore(m,y.children[0]):y.appendChild(m),m._offset=m["offset"+n.op.d2],Oe(m,0,n,_),m},Oe=function(e,t,i,r){var s={display:"block"},a=i[r?"os2":"p2"],o=i[r?"p2":"os2"];e._isFlipped=r,s[i.a+"Percent"]=r?-100:0,s[i.a]=r?"1px":0,s["border"+a+fe]=1,s["border"+o+fe]=0,s[i.p]=t+"px",n.set(e,s)},Le=[],De={},Me=function(){return B()-F>34&&Je()},Ne=function(){(!E||!E.isPressed||E.startX>l.clientWidth)&&(R._scrollers.cache++,O||(O=requestAnimationFrame(Je)),F||ze("scrollStart"),F=B())},Re=function(){A=s.innerWidth,x=s.innerHeight},Ue=function(){R._scrollers.cache++,!m&&!k&&!a.fullscreenElement&&!a.webkitFullscreenElement&&(!C||A!==s.innerWidth||Math.abs(s.innerHeight-x)>.25*s.innerHeight)&&c.restart(!0)},Be={},je=[],Fe=[],He=function(e){var t,i=n.ticker.frame,a=[],o=0;if(D!==i||U){for($e();o<Fe.length;o+=4)(t=s.matchMedia(Fe[o]).matches)!==Fe[o+3]&&(Fe[o+3]=t,t?a.push(o):$e(1,Fe[o])||Z(Fe[o+2])&&Fe[o+2]());for(Ve(),o=0;o<a.length;o++)t=a[o],L=Fe[t],Fe[t+2]=Fe[t+1](e);L=0,r&&Ye(0,1),D=i,ze("matchMedia")}},qe=function e(){return ke(ct,"scrollEnd",e)||Ye(!0)},ze=function(e){return Be[e]&&Be[e].map((function(e){return e()}))||je},We=[],Ve=function(e){for(var t=0;t<We.length;t+=5)e&&We[t+4]!==e||(We[t].style.cssText=We[t+1],We[t].getBBox&&We[t].setAttribute("transform",We[t+2]||""),We[t+3].uncache=1)},$e=function(e,t){var i;for(y=0;y<Le.length;y++)i=Le[y],t&&i.media!==t||(e?i.kill(1):i.revert());t&&Ve(t),t||ze("revert")},Xe=function(){return R._scrollers.cache++&&R._scrollers.forEach((function(e){return"function"==typeof e&&(e.rec=0)}))},Ge=0,Ye=function(e,t){if(!F||e){M=!0;var i=ze("refreshInit");w&&ct.sort(),t||$e(),Le.slice(0).forEach((function(e){return e.refresh()})),Le.forEach((function(e){return"max"===e.vars.end&&e.setPositions(e.start,K(e.scroller,e._dir))})),i.forEach((function(e){return e&&e.render&&e.render(-1)})),Xe(),c.pause(),Ge++,M=!1,ze("refresh")}else Se(ct,"scrollEnd",qe)},Ke=0,Qe=1,Je=function(){if(!M){ct.isUpdating=!0,N&&N.update(0);var e=Le.length,t=B(),i=t-j>=50,n=e&&Le[0].scroll();if(Qe=Ke>n?-1:1,Ke=n,i&&(F&&!g&&t-F>200&&(F=0,ze("scrollEnd")),p=j,j=t),Qe<0){for(y=e;y-->0;)Le[y]&&Le[y].update(0,i);Qe=1}else for(y=0;y<e;y++)Le[y]&&Le[y].update(0,i);ct.isUpdating=!1}O=0},Ze=[oe,"top",ue,le,"marginBottom","marginRight","marginTop","marginLeft","display","flexShrink","float","zIndex","gridColumnStart","gridColumnEnd","gridRowStart","gridRowEnd","gridArea","justifySelf","alignSelf","placeSelf","order"],et=Ze.concat([ce,de,"boxSizing","maxWidth","maxHeight","position",pe,he,"paddingTop","paddingRight","paddingBottom","paddingLeft"]),tt=function(e,t,i,n){if(e.parentNode!==t){for(var r,s=Ze.length,a=t.style,o=e.style;s--;)a[r=Ze[s]]=i[r];a.position="absolute"===i.position?"absolute":"relative","inline"===i.display&&(a.display="inline-block"),o.bottom=o.right=a.flexBasis="auto",a.overflow="visible",a.boxSizing="border-box",a.width=_e(e,R._horizontal)+me,a.height=_e(e,R._vertical)+me,a.padding=o.margin=o.top=o.left="0",nt(n),o.width=o.maxWidth=i.width,o.height=o.maxHeight=i.height,o.padding=i.padding,e.parentNode.insertBefore(t,e),t.appendChild(e)}},it=/([A-Z])/g,nt=function(e){if(e){var t,i,r=e.t.style,s=e.length,a=0;for((e.t._gsap||n.core.getCache(e.t)).uncache=1;a<s;a+=2)i=e[a+1],t=e[a],i?r[t]=i:r[t]&&r.removeProperty(t.replace(it,"-$1").toLowerCase())}},rt=function(e){for(var t=et.length,i=e.style,n=[],r=0;r<t;r++)n.push(et[r],i[et[r]]);return n.t=e,n},st={left:0,top:0},at=function(e,t,i,n,r,s,a,u,c,d,h,p,f){Z(e)&&(e=e(u)),J(e)&&"max"===e.substr(0,3)&&(e=p+("="===e.charAt(4)?Pe("0"+e.substr(3),i):0));var m,g,v,y=f?f.time():0;if(f&&f.seek(0),ee(e))a&&Oe(a,i,n,!0);else{Z(t)&&(t=t(u));var _,b,T,w,S=e.split(" ");v=(0,R._getTarget)(t)||l,(_=ye(v)||{})&&(_.left||_.top)||"none"!==ge(v).display||(w=v.style.display,v.style.display="block",_=ye(v),w?v.style.display=w:v.style.removeProperty("display")),b=Pe(S[0],_[n.d]),T=Pe(S[1]||"0",i),e=_[n.p]-c[n.p]-d+b+r-T,a&&Oe(a,T,n,i-T<20||a._isStart&&T>20),i-=i-T}if(s){var k=e+i,E=s._isStart;m="scroll"+n.d2,Oe(s,k,n,E&&k>20||!E&&(h?Math.max(l[m],o[m]):s.parentNode[m])<=k+1),h&&(c=ye(a),h&&(s.style[n.op.p]=c[n.op.p]-n.op.m-s._offset+me))}return f&&v&&(m=ye(v),f.seek(p),g=ye(v),f._caScrollDist=m[n.p]-g[n.p],e=e/f._caScrollDist*p),f&&f.seek(y),f?e:Math.round(e)},ot=/(webkit|moz|length|cssText|inset)/i,lt=function(e,t,i,r){if(e.parentNode!==t){var s,a,o=e.style;if(t===l){for(s in e._stOrig=o.cssText,a=ge(e))+s||ot.test(s)||!a[s]||"string"!=typeof o[s]||"0"===s||(o[s]=a[s]);o.top=i,o.left=r}else o.cssText=e._stOrig;n.core.getCache(e).uncache=1,t.appendChild(e)}},ut=function(e,t){var i,r,s=(0,R._getScrollFunc)(e,t),a="_scroll"+t.p2,o=function t(o,l,u,c,d){var h=t.tween,p=l.onComplete,f={};return u=u||s(),d=c&&d||0,c=c||o-u,h&&h.kill(),i=Math.round(u),l[a]=o,l.modifiers=f,f[a]=function(e){return(e=V(s()))!==i&&e!==r&&Math.abs(e-i)>2&&Math.abs(e-r)>2?(h.kill(),t.tween=0):e=u+c*h.ratio+d*h.ratio*h.ratio,r=i,i=V(e)},l.onComplete=function(){t.tween=0,p&&p.call(h)},h=t.tween=n.to(e,l)};return e[a]=s,s.wheelHandler=function(){return o.tween&&o.tween.kill()&&(o.tween=0)},Se(e,"wheel",s.wheelHandler),o},ct=function(){function e(t,i){r||e.register(n)||console.warn("Please gsap.registerPlugin(ScrollTrigger)"),this.init(t,i)}return e.prototype.init=function(t,i){if(this.progress=this.start=0,this.vars&&this.kill(!0,!0),H){var r,u,c,f,v,_,b,T,k,E,C,x,A,P,O,D,j,q,z,$,X,Q,ie,ne,oe,le,ue,ce,de,we,Ee,Ae,Oe,Me,Re,Be,je,Fe,He,ze,We,Ve=t=ve(J(t)||ee(t)||t.nodeType?{trigger:t}:t,xe),$e=Ve.onUpdate,Xe=Ve.toggleClass,Ge=Ve.id,Ye=Ve.onToggle,Ke=Ve.onRefresh,Je=Ve.scrub,Ze=Ve.trigger,et=Ve.pin,it=Ve.pinSpacing,ot=Ve.invalidateOnRefresh,ct=Ve.anticipatePin,dt=Ve.onScrubComplete,ht=Ve.onSnapComplete,pt=Ve.once,ft=Ve.snap,mt=Ve.pinReparent,gt=Ve.pinSpacer,vt=Ve.containerAnimation,yt=Ve.fastScrollEnd,_t=Ve.preventOverlaps,bt=t.horizontal||t.containerAnimation&&!1!==t.horizontal?R._horizontal:R._vertical,Tt=!Je&&0!==Je,wt=(0,R._getTarget)(t.scroller||s),St=n.core.getCache(wt),kt=G(wt),Et="fixed"===("pinType" in t?t.pinType:(0,R._getProxyProp)(wt,"pinType")||kt&&"fixed"),Ct=[t.onEnter,t.onLeave,t.onEnterBack,t.onLeaveBack],xt=Tt&&t.toggleActions.split(" "),At="markers" in t?t.markers:xe.markers,Pt=kt?0:parseFloat(ge(wt)["border"+bt.p2+fe])||0,It=this,Ot=t.onRefreshInit&&function(){return t.onRefreshInit(It)},Lt=function(e,t,i){var n=i.d,r=i.d2,a=i.a;return(a=(0,R._getProxyProp)(e,"getBoundingClientRect"))?function(){return a()[n]}:function(){return(t?s["inner"+r]:e["client"+r])||0}}(wt,kt,bt),Dt=function(e,t){return!t||~R._proxies.indexOf(e)?Y(e):function(){return st}}(wt,kt),Mt=0,Nt=0,Rt=(0,R._getScrollFunc)(wt,bt);if(It.media=L,It._dir=bt,ct*=45,It.scroller=wt,It.scroll=vt?vt.time.bind(vt):Rt,f=Rt(),It.vars=t,i=i||t.animation,"refreshPriority" in t&&(w=1,-9999===t.refreshPriority&&(N=It)),St.tweenScroll=St.tweenScroll||{top:ut(wt,R._vertical),left:ut(wt,R._horizontal)},It.tweenTo=r=St.tweenScroll[bt.p],It.scrubDuration=function(e){(Ee=ee(e)&&e)?we?we.duration(e):we=n.to(i,{ease:"expo",totalProgress:"+=0.001",duration:Ee,paused:!0,onComplete:function(){return dt&&dt(It)}}):(we&&we.progress(1).kill(),we=0)},i&&(i.vars.lazy=!1,i._initted||!1!==i.vars.immediateRender&&!1!==t.immediateRender&&i.render(0,!0,!0),It.animation=i.pause(),i.scrollTrigger=It,It.scrubDuration(Je),ce=0,Ge||(Ge=i.vars.id)),Le.push(It),ft&&(te(ft)&&!ft.push||(ft={snapTo:ft}),"scrollBehavior" in l.style&&n.set(kt?[l,o]:wt,{scrollBehavior:"auto"}),c=Z(ft.snapTo)?ft.snapTo:"labels"===ft.snapTo?function(e){return function(t){return n.utils.snap(be(e),t)}}(i):"labelsDirectional"===ft.snapTo?(He=i,function(e,t){return Te(be(He))(e,t.direction)}):!1!==ft.directional?function(e,t){return Te(ft.snapTo)(e,B()-Nt<500?0:t.direction)}:n.utils.snap(ft.snapTo),Ae=ft.duration||{min:.1,max:2},Ae=te(Ae)?h(Ae.min,Ae.max):h(Ae,Ae),Oe=n.delayedCall(ft.delay||Ee/2||.1,(function(){var e=Rt(),t=B()-Nt<500,s=r.tween;if(!(t||Math.abs(It.getVelocity())<10)||s||g||Mt===e)It.isActive&&Mt!==e&&Oe.restart(!0);else{var a=(e-_)/A,o=i&&!Tt?i.totalProgress():a,l=t?0:(o-de)/(B()-p)*1e3||0,u=n.utils.clamp(-a,1-a,ae(l/2)*l/.185),d=a+(!1===ft.inertia?0:u),f=h(0,1,c(d,It)),m=Math.round(_+f*A),v=ft,y=v.onStart,T=v.onInterrupt,w=v.onComplete;if(e<=b&&e>=_&&m!==e){if(s&&!s._initted&&s.data<=ae(m-e))return;!1===ft.inertia&&(u=f-a),r(m,{duration:Ae(ae(.185*Math.max(ae(d-o),ae(f-o))/l/.05||0)),ease:ft.ease||"power3",data:ae(m-e),onInterrupt:function(){return Oe.restart(!0)&&T&&T(It)},onComplete:function(){It.update(),Mt=Rt(),ce=de=i&&!Tt?i.totalProgress():It.progress,ht&&ht(It),w&&w(It)}},e,u*A,m-e-u*A),y&&y(It,r.tween)}}})).pause()),Ge&&(De[Ge]=It),(Fe=(Ze=It.trigger=(0,R._getTarget)(Ze||et))&&Ze._gsap&&Ze._gsap.stRevert)&&(Fe=Fe(It)),et=!0===et?Ze:(0,R._getTarget)(et),J(Xe)&&(Xe={targets:Ze,className:Xe}),et&&(!1===it||it===pe||(it=!(!it&&"flex"===ge(et.parentNode).display)&&he),It.pin=et,!1!==t.force3D&&n.set(et,{force3D:!0}),(u=n.core.getCache(et)).spacer?P=u.pinState:(gt&&((gt=(0,R._getTarget)(gt))&&!gt.nodeType&&(gt=gt.current||gt.nativeElement),u.spacerIsNative=!!gt,gt&&(u.spacerState=rt(gt))),u.spacer=j=gt||a.createElement("div"),j.classList.add("pin-spacer"),Ge&&j.classList.add("pin-spacer-"+Ge),u.pinState=P=rt(et)),It.spacer=j=u.spacer,ue=ge(et),ie=ue[it+bt.os2],z=n.getProperty(et),$=n.quickSetter(et,bt.a,me),tt(et,j,ue),D=rt(et)),At){x=te(At)?ve(At,Ce):Ce,E=Ie("scroller-start",Ge,wt,bt,x,0),C=Ie("scroller-end",Ge,wt,bt,x,0,E),q=E["offset"+bt.op.d2];var Ut=(0,R._getTarget)((0,R._getProxyProp)(wt,"content")||wt);T=this.markerStart=Ie("start",Ge,Ut,bt,x,q,0,vt),k=this.markerEnd=Ie("end",Ge,Ut,bt,x,q,0,vt),vt&&(je=n.quickSetter([T,k],bt.a,me)),Et||R._proxies.length&&!0===(0,R._getProxyProp)(wt,"fixedMarkers")||(We=ge(ze=kt?l:wt).position,ze.style.position="absolute"===We||"fixed"===We?We:"relative",n.set([E,C],{force3D:!0}),oe=n.quickSetter(E,bt.a,me),le=n.quickSetter(C,bt.a,me))}if(vt){var Bt=vt.vars.onUpdate,jt=vt.vars.onUpdateParams;vt.eventCallback("onUpdate",(function(){It.update(0,0,1),Bt&&Bt.apply(jt||[])}))}It.previous=function(){return Le[Le.indexOf(It)-1]},It.next=function(){return Le[Le.indexOf(It)+1]},It.revert=function(e){var t=!1!==e||!It.enabled,n=m;t!==It.isReverted&&(t&&(It.scroll.rec||!m||!M||(It.scroll.rec=Rt()),Re=Math.max(Rt(),It.scroll.rec||0),Me=It.progress,Be=i&&i.progress()),T&&[T,k,E,C].forEach((function(e){return e.style.display=t?"none":"block"})),t&&(m=1),It.update(t),m=n,et&&(t?function(e,t,i){nt(i);var n=e._gsap;if(n.spacerIsNative)nt(n.spacerState);else if(e.parentNode===t){var r=t.parentNode;r&&(r.insertBefore(e,t),r.removeChild(t))}}(et,j,P):(!mt||!It.isActive)&&tt(et,j,ge(et),ne)),It.isReverted=t)},It.refresh=function(s,a){if(!m&&It.enabled||a)if(et&&s&&F)Se(e,"scrollEnd",qe);else{!M&&Ot&&Ot(It),m=1,Nt=B(),r.tween&&(r.tween.kill(),r.tween=0),we&&we.pause(),ot&&i&&i.time(-.01,!0).invalidate(),It.isReverted||It.revert();for(var o,u,c,d,h,p,g,y,w,x,I=Lt(),L=Dt(),N=vt?vt.duration():K(wt,bt),U=0,H=0,q=t.end,W=t.endTrigger||Ze,V=t.start||(0!==t.start&&Ze?et?"0 0":"0 100%":0),$=It.pinnedContainer=t.pinnedContainer&&(0,R._getTarget)(t.pinnedContainer),G=Ze&&Math.max(0,Le.indexOf(It))||0,Y=G;Y--;)(p=Le[Y]).end||p.refresh(0,1)||(m=1),!(g=p.pin)||g!==Ze&&g!==et||p.isReverted||(x||(x=[]),x.unshift(p),p.revert()),p!==Le[Y]&&(G--,Y--);for(Z(V)&&(V=V(It)),_=at(V,Ze,I,bt,Rt(),T,E,It,L,Pt,Et,N,vt)||(et?-.001:0),Z(q)&&(q=q(It)),J(q)&&!q.indexOf("+=")&&(~q.indexOf(" ")?q=(J(V)?V.split(" ")[0]:"")+q:(U=Pe(q.substr(2),I),q=J(V)?V:_+U,W=Ze)),b=Math.max(_,at(q||(W?"100% 0":N),W,I,bt,Rt()+U,k,C,It,L,Pt,Et,N,vt))||-.001,A=b-_||(_-=.01)&&.001,U=0,Y=G;Y--;)(g=(p=Le[Y]).pin)&&p.start-p._pinPush<_&&!vt&&p.end>0&&(o=p.end-p.start,g!==Ze&&g!==$||ee(V)||(U+=o*(1-p.progress)),g===et&&(H+=o));if(_+=U,b+=U,It._pinPush=H,T&&U&&((o={})[bt.a]="+="+U,$&&(o[bt.p]="-="+Rt()),n.set([T,k],o)),et)o=ge(et),d=bt===R._vertical,c=Rt(),X=parseFloat(z(bt.a))+H,!N&&b>1&&((kt?l:wt).style["overflow-"+bt.a]="scroll"),tt(et,j,o),D=rt(et),u=ye(et,!0),y=Et&&(0,R._getScrollFunc)(wt,d?R._horizontal:R._vertical)(),it&&((ne=[it+bt.os2,A+H+me]).t=j,(Y=it===he?_e(et,bt)+A+H:0)&&ne.push(bt.d,Y+me),nt(ne),Et&&Rt(Re)),Et&&((h={top:u.top+(d?c-_:y)+me,left:u.left+(d?y:c-_)+me,boxSizing:"border-box",position:"fixed"}).width=h.maxWidth=Math.ceil(u.width)+me,h.height=h.maxHeight=Math.ceil(u.height)+me,h.margin=h.marginTop=h.marginRight=h.marginBottom=h.marginLeft="0",h.padding=o.padding,h.paddingTop=o.paddingTop,h.paddingRight=o.paddingRight,h.paddingBottom=o.paddingBottom,h.paddingLeft=o.paddingLeft,O=function(e,t,i){for(var n,r=[],s=e.length,a=i?8:0;a<s;a+=2)n=e[a],r.push(n,n in t?t[n]:e[a+1]);return r.t=e.t,r}(P,h,mt)),i?(w=i._initted,S(1),i.render(i.duration(),!0,!0),Q=z(bt.a)-X+A+H,A!==Q&&Et&&O.splice(O.length-2,2),i.render(0,!0,!0),w||i.invalidate(),S(0)):Q=A;else if(Ze&&Rt()&&!vt)for(u=Ze.parentNode;u&&u!==l;)u._pinOffset&&(_-=u._pinOffset,b-=u._pinOffset),u=u.parentNode;x&&x.forEach((function(e){return e.revert(!1)})),It.start=_,It.end=b,f=v=Rt(),vt||(f<Re&&Rt(Re),It.scroll.rec=0),It.revert(!1),Oe&&(Mt=-1,It.isActive&&Rt(_+A*Me),Oe.restart(!0)),m=0,i&&Tt&&(i._initted||Be)&&i.progress()!==Be&&i.progress(Be,!0).render(i.time(),!0,!0),(Me!==It.progress||vt)&&(i&&!Tt&&i.totalProgress(Me,!0),It.progress=Me,It.update(0,0,1)),et&&it&&(j._pinOffset=Math.round(It.progress*Q)),Ke&&Ke(It)}},It.getVelocity=function(){return(Rt()-v)/(B()-p)*1e3||0},It.endAnimation=function(){re(It.callbackAnimation),i&&(we?we.progress(1):i.paused()?Tt||re(i,It.direction<0,1):re(i,i.reversed()))},It.labelToScroll=function(e){return i&&i.labels&&(_||It.refresh()||_)+i.labels[e]/i.duration()*A||0},It.getTrailing=function(e){var t=Le.indexOf(It),i=It.direction>0?Le.slice(0,t).reverse():Le.slice(t+1);return(J(e)?i.filter((function(t){return t.vars.preventOverlaps===e})):i).filter((function(e){return It.direction>0?e.end<=_:e.start>=b}))},It.update=function(e,t,n){if(!vt||n||e){var s,a,o,u,c,h,g,y=It.scroll(),T=e?0:(y-_)/A,w=T<0?0:T>1?1:T||0,S=It.progress;if(t&&(v=f,f=vt?Rt():y,ft&&(de=ce,ce=i&&!Tt?i.totalProgress():w)),ct&&!w&&et&&!m&&!U&&F&&_<y+(y-v)/(B()-p)*ct&&(w=1e-4),w!==S&&It.enabled){if(u=(c=(s=It.isActive=!!w&&w<1)!==(!!S&&S<1))||!!w!=!!S,It.direction=w>S?1:-1,It.progress=w,u&&!m&&(a=w&&!S?0:1===w?1:1===S?2:3,Tt&&(o=!c&&"none"!==xt[a+1]&&xt[a+1]||xt[a],g=i&&("complete"===o||"reset"===o||o in i))),_t&&(c||g)&&(g||Je||!i)&&(Z(_t)?_t(It):It.getTrailing(_t).forEach((function(e){return e.endAnimation()}))),Tt||(!we||m||U?i&&i.totalProgress(w,!!m):((vt||N&&N!==It)&&we.render(we._dp._time-we._start),we.resetTo?we.resetTo("totalProgress",w,i._tTime/i._tDur):(we.vars.totalProgress=w,we.invalidate().restart()))),et)if(e&&it&&(j.style[it+bt.os2]=ie),Et){if(u){if(h=!e&&w>S&&b+1>y&&y+1>=K(wt,bt),mt)if(e||!s&&!h)lt(et,j);else{var k=ye(et,!0),C=y-_;lt(et,l,k.top+(bt===R._vertical?C:0)+me,k.left+(bt===R._vertical?0:C)+me)}nt(s||h?O:D),Q!==A&&w<1&&s||$(X+(1!==w||h?0:Q))}}else $(V(X+Q*w));ft&&!r.tween&&!m&&!U&&Oe.restart(!0),Xe&&(c||pt&&w&&(w<1||!I))&&d(Xe.targets).forEach((function(e){return e.classList[s||pt?"add":"remove"](Xe.className)})),$e&&!Tt&&!e&&$e(It),u&&!m?(Tt&&(g&&("complete"===o?i.pause().totalProgress(1):"reset"===o?i.restart(!0).pause():"restart"===o?i.restart(!0):i[o]()),$e&&$e(It)),!c&&I||(Ye&&c&&se(It,Ye),Ct[a]&&se(It,Ct[a]),pt&&(1===w?It.kill(!1,1):Ct[a]=0),c||Ct[a=1===w?1:3]&&se(It,Ct[a])),yt&&!s&&Math.abs(It.getVelocity())>(ee(yt)?yt:2500)&&(re(It.callbackAnimation),we?we.progress(1):re(i,!w,1))):Tt&&$e&&!m&&$e(It)}if(le){var x=vt?y/vt.duration()*(vt._caScrollDist||0):y;oe(x+(E._isFlipped?1:0)),le(x)}je&&je(-y/vt.duration()*(vt._caScrollDist||0))}},It.enable=function(t,i){It.enabled||(It.enabled=!0,Se(wt,"resize",Ue),Se(kt?a:wt,"scroll",Ne),Ot&&Se(e,"refreshInit",Ot),!1!==t&&(It.progress=Me=0,f=v=Mt=Rt()),!1!==i&&It.refresh())},It.getTween=function(e){return e&&r?r.tween:we},It.setPositions=function(e,t){et&&(X+=e-_,Q+=t-e-A),It.start=_=e,It.end=b=t,A=t-e,It.update()},It.disable=function(t,i){if(It.enabled&&(!1!==t&&It.revert(),It.enabled=It.isActive=!1,i||we&&we.pause(),Re=0,u&&(u.uncache=1),Ot&&ke(e,"refreshInit",Ot),Oe&&(Oe.pause(),r.tween&&r.tween.kill()&&(r.tween=0)),!kt)){for(var n=Le.length;n--;)if(Le[n].scroller===wt&&Le[n]!==It)return;ke(wt,"resize",Ue),ke(wt,"scroll",Ne)}},It.kill=function(e,n){It.disable(e,n),we&&!n&&we.kill(),Ge&&delete De[Ge];var r=Le.indexOf(It);r>=0&&Le.splice(r,1),r===y&&Qe>0&&y--,r=0,Le.forEach((function(e){return e.scroller===It.scroller&&(r=1)})),r||(It.scroll.rec=0),i&&(i.scrollTrigger=null,e&&i.render(-1),n||i.kill()),T&&[T,k,E,C].forEach((function(e){return e.parentNode&&e.parentNode.removeChild(e)})),N===It&&(N=0),et&&(u&&(u.uncache=1),r=0,Le.forEach((function(e){return e.pin===et&&r++})),r||(u.spacer=0)),t.onKill&&t.onKill(It)},It.enable(!1,!1),Fe&&Fe(It),i&&i.add&&!A?n.delayedCall(.01,(function(){return _||b||It.refresh()}))&&(A=.01)&&(_=b=0):It.refresh()}else this.update=this.refresh=this.kill=W},e.register=function(t){return r||(n=t||X(),$()&&window.document&&e.enable(),r=H),r},e.defaults=function(e){if(e)for(var t in e)xe[t]=e[t];return xe},e.disable=function(e,t){H=0,Le.forEach((function(i){return i[t?"kill":"disable"](e)})),ke(s,"wheel",Ne),ke(a,"scroll",Ne),clearInterval(f),ke(a,"touchcancel",W),ke(l,"touchstart",W),we(ke,a,"pointerdown,touchstart,mousedown",q),we(ke,a,"pointerup,touchend,mouseup",z),c.kill(),Q(ke);for(var i=0;i<R._scrollers.length;i+=3)Ee(ke,R._scrollers[i],R._scrollers[i+1]),Ee(ke,R._scrollers[i],R._scrollers[i+2])},e.enable=function(){if(s=window,a=document,o=a.documentElement,l=a.body,n&&(d=n.utils.toArray,h=n.utils.clamp,S=n.core.suppressOverwrites||W,n.core.globals("ScrollTrigger",e),l)){H=1,R.Observer.register(n),e.isTouch=R.Observer.isTouch,P=R.Observer.isTouch&&/(iPad|iPhone|iPod|Mac)/g.test(navigator.userAgent),Se(s,"wheel",Ne),u=[s,a,o,l],e.matchMedia({"(orientation: portrait)":function(){return Re(),Re}}),Se(a,"scroll",Ne);var t,i,p=l.style,m=p.borderTopStyle;for(p.borderTopStyle="solid",t=ye(l),R._vertical.m=Math.round(t.top+R._vertical.sc())||0,R._horizontal.m=Math.round(t.left+R._horizontal.sc())||0,m?p.borderTopStyle=m:p.removeProperty("border-top-style"),f=setInterval(Me,250),n.delayedCall(.5,(function(){return U=0})),Se(a,"touchcancel",W),Se(l,"touchstart",W),we(Se,a,"pointerdown,touchstart,mousedown",q),we(Se,a,"pointerup,touchend,mouseup",z),v=n.utils.checkPrefix("transform"),et.push(v),r=B(),c=n.delayedCall(.2,Ye).pause(),T=[a,"visibilitychange",function(){var e=s.innerWidth,t=s.innerHeight;a.hidden?(_=e,b=t):_===e&&b===t||Ue()},a,"DOMContentLoaded",Ye,s,"load",Ye,s,"resize",Ue],Q(Se),Le.forEach((function(e){return e.enable(0,1)})),i=0;i<R._scrollers.length;i+=3)Ee(ke,R._scrollers[i],R._scrollers[i+1]),Ee(ke,R._scrollers[i],R._scrollers[i+2])}},e.config=function(t){"limitCallbacks" in t&&(I=!!t.limitCallbacks);var i=t.syncInterval;i&&clearInterval(f)||(f=i)&&setInterval(Me,i),"ignoreMobileResize" in t&&(C=1===e.isTouch&&t.ignoreMobileResize),"autoRefreshEvents" in t&&(Q(ke)||Q(Se,t.autoRefreshEvents||"none"),k=-1===(t.autoRefreshEvents+"").indexOf("resize"))},e.scrollerProxy=function(e,t){var i=(0,R._getTarget)(e),n=R._scrollers.indexOf(i),r=G(i);~n&&R._scrollers.splice(n,r?6:2),t&&(r?R._proxies.unshift(s,t,l,t,o,t):R._proxies.unshift(i,t))},e.matchMedia=function(e){var t,i,n,r,a;for(i in e)n=Fe.indexOf(i),r=e[i],L=i,"all"===i?r():(t=s.matchMedia(i))&&(t.matches&&(a=r()),~n?(Fe[n+1]=ne(Fe[n+1],r),Fe[n+2]=ne(Fe[n+2],a)):(n=Fe.length,Fe.push(i,r,a),t.addListener?t.addListener(He):t.addEventListener("change",He)),Fe[n+3]=t.matches),L=0;return Fe},e.clearMatchMedia=function(e){e||(Fe.length=0),(e=Fe.indexOf(e))>=0&&Fe.splice(e,4)},e.isInViewport=function(e,t,i){var n=(J(e)?(0,R._getTarget)(e):e).getBoundingClientRect(),r=n[i?ce:de]*t||0;return i?n.right-r>0&&n.left+r<s.innerWidth:n.bottom-r>0&&n.top+r<s.innerHeight},e.positionInViewport=function(e,t,i){J(e)&&(e=(0,R._getTarget)(e));var n=e.getBoundingClientRect(),r=n[i?ce:de],a=null==t?r/2:t in Ae?Ae[t]*r:~t.indexOf("%")?parseFloat(t)*r/100:parseFloat(t)||0;return i?(n.left+a)/s.innerWidth:(n.top+a)/s.innerHeight},e}();ct.version="3.10.4",ct.saveStyles=function(e){return e?d(e).forEach((function(e){if(e&&e.style){var t=We.indexOf(e);t>=0&&We.splice(t,5),We.push(e,e.style.cssText,e.getBBox&&e.getAttribute("transform"),n.core.getCache(e),L)}})):We},ct.revert=function(e,t){return $e(!e,t)},ct.create=function(e,t){return new ct(e,t)},ct.refresh=function(e){return e?Ue():(r||ct.register())&&Ye(!0)},ct.update=Je,ct.clearScrollMemory=Xe,ct.maxScroll=function(e,t){return K(e,t?R._horizontal:R._vertical)},ct.getScrollFunc=function(e,t){return(0,R._getScrollFunc)((0,R._getTarget)(e),t?R._horizontal:R._vertical)},ct.getById=function(e){return De[e]},ct.getAll=function(){return Le.filter((function(e){return"ScrollSmoother"!==e.vars.id}))},ct.isScrolling=function(){return!!F},ct.snapDirectional=Te,ct.addEventListener=function(e,t){var i=Be[e]||(Be[e]=[]);~i.indexOf(t)||i.push(t)},ct.removeEventListener=function(e,t){var i=Be[e],n=i&&i.indexOf(t);n>=0&&i.splice(n,1)},ct.batch=function(e,t){var i,r=[],s={},a=t.interval||.016,o=t.batchMax||1e9,l=function(e,t){var i=[],r=[],s=n.delayedCall(a,(function(){t(i,r),i=[],r=[]})).pause();return function(e){i.length||s.restart(!0),i.push(e.trigger),r.push(e),o<=i.length&&s.progress(1)}};for(i in t)s[i]="on"===i.substr(0,2)&&Z(t[i])&&"onRefreshInit"!==i?l(0,t[i]):t[i];return Z(o)&&(o=o(),Se(ct,"refresh",(function(){return o=t.batchMax()}))),d(e).forEach((function(e){var t={};for(i in s)t[i]=s[i];t.trigger=e,r.push(ct.create(t))})),r};var dt,ht=function(e,t,i,n){return t>n?e(n):t<0&&e(0),i>n?(n-t)/(i-t):i<0?t/(t-i):1},pt=function e(t,i){!0===i?t.style.removeProperty("touch-action"):t.style.touchAction=!0===i?"auto":i?"pan-"+i+(R.Observer.isTouch?" pinch-zoom":""):"none",t===o&&e(l,i)},ft={auto:1,scroll:1},mt=function(e){var t,i=e.event,r=e.target,s=e.axis,a=(i.changedTouches?i.changedTouches[0]:i).target,o=a._gsap||n.core.getCache(a),l=B();if(!o._isScrollT||l-o._isScrollT>2e3){for(;a&&a.scrollHeight<=a.clientHeight;)a=a.parentNode;o._isScroll=a&&!G(a)&&a!==r&&(ft[(t=ge(a)).overflowY]||ft[t.overflowX]),o._isScrollT=l}(o._isScroll||"x"===s)&&(i._gsapAllow=!0)},gt=function(e,t,i,n){return R.Observer.create({target:e,capture:!0,debounce:!1,lockAxis:!0,type:t,onWheel:n=n&&mt,onPress:n,onDrag:n,onScroll:n,onEnable:function(){return i&&Se(a,R.Observer.eventTypes[0],yt,!1,!0)},onDisable:function(){return ke(a,R.Observer.eventTypes[0],yt,!0)}})},vt=/(input|label|select|textarea)/i,yt=function(e){var t=vt.test(e.target.tagName);(t||dt)&&(e._gsapAllow=!0,dt=t)},_t=function(e){te(e)||(e={}),e.preventDefault=e.isNormalizer=e.allowClicks=!0,e.type||(e.type="wheel,touch"),e.debounce=!!e.debounce,e.id=e.id||"normalizer";var t,i,r,a,l,u,c,d,p=e,f=p.normalizeScrollX,m=p.momentum,g=p.allowNestedScroll,v=(0,R._getTarget)(e.target)||o,y=n.core.globals().ScrollSmoother,_=P&&(e.content&&(0,R._getTarget)(e.content)||y&&y.get()&&y.get().content()),b=(0,R._getScrollFunc)(v,R._vertical),T=(0,R._getScrollFunc)(v,R._horizontal),w=1,S=(R.Observer.isTouch&&s.visualViewport?s.visualViewport.scale*s.visualViewport.width:s.outerWidth)/s.innerWidth,k=0,E=Z(m)?function(){return m(t)}:function(){return m||2.8},C=gt(v,e.type,!0,g),x=function(){return r=!1},A=W,I=W,O=function(){i=K(v,R._vertical),I=h(P?1:0,i),f&&(A=h(0,K(v,R._horizontal))),a=Ge},L=function(){O(),l.isActive()&&l.vars.scrollY>i&&(b()>i?l.progress(1)&&b(i):l.resetTo("scrollY",i))};return e.ignoreCheck=function(e){return P&&"touchmove"===e.type&&function(){if(r){requestAnimationFrame(x);var e=V(t.deltaY/2),i=I(b.v-e);return _&&i!==b.v+b.offset&&(b.offset=i-b.v,_.style.transform="translateY("+-b.offset+"px)",_._gsap&&(_._gsap.y=-b.offset+"px"),b.cacheID=R._scrollers.cache,Je()),!0}_&&(_.style.transform="translateY(0px)",b.offset=b.cacheID=0,_._gsap&&(_._gsap.y="0px")),r=!0}()||w>1.05&&"touchstart"!==e.type||t.isGesturing||e.touches&&e.touches.length>1},e.onPress=function(){var e=w;w=V((s.visualViewport&&s.visualViewport.scale||1)/S),l.pause(),e!==w&&pt(v,w>1.01||!f&&"x"),r=!1,u=T(),c=b(),O(),a=Ge},e.onRelease=e.onGestureStart=function(e,t){if(_&&(_.style.transform="translateY(0px)",b.offset=b.cacheID=0,_._gsap&&(_._gsap.y="0px")),t){R._scrollers.cache++;var r,s,a=E();f&&(s=(r=T())+.05*a*-e.velocityX/.227,a*=ht(T,r,s,K(v,R._horizontal)),l.vars.scrollX=A(s)),s=(r=b())+.05*a*-e.velocityY/.227,a*=ht(b,r,s,K(v,R._vertical)),l.vars.scrollY=I(s),l.invalidate().duration(a).play(.01),(P&&l.vars.scrollY>=i||r>=i-1)&&n.to({},{onUpdate:L,duration:a})}else d.restart(!0)},e.onWheel=function(){l._ts&&l.pause(),B()-k>1e3&&(a=0,k=B())},e.onChange=function(e,t,i,n,r){Ge!==a&&O(),t&&f&&T(A(n[2]===t?u+(e.startX-e.x):T()+t-n[1])),i&&b(I(r[2]===i?c+(e.startY-e.y):b()+i-r[1])),Je()},e.onEnable=function(){pt(v,!f&&"x"),Se(s,"resize",L),C.enable()},e.onDisable=function(){pt(v,!0),ke(s,"resize",L),C.kill()},(t=new R.Observer(e)).iOS=P,P&&!b()&&b(1),d=t._dc,l=n.to(t,{ease:"power4",paused:!0,scrollX:f?"+=0.1":"+=0",scrollY:"+=0.1",onComplete:d.vars.onComplete}),t};ct.sort=function(e){return Le.sort(e||function(e,t){return-1e6*(e.vars.refreshPriority||0)+e.start-(t.start+-1e6*(t.vars.refreshPriority||0))})},ct.observe=function(e){return new R.Observer(e)},ct.normalizeScroll=function(e){if(void 0===e)return E;if(!0===e&&E)return E.enable();if(!1===e)return E&&E.kill();var t=e instanceof R.Observer?e:_t(e);return E&&E.target===t.target&&E.kill(),G(t.target)&&(E=t),t},ct.core={_getVelocityProp:R._getVelocityProp,_inputObserver:gt,_scrollers:R._scrollers,_proxies:R._proxies,bridge:{ss:function(){F||ze("scrollStart"),F=B()},ref:function(){return m}}},X()&&n.registerPlugin(ct)},(e,t,i)=>{"use strict";function n(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value" in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}i.r(t),i.d(t,{Observer:()=>F,_getProxyProp:()=>S,_getScrollFunc:()=>M,_getTarget:()=>D,_getVelocityProp:()=>N,_horizontal:()=>O,_isViewport:()=>k,_proxies:()=>b,_scrollers:()=>_,_vertical:()=>L,default:()=>F});var r,s,a,o,l,u,c,d,h,p,f,m,g=function(){return r||"undefined"!=typeof window&&(r=window.gsap)&&r.registerPlugin&&r},v=1,y=[],_=[],b=[],T=Date.now,w=function(e,t){return t},S=function(e,t){return~b.indexOf(e)&&b[b.indexOf(e)+1][t]},k=function(e){return!!~p.indexOf(e)},E=function(e,t,i,n,r){return e.addEventListener(t,i,{passive:!n,capture:!!r})},C=function(e,t,i,n){return e.removeEventListener(t,i,!!n)},x="scrollLeft",A="scrollTop",P=function(){return f&&f.isPressed||_.cache++},I=function(e,t){var i=function i(n){if(n||0===n){v&&(a.history.scrollRestoration="manual");var r=f&&f.isPressed;n=i.v=Math.round(n)||(f&&f.iOS?1:0),e(n),i.cacheID=_.cache,r&&w("ss",n)}else(t||_.cache!==i.cacheID||w("ref"))&&(i.cacheID=_.cache,i.v=e());return i.v+i.offset};return i.offset=0,e&&i},O={s:x,p:"left",p2:"Left",os:"right",os2:"Right",d:"width",d2:"Width",a:"x",sc:I((function(e){return arguments.length?a.scrollTo(e,L.sc()):a.pageXOffset||o.scrollLeft||l.scrollLeft||u.scrollLeft||0}))},L={s:A,p:"top",p2:"Top",os:"bottom",os2:"Bottom",d:"height",d2:"Height",a:"y",op:O,sc:I((function(e){return arguments.length?a.scrollTo(O.sc(),e):a.pageYOffset||o.scrollTop||l.scrollTop||u.scrollTop||0}))},D=function(e){return r.utils.toArray(e)[0]||("string"==typeof e&&!1!==r.config().nullTargetWarn?console.warn("Element not found:",e):null)},M=function(e,t){var i=t.s,n=t.sc,r=_.indexOf(e),s=n===L.sc?1:2;return!~r&&(r=_.push(e)-1),_[r+s]||(_[r+s]=I(S(e,i),!0)||(k(e)?n:I((function(t){return arguments.length?e[i]=t:e[i]}))))},N=function(e,t,i){var n=e,r=e,s=T(),a=s,o=t||50,l=Math.max(500,3*o),u=function(e,t){var l=T();t||l-s>o?(r=n,n=e,a=s,s=l):i?n+=e:n=r+(e-r)/(l-a)*(s-a)};return{update:u,reset:function(){r=n=i?0:n,a=s=0},getVelocity:function(e){var t=a,o=r,c=T();return(e||0===e)&&e!==n&&u(e),s===a||c-a>l?0:(n+(i?o:-o))/((i?c:s)-t)*1e3}}},R=function(e,t){return t&&!e._gsapAllow&&e.preventDefault(),e.changedTouches?e.changedTouches[0]:e},U=function(e){var t=Math.max.apply(Math,e),i=Math.min.apply(Math,e);return Math.abs(t)>=Math.abs(i)?t:i},B=function(){var e,t,i,n;(h=r.core.globals().ScrollTrigger)&&h.core&&(e=h.core,t=e.bridge||{},i=e._scrollers,n=e._proxies,i.push.apply(i,_),n.push.apply(n,b),_=i,b=n,w=function(e,i){return t[e](i)})},j=function(e){return(r=e||g())&&"undefined"!=typeof document&&document.body&&(a=window,o=document,l=o.documentElement,u=o.body,p=[a,o,l,u],r.utils.clamp,d="onpointerenter" in u?"pointer":"mouse",c=F.isTouch=a.matchMedia&&a.matchMedia("(hover: none), (pointer: coarse)").matches?1:"ontouchstart" in a||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0?2:0,m=F.eventTypes=("ontouchstart" in l?"touchstart,touchmove,touchcancel,touchend":"onpointerdown" in l?"pointerdown,pointermove,pointercancel,pointerup":"mousedown,mousemove,mouseup,mouseup").split(","),setTimeout((function(){return v=0}),500),B(),s=1),s};O.op=L,_.cache=0;var F=function(){function e(e){this.init(e)}var t,i,p;return e.prototype.init=function(e){s||j(r)||console.warn("Please gsap.registerPlugin(Observer)"),h||B();var t=e.tolerance,i=e.dragMinimum,n=e.type,p=e.target,g=e.lineHeight,v=e.debounce,_=e.preventDefault,b=e.onStop,w=e.onStopDelay,S=e.ignore,x=e.wheelSpeed,A=e.event,I=e.onDragStart,F=e.onDragEnd,H=e.onDrag,q=e.onPress,z=e.onRelease,W=e.onRight,V=e.onLeft,$=e.onUp,X=e.onDown,G=e.onChangeX,Y=e.onChangeY,K=e.onChange,Q=e.onToggleX,J=e.onToggleY,Z=e.onHover,ee=e.onHoverEnd,te=e.onMove,ie=e.ignoreCheck,ne=e.isNormalizer,re=e.onGestureStart,se=e.onGestureEnd,ae=e.onWheel,oe=e.onEnable,le=e.onDisable,ue=e.onClick,ce=e.scrollSpeed,de=e.capture,he=e.allowClicks,pe=e.lockAxis,fe=e.onLockAxis;this.target=p=D(p)||l,this.vars=e,S&&(S=r.utils.toArray(S)),t=t||0,i=i||0,x=x||1,ce=ce||1,n=n||"wheel,touch,pointer",v=!1!==v,g||(g=parseFloat(a.getComputedStyle(u).lineHeight)||22);var me,ge,ve,ye,_e,be,Te,we=this,Se=0,ke=0,Ee=M(p,O),Ce=M(p,L),xe=Ee(),Ae=Ce(),Pe=~n.indexOf("touch")&&!~n.indexOf("pointer")&&"pointerdown"===m[0],Ie=k(p),Oe=p.ownerDocument||o,Le=[0,0,0],De=[0,0,0],Me=0,Ne=function(){return Me=T()},Re=function(e,t){return(we.event=e)&&S&&~S.indexOf(e.target)||t&&Pe&&"touch"!==e.pointerType||ie&&ie(e,t)},Ue=function(){var e=we.deltaX=U(Le),i=we.deltaY=U(De),n=Math.abs(e)>=t,r=Math.abs(i)>=t;K&&(n||r)&&K(we,e,i,Le,De),n&&(W&&we.deltaX>0&&W(we),V&&we.deltaX<0&&V(we),G&&G(we),Q&&we.deltaX<0!=Se<0&&Q(we),Se=we.deltaX,Le[0]=Le[1]=Le[2]=0),r&&(X&&we.deltaY>0&&X(we),$&&we.deltaY<0&&$(we),Y&&Y(we),J&&we.deltaY<0!=ke<0&&J(we),ke=we.deltaY,De[0]=De[1]=De[2]=0),(ye||ve)&&(te&&te(we),fe&&be&&fe(we),ve&&(H(we),ve=!1),ye=be=!1),_e&&(ae(we),_e=!1),me=0},Be=function(e,t,i){Le[i]+=e,De[i]+=t,we._vx.update(e),we._vy.update(t),v?me||(me=requestAnimationFrame(Ue)):Ue()},je=function(e,t){"y"!==Te&&(Le[2]+=e,we._vx.update(e,!0)),"x"!==Te&&(De[2]+=t,we._vy.update(t,!0)),pe&&!Te&&(we.axis=Te=Math.abs(e)>Math.abs(t)?"x":"y",be=!0),v?me||(me=requestAnimationFrame(Ue)):Ue()},Fe=function(e){if(!Re(e,1)){var t=(e=R(e,_)).clientX,n=e.clientY,r=t-we.x,s=n-we.y,a=we.isDragging;we.x=t,we.y=n,(a||Math.abs(we.startX-t)>=i||Math.abs(we.startY-n)>=i)&&(H&&(ve=!0),a||(we.isDragging=!0),je(r,s),a||I&&I(we))}},He=we.onPress=function(e){Re(e,1)||(we.axis=Te=null,ge.pause(),we.isPressed=!0,e=R(e),Se=ke=0,we.startX=we.x=e.clientX,we.startY=we.y=e.clientY,we._vx.reset(),we._vy.reset(),E(ne?p:Oe,m[1],Fe,_,!0),we.deltaX=we.deltaY=0,q&&q(we))},qe=function(e){if(!Re(e,1)){C(ne?p:Oe,m[1],Fe,!0);var t=we.isDragging&&(Math.abs(we.x-we.startX)>3||Math.abs(we.y-we.startY)>3),i=R(e);t||(we._vx.reset(),we._vy.reset(),_&&he&&r.delayedCall(.08,(function(){if(T()-Me>300&&!e.defaultPrevented)if(e.target.click)e.target.click();else if(Oe.createEvent){var t=Oe.createEvent("MouseEvents");t.initMouseEvent("click",!0,!0,a,1,i.screenX,i.screenY,i.clientX,i.clientY,!1,!1,!1,!1,0,null),e.target.dispatchEvent(t)}}))),we.isDragging=we.isGesturing=we.isPressed=!1,b&&!ne&&ge.restart(!0),F&&t&&F(we),z&&z(we,t)}},ze=function(e){return e.touches&&e.touches.length>1&&(we.isGesturing=!0)&&re(e,we.isDragging)},We=function(){return(we.isGesturing=!1)||se(we)},Ve=function(e){if(!Re(e)){var t=Ee(),i=Ce();Be((t-xe)*ce,(i-Ae)*ce,1),xe=t,Ae=i,b&&ge.restart(!0)}},$e=function(e){if(!Re(e)){e=R(e,_),ae&&(_e=!0);var t=(1===e.deltaMode?g:2===e.deltaMode?a.innerHeight:1)*x;Be(e.deltaX*t,e.deltaY*t,0),b&&!ne&&ge.restart(!0)}},Xe=function(e){if(!Re(e)){var t=e.clientX,i=e.clientY,n=t-we.x,r=i-we.y;we.x=t,we.y=i,ye=!0,(n||r)&&je(n,r)}},Ge=function(e){we.event=e,Z(we)},Ye=function(e){we.event=e,ee(we)},Ke=function(e){return Re(e)||R(e,_)&&ue(we)};ge=we._dc=r.delayedCall(w||.25,(function(){we._vx.reset(),we._vy.reset(),ge.pause(),b&&b(we)})).pause(),we.deltaX=we.deltaY=0,we._vx=N(0,50,!0),we._vy=N(0,50,!0),we.scrollX=Ee,we.scrollY=Ce,we.isDragging=we.isGesturing=we.isPressed=!1,we.enable=function(e){return we.isEnabled||(E(Ie?Oe:p,"scroll",P),n.indexOf("scroll")>=0&&E(Ie?Oe:p,"scroll",Ve,_,de),n.indexOf("wheel")>=0&&E(p,"wheel",$e,_,de),(n.indexOf("touch")>=0&&c||n.indexOf("pointer")>=0)&&(E(p,m[0],He,_,de),E(Oe,m[2],qe),E(Oe,m[3],qe),he&&E(p,"click",Ne,!1,!0),ue&&E(p,"click",Ke),re&&E(Oe,"gesturestart",ze),se&&E(Oe,"gestureend",We),Z&&E(p,d+"enter",Ge),ee&&E(p,d+"leave",Ye),te&&E(p,d+"move",Xe)),we.isEnabled=!0,e&&e.type&&He(e),oe&&oe(we)),we},we.disable=function(){we.isEnabled&&(y.filter((function(e){return e!==we&&k(e.target)})).length||C(Ie?Oe:p,"scroll",P),we.isPressed&&(we._vx.reset(),we._vy.reset(),C(ne?p:Oe,m[1],Fe,!0)),C(Ie?Oe:p,"scroll",Ve,de),C(p,"wheel",$e,de),C(p,m[0],He,de),C(Oe,m[2],qe),C(Oe,m[3],qe),C(p,"click",Ne,!0),C(p,"click",Ke),C(Oe,"gesturestart",ze),C(Oe,"gestureend",We),C(p,d+"enter",Ge),C(p,d+"leave",Ye),C(p,d+"move",Xe),we.isEnabled=we.isPressed=we.isDragging=!1,le&&le(we))},we.kill=function(){we.disable();var e=y.indexOf(we);e>=0&&y.splice(e,1),f===we&&(f=0)},y.push(we),ne&&k(p)&&(f=we),we.enable(A)},t=e,(i=[{key:"velocityX",get:function(){return this._vx.getVelocity()}},{key:"velocityY",get:function(){return this._vy.getVelocity()}}])&&n(t.prototype,i),p&&n(t,p),e}();F.version="3.10.4",F.create=function(e){return new F(e)},F.register=j,F.getAll=function(){return y.slice()},F.getById=function(e){return y.filter((function(t){return t.vars.id===e}))[0]},g()&&r.registerPlugin(F)},(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>s});var n=i(61),r=i.n(n);const s={init:function(){setTimeout((function(){r()(".sp-loadmore").on("click",(function(){0!==r()(".loadmore-parent").length&&(r()(this).parent(".loadmore-block").nextAll().css("display","flex"),r()(this).parent(".loadmore-block").hide())}))}),500)}}},(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>s});var n=i(61),r=i.n(n);i(64);const s={init:function(){const e=r()(".image-grid-module"),t=r()(".progress-carousel");0!==e.length&&t.slick({infinite:!1,slidesToShow:3,slidesToScroll:3,responsive:[{breakpoint:992,settings:{slidesToShow:1,slidesToScroll:1,dots:!0}},{breakpoint:600,settings:{slidesToShow:1,slidesToScroll:1,dots:!0}}]})}}},(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>s});var n=i(61),r=i.n(n);const s={init:function(){setTimeout((function(){r()(".imgReveal").length&&r()(".imgReveal").each((function(e){var t=r()(this),i=r()(window).scrollTop(),n=i+r()(window).height(),s=t.offset().top,a=s+t.height();n>s&&i<a&&(t.hasClass("doReveal")||t.addClass("doReveal").delay(1500).addClass("hover-ready")),r()(window).on("scroll",(function(){i=r()(window).scrollTop(),n=i+r()(window).height(),s=t.offset().top,a=s+t.height(),n>s&&i<a&&(t.hasClass("doReveal")||t.addClass("doReveal").delay(1500).addClass("hover-ready"))}))}))}),800)}}},(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>s});var n=i(61),r=i.n(n);i(64);const s={init:function(){const e=r()(".qc-slide");0!==e.length&&e.slick({infinite:!0,slidesToShow:1,slidesToScroll:1,dots:!1,arrows:!1,autoplay:!0,autoplaySpeed:5e3,speed:1e3,pauseOnFocus:!1,pauseOnHover:!1,rtl:!0})}}},(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>o});var n=i(61),r=i.n(n),s=i(116),a=i(119);s.gsap.registerPlugin(a.default);const o={init:function(){setTimeout((function(){0!==r()(".client-logos").length&&a.default.create({trigger:".client-logos",start:"top center",toggleClass:{className:"reached",targets:".logos-wrap"},markers:!1,once:!0})}),1500)}}},(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>s});var n=i(61),r=i.n(n);const s={init:function(){r()(".tags-column").each((function(e,t){var i=t.getAttribute("data-tags-count");if("5"==i)r()(this).addClass("five-rows");else if("4"==i){r()(this).addClass("four-rows");var n=r()(this).children().length;r()(window).width()<1200&&n>8&&r()(this).addClass("show-eight")}else if("3"==i){r()(this).addClass("three-rows");n=r()(this).children().length;r()(window).width()<1200?n>6&&r()(this).addClass("show-six"):n>9&&r()(this).addClass("show-nine")}else{n=r()(this).children().length;r()(window).width()<1200?n>4&&r()(this).addClass("show-four"):n>6&&r()(this).addClass("show-six")}})),console.log("scripts loaded - v5")}}},(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>a});var n=i(61),r=i.n(n),s=i(123);const a={init:function(){r()(document).ready((function(){localStorage.clear()})),r()(".thought-leadership-loadmore").click((function(){null==localStorage.getItem("ThoughtLeadershipData")&&r().ajax({type:"GET",url:"/umbraco/surface/ThoughtLeadershipLisiting",async:!1,success:function(e){localStorage.setItem("ThoughtLeadershipData",e)}});var e=JSON.parse(localStorage.getItem("ThoughtLeadershipData"));e=e.filter((function(e){return null!==e})),localStorage.clear(),localStorage.setItem("ThoughtLeadershipData",JSON.stringify(e));for(var t="",i=!1,n=0;n<e.length;n++)if(null!=e[n]){var a;for(var o in e)e.hasOwnProperty(o)&&(a=o);if(0!=n&&3!=n&&5!=n||(t+="<div class='container'> <div class='row case-two-blk-small'>"),0==n&&(t+="<div class='offset-lg-4 offset-md-4 col-lg-4 col-md-4 col-xs-12 column-grid lazyload'> <div class='case-img imgReveal ' ><a href='"+e[n].ThoughtLeadershipUrl+"'> <picture><source srcset='"+e[n].TeaserBigImageUrl+"'  media='(min - width: 992px)'> <img src='"+e[n].TeaserImageUrl+"' alt='"+e[n].TeaserImageAlt+"'/></picture></a> </div><div class='case-content'> <p>"+e[n].TeaserTitle+"</p><p class='desc'>"+e[n].TeaserDescription+"</p></div><div class='case-content'> <a href='"+e[n].ThoughtLeadershipUrl+"' class='see-more-btn-small'>Read more</a> </div></div>",e[n]==e[a])){i=!0,t+="</div></div>";break}if(1==n){if(t+="<div class='col-lg-4 col-md-4 col-lg-4 col-md-4 col-xs-12 column-grid lazyload'> <div class='case-img imgReveal ' ><a href='"+e[n].ThoughtLeadershipUrl+"'> <picture><source srcset='"+e[n].TeaserBigImageUrl+"'  media='(min - width: 992px)'> <img src='"+e[n].TeaserImageUrl+"' alt='"+e[n].TeaserImageAlt+"'/></picture></a> </div><div class='case-content'> <p>"+e[n].TeaserTitle+"</p><p class='desc'>"+e[n].TeaserDescription+"</p></div><div class='case-content'> <a href='"+e[n].ThoughtLeadershipUrl+"' class='see-more-btn-small'>Read more</a> </div></div>",e[n]==e[a]){i=!0,t+="</div></div>";break}t+="</div></div>"}if(2==n&&(t+="<div class='container'> <div class='row g-0 case-full-length case-left-img'> <div class='col-lg-8 col-md-7 col-xs-12 lazyload'> <div class='case-img imgReveal ' ><a href='"+e[n].ThoughtLeadershipUrl+"'> <picture><source srcset='"+e[n].TeaserBigImageUrl+"'  media='(min - width: 992px)'> <img src='"+e[n].TeaserImageUrl+"' alt='"+e[n].TeaserImageAlt+"'/></picture> <a href='"+e[n].ThoughtLeadershipUrl+"'></a></div></div><div class='col-lg-4 col-md-5 col-xs-12'> <div class='case-link'> <p>"+e[n].TeaserTitle+"</p><p class='desc'>"+e[n].TeaserDescription+"</p><a href='"+e[n].ThoughtLeadershipUrl+"' class='see-more-btn-small'>Read more</a> </div></div></div></div>",e[n]==e[a])){i=!0;break}if((3==n||4==n||5==n||6==n||7==n)&&(t+="<div class='col-lg-4 col-md-4 col-xs-12 column-grid lazyload'> <div class='case-img imgReveal ' ><a href='"+e[n].ThoughtLeadershipUrl+"'> <picture><source srcset='"+e[n].TeaserBigImageUrl+"'  media='(min - width: 992px)'> <img src='"+e[n].TeaserImageUrl+"' alt='"+e[n].TeaserImageAlt+"'/></picture></a> </div><div class='case-content'> <p>"+e[n].TeaserTitle+"</p><p class='desc'>"+e[n].TeaserDescription+"</p></div><div class='case-content'> <a href='"+e[n].ThoughtLeadershipUrl+"' class='see-more-btn-small'>Read more</a> </div></div>",e[n]==e[a])){i=!0,t+="</div></div>";break}if(4==n||7==n){if(e[n]==e[a]){i=!0,t+="</div></div>";break}t+="</div></div>"}n<=7&&delete e[n]}r()(".thoughtLeadeshipDiv").append(t),setTimeout((function(){r()(".lazyload").addClass("loadedd")}),500),setTimeout((function(){s.default.init()}),10),i&&r()(".loadmore-block").hide(),localStorage.clear(),e=e.filter((function(e){return null!==e})),localStorage.setItem("ThoughtLeadershipData",JSON.stringify(e))}))}}},(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>a});var n=i(61),r=i.n(n),s=i(123);const a={init:function(){r()(document).ready((function(){localStorage.clear()})),r()(".casestudy-loadmore").click((function(){null==localStorage.getItem("CaseStudyData")&&r().ajax({type:"GET",url:"/umbraco/surface/CaseStudyLisiting",async:!1,success:function(e){localStorage.setItem("CaseStudyData",e)}});var e=JSON.parse(localStorage.getItem("CaseStudyData"));console.log(e),e=e.filter((function(e){return null!==e})),localStorage.clear(),localStorage.setItem("CaseStudyData",JSON.stringify(e));for(var t="",i=!1,n=0;n<e.length;n++)if(null!=e[n]){var a;for(var o in e)e.hasOwnProperty(o)&&(a=o);if(0!=n&&3!=n||(t+="<div class='container'> <div class='row case-two-block'> "),(0==n||1==n||3==n||4==n)&&(t+="<div class='col-lg-6 col-md-6 col-xs-12 column-grid lazyload'> <div class='case-img imgReveal'><a href='"+e[n].ThoughtLeadershipUrl+"'><picture><source srcset='"+e[n].TeaserBigImageUrl+"'  media='(min - width: 992px)'> <img src='"+e[n].TeaserImageUrl+"' alt='"+e[n].TeaserImageAlt+"'/></picture></a> </div><div class='case-content'> <p>"+e[n].TeaserTitle+"</p><p class='desc'>"+e[n].TeaserDescription+"</p></div><div class='case-content'><a href='"+e[n].ThoughtLeadershipUrl+"' class='see-more-btn-small'>Read more</a> </div></div>",e[n]==e[a])){i=!0,t+="</div></div>";break}if(1!=n&&4!=n||(t+="</div></div>"),2==n&&(t+="<div class='container'><div class='row g-0 case-full-length case-right-img'> <div class='col-lg-4 col-md-5 col-xs-12 right-img-txt'> <div class='case-link'> <p>"+e[n].TeaserTitle+"</p><p class='desc'>"+e[n].TeaserDescription+"</p><a href='"+e[n].ThoughtLeadershipUrl+"' class='see-more-btn-small'>Read more</a> </div></div><div class='col-lg-8 col-md-7 col-xs-12 right-img-img lazyload'> <div class='case-img imgReveal'><a href='"+e[n].ThoughtLeadershipUrl+"'> <picture><source srcset='"+e[n].TeaserBigImageUrl+"'  media='(min - width: 992px)'> <img src='"+e[n].TeaserImageUrl+"' alt='"+e[n].TeaserImageAlt+"'/></picture></a> </div></div></div></div>",e[n]==e[a])){i=!0;break}if(5==n&&(t+="<div class='container'> <div class='row g-0 case-full-length case-left-img'> <div class='col-lg-8 col-md-7 col-xs-12 lazyload'> <div class='case-img imgReveal'><a href='"+e[n].ThoughtLeadershipUrl+"'> <picture><source srcset='"+e[n].TeaserBigImageUrl+"'  media='(min - width: 992px)'> <img src='"+e[n].TeaserImageUrl+"' alt='"+e[n].TeaserImageAlt+"'/></picture></a> </div></div><div class='col-lg-4 col-md-5 col-xs-12'> <div class='case-link'> <p>"+e[n].TeaserTitle+"</p><p class='desc'>"+e[n].TeaserDescription+"</p><a href='"+e[n].ThoughtLeadershipUrl+"' class='see-more-btn-small'>Read more</a> </div></div></div></div>",e[n]==e[a])){i=!0;break}n<=5&&delete e[n]}r()(".CaseStudyDiv").append(t),setTimeout((function(){r()(".lazyload").addClass("loadedd")}),500),setTimeout((function(){s.default.init()}),10),i&&r()(".loadmore-block").hide(),localStorage.clear(),e=e.filter((function(e){return null!==e})),localStorage.setItem("CaseStudyData",JSON.stringify(e))}))}}},(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>a});var n=i(61),r=i.n(n),s=i(123);const a={init:function(){r()(document).ready((function(){localStorage.clear()})),r()(".PeopleLoadMore").click((function(){var e=r()(this).attr("data-key");null==localStorage.getItem("PeoplesData"+e)&&r().ajax({type:"GET",url:"/umbraco/surface/PeopleListing",data:{key:e},async:!1,success:function(t){JSON.parse(t),localStorage.setItem("PeoplesData"+e,JSON.parse(t))},error:function(e,t){location.reload()}});var t=JSON.parse(localStorage.getItem("PeoplesData"+e));t=t.filter((function(e){return null!==e})),localStorage.setItem("PeoplesData"+e,JSON.stringify(t));for(var i="",n="",a=!1,o=0;o<t.length;o++)if(null!=t[o]){var l;for(var u in t)t.hasOwnProperty(u)&&(l=u);if(0==o?n=" col-lg-6":1==o?n=" col-lg-4 offset-lg-1":2==o?n=" col-lg-6 offset-lg-2":3==o?n=" col-lg-4 offset-lg-4":4==o&&(n=" col-lg-4"),i+=" <div class='col-12 card-block"+n+"'> <div class='img-block imgReveal'> <picture> <img src='"+t[o].PeopleImageSource+"' alt='"+t[o].PeopleImageAlt+"'> </picture> </div><div class='content-block'> <h3 class='sub-title'>"+t[o].PeopleName+"</h3> <span class='designation'>"+t[o].Designation+"</span> <p>"+t[o].Description+"</p></div></div>",t[o]==t[l]){a=!0;break}if(o<=4&&delete t[o],4==o)break}var c=r()(this).parent().parent().parent().closest(".container").children(".peopleDiv");r()(c).append(i),setTimeout((function(){r()(".lazyload").addClass("loadedd")}),500),setTimeout((function(){s.default.init()}),10),a&&r()(this).parent().parent().hide(),t=t.filter((function(e){return null!==e})),localStorage.setItem("PeoplesData"+e,JSON.stringify(t))}))}}},(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>s});var n=i(61),r=i.n(n);const s={init:function(){r()(document).ready((function(){r()("span").hasClass("umbraco-forms-submitmessage")&&r()("html, body").animate({scrollTop:r()(".umbraco-forms-submitmessage").offset().top-100},2e3),r()("span").hasClass("field-validation-error")&&r()("html, body").animate({scrollTop:r()(".umbraco-forms-caption").offset().top-100},2e3)}))}}}],t={};function i(n){var r=t[n];if(void 0!==r)return r.exports;var s=t[n]={exports:{}};return e[n].call(s.exports,s,s.exports,i),s.exports}i.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return i.d(t,{a:t}),t},i.d=(e,t)=>{for(var n in t)i.o(t,n)&&!i.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};(()=>{"use strict";i.r(n);i(1),i(60);var e=i(61),t=i.n(e),r=i(62),s=i.n(r),a=i(116),o=i(119),l=i(63),u=i(65),c=i(114),d=i(115),h=i(121),p=i(122),f=i(123),m=i(124),g=i(125),v=i(126),y=i(127),_=i(128),b=i(129),T=i(130);s().init({sync:!0,requestError:(e,t,i,n)=>{"click"===t&&s().force(s().url.parse(i).path)},transitions:[{async leave(e){const t=this.async();var i,n;(i=a.gsap.timeline()).to(".transition-folder",{duration:.5,scaleX:1,transformOrigin:"top left",stagger:.2}),i.to(".transition-folder",{duration:.5,scaleX:0,transformOrigin:"top right",stagger:.1}),await(n=500,n=n||2e3,new Promise((e=>{setTimeout((()=>{e()}),n)}))),t()},async beforeEnter(){},async enter(e){a.gsap.fromTo(".contentAnimation",{autoAlpha:0},{autoAlpha:1}),o.default.getAll().forEach((e=>e.kill(!1))),o.default.refresh(),window.dispatchEvent(new Event("resize"))}}],views:[{namespace:"global",afterEnter(e){h.default.init(),f.default.init(),l.default.init(),c.default.init(),g.default.init(),m.default.init(),p.default.init(),u.default.init(),d.default.init(),v.default.init(),y.default.init(),_.default.init(),b.default.init(),T.default.init()}}]}),s().hooks.before((e=>{})),s().hooks.afterEnter((e=>{})),s().hooks.after((e=>{if(window.location.href.indexOf("#")>-1){var i=window.location.href.split("#")[1];t()("html, body").animate({scrollTop:t()("#"+i).offset().top-100},500)}else t()(window).scrollTop(0);c.default.init(),m.default.init(),p.default.init(),u.default.init(),v.default.init(),y.default.init(),_.default.init(),T.default.init(),b.default.init(),g.default.init(),d.default.init()}))})()})();;;
