/*! For license information please see pages-Article.d11e5b4c.chunk.js.LICENSE.txt */
(window.__LOADABLE_LOADED_CHUNKS__=window.__LOADABLE_LOADED_CHUNKS__||[]).push([[1,5],{"+/+4":function(e,t,n){e.exports=n.p+"static/media/bookmarked-ico.4f99fb37.svg"},"+/7S":function(e,t,n){n("Rvgf")("iterator")},"+BqG":function(e,t,n){var r=n("4wiq"),i=n("RpL+"),a=r({}.hasOwnProperty);e.exports=Object.hasOwn||function(e,t){return a(i(e),t)}},"+K+b":function(e,t,n){var r=n("JHRd");e.exports=function(e){var t=new e.constructor(e.byteLength);return new r(t).set(new r(e)),t}},"+Kib":function(e,t,n){"use strict";n.d(t,"a",(function(){return k})),n.d(t,"b",(function(){return C}));var r,i=n("3mbX"),a=(new Uint8Array([79,112,117,115,72,101,97,100]),function(e){return"string"===typeof e?Object(i.h)(e):e}),o=function(e){e=Object(i.k)(e);for(var t=[],n=0;e.length>n;){var a=e[n],o=0,s=0,u=e[++s];for(s++;128&u;)o=(127&u)<<7,u=e[s],s++;o+=127&u;for(var l=0;l<r.length;l++){var c=r[l],d=c.id,h=c.parser;if(a===d){t.push(h(e.subarray(s,s+o)));break}}n+=o+s}return t};r=[{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 n=e[t.size];t.url=Object(i.c)(e.subarray(t.size+1,t.size+1+n)),t.size+=n}return 32&t.flags&&(t.ocrEsId=e[t.size]<<8|e[t.size+1],t.size+=2),t.descriptors=o(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:o(e.subarray(13))}}},{id:5,parser:function(e){return{tag:5,bytes:e}}},{id:6,parser:function(e){return{tag:6,bytes:e}}}];var s=function e(t,n,r){void 0===r&&(r=!1),n=function(e){return Array.isArray(e)?e.map((function(e){return a(e)})):[a(e)]}(n),t=Object(i.k)(t);var o=[];if(!n.length)return o;for(var s=0;s<t.length;){var u=(t[s]<<24|t[s+1]<<16|t[s+2]<<8|t[s+3])>>>0,l=t.subarray(s+4,s+8);if(0===u)break;var c=s+u;if(c>t.length){if(r)break;c=t.length}var d=t.subarray(s+8,c);Object(i.a)(l,n[0])&&(1===n.length?o.push(d):o.push.apply(o,e(d,n.slice(1),r))),s=c}return o},u={EBML:Object(i.k)([26,69,223,163]),DocType:Object(i.k)([66,130]),Segment:Object(i.k)([24,83,128,103]),SegmentInfo:Object(i.k)([21,73,169,102]),Tracks:Object(i.k)([22,84,174,107]),Track:Object(i.k)([174]),TrackNumber:Object(i.k)([215]),DefaultDuration:Object(i.k)([35,227,131]),TrackEntry:Object(i.k)([174]),TrackType:Object(i.k)([131]),FlagDefault:Object(i.k)([136]),CodecID:Object(i.k)([134]),CodecPrivate:Object(i.k)([99,162]),VideoTrack:Object(i.k)([224]),AudioTrack:Object(i.k)([225]),Cluster:Object(i.k)([31,67,182,117]),Timestamp:Object(i.k)([231]),TimestampScale:Object(i.k)([42,215,177]),BlockGroup:Object(i.k)([160]),BlockDuration:Object(i.k)([155]),Block:Object(i.k)([161]),SimpleBlock:Object(i.k)([163])},l=[128,64,32,16,8,4,2,1],c=function(e,t,n,r){void 0===n&&(n=!0),void 0===r&&(r=!1);var a=function(e){for(var t=1,n=0;n<l.length&&!(e&l[n]);n++)t++;return t}(e[t]),o=e.subarray(t,t+a);return n&&((o=Array.prototype.slice.call(e,t,t+a))[0]^=l[a-1]),{length:a,value:Object(i.b)(o,{signed:r}),bytes:o}},d=function e(t){return"string"===typeof t?t.match(/.{1,2}/g).map((function(t){return e(t)})):"number"===typeof t?Object(i.f)(t):t},h=function e(t,n,r){if(r>=n.length)return n.length;var a=c(n,r,!1);if(Object(i.a)(t.bytes,a.bytes))return r;var o=c(n,r+a.length);return e(t,n,r+o.length+o.value+a.length)},p=function e(t,n){n=function(e){return Array.isArray(e)?e.map((function(e){return d(e)})):[d(e)]}(n),t=Object(i.k)(t);var r=[];if(!n.length)return r;for(var a=0;a<t.length;){var o=c(t,a,!1),s=c(t,a+o.length),u=a+o.length+s.length;127===s.value&&(s.value=h(o,t,u),s.value!==t.length&&(s.value-=u));var l=u+s.value>t.length?t.length:u+s.value,p=t.subarray(u,l);Object(i.a)(n[0],o.bytes)&&(1===n.length?r.push(p):r=r.concat(e(p,n.slice(1)))),a+=o.length+s.length+p.length}return r},f=n("Mh8q"),m=Object(i.k)([0,0,0,1]),g=Object(i.k)([0,0,1]),v=Object(i.k)([0,0,3]),y=function(e){for(var t=[],n=1;n<e.length-2;)Object(i.a)(e.subarray(n,n+3),v)&&(t.push(n+2),n++),n++;if(0===t.length)return e;var r=e.length-t.length,a=new Uint8Array(r),o=0;for(n=0;n<r;o++,n++)o===t[0]&&(o++,t.shift()),a[n]=e[o];return a},b=function(e,t,n,r){void 0===r&&(r=1/0),e=Object(i.k)(e),n=[].concat(n);for(var a,o=0,s=0;o<e.length&&(s<r||a);){var u=void 0;if(Object(i.a)(e.subarray(o),m)?u=4:Object(i.a)(e.subarray(o),g)&&(u=3),u){if(s++,a)return y(e.subarray(a,o));var l=void 0;"h264"===t?l=31&e[o+u]:"h265"===t&&(l=e[o+u]>>1&63),-1!==n.indexOf(l)&&(a=o+u),o+=u+("h264"===t?1:2)}else o++}return e.subarray(0,0)},_={webm:Object(i.k)([119,101,98,109]),matroska:Object(i.k)([109,97,116,114,111,115,107,97]),flac:Object(i.k)([102,76,97,67]),ogg:Object(i.k)([79,103,103,83]),ac3:Object(i.k)([11,119]),riff:Object(i.k)([82,73,70,70]),avi:Object(i.k)([65,86,73]),wav:Object(i.k)([87,65,86,69]),"3gp":Object(i.k)([102,116,121,112,51,103]),mp4:Object(i.k)([102,116,121,112]),fmp4:Object(i.k)([115,116,121,112]),mov:Object(i.k)([102,116,121,112,113,116]),moov:Object(i.k)([109,111,111,118]),moof:Object(i.k)([109,111,111,102])},T={aac:function(e){var t=Object(f.a)(e);return Object(i.a)(e,[255,16],{offset:t,mask:[255,22]})},mp3:function(e){var t=Object(f.a)(e);return Object(i.a)(e,[255,2],{offset:t,mask:[255,6]})},webm:function(e){var t=p(e,[u.EBML,u.DocType])[0];return Object(i.a)(t,_.webm)},mkv:function(e){var t=p(e,[u.EBML,u.DocType])[0];return Object(i.a)(t,_.matroska)},mp4:function(e){return!T["3gp"](e)&&!T.mov(e)&&(!(!Object(i.a)(e,_.mp4,{offset:4})&&!Object(i.a)(e,_.fmp4,{offset:4}))||(!(!Object(i.a)(e,_.moof,{offset:4})&&!Object(i.a)(e,_.moov,{offset:4}))||void 0))},mov:function(e){return Object(i.a)(e,_.mov,{offset:4})},"3gp":function(e){return Object(i.a)(e,_["3gp"],{offset:4})},ac3:function(e){var t=Object(f.a)(e);return Object(i.a)(e,_.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=Object(f.a)(e);return Object(i.a)(e,_.flac,{offset:t})},ogg:function(e){return Object(i.a)(e,_.ogg)},avi:function(e){return Object(i.a)(e,_.riff)&&Object(i.a)(e,_.avi,{offset:8})},wav:function(e){return Object(i.a)(e,_.riff)&&Object(i.a)(e,_.wav,{offset:8})},h264:function(e){return function(e,t,n){return b(e,"h264",t,n)}(e,7,3).length},h265:function(e){return function(e,t,n){return b(e,"h265",t,n)}(e,[32,33],3).length}},S=Object.keys(T).filter((function(e){return"ts"!==e&&"h264"!==e&&"h265"!==e})).concat(["ts","h264","h265"]);S.forEach((function(e){var t=T[e];T[e]=function(e){return t(Object(i.k)(e))}}));var w=T,k=function(e){e=Object(i.k)(e);for(var t=0;t<S.length;t++){var n=S[t];if(w[n](e))return n}return""},C=function(e){return s(e,["moof"]).length>0}},"+U1h":function(e,t,n){var r=n("03ZO"),i=n("Y6hy"),a=n("B0s0");e.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{(e=r(Object.prototype,"__proto__","set"))(n,[]),t=n instanceof Array}catch(o){}return function(n,r){return i(n),a(r),t?e(n,r):n.__proto__=r,n}}():void 0)},"+X0y":function(e,t){var n={"":!0,up:!0};function r(e){return"number"===typeof e&&e>=0&&e<=100}e.exports=function(){var e=100,t=3,i=0,a=100,o=0,s=100,u="";Object.defineProperties(this,{width:{enumerable:!0,get:function(){return e},set:function(t){if(!r(t))throw new Error("Width must be between 0 and 100.");e=t}},lines:{enumerable:!0,get:function(){return t},set:function(e){if("number"!==typeof e)throw new TypeError("Lines must be set to a number.");t=e}},regionAnchorY:{enumerable:!0,get:function(){return a},set:function(e){if(!r(e))throw new Error("RegionAnchorX must be between 0 and 100.");a=e}},regionAnchorX:{enumerable:!0,get:function(){return i},set:function(e){if(!r(e))throw new Error("RegionAnchorY must be between 0 and 100.");i=e}},viewportAnchorY:{enumerable:!0,get:function(){return s},set:function(e){if(!r(e))throw new Error("ViewportAnchorY must be between 0 and 100.");s=e}},viewportAnchorX:{enumerable:!0,get:function(){return o},set:function(e){if(!r(e))throw new Error("ViewportAnchorX must be between 0 and 100.");o=e}},scroll:{enumerable:!0,get:function(){return u},set:function(e){var t=function(e){return"string"===typeof e&&(!!n[e.toLowerCase()]&&e.toLowerCase())}(e);!1===t?console.warn("Scroll: an invalid or illegal string was specified."):u=t}}})}},"+YUa":function(e,t,n){"use strict";var r=n("Yo2p"),i=n("Bw1r"),a=n("hkIh"),o=n("53GT"),s=n("xnEm").f,u=n("1Vnf"),l=n("HkKV"),c=n("DcKJ"),d=n("W2Ac"),h=o.set,p=o.getterFor("Array Iterator");e.exports=u(Array,"Array",(function(e,t){h(this,{type:"Array Iterator",target:r(e),index:0,kind:t})}),(function(){var e=p(this),t=e.target,n=e.kind,r=e.index++;return!t||r>=t.length?(e.target=void 0,l(void 0,!0)):l("keys"==n?r:"values"==n?t[r]:[r,t[r]],!1)}),"values");var f=a.Arguments=a.Array;if(i("keys"),i("values"),i("entries"),!c&&d&&"values"!==f.name)try{s(f,"name",{value:"values"})}catch(m){}},"+iFO":function(e,t,n){var r=n("dTAl"),i=n("LcsW"),a=n("6sVZ");e.exports=function(e){return"function"!=typeof e.constructor||a(e)?{}:r(i(e))}},"/9/d":function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return a}));var r=n("vgmO"),i=n.n(r);function a(t){for(var n,r=(n=t,i.a.atob?i.a.atob(n):e.from(n,"base64").toString("binary")),a=new Uint8Array(r.length),o=0;o<r.length;o++)a[o]=r.charCodeAt(o);return a}}).call(this,n("HDXh").Buffer)},"/sSW":function(e,t,n){var r=n("+BqG"),i=n("LIjv"),a=n("jfrp"),o=n("xnEm");e.exports=function(e,t,n){for(var s=i(t),u=o.f,l=a.f,c=0;c<s.length;c++){var d=s[c];r(e,d)||n&&r(n,d)||u(e,d,l(t,d))}}},"031f":function(e,t,n){"use strict";var r=n("4wiq"),i=n("pROP"),a=n("mESY"),o=n("+BqG"),s=n("Gjit"),u=n("orrc"),l=Function,c=r([].concat),d=r([].join),h={},p=function(e,t,n){if(!o(h,t)){for(var r=[],i=0;i<t;i++)r[i]="a["+i+"]";h[t]=l("C,a","return new C("+d(r,",")+")")}return h[t](e,n)};e.exports=u?l.bind:function(e){var t=i(this),n=t.prototype,r=s(arguments,1),o=function(){var n=c(r,s(arguments));return this instanceof o?p(t,n.length,n):t.apply(e,n)};return a(n)&&(o.prototype=n),o}},"03ZO":function(e,t,n){var r=n("4wiq"),i=n("pROP");e.exports=function(e,t,n){try{return r(i(Object.getOwnPropertyDescriptor(e,t)[n]))}catch(a){}}},"0CxO":function(e,t,n){var r=n("7zRj"),i=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 a(e,t){this.name="ParsingError",this.code=e.code,this.message=t||e.message}function o(e){function t(e,t,n,r){return 3600*(0|e)+60*(0|t)+(0|n)+(0|r)/1e3}var n=e.match(/^(\d+):(\d{1,2})(:\d{1,2})?\.(\d{3})/);return n?n[3]?t(n[1],n[2],n[3].replace(":",""),n[4]):n[1]>59?t(n[1],n[2],0,n[4]):t(0,n[1],n[2],n[4]):null}function s(){this.values=i(null)}function u(e,t,n,r){var i=r?e.split(r):[e];for(var a in i)if("string"===typeof i[a]){var o=i[a].split(n);if(2===o.length)t(o[0].trim(),o[1].trim())}}function l(e,t,n){var r=e;function i(){var t=o(e);if(null===t)throw new a(a.Errors.BadTimeStamp,"Malformed timestamp: "+r);return e=e.replace(/^[^\sa-zA-Z-]+/,""),t}function l(){e=e.replace(/^\s+/,"")}if(l(),t.startTime=i(),l(),"--\x3e"!==e.substr(0,3))throw new a(a.Errors.BadTimeStamp,"Malformed time stamp (time stamps must be separated by '--\x3e'): "+r);e=e.substr(3),l(),t.endTime=i(),l(),function(e,t){var r=new s;u(e,(function(e,t){switch(e){case"region":for(var i=n.length-1;i>=0;i--)if(n[i].id===t){r.set(e,n[i].region);break}break;case"vertical":r.alt(e,t,["rl","lr"]);break;case"line":var a=t.split(","),o=a[0];r.integer(e,o),r.percent(e,o)&&r.set("snapToLines",!1),r.alt(e,o,["auto"]),2===a.length&&r.alt("lineAlign",a[1],["start","center","end"]);break;case"position":a=t.split(","),r.percent(e,a[0]),2===a.length&&r.alt("positionAlign",a[1],["start","center","end"]);break;case"size":r.percent(e,t);break;case"align":r.alt(e,t,["start","center","end","left","right"])}}),/:/,/\s/),t.region=r.get("region",null),t.vertical=r.get("vertical","");try{t.line=r.get("line","auto")}catch(i){}t.lineAlign=r.get("lineAlign","start"),t.snapToLines=r.get("snapToLines",!0),t.size=r.get("size",100);try{t.align=r.get("align","center")}catch(i){t.align=r.get("align","middle")}try{t.position=r.get("position","auto")}catch(i){t.position=r.get("position",{start:0,left:0,center:50,middle:50,end:100,right:100},t.align)}t.positionAlign=r.get("positionAlign",{start:"start",left:"start",center:"center",middle:"center",end:"end",right:"end"},t.align)}(e,t)}a.prototype=i(Error.prototype),a.prototype.constructor=a,a.Errors={BadSignature:{code:0,message:"Malformed WebVTT signature."},BadTimeStamp:{code:1,message:"Malformed time stamp."}},s.prototype={set:function(e,t){this.get(e)||""===t||(this.values[e]=t)},get:function(e,t,n){return n?this.has(e)?this.values[e]:t[n]:this.has(e)?this.values[e]:t},has:function(e){return e in this.values},alt:function(e,t,n){for(var r=0;r<n.length;++r)if(t===n[r]){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=r.createElement&&r.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 n(){if(!t)return null;var e,n=t.match(/^([^<]*)(<[^>]*>?)?/);return e=n[1]?n[1]:n[2],t=t.substr(e.length),e}function r(e,t){return!f[t.localName]||f[t.localName]===e.localName}function i(t,n){var r=d[t];if(!r)return null;var i=e.document.createElement(r),a=p[t];return a&&n&&(i[a]=n.trim()),i}for(var a,s,u=e.document.createElement("div"),l=u,m=[];null!==(a=n());)if("<"!==a[0])l.appendChild(e.document.createTextNode((s=a,c.innerHTML=s,s=c.textContent,c.textContent="",s)));else{if("/"===a[1]){m.length&&m[m.length-1]===a.substr(2).replace(">","")&&(m.pop(),l=l.parentNode);continue}var g,v=o(a.substr(1,a.length-2));if(v){g=e.document.createProcessingInstruction("timestamp",v),l.appendChild(g);continue}var y=a.match(/^<([^.\s/0-9>]+)(\.[^\s\\>]+)?([^>\\]+)?(\\?)>?$/);if(!y)continue;if(!(g=i(y[1],y[3])))continue;if(!r(l,g))continue;if(y[2]){var b=y[2].split(".");b.forEach((function(e){var t=/^bg_/.test(e),n=t?e.slice(3):e;if(h.hasOwnProperty(n)){var r=t?"background-color":"color",i=h[n];g.style[r]=i}})),g.className=b.join(" ")}m.push(y[1]),l.appendChild(g),l=g}return u}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 n=g[t];if(e>=n[0]&&e<=n[1])return!0}return!1}function y(e){var t=[],n="";if(!e||!e.childNodes)return"ltr";function r(e,t){for(var n=t.childNodes.length-1;n>=0;n--)e.push(t.childNodes[n])}function i(e){if(!e||!e.length)return null;var t=e.pop(),n=t.textContent||t.innerText;if(n){var a=n.match(/^.*(\n|\r)/);return a?(e.length=0,a[0]):n}return"ruby"===t.tagName?i(e):t.childNodes?(r(e,t),i(e)):void 0}for(r(t,e);n=i(t);)for(var a=0;a<n.length;a++)if(v(n.charCodeAt(a)))return"rtl";return"ltr"}function b(){}function _(e,t,n){b.call(this),this.cue=t,this.cueDiv=m(e,t.text);var r={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(r,this.cueDiv),this.div=e.document.createElement("div"),r={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:n.font,whiteSpace:"pre-line",position:"absolute"},this.applyStyles(r),this.div.appendChild(this.cueDiv);var i=0;switch(t.positionAlign){case"start":i=t.position;break;case"center":i=t.position-t.size/2;break;case"end":i=t.position-t.size}""===t.vertical?this.applyStyles({left:this.formatStyle(i,"%"),width:this.formatStyle(t.size,"%")}):this.applyStyles({top:this.formatStyle(i,"%"),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,n,r,i;if(e.div){n=e.div.offsetHeight,r=e.div.offsetWidth,i=e.div.offsetTop;var a=(a=e.div.childNodes)&&(a=a[0])&&a.getClientRects&&a.getClientRects();e=e.div.getBoundingClientRect(),t=a?Math.max(a[0]&&a[0].height||0,e.height/a.length):0}this.left=e.left,this.right=e.right,this.top=e.top||i,this.height=e.height||n,this.bottom=e.bottom||i+(e.height||n),this.width=e.width||r,this.lineHeight=void 0!==t?t:e.lineHeight}function S(e,t,n,r){var i=new T(t),a=t.cue,o=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,n=t.textTrackList,r=0,i=0;i<n.length&&n[i]!==t;i++)"showing"===n[i].mode&&r++;return-1*++r}(a),s=[];if(a.snapToLines){var u;switch(a.vertical){case"":s=["+y","-y"],u="height";break;case"rl":s=["+x","-x"],u="width";break;case"lr":s=["-x","+x"],u="width"}var l=i.lineHeight,c=l*Math.round(o),d=n[u]+l,h=s[0];Math.abs(c)>d&&(c=c<0?-1:1,c*=Math.ceil(d/l)*l),o<0&&(c+=""===a.vertical?n.height:n.width,s=s.reverse()),i.move(h,c)}else{var p=i.lineHeight/n.height*100;switch(a.lineAlign){case"center":o-=p/2;break;case"end":o-=p}switch(a.vertical){case"":t.applyStyles({top:t.formatStyle(o,"%")});break;case"rl":t.applyStyles({left:t.formatStyle(o,"%")});break;case"lr":t.applyStyles({right:t.formatStyle(o,"%")})}s=["+y","-x","+x","-y"],i=new T(t)}var f=function(e,t){for(var i,a=new T(e),o=1,s=0;s<t.length;s++){for(;e.overlapsOppositeAxis(n,t[s])||e.within(n)&&e.overlapsAny(r);)e.move(t[s]);if(e.within(n))return e;var u=e.intersectPercentage(n);o>u&&(i=new T(e),o=u),e=new T(a)}return i||a}(i,s);t.move(f.toCSSCompatValues(n))}function w(){}b.prototype.applyStyles=function(e,t){for(var n in t=t||this.div,e)e.hasOwnProperty(n)&&(t.style[n]=e[n])},b.prototype.formatStyle=function(e,t){return 0===e?0:e+t},_.prototype=i(b.prototype),_.prototype.constructor=_,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,n=e.div?e.div.offsetWidth:e.tagName?e.offsetWidth:0,r=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||r,height:e.height||t,bottom:e.bottom||r+(e.height||t),width:e.width||n}},w.StringDecoder=function(){return{decode:function(e){if(!e)return"";if("string"!==typeof e)throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(e))}}},w.convertCueToDOMTree=function(e,t){return e&&t?m(e,t):null};w.processCues=function(e,t,n){if(!e||!t||!n)return null;for(;n.firstChild;)n.removeChild(n.firstChild);var r=e.document.createElement("div");if(r.style.position="absolute",r.style.left="0",r.style.right="0",r.style.top="0",r.style.bottom="0",r.style.margin="1.5%",n.appendChild(r),function(e){for(var t=0;t<e.length;t++)if(e[t].hasBeenReset||!e[t].displayState)return!0;return!1}(t)){var i=[],a=T.getSimpleBoxPosition(r),o={font:Math.round(.05*a.height*100)/100+"px sans-serif"};!function(){for(var n,s,u=0;u<t.length;u++)s=t[u],n=new _(e,s,o),r.appendChild(n.div),S(0,n,a,i),s.displayState=n.div,i.push(T.getSimpleBoxPosition(n))}()}else for(var s=0;s<t.length;s++)r.appendChild(t[s].displayState)},w.Parser=function(e,t,n){n||(n=t,t={}),t||(t={}),this.window=e,this.vttjs=t,this.state="INITIAL",this.buffer="",this.decoder=n||new TextDecoder("utf8"),this.regionList=[]},w.Parser.prototype={reportOrThrowError:function(e){if(!(e instanceof a))throw e;this.onparsingerror&&this.onparsingerror(e)},parse:function(e){var t=this;function n(){for(var e=t.buffer,n=0;n<e.length&&"\r"!==e[n]&&"\n"!==e[n];)++n;var r=e.substr(0,n);return"\r"===e[n]&&++n,"\n"===e[n]&&++n,t.buffer=e.substr(n),r}function r(e){e.match(/X-TIMESTAMP-MAP/)?u(e,(function(e,n){switch(e){case"X-TIMESTAMP-MAP":!function(e){var n=new s;u(e,(function(e,t){switch(e){case"MPEGT":n.integer(e+"S",t);break;case"LOCA":n.set(e+"L",o(t))}}),/[^\d]:/,/,/),t.ontimestampmap&&t.ontimestampmap({MPEGTS:n.get("MPEGTS"),LOCAL:n.get("LOCAL")})}(n)}}),/=/):u(e,(function(e,n){switch(e){case"Region":!function(e){var n=new s;if(u(e,(function(e,t){switch(e){case"id":n.set(e,t);break;case"width":n.percent(e,t);break;case"lines":n.integer(e,t);break;case"regionanchor":case"viewportanchor":var r=t.split(",");if(2!==r.length)break;var i=new s;if(i.percent("x",r[0]),i.percent("y",r[1]),!i.has("x")||!i.has("y"))break;n.set(e+"X",i.get("x")),n.set(e+"Y",i.get("y"));break;case"scroll":n.alt(e,t,["up"])}}),/=/,/\s/),n.has("id")){var r=new(t.vttjs.VTTRegion||t.window.VTTRegion);r.width=n.get("width",100),r.lines=n.get("lines",3),r.regionAnchorX=n.get("regionanchorX",0),r.regionAnchorY=n.get("regionanchorY",100),r.viewportAnchorX=n.get("viewportanchorX",0),r.viewportAnchorY=n.get("viewportanchorY",100),r.scroll=n.get("scroll",""),t.onregion&&t.onregion(r),t.regionList.push({id:n.get("id"),region:r})}}(n)}}),/:/)}e&&(t.buffer+=t.decoder.decode(e,{stream:!0}));try{var i;if("INITIAL"===t.state){if(!/\r\n|\n/.test(t.buffer))return this;var c=(i=n()).match(/^WEBVTT([ \t].*)?$/);if(!c||!c[0])throw new a(a.Errors.BadSignature);t.state="HEADER"}for(var d=!1;t.buffer;){if(!/\r\n|\n/.test(t.buffer))return this;switch(d?d=!1:i=n(),t.state){case"HEADER":/:/.test(i)?r(i):i||(t.state="ID");continue;case"NOTE":i||(t.state="ID");continue;case"ID":if(/^NOTE($|[ \t])/.test(i)){t.state="NOTE";break}if(!i)continue;t.cue=new(t.vttjs.VTTCue||t.window.VTTCue)(0,0,"");try{t.cue.align="center"}catch(p){t.cue.align="middle"}if(t.state="CUE",-1===i.indexOf("--\x3e")){t.cue.id=i;continue}case"CUE":try{l(i,t.cue,t.regionList)}catch(p){t.reportOrThrowError(p),t.cue=null,t.state="BADCUE";continue}t.state="CUETEXT";continue;case"CUETEXT":var h=-1!==i.indexOf("--\x3e");if(!i||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+=i.replace(/\u2028/g,"\n").replace(/u2029/g,"\n");continue;case"BADCUE":i||(t.state="ID");continue}}}catch(p){t.reportOrThrowError(p),"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(){try{if(this.buffer+=this.decoder.decode(),(this.cue||"HEADER"===this.state)&&(this.buffer+="\n\n",this.parse()),"INITIAL"===this.state)throw new a(a.Errors.BadSignature)}catch(e){this.reportOrThrowError(e)}return this.onflush&&this.onflush(),this}},e.exports=w},"0Tbm":function(e,t,n){!function(t){var n=/^(?=((?:[a-zA-Z0-9+\-.]+:)?))\1(?=((?:\/\/[^\/?#]*)?))\2(?=((?:(?:[^?#\/]*\/)*[^;?#\/]*)?))\3((?:;[^?#]*)?)(\?[^#]*)?(#[^]*)?$/,r=/^(?=([^\/?#]*))\1([^]*)$/,i=/(?:\/|^)\.(?=\/)/g,a=/(?:\/|^)\.\.\/(?!\.\.\/)[^\/]*(?=\/)/g,o={buildAbsoluteURL:function(e,t,n){if(n=n||{},e=e.trim(),!(t=t.trim())){if(!n.alwaysNormalize)return e;var i=o.parseURL(e);if(!i)throw new Error("Error trying to parse base URL.");return i.path=o.normalizePath(i.path),o.buildURLFromParts(i)}var a=o.parseURL(t);if(!a)throw new Error("Error trying to parse relative URL.");if(a.scheme)return n.alwaysNormalize?(a.path=o.normalizePath(a.path),o.buildURLFromParts(a)):t;var s=o.parseURL(e);if(!s)throw new Error("Error trying to parse base URL.");if(!s.netLoc&&s.path&&"/"!==s.path[0]){var u=r.exec(s.path);s.netLoc=u[1],s.path=u[2]}s.netLoc&&!s.path&&(s.path="/");var l={scheme:s.scheme,netLoc:a.netLoc,path:null,params:a.params,query:a.query,fragment:a.fragment};if(!a.netLoc&&(l.netLoc=s.netLoc,"/"!==a.path[0]))if(a.path){var c=s.path,d=c.substring(0,c.lastIndexOf("/")+1)+a.path;l.path=o.normalizePath(d)}else l.path=s.path,a.params||(l.params=s.params,a.query||(l.query=s.query));return null===l.path&&(l.path=n.alwaysNormalize?o.normalizePath(a.path):a.path),o.buildURLFromParts(l)},parseURL:function(e){var t=n.exec(e);return t?{scheme:t[1]||"",netLoc:t[2]||"",path:t[3]||"",params:t[4]||"",query:t[5]||"",fragment:t[6]||""}:null},normalizePath:function(e){for(e=e.split("").reverse().join("").replace(i,"");e.length!==(e=e.replace(a,"")).length;);return e.split("").reverse().join("")},buildURLFromParts:function(e){return e.scheme+e.netLoc+e.path+e.params+e.query+e.fragment}};e.exports=o}()},"0dUG":function(e,t,n){var r=n("xZj3");e.exports=!r((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}))},"1+5i":function(e,t,n){var r=n("w/wX"),i=n("sEf8"),a=n("mdPL"),o=a&&a.isSet,s=o?i(o):r;e.exports=s},"10ky":function(e,t,n){"use strict";n.d(t,"a",(function(){return y}));var r=n("VbXa"),i=n.n(r),a=function(){function e(){this.listeners={}}var t=e.prototype;return t.on=function(e,t){this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push(t)},t.off=function(e,t){if(!this.listeners[e])return!1;var n=this.listeners[e].indexOf(t);return this.listeners[e]=this.listeners[e].slice(0),this.listeners[e].splice(n,1),n>-1},t.trigger=function(e){var t=this.listeners[e];if(t)if(2===arguments.length)for(var n=t.length,r=0;r<n;++r)t[r].call(this,arguments[1]);else for(var i=Array.prototype.slice.call(arguments,1),a=t.length,o=0;o<a;++o)t[o].apply(this,i)},t.dispose=function(){this.listeners={}},t.pipe=function(e){this.on("data",(function(t){e.push(t)}))},e}(),o=n("pVnL"),s=n.n(o),u=n("PJYZ"),l=n.n(u),c=n("/9/d"),d=function(e){function t(){var t;return(t=e.call(this)||this).buffer="",t}return i()(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}(a),h=String.fromCharCode(9),p=function(e){var t=/([0-9.]*)?@?([0-9.]*)?/.exec(e||""),n={};return t[1]&&(n.length=parseInt(t[1],10)),t[2]&&(n.offset=parseInt(t[2],10)),n},f=function(e){for(var t,n=e.split(new RegExp('(?:^|,)((?:[^=]*)=(?:"[^"]*"|[^,]*))')),r={},i=n.length;i--;)""!==n[i]&&((t=/([^=]*)=(.*)/.exec(n[i]).slice(1))[0]=t[0].replace(/^\s+|\s+$/g,""),t[1]=t[1].replace(/^\s+|\s+$/g,""),t[1]=t[1].replace(/^['"](.*)['"]$/g,"$1"),r[t[0]]=t[1]);return r},m=function(e){function t(){var t;return(t=e.call(this)||this).customParsers=[],t.tagMappers=[],t}i()(t,e);var n=t.prototype;return n.push=function(e){var t,n,r=this;0!==(e=e.trim()).length&&("#"===e[0]?this.tagMappers.reduce((function(t,n){var r=n(e);return r===e?t:t.concat([r])}),[e]).forEach((function(e){for(var i=0;i<r.customParsers.length;i++)if(r.customParsers[i].call(r,e))return;if(0===e.indexOf("#EXT"))if(e=e.replace("\r",""),t=/^#EXTM3U/.exec(e))r.trigger("data",{type:"tag",tagType:"m3u"});else{if(t=/^#EXTINF:?([0-9\.]*)?,?(.*)?$/.exec(e))return n={type:"tag",tagType:"inf"},t[1]&&(n.duration=parseFloat(t[1])),t[2]&&(n.title=t[2]),void r.trigger("data",n);if(t=/^#EXT-X-TARGETDURATION:?([0-9.]*)?/.exec(e))return n={type:"tag",tagType:"targetduration"},t[1]&&(n.duration=parseInt(t[1],10)),void r.trigger("data",n);if(t=/^#EXT-X-VERSION:?([0-9.]*)?/.exec(e))return n={type:"tag",tagType:"version"},t[1]&&(n.version=parseInt(t[1],10)),void r.trigger("data",n);if(t=/^#EXT-X-MEDIA-SEQUENCE:?(\-?[0-9.]*)?/.exec(e))return n={type:"tag",tagType:"media-sequence"},t[1]&&(n.number=parseInt(t[1],10)),void r.trigger("data",n);if(t=/^#EXT-X-DISCONTINUITY-SEQUENCE:?(\-?[0-9.]*)?/.exec(e))return n={type:"tag",tagType:"discontinuity-sequence"},t[1]&&(n.number=parseInt(t[1],10)),void r.trigger("data",n);if(t=/^#EXT-X-PLAYLIST-TYPE:?(.*)?$/.exec(e))return n={type:"tag",tagType:"playlist-type"},t[1]&&(n.playlistType=t[1]),void r.trigger("data",n);if(t=/^#EXT-X-BYTERANGE:?(.*)?$/.exec(e))return n=s()(p(t[1]),{type:"tag",tagType:"byterange"}),void r.trigger("data",n);if(t=/^#EXT-X-ALLOW-CACHE:?(YES|NO)?/.exec(e))return n={type:"tag",tagType:"allow-cache"},t[1]&&(n.allowed=!/NO/.test(t[1])),void r.trigger("data",n);if(t=/^#EXT-X-MAP:?(.*)$/.exec(e)){if(n={type:"tag",tagType:"map"},t[1]){var a=f(t[1]);a.URI&&(n.uri=a.URI),a.BYTERANGE&&(n.byterange=p(a.BYTERANGE))}r.trigger("data",n)}else if(t=/^#EXT-X-STREAM-INF:?(.*)$/.exec(e)){if(n={type:"tag",tagType:"stream-inf"},t[1]){if(n.attributes=f(t[1]),n.attributes.RESOLUTION){var o=n.attributes.RESOLUTION.split("x"),u={};o[0]&&(u.width=parseInt(o[0],10)),o[1]&&(u.height=parseInt(o[1],10)),n.attributes.RESOLUTION=u}n.attributes.BANDWIDTH&&(n.attributes.BANDWIDTH=parseInt(n.attributes.BANDWIDTH,10)),n.attributes["FRAME-RATE"]&&(n.attributes["FRAME-RATE"]=parseFloat(n.attributes["FRAME-RATE"])),n.attributes["PROGRAM-ID"]&&(n.attributes["PROGRAM-ID"]=parseInt(n.attributes["PROGRAM-ID"],10))}r.trigger("data",n)}else{if(t=/^#EXT-X-MEDIA:?(.*)$/.exec(e))return n={type:"tag",tagType:"media"},t[1]&&(n.attributes=f(t[1])),void r.trigger("data",n);if(t=/^#EXT-X-ENDLIST/.exec(e))r.trigger("data",{type:"tag",tagType:"endlist"});else if(t=/^#EXT-X-DISCONTINUITY/.exec(e))r.trigger("data",{type:"tag",tagType:"discontinuity"});else{if(t=/^#EXT-X-PROGRAM-DATE-TIME:?(.*)$/.exec(e))return n={type:"tag",tagType:"program-date-time"},t[1]&&(n.dateTimeString=t[1],n.dateTimeObject=new Date(t[1])),void r.trigger("data",n);if(t=/^#EXT-X-KEY:?(.*)$/.exec(e))return n={type:"tag",tagType:"key"},t[1]&&(n.attributes=f(t[1]),n.attributes.IV&&("0x"===n.attributes.IV.substring(0,2).toLowerCase()&&(n.attributes.IV=n.attributes.IV.substring(2)),n.attributes.IV=n.attributes.IV.match(/.{8}/g),n.attributes.IV[0]=parseInt(n.attributes.IV[0],16),n.attributes.IV[1]=parseInt(n.attributes.IV[1],16),n.attributes.IV[2]=parseInt(n.attributes.IV[2],16),n.attributes.IV[3]=parseInt(n.attributes.IV[3],16),n.attributes.IV=new Uint32Array(n.attributes.IV))),void r.trigger("data",n);if(t=/^#EXT-X-START:?(.*)$/.exec(e))return n={type:"tag",tagType:"start"},t[1]&&(n.attributes=f(t[1]),n.attributes["TIME-OFFSET"]=parseFloat(n.attributes["TIME-OFFSET"]),n.attributes.PRECISE=/YES/.test(n.attributes.PRECISE)),void r.trigger("data",n);if(t=/^#EXT-X-CUE-OUT-CONT:?(.*)?$/.exec(e))return n={type:"tag",tagType:"cue-out-cont"},t[1]?n.data=t[1]:n.data="",void r.trigger("data",n);if(t=/^#EXT-X-CUE-OUT:?(.*)?$/.exec(e))return n={type:"tag",tagType:"cue-out"},t[1]?n.data=t[1]:n.data="",void r.trigger("data",n);if(t=/^#EXT-X-CUE-IN:?(.*)?$/.exec(e))return n={type:"tag",tagType:"cue-in"},t[1]?n.data=t[1]:n.data="",void r.trigger("data",n);if((t=/^#EXT-X-SKIP:(.*)$/.exec(e))&&t[1])return(n={type:"tag",tagType:"skip"}).attributes=f(t[1]),n.attributes.hasOwnProperty("SKIPPED-SEGMENTS")&&(n.attributes["SKIPPED-SEGMENTS"]=parseInt(n.attributes["SKIPPED-SEGMENTS"],10)),n.attributes.hasOwnProperty("RECENTLY-REMOVED-DATERANGES")&&(n.attributes["RECENTLY-REMOVED-DATERANGES"]=n.attributes["RECENTLY-REMOVED-DATERANGES"].split(h)),void r.trigger("data",n);if((t=/^#EXT-X-PART:(.*)$/.exec(e))&&t[1])return(n={type:"tag",tagType:"part"}).attributes=f(t[1]),["DURATION"].forEach((function(e){n.attributes.hasOwnProperty(e)&&(n.attributes[e]=parseFloat(n.attributes[e]))})),["INDEPENDENT","GAP"].forEach((function(e){n.attributes.hasOwnProperty(e)&&(n.attributes[e]=/YES/.test(n.attributes[e]))})),n.attributes.hasOwnProperty("BYTERANGE")&&(n.attributes.byterange=p(n.attributes.BYTERANGE)),void r.trigger("data",n);if((t=/^#EXT-X-SERVER-CONTROL:(.*)$/.exec(e))&&t[1])return(n={type:"tag",tagType:"server-control"}).attributes=f(t[1]),["CAN-SKIP-UNTIL","PART-HOLD-BACK","HOLD-BACK"].forEach((function(e){n.attributes.hasOwnProperty(e)&&(n.attributes[e]=parseFloat(n.attributes[e]))})),["CAN-SKIP-DATERANGES","CAN-BLOCK-RELOAD"].forEach((function(e){n.attributes.hasOwnProperty(e)&&(n.attributes[e]=/YES/.test(n.attributes[e]))})),void r.trigger("data",n);if((t=/^#EXT-X-PART-INF:(.*)$/.exec(e))&&t[1])return(n={type:"tag",tagType:"part-inf"}).attributes=f(t[1]),["PART-TARGET"].forEach((function(e){n.attributes.hasOwnProperty(e)&&(n.attributes[e]=parseFloat(n.attributes[e]))})),void r.trigger("data",n);if((t=/^#EXT-X-PRELOAD-HINT:(.*)$/.exec(e))&&t[1])return(n={type:"tag",tagType:"preload-hint"}).attributes=f(t[1]),["BYTERANGE-START","BYTERANGE-LENGTH"].forEach((function(e){if(n.attributes.hasOwnProperty(e)){n.attributes[e]=parseInt(n.attributes[e],10);var t="BYTERANGE-LENGTH"===e?"length":"offset";n.attributes.byterange=n.attributes.byterange||{},n.attributes.byterange[t]=n.attributes[e],delete n.attributes[e]}})),void r.trigger("data",n);if((t=/^#EXT-X-RENDITION-REPORT:(.*)$/.exec(e))&&t[1])return(n={type:"tag",tagType:"rendition-report"}).attributes=f(t[1]),["LAST-MSN","LAST-PART"].forEach((function(e){n.attributes.hasOwnProperty(e)&&(n.attributes[e]=parseInt(n.attributes[e],10))})),void r.trigger("data",n);r.trigger("data",{type:"tag",data:e.slice(4)})}}}else r.trigger("data",{type:"comment",text:e.slice(1)})})):this.trigger("data",{type:"uri",uri:e}))},n.addParser=function(e){var t=this,n=e.expression,r=e.customType,i=e.dataParser,a=e.segment;"function"!==typeof i&&(i=function(e){return e}),this.customParsers.push((function(e){if(n.exec(e))return t.trigger("data",{type:"custom",data:i(e),customType:r,segment:a}),!0}))},n.addTagMapper=function(e){var t=e.expression,n=e.map;this.tagMappers.push((function(e){return t.test(e)?n(e):e}))},t}(a),g=function(e){var t={};return Object.keys(e).forEach((function(n){var r;t[(r=n,r.toLowerCase().replace(/-(\w)/g,(function(e){return e[1].toUpperCase()})))]=e[n]})),t},v=function(e){var t=e.serverControl,n=e.targetDuration,r=e.partTargetDuration;if(t){var i="#EXT-X-SERVER-CONTROL",a="holdBack",o="partHoldBack",s=n&&3*n,u=r&&2*r;n&&!t.hasOwnProperty(a)&&(t[a]=s,this.trigger("info",{message:i+" defaulting HOLD-BACK to targetDuration * 3 ("+s+")."})),s&&t[a]<s&&(this.trigger("warn",{message:i+" clamping HOLD-BACK ("+t[a]+") to targetDuration * 3 ("+s+")"}),t[a]=s),r&&!t.hasOwnProperty(o)&&(t[o]=3*r,this.trigger("info",{message:i+" defaulting PART-HOLD-BACK to partTargetDuration * 3 ("+t[o]+")."})),r&&t[o]<u&&(this.trigger("warn",{message:i+" clamping PART-HOLD-BACK ("+t[o]+") to partTargetDuration * 2 ("+u+")."}),t[o]=u)}},y=function(e){function t(){var t;(t=e.call(this)||this).lineStream=new d,t.parseStream=new m,t.lineStream.pipe(t.parseStream);var n,r,i=l()(t),a=[],o={},u=!1,h=function(){},p={AUDIO:{},VIDEO:{},"CLOSED-CAPTIONS":{},SUBTITLES:{}},f=0;t.manifest={allowCache:!0,discontinuityStarts:[],segments:[]};var y=0,b=0;return t.on("end",(function(){o.uri||!o.parts&&!o.preloadHints||(!o.map&&n&&(o.map=n),!o.key&&r&&(o.key=r),o.timeline||"number"!==typeof f||(o.timeline=f),t.manifest.preloadSegment=o)})),t.parseStream.on("data",(function(e){var t,l;({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&&(o.byterange=t,t.length=e.length,"offset"in e||(e.offset=y)),"offset"in e&&(o.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&&(o.duration=e.duration),0===e.duration&&(o.duration=.01,this.trigger("info",{message:"updating zero segment duration to a small value"})),this.manifest.segments=a},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("com.microsoft.playready"===e.attributes.KEYFORMAT)return this.manifest.contentProtection=this.manifest.contentProtection||{},void(this.manifest.contentProtection["com.microsoft.playready"]={uri:e.attributes.URI});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:Object(c.a)(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"}),r={method:e.attributes.METHOD||"AES-128",uri:e.attributes.URI},"undefined"!==typeof e.attributes.IV&&(r.iv=e.attributes.IV)}else this.trigger("warn",{message:"ignoring key declaration without URI"});else r=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,f=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(){n={},e.uri&&(n.uri=e.uri),e.byterange&&(n.byterange=e.byterange),r&&(n.key=r)},"stream-inf":function(){this.manifest.playlists=a,this.manifest.mediaGroups=this.manifest.mediaGroups||p,e.attributes?(o.attributes||(o.attributes={}),s()(o.attributes,e.attributes)):this.trigger("warn",{message:"ignoring empty stream-inf attributes"})},media:function(){if(this.manifest.mediaGroups=this.manifest.mediaGroups||p,e.attributes&&e.attributes.TYPE&&e.attributes["GROUP-ID"]&&e.attributes.NAME){var n=this.manifest.mediaGroups[e.attributes.TYPE];n[e.attributes["GROUP-ID"]]=n[e.attributes["GROUP-ID"]]||{},t=n[e.attributes["GROUP-ID"]],(l={default:/yes/i.test(e.attributes.DEFAULT)}).default?l.autoselect=!0:l.autoselect=/yes/i.test(e.attributes.AUTOSELECT),e.attributes.LANGUAGE&&(l.language=e.attributes.LANGUAGE),e.attributes.URI&&(l.uri=e.attributes.URI),e.attributes["INSTREAM-ID"]&&(l.instreamId=e.attributes["INSTREAM-ID"]),e.attributes.CHARACTERISTICS&&(l.characteristics=e.attributes.CHARACTERISTICS),e.attributes.FORCED&&(l.forced=/yes/i.test(e.attributes.FORCED)),t[e.attributes.NAME]=l}else this.trigger("warn",{message:"ignoring incomplete or missing media group"})},discontinuity:function(){f+=1,o.discontinuity=!0,this.manifest.discontinuityStarts.push(a.length)},"program-date-time":function(){"undefined"===typeof this.manifest.dateTimeString&&(this.manifest.dateTimeString=e.dateTimeString,this.manifest.dateTimeObject=e.dateTimeObject),o.dateTimeString=e.dateTimeString,o.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,v.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(){o.cueOut=e.data},"cue-out-cont":function(){o.cueOutCont=e.data},"cue-in":function(){o.cueIn=e.data},skip:function(){this.manifest.skip=g(e.attributes),this.warnOnMissingAttributes_("#EXT-X-SKIP",e.attributes,["SKIPPED-SEGMENTS"])},part:function(){var t=this;u=!0;var n=this.manifest.segments.length,r=g(e.attributes);o.parts=o.parts||[],o.parts.push(r),r.byterange&&(r.byterange.hasOwnProperty("offset")||(r.byterange.offset=b),b=r.byterange.offset+r.byterange.length);var i=o.parts.length-1;this.warnOnMissingAttributes_("#EXT-X-PART #"+i+" for segment #"+n,e.attributes,["URI","DURATION"]),this.manifest.renditionReports&&this.manifest.renditionReports.forEach((function(e,n){e.hasOwnProperty("lastPart")||t.trigger("warn",{message:"#EXT-X-RENDITION-REPORT #"+n+" lacks required attribute(s): LAST-PART"})}))},"server-control":function(){var t=this.manifest.serverControl=g(e.attributes);t.hasOwnProperty("canBlockReload")||(t.canBlockReload=!1,this.trigger("info",{message:"#EXT-X-SERVER-CONTROL defaulting CAN-BLOCK-RELOAD to false"})),v.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,n=g(e.attributes),r=n.type&&"PART"===n.type;o.preloadHints=o.preloadHints||[],o.preloadHints.push(n),n.byterange&&(n.byterange.hasOwnProperty("offset")||(n.byterange.offset=r?b:0,r&&(b=n.byterange.offset+n.byterange.length)));var i=o.preloadHints.length-1;if(this.warnOnMissingAttributes_("#EXT-X-PRELOAD-HINT #"+i+" for segment #"+t,e.attributes,["TYPE","URI"]),n.type)for(var a=0;a<o.preloadHints.length-1;a++){var s=o.preloadHints[a];s.type&&(s.type===n.type&&this.trigger("warn",{message:"#EXT-X-PRELOAD-HINT #"+i+" for segment #"+t+" has the same TYPE "+n.type+" as preload hint #"+a}))}},"rendition-report":function(){var t=g(e.attributes);this.manifest.renditionReports=this.manifest.renditionReports||[],this.manifest.renditionReports.push(t);var n=this.manifest.renditionReports.length-1,r=["LAST-MSN","URI"];u&&r.push("LAST-PART"),this.warnOnMissingAttributes_("#EXT-X-RENDITION-REPORT #"+n,e.attributes,r)},"part-inf":function(){this.manifest.partInf=g(e.attributes),this.warnOnMissingAttributes_("#EXT-X-PART-INF",e.attributes,["PART-TARGET"]),this.manifest.partInf.partTarget&&(this.manifest.partTargetDuration=this.manifest.partInf.partTarget),v.call(this,this.manifest)}}[e.tagType]||h).call(i)},uri:function(){o.uri=e.uri,a.push(o),this.manifest.targetDuration&&!("duration"in o)&&(this.trigger("warn",{message:"defaulting segment duration to the target duration"}),o.duration=this.manifest.targetDuration),r&&(o.key=r),o.timeline=f,n&&(o.map=n),b=0,o={}},comment:function(){},custom:function(){e.segment?(o.custom=o.custom||{},o.custom[e.customType]=e.data):(this.manifest.custom=this.manifest.custom||{},this.manifest.custom[e.customType]=e.data)}})[e.type].call(i)})),t}i()(t,e);var n=t.prototype;return n.warnOnMissingAttributes_=function(e,t,n){var r=[];n.forEach((function(e){t.hasOwnProperty(e)||r.push(e)})),r.length&&this.trigger("warn",{message:e+" lacks required attribute(s): "+r.join(", ")})},n.push=function(e){this.lineStream.push(e)},n.end=function(){this.lineStream.push("\n"),this.trigger("end")},n.addParser=function(e){this.parseStream.addParser(e)},n.addTagMapper=function(e){this.parseStream.addTagMapper(e)},t}(a)},"11UE":function(e,t,n){var r=n("tD7+");e.exports=function(e){return r(e.length)}},"1MgG":function(e,t,n){var r=n("4wiq"),i=n("xZj3"),a=n("eDf4"),o=n("+BqG"),s=n("W2Ac"),u=n("3mqj").CONFIGURABLE,l=n("52Wu"),c=n("53GT"),d=c.enforce,h=c.get,p=String,f=Object.defineProperty,m=r("".slice),g=r("".replace),v=r([].join),y=s&&!i((function(){return 8!==f((function(){}),"length",{value:8}).length})),b=String(String).split("String"),_=e.exports=function(e,t,n){"Symbol("===m(p(t),0,7)&&(t="["+g(p(t),/^Symbol\(([^)]*)\)/,"$1")+"]"),n&&n.getter&&(t="get "+t),n&&n.setter&&(t="set "+t),(!o(e,"name")||u&&e.name!==t)&&(s?f(e,"name",{value:t,configurable:!0}):e.name=t),y&&n&&o(n,"arity")&&e.length!==n.arity&&f(e,"length",{value:n.arity});try{n&&o(n,"constructor")&&n.constructor?s&&f(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(i){}var r=d(e);return o(r,"source")||(r.source=v(b,"string"==typeof t?t:"")),e};Function.prototype.toString=_((function(){return a(this)&&h(this).source||l(this)}),"toString")},"1Vnf":function(e,t,n){"use strict";var r=n("szlw"),i=n("JVs5"),a=n("DcKJ"),o=n("3mqj"),s=n("eDf4"),u=n("aS5Z"),l=n("PEQI"),c=n("+U1h"),d=n("e1XL"),h=n("w1io"),p=n("esM1"),f=n("4Tei"),m=n("hkIh"),g=n("Q7rv"),v=o.PROPER,y=o.CONFIGURABLE,b=g.IteratorPrototype,_=g.BUGGY_SAFARI_ITERATORS,T=f("iterator"),S=function(){return this};e.exports=function(e,t,n,o,f,g,w){u(n,t,o);var k,C,E,A=function(e){if(e===f&&L)return L;if(!_&&e in I)return I[e];switch(e){case"keys":case"values":case"entries":return function(){return new n(this,e)}}return function(){return new n(this)}},x=t+" Iterator",P=!1,I=e.prototype,O=I[T]||I["@@iterator"]||f&&I[f],L=!_&&O||A(f),D="Array"==t&&I.entries||O;if(D&&(k=l(D.call(new e)))!==Object.prototype&&k.next&&(a||l(k)===b||(c?c(k,b):s(k[T])||p(k,T,S)),d(k,x,!0,!0),a&&(m[x]=S)),v&&"values"==f&&O&&"values"!==O.name&&(!a&&y?h(I,"name","values"):(P=!0,L=function(){return i(O,this)})),f)if(C={values:A("values"),keys:g?L:A("keys"),entries:A("entries")},w)for(E in C)(_||P||!(E in I))&&p(I,E,C[E]);else r({target:t,proto:!0,forced:_||P},C);return a&&!w||I[T]===L||p(I,T,L,{name:f}),m[t]=L,C}},"1s47":function(e,t,n){},2:function(e,t){},"2JmJ":function(e,t,n){var r=n("DsG2"),i=n("eDf4"),a=n("Dr2v"),o=n("4Tei")("toStringTag"),s=Object,u="Arguments"==a(function(){return arguments}());e.exports=r?a:function(e){var t,n,r;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(n){}}(t=s(e),o))?n:u?a(t):"Object"==(r=a(t))&&i(t.callee)?"Arguments":r}},"2zs7":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.canUseDOM=t.SafeNodeList=t.SafeHTMLCollection=void 0;var r,i=n("2rMq");var a=((r=i)&&r.__esModule?r:{default:r}).default,o=a.canUseDOM?window.HTMLElement:{};t.SafeHTMLCollection=a.canUseDOM?window.HTMLCollection:{},t.SafeNodeList=a.canUseDOM?window.NodeList:{},t.canUseDOM=a.canUseDOM;t.default=o},"35Mb":function(e,t,n){"use strict";n.d(t,"b",(function(){return nr})),n.d(t,"a",(function(){return rr}));var r=function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function i(e,t,n){if(n||2===arguments.length)for(var r,i=0,a=t.length;i<a;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))}var a="undefined"!==typeof globalThis?globalThis:"undefined"!==typeof self?self:"undefined"!==typeof window?window:global,o=Object.keys,s=Array.isArray;function u(e,t){return"object"!==typeof t||o(t).forEach((function(n){e[n]=t[n]})),e}"undefined"===typeof Promise||a.Promise||(a.Promise=Promise);var l=Object.getPrototypeOf,c={}.hasOwnProperty;function d(e,t){return c.call(e,t)}function h(e,t){"function"===typeof t&&(t=t(l(e))),("undefined"===typeof Reflect?o:Reflect.ownKeys)(t).forEach((function(n){f(e,n,t[n])}))}var p=Object.defineProperty;function f(e,t,n,r){p(e,t,u(n&&d(n,"get")&&"function"===typeof n.get?{get:n.get,set:n.set,configurable:!0}:{value:n,configurable:!0,writable:!0},r))}function m(e){return{from:function(t){return e.prototype=Object.create(t.prototype),f(e.prototype,"constructor",e),{extend:h.bind(null,e.prototype)}}}}var g=Object.getOwnPropertyDescriptor;function v(e,t){var n;return g(e,t)||(n=l(e))&&v(n,t)}var y=[].slice;function b(e,t,n){return y.call(e,t,n)}function _(e,t){return t(e)}function T(e){if(!e)throw new Error("Assertion Failed")}function S(e){a.setImmediate?setImmediate(e):setTimeout(e,0)}function w(e,t){return e.reduce((function(e,n,r){var i=t(n,r);return i&&(e[i[0]]=i[1]),e}),{})}function k(e,t){if(d(e,t))return e[t];if(!t)return e;if("string"!==typeof t){for(var n=[],r=0,i=t.length;r<i;++r){var a=k(e,t[r]);n.push(a)}return n}var o=t.indexOf(".");if(-1!==o){var s=e[t.substr(0,o)];return void 0===s?void 0:k(s,t.substr(o+1))}}function C(e,t,n){if(e&&void 0!==t&&(!("isFrozen"in Object)||!Object.isFrozen(e)))if("string"!==typeof t&&"length"in t){T("string"!==typeof n&&"length"in n);for(var r=0,i=t.length;r<i;++r)C(e,t[r],n[r])}else{var a=t.indexOf(".");if(-1!==a){var o=t.substr(0,a),u=t.substr(a+1);if(""===u)void 0===n?s(e)&&!isNaN(parseInt(o))?e.splice(o,1):delete e[o]:e[o]=n;else{var l=e[o];l&&d(e,o)||(l=e[o]={}),C(l,u,n)}}else void 0===n?s(e)&&!isNaN(parseInt(t))?e.splice(t,1):delete e[t]:e[t]=n}}function E(e){var t={};for(var n in e)d(e,n)&&(t[n]=e[n]);return t}var A=[].concat;function x(e){return A.apply([],e)}var P="Boolean,String,Date,RegExp,Blob,File,FileList,FileSystemFileHandle,ArrayBuffer,DataView,Uint8ClampedArray,ImageBitmap,ImageData,Map,Set,CryptoKey".split(",").concat(x([8,16,32,64].map((function(e){return["Int","Uint","Float"].map((function(t){return t+e+"Array"}))})))).filter((function(e){return a[e]})),I=P.map((function(e){return a[e]}));w(P,(function(e){return[e,!0]}));var O=null;function L(e){O="undefined"!==typeof WeakMap&&new WeakMap;var t=function e(t){if(!t||"object"!==typeof t)return t;var n=O&&O.get(t);if(n)return n;if(s(t)){n=[],O&&O.set(t,n);for(var r=0,i=t.length;r<i;++r)n.push(e(t[r]))}else if(I.indexOf(t.constructor)>=0)n=t;else{var a=l(t);for(var o in n=a===Object.prototype?{}:Object.create(a),O&&O.set(t,n),t)d(t,o)&&(n[o]=e(t[o]))}return n}(e);return O=null,t}var D={}.toString;function M(e){return D.call(e).slice(8,-1)}var R="undefined"!==typeof Symbol?Symbol.iterator:"@@iterator",N="symbol"===typeof R?function(e){var t;return null!=e&&(t=e[R])&&t.apply(e)}:function(){return null},j={};function B(e){var t,n,r,i;if(1===arguments.length){if(s(e))return e.slice();if(this===j&&"string"===typeof e)return[e];if(i=N(e)){for(n=[];!(r=i.next()).done;)n.push(r.value);return n}if(null==e)return[e];if("number"===typeof(t=e.length)){for(n=new Array(t);t--;)n[t]=e[t];return n}return[e]}for(t=arguments.length,n=new Array(t);t--;)n[t]=arguments[t];return n}var U="undefined"!==typeof Symbol?function(e){return"AsyncFunction"===e[Symbol.toStringTag]}:function(){return!1},F="undefined"!==typeof location&&/^(http|https):\/\/(localhost|127\.0\.0\.1)/.test(location.href);function q(e,t){F=e,H=t}var H=function(){return!0},z=!new Error("").stack;function W(){if(z)try{throw W.arguments,new Error}catch(e){return e}return new Error}function V(e,t){var n=e.stack;return n?(t=t||0,0===n.indexOf(e.name)&&(t+=(e.name+e.message).split("\n").length),n.split("\n").slice(t).filter(H).map((function(e){return"\n"+e})).join("")):""}var K=["Unknown","Constraint","Data","TransactionInactive","ReadOnly","Version","NotFound","InvalidState","InvalidAccess","Abort","Timeout","QuotaExceeded","Syntax","DataClone"],G=["Modify","Bulk","OpenFailed","VersionChange","Schema","Upgrade","InvalidTable","MissingAPI","NoSuchDatabase","InvalidArgument","SubTransaction","Unsupported","Internal","DatabaseClosed","PrematureCommit","ForeignAwait"].concat(K),X={VersionChanged:"Database version changed by other database connection",DatabaseClosed:"Database has been closed",Abort:"Transaction aborted",TransactionInactive:"Transaction has already completed or failed",MissingAPI:"IndexedDB API missing. Please visit https://tinyurl.com/y2uuvskb"};function Y(e,t){this._e=W(),this.name=e,this.message=t}function Q(e,t){return e+". Errors: "+Object.keys(t).map((function(e){return t[e].toString()})).filter((function(e,t,n){return n.indexOf(e)===t})).join("\n")}function $(e,t,n,r){this._e=W(),this.failures=t,this.failedKeys=r,this.successCount=n,this.message=Q(e,t)}function Z(e,t){this._e=W(),this.name="BulkError",this.failures=Object.keys(t).map((function(e){return t[e]})),this.failuresByPos=t,this.message=Q(e,t)}m(Y).from(Error).extend({stack:{get:function(){return this._stack||(this._stack=this.name+": "+this.message+V(this._e,2))}},toString:function(){return this.name+": "+this.message}}),m($).from(Y),m(Z).from(Y);var J=G.reduce((function(e,t){return e[t]=t+"Error",e}),{}),ee=Y,te=G.reduce((function(e,t){var n=t+"Error";function r(e,r){this._e=W(),this.name=n,e?"string"===typeof e?(this.message=e+(r?"\n "+r:""),this.inner=r||null):"object"===typeof e&&(this.message=e.name+" "+e.message,this.inner=e):(this.message=X[t]||n,this.inner=null)}return m(r).from(ee),e[t]=r,e}),{});te.Syntax=SyntaxError,te.Type=TypeError,te.Range=RangeError;var ne=K.reduce((function(e,t){return e[t+"Error"]=te[t],e}),{});var re=G.reduce((function(e,t){return-1===["Syntax","Type","Range"].indexOf(t)&&(e[t+"Error"]=te[t]),e}),{});function ie(){}function ae(e){return e}function oe(e,t){return null==e||e===ae?t:function(n){return t(e(n))}}function se(e,t){return function(){e.apply(this,arguments),t.apply(this,arguments)}}function ue(e,t){return e===ie?t:function(){var n=e.apply(this,arguments);void 0!==n&&(arguments[0]=n);var r=this.onsuccess,i=this.onerror;this.onsuccess=null,this.onerror=null;var a=t.apply(this,arguments);return r&&(this.onsuccess=this.onsuccess?se(r,this.onsuccess):r),i&&(this.onerror=this.onerror?se(i,this.onerror):i),void 0!==a?a:n}}function le(e,t){return e===ie?t:function(){e.apply(this,arguments);var n=this.onsuccess,r=this.onerror;this.onsuccess=this.onerror=null,t.apply(this,arguments),n&&(this.onsuccess=this.onsuccess?se(n,this.onsuccess):n),r&&(this.onerror=this.onerror?se(r,this.onerror):r)}}function ce(e,t){return e===ie?t:function(n){var r=e.apply(this,arguments);u(n,r);var i=this.onsuccess,a=this.onerror;this.onsuccess=null,this.onerror=null;var o=t.apply(this,arguments);return i&&(this.onsuccess=this.onsuccess?se(i,this.onsuccess):i),a&&(this.onerror=this.onerror?se(a,this.onerror):a),void 0===r?void 0===o?void 0:o:u(r,o)}}function de(e,t){return e===ie?t:function(){return!1!==t.apply(this,arguments)&&e.apply(this,arguments)}}function he(e,t){return e===ie?t:function(){var n=e.apply(this,arguments);if(n&&"function"===typeof n.then){for(var r=this,i=arguments.length,a=new Array(i);i--;)a[i]=arguments[i];return n.then((function(){return t.apply(r,a)}))}return t.apply(this,arguments)}}re.ModifyError=$,re.DexieError=Y,re.BulkError=Z;var pe={},fe="undefined"===typeof Promise?[]:function(){var e=Promise.resolve();if("undefined"===typeof crypto||!crypto.subtle)return[e,l(e),e];var t=crypto.subtle.digest("SHA-512",new Uint8Array([0]));return[t,l(t),e]}(),me=fe[0],ge=fe[1],ve=fe[2],ye=ge&&ge.then,be=me&&me.constructor,_e=!!ve,Te=!1,Se=ve?function(){ve.then(We)}:a.setImmediate?setImmediate.bind(null,We):a.MutationObserver?function(){var e=document.createElement("div");new MutationObserver((function(){We(),e=null})).observe(e,{attributes:!0}),e.setAttribute("i","1")}:function(){setTimeout(We,0)},we=function(e,t){Le.push([e,t]),Ce&&(Se(),Ce=!1)},ke=!0,Ce=!0,Ee=[],Ae=[],xe=null,Pe=ae,Ie={id:"global",global:!0,ref:0,unhandleds:[],onunhandled:ft,pgp:!1,env:{},finalize:function(){this.unhandleds.forEach((function(e){try{ft(e[0],e[1])}catch(t){}}))}},Oe=Ie,Le=[],De=0,Me=[];function Re(e){if("object"!==typeof this)throw new TypeError("Promises must be constructed via new");this._listeners=[],this.onuncatched=ie,this._lib=!1;var t=this._PSD=Oe;if(F&&(this._stackHolder=W(),this._prev=null,this._numPrev=0),"function"!==typeof e){if(e!==pe)throw new TypeError("Not a function");return this._state=arguments[1],this._value=arguments[2],void(!1===this._state&&Ue(this,this._value))}this._state=null,this._value=null,++t.ref,Be(this,e)}var Ne={get:function(){var e=Oe,t=et;function n(n,r){var i=this,a=!e.global&&(e!==Oe||t!==et),o=a&&!it(),s=new Re((function(t,s){qe(i,new je(ht(n,e,a,o),ht(r,e,a,o),t,s,e))}));return F&&ze(s,this),s}return n.prototype=pe,n},set:function(e){f(this,"then",e&&e.prototype===pe?Ne:{get:function(){return e},set:Ne.set})}};function je(e,t,n,r,i){this.onFulfilled="function"===typeof e?e:null,this.onRejected="function"===typeof t?t:null,this.resolve=n,this.reject=r,this.psd=i}function Be(e,t){try{t((function(t){if(null===e._state){if(t===e)throw new TypeError("A promise cannot be resolved with itself.");var n=e._lib&&Ve();t&&"function"===typeof t.then?Be(e,(function(e,n){t instanceof Re?t._then(e,n):t.then(e,n)})):(e._state=!0,e._value=t,Fe(e)),n&&Ke()}}),Ue.bind(null,e))}catch(n){Ue(e,n)}}function Ue(e,t){if(Ae.push(t),null===e._state){var n=e._lib&&Ve();t=Pe(t),e._state=!1,e._value=t,F&&null!==t&&"object"===typeof t&&!t._promise&&function(e,t,n){try{e.apply(null,n)}catch(r){t&&t(r)}}((function(){var n=v(t,"stack");t._promise=e,f(t,"stack",{get:function(){return Te?n&&(n.get?n.get.apply(t):n.value):e.stack}})})),function(e){Ee.some((function(t){return t._value===e._value}))||Ee.push(e)}(e),Fe(e),n&&Ke()}}function Fe(e){var t=e._listeners;e._listeners=[];for(var n=0,r=t.length;n<r;++n)qe(e,t[n]);var i=e._PSD;--i.ref||i.finalize(),0===De&&(++De,we((function(){0===--De&&Ge()}),[]))}function qe(e,t){if(null!==e._state){var n=e._state?t.onFulfilled:t.onRejected;if(null===n)return(e._state?t.resolve:t.reject)(e._value);++t.psd.ref,++De,we(He,[n,e,t])}else e._listeners.push(t)}function He(e,t,n){try{xe=t;var r,i=t._value;t._state?r=e(i):(Ae.length&&(Ae=[]),r=e(i),-1===Ae.indexOf(i)&&function(e){var t=Ee.length;for(;t;)if(Ee[--t]._value===e._value)return void Ee.splice(t,1)}(t)),n.resolve(r)}catch(a){n.reject(a)}finally{xe=null,0===--De&&Ge(),--n.psd.ref||n.psd.finalize()}}function ze(e,t){var n=t?t._numPrev+1:0;n<100&&(e._prev=t,e._numPrev=n)}function We(){Ve()&&Ke()}function Ve(){var e=ke;return ke=!1,Ce=!1,e}function Ke(){var e,t,n;do{for(;Le.length>0;)for(e=Le,Le=[],n=e.length,t=0;t<n;++t){var r=e[t];r[0].apply(null,r[1])}}while(Le.length>0);ke=!0,Ce=!0}function Ge(){var e=Ee;Ee=[],e.forEach((function(e){e._PSD.onunhandled.call(null,e._value,e)}));for(var t=Me.slice(0),n=t.length;n;)t[--n]()}function Xe(e){return new Re(pe,!1,e)}function Ye(e,t){var n=Oe;return function(){var r=Ve(),i=Oe;try{return ut(n,!0),e.apply(this,arguments)}catch(a){t&&t(a)}finally{ut(i,!1),r&&Ke()}}}h(Re.prototype,{then:Ne,_then:function(e,t){qe(this,new je(null,null,e,t,Oe))},catch:function(e){if(1===arguments.length)return this.then(null,e);var t=arguments[0],n=arguments[1];return"function"===typeof t?this.then(null,(function(e){return e instanceof t?n(e):Xe(e)})):this.then(null,(function(e){return e&&e.name===t?n(e):Xe(e)}))},finally:function(e){return this.then((function(t){return e(),t}),(function(t){return e(),Xe(t)}))},stack:{get:function(){if(this._stack)return this._stack;try{Te=!0;var e=function e(t,n,r){if(n.length===r)return n;var i="";if(!1===t._state){var a,o,s=t._value;null!=s?(a=s.name||"Error",o=s.message||s,i=V(s,0)):(a=s,o=""),n.push(a+(o?": "+o:"")+i)}F&&((i=V(t._stackHolder,2))&&-1===n.indexOf(i)&&n.push(i),t._prev&&e(t._prev,n,r));return n}(this,[],20).join("\nFrom previous: ");return null!==this._state&&(this._stack=e),e}finally{Te=!1}}},timeout:function(e,t){var n=this;return e<1/0?new Re((function(r,i){var a=setTimeout((function(){return i(new te.Timeout(t))}),e);n.then(r,i).finally(clearTimeout.bind(null,a))})):this}}),"undefined"!==typeof Symbol&&Symbol.toStringTag&&f(Re.prototype,Symbol.toStringTag,"Dexie.Promise"),Ie.env=lt(),h(Re,{all:function(){var e=B.apply(null,arguments).map(at);return new Re((function(t,n){0===e.length&&t([]);var r=e.length;e.forEach((function(i,a){return Re.resolve(i).then((function(n){e[a]=n,--r||t(e)}),n)}))}))},resolve:function(e){if(e instanceof Re)return e;if(e&&"function"===typeof e.then)return new Re((function(t,n){e.then(t,n)}));var t=new Re(pe,!0,e);return ze(t,xe),t},reject:Xe,race:function(){var e=B.apply(null,arguments).map(at);return new Re((function(t,n){e.map((function(e){return Re.resolve(e).then(t,n)}))}))},PSD:{get:function(){return Oe},set:function(e){return Oe=e}},totalEchoes:{get:function(){return et}},newPSD:nt,usePSD:ct,scheduler:{get:function(){return we},set:function(e){we=e}},rejectionMapper:{get:function(){return Pe},set:function(e){Pe=e}},follow:function(e,t){return new Re((function(n,r){return nt((function(t,n){var r=Oe;r.unhandleds=[],r.onunhandled=n,r.finalize=se((function(){var e=this;!function(e){Me.push((function t(){e(),Me.splice(Me.indexOf(t),1)})),++De,we((function(){0===--De&&Ge()}),[])}((function(){0===e.unhandleds.length?t():n(e.unhandleds[0])}))}),r.finalize),e()}),t,n,r)}))}}),be&&(be.allSettled&&f(Re,"allSettled",(function(){var e=B.apply(null,arguments).map(at);return new Re((function(t){0===e.length&&t([]);var n=e.length,r=new Array(n);e.forEach((function(e,i){return Re.resolve(e).then((function(e){return r[i]={status:"fulfilled",value:e}}),(function(e){return r[i]={status:"rejected",reason:e}})).then((function(){return--n||t(r)}))}))}))})),be.any&&"undefined"!==typeof AggregateError&&f(Re,"any",(function(){var e=B.apply(null,arguments).map(at);return new Re((function(t,n){0===e.length&&n(new AggregateError([]));var r=e.length,i=new Array(r);e.forEach((function(e,a){return Re.resolve(e).then((function(e){return t(e)}),(function(e){i[a]=e,--r||n(new AggregateError(i))}))}))}))})));var Qe={awaits:0,echoes:0,id:0},$e=0,Ze=[],Je=0,et=0,tt=0;function nt(e,t,n,r){var i=Oe,a=Object.create(i);a.parent=i,a.ref=0,a.global=!1,a.id=++tt;var o=Ie.env;a.env=_e?{Promise:Re,PromiseProp:{value:Re,configurable:!0,writable:!0},all:Re.all,race:Re.race,allSettled:Re.allSettled,any:Re.any,resolve:Re.resolve,reject:Re.reject,nthen:pt(o.nthen,a),gthen:pt(o.gthen,a)}:{},t&&u(a,t),++i.ref,a.finalize=function(){--this.parent.ref||this.parent.finalize()};var s=ct(a,e,n,r);return 0===a.ref&&a.finalize(),s}function rt(){return Qe.id||(Qe.id=++$e),++Qe.awaits,Qe.echoes+=100,Qe.id}function it(){return!!Qe.awaits&&(0===--Qe.awaits&&(Qe.id=0),Qe.echoes=100*Qe.awaits,!0)}function at(e){return Qe.echoes&&e&&e.constructor===be?(rt(),e.then((function(e){return it(),e}),(function(e){return it(),mt(e)}))):e}function ot(e){++et,Qe.echoes&&0!==--Qe.echoes||(Qe.echoes=Qe.id=0),Ze.push(Oe),ut(e,!0)}function st(){var e=Ze[Ze.length-1];Ze.pop(),ut(e,!1)}function ut(e,t){var n=Oe;if((t?!Qe.echoes||Je++&&e===Oe:!Je||--Je&&e===Oe)||dt(t?ot.bind(null,e):st),e!==Oe&&(Oe=e,n===Ie&&(Ie.env=lt()),_e)){var r=Ie.env.Promise,i=e.env;ge.then=i.nthen,r.prototype.then=i.gthen,(n.global||e.global)&&(Object.defineProperty(a,"Promise",i.PromiseProp),r.all=i.all,r.race=i.race,r.resolve=i.resolve,r.reject=i.reject,i.allSettled&&(r.allSettled=i.allSettled),i.any&&(r.any=i.any))}}function lt(){var e=a.Promise;return _e?{Promise:e,PromiseProp:Object.getOwnPropertyDescriptor(a,"Promise"),all:e.all,race:e.race,allSettled:e.allSettled,any:e.any,resolve:e.resolve,reject:e.reject,nthen:ge.then,gthen:e.prototype.then}:{}}function ct(e,t,n,r,i){var a=Oe;try{return ut(e,!0),t(n,r,i)}finally{ut(a,!1)}}function dt(e){ye.call(me,e)}function ht(e,t,n,r){return"function"!==typeof e?e:function(){var i=Oe;n&&rt(),ut(t,!0);try{return e.apply(this,arguments)}finally{ut(i,!1),r&&dt(it)}}}function pt(e,t){return function(n,r){return e.call(this,ht(n,t),ht(r,t))}}-1===(""+ye).indexOf("[native code]")&&(rt=it=ie);function ft(e,t){var n;try{n=t.onuncatched(e)}catch(o){}if(!1!==n)try{var r,i={promise:t,reason:e};if(a.document&&document.createEvent?((r=document.createEvent("Event")).initEvent("unhandledrejection",!0,!0),u(r,i)):a.CustomEvent&&u(r=new CustomEvent("unhandledrejection",{detail:i}),i),r&&a.dispatchEvent&&(dispatchEvent(r),!a.PromiseRejectionEvent&&a.onunhandledrejection))try{a.onunhandledrejection(r)}catch(s){}F&&r&&!r.defaultPrevented&&console.warn("Unhandled rejection: "+(e.stack||e))}catch(o){}}var mt=Re.reject;var gt=String.fromCharCode(65535),vt="Invalid key provided. Keys must be of type string, number, Date or Array<string | number | Date>.",yt=[],bt="undefined"!==typeof navigator&&/(MSIE|Trident|Edge)/.test(navigator.userAgent),_t=bt,Tt=bt,St=function(e){return!/(dexie\.js|dexie\.min\.js)/.test(e)};function wt(e,t){return e?t?function(){return e.apply(this,arguments)&&t.apply(this,arguments)}:e:t}var kt={type:3,lower:-1/0,lowerOpen:!1,upper:[[]],upperOpen:!1};function Ct(e){return"string"!==typeof e||/\./.test(e)?function(e){return e}:function(t){return void 0===t[e]&&e in t&&delete(t=L(t))[e],t}}var Et=function(){function e(){}return e.prototype._trans=function(e,t,n){var r=this._tx||Oe.trans,i=this.name;function a(e,n,r){if(!r.schema[i])throw new te.NotFound("Table "+i+" not part of transaction");return t(r.idbtrans,r)}var o=Ve();try{return r&&r.db===this.db?r===Oe.trans?r._promise(e,a,n):nt((function(){return r._promise(e,a,n)}),{trans:r,transless:Oe.transless||Oe}):function e(t,n,r,i){if(t.idbdb&&(t._state.openComplete||Oe.letThrough||t._vip)){var a=t._createTransaction(n,r,t._dbSchema);try{a.create(),t._state.PR1398_maxLoop=3}catch(o){return o.name===J.InvalidState&&t.isOpen()&&--t._state.PR1398_maxLoop>0?(console.warn("Dexie: Need to reopen db"),t._close(),t.open().then((function(){return e(t,n,r,i)}))):mt(o)}return a._promise(n,(function(e,t){return nt((function(){return Oe.trans=a,i(e,t,a)}))})).then((function(e){return a._completion.then((function(){return e}))}))}if(t._state.openComplete)return mt(new te.DatabaseClosed(t._state.dbOpenError));if(!t._state.isBeingOpened){if(!t._options.autoOpen)return mt(new te.DatabaseClosed);t.open().catch(ie)}return t._state.dbReadyPromise.then((function(){return e(t,n,r,i)}))}(this.db,e,[this.name],a)}finally{o&&Ke()}},e.prototype.get=function(e,t){var n=this;return e&&e.constructor===Object?this.where(e).first(t):this._trans("readonly",(function(t){return n.core.get({trans:t,key:e}).then((function(e){return n.hook.reading.fire(e)}))})).then(t)},e.prototype.where=function(e){if("string"===typeof e)return new this.db.WhereClause(this,e);if(s(e))return new this.db.WhereClause(this,"["+e.join("+")+"]");var t=o(e);if(1===t.length)return this.where(t[0]).equals(e[t[0]]);var n=this.schema.indexes.concat(this.schema.primKey).filter((function(e){return e.compound&&t.every((function(t){return e.keyPath.indexOf(t)>=0}))&&e.keyPath.every((function(e){return t.indexOf(e)>=0}))}))[0];if(n&&this.db._maxKey!==gt)return this.where(n.name).equals(n.keyPath.map((function(t){return e[t]})));!n&&F&&console.warn("The query "+JSON.stringify(e)+" on "+this.name+" would benefit of a compound index ["+t.join("+")+"]");var r=this.schema.idxByName,i=this.db._deps.indexedDB;function a(e,t){try{return 0===i.cmp(e,t)}catch(n){return!1}}var u=t.reduce((function(t,n){var i=t[0],o=t[1],u=r[n],l=e[n];return[i||u,i||!u?wt(o,u&&u.multi?function(e){var t=k(e,n);return s(t)&&t.some((function(e){return a(l,e)}))}:function(e){return a(l,k(e,n))}):o]}),[null,null]),l=u[0],c=u[1];return l?this.where(l.name).equals(e[l.keyPath]).filter(c):n?this.filter(c):this.where(t).equals("")},e.prototype.filter=function(e){return this.toCollection().and(e)},e.prototype.count=function(e){return this.toCollection().count(e)},e.prototype.offset=function(e){return this.toCollection().offset(e)},e.prototype.limit=function(e){return this.toCollection().limit(e)},e.prototype.each=function(e){return this.toCollection().each(e)},e.prototype.toArray=function(e){return this.toCollection().toArray(e)},e.prototype.toCollection=function(){return new this.db.Collection(new this.db.WhereClause(this))},e.prototype.orderBy=function(e){return new this.db.Collection(new this.db.WhereClause(this,s(e)?"["+e.join("+")+"]":e))},e.prototype.reverse=function(){return this.toCollection().reverse()},e.prototype.mapToClass=function(e){this.schema.mappedClass=e;var t=function(t){if(!t)return t;var n=Object.create(e.prototype);for(var r in t)if(d(t,r))try{n[r]=t[r]}catch(i){}return n};return this.schema.readHook&&this.hook.reading.unsubscribe(this.schema.readHook),this.schema.readHook=t,this.hook("reading",t),e},e.prototype.defineClass=function(){return this.mapToClass((function(e){u(this,e)}))},e.prototype.add=function(e,t){var n=this,r=this.schema.primKey,i=r.auto,a=r.keyPath,o=e;return a&&i&&(o=Ct(a)(e)),this._trans("readwrite",(function(e){return n.core.mutate({trans:e,type:"add",keys:null!=t?[t]:null,values:[o]})})).then((function(e){return e.numFailures?Re.reject(e.failures[0]):e.lastResult})).then((function(t){if(a)try{C(e,a,t)}catch(n){}return t}))},e.prototype.update=function(e,t){if("object"!==typeof e||s(e))return this.where(":id").equals(e).modify(t);var n=k(e,this.schema.primKey.keyPath);if(void 0===n)return mt(new te.InvalidArgument("Given object does not contain its primary key"));try{"function"!==typeof t?o(t).forEach((function(n){C(e,n,t[n])})):t(e,{value:e,primKey:n})}catch(Nn){}return this.where(":id").equals(n).modify(t)},e.prototype.put=function(e,t){var n=this,r=this.schema.primKey,i=r.auto,a=r.keyPath,o=e;return a&&i&&(o=Ct(a)(e)),this._trans("readwrite",(function(e){return n.core.mutate({trans:e,type:"put",values:[o],keys:null!=t?[t]:null})})).then((function(e){return e.numFailures?Re.reject(e.failures[0]):e.lastResult})).then((function(t){if(a)try{C(e,a,t)}catch(n){}return t}))},e.prototype.delete=function(e){var t=this;return this._trans("readwrite",(function(n){return t.core.mutate({trans:n,type:"delete",keys:[e]})})).then((function(e){return e.numFailures?Re.reject(e.failures[0]):void 0}))},e.prototype.clear=function(){var e=this;return this._trans("readwrite",(function(t){return e.core.mutate({trans:t,type:"deleteRange",range:kt})})).then((function(e){return e.numFailures?Re.reject(e.failures[0]):void 0}))},e.prototype.bulkGet=function(e){var t=this;return this._trans("readonly",(function(n){return t.core.getMany({keys:e,trans:n}).then((function(e){return e.map((function(e){return t.hook.reading.fire(e)}))}))}))},e.prototype.bulkAdd=function(e,t,n){var r=this,i=Array.isArray(t)?t:void 0,a=(n=n||(i?void 0:t))?n.allKeys:void 0;return this._trans("readwrite",(function(t){var n=r.schema.primKey,o=n.auto,s=n.keyPath;if(s&&i)throw new te.InvalidArgument("bulkAdd(): keys argument invalid on tables with inbound keys");if(i&&i.length!==e.length)throw new te.InvalidArgument("Arguments objects and keys must have the same length");var u=e.length,l=s&&o?e.map(Ct(s)):e;return r.core.mutate({trans:t,type:"add",keys:i,values:l,wantResults:a}).then((function(e){var t=e.numFailures,n=e.results,i=e.lastResult,o=e.failures;if(0===t)return a?n:i;throw new Z(r.name+".bulkAdd(): "+t+" of "+u+" operations failed",o)}))}))},e.prototype.bulkPut=function(e,t,n){var r=this,i=Array.isArray(t)?t:void 0,a=(n=n||(i?void 0:t))?n.allKeys:void 0;return this._trans("readwrite",(function(t){var n=r.schema.primKey,o=n.auto,s=n.keyPath;if(s&&i)throw new te.InvalidArgument("bulkPut(): keys argument invalid on tables with inbound keys");if(i&&i.length!==e.length)throw new te.InvalidArgument("Arguments objects and keys must have the same length");var u=e.length,l=s&&o?e.map(Ct(s)):e;return r.core.mutate({trans:t,type:"put",keys:i,values:l,wantResults:a}).then((function(e){var t=e.numFailures,n=e.results,i=e.lastResult,o=e.failures;if(0===t)return a?n:i;throw new Z(r.name+".bulkPut(): "+t+" of "+u+" operations failed",o)}))}))},e.prototype.bulkDelete=function(e){var t=this,n=e.length;return this._trans("readwrite",(function(n){return t.core.mutate({trans:n,type:"delete",keys:e})})).then((function(e){var r=e.numFailures,i=e.lastResult,a=e.failures;if(0===r)return i;throw new Z(t.name+".bulkDelete(): "+r+" of "+n+" operations failed",a)}))},e}();function At(e){var t={},n=function(n,r){if(r){for(var i=arguments.length,a=new Array(i-1);--i;)a[i-1]=arguments[i];return t[n].subscribe.apply(null,a),e}if("string"===typeof n)return t[n]};n.addEventType=a;for(var r=1,i=arguments.length;r<i;++r)a(arguments[r]);return n;function a(e,r,i){if("object"===typeof e)return u(e);r||(r=de),i||(i=ie);var a={subscribers:[],fire:i,subscribe:function(e){-1===a.subscribers.indexOf(e)&&(a.subscribers.push(e),a.fire=r(a.fire,e))},unsubscribe:function(e){a.subscribers=a.subscribers.filter((function(t){return t!==e})),a.fire=a.subscribers.reduce(r,i)}};return t[e]=n[e]=a,a}function u(e){o(e).forEach((function(t){var n=e[t];if(s(n))a(t,e[t][0],e[t][1]);else{if("asap"!==n)throw new te.InvalidArgument("Invalid event config");var r=a(t,ae,(function(){for(var e=arguments.length,t=new Array(e);e--;)t[e]=arguments[e];r.subscribers.forEach((function(e){S((function(){e.apply(null,t)}))}))}))}}))}}function xt(e,t){return m(t).from({prototype:e}),t}function Pt(e,t){return!(e.filter||e.algorithm||e.or)&&(t?e.justLimit:!e.replayFilter)}function It(e,t){e.filter=wt(e.filter,t)}function Ot(e,t,n){var r=e.replayFilter;e.replayFilter=r?function(){return wt(r(),t())}:t,e.justLimit=n&&!r}function Lt(e,t){if(e.isPrimKey)return t.primaryKey;var n=t.getIndexByKeyPath(e.index);if(!n)throw new te.Schema("KeyPath "+e.index+" on object store "+t.name+" is not indexed");return n}function Dt(e,t,n){var r=Lt(e,t.schema);return t.openCursor({trans:n,values:!e.keysOnly,reverse:"prev"===e.dir,unique:!!e.unique,query:{index:r,range:e.range}})}function Mt(e,t,n,r){var i=e.replayFilter?wt(e.filter,e.replayFilter()):e.filter;if(e.or){var a={},o=function(e,n,r){if(!i||i(n,r,(function(e){return n.stop(e)}),(function(e){return n.fail(e)}))){var o=n.primaryKey,s=""+o;"[object ArrayBuffer]"===s&&(s=""+new Uint8Array(o)),d(a,s)||(a[s]=!0,t(e,n,r))}};return Promise.all([e.or._iterate(o,n),Rt(Dt(e,r,n),e.algorithm,o,!e.keysOnly&&e.valueMapper)])}return Rt(Dt(e,r,n),wt(e.algorithm,i),t,!e.keysOnly&&e.valueMapper)}function Rt(e,t,n,r){var i=Ye(r?function(e,t,i){return n(r(e),t,i)}:n);return e.then((function(e){if(e)return e.start((function(){var n=function(){return e.continue()};t&&!t(e,(function(e){return n=e}),(function(t){e.stop(t),n=ie}),(function(t){e.fail(t),n=ie}))||i(e.value,e,(function(e){return n=e})),n()}))}))}function Nt(e,t){try{var n=jt(e),r=jt(t);if(n!==r)return"Array"===n?1:"Array"===r?-1:"binary"===n?1:"binary"===r?-1:"string"===n?1:"string"===r?-1:"Date"===n?1:"Date"!==r?NaN:-1;switch(n){case"number":case"Date":case"string":return e>t?1:e<t?-1:0;case"binary":return function(e,t){for(var n=e.length,r=t.length,i=n<r?n:r,a=0;a<i;++a)if(e[a]!==t[a])return e[a]<t[a]?-1:1;return n===r?0:n<r?-1:1}(Bt(e),Bt(t));case"Array":return function(e,t){for(var n=e.length,r=t.length,i=n<r?n:r,a=0;a<i;++a){var o=Nt(e[a],t[a]);if(0!==o)return o}return n===r?0:n<r?-1:1}(e,t)}}catch(Nn){}return NaN}function jt(e){var t=typeof e;if("object"!==t)return t;if(ArrayBuffer.isView(e))return"binary";var n=M(e);return"ArrayBuffer"===n?"binary":n}function Bt(e){return e instanceof Uint8Array?e:ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):new Uint8Array(e)}var Ut=function(){function e(){}return e.prototype._read=function(e,t){var n=this._ctx;return n.error?n.table._trans(null,mt.bind(null,n.error)):n.table._trans("readonly",e).then(t)},e.prototype._write=function(e){var t=this._ctx;return t.error?t.table._trans(null,mt.bind(null,t.error)):t.table._trans("readwrite",e,"locked")},e.prototype._addAlgorithm=function(e){var t=this._ctx;t.algorithm=wt(t.algorithm,e)},e.prototype._iterate=function(e,t){return Mt(this._ctx,e,t,this._ctx.table.core)},e.prototype.clone=function(e){var t=Object.create(this.constructor.prototype),n=Object.create(this._ctx);return e&&u(n,e),t._ctx=n,t},e.prototype.raw=function(){return this._ctx.valueMapper=null,this},e.prototype.each=function(e){var t=this._ctx;return this._read((function(n){return Mt(t,e,n,t.table.core)}))},e.prototype.count=function(e){var t=this;return this._read((function(e){var n=t._ctx,r=n.table.core;if(Pt(n,!0))return r.count({trans:e,query:{index:Lt(n,r.schema),range:n.range}}).then((function(e){return Math.min(e,n.limit)}));var i=0;return Mt(n,(function(){return++i,!1}),e,r).then((function(){return i}))})).then(e)},e.prototype.sortBy=function(e,t){var n=e.split(".").reverse(),r=n[0],i=n.length-1;function a(e,t){return t?a(e[n[t]],t-1):e[r]}var o="next"===this._ctx.dir?1:-1;function s(e,t){var n=a(e,i),r=a(t,i);return n<r?-o:n>r?o:0}return this.toArray((function(e){return e.sort(s)})).then(t)},e.prototype.toArray=function(e){var t=this;return this._read((function(e){var n=t._ctx;if("next"===n.dir&&Pt(n,!0)&&n.limit>0){var r=n.valueMapper,i=Lt(n,n.table.core.schema);return n.table.core.query({trans:e,limit:n.limit,values:!0,query:{index:i,range:n.range}}).then((function(e){var t=e.result;return r?t.map(r):t}))}var a=[];return Mt(n,(function(e){return a.push(e)}),e,n.table.core).then((function(){return a}))}),e)},e.prototype.offset=function(e){var t=this._ctx;return e<=0||(t.offset+=e,Pt(t)?Ot(t,(function(){var t=e;return function(e,n){return 0===t||(1===t?(--t,!1):(n((function(){e.advance(t),t=0})),!1))}})):Ot(t,(function(){var t=e;return function(){return--t<0}}))),this},e.prototype.limit=function(e){return this._ctx.limit=Math.min(this._ctx.limit,e),Ot(this._ctx,(function(){var t=e;return function(e,n,r){return--t<=0&&n(r),t>=0}}),!0),this},e.prototype.until=function(e,t){return It(this._ctx,(function(n,r,i){return!e(n.value)||(r(i),t)})),this},e.prototype.first=function(e){return this.limit(1).toArray((function(e){return e[0]})).then(e)},e.prototype.last=function(e){return this.reverse().first(e)},e.prototype.filter=function(e){var t,n;return It(this._ctx,(function(t){return e(t.value)})),t=this._ctx,n=e,t.isMatch=wt(t.isMatch,n),this},e.prototype.and=function(e){return this.filter(e)},e.prototype.or=function(e){return new this.db.WhereClause(this._ctx.table,e,this)},e.prototype.reverse=function(){return this._ctx.dir="prev"===this._ctx.dir?"next":"prev",this._ondirectionchange&&this._ondirectionchange(this._ctx.dir),this},e.prototype.desc=function(){return this.reverse()},e.prototype.eachKey=function(e){var t=this._ctx;return t.keysOnly=!t.isMatch,this.each((function(t,n){e(n.key,n)}))},e.prototype.eachUniqueKey=function(e){return this._ctx.unique="unique",this.eachKey(e)},e.prototype.eachPrimaryKey=function(e){var t=this._ctx;return t.keysOnly=!t.isMatch,this.each((function(t,n){e(n.primaryKey,n)}))},e.prototype.keys=function(e){var t=this._ctx;t.keysOnly=!t.isMatch;var n=[];return this.each((function(e,t){n.push(t.key)})).then((function(){return n})).then(e)},e.prototype.primaryKeys=function(e){var t=this._ctx;if("next"===t.dir&&Pt(t,!0)&&t.limit>0)return this._read((function(e){var n=Lt(t,t.table.core.schema);return t.table.core.query({trans:e,values:!1,limit:t.limit,query:{index:n,range:t.range}})})).then((function(e){return e.result})).then(e);t.keysOnly=!t.isMatch;var n=[];return this.each((function(e,t){n.push(t.primaryKey)})).then((function(){return n})).then(e)},e.prototype.uniqueKeys=function(e){return this._ctx.unique="unique",this.keys(e)},e.prototype.firstKey=function(e){return this.limit(1).keys((function(e){return e[0]})).then(e)},e.prototype.lastKey=function(e){return this.reverse().firstKey(e)},e.prototype.distinct=function(){var e=this._ctx,t=e.index&&e.table.schema.idxByName[e.index];if(!t||!t.multi)return this;var n={};return It(this._ctx,(function(e){var t=e.primaryKey.toString(),r=d(n,t);return n[t]=!0,!r})),this},e.prototype.modify=function(e){var t=this,n=this._ctx;return this._write((function(r){var i;if("function"===typeof e)i=e;else{var a=o(e),s=a.length;i=function(t){for(var n=!1,r=0;r<s;++r){var i=a[r],o=e[i];k(t,i)!==o&&(C(t,i,o),n=!0)}return n}}var u=n.table.core,l=u.schema.primaryKey,c=l.outbound,d=l.extractKey,h=t.db._options.modifyChunkSize||200,p=[],f=0,m=[],g=function(e,t){var n=t.failures,r=t.numFailures;f+=e-r;for(var i=0,a=o(n);i<a.length;i++){var s=a[i];p.push(n[s])}};return t.clone().primaryKeys().then((function(t){var a=function(o){var s=Math.min(h,t.length-o);return u.getMany({trans:r,keys:t.slice(o,o+s),cache:"immutable"}).then((function(l){for(var p=[],f=[],m=c?[]:null,v=[],y=0;y<s;++y){var b=l[y],_={value:L(b),primKey:t[o+y]};!1!==i.call(_,_.value,_)&&(null==_.value?v.push(t[o+y]):c||0===Nt(d(b),d(_.value))?(f.push(_.value),c&&m.push(t[o+y])):(v.push(t[o+y]),p.push(_.value)))}var T=Pt(n)&&n.limit===1/0&&("function"!==typeof e||e===Ft)&&{index:n.index,range:n.range};return Promise.resolve(p.length>0&&u.mutate({trans:r,type:"add",values:p}).then((function(e){for(var t in e.failures)v.splice(parseInt(t),1);g(p.length,e)}))).then((function(){return(f.length>0||T&&"object"===typeof e)&&u.mutate({trans:r,type:"put",keys:m,values:f,criteria:T,changeSpec:"function"!==typeof e&&e}).then((function(e){return g(f.length,e)}))})).then((function(){return(v.length>0||T&&e===Ft)&&u.mutate({trans:r,type:"delete",keys:v,criteria:T}).then((function(e){return g(v.length,e)}))})).then((function(){return t.length>o+s&&a(o+h)}))}))};return a(0).then((function(){if(p.length>0)throw new $("Error modifying one or more objects",p,f,m);return t.length}))}))}))},e.prototype.delete=function(){var e=this._ctx,t=e.range;return Pt(e)&&(e.isPrimKey&&!Tt||3===t.type)?this._write((function(n){var r=e.table.core.schema.primaryKey,i=t;return e.table.core.count({trans:n,query:{index:r,range:i}}).then((function(t){return e.table.core.mutate({trans:n,type:"deleteRange",range:i}).then((function(e){var n=e.failures;e.lastResult,e.results;var r=e.numFailures;if(r)throw new $("Could not delete some values",Object.keys(n).map((function(e){return n[e]})),t-r);return t-r}))}))})):this.modify(Ft)},e}(),Ft=function(e,t){return t.value=null};function qt(e,t){return e<t?-1:e===t?0:1}function Ht(e,t){return e>t?-1:e===t?0:1}function zt(e,t,n){var r=e instanceof Yt?new e.Collection(e):e;return r._ctx.error=n?new n(t):new TypeError(t),r}function Wt(e){return new e.Collection(e,(function(){return Xt("")})).limit(0)}function Vt(e,t,n,r,i,a){for(var o=Math.min(e.length,r.length),s=-1,u=0;u<o;++u){var l=t[u];if(l!==r[u])return i(e[u],n[u])<0?e.substr(0,u)+n[u]+n.substr(u+1):i(e[u],r[u])<0?e.substr(0,u)+r[u]+n.substr(u+1):s>=0?e.substr(0,s)+t[s]+n.substr(s+1):null;i(e[u],l)<0&&(s=u)}return o<r.length&&"next"===a?e+n.substr(e.length):o<e.length&&"prev"===a?e.substr(0,n.length):s<0?null:e.substr(0,s)+r[s]+n.substr(s+1)}function Kt(e,t,n,r){var i,a,o,s,u,l,c,d=n.length;if(!n.every((function(e){return"string"===typeof e})))return zt(e,"String expected.");function h(e){i=function(e){return"next"===e?function(e){return e.toUpperCase()}:function(e){return e.toLowerCase()}}(e),a=function(e){return"next"===e?function(e){return e.toLowerCase()}:function(e){return e.toUpperCase()}}(e),o="next"===e?qt:Ht;var t=n.map((function(e){return{lower:a(e),upper:i(e)}})).sort((function(e,t){return o(e.lower,t.lower)}));s=t.map((function(e){return e.upper})),u=t.map((function(e){return e.lower})),l=e,c="next"===e?"":r}h("next");var p=new e.Collection(e,(function(){return Gt(s[0],u[d-1]+r)}));p._ondirectionchange=function(e){h(e)};var f=0;return p._addAlgorithm((function(e,n,r){var i=e.key;if("string"!==typeof i)return!1;var h=a(i);if(t(h,u,f))return!0;for(var p=null,m=f;m<d;++m){var g=Vt(i,h,s[m],u[m],o,l);null===g&&null===p?f=m+1:(null===p||o(p,g)>0)&&(p=g)}return n(null!==p?function(){e.continue(p+c)}:r),!1})),p}function Gt(e,t,n,r){return{type:2,lower:e,upper:t,lowerOpen:n,upperOpen:r}}function Xt(e){return{type:1,lower:e,upper:e}}var Yt=function(){function e(){}return Object.defineProperty(e.prototype,"Collection",{get:function(){return this._ctx.table.db.Collection},enumerable:!1,configurable:!0}),e.prototype.between=function(e,t,n,r){n=!1!==n,r=!0===r;try{return this._cmp(e,t)>0||0===this._cmp(e,t)&&(n||r)&&(!n||!r)?Wt(this):new this.Collection(this,(function(){return Gt(e,t,!n,!r)}))}catch(i){return zt(this,vt)}},e.prototype.equals=function(e){return null==e?zt(this,vt):new this.Collection(this,(function(){return Xt(e)}))},e.prototype.above=function(e){return null==e?zt(this,vt):new this.Collection(this,(function(){return Gt(e,void 0,!0)}))},e.prototype.aboveOrEqual=function(e){return null==e?zt(this,vt):new this.Collection(this,(function(){return Gt(e,void 0,!1)}))},e.prototype.below=function(e){return null==e?zt(this,vt):new this.Collection(this,(function(){return Gt(void 0,e,!1,!0)}))},e.prototype.belowOrEqual=function(e){return null==e?zt(this,vt):new this.Collection(this,(function(){return Gt(void 0,e)}))},e.prototype.startsWith=function(e){return"string"!==typeof e?zt(this,"String expected."):this.between(e,e+gt,!0,!0)},e.prototype.startsWithIgnoreCase=function(e){return""===e?this.startsWith(e):Kt(this,(function(e,t){return 0===e.indexOf(t[0])}),[e],gt)},e.prototype.equalsIgnoreCase=function(e){return Kt(this,(function(e,t){return e===t[0]}),[e],"")},e.prototype.anyOfIgnoreCase=function(){var e=B.apply(j,arguments);return 0===e.length?Wt(this):Kt(this,(function(e,t){return-1!==t.indexOf(e)}),e,"")},e.prototype.startsWithAnyOfIgnoreCase=function(){var e=B.apply(j,arguments);return 0===e.length?Wt(this):Kt(this,(function(e,t){return t.some((function(t){return 0===e.indexOf(t)}))}),e,gt)},e.prototype.anyOf=function(){var e=this,t=B.apply(j,arguments),n=this._cmp;try{t.sort(n)}catch(a){return zt(this,vt)}if(0===t.length)return Wt(this);var r=new this.Collection(this,(function(){return Gt(t[0],t[t.length-1])}));r._ondirectionchange=function(r){n="next"===r?e._ascending:e._descending,t.sort(n)};var i=0;return r._addAlgorithm((function(e,r,a){for(var o=e.key;n(o,t[i])>0;)if(++i===t.length)return r(a),!1;return 0===n(o,t[i])||(r((function(){e.continue(t[i])})),!1)})),r},e.prototype.notEqual=function(e){return this.inAnyRange([[-1/0,e],[e,this.db._maxKey]],{includeLowers:!1,includeUppers:!1})},e.prototype.noneOf=function(){var e=B.apply(j,arguments);if(0===e.length)return new this.Collection(this);try{e.sort(this._ascending)}catch(n){return zt(this,vt)}var t=e.reduce((function(e,t){return e?e.concat([[e[e.length-1][1],t]]):[[-1/0,t]]}),null);return t.push([e[e.length-1],this.db._maxKey]),this.inAnyRange(t,{includeLowers:!1,includeUppers:!1})},e.prototype.inAnyRange=function(e,t){var n=this,r=this._cmp,i=this._ascending,a=this._descending,o=this._min,s=this._max;if(0===e.length)return Wt(this);if(!e.every((function(e){return void 0!==e[0]&&void 0!==e[1]&&i(e[0],e[1])<=0})))return zt(this,"First argument to inAnyRange() must be an Array of two-value Arrays [lower,upper] where upper must not be lower than lower",te.InvalidArgument);var u=!t||!1!==t.includeLowers,l=t&&!0===t.includeUppers;var c,d=i;function h(e,t){return d(e[0],t[0])}try{(c=e.reduce((function(e,t){for(var n=0,i=e.length;n<i;++n){var a=e[n];if(r(t[0],a[1])<0&&r(t[1],a[0])>0){a[0]=o(a[0],t[0]),a[1]=s(a[1],t[1]);break}}return n===i&&e.push(t),e}),[])).sort(h)}catch(y){return zt(this,vt)}var p=0,f=l?function(e){return i(e,c[p][1])>0}:function(e){return i(e,c[p][1])>=0},m=u?function(e){return a(e,c[p][0])>0}:function(e){return a(e,c[p][0])>=0};var g=f,v=new this.Collection(this,(function(){return Gt(c[0][0],c[c.length-1][1],!u,!l)}));return v._ondirectionchange=function(e){"next"===e?(g=f,d=i):(g=m,d=a),c.sort(h)},v._addAlgorithm((function(e,t,r){for(var a=e.key;g(a);)if(++p===c.length)return t(r),!1;return!!function(e){return!f(e)&&!m(e)}(a)||(0===n._cmp(a,c[p][1])||0===n._cmp(a,c[p][0])||t((function(){d===i?e.continue(c[p][0]):e.continue(c[p][1])})),!1)})),v},e.prototype.startsWithAnyOf=function(){var e=B.apply(j,arguments);return e.every((function(e){return"string"===typeof e}))?0===e.length?Wt(this):this.inAnyRange(e.map((function(e){return[e,e+gt]}))):zt(this,"startsWithAnyOf() only works with strings")},e}();function Qt(e){return Ye((function(t){return $t(t),e(t.target.error),!1}))}function $t(e){e.stopPropagation&&e.stopPropagation(),e.preventDefault&&e.preventDefault()}var Zt=At(null,"storagemutated"),Jt=function(){function e(){}return e.prototype._lock=function(){return T(!Oe.global),++this._reculock,1!==this._reculock||Oe.global||(Oe.lockOwnerFor=this),this},e.prototype._unlock=function(){if(T(!Oe.global),0===--this._reculock)for(Oe.global||(Oe.lockOwnerFor=null);this._blockedFuncs.length>0&&!this._locked();){var e=this._blockedFuncs.shift();try{ct(e[1],e[0])}catch(t){}}return this},e.prototype._locked=function(){return this._reculock&&Oe.lockOwnerFor!==this},e.prototype.create=function(e){var t=this;if(!this.mode)return this;var n=this.db.idbdb,r=this.db._state.dbOpenError;if(T(!this.idbtrans),!e&&!n)switch(r&&r.name){case"DatabaseClosedError":throw new te.DatabaseClosed(r);case"MissingAPIError":throw new te.MissingAPI(r.message,r);default:throw new te.OpenFailed(r)}if(!this.active)throw new te.TransactionInactive;return T(null===this._completion._state),(e=this.idbtrans=e||(this.db.core?this.db.core.transaction(this.storeNames,this.mode,{durability:this.chromeTransactionDurability}):n.transaction(this.storeNames,this.mode,{durability:this.chromeTransactionDurability}))).onerror=Ye((function(n){$t(n),t._reject(e.error)})),e.onabort=Ye((function(n){$t(n),t.active&&t._reject(new te.Abort(e.error)),t.active=!1,t.on("abort").fire(n)})),e.oncomplete=Ye((function(){t.active=!1,t._resolve(),"mutatedParts"in e&&Zt.storagemutated.fire(e.mutatedParts)})),this},e.prototype._promise=function(e,t,n){var r=this;if("readwrite"===e&&"readwrite"!==this.mode)return mt(new te.ReadOnly("Transaction is readonly"));if(!this.active)return mt(new te.TransactionInactive);if(this._locked())return new Re((function(i,a){r._blockedFuncs.push([function(){r._promise(e,t,n).then(i,a)},Oe])}));if(n)return nt((function(){var e=new Re((function(e,n){r._lock();var i=t(e,n,r);i&&i.then&&i.then(e,n)}));return e.finally((function(){return r._unlock()})),e._lib=!0,e}));var i=new Re((function(e,n){var i=t(e,n,r);i&&i.then&&i.then(e,n)}));return i._lib=!0,i},e.prototype._root=function(){return this.parent?this.parent._root():this},e.prototype.waitFor=function(e){var t=this._root(),n=Re.resolve(e);if(t._waitingFor)t._waitingFor=t._waitingFor.then((function(){return n}));else{t._waitingFor=n,t._waitingQueue=[];var r=t.idbtrans.objectStore(t.storeNames[0]);!function e(){for(++t._spinCount;t._waitingQueue.length;)t._waitingQueue.shift()();t._waitingFor&&(r.get(-1/0).onsuccess=e)}()}var i=t._waitingFor;return new Re((function(e,r){n.then((function(n){return t._waitingQueue.push(Ye(e.bind(null,n)))}),(function(e){return t._waitingQueue.push(Ye(r.bind(null,e)))})).finally((function(){t._waitingFor===i&&(t._waitingFor=null)}))}))},e.prototype.abort=function(){this.active&&(this.active=!1,this.idbtrans&&this.idbtrans.abort(),this._reject(new te.Abort))},e.prototype.table=function(e){var t=this._memoizedTables||(this._memoizedTables={});if(d(t,e))return t[e];var n=this.schema[e];if(!n)throw new te.NotFound("Table "+e+" not part of transaction");var r=new this.db.Table(e,n,this);return r.core=this.db.core.table(e),t[e]=r,r},e}();function en(e,t,n,r,i,a,o){return{name:e,keyPath:t,unique:n,multi:r,auto:i,compound:a,src:(n&&!o?"&":"")+(r?"*":"")+(i?"++":"")+tn(t)}}function tn(e){return"string"===typeof e?e:e?"["+[].join.call(e,"+")+"]":""}function nn(e,t,n){return{name:e,primKey:t,indexes:n,mappedClass:null,idxByName:w(n,(function(e){return[e.name,e]}))}}var rn=function(e){try{return e.only([[]]),rn=function(){return[[]]},[[]]}catch(t){return rn=function(){return gt},gt}};function an(e){return null==e?function(){}:"string"===typeof e?function(e){return 1===e.split(".").length?function(t){return t[e]}:function(t){return k(t,e)}}(e):function(t){return k(t,e)}}function on(e){return[].slice.call(e)}var sn=0;function un(e){return null==e?":id":"string"===typeof e?e:"["+e.join("+")+"]"}function ln(e,t,n){function r(e){if(3===e.type)return null;if(4===e.type)throw new Error("Cannot convert never type to IDBKeyRange");var n=e.lower,r=e.upper,i=e.lowerOpen,a=e.upperOpen;return void 0===n?void 0===r?null:t.upperBound(r,!!a):void 0===r?t.lowerBound(n,!!i):t.bound(n,r,!!i,!!a)}var i=function(e,t){var n=on(e.objectStoreNames);return{schema:{name:e.name,tables:n.map((function(e){return t.objectStore(e)})).map((function(e){var t=e.keyPath,n=e.autoIncrement,r=s(t),i=null==t,a={},o={name:e.name,primaryKey:{name:null,isPrimaryKey:!0,outbound:i,compound:r,keyPath:t,autoIncrement:n,unique:!0,extractKey:an(t)},indexes:on(e.indexNames).map((function(t){return e.index(t)})).map((function(e){var t=e.name,n=e.unique,r=e.multiEntry,i=e.keyPath,o={name:t,compound:s(i),keyPath:i,unique:n,multiEntry:r,extractKey:an(i)};return a[un(i)]=o,o})),getIndexByKeyPath:function(e){return a[un(e)]}};return a[":id"]=o.primaryKey,null!=t&&(a[un(t)]=o.primaryKey),o}))},hasGetAll:n.length>0&&"getAll"in t.objectStore(n[0])&&!("undefined"!==typeof navigator&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604)}}(e,n),a=i.schema,o=i.hasGetAll,u=a.tables.map((function(e){return function(e){var t=e.name;return{name:t,schema:e,mutate:function(e){var n=e.trans,i=e.type,a=e.keys,o=e.values,s=e.range;return new Promise((function(e,u){e=Ye(e);var l=n.objectStore(t),c=null==l.keyPath,d="put"===i||"add"===i;if(!d&&"delete"!==i&&"deleteRange"!==i)throw new Error("Invalid operation type: "+i);var h,p=(a||o||{length:1}).length;if(a&&o&&a.length!==o.length)throw new Error("Given keys array must have same length as given values array.");if(0===p)return e({numFailures:0,failures:{},results:[],lastResult:void 0});var f=[],m=[],g=0,v=function(e){++g,$t(e)};if("deleteRange"===i){if(4===s.type)return e({numFailures:g,failures:m,results:[],lastResult:void 0});3===s.type?f.push(h=l.clear()):f.push(h=l.delete(r(s)))}else{var y=d?c?[o,a]:[o,null]:[a,null],b=y[0],_=y[1];if(d)for(var T=0;T<p;++T)f.push(h=_&&void 0!==_[T]?l[i](b[T],_[T]):l[i](b[T])),h.onerror=v;else for(T=0;T<p;++T)f.push(h=l[i](b[T])),h.onerror=v}var S=function(t){var n=t.target.result;f.forEach((function(e,t){return null!=e.error&&(m[t]=e.error)})),e({numFailures:g,failures:m,results:"delete"===i?a:f.map((function(e){return e.result})),lastResult:n})};h.onerror=function(e){v(e),S(e)},h.onsuccess=S}))},getMany:function(e){var n=e.trans,r=e.keys;return new Promise((function(e,i){e=Ye(e);for(var a,o=n.objectStore(t),s=r.length,u=new Array(s),l=0,c=0,d=function(t){var n=t.target;u[n._pos]=n.result,++c===l&&e(u)},h=Qt(i),p=0;p<s;++p){null!=r[p]&&((a=o.get(r[p]))._pos=p,a.onsuccess=d,a.onerror=h,++l)}0===l&&e(u)}))},get:function(e){var n=e.trans,r=e.key;return new Promise((function(e,i){e=Ye(e);var a=n.objectStore(t).get(r);a.onsuccess=function(t){return e(t.target.result)},a.onerror=Qt(i)}))},query:function(e){return function(n){return new Promise((function(i,a){i=Ye(i);var o=n.trans,s=n.values,u=n.limit,l=n.query,c=u===1/0?void 0:u,d=l.index,h=l.range,p=o.objectStore(t),f=d.isPrimaryKey?p:p.index(d.name),m=r(h);if(0===u)return i({result:[]});if(e){var g=s?f.getAll(m,c):f.getAllKeys(m,c);g.onsuccess=function(e){return i({result:e.target.result})},g.onerror=Qt(a)}else{var v=0,y=s||!("openKeyCursor"in f)?f.openCursor(m):f.openKeyCursor(m),b=[];y.onsuccess=function(e){var t=y.result;return t?(b.push(s?t.value:t.primaryKey),++v===u?i({result:b}):void t.continue()):i({result:b})},y.onerror=Qt(a)}}))}}(o),openCursor:function(e){var n=e.trans,i=e.values,a=e.query,o=e.reverse,s=e.unique;return new Promise((function(e,u){e=Ye(e);var l=a.index,c=a.range,d=n.objectStore(t),h=l.isPrimaryKey?d:d.index(l.name),p=o?s?"prevunique":"prev":s?"nextunique":"next",f=i||!("openKeyCursor"in h)?h.openCursor(r(c),p):h.openKeyCursor(r(c),p);f.onerror=Qt(u),f.onsuccess=Ye((function(t){var r=f.result;if(r){r.___id=++sn,r.done=!1;var i=r.continue.bind(r),a=r.continuePrimaryKey;a&&(a=a.bind(r));var o=r.advance.bind(r),s=function(){throw new Error("Cursor not stopped")};r.trans=n,r.stop=r.continue=r.continuePrimaryKey=r.advance=function(){throw new Error("Cursor not started")},r.fail=Ye(u),r.next=function(){var e=this,t=1;return this.start((function(){return t--?e.continue():e.stop()})).then((function(){return e}))},r.start=function(e){var t=new Promise((function(e,t){e=Ye(e),f.onerror=Qt(t),r.fail=t,r.stop=function(t){r.stop=r.continue=r.continuePrimaryKey=r.advance=s,e(t)}})),n=function(){if(f.result)try{e()}catch(t){r.fail(t)}else r.done=!0,r.start=function(){throw new Error("Cursor behind last entry")},r.stop()};return f.onsuccess=Ye((function(e){f.onsuccess=n,n()})),r.continue=i,r.continuePrimaryKey=a,r.advance=o,n(),t},e(r)}else e(null)}),u)}))},count:function(e){var n=e.query,i=e.trans,a=n.index,o=n.range;return new Promise((function(e,n){var s=i.objectStore(t),u=a.isPrimaryKey?s:s.index(a.name),l=r(o),c=l?u.count(l):u.count();c.onsuccess=Ye((function(t){return e(t.target.result)})),c.onerror=Qt(n)}))}}}(e)})),l={};return u.forEach((function(e){return l[e.name]=e})),{stack:"dbcore",transaction:e.transaction.bind(e),table:function(e){if(!l[e])throw new Error("Table '"+e+"' not found");return l[e]},MIN_KEY:-1/0,MAX_KEY:rn(t),schema:a}}function cn(e,t,n,i){var a=n.IDBKeyRange;return n.indexedDB,{dbcore:function(e,t){return t.reduce((function(e,t){var n=t.create;return r(r({},e),n(e))}),e)}(ln(t,a,i),e.dbcore)}}function dn(e,t){var n=e._novip,r=t.db,i=cn(n._middlewares,r,n._deps,t);n.core=i.dbcore,n.tables.forEach((function(e){var t=e.name;n.core.schema.tables.some((function(e){return e.name===t}))&&(e.core=n.core.table(t),n[t]instanceof n.Table&&(n[t].core=e.core))}))}function hn(e,t,n,r){var i=e._novip;n.forEach((function(e){var n=r[e];t.forEach((function(t){var r=v(t,e);(!r||"value"in r&&void 0===r.value)&&(t===i.Transaction.prototype||t instanceof i.Transaction?f(t,e,{get:function(){return this.table(e)},set:function(t){p(this,e,{value:t,writable:!0,configurable:!0,enumerable:!0})}}):t[e]=new i.Table(e,n))}))}))}function pn(e,t){var n=e._novip;t.forEach((function(e){for(var t in e)e[t]instanceof n.Table&&delete e[t]}))}function fn(e,t){return e._cfg.version-t._cfg.version}function mn(e,t,n,r){var i=e._dbSchema,a=e._createTransaction("readwrite",e._storeNames,i);a.create(n),a._completion.catch(r);var s=a._reject.bind(a),u=Oe.transless||Oe;nt((function(){Oe.trans=a,Oe.transless=u,0===t?(o(i).forEach((function(e){vn(n,e,i[e].primKey,i[e].indexes)})),dn(e,n),Re.follow((function(){return e.on.populate.fire(a)})).catch(s)):function(e,t,n,r){var i=e._novip,a=[],s=i._versions,u=i._dbSchema=bn(i,i.idbdb,r),l=!1;function c(){return a.length?Re.resolve(a.shift()(n.idbtrans)).then(c):Re.resolve()}return s.filter((function(e){return e._cfg.version>=t})).forEach((function(e){a.push((function(){var a=u,s=e._cfg.dbschema;_n(i,a,r),_n(i,s,r),u=i._dbSchema=s;var c=gn(a,s);c.add.forEach((function(e){vn(r,e[0],e[1].primKey,e[1].indexes)})),c.change.forEach((function(e){if(e.recreate)throw new te.Upgrade("Not yet support for changing primary key");var t=r.objectStore(e.name);e.add.forEach((function(e){return yn(t,e)})),e.change.forEach((function(e){t.deleteIndex(e.name),yn(t,e)})),e.del.forEach((function(e){return t.deleteIndex(e)}))}));var d=e._cfg.contentUpgrade;if(d&&e._cfg.version>t){dn(i,r),n._memoizedTables={},l=!0;var h=E(s);c.del.forEach((function(e){h[e]=a[e]})),pn(i,[i.Transaction.prototype]),hn(i,[i.Transaction.prototype],o(h),h),n.schema=h;var p,f=U(d);f&&rt();var m=Re.follow((function(){if((p=d(n))&&f){var e=it.bind(null,null);p.then(e,e)}}));return p&&"function"===typeof p.then?Re.resolve(p):m.then((function(){return p}))}})),a.push((function(t){l&&_t||function(e,t){[].slice.call(t.db.objectStoreNames).forEach((function(n){return null==e[n]&&t.db.deleteObjectStore(n)}))}(e._cfg.dbschema,t);pn(i,[i.Transaction.prototype]),hn(i,[i.Transaction.prototype],i._storeNames,i._dbSchema),n.schema=i._dbSchema}))})),c().then((function(){var e,t;t=r,o(e=u).forEach((function(n){t.db.objectStoreNames.contains(n)||vn(t,n,e[n].primKey,e[n].indexes)}))}))}(e,t,a,n).catch(s)}))}function gn(e,t){var n,r={del:[],add:[],change:[]};for(n in e)t[n]||r.del.push(n);for(n in t){var i=e[n],a=t[n];if(i){var o={name:n,def:a,recreate:!1,del:[],add:[],change:[]};if(""+(i.primKey.keyPath||"")!==""+(a.primKey.keyPath||"")||i.primKey.auto!==a.primKey.auto&&!bt)o.recreate=!0,r.change.push(o);else{var s=i.idxByName,u=a.idxByName,l=void 0;for(l in s)u[l]||o.del.push(l);for(l in u){var c=s[l],d=u[l];c?c.src!==d.src&&o.change.push(d):o.add.push(d)}(o.del.length>0||o.add.length>0||o.change.length>0)&&r.change.push(o)}}else r.add.push([n,a])}return r}function vn(e,t,n,r){var i=e.db.createObjectStore(t,n.keyPath?{keyPath:n.keyPath,autoIncrement:n.auto}:{autoIncrement:n.auto});return r.forEach((function(e){return yn(i,e)})),i}function yn(e,t){e.createIndex(t.name,t.keyPath,{unique:t.unique,multiEntry:t.multi})}function bn(e,t,n){var r={};return b(t.objectStoreNames,0).forEach((function(e){for(var t=n.objectStore(e),i=t.keyPath,a=en(tn(i),i||"",!1,!1,!!t.autoIncrement,i&&"string"!==typeof i,!0),o=[],s=0;s<t.indexNames.length;++s){var u=t.index(t.indexNames[s]);i=u.keyPath;var l=en(u.name,i,!!u.unique,!!u.multiEntry,!1,i&&"string"!==typeof i,!1);o.push(l)}r[e]=nn(e,a,o)})),r}function _n(e,t,n){for(var r=e._novip,i=n.db.objectStoreNames,o=0;o<i.length;++o){var s=i[o],u=n.objectStore(s);r._hasGetAll="getAll"in u;for(var l=0;l<u.indexNames.length;++l){var c=u.indexNames[l],d=u.index(c).keyPath,h="string"===typeof d?d:"["+b(d).join("+")+"]";if(t[s]){var p=t[s].idxByName[h];p&&(p.name=c,delete t[s].idxByName[h],t[s].idxByName[c]=p)}}}"undefined"!==typeof navigator&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&a.WorkerGlobalScope&&a instanceof a.WorkerGlobalScope&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604&&(r._hasGetAll=!1)}var Tn=function(){function e(){}return e.prototype._parseStoresSpec=function(e,t){o(e).forEach((function(n){if(null!==e[n]){var r=e[n].split(",").map((function(e,t){var n=(e=e.trim()).replace(/([&*]|\+\+)/g,""),r=/^\[/.test(n)?n.match(/^\[(.*)\]$/)[1].split("+"):n;return en(n,r||null,/\&/.test(e),/\*/.test(e),/\+\+/.test(e),s(r),0===t)})),i=r.shift();if(i.multi)throw new te.Schema("Primary key cannot be multi-valued");r.forEach((function(e){if(e.auto)throw new te.Schema("Only primary key can be marked as autoIncrement (++)");if(!e.keyPath)throw new te.Schema("Index must have a name and cannot be an empty string")})),t[n]=nn(n,i,r)}}))},e.prototype.stores=function(e){var t=this.db;this._cfg.storesSource=this._cfg.storesSource?u(this._cfg.storesSource,e):e;var n=t._versions,r={},i={};return n.forEach((function(e){u(r,e._cfg.storesSource),i=e._cfg.dbschema={},e._parseStoresSpec(r,i)})),t._dbSchema=i,pn(t,[t._allTables,t,t.Transaction.prototype]),hn(t,[t._allTables,t,t.Transaction.prototype,this._cfg.tables],o(i),i),t._storeNames=o(i),this},e.prototype.upgrade=function(e){return this._cfg.contentUpgrade=he(this._cfg.contentUpgrade||ie,e),this},e}();function Sn(e,t){var n=e._dbNamesDB;return n||(n=e._dbNamesDB=new Gn("__dbnames",{addons:[],indexedDB:e,IDBKeyRange:t})).version(1).stores({dbnames:"name"}),n.table("dbnames")}function wn(e){return e&&"function"===typeof e.databases}function kn(e,t){var n=e.indexedDB,r=e.IDBKeyRange;!wn(n)&&"__dbnames"!==t&&Sn(n,r).delete(t).catch(ie)}function Cn(e){return nt((function(){return Oe.letThrough=!0,e()}))}function En(){var e;return!navigator.userAgentData&&/Safari\//.test(navigator.userAgent)&&!/Chrom(e|ium)\//.test(navigator.userAgent)&&indexedDB.databases?new Promise((function(t){var n=function(){return indexedDB.databases().finally(t)};e=setInterval(n,100),n()})).finally((function(){return clearInterval(e)})):Promise.resolve()}function An(e){var t=e._state,n=e._deps.indexedDB;if(t.isBeingOpened||e.idbdb)return t.dbReadyPromise.then((function(){return t.dbOpenError?mt(t.dbOpenError):e}));F&&(t.openCanceller._stackHolder=W()),t.isBeingOpened=!0,t.dbOpenError=null,t.openComplete=!1;var r=t.openCanceller;function i(){if(t.openCanceller!==r)throw new te.DatabaseClosed("db.open() was cancelled")}var a=t.dbReadyResolve,s=null,u=!1;return Re.race([r,("undefined"===typeof navigator?Re.resolve():En()).then((function(){return new Re((function(r,a){if(i(),!n)throw new te.MissingAPI;var l=e.name,c=t.autoSchema?n.open(l):n.open(l,Math.round(10*e.verno));if(!c)throw new te.MissingAPI;c.onerror=Qt(a),c.onblocked=Ye(e._fireOnBlocked),c.onupgradeneeded=Ye((function(r){if(s=c.transaction,t.autoSchema&&!e._options.allowEmptyDB){c.onerror=$t,s.abort(),c.result.close();var i=n.deleteDatabase(l);i.onsuccess=i.onerror=Ye((function(){a(new te.NoSuchDatabase("Database "+l+" doesnt exist"))}))}else{s.onerror=Qt(a);var o=r.oldVersion>Math.pow(2,62)?0:r.oldVersion;u=o<1,e._novip.idbdb=c.result,mn(e,o/10,s,a)}}),a),c.onsuccess=Ye((function(){s=null;var n,i=e._novip.idbdb=c.result,a=b(i.objectStoreNames);if(a.length>0)try{var d=i.transaction(1===(n=a).length?n[0]:n,"readonly");t.autoSchema?function(e,t,n){var r=e._novip;r.verno=t.version/10;var i=r._dbSchema=bn(0,t,n);r._storeNames=b(t.objectStoreNames,0),hn(r,[r._allTables],o(i),i)}(e,i,d):(_n(e,e._dbSchema,d),function(e,t){var n=gn(bn(0,e.idbdb,t),e._dbSchema);return!(n.add.length||n.change.some((function(e){return e.add.length||e.change.length})))}(e,d)||console.warn("Dexie SchemaDiff: Schema was extended without increasing the number passed to db.version(). Some queries may fail.")),dn(e,d)}catch(h){}yt.push(e),i.onversionchange=Ye((function(n){t.vcFired=!0,e.on("versionchange").fire(n)})),i.onclose=Ye((function(t){e.on("close").fire(t)})),u&&function(e,t){var n=e.indexedDB,r=e.IDBKeyRange;!wn(n)&&"__dbnames"!==t&&Sn(n,r).put({name:t}).catch(ie)}(e._deps,l),r()}),a)}))}))]).then((function(){return i(),t.onReadyBeingFired=[],Re.resolve(Cn((function(){return e.on.ready.fire(e.vip)}))).then((function n(){if(t.onReadyBeingFired.length>0){var r=t.onReadyBeingFired.reduce(he,ie);return t.onReadyBeingFired=[],Re.resolve(Cn((function(){return r(e.vip)}))).then(n)}}))})).finally((function(){t.onReadyBeingFired=null,t.isBeingOpened=!1})).then((function(){return e})).catch((function(n){t.dbOpenError=n;try{s&&s.abort()}catch(Nn){}return r===t.openCanceller&&e._close(),mt(n)})).finally((function(){t.openComplete=!0,a()}))}function xn(e){var t=function(t){return e.next(t)},n=i(t),r=i((function(t){return e.throw(t)}));function i(e){return function(t){var i=e(t),a=i.value;return i.done?a:a&&"function"===typeof a.then?a.then(n,r):s(a)?Promise.all(a).then(n,r):n(a)}}return i(t)()}function Pn(e,t,n){var r=arguments.length;if(r<2)throw new te.InvalidArgument("Too few arguments");for(var i=new Array(r-1);--r;)i[r-1]=arguments[r];n=i.pop();var a=x(i);return[e,a,n]}function In(e,t,n,r,i){return Re.resolve().then((function(){var a=Oe.transless||Oe,o=e._createTransaction(t,n,e._dbSchema,r),s={trans:o,transless:a};if(r)o.idbtrans=r.idbtrans;else try{o.create(),e._state.PR1398_maxLoop=3}catch(d){return d.name===J.InvalidState&&e.isOpen()&&--e._state.PR1398_maxLoop>0?(console.warn("Dexie: Need to reopen db"),e._close(),e.open().then((function(){return In(e,t,n,null,i)}))):mt(d)}var u,l=U(i);l&&rt();var c=Re.follow((function(){if(u=i.call(o,o))if(l){var e=it.bind(null,null);u.then(e,e)}else"function"===typeof u.next&&"function"===typeof u.throw&&(u=xn(u))}),s);return(u&&"function"===typeof u.then?Re.resolve(u).then((function(e){return o.active?e:mt(new te.PrematureCommit("Transaction committed too early. See http://bit.ly/2kdckMn"))})):c.then((function(){return u}))).then((function(e){return r&&o._resolve(),o._completion.then((function(){return e}))})).catch((function(e){return o._reject(e),mt(e)}))}))}function On(e,t,n){for(var r=s(e)?e.slice():[e],i=0;i<n;++i)r.push(t);return r}var Ln={stack:"dbcore",name:"VirtualIndexMiddleware",level:1,create:function(e){return r(r({},e),{table:function(t){var n=e.table(t),i=n.schema,a={},o=[];function s(e,t,n){var i=un(e),u=a[i]=a[i]||[],l=null==e?0:"string"===typeof e?1:e.length,c=t>0,d=r(r({},n),{isVirtual:c,keyTail:t,keyLength:l,extractKey:an(e),unique:!c&&n.unique});(u.push(d),d.isPrimaryKey||o.push(d),l>1)&&s(2===l?e[0]:e.slice(0,l-1),t+1,n);return u.sort((function(e,t){return e.keyTail-t.keyTail})),d}var u=s(i.primaryKey.keyPath,0,i.primaryKey);a[":id"]=[u];for(var l=0,c=i.indexes;l<c.length;l++){var d=c[l];s(d.keyPath,0,d)}function h(t){var n,i,a=t.query.index;return a.isVirtual?r(r({},t),{query:{index:a,range:(n=t.query.range,i=a.keyTail,{type:1===n.type?2:n.type,lower:On(n.lower,n.lowerOpen?e.MAX_KEY:e.MIN_KEY,i),lowerOpen:!0,upper:On(n.upper,n.upperOpen?e.MIN_KEY:e.MAX_KEY,i),upperOpen:!0})}}):t}return r(r({},n),{schema:r(r({},i),{primaryKey:u,indexes:o,getIndexByKeyPath:function(e){var t=a[un(e)];return t&&t[0]}}),count:function(e){return n.count(h(e))},query:function(e){return n.query(h(e))},openCursor:function(t){var r=t.query.index,i=r.keyTail,a=r.isVirtual,o=r.keyLength;if(!a)return n.openCursor(t);return n.openCursor(h(t)).then((function(n){return n&&function(n){return Object.create(n,{continue:{value:function(r){null!=r?n.continue(On(r,t.reverse?e.MAX_KEY:e.MIN_KEY,i)):t.unique?n.continue(n.key.slice(0,o).concat(t.reverse?e.MIN_KEY:e.MAX_KEY,i)):n.continue()}},continuePrimaryKey:{value:function(t,r){n.continuePrimaryKey(On(t,e.MAX_KEY,i),r)}},primaryKey:{get:function(){return n.primaryKey}},key:{get:function(){var e=n.key;return 1===o?e[0]:e.slice(0,o)}},value:{get:function(){return n.value}}})}(n)}))}})}})}};function Dn(e,t,n,r){return n=n||{},r=r||"",o(e).forEach((function(i){if(d(t,i)){var a=e[i],o=t[i];if("object"===typeof a&&"object"===typeof o&&a&&o){var s=M(a);s!==M(o)?n[r+i]=t[i]:"Object"===s?Dn(a,o,n,r+i+"."):a!==o&&(n[r+i]=t[i])}else a!==o&&(n[r+i]=t[i])}else n[r+i]=void 0})),o(t).forEach((function(i){d(e,i)||(n[r+i]=t[i])})),n}var Mn={stack:"dbcore",name:"HooksMiddleware",level:2,create:function(e){return r(r({},e),{table:function(t){var n=e.table(t),a=n.schema.primaryKey;return r(r({},n),{mutate:function(e){var o=Oe.trans,s=o.table(t).hook,u=s.deleting,l=s.creating,c=s.updating;switch(e.type){case"add":if(l.fire===ie)break;return o._promise("readwrite",(function(){return h(e)}),!0);case"put":if(l.fire===ie&&c.fire===ie)break;return o._promise("readwrite",(function(){return h(e)}),!0);case"delete":if(u.fire===ie)break;return o._promise("readwrite",(function(){return h(e)}),!0);case"deleteRange":if(u.fire===ie)break;return o._promise("readwrite",(function(){return function(e){return function e(t,i,o){return n.query({trans:t,values:!1,query:{index:a,range:i},limit:o}).then((function(n){var a=n.result;return h({type:"delete",keys:a,trans:t}).then((function(n){return n.numFailures>0?Promise.reject(n.failures[0]):a.length<o?{failures:[],numFailures:0,lastResult:void 0}:e(t,r(r({},i),{lower:a[a.length-1],lowerOpen:!0}),o)}))}))}(e.trans,e.range,1e4)}(e)}),!0)}return n.mutate(e);function h(e){var t=Oe.trans,o=e.keys||function(e,t){return"delete"===t.type?t.keys:t.keys||t.values.map(e.extractKey)}(a,e);if(!o)throw new Error("Keys missing");return"delete"!==(e="add"===e.type||"put"===e.type?r(r({},e),{keys:o}):r({},e)).type&&(e.values=i([],e.values,!0)),e.keys&&(e.keys=i([],e.keys,!0)),function(e,t,n){return"add"===t.type?Promise.resolve([]):e.getMany({trans:t.trans,keys:n,cache:"immutable"})}(n,e,o).then((function(r){var i=o.map((function(n,i){var o=r[i],s={onerror:null,onsuccess:null};if("delete"===e.type)u.fire.call(s,n,o,t);else if("add"===e.type||void 0===o){var h=l.fire.call(s,n,e.values[i],t);null==n&&null!=h&&(n=h,e.keys[i]=n,a.outbound||C(e.values[i],a.keyPath,n))}else{var p=Dn(o,e.values[i]),f=c.fire.call(s,p,n,o,t);if(f){var m=e.values[i];Object.keys(f).forEach((function(e){d(m,e)?m[e]=f[e]:C(m,e,f[e])}))}}return s}));return n.mutate(e).then((function(t){for(var n=t.failures,a=t.results,s=t.numFailures,u=t.lastResult,l=0;l<o.length;++l){var c=a?a[l]:o[l],d=i[l];null==c?d.onerror&&d.onerror(n[l]):d.onsuccess&&d.onsuccess("put"===e.type&&r[l]?e.values[l]:c)}return{failures:n,results:a,numFailures:s,lastResult:u}})).catch((function(e){return i.forEach((function(t){return t.onerror&&t.onerror(e)})),Promise.reject(e)}))}))}}})}})}};function Rn(e,t,n){try{if(!t)return null;if(t.keys.length<e.length)return null;for(var r=[],i=0,a=0;i<t.keys.length&&a<e.length;++i)0===Nt(t.keys[i],e[a])&&(r.push(n?L(t.values[i]):t.values[i]),++a);return r.length===e.length?r:null}catch(Nn){return null}}var Nn,jn={stack:"dbcore",level:-1,create:function(e){return{table:function(t){var n=e.table(t);return r(r({},n),{getMany:function(e){if(!e.cache)return n.getMany(e);var t=Rn(e.keys,e.trans._cache,"clone"===e.cache);return t?Re.resolve(t):n.getMany(e).then((function(t){return e.trans._cache={keys:e.keys,values:"clone"===e.cache?L(t):t},t}))},mutate:function(e){return"add"!==e.type&&(e.trans._cache=null),n.mutate(e)}})}}}};function Bn(e){return!("from"in e)}var Un=function(e,t){if(!this){var n=new Un;return e&&"d"in e&&u(n,e),n}u(this,arguments.length?{d:1,from:e,to:arguments.length>1?t:e}:{d:0})};function Fn(e,t,n){var r=Nt(t,n);if(!isNaN(r)){if(r>0)throw RangeError();if(Bn(e))return u(e,{from:t,to:n,d:1});var i=e.l,a=e.r;if(Nt(n,e.from)<0)return i?Fn(i,t,n):e.l={from:t,to:n,d:1,l:null,r:null},zn(e);if(Nt(t,e.to)>0)return a?Fn(a,t,n):e.r={from:t,to:n,d:1,l:null,r:null},zn(e);Nt(t,e.from)<0&&(e.from=t,e.l=null,e.d=a?a.d+1:1),Nt(n,e.to)>0&&(e.to=n,e.r=null,e.d=e.l?e.l.d+1:1);var o=!e.r;i&&!e.l&&qn(e,i),a&&o&&qn(e,a)}}function qn(e,t){Bn(t)||function e(t,n){var r=n.from,i=n.to,a=n.l,o=n.r;Fn(t,r,i),a&&e(t,a),o&&e(t,o)}(e,t)}function Hn(e){var t=Bn(e)?null:{s:0,n:e};return{next:function(e){for(var n=arguments.length>0;t;)switch(t.s){case 0:if(t.s=1,n)for(;t.n.l&&Nt(e,t.n.from)<0;)t={up:t,n:t.n.l,s:1};else for(;t.n.l;)t={up:t,n:t.n.l,s:1};case 1:if(t.s=2,!n||Nt(e,t.n.to)<=0)return{value:t.n,done:!1};case 2:if(t.n.r){t.s=3,t={up:t,n:t.n.r,s:0};continue}case 3:t=t.up}return{done:!0}}}}function zn(e){var t,n,i=((null===(t=e.r)||void 0===t?void 0:t.d)||0)-((null===(n=e.l)||void 0===n?void 0:n.d)||0),a=i>1?"r":i<-1?"l":"";if(a){var o="r"===a?"l":"r",s=r({},e),u=e[a];e.from=u.from,e.to=u.to,e[a]=u[a],s[a]=u[o],e[o]=s,s.d=Wn(s)}e.d=Wn(e)}function Wn(e){var t=e.r,n=e.l;return(t?n?Math.max(t.d,n.d):t.d:n?n.d:0)+1}h(Un.prototype,((Nn={add:function(e){return qn(this,e),this},addKey:function(e){return Fn(this,e,e),this},addKeys:function(e){var t=this;return e.forEach((function(e){return Fn(t,e,e)})),this}})[R]=function(){return Hn(this)},Nn));var Vn={stack:"dbcore",level:0,create:function(e){var t=e.schema.name,n=new Un(e.MIN_KEY,e.MAX_KEY);return r(r({},e),{table:function(i){var a=e.table(i),u=a.schema,l=u.primaryKey,c=l.extractKey,d=l.outbound,h=r(r({},a),{mutate:function(e){var r=e.trans,o=r.mutatedParts||(r.mutatedParts={}),l=function(e){var n="idb://"+t+"/"+i+"/"+e;return o[n]||(o[n]=new Un)},c=l(""),d=l(":dels"),h=e.type,p="deleteRange"===e.type?[e.range]:"delete"===e.type?[e.keys]:e.values.length<50?[[],e.values]:[],f=p[0],m=p[1],g=e.trans._cache;return a.mutate(e).then((function(e){if(s(f)){"delete"!==h&&(f=e.results),c.addKeys(f);var t=Rn(f,g);t||"add"===h||d.addKeys(f),(t||m)&&function(e,t,n,r){t.indexes.forEach((function(t){var i=e(t.name||"");function a(e){return null!=e?t.extractKey(e):null}var o=function(e){return t.multiEntry&&s(e)?e.forEach((function(e){return i.addKey(e)})):i.addKey(e)};(n||r).forEach((function(e,t){var i=n&&a(n[t]),s=r&&a(r[t]);0!==Nt(i,s)&&(null!=i&&o(i),null!=s&&o(s))}))}))}(l,u,t,m)}else if(f){var r={from:f.lower,to:f.upper};d.add(r),c.add(r)}else c.add(n),d.add(n),u.indexes.forEach((function(e){return l(e.name).add(n)}));return e}))}}),p=function(t){var n,r,i=t.query,a=i.index,o=i.range;return[a,new Un(null!==(n=o.lower)&&void 0!==n?n:e.MIN_KEY,null!==(r=o.upper)&&void 0!==r?r:e.MAX_KEY)]},f={get:function(e){return[l,new Un(e.key)]},getMany:function(e){return[l,(new Un).addKeys(e.keys)]},count:p,query:p,openCursor:p};return o(f).forEach((function(e){h[e]=function(o){var s=Oe.subscr;if(s){var u=function(e){var n="idb://"+t+"/"+i+"/"+e;return s[n]||(s[n]=new Un)},l=u(""),h=u(":dels"),p=f[e](o),m=p[0],g=p[1];if(u(m.name||"").add(g),!m.isPrimaryKey){if("count"!==e){var v="query"===e&&d&&o.values&&a.query(r(r({},o),{values:!1}));return a[e].apply(this,arguments).then((function(t){if("query"===e){if(d&&o.values)return v.then((function(e){var n=e.result;return l.addKeys(n),t}));var n=o.values?t.result.map(c):t.result;o.values?l.addKeys(n):h.addKeys(n)}else if("openCursor"===e){var r=t,i=o.values;return r&&Object.create(r,{key:{get:function(){return h.addKey(r.primaryKey),r.key}},primaryKey:{get:function(){var e=r.primaryKey;return h.addKey(e),e}},value:{get:function(){return i&&l.addKey(r.primaryKey),r.value}}})}return t}))}h.add(n)}}return a[e].apply(this,arguments)}})),h}})}};var Kn,Gn=function(){function e(t,n){var i=this;this._middlewares={},this.verno=0;var a=e.dependencies;this._options=n=r({addons:e.addons,autoOpen:!0,indexedDB:a.indexedDB,IDBKeyRange:a.IDBKeyRange},n),this._deps={indexedDB:n.indexedDB,IDBKeyRange:n.IDBKeyRange};var o=n.addons;this._dbSchema={},this._versions=[],this._storeNames=[],this._allTables={},this.idbdb=null,this._novip=this;var s={dbOpenError:null,isBeingOpened:!1,onReadyBeingFired:null,openComplete:!1,dbReadyResolve:ie,dbReadyPromise:null,cancelOpen:ie,openCanceller:null,autoSchema:!0,PR1398_maxLoop:3};s.dbReadyPromise=new Re((function(e){s.dbReadyResolve=e})),s.openCanceller=new Re((function(e,t){s.cancelOpen=t})),this._state=s,this.name=t,this.on=At(this,"populate","blocked","versionchange","close",{ready:[he,ie]}),this.on.ready.subscribe=_(this.on.ready.subscribe,(function(t){return function(n,r){e.vip((function(){var e=i._state;if(e.openComplete)e.dbOpenError||Re.resolve().then(n),r&&t(n);else if(e.onReadyBeingFired)e.onReadyBeingFired.push(n),r&&t(n);else{t(n);var a=i;r||t((function e(){a.on.ready.unsubscribe(n),a.on.ready.unsubscribe(e)}))}}))}})),this.Collection=function(e){return xt(Ut.prototype,(function(t,n){this.db=e;var r=kt,i=null;if(n)try{r=n()}catch(u){i=u}var a=t._ctx,o=a.table,s=o.hook.reading.fire;this._ctx={table:o,index:a.index,isPrimKey:!a.index||o.schema.primKey.keyPath&&a.index===o.schema.primKey.name,range:r,keysOnly:!1,dir:"next",unique:"",algorithm:null,filter:null,replayFilter:null,justLimit:!0,isMatch:null,offset:0,limit:1/0,error:i,or:a.or,valueMapper:s!==ae?s:null}}))}(this),this.Table=function(e){return xt(Et.prototype,(function(t,n,r){this.db=e,this._tx=r,this.name=t,this.schema=n,this.hook=e._allTables[t]?e._allTables[t].hook:At(null,{creating:[ue,ie],reading:[oe,ae],updating:[ce,ie],deleting:[le,ie]})}))}(this),this.Transaction=function(e){return xt(Jt.prototype,(function(t,n,r,i,a){var o=this;this.db=e,this.mode=t,this.storeNames=n,this.schema=r,this.chromeTransactionDurability=i,this.idbtrans=null,this.on=At(this,"complete","error","abort"),this.parent=a||null,this.active=!0,this._reculock=0,this._blockedFuncs=[],this._resolve=null,this._reject=null,this._waitingFor=null,this._waitingQueue=null,this._spinCount=0,this._completion=new Re((function(e,t){o._resolve=e,o._reject=t})),this._completion.then((function(){o.active=!1,o.on.complete.fire()}),(function(e){var t=o.active;return o.active=!1,o.on.error.fire(e),o.parent?o.parent._reject(e):t&&o.idbtrans&&o.idbtrans.abort(),mt(e)}))}))}(this),this.Version=function(e){return xt(Tn.prototype,(function(t){this.db=e,this._cfg={version:t,storesSource:null,dbschema:{},tables:{},contentUpgrade:null}}))}(this),this.WhereClause=function(e){return xt(Yt.prototype,(function(t,n,r){this.db=e,this._ctx={table:t,index:":id"===n?null:n,or:r};var i=e._deps.indexedDB;if(!i)throw new te.MissingAPI;this._cmp=this._ascending=i.cmp.bind(i),this._descending=function(e,t){return i.cmp(t,e)},this._max=function(e,t){return i.cmp(e,t)>0?e:t},this._min=function(e,t){return i.cmp(e,t)<0?e:t},this._IDBKeyRange=e._deps.IDBKeyRange}))}(this),this.on("versionchange",(function(e){e.newVersion>0?console.warn("Another connection wants to upgrade database '"+i.name+"'. Closing db now to resume the upgrade."):console.warn("Another connection wants to delete database '"+i.name+"'. Closing db now to resume the delete request."),i.close()})),this.on("blocked",(function(e){!e.newVersion||e.newVersion<e.oldVersion?console.warn("Dexie.delete('"+i.name+"') was blocked"):console.warn("Upgrade '"+i.name+"' blocked by other connection holding version "+e.oldVersion/10)})),this._maxKey=rn(n.IDBKeyRange),this._createTransaction=function(e,t,n,r){return new i.Transaction(e,t,n,i._options.chromeTransactionDurability,r)},this._fireOnBlocked=function(e){i.on("blocked").fire(e),yt.filter((function(e){return e.name===i.name&&e!==i&&!e._state.vcFired})).map((function(t){return t.on("versionchange").fire(e)}))},this.use(Ln),this.use(Mn),this.use(Vn),this.use(jn),this.vip=Object.create(this,{_vip:{value:!0}}),o.forEach((function(e){return e(i)}))}return e.prototype.version=function(e){if(isNaN(e)||e<.1)throw new te.Type("Given version is not a positive number");if(e=Math.round(10*e)/10,this.idbdb||this._state.isBeingOpened)throw new te.Schema("Cannot add version when database is open");this.verno=Math.max(this.verno,e);var t=this._versions,n=t.filter((function(t){return t._cfg.version===e}))[0];return n||(n=new this.Version(e),t.push(n),t.sort(fn),n.stores({}),this._state.autoSchema=!1,n)},e.prototype._whenReady=function(e){var t=this;return this.idbdb&&(this._state.openComplete||Oe.letThrough||this._vip)?e():new Re((function(e,n){if(t._state.openComplete)return n(new te.DatabaseClosed(t._state.dbOpenError));if(!t._state.isBeingOpened){if(!t._options.autoOpen)return void n(new te.DatabaseClosed);t.open().catch(ie)}t._state.dbReadyPromise.then(e,n)})).then(e)},e.prototype.use=function(e){var t=e.stack,n=e.create,r=e.level,i=e.name;i&&this.unuse({stack:t,name:i});var a=this._middlewares[t]||(this._middlewares[t]=[]);return a.push({stack:t,create:n,level:null==r?10:r,name:i}),a.sort((function(e,t){return e.level-t.level})),this},e.prototype.unuse=function(e){var t=e.stack,n=e.name,r=e.create;return t&&this._middlewares[t]&&(this._middlewares[t]=this._middlewares[t].filter((function(e){return r?e.create!==r:!!n&&e.name!==n}))),this},e.prototype.open=function(){return An(this)},e.prototype._close=function(){var e=this._state,t=yt.indexOf(this);if(t>=0&&yt.splice(t,1),this.idbdb){try{this.idbdb.close()}catch(n){}this._novip.idbdb=null}e.dbReadyPromise=new Re((function(t){e.dbReadyResolve=t})),e.openCanceller=new Re((function(t,n){e.cancelOpen=n}))},e.prototype.close=function(){this._close();var e=this._state;this._options.autoOpen=!1,e.dbOpenError=new te.DatabaseClosed,e.isBeingOpened&&e.cancelOpen(e.dbOpenError)},e.prototype.delete=function(){var e=this,t=arguments.length>0,n=this._state;return new Re((function(r,i){var a=function(){e.close();var t=e._deps.indexedDB.deleteDatabase(e.name);t.onsuccess=Ye((function(){kn(e._deps,e.name),r()})),t.onerror=Qt(i),t.onblocked=e._fireOnBlocked};if(t)throw new te.InvalidArgument("Arguments not allowed in db.delete()");n.isBeingOpened?n.dbReadyPromise.then(a):a()}))},e.prototype.backendDB=function(){return this.idbdb},e.prototype.isOpen=function(){return null!==this.idbdb},e.prototype.hasBeenClosed=function(){var e=this._state.dbOpenError;return e&&"DatabaseClosed"===e.name},e.prototype.hasFailed=function(){return null!==this._state.dbOpenError},e.prototype.dynamicallyOpened=function(){return this._state.autoSchema},Object.defineProperty(e.prototype,"tables",{get:function(){var e=this;return o(this._allTables).map((function(t){return e._allTables[t]}))},enumerable:!1,configurable:!0}),e.prototype.transaction=function(){var e=Pn.apply(this,arguments);return this._transaction.apply(this,e)},e.prototype._transaction=function(e,t,n){var r=this,i=Oe.trans;i&&i.db===this&&-1===e.indexOf("!")||(i=null);var a,o,s=-1!==e.indexOf("?");e=e.replace("!","").replace("?","");try{if(o=t.map((function(e){var t=e instanceof r.Table?e.name:e;if("string"!==typeof t)throw new TypeError("Invalid table argument to Dexie.transaction(). Only Table or String are allowed");return t})),"r"==e||"readonly"===e)a="readonly";else{if("rw"!=e&&"readwrite"!=e)throw new te.InvalidArgument("Invalid transaction mode: "+e);a="readwrite"}if(i){if("readonly"===i.mode&&"readwrite"===a){if(!s)throw new te.SubTransaction("Cannot enter a sub-transaction with READWRITE mode when parent transaction is READONLY");i=null}i&&o.forEach((function(e){if(i&&-1===i.storeNames.indexOf(e)){if(!s)throw new te.SubTransaction("Table "+e+" not included in parent transaction.");i=null}})),s&&i&&!i.active&&(i=null)}}catch(l){return i?i._promise(null,(function(e,t){t(l)})):mt(l)}var u=In.bind(null,this,a,o,i,n);return i?i._promise(a,u,"lock"):Oe.trans?ct(Oe.transless,(function(){return r._whenReady(u)})):this._whenReady(u)},e.prototype.table=function(e){if(!d(this._allTables,e))throw new te.InvalidTable("Table "+e+" does not exist");return this._allTables[e]},e}(),Xn="undefined"!==typeof Symbol&&"observable"in Symbol?Symbol.observable:"@@observable",Yn=function(){function e(e){this._subscribe=e}return e.prototype.subscribe=function(e,t,n){return this._subscribe(e&&"function"!==typeof e?e:{next:e,error:t,complete:n})},e.prototype[Xn]=function(){return this},e}();function Qn(e,t){return o(t).forEach((function(n){qn(e[n]||(e[n]=new Un),t[n])})),e}try{Kn={indexedDB:a.indexedDB||a.mozIndexedDB||a.webkitIndexedDB||a.msIndexedDB,IDBKeyRange:a.IDBKeyRange||a.webkitIDBKeyRange}}catch(ir){Kn={indexedDB:null,IDBKeyRange:null}}var $n=Gn;function Zn(e){var t=Jn;try{Jn=!0,Zt.storagemutated.fire(e)}finally{Jn=t}}h($n,r(r({},re),{delete:function(e){return new $n(e,{addons:[]}).delete()},exists:function(e){return new $n(e,{addons:[]}).open().then((function(e){return e.close(),!0})).catch("NoSuchDatabaseError",(function(){return!1}))},getDatabaseNames:function(e){try{return function(e){var t=e.indexedDB,n=e.IDBKeyRange;return wn(t)?Promise.resolve(t.databases()).then((function(e){return e.map((function(e){return e.name})).filter((function(e){return"__dbnames"!==e}))})):Sn(t,n).toCollection().primaryKeys()}($n.dependencies).then(e)}catch(Nn){return mt(new te.MissingAPI)}},defineClass:function(){return function(e){u(this,e)}},ignoreTransaction:function(e){return Oe.trans?ct(Oe.transless,e):e()},vip:Cn,async:function(e){return function(){try{var t=xn(e.apply(this,arguments));return t&&"function"===typeof t.then?t:Re.resolve(t)}catch(ir){return mt(ir)}}},spawn:function(e,t,n){try{var r=xn(e.apply(n,t||[]));return r&&"function"===typeof r.then?r:Re.resolve(r)}catch(ir){return mt(ir)}},currentTransaction:{get:function(){return Oe.trans||null}},waitFor:function(e,t){var n=Re.resolve("function"===typeof e?$n.ignoreTransaction(e):e).timeout(t||6e4);return Oe.trans?Oe.trans.waitFor(n):n},Promise:Re,debug:{get:function(){return F},set:function(e){q(e,"dexie"===e?function(){return!0}:St)}},derive:m,extend:u,props:h,override:_,Events:At,on:Zt,liveQuery:function(e){return new Yn((function(t){var n=U(e);var r=!1,i={},a={},s={get closed(){return r},unsubscribe:function(){r=!0,Zt.storagemutated.unsubscribe(d)}};t.start&&t.start(s);var u=!1,l=!1;function c(){return o(a).some((function(e){return i[e]&&function(e,t){var n=Hn(t),r=n.next();if(r.done)return!1;for(var i=r.value,a=Hn(e),o=a.next(i.from),s=o.value;!r.done&&!o.done;){if(Nt(s.from,i.to)<=0&&Nt(s.to,i.from)>=0)return!0;Nt(i.from,s.from)<0?i=(r=n.next(s.from)).value:s=(o=a.next(i.from)).value}return!1}(i[e],a[e])}))}var d=function(e){Qn(i,e),c()&&h()},h=function(){if(!u&&!r){i={};var o={},p=function(t){n&&rt();var r=function(){return nt(e,{subscr:t,trans:null})},i=Oe.trans?ct(Oe.transless,r):r();return n&&i.then(it,it),i}(o);l||(Zt("storagemutated",d),l=!0),u=!0,Promise.resolve(p).then((function(e){u=!1,r||(c()?h():(i={},a=o,t.next&&t.next(e)))}),(function(e){u=!1,t.error&&t.error(e),s.unsubscribe()}))}};return h(),s}))},extendObservabilitySet:Qn,getByKeyPath:k,setByKeyPath:C,delByKeyPath:function(e,t){"string"===typeof t?C(e,t,void 0):"length"in t&&[].map.call(t,(function(t){C(e,t,void 0)}))},shallowClone:E,deepClone:L,getObjectDiff:Dn,cmp:Nt,asap:S,minKey:-1/0,addons:[],connections:yt,errnames:J,dependencies:Kn,semVer:"3.2.3",version:"3.2.3".split(".").map((function(e){return parseInt(e)})).reduce((function(e,t,n){return e+t/Math.pow(10,2*n)}))})),$n.maxKey=rn($n.dependencies.IDBKeyRange),"undefined"!==typeof dispatchEvent&&"undefined"!==typeof addEventListener&&(Zt("storagemutated",(function(e){var t;Jn||(bt?(t=document.createEvent("CustomEvent")).initCustomEvent("x-storagemutated-1",!0,!0,e):t=new CustomEvent("x-storagemutated-1",{detail:e}),Jn=!0,dispatchEvent(t),Jn=!1)})),addEventListener("x-storagemutated-1",(function(e){var t=e.detail;Jn||Zn(t)})));var Jn=!1;if("undefined"!==typeof BroadcastChannel){var er=new BroadcastChannel("x-storagemutated-1");"function"===typeof er.unref&&er.unref(),Zt("storagemutated",(function(e){Jn||er.postMessage(e)})),er.onmessage=function(e){e.data&&Zn(e.data)}}else if("undefined"!==typeof self&&"undefined"!==typeof navigator){Zt("storagemutated",(function(e){try{Jn||("undefined"!==typeof localStorage&&localStorage.setItem("x-storagemutated-1",JSON.stringify({trig:Math.random(),changedParts:e})),"object"===typeof self.clients&&i([],self.clients.matchAll({includeUncontrolled:!0}),!0).forEach((function(t){return t.postMessage({type:"x-storagemutated-1",changedParts:e})})))}catch(Nn){}})),"undefined"!==typeof addEventListener&&addEventListener("storage",(function(e){if("x-storagemutated-1"===e.key){var t=JSON.parse(e.newValue);t&&Zn(t.changedParts)}}));var tr=self.document&&navigator.serviceWorker;tr&&tr.addEventListener("message",(function(e){var t=e.data;t&&"x-storagemutated-1"===t.type&&Zn(t.changedParts)}))}Re.rejectionMapper=function(e,t){if(!e||e instanceof Y||e instanceof TypeError||e instanceof SyntaxError||!e.name||!ne[e.name])return e;var n=new ne[e.name](t||e.message,e);return"stack"in e&&f(n,"stack",{get:function(){return this.inner.stack}}),n},q(F,St);var nr=new Gn("pushDatabase"),rr=new Gn("bookmarksDatabase");nr.version(1).stores({messages:"++id, uuid"}),rr.version(1).stores({messages:"++id, uuid, article"})},"3OWR":function(e,t,n){var r=n("MrPd"),i=n("juv8"),a=n("LsHQ"),o=n("MMmD"),s=n("6sVZ"),u=n("7GkX"),l=Object.prototype.hasOwnProperty,c=a((function(e,t){if(s(t)||o(t))i(t,u(t),e);else for(var n in t)l.call(t,n)&&r(e,n,t[n])}));e.exports=c},"3mbX":function(e,t,n){"use strict";n.d(t,"g",(function(){return i})),n.d(t,"e",(function(){return a})),n.d(t,"k",(function(){return o})),n.d(t,"j",(function(){return s})),n.d(t,"i",(function(){return u})),n.d(t,"b",(function(){return d})),n.d(t,"f",(function(){return h})),n.d(t,"c",(function(){return p})),n.d(t,"h",(function(){return f})),n.d(t,"d",(function(){return m})),n.d(t,"a",(function(){return g}));var r=n("vgmO"),i=function(e,t,n){return void 0===n&&(n=" "),(function(e,t){for(var n="";t--;)n+=e;return n}(n,t)+e.toString()).slice(-t)},a=function(e){return"function"===ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer},o=function(e){return e instanceof Uint8Array?e:(Array.isArray(e)||a(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))},s=function(e){e=o(e);for(var t="",n=0;n<e.length;n++)t+=i(e[n].toString(16),2,"0");return t},u=function(e){e=o(e);for(var t="",n=0;n<e.length;n++)t+=i(e[n].toString(2),8,"0");return t},l=n.n(r).a.BigInt||Number,c=[l("0x1"),l("0x100"),l("0x10000"),l("0x1000000"),l("0x100000000"),l("0x10000000000"),l("0x1000000000000"),l("0x100000000000000"),l("0x10000000000000000")],d=(function(){var e=new Uint16Array([65484]),t=new Uint8Array(e.buffer,e.byteOffset,e.byteLength);255===t[0]||t[0]}(),function(e,t){var n=void 0===t?{}:t,r=n.signed,i=void 0!==r&&r,a=n.le,s=void 0!==a&&a;e=o(e);var u=s?"reduce":"reduceRight",d=(e[u]?e[u]:Array.prototype[u]).call(e,(function(t,n,r){var i=s?r:Math.abs(r+1-e.length);return t+l(n)*c[i]}),l(0));if(i){var h=c[e.length]/l(2)-l(1);(d=l(d))>h&&(d-=h,d-=h,d-=l(2))}return Number(d)}),h=function(e,t){var n=(void 0===t?{}:t).le,r=void 0!==n&&n;("bigint"!==typeof e&&"number"!==typeof e||"number"===typeof e&&e!==e)&&(e=0),e=l(e);for(var i,a=(i=e,Math.ceil(function(e){return e.toString(2).length}(i)/8)),o=new Uint8Array(new ArrayBuffer(a)),s=0;s<a;s++){var u=r?s:Math.abs(s+1-o.length);o[u]=Number(e/c[s]&l(255)),e<0&&(o[u]=Math.abs(~o[u]),o[u]-=0===s?1:2)}return o},p=function(e){if(!e)return"";e=Array.prototype.slice.call(e);var t=String.fromCharCode.apply(null,o(e));try{return decodeURIComponent(escape(t))}catch(n){}return t},f=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 n=new Uint8Array(e.length),r=0;r<e.length;r++)n[r]=e.charCodeAt(r);return n},m=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if((t=t.filter((function(e){return e&&(e.byteLength||e.length)&&"string"!==typeof e}))).length<=1)return o(t[0]);var r=t.reduce((function(e,t,n){return e+(t.byteLength||t.length)}),0),i=new Uint8Array(r),a=0;return t.forEach((function(e){e=o(e),i.set(e,a),a+=e.byteLength})),i},g=function(e,t,n){var r=void 0===n?{}:n,i=r.offset,a=void 0===i?0:i,s=r.mask,u=void 0===s?[]:s;e=o(e);var l=(t=o(t)).every?t.every:Array.prototype.every;return t.length&&e.length-a>=t.length&&l.call(t,(function(t,n){return t===(u[n]?u[n]&e[a+n]:e[a+n])}))}},"3mqj":function(e,t,n){var r=n("W2Ac"),i=n("+BqG"),a=Function.prototype,o=r&&Object.getOwnPropertyDescriptor,s=i(a,"name"),u=s&&"something"===function(){}.name,l=s&&(!r||r&&o(a,"name").configurable);e.exports={EXISTS:s,PROPER:u,CONFIGURABLE:l}},"3vah":function(e,t,n){var r=n("LHWz"),i=n("eDf4"),a=r.WeakMap;e.exports=i(a)&&/native code/.test(String(a))},"3zPy":function(e,t){function n(e){if(e&&"object"===typeof e){var t=e.which||e.keyCode||e.charCode;t&&(e=t)}if("number"===typeof e)return o[e];var n,a=String(e);return(n=r[a.toLowerCase()])?n:(n=i[a.toLowerCase()])||(1===a.length?a.charCodeAt(0):void 0)}n.isEventKey=function(e,t){if(e&&"object"===typeof e){var n=e.which||e.keyCode||e.charCode;if(null===n||void 0===n)return!1;if("string"===typeof t){var a;if(a=r[t.toLowerCase()])return a===n;if(a=i[t.toLowerCase()])return a===n}else if("number"===typeof t)return t===n;return!1}};var r=(t=e.exports=n).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},i=t.aliases={windows:91,"\u21e7":16,"\u2325":18,"\u2303":17,"\u2318":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(a=97;a<123;a++)r[String.fromCharCode(a)]=a-32;for(var a=48;a<58;a++)r[a-48]=a;for(a=1;a<13;a++)r["f"+a]=a+111;for(a=0;a<10;a++)r["numpad "+a]=a+96;var o=t.names=t.title={};for(a in r)o[r[a]]=a;for(var s in i)r[s]=i[s]},"4ANG":function(e,t,n){var r=n("iadd").NAMESPACE,i=/[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]/,a=new RegExp("[\\-\\.0-9"+i.source.slice(1,-1)+"\\u00B7\\u0300-\\u036F\\u203F-\\u2040]"),o=new RegExp("^"+i.source+a.source+"*(?::"+i.source+a.source+"*)?$");function s(e,t){this.message=e,this.locator=t,Error.captureStackTrace&&Error.captureStackTrace(this,s)}function u(){}function l(e,t){return t.lineNumber=e.lineNumber,t.columnNumber=e.columnNumber,t}function c(e,t,n,i,a,o){function s(e,t,r){n.attributeNames.hasOwnProperty(e)&&o.fatalError("Attribute "+e+" redefined"),n.addValue(e,t.replace(/[\t\n\r]/g," ").replace(/&#?\w+;/g,a),r)}for(var u,l=++t,c=0;;){var d=e.charAt(l);switch(d){case"=":if(1===c)u=e.slice(t,l),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&&(o.warning('attribute value must after "="'),u=e.slice(t,l)),t=l+1,!((l=e.indexOf(d,t))>0))throw new Error("attribute value no end '"+d+"' match");s(u,h=e.slice(t,l),t-1),c=5}else{if(4!=c)throw new Error('attribute value must after "="');s(u,h=e.slice(t,l),t),o.warning('attribute "'+u+'" missed start quot('+d+")!!"),t=l+1,c=5}break;case"/":switch(c){case 0:n.setTagName(e.slice(t,l));case 5:case 6:case 7:c=7,n.closed=!0;case 4:case 1:break;case 2:n.closed=!0;break;default:throw new Error("attribute invalid close char('/')")}break;case"":return o.error("unexpected end of input"),0==c&&n.setTagName(e.slice(t,l)),l;case">":switch(c){case 0:n.setTagName(e.slice(t,l));case 5:case 6:case 7:break;case 4:case 1:"/"===(h=e.slice(t,l)).slice(-1)&&(n.closed=!0,h=h.slice(0,-1));case 2:2===c&&(h=u),4==c?(o.warning('attribute "'+h+'" missed quot(")!'),s(u,h,t)):(r.isHTML(i[""])&&h.match(/^(?:disabled|checked|selected)$/i)||o.warning('attribute "'+h+'" missed value!! "'+h+'" instead!!'),s(h,h,t));break;case 3:throw new Error("attribute value missed!!")}return l;case"\x80":d=" ";default:if(d<=" ")switch(c){case 0:n.setTagName(e.slice(t,l)),c=6;break;case 1:u=e.slice(t,l),c=2;break;case 4:var h=e.slice(t,l);o.warning('attribute "'+h+'" missed quot(")!!'),s(u,h,t);case 5:c=6}else switch(c){case 2:n.tagName;r.isHTML(i[""])&&u.match(/^(?:disabled|checked|selected)$/i)||o.warning('attribute "'+u+'" missed value!! "'+u+'" instead2!!'),s(u,u,t),t=l,c=1;break;case 5:o.warning('attribute space is required"'+u+'"!!');case 6:c=1,t=l;break;case 3:c=4,t=l;break;case 7:throw new Error("elements closed character '/' and '>' must be connected to")}}l++}}function d(e,t,n){for(var i=e.tagName,a=null,o=e.length;o--;){var s=e[o],u=s.qName,l=s.value;if((p=u.indexOf(":"))>0)var c=s.prefix=u.slice(0,p),d=u.slice(p+1),h="xmlns"===c&&d;else d=u,c=null,h="xmlns"===u&&"";s.localName=d,!1!==h&&(null==a&&(a={},f(n,n={})),n[h]=a[h]=l,s.uri=r.XMLNS,t.startPrefixMapping(h,l))}for(o=e.length;o--;){(c=(s=e[o]).prefix)&&("xml"===c&&(s.uri=r.XML),"xmlns"!==c&&(s.uri=n[c||""]))}var p;(p=i.indexOf(":"))>0?(c=e.prefix=i.slice(0,p),d=e.localName=i.slice(p+1)):(c=null,d=e.localName=i);var m=e.uri=n[c||""];if(t.startElement(m,d,i,e),!e.closed)return e.currentNSMap=n,e.localNSMap=a,!0;if(t.endElement(m,d,i),a)for(c in a)Object.prototype.hasOwnProperty.call(a,c)&&t.endPrefixMapping(c)}function h(e,t,n,r,i){if(/^(?:script|textarea)$/i.test(n)){var a=e.indexOf("</"+n+">",t),o=e.substring(t+1,a);if(/[&<]/.test(o))return/^script$/i.test(n)?(i.characters(o,0,o.length),a):(o=o.replace(/&#?\w+;/g,r),i.characters(o,0,o.length),a)}return t+1}function p(e,t,n,r){var i=r[n];return null==i&&((i=e.lastIndexOf("</"+n+">"))<t&&(i=e.lastIndexOf("</"+n)),r[n]=i),i<t}function f(e,t){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])}function m(e,t,n,r){switch(e.charAt(t+2)){case"-":return"-"===e.charAt(t+3)?(i=e.indexOf("--\x3e",t+4))>t?(n.comment(e,t+4,i-t-4),i+3):(r.error("Unclosed comment"),-1):-1;default:if("CDATA["==e.substr(t+3,6)){var i=e.indexOf("]]>",t+9);return n.startCDATA(),n.characters(e,t+9,i-t-9),n.endCDATA(),i+3}var a=function(e,t){var n,r=[],i=/'[^']+'|"[^"]+"|[^\s<>\/=]+=?|(\/?\s*>|<)/g;i.lastIndex=t,i.exec(e);for(;n=i.exec(e);)if(r.push(n),n[1])return r}(e,t),o=a.length;if(o>1&&/!doctype/i.test(a[0][0])){var s=a[1][0],u=!1,l=!1;o>3&&(/^public$/i.test(a[2][0])?(u=a[3][0],l=o>4&&a[4][0]):/^system$/i.test(a[2][0])&&(l=a[3][0]));var c=a[o-1];return n.startDTD(s,u,l),n.endDTD(),c.index+c[0].length}}return-1}function g(e,t,n){var r=e.indexOf("?>",t);if(r){var i=e.substring(t,r).match(/^<\?(\S*)\s*([\s\S]*?)\s*$/);if(i){i[0].length;return n.processingInstruction(i[1],i[2]),r+2}return-1}return-1}function v(){this.attributeNames={}}s.prototype=new Error,s.prototype.name=s.name,u.prototype={parse:function(e,t,n){var i=this.domBuilder;i.startDocument(),f(t,t={}),function(e,t,n,i,a){function o(e){var t=e.slice(1,-1);return Object.hasOwnProperty.call(n,t)?n[t]:"#"===t.charAt(0)?function(e){if(e>65535){var t=55296+((e-=65536)>>10),n=56320+(1023&e);return String.fromCharCode(t,n)}return String.fromCharCode(e)}(parseInt(t.substr(1).replace("x","0x"))):(a.error("entity not found:"+e),e)}function u(t){if(t>k){var n=e.substring(k,t).replace(/&#?\w+;/g,o);T&&f(k),i.characters(n,0,t-k),k=t}}function f(t,n){for(;t>=b&&(n=_.exec(e));)y=n.index,b=y+n[0].length,T.lineNumber++;T.columnNumber=t-y+1}var y=0,b=0,_=/.*(?:\r\n?|\n)|.*$/g,T=i.locator,S=[{currentNSMap:t}],w={},k=0;for(;;){try{var C=e.indexOf("<",k);if(C<0){if(!e.substr(k).match(/^\s*$/)){var E=i.doc,A=E.createTextNode(e.substr(k));E.appendChild(A),i.currentElement=A}return}switch(C>k&&u(C),e.charAt(C+1)){case"/":var x=e.indexOf(">",C+3),P=e.substring(C+2,x).replace(/[ \t\n\r]+$/g,""),I=S.pop();x<0?(P=e.substring(C+2).replace(/[\s<].*/,""),a.error("end tag name: "+P+" is not complete:"+I.tagName),x=C+1+P.length):P.match(/\s</)&&(P=P.replace(/[\s<].*/,""),a.error("end tag name: "+P+" maybe not complete"),x=C+1+P.length);var O=I.localNSMap,L=I.tagName==P;if(L||I.tagName&&I.tagName.toLowerCase()==P.toLowerCase()){if(i.endElement(I.uri,I.localName,P),O)for(var D in O)Object.prototype.hasOwnProperty.call(O,D)&&i.endPrefixMapping(D);L||a.fatalError("end tag name: "+P+" is not match the current start tagName:"+I.tagName)}else S.push(I);x++;break;case"?":T&&f(C),x=g(e,C,i);break;case"!":T&&f(C),x=m(e,C,i,a);break;default:T&&f(C);var M=new v,R=S[S.length-1].currentNSMap,N=(x=c(e,C,M,R,o,a),M.length);if(!M.closed&&p(e,x,M.tagName,w)&&(M.closed=!0,n.nbsp||a.warning("unclosed xml attribute")),T&&N){for(var j=l(T,{}),B=0;B<N;B++){var U=M[B];f(U.offset),U.locator=l(T,{})}i.locator=j,d(M,i,R)&&S.push(M),i.locator=T}else d(M,i,R)&&S.push(M);r.isHTML(M.uri)&&!M.closed?x=h(e,x,M.tagName,o,i):x++}}catch(F){if(F instanceof s)throw F;a.error("element parse error: "+F),x=-1}x>k?k=x:u(Math.max(C,k)+1)}}(e,t,n,i,this.errorHandler),i.endDocument()}},v.prototype={setTagName:function(e){if(!o.test(e))throw new Error("invalid tagName:"+e);this.tagName=e},addValue:function(e,t,n){if(!o.test(e))throw new Error("invalid attribute:"+e);this.attributeNames[e]=this.length,this[this.length++]={qName:e,value:t,offset:n}},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=u,t.ParseError=s},"4Tei":function(e,t,n){var r=n("LHWz"),i=n("Avys"),a=n("+BqG"),o=n("bq/A"),s=n("ok90"),u=n("gg2M"),l=r.Symbol,c=i("wks"),d=u?l.for||l:l&&l.withoutSetter||o;e.exports=function(e){return a(c,e)||(c[e]=s&&a(l,e)?l[e]:d("Symbol."+e)),c[e]}},"4aqD":function(e,t,n){"use strict";var r=n("szlw"),i=n("LHWz"),a=n("JVs5"),o=n("4wiq"),s=n("DcKJ"),u=n("W2Ac"),l=n("ok90"),c=n("xZj3"),d=n("+BqG"),h=n("GOOj"),p=n("Y6hy"),f=n("Yo2p"),m=n("8z+Y"),g=n("QICv"),v=n("PEjt"),y=n("HyK6"),b=n("niYQ"),_=n("N0Qq"),T=n("HMdW"),S=n("pfAL"),w=n("jfrp"),k=n("xnEm"),C=n("aLLH"),E=n("I62h"),A=n("esM1"),x=n("zRp7"),P=n("Avys"),I=n("7BeB"),O=n("SfKh"),L=n("bq/A"),D=n("4Tei"),M=n("X1e3"),R=n("Rvgf"),N=n("hLh5"),j=n("e1XL"),B=n("53GT"),U=n("vwUX").forEach,F=I("hidden"),q=B.set,H=B.getterFor("Symbol"),z=Object.prototype,W=i.Symbol,V=W&&W.prototype,K=i.TypeError,G=i.QObject,X=w.f,Y=k.f,Q=T.f,$=E.f,Z=o([].push),J=P("symbols"),ee=P("op-symbols"),te=P("wks"),ne=!G||!G.prototype||!G.prototype.findChild,re=u&&c((function(){return 7!=y(Y({},"a",{get:function(){return Y(this,"a",{value:7}).a}})).a}))?function(e,t,n){var r=X(z,t);r&&delete z[t],Y(e,t,n),r&&e!==z&&Y(z,t,r)}:Y,ie=function(e,t){var n=J[e]=y(V);return q(n,{type:"Symbol",tag:e,description:t}),u||(n.description=t),n},ae=function(e,t,n){e===z&&ae(ee,t,n),p(e);var r=m(t);return p(n),d(J,r)?(n.enumerable?(d(e,F)&&e[F][r]&&(e[F][r]=!1),n=y(n,{enumerable:v(0,!1)})):(d(e,F)||Y(e,F,v(1,{})),e[F][r]=!0),re(e,r,n)):Y(e,r,n)},oe=function(e,t){p(e);var n=f(t),r=b(n).concat(ce(n));return U(r,(function(t){u&&!a(se,n,t)||ae(e,t,n[t])})),e},se=function(e){var t=m(e),n=a($,this,t);return!(this===z&&d(J,t)&&!d(ee,t))&&(!(n||!d(this,t)||!d(J,t)||d(this,F)&&this[F][t])||n)},ue=function(e,t){var n=f(e),r=m(t);if(n!==z||!d(J,r)||d(ee,r)){var i=X(n,r);return!i||!d(J,r)||d(n,F)&&n[F][r]||(i.enumerable=!0),i}},le=function(e){var t=Q(f(e)),n=[];return U(t,(function(e){d(J,e)||d(O,e)||Z(n,e)})),n},ce=function(e){var t=e===z,n=Q(t?ee:f(e)),r=[];return U(n,(function(e){!d(J,e)||t&&!d(z,e)||Z(r,J[e])})),r};l||(A(V=(W=function(){if(h(V,this))throw K("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?g(arguments[0]):void 0,t=L(e),n=function(e){this===z&&a(n,ee,e),d(this,F)&&d(this[F],t)&&(this[F][t]=!1),re(this,t,v(1,e))};return u&&ne&&re(z,t,{configurable:!0,set:n}),ie(t,e)}).prototype,"toString",(function(){return H(this).tag})),A(W,"withoutSetter",(function(e){return ie(L(e),e)})),E.f=se,k.f=ae,C.f=oe,w.f=ue,_.f=T.f=le,S.f=ce,M.f=function(e){return ie(D(e),e)},u&&(x(V,"description",{configurable:!0,get:function(){return H(this).description}}),s||A(z,"propertyIsEnumerable",se,{unsafe:!0}))),r({global:!0,constructor:!0,wrap:!0,forced:!l,sham:!l},{Symbol:W}),U(b(te),(function(e){R(e)})),r({target:"Symbol",stat:!0,forced:!l},{useSetter:function(){ne=!0},useSimple:function(){ne=!1}}),r({target:"Object",stat:!0,forced:!l,sham:!u},{create:function(e,t){return void 0===t?y(e):oe(y(e),t)},defineProperty:ae,defineProperties:oe,getOwnPropertyDescriptor:ue}),r({target:"Object",stat:!0,forced:!l},{getOwnPropertyNames:le}),N(),j(W,"Symbol"),O[F]=!0},"4ciW":function(e,t,n){var r=n("iadd"),i=r.find,a=r.NAMESPACE;function o(e){return""!==e}function s(e,t){return e.hasOwnProperty(t)||(e[t]=!0),e}function u(e){if(!e)return[];var t=function(e){return e?e.split(/[\t\n\f\r ]+/).filter(o):[]}(e);return Object.keys(t.reduce(s,{}))}function l(e,t){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])}function c(e,t){var n=e.prototype;if(!(n instanceof t)){function r(){}r.prototype=t.prototype,l(n,r=new r),e.prototype=n=r}n.constructor!=e&&("function"!=typeof e&&console.error("unknown Class:"+e),n.constructor=e)}var d={},h=d.ELEMENT_NODE=1,p=d.ATTRIBUTE_NODE=2,f=d.TEXT_NODE=3,m=d.CDATA_SECTION_NODE=4,g=d.ENTITY_REFERENCE_NODE=5,v=d.ENTITY_NODE=6,y=d.PROCESSING_INSTRUCTION_NODE=7,b=d.COMMENT_NODE=8,_=d.DOCUMENT_NODE=9,T=d.DOCUMENT_TYPE_NODE=10,S=d.DOCUMENT_FRAGMENT_NODE=11,w=d.NOTATION_NODE=12,k={},C={},E=(k.INDEX_SIZE_ERR=(C[1]="Index size error",1),k.DOMSTRING_SIZE_ERR=(C[2]="DOMString size error",2),k.HIERARCHY_REQUEST_ERR=(C[3]="Hierarchy request error",3)),A=(k.WRONG_DOCUMENT_ERR=(C[4]="Wrong document",4),k.INVALID_CHARACTER_ERR=(C[5]="Invalid character",5),k.NO_DATA_ALLOWED_ERR=(C[6]="No data allowed",6),k.NO_MODIFICATION_ALLOWED_ERR=(C[7]="No modification allowed",7),k.NOT_FOUND_ERR=(C[8]="Not found",8)),x=(k.NOT_SUPPORTED_ERR=(C[9]="Not supported",9),k.INUSE_ATTRIBUTE_ERR=(C[10]="Attribute in use",10));k.INVALID_STATE_ERR=(C[11]="Invalid state",11),k.SYNTAX_ERR=(C[12]="Syntax error",12),k.INVALID_MODIFICATION_ERR=(C[13]="Invalid modification",13),k.NAMESPACE_ERR=(C[14]="Invalid namespace",14),k.INVALID_ACCESS_ERR=(C[15]="Invalid access",15);function P(e,t){if(t instanceof Error)var n=t;else n=this,Error.call(this,C[e]),this.message=C[e],Error.captureStackTrace&&Error.captureStackTrace(this,P);return n.code=e,t&&(this.message=this.message+": "+t),n}function I(){}function O(e,t){this._node=e,this._refresh=t,L(this)}function L(e){var t=e._node._inc||e._node.ownerDocument._inc;if(e._inc!=t){var n=e._refresh(e._node);ve(e,"length",n.length),l(n,e),e._inc=t}}function D(){}function M(e,t){for(var n=e.length;n--;)if(e[n]===t)return n}function R(e,t,n,r){if(r?t[M(t,r)]=n:t[t.length++]=n,e){n.ownerElement=e;var i=e.ownerDocument;i&&(r&&H(i,e,r),function(e,t,n){e&&e._inc++,n.namespaceURI===a.XMLNS&&(t._nsMap[n.prefix?n.localName:""]=n.value)}(i,e,n))}}function N(e,t,n){var r=M(t,n);if(!(r>=0))throw new P(A,new Error(e.tagName+"@"+n));for(var i=t.length-1;r<i;)t[r]=t[++r];if(t.length=i,e){var a=e.ownerDocument;a&&(H(a,e,n),n.ownerElement=null)}}function j(){}function B(){}function U(e){return("<"==e?"&lt;":">"==e&&"&gt;")||"&"==e&&"&amp;"||'"'==e&&"&quot;"||"&#"+e.charCodeAt()+";"}function F(e,t){if(t(e))return!0;if(e=e.firstChild)do{if(F(e,t))return!0}while(e=e.nextSibling)}function q(){this.ownerDocument=this}function H(e,t,n,r){e&&e._inc++,n.namespaceURI===a.XMLNS&&delete t._nsMap[n.prefix?n.localName:""]}function z(e,t,n){if(e&&e._inc){e._inc++;var r=t.childNodes;if(n)r[r.length++]=n;else{for(var i=t.firstChild,a=0;i;)r[a++]=i,i=i.nextSibling;r.length=a,delete r[r.length]}}}function W(e,t){var n=t.previousSibling,r=t.nextSibling;return n?n.nextSibling=r:e.firstChild=r,r?r.previousSibling=n:e.lastChild=n,t.parentNode=null,t.previousSibling=null,t.nextSibling=null,z(e.ownerDocument,e),t}function V(e){return e&&e.nodeType===B.DOCUMENT_TYPE_NODE}function K(e){return e&&e.nodeType===B.ELEMENT_NODE}function G(e){return e&&e.nodeType===B.TEXT_NODE}function X(e,t){var n=e.childNodes||[];if(i(n,K)||V(t))return!1;var r=i(n,V);return!(t&&r&&n.indexOf(r)>n.indexOf(t))}function Y(e,t){var n=e.childNodes||[];if(i(n,(function(e){return K(e)&&e!==t})))return!1;var r=i(n,V);return!(t&&r&&n.indexOf(r)>n.indexOf(t))}function Q(e,t,n){if(!function(e){return e&&(e.nodeType===B.DOCUMENT_NODE||e.nodeType===B.DOCUMENT_FRAGMENT_NODE||e.nodeType===B.ELEMENT_NODE)}(e))throw new P(E,"Unexpected parent node type "+e.nodeType);if(n&&n.parentNode!==e)throw new P(A,"child not in parent");if(!function(e){return e&&(K(e)||G(e)||V(e)||e.nodeType===B.DOCUMENT_FRAGMENT_NODE||e.nodeType===B.COMMENT_NODE||e.nodeType===B.PROCESSING_INSTRUCTION_NODE)}(t)||V(t)&&e.nodeType!==B.DOCUMENT_NODE)throw new P(E,"Unexpected node type "+t.nodeType+" for parent node type "+e.nodeType)}function $(e,t,n){var r=e.childNodes||[],a=t.childNodes||[];if(t.nodeType===B.DOCUMENT_FRAGMENT_NODE){var o=a.filter(K);if(o.length>1||i(a,G))throw new P(E,"More than one element or text in fragment");if(1===o.length&&!X(e,n))throw new P(E,"Element in fragment can not be inserted before doctype")}if(K(t)&&!X(e,n))throw new P(E,"Only one element can be added and only after doctype");if(V(t)){if(i(r,V))throw new P(E,"Only one doctype is allowed");var s=i(r,K);if(n&&r.indexOf(s)<r.indexOf(n))throw new P(E,"Doctype can only be inserted before an element");if(!n&&s)throw new P(E,"Doctype can not be appended since element is present")}}function Z(e,t,n){var r=e.childNodes||[],a=t.childNodes||[];if(t.nodeType===B.DOCUMENT_FRAGMENT_NODE){var o=a.filter(K);if(o.length>1||i(a,G))throw new P(E,"More than one element or text in fragment");if(1===o.length&&!Y(e,n))throw new P(E,"Element in fragment can not be inserted before doctype")}if(K(t)&&!Y(e,n))throw new P(E,"Only one element can be added and only after doctype");if(V(t)){if(i(r,(function(e){return V(e)&&e!==n})))throw new P(E,"Only one doctype is allowed");var s=i(r,K);if(n&&r.indexOf(s)<r.indexOf(n))throw new P(E,"Doctype can only be inserted before an element")}}function J(e,t,n,r){Q(e,t,n),e.nodeType===B.DOCUMENT_NODE&&(r||$)(e,t,n);var i=t.parentNode;if(i&&i.removeChild(t),t.nodeType===S){var a=t.firstChild;if(null==a)return t;var o=t.lastChild}else a=o=t;var s=n?n.previousSibling:e.lastChild;a.previousSibling=s,o.nextSibling=n,s?s.nextSibling=a:e.firstChild=a,null==n?e.lastChild=o:n.previousSibling=o;do{a.parentNode=e}while(a!==o&&(a=a.nextSibling));return z(e.ownerDocument||e,e),t.nodeType==S&&(t.firstChild=t.lastChild=null),t}function ee(){this._nsMap={}}function te(){}function ne(){}function re(){}function ie(){}function ae(){}function oe(){}function se(){}function ue(){}function le(){}function ce(){}function de(){}function he(){}function pe(e,t){var n=[],r=9==this.nodeType&&this.documentElement||this,i=r.prefix,a=r.namespaceURI;if(a&&null==i&&null==(i=r.lookupPrefix(a)))var o=[{namespace:a,prefix:null}];return ge(this,n,e,t,o),n.join("")}function fe(e,t,n){var r=e.prefix||"",i=e.namespaceURI;if(!i)return!1;if("xml"===r&&i===a.XML||i===a.XMLNS)return!1;for(var o=n.length;o--;){var s=n[o];if(s.prefix===r)return s.namespace!==i}return!0}function me(e,t,n){e.push(" ",t,'="',n.replace(/[<>&"\t\n\r]/g,U),'"')}function ge(e,t,n,r,i){if(i||(i=[]),r){if(!(e=r(e)))return;if("string"==typeof e)return void t.push(e)}switch(e.nodeType){case h:var o=e.attributes,s=o.length,u=e.firstChild,l=e.tagName,c=l;if(!(n=a.isHTML(e.namespaceURI)||n)&&!e.prefix&&e.namespaceURI){for(var d,v=0;v<o.length;v++)if("xmlns"===o.item(v).name){d=o.item(v).value;break}if(!d)for(var w=i.length-1;w>=0;w--){if(""===(k=i[w]).prefix&&k.namespace===e.namespaceURI){d=k.namespace;break}}if(d!==e.namespaceURI)for(w=i.length-1;w>=0;w--){var k;if((k=i[w]).namespace===e.namespaceURI){k.prefix&&(c=k.prefix+":"+l);break}}}t.push("<",c);for(var C=0;C<s;C++){"xmlns"==(E=o.item(C)).prefix?i.push({prefix:E.localName,namespace:E.value}):"xmlns"==E.nodeName&&i.push({prefix:"",namespace:E.value})}for(C=0;C<s;C++){var E,A,x;if(fe(E=o.item(C),0,i))me(t,(A=E.prefix||"")?"xmlns:"+A:"xmlns",x=E.namespaceURI),i.push({prefix:A,namespace:x});ge(E,t,n,r,i)}if(l===c&&fe(e,0,i))me(t,(A=e.prefix||"")?"xmlns:"+A:"xmlns",x=e.namespaceURI),i.push({prefix:A,namespace:x});if(u||n&&!/^(?:meta|link|img|br|hr|input)$/i.test(l)){if(t.push(">"),n&&/^script$/i.test(l))for(;u;)u.data?t.push(u.data):ge(u,t,n,r,i.slice()),u=u.nextSibling;else for(;u;)ge(u,t,n,r,i.slice()),u=u.nextSibling;t.push("</",c,">")}else t.push("/>");return;case _:case S:for(u=e.firstChild;u;)ge(u,t,n,r,i.slice()),u=u.nextSibling;return;case p:return me(t,e.name,e.value);case f:return t.push(e.data.replace(/[<&>]/g,U));case m:return t.push("<![CDATA[",e.data,"]]>");case b:return t.push("\x3c!--",e.data,"--\x3e");case T: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 y:return t.push("<?",e.target," ",e.data,"?>");case g:return t.push("&",e.nodeName,";");default:t.push("??",e.nodeName)}}function ve(e,t,n){e[t]=n}P.prototype=Error.prototype,l(k,P),I.prototype={length:0,item:function(e){return this[e]||null},toString:function(e,t){for(var n=[],r=0;r<this.length;r++)ge(this[r],n,e,t);return n.join("")},filter:function(e){return Array.prototype.filter.call(this,e)},indexOf:function(e){return Array.prototype.indexOf.call(this,e)}},O.prototype.item=function(e){return L(this),this[e]},c(O,I),D.prototype={length:0,item:I.prototype.item,getNamedItem:function(e){for(var t=this.length;t--;){var n=this[t];if(n.nodeName==e)return n}},setNamedItem:function(e){var t=e.ownerElement;if(t&&t!=this._ownerElement)throw new P(x);var n=this.getNamedItem(e.nodeName);return R(this._ownerElement,this,e,n),n},setNamedItemNS:function(e){var t,n=e.ownerElement;if(n&&n!=this._ownerElement)throw new P(x);return t=this.getNamedItemNS(e.namespaceURI,e.localName),R(this._ownerElement,this,e,t),t},removeNamedItem:function(e){var t=this.getNamedItem(e);return N(this._ownerElement,this,t),t},removeNamedItemNS:function(e,t){var n=this.getNamedItemNS(e,t);return N(this._ownerElement,this,n),n},getNamedItemNS:function(e,t){for(var n=this.length;n--;){var r=this[n];if(r.localName==t&&r.namespaceURI==e)return r}return null}},j.prototype={hasFeature:function(e,t){return!0},createDocument:function(e,t,n){var r=new q;if(r.implementation=this,r.childNodes=new I,r.doctype=n||null,n&&r.appendChild(n),t){var i=r.createElementNS(e,t);r.appendChild(i)}return r},createDocumentType:function(e,t,n){var r=new oe;return r.name=e,r.nodeName=e,r.publicId=t||"",r.systemId=n||"",r}},B.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 J(this,e,t)},replaceChild:function(e,t){J(this,e,t,Z),t&&this.removeChild(t)},removeChild:function(e){return W(this,e)},appendChild:function(e){return this.insertBefore(e,null)},hasChildNodes:function(){return null!=this.firstChild},cloneNode:function(e){return function e(t,n,r){var i=new n.constructor;for(var a in n)if(Object.prototype.hasOwnProperty.call(n,a)){var o=n[a];"object"!=typeof o&&o!=i[a]&&(i[a]=o)}n.childNodes&&(i.childNodes=new I);switch(i.ownerDocument=t,i.nodeType){case h:var s=n.attributes,u=i.attributes=new D,l=s.length;u._ownerElement=i;for(var c=0;c<l;c++)i.setAttributeNode(e(t,s.item(c),!0));break;case p:r=!0}if(r)for(var d=n.firstChild;d;)i.appendChild(e(t,d,r)),d=d.nextSibling;return i}(this.ownerDocument||this,this,e)},normalize:function(){for(var e=this.firstChild;e;){var t=e.nextSibling;t&&t.nodeType==f&&e.nodeType==f?(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 n=t._nsMap;if(n)for(var r in n)if(Object.prototype.hasOwnProperty.call(n,r)&&n[r]===e)return r;t=t.nodeType==p?t.ownerDocument:t.parentNode}return null},lookupNamespaceURI:function(e){for(var t=this;t;){var n=t._nsMap;if(n&&Object.prototype.hasOwnProperty.call(n,e))return n[e];t=t.nodeType==p?t.ownerDocument:t.parentNode}return null},isDefaultNamespace:function(e){return null==this.lookupPrefix(e)}},l(d,B),l(d,B.prototype),q.prototype={nodeName:"#document",nodeType:_,doctype:null,documentElement:null,_inc:1,insertBefore:function(e,t){if(e.nodeType==S){for(var n=e.firstChild;n;){var r=n.nextSibling;this.insertBefore(n,t),n=r}return e}return J(this,e,t),e.ownerDocument=this,null===this.documentElement&&e.nodeType===h&&(this.documentElement=e),e},removeChild:function(e){return this.documentElement==e&&(this.documentElement=null),W(this,e)},replaceChild:function(e,t){J(this,e,t,Z),e.ownerDocument=this,t&&this.removeChild(t),K(e)&&(this.documentElement=e)},importNode:function(e,t){return function e(t,n,r){var i;switch(n.nodeType){case h:(i=n.cloneNode(!1)).ownerDocument=t;case S:break;case p:r=!0}i||(i=n.cloneNode(!1));if(i.ownerDocument=t,i.parentNode=null,r)for(var a=n.firstChild;a;)i.appendChild(e(t,a,r)),a=a.nextSibling;return i}(this,e,t)},getElementById:function(e){var t=null;return F(this.documentElement,(function(n){if(n.nodeType==h&&n.getAttribute("id")==e)return t=n,!0})),t},getElementsByClassName:function(e){var t=u(e);return new O(this,(function(n){var r=[];return t.length>0&&F(n.documentElement,(function(i){if(i!==n&&i.nodeType===h){var a=i.getAttribute("class");if(a){var o=e===a;if(!o){var s=u(a);o=t.every((l=s,function(e){return l&&-1!==l.indexOf(e)}))}o&&r.push(i)}}var l})),r}))},createElement:function(e){var t=new ee;return t.ownerDocument=this,t.nodeName=e,t.tagName=e,t.localName=e,t.childNodes=new I,(t.attributes=new D)._ownerElement=t,t},createDocumentFragment:function(){var e=new ce;return e.ownerDocument=this,e.childNodes=new I,e},createTextNode:function(e){var t=new re;return t.ownerDocument=this,t.appendData(e),t},createComment:function(e){var t=new ie;return t.ownerDocument=this,t.appendData(e),t},createCDATASection:function(e){var t=new ae;return t.ownerDocument=this,t.appendData(e),t},createProcessingInstruction:function(e,t){var n=new de;return n.ownerDocument=this,n.tagName=n.target=e,n.nodeValue=n.data=t,n},createAttribute:function(e){var t=new te;return t.ownerDocument=this,t.name=e,t.nodeName=e,t.localName=e,t.specified=!0,t},createEntityReference:function(e){var t=new le;return t.ownerDocument=this,t.nodeName=e,t},createElementNS:function(e,t){var n=new ee,r=t.split(":"),i=n.attributes=new D;return n.childNodes=new I,n.ownerDocument=this,n.nodeName=t,n.tagName=t,n.namespaceURI=e,2==r.length?(n.prefix=r[0],n.localName=r[1]):n.localName=t,i._ownerElement=n,n},createAttributeNS:function(e,t){var n=new te,r=t.split(":");return n.ownerDocument=this,n.nodeName=t,n.name=t,n.namespaceURI=e,n.specified=!0,2==r.length?(n.prefix=r[0],n.localName=r[1]):n.localName=t,n}},c(q,B),ee.prototype={nodeType:h,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 n=this.ownerDocument.createAttribute(e);n.value=n.nodeValue=""+t,this.setAttributeNode(n)},removeAttribute:function(e){var t=this.getAttributeNode(e);t&&this.removeAttributeNode(t)},appendChild:function(e){return e.nodeType===S?this.insertBefore(e,null):function(e,t){return t.parentNode&&t.parentNode.removeChild(t),t.parentNode=e,t.previousSibling=e.lastChild,t.nextSibling=null,t.previousSibling?t.previousSibling.nextSibling=t:e.firstChild=t,e.lastChild=t,z(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 n=this.getAttributeNodeNS(e,t);n&&this.removeAttributeNode(n)},hasAttributeNS:function(e,t){return null!=this.getAttributeNodeNS(e,t)},getAttributeNS:function(e,t){var n=this.getAttributeNodeNS(e,t);return n&&n.value||""},setAttributeNS:function(e,t,n){var r=this.ownerDocument.createAttributeNS(e,t);r.value=r.nodeValue=""+n,this.setAttributeNode(r)},getAttributeNodeNS:function(e,t){return this.attributes.getNamedItemNS(e,t)},getElementsByTagName:function(e){return new O(this,(function(t){var n=[];return F(t,(function(r){r===t||r.nodeType!=h||"*"!==e&&r.tagName!=e||n.push(r)})),n}))},getElementsByTagNameNS:function(e,t){return new O(this,(function(n){var r=[];return F(n,(function(i){i===n||i.nodeType!==h||"*"!==e&&i.namespaceURI!==e||"*"!==t&&i.localName!=t||r.push(i)})),r}))}},q.prototype.getElementsByTagName=ee.prototype.getElementsByTagName,q.prototype.getElementsByTagNameNS=ee.prototype.getElementsByTagNameNS,c(ee,B),te.prototype.nodeType=p,c(te,B),ne.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(C[E])},deleteData:function(e,t){this.replaceData(e,t,"")},replaceData:function(e,t,n){n=this.data.substring(0,e)+n+this.data.substring(e+t),this.nodeValue=this.data=n,this.length=n.length}},c(ne,B),re.prototype={nodeName:"#text",nodeType:f,splitText:function(e){var t=this.data,n=t.substring(e);t=t.substring(0,e),this.data=this.nodeValue=t,this.length=t.length;var r=this.ownerDocument.createTextNode(n);return this.parentNode&&this.parentNode.insertBefore(r,this.nextSibling),r}},c(re,ne),ie.prototype={nodeName:"#comment",nodeType:b},c(ie,ne),ae.prototype={nodeName:"#cdata-section",nodeType:m},c(ae,ne),oe.prototype.nodeType=T,c(oe,B),se.prototype.nodeType=w,c(se,B),ue.prototype.nodeType=v,c(ue,B),le.prototype.nodeType=g,c(le,B),ce.prototype.nodeName="#document-fragment",ce.prototype.nodeType=S,c(ce,B),de.prototype.nodeType=y,c(de,B),he.prototype.serializeToString=function(e,t,n){return pe.call(e,t,n)},B.prototype.toString=pe;try{if(Object.defineProperty){Object.defineProperty(O.prototype,"length",{get:function(){return L(this),this.$$length}}),Object.defineProperty(B.prototype,"textContent",{get:function(){return function e(t){switch(t.nodeType){case h:case S:var n=[];for(t=t.firstChild;t;)7!==t.nodeType&&8!==t.nodeType&&n.push(e(t)),t=t.nextSibling;return n.join("");default:return t.nodeValue}}(this)},set:function(e){switch(this.nodeType){case h:case S: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}}}),ve=function(e,t,n){e["$$"+t]=n}}}catch(ye){}t.DocumentType=oe,t.DOMException=P,t.DOMImplementation=j,t.Element=ee,t.Node=B,t.NodeList=I,t.XMLSerializer=he},"4wiq":function(e,t,n){var r=n("orrc"),i=Function.prototype,a=i.call,o=r&&i.bind.bind(a,a);e.exports=r?o:function(e){return function(){return a.apply(e,arguments)}}},"52Wu":function(e,t,n){var r=n("4wiq"),i=n("eDf4"),a=n("TGyr"),o=r(Function.toString);i(a.inspectSource)||(a.inspectSource=function(e){return o(e)}),e.exports=a.inspectSource},"53GT":function(e,t,n){var r,i,a,o=n("3vah"),s=n("LHWz"),u=n("mESY"),l=n("w1io"),c=n("+BqG"),d=n("TGyr"),h=n("7BeB"),p=n("SfKh"),f=s.TypeError,m=s.WeakMap;if(o||d.state){var g=d.state||(d.state=new m);g.get=g.get,g.has=g.has,g.set=g.set,r=function(e,t){if(g.has(e))throw f("Object already initialized");return t.facade=e,g.set(e,t),t},i=function(e){return g.get(e)||{}},a=function(e){return g.has(e)}}else{var v=h("state");p[v]=!0,r=function(e,t){if(c(e,v))throw f("Object already initialized");return t.facade=e,l(e,v,t),t},i=function(e){return c(e,v)?e[v]:{}},a=function(e){return c(e,v)}}e.exports={set:r,get:i,has:a,enforce:function(e){return a(e)?i(e):r(e,{})},getterFor:function(e){return function(t){var n;if(!u(t)||(n=i(t)).type!==e)throw f("Incompatible receiver, "+e+" required");return n}}}},"5ANw":function(e,t,n){var r=n("szlw"),i=n("+BqG"),a=n("RKsz"),o=n("B8MI"),s=n("Avys"),u=n("vY6g"),l=s("symbol-to-string-registry");r({target:"Symbol",stat:!0,forced:!u},{keyFor:function(e){if(!a(e))throw TypeError(o(e)+" is not a symbol");if(i(l,e))return l[e]}})},"5Tg0":function(e,t,n){(function(e){var r=n("Kz5y"),i=t&&!t.nodeType&&t,a=i&&"object"==typeof e&&e&&!e.nodeType&&e,o=a&&a.exports===i?r.Buffer:void 0,s=o?o.allocUnsafe:void 0;e.exports=function(e,t){if(t)return e.slice();var n=e.length,r=s?s(n):new e.constructor(n);return e.copy(r),r}}).call(this,n("YuTi")(e))},"6+Fx":function(e,t,n){var r=n("DsG2"),i=n("esM1"),a=n("lZX+");r||i(Object.prototype,"toString",a,{unsafe:!0})},"6r0g":function(e,t,n){var r=n("zMKt")("span").classList,i=r&&r.constructor&&r.constructor.prototype;e.exports=i===Object.prototype?void 0:i},"7BeB":function(e,t,n){var r=n("Avys"),i=n("bq/A"),a=r("keys");e.exports=function(e){return a[e]||(a[e]=i(e))}},"7W2i":function(e,t,n){var r=n("SksO");e.exports=function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&r(e,t)},e.exports.__esModule=!0,e.exports.default=e.exports},"7zRj":function(e,t,n){(function(t){var r,i="undefined"!==typeof t?t:"undefined"!==typeof window?window:{},a=n(2);"undefined"!==typeof document?r=document:(r=i["__GLOBAL_DOCUMENT_CACHE@4"])||(r=i["__GLOBAL_DOCUMENT_CACHE@4"]=a),e.exports=r}).call(this,n("yLpj"))},"8OJ3":function(e,t,n){"use strict";(function(e){for(var r,i=n("vgmO"),a=n.n(i),o=n("7zRj"),s=n.n(o),u=n("pVnL"),l=n.n(u),c=n("3zPy"),d=n.n(c),h=n("PJYZ"),p=n.n(h),f=n("VbXa"),m=n.n(f),g=n("jBAH"),v=n.n(g),y=n("NgPB"),b=n.n(y),_=n("K4wu"),T=n.n(_),S=n("sXyB"),w=n.n(S),k=n("7W2i"),C=n.n(k),E=n("Y+wj"),A=n("10ky"),x=n("F6NX"),P=n("i1Oy"),I=n("3mbX"),O=n("hIRe"),L=n("gcCN"),D=n.n(L),M=n("Mh8q"),R=n("+Kib"),N=n("NsZL"),j=n("oShl"),B=n.n(j),U={},F=function(e,t){return U[e]=U[e]||[],t&&(U[e]=U[e].concat(t)),U[e]},q=function(e,t){var n=F(e).indexOf(t);return!(n<=-1)&&(U[e]=U[e].slice(),U[e].splice(n,1),!0)},H={prefixed:!0},z=[["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"]],W=z[0],V=0;V<z.length;V++)if(z[V][1]in s.a){r=z[V];break}if(r){for(var K=0;K<r.length;K++)H[W[K]]=r[K];H.prefixed=r[0]!==W[0]}var G=[];var X=function e(t){var n,r="info",i=function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];n("log",r,t)};return n=function(e,t){return function(n,r,i){var o=t.levels[r],s=new RegExp("^("+o+")$");if("log"!==n&&i.unshift(n.toUpperCase()+":"),i.unshift(e+":"),G){G.push([].concat(i));var u=G.length-1e3;G.splice(0,u>0?u:0)}if(a.a.console){var l=a.a.console[n];l||"debug"!==n||(l=a.a.console.info||a.a.console.log),l&&o&&s.test(n)&&l[Array.isArray(i)?"apply":"call"](a.a.console,i)}}}(t,i),i.createLogger=function(n){return e(t+": "+n)},i.levels={all:"debug|log|warn|error",off:"",debug:"debug|log|warn|error",info:"log|warn|error",warn:"warn|error",error:"error",DEFAULT:r},i.level=function(e){if("string"===typeof e){if(!i.levels.hasOwnProperty(e))throw new Error('"'+e+'" in not a valid log level');r=e}return r},(i.history=function(){return G?[].concat(G):[]}).filter=function(e){return(G||[]).filter((function(t){return new RegExp(".*"+e+".*").test(t[0])}))},i.history.clear=function(){G&&(G.length=0)},i.history.disable=function(){null!==G&&(G.length=0,G=null)},i.history.enable=function(){null===G&&(G=[])},i.error=function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return n("error",r,t)},i.warn=function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return n("warn",r,t)},i.debug=function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return n("debug",r,t)},i}("VIDEOJS"),Y=X.createLogger,Q=Object.prototype.toString,$=function(e){return ee(e)?Object.keys(e):[]};function Z(e,t){$(e).forEach((function(n){return t(e[n],n)}))}function J(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return Object.assign?l.a.apply(void 0,[e].concat(n)):(n.forEach((function(t){t&&Z(t,(function(t,n){e[n]=t}))})),e)}function ee(e){return!!e&&"object"===typeof e}function te(e){return ee(e)&&"[object Object]"===Q.call(e)&&e.constructor===Object}function ne(e,t){if(!e||!t)return"";if("function"===typeof a.a.getComputedStyle){var n;try{n=a.a.getComputedStyle(e)}catch(r){return""}return n?n.getPropertyValue(t)||n[t]:""}return""}var re=a.a.navigator&&a.a.navigator.userAgent||"",ie=/AppleWebKit\/([\d.]+)/i.exec(re),ae=ie?parseFloat(ie.pop()):null,oe=/iPod/i.test(re),se=function(){var e=re.match(/OS (\d+)_/i);return e&&e[1]?e[1]:null}(),ue=/Android/i.test(re),le=function(){var e=re.match(/Android (\d+)(?:\.(\d+))?(?:\.(\d+))*/i);if(!e)return null;var t=e[1]&&parseFloat(e[1]),n=e[2]&&parseFloat(e[2]);return t&&n?parseFloat(e[1]+"."+e[2]):t||null}(),ce=ue&&le<5&&ae<537,de=/Firefox/i.test(re),he=/Edg/i.test(re),pe=!he&&(/Chrome/i.test(re)||/CriOS/i.test(re)),fe=function(){var e=re.match(/(Chrome|CriOS)\/(\d+)/);return e&&e[2]?parseFloat(e[2]):null}(),me=function(){var e=/MSIE\s(\d+)\.\d/.exec(re),t=e&&parseFloat(e[1]);return!t&&/Trident\/7.0/i.test(re)&&/rv:11.0/.test(re)&&(t=11),t}(),ge=/Safari/i.test(re)&&!pe&&!ue&&!he,ve=/Windows/i.test(re),ye=Boolean(Ee()&&("ontouchstart"in a.a||a.a.navigator.maxTouchPoints||a.a.DocumentTouch&&a.a.document instanceof a.a.DocumentTouch)),be=/iPad/i.test(re)||ge&&ye&&!/iPhone/i.test(re),_e=/iPhone/i.test(re)&&!be,Te=_e||be||oe,Se=(ge||Te)&&!pe,we=Object.freeze({__proto__:null,IS_IPOD:oe,IOS_VERSION:se,IS_ANDROID:ue,ANDROID_VERSION:le,IS_NATIVE_ANDROID:ce,IS_FIREFOX:de,IS_EDGE:he,IS_CHROME:pe,CHROME_VERSION:fe,IE_VERSION:me,IS_SAFARI:ge,IS_WINDOWS:ve,TOUCH_ENABLED:ye,IS_IPAD:be,IS_IPHONE:_e,IS_IOS:Te,IS_ANY_SAFARI:Se});function ke(e){return"string"===typeof e&&Boolean(e.trim())}function Ce(e){if(e.indexOf(" ")>=0)throw new Error("class has illegal whitespace characters")}function Ee(){return s.a===a.a.document}function Ae(e){return ee(e)&&1===e.nodeType}function xe(){try{return a.a.parent!==a.a.self}catch(e){return!0}}function Pe(e){return function(t,n){if(!ke(t))return s.a[e](null);ke(n)&&(n=s.a.querySelector(n));var r=Ae(n)?n:s.a;return r[e]&&r[e](t)}}function Ie(e,t,n,r){void 0===e&&(e="div"),void 0===t&&(t={}),void 0===n&&(n={});var i=s.a.createElement(e);return Object.getOwnPropertyNames(t).forEach((function(e){var n=t[e];-1!==e.indexOf("aria-")||"role"===e||"type"===e?(X.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 "+n+"."),i.setAttribute(e,n)):"textContent"===e?Oe(i,n):i[e]===n&&"tabIndex"!==e||(i[e]=n)})),Object.getOwnPropertyNames(n).forEach((function(e){i.setAttribute(e,n[e])})),r&&Qe(i,r),i}function Oe(e,t){return"undefined"===typeof e.textContent?e.innerText=t:e.textContent=t,e}function Le(e,t){t.firstChild?t.insertBefore(e,t.firstChild):t.appendChild(e)}function De(e,t){return Ce(t),e.classList?e.classList.contains(t):(n=t,new RegExp("(^|\\s)"+n+"($|\\s)")).test(e.className);var n}function Me(e,t){return e.classList?e.classList.add(t):De(e,t)||(e.className=(e.className+" "+t).trim()),e}function Re(e,t){return e?(e.classList?e.classList.remove(t):(Ce(t),e.className=e.className.split(/\s+/).filter((function(e){return e!==t})).join(" ")),e):(X.warn("removeClass was called with an element that doesn't exist"),null)}function Ne(e,t,n){var r=De(e,t);if("function"===typeof n&&(n=n(e,t)),"boolean"!==typeof n&&(n=!r),n!==r)return n?Me(e,t):Re(e,t),e}function je(e,t){Object.getOwnPropertyNames(t).forEach((function(n){var r=t[n];null===r||"undefined"===typeof r||!1===r?e.removeAttribute(n):e.setAttribute(n,!0===r?"":r)}))}function Be(e){var t={},n=",autoplay,controls,playsinline,loop,muted,default,defaultMuted,";if(e&&e.attributes&&e.attributes.length>0)for(var r=e.attributes,i=r.length-1;i>=0;i--){var a=r[i].name,o=r[i].value;"boolean"!==typeof e[a]&&-1===n.indexOf(","+a+",")||(o=null!==o),t[a]=o}return t}function Ue(e,t){return e.getAttribute(t)}function Fe(e,t,n){e.setAttribute(t,n)}function qe(e,t){e.removeAttribute(t)}function He(){s.a.body.focus(),s.a.onselectstart=function(){return!1}}function ze(){s.a.onselectstart=function(){return!0}}function We(e){if(e&&e.getBoundingClientRect&&e.parentNode){var t=e.getBoundingClientRect(),n={};return["bottom","height","left","right","top","width"].forEach((function(e){void 0!==t[e]&&(n[e]=t[e])})),n.height||(n.height=parseFloat(ne(e,"height"))),n.width||(n.width=parseFloat(ne(e,"width"))),n}}function Ve(e){if(!e||e&&!e.offsetParent)return{left:0,top:0,width:0,height:0};for(var t=e.offsetWidth,n=e.offsetHeight,r=0,i=0;e.offsetParent&&e!==s.a[H.fullscreenElement];)r+=e.offsetLeft,i+=e.offsetTop,e=e.offsetParent;return{left:r,top:i,width:t,height:n}}function Ke(e,t){var n={x:0,y:0};if(Te)for(var r=e;r&&"html"!==r.nodeName.toLowerCase();){var i=ne(r,"transform");if(/^matrix/.test(i)){var a=i.slice(7,-1).split(/,\s/).map(Number);n.x+=a[4],n.y+=a[5]}else if(/^matrix3d/.test(i)){var o=i.slice(9,-1).split(/,\s/).map(Number);n.x+=o[12],n.y+=o[13]}r=r.parentNode}var s={},u=Ve(t.target),l=Ve(e),c=l.width,d=l.height,h=t.offsetY-(l.top-u.top),p=t.offsetX-(l.left-u.left);return t.changedTouches&&(p=t.changedTouches[0].pageX-l.left,h=t.changedTouches[0].pageY+l.top,Te&&(p-=n.x,h-=n.y)),s.y=1-Math.max(0,Math.min(1,h/d)),s.x=Math.max(0,Math.min(1,p/c)),s}function Ge(e){return ee(e)&&3===e.nodeType}function Xe(e){for(;e.firstChild;)e.removeChild(e.firstChild);return e}function Ye(e){return"function"===typeof e&&(e=e()),(Array.isArray(e)?e:[e]).map((function(e){return"function"===typeof e&&(e=e()),Ae(e)||Ge(e)?e:"string"===typeof e&&/\S/.test(e)?s.a.createTextNode(e):void 0})).filter((function(e){return e}))}function Qe(e,t){return Ye(t).forEach((function(t){return e.appendChild(t)})),e}function $e(e,t){return Qe(Xe(e),t)}function Ze(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 Je,et=Pe("querySelector"),tt=Pe("querySelectorAll"),nt=Object.freeze({__proto__:null,isReal:Ee,isEl:Ae,isInFrame:xe,createEl:Ie,textContent:Oe,prependTo:Le,hasClass:De,addClass:Me,removeClass:Re,toggleClass:Ne,setAttributes:je,getAttributes:Be,getAttribute:Ue,setAttribute:Fe,removeAttribute:qe,blockTextSelection:He,unblockTextSelection:ze,getBoundingClientRect:We,findPosition:Ve,getPointerPosition:Ke,isTextNode:Ge,emptyEl:Xe,normalizeContent:Ye,appendContent:Qe,insertContent:$e,isSingleLeftClick:Ze,$:et,$$:tt}),rt=!1,it=function(){if(!1!==Je.options.autoSetup){var e=Array.prototype.slice.call(s.a.getElementsByTagName("video")),t=Array.prototype.slice.call(s.a.getElementsByTagName("audio")),n=Array.prototype.slice.call(s.a.getElementsByTagName("video-js")),r=e.concat(t,n);if(r&&r.length>0)for(var i=0,a=r.length;i<a;i++){var o=r[i];if(!o||!o.getAttribute){at(1);break}void 0===o.player&&null!==o.getAttribute("data-setup")&&Je(o)}else rt||at(1)}};function at(e,t){Ee()&&(t&&(Je=t),a.a.setTimeout(it,e))}function ot(){rt=!0,a.a.removeEventListener("load",ot)}Ee()&&("complete"===s.a.readyState?ot():a.a.addEventListener("load",ot));var st,ut=function(e){var t=s.a.createElement("style");return t.className=e,t},lt=function(e,t){e.styleSheet?e.styleSheet.cssText=t:e.textContent=t},ct=3;function dt(){return ct++}a.a.WeakMap||(st=function(){function e(){this.vdata="vdata"+Math.floor(a.a.performance&&a.a.performance.now()||Date.now()),this.data={}}var t=e.prototype;return t.set=function(e,t){var n=e[this.vdata]||dt();return e[this.vdata]||(e[this.vdata]=n),this.data[n]=t,this},t.get=function(e){var t=e[this.vdata];if(t)return this.data[t];X("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 ht,pt=a.a.WeakMap?new WeakMap:new st;function ft(e,t){if(pt.has(e)){var n=pt.get(e);0===n.handlers[t].length&&(delete n.handlers[t],e.removeEventListener?e.removeEventListener(t,n.dispatcher,!1):e.detachEvent&&e.detachEvent("on"+t,n.dispatcher)),Object.getOwnPropertyNames(n.handlers).length<=0&&(delete n.handlers,delete n.dispatcher,delete n.disabled),0===Object.getOwnPropertyNames(n).length&&pt.delete(e)}}function mt(e,t,n,r){n.forEach((function(n){e(t,n,r)}))}function gt(e){if(e.fixed_)return e;function t(){return!0}function n(){return!1}if(!e||!e.isPropagationStopped||!e.isImmediatePropagationStopped){var r=e||a.a.event;for(var i in e={},r)"layerX"!==i&&"layerY"!==i&&"keyLocation"!==i&&"webkitMovementX"!==i&&"webkitMovementY"!==i&&"path"!==i&&("returnValue"===i&&r.preventDefault||(e[i]=r[i]));if(e.target||(e.target=e.srcElement||s.a),e.relatedTarget||(e.relatedTarget=e.fromElement===e.target?e.toElement:e.fromElement),e.preventDefault=function(){r.preventDefault&&r.preventDefault(),e.returnValue=!1,r.returnValue=!1,e.defaultPrevented=!0},e.defaultPrevented=!1,e.stopPropagation=function(){r.stopPropagation&&r.stopPropagation(),e.cancelBubble=!0,r.cancelBubble=!0,e.isPropagationStopped=t},e.isPropagationStopped=n,e.stopImmediatePropagation=function(){r.stopImmediatePropagation&&r.stopImmediatePropagation(),e.isImmediatePropagationStopped=t,e.stopPropagation()},e.isImmediatePropagationStopped=n,null!==e.clientX&&void 0!==e.clientX){var o=s.a.documentElement,u=s.a.body;e.pageX=e.clientX+(o&&o.scrollLeft||u&&u.scrollLeft||0)-(o&&o.clientLeft||u&&u.clientLeft||0),e.pageY=e.clientY+(o&&o.scrollTop||u&&u.scrollTop||0)-(o&&o.clientTop||u&&u.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 vt=["touchstart","touchmove"];function yt(e,t,n){if(Array.isArray(t))return mt(yt,e,t,n);pt.has(e)||pt.set(e,{});var r=pt.get(e);if(r.handlers||(r.handlers={}),r.handlers[t]||(r.handlers[t]=[]),n.guid||(n.guid=dt()),r.handlers[t].push(n),r.dispatcher||(r.disabled=!1,r.dispatcher=function(t,n){if(!r.disabled){t=gt(t);var i=r.handlers[t.type];if(i)for(var a=i.slice(0),o=0,s=a.length;o<s&&!t.isImmediatePropagationStopped();o++)try{a[o].call(e,t,n)}catch(u){X.error(u)}}}),1===r.handlers[t].length)if(e.addEventListener){var i=!1;(function(){if("boolean"!==typeof ht){ht=!1;try{var e=Object.defineProperty({},"passive",{get:function(){ht=!0}});a.a.addEventListener("test",null,e),a.a.removeEventListener("test",null,e)}catch(t){}}return ht})()&&vt.indexOf(t)>-1&&(i={passive:!0}),e.addEventListener(t,r.dispatcher,i)}else e.attachEvent&&e.attachEvent("on"+t,r.dispatcher)}function bt(e,t,n){if(pt.has(e)){var r=pt.get(e);if(r.handlers){if(Array.isArray(t))return mt(bt,e,t,n);var i=function(e,t){r.handlers[t]=[],ft(e,t)};if(void 0!==t){var a=r.handlers[t];if(a)if(n){if(n.guid)for(var o=0;o<a.length;o++)a[o].guid===n.guid&&a.splice(o--,1);ft(e,t)}else i(e,t)}else for(var s in r.handlers)Object.prototype.hasOwnProperty.call(r.handlers||{},s)&&i(e,s)}}}function _t(e,t,n){var r=pt.has(e)?pt.get(e):{},i=e.parentNode||e.ownerDocument;if("string"===typeof t?t={type:t,target:e}:t.target||(t.target=e),t=gt(t),r.dispatcher&&r.dispatcher.call(e,t,n),i&&!t.isPropagationStopped()&&!0===t.bubbles)_t.call(null,i,t,n);else if(!i&&!t.defaultPrevented&&t.target&&t.target[t.type]){pt.has(t.target)||pt.set(t.target,{});var a=pt.get(t.target);t.target[t.type]&&(a.disabled=!0,"function"===typeof t.target[t.type]&&t.target[t.type](),a.disabled=!1)}return!t.defaultPrevented}function Tt(e,t,n){if(Array.isArray(t))return mt(Tt,e,t,n);var r=function r(){bt(e,t,r),n.apply(this,arguments)};r.guid=n.guid=n.guid||dt(),yt(e,t,r)}function St(e,t,n){var r=function r(){bt(e,t,r),n.apply(this,arguments)};r.guid=n.guid=n.guid||dt(),yt(e,t,r)}var wt,kt=Object.freeze({__proto__:null,fixEvent:gt,on:yt,off:bt,trigger:_t,one:Tt,any:St}),Ct=function(e,t,n){t.guid||(t.guid=dt());var r=t.bind(e);return r.guid=n?n+"_"+t.guid:t.guid,r},Et=function(e,t){var n=a.a.performance.now();return function(){var r=a.a.performance.now();r-n>=t&&(e.apply(void 0,arguments),n=r)}},At=function(){};At.prototype.allowedEvents_={},At.prototype.on=function(e,t){var n=this.addEventListener;this.addEventListener=function(){},yt(this,e,t),this.addEventListener=n},At.prototype.addEventListener=At.prototype.on,At.prototype.off=function(e,t){bt(this,e,t)},At.prototype.removeEventListener=At.prototype.off,At.prototype.one=function(e,t){var n=this.addEventListener;this.addEventListener=function(){},Tt(this,e,t),this.addEventListener=n},At.prototype.any=function(e,t){var n=this.addEventListener;this.addEventListener=function(){},St(this,e,t),this.addEventListener=n},At.prototype.trigger=function(e){var t=e.type||e;"string"===typeof e&&(e={type:t}),e=gt(e),this.allowedEvents_[t]&&this["on"+t]&&this["on"+t](e),_t(this,e)},At.prototype.dispatchEvent=At.prototype.trigger,At.prototype.queueTrigger=function(e){var t=this;wt||(wt=new Map);var n=e.type||e,r=wt.get(this);r||(r=new Map,wt.set(this,r));var i=r.get(n);r.delete(n),a.a.clearTimeout(i);var o=a.a.setTimeout((function(){r.delete(n),0===r.size&&(r=null,wt.delete(t)),t.trigger(e)}),0);r.set(n,o)};var xt=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},Pt=function(e){return e instanceof At||!!e.eventBusEl_&&["on","one","off","trigger"].every((function(t){return"function"===typeof e[t]}))},It=function(e){return"string"===typeof e&&/\S/.test(e)||Array.isArray(e)&&!!e.length},Ot=function(e,t,n){if(!e||!e.nodeName&&!Pt(e))throw new Error("Invalid target for "+xt(t)+"#"+n+"; must be a DOM node or evented object.")},Lt=function(e,t,n){if(!It(e))throw new Error("Invalid event type for "+xt(t)+"#"+n+"; must be a non-empty string or array.")},Dt=function(e,t,n){if("function"!==typeof e)throw new Error("Invalid listener for "+xt(t)+"#"+n+"; must be a function.")},Mt=function(e,t,n){var r,i,a,o=t.length<3||t[0]===e||t[0]===e.eventBusEl_;return o?(r=e.eventBusEl_,t.length>=3&&t.shift(),i=t[0],a=t[1]):(r=t[0],i=t[1],a=t[2]),Ot(r,e,n),Lt(i,e,n),Dt(a,e,n),{isTargetingSelf:o,target:r,type:i,listener:a=Ct(e,a)}},Rt=function(e,t,n,r){Ot(e,e,t),e.nodeName?kt[t](e,n,r):e[t](n,r)},Nt={on:function(){for(var e=this,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var i=Mt(this,n,"on"),a=i.isTargetingSelf,o=i.target,s=i.type,u=i.listener;if(Rt(o,"on",s,u),!a){var l=function(){return e.off(o,s,u)};l.guid=u.guid;var c=function(){return e.off("dispose",l)};c.guid=u.guid,Rt(this,"on","dispose",l),Rt(o,"on","dispose",c)}},one:function(){for(var e=this,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var i=Mt(this,n,"one"),a=i.isTargetingSelf,o=i.target,s=i.type,u=i.listener;if(a)Rt(o,"one",s,u);else{var l=function t(){e.off(o,s,t);for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];u.apply(null,r)};l.guid=u.guid,Rt(o,"one",s,l)}},any:function(){for(var e=this,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var i=Mt(this,n,"any"),a=i.isTargetingSelf,o=i.target,s=i.type,u=i.listener;if(a)Rt(o,"any",s,u);else{var l=function t(){e.off(o,s,t);for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];u.apply(null,r)};l.guid=u.guid,Rt(o,"any",s,l)}},off:function(e,t,n){if(!e||It(e))bt(this.eventBusEl_,e,t);else{var r=e,i=t;Ot(r,this,"off"),Lt(i,this,"off"),Dt(n,this,"off"),n=Ct(this,n),this.off("dispose",n),r.nodeName?(bt(r,i,n),bt(r,"dispose",n)):Pt(r)&&(r.off(i,n),r.off("dispose",n))}},trigger:function(e,t){Ot(this.eventBusEl_,this,"trigger");var n=e&&"string"!==typeof e?e.type:e;if(!It(n)){var r="Invalid event type for "+xt(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(r);(this.log||X).error(r)}return _t(this.eventBusEl_,e,t)}};function jt(e,t){void 0===t&&(t={});var n=t.eventBusKey;if(n){if(!e[n].nodeName)throw new Error('The eventBusKey "'+n+'" does not refer to an element.');e.eventBusEl_=e[n]}else e.eventBusEl_=Ie("span",{className:"vjs-event-bus"});return J(e,Nt),e.eventedCallbacks&&e.eventedCallbacks.forEach((function(e){e()})),e.on("dispose",(function(){e.off(),[e,e.el_,e.eventBusEl_].forEach((function(e){e&&pt.has(e)&&pt.delete(e)})),a.a.setTimeout((function(){e.eventBusEl_=null}),0)})),e}var Bt={state:{},setState:function(e){var t,n=this;return"function"===typeof e&&(e=e()),Z(e,(function(e,r){n.state[r]!==e&&((t=t||{})[r]={from:n.state[r],to:e}),n.state[r]=e})),t&&Pt(this)&&this.trigger({changes:t,type:"statechanged"}),t}};function Ut(e,t){return J(e,Bt),e.state=J({},e.state,t),"function"===typeof e.handleStateChanged&&Pt(e)&&e.on("statechanged",e.handleStateChanged),e}var Ft=function(e){return"string"!==typeof e?e:e.replace(/./,(function(e){return e.toLowerCase()}))},qt=function(e){return"string"!==typeof e?e:e.replace(/./,(function(e){return e.toUpperCase()}))};function Ht(){for(var e={},t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return n.forEach((function(t){t&&Z(t,(function(t,n){te(t)?(te(e[n])||(e[n]={}),e[n]=Ht(e[n],t)):e[n]=t}))})),e}var zt=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 n in this.map_)e.call(t,this.map_[n],n,this)},e}(),Wt=a.a.Map?a.a.Map:zt,Vt=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 n in this.set_)e.call(t,n,n,this)},e}(),Kt=a.a.Set?a.a.Set:Vt,Gt=function(){function e(e,t,n){var r=this;if(!e&&this.play?this.player_=e=this:this.player_=e,this.isDisposed_=!1,this.parentComponent_=null,this.options_=Ht({},this.options_),t=this.options_=Ht(this.options_,t),this.id_=t.id||t.el&&t.el.id,!this.id_){var i=e&&e.id&&e.id()||"no_player";this.id_=i+"_component_"+dt()}this.name_=t.name||null,t.el?this.el_=t.el:!1!==t.createEl&&(this.el_=this.createEl()),t.className&&this.el_&&t.className.split(" ").forEach((function(e){return r.addClass(e)})),!1!==t.evented&&(jt(this,{eventBusKey:this.el_?"el_":null}),this.handleLanguagechange=this.handleLanguagechange.bind(this),this.on(this.player_,"languagechange",this.handleLanguagechange)),Ut(this,this.constructor.defaultState),this.children_=[],this.childIndex_={},this.childNameIndex_={},this.setTimeoutIds_=new Kt,this.setIntervalIds_=new Kt,this.rafIds_=new Kt,this.namedRafs_=new Wt,this.clearingTimersOnDispose_=!1,!1!==t.initChildren&&this.initChildren(),this.ready(n),!1!==t.reportTouchActivity&&this.enableTouchActivity()}var t=e.prototype;return t.dispose=function(e){if(void 0===e&&(e={}),!this.isDisposed_){if(this.readyQueue_&&(this.readyQueue_.length=0),this.trigger({type:"dispose",bubbles:!1}),this.isDisposed_=!0,this.children_)for(var t=this.children_.length-1;t>=0;t--)this.children_[t].dispose&&this.children_[t].dispose();this.children_=null,this.childIndex_=null,this.childNameIndex_=null,this.parentComponent_=null,this.el_&&(this.el_.parentNode&&(e.restoreEl?this.el_.parentNode.replaceChild(e.restoreEl,this.el_):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_=Ht(this.options_,e),this.options_):this.options_},t.el=function(){return this.el_},t.createEl=function(e,t,n){return Ie(e,t,n)},t.localize=function(e,t,n){void 0===n&&(n=e);var r=this.player_.language&&this.player_.language(),i=this.player_.languages&&this.player_.languages(),a=i&&i[r],o=r&&r.split("-")[0],s=i&&i[o],u=n;return a&&a[e]?u=a[e]:s&&s[e]&&(u=s[e]),t&&(u=u.replace(/\{(\d+)\}/g,(function(e,n){var r=t[n-1],i=r;return"undefined"===typeof r&&(i=e),i}))),u},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),n=0;n<e;n++)t[n]=arguments[n];t=t.reduce((function(e,t){return e.concat(t)}),[]);for(var r=this,i=0;i<t.length;i++)if(!(r=r.getChild(t[i]))||!r.getChild)return;return r},t.addChild=function(t,n,r){var i,a;if(void 0===n&&(n={}),void 0===r&&(r=this.children_.length),"string"===typeof t){a=qt(t);var o=n.componentClass||a;n.name=a;var s=e.getComponent(o);if(!s)throw new Error("Component "+o+" does not exist");if("function"!==typeof s)return null;i=new s(this.player_||this,n)}else i=t;if(i.parentComponent_&&i.parentComponent_.removeChild(i),this.children_.splice(r,0,i),i.parentComponent_=this,"function"===typeof i.id&&(this.childIndex_[i.id()]=i),(a=a||i.name&&qt(i.name()))&&(this.childNameIndex_[a]=i,this.childNameIndex_[Ft(a)]=i),"function"===typeof i.el&&i.el()){var u=null;this.children_[r+1]&&(this.children_[r+1].el_?u=this.children_[r+1].el_:Ae(this.children_[r+1])&&(u=this.children_[r+1])),this.contentEl().insertBefore(i.el(),u)}return i},t.removeChild=function(e){if("string"===typeof e&&(e=this.getChild(e)),e&&this.children_){for(var t=!1,n=this.children_.length-1;n>=0;n--)if(this.children_[n]===e){t=!0,this.children_.splice(n,1);break}if(t){e.parentComponent_=null,this.childIndex_[e.id()]=null,this.childNameIndex_[qt(e.name())]=null,this.childNameIndex_[Ft(e.name())]=null;var r=e.el();r&&r.parentNode===this.contentEl()&&this.contentEl().removeChild(e.el())}}},t.initChildren=function(){var t=this,n=this.options_.children;if(n){var r,i=this.options_,a=e.getComponent("Tech");(r=Array.isArray(n)?n:Object.keys(n)).concat(Object.keys(this.options_).filter((function(e){return!r.some((function(t){return"string"===typeof t?e===t:e===t.name}))}))).map((function(e){var r,i;return"string"===typeof e?i=n[r=e]||t.options_[r]||{}:(r=e.name,i=e),{name:r,opts:i}})).filter((function(t){var n=e.getComponent(t.opts.componentClass||qt(t.name));return n&&!a.isTech(n)})).forEach((function(e){var n=e.name,r=e.opts;if(void 0!==i[n]&&(r=i[n]),!1!==r){!0===r&&(r={}),r.playerOptions=t.options_.playerOptions;var a=t.addChild(n,r);a&&(t[n]=a)}}))}},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 et(e,t||this.contentEl())},t.$$=function(e,t){return tt(e,t||this.contentEl())},t.hasClass=function(e){return De(this.el_,e)},t.addClass=function(e){Me(this.el_,e)},t.removeClass=function(e){Re(this.el_,e)},t.toggleClass=function(e,t){Ne(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 Ue(this.el_,e)},t.setAttribute=function(e,t){Fe(this.el_,e,t)},t.removeAttribute=function(e){qe(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,n){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(n||this.trigger("componentresize"));if(!this.el_)return 0;var r=this.el_.style[e],i=r.indexOf("px");return-1!==i?parseInt(r.slice(0,i),10):parseInt(this.el_["offset"+qt(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=ne(this.el_,e),0===(t=parseFloat(t))||isNaN(t)){var n="offset"+qt(e);t=this.el_[n]}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_&&(d.a.isEventKey(e,"Tab")||e.stopPropagation(),this.player_.handleKeyDown(e))},t.handleKeyPress=function(e){this.handleKeyDown(e)},t.emitTapEvents=function(){var e,t=0,n=null;this.on("touchstart",(function(r){1===r.touches.length&&(n={pageX:r.touches[0].pageX,pageY:r.touches[0].pageY},t=a.a.performance.now(),e=!0)})),this.on("touchmove",(function(t){if(t.touches.length>1)e=!1;else if(n){var r=t.touches[0].pageX-n.pageX,i=t.touches[0].pageY-n.pageY;Math.sqrt(r*r+i*i)>10&&(e=!1)}}));var r=function(){e=!1};this.on("touchleave",r),this.on("touchcancel",r),this.on("touchend",(function(r){(n=null,!0===e)&&(a.a.performance.now()-t<200&&(r.preventDefault(),this.trigger("tap")))}))},t.enableTouchActivity=function(){if(this.player()&&this.player().reportUserActivity){var e,t=Ct(this.player(),this.player().reportUserActivity);this.on("touchstart",(function(){t(),this.clearInterval(e),e=this.setInterval(t,250)}));var n=function(n){t(),this.clearInterval(e)};this.on("touchmove",t),this.on("touchend",n),this.on("touchcancel",n)}},t.setTimeout=function(e,t){var n,r=this;return e=Ct(this,e),this.clearTimersOnDispose_(),n=a.a.setTimeout((function(){r.setTimeoutIds_.has(n)&&r.setTimeoutIds_.delete(n),e()}),t),this.setTimeoutIds_.add(n),n},t.clearTimeout=function(e){return this.setTimeoutIds_.has(e)&&(this.setTimeoutIds_.delete(e),a.a.clearTimeout(e)),e},t.setInterval=function(e,t){e=Ct(this,e),this.clearTimersOnDispose_();var n=a.a.setInterval(e,t);return this.setIntervalIds_.add(n),n},t.clearInterval=function(e){return this.setIntervalIds_.has(e)&&(this.setIntervalIds_.delete(e),a.a.clearInterval(e)),e},t.requestAnimationFrame=function(e){var t,n=this;return this.supportsRaf_?(this.clearTimersOnDispose_(),e=Ct(this,e),t=a.a.requestAnimationFrame((function(){n.rafIds_.has(t)&&n.rafIds_.delete(t),e()})),this.rafIds_.add(t),t):this.setTimeout(e,1e3/60)},t.requestNamedAnimationFrame=function(e,t){var n=this;if(!this.namedRafs_.has(e)){this.clearTimersOnDispose_(),t=Ct(this,t);var r=this.requestAnimationFrame((function(){t(),n.namedRafs_.has(e)&&n.namedRafs_.delete(e)}));return this.namedRafs_.set(e,r),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),a.a.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 n=t[0],r=t[1];e[n].forEach((function(t,n){return e[r](n)}))})),e.clearingTimersOnDispose_=!1})))},e.registerComponent=function(t,n){if("string"!==typeof t||!t)throw new Error('Illegal component name, "'+t+'"; must be a non-empty string.');var r,i=e.getComponent("Tech"),a=i&&i.isTech(n),o=e===n||e.prototype.isPrototypeOf(n.prototype);if(a||!o)throw r=a?"techs must be registered using Tech.registerTech()":"must be a Component subclass",new Error('Illegal component, "'+t+'"; '+r+".");t=qt(t),e.components_||(e.components_={});var s=e.getComponent("Player");if("Player"===t&&s&&s.players){var u=s.players,l=Object.keys(u);if(u&&l.length>0&&l.map((function(e){return u[e]})).every(Boolean))throw new Error("Can not register Player component after player has been created.")}return e.components_[t]=n,e.components_[Ft(t)]=n,n},e.getComponent=function(t){if(t&&e.components_)return e.components_[t]},e}();function Xt(e,t,n,r){return function(e,t,n){if("number"!==typeof t||t<0||t>n)throw new Error("Failed to execute '"+e+"' on 'TimeRanges': The index provided ("+t+") is non-numeric or out of bounds (0-"+n+").")}(e,r,n.length-1),n[r][t]}function Yt(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:Xt.bind(null,"start",0,e),end:Xt.bind(null,"end",1,e)},a.a.Symbol&&a.a.Symbol.iterator&&(t[a.a.Symbol.iterator]=function(){return(e||[]).values()}),t}function Qt(e,t){return Array.isArray(e)?Yt(e):void 0===e||void 0===t?Yt():Yt([[e,t]])}function $t(e,t){var n,r,i=0;if(!t)return 0;e&&e.length||(e=Qt(0,0));for(var a=0;a<e.length;a++)n=e.start(a),(r=e.end(a))>t&&(r=t),i+=r-n;return i/t}function Zt(e){if(e instanceof Zt)return e;"number"===typeof e?this.code=e:"string"===typeof e?this.message=e:ee(e)&&("number"===typeof e.code&&(this.code=e.code),J(this,e)),this.message||(this.message=Zt.defaultMessages[this.code]||"")}Gt.prototype.supportsRaf_="function"===typeof a.a.requestAnimationFrame&&"function"===typeof a.a.cancelAnimationFrame,Gt.registerComponent("Component",Gt),Zt.prototype.code=0,Zt.prototype.message="",Zt.prototype.status=null,Zt.errorTypes=["MEDIA_ERR_CUSTOM","MEDIA_ERR_ABORTED","MEDIA_ERR_NETWORK","MEDIA_ERR_DECODE","MEDIA_ERR_SRC_NOT_SUPPORTED","MEDIA_ERR_ENCRYPTED"],Zt.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 Jt=0;Jt<Zt.errorTypes.length;Jt++)Zt[Zt.errorTypes[Jt]]=Jt,Zt.prototype[Zt.errorTypes[Jt]]=Jt;function en(e){return void 0!==e&&null!==e&&"function"===typeof e.then}function tn(e){en(e)&&e.then(null,(function(e){}))}var nn=function(e){return["kind","label","language","id","inBandMetadataTrackDispatchType","mode","src"].reduce((function(t,n,r){return e[n]&&(t[n]=e[n]),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}}))})},rn=function(e){var t=e.$$("track"),n=Array.prototype.map.call(t,(function(e){return e.track}));return Array.prototype.map.call(t,(function(e){var t=nn(e.track);return e.src&&(t.src=e.src),t})).concat(Array.prototype.filter.call(e.textTracks(),(function(e){return-1===n.indexOf(e)})).map(nn))},an=function(e,t){return e.forEach((function(e){var n=t.addRemoteTextTrack(e).track;!e.src&&e.cues&&e.cues.forEach((function(e){return n.addCue(e)}))})),t.textTracks()},on=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).handleKeyDown_=function(e){return r.handleKeyDown(e)},r.close_=function(e){return r.close(e)},r.opened_=r.hasBeenOpened_=r.hasBeenFilled_=!1,r.closeable(!r.options_.uncloseable),r.content(r.options_.content),r.contentEl_=Ie("div",{className:"vjs-modal-dialog-content"},{role:"document"}),r.descEl_=Ie("p",{className:"vjs-modal-dialog-description vjs-control-text",id:r.el().getAttribute("aria-describedby")}),Oe(r.descEl_,r.description()),r.el_.appendChild(r.descEl_),r.el_.appendChild(r.contentEl_),r}m()(t,e);var n=t.prototype;return n.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"})},n.dispose=function(){this.contentEl_=null,this.descEl_=null,this.previouslyActiveEl_=null,e.prototype.dispose.call(this)},n.buildCSSClass=function(){return"vjs-modal-dialog vjs-hidden "+e.prototype.buildCSSClass.call(this)},n.label=function(){return this.localize(this.options_.label||"Modal Window")},n.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},n.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}},n.opened=function(e){return"boolean"===typeof e&&this[e?"open":"close"](),this.opened_},n.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()}},n.closeable=function(e){if("boolean"===typeof e){var t=this.closeable_=!!e,n=this.getChild("closeButton");if(t&&!n){var r=this.contentEl_;this.contentEl_=this.el_,n=this.addChild("closeButton",{controlText:"Close Modal Dialog"}),this.contentEl_=r,this.on(n,"close",this.close_)}!t&&n&&(this.off(n,"close",this.close_),this.removeChild(n),n.dispose())}return this.closeable_},n.fill=function(){this.fillWith(this.content())},n.fillWith=function(e){var t=this.contentEl(),n=t.parentNode,r=t.nextSibling;this.trigger("beforemodalfill"),this.hasBeenFilled_=!0,n.removeChild(t),this.empty(),$e(t,e),this.trigger("modalfill"),r?n.insertBefore(t,r):n.appendChild(t);var i=this.getChild("closeButton");i&&n.appendChild(i.el_)},n.empty=function(){this.trigger("beforemodalempty"),Xe(this.contentEl()),this.trigger("modalempty")},n.content=function(e){return"undefined"!==typeof e&&(this.content_=e),this.content_},n.conditionalFocus_=function(){var e=s.a.activeElement,t=this.player_.el_;this.previouslyActiveEl_=null,(t.contains(e)||t===e)&&(this.previouslyActiveEl_=e,this.focus())},n.conditionalBlur_=function(){this.previouslyActiveEl_&&(this.previouslyActiveEl_.focus(),this.previouslyActiveEl_=null)},n.handleKeyDown=function(e){if(e.stopPropagation(),d.a.isEventKey(e,"Escape")&&this.closeable())return e.preventDefault(),void this.close();if(d.a.isEventKey(e,"Tab")){for(var t,n=this.focusableEls_(),r=this.el_.querySelector(":focus"),i=0;i<n.length;i++)if(r===n[i]){t=i;break}s.a.activeElement===this.el_&&(t=0),e.shiftKey&&0===t?(n[n.length-1].focus(),e.preventDefault()):e.shiftKey||t!==n.length-1||(n[0].focus(),e.preventDefault())}},n.focusableEls_=function(){var e=this.el_.querySelectorAll("*");return Array.prototype.filter.call(e,(function(e){return(e instanceof a.a.HTMLAnchorElement||e instanceof a.a.HTMLAreaElement)&&e.hasAttribute("href")||(e instanceof a.a.HTMLInputElement||e instanceof a.a.HTMLSelectElement||e instanceof a.a.HTMLTextAreaElement||e instanceof a.a.HTMLButtonElement)&&!e.hasAttribute("disabled")||e instanceof a.a.HTMLIFrameElement||e instanceof a.a.HTMLObjectElement||e instanceof a.a.HTMLEmbedElement||e.hasAttribute("tabindex")&&-1!==e.getAttribute("tabindex")||e.hasAttribute("contenteditable")}))},t}(Gt);on.prototype.options_={pauseOnOpen:!0,temporary:!0},Gt.registerComponent("ModalDialog",on);var sn=function(e){function t(t){var n;void 0===t&&(t=[]),(n=e.call(this)||this).tracks_=[],Object.defineProperty(p()(n),"length",{get:function(){return this.tracks_.length}});for(var r=0;r<t.length;r++)n.addTrack(t[r]);return n}m()(t,e);var n=t.prototype;return n.addTrack=function(e){var t=this,n=this.tracks_.length;""+n in this||Object.defineProperty(this,n,{get:function(){return this.tracks_[n]}}),-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})},Pt(e)&&e.addEventListener("labelchange",e.labelchange_)},n.removeTrack=function(e){for(var t,n=0,r=this.length;n<r;n++)if(this[n]===e){(t=this[n]).off&&t.off(),this.tracks_.splice(n,1);break}t&&this.trigger({track:t,type:"removetrack",target:this})},n.getTrackById=function(e){for(var t=null,n=0,r=this.length;n<r;n++){var i=this[n];if(i.id===e){t=i;break}}return t},t}(At);for(var un in sn.prototype.allowedEvents_={change:"change",addtrack:"addtrack",removetrack:"removetrack",labelchange:"labelchange"},sn.prototype.allowedEvents_)sn.prototype["on"+un]=null;var ln=function(e,t){for(var n=0;n<e.length;n++)Object.keys(e[n]).length&&t.id!==e[n].id&&(e[n].enabled=!1)},cn=function(e){function t(t){var n;void 0===t&&(t=[]);for(var r=t.length-1;r>=0;r--)if(t[r].enabled){ln(t,t[r]);break}return(n=e.call(this,t)||this).changing_=!1,n}m()(t,e);var n=t.prototype;return n.addTrack=function(t){var n=this;t.enabled&&ln(this,t),e.prototype.addTrack.call(this,t),t.addEventListener&&(t.enabledChange_=function(){n.changing_||(n.changing_=!0,ln(n,t),n.changing_=!1,n.trigger("change"))},t.addEventListener("enabledchange",t.enabledChange_))},n.removeTrack=function(t){e.prototype.removeTrack.call(this,t),t.removeEventListener&&t.enabledChange_&&(t.removeEventListener("enabledchange",t.enabledChange_),t.enabledChange_=null)},t}(sn),dn=function(e,t){for(var n=0;n<e.length;n++)Object.keys(e[n]).length&&t.id!==e[n].id&&(e[n].selected=!1)},hn=function(e){function t(t){var n;void 0===t&&(t=[]);for(var r=t.length-1;r>=0;r--)if(t[r].selected){dn(t,t[r]);break}return(n=e.call(this,t)||this).changing_=!1,Object.defineProperty(p()(n),"selectedIndex",{get:function(){for(var e=0;e<this.length;e++)if(this[e].selected)return e;return-1},set:function(){}}),n}m()(t,e);var n=t.prototype;return n.addTrack=function(t){var n=this;t.selected&&dn(this,t),e.prototype.addTrack.call(this,t),t.addEventListener&&(t.selectedChange_=function(){n.changing_||(n.changing_=!0,dn(n,t),n.changing_=!1,n.trigger("change"))},t.addEventListener("selectedchange",t.selectedChange_))},n.removeTrack=function(t){e.prototype.removeTrack.call(this,t),t.removeEventListener&&t.selectedChange_&&(t.removeEventListener("selectedchange",t.selectedChange_),t.selectedChange_=null)},t}(sn),pn=function(e){function t(){return e.apply(this,arguments)||this}m()(t,e);var n=t.prototype;return n.addTrack=function(t){var n=this;e.prototype.addTrack.call(this,t),this.queueChange_||(this.queueChange_=function(){return n.queueTrigger("change")}),this.triggerSelectedlanguagechange||(this.triggerSelectedlanguagechange_=function(){return n.trigger("selectedlanguagechange")}),t.addEventListener("modechange",this.queueChange_);-1===["metadata","chapters"].indexOf(t.kind)&&t.addEventListener("modechange",this.triggerSelectedlanguagechange_)},n.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}(sn),fn=function(){function e(e){void 0===e&&(e=[]),this.trackElements_=[],Object.defineProperty(this,"length",{get:function(){return this.trackElements_.length}});for(var t=0,n=e.length;t<n;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,n=0,r=this.trackElements_.length;n<r;n++)if(e===this.trackElements_[n].track){t=this.trackElements_[n];break}return t},t.removeTrackElement_=function(e){for(var t=0,n=this.trackElements_.length;t<n;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}(),mn=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,n=0,r=e.length;this.cues_=e,this.length_=e.length;var i=function(e){""+e in this||Object.defineProperty(this,""+e,{get:function(){return this.cues_[e]}})};if(t<r)for(n=t;n<r;n++)i.call(this,n)},t.getCueById=function(e){for(var t=null,n=0,r=this.length;n<r;n++){var i=this[n];if(i.id===e){t=i;break}}return t},e}(),gn={alternative:"alternative",captions:"captions",main:"main",sign:"sign",subtitles:"subtitles",commentary:"commentary"},vn={alternative:"alternative",descriptions:"descriptions",main:"main","main-desc":"main-desc",translation:"translation",commentary:"commentary"},yn={subtitles:"subtitles",captions:"captions",descriptions:"descriptions",chapters:"chapters",metadata:"metadata"},bn={disabled:"disabled",hidden:"hidden",showing:"showing"},_n=function(e){function t(t){var n;void 0===t&&(t={}),n=e.call(this)||this;var r={id:t.id||"vjs_track_"+dt(),kind:t.kind||"",language:t.language||""},i=t.label||"",a=function(e){Object.defineProperty(p()(n),e,{get:function(){return r[e]},set:function(){}})};for(var o in r)a(o);return Object.defineProperty(p()(n),"label",{get:function(){return i},set:function(e){e!==i&&(i=e,this.trigger("labelchange"))}}),n}return m()(t,e),t}(At),Tn=function(e){var t=["protocol","hostname","port","pathname","search","hash","host"],n=s.a.createElement("a");n.href=e;for(var r={},i=0;i<t.length;i++)r[t[i]]=n[t[i]];return"http:"===r.protocol&&(r.host=r.host.replace(/:80$/,"")),"https:"===r.protocol&&(r.host=r.host.replace(/:443$/,"")),r.protocol||(r.protocol=a.a.location.protocol),r.host||(r.host=a.a.location.host),r},Sn=function(e){if(!e.match(/^https?:\/\//)){var t=s.a.createElement("a");t.href=e,e=t.href}return e},wn=function(e){if("string"===typeof e){var t=/^(\/?)([\s\S]*?)((?:\.{1,2}|[^\/]+?)(\.([^\.\/\?]+)))(?:[\/]*|[\?].*)$/.exec(e);if(t)return t.pop().toLowerCase()}return""},kn=function(e,t){void 0===t&&(t=a.a.location);var n=Tn(e);return(":"===n.protocol?t.protocol:n.protocol)+n.host!==t.protocol+t.host},Cn=Object.freeze({__proto__:null,parseUrl:Tn,getAbsoluteURL:Sn,getFileExtension:wn,isCrossOrigin:kn}),En=function(e,t){var n=new a.a.WebVTT.Parser(a.a,a.a.vttjs,a.a.WebVTT.StringDecoder()),r=[];n.oncue=function(e){t.addCue(e)},n.onparsingerror=function(e){r.push(e)},n.onflush=function(){t.trigger({type:"loadeddata",target:t})},n.parse(e),r.length>0&&(a.a.console&&a.a.console.groupCollapsed&&a.a.console.groupCollapsed("Text Track parsing errors for "+t.src),r.forEach((function(e){return X.error(e)})),a.a.console&&a.a.console.groupEnd&&a.a.console.groupEnd()),n.flush()},An=function(e,t){var n={uri:e},r=kn(e);r&&(n.cors=r);var i="use-credentials"===t.tech_.crossOrigin();i&&(n.withCredentials=i),b()(n,Ct(this,(function(e,n,r){if(e)return X.error(e,n);t.loaded_=!0,"function"!==typeof a.a.WebVTT?t.tech_&&t.tech_.any(["vttjsloaded","vttjserror"],(function(e){if("vttjserror"!==e.type)return En(r,t);X.error("vttjs failed to load, stopping trying to process "+t.src)})):En(r,t)})))},xn=function(e){function t(t){var n;if(void 0===t&&(t={}),!t.tech)throw new Error("A tech was not provided.");var r=Ht(t,{kind:yn[t.kind]||"subtitles",language:t.language||t.srclang||""}),i=bn[r.mode]||"disabled",a=r.default;"metadata"!==r.kind&&"chapters"!==r.kind||(i="hidden"),(n=e.call(this,r)||this).tech_=r.tech,n.cues_=[],n.activeCues_=[],n.preload_=!1!==n.tech_.preloadTextTracks;var o=new mn(n.cues_),s=new mn(n.activeCues_),u=!1;n.timeupdateHandler=Ct(p()(n),(function(e){void 0===e&&(e={}),this.tech_.isDisposed()||(this.tech_.isReady_?(this.activeCues=this.activeCues,u&&(this.trigger("cuechange"),u=!1),"timeupdate"!==e.type&&(this.rvf_=this.tech_.requestVideoFrameCallback(this.timeupdateHandler))):"timeupdate"!==e.type&&(this.rvf_=this.tech_.requestVideoFrameCallback(this.timeupdateHandler)))}));return n.tech_.one("dispose",(function(){n.stopTracking()})),"disabled"!==i&&n.startTracking(),Object.defineProperties(p()(n),{default:{get:function(){return a},set:function(){}},mode:{get:function(){return i},set:function(e){bn[e]&&i!==e&&(i=e,this.preload_||"disabled"===i||0!==this.cues.length||An(this.src,this),this.stopTracking(),"disabled"!==i&&this.startTracking(),this.trigger("modechange"))}},cues:{get:function(){return this.loaded_?o:null},set:function(){}},activeCues:{get:function(){if(!this.loaded_)return null;if(0===this.cues.length)return s;for(var e=this.tech_.currentTime(),t=[],n=0,r=this.cues.length;n<r;n++){var i=this.cues[n];(i.startTime<=e&&i.endTime>=e||i.startTime===i.endTime&&i.startTime<=e&&i.startTime+.5>=e)&&t.push(i)}if(u=!1,t.length!==this.activeCues_.length)u=!0;else for(var a=0;a<t.length;a++)-1===this.activeCues_.indexOf(t[a])&&(u=!0);return this.activeCues_=t,s.setCues_(this.activeCues_),s},set:function(){}}}),r.src?(n.src=r.src,n.preload_||(n.loaded_=!0),(n.preload_||"subtitles"!==r.kind&&"captions"!==r.kind)&&An(n.src,p()(n))):n.loaded_=!0,n}m()(t,e);var n=t.prototype;return n.startTracking=function(){this.rvf_=this.tech_.requestVideoFrameCallback(this.timeupdateHandler),this.tech_.on("timeupdate",this.timeupdateHandler)},n.stopTracking=function(){this.rvf_&&(this.tech_.cancelVideoFrameCallback(this.rvf_),this.rvf_=void 0),this.tech_.off("timeupdate",this.timeupdateHandler)},n.addCue=function(e){var t=e;if(a.a.vttjs&&!(e instanceof a.a.vttjs.VTTCue)){for(var n in t=new a.a.vttjs.VTTCue(e.startTime,e.endTime,e.text),e)n in t||(t[n]=e[n]);t.id=e.id,t.originalCue_=e}for(var r=this.tech_.textTracks(),i=0;i<r.length;i++)r[i]!==this&&r[i].removeCue(t);this.cues_.push(t),this.cues.setCues_(this.cues_)},n.removeCue=function(e){for(var t=this.cues_.length;t--;){var n=this.cues_[t];if(n===e||n.originalCue_&&n.originalCue_===e){this.cues_.splice(t,1),this.cues.setCues_(this.cues_);break}}},t}(_n);xn.prototype.allowedEvents_={cuechange:"cuechange"};var Pn=function(e){function t(t){var n;void 0===t&&(t={});var r=Ht(t,{kind:vn[t.kind]||""});n=e.call(this,r)||this;var i=!1;return Object.defineProperty(p()(n),"enabled",{get:function(){return i},set:function(e){"boolean"===typeof e&&e!==i&&(i=e,this.trigger("enabledchange"))}}),r.enabled&&(n.enabled=r.enabled),n.loaded_=!0,n}return m()(t,e),t}(_n),In=function(e){function t(t){var n;void 0===t&&(t={});var r=Ht(t,{kind:gn[t.kind]||""});n=e.call(this,r)||this;var i=!1;return Object.defineProperty(p()(n),"selected",{get:function(){return i},set:function(e){"boolean"===typeof e&&e!==i&&(i=e,this.trigger("selectedchange"))}}),r.selected&&(n.selected=r.selected),n}return m()(t,e),t}(_n),On=function(e){function t(t){var n,r;void 0===t&&(t={}),n=e.call(this)||this;var i=new xn(t);return n.kind=i.kind,n.src=i.src,n.srclang=i.language,n.label=i.label,n.default=i.default,Object.defineProperties(p()(n),{readyState:{get:function(){return r}},track:{get:function(){return i}}}),r=0,i.addEventListener("loadeddata",(function(){r=2,n.trigger({type:"load",target:p()(n)})})),n}return m()(t,e),t}(At);On.prototype.allowedEvents_={load:"load"},On.NONE=0,On.LOADING=1,On.LOADED=2,On.ERROR=3;var Ln={audio:{ListClass:cn,TrackClass:Pn,capitalName:"Audio"},video:{ListClass:hn,TrackClass:In,capitalName:"Video"},text:{ListClass:pn,TrackClass:xn,capitalName:"Text"}};Object.keys(Ln).forEach((function(e){Ln[e].getterName=e+"Tracks",Ln[e].privateName=e+"Tracks_"}));var Dn={remoteText:{ListClass:pn,TrackClass:xn,capitalName:"RemoteText",getterName:"remoteTextTracks",privateName:"remoteTextTracks_"},remoteTextEl:{ListClass:fn,TrackClass:On,capitalName:"RemoteTextTrackEls",getterName:"remoteTextTrackEls",privateName:"remoteTextTrackEls_"}},Mn=l()({},Ln,Dn);Dn.names=Object.keys(Dn),Ln.names=Object.keys(Ln),Mn.names=[].concat(Dn.names).concat(Ln.names);var Rn=function(e){function t(t,n){var r;return void 0===t&&(t={}),void 0===n&&(n=function(){}),t.reportTouchActivity=!1,(r=e.call(this,null,t,n)||this).onDurationChange_=function(e){return r.onDurationChange(e)},r.trackProgress_=function(e){return r.trackProgress(e)},r.trackCurrentTime_=function(e){return r.trackCurrentTime(e)},r.stopTrackingCurrentTime_=function(e){return r.stopTrackingCurrentTime(e)},r.disposeSourceHandler_=function(e){return r.disposeSourceHandler(e)},r.queuedHanders_=new Set,r.hasStarted_=!1,r.on("playing",(function(){this.hasStarted_=!0})),r.on("loadstart",(function(){this.hasStarted_=!1})),Mn.names.forEach((function(e){var n=Mn[e];t&&t[n.getterName]&&(r[n.privateName]=t[n.getterName])})),r.featuresProgressEvents||r.manualProgressOn(),r.featuresTimeupdateEvents||r.manualTimeUpdatesOn(),["Text","Audio","Video"].forEach((function(e){!1===t["native"+e+"Tracks"]&&(r["featuresNative"+e+"Tracks"]=!1)})),!1===t.nativeCaptions||!1===t.nativeTextTracks?r.featuresNativeTextTracks=!1:!0!==t.nativeCaptions&&!0!==t.nativeTextTracks||(r.featuresNativeTextTracks=!0),r.featuresNativeTextTracks||r.emulateTextTracks(),r.preloadTextTracks=!1!==t.preloadTextTracks,r.autoRemoteTextTracks_=new Mn.text.ListClass,r.initTrackListeners(),t.nativeControlsForTouch||r.emitTapEvents(),r.constructor&&(r.name_=r.constructor.name||"Unknown Tech"),r}m()(t,e);var n=t.prototype;return n.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"})},n.manualProgressOn=function(){this.on("durationchange",this.onDurationChange_),this.manualProgress=!0,this.one("ready",this.trackProgress_)},n.manualProgressOff=function(){this.manualProgress=!1,this.stopTrackingProgress(),this.off("durationchange",this.onDurationChange_)},n.trackProgress=function(e){this.stopTrackingProgress(),this.progressInterval=this.setInterval(Ct(this,(function(){var e=this.bufferedPercent();this.bufferedPercent_!==e&&this.trigger("progress"),this.bufferedPercent_=e,1===e&&this.stopTrackingProgress()})),500)},n.onDurationChange=function(e){this.duration_=this.duration()},n.buffered=function(){return Qt(0,0)},n.bufferedPercent=function(){return $t(this.buffered(),this.duration_)},n.stopTrackingProgress=function(){this.clearInterval(this.progressInterval)},n.manualTimeUpdatesOn=function(){this.manualTimeUpdates=!0,this.on("play",this.trackCurrentTime_),this.on("pause",this.stopTrackingCurrentTime_)},n.manualTimeUpdatesOff=function(){this.manualTimeUpdates=!1,this.stopTrackingCurrentTime(),this.off("play",this.trackCurrentTime_),this.off("pause",this.stopTrackingCurrentTime_)},n.trackCurrentTime=function(){this.currentTimeInterval&&this.stopTrackingCurrentTime(),this.currentTimeInterval=this.setInterval((function(){this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})}),250)},n.stopTrackingCurrentTime=function(){this.clearInterval(this.currentTimeInterval),this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})},n.dispose=function(){this.clearTracks(Ln.names),this.manualProgress&&this.manualProgressOff(),this.manualTimeUpdates&&this.manualTimeUpdatesOff(),e.prototype.dispose.call(this)},n.clearTracks=function(e){var t=this;(e=[].concat(e)).forEach((function(e){for(var n=t[e+"Tracks"]()||[],r=n.length;r--;){var i=n[r];"text"===e&&t.removeRemoteTextTrack(i),n.removeTrack(i)}}))},n.cleanupAutoTextTracks=function(){for(var e=this.autoRemoteTextTracks_||[],t=e.length;t--;){var n=e[t];this.removeRemoteTextTrack(n)}},n.reset=function(){},n.crossOrigin=function(){},n.setCrossOrigin=function(){},n.error=function(e){return void 0!==e&&(this.error_=new Zt(e),this.trigger("error")),this.error_},n.played=function(){return this.hasStarted_?Qt(0,0):Qt()},n.play=function(){},n.setScrubbing=function(){},n.scrubbing=function(){},n.setCurrentTime=function(){this.manualTimeUpdates&&this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})},n.initTrackListeners=function(){var e=this;Ln.names.forEach((function(t){var n=Ln[t],r=function(){e.trigger(t+"trackchange")},i=e[n.getterName]();i.addEventListener("removetrack",r),i.addEventListener("addtrack",r),e.on("dispose",(function(){i.removeEventListener("removetrack",r),i.removeEventListener("addtrack",r)}))}))},n.addWebVttScript_=function(){var e=this;if(!a.a.WebVTT)if(s.a.body.contains(this.el())){if(!this.options_["vtt.js"]&&te(T.a)&&Object.keys(T.a).length>0)return void this.trigger("vttjsloaded");var t=s.a.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})),a.a.WebVTT=!0,this.el().parentNode.appendChild(t)}else this.ready(this.addWebVttScript_)},n.emulateTextTracks=function(){var e=this,t=this.textTracks(),n=this.remoteTextTracks(),r=function(e){return t.addTrack(e.track)},i=function(e){return t.removeTrack(e.track)};n.on("addtrack",r),n.on("removetrack",i),this.addWebVttScript_();var a=function(){return e.trigger("texttrackchange")},o=function(){a();for(var e=0;e<t.length;e++){var n=t[e];n.removeEventListener("cuechange",a),"showing"===n.mode&&n.addEventListener("cuechange",a)}};o(),t.addEventListener("change",o),t.addEventListener("addtrack",o),t.addEventListener("removetrack",o),this.on("dispose",(function(){n.off("addtrack",r),n.off("removetrack",i),t.removeEventListener("change",o),t.removeEventListener("addtrack",o),t.removeEventListener("removetrack",o);for(var e=0;e<t.length;e++){t[e].removeEventListener("cuechange",a)}}))},n.addTextTrack=function(e,t,n){if(!e)throw new Error("TextTrack kind is required but was not provided");return function(e,t,n,r,i){void 0===i&&(i={});var a=e.textTracks();i.kind=t,n&&(i.label=n),r&&(i.language=r),i.tech=e;var o=new Mn.text.TrackClass(i);return a.addTrack(o),o}(this,e,t,n)},n.createRemoteTextTrack=function(e){var t=Ht(e,{tech:this});return new Dn.remoteTextEl.TrackClass(t)},n.addRemoteTextTrack=function(e,t){var n=this;void 0===e&&(e={});var r=this.createRemoteTextTrack(e);return!0!==t&&!1!==t&&(X.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_(r),this.remoteTextTracks().addTrack(r.track),!0!==t&&this.ready((function(){return n.autoRemoteTextTracks_.addTrack(r.track)})),r},n.removeRemoteTextTrack=function(e){var t=this.remoteTextTrackEls().getTrackElementByTrack_(e);this.remoteTextTrackEls().removeTrackElement_(t),this.remoteTextTracks().removeTrack(e),this.autoRemoteTextTracks_.removeTrack(e)},n.getVideoPlaybackQuality=function(){return{}},n.requestPictureInPicture=function(){var e=this.options_.Promise||a.a.Promise;if(e)return e.reject()},n.disablePictureInPicture=function(){return!0},n.setDisablePictureInPicture=function(){},n.requestVideoFrameCallback=function(e){var t=this,n=dt();return!this.isReady_||this.paused()?(this.queuedHanders_.add(n),this.one("playing",(function(){t.queuedHanders_.has(n)&&(t.queuedHanders_.delete(n),e())}))):this.requestNamedAnimationFrame(n,e),n},n.cancelVideoFrameCallback=function(e){this.queuedHanders_.has(e)?this.queuedHanders_.delete(e):this.cancelNamedAnimationFrame(e)},n.setPoster=function(){},n.playsinline=function(){},n.setPlaysinline=function(){},n.overrideNativeAudioTracks=function(){},n.overrideNativeVideoTracks=function(){},n.canPlayType=function(){return""},t.canPlayType=function(){return""},t.canPlaySource=function(e,n){return t.canPlayType(e.type)},t.isTech=function(e){return e.prototype instanceof t||e instanceof t||e===t},t.registerTech=function(e,n){if(t.techs_||(t.techs_={}),!t.isTech(n))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=qt(e),t.techs_[e]=n,t.techs_[Ft(e)]=n,"Tech"!==e&&t.defaultTechOrder_.push(e),n},t.getTech=function(e){if(e)return t.techs_&&t.techs_[e]?t.techs_[e]:(e=qt(e),a.a&&a.a.videojs&&a.a.videojs[e]?(X.warn("The "+e+" tech was added to the videojs object when it should be registered using videojs.registerTech(name, tech)"),a.a.videojs[e]):void 0)},t}(Gt);Mn.names.forEach((function(e){var t=Mn[e];Rn.prototype[t.getterName]=function(){return this[t.privateName]=this[t.privateName]||new t.ListClass,this[t.privateName]}})),Rn.prototype.featuresVolumeControl=!0,Rn.prototype.featuresMuteControl=!0,Rn.prototype.featuresFullscreenResize=!1,Rn.prototype.featuresPlaybackRate=!1,Rn.prototype.featuresProgressEvents=!1,Rn.prototype.featuresSourceset=!1,Rn.prototype.featuresTimeupdateEvents=!1,Rn.prototype.featuresNativeTextTracks=!1,Rn.prototype.featuresVideoFrameCallback=!1,Rn.withSourceHandlers=function(e){e.registerSourceHandler=function(t,n){var r=e.sourceHandlers;r||(r=e.sourceHandlers=[]),void 0===n&&(n=r.length),r.splice(n,0,t)},e.canPlayType=function(t){for(var n,r=e.sourceHandlers||[],i=0;i<r.length;i++)if(n=r[i].canPlayType(t))return n;return""},e.selectSourceHandler=function(t,n){for(var r=e.sourceHandlers||[],i=0;i<r.length;i++)if(r[i].canHandleSource(t,n))return r[i];return null},e.canPlaySource=function(t,n){var r=e.selectSourceHandler(t,n);return r?r.canHandleSource(t,n):""};["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 n=e.selectSourceHandler(t,this.options_);n||(e.nativeSourceHandler?n=e.nativeSourceHandler:X.error("No source handler found for the current source.")),this.disposeSourceHandler(),this.off("dispose",this.disposeSourceHandler_),n!==e.nativeSourceHandler&&(this.currentSource_=t),this.sourceHandler_=n.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)}},Gt.registerComponent("Tech",Rn),Rn.registerTech("Tech",Rn),Rn.defaultTechOrder_=[];var Nn={},jn={},Bn={};function Un(e,t,n){e.setTimeout((function(){return function e(t,n,r,i,a,o){void 0===t&&(t={});void 0===n&&(n=[]);void 0===a&&(a=[]);void 0===o&&(o=!1);var s=n,u=s[0],l=s.slice(1);if("string"===typeof u)e(t,Nn[u],r,i,a,o);else if(u){var c=function(e,t){var n=jn[e.id()],r=null;if(void 0===n||null===n)return r=t(e),jn[e.id()]=[[t,r]],r;for(var i=0;i<n.length;i++){var a=n[i],o=a[0],s=a[1];o===t&&(r=s)}null===r&&(r=t(e),n.push([t,r]));return r}(i,u);if(!c.setSource)return a.push(c),e(t,l,r,i,a,o);c.setSource(J({},t),(function(n,s){if(n)return e(t,l,r,i,a,o);a.push(c),e(s,t.type===s.type?l:Nn[s.type],r,i,a,o)}))}else l.length?e(t,l,r,i,a,o):o?r(t,a):e(t,Nn["*"],r,i,a,!0)}(t,Nn[t.type],n,e)}),1)}function Fn(e,t,n,r){void 0===r&&(r=null);var i="call"+qt(n),a=e.reduce(Wn(i),r),o=a===Bn,s=o?null:t[n](a);return function(e,t,n,r){for(var i=e.length-1;i>=0;i--){var a=e[i];a[t]&&a[t](r,n)}}(e,n,s,o),s}var qn={buffered:1,currentTime:1,duration:1,muted:1,played:1,paused:1,seekable:1,volume:1,ended:1},Hn={setCurrentTime:1,setMuted:1,setVolume:1},zn={play:1,pause:1};function Wn(e){return function(t,n){return t===Bn?Bn:n[e]?n[e](t):t}}var Vn={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",mpd:"application/dash+xml",jpg:"image/jpeg",jpeg:"image/jpeg",gif:"image/gif",png:"image/png",svg:"image/svg+xml",webp:"image/webp"},Kn=function(e){void 0===e&&(e="");var t=wn(e);return Vn[t.toLowerCase()]||""};function Gn(e){if(!e.type){var t=Kn(e.src);t&&(e.type=t)}return e}var Xn=function(e){function t(t,n,r){var i,a=Ht({createEl:!1},n);if(i=e.call(this,t,a,r)||this,n.playerOptions.sources&&0!==n.playerOptions.sources.length)t.src(n.playerOptions.sources);else for(var o=0,s=n.playerOptions.techOrder;o<s.length;o++){var u=qt(s[o]),l=Rn.getTech(u);if(u||(l=Gt.getComponent(u)),l&&l.isSupported()){t.loadTech_(u);break}}return i}return m()(t,e),t}(Gt);Gt.registerComponent("MediaLoader",Xn);var Yn=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).options_.controlText&&r.controlText(r.options_.controlText),r.handleMouseOver_=function(e){return r.handleMouseOver(e)},r.handleMouseOut_=function(e){return r.handleMouseOut(e)},r.handleClick_=function(e){return r.handleClick(e)},r.handleKeyDown_=function(e){return r.handleKeyDown(e)},r.emitTapEvents(),r.enable(),r}m()(t,e);var n=t.prototype;return n.createEl=function(e,t,n){void 0===e&&(e="div"),void 0===t&&(t={}),void 0===n&&(n={}),t=J({className:this.buildCSSClass(),tabIndex:0},t),"button"===e&&X.error("Creating a ClickableComponent with an HTML element of "+e+" is not supported; use a Button instead."),n=J({role:"button"},n),this.tabIndex_=t.tabIndex;var r=Ie(e,t,n);return r.appendChild(Ie("span",{className:"vjs-icon-placeholder"},{"aria-hidden":!0})),this.createControlTextEl(r),r},n.dispose=function(){this.controlTextEl_=null,e.prototype.dispose.call(this)},n.createControlTextEl=function(e){return this.controlTextEl_=Ie("span",{className:"vjs-control-text"},{"aria-live":"polite"}),e&&e.appendChild(this.controlTextEl_),this.controlText(this.controlText_,e),this.controlTextEl_},n.controlText=function(e,t){if(void 0===t&&(t=this.el()),void 0===e)return this.controlText_||"Need Text";var n=this.localize(e);this.controlText_=e,Oe(this.controlTextEl_,n),this.nonIconControl||this.player_.options_.noUITitleAttributes||t.setAttribute("title",n)},n.buildCSSClass=function(){return"vjs-control vjs-button "+e.prototype.buildCSSClass.call(this)},n.enable=function(){this.enabled_||(this.enabled_=!0,this.removeClass("vjs-disabled"),this.el_.setAttribute("aria-disabled","false"),"undefined"!==typeof this.tabIndex_&&this.el_.setAttribute("tabIndex",this.tabIndex_),this.on(["tap","click"],this.handleClick_),this.on("keydown",this.handleKeyDown_))},n.disable=function(){this.enabled_=!1,this.addClass("vjs-disabled"),this.el_.setAttribute("aria-disabled","true"),"undefined"!==typeof this.tabIndex_&&this.el_.removeAttribute("tabIndex"),this.off("mouseover",this.handleMouseOver_),this.off("mouseout",this.handleMouseOut_),this.off(["tap","click"],this.handleClick_),this.off("keydown",this.handleKeyDown_)},n.handleLanguagechange=function(){this.controlText(this.controlText_)},n.handleClick=function(e){this.options_.clickHandler&&this.options_.clickHandler.call(this,arguments)},n.handleKeyDown=function(t){d.a.isEventKey(t,"Space")||d.a.isEventKey(t,"Enter")?(t.preventDefault(),t.stopPropagation(),this.trigger("click")):e.prototype.handleKeyDown.call(this,t)},t}(Gt);Gt.registerComponent("ClickableComponent",Yn);var Qn=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).update(),r.update_=function(e){return r.update(e)},t.on("posterchange",r.update_),r}m()(t,e);var n=t.prototype;return n.dispose=function(){this.player().off("posterchange",this.update_),e.prototype.dispose.call(this)},n.createEl=function(){return Ie("div",{className:"vjs-poster",tabIndex:-1})},n.update=function(e){var t=this.player().poster();this.setSrc(t),t?this.show():this.hide()},n.setSrc=function(e){var t="";e&&(t='url("'+e+'")'),this.el_.style.backgroundImage=t},n.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)||(me||he)&&t||this.player_.tech(!0).focus(),this.player_.paused()?tn(this.player_.play()):this.player_.pause()}},t}(Yn);Gt.registerComponent("PosterImage",Qn);var $n={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 Zn(e,t){var n;if(4===e.length)n=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.");n=e.slice(1)}return"rgba("+parseInt(n.slice(0,2),16)+","+parseInt(n.slice(2,4),16)+","+parseInt(n.slice(4,6),16)+","+t+")"}function Jn(e,t,n){try{e.style[t]=n}catch(r){return}}var er=function(e){function t(t,n,r){var i;i=e.call(this,t,n,r)||this;var o=function(e){return i.updateDisplay(e)};return t.on("loadstart",(function(e){return i.toggleDisplay(e)})),t.on("texttrackchange",o),t.on("loadedmetadata",(function(e){return i.preselectTrack(e)})),t.ready(Ct(p()(i),(function(){if(t.tech_&&t.tech_.featuresNativeTextTracks)this.hide();else{t.on("fullscreenchange",o),t.on("playerresize",o),a.a.addEventListener("orientationchange",o),t.on("dispose",(function(){return a.a.removeEventListener("orientationchange",o)}));for(var e=this.options_.playerOptions.tracks||[],n=0;n<e.length;n++)this.player_.addRemoteTextTrack(e[n],!0);this.preselectTrack()}}))),i}m()(t,e);var n=t.prototype;return n.preselectTrack=function(){for(var e,t,n,r={captions:1,subtitles:1},i=this.player_.textTracks(),a=this.player_.cache_.selectedLanguage,o=0;o<i.length;o++){var s=i[o];a&&a.enabled&&a.language&&a.language===s.language&&s.kind in r?s.kind===a.kind?n=s:n||(n=s):a&&!a.enabled?(n=null,e=null,t=null):s.default&&("descriptions"!==s.kind||e?s.kind in r&&!t&&(t=s):e=s)}n?n.mode="showing":t?t.mode="showing":e&&(e.mode="showing")},n.toggleDisplay=function(){this.player_.tech_&&this.player_.tech_.featuresNativeTextTracks?this.hide():this.show()},n.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-text-track-display"},{translate:"yes","aria-live":"off","aria-atomic":"true"})},n.clearDisplay=function(){"function"===typeof a.a.WebVTT&&a.a.WebVTT.processCues(a.a,[],this.el_)},n.updateDisplay=function(){var e=this.player_.textTracks(),t=this.options_.allowMultipleShowingTracks;if(this.clearDisplay(),t){for(var n=[],r=0;r<e.length;++r){var i=e[r];"showing"===i.mode&&n.push(i)}this.updateForTrack(n)}else{for(var a=null,o=null,s=e.length;s--;){var u=e[s];"showing"===u.mode&&("descriptions"===u.kind?a=u:o=u)}o?("off"!==this.getAttribute("aria-live")&&this.setAttribute("aria-live","off"),this.updateForTrack(o)):a&&("assertive"!==this.getAttribute("aria-live")&&this.setAttribute("aria-live","assertive"),this.updateForTrack(a))}},n.updateDisplayState=function(e){for(var t=this.player_.textTrackSettings.getValues(),n=e.activeCues,r=n.length;r--;){var i=n[r];if(i){var o=i.displayState;if(t.color&&(o.firstChild.style.color=t.color),t.textOpacity&&Jn(o.firstChild,"color",Zn(t.color||"#fff",t.textOpacity)),t.backgroundColor&&(o.firstChild.style.backgroundColor=t.backgroundColor),t.backgroundOpacity&&Jn(o.firstChild,"backgroundColor",Zn(t.backgroundColor||"#000",t.backgroundOpacity)),t.windowColor&&(t.windowOpacity?Jn(o,"backgroundColor",Zn(t.windowColor,t.windowOpacity)):o.style.backgroundColor=t.windowColor),t.edgeStyle&&("dropshadow"===t.edgeStyle?o.firstChild.style.textShadow="2px 2px 3px #222, 2px 2px 4px #222, 2px 2px 5px #222":"raised"===t.edgeStyle?o.firstChild.style.textShadow="1px 1px #222, 2px 2px #222, 3px 3px #222":"depressed"===t.edgeStyle?o.firstChild.style.textShadow="1px 1px #ccc, 0 1px #ccc, -1px -1px #222, 0 -1px #222":"uniform"===t.edgeStyle&&(o.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 s=a.a.parseFloat(o.style.fontSize);o.style.fontSize=s*t.fontPercent+"px",o.style.height="auto",o.style.top="auto"}t.fontFamily&&"default"!==t.fontFamily&&("small-caps"===t.fontFamily?o.firstChild.style.fontVariant="small-caps":o.firstChild.style.fontFamily=$n[t.fontFamily])}}},n.updateForTrack=function(e){if(Array.isArray(e)||(e=[e]),"function"===typeof a.a.WebVTT&&!e.every((function(e){return!e.activeCues}))){for(var t=[],n=0;n<e.length;++n)for(var r=e[n],i=0;i<r.activeCues.length;++i)t.push(r.activeCues[i]);a.a.WebVTT.processCues(a.a,t,this.el_);for(var o=0;o<e.length;++o){for(var s=e[o],u=0;u<s.activeCues.length;++u){var l=s.activeCues[u].displayState;Me(l,"vjs-text-track-cue"),Me(l,"vjs-text-track-cue-"+(s.language?s.language:o)),s.language&&Fe(l,"lang",s.language)}this.player_.textTrackSettings&&this.updateDisplayState(s)}}},t}(Gt);Gt.registerComponent("TextTrackDisplay",er);var tr=function(e){function t(){return e.apply(this,arguments)||this}return m()(t,e),t.prototype.createEl=function(){var t=this.player_.isAudio(),n=this.localize(t?"Audio Player":"Video Player"),r=Ie("span",{className:"vjs-control-text",textContent:this.localize("{1} is loading.",[n])}),i=e.prototype.createEl.call(this,"div",{className:"vjs-loading-spinner",dir:"ltr"});return i.appendChild(r),i},t}(Gt);Gt.registerComponent("LoadingSpinner",tr);var nr=function(e){function t(){return e.apply(this,arguments)||this}m()(t,e);var n=t.prototype;return n.createEl=function(e,t,n){void 0===t&&(t={}),void 0===n&&(n={});var r=Ie("button",t=J({className:this.buildCSSClass()},t),n=J({type:"button"},n));return r.appendChild(Ie("span",{className:"vjs-icon-placeholder"},{"aria-hidden":!0})),this.createControlTextEl(r),r},n.addChild=function(e,t){void 0===t&&(t={});var n=this.constructor.name;return X.warn("Adding an actionable (user controllable) child to a Button ("+n+") is not supported; use a ClickableComponent instead."),Gt.prototype.addChild.call(this,e,t)},n.enable=function(){e.prototype.enable.call(this),this.el_.removeAttribute("disabled")},n.disable=function(){e.prototype.disable.call(this),this.el_.setAttribute("disabled","disabled")},n.handleKeyDown=function(t){d.a.isEventKey(t,"Space")||d.a.isEventKey(t,"Enter")?t.stopPropagation():e.prototype.handleKeyDown.call(this,t)},t}(Yn);Gt.registerComponent("Button",nr);var rr=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).mouseused_=!1,r.on("mousedown",(function(e){return r.handleMouseDown(e)})),r}m()(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-big-play-button"},n.handleClick=function(e){var t=this.player_.play();if(this.mouseused_&&e.clientX&&e.clientY){var n=this.player_.usingPlugin("eme")&&this.player_.eme.sessions&&this.player_.eme.sessions.length>0;return tn(t),void(!this.player_.tech(!0)||(me||he)&&n||this.player_.tech(!0).focus())}var r=this.player_.getChild("controlBar"),i=r&&r.getChild("playToggle");if(i){var a=function(){return i.focus()};en(t)?t.then(a,(function(){})):this.setTimeout(a,1)}else this.player_.tech(!0).focus()},n.handleKeyDown=function(t){this.mouseused_=!1,e.prototype.handleKeyDown.call(this,t)},n.handleMouseDown=function(e){this.mouseused_=!0},t}(nr);rr.prototype.controlText_="Play Video",Gt.registerComponent("BigPlayButton",rr);var ir=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).controlText(n&&n.controlText||r.localize("Close")),r}m()(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-close-button "+e.prototype.buildCSSClass.call(this)},n.handleClick=function(e){this.trigger({type:"close",bubbles:!1})},n.handleKeyDown=function(t){d.a.isEventKey(t,"Esc")?(t.preventDefault(),t.stopPropagation(),this.trigger("click")):e.prototype.handleKeyDown.call(this,t)},t}(nr);Gt.registerComponent("CloseButton",ir);var ar=function(e){function t(t,n){var r;return void 0===n&&(n={}),r=e.call(this,t,n)||this,n.replay=void 0===n.replay||n.replay,r.on(t,"play",(function(e){return r.handlePlay(e)})),r.on(t,"pause",(function(e){return r.handlePause(e)})),n.replay&&r.on(t,"ended",(function(e){return r.handleEnded(e)})),r}m()(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-play-control "+e.prototype.buildCSSClass.call(this)},n.handleClick=function(e){this.player_.paused()?tn(this.player_.play()):this.player_.pause()},n.handleSeeked=function(e){this.removeClass("vjs-ended"),this.player_.paused()?this.handlePause(e):this.handlePlay(e)},n.handlePlay=function(e){this.removeClass("vjs-ended"),this.removeClass("vjs-paused"),this.addClass("vjs-playing"),this.controlText("Pause")},n.handlePause=function(e){this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.controlText("Play")},n.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}(nr);ar.prototype.controlText_="Play",Gt.registerComponent("PlayToggle",ar);var or=function(e,t){e=e<0?0:e;var n=Math.floor(e%60),r=Math.floor(e/60%60),i=Math.floor(e/3600),a=Math.floor(t/60%60),o=Math.floor(t/3600);return(isNaN(e)||e===1/0)&&(i=r=n="-"),(i=i>0||o>0?i+":":"")+(r=((i||a>=10)&&r<10?"0"+r:r)+":")+(n=n<10?"0"+n:n)},sr=or;function ur(e,t){return void 0===t&&(t=e),sr(e,t)}var lr=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).on(t,["timeupdate","ended"],(function(e){return r.updateContent(e)})),r.updateTextNode_(),r}m()(t,e);var n=t.prototype;return n.createEl=function(){var t=this.buildCSSClass(),n=e.prototype.createEl.call(this,"div",{className:t+" vjs-time-control vjs-control"}),r=Ie("span",{className:"vjs-control-text",textContent:this.localize(this.labelText_)+"\xa0"},{role:"presentation"});return n.appendChild(r),this.contentEl_=Ie("span",{className:t+"-display"},{"aria-live":"off",role:"presentation"}),n.appendChild(this.contentEl_),n},n.dispose=function(){this.contentEl_=null,this.textNode_=null,e.prototype.dispose.call(this)},n.updateTextNode_=function(e){var t=this;void 0===e&&(e=0),e=ur(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,X.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_=s.a.createTextNode(t.formattedTime_),t.textNode_&&(e?t.contentEl_.replaceChild(t.textNode_,e):t.contentEl_.appendChild(t.textNode_))}})))},n.updateContent=function(e){},t}(Gt);lr.prototype.labelText_="Time",lr.prototype.controlText_="Time",Gt.registerComponent("TimeDisplay",lr);var cr=function(e){function t(){return e.apply(this,arguments)||this}m()(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-current-time"},n.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}(lr);cr.prototype.labelText_="Current Time",cr.prototype.controlText_="Current Time",Gt.registerComponent("CurrentTimeDisplay",cr);var dr=function(e){function t(t,n){var r,i=function(e){return r.updateContent(e)};return(r=e.call(this,t,n)||this).on(t,"durationchange",i),r.on(t,"loadstart",i),r.on(t,"loadedmetadata",i),r}m()(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-duration"},n.updateContent=function(e){var t=this.player_.duration();this.updateTextNode_(t)},t}(lr);dr.prototype.labelText_="Duration",dr.prototype.controlText_="Duration",Gt.registerComponent("DurationDisplay",dr);var hr=function(e){function t(){return e.apply(this,arguments)||this}return m()(t,e),t.prototype.createEl=function(){var t=e.prototype.createEl.call(this,"div",{className:"vjs-time-control vjs-time-divider"},{"aria-hidden":!0}),n=e.prototype.createEl.call(this,"div"),r=e.prototype.createEl.call(this,"span",{textContent:"/"});return n.appendChild(r),t.appendChild(n),t},t}(Gt);Gt.registerComponent("TimeDivider",hr);var pr=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).on(t,"durationchange",(function(e){return r.updateContent(e)})),r}m()(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-remaining-time"},n.createEl=function(){var t=e.prototype.createEl.call(this);return!1!==this.options_.displayNegative&&t.insertBefore(Ie("span",{},{"aria-hidden":!0},"-"),this.contentEl_),t},n.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}(lr);pr.prototype.labelText_="Remaining Time",pr.prototype.controlText_="Remaining Time",Gt.registerComponent("RemainingTimeDisplay",pr);var fr=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).updateShowing(),r.on(r.player(),"durationchange",(function(e){return r.updateShowing(e)})),r}m()(t,e);var n=t.prototype;return n.createEl=function(){var t=e.prototype.createEl.call(this,"div",{className:"vjs-live-control vjs-control"});return this.contentEl_=Ie("div",{className:"vjs-live-display"},{"aria-live":"off"}),this.contentEl_.appendChild(Ie("span",{className:"vjs-control-text",textContent:this.localize("Stream Type")+"\xa0"})),this.contentEl_.appendChild(s.a.createTextNode(this.localize("LIVE"))),t.appendChild(this.contentEl_),t},n.dispose=function(){this.contentEl_=null,e.prototype.dispose.call(this)},n.updateShowing=function(e){this.player().duration()===1/0?this.show():this.hide()},t}(Gt);Gt.registerComponent("LiveDisplay",fr);var mr=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).updateLiveEdgeStatus(),r.player_.liveTracker&&(r.updateLiveEdgeStatusHandler_=function(e){return r.updateLiveEdgeStatus(e)},r.on(r.player_.liveTracker,"liveedgechange",r.updateLiveEdgeStatusHandler_)),r}m()(t,e);var n=t.prototype;return n.createEl=function(){var t=e.prototype.createEl.call(this,"button",{className:"vjs-seek-to-live-control vjs-control"});return this.textEl_=Ie("span",{className:"vjs-seek-to-live-text",textContent:this.localize("LIVE")},{"aria-hidden":"true"}),t.appendChild(this.textEl_),t},n.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"))},n.handleClick=function(){this.player_.liveTracker.seekToLiveEdge()},n.dispose=function(){this.player_.liveTracker&&this.off(this.player_.liveTracker,"liveedgechange",this.updateLiveEdgeStatusHandler_),this.textEl_=null,e.prototype.dispose.call(this)},t}(nr);mr.prototype.controlText_="Seek to live, currently playing live",Gt.registerComponent("SeekToLive",mr);var gr=function(e,t,n){return e=Number(e),Math.min(n,Math.max(t,isNaN(e)?t:e))},vr=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).handleMouseDown_=function(e){return r.handleMouseDown(e)},r.handleMouseUp_=function(e){return r.handleMouseUp(e)},r.handleKeyDown_=function(e){return r.handleKeyDown(e)},r.handleClick_=function(e){return r.handleClick(e)},r.handleMouseMove_=function(e){return r.handleMouseMove(e)},r.update_=function(e){return r.update(e)},r.bar=r.getChild(r.options_.barName),r.vertical(!!r.options_.vertical),r.enable(),r}m()(t,e);var n=t.prototype;return n.enabled=function(){return this.enabled_},n.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)},n.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}},n.createEl=function(t,n,r){return void 0===n&&(n={}),void 0===r&&(r={}),n.className=n.className+" vjs-slider",n=J({tabIndex:0},n),r=J({role:"slider","aria-valuenow":0,"aria-valuemin":0,"aria-valuemax":100,tabIndex:0},r),e.prototype.createEl.call(this,t,n,r)},n.handleMouseDown=function(e){var t=this.bar.el_.ownerDocument;"mousedown"===e.type&&e.preventDefault(),"touchstart"!==e.type||pe||e.preventDefault(),He(),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)},n.handleMouseMove=function(e){},n.handleMouseUp=function(){var e=this.bar.el_.ownerDocument;ze(),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()},n.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 n=e.vertical()?"height":"width";e.bar.el().style[n]=(100*t).toFixed(2)+"%"}))),t}},n.getProgress=function(){return Number(gr(this.getPercent(),0,1).toFixed(4))},n.calculateDistance=function(e){var t=Ke(this.el_,e);return this.vertical()?t.y:t.x},n.handleKeyDown=function(t){d.a.isEventKey(t,"Left")||d.a.isEventKey(t,"Down")?(t.preventDefault(),t.stopPropagation(),this.stepBack()):d.a.isEventKey(t,"Right")||d.a.isEventKey(t,"Up")?(t.preventDefault(),t.stopPropagation(),this.stepForward()):e.prototype.handleKeyDown.call(this,t)},n.handleClick=function(e){e.stopPropagation(),e.preventDefault()},n.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}(Gt);Gt.registerComponent("Slider",vr);var yr=function(e,t){return gr(e/t*100,0,100).toFixed(2)+"%"},br=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).partEls_=[],r.on(t,"progress",(function(e){return r.update(e)})),r}m()(t,e);var n=t.prototype;return n.createEl=function(){var t=e.prototype.createEl.call(this,"div",{className:"vjs-load-progress"}),n=Ie("span",{className:"vjs-control-text"}),r=Ie("span",{textContent:this.localize("Loaded")}),i=s.a.createTextNode(": ");return this.percentageEl_=Ie("span",{className:"vjs-control-text-loaded-percentage",textContent:"0%"}),t.appendChild(n),n.appendChild(r),n.appendChild(i),n.appendChild(this.percentageEl_),t},n.dispose=function(){this.partEls_=null,this.percentageEl_=null,e.prototype.dispose.call(this)},n.update=function(e){var t=this;this.requestNamedAnimationFrame("LoadProgressBar#update",(function(){var e=t.player_.liveTracker,n=t.player_.buffered(),r=e&&e.isLive()?e.seekableEnd():t.player_.duration(),i=t.player_.bufferedEnd(),a=t.partEls_,o=yr(i,r);t.percent_!==o&&(t.el_.style.width=o,Oe(t.percentageEl_,o),t.percent_=o);for(var s=0;s<n.length;s++){var u=n.start(s),l=n.end(s),c=a[s];c||(c=t.el_.appendChild(Ie()),a[s]=c),c.dataset.start===u&&c.dataset.end===l||(c.dataset.start=u,c.dataset.end=l,c.style.left=yr(u,i),c.style.width=yr(l-u,i))}for(var d=a.length;d>n.length;d--)t.el_.removeChild(a[d-1]);a.length=n.length}))},t}(Gt);Gt.registerComponent("LoadProgressBar",br);var _r=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).update=Et(Ct(p()(r),r.update),30),r}m()(t,e);var n=t.prototype;return n.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-time-tooltip"},{"aria-hidden":"true"})},n.update=function(e,t,n){var r=Ve(this.el_),i=We(this.player_.el()),a=e.width*t;if(i&&r){var o=e.left-i.left+a,s=e.width-a+(i.right-e.right),u=r.width/2;o<u?u+=u-o:s<u&&(u=s),u<0?u=0:u>r.width&&(u=r.width),u=Math.round(u),this.el_.style.right="-"+u+"px",this.write(n)}},n.write=function(e){Oe(this.el_,e)},n.updateTime=function(e,t,n,r){var i=this;this.requestNamedAnimationFrame("TimeTooltip#updateTime",(function(){var a,o=i.player_.duration();if(i.player_.liveTracker&&i.player_.liveTracker.isLive()){var s=i.player_.liveTracker.liveWindow(),u=s-t*s;a=(u<1?"":"-")+ur(u,s)}else a=ur(n,o);i.update(e,t,a),r&&r()}))},t}(Gt);Gt.registerComponent("TimeTooltip",_r);var Tr=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).update=Et(Ct(p()(r),r.update),30),r}m()(t,e);var n=t.prototype;return n.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-play-progress vjs-slider-bar"},{"aria-hidden":"true"})},n.update=function(e,t){var n=this.getChild("timeTooltip");if(n){var r=this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime();n.updateTime(e,t,r)}},t}(Gt);Tr.prototype.options_={children:[]},Te||ue||Tr.prototype.options_.children.push("timeTooltip"),Gt.registerComponent("PlayProgressBar",Tr);var Sr=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).update=Et(Ct(p()(r),r.update),30),r}m()(t,e);var n=t.prototype;return n.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-mouse-display"})},n.update=function(e,t){var n=this,r=t*this.player_.duration();this.getChild("timeTooltip").updateTime(e,t,r,(function(){n.el_.style.left=e.width*t+"px"}))},t}(Gt);Sr.prototype.options_={children:["timeTooltip"]},Gt.registerComponent("MouseTimeDisplay",Sr);var wr=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).setEventHandlers_(),r}m()(t,e);var n=t.prototype;return n.setEventHandlers_=function(){var e=this;this.update_=Ct(this,this.update),this.update=Et(this.update_,30),this.on(this.player_,["ended","durationchange","timeupdate"],this.update),this.player_.liveTracker&&this.on(this.player_.liveTracker,"liveedgechange",this.update),this.updateInterval=null,this.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 s.a&&"visibilityState"in s.a&&this.on(s.a,"visibilitychange",this.toggleVisibility_)},n.toggleVisibility_=function(e){"hidden"===s.a.visibilityState?(this.cancelNamedAnimationFrame("SeekBar#update"),this.cancelNamedAnimationFrame("Slider#update"),this.disableInterval_(e)):(this.player_.ended()||this.player_.paused()||this.enableInterval_(),this.update())},n.enableInterval_=function(){this.updateInterval||(this.updateInterval=this.setInterval(this.update,30))},n.disableInterval_=function(e){this.player_.liveTracker&&this.player_.liveTracker.isLive()&&e&&"ended"!==e.type||this.updateInterval&&(this.clearInterval(this.updateInterval),this.updateInterval=null)},n.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-progress-holder"},{"aria-label":this.localize("Progress Bar")})},n.update=function(t){var n=this;if("hidden"!==s.a.visibilityState){var r=e.prototype.update.call(this);return this.requestNamedAnimationFrame("SeekBar#update",(function(){var e=n.player_.ended()?n.player_.duration():n.getCurrentTime_(),t=n.player_.liveTracker,i=n.player_.duration();t&&t.isLive()&&(i=n.player_.liveTracker.liveCurrentTime()),n.percent_!==r&&(n.el_.setAttribute("aria-valuenow",(100*r).toFixed(2)),n.percent_=r),n.currentTime_===e&&n.duration_===i||(n.el_.setAttribute("aria-valuetext",n.localize("progress bar timing: currentTime={1} duration={2}",[ur(e,i),ur(i,i)],"{1} of {2}")),n.currentTime_=e,n.duration_=i),n.bar&&n.bar.update(We(n.el()),n.getProgress())})),r}},n.userSeek_=function(e){this.player_.liveTracker&&this.player_.liveTracker.isLive()&&this.player_.liveTracker.nextSeekedFromUser(),this.player_.currentTime(e)},n.getCurrentTime_=function(){return this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime()},n.getPercent=function(){var e,t=this.getCurrentTime_(),n=this.player_.liveTracker;return n&&n.isLive()?(e=(t-n.seekableStart())/n.liveWindow(),n.atLiveEdge()&&(e=1)):e=t/this.player_.duration(),e},n.handleMouseDown=function(t){Ze(t)&&(t.stopPropagation(),this.videoWasPlaying=!this.player_.paused(),this.player_.pause(),e.prototype.handleMouseDown.call(this,t))},n.handleMouseMove=function(e,t){if(void 0===t&&(t=!1),Ze(e)){var n;t||this.player_.scrubbing()||this.player_.scrubbing(!0);var r=this.calculateDistance(e),i=this.player_.liveTracker;if(i&&i.isLive()){if(r>=.99)return void i.seekToLiveEdge();var a=i.seekableStart(),o=i.liveCurrentTime();if((n=a+r*i.liveWindow())>=o&&(n=o),n<=a&&(n=a+.1),n===1/0)return}else(n=r*this.player_.duration())===this.player_.duration()&&(n-=.1);this.userSeek_(n)}},n.enable=function(){e.prototype.enable.call(this);var t=this.getChild("mouseTimeDisplay");t&&t.show()},n.disable=function(){e.prototype.disable.call(this);var t=this.getChild("mouseTimeDisplay");t&&t.hide()},n.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?tn(this.player_.play()):this.update_()},n.stepForward=function(){this.userSeek_(this.player_.currentTime()+5)},n.stepBack=function(){this.userSeek_(this.player_.currentTime()-5)},n.handleAction=function(e){this.player_.paused()?this.player_.play():this.player_.pause()},n.handleKeyDown=function(t){var n=this.player_.liveTracker;if(d.a.isEventKey(t,"Space")||d.a.isEventKey(t,"Enter"))t.preventDefault(),t.stopPropagation(),this.handleAction(t);else if(d.a.isEventKey(t,"Home"))t.preventDefault(),t.stopPropagation(),this.userSeek_(0);else if(d.a.isEventKey(t,"End"))t.preventDefault(),t.stopPropagation(),n&&n.isLive()?this.userSeek_(n.liveCurrentTime()):this.userSeek_(this.player_.duration());else if(/^[0-9]$/.test(d()(t))){t.preventDefault(),t.stopPropagation();var r=10*(d.a.codes[d()(t)]-d.a.codes[0])/100;n&&n.isLive()?this.userSeek_(n.seekableStart()+n.liveWindow()*r):this.userSeek_(this.player_.duration()*r)}else d.a.isEventKey(t,"PgDn")?(t.preventDefault(),t.stopPropagation(),this.userSeek_(this.player_.currentTime()-60)):d.a.isEventKey(t,"PgUp")?(t.preventDefault(),t.stopPropagation(),this.userSeek_(this.player_.currentTime()+60)):e.prototype.handleKeyDown.call(this,t)},n.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 s.a&&"visibilityState"in s.a&&this.off(s.a,"visibilitychange",this.toggleVisibility_),e.prototype.dispose.call(this)},t}(vr);wr.prototype.options_={children:["loadProgressBar","playProgressBar"],barName:"playProgressBar"},Te||ue||wr.prototype.options_.children.splice(1,0,"mouseTimeDisplay"),Gt.registerComponent("SeekBar",wr);var kr=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).handleMouseMove=Et(Ct(p()(r),r.handleMouseMove),30),r.throttledHandleMouseSeek=Et(Ct(p()(r),r.handleMouseSeek),30),r.handleMouseUpHandler_=function(e){return r.handleMouseUp(e)},r.handleMouseDownHandler_=function(e){return r.handleMouseDown(e)},r.enable(),r}m()(t,e);var n=t.prototype;return n.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-progress-control vjs-control"})},n.handleMouseMove=function(e){var t=this.getChild("seekBar");if(t){var n=t.getChild("playProgressBar"),r=t.getChild("mouseTimeDisplay");if(n||r){var i=t.el(),a=Ve(i),o=Ke(i,e).x;o=gr(o,0,1),r&&r.update(a,o),n&&n.update(a,t.getProgress())}}},n.handleMouseSeek=function(e){var t=this.getChild("seekBar");t&&t.handleMouseMove(e)},n.enabled=function(){return this.enabled_},n.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&&tn(this.player_.play())}},n.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)},n.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_)},n.handleMouseDown=function(e){var t=this.el_.ownerDocument,n=this.getChild("seekBar");n&&n.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_)},n.handleMouseUp=function(e){var t=this.getChild("seekBar");t&&t.handleMouseUp(e),this.removeListenersAddedOnMousedownAndTouchstart()},t}(Gt);kr.prototype.options_={children:["seekBar"]},Gt.registerComponent("ProgressControl",kr);var Cr=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).on(t,["enterpictureinpicture","leavepictureinpicture"],(function(e){return r.handlePictureInPictureChange(e)})),r.on(t,["disablepictureinpicturechanged","loadedmetadata"],(function(e){return r.handlePictureInPictureEnabledChange(e)})),r.on(t,["loadedmetadata","audioonlymodechange","audiopostermodechange"],(function(){"audio"===t.currentType().substring(0,5)||t.audioPosterMode()||t.audioOnlyMode()?(t.isInPictureInPicture()&&t.exitPictureInPicture(),r.hide()):r.show()})),r.disable(),r}m()(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-picture-in-picture-control "+e.prototype.buildCSSClass.call(this)},n.handlePictureInPictureEnabledChange=function(){s.a.pictureInPictureEnabled&&!1===this.player_.disablePictureInPicture()?this.enable():this.disable()},n.handlePictureInPictureChange=function(e){this.player_.isInPictureInPicture()?this.controlText("Exit Picture-in-Picture"):this.controlText("Picture-in-Picture"),this.handlePictureInPictureEnabledChange()},n.handleClick=function(e){this.player_.isInPictureInPicture()?this.player_.exitPictureInPicture():this.player_.requestPictureInPicture()},t}(nr);Cr.prototype.controlText_="Picture-in-Picture",Gt.registerComponent("PictureInPictureToggle",Cr);var Er=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).on(t,"fullscreenchange",(function(e){return r.handleFullscreenChange(e)})),!1===s.a[t.fsApi_.fullscreenEnabled]&&r.disable(),r}m()(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-fullscreen-control "+e.prototype.buildCSSClass.call(this)},n.handleFullscreenChange=function(e){this.player_.isFullscreen()?this.controlText("Non-Fullscreen"):this.controlText("Fullscreen")},n.handleClick=function(e){this.player_.isFullscreen()?this.player_.exitFullscreen():this.player_.requestFullscreen()},t}(nr);Er.prototype.controlText_="Fullscreen",Gt.registerComponent("FullscreenToggle",Er);var Ar=function(e){function t(){return e.apply(this,arguments)||this}return m()(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}(Gt);Gt.registerComponent("VolumeLevel",Ar);var xr=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).update=Et(Ct(p()(r),r.update),30),r}m()(t,e);var n=t.prototype;return n.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-volume-tooltip"},{"aria-hidden":"true"})},n.update=function(e,t,n,r){if(!n){var i=We(this.el_),a=We(this.player_.el()),o=e.width*t;if(!a||!i)return;var s=e.left-a.left+o,u=e.width-o+(a.right-e.right),l=i.width/2;s<l?l+=l-s:u<l&&(l=u),l<0?l=0:l>i.width&&(l=i.width),this.el_.style.right="-"+l+"px"}this.write(r+"%")},n.write=function(e){Oe(this.el_,e)},n.updateVolume=function(e,t,n,r,i){var a=this;this.requestNamedAnimationFrame("VolumeLevelTooltip#updateVolume",(function(){a.update(e,t,n,r.toFixed(0)),i&&i()}))},t}(Gt);Gt.registerComponent("VolumeLevelTooltip",xr);var Pr=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).update=Et(Ct(p()(r),r.update),30),r}m()(t,e);var n=t.prototype;return n.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-mouse-display"})},n.update=function(e,t,n){var r=this,i=100*t;this.getChild("volumeLevelTooltip").updateVolume(e,t,n,i,(function(){n?r.el_.style.bottom=e.height*t+"px":r.el_.style.left=e.width*t+"px"}))},t}(Gt);Pr.prototype.options_={children:["volumeLevelTooltip"]},Gt.registerComponent("MouseVolumeLevelDisplay",Pr);var Ir=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).on("slideractive",(function(e){return r.updateLastVolume_(e)})),r.on(t,"volumechange",(function(e){return r.updateARIAAttributes(e)})),t.ready((function(){return r.updateARIAAttributes()})),r}m()(t,e);var n=t.prototype;return n.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"})},n.handleMouseDown=function(t){Ze(t)&&e.prototype.handleMouseDown.call(this,t)},n.handleMouseMove=function(e){var t=this.getChild("mouseVolumeLevelDisplay");if(t){var n=this.el(),r=We(n),i=this.vertical(),a=Ke(n,e);a=i?a.y:a.x,a=gr(a,0,1),t.update(r,a,i)}Ze(e)&&(this.checkMuted(),this.player_.volume(this.calculateDistance(e)))},n.checkMuted=function(){this.player_.muted()&&this.player_.muted(!1)},n.getPercent=function(){return this.player_.muted()?0:this.player_.volume()},n.stepForward=function(){this.checkMuted(),this.player_.volume(this.player_.volume()+.1)},n.stepBack=function(){this.checkMuted(),this.player_.volume(this.player_.volume()-.1)},n.updateARIAAttributes=function(e){var t=this.player_.muted()?0:this.volumeAsPercentage_();this.el_.setAttribute("aria-valuenow",t),this.el_.setAttribute("aria-valuetext",t+"%")},n.volumeAsPercentage_=function(){return Math.round(100*this.player_.volume())},n.updateLastVolume_=function(){var e=this,t=this.player_.volume();this.one("sliderinactive",(function(){0===e.player_.volume()&&e.player_.lastVolume_(t)}))},t}(vr);Ir.prototype.options_={children:["volumeLevel"],barName:"volumeLevel"},Te||ue||Ir.prototype.options_.children.splice(0,0,"mouseVolumeLevelDisplay"),Ir.prototype.playerEvent="volumechange",Gt.registerComponent("VolumeBar",Ir);var Or=function(e){function t(t,n){var r;return void 0===n&&(n={}),n.vertical=n.vertical||!1,("undefined"===typeof n.volumeBar||te(n.volumeBar))&&(n.volumeBar=n.volumeBar||{},n.volumeBar.vertical=n.vertical),r=e.call(this,t,n)||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")}))}(p()(r),t),r.throttledHandleMouseMove=Et(Ct(p()(r),r.handleMouseMove),30),r.handleMouseUpHandler_=function(e){return r.handleMouseUp(e)},r.on("mousedown",(function(e){return r.handleMouseDown(e)})),r.on("touchstart",(function(e){return r.handleMouseDown(e)})),r.on("mousemove",(function(e){return r.handleMouseMove(e)})),r.on(r.volumeBar,["focus","slideractive"],(function(){r.volumeBar.addClass("vjs-slider-active"),r.addClass("vjs-slider-active"),r.trigger("slideractive")})),r.on(r.volumeBar,["blur","sliderinactive"],(function(){r.volumeBar.removeClass("vjs-slider-active"),r.removeClass("vjs-slider-active"),r.trigger("sliderinactive")})),r}m()(t,e);var n=t.prototype;return n.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})},n.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_)},n.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_)},n.handleMouseMove=function(e){this.volumeBar.handleMouseMove(e)},t}(Gt);Or.prototype.options_={children:["volumeBar"]},Gt.registerComponent("VolumeControl",Or);var Lr=function(e){function t(t,n){var r;return r=e.call(this,t,n)||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")}))}(p()(r),t),r.on(t,["loadstart","volumechange"],(function(e){return r.update(e)})),r}m()(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-mute-control "+e.prototype.buildCSSClass.call(this)},n.handleClick=function(e){var t=this.player_.volume(),n=this.player_.lastVolume_();if(0===t){var r=n<.1?.1:n;this.player_.volume(r),this.player_.muted(!1)}else this.player_.muted(!this.player_.muted())},n.update=function(e){this.updateIcon_(),this.updateControlText_()},n.updateIcon_=function(){var e=this.player_.volume(),t=3;Te&&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 n=0;n<4;n++)Re(this.el_,"vjs-vol-"+n);Me(this.el_,"vjs-vol-"+t)},n.updateControlText_=function(){var e=this.player_.muted()||0===this.player_.volume()?"Unmute":"Mute";this.controlText()!==e&&this.controlText(e)},t}(nr);Lr.prototype.controlText_="Mute",Gt.registerComponent("MuteToggle",Lr);var Dr=function(e){function t(t,n){var r;return void 0===n&&(n={}),"undefined"!==typeof n.inline?n.inline=n.inline:n.inline=!0,("undefined"===typeof n.volumeControl||te(n.volumeControl))&&(n.volumeControl=n.volumeControl||{},n.volumeControl.vertical=!n.inline),(r=e.call(this,t,n)||this).handleKeyPressHandler_=function(e){return r.handleKeyPress(e)},r.on(t,["loadstart"],(function(e){return r.volumePanelState_(e)})),r.on(r.muteToggle,"keyup",(function(e){return r.handleKeyPress(e)})),r.on(r.volumeControl,"keyup",(function(e){return r.handleVolumeControlKeyUp(e)})),r.on("keydown",(function(e){return r.handleKeyPress(e)})),r.on("mouseover",(function(e){return r.handleMouseOver(e)})),r.on("mouseout",(function(e){return r.handleMouseOut(e)})),r.on(r.volumeControl,["slideractive"],r.sliderActive_),r.on(r.volumeControl,["sliderinactive"],r.sliderInactive_),r}m()(t,e);var n=t.prototype;return n.sliderActive_=function(){this.addClass("vjs-slider-active")},n.sliderInactive_=function(){this.removeClass("vjs-slider-active")},n.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")},n.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})},n.dispose=function(){this.handleMouseOut(),e.prototype.dispose.call(this)},n.handleVolumeControlKeyUp=function(e){d.a.isEventKey(e,"Esc")&&this.muteToggle.focus()},n.handleMouseOver=function(e){this.addClass("vjs-hover"),yt(s.a,"keyup",this.handleKeyPressHandler_)},n.handleMouseOut=function(e){this.removeClass("vjs-hover"),bt(s.a,"keyup",this.handleKeyPressHandler_)},n.handleKeyPress=function(e){d.a.isEventKey(e,"Esc")&&this.handleMouseOut()},t}(Gt);Dr.prototype.options_={children:["muteToggle","volumeControl"]},Gt.registerComponent("VolumePanel",Dr);var Mr=function(e){function t(t,n){var r;return r=e.call(this,t,n)||this,n&&(r.menuButton_=n.menuButton),r.focusedChild_=-1,r.on("keydown",(function(e){return r.handleKeyDown(e)})),r.boundHandleBlur_=function(e){return r.handleBlur(e)},r.boundHandleTapClick_=function(e){return r.handleTapClick(e)},r}m()(t,e);var n=t.prototype;return n.addEventListenerForItem=function(e){e instanceof Gt&&(this.on(e,"blur",this.boundHandleBlur_),this.on(e,["tap","click"],this.boundHandleTapClick_))},n.removeEventListenerForItem=function(e){e instanceof Gt&&(this.off(e,"blur",this.boundHandleBlur_),this.off(e,["tap","click"],this.boundHandleTapClick_))},n.removeChild=function(t){"string"===typeof t&&(t=this.getChild(t)),this.removeEventListenerForItem(t),e.prototype.removeChild.call(this,t)},n.addItem=function(e){var t=this.addChild(e);t&&this.addEventListenerForItem(t)},n.createEl=function(){var t=this.options_.contentElType||"ul";this.contentEl_=Ie(t,{className:"vjs-menu-content"}),this.contentEl_.setAttribute("role","menu");var n=e.prototype.createEl.call(this,"div",{append:this.contentEl_,className:"vjs-menu"});return n.appendChild(this.contentEl_),yt(n,"click",(function(e){e.preventDefault(),e.stopImmediatePropagation()})),n},n.dispose=function(){this.contentEl_=null,this.boundHandleBlur_=null,this.boundHandleTapClick_=null,e.prototype.dispose.call(this)},n.handleBlur=function(e){var t=e.relatedTarget||s.a.activeElement;if(!this.children().some((function(e){return e.el()===t}))){var n=this.menuButton_;n&&n.buttonPressed_&&t!==n.el().firstChild&&n.unpressButton()}},n.handleTapClick=function(e){if(this.menuButton_){this.menuButton_.unpressButton();var t=this.children();if(!Array.isArray(t))return;var n=t.filter((function(t){return t.el()===e.target}))[0];if(!n)return;"CaptionSettingsMenuItem"!==n.name()&&this.menuButton_.focus()}},n.handleKeyDown=function(e){d.a.isEventKey(e,"Left")||d.a.isEventKey(e,"Down")?(e.preventDefault(),e.stopPropagation(),this.stepForward()):(d.a.isEventKey(e,"Right")||d.a.isEventKey(e,"Up"))&&(e.preventDefault(),e.stopPropagation(),this.stepBack())},n.stepForward=function(){var e=0;void 0!==this.focusedChild_&&(e=this.focusedChild_+1),this.focus(e)},n.stepBack=function(){var e=0;void 0!==this.focusedChild_&&(e=this.focusedChild_-1),this.focus(e)},n.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}(Gt);Gt.registerComponent("Menu",Mr);var Rr=function(e){function t(t,n){var r;void 0===n&&(n={}),(r=e.call(this,t,n)||this).menuButton_=new nr(t,n),r.menuButton_.controlText(r.controlText_),r.menuButton_.el_.setAttribute("aria-haspopup","true");var i=nr.prototype.buildCSSClass();r.menuButton_.el_.className=r.buildCSSClass()+" "+i,r.menuButton_.removeClass("vjs-control"),r.addChild(r.menuButton_),r.update(),r.enabled_=!0;var a=function(e){return r.handleClick(e)};return r.handleMenuKeyUp_=function(e){return r.handleMenuKeyUp(e)},r.on(r.menuButton_,"tap",a),r.on(r.menuButton_,"click",a),r.on(r.menuButton_,"keydown",(function(e){return r.handleKeyDown(e)})),r.on(r.menuButton_,"mouseenter",(function(){r.addClass("vjs-hover"),r.menu.show(),yt(s.a,"keyup",r.handleMenuKeyUp_)})),r.on("mouseleave",(function(e){return r.handleMouseLeave(e)})),r.on("keydown",(function(e){return r.handleSubmenuKeyDown(e)})),r}m()(t,e);var n=t.prototype;return n.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.menu.contentEl_.removeAttribute("role")):(this.show(),this.menu.contentEl_.setAttribute("role","menu"))},n.createMenu=function(){var e=new Mr(this.player_,{menuButton:this});if(this.hideThreshold_=0,this.options_.title){var t=Ie("li",{className:"vjs-menu-title",textContent:qt(this.options_.title),tabIndex:-1}),n=new Gt(this.player_,{el:t});e.addItem(n)}if(this.items=this.createItems(),this.items)for(var r=0;r<this.items.length;r++)e.addItem(this.items[r]);return e},n.createItems=function(){},n.createEl=function(){return e.prototype.createEl.call(this,"div",{className:this.buildWrapperCSSClass()},{})},n.buildWrapperCSSClass=function(){var t="vjs-menu-button";return!0===this.options_.inline?t+="-inline":t+="-popup","vjs-menu-button "+t+" "+nr.prototype.buildCSSClass()+" "+e.prototype.buildCSSClass.call(this)},n.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)},n.controlText=function(e,t){return void 0===t&&(t=this.menuButton_.el()),this.menuButton_.controlText(e,t)},n.dispose=function(){this.handleMouseLeave(),e.prototype.dispose.call(this)},n.handleClick=function(e){this.buttonPressed_?this.unpressButton():this.pressButton()},n.handleMouseLeave=function(e){this.removeClass("vjs-hover"),bt(s.a,"keyup",this.handleMenuKeyUp_)},n.focus=function(){this.menuButton_.focus()},n.blur=function(){this.menuButton_.blur()},n.handleKeyDown=function(e){d.a.isEventKey(e,"Esc")||d.a.isEventKey(e,"Tab")?(this.buttonPressed_&&this.unpressButton(),d.a.isEventKey(e,"Tab")||(e.preventDefault(),this.menuButton_.focus())):(d.a.isEventKey(e,"Up")||d.a.isEventKey(e,"Down"))&&(this.buttonPressed_||(e.preventDefault(),this.pressButton()))},n.handleMenuKeyUp=function(e){(d.a.isEventKey(e,"Esc")||d.a.isEventKey(e,"Tab"))&&this.removeClass("vjs-hover")},n.handleSubmenuKeyPress=function(e){this.handleSubmenuKeyDown(e)},n.handleSubmenuKeyDown=function(e){(d.a.isEventKey(e,"Esc")||d.a.isEventKey(e,"Tab"))&&(this.buttonPressed_&&this.unpressButton(),d.a.isEventKey(e,"Tab")||(e.preventDefault(),this.menuButton_.focus()))},n.pressButton=function(){if(this.enabled_){if(this.buttonPressed_=!0,this.menu.show(),this.menu.lockShowing(),this.menuButton_.el_.setAttribute("aria-expanded","true"),Te&&xe())return;this.menu.focus()}},n.unpressButton=function(){this.enabled_&&(this.buttonPressed_=!1,this.menu.unlockShowing(),this.menu.hide(),this.menuButton_.el_.setAttribute("aria-expanded","false"))},n.disable=function(){this.unpressButton(),this.enabled_=!1,this.addClass("vjs-disabled"),this.menuButton_.disable()},n.enable=function(){this.enabled_=!0,this.removeClass("vjs-disabled"),this.menuButton_.enable()},t}(Gt);Gt.registerComponent("MenuButton",Rr);var Nr=function(e){function t(t,n){var r,i=n.tracks;if((r=e.call(this,t,n)||this).items.length<=1&&r.hide(),!i)return p()(r);var a=Ct(p()(r),r.update);return i.addEventListener("removetrack",a),i.addEventListener("addtrack",a),i.addEventListener("labelchange",a),r.player_.on("ready",a),r.player_.on("dispose",(function(){i.removeEventListener("removetrack",a),i.removeEventListener("addtrack",a),i.removeEventListener("labelchange",a)})),r}return m()(t,e),t}(Rr);Gt.registerComponent("TrackButton",Nr);var jr=["Tab","Esc","Up","Down","Right","Left"],Br=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).selectable=n.selectable,r.isSelected_=n.selected||!1,r.multiSelectable=n.multiSelectable,r.selected(r.isSelected_),r.selectable?r.multiSelectable?r.el_.setAttribute("role","menuitemcheckbox"):r.el_.setAttribute("role","menuitemradio"):r.el_.setAttribute("role","menuitem"),r}m()(t,e);var n=t.prototype;return n.createEl=function(t,n,r){this.nonIconControl=!0;var i=e.prototype.createEl.call(this,"li",J({className:"vjs-menu-item",tabIndex:-1},n),r);return i.replaceChild(Ie("span",{className:"vjs-menu-item-text",textContent:this.localize(this.options_.label)}),i.querySelector(".vjs-icon-placeholder")),i},n.handleKeyDown=function(t){jr.some((function(e){return d.a.isEventKey(t,e)}))||e.prototype.handleKeyDown.call(this,t)},n.handleClick=function(e){this.selected(!0)},n.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}(Yn);Gt.registerComponent("MenuItem",Br);var Ur=function(e){function t(t,n){var r,i=n.track,o=t.textTracks();n.label=i.label||i.language||"Unknown",n.selected="showing"===i.mode,(r=e.call(this,t,n)||this).track=i,r.kinds=(n.kinds||[n.kind||r.track.kind]).filter(Boolean);var u,l=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];r.handleTracksChange.apply(p()(r),t)},c=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];r.handleSelectedLanguageChange.apply(p()(r),t)};(t.on(["loadstart","texttrackchange"],l),o.addEventListener("change",l),o.addEventListener("selectedlanguagechange",c),r.on("dispose",(function(){t.off(["loadstart","texttrackchange"],l),o.removeEventListener("change",l),o.removeEventListener("selectedlanguagechange",c)})),void 0===o.onchange)&&r.on(["tap","click"],(function(){if("object"!==typeof a.a.Event)try{u=new a.a.Event("change")}catch(e){}u||(u=s.a.createEvent("Event")).initEvent("change",!0,!0),o.dispatchEvent(u)}));return r.handleTracksChange(),r}m()(t,e);var n=t.prototype;return n.handleClick=function(t){var n=this.track,r=this.player_.textTracks();if(e.prototype.handleClick.call(this,t),r)for(var i=0;i<r.length;i++){var a=r[i];-1!==this.kinds.indexOf(a.kind)&&(a===n?"showing"!==a.mode&&(a.mode="showing"):"disabled"!==a.mode&&(a.mode="disabled"))}},n.handleTracksChange=function(e){var t="showing"===this.track.mode;t!==this.isSelected_&&this.selected(t)},n.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}}},n.dispose=function(){this.track=null,e.prototype.dispose.call(this)},t}(Br);Gt.registerComponent("TextTrackMenuItem",Ur);var Fr=function(e){function t(t,n){return n.track={player:t,kind:n.kind,kinds:n.kinds,default:!1,mode:"disabled"},n.kinds||(n.kinds=[n.kind]),n.label?n.track.label=n.label:n.track.label=n.kinds.join(" and ")+" off",n.selectable=!0,n.multiSelectable=!1,e.call(this,t,n)||this}m()(t,e);var n=t.prototype;return n.handleTracksChange=function(e){for(var t=this.player().textTracks(),n=!0,r=0,i=t.length;r<i;r++){var a=t[r];if(this.options_.kinds.indexOf(a.kind)>-1&&"showing"===a.mode){n=!1;break}}n!==this.isSelected_&&this.selected(n)},n.handleSelectedLanguageChange=function(e){for(var t=this.player().textTracks(),n=!0,r=0,i=t.length;r<i;r++){var a=t[r];if(["captions","descriptions","subtitles"].indexOf(a.kind)>-1&&"showing"===a.mode){n=!1;break}}n&&(this.player_.cache_.selectedLanguage={enabled:!1})},t}(Ur);Gt.registerComponent("OffTextTrackMenuItem",Fr);var qr=function(e){function t(t,n){return void 0===n&&(n={}),n.tracks=t.textTracks(),e.call(this,t,n)||this}return m()(t,e),t.prototype.createItems=function(e,t){var n;void 0===e&&(e=[]),void 0===t&&(t=Ur),this.label_&&(n=this.label_+" off"),e.push(new Fr(this.player_,{kinds:this.kinds_,kind:this.kind_,label:n})),this.hideThreshold_+=1;var r=this.player_.textTracks();Array.isArray(this.kinds_)||(this.kinds_=[this.kind_]);for(var i=0;i<r.length;i++){var a=r[i];if(this.kinds_.indexOf(a.kind)>-1){var o=new t(this.player_,{track:a,kinds:this.kinds_,kind:this.kind_,selectable:!0,multiSelectable:!1});o.addClass("vjs-"+a.kind+"-menu-item"),e.push(o)}}return e},t}(Nr);Gt.registerComponent("TextTrackButton",qr);var Hr=function(e){function t(t,n){var r,i=n.track,a=n.cue,o=t.currentTime();return n.selectable=!0,n.multiSelectable=!1,n.label=a.text,n.selected=a.startTime<=o&&o<a.endTime,(r=e.call(this,t,n)||this).track=i,r.cue=a,r}return m()(t,e),t.prototype.handleClick=function(t){e.prototype.handleClick.call(this),this.player_.currentTime(this.cue.startTime)},t}(Br);Gt.registerComponent("ChaptersTrackMenuItem",Hr);var zr=function(e){function t(t,n,r){var i;return(i=e.call(this,t,n,r)||this).selectCurrentItem_=function(){i.items.forEach((function(e){e.selected(i.track_.activeCues[0]===e.cue)}))},i}m()(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-chapters-button "+e.prototype.buildCSSClass.call(this)},n.buildWrapperCSSClass=function(){return"vjs-chapters-button "+e.prototype.buildWrapperCSSClass.call(this)},n.update=function(t){if(!t||!t.track||"chapters"===t.track.kind){var n=this.findChaptersTrack();n!==this.track_?(this.setTrack(n),e.prototype.update.call(this)):(!this.items||n&&n.cues&&n.cues.length!==this.items.length)&&e.prototype.update.call(this)}},n.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_.removeEventListener("cuechange",this.selectCurrentItem_),this.track_=null}if(this.track_=e,this.track_){this.track_.mode="hidden";var n=this.player_.remoteTextTrackEls().getTrackElementByTrack_(this.track_);n&&n.addEventListener("load",this.updateHandler_),this.track_.addEventListener("cuechange",this.selectCurrentItem_)}}},n.findChaptersTrack=function(){for(var e=this.player_.textTracks()||[],t=e.length-1;t>=0;t--){var n=e[t];if(n.kind===this.kind_)return n}},n.getMenuCaption=function(){return this.track_&&this.track_.label?this.track_.label:this.localize(qt(this.kind_))},n.createMenu=function(){return this.options_.title=this.getMenuCaption(),e.prototype.createMenu.call(this)},n.createItems=function(){var e=[];if(!this.track_)return e;var t=this.track_.cues;if(!t)return e;for(var n=0,r=t.length;n<r;n++){var i=t[n],a=new Hr(this.player_,{track:this.track_,cue:i});e.push(a)}return e},t}(qr);zr.prototype.kind_="chapters",zr.prototype.controlText_="Chapters",Gt.registerComponent("ChaptersButton",zr);var Wr=function(e){function t(t,n,r){var i;i=e.call(this,t,n,r)||this;var a=t.textTracks(),o=Ct(p()(i),i.handleTracksChange);return a.addEventListener("change",o),i.on("dispose",(function(){a.removeEventListener("change",o)})),i}m()(t,e);var n=t.prototype;return n.handleTracksChange=function(e){for(var t=this.player().textTracks(),n=!1,r=0,i=t.length;r<i;r++){var a=t[r];if(a.kind!==this.kind_&&"showing"===a.mode){n=!0;break}}n?this.disable():this.enable()},n.buildCSSClass=function(){return"vjs-descriptions-button "+e.prototype.buildCSSClass.call(this)},n.buildWrapperCSSClass=function(){return"vjs-descriptions-button "+e.prototype.buildWrapperCSSClass.call(this)},t}(qr);Wr.prototype.kind_="descriptions",Wr.prototype.controlText_="Descriptions",Gt.registerComponent("DescriptionsButton",Wr);var Vr=function(e){function t(t,n,r){return e.call(this,t,n,r)||this}m()(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-subtitles-button "+e.prototype.buildCSSClass.call(this)},n.buildWrapperCSSClass=function(){return"vjs-subtitles-button "+e.prototype.buildWrapperCSSClass.call(this)},t}(qr);Vr.prototype.kind_="subtitles",Vr.prototype.controlText_="Subtitles",Gt.registerComponent("SubtitlesButton",Vr);var Kr=function(e){function t(t,n){var r;return n.track={player:t,kind:n.kind,label:n.kind+" settings",selectable:!1,default:!1,mode:"disabled"},n.selectable=!1,n.name="CaptionSettingsMenuItem",(r=e.call(this,t,n)||this).addClass("vjs-texttrack-settings"),r.controlText(", opens "+n.kind+" settings dialog"),r}return m()(t,e),t.prototype.handleClick=function(e){this.player().getChild("textTrackSettings").open()},t}(Ur);Gt.registerComponent("CaptionSettingsMenuItem",Kr);var Gr=function(e){function t(t,n,r){return e.call(this,t,n,r)||this}m()(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-captions-button "+e.prototype.buildCSSClass.call(this)},n.buildWrapperCSSClass=function(){return"vjs-captions-button "+e.prototype.buildWrapperCSSClass.call(this)},n.createItems=function(){var t=[];return this.player().tech_&&this.player().tech_.featuresNativeTextTracks||!this.player().getChild("textTrackSettings")||(t.push(new Kr(this.player_,{kind:this.kind_})),this.hideThreshold_+=1),e.prototype.createItems.call(this,t)},t}(qr);Gr.prototype.kind_="captions",Gr.prototype.controlText_="Captions",Gt.registerComponent("CaptionsButton",Gr);var Xr=function(e){function t(){return e.apply(this,arguments)||this}return m()(t,e),t.prototype.createEl=function(t,n,r){var i=e.prototype.createEl.call(this,t,n,r),a=i.querySelector(".vjs-menu-item-text");return"captions"===this.options_.track.kind&&(a.appendChild(Ie("span",{className:"vjs-icon-placeholder"},{"aria-hidden":!0})),a.appendChild(Ie("span",{className:"vjs-control-text",textContent:" "+this.localize("Captions")}))),i},t}(Ur);Gt.registerComponent("SubsCapsMenuItem",Xr);var Yr=function(e){function t(t,n){var r;return void 0===n&&(n={}),(r=e.call(this,t,n)||this).label_="subtitles",["en","en-us","en-ca","fr-ca"].indexOf(r.player_.language_)>-1&&(r.label_="captions"),r.menuButton_.controlText(qt(r.label_)),r}m()(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-subs-caps-button "+e.prototype.buildCSSClass.call(this)},n.buildWrapperCSSClass=function(){return"vjs-subs-caps-button "+e.prototype.buildWrapperCSSClass.call(this)},n.createItems=function(){var t=[];return this.player().tech_&&this.player().tech_.featuresNativeTextTracks||!this.player().getChild("textTrackSettings")||(t.push(new Kr(this.player_,{kind:this.label_})),this.hideThreshold_+=1),t=e.prototype.createItems.call(this,t,Xr)},t}(qr);Yr.prototype.kinds_=["captions","subtitles"],Yr.prototype.controlText_="Subtitles",Gt.registerComponent("SubsCapsButton",Yr);var Qr=function(e){function t(t,n){var r,i=n.track,a=t.audioTracks();n.label=i.label||i.language||"Unknown",n.selected=i.enabled,(r=e.call(this,t,n)||this).track=i,r.addClass("vjs-"+i.kind+"-menu-item");var o=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];r.handleTracksChange.apply(p()(r),t)};return a.addEventListener("change",o),r.on("dispose",(function(){a.removeEventListener("change",o)})),r}m()(t,e);var n=t.prototype;return n.createEl=function(t,n,r){var i=e.prototype.createEl.call(this,t,n,r),a=i.querySelector(".vjs-menu-item-text");return"main-desc"===this.options_.track.kind&&(a.appendChild(Ie("span",{className:"vjs-icon-placeholder"},{"aria-hidden":!0})),a.appendChild(Ie("span",{className:"vjs-control-text",textContent:" "+this.localize("Descriptions")}))),i},n.handleClick=function(t){if(e.prototype.handleClick.call(this,t),this.track.enabled=!0,this.player_.tech_.featuresNativeAudioTracks)for(var n=this.player_.audioTracks(),r=0;r<n.length;r++){var i=n[r];i!==this.track&&(i.enabled=i===this.track)}},n.handleTracksChange=function(e){this.selected(this.track.enabled)},t}(Br);Gt.registerComponent("AudioTrackMenuItem",Qr);var $r=function(e){function t(t,n){return void 0===n&&(n={}),n.tracks=t.audioTracks(),e.call(this,t,n)||this}m()(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-audio-button "+e.prototype.buildCSSClass.call(this)},n.buildWrapperCSSClass=function(){return"vjs-audio-button "+e.prototype.buildWrapperCSSClass.call(this)},n.createItems=function(e){void 0===e&&(e=[]),this.hideThreshold_=1;for(var t=this.player_.audioTracks(),n=0;n<t.length;n++){var r=t[n];e.push(new Qr(this.player_,{track:r,selectable:!0,multiSelectable:!1}))}return e},t}(Nr);$r.prototype.controlText_="Audio Track",Gt.registerComponent("AudioTrackButton",$r);var Zr=function(e){function t(t,n){var r,i=n.rate,a=parseFloat(i,10);return n.label=i,n.selected=a===t.playbackRate(),n.selectable=!0,n.multiSelectable=!1,(r=e.call(this,t,n)||this).label=i,r.rate=a,r.on(t,"ratechange",(function(e){return r.update(e)})),r}m()(t,e);var n=t.prototype;return n.handleClick=function(t){e.prototype.handleClick.call(this),this.player().playbackRate(this.rate)},n.update=function(e){this.selected(this.player().playbackRate()===this.rate)},t}(Br);Zr.prototype.contentElType="button",Gt.registerComponent("PlaybackRateMenuItem",Zr);var Jr=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).menuButton_.el_.setAttribute("aria-describedby",r.labelElId_),r.updateVisibility(),r.updateLabel(),r.on(t,"loadstart",(function(e){return r.updateVisibility(e)})),r.on(t,"ratechange",(function(e){return r.updateLabel(e)})),r.on(t,"playbackrateschange",(function(e){return r.handlePlaybackRateschange(e)})),r}m()(t,e);var n=t.prototype;return n.createEl=function(){var t=e.prototype.createEl.call(this);return this.labelElId_="vjs-playback-rate-value-label-"+this.id_,this.labelEl_=Ie("div",{className:"vjs-playback-rate-value",id:this.labelElId_,textContent:"1x"}),t.appendChild(this.labelEl_),t},n.dispose=function(){this.labelEl_=null,e.prototype.dispose.call(this)},n.buildCSSClass=function(){return"vjs-playback-rate "+e.prototype.buildCSSClass.call(this)},n.buildWrapperCSSClass=function(){return"vjs-playback-rate "+e.prototype.buildWrapperCSSClass.call(this)},n.createItems=function(){for(var e=this.playbackRates(),t=[],n=e.length-1;n>=0;n--)t.push(new Zr(this.player(),{rate:e[n]+"x"}));return t},n.updateARIAAttributes=function(){this.el().setAttribute("aria-valuenow",this.player().playbackRate())},n.handleClick=function(e){var t=this.player().playbackRate(),n=this.playbackRates(),r=(n.indexOf(t)+1)%n.length;this.player().playbackRate(n[r])},n.handlePlaybackRateschange=function(e){this.update()},n.playbackRates=function(){var e=this.player();return e.playbackRates&&e.playbackRates()||[]},n.playbackRateSupported=function(){return this.player().tech_&&this.player().tech_.featuresPlaybackRate&&this.playbackRates()&&this.playbackRates().length>0},n.updateVisibility=function(e){this.playbackRateSupported()?this.removeClass("vjs-hidden"):this.addClass("vjs-hidden")},n.updateLabel=function(e){this.playbackRateSupported()&&(this.labelEl_.textContent=this.player().playbackRate()+"x")},t}(Rr);Jr.prototype.controlText_="Playback Rate",Gt.registerComponent("PlaybackRateMenuButton",Jr);var ei=function(e){function t(){return e.apply(this,arguments)||this}m()(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-spacer "+e.prototype.buildCSSClass.call(this)},n.createEl=function(t,n,r){return void 0===t&&(t="div"),void 0===n&&(n={}),void 0===r&&(r={}),n.className||(n.className=this.buildCSSClass()),e.prototype.createEl.call(this,t,n,r)},t}(Gt);Gt.registerComponent("Spacer",ei);var ti=function(e){function t(){return e.apply(this,arguments)||this}m()(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-custom-control-spacer "+e.prototype.buildCSSClass.call(this)},n.createEl=function(){return e.prototype.createEl.call(this,"div",{className:this.buildCSSClass(),textContent:"\xa0"})},t}(ei);Gt.registerComponent("CustomControlSpacer",ti);var ni=function(e){function t(){return e.apply(this,arguments)||this}return m()(t,e),t.prototype.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-control-bar",dir:"ltr"})},t}(Gt);ni.prototype.options_={children:["playToggle","volumePanel","currentTimeDisplay","timeDivider","durationDisplay","progressControl","liveDisplay","seekToLive","remainingTimeDisplay","customControlSpacer","playbackRateMenuButton","chaptersButton","descriptionsButton","subsCapsButton","audioTrackButton","fullscreenToggle"]},"exitPictureInPicture"in s.a&&ni.prototype.options_.children.splice(ni.prototype.options_.children.length-1,0,"pictureInPictureToggle"),Gt.registerComponent("ControlBar",ni);var ri=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).on(t,"error",(function(e){return r.open(e)})),r}m()(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-error-display "+e.prototype.buildCSSClass.call(this)},n.content=function(){var e=this.player().error();return e?this.localize(e.message):""},t}(on);ri.prototype.options_=l()({},on.prototype.options_,{pauseOnOpen:!1,fillAlways:!0,temporary:!1,uncloseable:!0}),Gt.registerComponent("ErrorDisplay",ri);var ii=["#000","Black"],ai=["#00F","Blue"],oi=["#0FF","Cyan"],si=["#0F0","Green"],ui=["#F0F","Magenta"],li=["#F00","Red"],ci=["#FFF","White"],di=["#FF0","Yellow"],hi=["1","Opaque"],pi=["0.5","Semi-Transparent"],fi=["0","Transparent"],mi={backgroundColor:{selector:".vjs-bg-color > select",id:"captions-background-color-%s",label:"Color",options:[ii,ci,li,si,ai,di,ui,oi]},backgroundOpacity:{selector:".vjs-bg-opacity > select",id:"captions-background-opacity-%s",label:"Transparency",options:[hi,pi,fi]},color:{selector:".vjs-fg-color > select",id:"captions-foreground-color-%s",label:"Color",options:[ci,ii,li,si,ai,di,ui,oi]},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:[hi,pi]},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:[fi,pi,hi]}};function gi(e,t){if(t&&(e=t(e)),e&&"none"!==e)return e}mi.windowColor.options=mi.backgroundColor.options;var vi=function(e){function t(t,n){var r;return n.temporary=!1,(r=e.call(this,t,n)||this).updateDisplay=r.updateDisplay.bind(p()(r)),r.fill(),r.hasBeenOpened_=r.hasBeenFilled_=!0,r.endDialog=Ie("p",{className:"vjs-control-text",textContent:r.localize("End of dialog window.")}),r.el().appendChild(r.endDialog),r.setDefaults(),void 0===n.persistTextTrackSettings&&(r.options_.persistTextTrackSettings=r.options_.playerOptions.persistTextTrackSettings),r.on(r.$(".vjs-done-button"),"click",(function(){r.saveSettings(),r.close()})),r.on(r.$(".vjs-default-button"),"click",(function(){r.setDefaults(),r.updateDisplay()})),Z(mi,(function(e){r.on(r.$(e.selector),"change",r.updateDisplay)})),r.options_.persistTextTrackSettings&&r.restoreSettings(),r}m()(t,e);var n=t.prototype;return n.dispose=function(){this.endDialog=null,e.prototype.dispose.call(this)},n.createElSelect_=function(e,t,n){var r=this;void 0===t&&(t=""),void 0===n&&(n="label");var i=mi[e],a=i.id.replace("%s",this.id_),o=[t,a].join(" ").trim();return["<"+n+' id="'+a+'" class="'+("label"===n?"vjs-label":"")+'">',this.localize(i.label),"</"+n+">",'<select aria-labelledby="'+o+'">'].concat(i.options.map((function(e){var t=a+"-"+e[1].replace(/\W+/g,"");return['<option id="'+t+'" value="'+e[0]+'" ','aria-labelledby="'+o+" "+t+'">',r.localize(e[1]),"</option>"].join("")}))).concat("</select>").join("")},n.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("")},n.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("")},n.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("")},n.createElColors_=function(){return Ie("div",{className:"vjs-track-settings-colors",innerHTML:[this.createElFgColor_(),this.createElBgColor_(),this.createElWinColor_()].join("")})},n.createElFont_=function(){return Ie("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("")})},n.createElControls_=function(){var e=this.localize("restore all settings to the default values");return Ie("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("")})},n.content=function(){return[this.createElColors_(),this.createElFont_(),this.createElControls_()]},n.label=function(){return this.localize("Caption Settings Dialog")},n.description=function(){return this.localize("Beginning of dialog window. Escape will cancel and close the window.")},n.buildCSSClass=function(){return e.prototype.buildCSSClass.call(this)+" vjs-text-track-settings"},n.getValues=function(){var e,t,n,r=this;return t=function(e,t,n){var i,a,o=(i=r.$(t.selector),a=t.parser,gi(i.options[i.options.selectedIndex].value,a));return void 0!==o&&(e[n]=o),e},void 0===(n={})&&(n=0),$(e=mi).reduce((function(n,r){return t(n,e[r],r)}),n)},n.setValues=function(e){var t=this;Z(mi,(function(n,r){!function(e,t,n){if(t)for(var r=0;r<e.options.length;r++)if(gi(e.options[r].value,n)===t){e.selectedIndex=r;break}}(t.$(n.selector),e[r],n.parser)}))},n.setDefaults=function(){var e=this;Z(mi,(function(t){var n=t.hasOwnProperty("default")?t.default:0;e.$(t.selector).selectedIndex=n}))},n.restoreSettings=function(){var e;try{e=JSON.parse(a.a.localStorage.getItem("vjs-text-track-settings"))}catch(t){X.warn(t)}e&&this.setValues(e)},n.saveSettings=function(){if(this.options_.persistTextTrackSettings){var e=this.getValues();try{Object.keys(e).length?a.a.localStorage.setItem("vjs-text-track-settings",JSON.stringify(e)):a.a.localStorage.removeItem("vjs-text-track-settings")}catch(t){X.warn(t)}}},n.updateDisplay=function(){var e=this.player_.getChild("textTrackDisplay");e&&e.updateDisplay()},n.conditionalBlur_=function(){this.previouslyActiveEl_=null;var e=this.player_.controlBar,t=e&&e.subsCapsButton,n=e&&e.captionsButton;t?t.focus():n&&n.focus()},t}(on);Gt.registerComponent("TextTrackSettings",vi);var yi=function(e){function t(t,n){var r,i=n.ResizeObserver||a.a.ResizeObserver;null===n.ResizeObserver&&(i=!1);var o=Ht({createEl:!i,reportTouchActivity:!1},n);return(r=e.call(this,t,o)||this).ResizeObserver=n.ResizeObserver||a.a.ResizeObserver,r.loadListener_=null,r.resizeObserver_=null,r.debouncedHandler_=function(e,t,n,r){var i;void 0===r&&(r=a.a);var o=function(){var a=this,o=arguments,s=function(){i=null,s=null,n||e.apply(a,o)};!i&&n&&e.apply(a,o),r.clearTimeout(i),i=r.setTimeout(s,t)};return o.cancel=function(){r.clearTimeout(i),i=null},o}((function(){r.resizeHandler()}),100,!1,p()(r)),i?(r.resizeObserver_=new r.ResizeObserver(r.debouncedHandler_),r.resizeObserver_.observe(t.el())):(r.loadListener_=function(){if(r.el_&&r.el_.contentWindow){var e=r.debouncedHandler_,t=r.unloadListener_=function(){bt(this,"resize",e),bt(this,"unload",t),t=null};yt(r.el_.contentWindow,"unload",t),yt(r.el_.contentWindow,"resize",e)}},r.one("load",r.loadListener_)),r}m()(t,e);var n=t.prototype;return n.createEl=function(){return e.prototype.createEl.call(this,"iframe",{className:"vjs-resize-manager",tabIndex:-1,title:this.localize("No content")},{"aria-hidden":"true"})},n.resizeHandler=function(){this.player_&&this.player_.trigger&&this.player_.trigger("playerresize")},n.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}(Gt);Gt.registerComponent("ResizeManager",yi);var bi={trackingThreshold:20,liveTolerance:15},_i=function(e){function t(t,n){var r,i=Ht(bi,n,{createEl:!1});return(r=e.call(this,t,i)||this).handleVisibilityChange_=function(e){return r.handleVisibilityChange(e)},r.trackLiveHandler_=function(){return r.trackLive_()},r.handlePlay_=function(e){return r.handlePlay(e)},r.handleFirstTimeupdate_=function(e){return r.handleFirstTimeupdate(e)},r.handleSeeked_=function(e){return r.handleSeeked(e)},r.seekToLiveEdge_=function(e){return r.seekToLiveEdge(e)},r.reset_(),r.on(r.player_,"durationchange",(function(e){return r.handleDurationchange(e)})),r.on(r.player_,"canplay",(function(){return r.toggleTracking()})),me&&"hidden"in s.a&&"visibilityState"in s.a&&r.on(s.a,"visibilitychange",r.handleVisibilityChange_),r}m()(t,e);var n=t.prototype;return n.handleVisibilityChange=function(){this.player_.duration()===1/0&&(s.a.hidden?this.stopTracking():this.startTracking())},n.trackLive_=function(){var e=this.player_.seekable();if(e&&e.length){var t=Number(a.a.performance.now().toFixed(4)),n=-1===this.lastTime_?0:(t-this.lastTime_)/1e3;this.lastTime_=t,this.pastSeekEnd_=this.pastSeekEnd()+n;var r=this.liveCurrentTime(),i=this.player_.currentTime(),o=this.player_.paused()||this.seekedBehindLive_||Math.abs(r-i)>this.options_.liveTolerance;this.timeupdateSeen_&&r!==1/0||(o=!1),o!==this.behindLiveEdge_&&(this.behindLiveEdge_=o,this.trigger("liveedgechange"))}},n.handleDurationchange=function(){this.toggleTracking()},n.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())},n.startTracking=function(){this.isTracking()||(this.timeupdateSeen_||(this.timeupdateSeen_=this.player_.hasStarted()),this.trackingInterval_=this.setInterval(this.trackLiveHandler_,30),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_)))},n.handleFirstTimeupdate=function(){this.timeupdateSeen_=!0,this.on(this.player_,"seeked",this.handleSeeked_)},n.handleSeeked=function(){var e=Math.abs(this.liveCurrentTime()-this.player_.currentTime());this.seekedBehindLive_=this.nextSeekedFromUser_&&e>2,this.nextSeekedFromUser_=!1,this.trackLive_()},n.handlePlay=function(){this.one(this.player_,"timeupdate",this.seekToLiveEdge_)},n.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_)},n.nextSeekedFromUser=function(){this.nextSeekedFromUser_=!0},n.stopTracking=function(){this.isTracking()&&(this.reset_(),this.trigger("liveedgechange"))},n.seekableEnd=function(){for(var e=this.player_.seekable(),t=[],n=e?e.length:0;n--;)t.push(e.end(n));return t.length?t.sort()[t.length-1]:1/0},n.seekableStart=function(){for(var e=this.player_.seekable(),t=[],n=e?e.length:0;n--;)t.push(e.start(n));return t.length?t.sort()[0]:0},n.liveWindow=function(){var e=this.liveCurrentTime();return e===1/0?0:e-this.seekableStart()},n.isLive=function(){return this.isTracking()},n.atLiveEdge=function(){return!this.behindLiveEdge()},n.liveCurrentTime=function(){return this.pastSeekEnd()+this.seekableEnd()},n.pastSeekEnd=function(){var e=this.seekableEnd();return-1!==this.lastSeekEnd_&&e!==this.lastSeekEnd_&&(this.pastSeekEnd_=0),this.lastSeekEnd_=e,this.pastSeekEnd_},n.behindLiveEdge=function(){return this.behindLiveEdge_},n.isTracking=function(){return"number"===typeof this.trackingInterval_},n.seekToLiveEdge=function(){this.seekedBehindLive_=!1,this.atLiveEdge()||(this.nextSeekedFromUser_=!1,this.player_.currentTime(this.liveCurrentTime()))},n.dispose=function(){this.off(s.a,"visibilitychange",this.handleVisibilityChange_),this.stopTracking(),e.prototype.dispose.call(this)},t}(Gt);Gt.registerComponent("LiveTracker",_i);var Ti,Si=function(e){var t=e.el();if(t.hasAttribute("src"))return e.triggerSourceset(t.src),!0;var n=e.$$("source"),r=[],i="";if(!n.length)return!1;for(var a=0;a<n.length;a++){var o=n[a].src;o&&-1===r.indexOf(o)&&r.push(o)}return!!r.length&&(1===r.length&&(i=r[0]),e.triggerSourceset(i),!0)},wi=Object.defineProperty({},"innerHTML",{get:function(){return this.cloneNode(!0).innerHTML},set:function(e){var t=s.a.createElement(this.nodeName.toLowerCase());t.innerHTML=e;for(var n=s.a.createDocumentFragment();t.childNodes.length;)n.appendChild(t.childNodes[0]);return this.innerText="",a.a.Element.prototype.appendChild.call(this,n),this.innerHTML}}),ki=function(e,t){for(var n={},r=0;r<e.length&&!((n=Object.getOwnPropertyDescriptor(e[r],t))&&n.set&&n.get);r++);return n.enumerable=!0,n.configurable=!0,n},Ci=function(e){var t=e.el();if(!t.resetSourceWatch_){var n={},r=function(e){return ki([e.el(),a.a.HTMLMediaElement.prototype,a.a.Element.prototype,wi],"innerHTML")}(e),i=function(n){return function(){for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];var o=n.apply(t,i);return Si(e),o}};["append","appendChild","insertAdjacentHTML"].forEach((function(e){t[e]&&(n[e]=t[e],t[e]=i(n[e]))})),Object.defineProperty(t,"innerHTML",Ht(r,{set:i(r.set)})),t.resetSourceWatch_=function(){t.resetSourceWatch_=null,Object.keys(n).forEach((function(e){t[e]=n[e]})),Object.defineProperty(t,"innerHTML",r)},e.one("sourceset",t.resetSourceWatch_)}},Ei=Object.defineProperty({},"src",{get:function(){return this.hasAttribute("src")?Sn(a.a.Element.prototype.getAttribute.call(this,"src")):""},set:function(e){return a.a.Element.prototype.setAttribute.call(this,"src",e),e}}),Ai=function(e){if(e.featuresSourceset){var t=e.el();if(!t.resetSourceset_){var n=function(e){return ki([e.el(),a.a.HTMLMediaElement.prototype,Ei],"src")}(e),r=t.setAttribute,i=t.load;Object.defineProperty(t,"src",Ht(n,{set:function(r){var i=n.set.call(t,r);return e.triggerSourceset(t.src),i}})),t.setAttribute=function(n,i){var a=r.call(t,n,i);return/src/i.test(n)&&e.triggerSourceset(t.src),a},t.load=function(){var n=i.call(t);return Si(e)||(e.triggerSourceset(""),Ci(e)),n},t.currentSrc?e.triggerSourceset(t.currentSrc):Si(e)||Ci(e),t.resetSourceset_=function(){t.resetSourceset_=null,t.load=i,t.setAttribute=r,Object.defineProperty(t,"src",n),t.resetSourceWatch_&&t.resetSourceWatch_()}}}},xi=function(e,t,n,r){void 0===r&&(r=!0);var i=function(n){return Object.defineProperty(e,t,{value:n,enumerable:!0,writable:!0})},a={configurable:!0,enumerable:!0,get:function(){var e=n();return i(e),e}};return r&&(a.set=i),Object.defineProperty(e,t,a)},Pi=function(e){function t(t,n){var r;r=e.call(this,t,n)||this;var i=t.source,a=!1;if(r.featuresVideoFrameCallback=r.featuresVideoFrameCallback&&"VIDEO"===r.el_.tagName,i&&(r.el_.currentSrc!==i.src||t.tag&&3===t.tag.initNetworkState_)?r.setSource(i):r.handleLateInit_(r.el_),t.enableSourceset&&r.setupSourcesetHandling_(),r.isScrubbing_=!1,r.el_.hasChildNodes()){for(var o=r.el_.childNodes,s=o.length,u=[];s--;){var l=o[s];"track"===l.nodeName.toLowerCase()&&(r.featuresNativeTextTracks?(r.remoteTextTrackEls().addTrackElement_(l),r.remoteTextTracks().addTrack(l.track),r.textTracks().addTrack(l.track),a||r.el_.hasAttribute("crossorigin")||!kn(l.src)||(a=!0)):u.push(l))}for(var c=0;c<u.length;c++)r.el_.removeChild(u[c])}return r.proxyNativeTracks_(),r.featuresNativeTextTracks&&a&&X.warn("Text Tracks are being loaded from another origin but the crossorigin attribute isn't used.\nThis may prevent text tracks from loading."),r.restoreMetadataTracksInIOSNativePlayer_(),(ye||_e||ce)&&!0===t.nativeControlsForTouch&&r.setControls(!0),r.proxyWebkitFullscreen_(),r.triggerReady(),r}m()(t,e);var n=t.prototype;return n.dispose=function(){this.el_&&this.el_.resetSourceset_&&this.el_.resetSourceset_(),t.disposeMediaElement(this.el_),this.options_=null,e.prototype.dispose.call(this)},n.setupSourcesetHandling_=function(){Ai(this)},n.restoreMetadataTracksInIOSNativePlayer_=function(){var e,t=this.textTracks(),n=function(){e=[];for(var n=0;n<t.length;n++){var r=t[n];"metadata"===r.kind&&e.push({track:r,storedMode:r.mode})}};n(),t.addEventListener("change",n),this.on("dispose",(function(){return t.removeEventListener("change",n)}));var r=function n(){for(var r=0;r<e.length;r++){var i=e[r];"disabled"===i.track.mode&&i.track.mode!==i.storedMode&&(i.track.mode=i.storedMode)}t.removeEventListener("change",n)};this.on("webkitbeginfullscreen",(function(){t.removeEventListener("change",n),t.removeEventListener("change",r),t.addEventListener("change",r)})),this.on("webkitendfullscreen",(function(){t.removeEventListener("change",n),t.addEventListener("change",n),t.removeEventListener("change",r)}))},n.overrideNative_=function(e,t){var n=this;if(t===this["featuresNative"+e+"Tracks"]){var r=e.toLowerCase();this[r+"TracksListeners_"]&&Object.keys(this[r+"TracksListeners_"]).forEach((function(e){n.el()[r+"Tracks"].removeEventListener(e,n[r+"TracksListeners_"][e])})),this["featuresNative"+e+"Tracks"]=!t,this[r+"TracksListeners_"]=null,this.proxyNativeTracksForType_(r)}},n.overrideNativeAudioTracks=function(e){this.overrideNative_("Audio",e)},n.overrideNativeVideoTracks=function(e){this.overrideNative_("Video",e)},n.proxyNativeTracksForType_=function(e){var t=this,n=Ln[e],r=this.el()[n.getterName],i=this[n.getterName]();if(this["featuresNative"+n.capitalName+"Tracks"]&&r&&r.addEventListener){var a={change:function(n){var r={type:"change",target:i,currentTarget:i,srcElement:i};i.trigger(r),"text"===e&&t[Dn.remoteText.getterName]().trigger(r)},addtrack:function(e){i.addTrack(e.track)},removetrack:function(e){i.removeTrack(e.track)}},o=function(){for(var e=[],t=0;t<i.length;t++){for(var n=!1,a=0;a<r.length;a++)if(r[a]===i[t]){n=!0;break}n||e.push(i[t])}for(;e.length;)i.removeTrack(e.shift())};this[n.getterName+"Listeners_"]=a,Object.keys(a).forEach((function(e){var n=a[e];r.addEventListener(e,n),t.on("dispose",(function(t){return r.removeEventListener(e,n)}))})),this.on("loadstart",o),this.on("dispose",(function(e){return t.off("loadstart",o)}))}},n.proxyNativeTracks_=function(){var e=this;Ln.names.forEach((function(t){e.proxyNativeTracksForType_(t)}))},n.createEl=function(){var e=this.options_.tag;if(!e||!this.options_.playerElIngest&&!this.movingMediaElementInDOM){if(e){var n=e.cloneNode(!0);e.parentNode&&e.parentNode.insertBefore(n,e),t.disposeMediaElement(e),e=n}else{e=s.a.createElement("video");var r=Ht({},this.options_.tag&&Be(this.options_.tag));ye&&!0===this.options_.nativeControlsForTouch||delete r.controls,je(e,J(r,{id:this.options_.techId,class:"vjs-tech"}))}e.playerId=this.options_.playerId}"undefined"!==typeof this.options_.preload&&Fe(e,"preload",this.options_.preload),void 0!==this.options_.disablePictureInPicture&&(e.disablePictureInPicture=this.options_.disablePictureInPicture);for(var i=["loop","muted","playsinline","autoplay"],a=0;a<i.length;a++){var o=i[a],u=this.options_[o];"undefined"!==typeof u&&(u?Fe(e,o,o):qe(e,o),e[o]=u)}return e},n.handleLateInit_=function(e){if(0!==e.networkState&&3!==e.networkState){if(0===e.readyState){var t=!1,n=function(){t=!0};this.on("loadstart",n);var r=function(){t||this.trigger("loadstart")};return this.on("loadedmetadata",r),void this.ready((function(){this.off("loadstart",n),this.off("loadedmetadata",r),t||this.trigger("loadstart")}))}var i=["loadstart"];i.push("loadedmetadata"),e.readyState>=2&&i.push("loadeddata"),e.readyState>=3&&i.push("canplay"),e.readyState>=4&&i.push("canplaythrough"),this.ready((function(){i.forEach((function(e){this.trigger(e)}),this)}))}},n.setScrubbing=function(e){this.isScrubbing_=e},n.scrubbing=function(){return this.isScrubbing_},n.setCurrentTime=function(e){try{this.isScrubbing_&&this.el_.fastSeek&&Se?this.el_.fastSeek(e):this.el_.currentTime=e}catch(t){X(t,"Video is not ready. (Video.js)")}},n.duration=function(){var e=this;if(this.el_.duration===1/0&&ue&&pe&&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},n.width=function(){return this.el_.offsetWidth},n.height=function(){return this.el_.offsetHeight},n.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)},n=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",n),this.on("dispose",(function(){e.off("webkitbeginfullscreen",n),e.off("webkitendfullscreen",t)}))}},n.supportsFullScreen=function(){if("function"===typeof this.el_.webkitEnterFullScreen){var e=a.a.navigator&&a.a.navigator.userAgent||"";if(/Android/.test(e)||!/Chrome|Mac OS X 10.5/.test(e))return!0}return!1},n.enterFullScreen=function(){var e=this.el_;if(e.paused&&e.networkState<=e.HAVE_METADATA)tn(this.el_.play()),this.setTimeout((function(){e.pause();try{e.webkitEnterFullScreen()}catch(t){this.trigger("fullscreenerror",t)}}),0);else try{e.webkitEnterFullScreen()}catch(t){this.trigger("fullscreenerror",t)}},n.exitFullScreen=function(){this.el_.webkitDisplayingFullscreen?this.el_.webkitExitFullScreen():this.trigger("fullscreenerror",new Error("The video is not fullscreen"))},n.requestPictureInPicture=function(){return this.el_.requestPictureInPicture()},n.requestVideoFrameCallback=function(t){return this.featuresVideoFrameCallback&&!this.el_.webkitKeys?this.el_.requestVideoFrameCallback(t):e.prototype.requestVideoFrameCallback.call(this,t)},n.cancelVideoFrameCallback=function(t){this.featuresVideoFrameCallback&&!this.el_.webkitKeys?this.el_.cancelVideoFrameCallback(t):e.prototype.cancelVideoFrameCallback.call(this,t)},n.src=function(e){if(void 0===e)return this.el_.src;this.setSrc(e)},n.reset=function(){t.resetMediaElement(this.el_)},n.currentSrc=function(){return this.currentSource_?this.currentSource_.src:this.el_.currentSrc},n.setControls=function(e){this.el_.controls=!!e},n.addTextTrack=function(t,n,r){return this.featuresNativeTextTracks?this.el_.addTextTrack(t,n,r):e.prototype.addTextTrack.call(this,t,n,r)},n.createRemoteTextTrack=function(t){if(!this.featuresNativeTextTracks)return e.prototype.createRemoteTextTrack.call(this,t);var n=s.a.createElement("track");return t.kind&&(n.kind=t.kind),t.label&&(n.label=t.label),(t.language||t.srclang)&&(n.srclang=t.language||t.srclang),t.default&&(n.default=t.default),t.id&&(n.id=t.id),t.src&&(n.src=t.src),n},n.addRemoteTextTrack=function(t,n){var r=e.prototype.addRemoteTextTrack.call(this,t,n);return this.featuresNativeTextTracks&&this.el().appendChild(r),r},n.removeRemoteTextTrack=function(t){if(e.prototype.removeRemoteTextTrack.call(this,t),this.featuresNativeTextTracks)for(var n=this.$$("track"),r=n.length;r--;)t!==n[r]&&t!==n[r].track||this.el().removeChild(n[r])},n.getVideoPlaybackQuality=function(){if("function"===typeof this.el().getVideoPlaybackQuality)return this.el().getVideoPlaybackQuality();var e={};return"undefined"!==typeof this.el().webkitDroppedFrameCount&&"undefined"!==typeof this.el().webkitDecodedFrameCount&&(e.droppedVideoFrames=this.el().webkitDroppedFrameCount,e.totalVideoFrames=this.el().webkitDecodedFrameCount),a.a.performance&&"function"===typeof a.a.performance.now?e.creationTime=a.a.performance.now():a.a.performance&&a.a.performance.timing&&"number"===typeof a.a.performance.timing.navigationStart&&(e.creationTime=a.a.Date.now()-a.a.performance.timing.navigationStart),e},t}(Rn);xi(Pi,"TEST_VID",(function(){if(Ee()){var e=s.a.createElement("video"),t=s.a.createElement("track");return t.kind="captions",t.srclang="en",t.label="English",e.appendChild(t),e}})),Pi.isSupported=function(){try{Pi.TEST_VID.volume=.5}catch(e){return!1}return!(!Pi.TEST_VID||!Pi.TEST_VID.canPlayType)},Pi.canPlayType=function(e){return Pi.TEST_VID.canPlayType(e)},Pi.canPlaySource=function(e,t){return Pi.canPlayType(e.type)},Pi.canControlVolume=function(){try{var e=Pi.TEST_VID.volume;Pi.TEST_VID.volume=e/2+.1;var t=e!==Pi.TEST_VID.volume;return t&&Te?(a.a.setTimeout((function(){Pi&&Pi.prototype&&(Pi.prototype.featuresVolumeControl=e!==Pi.TEST_VID.volume)})),!1):t}catch(n){return!1}},Pi.canMuteVolume=function(){try{var e=Pi.TEST_VID.muted;return Pi.TEST_VID.muted=!e,Pi.TEST_VID.muted?Fe(Pi.TEST_VID,"muted","muted"):qe(Pi.TEST_VID,"muted"),e!==Pi.TEST_VID.muted}catch(t){return!1}},Pi.canControlPlaybackRate=function(){if(ue&&pe&&fe<58)return!1;try{var e=Pi.TEST_VID.playbackRate;return Pi.TEST_VID.playbackRate=e/2+.1,e!==Pi.TEST_VID.playbackRate}catch(t){return!1}},Pi.canOverrideAttributes=function(){try{var e=function(){};Object.defineProperty(s.a.createElement("video"),"src",{get:e,set:e}),Object.defineProperty(s.a.createElement("audio"),"src",{get:e,set:e}),Object.defineProperty(s.a.createElement("video"),"innerHTML",{get:e,set:e}),Object.defineProperty(s.a.createElement("audio"),"innerHTML",{get:e,set:e})}catch(t){return!1}return!0},Pi.supportsNativeTextTracks=function(){return Se||Te&&pe},Pi.supportsNativeVideoTracks=function(){return!(!Pi.TEST_VID||!Pi.TEST_VID.videoTracks)},Pi.supportsNativeAudioTracks=function(){return!(!Pi.TEST_VID||!Pi.TEST_VID.audioTracks)},Pi.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],n=e[1];xi(Pi.prototype,t,(function(){return Pi[n]()}),!0)})),Pi.prototype.featuresVolumeControl=Pi.canControlVolume(),Pi.prototype.movingMediaElementInDOM=!Te,Pi.prototype.featuresFullscreenResize=!0,Pi.prototype.featuresProgressEvents=!0,Pi.prototype.featuresTimeupdateEvents=!0,Pi.prototype.featuresVideoFrameCallback=!(!Pi.TEST_VID||!Pi.TEST_VID.requestVideoFrameCallback),Pi.patchCanPlayType=function(){le>=4&&!de&&!pe&&(Ti=Pi.TEST_VID&&Pi.TEST_VID.constructor.prototype.canPlayType,Pi.TEST_VID.constructor.prototype.canPlayType=function(e){return e&&/^application\/(?:x-|vnd\.apple\.)mpegurl/i.test(e)?"maybe":Ti.call(this,e)})},Pi.unpatchCanPlayType=function(){var e=Pi.TEST_VID.constructor.prototype.canPlayType;return Ti&&(Pi.TEST_VID.constructor.prototype.canPlayType=Ti),e},Pi.patchCanPlayType(),Pi.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(t){}}()}},Pi.resetMediaElement=function(e){if(e){for(var t=e.querySelectorAll("source"),n=t.length;n--;)e.removeChild(t[n]);e.removeAttribute("src"),"function"===typeof e.load&&function(){try{e.load()}catch(t){}}()}},["muted","defaultMuted","autoplay","controls","loop","playsinline"].forEach((function(e){Pi.prototype[e]=function(){return this.el_[e]||this.el_.hasAttribute(e)}})),["muted","defaultMuted","autoplay","loop","playsinline"].forEach((function(e){Pi.prototype["set"+qt(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){Pi.prototype[e]=function(){return this.el_[e]}})),["volume","src","poster","preload","playbackRate","defaultPlaybackRate","disablePictureInPicture","crossOrigin"].forEach((function(e){Pi.prototype["set"+qt(e)]=function(t){this.el_[e]=t}})),["pause","load","play"].forEach((function(e){Pi.prototype[e]=function(){return this.el_[e]()}})),Rn.withSourceHandlers(Pi),Pi.nativeSourceHandler={},Pi.nativeSourceHandler.canPlayType=function(e){try{return Pi.TEST_VID.canPlayType(e)}catch(t){return""}},Pi.nativeSourceHandler.canHandleSource=function(e,t){if(e.type)return Pi.nativeSourceHandler.canPlayType(e.type);if(e.src){var n=wn(e.src);return Pi.nativeSourceHandler.canPlayType("video/"+n)}return""},Pi.nativeSourceHandler.handleSource=function(e,t,n){t.setSrc(e.src)},Pi.nativeSourceHandler.dispose=function(){},Pi.registerSourceHandler(Pi.nativeSourceHandler),Rn.registerTech("Html5",Pi);var Ii=["progress","abort","suspend","emptied","stalled","loadedmetadata","loadeddata","timeupdate","resize","volumechange","texttrackchange"],Oi={canplay:"CanPlay",canplaythrough:"CanPlayThrough",playing:"Playing",seeked:"Seeked"},Li=["tiny","xsmall","small","medium","large","xlarge","huge"],Di={};Li.forEach((function(e){var t="x"===e.charAt(0)?"x-"+e.substring(1):e;Di[e]="vjs-layout-"+t}));var Mi={tiny:210,xsmall:320,small:425,medium:768,large:1440,xlarge:2560,huge:1/0},Ri=function(e){function t(n,r,i){var a;if(n.id=n.id||r.id||"vjs_video_"+dt(),(r=J(t.getTagSettings(n),r)).initChildren=!1,r.createEl=!1,r.evented=!1,r.reportTouchActivity=!1,!r.language)if("function"===typeof n.closest){var o=n.closest("[lang]");o&&o.getAttribute&&(r.language=o.getAttribute("lang"))}else for(var u=n;u&&1===u.nodeType;){if(Be(u).hasOwnProperty("lang")){r.language=u.getAttribute("lang");break}u=u.parentNode}if((a=e.call(this,null,r,i)||this).boundDocumentFullscreenChange_=function(e){return a.documentFullscreenChange_(e)},a.boundFullWindowOnEscKey_=function(e){return a.fullWindowOnEscKey(e)},a.boundUpdateStyleEl_=function(e){return a.updateStyleEl_(e)},a.boundApplyInitTime_=function(e){return a.applyInitTime_(e)},a.boundUpdateCurrentBreakpoint_=function(e){return a.updateCurrentBreakpoint_(e)},a.boundHandleTechClick_=function(e){return a.handleTechClick_(e)},a.boundHandleTechDoubleClick_=function(e){return a.handleTechDoubleClick_(e)},a.boundHandleTechTouchStart_=function(e){return a.handleTechTouchStart_(e)},a.boundHandleTechTouchMove_=function(e){return a.handleTechTouchMove_(e)},a.boundHandleTechTouchEnd_=function(e){return a.handleTechTouchEnd_(e)},a.boundHandleTechTap_=function(e){return a.handleTechTap_(e)},a.isFullscreen_=!1,a.log=Y(a.id_),a.fsApi_=H,a.isPosterFromTech_=!1,a.queuedCallbacks_=[],a.isReady_=!1,a.hasStarted_=!1,a.userActive_=!1,a.debugEnabled_=!1,a.audioOnlyMode_=!1,a.audioPosterMode_=!1,a.audioOnlyCache_={playerHeight:null,hiddenChildren:[]},!a.options_||!a.options_.techOrder||!a.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(a.tag=n,a.tagAttributes=n&&Be(n),a.language(a.options_.language),r.languages){var l={};Object.getOwnPropertyNames(r.languages).forEach((function(e){l[e.toLowerCase()]=r.languages[e]})),a.languages_=l}else a.languages_=t.prototype.options_.languages;a.resetCache_(),a.poster_=r.poster||"",a.controls_=!!r.controls,n.controls=!1,n.removeAttribute("controls"),a.changingSrc_=!1,a.playCallbacks_=[],a.playTerminatedQueue_=[],n.hasAttribute("autoplay")?a.autoplay(!0):a.autoplay(a.options_.autoplay),r.plugins&&Object.keys(r.plugins).forEach((function(e){if("function"!==typeof a[e])throw new Error('plugin "'+e+'" does not exist')})),a.scrubbing_=!1,a.el_=a.createEl(),jt(p()(a),{eventBusKey:"el_"}),a.fsApi_.requestFullscreen&&(yt(s.a,a.fsApi_.fullscreenchange,a.boundDocumentFullscreenChange_),a.on(a.fsApi_.fullscreenchange,a.boundDocumentFullscreenChange_)),a.fluid_&&a.on(["playerreset","resize"],a.boundUpdateStyleEl_);var c=Ht(a.options_);r.plugins&&Object.keys(r.plugins).forEach((function(e){a[e](r.plugins[e])})),r.debug&&a.debug(!0),a.options_.playerOptions=c,a.middleware_=[],a.playbackRates(r.playbackRates),a.initChildren(),a.isAudio("audio"===n.nodeName.toLowerCase()),a.controls()?a.addClass("vjs-controls-enabled"):a.addClass("vjs-controls-disabled"),a.el_.setAttribute("role","region"),a.isAudio()?a.el_.setAttribute("aria-label",a.localize("Audio Player")):a.el_.setAttribute("aria-label",a.localize("Video Player")),a.isAudio()&&a.addClass("vjs-audio"),a.flexNotSupported_()&&a.addClass("vjs-no-flex"),ye&&a.addClass("vjs-touch-enabled"),Te||a.addClass("vjs-workinghover"),t.players[a.id_]=p()(a);var d="7.21.4".split(".")[0];return a.addClass("vjs-v"+d),a.userActive(!0),a.reportUserActivity(),a.one("play",(function(e){return a.listenForUserActivity_(e)})),a.on("stageclick",(function(e){return a.handleStageClick_(e)})),a.on("keydown",(function(e){return a.handleKeyDown(e)})),a.on("languagechange",(function(e){return a.handleLanguagechange(e)})),a.breakpoints(a.options_.breakpoints),a.responsive(a.options_.responsive),a.on("ready",(function(){a.audioPosterMode(a.options_.audioPosterMode),a.audioOnlyMode(a.options_.audioOnlyMode)})),a}m()(t,e);var n=t.prototype;return n.dispose=function(){var n=this;this.trigger("dispose"),this.off("dispose"),bt(s.a,this.fsApi_.fullscreenchange,this.boundDocumentFullscreenChange_),bt(s.a,"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),jn[this.id()]=null,Mn.names.forEach((function(e){var t=Mn[e],r=n[t.getterName]();r&&r.off&&r.off()})),e.prototype.dispose.call(this,{restoreEl:this.options_.restoreEl})},n.createEl=function(){var t,n=this.tag,r=this.playerElIngest_=n.parentNode&&n.parentNode.hasAttribute&&n.parentNode.hasAttribute("data-vjs-player"),i="video-js"===this.tag.tagName.toLowerCase();r?t=this.el_=n.parentNode:i||(t=this.el_=e.prototype.createEl.call(this,"div"));var o=Be(n);if(i){for(t=this.el_=n,n=this.tag=s.a.createElement("video");t.children.length;)n.appendChild(t.firstChild);De(t,"video-js")||Me(t,"video-js"),t.appendChild(n),r=this.playerElIngest_=t,Object.keys(t).forEach((function(e){try{n[e]=t[e]}catch(r){}}))}if(n.setAttribute("tabindex","-1"),o.tabindex="-1",(me||pe&&ve)&&(n.setAttribute("role","application"),o.role="application"),n.removeAttribute("width"),n.removeAttribute("height"),"width"in o&&delete o.width,"height"in o&&delete o.height,Object.getOwnPropertyNames(o).forEach((function(e){i&&"class"===e||t.setAttribute(e,o[e]),i&&n.setAttribute(e,o[e])})),n.playerId=n.id,n.id+="_html5_api",n.className="vjs-tech",n.player=t.player=this,this.addClass("vjs-paused"),!0!==a.a.VIDEOJS_NO_DYNAMIC_STYLE){this.styleEl_=ut("vjs-styles-dimensions");var u=et(".vjs-styles-defaults"),l=et("head");l.insertBefore(this.styleEl_,u?u.nextSibling:l.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=n.getElementsByTagName("a"),d=0;d<c.length;d++){var h=c.item(d);Me(h,"vjs-hidden"),h.setAttribute("hidden","hidden")}return n.initNetworkState_=n.networkState,n.parentNode&&!r&&n.parentNode.insertBefore(t,n),Le(n,t),this.children_.unshift(n),this.el_.setAttribute("lang",this.language_),this.el_.setAttribute("translate","no"),this.el_=t,t},n.crossOrigin=function(e){if(!e)return this.techGet_("crossOrigin");"anonymous"===e||"use-credentials"===e?this.techCall_("setCrossOrigin",e):X.warn('crossOrigin must be "anonymous" or "use-credentials", given "'+e+'"')},n.width=function(e){return this.dimension("width",e)},n.height=function(e){return this.dimension("height",e)},n.dimension=function(e,t){var n=e+"_";if(void 0===t)return this[n]||0;if(""===t||"auto"===t)return this[n]=void 0,void this.updateStyleEl_();var r=parseFloat(t);isNaN(r)?X.error('Improper value "'+t+'" supplied for for '+e):(this[n]=r,this.updateStyleEl_())},n.fluid=function(e){var t,n,r=this;if(void 0===e)return!!this.fluid_;this.fluid_=!!e,Pt(this)&&this.off(["playerreset","resize"],this.boundUpdateStyleEl_),e?(this.addClass("vjs-fluid"),this.fill(!1),n=function(){r.on(["playerreset","resize"],r.boundUpdateStyleEl_)},Pt(t=this)?n():(t.eventedCallbacks||(t.eventedCallbacks=[]),t.eventedCallbacks.push(n))):this.removeClass("vjs-fluid"),this.updateStyleEl_()},n.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")},n.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_()},n.updateStyleEl_=function(){if(!0!==a.a.VIDEOJS_NO_DYNAMIC_STYLE){var e,t,n,r=(void 0!==this.aspectRatio_&&"auto"!==this.aspectRatio_?this.aspectRatio_:this.videoWidth()>0?this.videoWidth()+":"+this.videoHeight():"16:9").split(":"),i=r[1]/r[0];e=void 0!==this.width_?this.width_:void 0!==this.height_?this.height_/i:this.videoWidth()||300,t=void 0!==this.height_?this.height_:e*i,n=/^[^a-zA-Z]/.test(this.id())?"dimensions-"+this.id():this.id()+"-dimensions",this.addClass(n),lt(this.styleEl_,"\n      ."+n+" {\n        width: "+e+"px;\n        height: "+t+"px;\n      }\n\n      ."+n+".vjs-fluid:not(.vjs-audio-only-mode) {\n        padding-top: "+100*i+"%;\n      }\n    ")}else{var o="number"===typeof this.width_?this.width_:this.options_.width,s="number"===typeof this.height_?this.height_:this.options_.height,u=this.tech_&&this.tech_.el();u&&(o>=0&&(u.width=o),s>=0&&(u.height=s))}},n.loadTech_=function(e,t){var n=this;this.tech_&&this.unloadTech_();var r=qt(e),i=e.charAt(0).toLowerCase()+e.slice(1);"Html5"!==r&&this.tag&&(Rn.getTech("Html5").disposeMediaElement(this.tag),this.tag.player=null,this.tag=null),this.techName_=r,this.isReady_=!1;var a=this.autoplay();("string"===typeof this.autoplay()||!0===this.autoplay()&&this.options_.normalizeAutoplay)&&(a=!1);var o={source:t,autoplay:a,nativeControlsForTouch:this.options_.nativeControlsForTouch,playerId:this.id(),techId:this.id()+"_"+i+"_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};Mn.names.forEach((function(e){var t=Mn[e];o[t.getterName]=n[t.privateName]})),J(o,this.options_[r]),J(o,this.options_[i]),J(o,this.options_[e.toLowerCase()]),this.tag&&(o.tag=this.tag),t&&t.src===this.cache_.src&&this.cache_.currentTime>0&&(o.startTime=this.cache_.currentTime);var s=Rn.getTech(e);if(!s)throw new Error("No Tech named '"+r+"' exists! '"+r+"' should be registered using videojs.registerTech()'");this.tech_=new s(o),this.tech_.ready(Ct(this,this.handleTechReady_),!0),an(this.textTracksJson_||[],this.tech_),Ii.forEach((function(e){n.on(n.tech_,e,(function(t){return n["handleTech"+qt(e)+"_"](t)}))})),Object.keys(Oi).forEach((function(e){n.on(n.tech_,e,(function(t){0===n.tech_.playbackRate()&&n.tech_.seeking()?n.queuedCallbacks_.push({callback:n["handleTech"+Oi[e]+"_"].bind(n),event:t}):n["handleTech"+Oi[e]+"_"](t)}))})),this.on(this.tech_,"loadstart",(function(e){return n.handleTechLoadStart_(e)})),this.on(this.tech_,"sourceset",(function(e){return n.handleTechSourceset_(e)})),this.on(this.tech_,"waiting",(function(e){return n.handleTechWaiting_(e)})),this.on(this.tech_,"ended",(function(e){return n.handleTechEnded_(e)})),this.on(this.tech_,"seeking",(function(e){return n.handleTechSeeking_(e)})),this.on(this.tech_,"play",(function(e){return n.handleTechPlay_(e)})),this.on(this.tech_,"firstplay",(function(e){return n.handleTechFirstPlay_(e)})),this.on(this.tech_,"pause",(function(e){return n.handleTechPause_(e)})),this.on(this.tech_,"durationchange",(function(e){return n.handleTechDurationChange_(e)})),this.on(this.tech_,"fullscreenchange",(function(e,t){return n.handleTechFullscreenChange_(e,t)})),this.on(this.tech_,"fullscreenerror",(function(e,t){return n.handleTechFullscreenError_(e,t)})),this.on(this.tech_,"enterpictureinpicture",(function(e){return n.handleTechEnterPictureInPicture_(e)})),this.on(this.tech_,"leavepictureinpicture",(function(e){return n.handleTechLeavePictureInPicture_(e)})),this.on(this.tech_,"error",(function(e){return n.handleTechError_(e)})),this.on(this.tech_,"posterchange",(function(e){return n.handleTechPosterChange_(e)})),this.on(this.tech_,"textdata",(function(e){return n.handleTechTextData_(e)})),this.on(this.tech_,"ratechange",(function(e){return n.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"===r&&this.tag||Le(this.tech_.el(),this.el()),this.tag&&(this.tag.player=null,this.tag=null)},n.unloadTech_=function(){var e=this;Mn.names.forEach((function(t){var n=Mn[t];e[n.privateName]=e[n.getterName]()})),this.textTracksJson_=rn(this.tech_),this.isReady_=!1,this.tech_.dispose(),this.tech_=!1,this.isPosterFromTech_&&(this.poster_="",this.trigger("posterchange")),this.isPosterFromTech_=!1},n.tech=function(e){return void 0===e&&X.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_},n.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_)},n.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_)},n.handleTechReady_=function(){this.triggerReady(),this.cache_.volume&&this.techCall_("setVolume",this.cache_.volume),this.handleTechPosterChange_(),this.handleTechDurationChange_()},n.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())},n.manualAutoplay_=function(e){var t=this;if(this.tech_&&"string"===typeof e){var n,r=function(){var e=t.muted();t.muted(!0);var n=function(){t.muted(e)};t.playTerminatedQueue_.push(n);var r=t.play();if(en(r))return r.catch((function(e){throw n(),new Error("Rejection at manualAutoplay. Restoring muted value. "+(e||""))}))};if("any"!==e||this.muted()?n="muted"!==e||this.muted()?this.play():r():en(n=this.play())&&(n=n.catch(r)),en(n))return n.then((function(){t.trigger({type:"autoplay-success",autoplay:e})})).catch((function(){t.trigger({type:"autoplay-failure",autoplay:e})}))}},n.updateSourceCaches_=function(e){void 0===e&&(e="");var t=e,n="";"string"!==typeof t&&(t=e.src,n=e.type),this.cache_.source=this.cache_.source||{},this.cache_.sources=this.cache_.sources||[],t&&!n&&(n=function(e,t){if(!t)return"";if(e.cache_.source.src===t&&e.cache_.source.type)return e.cache_.source.type;var n=e.cache_.sources.filter((function(e){return e.src===t}));if(n.length)return n[0].type;for(var r=e.$$("source"),i=0;i<r.length;i++){var a=r[i];if(a.type&&a.src&&a.src===t)return a.type}return Kn(t)}(this,t)),this.cache_.source=Ht({},e,{src:t,type:n});for(var r=this.cache_.sources.filter((function(e){return e.src&&e.src===t})),i=[],a=this.$$("source"),o=[],s=0;s<a.length;s++){var u=Be(a[s]);i.push(u),u.src&&u.src===t&&o.push(u.src)}o.length&&!r.length?this.cache_.sources=i:r.length||(this.cache_.sources=[this.cache_.source]),this.cache_.src=t},n.handleTechSourceset_=function(e){var t=this;if(!this.changingSrc_){var n=function(e){return t.updateSourceCaches_(e)},r=this.currentSource().src,i=e.src;r&&!/^blob:/.test(r)&&/^blob:/.test(i)&&(!this.lastSource_||this.lastSource_.tech!==i&&this.lastSource_.player!==r)&&(n=function(){}),n(i),e.src||this.tech_.any(["sourceset","loadstart"],(function(e){if("sourceset"!==e.type){var n=t.techGet("currentSrc");t.lastSource_.tech=n,t.updateSourceCaches_(n)}}))}this.lastSource_={player:this.currentSource().src,tech:e.src},this.trigger({src:e.src,type:"sourceset"})},n.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"))},n.handleTechPlay_=function(){this.removeClass("vjs-ended"),this.removeClass("vjs-paused"),this.addClass("vjs-playing"),this.hasStarted(!0),this.trigger("play")},n.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")},n.handleTechWaiting_=function(){var e=this;this.addClass("vjs-waiting"),this.trigger("waiting");var t=this.currentTime();this.on("timeupdate",(function n(){t!==e.currentTime()&&(e.removeClass("vjs-waiting"),e.off("timeupdate",n))}))},n.handleTechCanPlay_=function(){this.removeClass("vjs-waiting"),this.trigger("canplay")},n.handleTechCanPlayThrough_=function(){this.removeClass("vjs-waiting"),this.trigger("canplaythrough")},n.handleTechPlaying_=function(){this.removeClass("vjs-waiting"),this.trigger("playing")},n.handleTechSeeking_=function(){this.addClass("vjs-seeking"),this.trigger("seeking")},n.handleTechSeeked_=function(){this.removeClass("vjs-seeking"),this.removeClass("vjs-ended"),this.trigger("seeked")},n.handleTechFirstPlay_=function(){this.options_.starttime&&(X.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")},n.handleTechPause_=function(){this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.trigger("pause")},n.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")},n.handleTechDurationChange_=function(){this.duration(this.techGet_("duration"))},n.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()?tn(this.play()):this.pause()))},n.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()))},n.handleTechTap_=function(){this.userActive(!this.userActive())},n.handleTechTouchStart_=function(){this.userWasActive=this.userActive()},n.handleTechTouchMove_=function(){this.userWasActive&&this.reportUserActivity()},n.handleTechTouchEnd_=function(e){e.cancelable&&e.preventDefault()},n.handleStageClick_=function(){this.reportUserActivity()},n.toggleFullscreenClass_=function(){this.isFullscreen()?this.addClass("vjs-fullscreen"):this.removeClass("vjs-fullscreen")},n.documentFullscreenChange_=function(e){var t=e.target.player;if(!t||t===this){var n=this.el(),r=s.a[this.fsApi_.fullscreenElement]===n;!r&&n.matches?r=n.matches(":"+this.fsApi_.fullscreen):!r&&n.msMatchesSelector&&(r=n.msMatchesSelector(":"+this.fsApi_.fullscreen)),this.isFullscreen(r)}},n.handleTechFullscreenChange_=function(e,t){var n=this;t&&(t.nativeIOSFullscreen&&(this.addClass("vjs-ios-native-fs"),this.tech_.one("webkitendfullscreen",(function(){n.removeClass("vjs-ios-native-fs")}))),this.isFullscreen(t.isFullscreen))},n.handleTechFullscreenError_=function(e,t){this.trigger("fullscreenerror",t)},n.togglePictureInPictureClass_=function(){this.isInPictureInPicture()?this.addClass("vjs-picture-in-picture"):this.removeClass("vjs-picture-in-picture")},n.handleTechEnterPictureInPicture_=function(e){this.isInPictureInPicture(!0)},n.handleTechLeavePictureInPicture_=function(e){this.isInPictureInPicture(!1)},n.handleTechError_=function(){var e=this.tech_.error();this.error(e)},n.handleTechTextData_=function(){var e=null;arguments.length>1&&(e=arguments[1]),this.trigger("textdata",e)},n.getCache=function(){return this.cache_},n.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}},n.techCall_=function(e,t){this.ready((function(){if(e in Hn)return function(e,t,n,r){return t[n](e.reduce(Wn(n),r))}(this.middleware_,this.tech_,e,t);if(e in zn)return Fn(this.middleware_,this.tech_,e,t);try{this.tech_&&this.tech_[e](t)}catch(n){throw X(n),n}}),!0)},n.techGet_=function(e){if(this.tech_&&this.tech_.isReady_){if(e in qn)return function(e,t,n){return e.reduceRight(Wn(n),t[n]())}(this.middleware_,this.tech_,e);if(e in zn)return Fn(this.middleware_,this.tech_,e);try{return this.tech_[e]()}catch(t){if(void 0===this.tech_[e])throw X("Video.js: "+e+" method not defined for "+this.techName_+" playback technology.",t),t;if("TypeError"===t.name)throw X("Video.js: "+e+" unavailable on "+this.techName_+" playback technology element.",t),this.tech_.isReady_=!1,t;throw X(t),t}}},n.play=function(){var e=this,t=this.options_.Promise||a.a.Promise;return t?new t((function(t){e.play_(t)})):this.play_()},n.play_=function(e){var t=this;void 0===e&&(e=tn),this.playCallbacks_.push(e);var n=Boolean(!this.changingSrc_&&(this.src()||this.currentSrc())),r=Boolean(Se||Te);if(this.waitToPlay_&&(this.off(["ready","loadstart"],this.waitToPlay_),this.waitToPlay_=null),!this.isReady_||!n)return this.waitToPlay_=function(e){t.play_()},this.one(["ready","loadstart"],this.waitToPlay_),void(!n&&r&&this.load());var i=this.techGet_("play");r&&this.hasClass("vjs-ended")&&this.resetProgressBar_(),null===i?this.runPlayTerminatedQueue_():this.runPlayCallbacks_(i)},n.runPlayTerminatedQueue_=function(){var e=this.playTerminatedQueue_.slice(0);this.playTerminatedQueue_=[],e.forEach((function(e){e()}))},n.runPlayCallbacks_=function(e){var t=this.playCallbacks_.slice(0);this.playCallbacks_=[],this.playTerminatedQueue_=[],t.forEach((function(t){t(e)}))},n.pause=function(){this.techCall_("pause")},n.paused=function(){return!1!==this.techGet_("paused")},n.played=function(){return this.techGet_("played")||Qt(0,0)},n.scrubbing=function(e){if("undefined"===typeof e)return this.scrubbing_;this.scrubbing_=!!e,this.techCall_("setScrubbing",this.scrubbing_),e?this.addClass("vjs-scrubbing"):this.removeClass("vjs-scrubbing")},n.currentTime=function(e){return"undefined"!==typeof e?(e<0&&(e=0),this.isReady_&&!this.changingSrc_&&this.tech_&&this.tech_.isReady_?(this.techCall_("setCurrentTime",e),void(this.cache_.initTime=0)):(this.cache_.initTime=e,this.off("canplay",this.boundApplyInitTime_),void this.one("canplay",this.boundApplyInitTime_))):(this.cache_.currentTime=this.techGet_("currentTime")||0,this.cache_.currentTime)},n.applyInitTime_=function(){this.currentTime(this.cache_.initTime)},n.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"))},n.remainingTime=function(){return this.duration()-this.currentTime()},n.remainingTimeDisplay=function(){return Math.floor(this.duration())-Math.floor(this.currentTime())},n.buffered=function(){var e=this.techGet_("buffered");return e&&e.length||(e=Qt(0,0)),e},n.bufferedPercent=function(){return $t(this.buffered(),this.duration())},n.bufferedEnd=function(){var e=this.buffered(),t=this.duration(),n=e.end(e.length-1);return n>t&&(n=t),n},n.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)},n.muted=function(e){if(void 0===e)return this.techGet_("muted")||!1;this.techCall_("setMuted",e)},n.defaultMuted=function(e){return void 0!==e?this.techCall_("setDefaultMuted",e):this.techGet_("defaultMuted")||!1},n.lastVolume_=function(e){if(void 0===e||0===e)return this.cache_.lastVolume;this.cache_.lastVolume=e},n.supportsFullScreen=function(){return this.techGet_("supportsFullScreen")||!1},n.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_},n.requestFullscreen=function(e){var t=this.options_.Promise||a.a.Promise;if(t){var n=this;return new t((function(t,r){function i(){n.off("fullscreenerror",o),n.off("fullscreenchange",a)}function a(){i(),t()}function o(e,t){i(),r(t)}n.one("fullscreenchange",a),n.one("fullscreenerror",o);var s=n.requestFullscreenHelper_(e);s&&(s.then(i,i),s.then(t,r))}))}return this.requestFullscreenHelper_()},n.requestFullscreenHelper_=function(e){var t,n=this;if(this.fsApi_.prefixed||(t=this.options_.fullscreen&&this.options_.fullscreen.options||{},void 0!==e&&(t=e)),this.fsApi_.requestFullscreen){var r=this.el_[this.fsApi_.requestFullscreen](t);return r&&r.then((function(){return n.isFullscreen(!0)}),(function(){return n.isFullscreen(!1)})),r}this.tech_.supportsFullScreen()&&!0===!this.options_.preferFullWindow?this.techCall_("enterFullScreen"):this.enterFullWindow()},n.exitFullscreen=function(){var e=this.options_.Promise||a.a.Promise;if(e){var t=this;return new e((function(e,n){function r(){t.off("fullscreenerror",a),t.off("fullscreenchange",i)}function i(){r(),e()}function a(e,t){r(),n(t)}t.one("fullscreenchange",i),t.one("fullscreenerror",a);var o=t.exitFullscreenHelper_();o&&(o.then(r,r),o.then(e,n))}))}return this.exitFullscreenHelper_()},n.exitFullscreenHelper_=function(){var e=this;if(this.fsApi_.requestFullscreen){var t=s.a[this.fsApi_.exitFullscreen]();return t&&tn(t.then((function(){return e.isFullscreen(!1)}))),t}this.tech_.supportsFullScreen()&&!0===!this.options_.preferFullWindow?this.techCall_("exitFullScreen"):this.exitFullWindow()},n.enterFullWindow=function(){this.isFullscreen(!0),this.isFullWindow=!0,this.docOrigOverflow=s.a.documentElement.style.overflow,yt(s.a,"keydown",this.boundFullWindowOnEscKey_),s.a.documentElement.style.overflow="hidden",Me(s.a.body,"vjs-full-window"),this.trigger("enterFullWindow")},n.fullWindowOnEscKey=function(e){d.a.isEventKey(e,"Esc")&&!0===this.isFullscreen()&&(this.isFullWindow?this.exitFullWindow():this.exitFullscreen())},n.exitFullWindow=function(){this.isFullscreen(!1),this.isFullWindow=!1,bt(s.a,"keydown",this.boundFullWindowOnEscKey_),s.a.documentElement.style.overflow=this.docOrigOverflow,Re(s.a.body,"vjs-full-window"),this.trigger("exitFullWindow")},n.disablePictureInPicture=function(e){if(void 0===e)return this.techGet_("disablePictureInPicture");this.techCall_("setDisablePictureInPicture",e),this.options_.disablePictureInPicture=e,this.trigger("disablepictureinpicturechanged")},n.isInPictureInPicture=function(e){return void 0!==e?(this.isInPictureInPicture_=!!e,void this.togglePictureInPictureClass_()):!!this.isInPictureInPicture_},n.requestPictureInPicture=function(){if("pictureInPictureEnabled"in s.a&&!1===this.disablePictureInPicture())return this.techGet_("requestPictureInPicture")},n.exitPictureInPicture=function(){if("pictureInPictureEnabled"in s.a)return s.a.exitPictureInPicture()},n.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))}},n.handleHotkeys=function(e){var t=this.options_.userActions?this.options_.userActions.hotkeys:{},n=t.fullscreenKey,r=void 0===n?function(e){return d.a.isEventKey(e,"f")}:n,i=t.muteKey,a=void 0===i?function(e){return d.a.isEventKey(e,"m")}:i,o=t.playPauseKey,u=void 0===o?function(e){return d.a.isEventKey(e,"k")||d.a.isEventKey(e,"Space")}:o;if(r.call(this,e)){e.preventDefault(),e.stopPropagation();var l=Gt.getComponent("FullscreenToggle");!1!==s.a[this.fsApi_.fullscreenEnabled]&&l.prototype.handleClick.call(this,e)}else if(a.call(this,e)){e.preventDefault(),e.stopPropagation(),Gt.getComponent("MuteToggle").prototype.handleClick.call(this,e)}else if(u.call(this,e)){e.preventDefault(),e.stopPropagation(),Gt.getComponent("PlayToggle").prototype.handleClick.call(this,e)}},n.canPlayType=function(e){for(var t,n=0,r=this.options_.techOrder;n<r.length;n++){var i=r[n],a=Rn.getTech(i);if(a||(a=Gt.getComponent(i)),a){if(a.isSupported()&&(t=a.canPlayType(e)))return t}else X.error('The "'+i+'" tech is undefined. Skipped browser support check for that tech.')}return""},n.selectSource=function(e){var t,n=this,r=this.options_.techOrder.map((function(e){return[e,Rn.getTech(e)]})).filter((function(e){var t=e[0],n=e[1];return n?n.isSupported():(X.error('The "'+t+'" tech is undefined. Skipped browser support check for that tech.'),!1)})),i=function(e,t,n){var r;return e.some((function(e){return t.some((function(t){if(r=n(e,t))return!0}))})),r},a=function(e,t){var r=e[0];if(e[1].canPlaySource(t,n.options_[r.toLowerCase()]))return{source:t,tech:r}};return(this.options_.sourceOrder?i(e,r,(t=a,function(e,n){return t(n,e)})):i(r,e,a))||!1},n.handleSrc_=function(e,t){var n=this;if("undefined"===typeof e)return this.cache_.src||"";this.resetRetryOnError_&&this.resetRetryOnError_();var r=function e(t){if(Array.isArray(t)){var n=[];t.forEach((function(t){t=e(t),Array.isArray(t)?n=n.concat(t):ee(t)&&n.push(t)})),t=n}else t="string"===typeof t&&t.trim()?[Gn({src:t})]:ee(t)&&"string"===typeof t.src&&t.src&&t.src.trim()?[Gn(t)]:[];return t}(e);if(r.length){if(this.changingSrc_=!0,t||(this.cache_.sources=r),this.updateSourceCaches_(r[0]),Un(this,r[0],(function(e,i){var a,o;if(n.middleware_=i,t||(n.cache_.sources=r),n.updateSourceCaches_(e),n.src_(e))return r.length>1?n.handleSrc_(r.slice(1)):(n.changingSrc_=!1,n.setTimeout((function(){this.error({code:4,message:this.options_.notSupportedMessage})}),0),void n.triggerReady());a=i,o=n.tech_,a.forEach((function(e){return e.setTech&&e.setTech(o)}))})),this.options_.retryOnError&&r.length>1){var i=function(){n.error(null),n.handleSrc_(r.slice(1),!0)},a=function(){n.off("error",i)};this.one("error",i),this.one("playing",a),this.resetRetryOnError_=function(){n.off("error",i),n.off("playing",a)}}}else this.setTimeout((function(){this.error({code:4,message:this.options_.notSupportedMessage})}),0)},n.src=function(e){return this.handleSrc_(e,!1)},n.src_=function(e){var t,n,r=this,i=this.selectSource([e]);return!i||(t=i.tech,n=this.techName_,qt(t)!==qt(n)?(this.changingSrc_=!0,this.loadTech_(i.tech,i.source),this.tech_.ready((function(){r.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))},n.load=function(){this.techCall_("load")},n.reset=function(){var e=this,t=this.options_.Promise||a.a.Promise;this.paused()||!t?this.doReset_():tn(this.play().then((function(){return e.doReset_()})))},n.doReset_=function(){this.tech_&&this.tech_.clearTracks("text"),this.resetCache_(),this.poster(""),this.loadTech_(this.options_.techOrder[0],null),this.techCall_("reset"),this.resetControlBarUI_(),Pt(this)&&this.trigger("playerreset")},n.resetControlBarUI_=function(){this.resetProgressBar_(),this.resetPlaybackRate_(),this.resetVolumeBar_()},n.resetProgressBar_=function(){this.currentTime(0);var e=this.controlBar||{},t=e.durationDisplay,n=e.remainingTimeDisplay;t&&t.updateContent(),n&&n.updateContent()},n.resetPlaybackRate_=function(){this.playbackRate(this.defaultPlaybackRate()),this.handleTechRateChange_()},n.resetVolumeBar_=function(){this.volume(1),this.trigger("volumechange")},n.currentSources=function(){var e=this.currentSource(),t=[];return 0!==Object.keys(e).length&&t.push(e),this.cache_.sources||t},n.currentSource=function(){return this.cache_.source||{}},n.currentSrc=function(){return this.currentSource()&&this.currentSource().src||""},n.currentType=function(){return this.currentSource()&&this.currentSource().type||""},n.preload=function(e){return void 0!==e?(this.techCall_("setPreload",e),void(this.options_.preload=e)):this.techGet_("preload")},n.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="undefined"===typeof t?this.options_.autoplay:t,this.tech_&&this.techCall_("setAutoplay",t)},n.playsinline=function(e){return void 0!==e?(this.techCall_("setPlaysinline",e),this.options_.playsinline=e,this):this.techGet_("playsinline")},n.loop=function(e){return void 0!==e?(this.techCall_("setLoop",e),void(this.options_.loop=e)):this.techGet_("loop")},n.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"))},n.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"))}},n.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_()))},n.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")))},n.error=function(e){var t=this;if(void 0===e)return this.error_||null;if(F("beforeerror").forEach((function(n){var r=n(t,e);ee(r)&&!Array.isArray(r)||"string"===typeof r||"number"===typeof r||null===r?e=r:t.log.error("please return a value that MediaError expects in beforeerror hooks")})),this.options_.suppressNotSupportedError&&e&&4===e.code){var n=function(){this.error(e)};return this.options_.suppressNotSupportedError=!1,this.any(["click","touchstart"],n),void this.one("loadstart",(function(){this.off(["click","touchstart"],n)}))}if(null===e)return this.error_=e,this.removeClass("vjs-error"),void(this.errorDisplay&&this.errorDisplay.close());this.error_=new Zt(e),this.addClass("vjs-error"),X.error("(CODE:"+this.error_.code+" "+Zt.errorTypes[this.error_.code]+")",this.error_.message,this.error_),this.trigger("error"),F("error").forEach((function(e){return e(t,t.error_)}))},n.reportUserActivity=function(e){this.userActivity_=!0},n.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")}},n.listenForUserActivity_=function(){var e,t,n,r=Ct(this,this.reportUserActivity),i=function(t){r(),this.clearInterval(e)};this.on("mousedown",(function(){r(),this.clearInterval(e),e=this.setInterval(r,250)})),this.on("mousemove",(function(e){e.screenX===t&&e.screenY===n||(t=e.screenX,n=e.screenY,r())})),this.on("mouseup",i),this.on("mouseleave",i);var a,o=this.getChild("controlBar");!o||Te||ue||(o.on("mouseenter",(function(e){0!==this.player().options_.inactivityTimeout&&(this.player().cache_.inactivityTimeout=this.player().options_.inactivityTimeout),this.player().options_.inactivityTimeout=0})),o.on("mouseleave",(function(e){this.player().options_.inactivityTimeout=this.player().cache_.inactivityTimeout}))),this.on("keydown",r),this.on("keyup",r),this.setInterval((function(){if(this.userActivity_){this.userActivity_=!1,this.userActive(!0),this.clearTimeout(a);var e=this.options_.inactivityTimeout;e<=0||(a=this.setTimeout((function(){this.userActivity_||this.userActive(!1)}),e))}}),250)},n.playbackRate=function(e){if(void 0===e)return this.tech_&&this.tech_.featuresPlaybackRate?this.cache_.lastPlaybackRate||this.techGet_("playbackRate"):1;this.techCall_("setPlaybackRate",e)},n.defaultPlaybackRate=function(e){return void 0!==e?this.techCall_("setDefaultPlaybackRate",e):this.tech_&&this.tech_.featuresPlaybackRate?this.techGet_("defaultPlaybackRate"):1},n.isAudio=function(e){if(void 0===e)return!!this.isAudio_;this.isAudio_=!!e},n.enableAudioOnlyUI_=function(){var e=this;this.addClass("vjs-audio-only-mode");var t=this.children(),n=this.getChild("ControlBar"),r=n&&n.currentHeight();t.forEach((function(t){t!==n&&t.el_&&!t.hasClass("vjs-hidden")&&(t.hide(),e.audioOnlyCache_.hiddenChildren.push(t))})),this.audioOnlyCache_.playerHeight=this.currentHeight(),this.height(r),this.trigger("audioonlymodechange")},n.disableAudioOnlyUI_=function(){this.removeClass("vjs-audio-only-mode"),this.audioOnlyCache_.hiddenChildren.forEach((function(e){return e.show()})),this.height(this.audioOnlyCache_.playerHeight),this.trigger("audioonlymodechange")},n.audioOnlyMode=function(e){var t=this;if("boolean"!==typeof e||e===this.audioOnlyMode_)return this.audioOnlyMode_;this.audioOnlyMode_=e;var n=this.options_.Promise||a.a.Promise;if(n){if(e){var r=[];return this.isInPictureInPicture()&&r.push(this.exitPictureInPicture()),this.isFullscreen()&&r.push(this.exitFullscreen()),this.audioPosterMode()&&r.push(this.audioPosterMode(!1)),n.all(r).then((function(){return t.enableAudioOnlyUI_()}))}return n.resolve().then((function(){return t.disableAudioOnlyUI_()}))}e?(this.isInPictureInPicture()&&this.exitPictureInPicture(),this.isFullscreen()&&this.exitFullscreen(),this.enableAudioOnlyUI_()):this.disableAudioOnlyUI_()},n.enablePosterModeUI_=function(){(this.tech_&&this.tech_).hide(),this.addClass("vjs-audio-poster-mode"),this.trigger("audiopostermodechange")},n.disablePosterModeUI_=function(){(this.tech_&&this.tech_).show(),this.removeClass("vjs-audio-poster-mode"),this.trigger("audiopostermodechange")},n.audioPosterMode=function(e){var t=this;if("boolean"!==typeof e||e===this.audioPosterMode_)return this.audioPosterMode_;this.audioPosterMode_=e;var n=this.options_.Promise||a.a.Promise;return n?e?this.audioOnlyMode()?this.audioOnlyMode(!1).then((function(){t.enablePosterModeUI_()})):n.resolve().then((function(){t.enablePosterModeUI_()})):n.resolve().then((function(){t.disablePosterModeUI_()})):e?(this.audioOnlyMode()&&this.audioOnlyMode(!1),void this.enablePosterModeUI_()):void this.disablePosterModeUI_()},n.addTextTrack=function(e,t,n){if(this.tech_)return this.tech_.addTextTrack(e,t,n)},n.addRemoteTextTrack=function(e,t){if(this.tech_)return this.tech_.addRemoteTextTrack(e,t)},n.removeRemoteTextTrack=function(e){void 0===e&&(e={});var t=e.track;if(t||(t=e),this.tech_)return this.tech_.removeRemoteTextTrack(t)},n.getVideoPlaybackQuality=function(){return this.techGet_("getVideoPlaybackQuality")},n.videoWidth=function(){return this.tech_&&this.tech_.videoWidth&&this.tech_.videoWidth()||0},n.videoHeight=function(){return this.tech_&&this.tech_.videoHeight&&this.tech_.videoHeight()||0},n.language=function(e){if(void 0===e)return this.language_;this.language_!==String(e).toLowerCase()&&(this.language_=String(e).toLowerCase(),Pt(this)&&this.trigger("languagechange"))},n.languages=function(){return Ht(t.prototype.options_.languages,this.languages_)},n.toJSON=function(){var e=Ht(this.options_),t=e.tracks;e.tracks=[];for(var n=0;n<t.length;n++){var r=t[n];(r=Ht(r)).player=void 0,e.tracks[n]=r}return e},n.createModal=function(e,t){var n=this;(t=t||{}).content=e||"";var r=new on(this,t);return this.addChild(r),r.on("dispose",(function(){n.removeChild(r)})),r.open(),r},n.updateCurrentBreakpoint_=function(){if(this.responsive())for(var e=this.currentBreakpoint(),t=this.currentWidth(),n=0;n<Li.length;n++){var r=Li[n];if(t<=this.breakpoints_[r]){if(e===r)return;e&&this.removeClass(Di[e]),this.addClass(Di[r]),this.breakpoint_=r;break}}},n.removeCurrentBreakpoint_=function(){var e=this.currentBreakpointClass();this.breakpoint_="",e&&this.removeClass(e)},n.breakpoints=function(e){return void 0===e||(this.breakpoint_="",this.breakpoints_=J({},Mi,e),this.updateCurrentBreakpoint_()),J(this.breakpoints_)},n.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},n.currentBreakpoint=function(){return this.breakpoint_},n.currentBreakpointClass=function(){return Di[this.breakpoint_]||""},n.loadMedia=function(e,t){var n=this;if(e&&"object"===typeof e){this.reset(),this.cache_.media=Ht(e);var r=this.cache_.media,i=r.artwork,a=r.poster,o=r.src,s=r.textTracks;!i&&a&&(this.cache_.media.artwork=[{src:a,type:Kn(a)}]),o&&this.src(o),a&&this.poster(a),Array.isArray(s)&&s.forEach((function(e){return n.addRemoteTextTrack(e,!1)})),this.ready(t)}},n.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:Kn(t.poster)}]),t}return Ht(this.cache_.media)},t.getTagSettings=function(e){var t={sources:[],tracks:[]},n=Be(e),r=n["data-setup"];if(De(e,"vjs-fill")&&(n.fill=!0),De(e,"vjs-fluid")&&(n.fluid=!0),null!==r){var i=v()(r||"{}"),a=i[0],o=i[1];a&&X.error(a),J(n,o)}if(J(t,n),e.hasChildNodes())for(var s=e.childNodes,u=0,l=s.length;u<l;u++){var c=s[u],d=c.nodeName.toLowerCase();"source"===d?t.sources.push(Be(c)):"track"===d&&t.tracks.push(Be(c))}return t},n.flexNotSupported_=function(){var e=s.a.createElement("i");return!("flexBasis"in e.style||"webkitFlexBasis"in e.style||"mozFlexBasis"in e.style||"msFlexBasis"in e.style||"msFlexOrder"in e.style)},n.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)},n.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}(Gt);Mn.names.forEach((function(e){var t=Mn[e];Ri.prototype[t.getterName]=function(){return this.tech_?this.tech_[t.getterName]():(this[t.privateName]=this[t.privateName]||new t.ListClass,this[t.privateName])}})),Ri.prototype.crossorigin=Ri.prototype.crossOrigin,Ri.players={};var Ni=a.a.navigator;Ri.prototype.options_={techOrder:Rn.defaultTechOrder_,html5:{},inactivityTimeout:2e3,playbackRates:[],liveui:!1,children:["mediaLoader","posterImage","textTrackDisplay","loadingSpinner","bigPlayButton","liveTracker","controlBar","errorDisplay","textTrackSettings","resizeManager"],language:Ni&&(Ni.languages&&Ni.languages[0]||Ni.userLanguage||Ni.language)||"en",languages:{},notSupportedMessage:"No compatible source was found for this media.",normalizeAutoplay:!1,fullscreen:{options:{navigationUI:"hide"}},breakpoints:{},responsive:!1,audioOnlyMode:!1,audioPosterMode:!1},["ended","seeking","seekable","networkState","readyState"].forEach((function(e){Ri.prototype[e]=function(){return this.techGet_(e)}})),Ii.forEach((function(e){Ri.prototype["handleTech"+qt(e)+"_"]=function(){return this.trigger(e)}})),Gt.registerComponent("Player",Ri);var ji={},Bi=function(e){return ji.hasOwnProperty(e)},Ui=function(e){return Bi(e)?ji[e]:void 0},Fi=function(e,t){e.activePlugins_=e.activePlugins_||{},e.activePlugins_[t]=!0},qi=function(e,t,n){var r=(n?"before":"")+"pluginsetup";e.trigger(r,t),e.trigger(r+":"+t.name,t)},Hi=function(e,t){return t.prototype.name=e,function(){qi(this,{name:e,plugin:t,instance:null},!0);for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];var a=w()(t,[this].concat(r));return this[e]=function(){return a},qi(this,a.getEventHash()),a}},zi=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)),jt(this),delete this.trigger,Ut(this,this.constructor.defaultState),Fi(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={}),_t(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]=Hi(e,ji[e])},e.isBasic=function(t){var n="string"===typeof t?Ui(t):t;return"function"===typeof n&&!e.prototype.isPrototypeOf(n.prototype)},e.registerPlugin=function(t,n){if("string"!==typeof t)throw new Error('Illegal plugin name, "'+t+'", must be a string, was '+typeof t+".");if(Bi(t))X.warn('A plugin named "'+t+'" already exists. You may want to avoid re-registering plugins!');else if(Ri.prototype.hasOwnProperty(t))throw new Error('Illegal plugin name, "'+t+'", cannot share a name with an existing player method!');if("function"!==typeof n)throw new Error('Illegal plugin for "'+t+'", must be a function, was '+typeof n+".");return ji[t]=n,"plugin"!==t&&(e.isBasic(n)?Ri.prototype[t]=function(e,t){var n=function(){qi(this,{name:e,plugin:t,instance:null},!0);var n=t.apply(this,arguments);return Fi(this,e),qi(this,{name:e,plugin:t,instance:n}),n};return Object.keys(t).forEach((function(e){n[e]=t[e]})),n}(t,n):Ri.prototype[t]=Hi(t,n)),n},e.deregisterPlugin=function(e){if("plugin"===e)throw new Error("Cannot de-register base plugin.");Bi(e)&&(delete ji[e],delete Ri.prototype[e])},e.getPlugins=function(e){var t;return void 0===e&&(e=Object.keys(ji)),e.forEach((function(e){var n=Ui(e);n&&((t=t||{})[e]=n)})),t},e.getPluginVersion=function(e){var t=Ui(e);return t&&t.VERSION||""},e}();zi.getPlugin=Ui,zi.BASE_PLUGIN_NAME="plugin",zi.registerPlugin("plugin",zi),Ri.prototype.usingPlugin=function(e){return!!this.activePlugins_&&!0===this.activePlugins_[e]},Ri.prototype.hasPlugin=function(e){return!!Bi(e)};var Wi=!1,Vi=function(e){return 0===e.indexOf("#")?e.slice(1):e};function Ki(e,t,n){var r=Ki.getPlayer(e);if(r)return t&&X.warn('Player "'+e+'" is already initialised. Options will not be applied.'),n&&r.ready(n),r;var i="string"===typeof e?et("#"+Vi(e)):e;if(!Ae(i))throw new TypeError("The element or ID supplied is not valid. (videojs)");i.ownerDocument.defaultView&&i.ownerDocument.body.contains(i)||X.warn("The element supplied is not included in the DOM"),!0===(t=t||{}).restoreEl&&(t.restoreEl=(i.parentNode&&i.parentNode.hasAttribute("data-vjs-player")?i.parentNode:i).cloneNode(!0)),F("beforesetup").forEach((function(e){var n=e(i,Ht(t));ee(n)&&!Array.isArray(n)?t=Ht(t,n):X.error("please return an object in beforesetup hooks")}));var a=Gt.getComponent("Player");return r=new a(i,t,n),F("setup").forEach((function(e){return e(r)})),r}if(Ki.hooks_=U,Ki.hooks=F,Ki.hook=function(e,t){F(e,t)},Ki.hookOnce=function(e,t){F(e,[].concat(t).map((function(t){return function n(){return q(e,n),t.apply(void 0,arguments)}})))},Ki.removeHook=q,!0!==a.a.VIDEOJS_NO_DYNAMIC_STYLE&&Ee()){var Gi=et(".vjs-styles-defaults");if(!Gi){Gi=ut("vjs-styles-defaults");var Xi=et("head");Xi&&Xi.insertBefore(Gi,Xi.firstChild),lt(Gi,"\n      .video-js {\n        width: 300px;\n        height: 150px;\n      }\n\n      .vjs-fluid:not(.vjs-audio-only-mode) {\n        padding-top: 56.25%\n      }\n    ")}}at(1,Ki),Ki.VERSION="7.21.4",Ki.options=Ri.prototype.options_,Ki.getPlayers=function(){return Ri.players},Ki.getPlayer=function(e){var t,n=Ri.players;if("string"===typeof e){var r=Vi(e),i=n[r];if(i)return i;t=et("#"+r)}else t=e;if(Ae(t)){var a=t,o=a.player,s=a.playerId;if(o||n[s])return o||n[s]}},Ki.getAllPlayers=function(){return Object.keys(Ri.players).map((function(e){return Ri.players[e]})).filter(Boolean)},Ki.players=Ri.players,Ki.getComponent=Gt.getComponent,Ki.registerComponent=function(e,t){Rn.isTech(t)&&X.warn("The "+e+" tech was registered as a component. It should instead be registered using videojs.registerTech(name, tech)"),Gt.registerComponent.call(Gt,e,t)},Ki.getTech=Rn.getTech,Ki.registerTech=Rn.registerTech,Ki.use=function(e,t){Nn[e]=Nn[e]||[],Nn[e].push(t)},Object.defineProperty(Ki,"middleware",{value:{},writeable:!1,enumerable:!0}),Object.defineProperty(Ki.middleware,"TERMINATOR",{value:Bn,writeable:!1,enumerable:!0}),Ki.browser=we,Ki.TOUCH_ENABLED=ye,Ki.extend=function(e,t){void 0===t&&(t={}),Wi||(X.warn("videojs.extend is deprecated as of Video.js 7.22.0 and will be removed in Video.js 8.0.0"),Wi=!0);var n=function(){e.apply(this,arguments)},r={};for(var i in"object"===typeof t?(t.constructor!==Object.prototype.constructor&&(n=t.constructor),r=t):"function"===typeof t&&(n=t),C()(n,e),e&&(n.super_=e),r)r.hasOwnProperty(i)&&(n.prototype[i]=r[i]);return n},Ki.mergeOptions=Ht,Ki.bind=Ct,Ki.registerPlugin=zi.registerPlugin,Ki.deregisterPlugin=zi.deregisterPlugin,Ki.plugin=function(e,t){return X.warn("videojs.plugin() is deprecated; use videojs.registerPlugin() instead"),zi.registerPlugin(e,t)},Ki.getPlugins=zi.getPlugins,Ki.getPlugin=zi.getPlugin,Ki.getPluginVersion=zi.getPluginVersion,Ki.addLanguage=function(e,t){var n;return e=(""+e).toLowerCase(),Ki.options.languages=Ht(Ki.options.languages,((n={})[e]=t,n)),Ki.options.languages[e]},Ki.log=X,Ki.createLogger=Y,Ki.createTimeRange=Ki.createTimeRanges=Qt,Ki.formatTime=ur,Ki.setFormatTime=function(e){sr=e},Ki.resetFormatTime=function(){sr=or},Ki.parseUrl=Tn,Ki.isCrossOrigin=kn,Ki.EventTarget=At,Ki.on=yt,Ki.one=Tt,Ki.off=bt,Ki.trigger=_t,Ki.xhr=b.a,Ki.TextTrack=xn,Ki.AudioTrack=Pn,Ki.VideoTrack=In,["isEl","isTextNode","createEl","hasClass","addClass","removeClass","toggleClass","setAttributes","getAttributes","emptyEl","appendContent","insertContent"].forEach((function(e){Ki[e]=function(){return X.warn("videojs."+e+"() is deprecated; use videojs.dom."+e+"() instead"),nt[e].apply(null,arguments)}})),Ki.computedStyle=ne,Ki.dom=nt,Ki.url=Cn,Ki.defineLazyProperty=xi,Ki.addLanguage("en",{"Non-Fullscreen":"Exit Fullscreen"});var Yi=E.a,Qi=function(e,t,n){return e&&n&&n.responseURL&&t!==n.responseURL?n.responseURL:t},$i=function(e){return Ki.log.debug?Ki.log.debug.bind(Ki,"VHS:",e+" >"):function(){}},Zi=function(e,t){var n,r=[];if(e&&e.length)for(n=0;n<e.length;n++)t(e.start(n),e.end(n))&&r.push([e.start(n),e.end(n)]);return Ki.createTimeRanges(r)},Ji=function(e,t){return Zi(e,(function(e,n){return e-.1<=t&&n+.1>=t}))},ea=function(e,t){return Zi(e,(function(e){return e-1/30>=t}))},ta=function(e){var t=[];if(!e||!e.length)return"";for(var n=0;n<e.length;n++)t.push(e.start(n)+" => "+e.end(n));return t.join(", ")},na=function(e){for(var t=[],n=0;n<e.length;n++)t.push({start:e.start(n),end:e.end(n)});return t},ra=function(e){if(e&&e.length&&e.end)return e.end(e.length-1)},ia=function(e,t){var n=0;if(!e||!e.length)return n;for(var r=0;r<e.length;r++){var i=e.start(r),a=e.end(r);t>a||(n+=t>i&&t<=a?a-t:a-i)}return n},aa=Ki.createTimeRange,oa=function(e,t){if(!t.preload)return t.duration;var n=0;return(t.parts||[]).forEach((function(e){n+=e.duration})),(t.preloadHints||[]).forEach((function(t){"PART"===t.type&&(n+=e.partTargetDuration)})),n},sa=function(e){return(e.segments||[]).reduce((function(e,t,n){return t.parts?t.parts.forEach((function(r,i){e.push({duration:r.duration,segmentIndex:n,partIndex:i,part:r,segment:t})})):e.push({duration:t.duration,segmentIndex:n,partIndex:null,segment:t,part:null}),e}),[])},ua=function(e){var t=e.segments&&e.segments.length&&e.segments[e.segments.length-1];return t&&t.parts||[]},la=function(e){var t=e.preloadSegment;if(t){var n=t.parts,r=(t.preloadHints||[]).reduce((function(e,t){return e+("PART"===t.type?1:0)}),0);return r+=n&&n.length?n.length:0}},ca=function(e,t){if(t.endList)return 0;if(e&&e.suggestedPresentationDelay)return e.suggestedPresentationDelay;var n=ua(t).length>0;return n&&t.serverControl&&t.serverControl.partHoldBack?t.serverControl.partHoldBack:n&&t.partTargetDuration?3*t.partTargetDuration:t.serverControl&&t.serverControl.holdBack?t.serverControl.holdBack:t.targetDuration?3*t.targetDuration:0},da=function(e,t,n){if("undefined"===typeof t&&(t=e.mediaSequence+e.segments.length),t<e.mediaSequence)return 0;var r=function(e,t){var n=0,r=t-e.mediaSequence,i=e.segments[r];if(i){if("undefined"!==typeof i.start)return{result:i.start,precise:!0};if("undefined"!==typeof i.end)return{result:i.end-i.duration,precise:!0}}for(;r--;){if("undefined"!==typeof(i=e.segments[r]).end)return{result:n+i.end,precise:!0};if(n+=oa(e,i),"undefined"!==typeof i.start)return{result:n+i.start,precise:!0}}return{result:n,precise:!1}}(e,t);if(r.precise)return r.result;var i=function(e,t){for(var n,r=0,i=t-e.mediaSequence;i<e.segments.length;i++){if("undefined"!==typeof(n=e.segments[i]).start)return{result:n.start-r,precise:!0};if(r+=oa(e,n),"undefined"!==typeof n.end)return{result:n.end-r,precise:!0}}return{result:-1,precise:!1}}(e,t);return i.precise?i.result:r.result+n},ha=function(e,t,n){if(!e)return 0;if("number"!==typeof n&&(n=0),"undefined"===typeof t){if(e.totalDuration)return e.totalDuration;if(!e.endList)return a.a.Infinity}return da(e,t,n)},pa=function(e){var t=e.defaultDuration,n=e.durationList,r=e.startIndex,i=e.endIndex,a=0;if(r>i){var o=[i,r];r=o[0],i=o[1]}if(r<0){for(var s=r;s<Math.min(0,i);s++)a+=t;r=0}for(var u=r;u<i;u++)a+=n[u].duration;return a},fa=function(e,t,n,r){if(!e||!e.segments)return null;if(e.endList)return ha(e);if(null===t)return null;t=t||0;var i=da(e,e.mediaSequence+e.segments.length,t);return n&&(i-=r="number"===typeof r?r:ca(null,e)),Math.max(0,i)},ma=function(e){return e.excludeUntil&&e.excludeUntil>Date.now()},ga=function(e){return e.excludeUntil&&e.excludeUntil===1/0},va=function(e){var t=ma(e);return!e.disabled&&!t},ya=function(e,t){return t.attributes&&t.attributes[e]},ba=function(e,t){if(1===e.playlists.length)return!0;var n=t.attributes.BANDWIDTH||Number.MAX_VALUE;return 0===e.playlists.filter((function(e){return!!va(e)&&(e.attributes.BANDWIDTH||0)<n})).length},_a=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))))},Ta=function(e,t){var n=e&&e.mediaGroups&&e.mediaGroups.AUDIO||{},r=!1;for(var i in n){for(var a in n[i])if(r=t(n[i][a]))break;if(r)break}return!!r},Sa=function(e){if(!e||!e.playlists||!e.playlists.length)return Ta(e,(function(e){return e.playlists&&e.playlists.length||e.uri}));for(var t=function(t){var n=e.playlists[t],r=n.attributes&&n.attributes.CODECS;return r&&r.split(",").every((function(e){return Object(x.f)(e)}))||Ta(e,(function(e){return _a(n,e)}))?"continue":{v:!1}},n=0;n<e.playlists.length;n++){var r=t(n);if("continue"!==r&&"object"===typeof r)return r.v}return!0},wa={liveEdgeDelay:ca,duration:ha,seekable:function(e,t,n){var r=t||0,i=fa(e,t,!0,n);return null===i?aa():aa(r,i)},getMediaInfoForTime:function(e){for(var t=e.playlist,n=e.currentTime,r=e.startingSegmentIndex,i=e.startingPartIndex,a=e.startTime,o=e.experimentalExactManifestTimings,s=n-a,u=sa(t),l=0,c=0;c<u.length;c++){var d=u[c];if(r===d.segmentIndex&&("number"!==typeof i||"number"!==typeof d.partIndex||i===d.partIndex)){l=c;break}}if(s<0){if(l>0)for(var h=l-1;h>=0;h--){var p=u[h];if(s+=p.duration,o){if(s<0)continue}else if(s+1/30<=0)continue;return{partIndex:p.partIndex,segmentIndex:p.segmentIndex,startTime:a-pa({defaultDuration:t.targetDuration,durationList:u,startIndex:l,endIndex:h})}}return{partIndex:u[0]&&u[0].partIndex||null,segmentIndex:u[0]&&u[0].segmentIndex||0,startTime:n}}if(l<0){for(var f=l;f<0;f++)if((s-=t.targetDuration)<0)return{partIndex:u[0]&&u[0].partIndex||null,segmentIndex:u[0]&&u[0].segmentIndex||0,startTime:n};l=0}for(var m=l;m<u.length;m++){var g=u[m];if(s-=g.duration,o){if(s>0)continue}else if(s-1/30>=0)continue;return{partIndex:g.partIndex,segmentIndex:g.segmentIndex,startTime:a+pa({defaultDuration:t.targetDuration,durationList:u,startIndex:l,endIndex:m})}}return{segmentIndex:u[u.length-1].segmentIndex,partIndex:u[u.length-1].partIndex,startTime:n}},isEnabled:va,isDisabled:function(e){return e.disabled},isBlacklisted:ma,isIncompatible:ga,playlistEnd:fa,isAes:function(e){for(var t=0;t<e.segments.length;t++)if(e.segments[t].key)return!0;return!1},hasAttribute:ya,estimateSegmentRequestTime:function(e,t,n,r){return void 0===r&&(r=0),ya("BANDWIDTH",n)?(e*n.attributes.BANDWIDTH-8*r)/t:NaN},isLowestEnabledRendition:ba,isAudioOnly:Sa,playlistMatch:_a,segmentDurationWithParts:oa},ka=Ki.log,Ca=function(e,t){return e+"-"+t},Ea=function(e,t,n){return"placeholder-uri-"+e+"-"+t+"-"+n},Aa=function(e,t){e.mediaGroups&&["AUDIO","SUBTITLES"].forEach((function(n){if(e.mediaGroups[n])for(var r in e.mediaGroups[n])for(var i in e.mediaGroups[n][r]){var a=e.mediaGroups[n][r][i];t(a,n,r,i)}}))},xa=function(e){var t=e.playlist,n=e.uri,r=e.id;t.id=r,t.playlistErrors_=0,n&&(t.uri=n),t.attributes=t.attributes||{}},Pa=function(e,t,n){void 0===n&&(n=Ea),e.uri=t;for(var r=0;r<e.playlists.length;r++)if(!e.playlists[r].uri){var i="placeholder-uri-"+r;e.playlists[r].uri=i}var a=Sa(e);Aa(e,(function(t,r,i,o){if(!t.playlists||!t.playlists.length){if(a&&"AUDIO"===r&&!t.uri)for(var s=0;s<e.playlists.length;s++){var u=e.playlists[s];if(u.attributes&&u.attributes.AUDIO&&u.attributes.AUDIO===i)return}t.playlists=[l()({},t)]}t.playlists.forEach((function(t,a){var s=n(r,i,o,t),u=Ca(a,s);t.uri?t.resolvedUri=t.resolvedUri||Yi(e.uri,t.uri):(t.uri=0===a?s:u,t.resolvedUri=t.uri),t.id=t.id||u,t.attributes=t.attributes||{},e.playlists[t.id]=t,e.playlists[t.uri]=t}))})),function(e){for(var t=e.playlists.length;t--;){var n=e.playlists[t];xa({playlist:n,id:Ca(t,n.uri)}),n.resolvedUri=Yi(e.uri,n.uri),e.playlists[n.id]=n,e.playlists[n.uri]=n,n.attributes.BANDWIDTH||ka.warn("Invalid playlist STREAM-INF detected. Missing BANDWIDTH attribute.")}}(e),function(e){Aa(e,(function(t){t.uri&&(t.resolvedUri=Yi(e.uri,t.uri))}))}(e)},Ia=Ki.mergeOptions,Oa=Ki.EventTarget,La=function(e,t){if(!e)return t;var n=Ia(e,t);if(e.preloadHints&&!t.preloadHints&&delete n.preloadHints,e.parts&&!t.parts)delete n.parts;else if(e.parts&&t.parts)for(var r=0;r<t.parts.length;r++)e.parts&&e.parts[r]&&(n.parts[r]=Ia(e.parts[r],t.parts[r]));return!e.skipped&&t.skipped&&(n.skipped=!1),e.preload&&!t.preload&&(n.preload=!1),n},Da=function(e,t){!e.resolvedUri&&e.uri&&(e.resolvedUri=Yi(t,e.uri)),e.key&&!e.key.resolvedUri&&(e.key.resolvedUri=Yi(t,e.key.uri)),e.map&&!e.map.resolvedUri&&(e.map.resolvedUri=Yi(t,e.map.uri)),e.map&&e.map.key&&!e.map.key.resolvedUri&&(e.map.key.resolvedUri=Yi(t,e.map.key.uri)),e.parts&&e.parts.length&&e.parts.forEach((function(e){e.resolvedUri||(e.resolvedUri=Yi(t,e.uri))})),e.preloadHints&&e.preloadHints.length&&e.preloadHints.forEach((function(e){e.resolvedUri||(e.resolvedUri=Yi(t,e.uri))}))},Ma=function(e){var t=e.segments||[],n=e.preloadSegment;if(n&&n.parts&&n.parts.length){if(n.preloadHints)for(var r=0;r<n.preloadHints.length;r++)if("MAP"===n.preloadHints[r].type)return t;n.duration=e.targetDuration,n.preload=!0,t.push(n)}return t},Ra=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},Na=function(e,t,n){void 0===n&&(n=Ra);var r=Ia(e,{}),i=r.playlists[t.id];if(!i)return null;if(n(i,t))return null;t.segments=Ma(t);var a=Ia(i,t);if(a.preloadSegment&&!t.preloadSegment&&delete a.preloadSegment,i.segments){if(t.skip){t.segments=t.segments||[];for(var o=0;o<t.skip.skippedSegments;o++)t.segments.unshift({skipped:!0})}a.segments=function(e,t,n){var r=e.slice(),i=t.slice();n=n||0;for(var a,o=[],s=0;s<i.length;s++){var u=r[s+n],l=i[s];u?(a=u.map||a,o.push(La(u,l))):(a&&!l.map&&(l.map=a),o.push(l))}return o}(i.segments,t.segments,t.mediaSequence-i.mediaSequence)}a.segments.forEach((function(e){Da(e,a.resolvedUri)}));for(var s=0;s<r.playlists.length;s++)r.playlists[s].id===t.id&&(r.playlists[s]=a);return r.playlists[t.id]=a,r.playlists[t.uri]=a,Aa(e,(function(e,n,r,i){if(e.playlists)for(var o=0;o<e.playlists.length;o++)t.id===e.playlists[o].id&&(e.playlists[o]=a)})),r},ja=function(e,t){var n=e.segments||[],r=n[n.length-1],i=r&&r.parts&&r.parts[r.parts.length-1],a=i&&i.duration||r&&r.duration;return t&&a?1e3*a:500*(e.partTargetDuration||e.targetDuration||10)},Ba=function(e){function t(t,n,r){var i;if(void 0===r&&(r={}),i=e.call(this)||this,!t)throw new Error("A non-empty playlist URL or object is required");i.logger_=$i("PlaylistLoader");var a=r,o=a.withCredentials,s=void 0!==o&&o,u=a.handleManifestRedirects,l=void 0!==u&&u;i.src=t,i.vhs_=n,i.withCredentials=s,i.handleManifestRedirects=l;var c=n.options_;return i.customTagParsers=c&&c.customTagParsers||[],i.customTagMappers=c&&c.customTagMappers||[],i.experimentalLLHLS=c&&c.experimentalLLHLS||!1,Ki.browser.IE_VERSION&&(i.experimentalLLHLS=!1),i.state="HAVE_NOTHING",i.handleMediaupdatetimeout_=i.handleMediaupdatetimeout_.bind(p()(i)),i.on("mediaupdatetimeout",i.handleMediaupdatetimeout_),i}m()(t,e);var n=t.prototype;return n.handleMediaupdatetimeout_=function(){var e=this;if("HAVE_METADATA"===this.state){var t=this.media(),n=Yi(this.master.uri,t.uri);this.experimentalLLHLS&&(n=function(e,t){if(t.endList||!t.serverControl)return e;var n={};if(t.serverControl.canBlockReload){var r=t.preloadSegment,i=t.mediaSequence+t.segments.length;if(r){var o=r.parts||[],s=la(t)-1;s>-1&&s!==o.length-1&&(n._HLS_part=s),(s>-1||o.length)&&i--}n._HLS_msn=i}if(t.serverControl&&t.serverControl.canSkipUntil&&(n._HLS_skip=t.serverControl.canSkipDateranges?"v2":"YES"),Object.keys(n).length){var u=new a.a.URL(e);["_HLS_skip","_HLS_msn","_HLS_part"].forEach((function(e){n.hasOwnProperty(e)&&u.searchParams.set(e,n[e])})),e=u.toString()}return e}(n,t)),this.state="HAVE_CURRENT_METADATA",this.request=this.vhs_.xhr({uri:n,withCredentials:this.withCredentials},(function(t,n){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})}))}},n.playlistRequestError=function(e,t,n){var r=t.uri,i=t.id;this.request=null,n&&(this.state=n),this.error={playlist:this.master.playlists[i],status:e.status,message:"HLS playlist request error at URL: "+r+".",responseText:e.responseText,code:e.status>=500?4:2},this.trigger("error")},n.parseManifest_=function(e){var t=this,n=e.url;return function(e){var t=e.onwarn,n=e.oninfo,r=e.manifestString,i=e.customTagParsers,a=void 0===i?[]:i,o=e.customTagMappers,s=void 0===o?[]:o,u=e.experimentalLLHLS,l=new A.a;t&&l.on("warn",t),n&&l.on("info",n),a.forEach((function(e){return l.addParser(e)})),s.forEach((function(e){return l.addTagMapper(e)})),l.push(r),l.end();var c=l.manifest;if(u||(["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=ua(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),ka.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 r=e.message;return t.logger_("m3u8-parser warn for "+n+": "+r)},oninfo:function(e){var r=e.message;return t.logger_("m3u8-parser info for "+n+": "+r)},manifestString:e.manifestString,customTagParsers:this.customTagParsers,customTagMappers:this.customTagMappers,experimentalLLHLS:this.experimentalLLHLS})},n.haveMetadata=function(e){var t=e.playlistString,n=e.playlistObject,r=e.url,i=e.id;this.request=null,this.state="HAVE_METADATA";var a=n||this.parseManifest_({url:r,manifestString:t});a.lastRequest=Date.now(),xa({playlist:a,uri:r,id:i});var o=Na(this.master,a);this.targetDuration=a.partTargetDuration||a.targetDuration,this.pendingMedia_=null,o?(this.master=o,this.media_=this.master.playlists[i]):this.trigger("playlistunchanged"),this.updateMediaUpdateTimeout_(ja(this.media(),!!o)),this.trigger("loadedplaylist")},n.dispose=function(){this.trigger("dispose"),this.stopRequest(),a.a.clearTimeout(this.mediaUpdateTimeout),a.a.clearTimeout(this.finalRenditionTimeout),this.off()},n.stopRequest=function(){if(this.request){var e=this.request;this.request=null,e.onreadystatechange=null,e.abort()}},n.media=function(e,t){var n=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(a.a.clearTimeout(this.finalRenditionTimeout),t){var r=(e.partTargetDuration||e.targetDuration)/2*1e3||5e3;this.finalRenditionTimeout=a.a.setTimeout(this.media.bind(this,e,!1),r)}else{var i=this.state,o=!this.media_||e.id!==this.media_.id,s=this.master.playlists[e.id];if(s&&s.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(o&&(this.trigger("mediachanging"),"HAVE_MASTER"===i?this.trigger("loadedmetadata"):this.trigger("mediachange")));if(this.updateMediaUpdateTimeout_(ja(e,!0)),o){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,r){if(n.request){if(e.lastRequest=Date.now(),e.resolvedUri=Qi(n.handleManifestRedirects,e.resolvedUri,r),t)return n.playlistRequestError(n.request,e,i);n.haveMetadata({playlistString:r.responseText,url:e.uri,id:e.id}),"HAVE_MASTER"===i?n.trigger("loadedmetadata"):n.trigger("mediachange")}}))}}},n.pause=function(){this.mediaUpdateTimeout&&(a.a.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")},n.load=function(e){var t=this;this.mediaUpdateTimeout&&(a.a.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null);var n=this.media();if(e){var r=n?(n.partTargetDuration||n.targetDuration)/2*1e3:5e3;this.mediaUpdateTimeout=a.a.setTimeout((function(){t.mediaUpdateTimeout=null,t.load()}),r)}else this.started?n&&!n.endList?this.trigger("mediaupdatetimeout"):this.trigger("loadedplaylist"):this.start()},n.updateMediaUpdateTimeout_=function(e){var t=this;this.mediaUpdateTimeout&&(a.a.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null),this.media()&&!this.media().endList&&(this.mediaUpdateTimeout=a.a.setTimeout((function(){t.mediaUpdateTimeout=null,t.trigger("mediaupdatetimeout"),t.updateMediaUpdateTimeout_(e)}),e))},n.start=function(){var e=this;if(this.started=!0,"object"===typeof this.src)return this.src.uri||(this.src.uri=a.a.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,n){if(e.request){if(e.request=null,t)return e.error={status:n.status,message:"HLS playlist request error at URL: "+e.src+".",responseText:n.responseText,code:2},"HAVE_NOTHING"===e.state&&(e.started=!1),e.trigger("error");e.src=Qi(e.handleManifestRedirects,e.src,n);var r=e.parseManifest_({manifestString:n.responseText,url:e.src});e.setupInitialPlaylist(r)}}))},n.srcUri=function(){return"string"===typeof this.src?this.src:this.src.uri},n.setupInitialPlaylist=function(e){if(this.state="HAVE_MASTER",e.playlists)return this.master=e,Pa(this.master,this.srcUri()),e.playlists.forEach((function(e){e.segments=Ma(e),e.segments.forEach((function(t){Da(t,e.resolvedUri)}))})),this.trigger("loadedplaylist"),void(this.request||this.media(this.master.playlists[0]));var t=this.srcUri()||a.a.location.href;this.master=function(e,t){var n=Ca(0,t),r={mediaGroups:{AUDIO:{},VIDEO:{},"CLOSED-CAPTIONS":{},SUBTITLES:{}},uri:a.a.location.href,resolvedUri:a.a.location.href,playlists:[{uri:t,id:n,resolvedUri:t,attributes:{}}]};return r.playlists[n]=r.playlists[0],r.playlists[t]=r.playlists[0],r}(0,t),this.haveMetadata({playlistObject:e,url:t,id:this.master.playlists[0].id}),this.trigger("loadedmetadata")},t}(Oa),Ua=Ki.xhr,Fa=Ki.mergeOptions,qa=function(e,t,n,r){var i="arraybuffer"===e.responseType?e.response:e.responseText;!t&&i&&(e.responseTime=Date.now(),e.roundTripTime=e.responseTime-e.requestTime,e.bytesReceived=i.byteLength||i.length,e.bandwidth||(e.bandwidth=Math.floor(e.bytesReceived/e.roundTripTime*8*1e3))),n.headers&&(e.responseHeaders=n.headers),t&&"ETIMEDOUT"===t.code&&(e.timedout=!0),t||e.aborted||200===n.statusCode||206===n.statusCode||0===n.statusCode||(t=new Error("XHR Failed with a response of: "+(e&&(i||e.responseText)))),r(t,e)},Ha=function(){var e=function e(t,n){t=Fa({timeout:45e3},t);var r=e.beforeRequest||Ki.Vhs.xhr.beforeRequest;if(r&&"function"===typeof r){var i=r(t);i&&(t=i)}var a=(!0===Ki.Vhs.xhr.original?Ua:Ki.Vhs.xhr)(t,(function(e,t){return qa(a,e,t,n)})),o=a.abort;return a.abort=function(){return a.aborted=!0,o.apply(a,arguments)},a.uri=t.uri,a.requestTime=Date.now(),a};return e.original=!0,e},za=function(e){var t,n={};return e.byterange&&(n.Range="bytes="+(t=e.byterange).offset+"-"+("bigint"===typeof t.offset||"bigint"===typeof t.length?a.a.BigInt(t.offset)+a.a.BigInt(t.length)-a.a.BigInt(1):t.offset+t.length-1)),n},Wa=function(e,t){return e.start(t)+"-"+e.end(t)},Va=function(e,t){var n=e.toString(16);return"00".substring(0,2-n.length)+n+(t%2?" ":"")},Ka=function(e){return e>=32&&e<126?String.fromCharCode(e):"."},Ga=function(e){var t={};return Object.keys(e).forEach((function(n){var r=e[n];Object(I.e)(r)?t[n]={bytes:r.buffer,byteOffset:r.byteOffset,byteLength:r.byteLength}:t[n]=r})),t},Xa=function(e){var t=e.byterange||{length:1/0,offset:0};return[t.length,t.offset,e.resolvedUri].join(",")},Ya=function(e){return e.resolvedUri},Qa=function(e){for(var t=Array.prototype.slice.call(e),n="",r=0;r<t.length/16;r++)n+=t.slice(16*r,16*r+16).map(Va).join("")+" "+t.slice(16*r,16*r+16).map(Ka).join("")+"\n";return n},$a=Object.freeze({__proto__:null,createTransferableMessage:Ga,initSegmentId:Xa,segmentKeyId:Ya,hexDump:Qa,tagDump:function(e){var t=e.bytes;return Qa(t)},textRanges:function(e){var t,n="";for(t=0;t<e.length;t++)n+=Wa(e,t)+" ";return n}}),Za=function(e){var t=e.playlist,n=e.time,r=void 0===n?void 0:n,i=e.callback;if(!i)throw new Error("getProgramTime: callback must be provided");if(!t||void 0===r)return i({message:"getProgramTime: playlist and time must be provided"});var a=function(e,t){if(!t||!t.segments||0===t.segments.length)return null;for(var n,r=0,i=0;i<t.segments.length&&!(e<=(r=(n=t.segments[i]).videoTimingInfo?n.videoTimingInfo.transmuxedPresentationEnd:r+n.duration));i++);var a=t.segments[t.segments.length-1];if(a.videoTimingInfo&&a.videoTimingInfo.transmuxedPresentationEnd<e)return null;if(e>r){if(e>r+.25*a.duration)return null;n=a}return{segment:n,estimatedStart:n.videoTimingInfo?n.videoTimingInfo.transmuxedPresentationStart:r-n.duration,type:n.videoTimingInfo?"accurate":"estimate"}}(r,t);if(!a)return i({message:"valid programTime was not found"});if("estimate"===a.type)return i({message:"Accurate programTime could not be determined. Please seek to e.seekTime and try again",seekTime:a.estimatedStart});var o={mediaSeconds:r},s=function(e,t){if(!t.dateTimeObject)return null;var n=t.videoTimingInfo.transmuxerPrependedSeconds,r=e-(t.videoTimingInfo.transmuxedPresentationStart+n);return new Date(t.dateTimeObject.getTime()+1e3*r)}(r,a.segment);return s&&(o.programDateTime=s.toISOString()),i(null,o)},Ja=function e(t){var n=t.programTime,r=t.playlist,i=t.retryCount,a=void 0===i?2:i,o=t.seekTo,s=t.pauseAfterSeek,u=void 0===s||s,l=t.tech,c=t.callback;if(!c)throw new Error("seekToProgramTime: callback must be provided");if("undefined"===typeof n||!r||!o)return c({message:"seekToProgramTime: programTime, seekTo and playlist must be provided"});if(!r.endList&&!l.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}(r))return c({message:"programDateTime tags must be provided in the manifest "+r.resolvedUri});var d=function(e,t){var n;try{n=new Date(e)}catch(l){return null}if(!t||!t.segments||0===t.segments.length)return null;var r=t.segments[0];if(n<r.dateTimeObject)return null;for(var i=0;i<t.segments.length-1;i++){if(r=t.segments[i],n<t.segments[i+1].dateTimeObject)break}var a,o=t.segments[t.segments.length-1],s=o.dateTimeObject,u=o.videoTimingInfo?(a=o.videoTimingInfo).transmuxedPresentationEnd-a.transmuxedPresentationStart-a.transmuxerPrependedSeconds:o.duration+.25*o.duration;return n>new Date(s.getTime()+1e3*u)?null:(n>s&&(r=o),{segment:r,estimatedStart:r.videoTimingInfo?r.videoTimingInfo.transmuxedPresentationStart:wa.duration(t,t.mediaSequence+t.segments.indexOf(r)),type:r.videoTimingInfo?"accurate":"estimate"})}(n,r);if(!d)return c({message:n+" was not found in the stream"});var h=d.segment,p=function(e,t){var n,r;try{n=new Date(e),r=new Date(t)}catch(a){}var i=n.getTime();return(r.getTime()-i)/1e3}(h.dateTimeObject,n);if("estimate"===d.type)return 0===a?c({message:n+" is not buffered yet. Try again"}):(o(d.estimatedStart+p),void l.one("seeked",(function(){e({programTime:n,playlist:r,retryCount:a-1,seekTo:o,pauseAfterSeek:u,tech:l,callback:c})})));var f=h.start+p;l.one("seeked",(function(){return c(null,l.currentTime())})),u&&l.pause(),o(f)},eo=function(e,t){if(4===e.readyState)return t()},to=Ki.EventTarget,no=Ki.mergeOptions,ro=function(e,t){if(!Ra(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 n=0;n<e.segments.length;n++){var r=e.segments[n],i=t.segments[n];if(r.uri!==i.uri)return!1;if(r.byterange||i.byterange){var a=r.byterange,o=i.byterange;if(a&&!o||!a&&o)return!1;if(a.offset!==o.offset||a.length!==o.length)return!1}}return!0},io=function(e,t,n,r){return"placeholder-uri-"+e+"-"+t+"-"+(r.attributes.NAME||n)},ao=function(e,t,n){for(var r=!0,i=no(e,{duration:t.duration,minimumUpdatePeriod:t.minimumUpdatePeriod,timelineStarts:t.timelineStarts}),a=0;a<t.playlists.length;a++){var o=t.playlists[a];if(o.sidx){var s=Object(O.b)(o.sidx);n&&n[s]&&n[s].sidx&&Object(O.a)(o,n[s].sidx,o.sidx.resolvedUri)}var u=Na(i,o,ro);u&&(i=u,r=!1)}return Aa(t,(function(e,t,n,a){if(e.playlists&&e.playlists.length){var o=e.playlists[0].id,s=Na(i,e.playlists[0],ro);s&&(a in(i=s).mediaGroups[t][n]||(i.mediaGroups[t][n][a]=e),i.mediaGroups[t][n][a].playlists[0]=i.playlists[o],r=!1)}})),function(e,t){Aa(e,(function(n,r,i,a){a in t.mediaGroups[r][i]||delete e.mediaGroups[r][i][a]}))}(i,t),t.minimumUpdatePeriod!==e.minimumUpdatePeriod&&(r=!1),r?null:i},oo=function(e,t){var n,r,i={};for(var a in e){var o=e[a].sidx;if(o){var s=Object(O.b)(o);if(!t[s])break;var u=t[s].sidxInfo;n=u,r=o,(Boolean(!n.map&&!r.map)||Boolean(n.map&&r.map&&n.map.byterange.offset===r.map.byterange.offset&&n.map.byterange.length===r.map.byterange.length))&&n.uri===r.uri&&n.byterange.offset===r.byterange.offset&&n.byterange.length===r.byterange.length&&(i[s]=t[s])}}return i},so=function(e){function t(t,n,r,i){var a;void 0===r&&(r={}),(a=e.call(this)||this).masterPlaylistLoader_=i||p()(a),i||(a.isMaster_=!0);var o=r,s=o.withCredentials,u=void 0!==s&&s,l=o.handleManifestRedirects,c=void 0!==l&&l;if(a.vhs_=n,a.withCredentials=u,a.handleManifestRedirects=c,!t)throw new Error("A non-empty playlist URL or object is required");return a.on("minimumUpdatePeriod",(function(){a.refreshXml_()})),a.on("mediaupdatetimeout",(function(){a.refreshMedia_(a.media().id)})),a.state="HAVE_NOTHING",a.loadedPlaylists_={},a.logger_=$i("DashPlaylistLoader"),a.isMaster_?(a.masterPlaylistLoader_.srcUrl=t,a.masterPlaylistLoader_.sidxMapping_={}):a.childPlaylist_=t,a}m()(t,e);var n=t.prototype;return n.requestErrored_=function(e,t,n){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,n&&(this.state=n),this.trigger("error"),!0):void 0)},n.addSidxSegments_=function(e,t,n){var r=this,i=e.sidx&&Object(O.b)(e.sidx);if(e.sidx&&i&&!this.masterPlaylistLoader_.sidxMapping_[i]){var o=Qi(this.handleManifestRedirects,e.sidx.resolvedUri),s=function(a,o){if(!r.requestErrored_(a,o,t)){var s,u=r.masterPlaylistLoader_.sidxMapping_;try{s=D()(Object(I.k)(o.response).subarray(8))}catch(l){return void r.requestErrored_(l,o,t)}return u[i]={sidxInfo:e.sidx,sidx:s},Object(O.a)(e,s,e.sidx.resolvedUri),n(!0)}};this.request=function(e,t,n){var r,i=[],a=!1,o=function(e,t,r,i){return t.abort(),a=!0,n(e,t,r,i)},s=function(e,t){if(!a){if(e)return o(e,t,"",i);var n=t.responseText.substring(i&&i.byteLength||0,t.responseText.length);if(i=Object(I.d)(i,Object(I.h)(n,!0)),r=r||Object(M.a)(i),i.length<10||r&&i.length<r+2)return eo(t,(function(){return o(e,t,"",i)}));var s=Object(R.a)(i);return"ts"===s&&i.length<188||!s&&i.length<376?eo(t,(function(){return o(e,t,"",i)})):o(null,t,s,i)}},u=t({uri:e,beforeSend:function(e){e.overrideMimeType("text/plain; charset=x-user-defined"),e.addEventListener("progress",(function(t){return t.total,t.loaded,qa(e,null,{statusCode:e.status},s)}))}},(function(e,t){return qa(u,e,t,s)}));return u}(o,this.vhs_.xhr,(function(t,n,i,a){if(t)return s(t,n);if(!i||"mp4"!==i)return s({status:n.status,message:"Unsupported "+(i||"unknown")+" container type for sidx segment at URL: "+o,response:"",playlist:e,internal:!0,blacklistDuration:1/0,code:2},n);var u=e.sidx.byterange,l=u.offset,c=u.length;if(a.length>=c+l)return s(t,{response:a.subarray(l,l+c),status:n.status,uri:n.uri});r.request=r.vhs_.xhr({uri:o,responseType:"arraybuffer",headers:za({byterange:e.sidx.byterange})},s)}))}else this.mediaRequest_=a.a.setTimeout((function(){return n(!1)}),0)},n.dispose=function(){this.trigger("dispose"),this.stopRequest(),this.loadedPlaylists_={},a.a.clearTimeout(this.minimumUpdatePeriodTimeout_),a.a.clearTimeout(this.mediaRequest_),a.a.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()},n.hasPendingRequest=function(){return this.request||this.mediaRequest_},n.stopRequest=function(){if(this.request){var e=this.request;this.request=null,e.onreadystatechange=null,e.abort()}},n.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 n=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 r=!this.media_||e.id!==this.media_.id;if(r&&this.loadedPlaylists_[e.id]&&this.loadedPlaylists_[e.id].endList)return this.state="HAVE_METADATA",this.media_=e,void(r&&(this.trigger("mediachanging"),this.trigger("mediachange")));r&&(this.media_&&this.trigger("mediachanging"),this.addSidxSegments_(e,n,(function(r){t.haveMetadata({startingState:n,playlist:e})})))},n.haveMetadata=function(e){var t=e.startingState,n=e.playlist;this.state="HAVE_METADATA",this.loadedPlaylists_[n.id]=n,this.mediaRequest_=null,this.refreshMedia_(n.id),"HAVE_MASTER"===t?this.trigger("loadedmetadata"):this.trigger("mediachange")},n.pause=function(){this.masterPlaylistLoader_.createMupOnMedia_&&(this.off("loadedmetadata",this.masterPlaylistLoader_.createMupOnMedia_),this.masterPlaylistLoader_.createMupOnMedia_=null),this.stopRequest(),a.a.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null,this.isMaster_&&(a.a.clearTimeout(this.masterPlaylistLoader_.minimumUpdatePeriodTimeout_),this.masterPlaylistLoader_.minimumUpdatePeriodTimeout_=null),"HAVE_NOTHING"===this.state&&(this.started=!1)},n.load=function(e){var t=this;a.a.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null;var n=this.media();if(e){var r=n?n.targetDuration/2*1e3:5e3;this.mediaUpdateTimeout=a.a.setTimeout((function(){return t.load()}),r)}else this.started?n&&!n.endList?(this.isMaster_&&!this.minimumUpdatePeriodTimeout_&&(this.trigger("minimumUpdatePeriod"),this.updateMinimumUpdatePeriodTimeout_()),this.trigger("mediaupdatetimeout")):this.trigger("loadedplaylist"):this.start()},n.start=function(){var e=this;this.started=!0,this.isMaster_?this.requestMaster_((function(t,n){e.haveMaster_(),e.hasPendingRequest()||e.media_||e.media(e.masterPlaylistLoader_.master.playlists[0])})):this.mediaRequest_=a.a.setTimeout((function(){return e.haveMaster_()}),0)},n.requestMaster_=function(e){var t=this;this.request=this.vhs_.xhr({uri:this.masterPlaylistLoader_.srcUrl,withCredentials:this.withCredentials},(function(n,r){if(!t.requestErrored_(n,r)){var i=r.responseText!==t.masterPlaylistLoader_.masterXml_;return t.masterPlaylistLoader_.masterXml_=r.responseText,r.responseHeaders&&r.responseHeaders.date?t.masterLoaded_=Date.parse(r.responseHeaders.date):t.masterLoaded_=Date.now(),t.masterPlaylistLoader_.srcUrl=Qi(t.handleManifestRedirects,t.masterPlaylistLoader_.srcUrl,r),i?(t.handleMaster_(),void t.syncClientServerClock_((function(){return e(r,i)}))):e(r,i)}"HAVE_NOTHING"===t.state&&(t.started=!1)}))},n.syncClientServerClock_=function(e){var t=this,n=Object(O.d)(this.masterPlaylistLoader_.masterXml_);return null===n?(this.masterPlaylistLoader_.clientOffset_=this.masterLoaded_-Date.now(),e()):"DIRECT"===n.method?(this.masterPlaylistLoader_.clientOffset_=n.value-Date.now(),e()):void(this.request=this.vhs_.xhr({uri:Yi(this.masterPlaylistLoader_.srcUrl,n.value),method:n.method,withCredentials:this.withCredentials},(function(r,i){if(t.request){if(r)return t.masterPlaylistLoader_.clientOffset_=t.masterLoaded_-Date.now(),e();var a;a="HEAD"===n.method?i.responseHeaders&&i.responseHeaders.date?Date.parse(i.responseHeaders.date):t.masterLoaded_:Date.parse(i.responseText),t.masterPlaylistLoader_.clientOffset_=a-Date.now(),e()}})))},n.haveMaster_=function(){this.state="HAVE_MASTER",this.isMaster_?this.trigger("loadedplaylist"):this.media_||this.media(this.childPlaylist_)},n.handleMaster_=function(){this.mediaRequest_=null;var e=this.masterPlaylistLoader_.master,t=function(e){var t=e.masterXml,n=e.srcUrl,r=e.clientOffset,i=e.sidxMapping,a=e.previousManifest,o=Object(O.c)(t,{manifestUri:n,clientOffset:r,sidxMapping:i,previousManifest:a});return Pa(o,n,io),o}({masterXml:this.masterPlaylistLoader_.masterXml_,srcUrl:this.masterPlaylistLoader_.srcUrl,clientOffset:this.masterPlaylistLoader_.clientOffset_,sidxMapping:this.masterPlaylistLoader_.sidxMapping_,previousManifest:e});e&&(t=ao(e,t,this.masterPlaylistLoader_.sidxMapping_)),this.masterPlaylistLoader_.master=t||e;var n=this.masterPlaylistLoader_.master.locations&&this.masterPlaylistLoader_.master.locations[0];return n&&n!==this.masterPlaylistLoader_.srcUrl&&(this.masterPlaylistLoader_.srcUrl=n),(!e||t&&t.minimumUpdatePeriod!==e.minimumUpdatePeriod)&&this.updateMinimumUpdatePeriodTimeout_(),Boolean(t)},n.updateMinimumUpdatePeriodTimeout_=function(){var e=this.masterPlaylistLoader_;e.createMupOnMedia_&&(e.off("loadedmetadata",e.createMupOnMedia_),e.createMupOnMedia_=null),e.minimumUpdatePeriodTimeout_&&(a.a.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)},n.createMUPTimeout_=function(e){var t=this.masterPlaylistLoader_;t.minimumUpdatePeriodTimeout_=a.a.setTimeout((function(){t.minimumUpdatePeriodTimeout_=null,t.trigger("minimumUpdatePeriod"),t.createMUPTimeout_(e)}),e)},n.refreshXml_=function(){var e=this;this.requestMaster_((function(t,n){n&&(e.media_&&(e.media_=e.masterPlaylistLoader_.master.playlists[e.media_.id]),e.masterPlaylistLoader_.sidxMapping_=function(e,t){var n=oo(e.playlists,t);return Aa(e,(function(e,r,i,a){if(e.playlists&&e.playlists.length){var o=e.playlists;n=no(n,oo(o,t))}})),n}(e.masterPlaylistLoader_.master,e.masterPlaylistLoader_.sidxMapping_),e.addSidxSegments_(e.media(),e.state,(function(t){e.refreshMedia_(e.media().id)})))}))},n.refreshMedia_=function(e){var t=this;if(!e)throw new Error("refreshMedia_ must take a media id");this.media_&&this.isMaster_&&this.handleMaster_();var n=this.masterPlaylistLoader_.master.playlists,r=!this.media_||this.media_!==n[e];if(r?this.media_=n[e]:this.trigger("playlistunchanged"),!this.mediaUpdateTimeout){!function e(){t.media().endList||(t.mediaUpdateTimeout=a.a.setTimeout((function(){t.trigger("mediaupdatetimeout"),e()}),ja(t.media(),Boolean(r))))}()}this.trigger("loadedplaylist")},t}(to),uo={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},lo=function(e){return e.on=e.addEventListener,e.off=e.removeEventListener,e},co=function(e){return function(){var t=function(e){try{return URL.createObjectURL(new Blob([e],{type:"application/javascript"}))}catch(n){var t=new BlobBuilder;return t.append(e),URL.createObjectURL(t.getBlob())}}(e),n=lo(new Worker(t));n.objURL=t;var r=n.terminate;return n.on=n.addEventListener,n.off=n.removeEventListener,n.terminate=function(){return URL.revokeObjectURL(t),r.call(this)},n}},ho=function(e){return"var browserWorkerPolyFill = "+lo.toString()+";\nbrowserWorkerPolyFill(self);\n"+e},po=function(e){return e.toString().replace(/^function.+?{/,"").slice(0,-1)},fo=co(ho(po((function(){var t=function(){this.init=function(){var e={};this.on=function(t,n){e[t]||(e[t]=[]),e[t]=e[t].concat(n)},this.off=function(t,n){var r;return!!e[t]&&(r=e[t].indexOf(n),e[t]=e[t].slice(),e[t].splice(r,1),r>-1)},this.trigger=function(t){var n,r,i,a;if(n=e[t])if(2===arguments.length)for(i=n.length,r=0;r<i;++r)n[r].call(this,arguments[1]);else{for(a=[],r=arguments.length,r=1;r<arguments.length;++r)a.push(arguments[r]);for(i=n.length,r=0;r<i;++r)n[r].apply(this,a)}},this.dispose=function(){e={}}}};t.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},t.prototype.push=function(e){this.trigger("data",e)},t.prototype.flush=function(e){this.trigger("done",e)},t.prototype.partialFlush=function(e){this.trigger("partialdone",e)},t.prototype.endTimeline=function(e){this.trigger("endedtimeline",e)},t.prototype.reset=function(e){this.trigger("reset",e)};var n,r,i,a,o,s,u,l,c,d,h,p,f,m,g,v,y,b,_,T,S,w,k,C,E,A,x,P,I,O,L,D,M,R,N,j,B=t,U=Math.pow(2,32),F={getUint64:function(e){var t,n=new DataView(e.buffer,e.byteOffset,e.byteLength);return n.getBigUint64?(t=n.getBigUint64(0))<Number.MAX_SAFE_INTEGER?Number(t):t:n.getUint32(0)*U+n.getUint32(4)},MAX_UINT32:U},q=F.MAX_UINT32;!function(){var e;if(k={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 k)k.hasOwnProperty(e)&&(k[e]=[e.charCodeAt(0),e.charCodeAt(1),e.charCodeAt(2),e.charCodeAt(3)]);C=new Uint8Array(["i".charCodeAt(0),"s".charCodeAt(0),"o".charCodeAt(0),"m".charCodeAt(0)]),A=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]),P=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]),I={video:x,audio:P},D=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),L=new Uint8Array([0,0,0,0,0,0,0,0]),M=new Uint8Array([0,0,0,0,0,0,0,0]),R=M,N=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),j=M,O=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0])}}(),n=function(e){var t,n,r=[],i=0;for(t=1;t<arguments.length;t++)r.push(arguments[t]);for(t=r.length;t--;)i+=r[t].byteLength;for(n=new Uint8Array(i+8),new DataView(n.buffer,n.byteOffset,n.byteLength).setUint32(0,n.byteLength),n.set(e,4),t=0,i=8;t<r.length;t++)n.set(r[t],i),i+=r[t].byteLength;return n},r=function(){return n(k.dinf,n(k.dref,D))},i=function(e){return n(k.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]))},a=function(){return n(k.ftyp,C,E,C,A)},v=function(e){return n(k.hdlr,I[e])},o=function(e){return n(k.mdat,e)},g=function(e){var t=new Uint8Array([0,0,0,0,0,0,0,2,0,0,0,3,0,1,95,144,e.duration>>>24&255,e.duration>>>16&255,e.duration>>>8&255,255&e.duration,85,196,0,0]);return e.samplerate&&(t[12]=e.samplerate>>>24&255,t[13]=e.samplerate>>>16&255,t[14]=e.samplerate>>>8&255,t[15]=255&e.samplerate),n(k.mdhd,t)},m=function(e){return n(k.mdia,g(e),v(e.type),u(e))},s=function(e){return n(k.mfhd,new Uint8Array([0,0,0,0,(4278190080&e)>>24,(16711680&e)>>16,(65280&e)>>8,255&e]))},u=function(e){return n(k.minf,"video"===e.type?n(k.vmhd,O):n(k.smhd,L),r(),b(e))},l=function(e,t){for(var r=[],i=t.length;i--;)r[i]=T(t[i]);return n.apply(null,[k.moof,s(e)].concat(r))},c=function(e){for(var t=e.length,r=[];t--;)r[t]=p(e[t]);return n.apply(null,[k.moov,h(4294967295)].concat(r).concat(d(e)))},d=function(e){for(var t=e.length,r=[];t--;)r[t]=S(e[t]);return n.apply(null,[k.mvex].concat(r))},h=function(e){var t=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,2,0,1,95,144,(4278190080&e)>>24,(16711680&e)>>16,(65280&e)>>8,255&e,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]);return n(k.mvhd,t)},y=function(e){var t,r,i=e.samples||[],a=new Uint8Array(4+i.length);for(r=0;r<i.length;r++)t=i[r].flags,a[r+4]=t.dependsOn<<4|t.isDependedOn<<2|t.hasRedundancy;return n(k.sdtp,a)},b=function(e){return n(k.stbl,_(e),n(k.stts,j),n(k.stsc,R),n(k.stsz,N),n(k.stco,M))},function(){var e,t;_=function(r){return n(k.stsd,new Uint8Array([0,0,0,0,0,0,0,1]),"video"===r.type?e(r):t(r))},e=function(e){var t,r,i=e.sps||[],a=e.pps||[],o=[],s=[];for(t=0;t<i.length;t++)o.push((65280&i[t].byteLength)>>>8),o.push(255&i[t].byteLength),o=o.concat(Array.prototype.slice.call(i[t]));for(t=0;t<a.length;t++)s.push((65280&a[t].byteLength)>>>8),s.push(255&a[t].byteLength),s=s.concat(Array.prototype.slice.call(a[t]));if(r=[k.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]),n(k.avcC,new Uint8Array([1,e.profileIdc,e.profileCompatibility,e.levelIdc,255].concat([i.length],o,[a.length],s))),n(k.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192]))],e.sarRatio){var u=e.sarRatio[0],l=e.sarRatio[1];r.push(n(k.pasp,new Uint8Array([(4278190080&u)>>24,(16711680&u)>>16,(65280&u)>>8,255&u,(4278190080&l)>>24,(16711680&l)>>16,(65280&l)>>8,255&l])))}return n.apply(null,r)},t=function(e){return n(k.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,(65280&e.channelcount)>>8,255&e.channelcount,(65280&e.samplesize)>>8,255&e.samplesize,0,0,0,0,(65280&e.samplerate)>>8,255&e.samplerate,0,0]),i(e))}}(),f=function(e){var t=new Uint8Array([0,0,0,7,0,0,0,0,0,0,0,0,(4278190080&e.id)>>24,(16711680&e.id)>>16,(65280&e.id)>>8,255&e.id,0,0,0,0,(4278190080&e.duration)>>24,(16711680&e.duration)>>16,(65280&e.duration)>>8,255&e.duration,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,(65280&e.width)>>8,255&e.width,0,0,(65280&e.height)>>8,255&e.height,0,0]);return n(k.tkhd,t)},T=function(e){var t,r,i,a,o,s;return t=n(k.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])),o=Math.floor(e.baseMediaDecodeTime/q),s=Math.floor(e.baseMediaDecodeTime%q),r=n(k.tfdt,new Uint8Array([1,0,0,0,o>>>24&255,o>>>16&255,o>>>8&255,255&o,s>>>24&255,s>>>16&255,s>>>8&255,255&s])),92,"audio"===e.type?(i=w(e,92),n(k.traf,t,r,i)):(a=y(e),i=w(e,a.length+92),n(k.traf,t,r,i,a))},p=function(e){return e.duration=e.duration||4294967295,n(k.trak,f(e),m(e))},S=function(e){var t=new Uint8Array([0,0,0,0,(4278190080&e.id)>>24,(16711680&e.id)>>16,(65280&e.id)>>8,255&e.id,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]);return"video"!==e.type&&(t[t.length-1]=0),n(k.trex,t)},function(){var e,t,r;r=function(e,t){var n=0,r=0,i=0,a=0;return e.length&&(void 0!==e[0].duration&&(n=1),void 0!==e[0].size&&(r=2),void 0!==e[0].flags&&(i=4),void 0!==e[0].compositionTimeOffset&&(a=8)),[0,0,n|r|i|a,1,(4278190080&e.length)>>>24,(16711680&e.length)>>>16,(65280&e.length)>>>8,255&e.length,(4278190080&t)>>>24,(16711680&t)>>>16,(65280&t)>>>8,255&t]},t=function(e,t){var i,a,o,s,u,l;for(t+=20+16*(s=e.samples||[]).length,o=r(s,t),(a=new Uint8Array(o.length+16*s.length)).set(o),i=o.length,l=0;l<s.length;l++)u=s[l],a[i++]=(4278190080&u.duration)>>>24,a[i++]=(16711680&u.duration)>>>16,a[i++]=(65280&u.duration)>>>8,a[i++]=255&u.duration,a[i++]=(4278190080&u.size)>>>24,a[i++]=(16711680&u.size)>>>16,a[i++]=(65280&u.size)>>>8,a[i++]=255&u.size,a[i++]=u.flags.isLeading<<2|u.flags.dependsOn,a[i++]=u.flags.isDependedOn<<6|u.flags.hasRedundancy<<4|u.flags.paddingValue<<1|u.flags.isNonSyncSample,a[i++]=61440&u.flags.degradationPriority,a[i++]=15&u.flags.degradationPriority,a[i++]=(4278190080&u.compositionTimeOffset)>>>24,a[i++]=(16711680&u.compositionTimeOffset)>>>16,a[i++]=(65280&u.compositionTimeOffset)>>>8,a[i++]=255&u.compositionTimeOffset;return n(k.trun,a)},e=function(e,t){var i,a,o,s,u,l;for(t+=20+8*(s=e.samples||[]).length,o=r(s,t),(i=new Uint8Array(o.length+8*s.length)).set(o),a=o.length,l=0;l<s.length;l++)u=s[l],i[a++]=(4278190080&u.duration)>>>24,i[a++]=(16711680&u.duration)>>>16,i[a++]=(65280&u.duration)>>>8,i[a++]=255&u.duration,i[a++]=(4278190080&u.size)>>>24,i[a++]=(16711680&u.size)>>>16,i[a++]=(65280&u.size)>>>8,i[a++]=255&u.size;return n(k.trun,i)},w=function(n,r){return"audio"===n.type?e(n,r):t(n,r)}}();var H,z,W,V,K,G,X,Y,Q=o,$=l,Z=function(e){var t,n=a(),r=c(e);return(t=new Uint8Array(n.byteLength+r.byteLength)).set(n),t.set(r,n.byteLength),t},J=function(e,t){var n={size:0,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0,degradationPriority:0,isNonSyncSample:1}};return n.dataOffset=t,n.compositionTimeOffset=e.pts-e.dts,n.duration=e.duration,n.size=4*e.length,n.size+=e.byteLength,e.keyFrame&&(n.flags.dependsOn=2,n.flags.isNonSyncSample=0),n},ee=function(e){var t,n,r=[],i=[];for(i.byteLength=0,i.nalCount=0,i.duration=0,r.byteLength=0,t=0;t<e.length;t++)"access_unit_delimiter_rbsp"===(n=e[t]).nalUnitType?(r.length&&(r.duration=n.dts-r.dts,i.byteLength+=r.byteLength,i.nalCount+=r.length,i.duration+=r.duration,i.push(r)),(r=[n]).byteLength=n.data.byteLength,r.pts=n.pts,r.dts=n.dts):("slice_layer_without_partitioning_rbsp_idr"===n.nalUnitType&&(r.keyFrame=!0),r.duration=n.dts-r.dts,r.byteLength+=n.data.byteLength,r.push(n));return i.length&&(!r.duration||r.duration<=0)&&(r.duration=i[i.length-1].duration),i.byteLength+=r.byteLength,i.nalCount+=r.length,i.duration+=r.duration,i.push(r),i},te=function(e){var t,n,r=[],i=[];for(r.byteLength=0,r.nalCount=0,r.duration=0,r.pts=e[0].pts,r.dts=e[0].dts,i.byteLength=0,i.nalCount=0,i.duration=0,i.pts=e[0].pts,i.dts=e[0].dts,t=0;t<e.length;t++)(n=e[t]).keyFrame?(r.length&&(i.push(r),i.byteLength+=r.byteLength,i.nalCount+=r.nalCount,i.duration+=r.duration),(r=[n]).nalCount=n.length,r.byteLength=n.byteLength,r.pts=n.pts,r.dts=n.dts,r.duration=n.duration):(r.duration+=n.duration,r.nalCount+=n.length,r.byteLength+=n.byteLength,r.push(n));return i.length&&r.duration<=0&&(r.duration=i[i.length-1].duration),i.byteLength+=r.byteLength,i.nalCount+=r.nalCount,i.duration+=r.duration,i.push(r),i},ne=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},re=function(e,t){var n,r,i,a,o,s=t||0,u=[];for(n=0;n<e.length;n++)for(a=e[n],r=0;r<a.length;r++)o=a[r],s+=(i=J(o,s)).size,u.push(i);return u},ie=function(e){var t,n,r,i,a,o,s=0,u=e.byteLength,l=e.nalCount,c=new Uint8Array(u+4*l),d=new DataView(c.buffer);for(t=0;t<e.length;t++)for(i=e[t],n=0;n<i.length;n++)for(a=i[n],r=0;r<a.length;r++)o=a[r],d.setUint32(s,o.data.byteLength),s+=4,c.set(o.data,s),s+=o.data.byteLength;return c},ae=[33,16,5,32,164,27],oe=[33,65,108,84,1,2,4,8,168,2,4,8,17,191,252],se=function(e){for(var t=[];e--;)t.push(0);return t},ue=function(){if(!H){var e={96e3:[ae,[227,64],se(154),[56]],88200:[ae,[231],se(170),[56]],64e3:[ae,[248,192],se(240),[56]],48e3:[ae,[255,192],se(268),[55,148,128],se(54),[112]],44100:[ae,[255,192],se(268),[55,163,128],se(84),[112]],32e3:[ae,[255,192],se(268),[55,234],se(226),[112]],24e3:[ae,[255,192],se(268),[55,255,128],se(268),[111,112],se(126),[224]],16e3:[ae,[255,192],se(268),[55,255,128],se(268),[111,255],se(269),[223,108],se(195),[1,192]],12e3:[oe,se(268),[3,127,248],se(268),[6,255,240],se(268),[13,255,224],se(268),[27,253,128],se(259),[56]],11025:[oe,se(268),[3,127,248],se(268),[6,255,240],se(268),[13,255,224],se(268),[27,255,192],se(268),[55,175,128],se(108),[112]],8e3:[oe,se(268),[3,121,16],se(47),[7]]};t=e,H=Object.keys(t).reduce((function(e,n){return e[n]=new Uint8Array(t[n].reduce((function(e,t){return e.concat(t)}),[])),e}),{})}var t;return H};G=function(e,t){return z(K(e,t))},X=function(e,t){return W(V(e),t)},Y=function(e,t,n){return V(n?e:e-t)};var le=9e4,ce=z=function(e){return 9e4*e},de=(W=function(e,t){return e*t},V=function(e){return e/9e4}),he=(K=function(e,t){return e/t},G),pe=X,fe=Y,me=function(e,t,n,r){var i,a,o,s,u,l=0,c=0,d=0;if(t.length&&(i=he(e.baseMediaDecodeTime,e.samplerate),a=Math.ceil(le/(e.samplerate/1024)),n&&r&&(l=i-Math.max(n,r),d=(c=Math.floor(l/a))*a),!(c<1||d>le/2))){for((o=ue()[e.samplerate])||(o=t[0].data),s=0;s<c;s++)u=t[0],t.splice(0,0,{data:o,dts:u.dts-a,pts:u.pts-a});return e.baseMediaDecodeTime-=Math.floor(pe(d,e.samplerate)),d}},ge=function(e,t,n){return t.minSegmentDts>=n?e:(t.minSegmentDts=1/0,e.filter((function(e){return e.dts>=n&&(t.minSegmentDts=Math.min(t.minSegmentDts,e.dts),t.minSegmentPts=t.minSegmentDts,!0)})))},ve=function(e){var t,n,r=[];for(t=0;t<e.length;t++)n=e[t],r.push({size:n.data.byteLength,duration:1024});return r},ye=function(e){var t,n,r=0,i=new Uint8Array(function(e){var t,n=0;for(t=0;t<e.length;t++)n+=e[t].data.byteLength;return n}(e));for(t=0;t<e.length;t++)n=e[t],i.set(n.data,r),r+=n.data.byteLength;return i},be=le,_e=function(e){delete e.minSegmentDts,delete e.maxSegmentDts,delete e.minSegmentPts,delete e.maxSegmentPts},Te=function(e,t){var n,r=e.minSegmentDts;return t||(r-=e.timelineStartInfo.dts),n=e.timelineStartInfo.baseMediaDecodeTime,n+=r,n=Math.max(0,n),"audio"===e.type&&(n*=e.samplerate/be,n=Math.floor(n)),n},Se=function(e,t){"number"===typeof t.pts&&(void 0===e.timelineStartInfo.pts&&(e.timelineStartInfo.pts=t.pts),void 0===e.minSegmentPts?e.minSegmentPts=t.pts:e.minSegmentPts=Math.min(e.minSegmentPts,t.pts),void 0===e.maxSegmentPts?e.maxSegmentPts=t.pts:e.maxSegmentPts=Math.max(e.maxSegmentPts,t.pts)),"number"===typeof t.dts&&(void 0===e.timelineStartInfo.dts&&(e.timelineStartInfo.dts=t.dts),void 0===e.minSegmentDts?e.minSegmentDts=t.dts:e.minSegmentDts=Math.min(e.minSegmentDts,t.dts),void 0===e.maxSegmentDts?e.maxSegmentDts=t.dts:e.maxSegmentDts=Math.max(e.maxSegmentDts,t.dts))},we=function(e){for(var t=0,n={payloadType:-1,payloadSize:0},r=0,i=0;t<e.byteLength&&128!==e[t];){for(;255===e[t];)r+=255,t++;for(r+=e[t++];255===e[t];)i+=255,t++;if(i+=e[t++],!n.payload&&4===r){if("GA94"===String.fromCharCode(e[t+3],e[t+4],e[t+5],e[t+6])){n.payloadType=r,n.payloadSize=i,n.payload=e.subarray(t,t+i);break}n.payload=void 0}t+=i,r=0,i=0}return n},ke=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)},Ce=function(e,t){var n,r,i,a,o=[];if(!(64&t[0]))return o;for(r=31&t[0],n=0;n<r;n++)a={type:3&t[(i=3*n)+2],pts:e},4&t[i+2]&&(a.ccData=t[i+3]<<8|t[i+4],o.push(a));return o},Ee=function(e){for(var t,n,r=e.byteLength,i=[],a=1;a<r-2;)0===e[a]&&0===e[a+1]&&3===e[a+2]?(i.push(a+2),a+=2):a++;if(0===i.length)return e;t=r-i.length,n=new Uint8Array(t);var o=0;for(a=0;a<t;o++,a++)o===i[0]&&(o++,i.shift()),n[a]=e[o];return n},Ae=4,xe=function e(t){t=t||{},e.prototype.init.call(this),this.parse708captions_="boolean"!==typeof t.parse708captions||t.parse708captions,this.captionPackets_=[],this.ccStreams_=[new Be(0,0),new Be(0,1),new Be(1,0),new Be(1,1)],this.parse708captions_&&(this.cc708Stream_=new De({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")))};(xe.prototype=new B).push=function(e){var t,n,r;if("sei_rbsp"===e.nalUnitType&&(t=we(e.escapedRBSP)).payload&&t.payloadType===Ae&&(n=ke(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));r=Ce(e.pts,n),this.captionPackets_=this.captionPackets_.concat(r),this.latestDts_!==e.dts&&(this.numSameDts_=0),this.numSameDts_++,this.latestDts_=e.dts}},xe.prototype.flushCCStreams=function(e){this.ccStreams_.forEach((function(t){return"flush"===e?t.flush():t.partialFlush()}),this)},xe.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)},xe.prototype.flush=function(){return this.flushStream("flush")},xe.prototype.partialFlush=function(){return this.flushStream("partialFlush")},xe.prototype.reset=function(){this.latestDts_=null,this.ignoreNextEqualDts_=!1,this.numSameDts_=0,this.activeCea608Channel_=[null,null],this.ccStreams_.forEach((function(e){e.reset()}))},xe.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)},xe.prototype.setsChannel1Active=function(e){return 4096===(30720&e.ccData)},xe.prototype.setsChannel2Active=function(e){return 6144===(30720&e.ccData)},xe.prototype.setsTextOrXDSActive=function(e){return 256===(28928&e.ccData)||4138===(30974&e.ccData)||6186===(30974&e.ccData)},xe.prototype.dispatchCea708Packet=function(e){this.parse708captions_&&this.cc708Stream_.push(e)};var Pe={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},Ie=function(e){return 32<=e&&e<=127||160<=e&&e<=255},Oe=function(e){this.windowNum=e,this.reset()};Oe.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},Oe.prototype.getText=function(){return this.rows.join("\n")},Oe.prototype.clearText=function(){this.rows=[""],this.rowIdx=0},Oe.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--},Oe.prototype.isEmpty=function(){return 0===this.rows.length||1===this.rows.length&&""===this.rows[0]},Oe.prototype.addText=function(e){this.rows[this.rowIdx]+=e},Oe.prototype.backspace=function(){if(!this.isEmpty()){var e=this.rows[this.rowIdx];this.rows[this.rowIdx]=e.substr(0,e.length-1)}};var Le=function(e,t,n){this.serviceNum=e,this.text="",this.currentWindow=new Oe(-1),this.windows=[],this.stream=n,"string"===typeof t&&this.createTextDecoder(t)};Le.prototype.init=function(e,t){this.startPts=e;for(var n=0;n<8;n++)this.windows[n]=new Oe(n),"function"===typeof t&&(this.windows[n].beforeRowOverflow=t)},Le.prototype.setCurrentWindow=function(e){this.currentWindow=this.windows[e]},Le.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 De=function e(t){t=t||{},e.prototype.init.call(this);var n,r=this,i=t.captionServices||{},a={};Object.keys(i).forEach((function(e){n=i[e],/^SERVICE/.test(e)&&(a[e]=n.encoding)})),this.serviceEncodings=a,this.current708Packet=null,this.services={},this.push=function(e){3===e.type?(r.new708Packet(),r.add708Bytes(e)):(null===r.current708Packet&&r.new708Packet(),r.add708Bytes(e))}};De.prototype=new B,De.prototype.new708Packet=function(){null!==this.current708Packet&&this.push708Packet(),this.current708Packet={data:[],ptsVals:[]}},De.prototype.add708Bytes=function(e){var t=e.ccData,n=t>>>8,r=255&t;this.current708Packet.ptsVals.push(e.pts),this.current708Packet.data.push(n),this.current708Packet.data.push(r)},De.prototype.push708Packet=function(){var e=this.current708Packet,t=e.data,n=null,r=null,i=0,a=t[i++];for(e.seq=a>>6,e.sizeCode=63&a;i<t.length;i++)r=31&(a=t[i++]),7===(n=a>>5)&&r>0&&(n=a=t[i++]),this.pushServiceBlock(n,i,r),r>0&&(i+=r-1)},De.prototype.pushServiceBlock=function(e,t,n){var r,i=t,a=this.current708Packet.data,o=this.services[e];for(o||(o=this.initService(e,i));i<t+n&&i<a.length;i++)r=a[i],Ie(r)?i=this.handleText(i,o):24===r?i=this.multiByteCharacter(i,o):16===r?i=this.extendedCommands(i,o):128<=r&&r<=135?i=this.setCurrentWindow(i,o):152<=r&&r<=159?i=this.defineWindow(i,o):136===r?i=this.clearWindows(i,o):140===r?i=this.deleteWindows(i,o):137===r?i=this.displayWindows(i,o):138===r?i=this.hideWindows(i,o):139===r?i=this.toggleWindows(i,o):151===r?i=this.setWindowAttributes(i,o):144===r?i=this.setPenAttributes(i,o):145===r?i=this.setPenColor(i,o):146===r?i=this.setPenLocation(i,o):143===r?o=this.reset(i,o):8===r?o.currentWindow.backspace():12===r?o.currentWindow.clearText():13===r?o.currentWindow.pendingNewLine=!0:14===r?o.currentWindow.clearText():141===r&&i++},De.prototype.extendedCommands=function(e,t){var n=this.current708Packet.data[++e];return Ie(n)&&(e=this.handleText(e,t,{isExtended:!0})),e},De.prototype.getPts=function(e){return this.current708Packet.ptsVals[Math.floor(e/2)]},De.prototype.initService=function(e,t){var n,r,i=this;return(n="SERVICE"+e)in this.serviceEncodings&&(r=this.serviceEncodings[n]),this.services[e]=new Le(e,r,i),this.services[e].init(this.getPts(t),(function(t){i.flushDisplayed(t,i.services[e])})),this.services[e]},De.prototype.handleText=function(e,t,n){var r,i,a=n&&n.isExtended,o=n&&n.isMultiByte,s=this.current708Packet.data,u=a?4096:0,l=s[e],c=s[e+1],d=t.currentWindow;return t.textDecoder_&&!a?(o?(i=[l,c],e++):i=[l],r=t.textDecoder_.decode(new Uint8Array(i))):r=function(e){var t=Pe[e]||e;return 4096&e&&e===t?"":String.fromCharCode(t)}(u|l),d.pendingNewLine&&!d.isEmpty()&&d.newLine(this.getPts(e)),d.pendingNewLine=!1,d.addText(r),e},De.prototype.multiByteCharacter=function(e,t){var n=this.current708Packet.data,r=n[e+1],i=n[e+2];return Ie(r)&&Ie(i)&&(e=this.handleText(++e,t,{isMultiByte:!0})),e},De.prototype.setCurrentWindow=function(e,t){var n=7&this.current708Packet.data[e];return t.setCurrentWindow(n),e},De.prototype.defineWindow=function(e,t){var n=this.current708Packet.data,r=n[e],i=7&r;t.setCurrentWindow(i);var a=t.currentWindow;return r=n[++e],a.visible=(32&r)>>5,a.rowLock=(16&r)>>4,a.columnLock=(8&r)>>3,a.priority=7&r,r=n[++e],a.relativePositioning=(128&r)>>7,a.anchorVertical=127&r,r=n[++e],a.anchorHorizontal=r,r=n[++e],a.anchorPoint=(240&r)>>4,a.rowCount=15&r,r=n[++e],a.columnCount=63&r,r=n[++e],a.windowStyle=(56&r)>>3,a.penStyle=7&r,a.virtualRowCount=a.rowCount+1,e},De.prototype.setWindowAttributes=function(e,t){var n=this.current708Packet.data,r=n[e],i=t.currentWindow.winAttr;return r=n[++e],i.fillOpacity=(192&r)>>6,i.fillRed=(48&r)>>4,i.fillGreen=(12&r)>>2,i.fillBlue=3&r,r=n[++e],i.borderType=(192&r)>>6,i.borderRed=(48&r)>>4,i.borderGreen=(12&r)>>2,i.borderBlue=3&r,r=n[++e],i.borderType+=(128&r)>>5,i.wordWrap=(64&r)>>6,i.printDirection=(48&r)>>4,i.scrollDirection=(12&r)>>2,i.justify=3&r,r=n[++e],i.effectSpeed=(240&r)>>4,i.effectDirection=(12&r)>>2,i.displayEffect=3&r,e},De.prototype.flushDisplayed=function(e,t){for(var n=[],r=0;r<8;r++)t.windows[r].visible&&!t.windows[r].isEmpty()&&n.push(t.windows[r].getText());t.endPts=e,t.text=n.join("\n\n"),this.pushCaption(t),t.startPts=e},De.prototype.pushCaption=function(e){""!==e.text&&(this.trigger("data",{startPts:e.startPts,endPts:e.endPts,text:e.text,stream:"cc708_"+e.serviceNum}),e.text="",e.startPts=e.endPts)},De.prototype.displayWindows=function(e,t){var n=this.current708Packet.data[++e],r=this.getPts(e);this.flushDisplayed(r,t);for(var i=0;i<8;i++)n&1<<i&&(t.windows[i].visible=1);return e},De.prototype.hideWindows=function(e,t){var n=this.current708Packet.data[++e],r=this.getPts(e);this.flushDisplayed(r,t);for(var i=0;i<8;i++)n&1<<i&&(t.windows[i].visible=0);return e},De.prototype.toggleWindows=function(e,t){var n=this.current708Packet.data[++e],r=this.getPts(e);this.flushDisplayed(r,t);for(var i=0;i<8;i++)n&1<<i&&(t.windows[i].visible^=1);return e},De.prototype.clearWindows=function(e,t){var n=this.current708Packet.data[++e],r=this.getPts(e);this.flushDisplayed(r,t);for(var i=0;i<8;i++)n&1<<i&&t.windows[i].clearText();return e},De.prototype.deleteWindows=function(e,t){var n=this.current708Packet.data[++e],r=this.getPts(e);this.flushDisplayed(r,t);for(var i=0;i<8;i++)n&1<<i&&t.windows[i].reset();return e},De.prototype.setPenAttributes=function(e,t){var n=this.current708Packet.data,r=n[e],i=t.currentWindow.penAttr;return r=n[++e],i.textTag=(240&r)>>4,i.offset=(12&r)>>2,i.penSize=3&r,r=n[++e],i.italics=(128&r)>>7,i.underline=(64&r)>>6,i.edgeType=(56&r)>>3,i.fontStyle=7&r,e},De.prototype.setPenColor=function(e,t){var n=this.current708Packet.data,r=n[e],i=t.currentWindow.penColor;return r=n[++e],i.fgOpacity=(192&r)>>6,i.fgRed=(48&r)>>4,i.fgGreen=(12&r)>>2,i.fgBlue=3&r,r=n[++e],i.bgOpacity=(192&r)>>6,i.bgRed=(48&r)>>4,i.bgGreen=(12&r)>>2,i.bgBlue=3&r,r=n[++e],i.edgeRed=(48&r)>>4,i.edgeGreen=(12&r)>>2,i.edgeBlue=3&r,e},De.prototype.setPenLocation=function(e,t){var n=this.current708Packet.data,r=n[e],i=t.currentWindow.penLoc;return t.currentWindow.pendingNewLine=!0,r=n[++e],i.row=15&r,r=n[++e],i.column=63&r,e},De.prototype.reset=function(e,t){var n=this.getPts(e);return this.flushDisplayed(n,t),this.initService(t.serviceNum,e)};var Me={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},Re=function(e){return null===e?"":(e=Me[e]||e,String.fromCharCode(e))},Ne=[4352,4384,4608,4640,5376,5408,5632,5664,5888,5920,4096,4864,4896,5120,5152],je=function(){for(var e=[],t=15;t--;)e.push("");return e},Be=function e(t,n){e.prototype.init.call(this),this.field_=t||0,this.dataChannel_=n||0,this.name_="CC"+(1+(this.field_<<1|this.dataChannel_)),this.setConstants(),this.reset(),this.push=function(e){var t,n,r,i,a;if((t=32639&e.ccData)!==this.lastControlCode_){if(4096===(61440&t)?this.lastControlCode_=t:t!==this.PADDING_&&(this.lastControlCode_=null),r=t>>>8,i=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),n=this.displayed_,this.displayed_=this.nonDisplayed_,this.nonDisplayed_=n,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_=je();else if(t===this.ERASE_NON_DISPLAYED_MEMORY_)this.nonDisplayed_=je();else if(t===this.RESUME_DIRECT_CAPTIONING_)"paintOn"!==this.mode_&&(this.flushDisplayed(e.pts),this.displayed_=je()),this.mode_="paintOn",this.startPts_=e.pts;else if(this.isSpecialCharacter(r,i))a=Re((r=(3&r)<<8)|i),this[this.mode_](e.pts,a),this.column_++;else if(this.isExtCharacter(r,i))"popOn"===this.mode_?this.nonDisplayed_[this.row_]=this.nonDisplayed_[this.row_].slice(0,-1):this.displayed_[this.row_]=this.displayed_[this.row_].slice(0,-1),a=Re((r=(3&r)<<8)|i),this[this.mode_](e.pts,a),this.column_++;else if(this.isMidRowCode(r,i))this.clearFormatting(e.pts),this[this.mode_](e.pts," "),this.column_++,14===(14&i)&&this.addFormatting(e.pts,["i"]),1===(1&i)&&this.addFormatting(e.pts,["u"]);else if(this.isOffsetControlCode(r,i))this.column_+=3&i;else if(this.isPAC(r,i)){var o=Ne.indexOf(7968&t);"rollUp"===this.mode_&&(o-this.rollUpRows_+1<0&&(o=this.rollUpRows_-1),this.setRollUp(e.pts,o)),o!==this.row_&&(this.clearFormatting(e.pts),this.row_=o),1&i&&-1===this.formatting_.indexOf("u")&&this.addFormatting(e.pts,["u"]),16===(16&t)&&(this.column_=4*((14&t)>>1)),this.isColorPAC(i)&&14===(14&i)&&this.addFormatting(e.pts,["i"])}else this.isNormalChar(r)&&(0===i&&(i=null),a=Re(r),a+=Re(i),this[this.mode_](e.pts,a),this.column_+=a.length)}else this.lastControlCode_=null}};Be.prototype=new B,Be.prototype.flushDisplayed=function(e){var t=this.displayed_.map((function(e,t){try{return e.trim()}catch(n){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_})},Be.prototype.reset=function(){this.mode_="popOn",this.topRow_=0,this.startPts_=0,this.displayed_=je(),this.nonDisplayed_=je(),this.lastControlCode_=null,this.column_=0,this.row_=14,this.rollUpRows_=2,this.formatting_=[]},Be.prototype.setConstants=function(){0===this.dataChannel_?(this.BASE_=16,this.EXT_=17,this.CONTROL_=(20|this.field_)<<8,this.OFFSET_=23):1===this.dataChannel_&&(this.BASE_=24,this.EXT_=25,this.CONTROL_=(28|this.field_)<<8,this.OFFSET_=31),this.PADDING_=0,this.RESUME_CAPTION_LOADING_=32|this.CONTROL_,this.END_OF_CAPTION_=47|this.CONTROL_,this.ROLL_UP_2_ROWS_=37|this.CONTROL_,this.ROLL_UP_3_ROWS_=38|this.CONTROL_,this.ROLL_UP_4_ROWS_=39|this.CONTROL_,this.CARRIAGE_RETURN_=45|this.CONTROL_,this.RESUME_DIRECT_CAPTIONING_=41|this.CONTROL_,this.BACKSPACE_=33|this.CONTROL_,this.ERASE_DISPLAYED_MEMORY_=44|this.CONTROL_,this.ERASE_NON_DISPLAYED_MEMORY_=46|this.CONTROL_},Be.prototype.isSpecialCharacter=function(e,t){return e===this.EXT_&&t>=48&&t<=63},Be.prototype.isExtCharacter=function(e,t){return(e===this.EXT_+1||e===this.EXT_+2)&&t>=32&&t<=63},Be.prototype.isMidRowCode=function(e,t){return e===this.EXT_&&t>=32&&t<=47},Be.prototype.isOffsetControlCode=function(e,t){return e===this.OFFSET_&&t>=33&&t<=35},Be.prototype.isPAC=function(e,t){return e>=this.BASE_&&e<this.BASE_+8&&t>=64&&t<=127},Be.prototype.isColorPAC=function(e){return e>=64&&e<=79||e>=96&&e<=127},Be.prototype.isNormalChar=function(e){return e>=32&&e<=127},Be.prototype.setRollUp=function(e,t){if("rollUp"!==this.mode_&&(this.row_=14,this.mode_="rollUp",this.flushDisplayed(e),this.nonDisplayed_=je(),this.displayed_=je()),void 0!==t&&t!==this.row_)for(var n=0;n<this.rollUpRows_;n++)this.displayed_[t-n]=this.displayed_[this.row_-n],this.displayed_[this.row_-n]="";void 0===t&&(t=this.row_),this.topRow_=t-this.rollUpRows_+1},Be.prototype.addFormatting=function(e,t){this.formatting_=this.formatting_.concat(t);var n=t.reduce((function(e,t){return e+"<"+t+">"}),"");this[this.mode_](e,n)},Be.prototype.clearFormatting=function(e){if(this.formatting_.length){var t=this.formatting_.reverse().reduce((function(e,t){return e+"</"+t+">"}),"");this.formatting_=[],this[this.mode_](e,t)}},Be.prototype.popOn=function(e,t){var n=this.nonDisplayed_[this.row_];n+=t,this.nonDisplayed_[this.row_]=n},Be.prototype.rollUp=function(e,t){var n=this.displayed_[this.row_];n+=t,this.displayed_[this.row_]=n},Be.prototype.shiftRowsUp_=function(){var e;for(e=0;e<this.topRow_;e++)this.displayed_[e]="";for(e=this.row_+1;e<15;e++)this.displayed_[e]="";for(e=this.topRow_;e<this.row_;e++)this.displayed_[e]=this.displayed_[e+1];this.displayed_[this.row_]=""},Be.prototype.paintOn=function(e,t){var n=this.displayed_[this.row_];n+=t,this.displayed_[this.row_]=n};var Ue={CaptionStream:xe,Cea608Stream:Be,Cea708Stream:De},Fe={H264_STREAM_TYPE:27,ADTS_STREAM_TYPE:15,METADATA_STREAM_TYPE:21},qe=function(e,t){var n=1;for(e>t&&(n=-1);Math.abs(t-e)>4294967296;)e+=8589934592*n;return e},He=function e(t){var n,r;e.prototype.init.call(this),this.type_=t||"shared",this.push=function(e){"shared"!==this.type_&&e.type!==this.type_||(void 0===r&&(r=e.dts),e.dts=qe(e.dts,r),e.pts=qe(e.pts,r),n=e.dts,this.trigger("data",e))},this.flush=function(){r=n,this.trigger("done")},this.endTimeline=function(){this.flush(),this.trigger("endedtimeline")},this.discontinuity=function(){r=void 0,n=void 0},this.reset=function(){this.discontinuity(),this.trigger("reset")}};He.prototype=new B;var ze,We=He,Ve=qe,Ke=function(e,t,n){var r,i="";for(r=t;r<n;r++)i+="%"+("00"+e[r].toString(16)).slice(-2);return i},Ge=function(e,t,n){return decodeURIComponent(Ke(e,t,n))},Xe=function(e){return e[0]<<21|e[1]<<14|e[2]<<7|e[3]},Ye={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=Ge(e.data,1,t),e.value=Ge(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=Ge(e.data,1,t),e.url=Ge(e.data,t+1,e.data.length);break}},PRIV:function(e){var t,n;for(t=0;t<e.data.length;t++)if(0===e.data[t]){e.owner=(n=e.data,unescape(Ke(n,0,t)));break}e.privateData=e.data.subarray(t+1),e.data=e.privateData}};(ze=function(e){var t,n={descriptor:e&&e.descriptor},r=0,i=[],a=0;if(ze.prototype.init.call(this),this.dispatchType=Fe.METADATA_STREAM_TYPE.toString(16),n.descriptor)for(t=0;t<n.descriptor.length;t++)this.dispatchType+=("00"+n.descriptor[t].toString(16)).slice(-2);this.push=function(e){var t,n,o,s,u;if("timed-metadata"===e.type)if(e.dataAlignmentIndicator&&(a=0,i.length=0),0===i.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(i.push(e),a+=e.data.byteLength,1===i.length&&(r=Xe(e.data.subarray(6,10)),r+=10),!(a<r)){for(t={data:new Uint8Array(r),frames:[],pts:i[0].pts,dts:i[0].dts},u=0;u<r;)t.data.set(i[0].data.subarray(0,r-u),u),u+=i[0].data.byteLength,a-=i[0].data.byteLength,i.shift();n=10,64&t.data[5]&&(n+=4,n+=Xe(t.data.subarray(10,14)),r-=Xe(t.data.subarray(16,20)));do{if((o=Xe(t.data.subarray(n+4,n+8)))<1)return void this.trigger("log",{level:"warn",message:"Malformed ID3 frame encountered. Skipping metadata parsing."});if((s={id:String.fromCharCode(t.data[n],t.data[n+1],t.data[n+2],t.data[n+3]),data:t.data.subarray(n+10,n+o+10)}).key=s.id,Ye[s.id]&&(Ye[s.id](s),"com.apple.streaming.transportStreamTimestamp"===s.owner)){var l=s.data,c=(1&l[3])<<30|l[4]<<22|l[5]<<14|l[6]<<6|l[7]>>>2;c*=4,c+=3&l[7],s.timeStamp=c,void 0===t.pts&&void 0===t.dts&&(t.pts=s.timeStamp,t.dts=s.timeStamp),this.trigger("timestamp",s)}t.frames.push(s),n+=10,n+=o}while(n<r);this.trigger("data",t)}}}).prototype=new B;var Qe,$e,Ze,Je=ze,et=We;(Qe=function(){var e=new Uint8Array(188),t=0;Qe.prototype.init.call(this),this.push=function(n){var r,i=0,a=188;for(t?((r=new Uint8Array(n.byteLength+t)).set(e.subarray(0,t)),r.set(n,t),t=0):r=n;a<r.byteLength;)71!==r[i]||71!==r[a]?(i++,a++):(this.trigger("data",r.subarray(i,a)),i+=188,a+=188);i<r.byteLength&&(e.set(r.subarray(i),0),t=r.byteLength-i)},this.flush=function(){188===t&&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 B,($e=function(){var e,t,n,r;$e.prototype.init.call(this),r=this,this.packetsWaitingForPmt=[],this.programMapTable=void 0,e=function(e,r){var i=0;r.payloadUnitStartIndicator&&(i+=e[i]+1),"pat"===r.type?t(e.subarray(i),r):n(e.subarray(i),r)},t=function(e,t){t.section_number=e[7],t.last_section_number=e[8],r.pmtPid=(31&e[10])<<8|e[11],t.pmtPid=r.pmtPid},n=function(e,t){var n,i;if(1&e[5]){for(r.programMapTable={video:null,audio:null,"timed-metadata":{}},n=3+((15&e[1])<<8|e[2])-4,i=12+((15&e[10])<<8|e[11]);i<n;){var a=e[i],o=(31&e[i+1])<<8|e[i+2];a===Fe.H264_STREAM_TYPE&&null===r.programMapTable.video?r.programMapTable.video=o:a===Fe.ADTS_STREAM_TYPE&&null===r.programMapTable.audio?r.programMapTable.audio=o:a===Fe.METADATA_STREAM_TYPE&&(r.programMapTable["timed-metadata"][o]=a),i+=5+((15&e[i+3])<<8|e[i+4])}t.programMapTable=r.programMapTable}},this.push=function(t){var n={},r=4;if(n.payloadUnitStartIndicator=!!(64&t[1]),n.pid=31&t[1],n.pid<<=8,n.pid|=t[2],(48&t[3])>>>4>1&&(r+=t[r]+1),0===n.pid)n.type="pat",e(t.subarray(r),n),this.trigger("data",n);else if(n.pid===this.pmtPid)for(n.type="pmt",e(t.subarray(r),n),this.trigger("data",n);this.packetsWaitingForPmt.length;)this.processPes_.apply(this,this.packetsWaitingForPmt.shift());else void 0===this.programMapTable?this.packetsWaitingForPmt.push([t,r,n]):this.processPes_(t,r,n)},this.processPes_=function(e,t,n){n.pid===this.programMapTable.video?n.streamType=Fe.H264_STREAM_TYPE:n.pid===this.programMapTable.audio?n.streamType=Fe.ADTS_STREAM_TYPE:n.streamType=this.programMapTable["timed-metadata"][n.pid],n.type="pes",n.data=e.subarray(t),this.trigger("data",n)}}).prototype=new B,$e.STREAM_TYPES={h264:27,adts:15},(Ze=function(){var e,t=this,n=!1,r={data:[],size:0},i={data:[],size:0},a={data:[],size:0},o=function(e,n,r){var i,a,o=new Uint8Array(e.size),s={type:n},u=0,l=0;if(e.data.length&&!(e.size<9)){for(s.trackId=e.data[0].pid,u=0;u<e.data.length;u++)a=e.data[u],o.set(a.data,l),l+=a.data.byteLength;!function(e,t){var n,r=e[0]<<16|e[1]<<8|e[2];t.data=new Uint8Array,1===r&&(t.packetLength=6+(e[4]<<8|e[5]),t.dataAlignmentIndicator=0!==(4&e[6]),192&(n=e[7])&&(t.pts=(14&e[9])<<27|(255&e[10])<<20|(254&e[11])<<12|(255&e[12])<<5|(254&e[13])>>>3,t.pts*=4,t.pts+=(6&e[13])>>>1,t.dts=t.pts,64&n&&(t.dts=(14&e[14])<<27|(255&e[15])<<20|(254&e[16])<<12|(255&e[17])<<5|(254&e[18])>>>3,t.dts*=4,t.dts+=(6&e[18])>>>1)),t.data=e.subarray(9+e[8]))}(o,s),i="video"===n||s.packetLength<=e.size,(r||i)&&(e.size=0,e.data.length=0),i&&t.trigger("data",s)}};Ze.prototype.init.call(this),this.push=function(s){({pat:function(){},pes:function(){var e,t;switch(s.streamType){case Fe.H264_STREAM_TYPE:e=r,t="video";break;case Fe.ADTS_STREAM_TYPE:e=i,t="audio";break;case Fe.METADATA_STREAM_TYPE:e=a,t="timed-metadata";break;default:return}s.payloadUnitStartIndicator&&o(e,t,!0),e.data.push(s),e.size+=s.data.byteLength},pmt:function(){var r={type:"metadata",tracks:[]};null!==(e=s.programMapTable).video&&r.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+e.video,codec:"avc",type:"video"}),null!==e.audio&&r.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+e.audio,codec:"adts",type:"audio"}),n=!0,t.trigger("data",r)}})[s.type]()},this.reset=function(){r.size=0,r.data.length=0,i.size=0,i.data.length=0,this.trigger("reset")},this.flushStreams_=function(){o(r,"video"),o(i,"audio"),o(a,"timed-metadata")},this.flush=function(){if(!n&&e){var r={type:"metadata",tracks:[]};null!==e.video&&r.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+e.video,codec:"avc",type:"video"}),null!==e.audio&&r.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+e.audio,codec:"adts",type:"audio"}),t.trigger("data",r)}n=!1,this.flushStreams_(),this.trigger("done")}}).prototype=new B;var tt={PAT_PID:0,MP2T_PACKET_LENGTH:188,TransportPacketStream:Qe,TransportParseStream:$e,ElementaryStream:Ze,TimestampRolloverStream:et,CaptionStream:Ue.CaptionStream,Cea608Stream:Ue.Cea608Stream,Cea708Stream:Ue.Cea708Stream,MetadataStream:Je};for(var nt in Fe)Fe.hasOwnProperty(nt)&&(tt[nt]=Fe[nt]);var rt,it=tt,at=le,ot=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];(rt=function(e){var t,n=0;rt.prototype.init.call(this),this.skipWarn_=function(e,t){this.trigger("log",{level:"warn",message:"adts skiping bytes "+e+" to "+t+" in frame "+n+" outside syncword"})},this.push=function(r){var i,a,o,s,u,l=0;if(e||(n=0),"audio"===r.type){var c;for(t&&t.length?(o=t,(t=new Uint8Array(o.byteLength+r.data.byteLength)).set(o),t.set(r.data,o.byteLength)):t=r.data;l+7<t.length;)if(255===t[l]&&240===(246&t[l+1])){if("number"===typeof c&&(this.skipWarn_(c,l),c=null),a=2*(1&~t[l+1]),i=(3&t[l+3])<<11|t[l+4]<<3|(224&t[l+5])>>5,u=(s=1024*(1+(3&t[l+6])))*at/ot[(60&t[l+2])>>>2],t.byteLength-l<i)break;this.trigger("data",{pts:r.pts+n*u,dts:r.dts+n*u,sampleCount:s,audioobjecttype:1+(t[l+2]>>>6&3),channelcount:(1&t[l+2])<<2|(192&t[l+3])>>>6,samplerate:ot[(60&t[l+2])>>>2],samplingfrequencyindex:(60&t[l+2])>>>2,samplesize:16,data:t.subarray(l+7+a,l+i)}),n++,l+=i}else"number"!==typeof c&&(c=l),l++;"number"===typeof c&&(this.skipWarn_(c,l),c=null),t=t.subarray(l)}},this.flush=function(){n=0,this.trigger("done")},this.reset=function(){t=void 0,this.trigger("reset")},this.endTimeline=function(){t=void 0,this.trigger("endedtimeline")}}).prototype=new B;var st,ut,lt,ct=rt,dt=function(e){var t=e.byteLength,n=0,r=0;this.length=function(){return 8*t},this.bitsAvailable=function(){return 8*t+r},this.loadWord=function(){var i=e.byteLength-t,a=new Uint8Array(4),o=Math.min(4,t);if(0===o)throw new Error("no bytes available");a.set(e.subarray(i,i+o)),n=new DataView(a.buffer).getUint32(0),r=8*o,t-=o},this.skipBits=function(e){var i;r>e?(n<<=e,r-=e):(e-=r,e-=8*(i=Math.floor(e/8)),t-=i,this.loadWord(),n<<=e,r-=e)},this.readBits=function(e){var i=Math.min(r,e),a=n>>>32-i;return(r-=i)>0?n<<=i:t>0&&this.loadWord(),(i=e-i)>0?a<<i|this.readBits(i):a},this.skipLeadingZeros=function(){var e;for(e=0;e<r;++e)if(0!==(n&2147483648>>>e))return n<<=e,r-=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()};(ut=function(){var e,t,n=0;ut.prototype.init.call(this),this.push=function(r){var i;t?((i=new Uint8Array(t.byteLength+r.data.byteLength)).set(t),i.set(r.data,t.byteLength),t=i):t=r.data;for(var a=t.byteLength;n<a-3;n++)if(1===t[n+2]){e=n+5;break}for(;e<a;)switch(t[e]){case 0:if(0!==t[e-1]){e+=2;break}if(0!==t[e-2]){e++;break}n+3!==e-2&&this.trigger("data",t.subarray(n+3,e-2));do{e++}while(1!==t[e]&&e<a);n=e-2,e+=3;break;case 1:if(0!==t[e-1]||0!==t[e-2]){e+=3;break}this.trigger("data",t.subarray(n+3,e-2)),n=e-2,e+=3;break;default:e+=3}t=t.subarray(n),e-=n,n=0},this.reset=function(){t=null,n=0,this.trigger("reset")},this.flush=function(){t&&t.byteLength>3&&this.trigger("data",t.subarray(n+3)),t=null,n=0,this.trigger("done")},this.endTimeline=function(){this.flush(),this.trigger("endedtimeline")}}).prototype=new B,lt={100:!0,110:!0,122:!0,244:!0,44:!0,83:!0,86:!0,118:!0,128:!0,138:!0,139:!0,134:!0},(st=function(){var e,t,n,r,i,a,o,s=new ut;st.prototype.init.call(this),e=this,this.push=function(e){"video"===e.type&&(t=e.trackId,n=e.pts,r=e.dts,s.push(e))},s.on("data",(function(o){var s={trackId:t,pts:n,dts:r,data:o,nalUnitTypeCode:31&o[0]};switch(s.nalUnitTypeCode){case 5:s.nalUnitType="slice_layer_without_partitioning_rbsp_idr";break;case 6:s.nalUnitType="sei_rbsp",s.escapedRBSP=i(o.subarray(1));break;case 7:s.nalUnitType="seq_parameter_set_rbsp",s.escapedRBSP=i(o.subarray(1)),s.config=a(s.escapedRBSP);break;case 8:s.nalUnitType="pic_parameter_set_rbsp";break;case 9:s.nalUnitType="access_unit_delimiter_rbsp"}e.trigger("data",s)})),s.on("done",(function(){e.trigger("done")})),s.on("partialdone",(function(){e.trigger("partialdone")})),s.on("reset",(function(){e.trigger("reset")})),s.on("endedtimeline",(function(){e.trigger("endedtimeline")})),this.flush=function(){s.flush()},this.partialFlush=function(){s.partialFlush()},this.reset=function(){s.reset()},this.endTimeline=function(){s.endTimeline()},o=function(e,t){var n,r=8,i=8;for(n=0;n<e;n++)0!==i&&(i=(r+t.readExpGolomb()+256)%256),r=0===i?r:i},i=function(e){for(var t,n,r=e.byteLength,i=[],a=1;a<r-2;)0===e[a]&&0===e[a+1]&&3===e[a+2]?(i.push(a+2),a+=2):a++;if(0===i.length)return e;t=r-i.length,n=new Uint8Array(t);var o=0;for(a=0;a<t;o++,a++)o===i[0]&&(o++,i.shift()),n[a]=e[o];return n},a=function(e){var t,n,r,i,a,s,u,l,c,d,h,p,f=0,m=0,g=0,v=0,y=[1,1];if(n=(t=new dt(e)).readUnsignedByte(),i=t.readUnsignedByte(),r=t.readUnsignedByte(),t.skipUnsignedExpGolomb(),lt[n]&&(3===(a=t.readUnsignedExpGolomb())&&t.skipBits(1),t.skipUnsignedExpGolomb(),t.skipUnsignedExpGolomb(),t.skipBits(1),t.readBoolean()))for(h=3!==a?8:12,p=0;p<h;p++)t.readBoolean()&&o(p<6?16:64,t);if(t.skipUnsignedExpGolomb(),0===(s=t.readUnsignedExpGolomb()))t.readUnsignedExpGolomb();else if(1===s)for(t.skipBits(1),t.skipExpGolomb(),t.skipExpGolomb(),u=t.readUnsignedExpGolomb(),p=0;p<u;p++)t.skipExpGolomb();if(t.skipUnsignedExpGolomb(),t.skipBits(1),l=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:n,levelIdc:r,profileCompatibility:i,width:16*(l+1)-2*f-2*m,height:(2-d)*(c+1)*16-2*g-2*v,sarRatio:y}}}).prototype=new B;var ht,pt={H264Stream:st,NalByteStream:ut},ft=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350],mt=function(e,t){var n=e[t+6]<<21|e[t+7]<<14|e[t+8]<<7|e[t+9];return n=n>=0?n:0,(16&e[t+5])>>4?n+20:n+10},gt=function(e){return e[0]<<21|e[1]<<14|e[2]<<7|e[3]},vt={isLikelyAacData:function(e){var t=function e(t,n){return t.length-n<10||t[n]!=="I".charCodeAt(0)||t[n+1]!=="D".charCodeAt(0)||t[n+2]!=="3".charCodeAt(0)?n:e(t,n+=mt(t,n))}(e,0);return e.length>=t+2&&255===(255&e[t])&&240===(240&e[t+1])&&16===(22&e[t+1])},parseId3TagSize:mt,parseAdtsSize:function(e,t){var n=(224&e[t+5])>>5,r=e[t+4]<<3;return 6144&e[t+3]|r|n},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 ft[(60&e[t+2])>>>2];t++}return null},parseAacTimestamp:function(e){var t,n,r;t=10,64&e[5]&&(t+=4,t+=gt(e.subarray(10,14)));do{if((n=gt(e.subarray(t+4,t+8)))<1)return null;if("PRIV"===String.fromCharCode(e[t],e[t+1],e[t+2],e[t+3])){r=e.subarray(t+10,t+n+10);for(var i=0;i<r.byteLength;i++)if(0===r[i]){if("com.apple.streaming.transportStreamTimestamp"===unescape(function(e,t,n){var r,i="";for(r=t;r<n;r++)i+="%"+("00"+e[r].toString(16)).slice(-2);return i}(r,0,i))){var a=r.subarray(i+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+=n}while(t<e.byteLength);return null}};(ht=function(){var e=new Uint8Array,t=0;ht.prototype.init.call(this),this.setTimestamp=function(e){t=e},this.push=function(n){var r,i,a,o,s=0,u=0;for(e.length?(o=e.length,(e=new Uint8Array(n.byteLength+o)).set(e.subarray(0,o)),e.set(n,o)):e=n;e.length-u>=3;)if(e[u]!=="I".charCodeAt(0)||e[u+1]!=="D".charCodeAt(0)||e[u+2]!=="3".charCodeAt(0))if(255!==(255&e[u])||240!==(240&e[u+1]))u++;else{if(e.length-u<7)break;if(u+(s=vt.parseAdtsSize(e,u))>e.length)break;a={type:"audio",data:e.subarray(u,u+s),pts:t,dts:t},this.trigger("data",a),u+=s}else{if(e.length-u<10)break;if(u+(s=vt.parseId3TagSize(e,u))>e.length)break;i={type:"timed-metadata",data:e.subarray(u,u+s)},this.trigger("data",i),u+=s}r=e.length-u,e=r>0?e.subarray(u):new Uint8Array},this.reset=function(){e=new Uint8Array,this.trigger("reset")},this.endTimeline=function(){e=new Uint8Array,this.trigger("endedtimeline")}}).prototype=new B;var yt,bt,_t,Tt,St=ht,wt=["audioobjecttype","channelcount","samplerate","samplingfrequencyindex","samplesize"],kt=["width","height","profileIdc","levelIdc","profileCompatibility","sarRatio"],Ct=pt.H264Stream,Et=vt.isLikelyAacData,At=le,xt=function(e,t){t.stream=e,this.trigger("log",t)},Pt=function(e,t){for(var n=Object.keys(t),r=0;r<n.length;r++){var i=n[r];"headOfPipeline"!==i&&t[i].on&&t[i].on("log",xt.bind(e,i))}},It=function(e,t){var n;if(e.length!==t.length)return!1;for(n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0},Ot=function(e,t,n,r,i,a){return{start:{dts:e,pts:e+(n-t)},end:{dts:e+(r-t),pts:e+(i-n)},prependedContentDuration:a,baseMediaDecodeTime:e}};(bt=function(e,t){var n,r=[],i=0,a=0,o=1/0;n=(t=t||{}).firstSequenceNumber||0,bt.prototype.init.call(this),this.push=function(t){Se(e,t),e&&wt.forEach((function(n){e[n]=t[n]})),r.push(t)},this.setEarliestDts=function(e){i=e},this.setVideoBaseMediaDecodeTime=function(e){o=e},this.setAudioAppendStart=function(e){a=e},this.flush=function(){var s,u,l,c,d,h,p;0!==r.length?(s=ge(r,e,i),e.baseMediaDecodeTime=Te(e,t.keepOriginalTimestamps),p=me(e,s,a,o),e.samples=ve(s),l=Q(ye(s)),r=[],u=$(n,[e]),c=new Uint8Array(u.byteLength+l.byteLength),n++,c.set(u),c.set(l,u.byteLength),_e(e),d=Math.ceil(1024*At/e.samplerate),s.length&&(h=s.length*d,this.trigger("segmentTimingInfo",Ot(he(e.baseMediaDecodeTime,e.samplerate),s[0].dts,s[0].pts,s[0].dts+h,s[0].pts+h,p||0)),this.trigger("timingInfo",{start:s[0].pts,end:s[0].pts+h})),this.trigger("data",{track:e,boxes:c}),this.trigger("done","AudioSegmentStream")):this.trigger("done","AudioSegmentStream")},this.reset=function(){_e(e),r=[],this.trigger("reset")}}).prototype=new B,(yt=function(e,t){var n,r,i,a=[],o=[];n=(t=t||{}).firstSequenceNumber||0,yt.prototype.init.call(this),delete e.minPTS,this.gopCache_=[],this.push=function(t){Se(e,t),"seq_parameter_set_rbsp"!==t.nalUnitType||r||(r=t.config,e.sps=[t.data],kt.forEach((function(t){e[t]=r[t]}),this)),"pic_parameter_set_rbsp"!==t.nalUnitType||i||(i=t.data,e.pps=[t.data]),a.push(t)},this.flush=function(){for(var r,i,s,u,l,c,d,h,p=0;a.length&&"access_unit_delimiter_rbsp"!==a[0].nalUnitType;)a.shift();if(0===a.length)return this.resetStream_(),void this.trigger("done","VideoSegmentStream");if(r=ee(a),(s=te(r))[0][0].keyFrame||((i=this.getGopForFusion_(a[0],e))?(p=i.duration,s.unshift(i),s.byteLength+=i.byteLength,s.nalCount+=i.nalCount,s.pts=i.pts,s.dts=i.dts,s.duration+=i.duration):s=ne(s)),o.length){var f;if(!(f=t.alignGopsAtEnd?this.alignGopsAtEnd_(s):this.alignGopsAtStart_(s)))return this.gopCache_.unshift({gop:s.pop(),pps:e.pps,sps:e.sps}),this.gopCache_.length=Math.min(6,this.gopCache_.length),a=[],this.resetStream_(),void this.trigger("done","VideoSegmentStream");_e(e),s=f}Se(e,s),e.samples=re(s),l=Q(ie(s)),e.baseMediaDecodeTime=Te(e,t.keepOriginalTimestamps),this.trigger("processedGopsInfo",s.map((function(e){return{pts:e.pts,dts:e.dts,byteLength:e.byteLength}}))),d=s[0],h=s[s.length-1],this.trigger("segmentTimingInfo",Ot(e.baseMediaDecodeTime,d.dts,d.pts,h.dts+h.duration,h.pts+h.duration,p)),this.trigger("timingInfo",{start:s[0].pts,end:s[s.length-1].pts+s[s.length-1].duration}),this.gopCache_.unshift({gop:s.pop(),pps:e.pps,sps:e.sps}),this.gopCache_.length=Math.min(6,this.gopCache_.length),a=[],this.trigger("baseMediaDecodeTime",e.baseMediaDecodeTime),this.trigger("timelineStartInfo",e.timelineStartInfo),u=$(n,[e]),c=new Uint8Array(u.byteLength+l.byteLength),n++,c.set(u),c.set(l,u.byteLength),this.trigger("data",{track:e,boxes:c}),this.resetStream_(),this.trigger("done","VideoSegmentStream")},this.reset=function(){this.resetStream_(),a=[],this.gopCache_.length=0,o.length=0,this.trigger("reset")},this.resetStream_=function(){_e(e),r=void 0,i=void 0},this.getGopForFusion_=function(t){var n,r,i,a,o,s=1/0;for(o=0;o<this.gopCache_.length;o++)i=(a=this.gopCache_[o]).gop,e.pps&&It(e.pps[0],a.pps[0])&&e.sps&&It(e.sps[0],a.sps[0])&&(i.dts<e.timelineStartInfo.dts||(n=t.dts-i.dts-i.duration)>=-1e4&&n<=45e3&&(!r||s>n)&&(r=a,s=n));return r?r.gop:null},this.alignGopsAtStart_=function(e){var t,n,r,i,a,s,u,l;for(a=e.byteLength,s=e.nalCount,u=e.duration,t=n=0;t<o.length&&n<e.length&&(r=o[t],i=e[n],r.pts!==i.pts);)i.pts>r.pts?t++:(n++,a-=i.byteLength,s-=i.nalCount,u-=i.duration);return 0===n?e:n===e.length?null:((l=e.slice(n)).byteLength=a,l.duration=u,l.nalCount=s,l.pts=l[0].pts,l.dts=l[0].dts,l)},this.alignGopsAtEnd_=function(e){var t,n,r,i,a,s,u;for(t=o.length-1,n=e.length-1,a=null,s=!1;t>=0&&n>=0;){if(r=o[t],i=e[n],r.pts===i.pts){s=!0;break}r.pts>i.pts?t--:(t===o.length-1&&(a=n),n--)}if(!s&&null===a)return null;if(0===(u=s?n:a))return e;var l=e.slice(u),c=l.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 l.byteLength=c.byteLength,l.duration=c.duration,l.nalCount=c.nalCount,l.pts=l[0].pts,l.dts=l[0].dts,l},this.alignGopsWith=function(e){o=e}}).prototype=new B,(Tt=function(e,t){this.numberOfTracks=0,this.metadataStream=t,"undefined"!==typeof(e=e||{}).remux?this.remuxTracks=!!e.remux:this.remuxTracks=!0,"boolean"===typeof e.keepOriginalTimestamps?this.keepOriginalTimestamps=e.keepOriginalTimestamps:this.keepOriginalTimestamps=!1,this.pendingTracks=[],this.videoTrack=null,this.pendingBoxes=[],this.pendingCaptions=[],this.pendingMetadata=[],this.pendingBytes=0,this.emittedTracks=0,Tt.prototype.init.call(this),this.push=function(e){return e.text?this.pendingCaptions.push(e):e.frames?this.pendingMetadata.push(e):(this.pendingTracks.push(e.track),this.pendingBytes+=e.boxes.byteLength,"video"===e.track.type&&(this.videoTrack=e.track,this.pendingBoxes.push(e.boxes)),void("audio"===e.track.type&&(this.audioTrack=e.track,this.pendingBoxes.unshift(e.boxes))))}}).prototype=new B,Tt.prototype.flush=function(e){var t,n,r,i,a=0,o={captions:[],captionStreams:{},metadata:[],info:{}},s=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?(s=this.videoTrack.timelineStartInfo.pts,kt.forEach((function(e){o.info[e]=this.videoTrack[e]}),this)):this.audioTrack&&(s=this.audioTrack.timelineStartInfo.pts,wt.forEach((function(e){o.info[e]=this.audioTrack[e]}),this)),this.videoTrack||this.audioTrack){for(1===this.pendingTracks.length?o.type=this.pendingTracks[0].type:o.type="combined",this.emittedTracks+=this.pendingTracks.length,r=Z(this.pendingTracks),o.initSegment=new Uint8Array(r.byteLength),o.initSegment.set(r),o.data=new Uint8Array(this.pendingBytes),i=0;i<this.pendingBoxes.length;i++)o.data.set(this.pendingBoxes[i],a),a+=this.pendingBoxes[i].byteLength;for(i=0;i<this.pendingCaptions.length;i++)(t=this.pendingCaptions[i]).startTime=fe(t.startPts,s,this.keepOriginalTimestamps),t.endTime=fe(t.endPts,s,this.keepOriginalTimestamps),o.captionStreams[t.stream]=!0,o.captions.push(t);for(i=0;i<this.pendingMetadata.length;i++)(n=this.pendingMetadata[i]).cueTime=fe(n.pts,s,this.keepOriginalTimestamps),o.metadata.push(n);for(o.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",o),i=0;i<o.captions.length;i++)t=o.captions[i],this.trigger("caption",t);for(i=0;i<o.metadata.length;i++)n=o.metadata[i],this.trigger("id3Frame",n)}this.emittedTracks>=this.numberOfTracks&&(this.trigger("done"),this.emittedTracks=0)},Tt.prototype.setRemux=function(e){this.remuxTracks=e},(_t=function(e){var t,n,r=this,i=!0;_t.prototype.init.call(this),e=e||{},this.baseMediaDecodeTime=e.baseMediaDecodeTime||0,this.transmuxPipeline_={},this.setupAacPipeline=function(){var i={};this.transmuxPipeline_=i,i.type="aac",i.metadataStream=new it.MetadataStream,i.aacStream=new St,i.audioTimestampRolloverStream=new it.TimestampRolloverStream("audio"),i.timedMetadataTimestampRolloverStream=new it.TimestampRolloverStream("timed-metadata"),i.adtsStream=new ct,i.coalesceStream=new Tt(e,i.metadataStream),i.headOfPipeline=i.aacStream,i.aacStream.pipe(i.audioTimestampRolloverStream).pipe(i.adtsStream),i.aacStream.pipe(i.timedMetadataTimestampRolloverStream).pipe(i.metadataStream).pipe(i.coalesceStream),i.metadataStream.on("timestamp",(function(e){i.aacStream.setTimestamp(e.timeStamp)})),i.aacStream.on("data",(function(a){"timed-metadata"!==a.type&&"audio"!==a.type||i.audioSegmentStream||(n=n||{timelineStartInfo:{baseMediaDecodeTime:r.baseMediaDecodeTime},codec:"adts",type:"audio"},i.coalesceStream.numberOfTracks++,i.audioSegmentStream=new bt(n,e),i.audioSegmentStream.on("log",r.getLogTrigger_("audioSegmentStream")),i.audioSegmentStream.on("timingInfo",r.trigger.bind(r,"audioTimingInfo")),i.adtsStream.pipe(i.audioSegmentStream).pipe(i.coalesceStream),r.trigger("trackinfo",{hasAudio:!!n,hasVideo:!!t}))})),i.coalesceStream.on("data",this.trigger.bind(this,"data")),i.coalesceStream.on("done",this.trigger.bind(this,"done")),Pt(this,i)},this.setupTsPipeline=function(){var i={};this.transmuxPipeline_=i,i.type="ts",i.metadataStream=new it.MetadataStream,i.packetStream=new it.TransportPacketStream,i.parseStream=new it.TransportParseStream,i.elementaryStream=new it.ElementaryStream,i.timestampRolloverStream=new it.TimestampRolloverStream,i.adtsStream=new ct,i.h264Stream=new Ct,i.captionStream=new it.CaptionStream(e),i.coalesceStream=new Tt(e,i.metadataStream),i.headOfPipeline=i.packetStream,i.packetStream.pipe(i.parseStream).pipe(i.elementaryStream).pipe(i.timestampRolloverStream),i.timestampRolloverStream.pipe(i.h264Stream),i.timestampRolloverStream.pipe(i.adtsStream),i.timestampRolloverStream.pipe(i.metadataStream).pipe(i.coalesceStream),i.h264Stream.pipe(i.captionStream).pipe(i.coalesceStream),i.elementaryStream.on("data",(function(a){var o;if("metadata"===a.type){for(o=a.tracks.length;o--;)t||"video"!==a.tracks[o].type?n||"audio"!==a.tracks[o].type||((n=a.tracks[o]).timelineStartInfo.baseMediaDecodeTime=r.baseMediaDecodeTime):(t=a.tracks[o]).timelineStartInfo.baseMediaDecodeTime=r.baseMediaDecodeTime;t&&!i.videoSegmentStream&&(i.coalesceStream.numberOfTracks++,i.videoSegmentStream=new yt(t,e),i.videoSegmentStream.on("log",r.getLogTrigger_("videoSegmentStream")),i.videoSegmentStream.on("timelineStartInfo",(function(t){n&&!e.keepOriginalTimestamps&&(n.timelineStartInfo=t,i.audioSegmentStream.setEarliestDts(t.dts-r.baseMediaDecodeTime))})),i.videoSegmentStream.on("processedGopsInfo",r.trigger.bind(r,"gopInfo")),i.videoSegmentStream.on("segmentTimingInfo",r.trigger.bind(r,"videoSegmentTimingInfo")),i.videoSegmentStream.on("baseMediaDecodeTime",(function(e){n&&i.audioSegmentStream.setVideoBaseMediaDecodeTime(e)})),i.videoSegmentStream.on("timingInfo",r.trigger.bind(r,"videoTimingInfo")),i.h264Stream.pipe(i.videoSegmentStream).pipe(i.coalesceStream)),n&&!i.audioSegmentStream&&(i.coalesceStream.numberOfTracks++,i.audioSegmentStream=new bt(n,e),i.audioSegmentStream.on("log",r.getLogTrigger_("audioSegmentStream")),i.audioSegmentStream.on("timingInfo",r.trigger.bind(r,"audioTimingInfo")),i.audioSegmentStream.on("segmentTimingInfo",r.trigger.bind(r,"audioSegmentTimingInfo")),i.adtsStream.pipe(i.audioSegmentStream).pipe(i.coalesceStream)),r.trigger("trackinfo",{hasAudio:!!n,hasVideo:!!t})}})),i.coalesceStream.on("data",this.trigger.bind(this,"data")),i.coalesceStream.on("id3Frame",(function(e){e.dispatchType=i.metadataStream.dispatchType,r.trigger("id3Frame",e)})),i.coalesceStream.on("caption",this.trigger.bind(this,"caption")),i.coalesceStream.on("done",this.trigger.bind(this,"done")),Pt(this,i)},this.setBaseMediaDecodeTime=function(r){var i=this.transmuxPipeline_;e.keepOriginalTimestamps||(this.baseMediaDecodeTime=r),n&&(n.timelineStartInfo.dts=void 0,n.timelineStartInfo.pts=void 0,_e(n),i.audioTimestampRolloverStream&&i.audioTimestampRolloverStream.discontinuity()),t&&(i.videoSegmentStream&&(i.videoSegmentStream.gopCache_=[]),t.timelineStartInfo.dts=void 0,t.timelineStartInfo.pts=void 0,_e(t),i.captionStream.reset()),i.timestampRolloverStream&&i.timestampRolloverStream.discontinuity()},this.setAudioAppendStart=function(e){n&&this.transmuxPipeline_.audioSegmentStream.setAudioAppendStart(e)},this.setRemux=function(t){var n=this.transmuxPipeline_;e.remux=t,n&&n.coalesceStream&&n.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(n){n.stream=e,t.trigger("log",n)}},this.push=function(e){if(i){var t=Et(e);t&&"aac"!==this.transmuxPipeline_.type?this.setupAacPipeline():t||"ts"===this.transmuxPipeline_.type||this.setupTsPipeline(),i=!1}this.transmuxPipeline_.headOfPipeline.push(e)},this.flush=function(){i=!0,this.transmuxPipeline_.headOfPipeline.flush()},this.endTimeline=function(){this.transmuxPipeline_.headOfPipeline.endTimeline()},this.reset=function(){this.transmuxPipeline_.headOfPipeline&&this.transmuxPipeline_.headOfPipeline.reset()},this.resetCaptions=function(){this.transmuxPipeline_.captionStream&&this.transmuxPipeline_.captionStream.reset()}}).prototype=new B;var Lt,Dt,Mt,Rt={Transmuxer:_t,VideoSegmentStream:yt,AudioSegmentStream:bt,AUDIO_PROPERTIES:wt,VIDEO_PROPERTIES:kt,generateSegmentTimingInfo:Ot},Nt=function(e){return e>>>0},jt=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])},Bt=Nt,Ut=function e(t,n){var r,i,a,o,s,u=[];if(!n.length)return null;for(r=0;r<t.byteLength;)i=Bt(t[r]<<24|t[r+1]<<16|t[r+2]<<8|t[r+3]),a=jt(t.subarray(r+4,r+8)),o=i>1?r+i:t.byteLength,a===n[0]&&(1===n.length?u.push(t.subarray(r+8,o)):(s=e(t.subarray(r+8,o),n.slice(1))).length&&(u=u.concat(s))),r=o;return u},Ft=Nt,qt=F.getUint64,Ht=function(e){var t={version:e[0],flags:new Uint8Array(e.subarray(1,4))};return 1===t.version?t.baseMediaDecodeTime=qt(e.subarray(4)):t.baseMediaDecodeTime=Ft(e[4]<<24|e[5]<<16|e[6]<<8|e[7]),t},zt=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]}},Wt=function(e){var t,n={version:e[0],flags:new Uint8Array(e.subarray(1,4)),samples:[]},r=new DataView(e.buffer,e.byteOffset,e.byteLength),i=1&n.flags[2],a=4&n.flags[2],o=1&n.flags[1],s=2&n.flags[1],u=4&n.flags[1],l=8&n.flags[1],c=r.getUint32(4),d=8;for(i&&(n.dataOffset=r.getInt32(d),d+=4),a&&c&&(t={flags:zt(e.subarray(d,d+4))},d+=4,o&&(t.duration=r.getUint32(d),d+=4),s&&(t.size=r.getUint32(d),d+=4),l&&(1===n.version?t.compositionTimeOffset=r.getInt32(d):t.compositionTimeOffset=r.getUint32(d),d+=4),n.samples.push(t),c--);c--;)t={},o&&(t.duration=r.getUint32(d),d+=4),s&&(t.size=r.getUint32(d),d+=4),u&&(t.flags=zt(e.subarray(d,d+4)),d+=4),l&&(1===n.version?t.compositionTimeOffset=r.getInt32(d):t.compositionTimeOffset=r.getUint32(d),d+=4),n.samples.push(t);return n},Vt=function(e){var t,n=new DataView(e.buffer,e.byteOffset,e.byteLength),r={version:e[0],flags:new Uint8Array(e.subarray(1,4)),trackId:n.getUint32(4)},i=1&r.flags[2],a=2&r.flags[2],o=8&r.flags[2],s=16&r.flags[2],u=32&r.flags[2],l=65536&r.flags[0],c=131072&r.flags[0];return t=8,i&&(t+=4,r.baseDataOffset=n.getUint32(12),t+=4),a&&(r.sampleDescriptionIndex=n.getUint32(t),t+=4),o&&(r.defaultSampleDuration=n.getUint32(t),t+=4),s&&(r.defaultSampleSize=n.getUint32(t),t+=4),u&&(r.defaultSampleFlags=n.getUint32(t)),l&&(r.durationIsEmpty=!0),!i&&c&&(r.baseDataOffsetIsMoof=!0),r},Kt="undefined"!==typeof globalThis?globalThis:"undefined"!==typeof window?window:"undefined"!==typeof e?e:"undefined"!==typeof self?self:{},Gt="undefined"!==typeof window?window:"undefined"!==typeof Kt?Kt:"undefined"!==typeof self?self:{},Xt=Ee,Yt=Ue.CaptionStream,Qt=function(e,t){for(var n=e,r=0;r<t.length;r++){var i=t[r];if(n<i.size)return i;n-=i.size}return null},$t=function(e,t){var n=Ut(e,["moof","traf"]),r=Ut(e,["mdat"]),i={},a=[];return r.forEach((function(e,t){var r=n[t];a.push({mdat:e,traf:r})})),a.forEach((function(e){var n,r=e.mdat,a=e.traf,o=Ut(a,["tfhd"]),s=Vt(o[0]),u=s.trackId,l=Ut(a,["tfdt"]),c=l.length>0?Ht(l[0]).baseMediaDecodeTime:0,d=Ut(a,["trun"]);t===u&&d.length>0&&(n=function(e,t,n){var r,i,a,o,s=new DataView(e.buffer,e.byteOffset,e.byteLength),u={logs:[],seiNals:[]};for(i=0;i+4<e.length;i+=a)if(a=s.getUint32(i),i+=4,!(a<=0))switch(31&e[i]){case 6:var l=e.subarray(i+1,i+1+a),c=Qt(i,t);if(r={nalUnitType:"sei_rbsp",size:a,data:l,escapedRBSP:Xt(l),trackId:n},c)r.pts=c.pts,r.dts=c.dts,o=c;else{if(!o){u.logs.push({level:"warn",message:"We've encountered a nal unit without data at "+i+" for trackId "+n+". See mux.js#223."});break}r.pts=o.pts,r.dts=o.dts}u.seiNals.push(r)}return u}(r,function(e,t,n){var r=t,i=n.defaultSampleDuration||0,a=n.defaultSampleSize||0,o=n.trackId,s=[];return e.forEach((function(e){var t=Wt(e).samples;t.forEach((function(e){void 0===e.duration&&(e.duration=i),void 0===e.size&&(e.size=a),e.trackId=o,e.dts=r,void 0===e.compositionTimeOffset&&(e.compositionTimeOffset=0),"bigint"===typeof r?(e.pts=r+Gt.BigInt(e.compositionTimeOffset),r+=Gt.BigInt(e.duration)):(e.pts=r+e.compositionTimeOffset,r+=e.duration)})),s=s.concat(t)})),s}(d,c,s),u),i[u]||(i[u]={seiNals:[],logs:[]}),i[u].seiNals=i[u].seiNals.concat(n.seiNals),i[u].logs=i[u].logs.concat(n.logs))})),i},Zt=function(){var e,t,n,r,i,a,o=!1;this.isInitialized=function(){return o},this.init=function(t){e=new Yt,o=!0,a=!!t&&t.isPartial,e.on("data",(function(e){e.startTime=e.startPts/r,e.endTime=e.endPts/r,i.captions.push(e),i.captionStreams[e.stream]=!0})),e.on("log",(function(e){i.logs.push(e)}))},this.isNewInit=function(e,t){return!(e&&0===e.length||t&&"object"===typeof t&&0===Object.keys(t).length)&&(n!==e[0]||r!==t[n])},this.parse=function(e,a,o){var s;if(!this.isInitialized())return null;if(!a||!o)return null;if(this.isNewInit(a,o))n=a[0],r=o[n];else if(null===n||!r)return t.push(e),null;for(;t.length>0;){var u=t.shift();this.parse(u,a,o)}return(s=function(e,t,n){if(null===t)return null;var r=$t(e,t)[t]||{};return{seiNals:r.seiNals,logs:r.logs,timescale:n}}(e,n,r))&&s.logs&&(i.logs=i.logs.concat(s.logs)),null!==s&&s.seiNals?(this.pushNals(s.seiNals),this.flushStream(),i):i.logs.length?{logs:i.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;a?e.partialFlush():e.flush()},this.clearParsedCaptions=function(){i.captions=[],i.captionStreams={},i.logs=[]},this.resetCaptionStream=function(){if(!this.isInitialized())return null;e.reset()},this.clearAllCaptions=function(){this.clearParsedCaptions(),this.resetCaptionStream()},this.reset=function(){t=[],n=null,r=null,i?this.clearParsedCaptions():i={captions:[],captionStreams:{},logs:[]},this.resetCaptionStream()},this.reset()},Jt=Nt,en=function(e){return("00"+e.toString(16)).slice(-2)},tn=F.getUint64;Lt=function(e,t){var n=Ut(t,["moof","traf"]).reduce((function(t,n){var r,i,a=Ut(n,["tfhd"])[0],o=Jt(a[4]<<24|a[5]<<16|a[6]<<8|a[7]),s=e[o]||9e4,u=Ut(n,["tfdt"])[0],l=new DataView(u.buffer,u.byteOffset,u.byteLength);return"bigint"===typeof(r=1===u[0]?tn(u.subarray(4,12)):l.getUint32(4))?i=r/Gt.BigInt(s):"number"!==typeof r||isNaN(r)||(i=r/s),i<Number.MAX_SAFE_INTEGER&&(i=Number(i)),i<t&&(t=i),t}),1/0);return"bigint"===typeof n||isFinite(n)?n:0},Dt=function(e){var t=Ut(e,["moov","trak"]),n=[];return t.forEach((function(e){var t,r,i={},a=Ut(e,["tkhd"])[0];a&&(r=(t=new DataView(a.buffer,a.byteOffset,a.byteLength)).getUint8(0),i.id=0===r?t.getUint32(12):t.getUint32(20));var o=Ut(e,["mdia","hdlr"])[0];if(o){var s=jt(o.subarray(8,12));i.type="vide"===s?"video":"soun"===s?"audio":s}var u=Ut(e,["mdia","minf","stbl","stsd"])[0];if(u){var l=u.subarray(8);i.codec=jt(l.subarray(4,8));var c,d=Ut(l,[i.codec])[0];d&&(/^[asm]vc[1-9]$/i.test(i.codec)?(c=d.subarray(78),"avcC"===jt(c.subarray(4,8))&&c.length>11?(i.codec+=".",i.codec+=en(c[9]),i.codec+=en(c[10]),i.codec+=en(c[11])):i.codec="avc1.4d400d"):/^mp4[a,v]$/i.test(i.codec)?(c=d.subarray(28),"esds"===jt(c.subarray(4,8))&&c.length>20&&0!==c[19]?(i.codec+="."+en(c[19]),i.codec+="."+en(c[20]>>>2&63).replace(/^0/,"")):i.codec="mp4a.40.2"):i.codec=i.codec.toLowerCase())}var h=Ut(e,["mdia","mdhd"])[0];h&&(i.timescale=Mt(h)),n.push(i)})),n};var nn=Lt,rn=Dt,an=(Mt=function(e){var t=0===e[0]?12:20;return Jt(e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3])},function(e){var t=31&e[1];return t<<=8,t|=e[2]}),on=function(e){return!!(64&e[1])},sn=function(e){var t=0;return(48&e[3])>>>4>1&&(t+=e[4]+1),t},un=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}},ln={parseType:function(e,t){var n=an(e);return 0===n?"pat":n===t?"pmt":t?"pes":null},parsePat:function(e){var t=on(e),n=4+sn(e);return t&&(n+=e[n]+1),(31&e[n+10])<<8|e[n+11]},parsePmt:function(e){var t={},n=on(e),r=4+sn(e);if(n&&(r+=e[r]+1),1&e[r+5]){var i;i=3+((15&e[r+1])<<8|e[r+2])-4;for(var a=12+((15&e[r+10])<<8|e[r+11]);a<i;){var o=r+a;t[(31&e[o+1])<<8|e[o+2]]=e[o],a+=5+((15&e[o+3])<<8|e[o+4])}return t}},parsePayloadUnitStartIndicator:on,parsePesType:function(e,t){switch(t[an(e)]){case Fe.H264_STREAM_TYPE:return"video";case Fe.ADTS_STREAM_TYPE:return"audio";case Fe.METADATA_STREAM_TYPE:return"timed-metadata";default:return null}},parsePesTime:function(e){if(!on(e))return null;var t=4+sn(e);if(t>=e.byteLength)return null;var n,r=null;return 192&(n=e[t+7])&&((r={}).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,r.pts*=4,r.pts+=(6&e[t+13])>>>1,r.dts=r.pts,64&n&&(r.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,r.dts*=4,r.dts+=(6&e[t+18])>>>1)),r},videoPacketContainsKeyFrame:function(e){for(var t=4+sn(e),n=e.subarray(t),r=0,i=0,a=!1;i<n.byteLength-3;i++)if(1===n[i+2]){r=i+5;break}for(;r<n.byteLength;)switch(n[r]){case 0:if(0!==n[r-1]){r+=2;break}if(0!==n[r-2]){r++;break}i+3!==r-2&&"slice_layer_without_partitioning_rbsp_idr"===un(31&n[i+3])&&(a=!0);do{r++}while(1!==n[r]&&r<n.length);i=r-2,r+=3;break;case 1:if(0!==n[r-1]||0!==n[r-2]){r+=3;break}"slice_layer_without_partitioning_rbsp_idr"===un(31&n[i+3])&&(a=!0),i=r-2,r+=3;break;default:r+=3}return n=n.subarray(i),r-=i,i=0,n&&n.byteLength>3&&"slice_layer_without_partitioning_rbsp_idr"===un(31&n[i+3])&&(a=!0),a}},cn=Ve,dn={};dn.ts=ln,dn.aac=vt;var hn=le,pn=function(e,t,n){for(var r,i,a,o,s=0,u=188,l=!1;u<=e.byteLength;)if(71!==e[s]||71!==e[u]&&u!==e.byteLength)s++,u++;else{switch(r=e.subarray(s,u),dn.ts.parseType(r,t.pid)){case"pes":i=dn.ts.parsePesType(r,t.table),a=dn.ts.parsePayloadUnitStartIndicator(r),"audio"===i&&a&&(o=dn.ts.parsePesTime(r))&&(o.type="audio",n.audio.push(o),l=!0)}if(l)break;s+=188,u+=188}for(s=(u=e.byteLength)-188,l=!1;s>=0;)if(71!==e[s]||71!==e[u]&&u!==e.byteLength)s--,u--;else{switch(r=e.subarray(s,u),dn.ts.parseType(r,t.pid)){case"pes":i=dn.ts.parsePesType(r,t.table),a=dn.ts.parsePayloadUnitStartIndicator(r),"audio"===i&&a&&(o=dn.ts.parsePesTime(r))&&(o.type="audio",n.audio.push(o),l=!0)}if(l)break;s-=188,u-=188}},fn=function(e,t,n){for(var r,i,a,o,s,u,l,c=0,d=188,h=!1,p={data:[],size:0};d<e.byteLength;)if(71!==e[c]||71!==e[d])c++,d++;else{switch(r=e.subarray(c,d),dn.ts.parseType(r,t.pid)){case"pes":if(i=dn.ts.parsePesType(r,t.table),a=dn.ts.parsePayloadUnitStartIndicator(r),"video"===i&&(a&&!h&&(o=dn.ts.parsePesTime(r))&&(o.type="video",n.video.push(o),h=!0),!n.firstKeyFrame)){if(a&&0!==p.size){for(s=new Uint8Array(p.size),u=0;p.data.length;)l=p.data.shift(),s.set(l,u),u+=l.byteLength;if(dn.ts.videoPacketContainsKeyFrame(s)){var f=dn.ts.parsePesTime(s);f?(n.firstKeyFrame=f,n.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(r),p.size+=r.byteLength}}if(h&&n.firstKeyFrame)break;c+=188,d+=188}for(c=(d=e.byteLength)-188,h=!1;c>=0;)if(71!==e[c]||71!==e[d])c--,d--;else{switch(r=e.subarray(c,d),dn.ts.parseType(r,t.pid)){case"pes":i=dn.ts.parsePesType(r,t.table),a=dn.ts.parsePayloadUnitStartIndicator(r),"video"===i&&a&&(o=dn.ts.parsePesTime(r))&&(o.type="video",n.video.push(o),h=!0)}if(h)break;c-=188,d-=188}},mn=function(e){var t={pid:null,table:null},n={};for(var r in function(e,t){for(var n,r=0,i=188;i<e.byteLength;)if(71!==e[r]||71!==e[i])r++,i++;else{switch(n=e.subarray(r,i),dn.ts.parseType(n,t.pid)){case"pat":t.pid=dn.ts.parsePat(n);break;case"pmt":var a=dn.ts.parsePmt(n);t.table=t.table||{},Object.keys(a).forEach((function(e){t.table[e]=a[e]}))}r+=188,i+=188}}(e,t),t.table){if(t.table.hasOwnProperty(r))switch(t.table[r]){case Fe.H264_STREAM_TYPE:n.video=[],fn(e,t,n),0===n.video.length&&delete n.video;break;case Fe.ADTS_STREAM_TYPE:n.audio=[],pn(e,t,n),0===n.audio.length&&delete n.audio}}return n},gn=function(e,t){var n;return(n=dn.aac.isLikelyAacData(e)?function(e){for(var t,n=!1,r=0,i=null,a=null,o=0,s=0;e.length-s>=3;){switch(dn.aac.parseType(e,s)){case"timed-metadata":if(e.length-s<10){n=!0;break}if((o=dn.aac.parseId3TagSize(e,s))>e.length){n=!0;break}null===a&&(t=e.subarray(s,s+o),a=dn.aac.parseAacTimestamp(t)),s+=o;break;case"audio":if(e.length-s<7){n=!0;break}if((o=dn.aac.parseAdtsSize(e,s))>e.length){n=!0;break}null===i&&(t=e.subarray(s,s+o),i=dn.aac.parseSampleRate(t)),r++,s+=o;break;default:s++}if(n)return null}if(null===i||null===a)return null;var u=hn/i;return{audio:[{type:"audio",dts:a,pts:a},{type:"audio",dts:a+1024*r*u,pts:a+1024*r*u}]}}(e):mn(e))&&(n.audio||n.video)?(function(e,t){if(e.audio&&e.audio.length){var n=t;("undefined"===typeof n||isNaN(n))&&(n=e.audio[0].dts),e.audio.forEach((function(e){e.dts=cn(e.dts,n),e.pts=cn(e.pts,n),e.dtsTime=e.dts/hn,e.ptsTime=e.pts/hn}))}if(e.video&&e.video.length){var r=t;if(("undefined"===typeof r||isNaN(r))&&(r=e.video[0].dts),e.video.forEach((function(e){e.dts=cn(e.dts,r),e.pts=cn(e.pts,r),e.dtsTime=e.dts/hn,e.ptsTime=e.pts/hn})),e.firstKeyFrame){var i=e.firstKeyFrame;i.dts=cn(i.dts,r),i.pts=cn(i.pts,r),i.dtsTime=i.dts/hn,i.ptsTime=i.pts/hn}}}(n,t),n):null},vn=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 Rt.Transmuxer(this.options),function(e,t){t.on("data",(function(t){var n=t.initSegment;t.initSegment={data:n.buffer,byteOffset:n.byteOffset,byteLength:n.byteLength};var r=t.data;t.data=r.buffer,e.postMessage({action:"data",segment:t,byteOffset:r.byteOffset,byteLength:r.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 n={start:{decode:de(t.start.dts),presentation:de(t.start.pts)},end:{decode:de(t.end.dts),presentation:de(t.end.pts)},baseMediaDecodeTime:de(t.baseMediaDecodeTime)};t.prependedContentDuration&&(n.prependedContentDuration=de(t.prependedContentDuration)),e.postMessage({action:"videoSegmentTimingInfo",videoSegmentTimingInfo:n})})),t.on("audioSegmentTimingInfo",(function(t){var n={start:{decode:de(t.start.dts),presentation:de(t.start.pts)},end:{decode:de(t.end.dts),presentation:de(t.end.pts)},baseMediaDecodeTime:de(t.baseMediaDecodeTime)};t.prependedContentDuration&&(n.prependedContentDuration=de(t.prependedContentDuration)),e.postMessage({action:"audioSegmentTimingInfo",audioSegmentTimingInfo:n})})),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:de(t.start),end:de(t.end)}})})),t.on("videoTimingInfo",(function(t){e.postMessage({action:"videoTimingInfo",videoTimingInfo:{start:de(t.start),end:de(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 Zt,this.captionParser.init());var t=new Uint8Array(e.data,e.byteOffset,e.byteLength),n=this.captionParser.parse(t,e.trackIds,e.timescales);this.self.postMessage({action:"mp4Captions",captions:n&&n.captions||[],logs:n&&n.logs||[],data:t.buffer},[t.buffer])},t.probeMp4StartTime=function(e){var t=e.timescales,n=e.data,r=nn(t,n);this.self.postMessage({action:"probeMp4StartTime",startTime:r,data:n},[n.buffer])},t.probeMp4Tracks=function(e){var t=e.data,n=rn(t);this.self.postMessage({action:"probeMp4Tracks",tracks:n,data:t},[t.buffer])},t.probeTs=function(e){var t=e.data,n=e.baseStartTime,r="number"!==typeof n||isNaN(n)?void 0:n*le,i=gn(t,r),a=null;i&&((a={hasVideo:i.video&&2===i.video.length||!1,hasAudio:i.audio&&2===i.audio.length||!1}).hasVideo&&(a.videoStart=i.video[0].ptsTime),a.hasAudio&&(a.audioStart=i.audio[0].ptsTime)),this.self.postMessage({action:"probeTs",result:a,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(ce(t)))},t.setAudioAppendStart=function(e){this.transmuxer.setAudioAppendStart(Math.ceil(ce(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 vn(self,e.data.options):(this.messageHandlers||(this.messageHandlers=new vn(self)),e.data&&e.data.action&&"init"!==e.data.action&&this.messageHandlers[e.data.action]&&this.messageHandlers[e.data.action](e.data))}})))),mo=function(e){var t=e.transmuxer,n=e.bytes,r=e.audioAppendStart,i=e.gopsToAlignWith,a=e.remux,o=e.onData,s=e.onTrackInfo,u=e.onAudioTimingInfo,l=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:[]},b=v;if(t.onmessage=function(n){t.currentTransmux===e&&("data"===n.data.action&&function(e,t,n){var r=e.data.segment,i=r.type,a=r.initSegment,o=r.captions,s=r.captionStreams,u=r.metadata,l=r.videoFrameDtsTime,c=r.videoFramePtsTime;t.buffer.push({captions:o,captionStreams:s,metadata:u});var d=e.data.segment.boxes||{data:e.data.segment.data},h={type:i,data:new Uint8Array(d.data,d.data.byteOffset,d.data.byteLength),initSegment:new Uint8Array(a.data,a.byteOffset,a.byteLength)};"undefined"!==typeof l&&(h.videoFrameDtsTime=l),"undefined"!==typeof c&&(h.videoFramePtsTime=c),n(h)}(n,y,o),"trackinfo"===n.data.action&&s(n.data.trackInfo),"gopInfo"===n.data.action&&function(e,t){t.gopInfo=e.data.gopInfo}(n,y),"audioTimingInfo"===n.data.action&&u(n.data.audioTimingInfo),"videoTimingInfo"===n.data.action&&l(n.data.videoTimingInfo),"videoSegmentTimingInfo"===n.data.action&&c(n.data.videoSegmentTimingInfo),"audioSegmentTimingInfo"===n.data.action&&d(n.data.audioSegmentTimingInfo),"id3Frame"===n.data.action&&h([n.data.id3Frame],n.data.id3Frame.dispatchType),"caption"===n.data.action&&p(n.data.caption),"endedtimeline"===n.data.action&&(b=!1,m()),"log"===n.data.action&&g(n.data.log),"transmuxed"===n.data.type&&(b||(t.onmessage=null,function(e){var t=e.transmuxedData,n=e.callback;t.buffer=[],n(t)}({transmuxedData:y,callback:f}),go(t))))},r&&t.postMessage({action:"setAudioAppendStart",appendStart:r}),Array.isArray(i)&&t.postMessage({action:"alignGopsWith",gopsToAlignWith:i}),"undefined"!==typeof a&&t.postMessage({action:"setRemux",remux:a}),n.byteLength){var _=n instanceof ArrayBuffer?n:n.buffer,T=n instanceof ArrayBuffer?0:n.byteOffset;t.postMessage({action:"push",data:_,byteOffset:T,byteLength:n.byteLength},[_])}v&&t.postMessage({action:"endTimeline"}),t.postMessage({action:"flush"})},go=function(e){e.currentTransmux=null,e.transmuxQueue.length&&(e.currentTransmux=e.transmuxQueue.shift(),"function"===typeof e.currentTransmux?e.currentTransmux():mo(e.currentTransmux))},vo=function(e,t){e.postMessage({action:t}),go(e)},yo=function(e,t){if(!t.currentTransmux)return t.currentTransmux=e,void vo(t,e);t.transmuxQueue.push(vo.bind(null,t,e))},bo=function(e){if(!e.transmuxer.currentTransmux)return e.transmuxer.currentTransmux=e,void mo(e);e.transmuxer.transmuxQueue.push(e)},_o=function(e){yo("reset",e)},To=function(e){var t=new fo;t.currentTransmux=null,t.transmuxQueue=[];var n=t.terminate;return t.terminate=function(){return t.currentTransmux=null,t.transmuxQueue.length=0,n.call(t)},t.postMessage({action:"init",options:e}),t},So=function(e){var t=e.transmuxer,n=e.endAction||e.action,r=e.callback,i=l()({},e,{endAction:null,transmuxer:null,callback:null});if(t.addEventListener("message",(function i(a){a.data.action===n&&(t.removeEventListener("message",i),a.data.data&&(a.data.data=new Uint8Array(a.data.data,e.byteOffset||0,e.byteLength||a.data.data.byteLength),e.data&&(e.data=a.data.data)),r(a.data))})),e.data){var a=e.data instanceof ArrayBuffer;i.byteOffset=a?0:e.data.byteOffset,i.byteLength=e.data.byteLength;var o=[a?e.data:e.data.buffer];t.postMessage(i,o)}else t.postMessage(i)},wo=2,ko=-101,Co=-102,Eo=function(e){e.forEach((function(e){e.abort()}))},Ao=function(e,t){return t.timedout?{status:t.status,message:"HLS request timed-out at URL: "+t.uri,code:ko,xhr:t}:t.aborted?{status:t.status,message:"HLS request aborted at URL: "+t.uri,code:Co,xhr:t}:e?{status:t.status,message:"HLS request errored at URL: "+t.uri,code:wo,xhr:t}:"arraybuffer"===t.responseType&&0===t.response.byteLength?{status:t.status,message:"Empty HLS response at URL: "+t.uri,code:wo,xhr:t}:null},xo=function(e,t,n){return function(r,i){var a=i.response,o=Ao(r,i);if(o)return n(o,e);if(16!==a.byteLength)return n({status:i.status,message:"Invalid HLS key at URL: "+i.uri,code:wo,xhr:i},e);for(var s=new DataView(a),u=new Uint32Array([s.getUint32(0),s.getUint32(4),s.getUint32(8),s.getUint32(12)]),l=0;l<t.length;l++)t[l].bytes=u;return n(null,e)}},Po=function(e,t){var n=Object(R.a)(e.map.bytes);if("mp4"!==n){var r=e.map.resolvedUri||e.map.uri;return t({internal:!0,message:"Found unsupported "+(n||"unknown")+" container for initialization segment at URL: "+r,code:wo})}So({action:"probeMp4Tracks",data:e.map.bytes,transmuxer:e.transmuxer,callback:function(n){var r=n.tracks,i=n.data;return e.map.bytes=i,r.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)}})},Io=function(e){var t=e.segment,n=e.finishProcessingFn,r=e.responseType;return function(e,i){var a=Ao(e,i);if(a)return n(a,t);var o="arraybuffer"!==r&&i.responseText?function(e){for(var t=new Uint8Array(new ArrayBuffer(e.length)),n=0;n<e.length;n++)t[n]=e.charCodeAt(n);return t.buffer}(i.responseText.substring(t.lastReachedChar||0)):i.response;return t.stats=function(e){return{bandwidth:e.bandwidth,bytesReceived:e.bytesReceived||0,roundTripTime:e.roundTripTime||0}}(i),t.key?t.encryptedBytes=new Uint8Array(o):t.bytes=new Uint8Array(o),n(null,t)}},Oo=function(e){var t=e.segment,n=e.bytes,r=e.trackInfoFn,i=e.timingInfoFn,a=e.videoSegmentTimingInfoFn,o=e.audioSegmentTimingInfoFn,s=e.id3Fn,u=e.captionsFn,l=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=i.bind(null,t,"audio","start"),v=i.bind(null,t,"audio","end"),y=i.bind(null,t,"video","start"),b=i.bind(null,t,"video","end");So({action:"probeTs",transmuxer:t.transmuxer,data:n,baseStartTime:t.baseStartTime,callback:function(e){t.bytes=n=e.data;var i=e.result;i&&(r(t,{hasAudio:i.hasAudio,hasVideo:i.hasVideo,isMuxed:m}),r=null,i.hasAudio&&!m&&g(i.audioStart),i.hasVideo&&y(i.videoStart),g=null,y=null),bo({bytes:n,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){r&&(m&&(e.isMuxed=!0),r(t,e))},onAudioTimingInfo:function(e){g&&"undefined"!==typeof e.start&&(g(e.start),g=null),v&&"undefined"!==typeof e.end&&v(e.end)},onVideoTimingInfo:function(e){y&&"undefined"!==typeof e.start&&(y(e.start),y=null),b&&"undefined"!==typeof e.end&&b(e.end)},onVideoSegmentTimingInfo:function(e){a(e)},onAudioSegmentTimingInfo:function(e){o(e)},onId3:function(e,n){s(t,e,n)},onCaptions:function(e){u(t,[e])},isEndOfTimeline:l,onEndedTimeline:function(){c()},onTransmuxerLog:p,onDone:function(e){h&&(e.type="combined"===e.type?"video":e.type,h(null,t,e))}})}})},Lo=function(e){var t=e.segment,n=e.bytes,r=e.trackInfoFn,i=e.timingInfoFn,a=e.videoSegmentTimingInfoFn,o=e.audioSegmentTimingInfoFn,s=e.id3Fn,u=e.captionsFn,l=e.isEndOfTimeline,c=e.endedTimelineFn,d=e.dataFn,h=e.doneFn,p=e.onTransmuxerLog,f=new Uint8Array(n);if(Object(R.b)(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),r(t,g);var v=function(e){d(t,{data:f,type:g.hasAudio&&!g.isMuxed?"audio":"video"}),e&&e.length&&u(t,e),h(null,t,{})};So({action:"probeMp4StartTime",timescales:t.map.timescales,data:f,transmuxer:t.transmuxer,callback:function(e){var r=e.data,a=e.startTime;n=r.buffer,t.bytes=f=r,g.hasAudio&&!g.isMuxed&&i(t,"audio","start",a),g.hasVideo&&i(t,"video","start",a),m.video&&r.byteLength&&t.transmuxer?So({action:"pushMp4Captions",endAction:"mp4Captions",transmuxer:t.transmuxer,data:f,timescales:t.map.timescales,trackIds:[m.video.id],callback:function(e){n=e.data.buffer,t.bytes=f=e.data,e.logs.forEach((function(e){p(Ki.mergeOptions(e,{stream:"mp4CaptionParser"}))})),v(e.captions)}}):v()}})}else if(t.transmuxer){if("undefined"===typeof t.container&&(t.container=Object(R.a)(f)),"ts"!==t.container&&"aac"!==t.container)return r(t,{hasAudio:!1,hasVideo:!1}),void h(null,t,{});Oo({segment:t,bytes:n,trackInfoFn:r,timingInfoFn:i,videoSegmentTimingInfoFn:a,audioSegmentTimingInfoFn:o,id3Fn:s,captionsFn:u,isEndOfTimeline:l,endedTimelineFn:c,dataFn:d,doneFn:h,onTransmuxerLog:p})}else h(null,t,{})},Do=function(e,t){var n,r=e.id,i=e.key,a=e.encryptedBytes,o=e.decryptionWorker;o.addEventListener("message",(function e(n){if(n.data.source===r){o.removeEventListener("message",e);var i=n.data.decrypted;t(new Uint8Array(i.bytes,i.byteOffset,i.byteLength))}})),n=i.bytes.slice?i.bytes.slice():new Uint32Array(Array.prototype.slice.call(i.bytes)),o.postMessage(Ga({source:r,encrypted:a,key:n,iv:i.iv}),[a.buffer,n.buffer])},Mo=function(e){var t=e.activeXhrs,n=e.decryptionWorker,r=e.trackInfoFn,i=e.timingInfoFn,a=e.videoSegmentTimingInfoFn,o=e.audioSegmentTimingInfoFn,s=e.id3Fn,u=e.captionsFn,l=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,Eo(t),h(e,g);if((f+=1)===t.length){var v=function(){if(g.encryptedBytes)return function(e){var t=e.decryptionWorker,n=e.segment,r=e.trackInfoFn,i=e.timingInfoFn,a=e.videoSegmentTimingInfoFn,o=e.audioSegmentTimingInfoFn,s=e.id3Fn,u=e.captionsFn,l=e.isEndOfTimeline,c=e.endedTimelineFn,d=e.dataFn,h=e.doneFn,p=e.onTransmuxerLog;Do({id:n.requestId,key:n.key,encryptedBytes:n.encryptedBytes,decryptionWorker:t},(function(e){n.bytes=e,Lo({segment:n,bytes:n.bytes,trackInfoFn:r,timingInfoFn:i,videoSegmentTimingInfoFn:a,audioSegmentTimingInfoFn:o,id3Fn:s,captionsFn:u,isEndOfTimeline:l,endedTimelineFn:c,dataFn:d,doneFn:h,onTransmuxerLog:p})}))}({decryptionWorker:n,segment:g,trackInfoFn:r,timingInfoFn:i,videoSegmentTimingInfoFn:a,audioSegmentTimingInfoFn:o,id3Fn:s,captionsFn:u,isEndOfTimeline:l,endedTimelineFn:c,dataFn:d,doneFn:h,onTransmuxerLog:p});Lo({segment:g,bytes:g.bytes,trackInfoFn:r,timingInfoFn:i,videoSegmentTimingInfoFn:a,audioSegmentTimingInfoFn:o,id3Fn:s,captionsFn:u,isEndOfTimeline:l,endedTimelineFn:c,dataFn:d,doneFn:h,onTransmuxerLog:p})};if(g.endOfAllRequests=Date.now(),g.map&&g.map.encryptedBytes&&!g.map.bytes)return Do({decryptionWorker:n,id:g.requestId+"-init",encryptedBytes:g.map.encryptedBytes,key:g.map.key},(function(e){g.map.bytes=e,Po(g,(function(e){if(e)return Eo(t),h(e,g);v()}))}));v()}}}},Ro=function(e){var t=e.segment,n=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=Ki.mergeOptions(t.stats,function(e){var t=e.target,n={bandwidth:1/0,bytesReceived:0,roundTripTime:Date.now()-t.requestTime||0};return n.bytesReceived=e.loaded,n.bandwidth=Math.floor(n.bytesReceived/n.roundTripTime*8*1e3),n}(e)),!t.stats.firstBytesReceivedAt&&t.stats.bytesReceived&&(t.stats.firstBytesReceivedAt=Date.now()),n(e,t)}},No=function(e){var t=e.xhr,n=e.xhrOptions,r=e.decryptionWorker,i=e.segment,a=e.abortFn,o=e.progressFn,s=e.trackInfoFn,u=e.timingInfoFn,l=e.videoSegmentTimingInfoFn,c=e.audioSegmentTimingInfoFn,d=e.id3Fn,h=e.captionsFn,p=e.isEndOfTimeline,f=e.endedTimelineFn,m=e.dataFn,g=e.doneFn,v=e.onTransmuxerLog,y=[],b=Mo({activeXhrs:y,decryptionWorker:r,trackInfoFn:s,timingInfoFn:u,videoSegmentTimingInfoFn:l,audioSegmentTimingInfoFn:c,id3Fn:d,captionsFn:h,isEndOfTimeline:p,endedTimelineFn:f,dataFn:m,doneFn:g,onTransmuxerLog:v});if(i.key&&!i.key.bytes){var _=[i.key];i.map&&!i.map.bytes&&i.map.key&&i.map.key.resolvedUri===i.key.resolvedUri&&_.push(i.map.key);var T=t(Ki.mergeOptions(n,{uri:i.key.resolvedUri,responseType:"arraybuffer"}),xo(i,_,b));y.push(T)}if(i.map&&!i.map.bytes){if(i.map.key&&(!i.key||i.key.resolvedUri!==i.map.key.resolvedUri)){var S=t(Ki.mergeOptions(n,{uri:i.map.key.resolvedUri,responseType:"arraybuffer"}),xo(i,[i.map.key],b));y.push(S)}var w=t(Ki.mergeOptions(n,{uri:i.map.resolvedUri,responseType:"arraybuffer",headers:za(i.map)}),function(e){var t=e.segment,n=e.finishProcessingFn;return function(e,r){var i=Ao(e,r);if(i)return n(i,t);var a=new Uint8Array(r.response);if(t.map.key)return t.map.encryptedBytes=a,n(null,t);t.map.bytes=a,Po(t,(function(e){if(e)return e.xhr=r,e.status=r.status,n(e,t);n(null,t)}))}}({segment:i,finishProcessingFn:b}));y.push(w)}var k=Ki.mergeOptions(n,{uri:i.part&&i.part.resolvedUri||i.resolvedUri,responseType:"arraybuffer",headers:za(i)}),C=t(k,Io({segment:i,finishProcessingFn:b,responseType:k.responseType}));C.addEventListener("progress",Ro({segment:i,progressFn:o,trackInfoFn:s,timingInfoFn:u,videoSegmentTimingInfoFn:l,audioSegmentTimingInfoFn:c,id3Fn:d,captionsFn:h,isEndOfTimeline:p,endedTimelineFn:f,dataFn:m})),y.push(C);var E={};return y.forEach((function(e){e.addEventListener("loadend",function(e){var t=e.loadendState,n=e.abortFn;return function(e){e.target.aborted&&n&&!t.calledAbortFn&&(n(),t.calledAbortFn=!0)}}({loadendState:E,abortFn:a}))})),function(){return Eo(y)}},jo=$i("CodecUtils"),Bo=function(e,t){var n=t.attributes||{};return e&&e.mediaGroups&&e.mediaGroups.AUDIO&&n.AUDIO&&e.mediaGroups.AUDIO[n.AUDIO]},Uo=function(e){var t={};return e.forEach((function(e){var n=e.mediaType,r=e.type,i=e.details;t[n]=t[n]||[],t[n].push(Object(x.i)(""+r+i))})),Object.keys(t).forEach((function(e){if(t[e].length>1)return jo("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},Fo=function(e){var t=0;return e.audio&&t++,e.video&&t++,t},qo=function(e,t){var n=t.attributes||{},r=Uo(function(e){var t=e.attributes||{};if(t.CODECS)return Object(x.h)(t.CODECS)}(t)||[]);if(Bo(e,t)&&!r.audio&&!function(e,t){if(!Bo(e,t))return!0;var n=t.attributes||{},r=e.mediaGroups.AUDIO[n.AUDIO];for(var i in r)if(!r[i].uri&&!r[i].playlists)return!0;return!1}(e,t)){var i=Uo(Object(x.d)(e,n.AUDIO)||[]);i.audio&&(r.audio=i.audio)}return r},Ho=$i("PlaylistSelector"),zo=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||""})}},Wo=function(e,t){if(!e)return"";var n=a.a.getComputedStyle(e);return n?n[t]:""},Vo=function(e,t){var n=e.slice();e.sort((function(e,r){var i=t(e,r);return 0===i?n.indexOf(e)-n.indexOf(r):i}))},Ko=function(e,t){var n,r;return e.attributes.BANDWIDTH&&(n=e.attributes.BANDWIDTH),n=n||a.a.Number.MAX_VALUE,t.attributes.BANDWIDTH&&(r=t.attributes.BANDWIDTH),n-(r=r||a.a.Number.MAX_VALUE)},Go=function(e,t,n,r,i,o){if(e){var s={bandwidth:t,width:n,height:r,limitRenditionByPlayerDimensions:i},u=e.playlists;wa.isAudioOnly(e)&&(u=o.getAudioTrackPlaylists_(),s.audioOnly=!0);var l=u.map((function(e){var t=e.attributes&&e.attributes.RESOLUTION&&e.attributes.RESOLUTION.width,n=e.attributes&&e.attributes.RESOLUTION&&e.attributes.RESOLUTION.height;return{bandwidth:e.attributes&&e.attributes.BANDWIDTH||a.a.Number.MAX_VALUE,width:t,height:n,playlist:e}}));Vo(l,(function(e,t){return e.bandwidth-t.bandwidth}));var c=(l=l.filter((function(e){return!wa.isIncompatible(e.playlist)}))).filter((function(e){return wa.isEnabled(e.playlist)}));c.length||(c=l.filter((function(e){return!wa.isDisabled(e.playlist)})));var d=c.filter((function(e){return e.bandwidth*uo.BANDWIDTH_VARIANCE<t})),h=d[d.length-1],p=d.filter((function(e){return e.bandwidth===h.bandwidth}))[0];if(!1===i){var f=p||c[0]||l[0];if(f&&f.playlist){var m="sortedPlaylistReps";return p&&(m="bandwidthBestRep"),c[0]&&(m="enabledPlaylistReps"),Ho("choosing "+zo(f)+" using "+m+" with options",s),f.playlist}return Ho("could not choose a playlist with options",s),null}var g=d.filter((function(e){return e.width&&e.height}));Vo(g,(function(e,t){return e.width-t.width}));var v=g.filter((function(e){return e.width===n&&e.height===r}));h=v[v.length-1];var y,b,_,T,S=v.filter((function(e){return e.bandwidth===h.bandwidth}))[0];if(S||(b=(y=g.filter((function(e){return e.width>n||e.height>r}))).filter((function(e){return e.width===y[0].width&&e.height===y[0].height})),h=b[b.length-1],_=b.filter((function(e){return e.bandwidth===h.bandwidth}))[0]),o.experimentalLeastPixelDiffSelector){var w=g.map((function(e){return e.pixelDiff=Math.abs(e.width-n)+Math.abs(e.height-r),e}));Vo(w,(function(e,t){return e.pixelDiff===t.pixelDiff?t.bandwidth-e.bandwidth:e.pixelDiff-t.pixelDiff})),T=w[0]}var k=T||_||S||p||c[0]||l[0];if(k&&k.playlist){var C="sortedPlaylistReps";return T?C="leastPixelDiffRep":_?C="resolutionPlusOneRep":S?C="resolutionBestRep":p?C="bandwidthBestRep":c[0]&&(C="enabledPlaylistReps"),Ho("choosing "+zo(k)+" using "+C+" with options",s),k.playlist}return Ho("could not choose a playlist with options",s),null}},Xo=function(){var e=this.useDevicePixelRatio&&a.a.devicePixelRatio||1;return Go(this.playlists.master,this.systemBandwidth,parseInt(Wo(this.tech_.el(),"width"),10)*e,parseInt(Wo(this.tech_.el(),"height"),10)*e,this.limitRenditionByPlayerDimensions,this.masterPlaylistController_)},Yo=function(e){var t=e.inbandTextTracks,n=e.metadataArray,r=e.timestampOffset,i=e.videoDuration;if(n){var o=a.a.WebKitDataCue||a.a.VTTCue,s=t.metadataTrack_;if(s&&(n.forEach((function(e){var t=e.cueTime+r;!("number"!==typeof t||a.a.isNaN(t)||t<0)&&t<1/0&&e.frames.forEach((function(e){var n=new o(t,t,e.value||e.url||e.data||"");n.frame=e,n.value=e,function(e){Object.defineProperties(e.frame,{id:{get:function(){return Ki.log.warn("cue.frame.id is deprecated. Use cue.value.key instead."),e.value.key}},value:{get:function(){return Ki.log.warn("cue.frame.value is deprecated. Use cue.value.data instead."),e.value.data}},privateData:{get:function(){return Ki.log.warn("cue.frame.privateData is deprecated. Use cue.value.data instead."),e.value.data}}})}(n),s.addCue(n)}))})),s.cues&&s.cues.length)){for(var u=s.cues,l=[],c=0;c<u.length;c++)u[c]&&l.push(u[c]);var d=l.reduce((function(e,t){var n=e[t.startTime]||[];return n.push(t),e[t.startTime]=n,e}),{}),h=Object.keys(d).sort((function(e,t){return Number(e)-Number(t)}));h.forEach((function(e,t){var n=d[e],r=Number(h[t+1])||i;n.forEach((function(e){e.endTime=r}))}))}}},Qo=function(e,t,n){var r,i;if(n&&n.cues)for(r=n.cues.length;r--;)(i=n.cues[r]).startTime>=e&&i.endTime<=t&&n.removeCue(i)},$o=function(e){return"number"===typeof e&&isFinite(e)},Zo=function(e){var t=e.startOfSegment,n=e.duration,r=e.segment,i=e.part,a=e.playlist,o=a.mediaSequence,s=a.id,u=a.segments,l=void 0===u?[]:u,c=e.mediaIndex,d=e.partIndex,h=e.timeline,p=l.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?la({preloadSegment:r})-1:0;return g+" ["+(o+c)+"/"+(o+p)+"]"+(m?" part ["+d+"/"+v+"]":"")+" segment start/end ["+r.start+" => "+r.end+"]"+(m?" part start/end ["+i.start+" => "+i.end+"]":"")+" startOfSegment ["+t+"] duration ["+n+"] timeline ["+h+"] selected by ["+f+"] playlist ["+s+"]"},Jo=function(e){return e+"TimingInfo"},es=function(e){var t=e.timelineChangeController,n=e.currentTimeline,r=e.segmentTimeline,i=e.loaderType,a=e.audioDisabled;if(n===r)return!1;if("audio"===i){var o=t.lastTimelineChange({type:"main"});return!o||o.to!==r}if("main"===i&&a){var s=t.pendingTimelineChange({type:"audio"});return!s||s.to!==r}return!1},ts=function(e){var t=e.segmentDuration,n=e.maxDuration;return!!t&&Math.round(t)>n+1/30},ns=function(e,t){if("hls"!==t)return null;var n=function(e){var t=0;return["video","audio"].forEach((function(n){var r=e[n+"TimingInfo"];if(r){var i,o=r.start,s=r.end;"bigint"===typeof o||"bigint"===typeof s?i=a.a.BigInt(s)-a.a.BigInt(o):"number"===typeof o&&"number"===typeof s&&(i=s-o),"undefined"!==typeof i&&i>t&&(t=i)}})),"bigint"===typeof t&&t<Number.MAX_SAFE_INTEGER&&(t=Number(t)),t}({audioTimingInfo:e.audioTimingInfo,videoTimingInfo:e.videoTimingInfo});if(!n)return null;var r=e.playlist.targetDuration,i=ts({segmentDuration:n,maxDuration:2*r}),o=ts({segmentDuration:n,maxDuration:r}),s="Segment with index "+e.mediaIndex+" from playlist "+e.playlist.id+" has a duration of "+n+" when the reported duration is "+e.duration+" and the target duration is "+r+". 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 i||o?{severity:i?"warn":"info",message:s}:null},rs=function(e){function t(t,n){var r;if(r=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 r.bandwidth=t.bandwidth,r.throughput={rate:0,count:0},r.roundTrip=NaN,r.resetStats_(),r.mediaIndex=null,r.partIndex=null,r.hasPlayed_=t.hasPlayed,r.currentTime_=t.currentTime,r.seekable_=t.seekable,r.seeking_=t.seeking,r.duration_=t.duration,r.mediaSource_=t.mediaSource,r.vhs_=t.vhs,r.loaderType_=t.loaderType,r.currentMediaInfo_=void 0,r.startingMediaInfo_=void 0,r.segmentMetadataTrack_=t.segmentMetadataTrack,r.goalBufferLength_=t.goalBufferLength,r.sourceType_=t.sourceType,r.sourceUpdater_=t.sourceUpdater,r.inbandTextTracks_=t.inbandTextTracks,r.state_="INIT",r.timelineChangeController_=t.timelineChangeController,r.shouldSaveSegmentTimingInfo_=!0,r.parse708captions_=t.parse708captions,r.useDtsForTimestampOffset_=t.useDtsForTimestampOffset,r.captionServices_=t.captionServices,r.experimentalExactManifestTimings=t.experimentalExactManifestTimings,r.checkBufferTimeout_=null,r.error_=void 0,r.currentTimeline_=-1,r.pendingSegment_=null,r.xhrOptions_=null,r.pendingSegments_=[],r.audioDisabled_=!1,r.isPendingTimestampOffset_=!1,r.gopBuffer_=[],r.timeMapping_=0,r.safeAppend_=Ki.browser.IE_VERSION>=11,r.appendInitSegment_={audio:!0,video:!0},r.playlistOfLastInitSegment_={audio:null,video:null},r.callQueue_=[],r.loadQueue_=[],r.metadataQueue_={id3:[],caption:[]},r.waitingOnRemove_=!1,r.quotaExceededErrorRetryTimeout_=null,r.activeInitSegmentId_=null,r.initSegments_={},r.cacheEncryptionKeys_=t.cacheEncryptionKeys,r.keyCache_={},r.decrypter_=t.decrypter,r.syncController_=t.syncController,r.syncPoint_={segmentIndex:0,time:0},r.transmuxer_=r.createTransmuxer_(),r.triggerSyncInfoUpdate_=function(){return r.trigger("syncinfoupdate")},r.syncController_.on("syncinfoupdate",r.triggerSyncInfoUpdate_),r.mediaSource_.addEventListener("sourceopen",(function(){r.isEndOfStream_()||(r.ended_=!1)})),r.fetchAtBuffer_=!1,r.logger_=$i("SegmentLoader["+r.loaderType_+"]"),Object.defineProperty(p()(r),"state",{get:function(){return this.state_},set:function(e){e!==this.state_&&(this.logger_(this.state_+" -> "+e),this.state_=e,this.trigger("statechange"))}}),r.sourceUpdater_.on("ready",(function(){r.hasEnoughInfoToAppend_()&&r.processCallQueue_()})),"main"===r.loaderType_&&r.timelineChangeController_.on("pendingtimelinechange",(function(){r.hasEnoughInfoToAppend_()&&r.processCallQueue_()})),"audio"===r.loaderType_&&r.timelineChangeController_.on("timelinechange",(function(){r.hasEnoughInfoToLoad_()&&r.processLoadQueue_(),r.hasEnoughInfoToAppend_()&&r.processCallQueue_()})),r}m()(t,e);var n=t.prototype;return n.createTransmuxer_=function(){return To({remux:!1,alignGopsAtEnd:this.safeAppend_,keepOriginalTimestamps:!0,parse708captions:this.parse708captions_,captionServices:this.captionServices_})},n.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},n.dispose=function(){this.trigger("dispose"),this.state="DISPOSED",this.pause(),this.abort_(),this.transmuxer_&&this.transmuxer_.terminate(),this.resetStats_(),this.checkBufferTimeout_&&a.a.clearTimeout(this.checkBufferTimeout_),this.syncController_&&this.triggerSyncInfoUpdate_&&this.syncController_.off("syncinfoupdate",this.triggerSyncInfoUpdate_),this.off()},n.setAudio=function(e){this.audioDisabled_=!e,e?this.appendInitSegment_.audio=!0:this.sourceUpdater_.removeAudio(0,this.duration_())},n.abort=function(){"WAITING"===this.state?(this.abort_(),this.state="READY",this.paused()||this.monitorBuffer_()):this.pendingSegment_&&(this.pendingSegment_=null)},n.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,a.a.clearTimeout(this.quotaExceededErrorRetryTimeout_),this.quotaExceededErrorRetryTimeout_=null},n.checkForAbort_=function(e){return"APPENDING"!==this.state||this.pendingSegment_?!this.pendingSegment_||this.pendingSegment_.requestId!==e:(this.state="READY",!0)},n.error=function(e){return"undefined"!==typeof e&&(this.logger_("error occurred:",e),this.error_=e),this.pendingSegment_=null,this.error_},n.endOfStream=function(){this.ended_=!0,this.transmuxer_&&_o(this.transmuxer_),this.gopBuffer_.length=0,this.pause(),this.trigger("ended")},n.buffered_=function(){var e=this.getMediaInfo_();if(!this.sourceUpdater_||!e)return Ki.createTimeRanges();if("main"===this.loaderType_){var t=e.hasAudio,n=e.hasVideo,r=e.isMuxed;if(n&&t&&!this.audioDisabled_&&!r)return this.sourceUpdater_.buffered();if(n)return this.sourceUpdater_.videoBuffered()}return this.sourceUpdater_.audioBuffered()},n.initSegmentForMap=function(e,t){if(void 0===t&&(t=!1),!e)return null;var n=Xa(e),r=this.initSegments_[n];return t&&!r&&e.bytes&&(this.initSegments_[n]=r={resolvedUri:e.resolvedUri,byterange:e.byterange,bytes:e.bytes,tracks:e.tracks,timescales:e.timescales}),r||e},n.segmentKey=function(e,t){if(void 0===t&&(t=!1),!e)return null;var n=Ya(e),r=this.keyCache_[n];this.cacheEncryptionKeys_&&t&&!r&&e.bytes&&(this.keyCache_[n]=r={resolvedUri:e.resolvedUri,bytes:e.bytes});var i={resolvedUri:(r||e).resolvedUri};return r&&(i.bytes=r.bytes),i},n.couldBeginLoading_=function(){return this.playlist_&&!this.paused()},n.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"))},n.init_=function(){return this.state="READY",this.resetEverything(),this.monitorBuffer_()},n.playlist=function(e,t){if(void 0===t&&(t={}),e){var n=this.playlist_,r=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 i=null;if(n&&(n.id?i=n.id:n.uri&&(i=n.uri)),this.logger_("playlist update ["+i+" => "+(e.id||e.uri)+"]"),this.trigger("syncinfoupdate"),"INIT"===this.state&&this.couldBeginLoading_())return this.init_();if(!n||n.uri!==e.uri)return null!==this.mediaIndex&&(e.endList?this.resyncLoader():this.resetLoader()),this.currentMediaInfo_=void 0,void this.trigger("playlistupdate");var a=e.mediaSequence-n.mediaSequence;if(this.logger_("live window shift ["+a+"]"),null!==this.mediaIndex)if(this.mediaIndex-=a,this.mediaIndex<0)this.mediaIndex=null,this.partIndex=null;else{var o=this.playlist_.segments[this.mediaIndex];if(this.partIndex&&(!o.parts||!o.parts.length||!o.parts[this.partIndex])){var s=this.mediaIndex;this.logger_("currently processing part (index "+this.partIndex+") no longer exists."),this.resetLoader(),this.mediaIndex=s}}r&&(r.mediaIndex-=a,r.mediaIndex<0?(r.mediaIndex=null,r.partIndex=null):(r.mediaIndex>=0&&(r.segment=e.segments[r.mediaIndex]),r.partIndex>=0&&r.segment.parts&&(r.part=r.segment.parts[r.partIndex]))),this.syncController_.saveExpiredSegmentInfo(n,e)}},n.pause=function(){this.checkBufferTimeout_&&(a.a.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=null)},n.paused=function(){return null===this.checkBufferTimeout_},n.resetEverything=function(e){this.ended_=!1,this.activeInitSegmentId_=null,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"}))},n.resetLoader=function(){this.fetchAtBuffer_=!1,this.resyncLoader()},n.resyncLoader=function(){this.transmuxer_&&_o(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"})},n.remove=function(e,t,n,r){if(void 0===n&&(n=function(){}),void 0===r&&(r=!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 i=1,a=function(){0===--i&&n()};for(var o in!r&&this.audioDisabled_||(i++,this.sourceUpdater_.removeAudio(e,t,a)),(r||"main"===this.loaderType_)&&(this.gopBuffer_=function(e,t,n,r){for(var i=Math.ceil((t-r)*N.ONE_SECOND_IN_TS),a=Math.ceil((n-r)*N.ONE_SECOND_IN_TS),o=e.slice(),s=e.length;s--&&!(e[s].pts<=a););if(-1===s)return o;for(var u=s+1;u--&&!(e[u].pts<=i););return u=Math.max(u,0),o.splice(u,s-u+1),o}(this.gopBuffer_,e,t,this.timeMapping_),i++,this.sourceUpdater_.removeVideo(e,t,a)),this.inbandTextTracks_)Qo(e,t,this.inbandTextTracks_[o]);Qo(e,t,this.segmentMetadataTrack_),a()}else this.logger_("skipping remove because no source updater or starting media info")},n.monitorBuffer_=function(){this.checkBufferTimeout_&&a.a.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=a.a.setTimeout(this.monitorBufferTick_.bind(this),1)},n.monitorBufferTick_=function(){"READY"===this.state&&this.fillBuffer_(),this.checkBufferTimeout_&&a.a.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=a.a.setTimeout(this.monitorBufferTick_.bind(this),500)},n.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))}},n.isEndOfStream_=function(e,t,n){if(void 0===e&&(e=this.mediaIndex),void 0===t&&(t=this.playlist_),void 0===n&&(n=this.partIndex),!t||!this.mediaSource_)return!1;var r="number"===typeof e&&t.segments[e],i=e+1===t.segments.length,a=!r||!r.parts||n+1===r.parts.length;return t.endList&&"open"===this.mediaSource_.readyState&&i&&a},n.chooseNextRequest_=function(){var e=this.buffered_(),t=ra(e)||0,n=ia(e,this.currentTime_()),r=!this.hasPlayed_()&&n>=1,i=n>=this.goalBufferLength_(),a=this.playlist_.segments;if(!a.length||r||i)return null;this.syncPoint_=this.syncPoint_||this.syncController_.getSyncPoint(this.playlist_,this.duration_(),this.currentTimeline_,this.currentTime_());var o={partIndex:null,mediaIndex:null,startOfSegment:null,playlist:this.playlist_,isSyncRequest:Boolean(!this.syncPoint_)};if(o.isSyncRequest)o.mediaIndex=function(e,t,n){t=t||[];for(var r=[],i=0,a=0;a<t.length;a++){var o=t[a];if(e===o.timeline&&(r.push(a),(i+=o.duration)>n))return a}return 0===r.length?0:r[r.length-1]}(this.currentTimeline_,a,t);else if(null!==this.mediaIndex){var s=a[this.mediaIndex],u="number"===typeof this.partIndex?this.partIndex:-1;o.startOfSegment=s.end?s.end:t,s.parts&&s.parts[u+1]?(o.mediaIndex=this.mediaIndex,o.partIndex=u+1):o.mediaIndex=this.mediaIndex+1}else{var l=wa.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=l.segmentIndex,d=l.startTime,h=l.partIndex;o.getMediaInfoForTime=this.fetchAtBuffer_?"bufferedEnd "+t:"currentTime "+this.currentTime_(),o.mediaIndex=c,o.startOfSegment=d,o.partIndex=h}var p=a[o.mediaIndex],f=p&&"number"===typeof o.partIndex&&p.parts&&p.parts[o.partIndex];if(!p||"number"===typeof o.partIndex&&!f)return null;if("number"!==typeof o.partIndex&&p.parts&&(o.partIndex=0,f=p.parts[0]),!n&&f&&!f.independent)if(0===o.partIndex){var m=a[o.mediaIndex-1],g=m.parts&&m.parts.length&&m.parts[m.parts.length-1];g&&g.independent&&(o.mediaIndex-=1,o.partIndex=m.parts.length-1,o.independent="previous segment")}else p.parts[o.partIndex-1].independent&&(o.partIndex-=1,o.independent="previous part");var v=this.mediaSource_&&"ended"===this.mediaSource_.readyState;return o.mediaIndex>=a.length-1&&v&&!this.seeking_()?null:this.generateSegmentInfo_(o)},n.generateSegmentInfo_=function(e){var t=e.independent,n=e.playlist,r=e.mediaIndex,i=e.startOfSegment,a=e.isSyncRequest,o=e.partIndex,s=e.forceTimestampOffset,u=e.getMediaInfoForTime,l=n.segments[r],c="number"===typeof o&&l.parts[o],d={requestId:"segment-loader-"+Math.random(),uri:c&&c.resolvedUri||l.resolvedUri,mediaIndex:r,partIndex:c?o:null,isSyncRequest:a,startOfSegment:i,playlist:n,bytes:null,encryptedBytes:null,timestampOffset:null,timeline:l.timeline,duration:c&&c.duration||l.duration,segment:l,part:c,byteLength:0,transmuxer:this.transmuxer_,getMediaInfoForTime:u,independent:t},h="undefined"!==typeof s?s:this.isPendingTimestampOffset_;d.timestampOffset=this.timestampOffsetForSegment_({segmentTimeline:l.timeline,currentTimeline:this.currentTimeline_,startOfSegment:i,buffered:this.buffered_(),overrideCheck:h});var p=ra(this.sourceUpdater_.audioBuffered());return"number"===typeof p&&(d.audioAppendStart=p-this.sourceUpdater_.audioTimestampOffset()),this.sourceUpdater_.videoBuffered().length&&(d.gopsToAlignWith=function(e,t,n){if("undefined"===typeof t||null===t||!e.length)return[];var r,i=Math.ceil((t-n+3)*N.ONE_SECOND_IN_TS);for(r=0;r<e.length&&!(e[r].pts>i);r++);return e.slice(r)}(this.gopBuffer_,this.currentTime_()-this.sourceUpdater_.videoTimestampOffset(),this.timeMapping_)),d},n.timestampOffsetForSegment_=function(e){return function(e){var t=e.segmentTimeline,n=e.currentTimeline,r=e.startOfSegment,i=e.buffered;return e.overrideCheck||t!==n?t<n?r:i.length?i.end(i.length-1):r:null}(e)},n.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_(),n=e.bandwidth,r=this.pendingSegment_.duration,i=wa.estimateSegmentRequestTime(r,n,this.playlist_,e.bytesReceived),a=function(e,t,n){return void 0===n&&(n=1),((e.length?e.end(e.length-1):0)-t)/n}(this.buffered_(),t,this.vhs_.tech_.playbackRate())-1;if(!(i<=a)){var o=function(e){var t=e.master,n=e.currentTime,r=e.bandwidth,i=e.duration,a=e.segmentDuration,o=e.timeUntilRebuffer,s=e.currentTimeline,u=e.syncController,l=t.playlists.filter((function(e){return!wa.isIncompatible(e)})),c=l.filter(wa.isEnabled);c.length||(c=l.filter((function(e){return!wa.isDisabled(e)})));var d=c.filter(wa.hasAttribute.bind(null,"BANDWIDTH")).map((function(e){var t=u.getSyncPoint(e,i,s,n)?1:2;return{playlist:e,rebufferingImpact:wa.estimateSegmentRequestTime(a,r,e)*t-o}})),h=d.filter((function(e){return e.rebufferingImpact<=0}));return Vo(h,(function(e,t){return Ko(t.playlist,e.playlist)})),h.length?h[0]:(Vo(d,(function(e,t){return e.rebufferingImpact-t.rebufferingImpact})),d[0]||null)}({master:this.vhs_.playlists.master,currentTime:t,bandwidth:n,duration:this.duration_(),segmentDuration:r,timeUntilRebuffer:a,currentTimeline:this.currentTimeline_,syncController:this.syncController_});if(o){var s=i-a-o.rebufferingImpact,u=.5;a<=1/30&&(u=1),!o.playlist||o.playlist.uri===this.playlist_.uri||s<u||(this.bandwidth=o.playlist.attributes.BANDWIDTH*uo.BANDWIDTH_VARIANCE+1,this.trigger("earlyabort"))}}}},n.handleAbort_=function(e){this.logger_("Aborting "+Zo(e)),this.mediaRequestsAborted+=1},n.handleProgress_=function(e,t){this.earlyAbortWhenNeeded_(t.stats),this.checkForAbort_(t.requestId)||this.trigger("progress")},n.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 n=Object.keys(e).sort(),r=Object.keys(t).sort();if(n.length!==r.length)return!1;for(var i=0;i<n.length;i++){var a=n[i];if(a!==r[i])return!1;if(e[a]!==t[a])return!1}return!0}(this.currentMediaInfo_,t)||(this.appendInitSegment_={audio:!0,video:!0},this.startingMediaInfo_=t,this.currentMediaInfo_=t,this.logger_("trackinfo update",t),this.trigger("trackinfo")),this.checkForAbort_(e.requestId)||(this.pendingSegment_.trackInfo=t,this.hasEnoughInfoToAppend_()&&this.processCallQueue_()))},n.handleTimingInfo_=function(e,t,n,r){if(this.earlyAbortWhenNeeded_(e.stats),!this.checkForAbort_(e.requestId)){var i=this.pendingSegment_,a=Jo(t);i[a]=i[a]||{},i[a][n]=r,this.logger_("timinginfo: "+t+" - "+n+" - "+r),this.hasEnoughInfoToAppend_()&&this.processCallQueue_()}},n.handleCaptions_=function(e,t){var n=this;if(this.earlyAbortWhenNeeded_(e.stats),!this.checkForAbort_(e.requestId))if(0!==t.length)if(this.pendingSegment_.hasAppendedData_){var r=null===this.sourceUpdater_.videoTimestampOffset()?this.sourceUpdater_.audioTimestampOffset():this.sourceUpdater_.videoTimestampOffset(),i={};t.forEach((function(e){i[e.stream]=i[e.stream]||{startTime:1/0,captions:[],endTime:0};var t=i[e.stream];t.startTime=Math.min(t.startTime,e.startTime+r),t.endTime=Math.max(t.endTime,e.endTime+r),t.captions.push(e)})),Object.keys(i).forEach((function(e){var t=i[e],o=t.startTime,s=t.endTime,u=t.captions,l=n.inbandTextTracks_;n.logger_("adding cues from "+o+" -> "+s+" for "+e),function(e,t,n){if(!e[n]){t.trigger({type:"usage",name:"vhs-608"}),t.trigger({type:"usage",name:"hls-608"});var r=n;/^cc708_/.test(n)&&(r="SERVICE"+n.split("_")[1]);var i=t.textTracks().getTrackById(r);if(i)e[n]=i;else{var a=n,o=n,s=!1,u=(t.options_.vhs&&t.options_.vhs.captionServices||{})[r];u&&(a=u.label,o=u.language,s=u.default),e[n]=t.addRemoteTextTrack({kind:"captions",id:r,default:s,label:a,language:o},!1).track}}}(l,n.vhs_.tech_,e),Qo(o,s,l[e]),function(e){var t=e.inbandTextTracks,n=e.captionArray,r=e.timestampOffset;if(n){var i=a.a.WebKitDataCue||a.a.VTTCue;n.forEach((function(e){var n=e.stream;t[n].addCue(new i(e.startTime+r,e.endTime+r,e.text))}))}}({captionArray:u,inbandTextTracks:l,timestampOffset:r})})),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")},n.handleId3_=function(e,t,n){if(this.earlyAbortWhenNeeded_(e.stats),!this.checkForAbort_(e.requestId))if(this.pendingSegment_.hasAppendedData_){var r=null===this.sourceUpdater_.videoTimestampOffset()?this.sourceUpdater_.audioTimestampOffset():this.sourceUpdater_.videoTimestampOffset();!function(e,t,n){e.metadataTrack_||(e.metadataTrack_=n.addRemoteTextTrack({kind:"metadata",label:"Timed Metadata"},!1).track,e.metadataTrack_.inBandMetadataTrackDispatchType=t)}(this.inbandTextTracks_,n,this.vhs_.tech_),Yo({inbandTextTracks:this.inbandTextTracks_,metadataArray:t,timestampOffset:r,videoDuration:this.duration_()})}else this.metadataQueue_.id3.push(this.handleId3_.bind(this,e,t,n))},n.processMetadataQueue_=function(){this.metadataQueue_.id3.forEach((function(e){return e()})),this.metadataQueue_.caption.forEach((function(e){return e()})),this.metadataQueue_.id3=[],this.metadataQueue_.caption=[]},n.processCallQueue_=function(){var e=this.callQueue_;this.callQueue_=[],e.forEach((function(e){return e()}))},n.processLoadQueue_=function(){var e=this.loadQueue_;this.loadQueue_=[],e.forEach((function(e){return e()}))},n.hasEnoughInfoToLoad_=function(){if("audio"!==this.loaderType_)return!0;var e=this.pendingSegment_;return!!e&&(!this.getCurrentMediaInfo_()||!es({timelineChangeController:this.timelineChangeController_,currentTimeline:this.currentTimeline_,segmentTimeline:e.timeline,loaderType:this.loaderType_,audioDisabled:this.audioDisabled_}))},n.getCurrentMediaInfo_=function(e){return void 0===e&&(e=this.pendingSegment_),e&&e.trackInfo||this.currentMediaInfo_},n.getMediaInfo_=function(e){return void 0===e&&(e=this.pendingSegment_),this.getCurrentMediaInfo_(e)||this.startingMediaInfo_},n.getPendingSegmentPlaylist=function(){return this.pendingSegment_?this.pendingSegment_.playlist:null},n.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 n=t.hasAudio,r=t.hasVideo,i=t.isMuxed;return!(r&&!e.videoTimingInfo)&&(!(n&&!this.audioDisabled_&&!i&&!e.audioTimingInfo)&&!es({timelineChangeController:this.timelineChangeController_,currentTimeline:this.currentTimeline_,segmentTimeline:e.timeline,loaderType:this.loaderType_,audioDisabled:this.audioDisabled_}))},n.handleData_=function(e,t){if(this.earlyAbortWhenNeeded_(e.stats),!this.checkForAbort_(e.requestId))if(!this.callQueue_.length&&this.hasEnoughInfoToAppend_()){var n=this.pendingSegment_;if(this.setTimeMapping_(n.timeline),this.updateMediaSecondsLoaded_(n.part||n.segment),"closed"!==this.mediaSource_.readyState){if(e.map&&(e.map=this.initSegmentForMap(e.map,!0),n.segment.map=e.map),e.key&&this.segmentKey(e.key,!0),n.isFmp4=e.isFmp4,n.timingInfo=n.timingInfo||{},n.isFmp4)this.trigger("fmp4"),n.timingInfo.start=n[Jo(t.type)].start;else{var r,i=this.getCurrentMediaInfo_(),a="main"===this.loaderType_&&i&&i.hasVideo;a&&(r=n.videoTimingInfo.start),n.timingInfo.start=this.trueSegmentStart_({currentStart:n.timingInfo.start,playlist:n.playlist,mediaIndex:n.mediaIndex,currentVideoTimestampOffset:this.sourceUpdater_.videoTimestampOffset(),useVideoTimingInfo:a,firstVideoFrameTimeForData:r,videoTimingInfo:n.videoTimingInfo,audioTimingInfo:n.audioTimingInfo})}if(this.updateAppendInitSegmentStatus(n,t.type),this.updateSourceBufferTimestampOffset_(n),n.isSyncRequest){this.updateTimingInfoEnd_(n),this.syncController_.saveSegmentTimingInfo({segmentInfo:n,shouldSaveTimelineMapping:"main"===this.loaderType_});var o=this.chooseNextRequest_();if(o.mediaIndex!==n.mediaIndex||o.partIndex!==n.partIndex)return void this.logger_("sync segment was incorrect, not appending");this.logger_("sync segment was correct, appending")}n.hasAppendedData_=!0,this.processMetadataQueue_(),this.appendData_(n,t)}}else this.callQueue_.push(this.handleData_.bind(this,e,t))},n.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)},n.getInitSegmentAndUpdateState_=function(e){var t=e.type,n=e.initSegment,r=e.map,i=e.playlist;if(r){var a=Xa(r);if(this.activeInitSegmentId_===a)return null;n=this.initSegmentForMap(r,!0).bytes,this.activeInitSegmentId_=a}return n&&this.appendInitSegment_[t]?(this.playlistOfLastInitSegment_[t]=i,this.appendInitSegment_[t]=!1,this.activeInitSegmentId_=null,n):null},n.handleQuotaExceededError_=function(e,t){var n=this,r=e.segmentInfo,i=e.type,o=e.bytes,s=this.sourceUpdater_.audioBuffered(),u=this.sourceUpdater_.videoBuffered();s.length>1&&this.logger_("On QUOTA_EXCEEDED_ERR, found gaps in the audio buffer: "+na(s).join(", ")),u.length>1&&this.logger_("On QUOTA_EXCEEDED_ERR, found gaps in the video buffer: "+na(u).join(", "));var l=s.length?s.start(0):0,c=s.length?s.end(s.length-1):0,d=u.length?u.start(0):0,h=u.length?u.end(u.length-1):0;if(c-l<=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: "+o.byteLength+", audio buffer: "+na(s).join(", ")+", video buffer: "+na(u).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:r,type:i,bytes:o}));var p=this.currentTime_()-1;this.logger_("On QUOTA_EXCEEDED_ERR, removing audio/video from 0 to "+p),this.remove(0,p,(function(){n.logger_("On QUOTA_EXCEEDED_ERR, retrying append in 1s"),n.waitingOnRemove_=!1,n.quotaExceededErrorRetryTimeout_=a.a.setTimeout((function(){n.logger_("On QUOTA_EXCEEDED_ERR, re-processing call queue"),n.quotaExceededErrorRetryTimeout_=null,n.processCallQueue_()}),1e3)}),!0)},n.handleAppendError_=function(e,t){var n=e.segmentInfo,r=e.type,i=e.bytes;t&&(22!==t.code?(this.logger_("Received non QUOTA_EXCEEDED_ERR on append",t),this.error(r+" append of "+i.length+"b failed for segment #"+n.mediaIndex+" in playlist "+n.playlist.id),this.trigger("appenderror")):this.handleQuotaExceededError_({segmentInfo:n,type:r,bytes:i}))},n.appendToSourceBuffer_=function(e){var t=e.segmentInfo,n=e.type,r=e.initSegment,i=e.data,a=e.bytes;if(!a){var o=[i],s=i.byteLength;r&&(o.unshift(r),s+=r.byteLength),a=function(e){var t,n=0;return e.bytes&&(t=new Uint8Array(e.bytes),e.segments.forEach((function(e){t.set(e,n),n+=e.byteLength}))),t}({bytes:s,segments:o})}this.sourceUpdater_.appendBuffer({segmentInfo:t,type:n,bytes:a},this.handleAppendError_.bind(this,{segmentInfo:t,type:n,bytes:a}))},n.handleSegmentTimingInfo_=function(e,t,n){if(this.pendingSegment_&&t===this.pendingSegment_.requestId){var r=this.pendingSegment_.segment,i=e+"TimingInfo";r[i]||(r[i]={}),r[i].transmuxerPrependedSeconds=n.prependedContentDuration||0,r[i].transmuxedPresentationStart=n.start.presentation,r[i].transmuxedDecodeStart=n.start.decode,r[i].transmuxedPresentationEnd=n.end.presentation,r[i].transmuxedDecodeEnd=n.end.decode,r[i].baseMediaDecodeTime=n.baseMediaDecodeTime}},n.appendData_=function(e,t){var n=t.type,r=t.data;if(r&&r.byteLength&&("audio"!==n||!this.audioDisabled_)){var i=this.getInitSegmentAndUpdateState_({type:n,initSegment:t.initSegment,playlist:e.playlist,map:e.isFmp4?e.segment.map:null});this.appendToSourceBuffer_({segmentInfo:e,type:n,initSegment:i,data:r})}},n.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 n=l()({},e,{forceTimestampOffset:!0});l()(e,t.generateSegmentInfo_(n)),t.isPendingTimestampOffset_=!1,t.updateTransmuxerAndRequestSegment_(e)}))},n.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 n=this.createSimplifiedSegmentObj_(e),r=this.isEndOfStream_(e.mediaIndex,e.playlist,e.partIndex),i=null!==this.mediaIndex,a=e.timeline!==this.currentTimeline_&&e.timeline>0,o=r||i&&a;this.logger_("Requesting "+Zo(e)),n.map&&!n.map.bytes&&(this.logger_("going to request init segment."),this.appendInitSegment_={video:!0,audio:!0}),e.abortRequests=No({xhr:this.vhs_.xhr,xhrOptions:this.xhrOptions_,decryptionWorker:this.decrypter_,segment:n,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:o,endedTimelineFn:function(){t.logger_("received endedtimeline callback")},id3Fn:this.handleId3_.bind(this),dataFn:this.handleData_.bind(this),doneFn:this.segmentRequestFinished_.bind(this),onTransmuxerLog:function(n){var r=n.message,i=n.level,a=n.stream;t.logger_(Zo(e)+" logged from transmuxer stream "+a+" as a "+i+": "+r)}})},n.trimBackBuffer_=function(e){var t=function(e,t,n){var r=t-uo.BACK_BUFFER_LENGTH;e.length&&(r=Math.max(r,e.start(0)));var i=t-n;return Math.min(i,r)}(this.seekable_(),this.currentTime_(),this.playlist_.targetDuration||10);t>0&&this.remove(0,t)},n.createSimplifiedSegmentObj_=function(e){var t=e.segment,n=e.part,r={resolvedUri:n?n.resolvedUri:t.resolvedUri,byterange:n?n.byterange:t.byterange,requestId:e.requestId,transmuxer:e.transmuxer,audioAppendStart:e.audioAppendStart,gopsToAlignWith:e.gopsToAlignWith,part:e.part},i=e.playlist.segments[e.mediaIndex-1];if(i&&i.timeline===t.timeline&&(i.videoTimingInfo?r.baseStartTime=i.videoTimingInfo.transmuxedDecodeEnd:i.audioTimingInfo&&(r.baseStartTime=i.audioTimingInfo.transmuxedDecodeEnd)),t.key){var a=t.key.iv||new Uint32Array([0,0,0,e.mediaIndex+e.playlist.mediaSequence]);r.key=this.segmentKey(t.key),r.key.iv=a}return t.map&&(r.map=this.initSegmentForMap(t.map)),r},n.saveTransferStats_=function(e){this.mediaRequests+=1,e&&(this.mediaBytesTransferred+=e.bytesReceived,this.mediaTransferDuration+=e.roundTripTime)},n.saveBandwidthRelatedStats_=function(e,t){this.pendingSegment_.byteLength=t.bytesReceived,e<1/60?this.logger_("Ignoring segment's bandwidth because its duration of "+e+" is less than the min to record "+1/60):(this.bandwidth=t.bandwidth,this.roundTrip=t.roundTripTime)},n.handleTimeout_=function(){this.mediaRequestsTimedout+=1,this.bandwidth=1,this.roundTrip=NaN,this.trigger("bandwidthupdate"),this.trigger("timeout")},n.segmentRequestFinished_=function(e,t,n){if(this.callQueue_.length)this.callQueue_.push(this.segmentRequestFinished_.bind(this,e,t,n));else if(this.saveTransferStats_(t.stats),this.pendingSegment_&&t.requestId===this.pendingSegment_.requestId){if(e){if(this.pendingSegment_=null,this.state="READY",e.code===Co)return;return this.pause(),e.code===ko?void this.handleTimeout_():(this.mediaRequestsErrored+=1,this.error(e),void this.trigger("error"))}var r=this.pendingSegment_;this.saveBandwidthRelatedStats_(r.duration,t.stats),r.endOfAllRequests=t.endOfAllRequests,n.gopInfo&&(this.gopBuffer_=function(e,t,n){if(!t.length)return e;if(n)return t.slice();for(var r=t[0].pts,i=0;i<e.length&&!(e[i].pts>=r);i++);return e.slice(0,i).concat(t)}(this.gopBuffer_,n.gopInfo,this.safeAppend_)),this.state="APPENDING",this.trigger("appending"),this.waitForAppendsToComplete_(r)}},n.setTimeMapping_=function(e){var t=this.syncController_.mappingForTimeline(e);null!==t&&(this.timeMapping_=t)},n.updateMediaSecondsLoaded_=function(e){"number"===typeof e.start&&"number"===typeof e.end?this.mediaSecondsLoaded+=e.end-e.start:this.mediaSecondsLoaded+=e.duration},n.shouldUpdateTransmuxerTimestampOffset_=function(e){return null!==e&&("main"===this.loaderType_&&e!==this.sourceUpdater_.videoTimestampOffset()||!this.audioDisabled_&&e!==this.sourceUpdater_.audioTimestampOffset())},n.trueSegmentStart_=function(e){var t=e.currentStart,n=e.playlist,r=e.mediaIndex,i=e.firstVideoFrameTimeForData,a=e.currentVideoTimestampOffset,o=e.useVideoTimingInfo,s=e.videoTimingInfo,u=e.audioTimingInfo;if("undefined"!==typeof t)return t;if(!o)return u.start;var l=n.segments[r-1];return 0!==r&&l&&"undefined"!==typeof l.start&&l.end===i+a?s.start:i},n.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 n=t.hasAudio,r=t.hasVideo,i=t.isMuxed,a="main"===this.loaderType_&&r,o=!this.audioDisabled_&&n&&!i;if(e.waitingOnAppends=0,!e.hasAppendedData_)return e.timingInfo||"number"!==typeof e.timestampOffset||(this.isPendingTimestampOffset_=!0),e.timingInfo={start:0},e.waitingOnAppends++,this.isPendingTimestampOffset_||(this.updateSourceBufferTimestampOffset_(e),this.processMetadataQueue_()),void this.checkAppendsDone_(e);a&&e.waitingOnAppends++,o&&e.waitingOnAppends++,a&&this.sourceUpdater_.videoQueueCallback(this.checkAppendsDone_.bind(this,e)),o&&this.sourceUpdater_.audioQueueCallback(this.checkAppendsDone_.bind(this,e))},n.checkAppendsDone_=function(e){this.checkForAbort_(e.requestId)||(e.waitingOnAppends--,0===e.waitingOnAppends&&this.handleAppendsDone_())},n.checkForIllegalMediaSwitch=function(e){var t=function(e,t,n){return"main"===e&&t&&n?n.hasAudio||n.hasVideo?t.hasVideo&&!n.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&&n.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)},n.updateSourceBufferTimestampOffset_=function(e){if(null!==e.timestampOffset&&"number"===typeof e.timingInfo.start&&!e.changedTimestampOffset&&"main"===this.loaderType_){var t=!1;e.timestampOffset-=this.getSegmentStartTimeForTimestampOffsetCalculation_({videoTimingInfo:e.segment.videoTimingInfo,audioTimingInfo:e.segment.audioTimingInfo,timingInfo:e.timingInfo}),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")}},n.getSegmentStartTimeForTimestampOffsetCalculation_=function(e){var t=e.videoTimingInfo,n=e.audioTimingInfo,r=e.timingInfo;return this.useDtsForTimestampOffset_?t&&"number"===typeof t.transmuxedDecodeStart?t.transmuxedDecodeStart:n&&"number"===typeof n.transmuxedDecodeStart?n.transmuxedDecodeStart:r.start:r.start},n.updateTimingInfoEnd_=function(e){e.timingInfo=e.timingInfo||{};var t=this.getMediaInfo_(),n="main"===this.loaderType_&&t&&t.hasVideo&&e.videoTimingInfo?e.videoTimingInfo:e.audioTimingInfo;n&&(e.timingInfo.end="number"===typeof n.end?n.end:n.start+e.duration)},n.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=ns(e,this.sourceType_);if(t&&("warn"===t.severity?Ki.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 "+Zo(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 n=e.segment,r=e.part,i=n.end&&this.currentTime_()-n.end>3*e.playlist.targetDuration,a=r&&r.end&&this.currentTime_()-r.end>3*e.playlist.partTargetDuration;if(i||a)return this.logger_("bad "+(i?"segment":"part")+" "+Zo(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 "+Zo(e))},n.recordThroughput_=function(e){if(e.duration<1/60)this.logger_("Ignoring segment's throughput because its duration of "+e.duration+" is less than the min to record "+1/60);else{var t=this.throughput.rate,n=Date.now()-e.endOfAllRequests+1,r=Math.floor(e.byteLength/n*8*1e3);this.throughput.rate+=(r-t)/++this.throughput.count}},n.addSegmentMetadataCue_=function(e){if(this.segmentMetadataTrack_){var t=e.segment,n=t.start,r=t.end;if($o(n)&&$o(r)){Qo(n,r,this.segmentMetadataTrack_);var i=a.a.WebKitDataCue||a.a.VTTCue,o={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:n,end:r},s=new i(n,r,JSON.stringify(o));s.value=o,this.segmentMetadataTrack_.addCue(s)}}},t}(Ki.EventTarget);function is(){}var as,os=function(e){return"string"!==typeof e?e:e.replace(/./,(function(e){return e.toUpperCase()}))},ss=["video","audio"],us=function(e,t){var n=t[e+"Buffer"];return n&&n.updating||t.queuePending[e]},ls=function e(t,n){if(0!==n.queue.length){var r=0,i=n.queue[r];if("mediaSource"!==i.type){if("mediaSource"!==t&&n.ready()&&"closed"!==n.mediaSource.readyState&&!us(t,n)){if(i.type!==t){if(null===(r=function(e,t){for(var n=0;n<t.length;n++){var r=t[n];if("mediaSource"===r.type)return null;if(r.type===e)return n}return null}(t,n.queue)))return;i=n.queue[r]}return n.queue.splice(r,1),n.queuePending[t]=i,i.action(t,n),i.doneFn?void 0:(n.queuePending[t]=null,void e(t,n))}}else n.updating()||"closed"===n.mediaSource.readyState||(n.queue.shift(),i.action(n),i.doneFn&&i.doneFn(),e("audio",n),e("video",n))}},cs=function(e,t){var n=t[e+"Buffer"],r=os(e);n&&(n.removeEventListener("updateend",t["on"+r+"UpdateEnd_"]),n.removeEventListener("error",t["on"+r+"Error_"]),t.codecs[e]=null,t[e+"Buffer"]=null)},ds=function(e,t){return e&&t&&-1!==Array.prototype.indexOf.call(e.sourceBuffers,t)},hs=function(e,t,n){return function(r,i){var a=i[r+"Buffer"];if(ds(i.mediaSource,a)){i.logger_("Appending segment "+t.mediaIndex+"'s "+e.length+" bytes to "+r+"Buffer");try{a.appendBuffer(e)}catch(o){i.logger_("Error with code "+o.code+" "+(22===o.code?"(QUOTA_EXCEEDED_ERR) ":"")+"when appending segment "+t.mediaIndex+" to "+r+"Buffer"),i.queuePending[r]=null,n(o)}}}},ps=function(e,t){return function(n,r){var i=r[n+"Buffer"];if(ds(r.mediaSource,i)){r.logger_("Removing "+e+" to "+t+" from "+n+"Buffer");try{i.remove(e,t)}catch(a){r.logger_("Remove "+e+" to "+t+" from "+n+"Buffer failed")}}}},fs=function(e){return function(t,n){var r=n[t+"Buffer"];ds(n.mediaSource,r)&&(n.logger_("Setting "+t+"timestampOffset to "+e),r.timestampOffset=e)}},ms=function(e){return function(t,n){e()}},gs=function(e){return function(t){if("open"===t.mediaSource.readyState){t.logger_("Calling mediaSource endOfStream("+(e||"")+")");try{t.mediaSource.endOfStream(e)}catch(n){Ki.log.warn("Failed to call media source endOfStream",n)}}}},vs=function(e){return function(t){t.logger_("Setting mediaSource duration to "+e);try{t.mediaSource.duration=e}catch(n){Ki.log.warn("Failed to set media source duration",n)}}},ys=function(){return function(e,t){if("open"===t.mediaSource.readyState){var n=t[e+"Buffer"];if(ds(t.mediaSource,n)){t.logger_("calling abort on "+e+"Buffer");try{n.abort()}catch(r){Ki.log.warn("Failed to abort on "+e+"Buffer",r)}}}}},bs=function(e,t){return function(n){var r=os(e),i=Object(x.e)(t);n.logger_("Adding "+e+"Buffer with codec "+t+" to mediaSource");var a=n.mediaSource.addSourceBuffer(i);a.addEventListener("updateend",n["on"+r+"UpdateEnd_"]),a.addEventListener("error",n["on"+r+"Error_"]),n.codecs[e]=t,n[e+"Buffer"]=a}},_s=function(e){return function(t){var n=t[e+"Buffer"];if(cs(e,t),ds(t.mediaSource,n)){t.logger_("Removing "+e+"Buffer with codec "+t.codecs[e]+" from mediaSource");try{t.mediaSource.removeSourceBuffer(n)}catch(r){Ki.log.warn("Failed to removeSourceBuffer "+e+"Buffer",r)}}}},Ts=function(e){return function(t,n){var r=n[t+"Buffer"],i=Object(x.e)(e);ds(n.mediaSource,r)&&n.codecs[t]!==e&&(n.logger_("changing "+t+"Buffer codec from "+n.codecs[t]+" to "+e),r.changeType(i),n.codecs[t]=e)}},Ss=function(e){var t=e.type,n=e.sourceUpdater,r=e.action,i=e.doneFn,a=e.name;n.queue.push({type:t,action:r,doneFn:i,name:a}),ls(t,n)},ws=function(e,t){return function(n){if(t.queuePending[e]){var r=t.queuePending[e].doneFn;t.queuePending[e]=null,r&&r(t[e+"Error_"])}ls(e,t)}},ks=function(e){function t(t){var n;return(n=e.call(this)||this).mediaSource=t,n.sourceopenListener_=function(){return ls("mediaSource",p()(n))},n.mediaSource.addEventListener("sourceopen",n.sourceopenListener_),n.logger_=$i("SourceUpdater"),n.audioTimestampOffset_=0,n.videoTimestampOffset_=0,n.queue=[],n.queuePending={audio:null,video:null},n.delayedAudioAppendQueue_=[],n.videoAppendQueued_=!1,n.codecs={},n.onVideoUpdateEnd_=ws("video",p()(n)),n.onAudioUpdateEnd_=ws("audio",p()(n)),n.onVideoError_=function(e){n.videoError_=e},n.onAudioError_=function(e){n.audioError_=e},n.createdSourceBuffers_=!1,n.initializedEme_=!1,n.triggeredReady_=!1,n}m()(t,e);var n=t.prototype;return n.initializedEme=function(){this.initializedEme_=!0,this.triggerReady()},n.hasCreatedSourceBuffers=function(){return this.createdSourceBuffers_},n.hasInitializedAnyEme=function(){return this.initializedEme_},n.ready=function(){return this.hasCreatedSourceBuffers()&&this.hasInitializedAnyEme()},n.createSourceBuffers=function(e){this.hasCreatedSourceBuffers()||(this.addOrChangeSourceBuffers(e),this.createdSourceBuffers_=!0,this.trigger("createdsourcebuffers"),this.triggerReady())},n.triggerReady=function(){this.ready()&&!this.triggeredReady_&&(this.triggeredReady_=!0,this.trigger("ready"))},n.addSourceBuffer=function(e,t){Ss({type:"mediaSource",sourceUpdater:this,action:bs(e,t),name:"addSourceBuffer"})},n.abort=function(e){Ss({type:e,sourceUpdater:this,action:ys(e),name:"abort"})},n.removeSourceBuffer=function(e){this.canRemoveSourceBuffer()?Ss({type:"mediaSource",sourceUpdater:this,action:_s(e),name:"removeSourceBuffer"}):Ki.log.error("removeSourceBuffer is not supported!")},n.canRemoveSourceBuffer=function(){return!Ki.browser.IE_VERSION&&!Ki.browser.IS_FIREFOX&&a.a.MediaSource&&a.a.MediaSource.prototype&&"function"===typeof a.a.MediaSource.prototype.removeSourceBuffer},t.canChangeType=function(){return a.a.SourceBuffer&&a.a.SourceBuffer.prototype&&"function"===typeof a.a.SourceBuffer.prototype.changeType},n.canChangeType=function(){return this.constructor.canChangeType()},n.changeType=function(e,t){this.canChangeType()?Ss({type:e,sourceUpdater:this,action:Ts(t),name:"changeType"}):Ki.log.error("changeType is not supported!")},n.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(n){var r=e[n];if(!t.hasCreatedSourceBuffers())return t.addSourceBuffer(n,r);t.canChangeType()&&t.changeType(n,r)}))},n.appendBuffer=function(e,t){var n=this,r=e.segmentInfo,i=e.type,a=e.bytes;if(this.processedAppend_=!0,"audio"===i&&this.videoBuffer&&!this.videoAppendQueued_)return this.delayedAudioAppendQueue_.push([e,t]),void this.logger_("delayed audio append of "+a.length+" until video append");if(Ss({type:i,sourceUpdater:this,action:hs(a,r||{mediaIndex:-1},t),doneFn:t,name:"appendBuffer"}),"video"===i){if(this.videoAppendQueued_=!0,!this.delayedAudioAppendQueue_.length)return;var o=this.delayedAudioAppendQueue_.slice();this.logger_("queuing delayed audio "+o.length+" appendBuffers"),this.delayedAudioAppendQueue_.length=0,o.forEach((function(e){n.appendBuffer.apply(n,e)}))}},n.audioBuffered=function(){return ds(this.mediaSource,this.audioBuffer)&&this.audioBuffer.buffered?this.audioBuffer.buffered:Ki.createTimeRange()},n.videoBuffered=function(){return ds(this.mediaSource,this.videoBuffer)&&this.videoBuffer.buffered?this.videoBuffer.buffered:Ki.createTimeRange()},n.buffered=function(){var e=ds(this.mediaSource,this.videoBuffer)?this.videoBuffer:null,t=ds(this.mediaSource,this.audioBuffer)?this.audioBuffer:null;return t&&!e?this.audioBuffered():e&&!t?this.videoBuffered():function(e,t){var n=null,r=null,i=0,a=[],o=[];if(!e||!e.length||!t||!t.length)return Ki.createTimeRange();for(var s=e.length;s--;)a.push({time:e.start(s),type:"start"}),a.push({time:e.end(s),type:"end"});for(s=t.length;s--;)a.push({time:t.start(s),type:"start"}),a.push({time:t.end(s),type:"end"});for(a.sort((function(e,t){return e.time-t.time})),s=0;s<a.length;s++)"start"===a[s].type?2===++i&&(n=a[s].time):"end"===a[s].type&&1===--i&&(r=a[s].time),null!==n&&null!==r&&(o.push([n,r]),n=null,r=null);return Ki.createTimeRanges(o)}(this.audioBuffered(),this.videoBuffered())},n.setDuration=function(e,t){void 0===t&&(t=is),Ss({type:"mediaSource",sourceUpdater:this,action:vs(e),name:"duration",doneFn:t})},n.endOfStream=function(e,t){void 0===e&&(e=null),void 0===t&&(t=is),"string"!==typeof e&&(e=void 0),Ss({type:"mediaSource",sourceUpdater:this,action:gs(e),name:"endOfStream",doneFn:t})},n.removeAudio=function(e,t,n){void 0===n&&(n=is),this.audioBuffered().length&&0!==this.audioBuffered().end(0)?Ss({type:"audio",sourceUpdater:this,action:ps(e,t),doneFn:n,name:"remove"}):n()},n.removeVideo=function(e,t,n){void 0===n&&(n=is),this.videoBuffered().length&&0!==this.videoBuffered().end(0)?Ss({type:"video",sourceUpdater:this,action:ps(e,t),doneFn:n,name:"remove"}):n()},n.updating=function(){return!(!us("audio",this)&&!us("video",this))},n.audioTimestampOffset=function(e){return"undefined"!==typeof e&&this.audioBuffer&&this.audioTimestampOffset_!==e&&(Ss({type:"audio",sourceUpdater:this,action:fs(e),name:"timestampOffset"}),this.audioTimestampOffset_=e),this.audioTimestampOffset_},n.videoTimestampOffset=function(e){return"undefined"!==typeof e&&this.videoBuffer&&this.videoTimestampOffset!==e&&(Ss({type:"video",sourceUpdater:this,action:fs(e),name:"timestampOffset"}),this.videoTimestampOffset_=e),this.videoTimestampOffset_},n.audioQueueCallback=function(e){this.audioBuffer&&Ss({type:"audio",sourceUpdater:this,action:ms(e),name:"callback"})},n.videoQueueCallback=function(e){this.videoBuffer&&Ss({type:"video",sourceUpdater:this,action:ms(e),name:"callback"})},n.dispose=function(){var e=this;this.trigger("dispose"),ss.forEach((function(t){e.abort(t),e.canRemoveSourceBuffer()?e.removeSourceBuffer(t):e[t+"QueueCallback"]((function(){return cs(t,e)}))})),this.videoAppendQueued_=!1,this.delayedAudioAppendQueue_.length=0,this.sourceopenListener_&&this.mediaSource.removeEventListener("sourceopen",this.sourceopenListener_),this.off()},t}(Ki.EventTarget),Cs=function(e){return decodeURIComponent(escape(String.fromCharCode.apply(null,e)))},Es=new Uint8Array("\n\n".split("").map((function(e){return e.charCodeAt(0)}))),As=function(e){function t(){return e.call(this,"Trying to parse received VTT cues, but there is no WebVTT. Make sure vtt.js is loaded.")||this}return m()(t,e),t}(B()(Error)),xs=function(e){function t(t,n){var r;return void 0===n&&(n={}),(r=e.call(this,t,n)||this).mediaSource_=null,r.subtitlesTrack_=null,r.loaderType_="subtitle",r.featuresNativeTextTracks_=t.featuresNativeTextTracks,r.loadVttJs=t.loadVttJs,r.shouldSaveSegmentTimingInfo_=!1,r}m()(t,e);var n=t.prototype;return n.createTransmuxer_=function(){return null},n.buffered_=function(){if(!this.subtitlesTrack_||!this.subtitlesTrack_.cues||!this.subtitlesTrack_.cues.length)return Ki.createTimeRanges();var e=this.subtitlesTrack_.cues,t=e[0].startTime,n=e[e.length-1].startTime;return Ki.createTimeRanges([[t,n]])},n.initSegmentForMap=function(e,t){if(void 0===t&&(t=!1),!e)return null;var n=Xa(e),r=this.initSegments_[n];if(t&&!r&&e.bytes){var i=Es.byteLength+e.bytes.byteLength,a=new Uint8Array(i);a.set(e.bytes),a.set(Es,e.bytes.byteLength),this.initSegments_[n]=r={resolvedUri:e.resolvedUri,byterange:e.byterange,bytes:a}}return r||e},n.couldBeginLoading_=function(){return this.playlist_&&this.subtitlesTrack_&&!this.paused()},n.init_=function(){return this.state="READY",this.resetEverything(),this.monitorBuffer_()},n.track=function(e){return"undefined"===typeof e||(this.subtitlesTrack_=e,"INIT"===this.state&&this.couldBeginLoading_()&&this.init_()),this.subtitlesTrack_},n.remove=function(e,t){Qo(e,t,this.subtitlesTrack_)},n.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)}},n.timestampOffsetForSegment_=function(){return null},n.chooseNextRequest_=function(){return this.skipEmptySegments_(e.prototype.chooseNextRequest_.call(this))},n.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},n.stopForError=function(e){this.error(e),this.state="READY",this.pause(),this.trigger("error")},n.segmentRequestFinished_=function(e,t,n){var r=this;if(this.subtitlesTrack_){if(this.saveTransferStats_(t.stats),!this.pendingSegment_)return this.state="READY",void(this.mediaRequestsAborted+=1);if(e)return e.code===ko&&this.handleTimeout_(),e.code===Co?this.mediaRequestsAborted+=1:this.mediaRequestsErrored+=1,void this.stopForError(e);var i=this.pendingSegment_;this.saveBandwidthRelatedStats_(i.duration,t.stats),t.key&&this.segmentKey(t.key,!0),this.state="APPENDING",this.trigger("appending");var o=i.segment;if(o.map&&(o.map.bytes=t.map.bytes),i.bytes=t.bytes,"function"!==typeof a.a.WebVTT&&"function"===typeof this.loadVttJs)return this.state="WAITING_ON_VTTJS",void this.loadVttJs().then((function(){return r.segmentRequestFinished_(e,t,n)}),(function(){return r.stopForError({message:"Error loading vtt.js"})}));o.requested=!0;try{this.parseVTTCues_(i)}catch(s){return void this.stopForError({message:s.message})}if(this.updateTimeMapping_(i,this.syncController_.timelines[i.timeline],this.playlist_),i.cues.length?i.timingInfo={start:i.cues[0].startTime,end:i.cues[i.cues.length-1].endTime}:i.timingInfo={start:i.startOfSegment,end:i.startOfSegment+i.duration},i.isSyncRequest)return this.trigger("syncinfoupdate"),this.pendingSegment_=null,void(this.state="READY");i.byteLength=i.bytes.byteLength,this.mediaSecondsLoaded+=o.duration,i.cues.forEach((function(e){r.subtitlesTrack_.addCue(r.featuresNativeTextTracks_?new a.a.VTTCue(e.startTime,e.endTime,e.text):e)})),function(e){var t=e.cues;if(t)for(var n=0;n<t.length;n++){for(var r=[],i=0,a=0;a<t.length;a++)t[n].startTime===t[a].startTime&&t[n].endTime===t[a].endTime&&t[n].text===t[a].text&&++i>1&&r.push(t[a]);r.length&&r.forEach((function(t){return e.removeCue(t)}))}}(this.subtitlesTrack_),this.handleAppendsDone_()}else this.state="READY"},n.handleData_=function(){},n.updateTimingInfoEnd_=function(){},n.parseVTTCues_=function(e){var t,n=!1;if("function"!==typeof a.a.WebVTT)throw new As;"function"===typeof a.a.TextDecoder?t=new a.a.TextDecoder("utf8"):(t=a.a.WebVTT.StringDecoder(),n=!0);var r=new a.a.WebVTT.Parser(a.a,a.a.vttjs,t);if(e.cues=[],e.timestampmap={MPEGTS:0,LOCAL:0},r.oncue=e.cues.push.bind(e.cues),r.ontimestampmap=function(t){e.timestampmap=t},r.onparsingerror=function(e){Ki.log.warn("Error encountered when parsing cues: "+e.message)},e.segment.map){var i=e.segment.map.bytes;n&&(i=Cs(i)),r.parse(i)}var o=e.bytes;n&&(o=Cs(o)),r.parse(o),r.flush()},n.updateTimeMapping_=function(e,t,n){var r=e.segment;if(t)if(e.cues.length){var i=e.timestampmap,a=i.MPEGTS/N.ONE_SECOND_IN_TS-i.LOCAL+t.mapping;if(e.cues.forEach((function(e){e.startTime+=a,e.endTime+=a})),!n.syncInfo){var o=e.cues[0].startTime,s=e.cues[e.cues.length-1].startTime;n.syncInfo={mediaSequence:n.mediaSequence+e.mediaIndex,time:Math.min(o,s-r.duration)}}}else r.empty=!0},t}(rs),Ps=function(e,t){for(var n=e.cues,r=0;r<n.length;r++){var i=n[r];if(t>=i.adStartTime&&t<=i.adEndTime)return i}return null},Is=[{name:"VOD",run:function(e,t,n,r,i){if(n!==1/0){return{time:0,segmentIndex:0,partIndex:null}}return null}},{name:"ProgramDateTime",run:function(e,t,n,r,i){if(!Object.keys(e.timelineToDatetimeMappings).length)return null;var a=null,o=null,s=sa(t);i=i||0;for(var u=0;u<s.length;u++){var l=s[t.endList||0===i?u:s.length-(u+1)],c=l.segment,d=e.timelineToDatetimeMappings[c.timeline];if(d&&c.dateTimeObject){var h=c.dateTimeObject.getTime()/1e3+d;if(c.parts&&"number"===typeof l.partIndex)for(var p=0;p<l.partIndex;p++)h+=c.parts[p].duration;var f=Math.abs(i-h);if(null!==o&&(0===f||o<f))break;o=f,a={time:h,segmentIndex:l.segmentIndex,partIndex:l.partIndex}}}return a}},{name:"Segment",run:function(e,t,n,r,i){var a=null,o=null;i=i||0;for(var s=sa(t),u=0;u<s.length;u++){var l=s[t.endList||0===i?u:s.length-(u+1)],c=l.segment,d=l.part&&l.part.start||c&&c.start;if(c.timeline===r&&"undefined"!==typeof d){var h=Math.abs(i-d);if(null!==o&&o<h)break;(!a||null===o||o>=h)&&(o=h,a={time:d,segmentIndex:l.segmentIndex,partIndex:l.partIndex})}}return a}},{name:"Discontinuity",run:function(e,t,n,r,i){var a=null;if(i=i||0,t.discontinuityStarts&&t.discontinuityStarts.length)for(var o=null,s=0;s<t.discontinuityStarts.length;s++){var u=t.discontinuityStarts[s],l=t.discontinuitySequence+s+1,c=e.discontinuities[l];if(c){var d=Math.abs(i-c.time);if(null!==o&&o<d)break;(!a||null===o||o>=d)&&(o=d,a={time:c.time,segmentIndex:u,partIndex:null})}}return a}},{name:"Playlist",run:function(e,t,n,r,i){return t.syncInfo?{time:t.syncInfo.time,segmentIndex:t.syncInfo.mediaSequence-t.mediaSequence,partIndex:null}:null}}],Os=function(e){function t(t){var n;return(n=e.call(this)||this).timelines=[],n.discontinuities=[],n.timelineToDatetimeMappings={},n.logger_=$i("SyncController"),n}m()(t,e);var n=t.prototype;return n.getSyncPoint=function(e,t,n,r){var i=this.runStrategies_(e,t,n,r);return i.length?this.selectSyncPoint_(i,{key:"time",value:r}):null},n.getExpiredTime=function(e,t){if(!e||!e.segments)return null;var n=this.runStrategies_(e,t,e.discontinuitySequence,0);if(!n.length)return null;var r=this.selectSyncPoint_(n,{key:"segmentIndex",value:0});return r.segmentIndex>0&&(r.time*=-1),Math.abs(r.time+pa({defaultDuration:e.targetDuration,durationList:e.segments,startIndex:r.segmentIndex,endIndex:0}))},n.runStrategies_=function(e,t,n,r){for(var i=[],a=0;a<Is.length;a++){var o=Is[a],s=o.run(this,e,t,n,r);s&&(s.strategy=o.name,i.push({strategy:o.name,syncPoint:s}))}return i},n.selectSyncPoint_=function(e,t){for(var n=e[0].syncPoint,r=Math.abs(e[0].syncPoint[t.key]-t.value),i=e[0].strategy,a=1;a<e.length;a++){var o=Math.abs(e[a].syncPoint[t.key]-t.value);o<r&&(r=o,n=e[a].syncPoint,i=e[a].strategy)}return this.logger_("syncPoint for ["+t.key+": "+t.value+"] chosen with strategy ["+i+"]: [time:"+n.time+", segmentIndex:"+n.segmentIndex+("number"===typeof n.partIndex?",partIndex:"+n.partIndex:"")+"]"),n},n.saveExpiredSegmentInfo=function(e,t){var n=t.mediaSequence-e.mediaSequence;if(n>86400)Ki.log.warn("Not saving expired segment info. Media sequence gap "+n+" is too large.");else for(var r=n-1;r>=0;r--){var i=e.segments[r];if(i&&"undefined"!==typeof i.start){t.syncInfo={mediaSequence:e.mediaSequence+r,time:i.start},this.logger_("playlist refresh sync: [time:"+t.syncInfo.time+", mediaSequence: "+t.syncInfo.mediaSequence+"]"),this.trigger("syncinfoupdate");break}}},n.setDateTimeMappingForStart=function(e){if(this.timelineToDatetimeMappings={},e.segments&&e.segments.length&&e.segments[0].dateTimeObject){var t=e.segments[0],n=t.dateTimeObject.getTime()/1e3;this.timelineToDatetimeMappings[t.timeline]=-n}},n.saveSegmentTimingInfo=function(e){var t=e.segmentInfo,n=e.shouldSaveTimelineMapping,r=this.calculateSegmentTimeMapping_(t,t.timingInfo,n),i=t.segment;r&&(this.saveDiscontinuitySyncInfo_(t),t.playlist.syncInfo||(t.playlist.syncInfo={mediaSequence:t.playlist.mediaSequence+t.mediaIndex,time:i.start}));var a=i.dateTimeObject;i.discontinuity&&n&&a&&(this.timelineToDatetimeMappings[i.timeline]=-a.getTime()/1e3)},n.timestampOffsetForTimeline=function(e){return"undefined"===typeof this.timelines[e]?null:this.timelines[e].time},n.mappingForTimeline=function(e){return"undefined"===typeof this.timelines[e]?null:this.timelines[e].mapping},n.calculateSegmentTimeMapping_=function(e,t,n){var r,i,a=e.segment,o=e.part,s=this.timelines[e.timeline];if("number"===typeof e.timestampOffset)s={time:e.startOfSegment,mapping:e.startOfSegment-t.start},n&&(this.timelines[e.timeline]=s,this.trigger("timestampoffset"),this.logger_("time mapping for timeline "+e.timeline+": [time: "+s.time+"] [mapping: "+s.mapping+"]")),r=e.startOfSegment,i=t.end+s.mapping;else{if(!s)return!1;r=t.start+s.mapping,i=t.end+s.mapping}return o&&(o.start=r,o.end=i),(!a.start||r<a.start)&&(a.start=r),a.end=i,!0},n.saveDiscontinuitySyncInfo_=function(e){var t=e.playlist,n=e.segment;if(n.discontinuity)this.discontinuities[n.timeline]={time:n.start,accuracy:0};else if(t.discontinuityStarts&&t.discontinuityStarts.length)for(var r=0;r<t.discontinuityStarts.length;r++){var i=t.discontinuityStarts[r],a=t.discontinuitySequence+r+1,o=i-e.mediaIndex,s=Math.abs(o);if(!this.discontinuities[a]||this.discontinuities[a].accuracy>s){var u=void 0;u=o<0?n.start-pa({defaultDuration:t.targetDuration,durationList:t.segments,startIndex:e.mediaIndex,endIndex:i}):n.end+pa({defaultDuration:t.targetDuration,durationList:t.segments,startIndex:e.mediaIndex+1,endIndex:i}),this.discontinuities[a]={time:u,accuracy:s}}}},n.dispose=function(){this.trigger("dispose"),this.off()},t}(Ki.EventTarget),Ls=function(e){function t(){var t;return(t=e.call(this)||this).pendingTimelineChanges_={},t.lastTimelineChanges_={},t}m()(t,e);var n=t.prototype;return n.clearPendingTimelineChange=function(e){this.pendingTimelineChanges_[e]=null,this.trigger("pendingtimelinechange")},n.pendingTimelineChange=function(e){var t=e.type,n=e.from,r=e.to;return"number"===typeof n&&"number"===typeof r&&(this.pendingTimelineChanges_[t]={type:t,from:n,to:r},this.trigger("pendingtimelinechange")),this.pendingTimelineChanges_[t]},n.lastTimelineChange=function(e){var t=e.type,n=e.from,r=e.to;return"number"===typeof n&&"number"===typeof r&&(this.lastTimelineChanges_[t]={type:t,from:n,to:r},delete this.pendingTimelineChanges_[t],this.trigger("timelinechange")),this.lastTimelineChanges_[t]},n.dispose=function(){this.trigger("dispose"),this.pendingTimelineChanges_={},this.lastTimelineChanges_={},this.off()},t}(Ki.EventTarget),Ds=co(ho(po((function(){var t="undefined"!==typeof globalThis?globalThis:"undefined"!==typeof window?window:"undefined"!==typeof e?e:"undefined"!==typeof self?self:{};function n(e,t,n){return e(n={path:t,exports:{},require:function(e,t){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}((void 0===t||null===t)&&n.path)}},n.exports),n.exports}var r=n((function(e){function t(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}e.exports=function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e},e.exports.default=e.exports,e.exports.__esModule=!0})),i=n((function(e){function t(n,r){return e.exports=t=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},e.exports.default=e.exports,e.exports.__esModule=!0,t(n,r)}e.exports=t,e.exports.default=e.exports,e.exports.__esModule=!0})),a=n((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})),o=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 n=this.listeners[e].indexOf(t);return this.listeners[e]=this.listeners[e].slice(0),this.listeners[e].splice(n,1),n>-1},t.trigger=function(e){var t=this.listeners[e];if(t)if(2===arguments.length)for(var n=t.length,r=0;r<n;++r)t[r].call(this,arguments[1]);else for(var i=Array.prototype.slice.call(arguments,1),a=t.length,o=0;o<a;++o)t[o].apply(this,i)},t.dispose=function(){this.listeners={}},t.pipe=function(e){this.on("data",(function(t){e.push(t)}))},e}();var s,u=null,l=function(){function e(e){var t,n,r;u||(u=function(){var e,t,n,r,i,a,o,s,u=[[[],[],[],[],[]],[[],[],[],[],[]]],l=u[0],c=u[1],d=l[4],h=c[4],p=[],f=[];for(e=0;e<256;e++)f[(p[e]=e<<1^283*(e>>7))^e]=e;for(t=n=0;!d[t];t^=r||1,n=f[n]||1)for(a=(a=n^n<<1^n<<2^n<<3^n<<4)>>8^255&a^99,d[t]=a,h[a]=t,s=16843009*p[i=p[r=p[t]]]^65537*i^257*r^16843008*t,o=257*p[a]^16843008*a,e=0;e<4;e++)l[e][t]=o=o<<24^o>>>8,c[e][a]=s=s<<24^s>>>8;for(e=0;e<5;e++)l[e]=l[e].slice(0),c[e]=c[e].slice(0);return u}()),this._tables=[[u[0][0].slice(),u[0][1].slice(),u[0][2].slice(),u[0][3].slice(),u[0][4].slice()],[u[1][0].slice(),u[1][1].slice(),u[1][2].slice(),u[1][3].slice(),u[1][4].slice()]];var i=this._tables[0][4],a=this._tables[1],o=e.length,s=1;if(4!==o&&6!==o&&8!==o)throw new Error("Invalid aes key size");var l=e.slice(0),c=[];for(this._key=[l,c],t=o;t<4*o+28;t++)r=l[t-1],(t%o===0||8===o&&t%o===4)&&(r=i[r>>>24]<<24^i[r>>16&255]<<16^i[r>>8&255]<<8^i[255&r],t%o===0&&(r=r<<8^r>>>24^s<<24,s=s<<1^283*(s>>7))),l[t]=l[t-o]^r;for(n=0;t;n++,t--)r=l[3&n?t:t-4],c[n]=t<=4||n<4?r:a[0][i[r>>>24]]^a[1][i[r>>16&255]]^a[2][i[r>>8&255]]^a[3][i[255&r]]}return e.prototype.decrypt=function(e,t,n,r,i,a){var o,s,u,l,c=this._key[1],d=e^c[0],h=r^c[1],p=n^c[2],f=t^c[3],m=c.length/4-2,g=4,v=this._tables[1],y=v[0],b=v[1],_=v[2],T=v[3],S=v[4];for(l=0;l<m;l++)o=y[d>>>24]^b[h>>16&255]^_[p>>8&255]^T[255&f]^c[g],s=y[h>>>24]^b[p>>16&255]^_[f>>8&255]^T[255&d]^c[g+1],u=y[p>>>24]^b[f>>16&255]^_[d>>8&255]^T[255&h]^c[g+2],f=y[f>>>24]^b[d>>16&255]^_[h>>8&255]^T[255&p]^c[g+3],g+=4,d=o,h=s,p=u;for(l=0;l<4;l++)i[(3&-l)+a]=S[d>>>24]<<24^S[h>>16&255]<<16^S[p>>8&255]<<8^S[255&f]^c[g++],o=d,d=h,h=p,p=f,f=o},e}(),c=function(e){function t(){var t;return(t=e.call(this,o)||this).jobs=[],t.delay=1,t.timeout_=null,t}a(t,e);var n=t.prototype;return n.processJob_=function(){this.jobs.shift()(),this.jobs.length?this.timeout_=setTimeout(this.processJob_.bind(this),this.delay):this.timeout_=null},n.push=function(e){this.jobs.push(e),this.timeout_||(this.timeout_=setTimeout(this.processJob_.bind(this),this.delay))},t}(o),d=function(e){return e<<24|(65280&e)<<8|(16711680&e)>>8|e>>>24},h=function(){function e(t,n,r,i){var a=e.STEP,o=new Int32Array(t.buffer),s=new Uint8Array(t.byteLength),u=0;for(this.asyncStream_=new c,this.asyncStream_.push(this.decryptChunk_(o.subarray(u,u+a),n,r,s)),u=a;u<o.length;u+=a)r=new Uint32Array([d(o[u-4]),d(o[u-3]),d(o[u-2]),d(o[u-1])]),this.asyncStream_.push(this.decryptChunk_(o.subarray(u,u+a),n,r,s));this.asyncStream_.push((function(){var e;i(null,(e=s).subarray(0,e.byteLength-e[e.byteLength-1]))}))}return e.prototype.decryptChunk_=function(e,t,n,r){return function(){var i=function(e,t,n){var r,i,a,o,s,u,c,h,p,f=new Int32Array(e.buffer,e.byteOffset,e.byteLength>>2),m=new l(Array.prototype.slice.call(t)),g=new Uint8Array(e.byteLength),v=new Int32Array(g.buffer);for(r=n[0],i=n[1],a=n[2],o=n[3],p=0;p<f.length;p+=4)s=d(f[p]),u=d(f[p+1]),c=d(f[p+2]),h=d(f[p+3]),m.decrypt(s,u,c,h,v,p),v[p]=d(v[p]^r),v[p+1]=d(v[p+1]^i),v[p+2]=d(v[p+2]^a),v[p+3]=d(v[p+3]^o),r=s,i=u,a=c,o=h;return g}(e,t,n);r.set(i,e.byteOffset)}},r(e,null,[{key:"STEP",get:function(){return 32e3}}]),e}();s="undefined"!==typeof window?window:"undefined"!==typeof t?t:"undefined"!==typeof self?self:{};var p=s.BigInt||Number;p("0x1"),p("0x100"),p("0x10000"),p("0x1000000"),p("0x100000000"),p("0x10000000000"),p("0x1000000000000"),p("0x100000000000000"),p("0x10000000000000000");var f=function(e){var t={};return Object.keys(e).forEach((function(n){var r,i=e[n];r=i,("function"===ArrayBuffer.isView?ArrayBuffer.isView(r):r&&r.buffer instanceof ArrayBuffer)?t[n]={bytes:i.buffer,byteOffset:i.byteOffset,byteLength:i.byteLength}:t[n]=i})),t};self.onmessage=function(e){var t=e.data,n=new Uint8Array(t.encrypted.bytes,t.encrypted.byteOffset,t.encrypted.byteLength),r=new Uint32Array(t.key.bytes,t.key.byteOffset,t.key.byteLength/4),i=new Uint32Array(t.iv.bytes,t.iv.byteOffset,t.iv.byteLength/4);new h(n,r,i,(function(e,n){self.postMessage(f({source:t.source,decrypted:n}),[n.buffer])}))}})))),Ms=function(e){var t=e.default?"main":"alternative";return e.characteristics&&e.characteristics.indexOf("public.accessibility.describes-video")>=0&&(t="main-desc"),t},Rs=function(e,t){e.abort(),e.pause(),t&&t.activePlaylistLoader&&(t.activePlaylistLoader.pause(),t.activePlaylistLoader=null)},Ns=function(e,t){t.activePlaylistLoader=e,e.load()},js={AUDIO:function(e,t){return function(){var n=t.segmentLoaders[e],r=t.mediaTypes[e],i=t.blacklistCurrentPlaylist;Rs(n,r);var a=r.activeTrack(),o=r.activeGroup(),s=(o.filter((function(e){return e.default}))[0]||o[0]).id,u=r.tracks[s];if(a!==u){for(var l in Ki.log.warn("Problem encountered loading the alternate audio track.Switching back to default."),r.tracks)r.tracks[l].enabled=r.tracks[l]===u;r.onTrackChanged()}else i({message:"Problem encountered loading the default audio track."})}},SUBTITLES:function(e,t){return function(){var n=t.segmentLoaders[e],r=t.mediaTypes[e];Ki.log.warn("Problem encountered loading the subtitle track.Disabling subtitle track."),Rs(n,r);var i=r.activeTrack();i&&(i.mode="disabled"),r.onTrackChanged()}}},Bs={AUDIO:function(e,t,n){if(t){var r=n.tech,i=n.requestOptions,a=n.segmentLoaders[e];t.on("loadedmetadata",(function(){var e=t.media();a.playlist(e,i),(!r.paused()||e.endList&&"none"!==r.preload())&&a.load()})),t.on("loadedplaylist",(function(){a.playlist(t.media(),i),r.paused()||a.load()})),t.on("error",js[e](e,n))}},SUBTITLES:function(e,t,n){var r=n.tech,i=n.requestOptions,a=n.segmentLoaders[e],o=n.mediaTypes[e];t.on("loadedmetadata",(function(){var e=t.media();a.playlist(e,i),a.track(o.activeTrack()),(!r.paused()||e.endList&&"none"!==r.preload())&&a.load()})),t.on("loadedplaylist",(function(){a.playlist(t.media(),i),r.paused()||a.load()})),t.on("error",js[e](e,n))}},Us={AUDIO:function(e,t){var n=t.vhs,r=t.sourceType,i=t.segmentLoaders[e],a=t.requestOptions,o=t.master.mediaGroups,s=t.mediaTypes[e],u=s.groups,l=s.tracks,c=s.logger_,d=t.masterPlaylistLoader,h=Sa(d.master);for(var p in o[e]&&0!==Object.keys(o[e]).length||(o[e]={main:{default:{default:!0}}},h&&(o[e].main.default.playlists=d.master.playlists)),o[e])for(var f in u[p]||(u[p]=[]),o[e][p]){var m=o[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"===r&&m.playlists?new Ba(m.playlists[0],n,a):m.resolvedUri?new Ba(m.resolvedUri,n,a):m.playlists&&"dash"===r?new so(m.playlists[0],n,a,d):null,m=Ki.mergeOptions({id:f,playlistLoader:g},m),Bs[e](e,m.playlistLoader,t),u[p].push(m),"undefined"===typeof l[f]){var v=new Ki.AudioTrack({id:f,kind:Ms(m),enabled:!1,language:m.language,default:m.default,label:f});l[f]=v}}i.on("error",js[e](e,t))},SUBTITLES:function(e,t){var n=t.tech,r=t.vhs,i=t.sourceType,a=t.segmentLoaders[e],o=t.requestOptions,s=t.master.mediaGroups,u=t.mediaTypes[e],l=u.groups,c=u.tracks,d=t.masterPlaylistLoader;for(var h in s[e])for(var p in l[h]||(l[h]=[]),s[e][h])if(!s[e][h][p].forced){var f=s[e][h][p],m=void 0;if("hls"===i)m=new Ba(f.resolvedUri,r,o);else if("dash"===i){if(!f.playlists.filter((function(e){return e.excludeUntil!==1/0})).length)return;m=new so(f.playlists[0],r,o,d)}else"vhs-json"===i&&(m=new Ba(f.playlists?f.playlists[0]:f.resolvedUri,r,o));if(f=Ki.mergeOptions({id:p,playlistLoader:m},f),Bs[e](e,f.playlistLoader,t),l[h].push(f),"undefined"===typeof c[p]){var g=n.addRemoteTextTrack({id:p,kind:"subtitles",default:f.default&&f.autoselect,language:f.language,label:p},!1).track;c[p]=g}}a.on("error",js[e](e,t))},"CLOSED-CAPTIONS":function(e,t){var n=t.tech,r=t.master.mediaGroups,i=t.mediaTypes[e],a=i.groups,o=i.tracks;for(var s in r[e])for(var u in a[s]||(a[s]=[]),r[e][s]){var l=r[e][s][u];if(/^(?:CC|SERVICE)/.test(l.instreamId)){var c=n.options_.vhs&&n.options_.vhs.captionServices||{},d={label:u,language:l.language,instreamId:l.instreamId,default:l.default&&l.autoselect};if(c[d.instreamId]&&(d=Ki.mergeOptions(d,c[d.instreamId])),void 0===d.default&&delete d.default,a[s].push(Ki.mergeOptions({id:u},l)),"undefined"===typeof o[u]){var h=n.addRemoteTextTrack({id:d.instreamId,kind:"captions",default:d.default,language:d.language,label:d.label},!1).track;o[u]=h}}}}},Fs=function e(t,n){for(var r=0;r<t.length;r++){if(_a(n,t[r]))return!0;if(t[r].playlists&&e(t[r].playlists,n))return!0}return!1},qs={AUDIO:function(e,t){return function(){var n=t.mediaTypes[e].tracks;for(var r in n)if(n[r].enabled)return n[r];return null}},SUBTITLES:function(e,t){return function(){var n=t.mediaTypes[e].tracks;for(var r in n)if("showing"===n[r].mode||"hidden"===n[r].mode)return n[r];return null}}},Hs=function(e){["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach((function(t){Us[t](t,e)}));var t=e.mediaTypes,n=e.masterPlaylistLoader,r=e.tech,i=e.vhs,a=e.segmentLoaders,o=a.AUDIO,s=a.main;["AUDIO","SUBTITLES"].forEach((function(n){t[n].activeGroup=function(e,t){return function(n){var r=t.masterPlaylistLoader,i=t.mediaTypes[e].groups,a=r.media();if(!a)return null;var o=null;a.attributes[e]&&(o=i[a.attributes[e]]);var s=Object.keys(i);if(!o)if("AUDIO"===e&&s.length>1&&Sa(t.master))for(var u=0;u<s.length;u++){var l=i[s[u]];if(Fs(l,a)){o=l;break}}else i.main?o=i.main:1===s.length&&(o=i[s[0]]);return"undefined"===typeof n?o:null!==n&&o&&o.filter((function(e){return e.id===n.id}))[0]||null}}(n,e),t[n].activeTrack=qs[n](n,e),t[n].onGroupChanged=function(e,t){return function(){var n=t.segmentLoaders,r=n[e],i=n.main,a=t.mediaTypes[e],o=a.activeTrack(),s=a.getActiveGroup(),u=a.activePlaylistLoader,l=a.lastGroup_;s&&l&&s.id===l.id||(a.lastGroup_=s,a.lastTrack_=o,Rs(r,a),s&&!s.isMasterPlaylist&&(s.playlistLoader?(r.resyncLoader(),Ns(s.playlistLoader,a)):u&&i.resetEverything()))}}(n,e),t[n].onGroupChanging=function(e,t){return function(){var n=t.segmentLoaders[e];t.mediaTypes[e].lastGroup_=null,n.abort(),n.pause()}}(n,e),t[n].onTrackChanged=function(e,t){return function(){var n=t.masterPlaylistLoader,r=t.segmentLoaders,i=r[e],a=r.main,o=t.mediaTypes[e],s=o.activeTrack(),u=o.getActiveGroup(),l=o.activePlaylistLoader,c=o.lastTrack_;if((!c||!s||c.id!==s.id)&&(o.lastGroup_=u,o.lastTrack_=s,Rs(i,o),u)){if(u.isMasterPlaylist){if(!s||!c||s.id===c.id)return;var d=t.vhs.masterPlaylistController_,h=d.selectPlaylist();if(d.media()===h)return;return o.logger_("track change. Switching master audio from "+c.id+" to "+s.id),n.pause(),a.resetEverything(),void d.fastQualityChange_(h)}if("AUDIO"===e){if(!u.playlistLoader)return a.setAudio(!0),void a.resetEverything();i.setAudio(!0),a.setAudio(!1)}l!==u.playlistLoader?(i.track&&i.track(s),i.resetEverything(),Ns(u.playlistLoader,o)):Ns(u.playlistLoader,o)}}}(n,e),t[n].getActiveGroup=function(e,t){var n=t.mediaTypes;return function(){var t=n[e].activeTrack();return t?n[e].activeGroup(t):null}}(n,e)}));var u=t.AUDIO.activeGroup();if(u){var l=(u.filter((function(e){return e.default}))[0]||u[0]).id;t.AUDIO.tracks[l].enabled=!0,t.AUDIO.onGroupChanged(),t.AUDIO.onTrackChanged(),t.AUDIO.getActiveGroup().playlistLoader?(s.setAudio(!1),o.setAudio(!0)):s.setAudio(!0)}n.on("mediachange",(function(){["AUDIO","SUBTITLES"].forEach((function(e){return t[e].onGroupChanged()}))})),n.on("mediachanging",(function(){["AUDIO","SUBTITLES"].forEach((function(e){return t[e].onGroupChanging()}))}));var c=function(){t.AUDIO.onTrackChanged(),r.trigger({type:"usage",name:"vhs-audio-change"}),r.trigger({type:"usage",name:"hls-audio-change"})};for(var d in r.audioTracks().addEventListener("change",c),r.remoteTextTracks().addEventListener("change",t.SUBTITLES.onTrackChanged),i.on("dispose",(function(){r.audioTracks().removeEventListener("change",c),r.remoteTextTracks().removeEventListener("change",t.SUBTITLES.onTrackChanged)})),r.clearTracks("audio"),t.AUDIO.tracks)r.audioTracks().addTrack(t.AUDIO.tracks[d])},zs=["mediaRequests","mediaRequestsAborted","mediaRequestsTimedout","mediaRequestsErrored","mediaTransferDuration","mediaBytesTransferred","mediaAppends"],Ws=function(e){return this.audioSegmentLoader_[e]+this.mainSegmentLoader_[e]},Vs=function(e){function t(t){var n;n=e.call(this)||this;var r=t.src,i=t.handleManifestRedirects,o=t.withCredentials,s=t.tech,u=t.bandwidth,l=t.externVhs,c=t.useCueTags,d=t.blacklistDuration,h=t.enableLowInitialPlaylist,f=t.sourceType,m=t.cacheEncryptionKeys,g=t.experimentalBufferBasedABR,v=t.experimentalLeastPixelDiffSelector,y=t.captionServices;if(!r)throw new Error("A non-empty playlist URL or JSON manifest string is required");var b=t.maxPlaylistRetries;null!==b&&"undefined"!==typeof b||(b=1/0),as=l,n.experimentalBufferBasedABR=Boolean(g),n.experimentalLeastPixelDiffSelector=Boolean(v),n.withCredentials=o,n.tech_=s,n.vhs_=s.vhs,n.sourceType_=f,n.useCueTags_=c,n.blacklistDuration=d,n.maxPlaylistRetries=b,n.enableLowInitialPlaylist=h,n.useCueTags_&&(n.cueTagsTrack_=n.tech_.addTextTrack("metadata","ad-cues"),n.cueTagsTrack_.inBandMetadataTrackDispatchType=""),n.requestOptions_={withCredentials:o,handleManifestRedirects:i,maxPlaylistRetries:b,timeout:null},n.on("error",n.pauseLoading),n.mediaTypes_=function(){var e={};return["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach((function(t){e[t]={groups:{},tracks:{},activePlaylistLoader:null,activeGroup:is,activeTrack:is,getActiveGroup:is,onGroupChanged:is,onTrackChanged:is,lastTrack_:null,logger_:$i("MediaGroups["+t+"]")}})),e}(),n.mediaSource=new a.a.MediaSource,n.handleDurationChange_=n.handleDurationChange_.bind(p()(n)),n.handleSourceOpen_=n.handleSourceOpen_.bind(p()(n)),n.handleSourceEnded_=n.handleSourceEnded_.bind(p()(n)),n.mediaSource.addEventListener("durationchange",n.handleDurationChange_),n.mediaSource.addEventListener("sourceopen",n.handleSourceOpen_),n.mediaSource.addEventListener("sourceended",n.handleSourceEnded_),n.seekable_=Ki.createTimeRanges(),n.hasPlayed_=!1,n.syncController_=new Os(t),n.segmentMetadataTrack_=s.addRemoteTextTrack({kind:"metadata",label:"segment-metadata"},!1).track,n.decrypter_=new Ds,n.sourceUpdater_=new ks(n.mediaSource),n.inbandTextTracks_={},n.timelineChangeController_=new Ls;var _={vhs:n.vhs_,parse708captions:t.parse708captions,useDtsForTimestampOffset:t.useDtsForTimestampOffset,captionServices:y,mediaSource:n.mediaSource,currentTime:n.tech_.currentTime.bind(n.tech_),seekable:function(){return n.seekable()},seeking:function(){return n.tech_.seeking()},duration:function(){return n.duration()},hasPlayed:function(){return n.hasPlayed_},goalBufferLength:function(){return n.goalBufferLength()},bandwidth:u,syncController:n.syncController_,decrypter:n.decrypter_,sourceType:n.sourceType_,inbandTextTracks:n.inbandTextTracks_,cacheEncryptionKeys:m,sourceUpdater:n.sourceUpdater_,timelineChangeController:n.timelineChangeController_,experimentalExactManifestTimings:t.experimentalExactManifestTimings};n.masterPlaylistLoader_="dash"===n.sourceType_?new so(r,n.vhs_,n.requestOptions_):new Ba(r,n.vhs_,n.requestOptions_),n.setupMasterPlaylistLoaderListeners_(),n.mainSegmentLoader_=new rs(Ki.mergeOptions(_,{segmentMetadataTrack:n.segmentMetadataTrack_,loaderType:"main"}),t),n.audioSegmentLoader_=new rs(Ki.mergeOptions(_,{loaderType:"audio"}),t),n.subtitleSegmentLoader_=new xs(Ki.mergeOptions(_,{loaderType:"vtt",featuresNativeTextTracks:n.tech_.featuresNativeTextTracks,loadVttJs:function(){return new Promise((function(e,t){function n(){s.off("vttjserror",r),e()}function r(){s.off("vttjsloaded",n),t()}s.one("vttjsloaded",n),s.one("vttjserror",r),s.addWebVttScript_()}))}}),t),n.setupSegmentLoaderListeners_(),n.experimentalBufferBasedABR&&(n.masterPlaylistLoader_.one("loadedplaylist",(function(){return n.startABRTimer_()})),n.tech_.on("pause",(function(){return n.stopABRTimer_()})),n.tech_.on("play",(function(){return n.startABRTimer_()}))),zs.forEach((function(e){n[e+"_"]=Ws.bind(p()(n),e)})),n.logger_=$i("MPC"),n.triggeredFmp4Usage=!1,"none"===n.tech_.preload()?(n.loadOnPlay_=function(){n.loadOnPlay_=null,n.masterPlaylistLoader_.load()},n.tech_.one("play",n.loadOnPlay_)):n.masterPlaylistLoader_.load(),n.timeToLoadedData__=-1,n.mainAppendsToLoadedData__=-1,n.audioAppendsToLoadedData__=-1;var T="none"===n.tech_.preload()?"play":"loadstart";return n.tech_.one(T,(function(){var e=Date.now();n.tech_.one("loadeddata",(function(){n.timeToLoadedData__=Date.now()-e,n.mainAppendsToLoadedData__=n.mainSegmentLoader_.mediaAppends,n.audioAppendsToLoadedData__=n.audioSegmentLoader_.mediaAppends}))})),n}m()(t,e);var n=t.prototype;return n.mainAppendsToLoadedData_=function(){return this.mainAppendsToLoadedData__},n.audioAppendsToLoadedData_=function(){return this.audioAppendsToLoadedData__},n.appendsToLoadedData_=function(){var e=this.mainAppendsToLoadedData_(),t=this.audioAppendsToLoadedData_();return-1===e||-1===t?-1:e+t},n.timeToLoadedData_=function(){return this.timeToLoadedData__},n.checkABR_=function(e){void 0===e&&(e="abr");var t=this.selectPlaylist();t&&this.shouldSwitchToMedia_(t)&&this.switchMedia_(t,e)},n.switchMedia_=function(e,t,n){var r=this.media(),i=r&&(r.id||r.uri),a=e.id||e.uri;i&&i!==a&&(this.logger_("switch media "+i+" -> "+a+" from "+t),this.tech_.trigger({type:"usage",name:"vhs-rendition-change-"+t})),this.masterPlaylistLoader_.media(e,n)},n.startABRTimer_=function(){var e=this;this.stopABRTimer_(),this.abrTimer_=a.a.setInterval((function(){return e.checkABR_()}),250)},n.stopABRTimer_=function(){this.tech_.scrubbing&&this.tech_.scrubbing()||(a.a.clearInterval(this.abrTimer_),this.abrTimer_=null)},n.getAudioTrackPlaylists_=function(){var e=this.master(),t=e&&e.playlists||[];if(!e||!e.mediaGroups||!e.mediaGroups.AUDIO)return t;var n,r=e.mediaGroups.AUDIO,i=Object.keys(r);if(Object.keys(this.mediaTypes_.AUDIO.groups).length)n=this.mediaTypes_.AUDIO.activeTrack();else{var a=r.main||i.length&&r[i[0]];for(var o in a)if(a[o].default){n={label:o};break}}if(!n)return t;var s=[];for(var u in r)if(r[u][n.label]){var l=r[u][n.label];if(l.playlists&&l.playlists.length)s.push.apply(s,l.playlists);else if(l.uri)s.push(l);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===u&&s.push(d)}}return s.length?s:t},n.setupMasterPlaylistLoaderListeners_=function(){var e=this;this.masterPlaylistLoader_.on("loadedmetadata",(function(){var t=e.masterPlaylistLoader_.media(),n=1.5*t.targetDuration*1e3;ba(e.masterPlaylistLoader_.master,e.masterPlaylistLoader_.media())?e.requestOptions_.timeout=0:e.requestOptions_.timeout=n,t.endList&&"none"!==e.tech_.preload()&&(e.mainSegmentLoader_.playlist(t,e.requestOptions_),e.mainSegmentLoader_.load()),Hs({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 n;if(e.excludeUnsupportedVariants_(),e.enableLowInitialPlaylist&&(n=e.selectInitialPlaylist()),n||(n=e.selectPlaylist()),!n||!e.shouldSwitchToMedia_(n))return;if(e.initialMedia_=n,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(),n=1.5*t.targetDuration*1e3;ba(e.masterPlaylistLoader_.master,e.masterPlaylistLoader_.media())?e.requestOptions_.timeout=0:e.requestOptions_.timeout=n,e.masterPlaylistLoader_.load(),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"})}))},n.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())},n.triggerPresenceUsage_=function(e,t){var n=e.mediaGroups||{},r=!0,i=Object.keys(n.AUDIO);for(var a in n.AUDIO)for(var o in n.AUDIO[a]){n.AUDIO[a][o].uri||(r=!1)}r&&(this.tech_.trigger({type:"usage",name:"vhs-demuxed"}),this.tech_.trigger({type:"usage",name:"hls-demuxed"})),Object.keys(n.SUBTITLES).length&&(this.tech_.trigger({type:"usage",name:"vhs-webvtt"}),this.tech_.trigger({type:"usage",name:"hls-webvtt"})),as.Playlist.isAes(t)&&(this.tech_.trigger({type:"usage",name:"vhs-aes"}),this.tech_.trigger({type:"usage",name:"hls-aes"})),i.length&&Object.keys(n.AUDIO[i[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"}))},n.shouldSwitchToMedia_=function(e){var t=this.masterPlaylistLoader_.media()||this.masterPlaylistLoader_.pendingMedia_,n=this.tech_.currentTime(),r=this.bufferLowWaterLine(),i=this.bufferHighWaterLine();return function(e){var t=e.currentPlaylist,n=e.buffered,r=e.currentTime,i=e.nextPlaylist,a=e.bufferLowWaterLine,o=e.bufferHighWaterLine,s=e.duration,u=e.experimentalBufferBasedABR,l=e.log;if(!i)return Ki.log.warn("We received no playlist to switch to. Please check your stream."),!1;var c="allowing switch "+(t&&t.id||"null")+" -> "+i.id;if(!t)return l(c+" as current playlist is not set"),!0;if(i.id===t.id)return!1;var d=Boolean(Ji(n,r).length);if(!t.endList)return d||"number"!==typeof t.partTargetDuration?(l(c+" as current playlist is live"),!0):(l("not "+c+" as current playlist is live llhls, but currentTime isn't in buffered."),!1);var h=ia(n,r),p=u?uo.EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE:uo.MAX_BUFFER_LOW_WATER_LINE;if(s<p)return l(c+" as duration < max low water line ("+s+" < "+p+")"),!0;var f=i.attributes.BANDWIDTH,m=t.attributes.BANDWIDTH;if(f<m&&(!u||h<o)){var g=c+" as next bandwidth < current bandwidth ("+f+" < "+m+")";return u&&(g+=" and forwardBuffer < bufferHighWaterLine ("+h+" < "+o+")"),l(g),!0}if((!u||f>m)&&h>=a){var v=c+" as forwardBuffer >= bufferLowWaterLine ("+h+" >= "+a+")";return u&&(v+=" and next bandwidth > current bandwidth ("+f+" > "+m+")"),l(v),!0}return l("not "+c+" as no switching criteria met"),!1}({buffered:this.tech_.buffered(),currentTime:n,currentPlaylist:t,nextPlaylist:e,bufferLowWaterLine:r,bufferHighWaterLine:i,duration:this.duration(),experimentalBufferBasedABR:this.experimentalBufferBasedABR,log:this.logger_})},n.setupSegmentLoaderListeners_=function(){var e=this;this.mainSegmentLoader_.on("bandwidthupdate",(function(){e.checkABR_("bandwidthupdate"),e.tech_.trigger("bandwidthupdate")})),this.mainSegmentLoader_.on("timeout",(function(){e.experimentalBufferBasedABR&&e.mainSegmentLoader_.load()})),this.experimentalBufferBasedABR||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()}))},n.mediaSecondsLoaded_=function(){return Math.max(this.audioSegmentLoader_.mediaSecondsLoaded+this.mainSegmentLoader_.mediaSecondsLoaded)},n.load=function(){this.mainSegmentLoader_.load(),this.mediaTypes_.AUDIO.activePlaylistLoader&&this.audioSegmentLoader_.load(),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&this.subtitleSegmentLoader_.load()},n.smoothQualityChange_=function(e){void 0===e&&(e=this.selectPlaylist()),this.fastQualityChange_(e)},n.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(){Ki.browser.IE_VERSION||Ki.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")},n.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}},n.setupFirstPlay=function(){var e=this,t=this.masterPlaylistLoader_.media();if(!t||this.tech_.paused()||this.hasPlayed_)return!1;if(!t.endList){var n=this.seekable();if(!n.length)return!1;if(Ki.browser.IE_VERSION&&0===this.tech_.readyState())return this.tech_.one("loadedmetadata",(function(){e.trigger("firstplay"),e.tech_.setCurrentTime(n.end(0)),e.hasPlayed_=!0})),!1;this.trigger("firstplay"),this.tech_.setCurrentTime(n.end(0))}return this.hasPlayed_=!0,this.load(),!0},n.handleSourceOpen_=function(){if(this.tryToCreateSourceBuffers_(),this.tech_.autoplay()){var e=this.tech_.play();"undefined"!==typeof e&&"function"===typeof e.then&&e.then(null,(function(e){}))}this.trigger("sourceopen")},n.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}}},n.handleDurationChange_=function(){this.tech_.trigger("durationchange")},n.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())},n.stuckAtPlaylistEnd_=function(e){if(!this.seekable().length)return!1;var t=this.syncController_.getExpiredTime(e,this.duration());if(null===t)return!1;var n=as.Playlist.playlistEnd(e,t),r=this.tech_.currentTime(),i=this.tech_.buffered();if(!i.length)return n-r<=.1;var a=i.end(i.length-1);return a-r<=.1&&n-a<=.1},n.blacklistCurrentPlaylist=function(e,t){void 0===e&&(e={});var n=e.playlist||this.masterPlaylistLoader_.media();if(t=t||e.blacklistDuration||this.blacklistDuration,!n)return this.error=e,void("open"!==this.mediaSource.readyState?this.trigger("error"):this.sourceUpdater_.endOfStream("network"));n.playlistErrors_++;var r,i=this.masterPlaylistLoader_.master.playlists,a=i.filter(va),o=1===a.length&&a[0]===n;if(1===i.length&&t!==1/0)return Ki.log.warn("Problem encountered with playlist "+n.id+". Trying again since it is the only playlist."),this.tech_.trigger("retryplaylist"),this.masterPlaylistLoader_.load(o);if(o){var s=!1;i.forEach((function(e){if(e!==n){var t=e.excludeUntil;"undefined"!==typeof t&&t!==1/0&&(s=!0,delete e.excludeUntil)}})),s&&(Ki.log.warn("Removing other playlists from the exclusion list because the last rendition is about to be excluded."),this.tech_.trigger("retryplaylist"))}r=n.playlistErrors_>this.maxPlaylistRetries?1/0:Date.now()+1e3*t,n.excludeUntil=r,e.reason&&(n.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 u=this.selectPlaylist();if(!u)return this.error="Playback cannot continue. No available working or supported playlists.",void this.trigger("error");var l=e.internal?this.logger_:Ki.log.warn,c=e.message?" "+e.message:"";l((e.internal?"Internal problem":"Problem")+" encountered with playlist "+n.id+"."+c+" Switching to playlist "+u.id+"."),u.attributes.AUDIO!==n.attributes.AUDIO&&this.delegateLoaders_("audio",["abort","pause"]),u.attributes.SUBTITLES!==n.attributes.SUBTITLES&&this.delegateLoaders_("subtitle",["abort","pause"]),this.delegateLoaders_("main",["abort","pause"]);var d=u.targetDuration/2*1e3||5e3,h="number"===typeof u.lastRequest&&Date.now()-u.lastRequest<=d;return this.switchMedia_(u,"exclude",o||h)},n.pauseLoading=function(){this.delegateLoaders_("all",["abort","pause"]),this.stopABRTimer_()},n.delegateLoaders_=function(e,t){var n=this,r=[],i="all"===e;(i||"main"===e)&&r.push(this.masterPlaylistLoader_);var a=[];(i||"audio"===e)&&a.push("AUDIO"),(i||"subtitle"===e)&&(a.push("CLOSED-CAPTIONS"),a.push("SUBTITLES")),a.forEach((function(e){var t=n.mediaTypes_[e]&&n.mediaTypes_[e].activePlaylistLoader;t&&r.push(t)})),["main","audio","subtitle"].forEach((function(t){var i=n[t+"SegmentLoader_"];!i||e!==t&&"all"!==e||r.push(i)})),r.forEach((function(e){return t.forEach((function(t){"function"===typeof e[t]&&e[t]()}))}))},n.setCurrentTime=function(e){var t=Ji(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},n.duration=function(){if(!this.masterPlaylistLoader_)return 0;var e=this.masterPlaylistLoader_.media();return e?e.endList?this.mediaSource?this.mediaSource.duration:as.Playlist.duration(e):1/0:0},n.seekable=function(){return this.seekable_},n.onSyncInfoUpdate_=function(){var e;if(this.masterPlaylistLoader_){var t=this.masterPlaylistLoader_.media();if(t){var n=this.syncController_.getExpiredTime(t,this.duration());if(null!==n){var r=this.masterPlaylistLoader_.master,i=as.Playlist.seekable(t,n,as.Playlist.liveEdgeDelay(r,t));if(0!==i.length){if(this.mediaTypes_.AUDIO.activePlaylistLoader){if(t=this.mediaTypes_.AUDIO.activePlaylistLoader.media(),null===(n=this.syncController_.getExpiredTime(t,this.duration())))return;if(0===(e=as.Playlist.seekable(t,n,as.Playlist.liveEdgeDelay(r,t))).length)return}var a,o;this.seekable_&&this.seekable_.length&&(a=this.seekable_.end(0),o=this.seekable_.start(0)),e?e.start(0)>i.end(0)||i.start(0)>e.end(0)?this.seekable_=i:this.seekable_=Ki.createTimeRanges([[e.start(0)>i.start(0)?e.start(0):i.start(0),e.end(0)<i.end(0)?e.end(0):i.end(0)]]):this.seekable_=i,this.seekable_&&this.seekable_.length&&this.seekable_.end(0)===a&&this.seekable_.start(0)===o||(this.logger_("seekable updated ["+ta(this.seekable_)+"]"),this.tech_.trigger("seekablechanged"))}}}}},n.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 n=this.tech_.buffered(),r=as.Playlist.duration(this.masterPlaylistLoader_.media());n.length>0&&(r=Math.max(r,n.end(n.length-1))),this.mediaSource.duration!==r&&this.sourceUpdater_.setDuration(r)}},n.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 n=e.mediaTypes_[t].groups;for(var r in n)n[r].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()},n.master=function(){return this.masterPlaylistLoader_.master},n.media=function(){return this.masterPlaylistLoader_.media()||this.initialMedia_},n.areMediaTypesKnown_=function(){var e=!!this.mediaTypes_.AUDIO.activePlaylistLoader,t=!!this.mainSegmentLoader_.getCurrentMediaInfo_(),n=!e||!!this.audioSegmentLoader_.getCurrentMediaInfo_();return!(!t||!n)},n.getCodecsOrExclude_=function(){var e=this,t={main:this.mainSegmentLoader_.getCurrentMediaInfo_()||{},audio:this.audioSegmentLoader_.getCurrentMediaInfo_()||{}},n=this.mainSegmentLoader_.getPendingSegmentPlaylist()||this.media();t.video=t.main;var r=qo(this.master(),n),i={},a=!!this.mediaTypes_.AUDIO.activePlaylistLoader;if(t.main.hasVideo&&(i.video=r.video||t.main.videoCodec||x.b),t.main.isMuxed&&(i.video+=","+(r.audio||t.main.audioCodec||x.a)),(t.main.hasAudio&&!t.main.isMuxed||t.audio.hasAudio||a)&&(i.audio=r.audio||t.main.audioCodec||t.audio.audioCodec||x.a,t.audio.isFmp4=t.main.hasAudio&&!t.main.isMuxed?t.main.isFmp4:t.audio.isFmp4),i.audio||i.video){var o,s={};if(["video","audio"].forEach((function(e){if(i.hasOwnProperty(e)&&(r=t[e].isFmp4,a=i[e],!(r?Object(x.c)(a):Object(x.g)(a)))){var n=t[e].isFmp4?"browser":"muxer";s[n]=s[n]||[],s[n].push(i[e]),"audio"===e&&(o=n)}var r,a})),a&&o&&n.attributes.AUDIO){var u=n.attributes.AUDIO;this.master().playlists.forEach((function(e){(e.attributes&&e.attributes.AUDIO)===u&&e!==n&&(e.excludeUntil=1/0)})),this.logger_("excluding audio group "+u+" as "+o+' does not support codec(s): "'+i.audio+'"')}if(!Object.keys(s).length){if(this.sourceUpdater_.hasCreatedSourceBuffers()&&!this.sourceUpdater_.canChangeType()){var l=[];if(["video","audio"].forEach((function(t){var n=(Object(x.h)(e.sourceUpdater_.codecs[t]||"")[0]||{}).type,r=(Object(x.h)(i[t]||"")[0]||{}).type;n&&r&&n.toLowerCase()!==r.toLowerCase()&&l.push('"'+e.sourceUpdater_.codecs[t]+'" -> "'+i[t]+'"')})),l.length)return void this.blacklistCurrentPlaylist({playlist:n,message:"Codec switching not supported: "+l.join(", ")+".",blacklistDuration:1/0,internal:!0})}return i}var c=Object.keys(s).reduce((function(e,t){return e&&(e+=", "),e+=t+' does not support codec(s): "'+s[t].join(",")+'"'}),"")+".";this.blacklistCurrentPlaylist({playlist:n,internal:!0,message:c,blacklistDuration:1/0})}else this.blacklistCurrentPlaylist({playlist:n,message:"Could not determine codecs for playlist.",blacklistDuration:1/0})},n.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)}}},n.excludeUnsupportedVariants_=function(){var e=this,t=this.master().playlists,n=[];Object.keys(t).forEach((function(r){var i=t[r];if(-1===n.indexOf(i.id)){n.push(i.id);var a=qo(e.master,i),o=[];!a.audio||Object(x.g)(a.audio)||Object(x.c)(a.audio)||o.push("audio codec "+a.audio),!a.video||Object(x.g)(a.video)||Object(x.c)(a.video)||o.push("video codec "+a.video),a.text&&"stpp.ttml.im1t"===a.text&&o.push("text codec "+a.text),o.length&&(i.excludeUntil=1/0,e.logger_("excluding "+i.id+" for unsupported: "+o.join(", ")))}}))},n.excludeIncompatibleVariants_=function(e){var t=this,n=[],r=this.master().playlists,i=Uo(Object(x.h)(e)),a=Fo(i),o=i.video&&Object(x.h)(i.video)[0]||null,s=i.audio&&Object(x.h)(i.audio)[0]||null;Object.keys(r).forEach((function(e){var i=r[e];if(-1===n.indexOf(i.id)&&i.excludeUntil!==1/0){n.push(i.id);var u=[],l=qo(t.masterPlaylistLoader_.master,i),c=Fo(l);if(l.audio||l.video){if(c!==a&&u.push('codec count "'+c+'" !== "'+a+'"'),!t.sourceUpdater_.canChangeType()){var d=l.video&&Object(x.h)(l.video)[0]||null,h=l.audio&&Object(x.h)(l.audio)[0]||null;d&&o&&d.type.toLowerCase()!==o.type.toLowerCase()&&u.push('video codec "'+d.type+'" !== "'+o.type+'"'),h&&s&&h.type.toLowerCase()!==s.type.toLowerCase()&&u.push('audio codec "'+h.type+'" !== "'+s.type+'"')}u.length&&(i.excludeUntil=1/0,t.logger_("blacklisting "+i.id+": "+u.join(" && ")))}}}))},n.updateAdCues_=function(e){var t=0,n=this.seekable();n.length&&(t=n.start(0)),function(e,t,n){if(void 0===n&&(n=0),e.segments)for(var r,i=n,o=0;o<e.segments.length;o++){var s=e.segments[o];if(r||(r=Ps(t,i+s.duration/2)),r){if("cueIn"in s){r.endTime=i,r.adEndTime=i,i+=s.duration,r=null;continue}if(i<r.endTime){i+=s.duration;continue}r.endTime+=s.duration}else if("cueOut"in s&&((r=new a.a.VTTCue(i,i+s.duration,s.cueOut)).adStartTime=i,r.adEndTime=i+parseFloat(s.cueOut),t.addCue(r)),"cueOutCont"in s){var u=s.cueOutCont.split("/").map(parseFloat),l=u[0],c=u[1];(r=new a.a.VTTCue(i,i+s.duration,"")).adStartTime=i-l,r.adEndTime=r.adStartTime+c,t.addCue(r)}i+=s.duration}}(e,this.cueTagsTrack_,t)},n.goalBufferLength=function(){var e=this.tech_.currentTime(),t=uo.GOAL_BUFFER_LENGTH,n=uo.GOAL_BUFFER_LENGTH_RATE,r=Math.max(t,uo.MAX_GOAL_BUFFER_LENGTH);return Math.min(t+e*n,r)},n.bufferLowWaterLine=function(){var e=this.tech_.currentTime(),t=uo.BUFFER_LOW_WATER_LINE,n=uo.BUFFER_LOW_WATER_LINE_RATE,r=Math.max(t,uo.MAX_BUFFER_LOW_WATER_LINE),i=Math.max(t,uo.EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE);return Math.min(t+e*n,this.experimentalBufferBasedABR?i:r)},n.bufferHighWaterLine=function(){return uo.BUFFER_HIGH_WATER_LINE},t}(Ki.EventTarget),Ks=function(e,t,n){var r,i,a,o=e.masterPlaylistController_,s=o[(e.options_.smoothQualityChange?"smooth":"fast")+"QualityChange_"].bind(o);if(t.attributes){var u=t.attributes.RESOLUTION;this.width=u&&u.width,this.height=u&&u.height,this.bandwidth=t.attributes.BANDWIDTH,this.frameRate=t.attributes["FRAME-RATE"]}this.codecs=qo(o.master(),t),this.playlist=t,this.id=n,this.enabled=(r=e.playlists,i=t.id,a=s,function(e){var t=r.master.playlists[i],n=ga(t),o=va(t);return"undefined"===typeof e?o:(e?delete t.disabled:t.disabled=!0,e===o||n||(a(),e?r.trigger("renditionenabled"):r.trigger("renditiondisabled")),e)})},Gs=["seeking","seeked","pause","playing","error"],Xs=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_=$i("PlaybackWatcher"),this.logger_("initialize");var n=function(){return t.monitorCurrentTime_()},r=function(){return t.monitorCurrentTime_()},i=function(){return t.techWaiting_()},o=function(){return t.cancelTimer_()},s=this.masterPlaylistController_,u=["main","subtitle","audio"],l={};u.forEach((function(e){l[e]={reset:function(){return t.resetSegmentDownloads_(e)},updateend:function(){return t.checkSegmentDownloads_(e)}},s[e+"SegmentLoader_"].on("appendsdone",l[e].updateend),s[e+"SegmentLoader_"].on("playlistupdate",l[e].reset),t.tech_.on(["seeked","seeking"],l[e].reset)}));var c=function(e){["main","audio"].forEach((function(n){s[n+"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",i),this.tech_.on(Gs,o),this.tech_.on("canplay",r),this.tech_.one("play",n),this.dispose=function(){t.clearSeekingAppendCheck_(),t.logger_("dispose"),t.tech_.off("waiting",i),t.tech_.off(Gs,o),t.tech_.off("canplay",r),t.tech_.off("play",n),t.tech_.off("seeking",t.watchForBadSeeking_),t.tech_.off("seeked",t.clearSeekingAppendCheck_),u.forEach((function(e){s[e+"SegmentLoader_"].off("appendsdone",l[e].updateend),s[e+"SegmentLoader_"].off("playlistupdate",l[e].reset),t.tech_.off(["seeked","seeking"],l[e].reset)})),t.checkCurrentTimeTimeout_&&a.a.clearTimeout(t.checkCurrentTimeTimeout_),t.cancelTimer_()}}var t=e.prototype;return t.monitorCurrentTime_=function(){this.checkCurrentTime_(),this.checkCurrentTimeTimeout_&&a.a.clearTimeout(this.checkCurrentTimeTimeout_),this.checkCurrentTimeTimeout_=a.a.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_,n=t[e+"SegmentLoader_"],r=n.buffered_(),i=function(e,t){if(e===t)return!1;if(!e&&t||!t&&e)return!0;if(e.length!==t.length)return!0;for(var n=0;n<e.length;n++)if(e.start(n)!==t.start(n)||e.end(n)!==t.end(n))return!0;return!1}(this[e+"Buffered_"],r);this[e+"Buffered_"]=r,i?this.resetSegmentDownloads_(e):(this[e+"StalledDownloads_"]++,this.logger_("found #"+this[e+"StalledDownloads_"]+" "+e+" appends that did not increase buffer (possible stalled download)",{playlistId:n.playlist_&&n.playlist_.id,buffered:na(r)}),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+.1>=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(),n=this.tech_.currentTime();this.afterSeekableWindow_(t,n,this.media(),this.allowSeeksWithinUnsafeLiveWindow)&&(e=t.end(t.length-1));if(this.beforeSeekableWindow_(t,n)){var r=t.start(0);e=r+(r===t.end(0)?0:.1)}if("undefined"!==typeof e)return this.logger_("Trying to seek outside of seekable at time "+n+" with seekable range "+ta(t)+". Seeking to "+e+"."),this.tech_.setCurrentTime(e),!0;for(var i=this.masterPlaylistController_.sourceUpdater_,a=this.tech_.buffered(),o=i.audioBuffer?i.audioBuffered():null,s=i.videoBuffer?i.videoBuffered():null,u=this.media(),l=u.partTargetDuration?u.partTargetDuration:2*(u.targetDuration-1/30),c=[o,s],d=0;d<c.length;d++){if(c[d])if(ia(c[d],n)<l)return!1}var h=ea(a,n);return 0!==h.length&&(e=h.start(0)+.1,this.logger_("Buffered region starts ("+h.start(0)+")  just beyond seek point ("+n+"). Seeking to "+e+"."),this.tech_.setCurrentTime(e),!0)},t.waiting_=function(){if(!this.techWaiting_()){var e=this.tech_.currentTime(),t=this.tech_.buffered(),n=Ji(t,e);return n.length&&e+3<=n.end(0)?(this.cancelTimer_(),this.tech_.setCurrentTime(e),this.logger_("Stopped at "+e+" while inside a buffered region ["+n.start(0)+" -> "+n.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 n=e.end(e.length-1);return this.logger_("Fell out of live window at time "+t+". Seeking to live point (seekable end) "+n),this.cancelTimer_(),this.tech_.setCurrentTime(n),this.tech_.trigger({type:"usage",name:"vhs-live-resync"}),this.tech_.trigger({type:"usage",name:"hls-live-resync"}),!0}var r=this.tech_.vhs.masterPlaylistController_.sourceUpdater_,i=this.tech_.buffered();if(this.videoUnderflow_({audioBuffered:r.audioBuffered(),videoBuffered:r.videoBuffered(),currentTime:t}))return this.cancelTimer_(),this.tech_.setCurrentTime(t),this.tech_.trigger({type:"usage",name:"vhs-video-underflow"}),this.tech_.trigger({type:"usage",name:"hls-video-underflow"}),!0;var a=ea(i,t);if(a.length>0){var o=a.start(0)-t;return this.logger_("Stopped at "+t+", setting timer for "+o+", seeking to "+a.start(0)),this.cancelTimer_(),this.timer_=setTimeout(this.skipTheGap_.bind(this),1e3*o,t),!0}return!1},t.afterSeekableWindow_=function(e,t,n,r){if(void 0===r&&(r=!1),!e.length)return!1;var i=e.end(e.length-1)+.1;return!n.endList&&r&&(i=e.end(e.length-1)+3*n.targetDuration),t>i},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,n=e.audioBuffered,r=e.currentTime;if(t){var i;if(t.length&&n.length){var a=Ji(t,r-3),o=Ji(t,r),s=Ji(n,r);s.length&&!o.length&&a.length&&(i={start:a.end(0),end:s.end(0)})}else{ea(t,r).length||(i=this.gapFromVideoUnderflow_(t,r))}return!!i&&(this.logger_("Encountered a gap in video from "+i.start+" to "+i.end+". Seeking to current time "+r),!0)}},t.skipTheGap_=function(e){var t=this.tech_.buffered(),n=this.tech_.currentTime(),r=ea(t,n);this.cancelTimer_(),0!==r.length&&n===e&&(this.logger_("skipTheGap_:","currentTime:",n,"scheduled currentTime:",e,"nextRange start:",r.start(0)),this.tech_.setCurrentTime(r.start(0)+1/30),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 n=function(e){if(e.length<2)return Ki.createTimeRanges();for(var t=[],n=1;n<e.length;n++){var r=e.end(n-1),i=e.start(n);t.push([r,i])}return Ki.createTimeRanges(t)}(e),r=0;r<n.length;r++){var i=n.start(r),a=n.end(r);if(t-i<4&&t-i>2)return{start:i,end:a}}return null},e}(),Ys={errorInterval:30,getSource:function(e){return e(this.tech({IWillNotUseThisInPlugins:!0}).currentSource_||this.currentSource())}},Qs={PlaylistLoader:Ba,Playlist:wa,utils:$a,STANDARD_PLAYLIST_SELECTOR:Xo,INITIAL_PLAYLIST_SELECTOR:function(){var e=this,t=this.playlists.master.playlists.filter(wa.isEnabled);return Vo(t,(function(e,t){return Ko(e,t)})),t.filter((function(t){return!!qo(e.playlists.master,t).video}))[0]||null},lastBandwidthSelector:Xo,movingAverageBandwidthSelector:function(e){var t=-1,n=-1;if(e<0||e>1)throw new Error("Moving average bandwidth decay must be between 0 and 1.");return function(){var r=this.useDevicePixelRatio&&a.a.devicePixelRatio||1;return t<0&&(t=this.systemBandwidth,n=this.systemBandwidth),this.systemBandwidth>0&&this.systemBandwidth!==n&&(t=e*this.systemBandwidth+(1-e)*t,n=this.systemBandwidth),Go(this.playlists.master,t,parseInt(Wo(this.tech_.el(),"width"),10)*r,parseInt(Wo(this.tech_.el(),"height"),10)*r,this.limitRenditionByPlayerDimensions,this.masterPlaylistController_)}},comparePlaylistBandwidth:Ko,comparePlaylistResolution:function(e,t){var n,r;return e.attributes.RESOLUTION&&e.attributes.RESOLUTION.width&&(n=e.attributes.RESOLUTION.width),n=n||a.a.Number.MAX_VALUE,t.attributes.RESOLUTION&&t.attributes.RESOLUTION.width&&(r=t.attributes.RESOLUTION.width),n===(r=r||a.a.Number.MAX_VALUE)&&e.attributes.BANDWIDTH&&t.attributes.BANDWIDTH?e.attributes.BANDWIDTH-t.attributes.BANDWIDTH:n-r},xhr:Ha()};Object.keys(uo).forEach((function(e){Object.defineProperty(Qs,e,{get:function(){return Ki.log.warn("using Vhs."+e+" is UNSAFE be sure you know what you are doing"),uo[e]},set:function(t){Ki.log.warn("using Vhs."+e+" is UNSAFE be sure you know what you are doing"),"number"!==typeof t||t<0?Ki.log.warn("value of Vhs."+e+" must be greater than or equal to 0"):uo[e]=t}})}));var $s=function(e,t){for(var n=t.media(),r=-1,i=0;i<e.length;i++)if(e[i].id===n.id){r=i;break}e.selectedIndex_=r,e.trigger({selectedIndex:r,type:"change"})};Qs.canPlaySource=function(){return Ki.log.warn("HLS is no longer a tech. Please remove it from your player's techOrder.")};var Zs=function(e){var t=e.player,n=e.sourceKeySystems,r=e.audioMedia,i=e.mainPlaylists;if(!t.eme.initializeMediaKeys)return Promise.resolve();var a=function(e,t){return e.reduce((function(e,n){if(!n.contentProtection)return e;var r=t.reduce((function(e,t){var r=n.contentProtection[t];return r&&r.pssh&&(e[t]={pssh:r.pssh}),e}),{});return Object.keys(r).length&&e.push(r),e}),[])}(r?i.concat([r]):i,Object.keys(n)),o=[],s=[];return a.forEach((function(e){s.push(new Promise((function(e,n){t.tech_.one("keysessioncreated",e)}))),o.push(new Promise((function(n,r){t.eme.initializeMediaKeys({keySystems:e},(function(e){e?r(e):n()}))})))})),Promise.race([Promise.all(o),Promise.race(s)])},Js=function(e){var t=e.player,n=function(e,t,n){if(!e)return e;var r={};t&&t.attributes&&t.attributes.CODECS&&(r=Uo(Object(x.h)(t.attributes.CODECS))),n&&n.attributes&&n.attributes.CODECS&&(r.audio=n.attributes.CODECS);var i=Object(x.e)(r.video),a=Object(x.e)(r.audio),o={};for(var s in e)o[s]={},a&&(o[s].audioContentType=a),i&&(o[s].videoContentType=i),t.contentProtection&&t.contentProtection[s]&&t.contentProtection[s].pssh&&(o[s].pssh=t.contentProtection[s].pssh),"string"===typeof e[s]&&(o[s].url=e[s]);return Ki.mergeOptions(e,o)}(e.sourceKeySystems,e.media,e.audioMedia);return!!n&&(t.currentSource().keySystems=n,!(n&&!t.eme)||(Ki.log.warn("DRM encrypted source cannot be decrypted without a DRM plugin"),!1))},eu=function(){if(!a.a.localStorage)return null;var e=a.a.localStorage.getItem("videojs-vhs");if(!e)return null;try{return JSON.parse(e)}catch(t){return null}};Qs.supportsNativeHls=function(){if(!s.a||!s.a.createElement)return!1;var e=s.a.createElement("video");if(!Ki.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))}))}(),Qs.supportsNativeDash=!!(s.a&&s.a.createElement&&Ki.getTech("Html5").isSupported())&&/maybe|probably/i.test(s.a.createElement("video").canPlayType("application/dash+xml")),Qs.supportsTypeNatively=function(e){return"hls"===e?Qs.supportsNativeHls:"dash"===e&&Qs.supportsNativeDash},Qs.isSupported=function(){return Ki.log.warn("HLS is no longer a tech. Please remove it from your player's techOrder.")};var tu=function(e){function t(t,n,r){var i;if(i=e.call(this,n,Ki.mergeOptions(r.hls,r.vhs))||this,r.hls&&Object.keys(r.hls).length&&Ki.log.warn("Using hls options is deprecated. Please rename `hls` to `vhs` in your options object."),"number"===typeof r.initialBandwidth&&(i.options_.bandwidth=r.initialBandwidth),i.logger_=$i("VhsHandler"),n.options_&&n.options_.playerId){var a=Ki(n.options_.playerId);a.hasOwnProperty("hls")||Object.defineProperty(a,"hls",{get:function(){return Ki.log.warn("player.hls is deprecated. Use player.tech().vhs instead."),n.trigger({type:"usage",name:"hls-player-access"}),p()(i)},configurable:!0}),a.hasOwnProperty("vhs")||Object.defineProperty(a,"vhs",{get:function(){return Ki.log.warn("player.vhs is deprecated. Use player.tech().vhs instead."),n.trigger({type:"usage",name:"vhs-player-access"}),p()(i)},configurable:!0}),a.hasOwnProperty("dash")||Object.defineProperty(a,"dash",{get:function(){return Ki.log.warn("player.dash is deprecated. Use player.tech().vhs instead."),p()(i)},configurable:!0}),i.player_=a}if(i.tech_=n,i.source_=t,i.stats={},i.ignoreNextSeekingEvent_=!1,i.setOptions_(),i.options_.overrideNative&&n.overrideNativeAudioTracks&&n.overrideNativeVideoTracks)n.overrideNativeAudioTracks(!0),n.overrideNativeVideoTracks(!0);else if(i.options_.overrideNative&&(n.featuresNativeVideoTracks||n.featuresNativeAudioTracks))throw new Error("Overriding native HLS requires emulated tracks. See https://git.io/vMpjB");return i.on(s.a,["fullscreenchange","webkitfullscreenchange","mozfullscreenchange","MSFullscreenChange"],(function(e){var t=s.a.fullscreenElement||s.a.webkitFullscreenElement||s.a.mozFullScreenElement||s.a.msFullscreenElement;t&&t.contains(i.tech_.el())?i.masterPlaylistController_.fastQualityChange_():i.masterPlaylistController_.checkABR_()})),i.on(i.tech_,"seeking",(function(){this.ignoreNextSeekingEvent_?this.ignoreNextSeekingEvent_=!1:this.setCurrentTime(this.tech_.currentTime())})),i.on(i.tech_,"error",(function(){this.tech_.error()&&this.masterPlaylistController_&&this.masterPlaylistController_.pauseLoading()})),i.on(i.tech_,"play",i.play),i}m()(t,e);var n=t.prototype;return n.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="undefined"!==typeof this.source_.useBandwidthFromLocalStorage?this.source_.useBandwidthFromLocalStorage:this.options_.useBandwidthFromLocalStorage||!1,this.options_.useNetworkInformationApi=this.options_.useNetworkInformationApi||!1,this.options_.useDtsForTimestampOffset=this.options_.useDtsForTimestampOffset||!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=eu();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=uo.INITIAL_BANDWIDTH),this.options_.enableLowInitialPlaylist=this.options_.enableLowInitialPlaylist&&this.options_.bandwidth===uo.INITIAL_BANDWIDTH,["withCredentials","useDevicePixelRatio","limitRenditionByPlayerDimensions","bandwidth","smoothQualityChange","customTagParsers","customTagMappers","handleManifestRedirects","cacheEncryptionKeys","playlistSelector","initialPlaylistSelector","experimentalBufferBasedABR","liveRangeSafeTimeDelta","experimentalLLHLS","useNetworkInformationApi","useDtsForTimestampOffset","experimentalExactManifestTimings","experimentalLeastPixelDiffSelector"].forEach((function(t){"undefined"!==typeof e.source_[t]&&(e.options_[t]=e.source_[t])})),this.limitRenditionByPlayerDimensions=this.options_.limitRenditionByPlayerDimensions,this.useDevicePixelRatio=this.options_.useDevicePixelRatio},n.src=function(e,t){var n=this;if(e){var r;this.setOptions_(),this.options_.src=0===(r=this.source_.src).toLowerCase().indexOf("data:application/vnd.videojs.vhs+json,")?JSON.parse(r.substring(r.indexOf(",")+1)):r,this.options_.tech=this.tech_,this.options_.externVhs=Qs,this.options_.sourceType=Object(P.a)(t),this.options_.seekTo=function(e){n.tech_.setCurrentTime(e)},this.options_.smoothQualityChange&&Ki.log.warn("smoothQualityChange is deprecated and will be removed in the next major version"),this.masterPlaylistController_=new Vs(this.options_);var i=Ki.mergeOptions({liveRangeSafeTimeDelta:.1},this.options_,{seekable:function(){return n.seekable()},media:function(){return n.masterPlaylistController_.media()},masterPlaylistController:this.masterPlaylistController_});this.playbackWatcher_=new Xs(i),this.masterPlaylistController_.on("error",(function(){var e=Ki.players[n.tech_.options_.playerId],t=n.masterPlaylistController_.error;"object"!==typeof t||t.code?"string"===typeof t&&(t={message:t,code:3}):t.code=3,e.error(t)}));var o=this.options_.experimentalBufferBasedABR?Qs.movingAverageBandwidthSelector(.55):Qs.STANDARD_PLAYLIST_SELECTOR;this.masterPlaylistController_.selectPlaylist=this.selectPlaylist?this.selectPlaylist.bind(this):o.bind(this),this.masterPlaylistController_.selectInitialPlaylist=Qs.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=a.a.navigator.connection||a.a.navigator.mozConnection||a.a.navigator.webkitConnection;if(this.options_.useNetworkInformationApi&&t){var n=1e3*t.downlink*1e3;e=n>=1e7&&e>=1e7?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(){Ki.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 n.bandwidth||0},enumerable:!0},mediaRequests:{get:function(){return n.masterPlaylistController_.mediaRequests_()||0},enumerable:!0},mediaRequestsAborted:{get:function(){return n.masterPlaylistController_.mediaRequestsAborted_()||0},enumerable:!0},mediaRequestsTimedout:{get:function(){return n.masterPlaylistController_.mediaRequestsTimedout_()||0},enumerable:!0},mediaRequestsErrored:{get:function(){return n.masterPlaylistController_.mediaRequestsErrored_()||0},enumerable:!0},mediaTransferDuration:{get:function(){return n.masterPlaylistController_.mediaTransferDuration_()||0},enumerable:!0},mediaBytesTransferred:{get:function(){return n.masterPlaylistController_.mediaBytesTransferred_()||0},enumerable:!0},mediaSecondsLoaded:{get:function(){return n.masterPlaylistController_.mediaSecondsLoaded_()||0},enumerable:!0},mediaAppends:{get:function(){return n.masterPlaylistController_.mediaAppends_()||0},enumerable:!0},mainAppendsToLoadedData:{get:function(){return n.masterPlaylistController_.mainAppendsToLoadedData_()||0},enumerable:!0},audioAppendsToLoadedData:{get:function(){return n.masterPlaylistController_.audioAppendsToLoadedData_()||0},enumerable:!0},appendsToLoadedData:{get:function(){return n.masterPlaylistController_.appendsToLoadedData_()||0},enumerable:!0},timeToLoadedData:{get:function(){return n.masterPlaylistController_.timeToLoadedData_()||0},enumerable:!0},buffered:{get:function(){return na(n.tech_.buffered())},enumerable:!0},currentTime:{get:function(){return n.tech_.currentTime()},enumerable:!0},currentSource:{get:function(){return n.tech_.currentSource_},enumerable:!0},currentTech:{get:function(){return n.tech_.name_},enumerable:!0},duration:{get:function(){return n.tech_.duration()},enumerable:!0},master:{get:function(){return n.playlists.master},enumerable:!0},playerDimensions:{get:function(){return n.tech_.currentDimensions()},enumerable:!0},seekable:{get:function(){return na(n.tech_.seekable())},enumerable:!0},timestamp:{get:function(){return Date.now()},enumerable:!0},videoPlaybackQuality:{get:function(){return n.tech_.getVideoPlaybackQuality()},enumerable:!0}}),this.tech_.one("canplay",this.masterPlaylistController_.setupFirstPlay.bind(this.masterPlaylistController_)),this.tech_.on("bandwidthupdate",(function(){n.options_.useBandwidthFromLocalStorage&&function(e){if(!a.a.localStorage)return!1;var t=eu();t=t?Ki.mergeOptions(t,e):e;try{a.a.localStorage.setItem("videojs-vhs",JSON.stringify(t))}catch(n){return!1}}({bandwidth:n.bandwidth,throughput:Math.round(n.throughput)})})),this.masterPlaylistController_.on("selectedinitialmedia",(function(){var e;(e=n).representations=function(){var t=e.masterPlaylistController_.master(),n=Sa(t)?e.masterPlaylistController_.getAudioTrackPlaylists_():t.playlists;return n?n.filter((function(e){return!ga(e)})).map((function(t,n){return new Ks(e,t,t.id)})):[]}})),this.masterPlaylistController_.sourceUpdater_.on("createdsourcebuffers",(function(){n.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_=a.a.URL.createObjectURL(this.masterPlaylistController_.mediaSource),this.tech_.src(this.mediaSourceUrl_))}},n.createKeySessions_=function(){var e=this,t=this.masterPlaylistController_.mediaTypes_.AUDIO.activePlaylistLoader;this.logger_("waiting for EME key session creation"),Zs({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})}))},n.handleWaitingForKey_=function(){this.logger_("waitingforkey fired, attempting to create any new key sessions"),this.createKeySessions_()},n.setupEme_=function(){var e=this,t=this.masterPlaylistController_.mediaTypes_.AUDIO.activePlaylistLoader,n=Js({player:this.player_,sourceKeySystems:this.source_.keySystems,media:this.playlists.media(),audioMedia:t&&t.media()});this.player_.tech_.on("keystatuschange",(function(t){if("output-restricted"===t.status){var n=e.masterPlaylistController_.master();if(n&&n.playlists){var r,i=[];if(n.playlists.forEach((function(e){e&&e.attributes&&e.attributes.RESOLUTION&&e.attributes.RESOLUTION.height>=720&&(!e.excludeUntil||e.excludeUntil<1/0)&&(e.excludeUntil=1/0,i.push(e))})),i.length)(r=Ki.log).warn.apply(r,['DRM keystatus changed to "output-restricted." Removing the following HD playlists that will most likely fail to play and clearing the buffer. This may be due to HDCP restrictions on the stream and the capabilities of the current device.'].concat(i)),e.masterPlaylistController_.fastQualityChange_()}}})),this.handleWaitingForKey_=this.handleWaitingForKey_.bind(this),this.player_.tech_.on("waitingforkey",this.handleWaitingForKey_),11!==Ki.browser.IE_VERSION&&n?this.createKeySessions_():this.masterPlaylistController_.sourceUpdater_.initializedEme()},n.setupQualityLevels_=function(){var e=this,t=Ki.players[this.tech_.options_.playerId];t&&t.qualityLevels&&!this.qualityLevels_&&(this.qualityLevels_=t.qualityLevels(),this.masterPlaylistController_.on("selectedinitialmedia",(function(){var t,n;t=e.qualityLevels_,(n=e).representations().forEach((function(e){t.addQualityLevel(e)})),$s(t,n.playlists)})),this.playlists.on("mediachange",(function(){$s(e.qualityLevels_,e.playlists)})))},t.version=function(){return{"@videojs/http-streaming":"2.16.2","mux.js":"6.0.1","mpd-parser":"0.22.1","m3u8-parser":"4.8.0","aes-decrypter":"3.1.3"}},n.version=function(){return this.constructor.version()},n.canChangeType=function(){return ks.canChangeType()},n.play=function(){this.masterPlaylistController_.play()},n.setCurrentTime=function(e){this.masterPlaylistController_.setCurrentTime(e)},n.duration=function(){return this.masterPlaylistController_.duration()},n.seekable=function(){return this.masterPlaylistController_.seekable()},n.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_&&a.a.URL.revokeObjectURL&&(a.a.URL.revokeObjectURL(this.mediaSourceUrl_),this.mediaSourceUrl_=null),this.tech_&&this.tech_.off("waitingforkey",this.handleWaitingForKey_),e.prototype.dispose.call(this)},n.convertToProgramTime=function(e,t){return Za({playlist:this.masterPlaylistController_.media(),time:e,callback:t})},n.seekToProgramTime=function(e,t,n,r){return void 0===n&&(n=!0),void 0===r&&(r=2),Ja({programTime:e,playlist:this.masterPlaylistController_.media(),retryCount:r,pauseAfterSeek:n,seekTo:this.options_.seekTo,tech:this.options_.tech,callback:t})},t}(Ki.getComponent("Component")),nu={name:"videojs-http-streaming",VERSION:"2.16.2",canHandleSource:function(e,t){void 0===t&&(t={});var n=Ki.mergeOptions(Ki.options,t);return nu.canPlayType(e.type,n)},handleSource:function(e,t,n){void 0===n&&(n={});var r=Ki.mergeOptions(Ki.options,n);return t.vhs=new tu(e,t,r),Ki.hasOwnProperty("hls")||Object.defineProperty(t,"hls",{get:function(){return Ki.log.warn("player.tech().hls is deprecated. Use player.tech().vhs instead."),t.vhs},configurable:!0}),t.vhs.xhr=Ha(),t.vhs.src(e.src,e.type),t.vhs},canPlayType:function(e,t){var n=Object(P.a)(e);if(!n)return"";var r=nu.getOverrideNative(t);return!Qs.supportsTypeNatively(n)||r?"maybe":""},getOverrideNative:function(e){void 0===e&&(e={});var t=e,n=t.vhs,r=void 0===n?{}:n,i=t.hls,a=void 0===i?{}:i,o=!(Ki.browser.IS_ANY_SAFARI||Ki.browser.IS_IOS),s=r.overrideNative,u=void 0===s?o:s,l=a.overrideNative;return void 0!==l&&l||u}};(Object(x.c)("avc1.4d400d,mp4a.40.2")&&Ki.getTech("Html5").registerSourceHandler(nu,0),Ki.VhsHandler=tu,Object.defineProperty(Ki,"HlsHandler",{get:function(){return Ki.log.warn("videojs.HlsHandler is deprecated. Use videojs.VhsHandler instead."),tu},configurable:!0}),Ki.VhsSourceHandler=nu,Object.defineProperty(Ki,"HlsSourceHandler",{get:function(){return Ki.log.warn("videojs.HlsSourceHandler is deprecated. Use videojs.VhsSourceHandler instead."),nu},configurable:!0}),Ki.Vhs=Qs,Object.defineProperty(Ki,"Hls",{get:function(){return Ki.log.warn("videojs.Hls is deprecated. Use videojs.Vhs instead."),Qs},configurable:!0}),Ki.use||(Ki.registerComponent("Hls",Qs),Ki.registerComponent("Vhs",Qs)),Ki.options.vhs=Ki.options.vhs||{},Ki.options.hls=Ki.options.hls||{},Ki.getPlugin&&Ki.getPlugin("reloadSourceOnError"))||(Ki.registerPlugin||Ki.plugin)("reloadSourceOnError",(function(e){!function e(t,n){var r=0,i=0,a=Ki.mergeOptions(Ys,n);t.ready((function(){t.trigger({type:"usage",name:"vhs-error-reload-initialized"}),t.trigger({type:"usage",name:"hls-error-reload-initialized"})}));var o=function(){i&&t.currentTime(i)},s=function(e){null!==e&&void 0!==e&&(i=t.duration()!==1/0&&t.currentTime()||0,t.one("loadedmetadata",o),t.src(e),t.trigger({type:"usage",name:"vhs-error-reload"}),t.trigger({type:"usage",name:"hls-error-reload"}),t.play())},u=function(){return Date.now()-r<1e3*a.errorInterval?(t.trigger({type:"usage",name:"vhs-error-reload-canceled"}),void t.trigger({type:"usage",name:"hls-error-reload-canceled"})):a.getSource&&"function"===typeof a.getSource?(r=Date.now(),a.getSource.call(t,s)):void Ki.log.error("ERROR: reloadSourceOnError - The option getSource must be a function!")},l=function e(){t.off("loadedmetadata",o),t.off("error",u),t.off("dispose",e)};t.on("error",u),t.on("dispose",l),t.reloadSourceOnError=function(n){l(),e(t,n)}}(this,e)}));t.a=Ki}).call(this,n("yLpj"))},"8kdZ":function(e,t,n){n("szlw")({target:"Object",stat:!0},{setPrototypeOf:n("+U1h")})},"8z+Y":function(e,t,n){var r=n("vzvg"),i=n("RKsz");e.exports=function(e){var t=r(e,"string");return i(t)?t:t+""}},"9rZX":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=n("qFS3"),a=(r=i)&&r.__esModule?r:{default:r};t.default=a.default,e.exports=t.default},"9tSP":function(e,t,n){"use strict";n.r(t);var r=n("wx14"),i=n("q1tI"),a=n.n(i),o=n("Ty5D"),s=n("qhky"),u=n("L80f"),l=n("/MKj"),c=n("0srb"),d=n("kHmz"),h=n("ZWFX"),p=n("dlDD"),f=n.n(p),m=n("azCW"),g=n.n(m),v=n("rQwP"),y=n("itc3"),b=n("OGoB"),_=n("ATIt"),T=a.a.createElement,S=function(e){var t=e.articles,n=(e.authorName,e.section,e.noImage),r=(e.isConnected,e.sectionLabel),o=e.moreButton,s=e.sectionsLabels;return T(a.a.Fragment,null,T("div",{className:"wrapper header-button"},T("h1",null,r),s&&s[0]&&s[0].uuid&&T(_.a,{topic:{topic:s[0].uuid,type:"tag",name:s[0].label},followText:"Follow Topic",unFollowText:"Unfollow Topic"})),t.map((function(e,t){return T(i.Fragment,{key:e.contentKey},T(y.Desktop,null,18===t&&T("div",{id:"adngin-instream-0",className:"advert-leaderboard-vm"})),T(v.a,{article:e,noImage:n}),T(y.MobileElse,null,5===t&&T("div",{id:"adngin-leaderboard-2-0",className:"advert-leaderboard-2"})),T(y.Mobile,null,2===t&&T(b.a,null)),Number.isInteger((t+5)/4)&&T(y.Mobile,null,T("article",{className:"advert"},T("div",{id:"adngin-instream-0",className:"align-all"}))))})),o)},w=n("if8a"),k=n("g2ox"),C=n("rB4B"),E=a.a.createElement,A=function(e){var t=e.template||S,n=Object(k.a)();return Object(i.useEffect)((function(){window.adngin&&window.adngin.queue.push((function(){window.adngin.cmd.startAuction(["leaderboard-2","leaderboard-3","wingbanner-left","wingbanner-right","halfpage-1","mpu-1","instream"])}))}),[e.location]),E(a.a.Fragment,null,E(s.default,{titleTemplate:"%s",title:e.title||Object(u.getSectionLabel)(e.section)},E("meta",{property:"fb:app_id",content:"293175074032541"}),E("meta",{property:"og:type",content:"section"}),E("meta",{property:"og:title",content:e.title||Object(u.getSectionLabel)(e.section)}),E("meta",{property:"og:image",content:f.a}),E("meta",{itemProp:"headline",content:e.title||"Latest News from "+Object(u.getSectionLabel)(e.section)}),E("meta",{name:"description",content:e.description}),E("meta",{itemProp:"description",content:e.description}),E("meta",{property:"og:description",content:e.description}),E("meta",{property:"og:url",content:e.url}),E("meta",{property:"keywords",content:e.keywords}),E("meta",{name:"twitter:site",content:e.twitterName}),E("meta",{name:"twitter:creator",content:e.twitterName}),E("meta",{name:"twitter:title",content:e.title||Object(u.getSectionLabel)(e.section)}),E("meta",{name:"twitter:description",content:e.description}),E("meta",{itemprop:"image",content:f.a}),E("meta",{itemprop:"thumbnailUrl",content:f.a}),E("meta",{name:"twitter:card",content:"summary_large_image"}),E("meta",{name:"twitter:image:src",content:f.a})),e.isPage0&&E(c.Articles,Object(r.a)({},e,{noDiv:!0,className:"",loading:function(){return E(C.b,{sectionLabel:Object(u.getSectionLabel)(e.section)})},component:function(r){return E(a.a.Fragment,null,E(d.a,{useSmall:e.useSmall}),E("div",{id:"adngin-leaderboard-1-0",className:"advert-leaderboard-1"}),E("div",{className:"wrapper article-listing"},E("div",{className:"article-list"},E(t,r)),E(h.a,e,E(b.a,null))),n&&E(y.MobileElse,null,E("div",{id:"adngin-leaderboard-3-0",className:"advert-leaderboard-3"})))},section:e.section,sectionLabel:e.sectionLabel,sectionsLabels:e.sectionsLabels,count:18,pageSize:18,noImage:g.a,notFound:w.default,withMore:!0})),!e.isPage0&&E(c.Articles,Object(r.a)({},e,{className:"",component:function(t){return E("div",{className:"wrapper article-listing"},E("div",{className:"article-list paged"},E("h1",null,t.sectionLabel),t.articles.map((function(e){return E(v.a,{key:e.contentKey,article:e,noImage:t.noImage})})),t.moreButton),E(h.a,e,E(b.a,null)))},section:e.section,page0Limit:18,pageSize:18,noImage:g.a,notFound:w.default,withMore:!0})),E(c.SectionMeta,e))};A.defaultProps={component:S,section:"homepage"};var x=Object(l.connect)((function(e){return{articles:e.articles}}))(A),P=a.a.createElement,I=function(e){var t=e.articles,n=(e.authorName,e.section,e.noImage),r=(e.isConnected,e.sectionLabel),o=e.moreButton;return P(a.a.Fragment,null,P("h1",null,r),t.map((function(e,t){return P(i.Fragment,{key:e.contentKey},P(v.a,{article:e,noImage:n}))})),o)},O=n("55Ip"),L=n("yCm8"),D=a.a.createElement,M=function(e){var t=e.article,n=e.noImage,r=e.imageSize,i=e.headlineOnly;return D("article",{key:t.contentKey,"aria-label":"article"},D(O.Link,{to:"/"+t.getCanonicalUri()},D("div",{className:"article-list-img"},D(y.Mobile,null,D(L.ImageOrNoImage,{shape:"square",width:320,image:t.image,alt:t.headline,noImage:n})),D(y.MobileElse,null,D(L.ImageOrNoImage,{shape:"square",width:r,image:t.image,alt:t.headline,noImage:n}))),D("div",{className:"content"},D("h4",null,t.headline),i?null:D(a.a.Fragment,null,D("p",null,"By ",D("strong",null,t.getAuthor())),D("p",null,t.formatDate())))))},R=a.a.createElement,N=function(e){var t=e.article,n=e.noImage,r=e.imageSize;return R("article",{key:t.contentKey,"aria-label":"article"},R(O.Link,{to:"/"+t.getCanonicalUri()},R("div",{className:"content"},R("h4",null,t.headline),R("p",null,"By ",R("strong",null,t.getAuthor())),R("p",null,t.formatDate())),R("div",{className:"article-list-img"},R(y.Mobile,null,R(L.ImageOrNoImage,{shape:"square",width:320,image:t.image,alt:t.headline,noImage:n})),R(y.MobileElse,null,R(L.ImageOrNoImage,{shape:"square",width:r,image:t.image,alt:t.headline,noImage:n})))))},j=a.a.createElement,B=function(e){return Object(i.useEffect)((function(){window.adngin&&window.adngin.queue.push((function(){window.adngin.cmd.startAuction(["leaderboard-3","wingbanner-left","wingbanner-right","halfpage-1","mpu-1"])}))}),[e.location]),j(a.a.Fragment,null,j(s.default,{titleTemplate:"%s",title:e.title||Object(u.getSectionLabel)(e.section)},j("meta",{property:"fb:app_id",content:"293175074032541"}),j("meta",{property:"og:type",content:"section"}),j("meta",{property:"og:title",content:e.title||Object(u.getSectionLabel)(e.section)}),j("meta",{property:"og:image",content:f.a}),j("meta",{itemProp:"headline",content:e.title||"Latest News from "+Object(u.getSectionLabel)(e.section)}),j("meta",{name:"description",content:e.description}),j("meta",{itemProp:"description",content:e.description}),j("meta",{property:"og:description",content:e.description}),j("meta",{property:"og:url",content:e.url}),j("meta",{property:"keywords",content:e.keywords}),j("meta",{name:"twitter:site",content:e.twitterName}),j("meta",{name:"twitter:creator",content:e.twitterName}),j("meta",{name:"twitter:title",content:e.title||Object(u.getSectionLabel)(e.section)}),j("meta",{name:"twitter:description",content:e.description}),j("meta",{itemprop:"image",content:f.a}),j("meta",{itemprop:"thumbnailUrl",content:f.a}),j("meta",{name:"twitter:card",content:"summary_large_image"}),j("meta",{name:"twitter:image:src",content:f.a})),j(d.a,{useSmall:e.useSmall}),j("div",{id:"adngin-leaderboard-1-0",className:"advert-leaderboard-1"}),j("div",{className:"wrapper"},e.isPage0&&j(c.Articles,Object(r.a)({className:"hag-hover-zoom"},e,{section:e.section,count:13,pageSize:8,noImage:g.a,notFound:w.default,withMore:!0,component:function(e){var t=e.articles,n=(e.authorName,e.section,e.noImage,e.isConnected,e.sectionLabel,e.moreButton);return j(a.a.Fragment,null,j("div",{className:"content-hub"},j("div",{className:"content-hub-main"},j(M,{key:t[0].contentKey,article:t[0],imageSize:670,noImage:g.a})),j("div",{className:"content-hub-round"},t.slice(1,5).map((function(e){return j(M,{key:e.contentKey,article:e,imageSize:80,noImage:g.a,headlineOnly:!0})})))),j("div",{className:"content-hub-split"},t.slice(5,7).map((function(e){return j(N,{key:e.contentKey,article:e,imageSize:495,noImage:g.a})}))),j("div",{className:"content-hub-list"},t.slice(7,13).map((function(e){return j(M,{key:e.contentKey,article:e,imageSize:220,noImage:g.a})})),j("aside",null,j("div",{id:"adngin-halfpage-1-0",className:"advert-sidebar"}))),j("div",{className:"content-hub-more"},t.slice(13).map((function(e){return j(M,{key:e.contentKey,article:e,imageSize:220,noImage:g.a})}))),n)}})),!e.isPage0&&j(c.Articles,Object(r.a)({className:"content-hub-more paged"},e,{component:I,section:e.section,page0Limit:13,pageSize:12,noImage:g.a,notFound:w.default,withMore:!0}))),j(y.MobileElse,null,j("div",{id:"adngin-leaderboard-3-0",className:"advert-leaderboard-3"})),j(c.SectionMeta,e))};B.defaultProps={component:I,section:"gift-guide"};var U=Object(l.connect)((function(e){return{articles:e.articles}}))(B),F=n("1OyB"),q=n("vuIU"),H=n("Ji7U"),z=n("LK+K"),W=n("20I1"),V=n("ANjH"),K=n("Bje/"),G=a.a.createElement,X=function(e){Object(H.a)(n,e);var t=Object(z.a)(n);function n(e){var r;return Object(F.a)(this,n),r=t.call(this,e),e.fetchAuthor(e.authorSlug),r}return Object(q.a)(n,[{key:"componentDidMount",value:function(){window.adngin&&window.adngin.queue.push((function(){window.adngin.cmd.startAuction(["leaderboard-2","leaderboard-3","wingbanner-left","wingbanner-right","halfpage-1","mpu-1"])}))}},{key:"render",value:function(){var e=this.props;return G(a.a.Fragment,null,G(s.default,{titleTemplate:"%s",title:e.title||Object(u.getSectionLabel)(e.section)},G("meta",{property:"fb:app_id",content:"293175074032541"}),G("meta",{property:"og:type",content:"section"}),G("meta",{property:"og:title",content:e.title||Object(u.getSectionLabel)(e.section)}),G("meta",{property:"og:image",content:f.a}),G("meta",{itemProp:"headline",content:e.title||"Latest News from "+Object(u.getSectionLabel)(e.section)}),G("meta",{name:"description",content:e.description}),G("meta",{itemProp:"description",content:e.description}),G("meta",{property:"og:description",content:e.description}),G("meta",{property:"og:url",content:e.url}),G("meta",{property:"keywords",content:e.keywords}),G("meta",{name:"twitter:site",content:e.twitterName}),G("meta",{name:"twitter:creator",content:e.twitterName}),G("meta",{name:"twitter:title",content:e.title||Object(u.getSectionLabel)(e.section)}),G("meta",{name:"twitter:description",content:e.description}),G("meta",{itemprop:"image",content:f.a}),G("meta",{itemprop:"thumbnailUrl",content:f.a}),G("meta",{name:"twitter:card",content:"summary_large_image"}),G("meta",{name:"twitter:image:src",content:f.a})),G(d.a,{useSmall:e.useSmall}),G("div",{id:"adngin-leaderboard-1-0",className:"advert-leaderboard-1"}),G("div",{className:"wrapper article-listing"},G("div",{className:"author article-list"},e.author&&e.author.author&&G(K.a,Object(r.a)({},e.author.author,{noImage:g.a})),G(c.Articles,Object(r.a)({},e,{component:e.template,section:e.section,count:24,pageSize:24,noImage:g.a,notFound:w.default,withMore:!0}))),G(h.a,{section:e.section},G(y.DesktopTablet,null,G(b.a,null)))),G(y.MobileElse,null,G("div",{id:"adngin-leaderboard-3-0",className:"advert-leaderboard-3"})),G(c.SectionMeta,e))}}]),n}(a.a.Component);X.defaultProps={component:"AuthorArticles",section:"author"};var Y=Object(o.withRouter)(Object(l.connect)((function(e){return{articles:e.articles,author:e.author}}),(function(e){return Object(V.bindActionCreators)({fetchAuthor:W.b},e)}))(X)),Q=a.a.createElement,$=function(e){var t=e.articles,n=(e.sectionLabel,e.section,e.noImage),r=(e.isConnected,e.moreButton);return Q(a.a.Fragment,null,t.map((function(e,t){return Q(i.Fragment,{key:e.contentKey},Q(v.a,{article:e,noImage:n}),11===t&&Q("div",{id:"adngin-leaderboard-2-0",className:"advert-leaderboard-2"}))})),r)},Z=n("AgMu"),J=n("Qyje"),ee=n.n(J),te=a.a.createElement;t.default=function e(t){var n=((t.location?ee.a.parse(t.location.search,{ignoreQueryPrefix:!0}):{page:0}).page||0)<2;return te(a.a.Fragment,null,te(s.default,{titleTemplate:t.titleTemplate}),te(o.Switch,null,te(o.Route,{path:t.match.url+"/:section([a-zA-Z0-9-]+)/",strict:!0,exact:!0,render:function(e){return te(o.Redirect,{to:t.match.url+"/"+e.match.params.section})}}),t.match.url===t.location.pathname&&te(o.Switch,null,te(o.Route,{path:"/design",exact:!0,render:function(e){return te(x,Object(r.a)({},t,e,{isPage0:n,section:"design",title:"Home, Garden & Decor Design News | South Africa | House & Garden",description:"Discover all the latest home, garden & decor design trends. Check out the best-kept secrets that industry insiders will never tell you about. "}))}}),te(o.Route,{path:"/design/trends",exact:!0,render:function(e){return te(x,Object(r.a)({},t,e,{isPage0:n,section:"design/trends",title:"Interior and home design trends | House & Garden South Africa",description:"Top home and interior design trends according to House & Garden SA. All of the most popular design ideas in one chic digital environment. Be the first to hear about the latest design and decor ideas."}))}}),te(o.Route,{path:"/design/art",exact:!0,render:function(e){return te(x,Object(r.a)({},t,e,{isPage0:n,section:"design/art",title:"South African and International Art and Design | House & Garden South Africa",description:"Everything House & Garden knows about Art, including the most recent news, stories, greatest art shows, and profiles on the most recent artists to be aware of."}))}}),te(o.Route,{path:"/design/architecture",exact:!0,render:function(e){return te(x,Object(r.a)({},t,e,{isPage0:n,section:"design/architecture",title:"Innovative Architectural Design Trends | House & Garden South Africa",description:"Keep up with luxury architecture design houses and news, including profiles on remarkable talent. Take a look at some of the best designed homes."}))}}),te(o.Route,{path:"/design/innovative",exact:!0,render:function(e){return te(x,Object(r.a)({},t,e,{isPage0:n,section:"design/innovative",sectionLabel:"Innovative Designs",title:"Innovative Design trends | House & Garden South Africa",description:"Collection of eye-catching, smart, original, and trend-setting designs from the design world."}))}}),te(o.Route,{path:"/interiors",exact:!0,render:function(e){return te(x,Object(r.a)({},t,e,{isPage0:n,section:"interiors",sectionLabel:"Interior D\xe9cor",title:"Interior Design for Your Home & Living Spaces | House & Garden",description:"From classic to contemporary, industrial to urban, House and Garden has all the tricks and tips to turn your living room into a space that suits your personality best."}))}}),te(o.Route,{path:"/interiors/bathroom",exact:!0,render:function(e){return te(x,Object(r.a)({},t,e,{isPage0:n,section:"interiors/bathroom",title:"Discover beautiful bathroom inspirations | House & Garden South Africa",description:"Find stunning bathroom design inspirations, cutting-edge concepts, and bold wallpaper ideas to style, embellish, and enhance your bathroom area."}))}}),te(o.Route,{path:"/interiors/bedroom",exact:!0,render:function(e){return te(x,Object(r.a)({},t,e,{isPage0:n,section:"interiors/bedroom",title:"Top interior design tips for your bedroom | House & Garden South Africa",description:"Your most fashionable haven should be your bedroom. Here are suggestions, DIY tips and\xa0advice on everything you require to design the bedroom of your dreams."}))}}),te(o.Route,{path:"/interiors/kitchen",exact:!0,render:function(e){return te(x,Object(r.a)({},t,e,{isPage0:n,section:"interiors/kitchen",title:"Discover the latest kitchen trends for 2023 | House & Garden South Africa",description:"With our helpful trend forecasts, you can design the kitchen of your dreams. Your kitchen is the gathering place for family and friends in your home."}))}}),te(o.Route,{path:"/interiors/living-room",exact:!0,render:function(e){return te(x,Object(r.a)({},t,e,{isPage0:n,section:"interiors/living-room",title:"Ideas for kitchens from top interior designers worldwide | House & Garden South Africa",description:"In need of motivation. We've gathered ideas, advice, and recommendations from local and worldwide designers on how to breathe new life into your living room through design, decoration, and renovation."}))}}),te(o.Route,{path:"/gardens",exact:!0,render:function(e){return te(x,Object(r.a)({},t,e,{isPage0:n,section:"gardens",title:"South Africa's elite guide to the most stylish gardens | House & Garden South Africa",description:"How to create a beautiful landscape and tips on how to care for your plants, flowers, herbs, succulents and trees. Hacks to seasonal changes to keep your garden thriving."}))}}),te(o.Route,{path:"/travel-leisure",exact:!0,render:function(e){return te(x,Object(r.a)({},t,e,{isPage0:n,section:"travel-leisure",title:"Leading worldwide and local travel guides | House & Garden South Africa",description:"Seeking some relaxation? If you're looking for tips on how to maximize your upcoming vacation or weekend getaway, start here."}))}}),te(o.Route,{path:"/travel-leisure/gourmet-restaurant-awards",exact:!0,render:function(e){return te(x,Object(r.a)({},t,e,{isPage0:n,section:"travel-leisure/gourmet-restaurant-awards",title:"Gourmet Restaurant Awards | South Africa |House & Garden",description:"As one of South Africa\u2019s favourite foodie mag, we\u2019ve taste-tested the ultimate crave-worthy recipes fit for all seasons. Find out what to cook, drink, read and eat right now"}))}}),te(o.Route,{path:"/recipes",exact:!0,render:function(e){return te(x,Object(r.a)({},t,e,{isPage0:n,section:"recipes",title:"Delicious recipes for every occasion | House & Garden South Africa",description:"From laid-back brunches to 5-star dinners and Instagram-worthy desserts, we have delicious food recipes for every occasion. Follow your favourite chef's latest cookbooks and how to re-create their tasty meals."}))}}),te(o.Route,{path:"/diy",exact:!0,render:function(e){return te(x,Object(r.a)({},t,e,{isPage0:n,section:"diy",title:"DIY to Enhance Your Home | House & Garden South Africa",description:"Become a DIY expert with our wide range of content, from how to grow your own vegetable garden to decorate with paint and handy tricks to use around the house."}))}}),te(o.Route,{path:"/video",exact:!0,render:function(e){return te(x,Object(r.a)({},t,e,{isPage0:n,section:"video",title:"Take a look at the most current interior videos | House & Garden South Africa",description:"Visit House and Garden SA to view all the most recent art and design inspired video content. From celebrity home tours, home renovations and event coverage, we provide you exclusive experiences and ideas for your own home."}))}}),te(o.Route,{path:"/win",exact:!0,render:function(e){return te(x,Object(r.a)({},t,e,{isPage0:n,section:"win",title:"Enter to Win Competitions and Give Aways | House & Garden",description:"Enter our competitions and stand a chance to win incredible prizes and travel experiences by entering our competitions. Don\u2019t miss out on amazing giveaways."}))}}),te(o.Route,{path:"/shopping",exact:!0,render:function(e){return te(x,Object(r.a)({},t,e,{isPage0:n,section:"shopping",title:"Stylish Home Decor Must-Haves: Shop the Latest Trends in Furniture | House & Garden",description:"Elevate your home with our curated decor collection. Shop furniture, lighting, and accessories to transform your space. Find inspiration from House and Garden."}))}}),te(o.Route,{path:"/shopping/gift-guide",exact:!0,render:function(e){return te(U,Object(r.a)({},t,e,{isPage0:n,section:"shopping/gift-guide",title:"House & Garden's Ultimate SA Gift Guide: Spoil the Homebody in Your Life",description:"Say yes to endless gifting options that'll make their home feel like a sanctuary, discover a treasure of home decor gift ideas to delight every South African African on your list."}))}}),te(o.Route,{path:"/test",exact:!0,render:function(e){return te(a.a.Fragment,null,te(s.default,null,te("meta",{name:"robots",content:"noindex, nofollow"})),te(x,Object(r.a)({},t,e,{isPage0:n,section:"all-content-feed",title:"Test page | House & Garden",description:"Test page for marketing purposes"})))}}),te(o.Route,{path:"/:section([a-zA-Z0-9/-]+)",exact:!0,render:function(e){return te(x,Object(r.a)({},t,e,{isPage0:n,title:Object(u.getSectionLabel)(Object(u.url2section)(t.location.pathname))+" | House & Garden",section:Object(u.url2section)(t.location.pathname),url:t.location.pathname}))}}),te(o.Route,{path:"*",render:function(e){return te(w.default,Object(r.a)({},t,e))}})),te(o.Route,{path:"/authors/:section([a-zA-Z-]+)",render:function(e){return te(Y,Object(r.a)({},t,e,{template:$,title:Object(u.getSectionLabel)(Object(u.url2section)(t.location.pathname))+" | House & Garden",section:Object(u.url2section)(t.location.pathname),url:t.location.pathname,authorSlug:e.match.params.section}))}}),te(o.Route,{path:t.match.url+"/:title*([-])*:contentKey([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})",render:function(e){return te(Z.default,Object(r.a)({},t,e,{contentKey:e.match.params.contentKey}))}}),te(o.Route,{path:t.match.url+"/:title*([-])*:contentKey([0-9]{5,})",render:function(e){return te(Z.default,Object(r.a)({},t,e,{contentKey:e.match.params.contentKey}))}}),te(o.Route,{path:t.match.url+"/:section([a-zA-Z0-9-]+)",render:function(n){return te(e,Object(r.a)({},t,n))}})))}},"9uj6":function(e,t,n){"use strict";var r=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|inert|itemProp|itemScope|itemType|itemID|itemRef|on|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,i=function(e){var t={};return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}}((function(e){return r.test(e)||111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)<91}));t.a=i},ATIt:function(e,t,n){"use strict";var r=n("x+uP"),i=n("HaE+"),a=n("q1tI"),o=n.n(a),s=n("55Ip"),u=n("zuR4"),l=n("Qyje"),c=n.n(l),d=n("j8mP"),h=n("82UI"),p=n.n(h),f=n("dlDD"),m=n.n(f),g=o.a.createElement,v=function(e){var t=e.componentText,n=e.subscribeConcept;return g("button",{className:"follow-me-btn",onClick:function(){return n()}},t)};t.a=function(e){var t=e.topic,n=e.followText,l=e.unFollowText,h=e.template||v,f=Object(a.useState)(!1),y=f[0],b=f[1],_=Object(a.useState)(!1),T=_[0],S=_[1],w=Object(a.useState)(!1),k=w[0],C=w[1],E=Object(a.useState)(!1),A=E[0],x=E[1];function P(e,t){if(!t)return console.log("*** isSubscribedToConcept: User is not subscribed to any push notifications"),Promise.resolve(!1);var n=c.a.stringify({titleKey:"hag",endpoint:t&&t.endpoint||""});return u.a.post("https://push.iol.io/topics",n,{headers:{"Content-Type":"application/x-www-form-urlencoded"}}).then((function(t){var n=t.data.filter((function(t){return t.topic===e}));return console.log("*** subscriptions response",t.status,t.data,"subscribed:",n.length>0),n.length>0})).catch((function(e){return console.log("*** isSubscribedToConcept error:",e.message),!1}))}function I(e,n){var r={topic:e,titleKey:"hag",subscription:JSON.stringify(n)};console.log("*** FollowConcept:","Subscribing",r),console.log("Calling",y?"unsubscribe":"subscribe",t.name),u.a.post("https://push.iol.io"+(y?"/unsubscribe":"/subscribe"),c.a.stringify(r),{headers:{"Content-Type":"application/x-www-form-urlencoded"}}).then((function(e){return b(!y)})).catch((function(e){return console.log(y?"Unsubscribe":"Subscribe","Error:",e.message),!1}))}Object(a.useEffect)((function(){navigator.serviceWorker&&navigator.serviceWorker.getRegistration().then((function(e){console.log("*** FollowConcept: registration",e),x(e)}))}),[]),Object(a.useEffect)((function(){console.log("*** FollowConcept: registration",A),A&&A.pushManager&&A.pushManager.getSubscription().then((function(e){console.log("*** FollowConcept: subscription",e),C(e)}))}),[A]),Object(a.useEffect)((function(){function e(){return(e=Object(i.a)(Object(r.a)().mark((function e(){var n;return Object(r.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,P(t.topic,k);case 2:n=e.sent,b(n);case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}console.log("FollowConcept setIsSubscribed",t.name,k,t.topic),function(){e.apply(this,arguments)}()}),[k,t.topic]);var O=!("undefined"===typeof window.navigator||!k);return O?g(h,{componentText:O&&y?l:n,subscribeConcept:function(){return I(t.topic,k)}}):A&&A.pushManager?g(o.a.Fragment,null,T&&g(p.a,{visible:!0},g("div",{className:"push-notification"},g("div",null,g("img",{src:m.a,alt:"House & Garden"})),g("div",{color:"grey"},g("p",null,"Small problem.."),g("p",null,"You have chosen to block notifications."),g("p",null,"To follow stories requires you to enable notifications in your browser settings."),g("div",{display:"flex",justifycontent:"flex-end"},g(s.Link,{onClick:function(){return S(!1)},to:"/help"},"Help"),g("button",{onClick:function(){return S(!1)}},"OK"))))),g(h,{componentText:n,subscribeConcept:function(){return e=t.topic,console.log("*** FollowConcept:","Registering and subscribing"),void A.pushManager.subscribe({userVisibleOnly:!0,applicationServerKey:Object(d.c)("BOhM2CjvSR-t3HkWz6XU1w5viVCxLrjbUPiqkwTNuJIr-Ns-IbRh1qtkQCVPRkKCiRqYPjCCnT_Dkfo9ZCrEnEM")}).then((function(t){return console.log("User IS now subscribed."),C(t),I(e,t)})).catch((function(e){console.log("Failed to subscribe the user: ",e),S(!0),C(!1)}));var e}})):null}},AgMu:function(e,t,n){"use strict";n.r(t),n.d(t,"Article",(function(){return Nt}));var r=n("wx14"),i=n("BsWD");function a(e,t){var n="undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=Object(i.a)(e))||t&&e&&"number"===typeof e.length){n&&(e=n);var r=0,a=function(){};return{s:a,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,s=!0,u=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return s=e.done,e},e:function(e){u=!0,o=e},f:function(){try{s||null==n.return||n.return()}finally{if(u)throw o}}}}var o=n("1OyB"),s=n("vuIU"),u=n("JX7q"),l=n("Ji7U"),c=n("LK+K"),d=n("q1tI"),h=n.n(d),p=n("ANjH"),f=n("/MKj"),m=n("Ty5D"),g=n("55Ip"),v=n("EbEg"),y=n("qhky"),b=n("ZWPH"),_=n("yCm8"),T=n("4I37"),S=n.n(T),w=n("L80f"),k=n("0srb");var C=n("kHmz"),E=n("8OJ3"),A=n("vgmO"),x=n.n(A),P=n("7zRj"),I=n.n(P);var O=function(e,t){t.isImmediatePropagationStopped=function(){return!0},t.cancelBubble=!0,t.isPropagationStopped=function(){return!0}},L=function(e,t,n){O(0,n),e.trigger({type:t+n.type,originalEvent:n})};function D(e){"playing"===e.type?function(e,t){e.ads.isInAdMode()&&(e.ads.isContentResuming()?e.ads._contentEnding&&L(e,"content",t):L(e,"ad",t))}(this,e):"ended"===e.type?function(e,t){e.ads.isInAdMode()?e.ads.isContentResuming()?(O(0,t),e.trigger("resumeended")):L(e,"ad",t):e.ads._contentHasEnded||e.ads.stitchedAds()||(L(e,"content",t),e.trigger("readyforpostroll"))}(this,e):"loadstart"===e.type||"loadeddata"===e.type||"loadedmetadata"===e.type?function(e,t){if(!("loadstart"===t.type&&!e.ads._hasThereBeenALoadStartDuringPlayerLife||"loadeddata"===t.type&&!e.ads._hasThereBeenALoadedData||"loadedmetadata"===t.type&&!e.ads._hasThereBeenALoadedMetaData))if(e.ads.inAdBreak())L(e,"ad",t);else{if(e.currentSrc()!==e.ads.contentSrc)return;L(e,"content",t)}}(this,e):"play"===e.type?function(e,t){e.ads.inAdBreak()?L(e,"ad",t):e.ads.isContentResuming()&&L(e,"content",t)}(this,e):this.ads.isInAdMode()&&(this.ads.isContentResuming()?L(this,"content",e):L(this,"ad",e))}var M={},R=function(){!function(e){if(E.a.dom.isInFrame()&&"function"!==typeof x.a.__tcfapi){for(var t,n=x.a,r={};n;){try{if(n.frames.__tcfapiLocator){t=n;break}}catch(i){}if(n===x.a.top)break;n=n.parent}if(!t)return;x.a.__tcfapi=function(e,n,i,a){var o=Math.random()+"",s={__tcfapiCall:{command:e,parameter:a,version:n,callId:o}};r[o]=i,t.postMessage(s,"*")},x.a.addEventListener("message",(function(e){var t={};try{t="string"===typeof e.data?JSON.parse(e.data):e.data}catch(i){}var n=t.__tcfapiReturn;n&&"function"===typeof r[n.callId]&&(r[n.callId](n.returnValue,n.success),r[n.callId]=null)}),!1)}}(),"function"===typeof x.a.__tcfapi&&x.a.__tcfapi("addEventListener",2,(function(e,t){t&&(M=e)}))},N=function(e,t){return t?encodeURIComponent(e):e},j=function(e,t,n){if(e&&e[n])for(var r=e[n],i=Object.keys(r),a=0;a<i.length;a++){t["{mediainfo."+n+"."+i[a]+"}"]=r[i[a]]}};function B(e,t,n){var r=this,i={};e=e.replace(/{([^}=]+)=([^}]+)}/g,(function(e,t,n){return i["{"+t+"}"]=n,"{"+t+"}"})),void 0===t&&(t=!1);var a={};for(var o in void 0!==n&&(a=n),a["{player.id}"]=this.options_["data-player"]||this.id_,a["{player.height}"]=this.currentHeight(),a["{player.width}"]=this.currentWidth(),a["{mediainfo.id}"]=this.mediainfo?this.mediainfo.id:"",a["{mediainfo.name}"]=this.mediainfo?this.mediainfo.name:"",a["{mediainfo.duration}"]=this.mediainfo?this.mediainfo.duration:"",a["{player.duration}"]=this.duration(),a["{player.pageUrl}"]=E.a.dom.isInFrame()?I.a.referrer:x.a.location.href,a["{playlistinfo.id}"]=this.playlistinfo?this.playlistinfo.id:"",a["{playlistinfo.name}"]=this.playlistinfo?this.playlistinfo.name:"",a["{timestamp}"]=(new Date).getTime(),a["{document.referrer}"]=I.a.referrer,a["{window.location.href}"]=x.a.location.href,a["{random}"]=Math.floor(1e12*Math.random()),["description","tags","reference_id","ad_keys"].forEach((function(e){r.mediainfo&&r.mediainfo[e]?a["{mediainfo."+e+"}"]=r.mediainfo[e]:i["{mediainfo."+e+"}"]?a["{mediainfo."+e+"}"]=i["{mediainfo."+e+"}"]:a["{mediainfo."+e+"}"]=""})),j(this.mediainfo,a,"custom_fields"),j(this.mediainfo,a,"customFields"),Object.keys(M).forEach((function(e){a["{tcf."+e+"}"]=M[e]})),a["{tcf.gdprAppliesInt}"]=M.gdprApplies?1:0,a)e=e.split(o).join(N(a[o],t));for(var s in e=e.replace(/{pageVariable\.([^}]+)}/g,(function(e,n){for(var r,a=x.a,o=n.split("."),s=0;s<o.length;s++)s===o.length-1?r=a[o[s]]:a=a[o[s]];var u=typeof r;return null===r?"null":void 0===r?i["{pageVariable."+n+"}"]?i["{pageVariable."+n+"}"]:(E.a.log.warn('Page variable "'+n+'" not found'),""):"string"!==u&&"number"!==u&&"boolean"!==u?(E.a.log.warn('Page variable "'+n+'" is not a supported type'),""):N(String(r),t)})),i)e=e.replace(s,i[s]);return e}var U={processMetadataTracks:function(e,t){for(var n=e.textTracks(),r=function(n){"metadata"===n.kind&&(e.ads.cueTextTracks.setMetadataTrackMode(n),t(e,n))},i=0;i<n.length;i++)r(n[i]);n.addEventListener("addtrack",(function(e){r(e.track)}))},setMetadataTrackMode:function(e){},getSupportedAdCue:function(e,t){return t},isSupportedAdCue:function(e,t){return!0},getCueId:function(e,t){return t.id}},F=function(e,t){return void 0!==t&&e.ads.includedCues[t]},q=function(e,t){void 0!==t&&""!==t&&(e.ads.includedCues[t]=!0)};function H(){!1!==this.ads._shouldBlockPlay&&(this.paused()||(this.ads.debug("Playback was canceled by cancelContentPlay"),this.pause()),this.ads._cancelledPlay=!0)}U.processAdTrack=function(e,t,n,r){e.ads.includedCues={};for(var i=0;i<t.length;i++){var a=t[i],o=this.getSupportedAdCue(e,a);if(!this.isSupportedAdCue(e,a))return void E.a.log.warn("Skipping as this is not a supported ad cue.",a);var s=this.getCueId(e,a),u=a.startTime;if(F(e,s))return void E.a.log("Skipping ad already seen with ID "+s);r&&r(e,o,s,u),n(e,o,s,u),q(e,s)}};var z={},W=E.a;z.isMiddlewareMediatorSupported=function(){return!W.browser.IS_IOS&&!W.browser.IS_ANDROID&&!!(W.use&&W.middleware&&W.middleware.TERMINATOR)},z.playMiddleware=function(e){return{setSource:function(e,t){t(null,e)},callPlay:function(){if(e.ads&&!0===e.ads._shouldBlockPlay)return e.ads.debug("Using playMiddleware to block content playback"),e.ads._playBlocked=!0,W.middleware.TERMINATOR},play:function(t,n){e.ads&&e.ads._playBlocked&&t?(e.ads.debug("Play call to Tech was terminated."),e.trigger("play"),e.addClass("vjs-has-started"),e.ads._playBlocked=!1):n&&n.catch&&n.catch((function(t){"NotAllowedError"!==t.name||E.a.browser.IS_SAFARI||e.trigger("pause")}))}}},z.testHook=function(e){W=e};var V=z.playMiddleware,K=z.isMiddlewareMediatorSupported;var G=function(){function e(){}return e.getState=function(t){if(t)return e.states_&&e.states_[t]?e.states_[t]:void 0},e.registerState=function(t,n){if("string"!==typeof t||!t)throw new Error('Illegal state name, "'+t+'"; must be a non-empty string.');return e.states_||(e.states_={}),e.states_[t]=n,n},e}(),X=function(){function e(e){this.player=e}e._getName=function(){return"Anonymous State"};var t=e.prototype;return t.transitionTo=function(e){var t=this.player;this.cleanup(t);var n=new e(t);t.ads._state=n,t.ads.debug(this.constructor._getName()+" -> "+n.constructor._getName());for(var r=arguments.length,i=new Array(r>1?r-1:0),a=1;a<r;a++)i[a-1]=arguments[a];n.init.apply(n,[t].concat(i))},t.init=function(){},t.cleanup=function(){},t.onPlay=function(){},t.onPlaying=function(){},t.onEnded=function(){},t.onAdEnded=function(){},t.onAdsReady=function(){E.a.log.warn("Unexpected adsready event")},t.onAdsError=function(){},t.onAdsCanceled=function(){},t.onAdTimeout=function(){},t.onAdStarted=function(){},t.onContentChanged=function(){},t.onContentResumed=function(){},t.onReadyForPostroll=function(){E.a.log.warn("Unexpected readyforpostroll event")},t.onNoPreroll=function(){},t.onNoPostroll=function(){},t.startLinearAdMode=function(){E.a.log.warn("Unexpected startLinearAdMode invocation (State via "+this.constructor._getName()+")")},t.endLinearAdMode=function(){E.a.log.warn("Unexpected endLinearAdMode invocation (State via "+this.constructor._getName()+")")},t.skipLinearAdMode=function(){E.a.log.warn("Unexpected skipLinearAdMode invocation (State via "+this.constructor._getName()+")")},t.isAdState=function(){throw new Error("isAdState unimplemented for "+this.constructor._getName())},t.isWaitingForAdBreak=function(){return!1},t.isContentResuming=function(){return!1},t.inAdBreak=function(){return!1},t.handleEvent=function(e){var t=this.player;"play"===e?this.onPlay(t):"adsready"===e?this.onAdsReady(t):"adserror"===e?this.onAdsError(t):"adscanceled"===e?this.onAdsCanceled(t):"adtimeout"===e?this.onAdTimeout(t):"ads-ad-started"===e?this.onAdStarted(t):"contentchanged"===e?this.onContentChanged(t):"contentresumed"===e?this.onContentResumed(t):"readyforpostroll"===e?this.onReadyForPostroll(t):"playing"===e?this.onPlaying(t):"ended"===e?this.onEnded(t):"nopreroll"===e?this.onNoPreroll(t):"nopostroll"===e?this.onNoPostroll(t):"adended"===e&&this.onAdEnded(t)},e}();function Y(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}G.registerState("State",X);var Q=function(e){function t(t){var n;return(n=e.call(this,t)||this).contentResuming=!1,n.waitingForAdBreak=!1,n}Y(t,e);var n=t.prototype;return n.isAdState=function(){return!0},n.onPlaying=function(){var e=G.getState("ContentPlayback");this.contentResuming&&this.transitionTo(e)},n.onContentResumed=function(){var e=G.getState("ContentPlayback");this.contentResuming&&this.transitionTo(e)},n.isWaitingForAdBreak=function(){return this.waitingForAdBreak},n.isContentResuming=function(){return this.contentResuming},n.inAdBreak=function(){return!0===this.player.ads._inLinearAdMode},t}(X);G.registerState("AdState",Q);var $=function(e){function t(){return e.apply(this,arguments)||this}Y(t,e);var n=t.prototype;return n.isAdState=function(){return!1},n.onContentChanged=function(e){var t=G.getState("BeforePreroll"),n=G.getState("Preroll");e.ads.debug("Received contentchanged event (ContentState)"),e.paused()?this.transitionTo(t):(this.transitionTo(n,!1),e.pause(),e.ads._pausedOnContentupdate=!0)},t}(X);G.registerState("ContentState",$);var Z,J=function(e){function t(){return e.apply(this,arguments)||this}Y(t,e),t._getName=function(){return"AdsDone"};var n=t.prototype;return n.init=function(e){e.ads._contentHasEnded=!0,e.trigger("ended")},n.startLinearAdMode=function(){E.a.log.warn("Unexpected startLinearAdMode invocation (AdsDone)")},t}(G.getState("ContentState"));G.registerState("AdsDone",J);var ee={start:function(e){e.ads.debug("Starting ad break"),e.ads._inLinearAdMode=!0,e.trigger("adstart"),e.ads.shouldTakeSnapshots()&&(e.ads.snapshot=function(e){var t;t=E.a.browser.IS_IOS&&e.ads.isLive(e)&&e.seekable().length>0?e.currentTime()-e.seekable().end(0):e.currentTime();var n=e.$(".vjs-tech"),r=e.textTracks?e.textTracks():[],i=[],a={ended:e.ended(),currentSrc:e.currentSrc(),sources:e.currentSources(),src:e.tech_.src(),currentTime:t,type:e.currentType()};n&&(a.style=n.getAttribute("style"));for(var o=0;o<r.length;o++){var s=r[o];i.push({track:s,mode:s.mode}),s.mode="disabled"}return a.suppressedTracks=i,a}(e)),e.ads.shouldPlayContentBehindAd(e)&&(e.ads.preAdVolume_=e.volume(),e.volume(0)),e.addClass("vjs-ad-playing"),e.hasClass("vjs-live")&&e.removeClass("vjs-live"),e.ads.removeNativePoster()},end:function(e,t){e.ads.debug("Ending ad break"),void 0===t&&(t=function(){}),e.ads.adType=null,e.ads._inLinearAdMode=!1,e.trigger("adend"),e.removeClass("vjs-ad-playing"),e.ads.isLive(e)&&e.addClass("vjs-live"),e.ads.shouldTakeSnapshots()?function(e,t){var n=e.ads.snapshot;if(void 0===t&&(t=function(){}),!0===e.ads.disableNextSnapshotRestore)return e.ads.disableNextSnapshotRestore=!1,delete e.ads.snapshot,void t();var r,i=e.$(".vjs-tech"),a=20,o=n.suppressedTracks,s=function(){for(var e=0;e<o.length;e++)(r=o[e]).track.mode=r.mode},u=function(){var t;if(E.a.browser.IS_IOS&&e.ads.isLive(e)){if(n.currentTime<0&&(t=e.seekable().length>0?e.seekable().end(0)+n.currentTime:e.currentTime(),e.currentTime(t)),e.paused()){var r=e.play();r&&r.catch&&r.catch((function(e){E.a.log.warn("Play promise rejected in IOS snapshot resume",e)}))}}else if(n.ended)e.currentTime(e.duration());else{e.currentTime(n.currentTime);var i=e.play();i&&i.catch&&i.catch((function(e){E.a.log.warn("Play promise rejected in snapshot resume",e)}))}e.ads.shouldRemoveAutoplay_&&(e.autoplay(!1),e.ads.shouldRemoveAutoplay_=!1)},l=function t(){if(e.off("contentcanplay",t),Z&&e.clearTimeout(Z),(i=e.el().querySelector(".vjs-tech")).readyState>1)return u();if(void 0===i.seekable)return u();if(i.seekable.length>0)return u();if(a--)e.setTimeout(t,50);else try{u()}catch(n){E.a.log.warn("Failed to resume the content after an advertisement",n)}};if("style"in n&&i.setAttribute("style",n.style||""),e.ads.videoElementRecycled())e.one("resumeended",(function(){delete e.ads.snapshot,t()})),e.one("contentloadedmetadata",s),E.a.browser.IS_IOS&&!e.autoplay()&&(e.autoplay(!0),e.ads.shouldRemoveAutoplay_=!0),e.src(n.sources),e.one("contentcanplay",l),Z=e.setTimeout(l,2e3);else{if(s(),!e.ended()){var c=e.play();c&&c.catch&&c.catch((function(e){E.a.log.warn("Play promise rejected in snapshot restore",e)}))}delete e.ads.snapshot,t()}}(e,t):(e.volume(e.ads.preAdVolume_),t())}},te=function(e){function t(){return e.apply(this,arguments)||this}Y(t,e),t._getName=function(){return"Preroll"};var n=t.prototype;return n.init=function(e,t,n){if(this.waitingForAdBreak=!0,e.addClass("vjs-ad-loading"),n||e.ads.nopreroll_)return this.resumeAfterNoPreroll(e);var r=e.ads.settings.timeout;"number"===typeof e.ads.settings.prerollTimeout&&(r=e.ads.settings.prerollTimeout),this._timeout=e.setTimeout((function(){e.trigger("adtimeout")}),r),t?this.handleAdsReady():this.adsReady=!1},n.onAdsReady=function(e){e.ads.inAdBreak()?E.a.log.warn("Unexpected adsready event (Preroll)"):(e.ads.debug("Received adsready event (Preroll)"),this.handleAdsReady())},n.handleAdsReady=function(){this.adsReady=!0,this.readyForPreroll()},n.afterLoadStart=function(e){var t=this.player;t.ads._hasThereBeenALoadStartDuringPlayerLife?e():(t.ads.debug("Waiting for loadstart..."),t.one("loadstart",(function(){t.ads.debug("Received loadstart event"),e()})))},n.noPreroll=function(){var e=this;this.afterLoadStart((function(){e.player.ads.debug("Skipping prerolls due to nopreroll event (Preroll)"),e.resumeAfterNoPreroll(e.player)}))},n.readyForPreroll=function(){var e=this.player;this.afterLoadStart((function(){e.ads.debug("Triggered readyforpreroll event (Preroll)"),e.trigger("readyforpreroll")}))},n.onAdsCanceled=function(e){var t=this;e.ads.debug("adscanceled (Preroll)"),this.afterLoadStart((function(){t.resumeAfterNoPreroll(e)}))},n.onAdsError=function(e){var t=this;E.a.log("adserror (Preroll)"),this.inAdBreak()?e.ads.endLinearAdMode():this.afterLoadStart((function(){t.resumeAfterNoPreroll(e)}))},n.startLinearAdMode=function(){var e=this.player;!this.adsReady||e.ads.inAdBreak()||this.isContentResuming()?E.a.log.warn("Unexpected startLinearAdMode invocation (Preroll)"):(this.clearTimeout(e),e.ads.adType="preroll",this.waitingForAdBreak=!1,ee.start(e),e.ads._shouldBlockPlay=!1)},n.onAdStarted=function(e){e.removeClass("vjs-ad-loading")},n.endLinearAdMode=function(){var e=this.player;this.inAdBreak()&&(e.removeClass("vjs-ad-loading"),e.addClass("vjs-ad-content-resuming"),this.contentResuming=!0,ee.end(e))},n.skipLinearAdMode=function(){var e=this,t=this.player;t.ads.inAdBreak()||this.isContentResuming()?E.a.log.warn("Unexpected skipLinearAdMode invocation"):this.afterLoadStart((function(){t.trigger("adskip"),t.ads.debug("skipLinearAdMode (Preroll)"),e.resumeAfterNoPreroll(t)}))},n.onAdTimeout=function(e){var t=this;this.afterLoadStart((function(){e.ads.debug("adtimeout (Preroll)"),t.resumeAfterNoPreroll(e)}))},n.onNoPreroll=function(e){e.ads.inAdBreak()||this.isContentResuming()?E.a.log.warn("Unexpected nopreroll event (Preroll)"):this.noPreroll()},n.resumeAfterNoPreroll=function(e){if(this.contentResuming=!0,e.ads._shouldBlockPlay=!1,this.cleanupPartial(e),e.ads._playRequested||e.ads._pausedOnContentupdate)if(e.paused()){e.ads.debug("resumeAfterNoPreroll: attempting to resume playback (Preroll)");var t=e.play();t&&t.then&&t.then(null,(function(e){}))}else e.ads.debug("resumeAfterNoPreroll: already playing (Preroll)"),e.trigger("play"),e.trigger("playing")},n.cleanup=function(e){e.ads._hasThereBeenALoadStartDuringPlayerLife||E.a.log.warn("Leaving Preroll state before loadstart event can cause issues."),this.cleanupPartial(e)},n.cleanupPartial=function(e){e.removeClass("vjs-ad-loading"),e.removeClass("vjs-ad-content-resuming"),this.clearTimeout(e)},n.clearTimeout=function(e){e.clearTimeout(this._timeout),this._timeout=null},t}(G.getState("AdState"));G.registerState("Preroll",te);var ne=function(e){function t(){return e.apply(this,arguments)||this}Y(t,e),t._getName=function(){return"BeforePreroll"};var n=t.prototype;return n.init=function(e){this.adsReady=!1,this.shouldResumeToContent=!1,e.ads._shouldBlockPlay=!e.ads.settings.allowVjsAutoplay||!e.autoplay()},n.onAdsReady=function(e){e.ads.debug("Received adsready event (BeforePreroll)"),this.adsReady=!0},n.onPlay=function(e){var t=G.getState("Preroll");e.ads.debug("Received play event (BeforePreroll)"),this.transitionTo(t,this.adsReady,this.shouldResumeToContent)},n.onAdsCanceled=function(e){e.ads.debug("adscanceled (BeforePreroll)"),this.shouldResumeToContent=!0},n.onAdsError=function(){this.player.ads.debug("adserror (BeforePreroll)"),this.shouldResumeToContent=!0},n.onNoPreroll=function(){this.player.ads.debug("Skipping prerolls due to nopreroll event (BeforePreroll)"),this.shouldResumeToContent=!0},n.skipLinearAdMode=function(){var e=this.player;e.trigger("adskip"),e.ads.debug("skipLinearAdMode (BeforePreroll)"),this.shouldResumeToContent=!0},n.onContentChanged=function(){this.init(this.player)},t}(G.getState("ContentState"));G.registerState("BeforePreroll",ne);var re=function(e){function t(){return e.apply(this,arguments)||this}Y(t,e),t._getName=function(){return"Midroll"};var n=t.prototype;return n.init=function(e){e.ads.adType="midroll",ee.start(e),e.addClass("vjs-ad-loading")},n.onAdStarted=function(e){e.removeClass("vjs-ad-loading")},n.endLinearAdMode=function(){var e=this.player;this.inAdBreak()&&(this.contentResuming=!0,e.addClass("vjs-ad-content-resuming"),e.removeClass("vjs-ad-loading"),ee.end(e))},n.onAdsError=function(e){this.inAdBreak()&&e.ads.endLinearAdMode()},n.cleanup=function(e){e.removeClass("vjs-ad-loading"),e.removeClass("vjs-ad-content-resuming")},t}(G.getState("AdState"));G.registerState("Midroll",re);var ie=function(e){function t(){return e.apply(this,arguments)||this}Y(t,e),t._getName=function(){return"Postroll"};var n=t.prototype;return n.init=function(e){if(this.waitingForAdBreak=!0,e.ads._contentEnding=!0,e.ads.nopostroll_){this.resumeContent(e);var t=G.getState("AdsDone");this.transitionTo(t)}else{e.addClass("vjs-ad-loading");var n=e.ads.settings.timeout;"number"===typeof e.ads.settings.postrollTimeout&&(n=e.ads.settings.postrollTimeout),this._postrollTimeout=e.setTimeout((function(){e.trigger("adtimeout")}),n)}},n.startLinearAdMode=function(){var e=this.player;e.ads.inAdBreak()||this.isContentResuming()?E.a.log.warn("Unexpected startLinearAdMode invocation (Postroll)"):(e.ads.adType="postroll",e.clearTimeout(this._postrollTimeout),this.waitingForAdBreak=!1,ee.start(e))},n.onAdStarted=function(e){e.removeClass("vjs-ad-loading")},n.endLinearAdMode=function(){var e=this,t=this.player,n=G.getState("AdsDone");this.inAdBreak()&&(t.removeClass("vjs-ad-loading"),this.resumeContent(t),ee.end(t,(function(){e.transitionTo(n)})))},n.skipLinearAdMode=function(){var e=this.player;e.ads.inAdBreak()||this.isContentResuming()?E.a.log.warn("Unexpected skipLinearAdMode invocation"):(e.ads.debug("Postroll abort (skipLinearAdMode)"),e.trigger("adskip"),this.abort(e))},n.onAdTimeout=function(e){e.ads.debug("Postroll abort (adtimeout)"),this.abort(e)},n.onAdsError=function(e){e.ads.debug("Postroll abort (adserror)"),e.ads.inAdBreak()?e.ads.endLinearAdMode():this.abort(e)},n.onContentChanged=function(e){if(this.isContentResuming()){var t=G.getState("BeforePreroll");this.transitionTo(t)}else if(!this.inAdBreak()){var n=G.getState("Preroll");this.transitionTo(n)}},n.onNoPostroll=function(e){this.isContentResuming()||this.inAdBreak()?E.a.log.warn("Unexpected nopostroll event (Postroll)"):this.abort(e)},n.resumeContent=function(e){this.contentResuming=!0,e.addClass("vjs-ad-content-resuming")},n.abort=function(e){var t=G.getState("AdsDone");this.resumeContent(e),e.removeClass("vjs-ad-loading"),this.transitionTo(t)},n.cleanup=function(e){e.removeClass("vjs-ad-content-resuming"),e.clearTimeout(this._postrollTimeout),e.ads._contentEnding=!1},t}(G.getState("AdState"));G.registerState("Postroll",ie);var ae=function(e){function t(){return e.apply(this,arguments)||this}Y(t,e),t._getName=function(){return"ContentPlayback"};var n=t.prototype;return n.init=function(e){e.ads._shouldBlockPlay=!1},n.onAdsReady=function(e){e.ads.debug("Received adsready event (ContentPlayback)"),e.ads.nopreroll_||(e.ads.debug("Triggered readyforpreroll event (ContentPlayback)"),e.trigger("readyforpreroll"))},n.onReadyForPostroll=function(e){var t=G.getState("Postroll");e.ads.debug("Received readyforpostroll event"),this.transitionTo(t)},n.startLinearAdMode=function(){var e=G.getState("Midroll");this.transitionTo(e)},t}(G.getState("ContentState"));G.registerState("ContentPlayback",ae);var oe=function(e){function t(){return e.apply(this,arguments)||this}Y(t,e),t._getName=function(){return"StitchedContentPlayback"};var n=t.prototype;return n.init=function(){this.player.ads._shouldBlockPlay=!1},n.onContentChanged=function(){this.player.ads.debug("Received contentchanged event ("+this.constructor._getName()+")")},n.startLinearAdMode=function(){var e=G.getState("StitchedAdRoll");this.transitionTo(e)},t}(G.getState("ContentState"));G.registerState("StitchedContentPlayback",oe);var se=function(e){function t(){return e.apply(this,arguments)||this}Y(t,e),t._getName=function(){return"StitchedAdRoll"};var n=t.prototype;return n.init=function(){this.waitingForAdBreak=!1,this.contentResuming=!1,this.player.ads.adType="stitched",ee.start(this.player)},n.onPlaying=function(){},n.onContentResumed=function(){},n.onAdEnded=function(){this.endLinearAdMode(),this.player.trigger("ended")},n.endLinearAdMode=function(){var e=G.getState("StitchedContentPlayback");ee.end(this.player),this.transitionTo(e)},t}(G.getState("AdState"));G.registerState("StitchedAdRoll",se);var ue,le=z.isMiddlewareMediatorSupported,ce=E.a.getTech("Html5").Events,de={timeout:5e3,prerollTimeout:void 0,postrollTimeout:void 0,debug:!1,stitchedAds:!1,contentIsLive:void 0,liveCuePoints:!0,allowVjsAutoplay:E.a.options.normalizeAutoplay||!1},he=function(e){var t=this,n=E.a.mergeOptions(de,e),r=[];ce.concat(["firstplay","loadedalldata"]).forEach((function(e){-1===r.indexOf(e)&&r.push(e)})),t.on(r,D),le()||function(e,t){t&&E.a.log("Using cancelContentPlay to block content playback"),e.on("play",H)}(t,n.debug),t.setTimeout((function(){t.ads._hasThereBeenALoadStartDuringPlayerLife||""===t.src()||E.a.log.error("videojs-contrib-ads has not seen a loadstart event 5 seconds after being initialized, but a source is present. This indicates that videojs-contrib-ads was initialized too late. It must be initialized immediately after video.js in the same tick. As a result, some ads will not play and some media events will be incorrect. For more information, see http://videojs.github.io/videojs-contrib-ads/integrator/getting-started.html")}),5e3),t.on("ended",(function(){t.hasClass("vjs-has-started")||t.addClass("vjs-has-started")})),t.on("contenttimeupdate",(function(){t.removeClass("vjs-waiting")})),t.on(["addurationchange","adcanplay"],(function(){if(!t.ads.settings.stitchedAds&&!t.hasStarted()&&(!t.ads.snapshot||t.currentSrc()!==t.ads.snapshot.currentSrc)&&t.ads.inAdBreak()){var e=t.play();e&&e.catch&&e.catch((function(e){E.a.log.warn("Play promise rejected when playing ad",e)}))}})),t.on("nopreroll",(function(){t.ads.debug("Received nopreroll event"),t.ads.nopreroll_=!0})),t.on("nopostroll",(function(){t.ads.debug("Received nopostroll event"),t.ads.nopostroll_=!0})),t.on("playing",(function(){t.ads._cancelledPlay=!1,t.ads._pausedOnContentupdate=!1})),t.on("play",(function(){t.ads._playRequested=!0})),t.one("loadstart",(function(){t.ads._hasThereBeenALoadStartDuringPlayerLife=!0})),t.on("loadeddata",(function(){t.ads._hasThereBeenALoadedData=!0})),t.on("loadedmetadata",(function(){t.ads._hasThereBeenALoadedMetaData=!0})),t.ads=function(e){return{disableNextSnapshotRestore:!1,_contentEnding:!1,_contentHasEnded:!1,_hasThereBeenALoadStartDuringPlayerLife:!1,_hasThereBeenALoadedData:!1,_hasThereBeenALoadedMetaData:!1,_inLinearAdMode:!1,_shouldBlockPlay:!1,_playBlocked:!1,_playRequested:!1,adType:null,VERSION:"6.9.0",reset:function(){e.ads.disableNextSnapshotRestore=!1,e.ads._contentEnding=!1,e.ads._contentHasEnded=!1,e.ads.snapshot=null,e.ads.adType=null,e.ads._hasThereBeenALoadedData=!1,e.ads._hasThereBeenALoadedMetaData=!1,e.ads._cancelledPlay=!1,e.ads._shouldBlockPlay=!1,e.ads._playBlocked=!1,e.ads.nopreroll_=!1,e.ads.nopostroll_=!1,e.ads._playRequested=!1},startLinearAdMode:function(){e.ads._state.startLinearAdMode()},endLinearAdMode:function(){e.ads._state.endLinearAdMode()},skipLinearAdMode:function(){e.ads._state.skipLinearAdMode()},stitchedAds:function(e){return void 0!==e&&(E.a.log.warn("Using player.ads.stitchedAds() as a setter is deprecated, it should be set as an option upon initialization of contrib-ads."),this.settings.stitchedAds=!!e),this.settings.stitchedAds},videoElementRecycled:function(){if(e.ads.shouldPlayContentBehindAd(e))return!1;if(!this.snapshot)throw new Error("You cannot use videoElementRecycled while there is no snapshot.");var t=e.tech_.src()!==this.snapshot.src,n=e.currentSrc()!==this.snapshot.currentSrc;return t||n},isLive:function(t){return void 0===t&&(t=e),"boolean"===typeof t.ads.settings.contentIsLive?t.ads.settings.contentIsLive:t.duration()===1/0||"8"===E.a.browser.IOS_VERSION&&0===t.duration()},shouldPlayContentBehindAd:function(t){if(void 0===t&&(t=e),t)return!!t.ads.settings.liveCuePoints&&(!E.a.browser.IS_IOS&&!E.a.browser.IS_ANDROID&&t.duration()===1/0);throw new Error("shouldPlayContentBehindAd requires a player as a param")},shouldTakeSnapshots:function(t){return void 0===t&&(t=e),!this.shouldPlayContentBehindAd(t)&&!this.stitchedAds()},isInAdMode:function(){return this._state.isAdState()},isWaitingForAdBreak:function(){return this._state.isWaitingForAdBreak()},isContentResuming:function(){return this._state.isContentResuming()},isAdPlaying:function(){return this._state.inAdBreak()},inAdBreak:function(){return this._state.inAdBreak()},removeNativePoster:function(){var t=e.$(".vjs-tech");t&&t.removeAttribute("poster")},debug:function(){if(this.settings.debug){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];1===t.length&&"string"===typeof t[0]?E.a.log("ADS: "+t[0]):E.a.log.apply(E.a,["ADS:"].concat(t))}}}}(t),t.ads.settings=n,n.stitchedAds=!!n.stitchedAds,n.stitchedAds?t.ads._state=new(G.getState("StitchedContentPlayback"))(t):t.ads._state=new(G.getState("BeforePreroll"))(t),t.ads._state.init(t),t.ads.cueTextTracks=U,t.ads.adMacroReplacement=B.bind(t),function(e){e.ads.contentSrc=e.currentSrc(),e.ads._seenInitialLoadstart=!1,e.on("loadstart",(function(){if(!e.ads.inAdBreak()){var t=e.currentSrc();t!==e.ads.contentSrc&&(e.ads._seenInitialLoadstart&&e.trigger({type:"contentchanged"}),e.trigger({type:"contentupdate",oldValue:e.ads.contentSrc,newValue:t}),e.ads.contentSrc=t),e.ads._seenInitialLoadstart=!0}}))}(t),t.on("contentchanged",t.ads.reset);var i=function(){var e=t.textTracks();if(!t.ads.shouldPlayContentBehindAd(t)&&t.ads.inAdBreak()&&t.tech_.featuresNativeTextTracks&&E.a.browser.IS_IOS&&!Array.isArray(t.textTracks()))for(var n=0;n<e.length;n++){var r=e[n];"showing"===r.mode&&(r.mode="disabled")}};t.ready((function(){t.textTracks().addEventListener("change",i)})),t.on(["play","playing","ended","adsready","adscanceled","adskip","adserror","adtimeout","adended","ads-ad-started","contentchanged","dispose","contentresumed","readyforpostroll","nopreroll","nopostroll"],(function(e){t.ads._state.handleEvent(e.type)})),t.on("dispose",(function(){t.ads.reset(),t.textTracks().removeEventListener("change",i)})),R(),t.ads.listenToTcf=R};he.VERSION="6.9.0",ue=he,!function(){if(E.a.getPlugin)return Boolean(E.a.getPlugin("ads"));var e=E.a.getComponent("Player");return Boolean(e&&e.prototype.ads)}(E.a)&&((E.a.registerPlugin||E.a.plugin)("ads",ue),K()&&!E.a.usingContribAdsMiddleware_&&(E.a.use("*",V),E.a.usingContribAdsMiddleware_=!0,E.a.log.debug("Play middleware has been registered with videojs")));var pe=function(e,t,n){this.vjsPlayer=e,this.controller=n,this.contentTrackingTimer=null,this.contentComplete=!1,this.updateTimeIntervalHandle=null,this.updateTimeInterval=1e3,this.seekCheckIntervalHandle=null,this.seekCheckInterval=1e3,this.resizeCheckIntervalHandle=null,this.resizeCheckInterval=250,this.seekThreshold=100,this.contentEndedListeners=[],this.contentSource="",this.contentSourceType="",this.contentPlayheadTracker={currentTime:0,previousTime:0,seeking:!1,duration:0},this.vjsPlayerDimensions={width:this.getPlayerWidth(),height:this.getPlayerHeight()},this.vjsControls=this.vjsPlayer.getChild("controlBar"),this.h5Player=null,this.vjsPlayer.one("play",this.setUpPlayerIntervals.bind(this)),this.boundContentEndedListener=this.localContentEndedListener.bind(this),this.vjsPlayer.on("contentended",this.boundContentEndedListener),this.vjsPlayer.on("dispose",this.playerDisposedListener.bind(this)),this.vjsPlayer.on("readyforpreroll",this.onReadyForPreroll.bind(this)),this.vjsPlayer.on("adtimeout",this.onAdTimeout.bind(this)),this.vjsPlayer.ready(this.onPlayerReady.bind(this)),"onPlay"===this.controller.getSettings().requestMode&&this.vjsPlayer.one("play",this.controller.requestAds.bind(this.controller)),this.vjsPlayer.ads(t)};pe.prototype.setUpPlayerIntervals=function(){this.updateTimeIntervalHandle=setInterval(this.updateCurrentTime.bind(this),this.updateTimeInterval),this.seekCheckIntervalHandle=setInterval(this.checkForSeeking.bind(this),this.seekCheckInterval),this.resizeCheckIntervalHandle=setInterval(this.checkForResize.bind(this),this.resizeCheckInterval)},pe.prototype.updateCurrentTime=function(){this.contentPlayheadTracker.seeking||(this.contentPlayheadTracker.currentTime=this.vjsPlayer.currentTime())},pe.prototype.checkForSeeking=function(){var e=1e3*(this.vjsPlayer.currentTime()-this.contentPlayheadTracker.previousTime);Math.abs(e)>this.seekCheckInterval+this.seekThreshold?this.contentPlayheadTracker.seeking=!0:this.contentPlayheadTracker.seeking=!1,this.contentPlayheadTracker.previousTime=this.vjsPlayer.currentTime()},pe.prototype.checkForResize=function(){var e=this.getPlayerWidth(),t=this.getPlayerHeight();e==this.vjsPlayerDimensions.width&&t==this.vjsPlayerDimensions.height||(this.vjsPlayerDimensions.width=e,this.vjsPlayerDimensions.height=t,this.controller.onPlayerResize(e,t))},pe.prototype.localContentEndedListener=function(){for(var e in this.contentComplete||(this.contentComplete=!0,this.controller.onContentComplete()),this.contentEndedListeners)"function"===typeof this.contentEndedListeners[e]&&this.contentEndedListeners[e]();clearInterval(this.updateTimeIntervalHandle),clearInterval(this.seekCheckIntervalHandle),clearInterval(this.resizeCheckIntervalHandle),this.vjsPlayer.el()&&this.vjsPlayer.one("play",this.setUpPlayerIntervals.bind(this))},pe.prototype.onNoPostroll=function(){this.vjsPlayer.trigger("nopostroll")},pe.prototype.playerDisposedListener=function(){this.contentEndedListeners=[],this.controller.onPlayerDisposed(),this.contentComplete=!0,this.vjsPlayer.off("contentended",this.boundContentEndedListener),this.vjsPlayer.ads.adTimeoutTimeout&&clearTimeout(this.vjsPlayer.ads.adTimeoutTimeout);var e=[this.updateTimeIntervalHandle,this.seekCheckIntervalHandle,this.resizeCheckIntervalHandle];for(var t in e)e[t]&&clearInterval(e[t])},pe.prototype.onReadyForPreroll=function(){this.controller.onPlayerReadyForPreroll()},pe.prototype.onAdTimeout=function(){this.controller.onAdTimeout()},pe.prototype.onPlayerReady=function(){this.h5Player=document.getElementById(this.getPlayerId()).getElementsByClassName("vjs-tech")[0],this.h5Player.hasAttribute("autoplay")&&this.controller.setSetting("adWillAutoPlay",!0),this.onVolumeChange(),this.vjsPlayer.on("fullscreenchange",this.onFullscreenChange.bind(this)),this.vjsPlayer.on("volumechange",this.onVolumeChange.bind(this)),this.controller.onPlayerReady()},pe.prototype.onFullscreenChange=function(){this.vjsPlayer.isFullscreen()?this.controller.onPlayerEnterFullscreen():this.controller.onPlayerExitFullscreen()},pe.prototype.onVolumeChange=function(){var e=this.vjsPlayer.muted()?0:this.vjsPlayer.volume();this.controller.onPlayerVolumeChanged(e)},pe.prototype.injectAdContainerDiv=function(e){this.vjsControls.el().parentNode.appendChild(e)},pe.prototype.getContentPlayer=function(){return this.h5Player},pe.prototype.getVolume=function(){return this.vjsPlayer.muted()?0:this.vjsPlayer.volume()},pe.prototype.setVolume=function(e){this.vjsPlayer.volume(e),0==e?this.vjsPlayer.muted(!0):this.vjsPlayer.muted(!1)},pe.prototype.unmute=function(){this.vjsPlayer.muted(!1)},pe.prototype.mute=function(){this.vjsPlayer.muted(!0)},pe.prototype.play=function(){this.vjsPlayer.play()},pe.prototype.togglePlayback=function(){this.vjsPlayer.paused()?this.vjsPlayer.play():this.vjsPlayer.pause()},pe.prototype.getPlayerWidth=function(){var e=(getComputedStyle(this.vjsPlayer.el())||{}).width;return e&&0!==parseFloat(e)||(e=(this.vjsPlayer.el().getBoundingClientRect()||{}).width),parseFloat(e)||this.vjsPlayer.width()},pe.prototype.getPlayerHeight=function(){var e=(getComputedStyle(this.vjsPlayer.el())||{}).height;return e&&0!==parseFloat(e)||(e=(this.vjsPlayer.el().getBoundingClientRect()||{}).height),parseFloat(e)||this.vjsPlayer.height()},pe.prototype.getPlayerOptions=function(){return this.vjsPlayer.options_},pe.prototype.getPlayerId=function(){return this.vjsPlayer.id()},pe.prototype.toggleFullscreen=function(){this.vjsPlayer.isFullscreen()?this.vjsPlayer.exitFullscreen():this.vjsPlayer.requestFullscreen()},pe.prototype.getContentPlayheadTracker=function(){return this.contentPlayheadTracker},pe.prototype.onAdError=function(e){this.vjsControls.show();var t=void 0!==e.getError?e.getError():e.stack;this.vjsPlayer.trigger({type:"adserror",data:{AdError:t,AdErrorEvent:e}})},pe.prototype.onAdLog=function(e){var t=e.getAdData(),n=void 0!==t.adError?t.adError.getMessage():void 0;this.vjsPlayer.trigger({type:"adslog",data:{AdError:n,AdEvent:e}})},pe.prototype.onAdBreakStart=function(){this.contentSource=this.vjsPlayer.currentSrc(),this.contentSourceType=this.vjsPlayer.currentType(),this.vjsPlayer.off("contentended",this.boundContentEndedListener),this.vjsPlayer.ads.startLinearAdMode(),this.vjsControls.hide(),this.vjsPlayer.pause()},pe.prototype.onAdBreakEnd=function(){this.vjsPlayer.on("contentended",this.boundContentEndedListener),this.vjsPlayer.ads.inAdBreak()&&this.vjsPlayer.ads.endLinearAdMode(),this.vjsControls.show()},pe.prototype.onAdStart=function(){this.vjsPlayer.trigger("ads-ad-started")},pe.prototype.onAllAdsCompleted=function(){1==this.contentComplete&&(this.contentSource&&this.vjsPlayer.currentSrc()!=this.contentSource&&this.vjsPlayer.src({src:this.contentSource,type:this.contentSourceType}),this.controller.onContentAndAdsCompleted())},pe.prototype.onAdsReady=function(){this.vjsPlayer.trigger("adsready")},pe.prototype.changeSource=function(e){this.vjsPlayer.currentSrc()&&(this.vjsPlayer.currentTime(0),this.vjsPlayer.pause()),e&&this.vjsPlayer.src(e),this.vjsPlayer.one("loadedmetadata",this.seekContentToZero.bind(this))},pe.prototype.seekContentToZero=function(){this.vjsPlayer.currentTime(0)},pe.prototype.triggerPlayerEvent=function(e,t){this.vjsPlayer.trigger(e,t)},pe.prototype.addContentEndedListener=function(e){this.contentEndedListeners.push(e)},pe.prototype.reset=function(){this.vjsPlayer.off("contentended",this.boundContentEndedListener),this.vjsPlayer.on("contentended",this.boundContentEndedListener),this.vjsControls.show(),this.vjsPlayer.ads.inAdBreak()&&this.vjsPlayer.ads.endLinearAdMode(),this.contentPlayheadTracker.currentTime=0,this.contentComplete=!1};var fe=function(e){this.controller=e,this.adContainerDiv=document.createElement("div"),this.controlsDiv=document.createElement("div"),this.countdownDiv=document.createElement("div"),this.seekBarDiv=document.createElement("div"),this.progressDiv=document.createElement("div"),this.playPauseDiv=document.createElement("div"),this.muteDiv=document.createElement("div"),this.sliderDiv=document.createElement("div"),this.sliderLevelDiv=document.createElement("div"),this.fullscreenDiv=document.createElement("div"),this.boundOnMouseUp=this.onMouseUp.bind(this),this.boundOnMouseMove=this.onMouseMove.bind(this),this.adPlayheadTracker={currentTime:0,duration:0,isPod:!1,adPosition:0,totalAds:0},this.controlPrefix=this.controller.getPlayerId()+"_",this.showCountdown=!0,!1===this.controller.getSettings().showCountdown&&(this.showCountdown=!1),this.isAdNonlinear=!1,this.createAdContainer()};fe.prototype.createAdContainer=function(){this.assignControlAttributes(this.adContainerDiv,"ima-ad-container"),this.adContainerDiv.style.position="absolute",this.adContainerDiv.style.zIndex=1111,this.adContainerDiv.addEventListener("mouseenter",this.showAdControls.bind(this),!1),this.adContainerDiv.addEventListener("mouseleave",this.hideAdControls.bind(this),!1),this.adContainerDiv.addEventListener("click",this.onAdContainerClick.bind(this),!1),this.createControls(),this.controller.injectAdContainerDiv(this.adContainerDiv)},fe.prototype.createControls=function(){this.assignControlAttributes(this.controlsDiv,"ima-controls-div"),this.controlsDiv.style.width="100%",this.controller.getIsMobile()?this.countdownDiv.style.display="none":(this.assignControlAttributes(this.countdownDiv,"ima-countdown-div"),this.countdownDiv.innerHTML=this.controller.getSettings().adLabel,this.countdownDiv.style.display=this.showCountdown?"block":"none"),this.assignControlAttributes(this.seekBarDiv,"ima-seek-bar-div"),this.seekBarDiv.style.width="100%",this.assignControlAttributes(this.progressDiv,"ima-progress-div"),this.assignControlAttributes(this.playPauseDiv,"ima-play-pause-div"),this.addClass(this.playPauseDiv,"ima-playing"),this.playPauseDiv.addEventListener("click",this.onAdPlayPauseClick.bind(this),!1),this.assignControlAttributes(this.muteDiv,"ima-mute-div"),this.addClass(this.muteDiv,"ima-non-muted"),this.muteDiv.addEventListener("click",this.onAdMuteClick.bind(this),!1),this.assignControlAttributes(this.sliderDiv,"ima-slider-div"),this.sliderDiv.addEventListener("mousedown",this.onAdVolumeSliderMouseDown.bind(this),!1),this.controller.getIsIos()&&(this.sliderDiv.style.display="none"),this.assignControlAttributes(this.sliderLevelDiv,"ima-slider-level-div"),this.assignControlAttributes(this.fullscreenDiv,"ima-fullscreen-div"),this.addClass(this.fullscreenDiv,"ima-non-fullscreen"),this.fullscreenDiv.addEventListener("click",this.onAdFullscreenClick.bind(this),!1),this.adContainerDiv.appendChild(this.controlsDiv),this.controlsDiv.appendChild(this.countdownDiv),this.controlsDiv.appendChild(this.seekBarDiv),this.controlsDiv.appendChild(this.playPauseDiv),this.controlsDiv.appendChild(this.muteDiv),this.controlsDiv.appendChild(this.sliderDiv),this.controlsDiv.appendChild(this.fullscreenDiv),this.seekBarDiv.appendChild(this.progressDiv),this.sliderDiv.appendChild(this.sliderLevelDiv)},fe.prototype.onAdPlayPauseClick=function(){this.controller.onAdPlayPauseClick()},fe.prototype.onAdMuteClick=function(){this.controller.onAdMuteClick()},fe.prototype.onAdFullscreenClick=function(){this.controller.toggleFullscreen()},fe.prototype.onAdsPaused=function(){this.controller.sdkImpl.adPlaying=!1,this.addClass(this.playPauseDiv,"ima-paused"),this.removeClass(this.playPauseDiv,"ima-playing"),this.showAdControls()},fe.prototype.onAdsResumed=function(){this.onAdsPlaying(),this.showAdControls()},fe.prototype.onAdsPlaying=function(){this.controller.sdkImpl.adPlaying=!0,this.addClass(this.playPauseDiv,"ima-playing"),this.removeClass(this.playPauseDiv,"ima-paused")},fe.prototype.updateAdUi=function(e,t,n,r,i){var a=Math.floor(t/60),o=Math.floor(t%60);o.toString().length<2&&(o="0"+o);var s=": ";i>1&&(s=" ("+r+" "+this.controller.getSettings().adLabelNofN+" "+i+"): "),this.countdownDiv.innerHTML=this.controller.getSettings().adLabel+s+a+":"+o;var u=100*(e/n);this.progressDiv.style.width=u+"%"},fe.prototype.unmute=function(){this.addClass(this.muteDiv,"ima-non-muted"),this.removeClass(this.muteDiv,"ima-muted"),this.sliderLevelDiv.style.width=100*this.controller.getPlayerVolume()+"%"},fe.prototype.mute=function(){this.addClass(this.muteDiv,"ima-muted"),this.removeClass(this.muteDiv,"ima-non-muted"),this.sliderLevelDiv.style.width="0%"},fe.prototype.onAdVolumeSliderMouseDown=function(){document.addEventListener("mouseup",this.boundOnMouseUp,!1),document.addEventListener("mousemove",this.boundOnMouseMove,!1)},fe.prototype.onMouseMove=function(e){this.changeVolume(e)},fe.prototype.onMouseUp=function(e){this.changeVolume(e),document.removeEventListener("mouseup",this.boundOnMouseUp),document.removeEventListener("mousemove",this.boundOnMouseMove)},fe.prototype.changeVolume=function(e){var t=(e.clientX-this.sliderDiv.getBoundingClientRect().left)/this.sliderDiv.offsetWidth;t*=100,t=Math.min(Math.max(t,0),100),this.sliderLevelDiv.style.width=t+"%",0==this.percent?(this.addClass(this.muteDiv,"ima-muted"),this.removeClass(this.muteDiv,"ima-non-muted")):(this.addClass(this.muteDiv,"ima-non-muted"),this.removeClass(this.muteDiv,"ima-muted")),this.controller.setVolume(t/100)},fe.prototype.showAdContainer=function(){this.adContainerDiv.style.display="block"},fe.prototype.hideAdContainer=function(){this.adContainerDiv.style.display="none"},fe.prototype.onAdContainerClick=function(){this.isAdNonlinear&&this.controller.togglePlayback()},fe.prototype.reset=function(){this.hideAdContainer()},fe.prototype.onAdError=function(){this.hideAdContainer()},fe.prototype.onAdBreakStart=function(e){this.showAdContainer(),"application/javascript"!==e.getAd().getContentType()||this.controller.getSettings().showControlsForJSAds?this.controlsDiv.style.display="block":this.controlsDiv.style.display="none",this.onAdsPlaying(),this.hideAdControls()},fe.prototype.onAdBreakEnd=function(){var e=this.controller.getCurrentAd();(null==e||e.isLinear())&&this.hideAdContainer(),this.controlsDiv.style.display="none",this.countdownDiv.innerHTML=""},fe.prototype.onAllAdsCompleted=function(){this.hideAdContainer()},fe.prototype.onLinearAdStart=function(){this.removeClass(this.adContainerDiv,"bumpable-ima-ad-container"),this.isAdNonlinear=!1},fe.prototype.onNonLinearAdLoad=function(){this.adContainerDiv.style.display="block",this.addClass(this.adContainerDiv,"bumpable-ima-ad-container"),this.isAdNonlinear=!0},fe.prototype.onPlayerEnterFullscreen=function(){this.addClass(this.fullscreenDiv,"ima-fullscreen"),this.removeClass(this.fullscreenDiv,"ima-non-fullscreen")},fe.prototype.onPlayerExitFullscreen=function(){this.addClass(this.fullscreenDiv,"ima-non-fullscreen"),this.removeClass(this.fullscreenDiv,"ima-fullscreen")},fe.prototype.onPlayerVolumeChanged=function(e){0==e?(this.addClass(this.muteDiv,"ima-muted"),this.removeClass(this.muteDiv,"ima-non-muted"),this.sliderLevelDiv.style.width="0%"):(this.addClass(this.muteDiv,"ima-non-muted"),this.removeClass(this.muteDiv,"ima-muted"),this.sliderLevelDiv.style.width=100*e+"%")},fe.prototype.showAdControls=function(){this.controller.getSettings().disableAdControls||this.addClass(this.controlsDiv,"ima-controls-div-showing")},fe.prototype.hideAdControls=function(){this.removeClass(this.controlsDiv,"ima-controls-div-showing")},fe.prototype.assignControlAttributes=function(e,t){e.id=this.controlPrefix+t,e.className=this.controlPrefix+t+" "+t},fe.prototype.getClassRegexp=function(e){return new RegExp("(^|[^A-Za-z-])"+e+"((?![A-Za-z-])|$)","gi")},fe.prototype.elementHasClass=function(e,t){return this.getClassRegexp(t).test(e.className)},fe.prototype.addClass=function(e,t){e.className=e.className.trim()+" "+t},fe.prototype.removeClass=function(e,t){var n=this.getClassRegexp(t);e.className=e.className.trim().replace(n,"")},fe.prototype.getAdContainerDiv=function(){return this.adContainerDiv},fe.prototype.setShowCountdown=function(e){this.showCountdown=e,this.countdownDiv.style.display=this.showCountdown?"block":"none"};var me="1.11.0",ge="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ve=function(e){this.controller=e,this.adDisplayContainer=null,this.adDisplayContainerInitialized=!1,this.adsLoader=null,this.adsManager=null,this.adsRenderingSettings=null,this.adsResponse=null,this.currentAd=null,this.adTrackingTimer=null,this.allAdsCompleted=!1,this.adsActive=!1,this.adPlaying=!1,this.adMuted=!1,this.adBreakReadyListener=void 0,this.contentCompleteCalled=!1,this.isAdTimedOut=!1,this.adsManagerDimensions={width:0,height:0},this.autoPlayAdBreaks=!0,!1===this.controller.getSettings().autoPlayAdBreaks&&(this.autoPlayAdBreaks=!1),this.controller.getSettings().locale&&google.ima.settings.setLocale(this.controller.getSettings().locale),this.controller.getSettings().disableFlashAds&&google.ima.settings.setDisableFlashAds(this.controller.getSettings().disableFlashAds),this.controller.getSettings().disableCustomPlaybackForIOS10Plus&&google.ima.settings.setDisableCustomPlaybackForIOS10Plus(this.controller.getSettings().disableCustomPlaybackForIOS10Plus),this.controller.getSettings().ppid&&google.ima.settings.setPpid(this.controller.getSettings().ppid),this.controller.getSettings().featureFlags&&google.ima.settings.setFeatureFlags(this.controller.getSettings().featureFlags)};ve.prototype.initAdObjects=function(){this.adDisplayContainer=new google.ima.AdDisplayContainer(this.controller.getAdContainerDiv(),this.controller.getContentPlayer()),this.adsLoader=new google.ima.AdsLoader(this.adDisplayContainer),this.adsLoader.getSettings().setVpaidMode(google.ima.ImaSdkSettings.VpaidMode.ENABLED),0==this.controller.getSettings().vpaidAllowed&&this.adsLoader.getSettings().setVpaidMode(google.ima.ImaSdkSettings.VpaidMode.DISABLED),void 0!==this.controller.getSettings().vpaidMode&&this.adsLoader.getSettings().setVpaidMode(this.controller.getSettings().vpaidMode),this.controller.getSettings().locale&&this.adsLoader.getSettings().setLocale(this.controller.getSettings().locale),this.controller.getSettings().numRedirects&&this.adsLoader.getSettings().setNumRedirects(this.controller.getSettings().numRedirects),this.controller.getSettings().sessionId&&this.adsLoader.getSettings().setSessionId(this.controller.getSettings().sessionId),this.adsLoader.getSettings().setPlayerType("videojs-ima"),this.adsLoader.getSettings().setPlayerVersion(me),this.adsLoader.getSettings().setAutoPlayAdBreaks(this.autoPlayAdBreaks),this.adsLoader.addEventListener(google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,this.onAdsManagerLoaded.bind(this),!1),this.adsLoader.addEventListener(google.ima.AdErrorEvent.Type.AD_ERROR,this.onAdsLoaderError.bind(this),!1),this.controller.playerWrapper.vjsPlayer.trigger({type:"ads-loader",adsLoader:this.adsLoader})},ve.prototype.requestAds=function(){var e=new google.ima.AdsRequest;if(this.controller.getSettings().adTagUrl?e.adTagUrl=this.controller.getSettings().adTagUrl:e.adsResponse=this.controller.getSettings().adsResponse,this.controller.getSettings().forceNonLinearFullSlot&&(e.forceNonLinearFullSlot=!0),this.controller.getSettings().vastLoadTimeout&&(e.vastLoadTimeout=this.controller.getSettings().vastLoadTimeout),this.controller.getSettings().omidMode){e.omidAccessModeRules={};var t=this.controller.getSettings().omidMode;t.FULL&&(e.omidAccessModeRules[google.ima.OmidAccessMode.FULL]=t.FULL),t.DOMAIN&&(e.omidAccessModeRules[google.ima.OmidAccessMode.DOMAIN]=t.DOMAIN),t.LIMITED&&(e.omidAccessModeRules[google.ima.OmidAccessMode.LIMITED]=t.LIMITED)}e.linearAdSlotWidth=this.controller.getPlayerWidth(),e.linearAdSlotHeight=this.controller.getPlayerHeight(),e.nonLinearAdSlotWidth=this.controller.getSettings().nonLinearWidth||this.controller.getPlayerWidth(),e.nonLinearAdSlotHeight=this.controller.getSettings().nonLinearHeight||this.controller.getPlayerHeight(),e.setAdWillAutoPlay(this.controller.adsWillAutoplay()),e.setAdWillPlayMuted(this.controller.adsWillPlayMuted());var n=this.controller.getSettings().adsRequest;n&&"object"===("undefined"===typeof n?"undefined":ge(n))&&Object.keys(n).forEach((function(t){e[t]=n[t]})),this.adsLoader.requestAds(e),this.controller.playerWrapper.vjsPlayer.trigger({type:"ads-request",AdsRequest:e})},ve.prototype.onAdsManagerLoaded=function(e){this.createAdsRenderingSettings(),this.adsManager=e.getAdsManager(this.controller.getContentPlayheadTracker(),this.adsRenderingSettings),this.adsManager.addEventListener(google.ima.AdErrorEvent.Type.AD_ERROR,this.onAdError.bind(this)),this.adsManager.addEventListener(google.ima.AdEvent.Type.AD_BREAK_READY,this.onAdBreakReady.bind(this)),this.adsManager.addEventListener(google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED,this.onContentPauseRequested.bind(this)),this.adsManager.addEventListener(google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED,this.onContentResumeRequested.bind(this)),this.adsManager.addEventListener(google.ima.AdEvent.Type.ALL_ADS_COMPLETED,this.onAllAdsCompleted.bind(this)),this.adsManager.addEventListener(google.ima.AdEvent.Type.LOADED,this.onAdLoaded.bind(this)),this.adsManager.addEventListener(google.ima.AdEvent.Type.STARTED,this.onAdStarted.bind(this)),this.adsManager.addEventListener(google.ima.AdEvent.Type.COMPLETE,this.onAdComplete.bind(this)),this.adsManager.addEventListener(google.ima.AdEvent.Type.SKIPPED,this.onAdComplete.bind(this)),this.adsManager.addEventListener(google.ima.AdEvent.Type.LOG,this.onAdLog.bind(this)),this.adsManager.addEventListener(google.ima.AdEvent.Type.PAUSED,this.onAdPaused.bind(this)),this.adsManager.addEventListener(google.ima.AdEvent.Type.RESUMED,this.onAdResumed.bind(this)),this.controller.playerWrapper.vjsPlayer.trigger({type:"ads-manager",adsManager:this.adsManager}),this.autoPlayAdBreaks||this.initAdsManager();var t=this.controller.getSettings().preventLateAdStart;t?t&&!this.isAdTimedOut&&this.controller.onAdsReady():this.controller.onAdsReady(),this.controller.getSettings().adsManagerLoadedCallback&&this.controller.getSettings().adsManagerLoadedCallback()},ve.prototype.onAdsLoaderError=function(e){window.console.warn("AdsLoader error: "+e.getError()),this.controller.onErrorLoadingAds(e),this.adsManager&&this.adsManager.destroy()},ve.prototype.initAdsManager=function(){try{var e=this.controller.getPlayerWidth(),t=this.controller.getPlayerHeight();this.adsManagerDimensions.width=e,this.adsManagerDimensions.height=t,this.adsManager.init(e,t,google.ima.ViewMode.NORMAL),this.adsManager.setVolume(this.controller.getPlayerVolume()),this.initializeAdDisplayContainer()}catch(n){this.onAdError(n)}},ve.prototype.createAdsRenderingSettings=function(){if(this.adsRenderingSettings=new google.ima.AdsRenderingSettings,this.adsRenderingSettings.restoreCustomPlaybackStateOnAdBreakComplete=!0,this.controller.getSettings().adsRenderingSettings)for(var e in this.controller.getSettings().adsRenderingSettings)""!==e&&(this.adsRenderingSettings[e]=this.controller.getSettings().adsRenderingSettings[e])},ve.prototype.onAdError=function(e){var t=void 0!==e.getError?e.getError():e.stack;window.console.warn("Ad error: "+t),this.adsManager.destroy(),this.controller.onAdError(e),this.adsActive=!1,this.adPlaying=!1},ve.prototype.onAdBreakReady=function(e){this.adBreakReadyListener(e)},ve.prototype.onContentPauseRequested=function(e){this.adsActive=!0,this.adPlaying=!0,this.controller.onAdBreakStart(e)},ve.prototype.onContentResumeRequested=function(e){this.adsActive=!1,this.adPlaying=!1,this.controller.onAdBreakEnd()},ve.prototype.onAllAdsCompleted=function(e){this.allAdsCompleted=!0,this.controller.onAllAdsCompleted()},ve.prototype.onAdLoaded=function(e){e.getAd().isLinear()||(this.controller.onNonLinearAdLoad(),this.controller.playContent())},ve.prototype.onAdStarted=function(e){this.currentAd=e.getAd(),this.currentAd.isLinear()?(this.adTrackingTimer=setInterval(this.onAdPlayheadTrackerInterval.bind(this),250),this.controller.onLinearAdStart()):this.controller.onNonLinearAdStart()},ve.prototype.onAdPaused=function(){this.controller.onAdsPaused()},ve.prototype.onAdResumed=function(e){this.controller.onAdsResumed()},ve.prototype.onAdComplete=function(){this.currentAd.isLinear()&&clearInterval(this.adTrackingTimer)},ve.prototype.onAdLog=function(e){this.controller.onAdLog(e)},ve.prototype.onAdPlayheadTrackerInterval=function(){if(null!==this.adsManager){var e=this.adsManager.getRemainingTime(),t=this.currentAd.getDuration(),n=t-e;n=n>0?n:0;var r=0,i=void 0;this.currentAd.getAdPodInfo()&&(i=this.currentAd.getAdPodInfo().getAdPosition(),r=this.currentAd.getAdPodInfo().getTotalAds()),this.controller.onAdPlayheadUpdated(n,e,t,i,r)}},ve.prototype.onContentComplete=function(){this.adsLoader&&(this.adsLoader.contentComplete(),this.contentCompleteCalled=!0),(this.adsManager&&this.adsManager.getCuePoints()&&!this.adsManager.getCuePoints().includes(-1)||!this.adsManager)&&this.controller.onNoPostroll(),this.allAdsCompleted&&this.controller.onContentAndAdsCompleted()},ve.prototype.onPlayerDisposed=function(){this.adTrackingTimer&&clearInterval(this.adTrackingTimer),this.adsManager&&(this.adsManager.destroy(),this.adsManager=null)},ve.prototype.onPlayerReadyForPreroll=function(){if(this.autoPlayAdBreaks){this.initAdsManager();try{this.controller.showAdContainer(),this.adsManager.setVolume(this.controller.getPlayerVolume()),this.adsManager.start()}catch(e){this.onAdError(e)}}},ve.prototype.onAdTimeout=function(){this.isAdTimedOut=!0},ve.prototype.onPlayerReady=function(){this.initAdObjects(),(this.controller.getSettings().adTagUrl||this.controller.getSettings().adsResponse)&&"onLoad"===this.controller.getSettings().requestMode&&this.requestAds()},ve.prototype.onPlayerEnterFullscreen=function(){this.adsManager&&this.adsManager.resize(window.screen.width,window.screen.height,google.ima.ViewMode.FULLSCREEN)},ve.prototype.onPlayerExitFullscreen=function(){this.adsManager&&this.adsManager.resize(this.controller.getPlayerWidth(),this.controller.getPlayerHeight(),google.ima.ViewMode.NORMAL)},ve.prototype.onPlayerVolumeChanged=function(e){this.adsManager&&this.adsManager.setVolume(e),this.adMuted=0==e},ve.prototype.onPlayerResize=function(e,t){this.adsManager&&(this.adsManagerDimensions.width=e,this.adsManagerDimensions.height=t,this.adsManager.resize(e,t,google.ima.ViewMode.NORMAL))},ve.prototype.getCurrentAd=function(){return this.currentAd},ve.prototype.setAdBreakReadyListener=function(e){this.adBreakReadyListener=e},ve.prototype.isAdPlaying=function(){return this.adPlaying},ve.prototype.isAdMuted=function(){return this.adMuted},ve.prototype.pauseAds=function(){this.adsManager.pause(),this.adPlaying=!1},ve.prototype.resumeAds=function(){this.adsManager.resume(),this.adPlaying=!0},ve.prototype.unmute=function(){this.adsManager.setVolume(1),this.adMuted=!1},ve.prototype.mute=function(){this.adsManager.setVolume(0),this.adMuted=!0},ve.prototype.setVolume=function(e){this.adsManager.setVolume(e),this.adMuted=0==e},ve.prototype.initializeAdDisplayContainer=function(){this.adDisplayContainer&&(this.adDisplayContainerInitialized||(this.adDisplayContainer.initialize(),this.adDisplayContainerInitialized=!0))},ve.prototype.playAdBreak=function(){this.autoPlayAdBreaks||(this.controller.showAdContainer(),this.adsManager.setVolume(this.controller.getPlayerVolume()),this.adsManager.start())},ve.prototype.addEventListener=function(e,t){this.adsManager&&this.adsManager.addEventListener(e,t)},ve.prototype.getAdsManager=function(){return this.adsManager},ve.prototype.reset=function(){this.adsActive=!1,this.adPlaying=!1,this.adTrackingTimer&&clearInterval(this.adTrackingTimer),this.adsManager&&(this.adsManager.destroy(),this.adsManager=null),this.adsLoader&&!this.contentCompleteCalled&&this.adsLoader.contentComplete(),this.contentCompleteCalled=!1,this.allAdsCompleted=!1};var ye=function(e,t){this.settings={},this.contentAndAdsEndedListeners=[],this.isMobile=navigator.userAgent.match(/iPhone/i)||navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/Android/i),this.isIos=navigator.userAgent.match(/iPhone/i)||navigator.userAgent.match(/iPad/i),this.initWithSettings(t);var n={debug:this.settings.debug,timeout:this.settings.timeout,prerollTimeout:this.settings.prerollTimeout},r=this.extend({},n,t.contribAdsSettings||{});this.playerWrapper=new pe(e,r,this),this.adUi=new fe(this),this.sdkImpl=new ve(this)};ye.IMA_DEFAULTS={adLabel:"Advertisement",adLabelNofN:"of",debug:!1,disableAdControls:!1,prerollTimeout:1e3,preventLateAdStart:!1,requestMode:"onLoad",showControlsForJSAds:!0,timeout:5e3},ye.prototype.initWithSettings=function(e){this.settings=this.extend({},ye.IMA_DEFAULTS,e||{}),this.warnAboutDeprecatedSettings(),this.showCountdown=!0,!1===this.settings.showCountdown&&(this.showCountdown=!1)},ye.prototype.warnAboutDeprecatedSettings=function(){var e=this;["adWillAutoplay","adsWillAutoplay","adWillPlayMuted","adsWillPlayMuted"].forEach((function(t){void 0!==e.settings[t]&&console.warn("WARNING: videojs.ima setting "+t+" is deprecated")}))},ye.prototype.getSettings=function(){return this.settings},ye.prototype.getIsMobile=function(){return this.isMobile},ye.prototype.getIsIos=function(){return this.isIos},ye.prototype.injectAdContainerDiv=function(e){this.playerWrapper.injectAdContainerDiv(e)},ye.prototype.getAdContainerDiv=function(){return this.adUi.getAdContainerDiv()},ye.prototype.getContentPlayer=function(){return this.playerWrapper.getContentPlayer()},ye.prototype.getContentPlayheadTracker=function(){return this.playerWrapper.getContentPlayheadTracker()},ye.prototype.requestAds=function(){this.sdkImpl.requestAds()},ye.prototype.setSetting=function(e,t){this.settings[e]=t},ye.prototype.onErrorLoadingAds=function(e){this.adUi.onAdError(),this.playerWrapper.onAdError(e)},ye.prototype.onAdPlayPauseClick=function(){this.sdkImpl.isAdPlaying()?(this.adUi.onAdsPaused(),this.sdkImpl.pauseAds()):(this.adUi.onAdsPlaying(),this.sdkImpl.resumeAds())},ye.prototype.onAdMuteClick=function(){this.sdkImpl.isAdMuted()?(this.playerWrapper.unmute(),this.adUi.unmute(),this.sdkImpl.unmute()):(this.playerWrapper.mute(),this.adUi.mute(),this.sdkImpl.mute())},ye.prototype.setVolume=function(e){this.playerWrapper.setVolume(e),this.sdkImpl.setVolume(e)},ye.prototype.getPlayerVolume=function(){return this.playerWrapper.getVolume()},ye.prototype.toggleFullscreen=function(){this.playerWrapper.toggleFullscreen()},ye.prototype.onAdError=function(e){this.adUi.onAdError(),this.playerWrapper.onAdError(e)},ye.prototype.onAdBreakStart=function(e){this.playerWrapper.onAdBreakStart(),this.adUi.onAdBreakStart(e)},ye.prototype.showAdContainer=function(){this.adUi.showAdContainer()},ye.prototype.onAdBreakEnd=function(){this.playerWrapper.onAdBreakEnd(),this.adUi.onAdBreakEnd()},ye.prototype.onAllAdsCompleted=function(){this.adUi.onAllAdsCompleted(),this.playerWrapper.onAllAdsCompleted()},ye.prototype.onAdsPaused=function(){this.adUi.onAdsPaused()},ye.prototype.onAdsResumed=function(){this.adUi.onAdsResumed()},ye.prototype.onAdPlayheadUpdated=function(e,t,n,r,i){this.adUi.updateAdUi(e,t,n,r,i)},ye.prototype.onAdLog=function(e){this.playerWrapper.onAdLog(e)},ye.prototype.getCurrentAd=function(){return this.sdkImpl.getCurrentAd()},ye.prototype.playContent=function(){this.playerWrapper.play()},ye.prototype.onLinearAdStart=function(){this.adUi.onLinearAdStart(),this.playerWrapper.onAdStart()},ye.prototype.onNonLinearAdLoad=function(){this.adUi.onNonLinearAdLoad()},ye.prototype.onNonLinearAdStart=function(){this.adUi.onNonLinearAdLoad(),this.playerWrapper.onAdStart()},ye.prototype.getPlayerWidth=function(){return this.playerWrapper.getPlayerWidth()},ye.prototype.getPlayerHeight=function(){return this.playerWrapper.getPlayerHeight()},ye.prototype.onAdsReady=function(){this.playerWrapper.onAdsReady()},ye.prototype.onPlayerResize=function(e,t){this.sdkImpl.onPlayerResize(e,t)},ye.prototype.onContentComplete=function(){this.sdkImpl.onContentComplete()},ye.prototype.onNoPostroll=function(){this.playerWrapper.onNoPostroll()},ye.prototype.onContentAndAdsCompleted=function(){for(var e in this.contentAndAdsEndedListeners)"function"===typeof this.contentAndAdsEndedListeners[e]&&this.contentAndAdsEndedListeners[e]()},ye.prototype.onPlayerDisposed=function(){this.contentAndAdsEndedListeners=[],this.sdkImpl.onPlayerDisposed()},ye.prototype.onPlayerReadyForPreroll=function(){this.sdkImpl.onPlayerReadyForPreroll()},ye.prototype.onAdTimeout=function(){this.sdkImpl.onAdTimeout()},ye.prototype.onPlayerReady=function(){this.sdkImpl.onPlayerReady()},ye.prototype.onPlayerEnterFullscreen=function(){this.adUi.onPlayerEnterFullscreen(),this.sdkImpl.onPlayerEnterFullscreen()},ye.prototype.onPlayerExitFullscreen=function(){this.adUi.onPlayerExitFullscreen(),this.sdkImpl.onPlayerExitFullscreen()},ye.prototype.onPlayerVolumeChanged=function(e){this.adUi.onPlayerVolumeChanged(e),this.sdkImpl.onPlayerVolumeChanged(e)},ye.prototype.setContentWithAdTag=function(e,t){this.reset(),this.settings.adTagUrl=t||this.settings.adTagUrl,this.playerWrapper.changeSource(e)},ye.prototype.setContentWithAdsResponse=function(e,t){this.reset(),this.settings.adsResponse=t||this.settings.adsResponse,this.playerWrapper.changeSource(e)},ye.prototype.setContentWithAdsRequest=function(e,t){this.reset(),this.settings.adsRequest=t||this.settings.adsRequest,this.playerWrapper.changeSource(e)},ye.prototype.reset=function(){this.sdkImpl.reset(),this.playerWrapper.reset(),this.adUi.reset()},ye.prototype.addContentEndedListener=function(e){this.playerWrapper.addContentEndedListener(e)},ye.prototype.addContentAndAdsEndedListener=function(e){this.contentAndAdsEndedListeners.push(e)},ye.prototype.setAdBreakReadyListener=function(e){this.sdkImpl.setAdBreakReadyListener(e)},ye.prototype.setShowCountdown=function(e){this.adUi.setShowCountdown(e),this.showCountdown=e,this.adUi.countdownDiv.style.display=this.showCountdown?"block":"none"},ye.prototype.initializeAdDisplayContainer=function(){this.sdkImpl.initializeAdDisplayContainer()},ye.prototype.playAdBreak=function(){this.sdkImpl.playAdBreak()},ye.prototype.addEventListener=function(e,t){this.sdkImpl.addEventListener(e,t)},ye.prototype.getAdsManager=function(){return this.sdkImpl.getAdsManager()},ye.prototype.getPlayerId=function(){return this.playerWrapper.getPlayerId()},ye.prototype.changeAdTag=function(e){this.reset(),this.settings.adTagUrl=e},ye.prototype.pauseAd=function(){this.adUi.onAdsPaused(),this.sdkImpl.pauseAds()},ye.prototype.resumeAd=function(){this.adUi.onAdsPlaying(),this.sdkImpl.resumeAds()},ye.prototype.togglePlayback=function(){this.playerWrapper.togglePlayback()},ye.prototype.adsWillAutoplay=function(){return void 0!==this.settings.adsWillAutoplay?this.settings.adsWillAutoplay:void 0!==this.settings.adWillAutoplay?this.settings.adWillAutoplay:!!this.playerWrapper.getPlayerOptions().autoplay},ye.prototype.adsWillPlayMuted=function(){return void 0!==this.settings.adsWillPlayMuted?this.settings.adsWillPlayMuted:void 0!==this.settings.adWillPlayMuted?this.settings.adWillPlayMuted:void 0!==this.playerWrapper.getPlayerOptions().muted?this.playerWrapper.getPlayerOptions().muted:0==this.playerWrapper.getVolume()},ye.prototype.triggerPlayerEvent=function(e,t){this.playerWrapper.triggerPlayerEvent(e,t)},ye.prototype.extend=function(e){for(var t=void 0,n=void 0,r=void 0,i=arguments.length,a=Array(i>1?i-1:0),o=1;o<i;o++)a[o-1]=arguments[o];for(n=0;n<a.length;n++)for(r in t=a[n])t.hasOwnProperty(r)&&(e[r]=t[r]);return e};var be=function(e,t){this.controller=new ye(e,t),this.addContentAndAdsEndedListener=function(e){this.controller.addContentAndAdsEndedListener(e)}.bind(this),this.addContentEndedListener=function(e){this.controller.addContentEndedListener(e)}.bind(this),this.addEventListener=function(e,t){this.controller.addEventListener(e,t)}.bind(this),this.changeAdTag=function(e){this.controller.changeAdTag(e)}.bind(this),this.getAdsManager=function(){return this.controller.getAdsManager()}.bind(this),this.initializeAdDisplayContainer=function(){this.controller.initializeAdDisplayContainer()}.bind(this),this.pauseAd=function(){this.controller.pauseAd()}.bind(this),this.playAdBreak=function(){this.controller.playAdBreak()}.bind(this),this.requestAds=function(){this.controller.requestAds()}.bind(this),this.resumeAd=function(){this.controller.resumeAd()}.bind(this),this.setAdBreakReadyListener=function(e){this.controller.setAdBreakReadyListener(e)}.bind(this),this.setContentWithAdTag=function(e,t){this.controller.setContentWithAdTag(e,t)}.bind(this),this.setContentWithAdsResponse=function(e,t){this.controller.setContentWithAdsResponse(e,t)}.bind(this),this.setContentWithAdsRequest=function(e,t){this.controller.setContentWithAdsRequest(e,t)}.bind(this),this.setShowCountdown=function(e){this.controller.setShowCountdown(e)}.bind(this)};(E.a.registerPlugin||E.a.plugin)("ima",(function(e){this.ima=new be(this,e)}));n("S8w2"),n("1s47"),n("BWZk");var _e=h.a.createElement,Te=function(e){return _e("svg",{xmlns:"http://www.w3.org/2000/svg",width:e.width,height:e.height,viewBox:"0 0 108 43"},_e("g",{fill:"none"},_e("polygon",{fill:"#FFFFFF",stroke:"#000000",strokeWidth:".5",points:"41.553 41.966 .401 41.98 .387 .702 41.539 .688"}),_e("path",{fill:"#A4A1A1",d:"M0.642195122,41.6957015 C0.755059846,41.6946348 0.86755533,41.6933015 0.980420054,41.6933015 C14.2966113,41.6885015 27.6124334,41.6834348 40.9288708,41.6782348 C41.050105,41.6781015 41.1712161,41.6701015 41.2926965,41.6654348 L41.3054968,41.7373015 C27.8296703,41.7422348 14.352736,41.7471682 0.876540199,41.7483682 C0.800353433,41.7482348 0.699919828,41.8137015 0.642195122,41.6957015"}),_e("path",{fill:"#8E8A8B",d:"M107.116462,37.321642 L107.065261,37.3226296 C106.976274,37.2231235 106.980951,37.0980617 106.980582,36.9769506 C106.978489,35.5332469 106.977012,34.0904074 106.979228,32.6470741 C106.97972,32.5350988 106.971104,32.418679 107.051968,32.3237407 L107.114739,32.3081852 C107.114862,33.9795432 107.116093,35.6507778 107.116462,37.321642"}),_e("path",{fill:"#FFFFFF",d:"M107.051722,32.3238642 C107.055414,32.4364568 107.062307,32.5491728 107.061938,32.661642 C107.063538,34.2154691 107.064645,35.7690494 107.065261,37.3223827 C106.972458,37.3562099 106.876086,37.340037 106.781807,37.3395432 C101.974902,37.3425062 97.1688584,37.3437407 92.3620766,37.3452222 L92.2581967,37.3452222 C92.0325903,37.343 92.0328365,37.3425062 92.0301287,37.1162099 L92.0303749,37.0125062 C92.0266825,26.655963 92.0231131,16.3004074 92.0208977,5.94411111 C92.0207746,5.57250617 91.96465,5.61312346 92.3512455,5.61275309 C93.9045201,5.61090123 95.4575486,5.61114815 97.0104539,5.61051312 C97.0798713,5.61051312 97.1487963,5.61275309 97.2184598,5.61051312 C97.296862,5.60867901 97.3250474,5.6467037 97.322832,5.72188889 C97.3195088,5.80028395 97.3223397,5.87830864 97.3222166,5.95682716 C97.3251705,14.6334938 97.3283706,23.3097901 97.3310784,31.985716 C97.3312014,32.3199136 97.3309553,32.3204074 97.6562568,32.320284 C100.69265,32.3192963 103.729167,32.3179383 106.765806,32.3171975 C106.860824,32.3175679 106.956335,32.321642 107.051722,32.3238642 M59.587736,21.4355926 C59.586136,16.2483086 59.5841667,11.0606543 59.5833051,5.87374074 C59.5829359,5.49201235 59.5417039,5.54225926 59.9158683,5.54151852 C61.5124673,5.53954321 63.1086969,5.54016049 64.7054189,5.53892593 C64.7657283,5.5392963 64.8275147,5.5421358 64.8875779,5.5384321 C64.9834575,5.53312346 65.0355206,5.56732099 65.0292435,5.67188889 C65.0253049,5.73201235 65.028628,5.79361728 65.0287511,5.85448148 C65.0321974,16.2371975 65.0357667,26.6211481 65.0385976,37.0041111 C65.0384745,37.3597901 65.0842604,37.3238642 64.7204347,37.3239877 C63.124082,37.3255926 61.5276061,37.3263333 59.930638,37.3252222 C59.552535,37.3249753 59.5937669,37.3722593 59.5931515,36.9975679 C59.590813,31.8104074 59.589336,26.623 59.587736,21.4355926 M82.5173679,23.3363333 C82.4949673,24.335716 82.4346579,25.3349753 82.3241317,26.3290494 C82.1754505,27.6597901 81.9744603,28.9809012 81.5008469,30.2433704 C81.3051491,30.765963 81.0589883,31.2631235 80.709563,31.7011481 C80.2742276,32.2478148 79.7375971,32.634358 79.031731,32.7504074 C78.0925045,32.9049753 77.2839894,32.6536173 76.6154167,31.9718889 C76.1890662,31.5376914 75.8995811,31.0146049 75.6696669,30.4575679 C75.3364883,29.6510247 75.1353749,28.8083086 74.9874322,27.9512716 C74.6930239,26.241642 74.5847132,24.5167037 74.5581278,22.784358 C74.5511122,22.3413951 74.5561585,21.8980617 74.5560355,21.4546049 C74.5479121,20.0976914 74.5666204,18.7407778 74.682439,17.3888025 C74.8031809,15.9762099 74.9766012,14.571642 75.3982746,13.2110247 C75.6125576,12.5190494 75.8876423,11.8555926 76.3322087,11.2763333 C76.7277891,10.7601605 77.2130951,10.3701605 77.8596364,10.2158395 C78.8812037,9.97238272 79.7623363,10.2260864 80.4919569,10.9805309 C80.9585547,11.4626296 81.2564092,12.0512716 81.4928467,12.6723827 C81.8315639,13.5612716 82.0288618,14.4860864 82.1686811,15.4238642 C82.5601999,18.0485556 82.5766926,20.6915185 82.5173679,23.3363333 M87.8492107,21.8254691 C87.8455183,19.7555926 87.7645314,18.0453457 87.5402789,16.343 C87.3807667,15.1267037 87.1504833,13.925716 86.8013042,12.7489259 C86.3960005,11.3847284 85.8484158,10.0858395 85.0259925,8.91571605 C84.2688019,7.83793827 83.3292062,6.96806173 82.1386495,6.38732099 C81.1761608,5.9175679 80.1552089,5.67991358 79.0877326,5.63016049 C78.2445088,5.59090123 77.4075621,5.63053086 76.5800926,5.81509877 C74.7881651,6.21534568 73.361171,7.17954321 72.2545551,8.63658025 C71.4373013,9.71225926 70.8740854,10.9189259 70.4501965,12.1963333 C69.7524537,14.2984321 69.4581685,16.4723827 69.3147798,18.6731235 C69.2453625,19.7406543 69.2367468,20.8105309 69.2419162,21.8806543 C69.2500395,23.3785556 69.3299187,24.8706543 69.5122008,26.3578148 C69.6676513,27.6276914 69.8984271,28.8818889 70.2546217,30.1112716 C70.6305093,31.4099136 71.1367389,32.653 71.8813753,33.7870741 C72.7149989,35.055716 73.7790289,36.0658395 75.1775915,36.6871975 C76.0731244,37.0848519 77.0146895,37.288679 77.9934248,37.3349753 C78.9160355,37.3784321 79.829292,37.3249753 80.7265481,37.0954691 C82.4603817,36.6542346 83.8273126,35.6726296 84.8870348,34.2420123 C85.7546285,33.0699136 86.3291678,31.7548519 86.7536721,30.3680617 C87.3194727,28.5225062 87.592465,26.6239877 87.7358537,24.7044815 C87.8153636,23.6281852 87.8569648,22.5501605 87.8492107,21.8254691"}),_e("path",{fill:"#000000",d:"M26.047343,21.2081852 C26.0953444,21.3353457 26.0629743,21.465963 26.0627281,21.5947284 C26.0660513,24.7610247 26.0664205,27.927321 26.0678975,31.0937407 C26.0678975,31.400037 26.0678975,31.400037 25.7707814,31.400284 C22.5789374,31.4009012 19.3874627,31.4018889 16.1962342,31.4033704 L16.0917389,31.4032469 C15.8925949,31.404358 15.8935795,31.420037 15.8932103,31.2062099 C15.8923487,27.9006543 15.8905025,24.5947284 15.8891486,21.2889259 L15.9015797,21.2123827 C15.9995517,21.1174444 16.1258322,21.1309012 16.2453433,21.1309012 C19.397063,21.1276914 22.5492751,21.1263333 25.701364,21.1271975 C25.8218598,21.127321 25.9458017,21.1226296 26.047343,21.2081852"}),_e("path",{fill:"#B41400",d:"M26.047343,21.2081852 L15.9015797,21.2123827 C15.897395,21.1258395 15.8905025,21.0392963 15.8903794,20.9526296 C15.888287,17.7853457 15.8876716,14.6184321 15.8864408,11.451642 L15.8858254,11.3212716 C15.8677326,11.1796667 15.935673,11.1342346 16.0660151,11.1483086 L16.1962342,11.1490494 C19.3793394,11.1483086 22.5623216,11.1464568 25.7461653,11.1462099 C26.0777439,11.1469506 26.0578049,11.0995432 26.0576818,11.4475679 C26.0586664,14.6148519 26.0602665,17.7818889 26.0605126,20.9485556 C26.0603896,21.0355926 26.0517739,21.1221358 26.047343,21.2081852"})))},Se=d.createElement;var we=function(e){return Se("svg",Object(r.a)({id:"prefix__Layer_1",xmlns:"http://www.w3.org/2000/svg",x:0,y:0,viewBox:"0 0 498.5 164.7",xmlSpace:"preserve"},e),Se("style",null,".prefix__st1{fill:#262626}.prefix__st2{fill:#fff}.prefix__st3{fill:#fff000}"),Se("path",{fill:"#b60028",d:"M0 0h498.5v164.7H0z"}),Se("path",{className:"prefix__st1",d:"M198.2 75.3c34.6 0 53.3 14.4 53.3 43.2 0 29.5-18.8 46.3-53.3 46.3-34.7 0-53.2-16.7-53.2-46.3 0-28.8 18.4-43.2 53.2-43.2zm0 64.8c8.1 0 9.2-9.2 9.2-21.7 0-10.2-1.2-18.6-9.2-18.6s-9 8.4-9 18.6c-.1 12.5.9 21.7 9 21.7zM302.2 68.2h-41.5V39.7h41.5v28.5zm-41.5 9h41.5v85.5h-41.5V77.2zM395.3 160.5c-9.2 2.9-18.4 4.3-30.8 4.3-34.7 0-53.1-16.7-53.1-46.3 0-28.7 18.4-43.2 53.1-43.2 12.3 0 21.5 1.1 30.1 3.6v25.3c-5.8-2.8-12.2-4.2-18.6-4.3-12.4 0-20.6 6.4-20.6 19.2 0 13.3 8.2 21 20.6 21 6.8.2 13.5-1.6 19.3-5.1v25.5zM441.2 129.9c.7 10.7 10.7 13.1 22.9 13.1 11.4 0 21.6-2 28.1-5.4v22.1c-11 3.4-24.2 4.9-38.7 4.9-34.7 0-53.1-16.7-53.1-46.3 0-28.7 18.4-43.2 53.1-43.2 33.2 0 44.9 20.7 44.9 49.6v5.1l-57.2.1zm21.4-18c0-6.6-1-16.9-10.4-16.9-9.5 0-11.7 10.2-11.2 16.9h21.6zM1 1h56l25.3 97.5h.4L108.3 1h53.4l-50.3 162.8H49.6z"}),Se("path",{className:"prefix__st2",d:"M197.5 73.7c34.6 0 53.3 14.4 53.3 43.2 0 29.5-18.8 46.3-53.3 46.3-34.7 0-53.1-16.7-53.1-46.3-.1-28.8 18.4-43.2 53.1-43.2zm0 64.8c8.1 0 9.2-9.2 9.2-21.7 0-10.2-1.1-18.6-9.2-18.6s-9 8.4-9 18.6c-.1 12.5.9 21.7 9 21.7zM301.3 66.6h-41.5V38.1h41.5v28.5zm-41.5 9h41.5v85.5h-41.5V75.6zM394.4 158.9c-9.2 3-18.4 4.3-30.8 4.3-34.7 0-53.1-16.7-53.1-46.3 0-28.7 18.4-43.2 53.1-43.2 12.3 0 21.6 1.2 30.1 3.6v25.3c-5.8-2.8-12.2-4.2-18.6-4.3-12.3 0-20.6 6.4-20.6 19.2 0 13.3 8.2 21 20.6 21 6.8.2 13.4-1.6 19.2-5.1l.1 25.5zM440.3 128.4c.7 10.6 10.7 13.1 22.9 13.1 11.4 0 21.5-2 28.1-5.4v22.2c-11 3.4-24.2 4.9-38.7 4.9-34.7 0-53.1-16.7-53.1-46.3 0-28.7 18.4-43.2 53.1-43.2 33.2 0 44.9 20.7 44.9 49.6v5.1h-57.2zm21.4-18.1c0-6.6-1-16.9-10.4-16.9-9.5 0-11.7 10.2-11.2 16.9h21.6zM0 0h56l25.3 97.5h.4L107.3 0h53.4l-50.3 162.8H48.6z"}),Se("path",{className:"prefix__st3",d:"M174.3 38c1.6.5 3 1.7 3.7 3.2.7 1.3 1 2.7 1 4.2 0 4.7-1.5 9.3-4.3 13-2.3 3.1-5.9 4.9-9.7 4.8h-11.1l5.5-25.9h11.1c1.3.1 2.6.3 3.8.7zm-10.7 3.9L160 58.8h5c2.5 0 4.6-1.3 6.1-3.8.9-1.5 1.5-3.2 1.9-4.9.6-2.6.6-4.6.1-6s-2-2.1-4.5-2.1l-5-.1zM191.2 37.4h6.1l3.6 25.9h-5.8l-.5-5.3H185l-2.9 5.3h-5.6l14.7-25.9zm-3.8 16.1h6.6l-1.1-10.2-5.5 10.2zM209.1 63.3h-5.4l5.5-25.9h5.4zM219.6 37.4h5.4l-4.5 21.2h12.7l-1 4.7h-18.1zM249.5 37.4h6.1l-12.1 16.1-2 9.8h-5.4l2.1-9.8-5.5-16.1h6.3l3 11.3z"}))},ke=d.createElement;var Ce=function(e){return ke("svg",Object(r.a)({id:"prefix__Layer_1","data-name":"Layer 1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 703.47 694.42"},e),ke("defs",null,ke("style",null,".prefix__cls-1{fill:#fff}.prefix__cls-2{fill:#f9fdfe}.prefix__cls-3{fill:#fafdfe}.prefix__cls-4{fill:#f9fcfd}")),ke("path",{className:"prefix__cls-1",d:"M351.12 0h5.46l14.74.55c4.09.22 8.19.33 12.28.66a427 427 0 0144.63 5.84 389.25 389.25 0 0159.48 16.06 381.25 381.25 0 0188.45 45.25 364.24 364.24 0 0171.14 64.25 343.47 343.47 0 0144.54 66.9c.36.7.64 1.44 1.1 2.52h-84.67q-54.13 136.22-108.09 272c-.2.5-.34 1-.49 1.55 0 .08 0 .17.07.26s.08.16.12.24H576c.48-1.26.91-2.35 1.32-3.46l50.88-138.28q10.8-29.42 21.8-58.83c.31-.84.33-1.91 1.43-2.48l52.07 140.66h-49.81c-6.86 20.74-12.89 41.58-19.47 62.6 22.24.17 44 .16 66.1.66L699 480a339.1 339.1 0 01-28.59 51.48 352.31 352.31 0 01-44.81 53.88 368.72 368.72 0 01-57.8 46.47 379.61 379.61 0 01-63.8 33.42 390.12 390.12 0 01-70.42 21.27 353.6 353.6 0 01-35.85 5.56c-11 1.07-22 1.58-33 2.34-1.34 0-2.69-.09-4-.09l-17.83.09c-3.36-.17-6.72-.39-10.09-.52a360.66 360.66 0 01-36.68-3.52 389.39 389.39 0 01-147.22-52.76 366.45 366.45 0 01-77.31-62.87 343.19 343.19 0 01-63.53-95.81c-.25-.56-.44-1.15-.81-2.16l61.47-.54c-.21-.92-.3-1.53-.48-2.12q-8.07-26.36-16.18-52.69c-.79-2.59-1.84-5.1-2.84-7.84H0c17-47.25 34.48-93.91 51.71-140.66l.59.05 74.78 203.16c7.69.6 76.2.31 78.41-.4L96.71 202H14.4c2.38-4.52 4.43-8.56 6.62-12.53a345.17 345.17 0 0139.86-57.61 362.29 362.29 0 0158.22-54.65 376.38 376.38 0 0162.16-37.89 387.34 387.34 0 0177.67-27.88 342.74 342.74 0 0146.17-8.27C315.51 2.11 326 1.41 336.38.56c3 0 5.91 0 8.87-.05 1.96-.07 3.91-.33 5.87-.51zm135.15 476.16V202.23H417a3.39 3.39 0 00-.23.43 3.31 3.31 0 00-.06.55v154.05a2.5 2.5 0 01-.07.54.37.37 0 01-.16.17 2 2 0 01-.42.16l-2.28-3.31q-51.54-75.24-103-150.52a4.64 4.64 0 00-4.42-2.31q-42.48.1-85 0h-2.87c-.64 3.72-.46 272.11.15 274.09h69.23V289.07l.59-.21L413 476.16zm54.92 66.25c-.4-.55-.6-.85-.83-1.13-8.55-10.2-25.57-11.57-36-2.9-11.38 9.47-11.57 25.29-.36 35 6.54 5.64 14.23 7 22.51 5.44A23.93 23.93 0 00543 567.65a20.76 20.76 0 003-11.73h-26v7.94h9.91c1.63 0 3.19-.37 4.85.45a11.44 11.44 0 01-.88 1.24 17.3 17.3 0 01-17.42 5.15 15 15 0 01-.53-29.29 16.87 16.87 0 0116.51 3.83c.6.53 1.18 1.09 1.84 1.7zM274 555.11c.48-.75.94-1.41 1.35-2.11a11.6 11.6 0 001.64-7.84 13 13 0 00-12-10.85c-3.72-.22-7.46-.18-11.19-.25h-3.73v44.46c5.46-.15 10.73-.15 16-.51a13.45 13.45 0 005.37-1.79 12.69 12.69 0 003.78-19.59zm144.42 23.18c.6-4.33.39-42.22-.26-44.24-2.62.14-5.3-.27-8.22.3v17.86h-14.58v-18h-8.63v44a60.56 60.56 0 008.73 0V560.5h14.65v17.78zm31.76-43.92v43.57h8.52v-8c0-2.55-.05-5.09 0-7.64s-.27-5.15.29-8.09l8.35 8c2.77 2.64 5.52 5.29 8.3 7.91s5.17 5.2 8.18 7.8v-43.56h-8.51V550c0 2.55.29 5.16-.32 8.11-8.37-7.98-16.42-15.69-24.84-23.74zm-244.61-.08a4.7 4.7 0 00-.19.88c0 9.27-.21 18.56 0 27.83.17 8.57 6.12 14.85 14.65 16 8.05 1.06 16.07-3.8 18.18-11.2a25 25 0 00.81-6.46c.1-8.37 0-16.74 0-25.11 0-.61-.1-1.22-.15-1.94h-8.59V559.3c0 1.45 0 2.91-.12 4.36a8 8 0 01-15.94.53 17.53 17.53 0 01-.17-3v-27.1h-6.89a12.25 12.25 0 00-1.62.2zm-30.69 29c1.75 0 3 .08 4.26 0a22.49 22.49 0 004.57-.66c7.66-2.21 12.26-9.65 10.6-17a15.26 15.26 0 00-14-11.39c-3.91-.16-7.82-.15-11.72-.19-.7 0-1.4.12-2.14.18v44h8.47zm198.74-22.19c-3.74-7.27-15.91-9.82-22.78-3.29a11.39 11.39 0 00-1.32 15.57 13.55 13.55 0 005.79 4.42c1.68.67 3.47 1.09 5.18 1.69A21.47 21.47 0 01364 561a4.42 4.42 0 012.37 4.82 4.88 4.88 0 01-3.74 3.93 7.08 7.08 0 01-8.66-3.8c-.19-.38-.41-.75-.66-1.22l-8.22 1.09a13.11 13.11 0 005.2 9 16.66 16.66 0 0013.71 3c6.12-1.22 10.5-5.83 11.15-11.55.59-5.28-2.79-10.64-8.38-13.15-1.32-.59-2.77-.9-4.14-1.38a36.49 36.49 0 01-4.58-1.72 3.72 3.72 0 01-2.16-3.8 3.85 3.85 0 012.88-3.6 5.72 5.72 0 013.16-.19 36.66 36.66 0 014.79 2.28zm-59 37.14v-8.08h-7.79a62.48 62.48 0 01-8-.2v-35.9h-8.43v44.19zm10.53-44v44.19h6.7a12.47 12.47 0 001.63-.2v-44zm113.35 44.07v-44h-8.4c-.56 5.59-.31 42.07.3 44z"}),ke("path",{className:"prefix__cls-2",d:"M541.19 542.41l-6.83 4.59c-.66-.61-1.24-1.17-1.84-1.7a16.87 16.87 0 00-16.52-3.84 15 15 0 00.53 29.29A17.3 17.3 0 00534 565.6a11.44 11.44 0 00.88-1.24c-1.66-.82-3.29-.37-4.85-.45s-3.27 0-4.91 0h-5v-7.94h26a20.76 20.76 0 01-3 11.73 23.93 23.93 0 01-16.46 11.12c-8.28 1.61-16 .2-22.51-5.44-11.21-9.66-11-25.48.36-35 10.43-8.67 27.45-7.3 36 2.9.08.28.28.58.68 1.13z"}),ke("path",{className:"prefix__cls-3",d:"M274 555.11l1.22 1.52a12.69 12.69 0 01-3.78 19.59A13.45 13.45 0 01266 578c-5.25.36-10.52.36-16 .51v-44.45h3.73c3.73.07 7.47 0 11.19.25a13 13 0 0112 10.85 11.6 11.6 0 01-1.64 7.84c-.37.7-.83 1.36-1.28 2.11zm-15.25 15a45.66 45.66 0 006.1-.05 5.19 5.19 0 000-10.34 48.7 48.7 0 00-6.06-.05zm-.18-18.77h3a24.46 24.46 0 002.71-.08 4.44 4.44 0 004-4.08 4.24 4.24 0 00-3.58-4.71 41.91 41.91 0 00-5.94-.06 9.51 9.51 0 00-.21 1.43c-.02 2.35-.01 4.7-.01 7.5z"}),ke("path",{className:"prefix__cls-4",d:"M418.39 578.29h-8.28v-17.78h-14.65v17.77a60.56 60.56 0 01-8.73 0v-44h8.63v18h14.55v-17.93c2.92-.57 5.6-.16 8.22-.3.65 2.02.87 39.95.26 44.24z"}),ke("path",{className:"prefix__cls-3",d:"M450.15 534.37c8.42 8 16.47 15.76 24.81 23.75.61-3 .26-5.55.32-8.11s0-5.1 0-7.64v-8h8.51v43.55c-3-2.6-5.51-5.29-8.18-7.8s-5.53-5.27-8.3-7.91l-8.35-8c-.56 2.94-.23 5.53-.29 8.09s0 5.09 0 7.64v8h-8.52zM205.54 534.29a12.25 12.25 0 011.58-.22h6.89v27.1a17.53 17.53 0 00.17 3 8 8 0 0015.94-.53c.13-1.45.11-2.91.12-4.36V534.27h8.59c0 .72.14 1.33.15 1.94 0 8.37.05 16.74 0 25.11a25 25 0 01-.81 6.46C236 575.17 228 580 220 579c-8.53-1.12-14.48-7.4-14.65-16-.18-9.27 0-18.56 0-27.83a4.7 4.7 0 01.19-.88z"}),ke("path",{d:"M174.85 563.32v14.9h-8.47v-44c.74-.06 1.44-.18 2.14-.18 3.9 0 7.81 0 11.72.19a15.26 15.26 0 0114 11.39c1.66 7.33-2.94 14.77-10.6 17a22.49 22.49 0 01-4.57.66c-1.21.12-2.47.04-4.22.04zm.14-8.13h3.38a13.12 13.12 0 002.17-.15 6.57 6.57 0 005.35-6.35 6.35 6.35 0 00-5.16-6.18 47.65 47.65 0 00-5.74-.36z",fill:"#fcfefe"}),ke("path",{className:"prefix__cls-2",d:"M373.62 541.1l-6.92 3.52a36.66 36.66 0 00-4.79-2.28 5.72 5.72 0 00-3.16.19 3.85 3.85 0 00-2.88 3.6 3.72 3.72 0 002.16 3.8 36.49 36.49 0 004.58 1.72c1.37.48 2.82.79 4.14 1.38 5.59 2.51 9 7.87 8.38 13.15-.65 5.72-5 10.33-11.15 11.55a16.66 16.66 0 01-13.71-3 13.11 13.11 0 01-5.2-9l8.22-1.09c.25.47.47.84.66 1.22a7.08 7.08 0 008.66 3.8 4.88 4.88 0 003.74-3.93A4.42 4.42 0 00364 561a21.47 21.47 0 00-3.49-1.47c-1.71-.6-3.5-1-5.18-1.69a13.55 13.55 0 01-5.79-4.42 11.39 11.39 0 011.32-15.57c6.85-6.57 19.02-4.02 22.76 3.25z"}),ke("path",{d:"M314.59 578.24h-24.25v-44.19h8.43V570a62.48 62.48 0 008 .2h7.79z",fill:"#f7fbfd"}),ke("path",{className:"prefix__cls-4",d:"M325.12 534.22h8.33v44a12.47 12.47 0 01-1.63.2h-6.7z"}),ke("path",{d:"M438.47 578.29h-8.1c-.61-2-.86-38.45-.3-44h8.4z",fill:"#f9fcfe"}),ke("path",{className:"prefix__cls-1",d:"M141.57 518.12h412.94v73.41H141.57z"}))},Ee=h.a.createElement,Ae=function(e){return Ee("div",{className:"ion-video-logo"},Ee("svg",{className:"ion-video-svg",width:e.width,height:e.height,viewBox:"0 0 "+e.w+" "+e.h,dangerouslySetInnerHTML:{__html:e.path}}))},xe={IndependentOnline:Te,DailyVoice:we,AfricanNewsAgency:Ce},Pe=function(e){var t=Object(d.useRef)(null),n={},r="",i=40,a=22,o=501,s=222,u=!1;if(e.branding&&e.branding.logo&&(i=e.branding.logo.tw||i,a=e.branding.logo.th||a,o=e.branding.logo.w||o,s=e.branding.logo.h||s),e.branding&&e.branding.logo&&e.branding.logo.path)r=e.branding.logo.path,u=function(){return Ee(Ae,{width:i,height:a,w:o,h:s,path:r})};else if(e.channel&&xe[e.channel]){var l=xe[e.channel];u=function(){return Ee("div",{className:"ion-video-logo"},Ee(l,{width:i,height:a}))}}return Object(d.useEffect)((function(){if(n=Object(E.a)(t.current,e),u){var r=n.controlBar.addChild("Component",{});r.addClass("ion-video-logo"),Object(v.createRoot)(r.contentEl()).render(Ee(u,null))}return n.ima({id:t.current,adLabel:"Video Advertisement",adTagUrl:"https://pubads.g.doubleclick.net/gampad/ads?sz=400x300|640x480&iu=/22491887924/IOL/Video&ciu_szs=300x250,300x600,728x90&impl=s&gdfp_req=1&env=vp&output=xml_vast2&unviewed_position_start=1"}),function(){return n.dispose}}),[]),Ee("div",{"data-vjs-player":!0},Ee("video",{ref:t,className:"video-js ion-video-js vjs-big-play-centered",width:e.width}))},Ie=n("itc3"),Oe=n("TFfH"),Le=n("bS+h"),De=n("azCW"),Me=n.n(De),Re=h.a.createElement,Ne=function(e){Object(l.a)(n,e);var t=Object(c.a)(n);function n(e){var r;return Object(o.a)(this,n),(r=t.call(this,e)).state={photoIndex:0,isOpen:!1},r}return Object(s.a)(n,[{key:"render",value:function(){var e=this,t=this.props.gallery,n=this.props.width||650,r="https://image-prod.iol.co.za/resize/"+n+"x"+100*n+"?source=";return Re("div",{className:"article-gallery"},t.map((function(t,n){return Re(g.Link,{to:"#",onClick:function(){return e.setState({isOpen:!0,photoIndex:n})},key:n},Re(_.ImageOrNoImage,{image:t,width:200,shape:"square",noImage:Me.a,alt:"Gallery image "+n}))})),this.state.isOpen&&Re("div",{id:"lighbox"},Re(Le.a,{mainSrc:r+t[this.state.photoIndex].url,nextSrc:r+t[(this.state.photoIndex+1)%t.length].url,prevSrc:r+t[(this.state.photoIndex+t.length-1)%t.length].url,imageCaption:t[(this.state.photoIndex+t.length)%t.length].caption,onCloseRequest:function(){return e.setState({isOpen:!1})},onMovePrevRequest:function(){return e.setState({photoIndex:(e.state.photoIndex+t.length-1)%t.length})},onMoveNextRequest:function(){return e.setState({photoIndex:(e.state.photoIndex+1)%t.length})}})))}}]),n}(d.Component);Ne.defaultProps={gallery:[]};var je=n("if8a"),Be=n("ZWFX"),Ue=n("I/Cy"),Fe=n.n(Ue);n("k8lO"),n("iQUD"),h.a.createElement;function qe(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var He,ze,We,Ve,Ke,Ge,Xe,Ye,Qe,$e,Ze,Je,et,tt,nt=n("vOnD"),rt=nt.a.div(He||(He=qe(["\n  background: ",";\n  padding: 15px;\n  width: 100%;\n  border: 1px solid #eee;\n  margin-bottom: 15px;\n  ","\n  clear: both;\n  ul, li {\n    list-style-type: none;\n  }\n  ul {\n    padding-left: 20px;\n    margin: 0 !important;\n  }\n  li {\n    &::before {\n      content: '\\2022';\n      color: ",";\n      display: inline-block;\n      width: 1em;\n      margin-left: -1em;\n      vertical-align: top;\n    }\n  }\n  h2, h3 {\n    font-size: ",";\n  }\n  h2 {\n    margin-bottom: 20px;\n    border-bottom: 1px solid #eee;\n    padding-bottom: 11px;\n    span {\n      border-bottom: 1px solid #c01d1f;\n      padding-bottom: 9px;\n      margin-bottom: -10px;\n      position: relative;\n      bottom: -1px;\n    }\n  }\n  article {\n    display: inline-block !important;\n    vertical-align: top;\n    margin-top: 5px;\n    width: 100%;\n    h3 {\n      padding-bottom: 0;\n      margin-bottom: 0;\n      border-bottom: 0 none;\n      text-transform: none;\n      color: #000;\n      ","\n    }\n    a {\n      text-decoration: none;\n    }\n    a:hover {\n      h3 {\n        color: ",";\n      }\n    }\n    p {\n      color: #eee;\n      display: none;\n    }\n  }\n"],["\n  background: ",";\n  padding: 15px;\n  width: 100%;\n  border: 1px solid #eee;\n  margin-bottom: 15px;\n  ","\n  clear: both;\n  ul, li {\n    list-style-type: none;\n  }\n  ul {\n    padding-left: 20px;\n    margin: 0 !important;\n  }\n  li {\n    &::before {\n      content: '\\\\2022';\n      color: ",";\n      display: inline-block;\n      width: 1em;\n      margin-left: -1em;\n      vertical-align: top;\n    }\n  }\n  h2, h3 {\n    font-size: ",";\n  }\n  h2 {\n    margin-bottom: 20px;\n    border-bottom: 1px solid #eee;\n    padding-bottom: 11px;\n    span {\n      border-bottom: 1px solid #c01d1f;\n      padding-bottom: 9px;\n      margin-bottom: -10px;\n      position: relative;\n      bottom: -1px;\n    }\n  }\n  article {\n    display: inline-block !important;\n    vertical-align: top;\n    margin-top: 5px;\n    width: 100%;\n    h3 {\n      padding-bottom: 0;\n      margin-bottom: 0;\n      border-bottom: 0 none;\n      text-transform: none;\n      color: #000;\n      ","\n    }\n    a {\n      text-decoration: none;\n    }\n    a:hover {\n      h3 {\n        color: ",";\n      }\n    }\n    p {\n      color: #eee;\n      display: none;\n    }\n  }\n"])),"#FFF",(function(){return'{ &::after, &::before { content: ""; display: table; clear: both; } }'}),"#B41400","".concat(14/16,"rem"),"\n    -webkit-transition: ".concat(ze="all linear .3s",";\n    -moz-transition: ").concat(ze,";\n    -khtml-transition: ").concat(ze,";\n    -o-transition: ").concat(ze,";\n    transition: ").concat(ze,";\n"),"#B41400"),it=h.a.createElement,at=function(e){var t=e.relatedArticle;e.abstract;return it(rt,null,it("h2",null,it("span",null,"House & Garden Recommends")),it("ul",null,t.map((function(e){return it("li",{key:e.id},it("article",null,it(g.Link,{to:"/"+e.externalUrl},it("h3",null,e.headline))))}))))},ot=nt.a.div(We||(We=qe(["\n    background-color:",";\n    width:100%;\n    padding:15px;\n    margin-bottom: 20px;\n"])),"#F2F2F2"),st=nt.a.div(Ve||(Ve=qe(["\n        padding-left: 15px;\n        width: 100%;\n        h3 {\n            font-size: 16px !important;\n            color: ",";\n            padding-top: 5px;\n            line-height: 22px;\n        }\n        h4 {\n            color:",";\n            font-size: 17px !important;\n            margin-top: 0px !important;\n            text-transform: uppercase;\n        }\n"])),"#000","#B41400"),ut=nt.a.div(Ke||(Ke=qe(["\n        a {\n            display:flex;\n            align-items: flex-start;\n            color:"," !important;\n        }\n\n"])),"#000"),lt=nt.a.div(Ge||(Ge=qe(["\n    background-color:",";\n    padding: 15px;\n    position: relative;\n    article {\n        display: flex;\n    }\n    picture {\n        max-width: 40%;\n        img {\n            margin: 0 !important;\n        }\n    }\n    span {\n        position: relative;\n        right: 0;\n        margin-top: 5px;\n        text-transform: uppercase;\n        float: right;\n        font-size: 13px;\n        font-family: 'Josefin Sans', Arial, Helvetica, sans-serif;\n        line-height: 1;\n    }\n"])),"#FFF"),ct=h.a.createElement,dt=function(e){var t=e.relatedArticle;e.abstract;return ct(ot,null,ct(lt,null,t.map((function(e){return ct(ut,{key:"ra-"+e.uuid},e.externalUrl&&ct(g.Link,{to:"/"+e.externalUrl},ct(_.ImageOrNoImage,{image:{url:e.imageUrl},width:120,alt:"Related Article Image",shape:"square",noImage:Me.a}),ct(st,null,ct("h4",null,e.externalUrl.split("/")[0]),ct("h3",null,e.teaserHeadline),ct("span",null,"Read more"))))}))))},ht=n("OGoB"),pt=nt.a.div(Xe||(Xe=qe(["\n    background-color: ",";\n    padding: 15px;\n    margin: 0 auto;\n    margin-bottom: 20px;\n    @media only screen and (min-width: 1024px) {\n        width: 80%;\n    }\n"])),"#F2F2F2"),ft=nt.a.div(Ye||(Ye=qe(["\n    padding: 15px;\n    background-color: ",";\n    @media only screen and (min-width:1024px) {\n        display: flex;\n    }\n    article {\n        display: flex;\n    }\n"])),"#F6F8FD"),mt=nt.a.div(Qe||(Qe=qe(["\n    width: 100%;\n    margin: 0 auto;\n    @media only screen and (max-width:1023px) {\n        margin-bottom: 10px;\n    }\n    @media only screen and (min-width:1024px) {\n        width: 70%;\n        margin-right: 10px;\n    }\n    img {\n        display: block;\n        max-width: 100%;\n    }\n"]))),gt=nt.a.div($e||($e=qe(["\n    text-align: center;\n    p {\n        margin: 0px;\n        font-size: 24px;\n        line-height: 1.4;\n    }\n    .percentage {\n        font-size: 55px;\n    }\n"]))),vt=nt.a.a(Ze||(Ze=qe(["\n    display: block;\n    width: 200px;\n    height: 50px;\n    margin: 20px auto 0;\n    padding: 12px 0px;\n    text-align: center;\n    background: ",";\n    color: "," !important;\n    box-shadow: 0px 0px 14px 0px ",";\n"])),"#50A7EE","#FFF","#50A7EEB2"),yt=n("xsna"),bt=h.a.createElement,_t=function(e){Object(l.a)(n,e);var t=Object(c.a)(n);function n(e){var r;return Object(o.a)(this,n),(r=t.call(this,e)).props.subscribeBlock||r.props.fetchSubscribeBlock(),console.log(r.props.image),r}return Object(s.a)(n,[{key:"render",value:function(){return bt(pt,null,bt(ft,null,bt(mt,null,bt(g.Link,{to:"/subscriptions"},this.props.image&&bt("img",{src:this.props.image,alt:"magazine cover"}))),bt(gt,null,bt("p",{className:"top-text"},this.props.topText),bt("p",{className:"save-text"},bt("em",null,this.props.saveText)),bt("p",{className:"percentage"},bt("strong",null,bt("em",null,this.props.savePercentage))),bt(vt,{href:this.props.subscribeLink,target:"_blank",rel:"noopener noreferrer"},"Subscribe"))))}}]),n}(d.Component),Tt=Object(f.connect)((function(e){return Object.assign({},e.subscribeBlock.subscribeBlock)}),(function(e){return Object(p.bindActionCreators)({fetchSubscribeBlock:yt.b},e)}))(_t),St=n("35Mb"),wt=n("jBts"),kt=n.n(wt),Ct=n("+/+4"),Et=n.n(Ct),At=n("gMeV"),xt=nt.a.div(Je||(Je=qe(["\n  overflow-x: scroll;\n"]))),Pt=nt.a.div(et||(et=qe(["\n  max-width: 1220px;\n  width: 100%;\n  margin: 40px auto;\n  p{\n    color: ",";\n    font-size:14px;\n    margin: 0;\n  }\n  h5 {\n    font-size: 19px;\n    border-width: 0px 0px 1px;\n    border-style: solid;\n    border-color: #D4D4D4;\n    padding-bottom: 10px;\n    margin: 0;\n    a {\n        color: #B41400 !important;\n      &:hover {\n        color: #000 !important;\n      }\n    }\n  }\n"])),"#707070"),It=nt.a.div(tt||(tt=qe(["\n  display:grid;\n  gap: 40px;\n  grid-template-columns: 100%;\n  padding: 20px 0;\n  @media (min-width: 1024px){\n    grid-template-columns: repeat(5, calc((100% - 80px) / 3));\n    gap: 40px;\n  }\n  article {\n    position: relative;\n    a {\n      display: grid;\n      gap: 10px;\n      grid-template-columns: 80px auto;\n      color: #000000 !important;\n      &:hover {\n        color: #B41400 !important;\n      }\n    }\n  }\n  h6{\n    font-size: 16px;\n    white-space: normal;\n  }\n  @media screen and (max-width: 1023px) {\n    article::after {\n      content: '';\n      border-bottom: 1px solid #D4D4D4;\n      position: absolute;\n      bottom: -20px;\n      width: 100%;\n    }\n  }\n  @media screen and (min-width: 1024px) {\n    article::after {\n      content: '';\n      border-right: 1px solid #D4D4D4;\n      position: absolute;\n      right: -20px;\n      height: 100%;\n    }\n    article:last-of-type::after {\n        border-right: 0;\n    }\n  }\n"]))),Ot=n("wAi/"),Lt=h.a.createElement,Dt=function(e){var t=e.articles,n=e.to,r=e.authorName;return Lt(Pt,null,Lt("p",null,"Recent stories by:"),Lt("h5",null,Lt(Ot.a,{to:n},r)),Lt(xt,null,Lt(It,null,t&&t.map((function(e){return Lt("article",{key:"auth-"+e.uuid},Lt(Ot.a,{to:"/"+Object(At.a)(e)},Lt("div",null,Lt(_.ImageOrNoImage,{image:Object(At.b)(e),width:Object(At.c)("240"),alt:Object(At.d)(e),shape:"square",noImage:Me.a})),Lt("div",null,Lt("h6",null,Object(At.d)(e)))))})))))},Mt=n("rB4B"),Rt=h.a.createElement,Nt=function(e){Object(l.a)(n,e);var t=Object(c.a)(n);function n(e){var r;return Object(o.a)(this,n),(r=t.call(this,e)).scriptloaded=r.scriptloaded.bind(Object(u.a)(r)),r.handleSubmit=r.handleSubmit.bind(Object(u.a)(r)),r.state={bookmarked:!1},r.processVideo=!0,r.props.article&&(r.props.previewArticle||r.props.article.contentKey===r.props.contentKey)&&r.props.serverArticleRender(r.props.article),r}return Object(s.a)(n,[{key:"componentDidUpdate",value:function(e){var t=this;if((e.contentKey!==this.props.contentKey||e.hasError&&!e.isConnected&&this.props.isConnected)&&this.props.fetchArticle(this.props.contentKey),this.props.article&&this.processArticle(),this.props.article&&(this.scripts=0,this.processArticle(),St.a.messages.filter((function(e){return e.uuid===t.props.article.contentKey})).count().then((function(e){e<1?t.state.bookmarked&&t.setState({bookmarked:!1}):t.state.bookmarked||t.setState({bookmarked:!0})}))),this.props.message){for(var n=document.getElementsByClassName("form-error-validation");n.length>0;)n[0].parentNode.removeChild(n[0]);var r=this.props.message;Object.keys(r).map((function(e){return r[e].map((function(n){return t.showErrorMessage("fields-"+e,n)}))}))}}},{key:"UNSAFE_componentWillMount",value:function(){if(this.props.ArticlePushContext)this.props.setPreviewArticle(this.props.ArticlePushContext);else{if(this.props.article&&this.props.previewArticle)return;var e=new Date,t=new Date(this.props.lastFetch?this.props.lastFetch:0);(!this.props.article||this.props.contentKey!=this.props.article.contentKey||e-t>6e4)&&this.props.fetchArticle(this.props.contentKey)}}},{key:"showErrorMessage",value:function(e,t){document.getElementById(this.props.article.competition.form)&&document.getElementById(e).insertAdjacentHTML("afterend",'<p class="form-error-validation" style="color:red">'+t+"</p>")}},{key:"handleSubmit",value:function(e){e.preventDefault();var t=document.getElementById(this.props.article.competition.form).elements;this.props.submitCompetition(function(e){for(var t={},n=0;n<e.length;n++)"checkbox"===e[n].type?(t[e[n].name]||(t[e[n].name]=[]),e[n].checked&&t[e[n].name].push(e[n].value)):"radio"===e[n].type?e[n].checked&&(t[e[n].name]=e[n].value):t[e[n].name]=e[n].value;return t}(t))}},{key:"scriptloaded",value:function(){this.scripts--,console.log("Script loaded",this.scripts,"left to load"),0===this.scripts&&(console.log("All scripts loaded"),this.nodeScriptReplace(document.getElementById("article-more-body"),!1))}},{key:"nodeScriptIs",value:function(e){return"SCRIPT"===e.tagName}},{key:"nodeScriptClone",value:function(e,t,n){if(!t&&e.src)return e;if(t&&!e.src)return e;var r=document.createElement("script");r.text=e.innerHTML;for(var i=e.attributes.length-1;i>=0;i--)r.setAttribute(e.attributes[i].name,e.attributes[i].value);return n?n(r):r}},{key:"nodeScriptReplace",value:function(e,t,n){if(e)if(!0===this.nodeScriptIs(e))e.parentNode.replaceChild(this.nodeScriptClone(e,t,n),e);else for(var r=0,i=e.childNodes;r<i.length;)this.nodeScriptReplace(i[r++],t,n)}},{key:"renderAuthors",value:function(e){if(e.authors)return e.authors.map((function(e,t,n){return n.length-1===t?Rt("strong",{key:t},e.hasAuthorPage?Rt(g.Link,{to:"/"+e.slug},"  ",e.name," "):e.name):Rt("strong",{key:t},e.hasAuthorPage?Rt(g.Link,{to:"/"+e.slug},"  ",e.name,", "):e.name+", ")}))}},{key:"processArticle",value:function(){var e=this,t=document.getElementById("article-more-body");if(t&&(this.scripts=0,this.nodeScriptReplace(t,!0,(function(t){return e.scripts++,t.async=!1,t.onload=e.scriptLoaded,t}))),this.processVideo){var n,r=a(document.getElementById("article-more-body").querySelectorAll("video.ion-video"));try{for(r.s();!(n=r.n()).done;){var i,o=n.value,s=[],u=a(o.getElementsByTagName("source"));try{for(u.s();!(i=u.n()).done;){var l=i.value;s.push({src:l.getAttribute("src"),type:l.getAttribute("type")})}}catch(p){u.e(p)}finally{u.f()}var c=document.createElement("div");c.style.cssText="clear:both;";var d={};try{o.hasAttribute("data-channel")&&(d=JSON.parse(decodeURIComponent(o.getAttribute("data-channel"))))}catch(f){d={}}Object(v.createRoot)(c).render(Rt("div",{className:"video"},Rt(Pe,{sources:s,poster:o.getAttribute("poster"),channel:o.getAttribute("data-channel"),branding:d,autoplay:!1,width:"650",fluid:!0,preload:"metadata",controls:!0}))),o.parentElement.replaceChild(c,o),console.log("Updated videojs video")}}catch(p){r.e(p)}finally{r.f()}this.processVideo=!1}if(this.props.article.competition){var h=document.getElementById(this.props.article.competition.form);h&&(h.onsubmit=this.handleSubmit)}}},{key:"resizeImages",value:function(e,t){var n=t.match(/<img [^>]+>/g);if(n)for(var r=new _.ImageCalculator,i=0;i<n.length;i++){var a={};try{a=JSON.parse(n[i].replace(/['"][ ]+/g,'",').replace(/([ ,])([a-z0-9-]+)=/gi,'$1"$2":').replace(/<img\s+/,"{").replace(/[,/ ]*>$/,"}"))}catch(T){}if(!a.width||1!==parseInt(a.width)||!a.height||1!==parseInt(a.height)){var o=parseInt(a.offsetx)||0,s=parseInt(a.offsety)||0,u=parseInt(a.cropwidth)||0,l=parseInt(a.cropwidth)||0,c=parseInt(a.imageWidth),d=parseInt(a.imageHeight);if("imageCrop"in a){var h=a.imageCrop.split("/");o=Math.round((parseFloat(h[0])||0)*c),s=Math.round((parseFloat(h[1])||0)*d),u=Math.round((parseFloat(h[2])||1)*c),l=Math.round((parseFloat(h[3])||1)*d)}var p=r.calcHeight("original",e)||100*e,f=r.getCropCoordsForShape("original",e,p,c,d,o,s,u,l,0,0),m=f.offsetx,g=f.offsety,v=f.cropWidth,y=f.cropHeight,b=r.buildImageUrl("https://image-prod.iol.co.za/resize","",e,p,a.src,m,g,v,y);t=t.replace(n[i],'<img class="'.concat(a.class,'" src="').concat(b,'" loading="lazy" width="').concat(e,'">'))}}return t}},{key:"handleBookmark",value:function(e,t){return t?St.a.messages.where("uuid").equals(e.contentKey).delete():St.a.messages.add({uuid:e.contentKey,article:e}).then((function(e){return St.a.messages.where("id").below(e-9).delete()}))}},{key:"componentDidMount",value:function(){this.props.article&&this.processArticle(),window.adngin&&window.adngin.queue.push((function(){window.adngin.cmd.startAuction(["leaderboard-2","leaderboard-3","wingbanner-left","wingbanner-right","halfpage-1","mpu-1","instream"])}))}},{key:"render",value:function(){var e=this;if(this.props.checkCanonical&&this.props.canonical!==this.props.match.url)return Rt(m.Redirect,{to:this.props.canonical});if(this.props.hasError&&!this.props.is404)return this.props.isConnected?Rt("div",null,Rt(y.default,{title:"ERROR"}),Rt("div",{className:"wrapper"},Rt("div",{className:"article-page"},Rt("article",{role:"contentinfo","aria-label":"article",className:"no-elated"},Rt("h1",null,"Unexpected Error"),Rt("p",null,"Error: ",this.props.error))))):Rt("div",null,Rt(y.default,{title:"Offline"}),Rt("div",{className:"wrapper no-results"},Rt("img",{src:Fe.a,alt:"You are offline"}),Rt("h1",null,"You are offline"),Rt("p",null,"This article is not available as you are currently offline. Please re-establish your Internet connection and try again.")));if(this.props.is404||this.props.hasFetched&&this.props.article){var t,n,i,a;if(this.props.is404||!this.props.ArticlePushContext&&"hag"!==this.props.article.titleKey)return Rt(h.a.Fragment,null,Rt("div",{id:"adngin-leaderboard-1-0",className:"advert-leaderboard-1"}),Rt(je.default,null),Rt("div",{id:"adngin-leaderboard-3-0",className:"advert-leaderboard-3"}));var o=new S.a(this.props.article),s="https://image-prod.iol.co.za/resize",u=o.images&&o.images.length>1?o.images.slice(1):[],l=[];o.primaryTag&&l.push(o.primaryTag),o.secondaryTags&&(l=l.concat(o.secondaryTags));var c=l.slice(0,3);o.images=o.images&&o.images.slice(0,1);var p=o.formatDate(),f=!o.videos&&o.getImageObject(),v=o.socialTeaserImage?Object(_.calcImageSrcUrl)(o.socialTeaserImage,960,"square",!1):Object(_.calcImageSrcUrl)(o.getImageObject(),960,"square",!1),b=o.headline,T=o.getCanonicalUri(),E=640;Ie.defaultWidth>500&&(E=1456),Ie.defaultWidth>1024&&(E=1180),o.bodyHTML=this.resizeImages(E,o.bodyHTML);var A=[],x=o.getCompetitionSlug(),P="<p>This competition expired</p>";x&&!o.competitionExpired&&(P=o.competition.competition,!this.props.hasErrorSubmit&&this.props.hasSubmitted||(P+="<script>errors=".concat(JSON.stringify(this.props.message||!1),";formData=").concat(JSON.stringify(this.props.formData||{}),"<\/script>")),this.props.hasSubmitted&&(P="<form name='".concat(x,"-form'>Thank you for your submission</form>"))),o.bodyHTML=o.setCompetition(x,P),o.bodyHTML=o.bodyHTML.replace("\x3c!-- [AD_SLOT] --\x3e","<ad-slot/>"),o.bodyHTML="\x3c!-- C-ON- TEXT_CONTENT_START --\x3e\x3c!--sse--\x3e"+o.bodyHTML+"\x3c!--/sse--\x3e\x3c!-- C-ON- TEXT_CONTENT_END --\x3e",o.bodyHTML=o.bodyHTML.replace(/<iframe([0-9a-z=%"\\ ]+?)(https?:\/\/(?:www\.)?youtu(\.be|be\.com))/g,'<iframe style="aspect-ratio:16/9;width:100%;"$1$2');var I=o.bodyHTML.split("<ad-slot/>");if(this.props.readNext)for(var O=this.props.readNext.length<9?this.props.readNext.length:9,L=0;L<O;L++)this.props.readNext[L].contentKey!==this.props.contentKey&&A.push(new S.a(this.props.readNext[L]));A.length>8&&A.pop();var D=[];if(o.videos&&o.videos[0].sources){var M=o.videos[0].sources;D=Object.keys(M).map((function(e){return{src:M[e].url||M[e].mp4.url,type:M[e].type||"video/mp4",label:e}}))}var R=o.formatImageCaption(),N=o.formatImageCredit(),j=Object.assign({url:""},o.getImageObject()),B=Object(w.getSectionLabel)(o.section),U=this.props.article.relatedArticles.length>0;return Rt(h.a.Fragment,null,Rt(C.a,{useSmall:this.props.useSmall}),Rt("div",{className:"main-article"},Rt(y.default,{title:b},Rt("meta",{property:"fb:app_id",content:"293175074032541"}),Rt("meta",{property:"og:type",content:"article"}),Rt("meta",{property:"og:title",content:o.socialTeaserHeadline||b}),Rt("meta",{property:"og:description",content:o.socialAbstract||o.abstract}),Rt("meta",{property:"og:url",content:"https://www.houseandgarden.co.za"+this.props.canonical}),Rt("meta",{property:"keywords",content:this.props.keywords||[].concat(o.primaryTag).concat(o.secondaryTags).map((function(e){return e&&e.label})).join(", ")}),Rt("meta",{property:"og:image",content:s+v}),Rt("meta",{property:"og:image:width",content:(null===o||void 0===o||null===(t=o.images)||void 0===t?void 0:t[0].width)||0}),Rt("meta",{property:"og:image:height",content:(null===o||void 0===o||null===(n=o.images)||void 0===n?void 0:n[0].height)||0}),Rt("meta",{property:"og:image:alt",content:(null===o||void 0===o||null===(i=o.images)||void 0===i?void 0:i[0].caption)||o.headline}),Rt("meta",{itemProp:"headline",content:b}),Rt("meta",{itemProp:"description",name:"description",content:o.abstract}),Rt("meta",{itemProp:"dateModified",content:o.modified}),Rt("meta",{itemProp:"datePublished",content:o.published}),Rt("meta",{itemProp:"identifier",content:o.contentKey}),Rt("meta",{name:"twitter:site",content:this.props.twitterName}),Rt("meta",{name:"twitter:creator",content:this.props.twitterName}),Rt("meta",{name:"twitter:title",content:b}),Rt("meta",{name:"twitter:description",content:o.abstract}),Rt("meta",{itemprop:"image",content:s+Object(_.calcImageSrcUrl)(o.getImageObject(),960,"square",!1)}),Rt("meta",{itemprop:"thumbnailUrl",content:s+Object(_.calcImageSrcUrl)(o.getImageObject(),100,"square",!1)}),Rt("meta",{name:"twitter:card",content:"summary_large_image"}),Rt("meta",{name:"twitter:image",content:s+v}),Rt("meta",{property:"twitter:image:alt",content:(null===o||void 0===o||null===(a=o.images)||void 0===a?void 0:a[0].caption)||o.headline}),Rt("meta",{itemProp:"inLanguage",content:"en"}),o.canonicalUrl&&Rt("link",{rel:"canonical",itemprop:"url",href:o.canonicalUrl}),Rt("link",{rel:"amphtml",itemprop:"url",href:"https://www.houseandgarden.co.za/amp/"+T})),Rt(k.ArticleMeta,{article:o}),Rt("div",{id:"adngin-leaderboard-1-0",className:"advert-leaderboard-1"}),Rt("div",{className:"wrapper"},Rt("div",{className:"article-page"},Rt("article",{role:"contentinfo","aria-label":"article"},Rt("h1",null,b),Rt("p",{className:"meta"},o.abstract),Rt("div",{className:"author-meta"},Rt("a",{href:"#",onClick:function(){return e.handleBookmark(e.props.article,e.state.bookmarked),e.setState({bookmarked:!e.state.bookmarked})}},Rt("img",{src:this.state.bookmarked?Et.a:kt.a,alt:"Bookmark article to read later"})),Rt("p",{className:"meta"},"By ",this.renderAuthors(o)||o.author,Rt("span",null,"\xa0|\xa0"),p&&Rt("strong",null,p),Rt("span",null,"\xa0|\xa0"),Rt("strong",null,Rt(g.Link,{to:"/"+o.getSectionId()},B)))),Rt(Oe.a,{className:"inline-share-buttons",url:"https://www.houseandgarden.co.za"+this.props.canonical,title:b,quote:b,media:s+v}),Rt("div",{itemProp:"articleBody",className:"article-body"},f&&f.url&&1===o.images.length&&Rt("figure",null,Rt(Ie.Mobile,null,Rt(k.ArticleImage,{key:o.contentKey,image:j,href:s+Object(_.calcImageSrcUrl)(o.getImageObject(),640,"16x9"),imageCaption:R,altText:f.altText,imageCredit:N})),Rt(Ie.Tablet,null,Rt(k.ArticleImage,{key:o.contentKey,image:j,href:s+Object(_.calcImageSrcUrl)(o.getImageObject(),1456,"16x9"),imageCaption:R,altText:f.altText,imageCredit:N})),Rt(Ie.Desktop,null,Rt(k.ArticleImage,{key:o.contentKey,image:j,href:s+Object(_.calcImageSrcUrl)(o.getImageObject(),1180,"16x9"),imageCaption:R,altText:f.altText,imageCredit:N}))),!f&&o.videos&&o.videos[0].sources&&Rt("div",{className:"video"},Rt(Pe,{sources:D,poster:o.videos[0].thumbnailURL,autoplay:!1,width:"670",fluid:!0,preload:"metadata",channel:o.videos[0].channel,branding:o.videos[0].branding,controls:!0})),Rt("div",{className:"articleBodyMore",id:"article-more-body"},I.map((function(t,n){switch(n){case 1:return Rt(d.Fragment,{key:n},U&&Rt(dt,{relatedArticle:e.props.article.relatedArticles.slice(0,1),unknownImage:Me.a}),!U&&Rt("div",{id:"inarticlead",className:"in-article-ad"},Rt(Ie.Mobile,null,Rt("div",{id:"adngin-instream-0",className:"advert advert-inarticle"})),Rt(Ie.MobileElse,null,Rt("div",{id:"adngin-instream-0",className:"advert advert-in-article-desktop"}))),Rt("div",{key:"div-"+n,dangerouslySetInnerHTML:{__html:t}}));case 2:return Rt(d.Fragment,{key:n},U&&Rt("div",{id:"inarticlead",className:"in-article-ad"},Rt(Ie.Mobile,null,Rt("div",{id:"adngin-instream-0",className:"advert advert-inarticle"})),Rt(Ie.MobileElse,null,Rt("div",{id:"adngin-instream-0",className:"advert advert-in-article-desktop"}))),Rt("div",{key:"div-"+n,dangerouslySetInnerHTML:{__html:t}}))}return Rt("div",{key:"div-"+n,dangerouslySetInnerHTML:{__html:t}})}))),u.length>0&&Rt(Ne,{gallery:u,width:Ie.defaultWidth})),Rt(Tt,null),Rt("div",null,c.length>0&&Rt("h3",null,"Related Tags"),c.map((function(e,t){return Rt(g.Link,{to:"/"+e.sectionSlug+"/"+e.slug,key:t},e.label,Rt("span",null,c.length>t+1?", ":""))}))),this.props.article.authors&&this.props.article.authors[0].hasAuthorPage&&this.props.authorArticles&&Rt(Dt,{articles:this.props.authorArticles.filter((function(t){return t.contentKey!==e.props.article.contentKey})).slice(0,5),to:"/"+this.props.article.authors[0].slug,authorName:this.props.article.authors[0].name}),!1,this.props.article.relatedArticles.length>0&&Rt(at,{relatedArticle:this.props.article.relatedArticles.slice(1),unknownImage:Me.a}),Rt(Oe.a,{className:"inline-share-buttons",url:this.props.canonical,title:b,quote:b,media:s+v}),Rt("div",{className:"related-articles"},A.length>0&&Rt("h2",null,"You might also like"),A.map((function(e,t){return Rt("article",{key:t},Rt(g.Link,{to:"/"+e.getCanonicalUri()},Rt(_.ImageOrNoImage,{image:e.getImageObject(),width:"240",shape:"square",alt:e.headline,noImage:Me.a}),Rt("h3",null,e.headline)))}))),Rt("section",{className:"grid-2-2"},Rt("div",{className:"OUTBRAIN","data-src":"https://www.houseandgarden.co.za"+this.props.canonical,"data-widget-id":"AR_1"}))),Rt(Be.a,Object(r.a)({},this.props,{section:T,contentKey:o.contentKey}),Rt(ht.a,null)))),Rt("div",{id:"adngin-leaderboard-3-0",className:"advert-leaderboard-3"})))}return Rt(h.a.Fragment,null,Rt(y.default,{title:"Article"}),Rt("div",{className:"main-article"},Rt("div",{id:"adngin-leaderboard-1-0",className:"advert-leaderboard-1"}),Rt(Mt.a,null),Rt("div",{id:"adngin-leaderboard-3-0",className:"advert-leaderboard-3"})))}}]),n}(d.Component);t.default=Object(f.connect)((function(e){return e.article}),(function(e){return Object(p.bindActionCreators)({fetchArticle:b.d,submitCompetition:b.h,serverArticleRender:b.f,setPreviewArticle:b.g},e)}))(Nt)},Avys:function(e,t,n){var r=n("DcKJ"),i=n("TGyr");(e.exports=function(e,t){return i[e]||(i[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.30.1",mode:r?"pure":"global",copyright:"\xa9 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.30.1/LICENSE",source:"https://github.com/zloirock/core-js"})},B0s0:function(e,t,n){var r=n("eDf4"),i=String,a=TypeError;e.exports=function(e){if("object"==typeof e||r(e))return e;throw a("Can't set "+i(e)+" as a prototype")}},B8MI:function(e,t){var n=String;e.exports=function(e){try{return n(e)}catch(t){return"Object"}}},BWZk:function(e,t,n){},"Bje/":function(e,t,n){"use strict";var r=n("q1tI"),i=n.n(r),a=n("yCm8"),o=n("ATIt"),s=n("55Ip"),u=i.a.createElement;t.a=function(e){return u(i.a.Fragment,null,u("div",{className:"author-bio"},u(a.ImageOrNoImage,{shape:"square",width:450,image:{url:e.imageUrl},alt:e.name,noImage:e.noImage}),u("h4",null,u(s.Link,{to:"/"+e.slug},e.name)),e.description&&u("p",null,e.description),u(o.a,{topic:{topic:e.uuid,type:"author",name:e.name},followText:"Follow My Stories",unFollowText:"Unfollow My Stories"})))}},Bsj1:function(e,t,n){var r=n("TsPY"),i=n("B8MI"),a=TypeError;e.exports=function(e){if(r(e))return e;throw a(i(e)+" is not a constructor")}},Bw1r:function(e,t,n){var r=n("4Tei"),i=n("HyK6"),a=n("xnEm").f,o=r("unscopables"),s=Array.prototype;void 0==s[o]&&a(s,o,{configurable:!0,value:i(null)}),e.exports=function(e){s[o][e]=!0}},CvoT:function(e,t,n){var r=n("4wiq"),i=n("xZj3"),a=n("Dr2v"),o=Object,s=r("".split);e.exports=i((function(){return!o("z").propertyIsEnumerable(0)}))?function(e){return"String"==a(e)?s(e,""):o(e)}:o},DKAt:function(e,t,n){var r=n("szlw"),i=n("W2Ac"),a=n("xnEm").f;r({target:"Object",stat:!0,forced:Object.defineProperty!==a,sham:!i},{defineProperty:a})},DSVV:function(e,t,n){var r=n("4wiq"),i=n("FTia"),a=n("eDf4"),o=n("Dr2v"),s=n("QICv"),u=r([].push);e.exports=function(e){if(a(e))return e;if(i(e)){for(var t=e.length,n=[],r=0;r<t;r++){var l=e[r];"string"==typeof l?u(n,l):"number"!=typeof l&&"Number"!=o(l)&&"String"!=o(l)||u(n,s(l))}var c=n.length,d=!0;return function(e,t){if(d)return d=!1,t;if(i(this))return t;for(var r=0;r<c;r++)if(n[r]===e)return t}}}},DcKJ:function(e,t){e.exports=!1},Dr2v:function(e,t,n){var r=n("4wiq"),i=r({}.toString),a=r("".slice);e.exports=function(e){return a(i(e),8,-1)}},DsG2:function(e,t,n){var r={};r[n("4Tei")("toStringTag")]="z",e.exports="[object z]"===String(r)},Dtfp:function(e,t,n){var r=n("szlw"),i=n("sCZI"),a=n("yG9A"),o=n("031f"),s=n("Bsj1"),u=n("Y6hy"),l=n("mESY"),c=n("HyK6"),d=n("xZj3"),h=i("Reflect","construct"),p=Object.prototype,f=[].push,m=d((function(){function e(){}return!(h((function(){}),[],e)instanceof e)})),g=!d((function(){h((function(){}))})),v=m||g;r({target:"Reflect",stat:!0,forced:v,sham:v},{construct:function(e,t){s(e),u(t);var n=arguments.length<3?e:s(arguments[2]);if(g&&!m)return h(e,t,n);if(e==n){switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3])}var r=[null];return a(f,r,t),new(a(o,e,r))}var i=n.prototype,d=c(l(i)?i:p),v=a(e,d,t);return l(v)?v:d}})},"Dw+G":function(e,t,n){var r=n("juv8"),i=n("mTTR");e.exports=function(e,t){return e&&r(t,i(t),e)}},DzJC:function(e,t,n){var r=n("sEfC"),i=n("GoyQ");e.exports=function(e,t,n){var a=!0,o=!0;if("function"!=typeof e)throw new TypeError("Expected a function");return i(n)&&(a="leading"in n?!!n.leading:a,o="trailing"in n?!!n.trailing:o),r(e,t,{leading:a,maxWait:t,trailing:o})}},ECyS:function(e,t,n){"use strict";function r(e){return Object.prototype.toString.call(e).slice(8,-1)}function i(e){return"Undefined"===r(e)}function a(e){return"Null"===r(e)}function o(e){return"Object"===r(e)&&(e.constructor===Object&&Object.getPrototypeOf(e)===Object.prototype)}function s(e){return"Array"===r(e)}function u(e){return"Symbol"===r(e)}var l,c,d,h,p;l=a,c=i;function f(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),i=0;for(t=0;t<n;t++)for(var a=arguments[t],o=0,s=a.length;o<s;o++,i++)r[i]=a[o];return r}function m(e,t,n,r){var i=r.propertyIsEnumerable(t)?"enumerable":"nonenumerable";"enumerable"===i&&(e[t]=n),"nonenumerable"===i&&Object.defineProperty(e,t,{value:n,enumerable:!1,writable:!0,configurable:!0})}function g(e,t,n){if(!o(t))return n&&s(n)&&n.forEach((function(n){t=n(e,t)})),t;var r={};o(e)&&(r=f(Object.getOwnPropertyNames(e),Object.getOwnPropertySymbols(e)).reduce((function(n,r){var i=e[r];return(!u(r)&&!Object.getOwnPropertyNames(t).includes(r)||u(r)&&!Object.getOwnPropertySymbols(t).includes(r))&&m(n,r,i,e),n}),{}));return f(Object.getOwnPropertyNames(t),Object.getOwnPropertySymbols(t)).reduce((function(r,i){var a=t[i],u=o(e)?e[i]:void 0;return n&&s(n)&&n.forEach((function(e){a=e(u,a)})),void 0!==u&&o(a)&&(a=g(u,a,n)),m(r,i,a,t),r}),r)}t.a=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r=null,i=e;return o(e)&&e.extensions&&1===Object.keys(e).length&&(i={},r=e.extensions),t.reduce((function(e,t){return g(e,t,r)}),i)}},EEGq:function(e,t,n){var r=n("juv8"),i=n("oCl/");e.exports=function(e,t){return r(e,i(e),t)}},F5Zs:function(e,t,n){var r=n("pROP"),i=n("j0Et");e.exports=function(e,t){var n=e[t];return i(n)?void 0:r(n)}},F6NX:function(e,t,n){"use strict";n.d(t,"i",(function(){return u})),n.d(t,"h",(function(){return l})),n.d(t,"d",(function(){return c})),n.d(t,"f",(function(){return d})),n.d(t,"e",(function(){return h})),n.d(t,"c",(function(){return p})),n.d(t,"g",(function(){return f})),n.d(t,"a",(function(){return m})),n.d(t,"b",(function(){return g}));var r=n("vgmO"),i=n.n(r),a={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^/},o=["video","audio","text"],s=["Video","Audio","Text"],u=function(e){return e?e.replace(/avc1\.(\d+)\.(\d+)/i,(function(e,t,n){return"avc1."+("00"+Number(t).toString(16)).slice(-2)+"00"+("00"+Number(n).toString(16)).slice(-2)})):e},l=function(e){void 0===e&&(e="");var t=e.split(","),n=[];return t.forEach((function(e){var t;e=e.trim(),o.forEach((function(r){var i=a[r].exec(e.toLowerCase());if(i&&!(i.length<=1)){t=r;var o=e.substring(0,i[1].length),s=e.replace(o,"");n.push({type:o,details:s,mediaType:r})}})),t||n.push({type:e,details:"",mediaType:"unknown"})})),n},c=function(e,t){if(!e.mediaGroups.AUDIO||!t)return null;var n=e.mediaGroups.AUDIO[t];if(!n)return null;for(var r in n){var i=n[r];if(i.default&&i.playlists)return l(i.playlists[0].attributes.CODECS)}return null},d=function(e){return void 0===e&&(e=""),a.audio.test(e.trim().toLowerCase())},h=function(e){if(e&&"string"===typeof e){var t,n=e.toLowerCase().split(",").map((function(e){return u(e.trim())})),r="video";1===n.length&&d(n[0])?r="audio":1===n.length&&(void 0===(t=n[0])&&(t=""),a.text.test(t.trim().toLowerCase()))&&(r="application");var i="mp4";return n.every((function(e){return a.mp4.test(e)}))?i="mp4":n.every((function(e){return a.webm.test(e)}))?i="webm":n.every((function(e){return a.ogg.test(e)}))&&(i="ogg"),r+"/"+i+';codecs="'+e+'"'}},p=function(e){return void 0===e&&(e=""),i.a.MediaSource&&i.a.MediaSource.isTypeSupported&&i.a.MediaSource.isTypeSupported(h(e))||!1},f=function(e){return void 0===e&&(e=""),e.toLowerCase().split(",").every((function(e){e=e.trim();for(var t=0;t<s.length;t++){if(a["muxer"+s[t]].test(e))return!0}return!1}))},m="mp4a.40.2",g="avc1.4d400d"},FTia:function(e,t,n){var r=n("Dr2v");e.exports=Array.isArray||function(e){return"Array"==r(e)}},Fyp5:function(e,t,n){var r,i,a=n("LHWz"),o=n("Qkng"),s=a.process,u=a.Deno,l=s&&s.versions||u&&u.version,c=l&&l.v8;c&&(i=(r=c.split("."))[0]>0&&r[0]<4?1:+(r[0]+r[1])),!i&&o&&(!(r=o.match(/Edge\/(\d+)/))||r[1]>=74)&&(r=o.match(/Chrome\/(\d+)/))&&(i=+r[1]),e.exports=i},G8w8:function(e,t,n){e.exports=n.p+"static/media/no-search-results-v2.f76581a0.svg"},GLMc:function(e,t,n){var r=n("c5/t");e.exports=function(e){var t=+e;return t!==t||0===t?0:r(t)}},GOOj:function(e,t,n){var r=n("4wiq");e.exports=r({}.isPrototypeOf)},Gi0A:function(e,t,n){var r=n("QqLw"),i=n("ExA7");e.exports=function(e){return i(e)&&"[object Map]"==r(e)}},Gjit:function(e,t,n){var r=n("4wiq");e.exports=r([].slice)},HMdW:function(e,t,n){var r=n("Dr2v"),i=n("Yo2p"),a=n("N0Qq").f,o=n("NKpN"),s="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];e.exports.f=function(e){return s&&"Window"==r(e)?function(e){try{return a(e)}catch(t){return o(s)}}(e):a(i(e))}},HRax:function(e,t,n){var r=n("LHWz");e.exports=r},HfWI:function(e,t,n){var r=n("szlw"),i=n("xZj3"),a=n("RpL+"),o=n("PEQI"),s=n("0dUG");r({target:"Object",stat:!0,forced:i((function(){o(1)})),sham:!s},{getPrototypeOf:function(e){return o(a(e))}})},HjHI:function(e,t,n){var r=n("JVs5"),i=n("eDf4"),a=n("mESY"),o=TypeError;e.exports=function(e,t){var n,s;if("string"===t&&i(n=e.toString)&&!a(s=r(n,e)))return s;if(i(n=e.valueOf)&&!a(s=r(n,e)))return s;if("string"!==t&&i(n=e.toString)&&!a(s=r(n,e)))return s;throw o("Can't convert object to primitive value")}},HkKV:function(e,t){e.exports=function(e,t){return{value:e,done:t}}},HyK6:function(e,t,n){var r,i=n("Y6hy"),a=n("aLLH"),o=n("rRP5"),s=n("SfKh"),u=n("K4hL"),l=n("zMKt"),c=n("7BeB"),d=c("IE_PROTO"),h=function(){},p=function(e){return"<script>"+e+"<\/script>"},f=function(e){e.write(p("")),e.close();var t=e.parentWindow.Object;return e=null,t},m=function(){try{r=new ActiveXObject("htmlfile")}catch(t){}m="undefined"!=typeof document?document.domain&&r?f(r):function(){var e,t=l("iframe");return t.style.display="none",u.appendChild(t),t.src=String("javascript:"),(e=t.contentWindow.document).open(),e.write(p("document.F=Object")),e.close(),e.F}():f(r);for(var e=o.length;e--;)delete m.prototype[o[e]];return m()};s[d]=!0,e.exports=Object.create||function(e,t){var n;return null!==e?(h.prototype=i(e),n=new h,h.prototype=null,n[d]=e):n=m(),void 0===t?n:a.f(n,t)}},"I/Cy":function(e,t,n){e.exports=n.p+"static/media/broken-connection.d403693c.svg"},I62h:function(e,t,n){"use strict";var r={}.propertyIsEnumerable,i=Object.getOwnPropertyDescriptor,a=i&&!r.call({1:2},1);t.f=a?function(e){var t=i(this,e);return!!t&&t.enumerable}:r},IQtQ:function(e,t,n){var r=n("4ciW");t.DOMImplementation=r.DOMImplementation,t.XMLSerializer=r.XMLSerializer,t.DOMParser=n("sHRr").DOMParser},J54O:function(e,t,n){"use strict";var r=n("8z+Y"),i=n("xnEm"),a=n("PEjt");e.exports=function(e,t,n){var o=r(t);o in e?i.f(e,o,a(0,n)):e[o]=n}},JVs5:function(e,t,n){var r=n("orrc"),i=Function.prototype.call;e.exports=r?i.bind(i):function(){return i.apply(i,arguments)}},K4hL:function(e,t,n){var r=n("sCZI");e.exports=r("document","documentElement")},K4wu:function(e,t,n){var r=n("vgmO"),i=e.exports={WebVTT:n("0CxO"),VTTCue:n("sDzi"),VTTRegion:n("+X0y")};r.vttjs=i,r.WebVTT=i.WebVTT;var a=i.VTTCue,o=i.VTTRegion,s=r.VTTCue,u=r.VTTRegion;i.shim=function(){r.VTTCue=a,r.VTTRegion=o},i.restore=function(){r.VTTCue=s,r.VTTRegion=u},r.VTTCue||i.shim()},Keil:function(e,t,n){n("4aqD"),n("owxc"),n("5ANw"),n("zM/4"),n("cuZ9")},LHWz:function(e,t,n){(function(t){var n=function(e){return e&&e.Math==Math&&e};e.exports=n("object"==typeof globalThis&&globalThis)||n("object"==typeof window&&window)||n("object"==typeof self&&self)||n("object"==typeof t&&t)||function(){return this}()||Function("return this")()}).call(this,n("yLpj"))},LIjv:function(e,t,n){var r=n("sCZI"),i=n("4wiq"),a=n("N0Qq"),o=n("pfAL"),s=n("Y6hy"),u=i([].concat);e.exports=r("Reflect","ownKeys")||function(e){var t=a.f(s(e)),n=o.f;return n?u(t,n(e)):t}},LsHQ:function(e,t,n){var r=n("EA7m"),i=n("mv/X");e.exports=function(e){return r((function(t,n){var r=-1,a=n.length,o=a>1?n[a-1]:void 0,s=a>2?n[2]:void 0;for(o=e.length>3&&"function"==typeof o?(a--,o):void 0,s&&i(n[0],n[1],s)&&(o=a<3?void 0:o,a=1),t=Object(t);++r<a;){var u=n[r];u&&e(t,u,r,o)}return t}))}},ME5O:function(e,t,n){"use strict";t.a={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1}},Mh8q:function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n("3mbX"),i=Object(r.k)([73,68,51]),a=function e(t,n){return void 0===n&&(n=0),(t=Object(r.k)(t)).length-n<10||!Object(r.a)(t,i,{offset:n})?n:(n+=function(e,t){void 0===t&&(t=0);var n=(e=Object(r.k)(e))[t+5],i=e[t+6]<<21|e[t+7]<<14|e[t+8]<<7|e[t+9];return(16&n)>>4?i+20:i+10}(t,n),e(t,n))}},N0Qq:function(e,t,n){var r=n("UZoB"),i=n("rRP5").concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return r(e,i)}},NKpN:function(e,t,n){var r=n("gheS"),i=n("11UE"),a=n("J54O"),o=Array,s=Math.max;e.exports=function(e,t,n){for(var u=i(e),l=r(t,u),c=r(void 0===n?u:n,u),d=o(s(c-l,0)),h=0;l<c;l++,h++)a(d,h,e[l]);return d.length=h,d}},NgPB:function(e,t,n){"use strict";var r=n("vgmO"),i=n("pVnL"),a=n("g2LC");s.httpHandler=n("jACb");function o(e,t,n){var r=e;return a(t)?(n=t,"string"===typeof e&&(r={uri:e})):r=i({},t,{uri:e}),r.callback=n,r}function s(e,t,n){return u(t=o(e,t,n))}function u(e){if("undefined"===typeof e.callback)throw new Error("callback argument missing");var t=!1,n=function(n,r,i){t||(t=!0,e.callback(n,r,i))};function r(){var e=void 0;if(e=l.response?l.response:l.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(n){}return null}(l),g)try{e=JSON.parse(e)}catch(t){}return e}function i(e){return clearTimeout(c),e instanceof Error||(e=new Error(""+(e||"Unknown XMLHttpRequest Error"))),e.statusCode=0,n(e,v)}function a(){if(!u){var t;clearTimeout(c),t=e.useXDR&&void 0===l.status?200:1223===l.status?204:l.status;var i=v,a=null;return 0!==t?(i={body:r(),statusCode:t,method:h,headers:{},url:d,rawRequest:l},l.getAllResponseHeaders&&(i.headers=function(e){var t={};return e?(e.trim().split("\n").forEach((function(e){var n=e.indexOf(":"),r=e.slice(0,n).trim().toLowerCase(),i=e.slice(n+1).trim();"undefined"===typeof t[r]?t[r]=i:Array.isArray(t[r])?t[r].push(i):t[r]=[t[r],i]})),t):t}(l.getAllResponseHeaders()))):a=new Error("Internal XMLHttpRequest Error"),n(a,i,i.body)}}var o,u,l=e.xhr||null;l||(l=e.cors||e.useXDR?new s.XDomainRequest:new s.XMLHttpRequest);var c,d=l.url=e.uri||e.url,h=l.method=e.method||"GET",p=e.body||e.data,f=l.headers=e.headers||{},m=!!e.sync,g=!1,v={body:void 0,headers:{},statusCode:0,method:h,url:d,rawRequest:l};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))),l.onreadystatechange=function(){4===l.readyState&&setTimeout(a,0)},l.onload=a,l.onerror=i,l.onprogress=function(){},l.onabort=function(){u=!0},l.ontimeout=i,l.open(h,d,!m,e.username,e.password),m||(l.withCredentials=!!e.withCredentials),!m&&e.timeout>0&&(c=setTimeout((function(){if(!u){u=!0,l.abort("timeout");var e=new Error("XMLHttpRequest timeout");e.code="ETIMEDOUT",i(e)}}),e.timeout)),l.setRequestHeader)for(o in f)f.hasOwnProperty(o)&&l.setRequestHeader(o,f[o]);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&&(l.responseType=e.responseType),"beforeSend"in e&&"function"===typeof e.beforeSend&&e.beforeSend(l),l.send(p||null),l}e.exports=s,e.exports.default=s,s.XMLHttpRequest=r.XMLHttpRequest||function(){},s.XDomainRequest="withCredentials"in new s.XMLHttpRequest?s.XMLHttpRequest:r.XDomainRequest,function(e,t){for(var n=0;n<e.length;n++)t(e[n])}(["get","put","post","patch","head","delete"],(function(e){s["delete"===e?"del":e]=function(t,n,r){return(n=o(t,n,r)).method=e.toUpperCase(),u(n)}}))},NsZL:function(e,t){var n,r,i,a,o,s,u;n=function(e){return 9e4*e},r=function(e,t){return e*t},i=function(e){return e/9e4},a=function(e,t){return e/t},o=function(e,t){return n(a(e,t))},s=function(e,t){return r(i(e),t)},u=function(e,t,n){return i(n?e:e-t)},e.exports={ONE_SECOND_IN_TS:9e4,secondsToVideoTs:n,secondsToAudioTs:r,videoTsToSeconds:i,audioTsToSeconds:a,audioTsToVideoTs:o,videoTsToAudioTs:s,metadataTsToSeconds:u}},Nsbk:function(e,t){function n(t){return e.exports=n=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},e.exports.__esModule=!0,e.exports.default=e.exports,n(t)}e.exports=n,e.exports.__esModule=!0,e.exports.default=e.exports},OBhP:function(e,t,n){var r=n("fmRc"),i=n("gFfm"),a=n("MrPd"),o=n("WwFo"),s=n("Dw+G"),u=n("5Tg0"),l=n("Q1l4"),c=n("VOtZ"),d=n("EEGq"),h=n("qZTm"),p=n("G6z8"),f=n("QqLw"),m=n("yHx3"),g=n("wrZu"),v=n("+iFO"),y=n("Z0cm"),b=n("DSRE"),_=n("zEVN"),T=n("GoyQ"),S=n("1+5i"),w=n("7GkX"),k=n("mTTR"),C={};C["[object Arguments]"]=C["[object Array]"]=C["[object ArrayBuffer]"]=C["[object DataView]"]=C["[object Boolean]"]=C["[object Date]"]=C["[object Float32Array]"]=C["[object Float64Array]"]=C["[object Int8Array]"]=C["[object Int16Array]"]=C["[object Int32Array]"]=C["[object Map]"]=C["[object Number]"]=C["[object Object]"]=C["[object RegExp]"]=C["[object Set]"]=C["[object String]"]=C["[object Symbol]"]=C["[object Uint8Array]"]=C["[object Uint8ClampedArray]"]=C["[object Uint16Array]"]=C["[object Uint32Array]"]=!0,C["[object Error]"]=C["[object Function]"]=C["[object WeakMap]"]=!1,e.exports=function e(t,n,E,A,x,P){var I,O=1&n,L=2&n,D=4&n;if(E&&(I=x?E(t,A,x,P):E(t)),void 0!==I)return I;if(!T(t))return t;var M=y(t);if(M){if(I=m(t),!O)return l(t,I)}else{var R=f(t),N="[object Function]"==R||"[object GeneratorFunction]"==R;if(b(t))return u(t,O);if("[object Object]"==R||"[object Arguments]"==R||N&&!x){if(I=L||N?{}:v(t),!O)return L?d(t,s(I,t)):c(t,o(I,t))}else{if(!C[R])return x?t:{};I=g(t,R,O)}}P||(P=new r);var j=P.get(t);if(j)return j;P.set(t,I),S(t)?t.forEach((function(r){I.add(e(r,n,E,r,t,P))})):_(t)&&t.forEach((function(r,i){I.set(i,e(r,n,E,i,t,P))}));var B=M?void 0:(D?L?p:h:L?k:w)(t);return i(B||t,(function(r,i){B&&(r=t[i=r]),a(I,i,e(r,n,E,i,t,P))})),I}},PEQI:function(e,t,n){var r=n("+BqG"),i=n("eDf4"),a=n("RpL+"),o=n("7BeB"),s=n("0dUG"),u=o("IE_PROTO"),l=Object,c=l.prototype;e.exports=s?l.getPrototypeOf:function(e){var t=a(e);if(r(t,u))return t[u];var n=t.constructor;return i(n)&&t instanceof n?n.prototype:t instanceof l?c:null}},PEjt:function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},Q7rv:function(e,t,n){"use strict";var r,i,a,o=n("xZj3"),s=n("eDf4"),u=n("mESY"),l=n("HyK6"),c=n("PEQI"),d=n("esM1"),h=n("4Tei"),p=n("DcKJ"),f=h("iterator"),m=!1;[].keys&&("next"in(a=[].keys())?(i=c(c(a)))!==Object.prototype&&(r=i):m=!0),!u(r)||o((function(){var e={};return r[f].call(e)!==e}))?r={}:p&&(r=l(r)),s(r[f])||d(r,f,(function(){return this})),e.exports={IteratorPrototype:r,BUGGY_SAFARI_ITERATORS:m}},QEso:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=n("q1tI"),s=g(n("17x9")),u=m(n("VKEO")),l=g(n("S1to")),c=m(n("Ye7m")),d=m(n("fbhf")),h=n("2zs7"),p=g(h),f=g(n("UIKY"));function m(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function g(e){return e&&e.__esModule?e:{default:e}}n("WkvU");var v={overlay:"ReactModal__Overlay",content:"ReactModal__Content"},y=0,b=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.setOverlayRef=function(e){n.overlay=e,n.props.overlayRef&&n.props.overlayRef(e)},n.setContentRef=function(e){n.content=e,n.props.contentRef&&n.props.contentRef(e)},n.afterClose=function(){var e=n.props,t=e.appElement,r=e.ariaHideApp,i=e.htmlOpenClassName,a=e.bodyOpenClassName,o=e.parentSelector,s=o&&o().ownerDocument||document;a&&d.remove(s.body,a),i&&d.remove(s.getElementsByTagName("html")[0],i),r&&y>0&&0===(y-=1)&&c.show(t),n.props.shouldFocusAfterRender&&(n.props.shouldReturnFocusAfterClose?(u.returnFocus(n.props.preventScroll),u.teardownScopedFocus()):u.popWithoutFocus()),n.props.onAfterClose&&n.props.onAfterClose(),f.default.deregister(n)},n.open=function(){n.beforeOpen(),n.state.afterOpen&&n.state.beforeClose?(clearTimeout(n.closeTimer),n.setState({beforeClose:!1})):(n.props.shouldFocusAfterRender&&(u.setupScopedFocus(n.node),u.markForFocusLater()),n.setState({isOpen:!0},(function(){n.openAnimationFrame=requestAnimationFrame((function(){n.setState({afterOpen:!0}),n.props.isOpen&&n.props.onAfterOpen&&n.props.onAfterOpen({overlayEl:n.overlay,contentEl:n.content})}))})))},n.close=function(){n.props.closeTimeoutMS>0?n.closeWithTimeout():n.closeWithoutTimeout()},n.focusContent=function(){return n.content&&!n.contentHasFocus()&&n.content.focus({preventScroll:!0})},n.closeWithTimeout=function(){var e=Date.now()+n.props.closeTimeoutMS;n.setState({beforeClose:!0,closesAt:e},(function(){n.closeTimer=setTimeout(n.closeWithoutTimeout,n.state.closesAt-Date.now())}))},n.closeWithoutTimeout=function(){n.setState({beforeClose:!1,isOpen:!1,afterOpen:!1,closesAt:null},n.afterClose)},n.handleKeyDown=function(e){(function(e){return"Tab"===e.code||9===e.keyCode})(e)&&(0,l.default)(n.content,e),n.props.shouldCloseOnEsc&&function(e){return"Escape"===e.code||27===e.keyCode}(e)&&(e.stopPropagation(),n.requestClose(e))},n.handleOverlayOnClick=function(e){null===n.shouldClose&&(n.shouldClose=!0),n.shouldClose&&n.props.shouldCloseOnOverlayClick&&(n.ownerHandlesClose()?n.requestClose(e):n.focusContent()),n.shouldClose=null},n.handleContentOnMouseUp=function(){n.shouldClose=!1},n.handleOverlayOnMouseDown=function(e){n.props.shouldCloseOnOverlayClick||e.target!=n.overlay||e.preventDefault()},n.handleContentOnClick=function(){n.shouldClose=!1},n.handleContentOnMouseDown=function(){n.shouldClose=!1},n.requestClose=function(e){return n.ownerHandlesClose()&&n.props.onRequestClose(e)},n.ownerHandlesClose=function(){return n.props.onRequestClose},n.shouldBeClosed=function(){return!n.state.isOpen&&!n.state.beforeClose},n.contentHasFocus=function(){return document.activeElement===n.content||n.content.contains(document.activeElement)},n.buildClassName=function(e,t){var r="object"===("undefined"===typeof t?"undefined":i(t))?t:{base:v[e],afterOpen:v[e]+"--after-open",beforeClose:v[e]+"--before-close"},a=r.base;return n.state.afterOpen&&(a=a+" "+r.afterOpen),n.state.beforeClose&&(a=a+" "+r.beforeClose),"string"===typeof t&&t?a+" "+t:a},n.attributesFromObject=function(e,t){return Object.keys(t).reduce((function(n,r){return n[e+"-"+r]=t[r],n}),{})},n.state={afterOpen:!1,beforeClose:!1},n.shouldClose=null,n.moveFromContentToOverlay=null,n}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),a(t,[{key:"componentDidMount",value:function(){this.props.isOpen&&this.open()}},{key:"componentDidUpdate",value:function(e,t){this.props.isOpen&&!e.isOpen?this.open():!this.props.isOpen&&e.isOpen&&this.close(),this.props.shouldFocusAfterRender&&this.state.isOpen&&!t.isOpen&&this.focusContent()}},{key:"componentWillUnmount",value:function(){this.state.isOpen&&this.afterClose(),clearTimeout(this.closeTimer),cancelAnimationFrame(this.openAnimationFrame)}},{key:"beforeOpen",value:function(){var e=this.props,t=e.appElement,n=e.ariaHideApp,r=e.htmlOpenClassName,i=e.bodyOpenClassName,a=e.parentSelector,o=a&&a().ownerDocument||document;i&&d.add(o.body,i),r&&d.add(o.getElementsByTagName("html")[0],r),n&&(y+=1,c.hide(t)),f.default.register(this)}},{key:"render",value:function(){var e=this.props,t=e.id,n=e.className,i=e.overlayClassName,a=e.defaultStyles,o=e.children,s=n?{}:a.content,u=i?{}:a.overlay;if(this.shouldBeClosed())return null;var l={ref:this.setOverlayRef,className:this.buildClassName("overlay",i),style:r({},u,this.props.style.overlay),onClick:this.handleOverlayOnClick,onMouseDown:this.handleOverlayOnMouseDown},c=r({id:t,ref:this.setContentRef,style:r({},s,this.props.style.content),className:this.buildClassName("content",n),tabIndex:"-1",onKeyDown:this.handleKeyDown,onMouseDown:this.handleContentOnMouseDown,onMouseUp:this.handleContentOnMouseUp,onClick:this.handleContentOnClick,role:this.props.role,"aria-label":this.props.contentLabel},this.attributesFromObject("aria",r({modal:!0},this.props.aria)),this.attributesFromObject("data",this.props.data||{}),{"data-testid":this.props.testId}),d=this.props.contentElement(c,o);return this.props.overlayElement(l,d)}}]),t}(o.Component);b.defaultProps={style:{overlay:{},content:{}},defaultStyles:{}},b.propTypes={isOpen:s.default.bool.isRequired,defaultStyles:s.default.shape({content:s.default.object,overlay:s.default.object}),style:s.default.shape({content:s.default.object,overlay:s.default.object}),className:s.default.oneOfType([s.default.string,s.default.object]),overlayClassName:s.default.oneOfType([s.default.string,s.default.object]),parentSelector:s.default.func,bodyOpenClassName:s.default.string,htmlOpenClassName:s.default.string,ariaHideApp:s.default.bool,appElement:s.default.oneOfType([s.default.instanceOf(p.default),s.default.instanceOf(h.SafeHTMLCollection),s.default.instanceOf(h.SafeNodeList),s.default.arrayOf(s.default.instanceOf(p.default))]),onAfterOpen:s.default.func,onAfterClose:s.default.func,onRequestClose:s.default.func,closeTimeoutMS:s.default.number,shouldFocusAfterRender:s.default.bool,shouldCloseOnOverlayClick:s.default.bool,shouldReturnFocusAfterClose:s.default.bool,preventScroll:s.default.bool,role:s.default.string,contentLabel:s.default.string,aria:s.default.object,data:s.default.object,children:s.default.node,shouldCloseOnEsc:s.default.bool,overlayRef:s.default.func,contentRef:s.default.func,id:s.default.string,overlayElement:s.default.func,contentElement:s.default.func,testId:s.default.string},t.default=b,e.exports=t.default},QICv:function(e,t,n){var r=n("2JmJ"),i=String;e.exports=function(e){if("Symbol"===r(e))throw TypeError("Cannot convert a Symbol value to a string");return i(e)}},QIyF:function(e,t,n){var r=n("Kz5y");e.exports=function(){return r.Date.now()}},Qkng:function(e,t){e.exports="undefined"!=typeof navigator&&String(navigator.userAgent)||""},Qqun:function(e,t,n){var r=n("j0Et"),i=TypeError;e.exports=function(e){if(r(e))throw i("Can't call method on "+e);return e}},RKsz:function(e,t,n){var r=n("sCZI"),i=n("eDf4"),a=n("GOOj"),o=n("gg2M"),s=Object;e.exports=o?function(e){return"symbol"==typeof e}:function(e){var t=r("Symbol");return i(t)&&a(t.prototype,s(e))}},"RpL+":function(e,t,n){var r=n("Qqun"),i=Object;e.exports=function(e){return i(r(e))}},Rvgf:function(e,t,n){var r=n("HRax"),i=n("+BqG"),a=n("X1e3"),o=n("xnEm").f;e.exports=function(e){var t=r.Symbol||(r.Symbol={});i(t,e)||o(t,e,{value:a.f(e)})}},S1to:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var n=(0,a.default)(e);if(!n.length)return void t.preventDefault();var r=void 0,i=t.shiftKey,o=n[0],s=n[n.length-1],u=function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document;return t.activeElement.shadowRoot?e(t.activeElement.shadowRoot):t.activeElement}();if(e===u){if(!i)return;r=s}s!==u||i||(r=o);o===u&&i&&(r=s);if(r)return t.preventDefault(),void r.focus();var l=/(\bChrome\b|\bSafari\b)\//.exec(navigator.userAgent);if(null==l||"Chrome"==l[1]||null!=/\biPod\b|\biPad\b/g.exec(navigator.userAgent))return;var c=n.indexOf(u);c>-1&&(c+=i?-1:1);if("undefined"===typeof(r=n[c]))return t.preventDefault(),void(r=i?s:o).focus();t.preventDefault(),r.focus()};var r,i=n("ZDLa"),a=(r=i)&&r.__esModule?r:{default:r};e.exports=t.default},S8w2:function(e,t,n){},SfKh:function(e,t){e.exports={}},TAZq:function(e,t,n){e.exports=function(){"use strict";return function(e){function t(t){if(t)try{e(t+"}")}catch(n){}}return function(n,r,i,a,o,s,u,l,c,d){switch(n){case 1:if(0===c&&64===r.charCodeAt(0))return e(r+";"),"";break;case 2:if(0===l)return r+"/*|*/";break;case 3:switch(l){case 102:case 112:return e(i[0]+r),"";default:return r+(0===d?"/*|*/":"")}case-2:r.split("/*|*/}").forEach(t)}}}}()},TGyr:function(e,t,n){var r=n("LHWz"),i=n("uqF2"),a=r["__core-js_shared__"]||i("__core-js_shared__",{});e.exports=a},TsPY:function(e,t,n){var r=n("4wiq"),i=n("xZj3"),a=n("eDf4"),o=n("2JmJ"),s=n("sCZI"),u=n("52Wu"),l=function(){},c=[],d=s("Reflect","construct"),h=/^\s*(?:class|function)\b/,p=r(h.exec),f=!h.exec(l),m=function(e){if(!a(e))return!1;try{return d(l,c,e),!0}catch(t){return!1}},g=function(e){if(!a(e))return!1;switch(o(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return f||!!p(h,u(e))}catch(t){return!0}};g.sham=!0,e.exports=!d||i((function(){var e;return m(m.call)||!m(Object)||!m((function(){e=!0}))||e}))?g:m},UIKY:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.log=function(){console.log("portalOpenInstances ----------"),console.log(i.openInstances.length),i.openInstances.forEach((function(e){return console.log(e)})),console.log("end portalOpenInstances ----------")},t.resetState=function(){i=new r};var r=function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.register=function(e){-1===t.openInstances.indexOf(e)&&(t.openInstances.push(e),t.emit("register"))},this.deregister=function(e){var n=t.openInstances.indexOf(e);-1!==n&&(t.openInstances.splice(n,1),t.emit("deregister"))},this.subscribe=function(e){t.subscribers.push(e)},this.emit=function(e){t.subscribers.forEach((function(n){return n(e,t.openInstances.slice())}))},this.openInstances=[],this.subscribers=[]},i=new r;t.default=i},UZoB:function(e,t,n){var r=n("4wiq"),i=n("+BqG"),a=n("Yo2p"),o=n("yozl").indexOf,s=n("SfKh"),u=r([].push);e.exports=function(e,t){var n,r=a(e),l=0,c=[];for(n in r)!i(s,n)&&i(r,n)&&u(c,n);for(;t.length>l;)i(r,n=t[l++])&&(~o(c,n)||u(c,n));return c}},UfqS:function(e,t,n){var r=n("ir1D"),i=n("pROP"),a=n("orrc"),o=r(r.bind);e.exports=function(e,t){return i(e),void 0===t?e:a?o(e,t):function(){return e.apply(t,arguments)}}},VCL8:function(e,t,n){"use strict";function r(){var e=this.constructor.getDerivedStateFromProps(this.props,this.state);null!==e&&void 0!==e&&this.setState(e)}function i(e){this.setState(function(t){var n=this.constructor.getDerivedStateFromProps(e,t);return null!==n&&void 0!==n?n:null}.bind(this))}function a(e,t){try{var n=this.props,r=this.state;this.props=e,this.state=t,this.__reactInternalSnapshotFlag=!0,this.__reactInternalSnapshot=this.getSnapshotBeforeUpdate(n,r)}finally{this.props=n,this.state=r}}function o(e){var t=e.prototype;if(!t||!t.isReactComponent)throw new Error("Can only polyfill class components");if("function"!==typeof e.getDerivedStateFromProps&&"function"!==typeof t.getSnapshotBeforeUpdate)return e;var n=null,o=null,s=null;if("function"===typeof t.componentWillMount?n="componentWillMount":"function"===typeof t.UNSAFE_componentWillMount&&(n="UNSAFE_componentWillMount"),"function"===typeof t.componentWillReceiveProps?o="componentWillReceiveProps":"function"===typeof t.UNSAFE_componentWillReceiveProps&&(o="UNSAFE_componentWillReceiveProps"),"function"===typeof t.componentWillUpdate?s="componentWillUpdate":"function"===typeof t.UNSAFE_componentWillUpdate&&(s="UNSAFE_componentWillUpdate"),null!==n||null!==o||null!==s){var u=e.displayName||e.name,l="function"===typeof e.getDerivedStateFromProps?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";throw Error("Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n"+u+" uses "+l+" but also contains the following legacy lifecycles:"+(null!==n?"\n  "+n:"")+(null!==o?"\n  "+o:"")+(null!==s?"\n  "+s:"")+"\n\nThe above lifecycles should be removed. Learn more about this warning here:\nhttps://fb.me/react-async-component-lifecycle-hooks")}if("function"===typeof e.getDerivedStateFromProps&&(t.componentWillMount=r,t.componentWillReceiveProps=i),"function"===typeof t.getSnapshotBeforeUpdate){if("function"!==typeof t.componentDidUpdate)throw new Error("Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype");t.componentWillUpdate=a;var c=t.componentDidUpdate;t.componentDidUpdate=function(e,t,n){var r=this.__reactInternalSnapshotFlag?this.__reactInternalSnapshot:n;c.call(this,e,t,r)}}return e}n.r(t),n.d(t,"polyfill",(function(){return o})),r.__suppressDeprecationWarning=!0,i.__suppressDeprecationWarning=!0,a.__suppressDeprecationWarning=!0},VKEO:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resetState=function(){o=[]},t.log=function(){0},t.handleBlur=l,t.handleFocus=c,t.markForFocusLater=function(){o.push(document.activeElement)},t.returnFocus=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=null;try{return void(0!==o.length&&(t=o.pop()).focus({preventScroll:e}))}catch(n){console.warn(["You tried to return focus to",t,"but it is not in the DOM anymore"].join(" "))}},t.popWithoutFocus=function(){o.length>0&&o.pop()},t.setupScopedFocus=function(e){s=e,window.addEventListener?(window.addEventListener("blur",l,!1),document.addEventListener("focus",c,!0)):(window.attachEvent("onBlur",l),document.attachEvent("onFocus",c))},t.teardownScopedFocus=function(){s=null,window.addEventListener?(window.removeEventListener("blur",l),document.removeEventListener("focus",c)):(window.detachEvent("onBlur",l),document.detachEvent("onFocus",c))};var r,i=n("ZDLa"),a=(r=i)&&r.__esModule?r:{default:r};var o=[],s=null,u=!1;function l(){u=!0}function c(){if(u){if(u=!1,!s)return;setTimeout((function(){s.contains(document.activeElement)||((0,a.default)(s)[0]||s).focus()}),0)}}},VOtZ:function(e,t,n){var r=n("juv8"),i=n("MvSz");e.exports=function(e,t){return r(e,i(e),t)}},W2Ac:function(e,t,n){var r=n("xZj3");e.exports=!r((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},WiGv:function(e,t,n){var r=n("FTia"),i=n("TsPY"),a=n("mESY"),o=n("4Tei")("species"),s=Array;e.exports=function(e){var t;return r(e)&&(t=e.constructor,(i(t)&&(t===s||r(t.prototype))||a(t)&&null===(t=t[o]))&&(t=void 0)),void 0===t?s:t}},WkSO:function(e,t,n){"use strict";var r=n("f9pX").charAt,i=n("QICv"),a=n("53GT"),o=n("1Vnf"),s=n("HkKV"),u=a.set,l=a.getterFor("String Iterator");o(String,"String",(function(e){u(this,{type:"String Iterator",string:i(e),index:0})}),(function(){var e,t=l(this),n=t.string,i=t.index;return i>=n.length?s(void 0,!0):(e=r(n,i),t.index+=e.length,s(e,!1))}))},WkvU:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resetState=function(){for(var e=[o,s],t=0;t<e.length;t++){var n=e[t];n&&(n.parentNode&&n.parentNode.removeChild(n))}o=s=null,u=[]},t.log=function(){console.log("bodyTrap ----------"),console.log(u.length);for(var e=[o,s],t=0;t<e.length;t++){var n=e[t]||{};console.log(n.nodeName,n.className,n.id)}console.log("edn bodyTrap ----------")};var r,i=n("UIKY"),a=(r=i)&&r.__esModule?r:{default:r};var o=void 0,s=void 0,u=[];function l(){0!==u.length&&u[u.length-1].focusContent()}a.default.subscribe((function(e,t){o||s||((o=document.createElement("div")).setAttribute("data-react-modal-body-trap",""),o.style.position="absolute",o.style.opacity="0",o.setAttribute("tabindex","0"),o.addEventListener("focus",l),(s=o.cloneNode()).addEventListener("focus",l)),(u=t).length>0?(document.body.firstChild!==o&&document.body.insertBefore(o,document.body.firstChild),document.body.lastChild!==s&&document.body.appendChild(s)):(o.parentElement&&o.parentElement.removeChild(o),s.parentElement&&s.parentElement.removeChild(s))}))},WwFo:function(e,t,n){var r=n("juv8"),i=n("7GkX");e.exports=function(e,t){return e&&r(t,i(t),e)}},Wwog:function(e,t,n){"use strict";var r=Number.isNaN||function(e){return"number"===typeof e&&e!==e};function i(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(i=e[n],a=t[n],!(i===a||r(i)&&r(a)))return!1;var i,a;return!0}t.a=function(e,t){var n;void 0===t&&(t=i);var r,a=[],o=!1;return function(){for(var i=[],s=0;s<arguments.length;s++)i[s]=arguments[s];return o&&n===this&&t(i,a)||(r=e.apply(this,i),o=!0,n=this,a=i),r}}},"X+CG":function(e,t,n){var r=n("WiGv");e.exports=function(e,t){return new(r(e))(0===t?0:t)}},X1e3:function(e,t,n){var r=n("4Tei");t.f=r},XVRt:function(e,t,n){e.exports=n.p+"static/media/notifications-ico.2720215b.svg"},XYm9:function(e,t,n){var r=n("+K+b");e.exports=function(e,t){var n=t?r(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}},"Y+wj":function(e,t,n){"use strict";var r=n("0Tbm"),i=n.n(r),a=n("vgmO"),o=n.n(a);t.a=function(e,t){if(/^[a-z]+:/i.test(t))return t;/^data:/.test(e)&&(e=o.a.location&&o.a.location.href||"");var n="function"===typeof o.a.URL,r=/^\/\//.test(e),a=!o.a.location&&!/\/\//i.test(e);if(n?e=new o.a.URL(e,o.a.location||"http://example.com"):/\/\//i.test(e)||(e=i.a.buildAbsoluteURL(o.a.location&&o.a.location.href||"",e)),n){var s=new URL(t,e);return a?s.href.slice("http://example.com".length):r?s.href.slice(s.protocol.length):s.href}return i.a.buildAbsoluteURL(e,t)}},Y6hy:function(e,t,n){var r=n("mESY"),i=String,a=TypeError;e.exports=function(e){if(r(e))return e;throw a(i(e)+" is not an object")}},Ye7m:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resetState=function(){s&&(s.removeAttribute?s.removeAttribute("aria-hidden"):null!=s.length?s.forEach((function(e){return e.removeAttribute("aria-hidden")})):document.querySelectorAll(s).forEach((function(e){return e.removeAttribute("aria-hidden")})));s=null},t.log=function(){0},t.assertNodeList=u,t.setElement=function(e){var t=e;if("string"===typeof t&&o.canUseDOM){var n=document.querySelectorAll(t);u(n,t),t=n}return s=t||s},t.validateElement=l,t.hide=function(e){var t=!0,n=!1,r=void 0;try{for(var i,a=l(e)[Symbol.iterator]();!(t=(i=a.next()).done);t=!0){i.value.setAttribute("aria-hidden","true")}}catch(o){n=!0,r=o}finally{try{!t&&a.return&&a.return()}finally{if(n)throw r}}},t.show=function(e){var t=!0,n=!1,r=void 0;try{for(var i,a=l(e)[Symbol.iterator]();!(t=(i=a.next()).done);t=!0){i.value.removeAttribute("aria-hidden")}}catch(o){n=!0,r=o}finally{try{!t&&a.return&&a.return()}finally{if(n)throw r}}},t.documentNotReadyOrSSRTesting=function(){s=null};var r,i=n("2W6z"),a=(r=i)&&r.__esModule?r:{default:r},o=n("2zs7");var s=null;function u(e,t){if(!e||!e.length)throw new Error("react-modal: No elements were found for selector "+t+".")}function l(e){var t=e||s;return t?Array.isArray(t)||t instanceof HTMLCollection||t instanceof NodeList?t:[t]:((0,a.default)(!1,["react-modal: App element is not defined.","Please use `Modal.setAppElement(el)` or set `appElement={el}`.","This is needed so screen readers don't see main content","when modal is opened. It is not recommended, but you can opt-out","by setting `ariaHideApp={false}`."].join(" ")),[])}},Yo2p:function(e,t,n){var r=n("CvoT"),i=n("Qqun");e.exports=function(e){return r(i(e))}},ZDLa:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function e(t){return[].slice.call(t.querySelectorAll("*"),0).reduce((function(t,n){return t.concat(n.shadowRoot?e(n.shadowRoot):[n])}),[]).filter(o)};var r=/input|select|textarea|button|object|iframe/;function i(e){var t=e.offsetWidth<=0&&e.offsetHeight<=0;if(t&&!e.innerHTML)return!0;try{var n=window.getComputedStyle(e),r=n.getPropertyValue("display");return t?"contents"!==r&&function(e,t){return"visible"!==t.getPropertyValue("overflow")||e.scrollWidth<=0&&e.scrollHeight<=0}(e,n):"none"===r}catch(i){return console.warn("Failed to inspect element style"),!1}}function a(e,t){var n=e.nodeName.toLowerCase();return(r.test(n)&&!e.disabled||"a"===n&&e.href||t)&&function(e){for(var t=e,n=e.getRootNode&&e.getRootNode();t&&t!==document.body;){if(n&&t===n&&(t=n.host.parentNode),i(t))return!1;t=t.parentNode}return!0}(e)}function o(e){var t=e.getAttribute("tabindex");null===t&&(t=void 0);var n=isNaN(t);return(n||t>=0)&&a(e,!n)}e.exports=t.default},ZWFX:function(e,t,n){"use strict";var r=n("1OyB"),i=n("vuIU"),a=n("JX7q"),o=n("Ji7U"),s=n("LK+K"),u=n("q1tI"),l=n.n(u),c=n("qhky"),d=n("JkJM"),h=n("ez+O"),p=(n("8kdZ"),n("HfWI"),n("6+Fx"),n("Dtfp"),n("DKAt"),n("Keil"),n("weF/"),n("+/7S"),n("+YUa"),n("WkSO"),n("nNRg"),n("17x9")),f=n.n(p),m=n("3OWR"),g=n.n(m),v=n("uhBA"),y=n.n(v),b=!1;if("undefined"!==typeof window)try{var _=Object.defineProperty({},"passive",{get:function(){b=!0}});window.addEventListener("test",null,_),window.removeEventListener("test",null,_)}catch(nt){}var T=b,S={connections:{},EE:new y.a,enableResizeInfo:!1,enableScrollInfo:!1,listeners:{},removers:[],supportPassiveEvent:T},w=S.supportPassiveEvent,k={capture:!1,passive:!1};var C=function(e,t,n,r){var i="addEventListener",a="removeEventListener",o=t,s=!!w&&g()({},k,r);return!e.addEventListener&&e.attachEvent&&(i="attachEvent",a="detachEvent",o="on"+t),e[i](o,n,s),{remove:function(){e[a](t,n)}}},E=!1;if("undefined"!==typeof navigator){var A=navigator.userAgent.match(/MSIE (\d+\.\d+)/);A&&(E=parseFloat(A[1],10)<9)}var x=E,P=n("uM7l"),I=n.n(P),O=n("DzJC"),L=n.n(O),D=n("vN+2"),M=n.n(D),R=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function N(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var j={width:0,height:0},B={delta:0,top:0},U={axisIntention:"",startX:0,startY:0,deltaX:0,deltaY:0},F=function(e){var t={x:0,y:0},n=document.body,r=document.documentElement;return e.pageX||e.pageY?(t.x=e.pageX,t.y=e.pageY):(t.x=e.clientX+n.scrollLeft+r.scrollLeft,t.y=e.clientY+n.scrollTop+r.scrollTop),t},q=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};N(this,e);var n=(t.mainType||"").toLowerCase(),r=(t.subType||"").toLowerCase();this.mainType=n,this.subType=r,this.type=n+r.charAt(0).toUpperCase()+r.slice(1)||"",this.scroll=B,this.resize=j,this.touch=U}return R(e,[{key:"update",value:function(e){var t=this.mainType,n=this.subType,r=document.documentElement;if(S.enableScrollInfo&&("scroll"===t||"touchmove"===t)){var i=r.scrollTop+document.body.scrollTop;i!==this.scroll.top&&(this.scroll.delta=i-this.scroll.top,this.scroll.top=i)}if(S.enableResizeInfo&&"resize"===t&&(this.resize.width=window.innerWidth||r.clientWidth,this.resize.height=window.innerHeight||r.clientHeight),S.enableTouchInfo&&e.touches&&("touchstart"===t||"touchmove"===t||"touchend"===t)){var a=void 0,o=void 0,s=void 0;"touchstart"===t||"start"===n?(a=F(e.touches[0]),this.touch.axisIntention="",this.touch.startX=a.x,this.touch.startY=a.y,this.touch.deltaX=0,this.touch.deltaY=0):"touchmove"===t&&(a=F(e.touches[0]),this.touch.deltaX=a.x-this.touch.startX,this.touch.deltaY=a.y-this.touch.startY,""===this.touch.axisIntention&&(o=Math.abs(this.touch.deltaX),s=Math.abs(this.touch.deltaY),o>5&&o>=s?this.touch.axisIntention="x":s>5&&s>o&&(this.touch.axisIntention="y")))}}}]),e}(),H=n("xEkU"),z=n.n(H),W=Date.now||function(){return(new Date).getTime()};var V=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:15,n=void 0,r=void 0,i=0,a=0,o=function o(){var s=W();t-(s-i)<=0?(i=s,a=0,e.apply(n,r)):a=z()(o)};return function(){n=this,r=arguments,a||(a=z()(o))}},K=S.connections,G=S.EE,X=S.listeners,Y=S.removers,Q=void 0,$=void 0,Z=void 0,J=0;function ee(e){return e.id||"target-id-"+J++}function te(e,t,n,r){return G.on(e,t||M.a,n),K[r=r||e]=(K[r]||0)+1,{_type:e,_cb:t,_ctx:n,unsubscribe:function(){if(this._type){G.removeListener(e,t,n),K[r]--,0===K[r]&&(X[r].remove(),X[r]=void 0),this._type=void 0,this._cb=void 0,this._ctx=void 0;for(var i=Y.length-1;i>=0;i--){if(Y[i]===this){Y.splice(i,1);break}}}}}}function ne(e,t,n){return function(r,i,a,o){var s=a.context,u=a.target,l=u&&ee(u),c=l?":"+l:"",d=t+"Start:"+r+c,h=t+"End:"+r+c,p=t+":"+r+c,f=te(n+":"+r+c,i,s,p);if(Y.push(f),X[p])return f;var m={start:new q({mainType:t,subType:"start"}),main:new q({mainType:t}),end:new q({mainType:t,subType:"end"})};"raf"===r?(r=16,y=V(y)):r>0&&(y=L()(y,r));var g=void 0;function v(e){m.end.update(e),G.emit(h,e,m.end),g=null}function y(e){g||(m.start.update(e),G.emit(d,e,m.start)),clearTimeout(g),m.main.update(e),G.emit(p,e,m.main),g=x?setTimeout((function(){v(I()(e))}),r+100):setTimeout(v.bind(null,e),r+100)}return X[p]=C(u||e,t,y,o),f}}function re(e,t){return function(n,r,i,a){var o=i.context,s=i.target,u=s&&ee(s),l=t+":0"+(u?":"+u:""),c=te(l,r,o);if(Y.push(c),X[l])return c;var d=new q({mainType:t});return X[l]=C(s||e,t,(function(e){d.update(e),G.emit(l,e,d)}),a),c}}"undefined"!==typeof window&&(Z=(Q=($=window).document||document).body);var ie={scrollStart:ne($,"scroll","scrollStart"),scrollEnd:ne($,"scroll","scrollEnd"),scroll:ne($,"scroll","scroll"),resizeStart:ne($,"resize","resizeStart"),resizeEnd:ne($,"resize","resizeEnd"),resize:ne($,"resize","resize"),visibilitychange:re(Q,"visibilitychange"),touchmoveStart:ne(Z,"touchmove","touchmoveStart"),touchmoveEnd:ne(Z,"touchmove","touchmoveEnd"),touchmove:ne(Z,"touchmove","touchmove"),touchstart:re(Z,"touchstart"),touchend:re(Z,"touchend")};var ae=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.useRAF||!1,i=parseInt(n.throttleRate,10),a=n.eventOptions;return isNaN(i)&&(i=50),r&&(i="raf"),x&&(i=0),S.enableScrollInfo=S.enableScrollInfo||n.enableScrollInfo||!1,S.enableResizeInfo=S.enableResizeInfo||n.enableResizeInfo||!1,S.enableTouchInfo=S.enableTouchInfo||n.enableTouchInfo||!1,ie[e](i,t,n,a)};S.removers;var oe="undefined"!==typeof window;function se(){0}var ue=oe?ae:se,le=n("TSYQ"),ce=n.n(le),de=n("Gytx"),he=n.n(de);function pe(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function fe(e){return(fe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function me(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function ge(e,t){return(ge=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function ve(e){var t=function(){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}}();return function(){var n,r=_e(e);if(t){var i=_e(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return ye(this,n)}}function ye(e,t){if(t&&("object"===fe(t)||"function"===typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return be(e)}function be(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _e(e){return(_e=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Te,Se,we,ke,Ce,Ee="transform",Ae=!0,xe=0,Pe=-1,Ie=function(e){!function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ge(e,t)}(a,e);var t,n,r,i=ve(a);function a(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),(n=i.call(this,e,t)).handleResize=n.handleResize.bind(be(n)),n.handleScroll=n.handleScroll.bind(be(n)),n.handleScrollStart=n.handleScrollStart.bind(be(n)),n.delta=0,n.stickyTop=0,n.stickyBottom=0,n.frozen=!1,n.skipNextScrollEvent=!1,n.scrollTop=-1,n.bottomBoundaryTarget,n.topTarget,n.subscribers,n.state={top:0,bottom:0,width:0,height:0,x:0,y:0,topBoundary:0,bottomBoundary:1/0,status:0,pos:0,activated:!1},n}return t=a,(n=[{key:"getTargetHeight",value:function(e){return e&&e.offsetHeight||0}},{key:"getTopPosition",value:function(e){return"string"===typeof(e=e||this.props.top||0)&&(this.topTarget||(this.topTarget=Te.querySelector(e)),e=this.getTargetHeight(this.topTarget)),e}},{key:"getTargetBottom",value:function(e){if(!e)return-1;var t=e.getBoundingClientRect();return this.scrollTop+t.bottom}},{key:"getBottomBoundary",value:function(e){var t=e||this.props.bottomBoundary;return"object"===fe(t)&&(t=t.value||t.target||0),"string"===typeof t&&(this.bottomBoundaryTarget||(this.bottomBoundaryTarget=Te.querySelector(t)),t=this.getTargetBottom(this.bottomBoundaryTarget)),t&&t>0?t:1/0}},{key:"reset",value:function(){this.setState({status:0,pos:0})}},{key:"release",value:function(e){this.setState({status:1,pos:e-this.state.y})}},{key:"fix",value:function(e){this.setState({status:2,pos:e})}},{key:"updateInitialDimension",value:function(e){if(e=e||{},this.outerElement&&this.innerElement){var t=this.outerElement.getBoundingClientRect(),n=this.innerElement.getBoundingClientRect(),r=t.width||t.right-t.left,i=n.height||n.bottom-n.top,a=t.top+this.scrollTop;this.setState({top:this.getTopPosition(e.top),bottom:Math.min(this.state.top+i,Pe),width:r,height:i,x:t.left,y:a,bottomBoundary:this.getBottomBoundary(e.bottomBoundary),topBoundary:a})}}},{key:"handleResize",value:function(e,t){this.props.shouldFreeze()||(Pe=t.resize.height,this.updateInitialDimension(),this.update())}},{key:"handleScrollStart",value:function(e,t){this.frozen=this.props.shouldFreeze(),this.frozen||(this.scrollTop===t.scroll.top?this.skipNextScrollEvent=!0:(this.scrollTop=t.scroll.top,this.updateInitialDimension()))}},{key:"handleScroll",value:function(e,t){this.skipNextScrollEvent?this.skipNextScrollEvent=!1:(xe=t.scroll.delta,this.scrollTop=t.scroll.top,this.update())}},{key:"update",value:function(){if(!this.props.enabled||this.state.bottomBoundary-this.state.topBoundary<=this.state.height||0===this.state.width&&0===this.state.height)0!==this.state.status&&this.reset();else{var e=xe,t=this.scrollTop+this.state.top,n=this.scrollTop+this.state.bottom;if(t<=this.state.topBoundary)this.reset();else if(n>=this.state.bottomBoundary)this.stickyBottom=this.state.bottomBoundary,this.stickyTop=this.stickyBottom-this.state.height,this.release(this.stickyTop);else if(this.state.height>Pe-this.state.top)switch(this.state.status){case 0:this.release(this.state.y),this.stickyTop=this.state.y,this.stickyBottom=this.stickyTop+this.state.height;case 1:this.stickyBottom=this.stickyTop+this.state.height,e>0&&n>this.stickyBottom?this.fix(this.state.bottom-this.state.height):e<0&&t<this.stickyTop&&this.fix(this.state.top);break;case 2:var r=!0,i=this.state.pos,a=this.state.height;if(e>0&&i===this.state.top)this.stickyTop=t-e,this.stickyBottom=this.stickyTop+a;else if(e<0&&i===this.state.bottom-a)this.stickyBottom=n-e,this.stickyTop=this.stickyBottom-a;else if(i!==this.state.bottom-a&&i!==this.state.top){var o=i+a-this.state.bottom;this.stickyBottom=n-e+o,this.stickyTop=this.stickyBottom-a}else r=!1;r&&this.release(this.stickyTop)}else this.fix(this.state.top);this.delta=e}}},{key:"componentDidUpdate",value:function(e,t){var n=this;t.status!==this.state.status&&this.props.onStateChange&&this.props.onStateChange({status:this.state.status}),this.props.top!==t.top&&(this.updateInitialDimension(),this.update()),!he()(this.props,e)&&(e.enabled!==this.props.enabled?this.props.enabled?this.setState({activated:!0},(function(){n.updateInitialDimension(),n.update()})):this.setState({activated:!1},(function(){n.reset()})):e.top===this.props.top&&e.bottomBoundary===this.props.bottomBoundary||(this.updateInitialDimension(),this.update()))}},{key:"componentWillUnmount",value:function(){for(var e=(this.subscribers||[]).length-1;e>=0;e--)this.subscribers[e].unsubscribe()}},{key:"componentDidMount",value:function(){Ce||(Ce=window,Te=document,we=Te.documentElement,Se=Te.body,Pe=Ce.innerHeight||we.clientHeight,(ke=window.Modernizr)&&ke.prefixed&&(Ae=ke.csstransforms3d,Ee=ke.prefixed("transform"))),this.scrollTop=Se.scrollTop+we.scrollTop,this.props.enabled&&(this.setState({activated:!0}),this.updateInitialDimension(),this.update()),this.subscribers=[ue("scrollStart",this.handleScrollStart.bind(this),{useRAF:!0}),ue("scroll",this.handleScroll.bind(this),{useRAF:!0,enableScrollInfo:!0}),ue("resize",this.handleResize.bind(this),{enableResizeInfo:!0})]}},{key:"translate",value:function(e,t){Ae&&this.props.enableTransforms&&this.state.activated?e[Ee]="translate3d(0,"+Math.round(t)+"px,0)":e.top=t+"px"}},{key:"shouldComponentUpdate",value:function(e,t){return!this.props.shouldFreeze()&&!(he()(this.props,e)&&he()(this.state,t))}},{key:"render",value:function(){var e,t=this,n={position:2===this.state.status?"fixed":"relative",top:2===this.state.status?"0px":"",zIndex:this.props.innerZ},r={};this.translate(n,this.state.pos),0!==this.state.status&&(n.width=this.state.width+"px",r.height=this.state.height+"px");var i=ce()("sticky-outer-wrapper",this.props.className,(pe(e={},this.props.activeClass,2===this.state.status),pe(e,this.props.releasedClass,1===this.state.status),e)),a=ce()("sticky-inner-wrapper",this.props.innerClass,pe({},this.props.innerActiveClass,2===this.state.status)),o=this.props.children;return l.a.createElement("div",{ref:function(e){t.outerElement=e},className:i,style:r},l.a.createElement("div",{ref:function(e){t.innerElement=e},className:a,style:n},"function"===typeof o?o({status:this.state.status}):o))}}])&&me(t.prototype,n),r&&me(t,r),Object.defineProperty(t,"prototype",{writable:!1}),a}(u.Component);Ie.displayName="Sticky",Ie.defaultProps={shouldFreeze:function(){return!1},enabled:!0,top:0,bottomBoundary:0,enableTransforms:!0,activeClass:"active",releasedClass:"released",onStateChange:null,innerClass:"",innerActiveClass:""},Ie.propTypes={enabled:f.a.bool,top:f.a.oneOfType([f.a.string,f.a.number]),bottomBoundary:f.a.oneOfType([f.a.object,f.a.string,f.a.number]),enableTransforms:f.a.bool,activeClass:f.a.string,releasedClass:f.a.string,innerClass:f.a.string,innerActiveClass:f.a.string,className:f.a.string,onStateChange:f.a.func,shouldFreeze:f.a.func,innerZ:f.a.oneOfType([f.a.string,f.a.number])},Ie.STATUS_ORIGINAL=0,Ie.STATUS_RELEASED=1,Ie.STATUS_FIXED=2;var Oe=Ie,Le=n("/MKj"),De=n("ANjH"),Me=n("nZn3"),Re=n("itc3"),Ne=n("diH0"),je=n("55Ip"),Be=n("yCm8"),Ue=n("azCW"),Fe=n.n(Ue),qe=l.a.createElement,He=function(e){var t=e.article;e.noImage;return qe("article",null,qe(je.Link,{to:"/"+t.getCanonicalUri()},qe(Be.ImageOrNoImage,{image:t.getImageObject(),width:120,alt:t.headline,shape:"square",noImage:Fe.a})),qe("p",null,qe(je.Link,{to:"/"+t.getSectionId()},t.getGrandSectionId())),qe("p",null,qe(je.Link,{to:"/"+t.getCanonicalUri()},t.headline),("SPONSORED"===t.sponsoredIndicator||"SPONSORED_EXPIRED"===t.sponsoredIndicator)&&qe("small",{className:"sponsored"},"Sponsored"),("NATIVE"===t.sponsoredIndicator||"NATIVE_EXPIRED"===t.sponsoredIndicator)&&qe("small",{className:"native"},"Partnered")))},ze=n("0srb"),We=l.a.createElement,Ve=function(e){return We(l.a.Fragment,null,We("h2",null,"Most Popular"),We(ze.Articles,{section:e.section||"news",page0Limit:e.pageSize+1,pageSize:e.pageSize+1,fetchArticles:e.fetchMostReadArticles,noImage:e.noImage,notFound:function(){return We("div",null,"Oops!")},noDiv:!0,fetchMoreArticles:function(){},articles:e.articles,component:function(t){return t.articles.filter((function(t){return t.contentKey!==e.contentKey})).slice(0,e.pageSize).map((function(t,n){return We("div",{key:"mr-"+t.uuid,className:e.className},We(He,{article:t}))}))}}))};Ve.defaultProps={pageSize:3};var Ke=Object(Le.connect)((function(e){return{articles:e.mostReadArticles}}),(function(e){return Object(De.bindActionCreators)({fetchMostReadArticles:Ne.b},e)}))(Ve),Ge=n("wAi/"),Xe=n("35Mb"),Ye=n("8FTj"),Qe=n("XVRt"),$e=n.n(Qe),Ze=l.a.createElement,Je=function(e){var t=Object(u.useState)(0),n=t[0],r=t[1];return Object(u.useEffect)((function(){var e=Object(Ye.a)("NotificationsLastViewed");Xe.b.messages.toArray().then((function(t){return r(t.filter((function(t){return Date.parse(t.timestamp)>Date.parse(e)})).length)}))}),[]),Ze(Ge.a,{to:"/my-notifications",mr:10,title:"View recent push notifications.",className:"my-notifications"},Ze("div",null,Ze("img",{src:$e.a,alt:"View "+n+" recent articles pushed to you."}),n>0&&Ze("span",null,Ze("span",null,n))),Ze("div",null,"View my notifications"))},et=l.a.createElement,tt=function(e){Object(o.a)(n,e);var t=Object(s.a)(n);function n(e){var i;return Object(r.a)(this,n),(i=t.call(this,e)).handleSubmit=i.handleSubmit.bind(Object(a.a)(i)),i.handleChange=i.handleChange.bind(Object(a.a)(i)),i.state={hasMounted:!1},i}return Object(i.a)(n,[{key:"componentDidMount",value:function(){this.setState({hasMounted:!0})}},{key:"handleChange",value:function(e){var t={};t[e.target.name]=e.target.value,this.props.updateForm(t)}},{key:"validateName",value:function(e){return e.match(/^[`a-zA-Z\xe0\xe8\xec\xf2\xf9\xc0\xc8\xcc\xd2\xd9\xe1\xe9\xed\xf3\xfa\xfd\xc1\xc9\xcd\xd3\xda\xdd\xe2\xea\xee\xf4\xfb\xc2\xca\xce\xd4\xdb\xe3\xf1\xf5\xc3\xd1\xd5\xe4\xeb\xef\xf6\xfc\xff\xc4\xcb\xcf\xd6\xdc\u0178\xe7\xc7\xdf\xd8\xf8\xc5\xe5\xc6\xe6\u0153' -]{2,45}$/i)}},{key:"validateEmail",value:function(e){return e.match(/^[^.@][^@]+@{1}[^@]+\.[^@]+[^.@]$/i)}},{key:"handleSubmit",value:function(e){return e.preventDefault(),this.validateEmail(this.props.email)?this.validateName(this.props.firstName)&&this.validateName(this.props.lastName)?(this.props.subscribeNewsletter({email:this.props.email,firstName:this.props.firstName,lastName:this.props.lastName}),!0):(this.props.updateForm({error:"Please enter valid first and last names"}),!1):(this.props.updateForm({error:"Please enter a valid email address"}),!1)}},{key:"render",value:function(){var e=this.props,t=!e.hasSubmitted&&!e.isSubmitting,n=e.isSubmitting,r=e.hasSubmitted;return et("aside",{className:"sidebar",id:"sidebar"},et(Re.Mobile,null,et("div",{id:"adngin-leaderboard-3-0",className:"advert-leaderboard-3"})),this.state.hasMounted&&et(Re.DesktopTablet,{values:{deviceWidth:Re.defaultWidth}},et("div",{className:"follow-us"},et("span",null,"Follow us"),et("nav",null,et("ul",null,et("li",null,et("a",{href:"https://www.linkedin.com/company/cond\xe9-nast-independent-magazines-south-africa/mycompany/?viewAsMember=true",target:"_blank",rel:"noopener noreferrer",title:"Follow House and Garden on LinkedIn"},et(Me.LinkedIn,{width:"18",height:"18"}))),et("li",null,et("a",{href:"https://www.facebook.com/HouseGardenSA/",target:"_blank",rel:"noopener noreferrer",title:"Like House and Garden on Facebook"},et(Me.Facebook,{width:"18",height:"18"}))),et("li",null,et("a",{href:"https://www.instagram.com/houseandgardensa/",target:"_blank",rel:"noopener noreferrer",title:"Follow House and Garden on Instagram"},et(Me.Instagram,{width:"18",height:"18"}))),et("li",null,et("a",{href:"https://za.pinterest.com/housegardensa/",target:"_blank",rel:"noopener noreferrer",title:"Follow House and Garden on Pinterest"},et(Me.Pinterest,{width:"18",height:"18"}))),et("li",null,et("a",{href:"https://twitter.com/HouseGardenSA",target:"_blank",rel:"noopener noreferrer",title:"Follow House and Garden on Twitter"},et(Me.Twitter,{width:"18",height:"18",fill:"white"}))),et("li",null,et("a",{href:"https://www.youtube.com/channel/UC17OWNqdopaDxqz0vOCwhFg",target:"_blank",rel:"noopener noreferrer",title:"Subscribe to House and Garden on Youtube"},et(Me.Youtube,{width:"18",height:"18"}))),et("li",null,et("a",{href:"https://www.tiktok.com/@houseandgardensa",target:"_blank",rel:"noopener noreferrer",title:"Subscribe to House and Garden on TikTok "},et(Me.TikTok,{width:"18",height:"18"}))))))),et("div",{className:"sidebar-search"},et("form",{action:"/search",method:"get"},et("input",{type:"search",placeholder:"Search House & Garden",name:"q",id:"q"}),et("button",null,et(Me.Search,null)))),et(Je,null),e.children,this.state.hasMounted&&et("div",{id:"adngin-mpu-1-0",className:"advert-sidebar"}),et("div",{className:"newsletter-subscribe"},et("h5",null,"Sign up to your weekly dose of inspiration"),t&&et(l.a.Fragment,null,et("form",{name:"item-form",id:"item-form",onSubmit:this.handleSubmit},e.error&&et("small",{style:{color:"red"}},this.props.error?this.props.error:"An error occured, please try again"),et("input",{type:"text",name:"firstName",placeholder:"First Name",id:"firstName",value:this.props.firstName,onChange:this.handleChange,required:!0}),et("input",{type:"text",name:"lastName",placeholder:"Last Name",id:"lastName",value:this.props.lastName,onChange:this.handleChange}),et("input",{type:"email",name:"email",placeholder:"Email Address",id:"email",value:this.props.email,onChange:this.handleChange,required:!0}),et("button",{type:"submit"},"Subscribe"))),n&&et(l.a.Fragment,null,et(c.default,{title:"Article"}),et(d.Segment,null,et(d.Dimmer,{active:!0},et(d.Loader,{indeterminate:!0,size:"large"},"Submitting subscription.....")))),r&&et(l.a.Fragment,null,et(c.default,{title:"Article"}),et("h3",null,"Thank you for Subscribing!"),et("p",null,"We have sent a confirmation email to the email address that you provided. Click on the link in the email to confirm your subscription to our newsletter."))),et("div",null,et("div",{id:"adngin-mpu-2-0",className:"advert-sidebar"})),et("div",{className:"sidebar-articles"},et(Ke,{section:e.section,className:"side-articles",noImage:Fe.a,contentKey:this.props.contentKey})),et(l.a.Fragment,null,this.state.hasMounted&&et(Re.Desktop,null,et(Oe,{bottomBoundary:"#sidebar",top:122},et("div",{id:"adngin-halfpage-1-0",className:"advert-sidebar"}))),this.state.hasMounted&&et(Re.Tablet,null,et("div",{id:"adngin-halfpage-1-0",className:"advert-sidebar"}))))}}]),n}(u.Component);t.a=Object(Le.connect)((function(e){return Object.assign({},e.subscribe)}),(function(e){return Object(De.bindActionCreators)({subscribeNewsletter:h.c,updateForm:h.d,reinitialize:h.b},e)}))(tt)},a0yg:function(e,t,n){var r=n("W2Ac"),i=n("xZj3"),a=n("zMKt");e.exports=!r&&!i((function(){return 7!=Object.defineProperty(a("div"),"a",{get:function(){return 7}}).a}))},aJjT:function(e,t,n){e.exports=function e(t){"use strict";var n=/^\0+/g,r=/[\0\r\f]/g,i=/: */g,a=/zoo|gra/,o=/([,: ])(transform)/g,s=/,+\s*(?![^(]*[)])/g,u=/ +\s*(?![^(]*[)])/g,l=/ *[\0] */g,c=/,\r+?/g,d=/([\t\r\n ])*\f?&/g,h=/:global\(((?:[^\(\)\[\]]*|\[.*\]|\([^\(\)]*\))*)\)/g,p=/\W+/g,f=/@(k\w+)\s*(\S*)\s*/,m=/::(place)/g,g=/:(read-only)/g,v=/\s+(?=[{\];=:>])/g,y=/([[}=:>])\s+/g,b=/(\{[^{]+?);(?=\})/g,_=/\s{2,}/g,T=/([^\(])(:+) */g,S=/[svh]\w+-[tblr]{2}/,w=/\(\s*(.*)\s*\)/g,k=/([\s\S]*?);/g,C=/-self|flex-/g,E=/[^]*?(:[rp][el]a[\w-]+)[^]*/,A=/stretch|:\s*\w+\-(?:conte|avail)/,x=/([^-])(image-set\()/,P="-webkit-",I="-moz-",O="-ms-",L=59,D=125,M=123,R=40,N=41,j=10,B=13,U=32,F=45,q=42,H=44,z=58,W=47,V=1,K=1,G=0,X=1,Y=1,Q=1,$=0,Z=0,J=0,ee=[],te=[],ne=0,re=null,ie=0,ae=1,oe="",se="",ue="";function le(e,t,i,a,o){for(var s,u,c=0,d=0,h=0,p=0,v=0,y=0,b=0,_=0,S=0,k=0,C=0,E=0,A=0,x=0,I=0,O=0,$=0,te=0,re=0,de=i.length,ve=de-1,ye="",be="",_e="",Te="",Se="",we="";I<de;){if(b=i.charCodeAt(I),I===ve&&d+p+h+c!==0&&(0!==d&&(b=d===W?j:W),p=h=c=0,de++,ve++),d+p+h+c===0){if(I===ve&&(O>0&&(be=be.replace(r,"")),be.trim().length>0)){switch(b){case U:case 9:case L:case B:case j:break;default:be+=i.charAt(I)}b=L}if(1===$)switch(b){case M:case D:case L:case 34:case 39:case R:case N:case H:$=0;case 9:case B:case j:case U:break;default:for($=0,re=I,v=b,I--,b=L;re<de;)switch(i.charCodeAt(re++)){case j:case B:case L:++I,b=v,re=de;break;case z:O>0&&(++I,b=v);case M:re=de}}switch(b){case M:for(v=(be=be.trim()).charCodeAt(0),C=1,re=++I;I<de;){switch(b=i.charCodeAt(I)){case M:C++;break;case D:C--;break;case W:switch(y=i.charCodeAt(I+1)){case q:case W:I=ge(y,I,ve,i)}break;case 91:b++;case R:b++;case 34:case 39:for(;I++<ve&&i.charCodeAt(I)!==b;);}if(0===C)break;I++}switch(_e=i.substring(re,I),0===v&&(v=(be=be.replace(n,"").trim()).charCodeAt(0)),v){case 64:switch(O>0&&(be=be.replace(r,"")),y=be.charCodeAt(1)){case 100:case 109:case 115:case F:s=t;break;default:s=ee}if(re=(_e=le(t,s,_e,y,o+1)).length,J>0&&0===re&&(re=be.length),ne>0&&(u=me(3,_e,s=ce(ee,be,te),t,K,V,re,y,o,a),be=s.join(""),void 0!==u&&0===(re=(_e=u.trim()).length)&&(y=0,_e="")),re>0)switch(y){case 115:be=be.replace(w,fe);case 100:case 109:case F:_e=be+"{"+_e+"}";break;case 107:_e=(be=be.replace(f,"$1 $2"+(ae>0?oe:"")))+"{"+_e+"}",_e=1===Y||2===Y&&pe("@"+_e,3)?"@"+P+_e+"@"+_e:"@"+_e;break;default:_e=be+_e,112===a&&(Te+=_e,_e="")}else _e="";break;default:_e=le(t,ce(t,be,te),_e,a,o+1)}Se+=_e,E=0,$=0,x=0,O=0,te=0,A=0,be="",_e="",b=i.charCodeAt(++I);break;case D:case L:if((re=(be=(O>0?be.replace(r,""):be).trim()).length)>1)switch(0===x&&((v=be.charCodeAt(0))===F||v>96&&v<123)&&(re=(be=be.replace(" ",":")).length),ne>0&&void 0!==(u=me(1,be,t,e,K,V,Te.length,a,o,a))&&0===(re=(be=u.trim()).length)&&(be="\0\0"),v=be.charCodeAt(0),y=be.charCodeAt(1),v){case 0:break;case 64:if(105===y||99===y){we+=be+i.charAt(I);break}default:if(be.charCodeAt(re-1)===z)break;Te+=he(be,v,y,be.charCodeAt(2))}E=0,$=0,x=0,O=0,te=0,be="",b=i.charCodeAt(++I)}}switch(b){case B:case j:if(d+p+h+c+Z===0)switch(k){case N:case 39:case 34:case 64:case 126:case 62:case q:case 43:case W:case F:case z:case H:case L:case M:case D:break;default:x>0&&($=1)}d===W?d=0:X+E===0&&107!==a&&be.length>0&&(O=1,be+="\0"),ne*ie>0&&me(0,be,t,e,K,V,Te.length,a,o,a),V=1,K++;break;case L:case D:if(d+p+h+c===0){V++;break}default:switch(V++,ye=i.charAt(I),b){case 9:case U:if(p+c+d===0)switch(_){case H:case z:case 9:case U:ye="";break;default:b!==U&&(ye=" ")}break;case 0:ye="\\0";break;case 12:ye="\\f";break;case 11:ye="\\v";break;case 38:p+d+c===0&&X>0&&(te=1,O=1,ye="\f"+ye);break;case 108:if(p+d+c+G===0&&x>0)switch(I-x){case 2:112===_&&i.charCodeAt(I-3)===z&&(G=_);case 8:111===S&&(G=S)}break;case z:p+d+c===0&&(x=I);break;case H:d+h+p+c===0&&(O=1,ye+="\r");break;case 34:case 39:0===d&&(p=p===b?0:0===p?b:p);break;case 91:p+d+h===0&&c++;break;case 93:p+d+h===0&&c--;break;case N:p+d+c===0&&h--;break;case R:if(p+d+c===0){if(0===E)switch(2*_+3*S){case 533:break;default:C=0,E=1}h++}break;case 64:d+h+p+c+x+A===0&&(A=1);break;case q:case W:if(p+c+h>0)break;switch(d){case 0:switch(2*b+3*i.charCodeAt(I+1)){case 235:d=W;break;case 220:re=I,d=q}break;case q:b===W&&_===q&&re+2!==I&&(33===i.charCodeAt(re+2)&&(Te+=i.substring(re,I+1)),ye="",d=0)}}if(0===d){if(X+p+c+A===0&&107!==a&&b!==L)switch(b){case H:case 126:case 62:case 43:case N:case R:if(0===E){switch(_){case 9:case U:case j:case B:ye+="\0";break;default:ye="\0"+ye+(b===H?"":"\0")}O=1}else switch(b){case R:x+7===I&&108===_&&(x=0),E=++C;break;case N:0==(E=--C)&&(O=1,ye+="\0")}break;case 9:case U:switch(_){case 0:case M:case D:case L:case H:case 12:case 9:case U:case j:case B:break;default:0===E&&(O=1,ye+="\0")}}be+=ye,b!==U&&9!==b&&(k=b)}}S=_,_=b,I++}if(re=Te.length,J>0&&0===re&&0===Se.length&&0===t[0].length==0&&(109!==a||1===t.length&&(X>0?se:ue)===t[0])&&(re=t.join(",").length+2),re>0){if(s=0===X&&107!==a?function(e){for(var t,n,i=0,a=e.length,o=Array(a);i<a;++i){for(var s=e[i].split(l),u="",c=0,d=0,h=0,p=0,f=s.length;c<f;++c)if(!(0===(d=(n=s[c]).length)&&f>1)){if(h=u.charCodeAt(u.length-1),p=n.charCodeAt(0),t="",0!==c)switch(h){case q:case 126:case 62:case 43:case U:case R:break;default:t=" "}switch(p){case 38:n=t+se;case 126:case 62:case 43:case U:case N:case R:break;case 91:n=t+n+se;break;case z:switch(2*n.charCodeAt(1)+3*n.charCodeAt(2)){case 530:if(Q>0){n=t+n.substring(8,d-1);break}default:(c<1||s[c-1].length<1)&&(n=t+se+n)}break;case H:t="";default:n=d>1&&n.indexOf(":")>0?t+n.replace(T,"$1"+se+"$2"):t+n+se}u+=n}o[i]=u.replace(r,"").trim()}return o}(t):t,ne>0&&void 0!==(u=me(2,Te,s,e,K,V,re,a,o,a))&&0===(Te=u).length)return we+Te+Se;if(Te=s.join(",")+"{"+Te+"}",Y*G!=0){switch(2!==Y||pe(Te,2)||(G=0),G){case 111:Te=Te.replace(g,":-moz-$1")+Te;break;case 112:Te=Te.replace(m,"::"+P+"input-$1")+Te.replace(m,"::-moz-$1")+Te.replace(m,":-ms-input-$1")+Te}G=0}}return we+Te+Se}function ce(e,t,n){var r=t.trim().split(c),i=r,a=r.length,o=e.length;switch(o){case 0:case 1:for(var s=0,u=0===o?"":e[0]+" ";s<a;++s)i[s]=de(u,i[s],n,o).trim();break;default:s=0;var l=0;for(i=[];s<a;++s)for(var d=0;d<o;++d)i[l++]=de(e[d]+" ",r[s],n,o).trim()}return i}function de(e,t,n,r){var i=t,a=i.charCodeAt(0);switch(a<33&&(a=(i=i.trim()).charCodeAt(0)),a){case 38:switch(X+r){case 0:case 1:if(0===e.trim().length)break;default:return i.replace(d,"$1"+e.trim())}break;case z:switch(i.charCodeAt(1)){case 103:if(Q>0&&X>0)return i.replace(h,"$1").replace(d,"$1"+ue);break;default:return e.trim()+i.replace(d,"$1"+e.trim())}default:if(n*X>0&&i.indexOf("\f")>0)return i.replace(d,(e.charCodeAt(0)===z?"":"$1")+e.trim())}return e+i}function he(e,t,n,r){var l,c=0,d=e+";",h=2*t+3*n+4*r;if(944===h)return function(e){var t=e.length,n=e.indexOf(":",9)+1,r=e.substring(0,n).trim(),i=e.substring(n,t-1).trim();switch(e.charCodeAt(9)*ae){case 0:break;case F:if(110!==e.charCodeAt(10))break;default:var a=i.split((i="",s)),o=0;for(n=0,t=a.length;o<t;n=0,++o){for(var l=a[o],c=l.split(u);l=c[n];){var d=l.charCodeAt(0);if(1===ae&&(d>64&&d<90||d>96&&d<123||95===d||d===F&&l.charCodeAt(1)!==F))switch(isNaN(parseFloat(l))+(-1!==l.indexOf("("))){case 1:switch(l){case"infinite":case"alternate":case"backwards":case"running":case"normal":case"forwards":case"both":case"none":case"linear":case"ease":case"ease-in":case"ease-out":case"ease-in-out":case"paused":case"reverse":case"alternate-reverse":case"inherit":case"initial":case"unset":case"step-start":case"step-end":break;default:l+=oe}}c[n++]=l}i+=(0===o?"":",")+c.join(" ")}}return i=r+i+";",1===Y||2===Y&&pe(i,1)?P+i+i:i}(d);if(0===Y||2===Y&&!pe(d,1))return d;switch(h){case 1015:return 97===d.charCodeAt(10)?P+d+d:d;case 951:return 116===d.charCodeAt(3)?P+d+d:d;case 963:return 110===d.charCodeAt(5)?P+d+d:d;case 1009:if(100!==d.charCodeAt(4))break;case 969:case 942:return P+d+d;case 978:return P+d+I+d+d;case 1019:case 983:return P+d+I+d+O+d+d;case 883:return d.charCodeAt(8)===F?P+d+d:d.indexOf("image-set(",11)>0?d.replace(x,"$1"+P+"$2")+d:d;case 932:if(d.charCodeAt(4)===F)switch(d.charCodeAt(5)){case 103:return P+"box-"+d.replace("-grow","")+P+d+O+d.replace("grow","positive")+d;case 115:return P+d+O+d.replace("shrink","negative")+d;case 98:return P+d+O+d.replace("basis","preferred-size")+d}return P+d+O+d+d;case 964:return P+d+O+"flex-"+d+d;case 1023:if(99!==d.charCodeAt(8))break;return l=d.substring(d.indexOf(":",15)).replace("flex-","").replace("space-between","justify"),P+"box-pack"+l+P+d+O+"flex-pack"+l+d;case 1005:return a.test(d)?d.replace(i,":"+P)+d.replace(i,":"+I)+d:d;case 1e3:switch(c=(l=d.substring(13).trim()).indexOf("-")+1,l.charCodeAt(0)+l.charCodeAt(c)){case 226:l=d.replace(S,"tb");break;case 232:l=d.replace(S,"tb-rl");break;case 220:l=d.replace(S,"lr");break;default:return d}return P+d+O+l+d;case 1017:if(-1===d.indexOf("sticky",9))return d;case 975:switch(c=(d=e).length-10,h=(l=(33===d.charCodeAt(c)?d.substring(0,c):d).substring(e.indexOf(":",7)+1).trim()).charCodeAt(0)+(0|l.charCodeAt(7))){case 203:if(l.charCodeAt(8)<111)break;case 115:d=d.replace(l,P+l)+";"+d;break;case 207:case 102:d=d.replace(l,P+(h>102?"inline-":"")+"box")+";"+d.replace(l,P+l)+";"+d.replace(l,O+l+"box")+";"+d}return d+";";case 938:if(d.charCodeAt(5)===F)switch(d.charCodeAt(6)){case 105:return l=d.replace("-items",""),P+d+P+"box-"+l+O+"flex-"+l+d;case 115:return P+d+O+"flex-item-"+d.replace(C,"")+d;default:return P+d+O+"flex-line-pack"+d.replace("align-content","").replace(C,"")+d}break;case 973:case 989:if(d.charCodeAt(3)!==F||122===d.charCodeAt(4))break;case 931:case 953:if(!0===A.test(e))return 115===(l=e.substring(e.indexOf(":")+1)).charCodeAt(0)?he(e.replace("stretch","fill-available"),t,n,r).replace(":fill-available",":stretch"):d.replace(l,P+l)+d.replace(l,I+l.replace("fill-",""))+d;break;case 962:if(d=P+d+(102===d.charCodeAt(5)?O+d:"")+d,n+r===211&&105===d.charCodeAt(13)&&d.indexOf("transform",10)>0)return d.substring(0,d.indexOf(";",27)+1).replace(o,"$1"+P+"$2")+d}return d}function pe(e,t){var n=e.indexOf(1===t?":":"{"),r=e.substring(0,3!==t?n:10),i=e.substring(n+1,e.length-1);return re(2!==t?r:r.replace(E,"$1"),i,t)}function fe(e,t){var n=he(t,t.charCodeAt(0),t.charCodeAt(1),t.charCodeAt(2));return n!==t+";"?n.replace(k," or ($1)").substring(4):"("+t+")"}function me(e,t,n,r,i,a,o,s,u,l){for(var c,d=0,h=t;d<ne;++d)switch(c=te[d].call(ye,e,h,n,r,i,a,o,s,u,l)){case void 0:case!1:case!0:case null:break;default:h=c}if(h!==t)return h}function ge(e,t,n,r){for(var i=t+1;i<n;++i)switch(r.charCodeAt(i)){case W:if(e===q&&r.charCodeAt(i-1)===q&&t+2!==i)return i+1;break;case j:if(e===W)return i+1}return i}function ve(e){for(var t in e){var n=e[t];switch(t){case"keyframe":ae=0|n;break;case"global":Q=0|n;break;case"cascade":X=0|n;break;case"compress":$=0|n;break;case"semicolon":Z=0|n;break;case"preserve":J=0|n;break;case"prefix":re=null,n?"function"!=typeof n?Y=1:(Y=2,re=n):Y=0}}return ve}function ye(t,n){if(void 0!==this&&this.constructor===ye)return e(t);var i=t,a=i.charCodeAt(0);a<33&&(a=(i=i.trim()).charCodeAt(0)),ae>0&&(oe=i.replace(p,91===a?"":"-")),a=1,1===X?ue=i:se=i;var o,s=[ue];ne>0&&void 0!==(o=me(-1,n,s,s,K,V,0,0,0,0))&&"string"==typeof o&&(n=o);var u=le(ee,s,n,0,0);return ne>0&&void 0!==(o=me(-2,u,s,s,K,V,u.length,0,0,0))&&"string"!=typeof(u=o)&&(a=0),oe="",ue="",se="",G=0,K=1,V=1,$*a==0?u:u.replace(r,"").replace(v,"").replace(y,"$1").replace(b,"$1").replace(_," ")}return ye.use=function e(t){switch(t){case void 0:case null:ne=te.length=0;break;default:if("function"==typeof t)te[ne++]=t;else if("object"==typeof t)for(var n=0,r=t.length;n<r;++n)e(t[n]);else ie=0|!!t}return e},ye.set=ve,void 0!==t&&ve(t),ye}(null)},aLLH:function(e,t,n){var r=n("W2Ac"),i=n("ma6D"),a=n("xnEm"),o=n("Y6hy"),s=n("Yo2p"),u=n("niYQ");t.f=r&&!i?Object.defineProperties:function(e,t){o(e);for(var n,r=s(t),i=u(t),l=i.length,c=0;l>c;)a.f(e,n=i[c++],r[n]);return e}},aS5Z:function(e,t,n){"use strict";var r=n("Q7rv").IteratorPrototype,i=n("HyK6"),a=n("PEjt"),o=n("e1XL"),s=n("hkIh"),u=function(){return this};e.exports=function(e,t,n,l){var c=t+" Iterator";return e.prototype=i(r,{next:a(+!l,n)}),o(e,c,!1,!0),s[c]=u,e}},b2z7:function(e,t){var n=/\w*$/;e.exports=function(e){var t=new e.constructor(e.source,n.exec(e));return t.lastIndex=e.lastIndex,t}},b48C:function(e,t){e.exports=function(){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}},e.exports.__esModule=!0,e.exports.default=e.exports},bQgK:function(e,t,n){(function(t){(function(){var n,r,i,a,o,s;"undefined"!==typeof performance&&null!==performance&&performance.now?e.exports=function(){return performance.now()}:"undefined"!==typeof t&&null!==t&&t.hrtime?(e.exports=function(){return(n()-o)/1e6},r=t.hrtime,a=(n=function(){var e;return 1e9*(e=r())[0]+e[1]})(),s=1e9*t.uptime(),o=a-s):Date.now?(e.exports=function(){return Date.now()-i},i=Date.now()):(e.exports=function(){return(new Date).getTime()-i},i=(new Date).getTime())}).call(this)}).call(this,n("8oxB"))},"bS+h":function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return P}));var r=n("q1tI"),i=n.n(r),a=n("17x9"),o=n.n(a),s=n("9rZX"),u=n.n(s);function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function c(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?l(Object(n),!0).forEach((function(t){h(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function d(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function h(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function p(){return(p=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function f(e){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function m(e,t){return(m=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function g(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function v(e,t){if(t&&("object"===typeof t||"function"===typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return g(e)}function y(e){var t=function(){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}}();return function(){var n,r=f(e);if(t){var i=f(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return v(this,n)}}function b(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,i,a=[],o=!0,s=!1;try{for(n=n.call(e);!(o=(r=n.next()).done)&&(a.push(r.value),!t||a.length!==t);o=!0);}catch(u){s=!0,i=u}finally{try{o||null==n.return||n.return()}finally{if(s)throw i}}return a}(e,t)||T(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _(e){return function(e){if(Array.isArray(e))return S(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||T(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function T(e,t){if(e){if("string"===typeof e)return S(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?S(e,t):void 0}}function S(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function w(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(!e)return"";var n=e;return t&&Object.keys(t).forEach((function(e){n=n.replace(e,t[e])})),n}function k(){return"undefined"!==typeof e.window?e.window.innerWidth:0}var C=function(){try{return e.window.location.hostname!==e.window.parent.location.hostname}catch(t){return!0}};var E=27,A=37,x=39,P=function(t){!function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&m(e,t)}(s,t);var n,r,a,o=y(s);function s(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s),(t=o.call(this,e)).state={isClosing:!e.animationDisabled,shouldAnimate:!1,zoomLevel:0,offsetX:0,offsetY:0,loadErrorStatus:{}},t.outerEl=i.a.createRef(),t.zoomInBtn=i.a.createRef(),t.zoomOutBtn=i.a.createRef(),t.caption=i.a.createRef(),t.closeIfClickInner=t.closeIfClickInner.bind(g(t)),t.handleImageDoubleClick=t.handleImageDoubleClick.bind(g(t)),t.handleImageMouseWheel=t.handleImageMouseWheel.bind(g(t)),t.handleKeyInput=t.handleKeyInput.bind(g(t)),t.handleMouseUp=t.handleMouseUp.bind(g(t)),t.handleMouseDown=t.handleMouseDown.bind(g(t)),t.handleMouseMove=t.handleMouseMove.bind(g(t)),t.handleOuterMousewheel=t.handleOuterMousewheel.bind(g(t)),t.handleTouchStart=t.handleTouchStart.bind(g(t)),t.handleTouchMove=t.handleTouchMove.bind(g(t)),t.handleTouchEnd=t.handleTouchEnd.bind(g(t)),t.handlePointerEvent=t.handlePointerEvent.bind(g(t)),t.handleCaptionMousewheel=t.handleCaptionMousewheel.bind(g(t)),t.handleWindowResize=t.handleWindowResize.bind(g(t)),t.handleZoomInButtonClick=t.handleZoomInButtonClick.bind(g(t)),t.handleZoomOutButtonClick=t.handleZoomOutButtonClick.bind(g(t)),t.requestClose=t.requestClose.bind(g(t)),t.requestMoveNext=t.requestMoveNext.bind(g(t)),t.requestMovePrev=t.requestMovePrev.bind(g(t)),t.timeouts=[],t.currentAction=0,t.eventsSource=0,t.pointerList=[],t.preventInnerClose=!1,t.preventInnerCloseTimeout=null,t.keyPressed=!1,t.imageCache={},t.lastKeyDownTime=0,t.resizeTimeout=null,t.wheelActionTimeout=null,t.resetScrollTimeout=null,t.scrollX=0,t.scrollY=0,t.moveStartX=0,t.moveStartY=0,t.moveStartOffsetX=0,t.moveStartOffsetY=0,t.swipeStartX=0,t.swipeStartY=0,t.swipeEndX=0,t.swipeEndY=0,t.pinchTouchList=null,t.pinchDistance=0,t.keyCounter=0,t.moveRequested=!1,t}return n=s,r=[{key:"componentDidMount",value:function(){var t=this;this.props.animationDisabled||this.setState({isClosing:!1}),this.windowContext=function t(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:e.window.self;return n===e.window.top||C()?n:t(n.parent)}(),this.listeners={resize:this.handleWindowResize,mouseup:this.handleMouseUp,touchend:this.handleTouchEnd,touchcancel:this.handleTouchEnd,pointerdown:this.handlePointerEvent,pointermove:this.handlePointerEvent,pointerup:this.handlePointerEvent,pointercancel:this.handlePointerEvent},Object.keys(this.listeners).forEach((function(e){t.windowContext.addEventListener(e,t.listeners[e])})),this.loadAllImages()}},{key:"shouldComponentUpdate",value:function(e){var t=this;return this.getSrcTypes().forEach((function(n){t.props[n.name]!==e[n.name]&&(t.moveRequested=!1)})),!this.moveRequested}},{key:"componentDidUpdate",value:function(e){var t=this,n=!1,r={},i={};this.getSrcTypes().forEach((function(a){e[a.name]!==t.props[a.name]&&(n=!0,r[e[a.name]]=!0,i[t.props[a.name]]=!0)})),(n||this.moveRequested)&&(Object.keys(r).forEach((function(e){!(e in i)&&e in t.imageCache&&(t.imageCache[e].loaded=!1)})),this.moveRequested=!1,this.loadAllImages(this.props))}},{key:"componentWillUnmount",value:function(){var e=this;this.didUnmount=!0,Object.keys(this.listeners).forEach((function(t){e.windowContext.removeEventListener(t,e.listeners[t])})),this.timeouts.forEach((function(e){return clearTimeout(e)}))}},{key:"setTimeout",value:function(e){function t(t,n){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}((function(e,t){var n=this,r=setTimeout((function(){n.timeouts=n.timeouts.filter((function(e){return e!==r})),e()}),t);return this.timeouts.push(r),r}))},{key:"setPreventInnerClose",value:function(){var e=this;this.preventInnerCloseTimeout&&this.clearTimeout(this.preventInnerCloseTimeout),this.preventInnerClose=!0,this.preventInnerCloseTimeout=this.setTimeout((function(){e.preventInnerClose=!1,e.preventInnerCloseTimeout=null}),100)}},{key:"getBestImageForType",value:function(e){var t=this.props[e],n={};if(this.isImageLoaded(t))n=this.getFitSizes(this.imageCache[t].width,this.imageCache[t].height);else{if(!this.isImageLoaded(this.props["".concat(e,"Thumbnail")]))return null;t=this.props["".concat(e,"Thumbnail")],n=this.getFitSizes(this.imageCache[t].width,this.imageCache[t].height,!0)}return{src:t,height:this.imageCache[t].height,width:this.imageCache[t].width,targetHeight:n.height,targetWidth:n.width}}},{key:"getFitSizes",value:function(e,t,n){var r=this.getLightboxRect(),i=r.height-2*this.props.imagePadding,a=r.width-2*this.props.imagePadding;return n||(i=Math.min(i,t),a=Math.min(a,e)),a/i>e/t?{width:e*i/t,height:i}:{width:a,height:t*a/e}}},{key:"getMaxOffsets",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.state.zoomLevel,t=this.getBestImageForType("mainSrc");if(null===t)return{maxX:0,minX:0,maxY:0,minY:0};var n=this.getLightboxRect(),r=this.getZoomMultiplier(e),i=0,a=0;return{maxX:i=r*t.width-n.width<0?(n.width-r*t.width)/2:(r*t.width-n.width)/2,maxY:a=r*t.height-n.height<0?(n.height-r*t.height)/2:(r*t.height-n.height)/2,minX:-1*i,minY:-1*a}}},{key:"getSrcTypes",value:function(){return[{name:"mainSrc",keyEnding:"i".concat(this.keyCounter)},{name:"mainSrcThumbnail",keyEnding:"t".concat(this.keyCounter)},{name:"nextSrc",keyEnding:"i".concat(this.keyCounter+1)},{name:"nextSrcThumbnail",keyEnding:"t".concat(this.keyCounter+1)},{name:"prevSrc",keyEnding:"i".concat(this.keyCounter-1)},{name:"prevSrcThumbnail",keyEnding:"t".concat(this.keyCounter-1)}]}},{key:"getZoomMultiplier",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.state.zoomLevel;return Math.pow(1.007,e)}},{key:"getLightboxRect",value:function(){return this.outerEl.current?this.outerEl.current.getBoundingClientRect():{width:k(),height:"undefined"!==typeof e.window?e.window.innerHeight:0,top:0,right:0,bottom:0,left:0}}},{key:"clearTimeout",value:function(e){function t(t){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}((function(e){this.timeouts=this.timeouts.filter((function(t){return t!==e})),clearTimeout(e)}))},{key:"changeZoom",value:function(e,t,n){if(this.props.enableZoom){var r=Math.max(0,Math.min(300,e));if(r!==this.state.zoomLevel)if(0!==r){var i=this.getBestImageForType("mainSrc");if(null!==i){var a=this.getZoomMultiplier(),o=this.getZoomMultiplier(r),s=this.getLightboxRect(),u="undefined"!==typeof t?t-s.left:s.width/2,l="undefined"!==typeof n?n-s.top:s.height/2,c=(s.width-i.width*a)/2,d=(s.height-i.height*a)/2,h=u-(u-(c-this.state.offsetX))/a*o,p=l-(l-(d-this.state.offsetY))/a*o,f=(s.width-i.width*o)/2-h,m=(s.height-i.height*o)/2-p;if(3!==this.currentAction){var g=this.getMaxOffsets();this.state.zoomLevel>r&&(f=Math.max(g.minX,Math.min(g.maxX,f)),m=Math.max(g.minY,Math.min(g.maxY,m)))}this.setState({zoomLevel:r,offsetX:f,offsetY:m})}}else this.setState({zoomLevel:r,offsetX:0,offsetY:0})}}},{key:"closeIfClickInner",value:function(e){!this.preventInnerClose&&e.target.className.search(/\bril-inner\b/)>-1&&this.requestClose(e)}},{key:"handleKeyInput",value:function(e){if(e.stopPropagation(),!this.isAnimating())if("keyup"!==e.type){var t=e.which||e.keyCode,n=new Date;if(!(n.getTime()-this.lastKeyDownTime<this.props.keyRepeatLimit&&t!==E))switch(this.lastKeyDownTime=n.getTime(),t){case E:e.preventDefault(),this.requestClose(e);break;case A:if(!this.props.prevSrc)return;e.preventDefault(),this.keyPressed=!0,this.requestMovePrev(e);break;case x:if(!this.props.nextSrc)return;e.preventDefault(),this.keyPressed=!0,this.requestMoveNext(e)}}else this.lastKeyDownTime-=this.props.keyRepeatKeyupBonus}},{key:"handleOuterMousewheel",value:function(e){var t=this;e.stopPropagation();var n=0;this.clearTimeout(this.resetScrollTimeout),this.resetScrollTimeout=this.setTimeout((function(){t.scrollX=0,t.scrollY=0}),300),null!==this.wheelActionTimeout||this.isAnimating()||(Math.abs(e.deltaY)<Math.abs(e.deltaX)&&(this.scrollY=0,this.scrollX+=e.deltaX,this.scrollX>=200||e.deltaX>=100?(this.requestMoveNext(e),n=500,this.scrollX=0):(this.scrollX<=-200||e.deltaX<=-100)&&(this.requestMovePrev(e),n=500,this.scrollX=0)),0!==n&&(this.wheelActionTimeout=this.setTimeout((function(){t.wheelActionTimeout=null}),n)))}},{key:"handleImageMouseWheel",value:function(e){if(Math.abs(e.deltaY)>=Math.abs(e.deltaX)){if(e.stopPropagation(),Math.abs(e.deltaY)<1)return;this.scrollX=0,this.scrollY+=e.deltaY,this.changeZoom(this.state.zoomLevel-e.deltaY,e.clientX,e.clientY)}}},{key:"handleImageDoubleClick",value:function(e){this.state.zoomLevel>0?this.changeZoom(0,e.clientX,e.clientY):this.changeZoom(this.state.zoomLevel+100,e.clientX,e.clientY)}},{key:"shouldHandleEvent",value:function(e){if(this.eventsSource===e)return!0;if(0===this.eventsSource)return this.eventsSource=e,!0;switch(e){case 1:return!1;case 2:return this.eventsSource=2,this.filterPointersBySource(),!0;case 3:return 1===this.eventsSource&&(this.eventsSource=3,this.filterPointersBySource(),!0);default:return!1}}},{key:"addPointer",value:function(e){this.pointerList.push(e)}},{key:"removePointer",value:function(e){this.pointerList=this.pointerList.filter((function(t){return t.id!==e.id}))}},{key:"filterPointersBySource",value:function(){var e=this;this.pointerList=this.pointerList.filter((function(t){return t.source===e.eventsSource}))}},{key:"handleMouseDown",value:function(e){this.shouldHandleEvent(1)&&s.isTargetMatchImage(e.target)&&(this.addPointer(s.parseMouseEvent(e)),this.multiPointerStart(e))}},{key:"handleMouseMove",value:function(e){this.shouldHandleEvent(1)&&this.multiPointerMove(e,[s.parseMouseEvent(e)])}},{key:"handleMouseUp",value:function(e){this.shouldHandleEvent(1)&&(this.removePointer(s.parseMouseEvent(e)),this.multiPointerEnd(e))}},{key:"handlePointerEvent",value:function(e){if(this.shouldHandleEvent(3))switch(e.type){case"pointerdown":s.isTargetMatchImage(e.target)&&(this.addPointer(s.parsePointerEvent(e)),this.multiPointerStart(e));break;case"pointermove":this.multiPointerMove(e,[s.parsePointerEvent(e)]);break;case"pointerup":case"pointercancel":this.removePointer(s.parsePointerEvent(e)),this.multiPointerEnd(e)}}},{key:"handleTouchStart",value:function(e){var t=this;this.shouldHandleEvent(2)&&s.isTargetMatchImage(e.target)&&([].forEach.call(e.changedTouches,(function(e){return t.addPointer(s.parseTouchPointer(e))})),this.multiPointerStart(e))}},{key:"handleTouchMove",value:function(e){this.shouldHandleEvent(2)&&this.multiPointerMove(e,[].map.call(e.changedTouches,(function(e){return s.parseTouchPointer(e)})))}},{key:"handleTouchEnd",value:function(e){var t=this;this.shouldHandleEvent(2)&&([].map.call(e.changedTouches,(function(e){return t.removePointer(s.parseTouchPointer(e))})),this.multiPointerEnd(e))}},{key:"decideMoveOrSwipe",value:function(e){this.state.zoomLevel<=0?this.handleSwipeStart(e):this.handleMoveStart(e)}},{key:"multiPointerStart",value:function(e){switch(this.handleEnd(null),this.pointerList.length){case 1:e.preventDefault(),this.decideMoveOrSwipe(this.pointerList[0]);break;case 2:e.preventDefault(),this.handlePinchStart(this.pointerList)}}},{key:"multiPointerMove",value:function(e,t){switch(this.currentAction){case 1:e.preventDefault(),this.handleMove(t[0]);break;case 2:e.preventDefault(),this.handleSwipe(t[0]);break;case 3:e.preventDefault(),this.handlePinch(t)}}},{key:"multiPointerEnd",value:function(e){switch(0!==this.currentAction&&(this.setPreventInnerClose(),this.handleEnd(e)),this.pointerList.length){case 0:this.eventsSource=0;break;case 1:e.preventDefault(),this.decideMoveOrSwipe(this.pointerList[0]);break;case 2:e.preventDefault(),this.handlePinchStart(this.pointerList)}}},{key:"handleEnd",value:function(e){switch(this.currentAction){case 1:this.handleMoveEnd(e);break;case 2:this.handleSwipeEnd(e);break;case 3:this.handlePinchEnd(e)}}},{key:"handleMoveStart",value:function(e){var t=e.x,n=e.y;this.props.enableZoom&&(this.currentAction=1,this.moveStartX=t,this.moveStartY=n,this.moveStartOffsetX=this.state.offsetX,this.moveStartOffsetY=this.state.offsetY)}},{key:"handleMove",value:function(e){var t=e.x,n=e.y,r=this.moveStartX-t+this.moveStartOffsetX,i=this.moveStartY-n+this.moveStartOffsetY;this.state.offsetX===r&&this.state.offsetY===i||this.setState({offsetX:r,offsetY:i})}},{key:"handleMoveEnd",value:function(){var e=this;this.currentAction=0,this.moveStartX=0,this.moveStartY=0,this.moveStartOffsetX=0,this.moveStartOffsetY=0;var t=this.getMaxOffsets(),n=Math.max(t.minX,Math.min(t.maxX,this.state.offsetX)),r=Math.max(t.minY,Math.min(t.maxY,this.state.offsetY));n===this.state.offsetX&&r===this.state.offsetY||(this.setState({offsetX:n,offsetY:r,shouldAnimate:!0}),this.setTimeout((function(){e.setState({shouldAnimate:!1})}),this.props.animationDuration))}},{key:"handleSwipeStart",value:function(e){var t=e.x,n=e.y;this.currentAction=2,this.swipeStartX=t,this.swipeStartY=n,this.swipeEndX=t,this.swipeEndY=n}},{key:"handleSwipe",value:function(e){var t=e.x,n=e.y;this.swipeEndX=t,this.swipeEndY=n}},{key:"handleSwipeEnd",value:function(e){var t=this.swipeEndX-this.swipeStartX,n=Math.abs(t),r=Math.abs(this.swipeEndY-this.swipeStartY);if(this.currentAction=0,this.swipeStartX=0,this.swipeStartY=0,this.swipeEndX=0,this.swipeEndY=0,!(!e||this.isAnimating()||n<1.5*r)){if(n<200&&n<this.getLightboxRect().width/4)return;t>0&&this.props.prevSrc?(e.preventDefault(),this.requestMovePrev()):t<0&&this.props.nextSrc&&(e.preventDefault(),this.requestMoveNext())}}},{key:"calculatePinchDistance",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.pinchTouchList,t=b(e,2),n=t[0],r=t[1];return Math.sqrt(Math.pow(n.x-r.x,2)+Math.pow(n.y-r.y,2))}},{key:"calculatePinchCenter",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.pinchTouchList,t=b(e,2),n=t[0],r=t[1];return{x:n.x-(n.x-r.x)/2,y:n.y-(n.y-r.y)/2}}},{key:"handlePinchStart",value:function(e){this.props.enableZoom&&(this.currentAction=3,this.pinchTouchList=e.map((function(e){return{id:e.id,x:e.x,y:e.y}})),this.pinchDistance=this.calculatePinchDistance())}},{key:"handlePinch",value:function(e){this.pinchTouchList=this.pinchTouchList.map((function(t){for(var n=0;n<e.length;n+=1)if(e[n].id===t.id)return e[n];return t}));var t=this.calculatePinchDistance(),n=this.state.zoomLevel+t-this.pinchDistance;this.pinchDistance=t;var r=this.calculatePinchCenter(this.pinchTouchList),i=r.x,a=r.y;this.changeZoom(n,i,a)}},{key:"handlePinchEnd",value:function(){this.currentAction=0,this.pinchTouchList=null,this.pinchDistance=0}},{key:"handleWindowResize",value:function(){this.clearTimeout(this.resizeTimeout),this.resizeTimeout=this.setTimeout(this.forceUpdate.bind(this),100)}},{key:"handleZoomInButtonClick",value:function(){var e=this.state.zoomLevel+100;this.changeZoom(e),300===e&&this.zoomOutBtn.current.focus()}},{key:"handleZoomOutButtonClick",value:function(){var e=this.state.zoomLevel-100;this.changeZoom(e),0===e&&this.zoomInBtn.current.focus()}},{key:"handleCaptionMousewheel",value:function(e){if(e.stopPropagation(),this.caption.current){var t=this.caption.current.getBoundingClientRect().height,n=this.caption.current,r=n.scrollHeight,i=n.scrollTop;(e.deltaY>0&&t+i>=r||e.deltaY<0&&i<=0)&&e.preventDefault()}}},{key:"isAnimating",value:function(){return this.state.shouldAnimate||this.state.isClosing}},{key:"isImageLoaded",value:function(e){return e&&e in this.imageCache&&this.imageCache[e].loaded}},{key:"loadImage",value:function(t,n,r){var i=this;if(this.isImageLoaded(n))this.setTimeout((function(){r()}),1);else{var a=new e.Image;this.props.imageCrossOrigin&&(a.crossOrigin=this.props.imageCrossOrigin),a.onerror=function(e){i.props.onImageLoadError(n,t,e),i.setState((function(e){return{loadErrorStatus:c(c({},e.loadErrorStatus),{},h({},t,!0))}})),r(e)},a.onload=function(){i.props.onImageLoad(n,t,a),i.imageCache[n]={loaded:!0,width:a.width,height:a.height},r()},a.src=n}}},{key:"loadAllImages",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props,n=function(t,n){return function(r){r||e.props[t]!==n||e.didUnmount||e.forceUpdate()}};this.getSrcTypes().forEach((function(r){var i=r.name;t[i]&&e.state.loadErrorStatus[i]&&e.setState((function(e){return{loadErrorStatus:c(c({},e.loadErrorStatus),{},h({},i,!1))}})),t[i]&&!e.isImageLoaded(t[i])&&e.loadImage(i,t[i],n(i,t[i]))}))}},{key:"requestClose",value:function(e){var t=this,n=function(){return t.props.onCloseRequest(e)};this.props.animationDisabled||"keydown"===e.type&&!this.props.animationOnKeyInput?n():(this.setState({isClosing:!0}),this.setTimeout(n,this.props.animationDuration))}},{key:"requestMove",value:function(e,t){var n=this,r={zoomLevel:0,offsetX:0,offsetY:0};this.props.animationDisabled||this.keyPressed&&!this.props.animationOnKeyInput||(r.shouldAnimate=!0,this.setTimeout((function(){return n.setState({shouldAnimate:!1})}),this.props.animationDuration)),this.keyPressed=!1,this.moveRequested=!0,"prev"===e?(this.keyCounter-=1,this.setState(r),this.props.onMovePrevRequest(t)):(this.keyCounter+=1,this.setState(r),this.props.onMoveNextRequest(t))}},{key:"requestMoveNext",value:function(e){this.requestMove("next",e)}},{key:"requestMovePrev",value:function(e){this.requestMove("prev",e)}},{key:"render",value:function(){var t=this,n=this.props,r=n.animationDisabled,a=n.animationDuration,o=n.clickOutsideToClose,l=n.discourageDownloads,d=n.enableZoom,h=n.imageTitle,f=n.nextSrc,m=n.prevSrc,g=n.toolbarButtons,v=n.reactModalStyle,y=n.onAfterOpen,b=n.imageCrossOrigin,T=n.reactModalProps,S=n.loader,k=this.state,C=k.zoomLevel,E=k.offsetX,A=k.offsetY,x=k.isClosing,P=k.loadErrorStatus,I=this.getLightboxRect(),O={};!r&&this.isAnimating()&&(O=c(c({},O),{},{transition:"transform ".concat(a,"ms")}));var L={};this.getSrcTypes().forEach((function(e){var t=e.name,n=e.keyEnding;L[t]=n}));var D=[],M=function(e,n,r){if(t.props[e]){var a,o=t.getBestImageForType(e),u=c(c({},O),s.getTransform(c(c({},r),o)));if(C>0&&(u.cursor="move"),null===o&&(a=P,Object.keys(a).some((function(e){return a[e]}))))D.push(i.a.createElement("div",{className:"".concat(n," ril__image ril-errored"),style:u,key:t.props[e]+L[e]},i.a.createElement("div",{className:"ril__errorContainer"},t.props.imageLoadErrorMessage)));else if(null!==o){var d=o.src;l?(u.backgroundImage="url('".concat(d,"')"),D.push(i.a.createElement("div",{className:"".concat(n," ril__image ril__imageDiscourager"),onDoubleClick:t.handleImageDoubleClick,onWheel:t.handleImageMouseWheel,style:u,key:d+L[e]},i.a.createElement("div",{className:"ril-download-blocker ril__downloadBlocker"})))):D.push(i.a.createElement("img",p({},b?{crossOrigin:b}:{},{className:"".concat(n," ril__image"),onDoubleClick:t.handleImageDoubleClick,onWheel:t.handleImageMouseWheel,onDragStart:function(e){return e.preventDefault()},style:u,src:d,key:d+L[e],alt:"string"===typeof h?h:w("Image"),draggable:!1})))}else{var f=void 0!==S?S:i.a.createElement("div",{className:"ril-loading-circle ril__loadingCircle ril__loadingContainer__icon"},_(new Array(12)).map((function(e,t){return i.a.createElement("div",{key:t,className:"ril-loading-circle-point ril__loadingCirclePoint"})})));D.push(i.a.createElement("div",{className:"".concat(n," ril__image ril-not-loaded"),style:u,key:t.props[e]+L[e]},i.a.createElement("div",{className:"ril__loadingContainer"},f)))}}},R=this.getZoomMultiplier();M("nextSrc","ril-image-next ril__imageNext",{x:I.width}),M("mainSrc","ril-image-current",{x:-1*E,y:-1*A,zoom:R}),M("prevSrc","ril-image-prev ril__imagePrev",{x:-1*I.width});var N={overlay:c({zIndex:1e3,backgroundColor:"transparent"},v.overlay),content:c({backgroundColor:"transparent",overflow:"hidden",border:"none",borderRadius:0,padding:0,top:0,left:0,right:0,bottom:0},v.content)};return i.a.createElement(u.a,p({isOpen:!0,onRequestClose:o?this.requestClose:void 0,onAfterOpen:function(){t.outerEl.current&&t.outerEl.current.focus(),y()},style:N,contentLabel:w("Lightbox"),appElement:"undefined"!==typeof e.window?e.window.document.body:void 0},T),i.a.createElement("div",{className:"ril-outer ril__outer ril__outerAnimating ".concat(this.props.wrapperClassName," ").concat(x?"ril-closing ril__outerClosing":""),style:{transition:"opacity ".concat(a,"ms"),animationDuration:"".concat(a,"ms"),animationDirection:x?"normal":"reverse"},ref:this.outerEl,onWheel:this.handleOuterMousewheel,onMouseMove:this.handleMouseMove,onMouseDown:this.handleMouseDown,onTouchStart:this.handleTouchStart,onTouchMove:this.handleTouchMove,tabIndex:"-1",onKeyDown:this.handleKeyInput,onKeyUp:this.handleKeyInput},i.a.createElement("div",{className:"ril-inner ril__inner",onClick:o?this.closeIfClickInner:void 0},D),m&&i.a.createElement("button",{type:"button",className:"ril-prev-button ril__navButtons ril__navButtonPrev",key:"prev","aria-label":this.props.prevLabel,title:this.props.prevLabel,onClick:this.isAnimating()?void 0:this.requestMovePrev}),f&&i.a.createElement("button",{type:"button",className:"ril-next-button ril__navButtons ril__navButtonNext",key:"next","aria-label":this.props.nextLabel,title:this.props.nextLabel,onClick:this.isAnimating()?void 0:this.requestMoveNext}),i.a.createElement("div",{className:"ril-toolbar ril__toolbar"},i.a.createElement("ul",{className:"ril-toolbar-left ril__toolbarSide ril__toolbarLeftSide"},i.a.createElement("li",{className:"ril-toolbar__item ril__toolbarItem"},i.a.createElement("span",{className:"ril-toolbar__item__child ril__toolbarItemChild"},h))),i.a.createElement("ul",{className:"ril-toolbar-right ril__toolbarSide ril__toolbarRightSide"},g&&g.map((function(e,t){return i.a.createElement("li",{key:"button_".concat(t+1),className:"ril-toolbar__item ril__toolbarItem"},e)})),d&&i.a.createElement("li",{className:"ril-toolbar__item ril__toolbarItem"},i.a.createElement("button",{type:"button",key:"zoom-in","aria-label":this.props.zoomInLabel,title:this.props.zoomInLabel,className:["ril-zoom-in","ril__toolbarItemChild","ril__builtinButton","ril__zoomInButton"].concat(_(300===C?["ril__builtinButtonDisabled"]:[])).join(" "),ref:this.zoomInBtn,disabled:this.isAnimating()||300===C,onClick:this.isAnimating()||300===C?void 0:this.handleZoomInButtonClick})),d&&i.a.createElement("li",{className:"ril-toolbar__item ril__toolbarItem"},i.a.createElement("button",{type:"button",key:"zoom-out","aria-label":this.props.zoomOutLabel,title:this.props.zoomOutLabel,className:["ril-zoom-out","ril__toolbarItemChild","ril__builtinButton","ril__zoomOutButton"].concat(_(0===C?["ril__builtinButtonDisabled"]:[])).join(" "),ref:this.zoomOutBtn,disabled:this.isAnimating()||0===C,onClick:this.isAnimating()||0===C?void 0:this.handleZoomOutButtonClick})),i.a.createElement("li",{className:"ril-toolbar__item ril__toolbarItem"},i.a.createElement("button",{type:"button",key:"close","aria-label":this.props.closeLabel,title:this.props.closeLabel,className:"ril-close ril-toolbar__item__child ril__toolbarItemChild ril__builtinButton ril__closeButton",onClick:this.isAnimating()?void 0:this.requestClose})))),this.props.imageCaption&&i.a.createElement("div",{onWheel:this.handleCaptionMousewheel,onMouseDown:function(e){return e.stopPropagation()},className:"ril-caption ril__caption",ref:this.caption},i.a.createElement("div",{className:"ril-caption-content ril__captionContent"},this.props.imageCaption))))}}],a=[{key:"isTargetMatchImage",value:function(e){return e&&/ril-image-current/.test(e.className)}},{key:"parseMouseEvent",value:function(e){return{id:"mouse",source:1,x:parseInt(e.clientX,10),y:parseInt(e.clientY,10)}}},{key:"parseTouchPointer",value:function(e){return{id:e.identifier,source:2,x:parseInt(e.clientX,10),y:parseInt(e.clientY,10)}}},{key:"parsePointerEvent",value:function(e){return{id:e.pointerId,source:3,x:parseInt(e.clientX,10),y:parseInt(e.clientY,10)}}},{key:"getTransform",value:function(e){var t=e.x,n=void 0===t?0:t,r=e.y,i=void 0===r?0:r,a=e.zoom,o=void 0===a?1:a,s=e.width,u=e.targetWidth,l=n,c=k();s>c&&(l+=(c-s)/2);var d=o*(u/s);return{transform:"translate3d(".concat(l,"px,").concat(i,"px,0) scale3d(").concat(d,",").concat(d,",1)")}}}],r&&d(n.prototype,r),a&&d(n,a),Object.defineProperty(n,"prototype",{writable:!1}),s}(r.Component);P.propTypes={mainSrc:o.a.string.isRequired,prevSrc:o.a.string,nextSrc:o.a.string,mainSrcThumbnail:o.a.string,prevSrcThumbnail:o.a.string,nextSrcThumbnail:o.a.string,onCloseRequest:o.a.func.isRequired,onMovePrevRequest:o.a.func,onMoveNextRequest:o.a.func,onImageLoadError:o.a.func,onImageLoad:o.a.func,onAfterOpen:o.a.func,discourageDownloads:o.a.bool,animationDisabled:o.a.bool,animationOnKeyInput:o.a.bool,animationDuration:o.a.number,keyRepeatLimit:o.a.number,keyRepeatKeyupBonus:o.a.number,imageTitle:o.a.node,imageCaption:o.a.node,imageCrossOrigin:o.a.string,reactModalStyle:o.a.shape({}),imagePadding:o.a.number,wrapperClassName:o.a.string,toolbarButtons:o.a.arrayOf(o.a.node),clickOutsideToClose:o.a.bool,enableZoom:o.a.bool,reactModalProps:o.a.shape({}),nextLabel:o.a.string,prevLabel:o.a.string,zoomInLabel:o.a.string,zoomOutLabel:o.a.string,closeLabel:o.a.string,imageLoadErrorMessage:o.a.node,loader:o.a.node},P.defaultProps={imageTitle:null,imageCaption:null,toolbarButtons:null,reactModalProps:{},animationDisabled:!1,animationDuration:300,animationOnKeyInput:!1,clickOutsideToClose:!0,closeLabel:"Close lightbox",discourageDownloads:!1,enableZoom:!0,imagePadding:10,imageCrossOrigin:null,keyRepeatKeyupBonus:40,keyRepeatLimit:180,mainSrcThumbnail:null,nextLabel:"Next image",nextSrc:null,nextSrcThumbnail:null,onAfterOpen:function(){},onImageLoadError:function(){},onImageLoad:function(){},onMoveNextRequest:function(){},onMovePrevRequest:function(){},prevLabel:"Previous image",prevSrc:null,prevSrcThumbnail:null,reactModalStyle:{},wrapperClassName:"",zoomInLabel:"Zoom in",zoomOutLabel:"Zoom out",imageLoadErrorMessage:"This image failed to load",loader:void 0}}).call(this,n("yLpj"))},"bq/A":function(e,t,n){var r=n("4wiq"),i=0,a=Math.random(),o=r(1..toString);e.exports=function(e){return"Symbol("+(void 0===e?"":e)+")_"+o(++i+a,36)}},"c5/t":function(e,t){var n=Math.ceil,r=Math.floor;e.exports=Math.trunc||function(e){var t=+e;return(t>0?r:n)(t)}},cuZ9:function(e,t,n){var r=n("szlw"),i=n("ok90"),a=n("xZj3"),o=n("pfAL"),s=n("RpL+");r({target:"Object",stat:!0,forced:!i||a((function(){o.f(1)}))},{getOwnPropertySymbols:function(e){var t=o.f;return t?t(s(e)):[]}})},e1XL:function(e,t,n){var r=n("xnEm").f,i=n("+BqG"),a=n("4Tei")("toStringTag");e.exports=function(e,t,n){e&&!n&&(e=e.prototype),e&&!i(e,a)&&r(e,a,{configurable:!0,value:t})}},eDf4:function(e,t,n){var r=n("wOhn"),i=r.all;e.exports=r.IS_HTMLDDA?function(e){return"function"==typeof e||e===i}:function(e){return"function"==typeof e}},esM1:function(e,t,n){var r=n("eDf4"),i=n("xnEm"),a=n("1MgG"),o=n("uqF2");e.exports=function(e,t,n,s){s||(s={});var u=s.enumerable,l=void 0!==s.name?s.name:t;if(r(n)&&a(n,l,s),s.global)u?e[t]=n:o(t,n);else{try{s.unsafe?e[t]&&(u=!0):delete e[t]}catch(c){}u?e[t]=n:i.f(e,t,{value:n,enumerable:!1,configurable:!s.nonConfigurable,writable:!s.nonWritable})}return e}},f9pX:function(e,t,n){var r=n("4wiq"),i=n("GLMc"),a=n("QICv"),o=n("Qqun"),s=r("".charAt),u=r("".charCodeAt),l=r("".slice),c=function(e){return function(t,n){var r,c,d=a(o(t)),h=i(n),p=d.length;return h<0||h>=p?e?"":void 0:(r=u(d,h))<55296||r>56319||h+1===p||(c=u(d,h+1))<56320||c>57343?e?s(d,h):r:e?l(d,h,h+2):c-56320+(r-55296<<10)+65536}};e.exports={codeAt:c(!1),charAt:c(!0)}},fbhf:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resetState=function(){var e=document.getElementsByTagName("html")[0];for(var t in r)a(e,r[t]);var n=document.body;for(var o in i)a(n,i[o]);r={},i={}},t.log=function(){0};var r={},i={};function a(e,t){e.classList.remove(t)}t.add=function(e,t){return n=e.classList,a="html"==e.nodeName.toLowerCase()?r:i,void t.split(" ").forEach((function(e){!function(e,t){e[t]||(e[t]=0),e[t]+=1}(a,e),n.add(e)}));var n,a},t.remove=function(e,t){return n=e.classList,a="html"==e.nodeName.toLowerCase()?r:i,void t.split(" ").forEach((function(e){!function(e,t){e[t]&&(e[t]-=1)}(a,e),0===a[e]&&n.remove(e)}));var n,a}},g2LC:function(e,t){e.exports=function(e){if(!e)return!1;var t=n.call(e);return"[object Function]"===t||"function"===typeof e&&"[object RegExp]"!==t||"undefined"!==typeof window&&(e===window.setTimeout||e===window.alert||e===window.confirm||e===window.prompt)};var n=Object.prototype.toString},gMeV:function(e,t,n){"use strict";n.d(t,"a",(function(){return o})),n.d(t,"c",(function(){return s})),n.d(t,"b",(function(){return u})),n.d(t,"d",(function(){return l}));var r=n("fcqR"),i=n.n(r).a.create({addEToUmlauts:!0,szToSs:!0,spaces:"-",nonPrintable:"",toLower:!0,trim:!1}),a={hero:560,featured:800,primary:240,slider:275,normal:100,push:80};function o(e){return e.headline?e.section+"/"+i(e.headline.replace(/&/g,"-and-")).replace(/-+/g,"-")+"-"+e.contentKey:e.contentKey}function s(e){return a[e]||e}function u(e){return e.image||e.images&&e.images[0]||e.videos&&{url:e.videos[0].thumbnailURL}}function l(e){return e.teaserHeadline}},gcCN:function(e,t,n){var r=n("qWin").getUint64;e.exports=function(e){var t=new DataView(e.buffer,e.byteOffset,e.byteLength),n={version:e[0],flags:new Uint8Array(e.subarray(1,4)),references:[],referenceId:t.getUint32(4),timescale:t.getUint32(8)},i=12;0===n.version?(n.earliestPresentationTime=t.getUint32(i),n.firstOffset=t.getUint32(i+4),i+=8):(n.earliestPresentationTime=r(e.subarray(i)),n.firstOffset=r(e.subarray(i+8)),i+=16),i+=2;var a=t.getUint16(i);for(i+=2;a>0;i+=12,a--)n.references.push({referenceType:(128&e[i])>>>7,referencedSize:2147483647&t.getUint32(i),subsegmentDuration:t.getUint32(i+4),startsWithSap:!!(128&e[i+8]),sapType:(112&e[i+8])>>>4,sapDeltaTime:268435455&t.getUint32(i+8)});return n}},gg2M:function(e,t,n){var r=n("ok90");e.exports=r&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},gheS:function(e,t,n){var r=n("GLMc"),i=Math.max,a=Math.min;e.exports=function(e,t){var n=r(e);return n<0?i(n+t,0):a(n,t)}},hIRe:function(e,t,n){"use strict";n.d(t,"a",(function(){return C})),n.d(t,"b",(function(){return O})),n.d(t,"c",(function(){return ae})),n.d(t,"d",(function(){return oe}));var r=n("Y+wj"),i=n("vgmO"),a=n.n(i),o=n("/9/d"),s=n("IQtQ"),u=function(e){return!!e&&"object"===typeof e},l=function e(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return n.reduce((function(t,n){return"object"!==typeof n||Object.keys(n).forEach((function(r){Array.isArray(t[r])&&Array.isArray(n[r])?t[r]=t[r].concat(n[r]):u(t[r])&&u(n[r])?t[r]=e(t[r],n[r]):t[r]=n[r]})),t}),{})},c=function(e){return Object.keys(e).map((function(t){return e[t]}))},d=function(e){return e.reduce((function(e,t){return e.concat(t)}),[])},h=function(e){if(!e.length)return[];for(var t=[],n=0;n<e.length;n++)t.push(e[n]);return t},p=function(e,t){for(var n=0;n<e.length;n++)if(t(e[n]))return n;return-1},f="INVALID_NUMBER_OF_PERIOD",m="DASH_EMPTY_MANIFEST",g="DASH_INVALID_XML",v="NO_BASE_URL",y="SEGMENT_TIME_UNSPECIFIED",b="UNSUPPORTED_UTC_TIMING_SCHEME",_=function(e){var t=e.baseUrl,n=void 0===t?"":t,i=e.source,o=void 0===i?"":i,s=e.range,u=void 0===s?"":s,l=e.indexRange,c=void 0===l?"":l,d={uri:o,resolvedUri:Object(r.a)(n||"",o)};if(u||c){var h,p=(u||c).split("-"),f=a.a.BigInt?a.a.BigInt(p[0]):parseInt(p[0],10),m=a.a.BigInt?a.a.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?a.a.BigInt(m)-a.a.BigInt(f)+a.a.BigInt(1):m-f+1)&&h<Number.MAX_SAFE_INTEGER&&(h=Number(h)),d.byterange={length:h,offset:f}}return d},T=function(e){return e&&"number"!==typeof e&&(e=parseInt(e,10)),isNaN(e)?null:e},S={static:function(e){var t=e.duration,n=e.timescale,r=void 0===n?1:n,i=e.sourceDuration,a=e.periodDuration,o=T(e.endNumber),s=t/r;return"number"===typeof o?{start:0,end:o}:"number"===typeof a?{start:0,end:a/s}:{start:0,end:i/s}},dynamic:function(e){var t=e.NOW,n=e.clientOffset,r=e.availabilityStartTime,i=e.timescale,a=void 0===i?1:i,o=e.duration,s=e.periodStart,u=void 0===s?0:s,l=e.minimumUpdatePeriod,c=void 0===l?0:l,d=e.timeShiftBufferDepth,h=void 0===d?1/0:d,p=T(e.endNumber),f=(t+n)/1e3,m=r+u,g=f+c-m,v=Math.ceil(g*a/o),y=Math.floor((f-m-h)*a/o),b=Math.floor((f-m)*a/o);return{start:Math.max(0,y),end:"number"===typeof p?p:Math.min(v,b)}}},w=function(e){var t=e.type,n=e.duration,r=e.timescale,i=void 0===r?1:r,a=e.periodDuration,o=e.sourceDuration,s=S[t](e),u=function(e,t){for(var n=[],r=e;r<t;r++)n.push(r);return n}(s.start,s.end).map(function(e){return function(t){var n=e.duration,r=e.timescale,i=void 0===r?1:r,a=e.periodStart,o=e.startNumber;return{number:(void 0===o?1:o)+t,duration:n/i,timeline:a,time:t*n}}}(e));if("static"===t){var l=u.length-1,c="number"===typeof a?a:o;u[l].duration=c-n/i*l}return u},k=function(e){var t=e.baseUrl,n=e.initialization,r=void 0===n?{}:n,i=e.sourceDuration,a=e.indexRange,o=void 0===a?"":a,s=e.periodStart,u=e.presentationTime,l=e.number,c=void 0===l?0:l,d=e.duration;if(!t)throw new Error(v);var h=_({baseUrl:t,source:r.sourceURL,range:r.range}),p=_({baseUrl:t,source:t,indexRange:o});if(p.map=h,d){var f=w(e);f.length&&(p.duration=f[0].duration,p.timeline=f[0].timeline)}else i&&(p.duration=i,p.timeline=s);return p.presentationTime=u||s,p.number=c,[p]},C=function(e,t,n){var r,i=e.sidx.map?e.sidx.map:null,o=e.sidx.duration,s=e.timeline||0,u=e.sidx.byterange,l=u.offset+u.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;r="bigint"===typeof t.firstOffset?a.a.BigInt(l)+t.firstOffset:l+t.firstOffset;for(var v=0;v<d.length;v++){var y=t.references[v],b=y.referencedSize,_=y.subsegmentDuration,T=void 0;T="bigint"===typeof r?r+a.a.BigInt(b)-a.a.BigInt(1):r+b-1;var S=k({baseUrl:n,timescale:c,timeline:s,periodStart:f,presentationTime:m,number:g,duration:_,sourceDuration:o,indexRange:r+"-"+T,type:p})[0];i&&(S.map=i),h.push(S),r+="bigint"===typeof r?a.a.BigInt(b):b,m+=_/c,g++}return e.segments=h,e},E=["AUDIO","SUBTITLES"],A=function(e){return(t=e,n=function(e){return e.timeline},c(t.reduce((function(e,t){return t.forEach((function(t){e[n(t)]=t})),e}),{}))).sort((function(e,t){return e.timeline>t.timeline?1:-1}));var t,n},x=function(e){var t,n,r=[];return t=e,n=function(e,t,n,i){r=r.concat(e.playlists||[])},E.forEach((function(e){for(var r in t.mediaGroups[e])for(var i in t.mediaGroups[e][r]){var a=t.mediaGroups[e][r][i];n(a,e,r,i)}})),r},P=function(e){var t=e.playlist,n=e.mediaSequence;t.mediaSequence=n,t.segments.forEach((function(e,n){e.number=t.mediaSequence+n}))},I=function(e){var t=e.oldManifest,n=e.newManifest,r=t.playlists.concat(x(t)),i=n.playlists.concat(x(n));return n.timelineStarts=A([t.timelineStarts,n.timelineStarts]),function(e){var t=e.oldPlaylists,n=e.newPlaylists,r=e.timelineStarts;n.forEach((function(e){e.discontinuitySequence=p(r,(function(t){return t.timeline===e.timeline}));var n=function(e,t){for(var n=0;n<e.length;n++)if(e[n].attributes.NAME===t)return e[n];return null}(t,e.attributes.NAME);if(n&&!e.sidx){var i=e.segments[0],a=p(n.segments,(function(e){return Math.abs(e.presentationTime-i.presentationTime)<1/60}));if(-1===a)return P({playlist:e,mediaSequence:n.mediaSequence+n.segments.length}),e.segments[0].discontinuity=!0,e.discontinuityStarts.unshift(0),void((!n.segments.length&&e.timeline>n.timeline||n.segments.length&&e.timeline>n.segments[n.segments.length-1].timeline)&&e.discontinuitySequence--);n.segments[a].discontinuity&&!i.discontinuity&&(i.discontinuity=!0,e.discontinuityStarts.unshift(0),e.discontinuitySequence--),P({playlist:e,mediaSequence:n.segments[a].number})}}))}({oldPlaylists:r,newPlaylists:i,timelineStarts:n.timelineStarts}),n},O=function(e){return e&&e.uri+"-"+function(e){var t;return t="bigint"===typeof e.offset||"bigint"===typeof e.length?a.a.BigInt(e.offset)+a.a.BigInt(e.length)-a.a.BigInt(1):e.offset+e.length-1,e.offset+"-"+t}(e.byterange)},L=function(e){return c(e.reduce((function(e,t){var n=t.attributes.id+(t.attributes.lang||"");if(e[n]){var r;if(t.segments)t.segments[0]&&(t.segments[0].discontinuity=!0),(r=e[n].segments).push.apply(r,t.segments);t.attributes.contentProtection&&(e[n].attributes.contentProtection=t.attributes.contentProtection)}else e[n]=t,e[n].attributes.timelineStarts=[];return e[n].attributes.timelineStarts.push({start:t.attributes.periodStart,timeline:t.attributes.periodStart}),e}),{})).map((function(e){var t,n;return e.discontinuityStarts=(t=e.segments||[],n="discontinuity",t.reduce((function(e,t,r){return t[n]&&e.push(r),e}),[])),e}))},D=function(e,t){var n=O(e.sidx),r=n&&t[n]&&t[n].sidx;return r&&C(e,r,e.sidx.resolvedUri),e},M=function(e,t){if(void 0===t&&(t={}),!Object.keys(t).length)return e;for(var n in e)e[n]=D(e[n],t);return e},R=function(e){var t,n=e.attributes,r=e.segments,i=e.sidx,a=e.discontinuityStarts,o={attributes:(t={NAME:n.id,AUDIO:"audio",SUBTITLES:"subs",RESOLUTION:{width:n.width,height:n.height},CODECS:n.codecs,BANDWIDTH:n.bandwidth},t["PROGRAM-ID"]=1,t),uri:"",endList:"static"===n.type,timeline:n.periodStart,resolvedUri:"",targetDuration:n.duration,discontinuityStarts:a,timelineStarts:n.timelineStarts,segments:r};return n.frameRate&&(o.attributes["FRAME-RATE"]=n.frameRate),n.contentProtection&&(o.contentProtection=n.contentProtection),i&&(o.sidx=i),o},N=function(e){var t=e.attributes;return"video/mp4"===t.mimeType||"video/webm"===t.mimeType||"video"===t.contentType},j=function(e){var t=e.attributes;return"audio/mp4"===t.mimeType||"audio/webm"===t.mimeType||"audio"===t.contentType},B=function(e){var t=e.attributes;return"text/vtt"===t.mimeType||"text"===t.contentType},U=function(e){return e?Object.keys(e).reduce((function(t,n){var r=e[n];return t.concat(r.playlists)}),[]):[]},F=function(e){var t,n=e.dashPlaylists,r=e.locations,i=e.sidxMapping,a=void 0===i?{}:i,o=e.previousManifest;if(!n.length)return{};var s=n[0].attributes,u=s.sourceDuration,l=s.type,c=s.suggestedPresentationDelay,d=s.minimumUpdatePeriod,h=L(n.filter(N)).map(R),f=L(n.filter(j)),m=L(n.filter(B)),g=n.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:u,playlists:M(h,a)};d>=0&&(v.minimumUpdatePeriod=1e3*d),r&&(v.locations=r),"dynamic"===l&&(v.suggestedPresentationDelay=c);var y,b,_=0===v.playlists.length,T=f.length?function(e,t,n){var r;void 0===t&&(t={}),void 0===n&&(n=!1);var i=e.reduce((function(e,i){var a=i.attributes.role&&i.attributes.role.value||"",o=i.attributes.lang||"",s=i.attributes.label||"main";if(o&&!i.attributes.label){var u=a?" ("+a+")":"";s=""+i.attributes.lang+u}e[s]||(e[s]={language:o,autoselect:!0,default:"main"===a,playlists:[],uri:""});var l=D(function(e,t){var n,r=e.attributes,i=e.segments,a=e.sidx,o=e.mediaSequence,s=e.discontinuitySequence,u=e.discontinuityStarts,l={attributes:(n={NAME:r.id,BANDWIDTH:r.bandwidth,CODECS:r.codecs},n["PROGRAM-ID"]=1,n),uri:"",endList:"static"===r.type,timeline:r.periodStart,resolvedUri:"",targetDuration:r.duration,discontinuitySequence:s,discontinuityStarts:u,timelineStarts:r.timelineStarts,mediaSequence:o,segments:i};return r.contentProtection&&(l.contentProtection=r.contentProtection),a&&(l.sidx=a),t&&(l.attributes.AUDIO="audio",l.attributes.SUBTITLES="subs"),l}(i,n),t);return e[s].playlists.push(l),"undefined"===typeof r&&"main"===a&&((r=i).default=!0),e}),{});r||(i[Object.keys(i)[0]].default=!0);return i}(f,a,_):null,S=m.length?function(e,t){return void 0===t&&(t={}),e.reduce((function(e,n){var r=n.attributes.lang||"text";return e[r]||(e[r]={language:r,default:!1,autoselect:!1,playlists:[],uri:""}),e[r].playlists.push(D(function(e){var t,n=e.attributes,r=e.segments,i=e.mediaSequence,a=e.discontinuityStarts,o=e.discontinuitySequence;"undefined"===typeof r&&(r=[{uri:n.baseUrl,timeline:n.periodStart,resolvedUri:n.baseUrl||"",duration:n.sourceDuration,number:0}],n.duration=n.sourceDuration);var s=((t={NAME:n.id,BANDWIDTH:n.bandwidth})["PROGRAM-ID"]=1,t);return n.codecs&&(s.CODECS=n.codecs),{attributes:s,uri:"",endList:"static"===n.type,timeline:n.periodStart,resolvedUri:n.baseUrl||"",targetDuration:n.duration,timelineStarts:n.timelineStarts,discontinuityStarts:a,discontinuitySequence:o,mediaSequence:i,segments:r}}(n),t)),e}),{})}(m,a):null,w=h.concat(U(T),U(S)),k=w.map((function(e){return e.timelineStarts}));return v.timelineStarts=A(k),y=w,b=v.timelineStarts,y.forEach((function(e){e.mediaSequence=0,e.discontinuitySequence=p(b,(function(t){return t.timeline===e.timeline})),e.segments&&e.segments.forEach((function(e,t){e.number=t}))})),T&&(v.mediaGroups.AUDIO.audio=T),S&&(v.mediaGroups.SUBTITLES.subs=S),g.length&&(v.mediaGroups["CLOSED-CAPTIONS"].cc=g.reduce((function(e,t){return t?(t.forEach((function(t){var n=t.channel,r=t.language;e[r]={autoselect:!1,default:!1,instreamId:n,language:r},t.hasOwnProperty("aspectRatio")&&(e[r].aspectRatio=t.aspectRatio),t.hasOwnProperty("easyReader")&&(e[r].easyReader=t.easyReader),t.hasOwnProperty("3D")&&(e[r]["3D"]=t["3D"])})),e):e}),{})),o?I({oldManifest:o,newManifest:v}):v},q=function(e,t,n){var r=e.NOW,i=e.clientOffset,a=e.availabilityStartTime,o=e.timescale,s=void 0===o?1:o,u=e.periodStart,l=void 0===u?0:u,c=e.minimumUpdatePeriod,d=(r+i)/1e3+(void 0===c?0:c)-(a+l);return Math.ceil((d*s-t)/n)},H=function(e,t){for(var n=e.type,r=e.minimumUpdatePeriod,i=void 0===r?0:r,a=e.media,o=void 0===a?"":a,s=e.sourceDuration,u=e.timescale,l=void 0===u?1:u,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,b=g.t||0;f<0&&(f=b),b&&b>f&&(f=b);var _=void 0;if(y<0){var T=m+1;_=T===t.length?"dynamic"===n&&i>0&&o.indexOf("$Number$")>0?q(e,f,v):(s*l-f)/v:(t[T].t-f)/v}else _=y+1;for(var S=d+p.length+_,w=d+p.length;w<S;)p.push({number:w,duration:v/l,time:f,timeline:h}),f+=v,w++}return p},z=/\$([A-z]*)(?:(%0)([0-9]+)d)?\$/g,W=function(e,t){return e.replace(z,function(e){return function(t,n,r,i){if("$$"===t)return"$";if("undefined"===typeof e[n])return t;var a=""+e[n];return"RepresentationID"===n?a:(i=r?parseInt(i,10):1,a.length>=i?a:""+new Array(i-a.length+1).join("0")+a)}}(t))},V=function(e,t){var n={RepresentationID:e.id,Bandwidth:e.bandwidth||0},i=e.initialization,a=void 0===i?{sourceURL:"",range:""}:i,o=_({baseUrl:e.baseUrl,source:W(a.sourceURL,n),range:a.range});return function(e,t){return e.duration||t?e.duration?w(e):H(e,t):[{number:e.startNumber||1,duration:e.sourceDuration,time:0,timeline:e.periodStart}]}(e,t).map((function(t){n.Number=t.number,n.Time=t.time;var i=W(e.media||"",n),a=e.timescale||1,s=e.presentationTimeOffset||0,u=e.periodStart+(t.time-s)/a;return{uri:i,timeline:t.timeline,duration:t.duration,resolvedUri:Object(r.a)(e.baseUrl||"",i),map:o,number:t.number,presentationTime:u}}))},K=function(e,t){var n=e.duration,r=e.segmentUrls,i=void 0===r?[]:r,a=e.periodStart;if(!n&&!t||n&&t)throw new Error(y);var o,s=i.map((function(t){return function(e,t){var n=e.baseUrl,r=e.initialization,i=void 0===r?{}:r,a=_({baseUrl:n,source:i.sourceURL,range:i.range}),o=_({baseUrl:n,source:t.media,range:t.mediaRange});return o.map=a,o}(e,t)}));return n&&(o=w(e)),t&&(o=H(e,t)),o.map((function(t,n){if(s[n]){var r=s[n],i=e.timescale||1,o=e.presentationTimeOffset||0;return r.timeline=t.timeline,r.duration=t.duration,r.number=t.number,r.presentationTime=a+(t.time-o)/i,r}})).filter((function(e){return e}))},G=function(e){var t,n,r=e.attributes,i=e.segmentInfo;i.template?(n=V,t=l(r,i.template)):i.base?(n=k,t=l(r,i.base)):i.list&&(n=K,t=l(r,i.list));var a={attributes:r};if(!n)return a;var o=n(t,i.segmentTimeline);if(t.duration){var s=t,u=s.duration,c=s.timescale,d=void 0===c?1:c;t.duration=u/d}else o.length?t.duration=o.reduce((function(e,t){return Math.max(e,Math.ceil(t.duration))}),0):t.duration=0;return a.attributes=t,a.segments=o,i.base&&t.indexRange&&(a.sidx=o[0],a.segments=[]),a},X=function(e,t){return h(e.childNodes).filter((function(e){return e.tagName===t}))},Y=function(e){return e.textContent.trim()},Q=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 n=t.slice(1),r=n[0],i=n[1],a=n[2],o=n[3],s=n[4],u=n[5];return 31536e3*parseFloat(r||0)+2592e3*parseFloat(i||0)+86400*parseFloat(a||0)+3600*parseFloat(o||0)+60*parseFloat(s||0)+parseFloat(u||0)},$={mediaPresentationDuration:function(e){return Q(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 Q(e)},suggestedPresentationDelay:function(e){return Q(e)},type:function(e){return e},timeShiftBufferDepth:function(e){return Q(e)},start:function(e){return Q(e)},width:function(e){return parseInt(e,10)},height:function(e){return parseInt(e,10)},bandwidth:function(e){return parseInt(e,10)},frameRate:function(e){return function(e){return parseFloat(e.split("/").reduce((function(e,t){return e/t})))}(e)},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)?Q(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}},Z=function(e){return e&&e.attributes?h(e.attributes).reduce((function(e,t){var n=$[t.name]||$.DEFAULT;return e[t.name]=n(t.value),e}),{}):{}},J={"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"},ee=function(e,t){return t.length?d(e.map((function(e){return t.map((function(t){return Object(r.a)(e,Y(t))}))}))):e},te=function(e){var t=X(e,"SegmentTemplate")[0],n=X(e,"SegmentList")[0],r=n&&X(n,"SegmentURL").map((function(e){return l({tag:"SegmentURL"},Z(e))})),i=X(e,"SegmentBase")[0],a=n||t,o=a&&X(a,"SegmentTimeline")[0],s=n||i||t,u=s&&X(s,"Initialization")[0],c=t&&Z(t);c&&u?c.initialization=u&&Z(u):c&&c.initialization&&(c.initialization={sourceURL:c.initialization});var d={template:c,segmentTimeline:o&&X(o,"S").map((function(e){return Z(e)})),list:n&&l(Z(n),{segmentUrls:r,initialization:Z(u)}),base:i&&l(Z(i),{initialization:Z(u)})};return Object.keys(d).forEach((function(e){d[e]||delete d[e]})),d},ne=function(e,t,n){return function(r){var i,a=Z(r),s=ee(t,X(r,"BaseURL")),u=X(r,"Role")[0],c={role:Z(u)},h=l(e,a,c),p=X(r,"Accessibility")[0],f="urn:scte:dash:cc:cea-608:2015"===(i=Z(p)).schemeIdUri?("string"!==typeof i.value?[]:i.value.split(";")).map((function(e){var t,n;if(n=e,/^CC\d=/.test(e)){var r=e.split("=");t=r[0],n=r[1]}else/^CC\d$/.test(e)&&(t=e);return{channel:t,language:n}})):"urn:scte:dash:cc:cea-708:2015"===i.schemeIdUri?("string"!==typeof i.value?[]:i.value.split(";")).map((function(e){var t={channel:void 0,language:void 0,aspectRatio:1,easyReader:0,"3D":0};if(/=/.test(e)){var n=e.split("="),r=n[0],i=n[1],a=void 0===i?"":i;t.channel=r,t.language=e,a.split(",").forEach((function(e){var n=e.split(":"),r=n[0],i=n[1];"lang"===r?t.language=i:"er"===r?t.easyReader=Number(i):"war"===r?t.aspectRatio=Number(i):"3D"===r&&(t["3D"]=Number(i))}))}else t.language=e;return t.channel&&(t.channel="SERVICE"+t.channel),t})):void 0;f&&(h=l(h,{captionServices:f}));var m=X(r,"Label")[0];if(m&&m.childNodes.length){var g=m.childNodes[0].nodeValue.trim();h=l(h,{label:g})}var v=X(r,"ContentProtection").reduce((function(e,t){var n=Z(t);n.schemeIdUri&&(n.schemeIdUri=n.schemeIdUri.toLowerCase());var r=J[n.schemeIdUri];if(r){e[r]={attributes:n};var i=X(t,"cenc:pssh")[0];if(i){var a=Y(i);e[r].pssh=a&&Object(o.a)(a)}}return e}),{});Object.keys(v).length&&(h=l(h,{contentProtection:v}));var y=te(r),b=X(r,"Representation"),_=l(n,y);return d(b.map(function(e,t,n){return function(r){var i=X(r,"BaseURL"),a=ee(t,i),o=l(e,Z(r)),s=te(r);return a.map((function(e){return{segmentInfo:l(n,s),attributes:l(o,{baseUrl:e})}}))}}(h,s,_)))}},re=function(e,t){return function(n,r){var i=ee(t,X(n.node,"BaseURL")),a=l(e,{periodStart:n.attributes.start});"number"===typeof n.attributes.duration&&(a.periodDuration=n.attributes.duration);var o=X(n.node,"AdaptationSet"),s=te(n.node);return d(o.map(ne(a,i,s)))}},ie=function(e){if(""===e)throw new Error(m);var t,n,r=new s.DOMParser;try{n=(t=r.parseFromString(e,"application/xml"))&&"MPD"===t.documentElement.tagName?t.documentElement:null}catch(i){}if(!n||n&&n.getElementsByTagName("parsererror").length>0)throw new Error(g);return n},ae=function(e,t){void 0===t&&(t={});var n=function(e,t){void 0===t&&(t={});var n=t,r=n.manifestUri,i=void 0===r?"":r,a=n.NOW,o=void 0===a?Date.now():a,s=n.clientOffset,u=void 0===s?0:s,l=X(e,"Period");if(!l.length)throw new Error(f);var c=X(e,"Location"),h=Z(e),p=ee([i],X(e,"BaseURL"));h.type=h.type||"static",h.sourceDuration=h.mediaPresentationDuration||0,h.NOW=o,h.clientOffset=u,c.length&&(h.locations=c.map(Y));var m=[];return l.forEach((function(e,t){var n=Z(e),r=m[t-1];n.start=function(e){var t=e.attributes,n=e.priorPeriodAttributes,r=e.mpdType;return"number"===typeof t.start?t.start:n&&"number"===typeof n.start&&"number"===typeof n.duration?n.start+n.duration:n||"static"!==r?null:0}({attributes:n,priorPeriodAttributes:r?r.attributes:null,mpdType:h.type}),m.push({node:e,attributes:n})})),{locations:h.locations,representationInfo:d(m.map(re(h,p)))}}(ie(e),t),r=n.representationInfo.map(G);return F({dashPlaylists:r,locations:n.locations,sidxMapping:t.sidxMapping,previousManifest:t.previousManifest})},oe=function(e){return function(e){var t=X(e,"UTCTiming")[0];if(!t)return null;var n=Z(t);switch(n.schemeIdUri){case"urn:mpeg:dash:utc:http-head:2014":case"urn:mpeg:dash:utc:http-head:2012":n.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":n.method="GET";break;case"urn:mpeg:dash:utc:direct:2014":case"urn:mpeg:dash:utc:direct:2012":n.method="DIRECT",n.value=Date.parse(n.value);break;case"urn:mpeg:dash:utc:http-ntp:2014":case"urn:mpeg:dash:utc:ntp:2014":case"urn:mpeg:dash:utc:sntp:2014":default:throw new Error(b)}return n}(ie(e))}},hLh5:function(e,t,n){var r=n("JVs5"),i=n("sCZI"),a=n("4Tei"),o=n("esM1");e.exports=function(){var e=i("Symbol"),t=e&&e.prototype,n=t&&t.valueOf,s=a("toPrimitive");t&&!t[s]&&o(t,s,(function(e){return r(n,this)}),{arity:1})}},hkIh:function(e,t){e.exports={}},i1Oy:function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=/^(audio|video|application)\/(x-|vnd\.apple\.)?mpegurl/i,i=/^application\/dash\+xml/i,a=function(e){return r.test(e)?"hls":i.test(e)?"dash":"application/vnd.videojs.vhs+json"===e?"vhs-json":null}},iQUD:function(e,t,n){e.exports=n.p+"static/media/micpause.5b341f1d.svg"},iadd:function(e,t,n){"use strict";function r(e,t){return void 0===t&&(t=Object),t&&"function"===typeof t.freeze?t.freeze(e):e}var i=r({HTML:"text/html",isHTML:function(e){return e===i.HTML},XML_APPLICATION:"application/xml",XML_TEXT:"text/xml",XML_XHTML_APPLICATION:"application/xhtml+xml",XML_SVG_IMAGE:"image/svg+xml"}),a=r({HTML:"http://www.w3.org/1999/xhtml",isHTML:function(e){return e===a.HTML},SVG:"http://www.w3.org/2000/svg",XML:"http://www.w3.org/XML/1998/namespace",XMLNS:"http://www.w3.org/2000/xmlns/"});t.assign=function(e,t){if(null===e||"object"!==typeof e)throw new TypeError("target is not an object");for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},t.find=function(e,t,n){if(void 0===n&&(n=Array.prototype),e&&"function"===typeof n.find)return n.find.call(e,t);for(var r=0;r<e.length;r++)if(Object.prototype.hasOwnProperty.call(e,r)){var i=e[r];if(t.call(void 0,i,r,e))return i}},t.freeze=r,t.MIME_TYPE=i,t.NAMESPACE=a},if8a:function(e,t,n){"use strict";n.r(t);var r=n("1OyB"),i=n("vuIU"),a=n("Ji7U"),o=n("LK+K"),s=n("q1tI"),u=n.n(s),l=n("Ty5D"),c=n("/MKj"),d=n("ANjH"),h=n("diH0"),p=n("G8w8"),f=n.n(p),m=n("azCW"),g=n.n(m),v=n("0srb"),y=n("rQwP"),b=u.a.createElement,_=function(e){var t=e.articles,n=(e.authorName,e.noImage);e.moreButton;return b(u.a.Fragment,null,t.map((function(e,t){return e.image=e.images[0],b(y.a,{key:e.contentKey,article:e,noImage:n})})))},T=function(e){Object(a.a)(n,e);var t=Object(o.a)(n);function n(e){var i;Object(r.a)(this,n),i=t.call(this,e);var a=e.staticContext;return a&&(a.is404=!0),i}return Object(i.a)(n,[{key:"render",value:function(){return b(u.a.Fragment,null,b("div",{className:"main-content"},b("div",{className:"wrapper no-results"},b("img",{src:f.a,alt:"404 Page not found"}),b("h1",null,"404 Page not found"))),b("div",{className:"wrapper"},b("div",{className:"search-page",itemType:"http://schema.org/ItemList"},b("h1",null,b("span",null,"Most Read")),b(v.Articles,{className:"article-list paged",component:_,page0Limit:8,pageSize:8,fetchArticles:this.props.fetchMostReadArticles,noImage:g.a,articles:this.props.articles,notFound:function(){return b("div",null,"Oops! No articles found.")},fetchMoreArticles:function(){}}))))}}]),n}(s.Component);t.default=Object(l.withRouter)(Object(c.connect)((function(e){return{articles:e.mostReadArticles}}),(function(e){return Object(d.bindActionCreators)({fetchMostReadArticles:h.b},e)}))(T))},ir1D:function(e,t,n){var r=n("Dr2v"),i=n("4wiq");e.exports=function(e){if("Function"===r(e))return i(e)}},j0Et:function(e,t){e.exports=function(e){return null===e||void 0===e}},jACb:function(e,t,n){"use strict";var r=n("vgmO");e.exports=function(e,t){return void 0===t&&(t=!1),function(n,i,a){if(n)e(n);else if(i.statusCode>=400&&i.statusCode<=599){var o=a;if(t)if(r.TextDecoder){var s=function(e){void 0===e&&(e="");return e.toLowerCase().split(";").reduce((function(e,t){var n=t.split("="),r=n[0],i=n[1];return"charset"===r.trim()?i.trim():e}),"utf-8")}(i.headers&&i.headers["content-type"]);try{o=new TextDecoder(s).decode(a)}catch(u){}}else o=String.fromCharCode.apply(null,new Uint8Array(a));e({cause:o})}else e(null,a)}}},jBAH:function(e,t){e.exports=function(e,t){var n,r=null;try{n=JSON.parse(e,t)}catch(i){r=i}return[r,n]}},jBts:function(e,t,n){e.exports=n.p+"static/media/bookmark-ico.18d10d1f.svg"},jfrp:function(e,t,n){var r=n("W2Ac"),i=n("JVs5"),a=n("I62h"),o=n("PEjt"),s=n("Yo2p"),u=n("8z+Y"),l=n("+BqG"),c=n("a0yg"),d=Object.getOwnPropertyDescriptor;t.f=r?d:function(e,t){if(e=s(e),t=u(t),c)try{return d(e,t)}catch(n){}if(l(e,t))return o(!i(a.f,e,t),e[t])}},juv8:function(e,t,n){var r=n("MrPd"),i=n("hypo");e.exports=function(e,t,n,a){var o=!n;n||(n={});for(var s=-1,u=t.length;++s<u;){var l=t[s],c=a?a(n[l],e[l],l,n,e):void 0;void 0===c&&(c=e[l]),o?i(n,l,c):r(n,l,c)}return n}},k8lO:function(e,t,n){e.exports=n.p+"static/media/Icon-TextToSpeech-Audio.6187eaff.png"},kHmz:function(e,t,n){"use strict";var r=n("q1tI"),i=n.n(r),a=n("itc3"),o=i.a.createElement;t.a=function(e){var t=e.useSmall;return o("span",null,o(a.HagDesktop,{values:{deviceWidth:a.defaultWidth}},o("div",{className:"wing-banners horizontal-center"+(t?" reduced-header":"")},o("div",{id:"adngin-wingbanner-left-0",className:"advert-wingbanner-left"}),o("div",{id:"adngin-wingbanner-right-0",className:"advert-wingbanner-right"}))))}},"lZX+":function(e,t,n){"use strict";var r=n("DsG2"),i=n("2JmJ");e.exports=r?{}.toString:function(){return"[object "+i(this)+"]"}},mESY:function(e,t,n){var r=n("eDf4"),i=n("wOhn"),a=i.all;e.exports=i.IS_HTMLDDA?function(e){return"object"==typeof e?null!==e:r(e)||e===a}:function(e){return"object"==typeof e?null!==e:r(e)}},ma6D:function(e,t,n){var r=n("W2Ac"),i=n("xZj3");e.exports=r&&i((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype}))},nNRg:function(e,t,n){var r=n("LHWz"),i=n("wUBo"),a=n("6r0g"),o=n("+YUa"),s=n("w1io"),u=n("4Tei"),l=u("iterator"),c=u("toStringTag"),d=o.values,h=function(e,t){if(e){if(e[l]!==d)try{s(e,l,d)}catch(r){e[l]=d}if(e[c]||s(e,c,t),i[t])for(var n in o)if(e[n]!==o[n])try{s(e,n,o[n])}catch(r){e[n]=o[n]}}};for(var p in i)h(r[p]&&r[p].prototype,p);h(a,"DOMTokenList")},niYQ:function(e,t,n){var r=n("UZoB"),i=n("rRP5");e.exports=Object.keys||function(e){return r(e,i)}},oShl:function(e,t,n){var r=n("Nsbk"),i=n("SksO"),a=n("xfeJ"),o=n("sXyB");function s(t){var n="function"===typeof Map?new Map:void 0;return e.exports=s=function(e){if(null===e||!a(e))return e;if("function"!==typeof e)throw new TypeError("Super expression must either be null or a function");if("undefined"!==typeof n){if(n.has(e))return n.get(e);n.set(e,t)}function t(){return o(e,arguments,r(this).constructor)}return t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),i(t,e)},e.exports.__esModule=!0,e.exports.default=e.exports,s(t)}e.exports=s,e.exports.__esModule=!0,e.exports.default=e.exports},ok90:function(e,t,n){var r=n("Fyp5"),i=n("xZj3");e.exports=!!Object.getOwnPropertySymbols&&!i((function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&r&&r<41}))},orrc:function(e,t,n){var r=n("xZj3");e.exports=!r((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")}))},"otv/":function(e,t,n){var r=n("nmnc"),i=r?r.prototype:void 0,a=i?i.valueOf:void 0;e.exports=function(e){return a?Object(a.call(e)):{}}},owxc:function(e,t,n){var r=n("szlw"),i=n("sCZI"),a=n("+BqG"),o=n("QICv"),s=n("Avys"),u=n("vY6g"),l=s("string-to-symbol-registry"),c=s("symbol-to-string-registry");r({target:"Symbol",stat:!0,forced:!u},{for:function(e){var t=o(e);if(a(l,t))return l[t];var n=i("Symbol")(t);return l[t]=n,c[n]=t,n}})},pROP:function(e,t,n){var r=n("eDf4"),i=n("B8MI"),a=TypeError;e.exports=function(e){if(r(e))return e;throw a(i(e)+" is not a function")}},pfAL:function(e,t){t.f=Object.getOwnPropertySymbols},qFS3:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.bodyOpenClassName=t.portalClassName=void 0;var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=n("q1tI"),o=f(a),s=f(n("i8i4")),u=f(n("17x9")),l=f(n("QEso")),c=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(n("Ye7m")),d=n("2zs7"),h=f(d),p=n("VCL8");function f(e){return e&&e.__esModule?e:{default:e}}function m(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function g(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}var v=t.portalClassName="ReactModalPortal",y=t.bodyOpenClassName="ReactModal__Body--open",b=d.canUseDOM&&void 0!==s.default.createPortal,_=function(e){return document.createElement(e)},T=function(){return b?s.default.createPortal:s.default.unstable_renderSubtreeIntoContainer};function S(e){return e()}var w=function(e){function t(){var e,n,i;m(this,t);for(var a=arguments.length,u=Array(a),c=0;c<a;c++)u[c]=arguments[c];return n=i=g(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(u))),i.removePortal=function(){!b&&s.default.unmountComponentAtNode(i.node);var e=S(i.props.parentSelector);e&&e.contains(i.node)?e.removeChild(i.node):console.warn('React-Modal: "parentSelector" prop did not returned any DOM element. Make sure that the parent element is unmounted to avoid any memory leaks.')},i.portalRef=function(e){i.portal=e},i.renderPortal=function(e){var n=T()(i,o.default.createElement(l.default,r({defaultStyles:t.defaultStyles},e)),i.node);i.portalRef(n)},g(i,n)}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,[{key:"componentDidMount",value:function(){d.canUseDOM&&(b||(this.node=_("div")),this.node.className=this.props.portalClassName,S(this.props.parentSelector).appendChild(this.node),!b&&this.renderPortal(this.props))}},{key:"getSnapshotBeforeUpdate",value:function(e){return{prevParent:S(e.parentSelector),nextParent:S(this.props.parentSelector)}}},{key:"componentDidUpdate",value:function(e,t,n){if(d.canUseDOM){var r=this.props,i=r.isOpen,a=r.portalClassName;e.portalClassName!==a&&(this.node.className=a);var o=n.prevParent,s=n.nextParent;s!==o&&(o.removeChild(this.node),s.appendChild(this.node)),(e.isOpen||i)&&!b&&this.renderPortal(this.props)}}},{key:"componentWillUnmount",value:function(){if(d.canUseDOM&&this.node&&this.portal){var e=this.portal.state,t=Date.now(),n=e.isOpen&&this.props.closeTimeoutMS&&(e.closesAt||t+this.props.closeTimeoutMS);n?(e.beforeClose||this.portal.closeWithTimeout(),setTimeout(this.removePortal,n-t)):this.removePortal()}}},{key:"render",value:function(){return d.canUseDOM&&b?(!this.node&&b&&(this.node=_("div")),T()(o.default.createElement(l.default,r({ref:this.portalRef,defaultStyles:t.defaultStyles},this.props)),this.node)):null}}],[{key:"setAppElement",value:function(e){c.setElement(e)}}]),t}(a.Component);w.propTypes={isOpen:u.default.bool.isRequired,style:u.default.shape({content:u.default.object,overlay:u.default.object}),portalClassName:u.default.string,bodyOpenClassName:u.default.string,htmlOpenClassName:u.default.string,className:u.default.oneOfType([u.default.string,u.default.shape({base:u.default.string.isRequired,afterOpen:u.default.string.isRequired,beforeClose:u.default.string.isRequired})]),overlayClassName:u.default.oneOfType([u.default.string,u.default.shape({base:u.default.string.isRequired,afterOpen:u.default.string.isRequired,beforeClose:u.default.string.isRequired})]),appElement:u.default.oneOfType([u.default.instanceOf(h.default),u.default.instanceOf(d.SafeHTMLCollection),u.default.instanceOf(d.SafeNodeList),u.default.arrayOf(u.default.instanceOf(h.default))]),onAfterOpen:u.default.func,onRequestClose:u.default.func,closeTimeoutMS:u.default.number,ariaHideApp:u.default.bool,shouldFocusAfterRender:u.default.bool,shouldCloseOnOverlayClick:u.default.bool,shouldReturnFocusAfterClose:u.default.bool,preventScroll:u.default.bool,parentSelector:u.default.func,aria:u.default.object,data:u.default.object,role:u.default.string,contentLabel:u.default.string,shouldCloseOnEsc:u.default.bool,overlayRef:u.default.func,contentRef:u.default.func,id:u.default.string,overlayElement:u.default.func,contentElement:u.default.func},w.defaultProps={isOpen:!1,portalClassName:v,bodyOpenClassName:y,role:"dialog",ariaHideApp:!0,closeTimeoutMS:0,shouldFocusAfterRender:!0,shouldCloseOnEsc:!0,shouldCloseOnOverlayClick:!0,shouldReturnFocusAfterClose:!0,preventScroll:!1,parentSelector:function(){return document.body},overlayElement:function(e,t){return o.default.createElement("div",e,t)},contentElement:function(e,t){return o.default.createElement("div",e,t)}},w.defaultStyles={overlay:{position:"fixed",top:0,left:0,right:0,bottom:0,backgroundColor:"rgba(255, 255, 255, 0.75)"},content:{position:"absolute",top:"40px",left:"40px",right:"40px",bottom:"40px",border:"1px solid #ccc",background:"#fff",overflow:"auto",WebkitOverflowScrolling:"touch",borderRadius:"4px",outline:"none",padding:"20px"}},(0,p.polyfill)(w),t.default=w},qWin:function(e,t){var n=Math.pow(2,32);e.exports={getUint64:function(e){var t,r=new DataView(e.buffer,e.byteOffset,e.byteLength);return r.getBigUint64?(t=r.getBigUint64(0))<Number.MAX_SAFE_INTEGER?Number(t):t:r.getUint32(0)*n+r.getUint32(4)},MAX_UINT32:n}},rQwP:function(e,t,n){"use strict";var r=n("q1tI"),i=n.n(r),a=n("55Ip"),o=n("yCm8"),s=i.a.createElement;t.a=function(e){var t=e.article,n=e.noImage;e.lazy;return s("article",{key:t.contentKey,"aria-label":"article"},s(a.Link,{to:"/"+t.getCanonicalUri()},s("div",{className:"article-list-img"},s(o.ImageOrNoImage,{shape:"square",width:400,image:t.image,alt:t.headline,noImage:n})),s("h4",{role:"heading"},t.headline),("SPONSORED"===t.sponsoredIndicator||"SPONSORED_EXPIRED"===t.sponsoredIndicator)&&s("small",{className:"sponsored"},"Sponsored"),("NATIVE"===t.sponsoredIndicator||"NATIVE_EXPIRED"===t.sponsoredIndicator)&&s("small",{className:"native"},"Partnered"),s("p",null,t.abstract)))}},rRP5:function(e,t){e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},sCZI:function(e,t,n){var r=n("LHWz"),i=n("eDf4"),a=function(e){return i(e)?e:void 0};e.exports=function(e,t){return arguments.length<2?a(r[e]):r[e]&&r[e][t]}},sDzi:function(e,t){var n={"":1,lr:1,rl:1},r={start:1,center:1,end:1,left:1,right:1,auto:1,"line-left":1,"line-right":1};function i(e){return"string"===typeof e&&(!!r[e.toLowerCase()]&&e.toLowerCase())}function a(e,t,r){this.hasBeenReset=!1;var a="",o=!1,s=e,u=t,l=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 a},set:function(e){a=""+e}},pauseOnExit:{enumerable:!0,get:function(){return o},set:function(e){o=!!e}},startTime:{enumerable:!0,get:function(){return s},set:function(e){if("number"!==typeof e)throw new TypeError("Start time must be set to a number.");s=e,this.hasBeenReset=!0}},endTime:{enumerable:!0,get:function(){return u},set:function(e){if("number"!==typeof e)throw new TypeError("End time must be set to a number.");u=e,this.hasBeenReset=!0}},text:{enumerable:!0,get:function(){return l},set:function(e){l=""+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 t=function(e){return"string"===typeof e&&(!!n[e.toLowerCase()]&&e.toLowerCase())}(e);if(!1===t)throw new SyntaxError("Vertical: an invalid or illegal direction string was specified.");d=t,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=i(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=i(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=i(e);if(!t)throw new SyntaxError("align: an invalid or illegal alignment string was specified.");y=t,this.hasBeenReset=!0}}}),this.displayState=void 0}a.prototype.getCueAsHTML=function(){return WebVTT.convertCueToDOMTree(window,this.text)},e.exports=a},sEfC:function(e,t,n){var r=n("GoyQ"),i=n("QIyF"),a=n("tLB3"),o=Math.max,s=Math.min;e.exports=function(e,t,n){var u,l,c,d,h,p,f=0,m=!1,g=!1,v=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function y(t){var n=u,r=l;return u=l=void 0,f=t,d=e.apply(r,n)}function b(e){return f=e,h=setTimeout(T,t),m?y(e):d}function _(e){var n=e-p;return void 0===p||n>=t||n<0||g&&e-f>=c}function T(){var e=i();if(_(e))return S(e);h=setTimeout(T,function(e){var n=t-(e-p);return g?s(n,c-(e-f)):n}(e))}function S(e){return h=void 0,v&&u?y(e):(u=l=void 0,d)}function w(){var e=i(),n=_(e);if(u=arguments,l=this,p=e,n){if(void 0===h)return b(p);if(g)return clearTimeout(h),h=setTimeout(T,t),y(p)}return void 0===h&&(h=setTimeout(T,t)),d}return t=a(t)||0,r(n)&&(m=!!n.leading,c=(g="maxWait"in n)?o(a(n.maxWait)||0,t):c,v="trailing"in n?!!n.trailing:v),w.cancel=function(){void 0!==h&&clearTimeout(h),f=0,u=p=l=h=void 0},w.flush=function(){return void 0===h?d:S(i())},w}},sHRr:function(e,t,n){var r=n("iadd"),i=n("4ciW"),a=n("sw/d"),o=n("4ANG"),s=i.DOMImplementation,u=r.NAMESPACE,l=o.ParseError,c=o.XMLReader;function d(e){return e.replace(/\r[\n\u0085]/g,"\n").replace(/[\r\u0085\u2028]/g,"\n")}function h(e){this.options=e||{locator:{}}}function p(){this.cdata=!1}function f(e,t){t.lineNumber=e.lineNumber,t.columnNumber=e.columnNumber}function m(e){if(e)return"\n@"+(e.systemId||"")+"#[line:"+e.lineNumber+",col:"+e.columnNumber+"]"}function g(e,t,n){return"string"==typeof e?e.substr(t,n):e.length>=t+n||t?new java.lang.String(e,t,n)+"":e}function v(e,t){e.currentElement?e.currentElement.appendChild(t):e.doc.appendChild(t)}h.prototype.parseFromString=function(e,t){var n=this.options,r=new c,i=n.domBuilder||new p,o=n.errorHandler,s=n.locator,l=n.xmlns||{},h=/\/x?html?$/.test(t),f=h?a.HTML_ENTITIES:a.XML_ENTITIES;s&&i.setDocumentLocator(s),r.errorHandler=function(e,t,n){if(!e){if(t instanceof p)return t;e=t}var r={},i=e instanceof Function;function a(t){var a=e[t];!a&&i&&(a=2==e.length?function(n){e(t,n)}:e),r[t]=a&&function(e){a("[xmldom "+t+"]\t"+e+m(n))}||function(){}}return n=n||{},a("warning"),a("error"),a("fatalError"),r}(o,i,s),r.domBuilder=n.domBuilder||i,h&&(l[""]=u.HTML),l.xml=l.xml||u.XML;var g=n.normalizeLineEndings||d;return e&&"string"===typeof e?r.parse(g(e),l,f):r.errorHandler.error("invalid doc source"),i.doc},p.prototype={startDocument:function(){this.doc=(new s).createDocument(null,null,null),this.locator&&(this.doc.documentURI=this.locator.systemId)},startElement:function(e,t,n,r){var i=this.doc,a=i.createElementNS(e,n||t),o=r.length;v(this,a),this.currentElement=a,this.locator&&f(this.locator,a);for(var s=0;s<o;s++){e=r.getURI(s);var u=r.getValue(s),l=(n=r.getQName(s),i.createAttributeNS(e,n));this.locator&&f(r.getLocator(s),l),l.value=l.nodeValue=u,a.setAttributeNode(l)}},endElement:function(e,t,n){var r=this.currentElement;r.tagName;this.currentElement=r.parentNode},startPrefixMapping:function(e,t){},endPrefixMapping:function(e){},processingInstruction:function(e,t){var n=this.doc.createProcessingInstruction(e,t);this.locator&&f(this.locator,n),v(this,n)},ignorableWhitespace:function(e,t,n){},characters:function(e,t,n){if(e=g.apply(this,arguments)){if(this.cdata)var r=this.doc.createCDATASection(e);else r=this.doc.createTextNode(e);this.currentElement?this.currentElement.appendChild(r):/^\s*$/.test(e)&&this.doc.appendChild(r),this.locator&&f(this.locator,r)}},skippedEntity:function(e){},endDocument:function(){this.doc.normalize()},setDocumentLocator:function(e){(this.locator=e)&&(e.lineNumber=0)},comment:function(e,t,n){e=g.apply(this,arguments);var r=this.doc.createComment(e);this.locator&&f(this.locator,r),v(this,r)},startCDATA:function(){this.cdata=!0},endCDATA:function(){this.cdata=!1},startDTD:function(e,t,n){var r=this.doc.implementation;if(r&&r.createDocumentType){var i=r.createDocumentType(e,t,n);this.locator&&f(this.locator,i),v(this,i),this.doc.doctype=i}},warning:function(e){console.warn("[xmldom warning]\t"+e,m(this.locator))},error:function(e){console.error("[xmldom error]\t"+e,m(this.locator))},fatalError:function(e){throw new l(e,this.locator)}},"endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl".replace(/\w+/g,(function(e){p.prototype[e]=function(){return null}})),t.__DOMHandler=p,t.normalizeLineEndings=d,t.DOMParser=h},sXyB:function(e,t,n){var r=n("SksO"),i=n("b48C");function a(t,n,o){return i()?(e.exports=a=Reflect.construct.bind(),e.exports.__esModule=!0,e.exports.default=e.exports):(e.exports=a=function(e,t,n){var i=[null];i.push.apply(i,t);var a=new(Function.bind.apply(e,i));return n&&r(a,n.prototype),a},e.exports.__esModule=!0,e.exports.default=e.exports),a.apply(null,arguments)}e.exports=a,e.exports.__esModule=!0,e.exports.default=e.exports},"sw/d":function(e,t,n){var r=n("iadd").freeze;t.XML_ENTITIES=r({amp:"&",apos:"'",gt:">",lt:"<",quot:'"'}),t.HTML_ENTITIES=r({lt:"<",gt:">",amp:"&",quot:'"',apos:"'",Agrave:"\xc0",Aacute:"\xc1",Acirc:"\xc2",Atilde:"\xc3",Auml:"\xc4",Aring:"\xc5",AElig:"\xc6",Ccedil:"\xc7",Egrave:"\xc8",Eacute:"\xc9",Ecirc:"\xca",Euml:"\xcb",Igrave:"\xcc",Iacute:"\xcd",Icirc:"\xce",Iuml:"\xcf",ETH:"\xd0",Ntilde:"\xd1",Ograve:"\xd2",Oacute:"\xd3",Ocirc:"\xd4",Otilde:"\xd5",Ouml:"\xd6",Oslash:"\xd8",Ugrave:"\xd9",Uacute:"\xda",Ucirc:"\xdb",Uuml:"\xdc",Yacute:"\xdd",THORN:"\xde",szlig:"\xdf",agrave:"\xe0",aacute:"\xe1",acirc:"\xe2",atilde:"\xe3",auml:"\xe4",aring:"\xe5",aelig:"\xe6",ccedil:"\xe7",egrave:"\xe8",eacute:"\xe9",ecirc:"\xea",euml:"\xeb",igrave:"\xec",iacute:"\xed",icirc:"\xee",iuml:"\xef",eth:"\xf0",ntilde:"\xf1",ograve:"\xf2",oacute:"\xf3",ocirc:"\xf4",otilde:"\xf5",ouml:"\xf6",oslash:"\xf8",ugrave:"\xf9",uacute:"\xfa",ucirc:"\xfb",uuml:"\xfc",yacute:"\xfd",thorn:"\xfe",yuml:"\xff",nbsp:"\xa0",iexcl:"\xa1",cent:"\xa2",pound:"\xa3",curren:"\xa4",yen:"\xa5",brvbar:"\xa6",sect:"\xa7",uml:"\xa8",copy:"\xa9",ordf:"\xaa",laquo:"\xab",not:"\xac",shy:"\xad\xad",reg:"\xae",macr:"\xaf",deg:"\xb0",plusmn:"\xb1",sup2:"\xb2",sup3:"\xb3",acute:"\xb4",micro:"\xb5",para:"\xb6",middot:"\xb7",cedil:"\xb8",sup1:"\xb9",ordm:"\xba",raquo:"\xbb",frac14:"\xbc",frac12:"\xbd",frac34:"\xbe",iquest:"\xbf",times:"\xd7",divide:"\xf7",forall:"\u2200",part:"\u2202",exist:"\u2203",empty:"\u2205",nabla:"\u2207",isin:"\u2208",notin:"\u2209",ni:"\u220b",prod:"\u220f",sum:"\u2211",minus:"\u2212",lowast:"\u2217",radic:"\u221a",prop:"\u221d",infin:"\u221e",ang:"\u2220",and:"\u2227",or:"\u2228",cap:"\u2229",cup:"\u222a",int:"\u222b",there4:"\u2234",sim:"\u223c",cong:"\u2245",asymp:"\u2248",ne:"\u2260",equiv:"\u2261",le:"\u2264",ge:"\u2265",sub:"\u2282",sup:"\u2283",nsub:"\u2284",sube:"\u2286",supe:"\u2287",oplus:"\u2295",otimes:"\u2297",perp:"\u22a5",sdot:"\u22c5",Alpha:"\u0391",Beta:"\u0392",Gamma:"\u0393",Delta:"\u0394",Epsilon:"\u0395",Zeta:"\u0396",Eta:"\u0397",Theta:"\u0398",Iota:"\u0399",Kappa:"\u039a",Lambda:"\u039b",Mu:"\u039c",Nu:"\u039d",Xi:"\u039e",Omicron:"\u039f",Pi:"\u03a0",Rho:"\u03a1",Sigma:"\u03a3",Tau:"\u03a4",Upsilon:"\u03a5",Phi:"\u03a6",Chi:"\u03a7",Psi:"\u03a8",Omega:"\u03a9",alpha:"\u03b1",beta:"\u03b2",gamma:"\u03b3",delta:"\u03b4",epsilon:"\u03b5",zeta:"\u03b6",eta:"\u03b7",theta:"\u03b8",iota:"\u03b9",kappa:"\u03ba",lambda:"\u03bb",mu:"\u03bc",nu:"\u03bd",xi:"\u03be",omicron:"\u03bf",pi:"\u03c0",rho:"\u03c1",sigmaf:"\u03c2",sigma:"\u03c3",tau:"\u03c4",upsilon:"\u03c5",phi:"\u03c6",chi:"\u03c7",psi:"\u03c8",omega:"\u03c9",thetasym:"\u03d1",upsih:"\u03d2",piv:"\u03d6",OElig:"\u0152",oelig:"\u0153",Scaron:"\u0160",scaron:"\u0161",Yuml:"\u0178",fnof:"\u0192",circ:"\u02c6",tilde:"\u02dc",ensp:"\u2002",emsp:"\u2003",thinsp:"\u2009",zwnj:"\u200c",zwj:"\u200d",lrm:"\u200e",rlm:"\u200f",ndash:"\u2013",mdash:"\u2014",lsquo:"\u2018",rsquo:"\u2019",sbquo:"\u201a",ldquo:"\u201c",rdquo:"\u201d",bdquo:"\u201e",dagger:"\u2020",Dagger:"\u2021",bull:"\u2022",hellip:"\u2026",permil:"\u2030",prime:"\u2032",Prime:"\u2033",lsaquo:"\u2039",rsaquo:"\u203a",oline:"\u203e",euro:"\u20ac",trade:"\u2122",larr:"\u2190",uarr:"\u2191",rarr:"\u2192",darr:"\u2193",harr:"\u2194",crarr:"\u21b5",lceil:"\u2308",rceil:"\u2309",lfloor:"\u230a",rfloor:"\u230b",loz:"\u25ca",spades:"\u2660",clubs:"\u2663",hearts:"\u2665",diams:"\u2666"}),t.entityMap=t.HTML_ENTITIES},szlw:function(e,t,n){var r=n("LHWz"),i=n("jfrp").f,a=n("w1io"),o=n("esM1"),s=n("uqF2"),u=n("/sSW"),l=n("xo7b");e.exports=function(e,t){var n,c,d,h,p,f=e.target,m=e.global,g=e.stat;if(n=m?r:g?r[f]||s(f,{}):(r[f]||{}).prototype)for(c in t){if(h=t[c],d=e.dontCallGetSet?(p=i(n,c))&&p.value:n[c],!l(m?c:f+(g?".":"#")+c,e.forced)&&void 0!==d){if(typeof h==typeof d)continue;u(h,d)}(e.sham||d&&d.sham)&&a(h,"sham",!0),o(n,c,h,e)}}},"tD7+":function(e,t,n){var r=n("GLMc"),i=Math.min;e.exports=function(e){return e>0?i(r(e),9007199254740991):0}},uM7l:function(e,t,n){var r=n("OBhP");e.exports=function(e){return r(e,4)}},uhBA:function(e,t,n){"use strict";var r=Object.prototype.hasOwnProperty,i="~";function a(){}function o(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function s(e,t,n,r,a){if("function"!==typeof n)throw new TypeError("The listener must be a function");var s=new o(n,r||e,a),u=i?i+t:t;return e._events[u]?e._events[u].fn?e._events[u]=[e._events[u],s]:e._events[u].push(s):(e._events[u]=s,e._eventsCount++),e}function u(e,t){0===--e._eventsCount?e._events=new a:delete e._events[t]}function l(){this._events=new a,this._eventsCount=0}Object.create&&(a.prototype=Object.create(null),(new a).__proto__||(i=!1)),l.prototype.eventNames=function(){var e,t,n=[];if(0===this._eventsCount)return n;for(t in e=this._events)r.call(e,t)&&n.push(i?t.slice(1):t);return Object.getOwnPropertySymbols?n.concat(Object.getOwnPropertySymbols(e)):n},l.prototype.listeners=function(e){var t=i?i+e:e,n=this._events[t];if(!n)return[];if(n.fn)return[n.fn];for(var r=0,a=n.length,o=new Array(a);r<a;r++)o[r]=n[r].fn;return o},l.prototype.listenerCount=function(e){var t=i?i+e:e,n=this._events[t];return n?n.fn?1:n.length:0},l.prototype.emit=function(e,t,n,r,a,o){var s=i?i+e:e;if(!this._events[s])return!1;var u,l,c=this._events[s],d=arguments.length;if(c.fn){switch(c.once&&this.removeListener(e,c.fn,void 0,!0),d){case 1:return c.fn.call(c.context),!0;case 2:return c.fn.call(c.context,t),!0;case 3:return c.fn.call(c.context,t,n),!0;case 4:return c.fn.call(c.context,t,n,r),!0;case 5:return c.fn.call(c.context,t,n,r,a),!0;case 6:return c.fn.call(c.context,t,n,r,a,o),!0}for(l=1,u=new Array(d-1);l<d;l++)u[l-1]=arguments[l];c.fn.apply(c.context,u)}else{var h,p=c.length;for(l=0;l<p;l++)switch(c[l].once&&this.removeListener(e,c[l].fn,void 0,!0),d){case 1:c[l].fn.call(c[l].context);break;case 2:c[l].fn.call(c[l].context,t);break;case 3:c[l].fn.call(c[l].context,t,n);break;case 4:c[l].fn.call(c[l].context,t,n,r);break;default:if(!u)for(h=1,u=new Array(d-1);h<d;h++)u[h-1]=arguments[h];c[l].fn.apply(c[l].context,u)}}return!0},l.prototype.on=function(e,t,n){return s(this,e,t,n,!1)},l.prototype.once=function(e,t,n){return s(this,e,t,n,!0)},l.prototype.removeListener=function(e,t,n,r){var a=i?i+e:e;if(!this._events[a])return this;if(!t)return u(this,a),this;var o=this._events[a];if(o.fn)o.fn!==t||r&&!o.once||n&&o.context!==n||u(this,a);else{for(var s=0,l=[],c=o.length;s<c;s++)(o[s].fn!==t||r&&!o[s].once||n&&o[s].context!==n)&&l.push(o[s]);l.length?this._events[a]=1===l.length?l[0]:l:u(this,a)}return this},l.prototype.removeAllListeners=function(e){var t;return e?(t=i?i+e:e,this._events[t]&&u(this,t)):(this._events=new a,this._eventsCount=0),this},l.prototype.off=l.prototype.removeListener,l.prototype.addListener=l.prototype.on,l.prefixed=i,l.EventEmitter=l,e.exports=l},uqF2:function(e,t,n){var r=n("LHWz"),i=Object.defineProperty;e.exports=function(e,t){try{i(r,e,{value:t,configurable:!0,writable:!0})}catch(n){r[e]=t}return t}},vOnD:function(e,t,n){"use strict";(function(e){var r=n("aJjT"),i=n.n(r),a=n("TAZq"),o=n.n(a),s=n("q1tI"),u=n.n(s),l=n("ME5O"),c=n("TOwV"),d=n("Wwog"),h=n("9uj6"),p=n("ECyS"),f=function(e,t){for(var n=[e[0]],r=0,i=t.length;r<i;r+=1)n.push(t[r],e[r+1]);return n},m="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},g=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},v=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),y=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},b=function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)},_=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t},T=function(e){return"object"===("undefined"===typeof e?"undefined":m(e))&&e.constructor===Object},S=Object.freeze([]),w=Object.freeze({});function k(e){return"function"===typeof e}function C(e){return e.displayName||e.name||"Component"}function E(e){return e&&"string"===typeof e.styledComponentId}var A="undefined"!==typeof e&&(e.env.REACT_APP_SC_ATTR||e.env.SC_ATTR)||"data-styled",x="undefined"!==typeof window&&"HTMLElement"in window,P="boolean"===typeof SC_DISABLE_SPEEDY&&SC_DISABLE_SPEEDY||"undefined"!==typeof e&&(e.env.REACT_APP_SC_DISABLE_SPEEDY||e.env.SC_DISABLE_SPEEDY)||!1;var I=function(e){function t(n){g(this,t);for(var r=arguments.length,i=Array(r>1?r-1:0),a=1;a<r;a++)i[a-1]=arguments[a];var o=_(this,e.call(this,"An error occurred. See https://github.com/styled-components/styled-components/blob/master/packages/styled-components/src/utils/errors.md#"+n+" for more information."+(i.length>0?" Additional arguments: "+i.join(", "):"")));return _(o)}return b(t,e),t}(Error),O=/^[^\S\n]*?\/\* sc-component-id:\s*(\S+)\s+\*\//gm,L=function(e){var t=""+(e||""),n=[];return t.replace(O,(function(e,t,r){return n.push({componentId:t,matchIndex:r}),e})),n.map((function(e,r){var i=e.componentId,a=e.matchIndex,o=n[r+1];return{componentId:i,cssFromDOM:o?t.slice(a,o.matchIndex):t.slice(a)}}))},D=/^\s*\/\/.*$/gm,M=new i.a({global:!1,cascade:!0,keyframe:!1,prefix:!1,compress:!1,semicolon:!0}),R=new i.a({global:!1,cascade:!0,keyframe:!1,prefix:!0,compress:!1,semicolon:!1}),N=[],j=function(e){if(-2===e){var t=N;return N=[],t}},B=o()((function(e){N.push(e)})),U=void 0,F=void 0,q=void 0,H=function(e,t,n){return t>0&&-1!==n.slice(0,t).indexOf(F)&&n.slice(t-F.length,t)!==F?"."+U:e};R.use([function(e,t,n){2===e&&n.length&&n[0].lastIndexOf(F)>0&&(n[0]=n[0].replace(q,H))},B,j]),M.use([B,j]);var z=function(e){return M("",e)};function W(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"&",i=e.join("").replace(D,""),a=t&&n?n+" "+t+" { "+i+" }":i;return U=r,F=t,q=new RegExp("\\"+F+"\\b","g"),R(n||!t?"":t,a)}var V=function(){return n.nc},K=function(e,t,n){n&&((e[t]||(e[t]=Object.create(null)))[n]=!0)},G=function(e,t){e[t]=Object.create(null)},X=function(e){return function(t,n){return void 0!==e[t]&&e[t][n]}},Y=function(e){var t="";for(var n in e)t+=Object.keys(e[n]).join(" ")+" ";return t.trim()},Q=function(e){if(e.sheet)return e.sheet;for(var t=e.ownerDocument.styleSheets.length,n=0;n<t;n+=1){var r=e.ownerDocument.styleSheets[n];if(r.ownerNode===e)return r}throw new I(10)},$=function(e,t,n){if(!t)return!1;var r=e.cssRules.length;try{e.insertRule(t,n<=r?n:r)}catch(i){return!1}return!0},Z=function(e){return"\n/* sc-component-id: "+e+" */\n"},J=function(e,t){for(var n=0,r=0;r<=t;r+=1)n+=e[r];return n},ee=function(e,t){return function(n){var r=V();return"<style "+[r&&'nonce="'+r+'"',A+'="'+Y(t)+'"','data-styled-version="4.4.1"',n].filter(Boolean).join(" ")+">"+e()+"</style>"}},te=function(e,t){return function(){var n,r=((n={})[A]=Y(t),n["data-styled-version"]="4.4.1",n),i=V();return i&&(r.nonce=i),u.a.createElement("style",y({},r,{dangerouslySetInnerHTML:{__html:e()}}))}},ne=function(e){return function(){return Object.keys(e)}},re=function(e,t){return e.createTextNode(Z(t))},ie=function e(t,n){var r=void 0===t?Object.create(null):t,i=void 0===n?Object.create(null):n,a=function(e){var t=i[e];return void 0!==t?t:i[e]=[""]},o=function(){var e="";for(var t in i){var n=i[t][0];n&&(e+=Z(t)+n)}return e};return{clone:function(){var t=function(e){var t=Object.create(null);for(var n in e)t[n]=y({},e[n]);return t}(r),n=Object.create(null);for(var a in i)n[a]=[i[a][0]];return e(t,n)},css:o,getIds:ne(i),hasNameForId:X(r),insertMarker:a,insertRules:function(e,t,n){a(e)[0]+=t.join(" "),K(r,e,n)},removeRules:function(e){var t=i[e];void 0!==t&&(t[0]="",G(r,e))},sealed:!1,styleTag:null,toElement:te(o,r),toHTML:ee(o,r)}},ae=function(e,t,n,r,i){if(x&&!n){var a=function(e,t,n){var r=document;e?r=e.ownerDocument:t&&(r=t.ownerDocument);var i=r.createElement("style");i.setAttribute(A,""),i.setAttribute("data-styled-version","4.4.1");var a=V();if(a&&i.setAttribute("nonce",a),i.appendChild(r.createTextNode("")),e&&!t)e.appendChild(i);else{if(!t||!e||!t.parentNode)throw new I(6);t.parentNode.insertBefore(i,n?t:t.nextSibling)}return i}(e,t,r);return P?function(e,t){var n=Object.create(null),r=Object.create(null),i=void 0!==t,a=!1,o=function(t){var i=r[t];return void 0!==i?i:(r[t]=re(e.ownerDocument,t),e.appendChild(r[t]),n[t]=Object.create(null),r[t])},s=function(){var e="";for(var t in r)e+=r[t].data;return e};return{clone:function(){throw new I(5)},css:s,getIds:ne(r),hasNameForId:X(n),insertMarker:o,insertRules:function(e,r,s){for(var u=o(e),l=[],c=r.length,d=0;d<c;d+=1){var h=r[d],p=i;if(p&&-1!==h.indexOf("@import"))l.push(h);else{p=!1;var f=d===c-1?"":" ";u.appendData(""+h+f)}}K(n,e,s),i&&l.length>0&&(a=!0,t().insertRules(e+"-import",l))},removeRules:function(o){var s=r[o];if(void 0!==s){var u=re(e.ownerDocument,o);e.replaceChild(u,s),r[o]=u,G(n,o),i&&a&&t().removeRules(o+"-import")}},sealed:!1,styleTag:e,toElement:te(s,n),toHTML:ee(s,n)}}(a,i):function(e,t){var n=Object.create(null),r=Object.create(null),i=[],a=void 0!==t,o=!1,s=function(e){var t=r[e];return void 0!==t?t:(r[e]=i.length,i.push(0),G(n,e),r[e])},u=function(){var t=Q(e).cssRules,n="";for(var a in r){n+=Z(a);for(var o=r[a],s=J(i,o),u=s-i[o];u<s;u+=1){var l=t[u];void 0!==l&&(n+=l.cssText)}}return n};return{clone:function(){throw new I(5)},css:u,getIds:ne(r),hasNameForId:X(n),insertMarker:s,insertRules:function(r,u,l){for(var c=s(r),d=Q(e),h=J(i,c),p=0,f=[],m=u.length,g=0;g<m;g+=1){var v=u[g],y=a;y&&-1!==v.indexOf("@import")?f.push(v):$(d,v,h+p)&&(y=!1,p+=1)}a&&f.length>0&&(o=!0,t().insertRules(r+"-import",f)),i[c]+=p,K(n,r,l)},removeRules:function(s){var u=r[s];if(void 0!==u&&!1!==e.isConnected){var l=i[u];!function(e,t,n){for(var r=t-n,i=t;i>r;i-=1)e.deleteRule(i)}(Q(e),J(i,u)-1,l),i[u]=0,G(n,s),a&&o&&t().removeRules(s+"-import")}},sealed:!1,styleTag:e,toElement:te(u,n),toHTML:ee(u,n)}}(a,i)}return ie()},oe=/\s+/,se=void 0;se=x?P?40:1e3:-1;var ue=0,le=void 0,ce=function(){function e(){var t=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:x?document.head:null,r=arguments.length>1&&void 0!==arguments[1]&&arguments[1];g(this,e),this.getImportRuleTag=function(){var e=t.importRuleTag;if(void 0!==e)return e;var n=t.tags[0];return t.importRuleTag=ae(t.target,n?n.styleTag:null,t.forceServer,!0)},ue+=1,this.id=ue,this.forceServer=r,this.target=r?null:n,this.tagMap={},this.deferred={},this.rehydratedNames={},this.ignoreRehydratedNames={},this.tags=[],this.capacity=1,this.clones=[]}return e.prototype.rehydrate=function(){if(!x||this.forceServer)return this;var e=[],t=[],n=!1,r=document.querySelectorAll("style["+A+'][data-styled-version="4.4.1"]'),i=r.length;if(!i)return this;for(var a=0;a<i;a+=1){var o=r[a];n||(n=!!o.getAttribute("data-styled-streamed"));for(var s,u=(o.getAttribute(A)||"").trim().split(oe),l=u.length,c=0;c<l;c+=1)s=u[c],this.rehydratedNames[s]=!0;t.push.apply(t,L(o.textContent)),e.push(o)}var d=t.length;if(!d)return this;var h=this.makeTag(null);!function(e,t,n){for(var r=0,i=n.length;r<i;r+=1){var a=n[r],o=a.componentId,s=a.cssFromDOM,u=z(s);e.insertRules(o,u)}for(var l=0,c=t.length;l<c;l+=1){var d=t[l];d.parentNode&&d.parentNode.removeChild(d)}}(h,e,t),this.capacity=Math.max(1,se-d),this.tags.push(h);for(var p=0;p<d;p+=1)this.tagMap[t[p].componentId]=h;return this},e.reset=function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];le=new e(void 0,t).rehydrate()},e.prototype.clone=function(){var t=new e(this.target,this.forceServer);return this.clones.push(t),t.tags=this.tags.map((function(e){for(var n=e.getIds(),r=e.clone(),i=0;i<n.length;i+=1)t.tagMap[n[i]]=r;return r})),t.rehydratedNames=y({},this.rehydratedNames),t.deferred=y({},this.deferred),t},e.prototype.sealAllTags=function(){this.capacity=1,this.tags.forEach((function(e){e.sealed=!0}))},e.prototype.makeTag=function(e){var t=e?e.styleTag:null;return ae(this.target,t,this.forceServer,!1,this.getImportRuleTag)},e.prototype.getTagForId=function(e){var t=this.tagMap[e];if(void 0!==t&&!t.sealed)return t;var n=this.tags[this.tags.length-1];return this.capacity-=1,0===this.capacity&&(this.capacity=se,n=this.makeTag(n),this.tags.push(n)),this.tagMap[e]=n},e.prototype.hasId=function(e){return void 0!==this.tagMap[e]},e.prototype.hasNameForId=function(e,t){if(void 0===this.ignoreRehydratedNames[e]&&this.rehydratedNames[t])return!0;var n=this.tagMap[e];return void 0!==n&&n.hasNameForId(e,t)},e.prototype.deferredInject=function(e,t){if(void 0===this.tagMap[e]){for(var n=this.clones,r=0;r<n.length;r+=1)n[r].deferredInject(e,t);this.getTagForId(e).insertMarker(e),this.deferred[e]=t}},e.prototype.inject=function(e,t,n){for(var r=this.clones,i=0;i<r.length;i+=1)r[i].inject(e,t,n);var a=this.getTagForId(e);if(void 0!==this.deferred[e]){var o=this.deferred[e].concat(t);a.insertRules(e,o,n),this.deferred[e]=void 0}else a.insertRules(e,t,n)},e.prototype.remove=function(e){var t=this.tagMap[e];if(void 0!==t){for(var n=this.clones,r=0;r<n.length;r+=1)n[r].remove(e);t.removeRules(e),this.ignoreRehydratedNames[e]=!0,this.deferred[e]=void 0}},e.prototype.toHTML=function(){return this.tags.map((function(e){return e.toHTML()})).join("")},e.prototype.toReactElements=function(){var e=this.id;return this.tags.map((function(t,n){var r="sc-"+e+"-"+n;return Object(s.cloneElement)(t.toElement(),{key:r})}))},v(e,null,[{key:"master",get:function(){return le||(le=(new e).rehydrate())}},{key:"instance",get:function(){return e.master}}]),e}(),de=function(){function e(t,n){var r=this;g(this,e),this.inject=function(e){e.hasNameForId(r.id,r.name)||e.inject(r.id,r.rules,r.name)},this.toString=function(){throw new I(12,String(r.name))},this.name=t,this.rules=n,this.id="sc-keyframes-"+t}return e.prototype.getName=function(){return this.name},e}(),he=/([A-Z])/g,pe=/^ms-/;function fe(e){return e.replace(he,"-$1").toLowerCase().replace(pe,"-ms-")}var me=function(e){return void 0===e||null===e||!1===e||""===e},ge=function e(t,n){var r=[];return Object.keys(t).forEach((function(n){if(!me(t[n])){if(T(t[n]))return r.push.apply(r,e(t[n],n)),r;if(k(t[n]))return r.push(fe(n)+":",t[n],";"),r;r.push(fe(n)+": "+(i=n,(null==(a=t[n])||"boolean"===typeof a||""===a?"":"number"!==typeof a||0===a||i in l.a?String(a).trim():a+"px")+";"))}var i,a;return r})),n?[n+" {"].concat(r,["}"]):r};function ve(e,t,n){if(Array.isArray(e)){for(var r,i=[],a=0,o=e.length;a<o;a+=1)null!==(r=ve(e[a],t,n))&&(Array.isArray(r)?i.push.apply(i,r):i.push(r));return i}return me(e)?null:E(e)?"."+e.styledComponentId:k(e)?"function"!==typeof(s=e)||s.prototype&&s.prototype.isReactComponent||!t?e:ve(e(t),t,n):e instanceof de?n?(e.inject(n),e.getName()):e:T(e)?ge(e):e.toString();var s}function ye(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return k(e)||T(e)?ve(f(S,[e].concat(n))):ve(f(e,n))}function be(e){for(var t,n=0|e.length,r=0|n,i=0;n>=4;)t=1540483477*(65535&(t=255&e.charCodeAt(i)|(255&e.charCodeAt(++i))<<8|(255&e.charCodeAt(++i))<<16|(255&e.charCodeAt(++i))<<24))+((1540483477*(t>>>16)&65535)<<16),r=1540483477*(65535&r)+((1540483477*(r>>>16)&65535)<<16)^(t=1540483477*(65535&(t^=t>>>24))+((1540483477*(t>>>16)&65535)<<16)),n-=4,++i;switch(n){case 3:r^=(255&e.charCodeAt(i+2))<<16;case 2:r^=(255&e.charCodeAt(i+1))<<8;case 1:r=1540483477*(65535&(r^=255&e.charCodeAt(i)))+((1540483477*(r>>>16)&65535)<<16)}return((r=1540483477*(65535&(r^=r>>>13))+((1540483477*(r>>>16)&65535)<<16))^r>>>15)>>>0}var _e=function(e){return String.fromCharCode(e+(e>25?39:97))};function Te(e){var t="",n=void 0;for(n=e;n>52;n=Math.floor(n/52))t=_e(n%52)+t;return _e(n%52)+t}function Se(e,t){for(var n=0;n<e.length;n+=1){var r=e[n];if(Array.isArray(r)&&!Se(r,t))return!1;if(k(r)&&!E(r))return!1}return!t.some((function(e){return k(e)||function(e){for(var t in e)if(k(e[t]))return!0;return!1}(e)}))}var we,ke=function(e){return Te(be(e))},Ce=function(){function e(t,n,r){g(this,e),this.rules=t,this.isStatic=Se(t,n),this.componentId=r,ce.master.hasId(r)||ce.master.deferredInject(r,[])}return e.prototype.generateAndInjectStyles=function(e,t){var n=this.isStatic,r=this.componentId,i=this.lastClassName;if(x&&n&&"string"===typeof i&&t.hasNameForId(r,i))return i;var a=ve(this.rules,e,t),o=ke(this.componentId+a.join(""));return t.hasNameForId(r,o)||t.inject(this.componentId,W(a,"."+o,void 0,r),o),this.lastClassName=o,o},e.generateName=function(e){return ke(e)},e}(),Ee=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:w,r=!!n&&e.theme===n.theme,i=e.theme&&!r?e.theme:t||n.theme;return i},Ae=/[[\].#*$><+~=|^:(),"'`-]+/g,xe=/(^-|-$)/g;function Pe(e){return e.replace(Ae,"-").replace(xe,"")}function Ie(e){return"string"===typeof e&&!0}var Oe={childContextTypes:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDerivedStateFromProps:!0,propTypes:!0,type:!0},Le={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},De=((we={})[c.ForwardRef]={$$typeof:!0,render:!0},we),Me=Object.defineProperty,Re=Object.getOwnPropertyNames,Ne=Object.getOwnPropertySymbols,je=void 0===Ne?function(){return[]}:Ne,Be=Object.getOwnPropertyDescriptor,Ue=Object.getPrototypeOf,Fe=Object.prototype,qe=Array.prototype;function He(e,t,n){if("string"!==typeof t){var r=Ue(t);r&&r!==Fe&&He(e,r,n);for(var i=qe.concat(Re(t),je(t)),a=De[e.$$typeof]||Oe,o=De[t.$$typeof]||Oe,s=i.length,u=void 0,l=void 0;s--;)if(l=i[s],!Le[l]&&(!n||!n[l])&&(!o||!o[l])&&(!a||!a[l])&&(u=Be(t,l)))try{Me(e,l,u)}catch(c){}return e}return e}var ze=Object(s.createContext)(),We=ze.Consumer,Ve=(function(e){function t(n){g(this,t);var r=_(this,e.call(this,n));return r.getContext=Object(d.a)(r.getContext.bind(r)),r.renderInner=r.renderInner.bind(r),r}b(t,e),t.prototype.render=function(){return this.props.children?u.a.createElement(ze.Consumer,null,this.renderInner):null},t.prototype.renderInner=function(e){var t=this.getContext(this.props.theme,e);return u.a.createElement(ze.Provider,{value:t},this.props.children)},t.prototype.getTheme=function(e,t){if(k(e))return e(t);if(null===e||Array.isArray(e)||"object"!==("undefined"===typeof e?"undefined":m(e)))throw new I(8);return y({},t,e)},t.prototype.getContext=function(e,t){return this.getTheme(e,t)}}(s.Component),function(){function e(){g(this,e),this.masterSheet=ce.master,this.instance=this.masterSheet.clone(),this.sealed=!1}e.prototype.seal=function(){if(!this.sealed){var e=this.masterSheet.clones.indexOf(this.instance);this.masterSheet.clones.splice(e,1),this.sealed=!0}},e.prototype.collectStyles=function(e){if(this.sealed)throw new I(2);return u.a.createElement(Ge,{sheet:this.instance},e)},e.prototype.getStyleTags=function(){return this.seal(),this.instance.toHTML()},e.prototype.getStyleElement=function(){return this.seal(),this.instance.toReactElements()},e.prototype.interleaveWithNodeStream=function(e){throw new I(3)}}(),Object(s.createContext)()),Ke=Ve.Consumer,Ge=function(e){function t(n){g(this,t);var r=_(this,e.call(this,n));return r.getContext=Object(d.a)(r.getContext),r}return b(t,e),t.prototype.getContext=function(e,t){if(e)return e;if(t)return new ce(t);throw new I(4)},t.prototype.render=function(){var e=this.props,t=e.children,n=e.sheet,r=e.target;return u.a.createElement(Ve.Provider,{value:this.getContext(n,r)},t)},t}(s.Component),Xe={};var Ye=function(e){function t(){g(this,t);var n=_(this,e.call(this));return n.attrs={},n.renderOuter=n.renderOuter.bind(n),n.renderInner=n.renderInner.bind(n),n}return b(t,e),t.prototype.render=function(){return u.a.createElement(Ke,null,this.renderOuter)},t.prototype.renderOuter=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ce.master;return this.styleSheet=e,this.props.forwardedComponent.componentStyle.isStatic?this.renderInner():u.a.createElement(We,null,this.renderInner)},t.prototype.renderInner=function(e){var t=this.props.forwardedComponent,n=t.componentStyle,r=t.defaultProps,i=(t.displayName,t.foldedComponentIds),a=t.styledComponentId,o=t.target,u=void 0;u=n.isStatic?this.generateAndInjectStyles(w,this.props):this.generateAndInjectStyles(Ee(this.props,e,r)||w,this.props);var l=this.props.as||this.attrs.as||o,c=Ie(l),d={},p=y({},this.props,this.attrs),f=void 0;for(f in p)"forwardedComponent"!==f&&"as"!==f&&("forwardedRef"===f?d.ref=p[f]:"forwardedAs"===f?d.as=p[f]:c&&!Object(h.a)(f)||(d[f]=p[f]));return this.props.style&&this.attrs.style&&(d.style=y({},this.attrs.style,this.props.style)),d.className=Array.prototype.concat(i,a,u!==a?u:null,this.props.className,this.attrs.className).filter(Boolean).join(" "),Object(s.createElement)(l,d)},t.prototype.buildExecutionContext=function(e,t,n){var r=this,i=y({},t,{theme:e});return n.length?(this.attrs={},n.forEach((function(e){var t,n=e,a=!1,o=void 0,s=void 0;for(s in k(n)&&(n=n(i),a=!0),n)o=n[s],a||!k(o)||(t=o)&&t.prototype&&t.prototype.isReactComponent||E(o)||(o=o(i)),r.attrs[s]=o,i[s]=o})),i):i},t.prototype.generateAndInjectStyles=function(e,t){var n=t.forwardedComponent,r=n.attrs,i=n.componentStyle;n.warnTooManyClasses;return i.isStatic&&!r.length?i.generateAndInjectStyles(w,this.styleSheet):i.generateAndInjectStyles(this.buildExecutionContext(e,t,r),this.styleSheet)},t}(s.Component);function Qe(e,t,n){var r=E(e),i=!Ie(e),a=t.displayName,o=void 0===a?function(e){return Ie(e)?"styled."+e:"Styled("+C(e)+")"}(e):a,s=t.componentId,l=void 0===s?function(e,t,n){var r="string"!==typeof t?"sc":Pe(t),i=(Xe[r]||0)+1;Xe[r]=i;var a=r+"-"+e.generateName(r+i);return n?n+"-"+a:a}(Ce,t.displayName,t.parentComponentId):s,c=t.ParentComponent,d=void 0===c?Ye:c,h=t.attrs,f=void 0===h?S:h,m=t.displayName&&t.componentId?Pe(t.displayName)+"-"+t.componentId:t.componentId||l,g=r&&e.attrs?Array.prototype.concat(e.attrs,f).filter(Boolean):f,v=new Ce(r?e.componentStyle.rules.concat(n):n,g,m),b=void 0,_=function(e,t){return u.a.createElement(d,y({},e,{forwardedComponent:b,forwardedRef:t}))};return _.displayName=o,(b=u.a.forwardRef(_)).displayName=o,b.attrs=g,b.componentStyle=v,b.foldedComponentIds=r?Array.prototype.concat(e.foldedComponentIds,e.styledComponentId):S,b.styledComponentId=m,b.target=r?e.target:e,b.withComponent=function(e){var r=t.componentId,i=function(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(t,["componentId"]),a=r&&r+"-"+(Ie(e)?e:Pe(C(e)));return Qe(e,y({},i,{attrs:g,componentId:a,ParentComponent:d}),n)},Object.defineProperty(b,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(t){this._foldedDefaultProps=r?Object(p.a)(e.defaultProps,t):t}}),b.toString=function(){return"."+b.styledComponentId},i&&He(b,e,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,styledComponentId:!0,target:!0,withComponent:!0}),b}var $e=function(e){return function e(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:w;if(!Object(c.isValidElementType)(n))throw new I(1,String(n));var i=function(){return t(n,r,ye.apply(void 0,arguments))};return i.withConfig=function(i){return e(t,n,y({},r,i))},i.attrs=function(i){return e(t,n,y({},r,{attrs:Array.prototype.concat(r.attrs,i).filter(Boolean)}))},i}(Qe,e)};["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"].forEach((function(e){$e[e]=$e(e)}));!function(){function e(t,n){g(this,e),this.rules=t,this.componentId=n,this.isStatic=Se(t,S),ce.master.hasId(n)||ce.master.deferredInject(n,[])}e.prototype.createStyles=function(e,t){var n=W(ve(this.rules,e,t),"");t.inject(this.componentId,n)},e.prototype.removeStyles=function(e){var t=this.componentId;e.hasId(t)&&e.remove(t)},e.prototype.renderStyles=function(e,t){this.removeStyles(t),this.createStyles(e,t)}}();x&&(window.scCGSHMRCache={});t.a=$e}).call(this,n("8oxB"))},vY6g:function(e,t,n){var r=n("ok90");e.exports=r&&!!Symbol.for&&!!Symbol.keyFor},vgmO:function(e,t,n){(function(t){var n;n="undefined"!==typeof window?window:"undefined"!==typeof t?t:"undefined"!==typeof self?self:{},e.exports=n}).call(this,n("yLpj"))},vwUX:function(e,t,n){var r=n("UfqS"),i=n("4wiq"),a=n("CvoT"),o=n("RpL+"),s=n("11UE"),u=n("X+CG"),l=i([].push),c=function(e){var t=1==e,n=2==e,i=3==e,c=4==e,d=6==e,h=7==e,p=5==e||d;return function(f,m,g,v){for(var y,b,_=o(f),T=a(_),S=r(m,g),w=s(T),k=0,C=v||u,E=t?C(f,w):n||h?C(f,0):void 0;w>k;k++)if((p||k in T)&&(b=S(y=T[k],k,_),e))if(t)E[k]=b;else if(b)switch(e){case 3:return!0;case 5:return y;case 6:return k;case 2:l(E,y)}else switch(e){case 4:return!1;case 7:l(E,y)}return d?-1:i||c?c:E}};e.exports={forEach:c(0),map:c(1),filter:c(2),some:c(3),every:c(4),find:c(5),findIndex:c(6),filterReject:c(7)}},vzvg:function(e,t,n){var r=n("JVs5"),i=n("mESY"),a=n("RKsz"),o=n("F5Zs"),s=n("HjHI"),u=n("4Tei"),l=TypeError,c=u("toPrimitive");e.exports=function(e,t){if(!i(e)||a(e))return e;var n,u=o(e,c);if(u){if(void 0===t&&(t="default"),n=r(u,e,t),!i(n)||a(n))return n;throw l("Can't convert object to primitive value")}return void 0===t&&(t="number"),s(e,t)}},"w/wX":function(e,t,n){var r=n("QqLw"),i=n("ExA7");e.exports=function(e){return i(e)&&"[object Set]"==r(e)}},w1io:function(e,t,n){var r=n("W2Ac"),i=n("xnEm"),a=n("PEjt");e.exports=r?function(e,t,n){return i.f(e,t,a(1,n))}:function(e,t,n){return e[t]=n,e}},"wAi/":function(e,t,n){"use strict";var r=n("q1tI"),i=n.n(r),a=n("55Ip"),o=i.a.createElement;t.a=function(e){var t=e.className,n=e.to,r=e.keyProp,i=e.replace,s=e.onClick,u=e.children;return o(a.Link,{key:r,to:n,replace:i,onClick:s,className:t},u)}},wOhn:function(e,t){var n="object"==typeof document&&document.all,r="undefined"==typeof n&&void 0!==n;e.exports={all:n,IS_HTMLDDA:r}},wUBo:function(e,t){e.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},"weF/":function(e,t,n){"use strict";var r=n("szlw"),i=n("W2Ac"),a=n("LHWz"),o=n("4wiq"),s=n("+BqG"),u=n("eDf4"),l=n("GOOj"),c=n("QICv"),d=n("zRp7"),h=n("/sSW"),p=a.Symbol,f=p&&p.prototype;if(i&&u(p)&&(!("description"in f)||void 0!==p().description)){var m={},g=function(){var e=arguments.length<1||void 0===arguments[0]?void 0:c(arguments[0]),t=l(f,this)?new p(e):void 0===e?p():p(e);return""===e&&(m[t]=!0),t};h(g,p),g.prototype=f,f.constructor=g;var v="Symbol(test)"==String(p("test")),y=o(f.valueOf),b=o(f.toString),_=/^Symbol\((.*)\)[^)]+$/,T=o("".replace),S=o("".slice);d(f,"description",{configurable:!0,get:function(){var e=y(this);if(s(m,e))return"";var t=b(e),n=v?S(t,7,-1):T(t,_,"$1");return""===n?void 0:n}}),r({global:!0,constructor:!0,forced:!0},{Symbol:g})}},wrZu:function(e,t,n){var r=n("+K+b"),i=n("XYm9"),a=n("b2z7"),o=n("otv/"),s=n("yP5f");e.exports=function(e,t,n){var u=e.constructor;switch(t){case"[object ArrayBuffer]":return r(e);case"[object Boolean]":case"[object Date]":return new u(+e);case"[object DataView]":return i(e,n);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return s(e,n);case"[object Map]":return new u;case"[object Number]":case"[object String]":return new u(e);case"[object RegExp]":return a(e);case"[object Set]":return new u;case"[object Symbol]":return o(e)}}},xEkU:function(e,t,n){(function(t){for(var r=n("bQgK"),i="undefined"===typeof window?t:window,a=["moz","webkit"],o="AnimationFrame",s=i["request"+o],u=i["cancel"+o]||i["cancelRequest"+o],l=0;!s&&l<a.length;l++)s=i[a[l]+"Request"+o],u=i[a[l]+"Cancel"+o]||i[a[l]+"CancelRequest"+o];if(!s||!u){var c=0,d=0,h=[];s=function(e){if(0===h.length){var t=r(),n=Math.max(0,1e3/60-(t-c));c=n+t,setTimeout((function(){var e=h.slice(0);h.length=0;for(var t=0;t<e.length;t++)if(!e[t].cancelled)try{e[t].callback(c)}catch(n){setTimeout((function(){throw n}),0)}}),Math.round(n))}return h.push({handle:++d,callback:e,cancelled:!1}),d},u=function(e){for(var t=0;t<h.length;t++)h[t].handle===e&&(h[t].cancelled=!0)}}e.exports=function(e){return s.call(i,e)},e.exports.cancel=function(){u.apply(i,arguments)},e.exports.polyfill=function(e){e||(e=i),e.requestAnimationFrame=s,e.cancelAnimationFrame=u}}).call(this,n("yLpj"))},xZj3:function(e,t){e.exports=function(e){try{return!!e()}catch(t){return!0}}},xfeJ:function(e,t){e.exports=function(e){return-1!==Function.toString.call(e).indexOf("[native code]")},e.exports.__esModule=!0,e.exports.default=e.exports},xnEm:function(e,t,n){var r=n("W2Ac"),i=n("a0yg"),a=n("ma6D"),o=n("Y6hy"),s=n("8z+Y"),u=TypeError,l=Object.defineProperty,c=Object.getOwnPropertyDescriptor;t.f=r?a?function(e,t,n){if(o(e),t=s(t),o(n),"function"===typeof e&&"prototype"===t&&"value"in n&&"writable"in n&&!n.writable){var r=c(e,t);r&&r.writable&&(e[t]=n.value,n={configurable:"configurable"in n?n.configurable:r.configurable,enumerable:"enumerable"in n?n.enumerable:r.enumerable,writable:!1})}return l(e,t,n)}:l:function(e,t,n){if(o(e),t=s(t),o(n),i)try{return l(e,t,n)}catch(r){}if("get"in n||"set"in n)throw u("Accessors not supported");return"value"in n&&(e[t]=n.value),e}},xo7b:function(e,t,n){var r=n("xZj3"),i=n("eDf4"),a=/#|\.prototype\./,o=function(e,t){var n=u[s(e)];return n==c||n!=l&&(i(t)?r(t):!!t)},s=o.normalize=function(e){return String(e).replace(a,".").toLowerCase()},u=o.data={},l=o.NATIVE="N",c=o.POLYFILL="P";e.exports=o},yG9A:function(e,t,n){var r=n("orrc"),i=Function.prototype,a=i.apply,o=i.call;e.exports="object"==typeof Reflect&&Reflect.apply||(r?o.bind(a):function(){return o.apply(a,arguments)})},yHx3:function(e,t){var n=Object.prototype.hasOwnProperty;e.exports=function(e){var t=e.length,r=new e.constructor(t);return t&&"string"==typeof e[0]&&n.call(e,"index")&&(r.index=e.index,r.input=e.input),r}},yP5f:function(e,t,n){var r=n("+K+b");e.exports=function(e,t){var n=t?r(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}},yozl:function(e,t,n){var r=n("Yo2p"),i=n("gheS"),a=n("11UE"),o=function(e){return function(t,n,o){var s,u=r(t),l=a(u),c=i(o,l);if(e&&n!=n){for(;l>c;)if((s=u[c++])!=s)return!0}else for(;l>c;c++)if((e||c in u)&&u[c]===n)return e||c||0;return!e&&-1}};e.exports={includes:o(!0),indexOf:o(!1)}},zEVN:function(e,t,n){var r=n("Gi0A"),i=n("sEf8"),a=n("mdPL"),o=a&&a.isMap,s=o?i(o):r;e.exports=s},"zM/4":function(e,t,n){var r=n("szlw"),i=n("sCZI"),a=n("yG9A"),o=n("JVs5"),s=n("4wiq"),u=n("xZj3"),l=n("eDf4"),c=n("RKsz"),d=n("Gjit"),h=n("DSVV"),p=n("ok90"),f=String,m=i("JSON","stringify"),g=s(/./.exec),v=s("".charAt),y=s("".charCodeAt),b=s("".replace),_=s(1..toString),T=/[\uD800-\uDFFF]/g,S=/^[\uD800-\uDBFF]$/,w=/^[\uDC00-\uDFFF]$/,k=!p||u((function(){var e=i("Symbol")();return"[null]"!=m([e])||"{}"!=m({a:e})||"{}"!=m(Object(e))})),C=u((function(){return'"\\udf06\\ud834"'!==m("\udf06\ud834")||'"\\udead"'!==m("\udead")})),E=function(e,t){var n=d(arguments),r=h(t);if(l(r)||void 0!==e&&!c(e))return n[1]=function(e,t){if(l(r)&&(t=o(r,this,f(e),t)),!c(t))return t},a(m,null,n)},A=function(e,t,n){var r=v(n,t-1),i=v(n,t+1);return g(S,e)&&!g(w,i)||g(w,e)&&!g(S,r)?"\\u"+_(y(e,0),16):e};m&&r({target:"JSON",stat:!0,arity:3,forced:k||C},{stringify:function(e,t,n){var r=d(arguments),i=a(k?E:m,null,r);return C&&"string"==typeof i?b(i,T,A):i}})},zMKt:function(e,t,n){var r=n("LHWz"),i=n("mESY"),a=r.document,o=i(a)&&i(a.createElement);e.exports=function(e){return o?a.createElement(e):{}}},zRp7:function(e,t,n){var r=n("1MgG"),i=n("xnEm");e.exports=function(e,t,n){return n.get&&r(n.get,t,{getter:!0}),n.set&&r(n.set,t,{setter:!0}),i.f(e,t,n)}}}]);
//# sourceMappingURL=pages-Article.d11e5b4c.chunk.js.map