Guest User

Untitled

a guest
Apr 6th, 2016
289
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. !function(a){"use strict";
  2. function b(c,d){var e=c.split(".");
  3. if(d=d||a,c){var f=e.shift();
  4. return d[f]=d[f]||{},b(e.join("."),d[f])}return d}a.HRZ=a.HRZ||{},a.HRZ.namespace=b}(window),function(){var a={};
  5. (function(a){function b(a,b){var c=a.split("."),d=Be;
  6. c[0]in d||!d.execScript||d.execScript("var "+c[0]);
  7. for(var e;
  8. c.length&&(e=c.shift());
  9. )c.length||void 0===b?d=d[e]?d[e]:d[e]={}:d[e]=b}function c(a,b){function c(){}c.prototype=b.prototype,a.Pb=b.prototype,a.prototype=new c,a.prototype.constructor=a,a.Nb=function(a,c,d){return b.prototype[c].apply(a,Array.prototype.slice.call(arguments,2))}}function d(){}function e(a){var b=console[a];
  10. b?b.bind||(console[a]=function(){b.apply(console,arguments)}):console[a]=function(){}}function f(a){De[a]={na:Ce(),end:NaN}}function g(a){(a=De[a])&&(a.end=Ce())}function h(a){return(a=De[a])&&a.end?a.end-a.na:NaN}function i(a,b,c){this.id=a,this.bandwidth=b||0,this.lang=c||"unknown",this.active=!1}function j(){this.minBandwidth=this.maxBandwidth=this.maxWidth=this.maxHeight=null}function k(){this.fontSize="100%",this.fontColor=Ee,this.fontOpacity=Ge,this.backgroundColor=Fe,this.backgroundOpacity=Ge,this.fontEdge=He}function l(a){var b=[];
  11. b.push("font-size: "+a.fontSize),b.push("color: "+m(a.fontColor,a.fontOpacity)),b.push("background-color: "+m(a.backgroundColor,a.backgroundOpacity));
  12. for(var c=[],d=0;
  13. d<a.fontEdge.length;
  14. ++d){var e=a.fontEdge[d].slice(3,6);
  15. c.push(m(a.fontEdge[d].slice(0,3),a.fontOpacity)+" "+e.join("px ")+"px")}return b.push("text-shadow: "+c.join(",")),b.join("; ")}function m(a,b){return"rgba("+a.concat(b).join(",")+")"}function n(a,b){this.id=a,this.lang=b||"unknown",this.enabled=this.active=!1}function o(a,b,c,d){this.id=a,this.bandwidth=b||0,this.width=c||0,this.height=d||0,this.active=!1}function p(a,b){var c=a.width*a.height,d=b.width*b.height;
  16. return d>c?-1:c>d?1:a.bandwidth<b.bandwidth?-1:a.bandwidth>b.bandwidth?1:0}function q(){var b="CustomEvent"in a;
  17. if(b)try{new CustomEvent("")}catch(c){b=!1}b||(a.CustomEvent=r)}function r(a,b){var c=document.createEvent("CustomEvent"),d=b||{bubbles:!1,cancelable:!1,detail:null};
  18. return c.initCustomEvent(a,!!d.bubbles,!!d.cancelable,d.detail),c}function s(){var a=Element.prototype;
  19. a.requestFullscreen=a.requestFullscreen||a.mozRequestFullScreen||a.msRequestFullscreen||a.webkitRequestFullscreen,a=Document.prototype,a.exitFullscreen=a.exitFullscreen||a.mozCancelFullScreen||a.msExitFullscreen||a.webkitExitFullscreen,"fullscreenElement"in document||Object.defineProperty(document,"fullscreenElement",{get:function(){return document.mozFullScreenElement||document.msFullscreenElement||document.webkitFullscreenElement}}),document.addEventListener("webkitfullscreenchange",t),document.addEventListener("webkitfullscreenerror",t),document.addEventListener("mozfullscreenchange",t),document.addEventListener("mozfullscreenerror",t),document.addEventListener("MSFullscreenChange",t),document.addEventListener("MSFullscreenError",t)}function t(a){var b=a.type.replace(/^(webkit|moz|MS)/,"").toLowerCase(),b=new Event(b,a);
  20. a.target.dispatchEvent(b)}function u(){return Promise.reject(Error("The key system specified is not supported."))}function v(a){return null==a?Promise.resolve():Promise.reject(Error("MediaKeys not supported."))}function w(){throw new TypeError("Illegal constructor.")}function x(){throw new TypeError("Illegal constructor.")}function y(){var a=HTMLVideoElement.prototype;
  21. !a.getVideoPlaybackQuality&&"webkitDroppedFrameCount"in a&&(a.getVideoPlaybackQuality=z)}function z(){return{droppedVideoFrames:this.webkitDroppedFrameCount,totalVideoFrames:this.webkitDecodedFrameCount,corruptedVideoFrames:0,creationTime:NaN,totalFrameDelay:0}}function A(a,b){for(var c={},d=0;
  22. d<a.length;
  23. ++d){var e=b?b(a[d]):a[d].toString();
  24. c[e]=a[d]}var f,d=[];
  25. for(f in c)d.push(c[f]);
  26. return d}function B(){return Date.now()+Je}function C(a){this.b=a,this.c=0==Ke,this.a=0}function D(a){return a.a<a.b.byteLength}function E(a){var b=a.b.getUint8(a.a);
  27. return a.a+=1,b}function F(a){var b=a.b.getUint32(a.a,a.c);
  28. return a.a+=4,b}function G(a){var b,c;
  29. if(a.c?(b=a.b.getUint32(a.a,!0),c=a.b.getUint32(a.a+4,!0)):(c=a.b.getUint32(a.a,!1),b=a.b.getUint32(a.a+4,!1)),c>2097151)throw new RangeError("DataViewReader: Overflow reading 64-bit value.");
  30. return a.a+=8,c*Math.pow(2,32)+b}function H(a){if(a.a+16>a.b.byteLength)throw new RangeError("DataViewReader: Read past end of DataView.");
  31. var b=new Uint8Array(a.b.buffer,a.a,16);
  32. return a.a+=16,b}function I(a,b){if(a.a+b>a.b.byteLength)throw new RangeError("DataViewReader: Skip past end of DataView.");
  33. a.a+=b}function J(a){this.b=a,this.a=new C(a),Ie||(Ie=[new Uint8Array([255]),new Uint8Array([127,255]),new Uint8Array([63,255,255]),new Uint8Array([31,255,255,255]),new Uint8Array([15,255,255,255,255]),new Uint8Array([7,255,255,255,255,255]),new Uint8Array([3,255,255,255,255,255,255]),new Uint8Array([1,255,255,255,255,255,255,255])])}function K(a){var b;
  34. if(b=L(a),7<b.length)throw new RangeError("EbmlParser: EBML ID must be at most 7 bytes.");
  35. for(var c=0,d=0;
  36. d<b.length;
  37. d++)c=256*c+b[d];
  38. b=c,c=L(a);
  39. a:{for(d=0;
  40. d<Ie.length;
  41. d++)if(Ra(c,Ie[d])){d=!0;
  42. break a}d=!1}if(d)throw new RangeError("EbmlParser: Element cannot contain dynamically sized data.");
  43. if(8==c.length&&224&c[1])throw new RangeError("EbmlParser: Variable sized integer value must be at most 53 bits.");
  44. for(var d=c[0]&(1<<8-c.length)-1,e=1;
  45. e<c.length;
  46. e++)d=256*d+c[e];
  47. return c=d,c=a.a.a+c<=a.b.byteLength?c:a.b.byteLength-a.a.a,d=new DataView(a.b.buffer,a.b.byteOffset+a.a.a,c),I(a.a,c),new M(b,d)}function L(a){var b,c=E(a.a);
  48. for(b=1;
  49. 8>=b&&!(c&1<<8-b);
  50. b++);
  51. if(b>8)throw new RangeError("EbmlParser: Variable sized integer must fit within 8 bytes.");
  52. var d=new Uint8Array(b);
  53. for(d[0]=c,c=1;
  54. b>c;
  55. c++)d[c]=E(a.a);
  56. return d}function M(a,b){this.id=a,this.a=b}function N(a){if(8<a.a.byteLength)throw new RangeError("EbmlElement: Unsigned integer has too many bytes.");
  57. if(8==a.a.byteLength&&224&a.a.getUint8(0))throw new RangeError("EbmlParser: Unsigned integer must be at most 53 bits.");
  58. for(var b=0,c=0;
  59. c<a.a.byteLength;
  60. c++)var d=a.a.getUint8(c),b=256*b+d;
  61. return b}function O(a){this.c=Math.exp(Math.log(.5)/a),this.a=this.b=0}function P(a){return a.b/(1-Math.pow(a.c,a.a))}function Q(a){var b,c=new CustomEvent(a.type,{detail:a.detail,bubbles:!!a.bubbles});
  62. for(b in a)b in c||(c[b]=a[b]);
  63. return c}function R(a){return new CustomEvent("error",{detail:a,bubbles:!0})}function S(a,b,c){return T(b),T(c),c==b||a>=Me&&c==b.split("-")[0]||a>=Ne&&c.split("-")[0]==b.split("-")[0]}function T(a){a=a.toLowerCase().split("-");
  64. var b=Oe[a[0]];
  65. return b&&(a[0]=b),a.join("-")}function U(a){return Object.keys(a).map(function(b){return a[b]})}function V(a,b){var c=X(a,b,"number");
  66. if(null==c)return null;
  67. if(isNaN(c)||c==Number.NEGATIVE_INFINITY||c==Number.POSITIVE_INFINITY)throw new RangeError("'"+b+"' must be finite.");
  68. if(0>c)throw new RangeError("'"+b+"' must be >= 0");
  69. return c}function W(a,b){return X(a,b,"string")}function X(a,b,c){if(a=a[b],null==a)return null;
  70. if(typeof a!=c)throw new TypeError("'"+b+"' must be a "+c+".");
  71. return a}function Y(a,b,c){if(a=a[b],null==a)return null;
  72. if(!(a instanceof c))throw new TypeError("'"+b+"' must be an instance of "+c.name+".");
  73. return a}function Z(){this.a={}}function $(a){var b,c=[];
  74. for(b in a.a)c.push.apply(c,a.a[b]);
  75. return c}function _(a,b,c){if(a=a.a[b])for(b=0;
  76. b<a.length;
  77. ++b)a[b]==c&&(a.splice(b,1),--b)}function aa(a){var b,c=[];
  78. for(b in a.a)c.push(b);
  79. return c}function ba(){this.a=new Z}function ca(a,b,c,d){b=new ea(b,c,d),a.a.push(c,b)}function da(a){for(var b=$(a.a),c=0;
  80. c<b.length;
  81. ++c)b[c].sa();
  82. a.a.a={}}function ea(a,b,c){this.target=a,this.type=b,this.a=c,this.target.addEventListener(b,c,!1)}function fa(a){this.xa=new Z,this.v=a}function ga(a,b){b.currentTarget=a;
  83. for(var c=a.xa.get(b.type)||[],d=0;
  84. d<c.length;
  85. ++d){var e=c[d];
  86. try{e.handleEvent?e.handleEvent(b):e.call(a,b)}catch(f){}}return a.v&&b.bubbles&&ga(a.v,b),b.defaultPrevented}function ha(){fa.call(this,null),this.a=new O(3),this.c=new O(10),this.b=0}function ia(){var a,b,c=new Promise(function(c,d){a=c,b=d});
  87. return c.resolve=a,c.reject=b,c.destroy=ia.prototype.destroy,c}function ja(a){return a.split("").reduce(function(a,b,c){return a+(c&&0==c%4?" "+b:b)})}function ka(){this.g=new ia,this.f=!1,this.a=null,this.b=[],this.c=null}function la(a,b){if(a.f)throw Error("Cannot append to a running task!");
  88. a.b.push(b)}function ma(a,b){var c,d=a.b[0](b);
  89. d?(c=d[0],a.c=d[1]):(c=Promise.resolve(),a.c=null),c.then(oa(a,function(a){this.a?(this.b=[],this.c=null,na(this)):(this.b.shift(),this.b.length?ma(this,a):(this.g.resolve(a),this.c=null))}))["catch"](oa(a,function(a){this.b=[],this.c=null,this.a?na(this):this.g.reject(a)}))}function na(b){var c=Error("Task aborted.");
  90. c.type="aborted",b.g.reject(c),a.setTimeout(function(){this.a.resolve(),this.a=null}.bind(b),5)}function oa(a,b){return b.bind(a)}function pa(a,b,c){MediaSource.isTypeSupported(b),b=a.addSourceBuffer(b),this.j=a,this.c=b,this.v=c,this.h=new ba,this.b=[],this.o=0,this.f=this.a=null,this.l=0,ca(this.h,this.c,"updateend",this.w.bind(this))}function qa(a,b){for(var c=a.c.buffered,d=0;
  91. d<c.length;
  92. ++d){var e=c.start(d)-Pe,f=c.end(d)+Pe;
  93. if(b>=e&&f>=b)return c.end(d)-b}return 0}function ra(a,b,c,d){if(a.a)return a=Error("Cannot fetch ("+a.i+"): previous operation not complete."),a.type="stream",Promise.reject(a);
  94. a.a=new ka,c!=a.c.timestampOffset&&(a.c.timestampOffset=c),d&&la(a.a,function(){return[wa(this,d),this.g.bind(this)]}.bind(a)),la(a.a,function(){var a=b.a?b.a-b.b:1,c=new ac;
  95. return c.a=3,c.h=1e3*a,c.c=1e3*this.l,[ic(b.url,c,this.v),gc.prototype.g.bind(b.url)]}.bind(a)),la(a.a,oa(a,function(a){return this.v.getBandwidth(),[wa(this,a),this.g.bind(this)]}));
  96. var e=0==a.c.buffered.length&&0==a.b.length,f=null;
  97. return la(a.a,function(){if(0==this.c.buffered.length){var a=Error("Failed to buffer segment ("+this.i+").");
  98. return a.type="stream",[Promise.reject(a)]}e&&(a=b.b,f=this.c.buffered.start(0)-a),a=tc(this.b,b.b),a>=0?this.b.splice(a+1,0,b):this.b.push(b)}.bind(a)),va(a).then(function(){return Promise.resolve(f)}.bind(a))}function sa(a){return a.a?(a=Error("Cannot clear ("+a.i+"): previous operation not complete."),a.type="stream",Promise.reject(a)):(a.a=new ka,la(a.a,function(){var a;
  99. a:if(0==this.c.buffered.length)a=Promise.resolve();
  100. else{try{this.c.remove(0,Number.POSITIVE_INFINITY)}catch(b){a=Promise.reject(b);
  101. break a}this.b=[],a=this.f=new ia}return[a,this.g.bind(this)]}.bind(a)),va(a))}function ta(a,b){if(a.a){var c=Error("Cannot clearAfter ("+a.i+"): previous operation not complete.");
  102. return c.type="stream",Promise.reject(c)}return a.a=new ka,la(a.a,function(){return[xa(this,b),this.g.bind(this)]}.bind(a)),va(a)}function ua(a){return a.a?(a=a.a,a.a?a=a.a:a.f?(a.c&&a.c(),a.a=new ia,a=a.a):(a.f=!0,a=Promise.resolve())):a=Promise.resolve(),a}function va(a){return a.a.start(),a.a.g.then(oa(a,function(){this.a=null}))["catch"](oa(a,function(a){return this.a=null,Promise.reject(a)}))}function wa(a,b){try{a.c.appendBuffer(b)}catch(c){return Promise.reject(c)}return a.f=new ia,a.f}function xa(a,b){if(0==a.c.buffered.length)return Promise.resolve();
  103. var c=tc(a.b,b);
  104. if(-1==c||c==a.b.length-1)return Promise.resolve();
  105. try{a.c.remove(a.b[c+1].b,Number.POSITIVE_INFINITY)}catch(d){return Promise.reject(d)}return a.b=a.b.slice(0,c+1),a.f=new ia,a.f}function ya(a,b){fa.call(this,b),this.a=null,this.h=a}function za(b){if(!a.indexedDB)return b=Error("Persistant storage requires IndexedDB support."),b.type="storage",Promise.reject(b);
  106. if(b.a)return b=Error("A database connection is already open."),b.type="storage",Promise.reject(b);
  107. var c=new ia,d=a.indexedDB.open("content_database",1);
  108. return d.onupgradeneeded=oa(b,function(a){this.a=a.target.result,Ba(this,"group_store",{keyPath:"group_id"}),Ba(this,"stream_index_store",{keyPath:"stream_id"}),a=Ba(this,"content_store",{autoIncrement:"true"}),a.createIndex("segment",["stream_id","segment_id"],{unique:!0}),a.createIndex("stream","stream_id",{unique:!1})}),d.onsuccess=oa(b,function(a){this.a=a.target.result,c.resolve()}),d.onerror=function(){c.reject(d.error)},c}function Aa(a){a.a&&(a.a.close(),a.a=null)}function Ba(a,b,c){return a.a.objectStoreNames.contains(b)&&a.a.deleteObjectStore(b),a.a.createObjectStore(b,c)}function Ca(a){return Fa(a,"content_store")}function Da(a){return Fa(a,"stream_index_store")}function Ea(a){return Fa(a,"group_store")}function Fa(a,b){return a.a.transaction([b],a.h).objectStore(b)}function Ga(a,b){var c=new ia,d=a.get(b);
  109. return d.onerror=function(){c.reject(d.error)},d.onsuccess=function(){if(d.result)c.resolve(d.result);
  110. else{var a=Error("Item not found.");
  111. a.type="storage",c.reject(a)}},c}function Ha(){ya.call(this,"readonly",null)}function Ia(a){var b=new ia,c=[],d=Ea(a).openCursor();
  112. return d.onerror=function(){b.reject(d.error)},d.onsuccess=function(a){(a=a.target.result)?(c.push(a.key),a["continue"]()):b.resolve(c)},b}function Ja(a,b){return Ga(Ea(a),b).then(oa(a,function(a){return a.session_ids=A(a.session_ids),a.hasOwnProperty("duration")||a.hasOwnProperty("key_system")?Promise.resolve(a):Ka(this,a.stream_ids[0]).then(function(b){return a.duration=b.duration,a.key_system=b.key_system,a.license_server=b.license_server,a.with_credentials=b.with_credentials,a.distinctive_identifier=b.distinctive_identifier,a.audio_robustness=b.audio_robustness,a.video_robustness=b.video_robustness,Promise.resolve(a)})}))}function Ka(a,b){return Ga(Da(a),b)}function La(a,b,c){return Ga(Ca(a).index("segment"),[b,c]).then(function(a){return Promise.resolve(a.content)})}function Ma(a){return String.fromCharCode.apply(null,a)}function Na(a){for(var b=new Uint8Array(a.length),c=0;
  113. c<a.length;
  114. ++c)b[c]=a.charCodeAt(c);
  115. return b}function Oa(b,c){var d=void 0==c?!0:c,e=a.btoa(Ma(b)).replace(/\+/g,"-").replace(/\//g,"_");
  116. return d?e:e.replace(/=*$/,"")}function Pa(b){return Na(a.atob(b.replace(/-/g,"+").replace(/_/g,"/")))}function Qa(a){for(var b="",c=0;
  117. c<a.length;
  118. ++c){var d=a[c].toString(16);
  119. 1==d.length&&(d="0"+d),b+=d}return b}function Ra(a,b){if(!a&&!b)return!0;
  120. if(!a||!b||a.length!=b.length)return!1;
  121. for(var c=0;
  122. c<a.length;
  123. ++c)if(a[c]!=b[c])return!1;
  124. return!0}function Sa(){this.h=this.a="",this.j=!1,this.o=this.l=null,this.v=this.g=!1,this.i=this.f="",this.c=null,this.b=[]}function Ta(a){var b=new Sa;
  125. if(!a)return b;
  126. var c=W(a,"keySystem");
  127. if(null==c)throw Error("'keySystem' cannot be null.");
  128. b.a=c;
  129. var d=W(a,"licenseServerUrl");
  130. if(null!=d)b.h=d;
  131. else if(c)throw Error("For encrypted streaming content, 'licenseServerUrl' cannot be null or empty.");
  132. if(c=X(a,"withCredentials","boolean"),null!=c&&(b.j=c),c=Y(a,"licensePostProcessor",Function),null!=c&&(b.l=c),c=Y(a,"licensePreProcessor",Function),null!=c&&(b.o=c),c=X(a,"distinctiveIdentifierRequired","boolean"),null!=c&&(b.g=c),c=X(a,"persistentStateRequired","boolean"),null!=c&&(b.v=c),c=W(a,"audioRobustness"),null!=c&&(b.f=c),c=W(a,"videoRobustness"),null!=c&&(b.i=c),c=Y(a,"serverCertificate",Uint8Array),null!=c&&(b.c=c),c=Y(a,"initData",Object)){if(a=Y(c,"initData",Uint8Array),null==a)throw Error("'initData.initData' cannot be null.");
  133. if(c=W(c,"initDataType"),null==c)throw Error("'initData.initDataType' cannot be null.");
  134. b.b.push({initData:new Uint8Array(a.buffer),initDataType:c})}return b}function Ua(a,b){var c=a.b.concat(b.map(function(a){return{initData:new Uint8Array(a.initData.buffer),initDataType:a.initDataType}}));
  135. a.b=A(c,function(a){return Array.prototype.join.apply(a.initData)+","+a.initDataType})}function Va(a,b,c,d,e,f,g,h,i,j,k){this.g=a,this.j=b,this.o=c,this.a=[],this.h=e||null,this.i=f||null,this.f=g==Qe,this.v=h==Re,this.c=i||"",this.l=j||"",this.b=k||null,d&&this.a.push(d)}function Wa(a,b){try{var c=new Ya(a,b);
  136. return Promise.resolve(c)}catch(d){return Promise.reject(d)}}function Xa(a){var b=this.mediaKeys;
  137. return b&&b!=a&&$a(b,null),delete this.mediaKeys,(this.mediaKeys=a)&&$a(a,this),Promise.resolve()}function Ya(a,b){this.a=this.keySystem=a;
  138. var c=!0;
  139. "org.w3.clearkey"==a&&(this.a="webkit-org.w3.clearkey",c=!1);
  140. var d,e=!1;
  141. d=document.getElementsByTagName("video"),d=d.length?d[0]:document.createElement("video");
  142. for(var f=0;
  143. f<b.length;
  144. ++f){var g=b[f],h={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:g.initDataTypes,sessionTypes:["temporary"]},i=!1;
  145. if(g.audioCapabilities)for(var j=0;
  146. j<g.audioCapabilities.length;
  147. ++j){var k=g.audioCapabilities[j];
  148. k.contentType&&(i=!0,d.canPlayType(k.contentType.split(";
  149. ")[0],this.a)&&(h.audioCapabilities.push(k),e=!0))}if(g.videoCapabilities)for(j=0;
  150. j<g.videoCapabilities.length;
  151. ++j)k=g.videoCapabilities[j],k.contentType&&(i=!0,d.canPlayType(k.contentType,this.a)&&(h.videoCapabilities.push(k),e=!0));
  152. if(i||(e=d.canPlayType("video/mp4",this.a)||d.canPlayType("video/webm",this.a)),"required"==g.persistentState&&(c?(h.persistentState="required",h.sessionTypes=["persistent-license"]):e=!1),e)return void(this.b=h)}throw Error("None of the requested configurations were supported.")}function Za(a){this.g=a,this.b=null,this.a=new ba,this.c=[],this.f={}}function $a(a,b){a.b=b,da(a.a),b&&(ca(a.a,b,"webkitneedkey",a.Cb.bind(a)),ca(a.a,b,"webkitkeymessage",a.Bb.bind(a)),ca(a.a,b,"webkitkeyadded",a.zb.bind(a)),ca(a.a,b,"webkitkeyerror",a.Ab.bind(a)))}function _a(a,b){var c=a.f[b];
  153. return c?c:(c=a.c.shift())?(c.sessionId=b,a.f[b]=c):null}function ab(a,b,c){fa.call(this,null),this.f=a,this.h=!1,this.a=this.b=null,this.c=b,this.g=c,this.sessionId="",this.expiration=NaN,this.closed=new ia,this.keyStatuses=new eb}function bb(a,b,c){if(a.h)return Promise.reject(Error("The session is already initialized."));
  154. a.h=!0;
  155. var d;
  156. try{if("persistent-license"==a.g)if(c)d=Na("LOAD_SESSION|"+c);
  157. else{var e=new Uint8Array(b);
  158. d=Na("PERSISTENT|"+Ma(e))}else d=new Uint8Array(b)}catch(f){return Promise.reject(f)}a.b=new ia;
  159. try{a.f.webkitGenerateKeyRequest(a.c,d)}catch(g){if("InvalidStateError"!=g.name)return a.b=null,Promise.reject(g);
  160. setTimeout(function(){try{this.f.webkitGenerateKeyRequest(this.c,d)}catch(a){this.b.reject(a),this.b=null}}.bind(a),10)}return a.b}function cb(a,b){var c=a.keyStatuses;
  161. c.size=void 0==b?0:1,c.a=b,c=Q({type:"keystatuseschange"}),a.dispatchEvent(c)}function db(a){this.b=a,this.a=0}function eb(){this.size=0,this.a=void 0}function fb(){Navigator.prototype.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||(HTMLMediaElement.prototype.webkitGenerateKeyRequest?(Se=new Uint8Array([0]),Navigator.prototype.requestMediaKeySystemAccess=Wa,delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=Xa,a.MediaKeys=Za,a.MediaKeySystemAccess=Ya):(Navigator.prototype.requestMediaKeySystemAccess=u,delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=v,a.MediaKeys=w,a.MediaKeySystemAccess=x))}function gb(a){this.systemIds=[],this.cencKeyIds=[],a=new C(new DataView(a.buffer));
  162. try{for(;
  163. D(a);
  164. ){var b=a.a,c=F(a),d=F(a);
  165. if(1==c?c=G(a):0==c&&(c=a.b.byteLength-b),1886614376!=d)I(a,c-(a.a-b));
  166. else{var e=E(a);
  167. if(e>1)I(a,c-(a.a-b));
  168. else{I(a,3);
  169. var f=Qa(H(a)),g=[];
  170. if(e>0)for(var h=F(a),i=0;
  171. h>i;
  172. ++i){var j=Qa(H(a));
  173. g.push(j)}var k=F(a);
  174. I(a,k),this.cencKeyIds.push.apply(this.cencKeyIds,g),this.systemIds.push(f),a.a!=b+c&&I(a,c-(a.a-b))}}}}catch(l){}}function hb(a){var b;
  175. a instanceof hb?(ib(this,a.R),this.aa=a.aa,this.P=a.P,jb(this,a.fa),this.N=a.N,kb(this,a.a.clone()),this.$=a.$):a&&(b=String(a).match(Te))?(ib(this,b[1]||"",!0),this.aa=lb(b[2]||""),this.P=lb(b[3]||"",!0),jb(this,b[4]),this.N=lb(b[5]||"",!0),kb(this,b[6]||"",!0),this.$=lb(b[7]||"")):this.a=new ob(null)}function ib(a,b,c){a.R=c?lb(b,!0):b,a.R&&(a.R=a.R.replace(/:$/,""))}function jb(a,b){if(b){if(b=Number(b),isNaN(b)||0>b)throw Error("Bad port number "+b);
  176. a.fa=b}else a.fa=null}function kb(a,b,c){b instanceof ob?a.a=b:(c||(b=mb(b,Xe)),a.a=new ob(b))}function lb(a,b){return a?b?decodeURI(a):decodeURIComponent(a):""}function mb(a,b,c){return"string"==typeof a?(a=encodeURI(a).replace(b,nb),c&&(a=a.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),a):null}function nb(a){return a=a.charCodeAt(0),"%"+(a>>4&15).toString(16)+(15&a).toString(16)}function ob(a){this.b=a||null}function pb(a,b,c){if(!a.a&&(a.a={},a.c=0,a.b))for(var d=a.b.split("&"),e=0;
  177. e<d.length;
  178. e++){var f=d[e].indexOf("="),g=null,h=null;
  179. f>=0?(g=d[e].substring(0,f),h=d[e].substring(f+1)):g=d[e],g=decodeURIComponent(g.replace(/\+/g," ")),h=h||"",pb(a,g,decodeURIComponent(h.replace(/\+/g," ")))}a.b=null,(d=a.a.hasOwnProperty(b)&&a.a[b])||(a.a[b]=d=[]),d.push(c),a.c++}function qb(){this.id=this.url=null,this.type="static",this.c=this.i=this.s=null,this.g=5,this.f=this.b=this.j=null,this.h=8,this.a=[]}function rb(){this.g=this.f=this.c=this.s=this.a=this.start=this.id=null,this.b=[]}function sb(){this.i=this.b=this.height=this.width=this.contentType=this.lang=this.group=this.id=null,this.c=!1,this.h=this.g=this.f=this.s=null,this.j=[],this.a=[]}function tb(){this.value=null}function ub(){this.contentType=this.lang=this.id=null}function vb(){this.a=this.b=this.g=this.s=this.h=this.f=this.height=this.width=this.bandwidth=this.lang=this.id=null,this.c=[]}function wb(){this.value=this.schemeIdUri=this.b=null,this.children=[],this.a=this.pssh=null}function xb(){this.parsedPssh=this.psshBox=null}function yb(){this.url=null}function zb(){this.url=null}function Ab(){this.s=null,this.g=1,this.c=this.b=this.a=this.f=null}function Bb(){this.a=this.url=null}function Cb(){this.a=this.url=null}function Db(){this.s=null,this.f=1,this.b=this.g=null,this.i=1,this.h=null,this.a=[],this.c=null}function Eb(){this.a=this.b=null}function Fb(){this.b=1,this.a=this.i=null,this.j=1,this.c=this.g=this.f=this.h=null}function Gb(){this.a=[]}function Hb(){this.c=this.a=this.b=null}function Ib(a,b){this.na=a,this.end=b}function Jb(a){for(var b=[],c=0;
  180. c<a.b.length;
  181. ++c){var d=a.b[c];
  182. null!=d.group&&(b[d.group]=!0)}for(c=0;
  183. c<a.b.length;
  184. ++c)if(d=a.b[c],null==d.group){for(var e=1;
  185. 1==b[e];
  186. )++e;
  187. b[e]=!0,d.group=e}}function Kb(a,b){if(!b||0===b.length)return a;
  188. for(var c=[],d=0;
  189. d<b.length;
  190. d++){var e=b[d].url;
  191. null==a||0===a.length?c.push(new hb(e)):(e=Lb(a.slice(0,1),e),c.push(e[0]))}return c}function Lb(a,b){if(!b)return a;
  192. var c=new hb(b);
  193. return a?a.map(function(a){return a.resolve(c)}):[c]}function Mb(a,b,c){var d=Sb(c);
  194. return(b=Ob(b,c.constructor.TAG_NAME))&&d.parse(a,b),d}function Nb(a,b,c){var d=null;
  195. return(b=Ob(b,c.TAG_NAME))&&(d=new c,d.parse(a,b)),d}function Ob(a,b){for(var c=null,d=0;
  196. d<a.childNodes.length;
  197. d++)if(a.childNodes[d].tagName==b){if(c)return null;
  198. c=a.childNodes[d]}return c}function Pb(a,b,c){for(var d=[],e=0;
  199. e<b.childNodes.length;
  200. e++)if(b.childNodes[e].tagName==c.TAG_NAME){var f=new c;
  201. f.parse.call(f,a,b.childNodes[e]),d.push(f)}return d}function Qb(a){return a=a.firstChild,a.nodeType!=Node.TEXT_NODE?null:a.nodeValue}function Rb(a){return a?a.map(function(a){return a.clone()}):null}function Sb(a){return a?a.clone():null}function Tb(a,b,c,d){return a=c(a.getAttribute(b)),null!=a?a:void 0!==d?d:null}function Ub(a){return a?(a=Date.parse(a),isNaN(a)?null:Math.floor(a/1e3)):null}function Vb(b){if(!b)return null;
  202. var c=/^P(?:([0-9]*)Y)?(?:([0-9]*)M)?(?:([0-9]*)D)?(?:T(?:([0-9]*)H)?(?:([0-9]*)M)?(?:([0-9.]*)S)?)?$/.exec(b);
  203. if(!c)return null;
  204. b=0;
  205. var d=Zb(c[1]);
  206. return d&&(b+=31536e3*d),(d=Zb(c[2]))&&(b+=2592e3*d),(d=Zb(c[3]))&&(b+=86400*d),(d=Zb(c[4]))&&(b+=3600*d),(d=Zb(c[5]))&&(b+=60*d),c=a.parseFloat(c[6]),(c=isNaN(c)?null:c)&&(b+=c),b}function Wb(a){var b=/([0-9]+)-([0-9]+)/.exec(a);
  207. return b?(a=Zb(b[1]),null==a?null:(b=Zb(b[2]),null==b?null:new Ib(a,b))):null}function Xb(b){return b=a.parseInt(b,10),isNaN(b)?null:b}function Yb(b){return b=a.parseInt(b,10),b>0?b:null}function Zb(b){return b=a.parseInt(b,10),b>=0?b:null}function $b(a){return a}function _b(a,b){this.url=a,this.b=b||new ac,this.g=this.i=this.h=0,this.a=null,this.c=new ia,this.f=null}function ac(){this.body=null,this.a=1,this.h=1e3,this.c=0,this.method="GET",this.f="arraybuffer",this.b={},this.g=this.i=!1}function bc(a){cc(a),a.b.body=null,a.c.destroy(),a.c=null,a.f=null}function cc(a){a.a&&(a.a.onload=null,a.a.onreadystatechange=null,a.a.onerror=null,a.a.ontimeout=null),a.a=null}function dc(a){var b=a.url.split("/"),c=parseInt(b[2],10),d=parseInt(b[3],10),e=new Ha;
  208. return za(e).then(function(){return La(e,c,d)}).then(oa(a,function(a){var b=JSON.parse(JSON.stringify(new XMLHttpRequest));
  209. return b.response=a,a=this.c,a.resolve(b),Aa(e),bc(this),a}))["catch"](oa(a,function(a){return Aa(e),bc(this),Promise.reject(a)}))}function ec(a,b,c){return b=Error(b),b.type=c,b.status=a.a.status,b.url=a.url,b.method=a.b.method,b.body=a.b.body,b.Mb=a.a,b}function fc(b){cc(b),a.setTimeout(b.bb.bind(b),b.g*(1+.5*(2*Math.random()-1))),b.g*=2}function gc(a,b,c,d){this.c=b,this.f=c||0,this.h=null!=d?d:null,this.b=this.a=null,this.i=a}function hc(a,b){return a&&0!==a.length?a.map(function(a){return a.resolve(b)}):[b]}function ic(a,b,c){return a.a?a.a:(b=b||new ac,(a.f||a.h)&&(b.b.Range="bytes="+(a.f+"-"+(null!=a.h?a.h:""))),a.a=jc(a,0,b,c),a.a)}function jc(a,b,c,d){var e=a.c[b].toString();
  210. return a.i&&(e=a.i(e,c.b)||e),a.b=new _b(e,c),d&&(a.b.f=d),e=a.b.bb().then(oa(a,function(a){return this.b=this.a=null,Promise.resolve(a.response)})),e=e["catch"](oa(a,function(a){return this.a&&b+1<this.c.length?this.a=jc(this,b+1,c,d):(this.a=this.b=null,Promise.reject(a))}))}function kc(a,b){this.a=new ac,this.a.f="text",this.a.a=3,this.a.c=1e3*(null!=b?b:0),this.a.g=!0,this.b=a}function lc(a){var b=a.b;
  211. return ic(b,a.a).then(function(a){var c;
  212. return c=b.c,(c=(a=(new DOMParser).parseFromString(a,"text/xml"))?Nb({s:c},a,qb):null)?Promise.resolve(c):(c=Error("MPD parse failure."),c.type="dash",Promise.reject(c))})}function mc(b,c,d,e){var f=c.a,g=[];
  213. a.HRZ_SegmentsMap=a.HRZ_SegmentsMap||{};
  214. for(var h=0;
  215. e>h;
  216. ++h){var i=h+d,j=(i-1)*f.a,k=j/f.b,j=(j+f.a)/f.b,l=i-1+f.j,i=(i-1)*f.a,m=Object.keys(a.HRZ_SegmentsMap);
  217. if(m.length&&l<m[0]||(m={},m.startTime=k,m.endTime=j,m.segmentNumber=l,a.HRZ_SegmentsMap[l]=m),l=nc(b,c,l,i),!l)return null;
  218. g.push(new rc(k,j,l))}return g}function nc(a,b,c,d){if(!b.a)return null;
  219. var e=b.a.h;
  220. return e?(c=oc(e,b.id,c,b.bandwidth,d))?(b=hc(b.s,c),new gc(a,b,0,null)):null:b.s?new gc(a,b.s,0,null):null}function oc(b,c,d,e,f){var g={RepresentationID:c,Number:d,Bandwidth:e,Time:f};
  221. b=b.replace(/\$(RepresentationID|Number|Bandwidth|Time)?(?:%0([0-9]+)d)?\$/g,function(b,c,d){if("$$"==b)return"$";
  222. var e=g[c];
  223. return null==e?b:("RepresentationID"==c&&d&&(d=void 0),b=e.toString(),d=a.parseInt(d,10)||1,d=Math.max(0,d-b.length),Array(d+1).join("0")+b)});
  224. try{return new hb(b)}catch(h){if(h instanceof URIError)return null;
  225. throw h}}function pc(a,b,c){var d=0;
  226. b*=c,a=a.a,c=[];
  227. for(var e=0;
  228. e<a.length&&a[e].a;
  229. ++e){var f=a[e].b,f=null!=f?f:d,g=a[e].c||0;
  230. 0>g&&(g=a[e].a,g=e+1===a.length?Math.ceil((a[0].b+b-f)/g)-1:Math.ceil((a[e+1].b-f)/g)-1),0<c.length&&f!=d&&(c[c.length-1].end=f);
  231. for(var h=0;
  232. g>=h;
  233. ++h)d=f+a[e].a,c.push({start:f,end:d}),f=d}return c}function qc(a){this.a=a}function rc(a,b,c){this.b=a,this.a=b,this.url=c}function sc(a,b,c){return new rc(b,c,a.url)}function tc(a,b){for(var c=a.length-1;
  234. c>=0;
  235. --c){var d=a[c];
  236. if(b>=d.b&&(null==d.a||b<d.a))return c}return-1}function uc(a,b){return a.map(function(a){return sc(a,a.b+b,null!=a.a?a.a+b:null)})}function vc(){}function wc(a){this.u=a,this.g=0}function xc(a){if(0==a.u.length)throw new RangeError("SegmentIndex: There is no first SegmentReference.");
  237. return a.u[0]}function yc(a){if(0==a.u.length)throw new RangeError("SegmentIndex: There is no last SegmentReference.");
  238. return a.u[a.u.length-1]}function zc(a,b){if(a.g!=b.g&&(b=new wc(uc(b.u,a.g-b.g))),0==a.length())a.u=b.u.slice(0);
  239. else if(0!=b.length()&&null!=yc(a).a&&!(null!=yc(b).a&&yc(b).a<yc(a).a)){if(yc(a).a<=xc(b).b)var c=sc(yc(a),yc(a).b,xc(b).b),c=a.u.slice(0,-1).concat([c]);
  240. else{var d;
  241. for(d=0;
  242. d<a.u.length&&!(a.u[d].a>=xc(b).b);
  243. ++d);
  244. a.u[d].b<xc(b).b?(c=sc(a.u[d],a.u[d].b,xc(b).b),c=a.u.slice(0,d).concat([c])):(xc(a).b>xc(b).b||xc(b),c=a.u.slice(0,d))}a.u=c.concat(b.u)}}function Ac(a,b,c,d){wc.call(this,a),this.f=b,this.o=c,this.j=d,this.c=this.v=this.b=null,Bc(this)}function Bc(a){if(0!=a.length()){a.length();
  245. var b=null!=yc(a).a?yc(a).a:yc(a).b;
  246. if(a.f.b>a.j)a.b=b;
  247. else{var c=a.j-(a.f.b+a.o.start);
  248. 0>c?a.b=b:c<Math.max(yc(a).b,yc(a).a||0)?(yc(a),a.b=b):a.b=c}a.v=yc(a).b,a.c=xc(a).b}}function Cc(a,b){if(Dc(a,b),null==a.b||null==a.v||null==a.c)return{start:0,end:0};
  249. var c=b-a.j,d=a.b+c;
  250. return null!=a.f.f&&(d=d-a.c-a.f.f,d>0&&(a.c+=d)),c=a.v+c,c=0<a.length()?null!=yc(a).a?Math.min(c,yc(a).a):c:a.c,c=Math.max(c,a.c),{start:a.c,end:c}}function Dc(a,b){if(null!=a.f.f)if(null==a.b)a.length();
  251. else{for(var c=a.b+(b-a.j),d=0,e=0;
  252. e<a.u.length;
  253. ++e){var f=null;
  254. if(e<a.u.length-1?f=a.u[e+1].a:(f=a.u[e],f=null!=f.a?f.a+(f.a-f.b):null),!(null!=f&&f<c-a.f.f))break;
  255. ++d}d>0&&a.u.splice(0,d)}}function Ec(a,b,c,d,e){var f,g=1,h=0;
  256. if(a.b>d)f=null;
  257. else{var i=a.h||0,j=a.f||0;
  258. f=c.a,f=f.a/f.b;
  259. var k=d-(a.b+b.start);
  260. 0>k?f=null:(j=k-2*f-j,0>j&&(j=0),j=Math.ceil(j/f)*f,k-=f,0>k?f=null:(i=Math.floor(k/f)*f-i,0>i&&(i=0),i=Math.floor(i/f)*f,f={Na:j/f+1,current:(i>=j?i:j)/f+1}))}if(f&&(g=f.Na,h=f.current-f.Na+1),g=mc(e,c,g,h),null==g)throw a=Error("Failed to generate SegmentReferences."),a.type="stream",a;
  261. Ac.call(this,g,a,b,d),this.l=c,this.i=this.a=0<this.length()?a.b+b.start+yc(this).a:null,this.h=f?f.current+1:null,this.w=e}function Fc(a,b){if(null!=a.a&&null!=a.i&&null!=a.h){var c=a.l.a,c=c.a/c.b,d=Math.floor((a.i+(b-a.j)-a.a)/c);
  262. if(0!=d){var e=mc(a.w,a.l,a.h,d);
  263. Array.prototype.push.apply(a.u,uc(e,a.g)),a.a+=d*c,a.h+=d}}}function Gc(a,b,c,d,e){this.f=a,this.b=b,this.c=c,this.h=d,this.a=null,this.g=e}function Hc(a,b,c,d,e){this.c=a,this.b=b,this.g=c,this.a=null,this.h=d,this.f=e}function Ic(a,b,c,d,e){this.b=a,this.c=b,this.f=c,this.h=d,this.a=null,this.g=e}function Jc(a){this.b=a,this.a=null}function Kc(){this.A=Ze++,this.id=this.C=this.G=null,this.c=0,this.height=this.width=this.bandwidth=null,this.b=this.a="",this.f=[],this.L=!1,this.J=!0}function Lc(a){var b=a.a||"";
  264. return a.b&&(b+=';
  265. codecs="'+a.b+'"'),b}function Mc(){this.A=$e++,this.id=null,this.contentType=this.lang="",this.b=!1,this.m=[],this.a=[]}function Nc(a){for(var b=[],c=0;
  266. c<a.a.length;
  267. ++c){var d=new Qc;
  268. d.id=a.A,d.a=a.a[c],d.contentType=a.contentType,d.b=a.m.length?Lc(a.m[0]):"",b.push(d)}return b}function Oc(){this.id=null,this.start=0,this.b=null,this.a=[]}function Pc(){this.b=!1,this.g=this.f=null,this.c=0,this.a=[]}function Qc(){this.id=0,this.a=null,this.b=this.contentType=""}function Rc(a,b,c,d,e){fa.call(this,a),this.c=b,this.a=new pa(c,d,e),this.w=this.F=this.b=null,this.I=!1,this.g=null,this.l=!1,this.i=null,this.o=!1,this.h=new ia,this.j=this.f=!1,this.B=0,this.K=15,this.D=!1}function Sc(a,b,c){a.b&&!a.l&&(a.l=!0,Yc(a),ua(a.a).then(oa(a,function(){var a=this.c.currentTime;
  269. return!b&&0<qa(this.a,a)&&0<=tc(this.a.b,a)?Promise.resolve():c?ta(this.a,this.c.currentTime+c):(this.D=!0,sa(this.a))})).then(oa(a,function(){this.l=!1,Xc(this,0)}))["catch"](oa(a,function(a){this.l=!1,this.f?(a=R(a),this.dispatchEvent(a)):this.h.reject(a)})))}function Tc(a,b,c){a=a.a;
  270. var d=a.b.length;
  271. return a=d>0?a.b[d-1]:null,null!=a?null!=a.a?c.ia(a.a):null:c.ia(b)||(c.length()?yc(c):null)}function Uc(a){if(!a.o&&null!=a.i){a.o=!0;
  272. var b=a.a,c=a.i,d=c-b.o;
  273. 0!=d&&(b.b=uc(b.b,d),b.o=c),a.h.resolve(a.i)}}function Vc(a,b){var c;
  274. c=b.a.split("/")[0],c=Q({type:"adaptation",bubbles:!0,contentType:c,size:"video"!=c?null:{width:b.width,height:b.height},bandwidth:b.bandwidth}),a.dispatchEvent(c)}function Wc(a){var b=Q({type:"ended"});
  275. a.dispatchEvent(b)}function Xc(b,c){b.g=a.setTimeout(b.yb.bind(b),c)}function Yc(b){null!=b.g&&(a.clearTimeout(b.g),b.g=null)}function Zc(a){this.b=a,this.a=null}function $c(a,b){fa.call(this,a),this.b=b,this.g=!0,this.h=this.f=null,this.c=new ia,this.a=null}function _c(){}function ad(a,b,c,d,e,f,g){this.g=a,this.j=b,this.f=c,this.a=d,this.c=e,this.v=f,this.i=this.b=null,this.h=g}function bd(a){this.a=a}function cd(a,b,c){for(var d=B()/1e3,e=0;
  276. e<b.a.length;
  277. ++e)for(var f=b.a[e],g=0;
  278. g<f.b.length;
  279. ++g){var h=f.b[g];
  280. if("text"!=h.contentType)for(var i=0;
  281. i<h.a.length;
  282. ++i){
  283. var j=h.a[i],k=0,k=k+(j.g?1:0),k=k+(j.b?1:0),k=k+(j.a?1:0);
  284. 0==k?(h.a.splice(i,1),--i):1!=k&&(j.g?(j.b=null,j.a=null):j.b&&(j.a=null))}}for(dd(b),e=0;
  285. e<b.a.length;
  286. ++e)for(f=b.a[e],g=0;
  287. g<f.b.length;
  288. ++g){for(i=h=f.b[g],j=null,k=0;
  289. k<i.a.length;
  290. ++k){var l=i.a[k].f||"";
  291. j?l!=j&&(i.a.splice(k,1),--k):j=l}0==h.a.length&&(f.b.splice(g,1),--g)}for("dynamic"==b.type&&null==b.b&&(b.b=d),e=new Pc,"dynamic"==b.type&&(e.b=!0,e.f=b.j,e.g=new gc(c,b.i||b.url)),e.c=b.g||5,f=0;
  292. f<b.a.length&&(g=b.a[f],null!=g.start);
  293. ++f)g=ed(a,b,g,d,c),e.a.push(g);
  294. return e}function dd(a){if(a.a.length){null==a.a[0].start&&(a.a[0].start=0);
  295. var b=function(a){return 0==a||!!a};
  296. "dynamic"==a.type&&(a.c=null),b(a.c)&&1==a.a.length&&!b(a.a[0].a)&&(a.a[0].a=a.c);
  297. for(var c=0,d=!0,e=0;
  298. e<a.a.length;
  299. ++e){var f=a.a[e-1],g=a.a[e],h=a.a[e+1]||{start:a.c};
  300. !b(g.start)&&f&&b(f.start)&&b(f.a)&&(g.start=f.start+f.a),!b(g.a)&&b(h.start)&&(g.a=h.start-g.start),null!=g.start&&null!=g.a?c+=g.a:d=!1}b(a.c)||(e=a.a[a.a.length-1],d?a.c=c:b(e.start)&&b(e.a)?a.c=e.start+e.a:"dynamic"!=a.type&&(a.c=c))}}function ed(a,b,c,d,e){var f=new Oc;
  301. f.id=c.id,f.start=c.start,f.b=c.a;
  302. var g=new Z;
  303. c.b.forEach(function(a){g.push(a.contentType||"",a)});
  304. for(var h=aa(g),i=0;
  305. i<h.length;
  306. ++i){var j=new Z;
  307. g.get(h[i]).forEach(function(a){j.push(a.group,a)});
  308. for(var k=aa(j),l=0;
  309. l<k.length;
  310. ++l){var m=new Z;
  311. j.get(k[l]).forEach(function(a){m.push(a.lang,a)});
  312. for(var n=aa(m),o=0;
  313. o<n.length;
  314. ++o){var p=m.get(n[o]),p=fd(a,b,c,p,d,e);
  315. f.a.push(p)}}}return f}function fd(a,b,c,e,f,g){d(e.every(function(a){return a.group==e[0].group&&(a.lang||"")==(e[0].lang||"")&&(a.contentType||"")==(e[0].contentType||"")}));
  316. var h=new Mc,i=e.filter(function(a){return null!=a.id});
  317. i.length==e.length&&(h.id=i.map(function(a){return a.id}).sort().reduce(function(a,b){return a+","+b})),h.lang=e[0].lang||"",h.contentType=e[0].contentType||"",h.b=e.some(function(a){return a.c});
  318. for(var i={},j=0;
  319. j<e.length;
  320. ++j)for(var k=e[j],l=0;
  321. l<k.a.length;
  322. ++l){var m=k.a[l],n=id(a,m),o=h.a.slice(0);
  323. hd(n,o),0==o.length&&0<h.a.length||!(m=kd(b,c,m,f,g))||(h.m.push(m),h.a=o,i[m.A]=k)}if(h.a.some(function(a){return""==a.a}))return h.m.forEach(function(a){a.L=!0}),h;
  324. for(a=gd(e),j=0;
  325. j<h.m.length;
  326. ++j)m=h.m[j],k=i[m.A],k==a&&(m.L=!0);
  327. return h}function gd(a){for(var b=null,c=null,d=0;
  328. d<a.length;
  329. ++d)for(var e=a[d],f=0;
  330. f<e.a.length;
  331. ++f){var g=e.a[f],g=(g.width||1)*(g.height||1)*(g.bandwidth||1);
  332. (null==b||b>g)&&(b=g,c=e)}return c}function hd(a,b){if(0==b.length)Array.prototype.push.apply(b,a);
  333. else for(var c=0;
  334. c<b.length;
  335. ++c){for(var d=!1,e=0;
  336. e<a.length;
  337. ++e){var f=b[c],g=a[e];
  338. if(f.a==g.a&&f.h==g.h&&f.j==g.j&&f.g==g.g&&f.v==g.v&&f.f==g.f&&f.i==g.i&&Ra(f.c,g.c)){d=!0,Ua(b[c],a[e].b);
  339. break}}d||(b.splice(c,1),--c)}}function id(a,b){var c=[];
  340. if(0==b.c.length)c.push(new Sa);
  341. else if(a.a)for(var d=0;
  342. d<b.c.length;
  343. ++d)c.push.apply(c,jd(a,b.c[d]));
  344. return c}function jd(a,b){var c=[];
  345. if(2==a.a.length){var d=a.a(b.schemeIdUri,b.b);
  346. if(!(d&&d instanceof Array))return[];
  347. for(var e=0;
  348. e<d.length;
  349. ++e){var f=Ta(d[e]);
  350. 0==f.b.length&&b.pssh&&b.pssh.psshBox&&Ua(f,[{initData:b.pssh.psshBox,initDataType:"cenc"}]),c.push(f)}}else{if(d=a.a(b),!(d&&d instanceof Va))return[];
  351. e=new Sa,e.a=d.g,e.h=d.j,e.j=d.o,e.l=d.h,e.o=d.i,e.g=d.f,e.v=d.v,e.f=d.c,e.i=d.l,e.c=d.b?new Uint8Array(d.b.buffer):null,Ua(e,d.a),c.push(e)}return c}function kd(a,b,c,d,e){if(!c.s||0===c.s.length)return null;
  352. var f=null,g=1,h=0;
  353. if(c.g)f=c.f.split("/")[1],"mp4"!=f&&"webm"!=f?f=null:(g=c.g,("webm"!=f||g.c)&&(g.a||g.b&&g.b.a)?(h=g.b,h||(h=new Bb,h.url=c.s,h.a=g.a?g.a.clone():null),h=md(h,e),g=g.c?md(g.c,e):null,a=new ad(a,b,f,h,g,d,e),b=new qc(g),d=new Kc,d.G=a,d.C=b,f=d):f=null),g=c.g.g,h=c.g.f;
  354. else if(c.b)f=c.b,!f.b&&!f.c&&1<f.a.length?f=null:f.b||b.a||f.c||1!=f.a.length?f.c&&0===f.c.a.length?f=null:(f=f.h?md(f.h,e):null,a=new Hc(a,b,c,d,e),b=new qc(f),d=new Kc,d.G=a,d.C=b,f=d):f=null,g=c.b.f,h=c.b.g;
  355. else if(c.a){a:if(f=c.a,g=0+(f.f?1:0),g+=f.c?1:0,g+=f.a?1:0,0==g?g=!1:(1!=g&&(f.f?(f.c=null,f.a=null):f.c&&(f.a=null)),g=!0),g){if(g=null,f.g&&(g=(f=c.a.g)?ld(c,f,Cb):null,!g)){f=null;
  356. break a}f=g?md(g,e):null,g=c.a,g.f?(g=c.f.split("/")[1],"mp4"!=g&&"webm"!=g?a=null:("webm"!=g||f)&&nc(e,c,1,0)&&(h=(h=c.a.f)?ld(c,h,Bb):null)?(h=md(h,e),a=new ad(a,b,g,h,f,d,e)):a=null):a=g.h?g.c?new Ic(a,b,c,d,e):g.a?"dynamic"!=a.type&&null==b.a?null:new Gc(a,b,c,d,e):null:null,a?(b=new qc(f),d=new Kc,d.G=a,d.C=b,f=d):f=null}else f=null;
  357. g=c.a.b,h=c.a.i}else"text"==c.f.split("/")[0]&&(f=new Kc,f.G=new Zc(new gc(e,c.s)));
  358. if(!f)return null;
  359. for(f.id=c.id,h&&(f.c=-1*h/g),f.bandwidth=c.bandwidth,f.width=c.width,f.height=c.height,f.a=c.f||"",f.b=c.h||"",a=0;
  360. a<c.c.length;
  361. ++a)b=c.c[a],b.a&&f.f.push(b.a);
  362. return f}function ld(a,b,c){return(b=oc(b,a.id,null,a.bandwidth,null))?(c=new c,c.url=hc(a.s,b),c):null}function md(a,b){var c=a.url,d=0,e=null;
  363. return a.a&&(d=a.a.na,e=a.a.end),new gc(b,c,d,e)}function nd(){this.streamStats=null,this.droppedFrames=this.decodedFrames=NaN,this.bufferingTime=this.playTime=this.estimatedBandwidth=0,this.playbackLatency=NaN,this.bufferingHistory=[],this.bandwidthHistory=[],this.streamHistory=[]}function od(a,b){var c=new pd(b);
  364. a.streamHistory.push(new qd(c)),!c.videoHeight&&a.streamStats||(a.streamStats=c)}function pd(a){this.videoWidth=a.width,this.videoHeight=a.height,this.videoMimeType=a.a,this.videoBandwidth=a.bandwidth}function qd(a){this.timestamp=B()/1e3,this.value=a}function rd(a,b){ya.call(this,"readwrite",b),this.j=a,this.b=0}function sd(a,b,c,d,e){for(var f=[],g=[],h=0,i=0,j=[],k=b.map(function(a){return a.G.create()}),k=Promise.all(k),l=b.map(function(a){return a.C.create()}),l=Promise.all(l),k=Promise.all([k,l]).then(function(a){f=a[0],g=a[1],h=f.reduce(function(a,b){return a+b.length()},0)}),l=0;
  365. l<b.length;
  366. ++l)k=k.then(function(a){return ud(this,b[a],f[a],g[a],h,i)}.bind(a,l)),k=k.then(function(a,b){i+=f[a].length(),j.push(b)}.bind(a,l));
  367. return k.then(oa(a,function(){return vd(Ea(this))})).then(oa(a,function(a){var b=new ia;
  368. c=A(c);
  369. var f={group_id:a,stream_ids:j,session_ids:c,duration:d,key_system:e.a,license_server:e.h,with_credentials:e.j,distinctive_identifier:e.g,audio_robustness:e.f,video_robustness:e.i},g=Ea(this).put(f);
  370. return g.onsuccess=function(){b.resolve(a)},g.onerror=function(){b.reject(g.error)},b}))}function td(a,b){return Ga(Ea(a),b).then(oa(a,function(a){var c,d=[];
  371. for(c in a.stream_ids)d.push(xd(this,a.stream_ids[c]));
  372. return a=Ea(this),d.push(a["delete"](b)),Promise.all(d)}))}function ud(a,b,c,d,e,f){var g=[vd(Da(a)),vd(Ca(a).index("stream"))],g=Promise.all(g).then(oa(a,function(a){return{qa:Math.max(a[0],a[1]),ga:new ArrayBuffer(0),Da:0,u:[],za:null,Kb:e,Va:f}})),g=g.then(a.f.bind(a,c));
  373. return g=g.then(a.g.bind(a,b,d))}function vd(a){var b=new ia,c=a.openCursor(null,"prev");
  374. return c.onsuccess=function(a){a.target.result?b.resolve(a.target.result.key+1):b.resolve(0)},c.onerror=function(){b.reject(c.error)},b}function wd(a,b){var c=new Uint8Array(a.byteLength+b.byteLength);
  375. return c.set(new Uint8Array(a),0),c.set(new Uint8Array(b),a.byteLength),c.buffer}function xd(a,b){var c=new ia,d=Da(a)["delete"](b);
  376. d.onerror=function(){c.reject(d.error)};
  377. var e=Ca(a);
  378. return e.index("stream").openKeyCursor(IDBKeyRange.only(b)).onsuccess=function(a){(a=a.target.result)&&(e["delete"](a.primaryKey),a["continue"]())},e.transaction.oncomplete=function(){c.resolve()},c}function yd(a,b,c,d,e,f){this.b=new gc(null,[new hb(a)]),this.a=new ac,this.a.body=b,this.a.method=c,this.a.a=3,this.a.i=d,this.a.c=1e3*(null!=f?f:0),a=e||{};
  379. for(var g in a)this.a.b[g]=a[g]}function zd(a){return ic(a.b,a.a).then(function(a){return Promise.resolve(new Uint8Array(a))})}function Ad(a,b,c){fa.call(this,a),this.g=b,this.b=c,this.a=this.h=null,this.l=new ba,this.j={},this.f=[],this.o=0,this.c=new ia,this.i=null,this.w=0}function Bd(b,c){return null==b.i&&(b.i=a.setTimeout(function(){var a=Error("Timeout waiting for sessions.");
  380. a.type="storage",this.c.reject(a)}.bind(b),c)),b.c}function Cd(a){return Promise.all(a.f.map(function(a){return a.remove()}))}function Dd(a,b,c){for(var d in b)c=c["catch"](function(a,b){return navigator.requestMediaKeySystemAccess(a,[b])}.bind(null,d,b[d]));
  381. return a.b.ea()&&(c=c["catch"](function(){throw Error("Either none of the requested key systems are supported or none of the requested key systems support persistent state.")})),c}function Ed(){var a=Error("EmeManager destroyed");
  382. return a.type="destroy",Promise.reject(a)}function Fd(a){for(var b=a.b.va(),c=0;
  383. c<b.length;
  384. ++c){var d=Gd(a),e=d.load(b[c]);
  385. a.f.push(d),e.then(oa(a,function(){this.o++,this.o>=this.f.length&&this.c.resolve()}))["catch"](oa(a,function(a){a=R(a),this.dispatchEvent(a)}))}}function Gd(a){var b=null;
  386. if(a.b.ea())try{b=a.h.createSession("persistent-license")}catch(c){throw Error("Persistent licenses are not supported by this key system or platform.")}else b=a.h.createSession();
  387. return ca(a.l,b,"message",a.tb.bind(a)),ca(a.l,b,"keystatuseschange",a.lb.bind(a)),b}function Hd(a,b,c,d){d=Id(c,d),zd(new yd(d.url,d.body,d.method,c.j,d.headers,a.w)).then(oa(a,function(a){return c.l&&(a=c.l(a)),b.update(a)})).then(oa(a,function(){var a=Q({type:"sessionReady",detail:b});
  388. this.dispatchEvent(a),this.o++,this.o>=this.f.length&&this.c.resolve()}))["catch"](oa(a,function(a){a.Ob=b,a=R(a),this.dispatchEvent(a)}))}function Id(a,b){var c={url:a.h,body:b.slice(0),method:"POST",headers:{}};
  389. if(!a.o)return c;
  390. if(a.o(c),c.url=W(c,"url"),null==c.url)throw Error("'url' cannot be null.");
  391. if(!(c.body instanceof ArrayBuffer||"string"==typeof c.body||null==c.body))throw new TypeError("'body' must be an ArrayBuffer, a string, or null.");
  392. if(c.method=W(c,"method"),"GET"!=c.method&&"POST"!=c.method)throw Error("'method' must be either 'GET' or 'POST'.");
  393. if(c.headers=Y(c,"headers",Object),null==c.headers)throw Error("'headers' cannot be null.");
  394. return c}function Jd(a){fa.call(this,null),this.a=a,this.b=null,this.f=new ba,this.j=this.l=null,this.H=0,this.B=null,this.i=!1,this.g=new nd,this.c={enableAdaptation:!0,streamBufferSize:15,licenseRequestTimeout:0,mpdRequestTimeout:0,segmentRequestTimeout:0,preferredLanguage:"en",restrictions:new j},this.o=1,this.F=null}function Kd(b){return"text/vtt"==b||'application/mp4;
  395. codecs="wvtt"'==b?!!a.VTTCue:MediaSource.isTypeSupported(b)}function Ld(){var a=Error("Player destroyed");
  396. return a.type="destroy",Promise.reject(a)}function Md(b){b.j&&(a.clearTimeout(b.j),b.j=null)}function Nd(b){Od(b),b.B=a.setTimeout(b.Y.bind(b),100)}function Od(b){b.B&&(a.clearTimeout(b.B),b.B=null)}function Pd(a){g("buffering");
  397. var b=a.g;
  398. b.bufferingTime+=h("buffering")/1e3,a.i=!1,a.dispatchEvent(Q({type:"bufferingEnd"}))}function Qd(a){for(var b=0;
  399. b<a.length;
  400. ++b)for(var c=a[b],d=0;
  401. d<c.a.length;
  402. ++d){for(var e=c.a[d],f=e,g=0;
  403. g<f.m.length;
  404. ++g)Kd(Lc(f.m[g]))||(f.m.splice(g,1),--g);
  405. 0==e.m.length&&(c.a.splice(d,1),--d)}}function Rd(a){for(var b=0;
  406. b<a.length;
  407. ++b)for(var c=a[b],d=0;
  408. d<c.a.length;
  409. ++d)c.a[d].m.sort(Sd)}function Sd(a,b){var c=a.bandwidth||Number.MAX_VALUE,d=b.bandwidth||Number.MAX_VALUE;
  410. return d>c?-1:c>d?1:0}function Td(a){this.a=a}function Ud(a,b){var c=Vd(b),d=Vd(a.a);
  411. return Promise.all([c,d]).then(oa(a,function(a){var c=a[0];
  412. a=a[1];
  413. var d=this.a.a;
  414. return Qd(d),Rd(d),b.f=this.a.f,b.g=this.a.g?this.a.g.clone():null,b.c=this.a.c,d=[],Wd(b,this.a,c,a,d),c=b.a,Qd(c),Rd(c),Promise.resolve(d)}))}function Vd(a){function b(a,b){return a.concat(b)}var c=a.a.map(function(a){return a.a}).reduce(b,[]).map(function(a){return a.m}).reduce(b,[]);
  415. return a=c.map(function(a){return a.G.create()}),Promise.all(a).then(function(a){for(var b={},d=0;
  416. d<c.length;
  417. ++d)b[c[d].A]=a[d];
  418. return Promise.resolve(b)})}function Wd(a,b,c,d,e){var f=new Z;
  419. a.a.forEach(function(a,b){f.push(a.id||""+b,a)});
  420. var g=new Z;
  421. for(b.a.forEach(function(a,b){g.push(a.id||""+b,a)}),a=aa(f),b=0;
  422. b<a.length;
  423. ++b){var h=a[b],i=f.get(h);
  424. 1<i.length||(h=g.get(h))&&0!=h.length&&1==h.length&&(Xd(i[0],h[0],c,d,e),i[0].b=h[0].b)}}function Xd(a,b,c,d,e){var f=new Z;
  425. a.a.forEach(function(a,b){f.push(a.id||""+b,a)});
  426. var g=new Z;
  427. for(b.a.forEach(function(a,b){g.push(a.id||""+b,a)}),a=aa(f),b=0;
  428. b<a.length;
  429. ++b){var h=a[b],i=f.get(h);
  430. 1<i.length||(h=g.get(h))&&0!=h.length&&1==h.length&&Yd(i[0],h[0],c,d,e)}}function Yd(a,b,c,d,e){var f=new Z;
  431. a.m.forEach(function(a,b){f.push(a.id||""+b,a)});
  432. var g=new Z;
  433. b.m.forEach(function(a,b){g.push(a.id||""+b,a)}),b={};
  434. for(var h=aa(f),i=0;
  435. i<h.length;
  436. ++i){var j=h[i];
  437. b[j]=j;
  438. var k=f.get(j);
  439. 1<k.length||((j=g.get(j))&&0!=j.length?1==j.length&&(Zd(k[0],j[0],c,d),k[0].C=j[0].C,j[0].C=null,k[0].c=j[0].c):(e.push(k[0]),a.m.splice(a.m.indexOf(k[0]),1)))}for(h=aa(g),i=0;
  440. i<h.length;
  441. ++i)j=h[i],b[j]||(b[j]=j,j=g.get(j),a.m.push(j[0]))}function Zd(a,b,c,d){a=c[a.A],b=d[b.A],a.length(),a.Ca(b)&&a.length()}function $d(){this.a=this.b=null,this.f=new ba,this.c=Number.POSITIVE_INFINITY,this.i=!0,this.g=!1}function _d(a){var b=a.a.ja();
  442. if(0==b.length)return null;
  443. b.sort(p);
  444. var c;
  445. a:{c=a.a.pa();
  446. for(var d=0;
  447. d<c.length;
  448. ++d)if(c[d].active){c=c[d];
  449. break a}c=null}c=c?c.bandwidth:0,a=a.b.getBandwidth();
  450. for(var d=b[0],e=0;
  451. e<b.length;
  452. ++e){var f=b[e],g=e+1<b.length?b[e+1]:{bandwidth:Number.POSITIVE_INFINITY};
  453. if(f.bandwidth&&(g=(g.bandwidth+c)/.85,a>=(f.bandwidth+c)/.95&&g>=a&&(d=f,d.active)))break}return d}function ae(a,b,c){fa.call(this,null),this.f=a,this.c=b,this.b=Ta(c),this.a=null}function be(a,b,c){fa.call(this,null),this.a=a,this.X=b,this.i=new ba,this.g=new MediaSource,this.f=null,this.ba=0,this.b=new Z,this.H=c,this.H.initialize(b,this),this.I=!1,this.F="en",this.da=!1,this.S=null,this.w=new ia,this.h=new j,this.B=null,this.ua=1,this.c={},this.ca=new ia,this.V=0,this.ta=!1,this.o={},this.Y=this.W=this.Z=null,this.D={}}function ce(a,b){var c=b.a.split("/")[0],d=a.c[c];
  454. if(d&&d.oa()==b){var e=a.b.get(b.a.split("/")[0]),f=e.map(function(a){return a.m}).reduce(function(a,b){return a.concat(b)},[]).filter(function(a){return a.L&&a.J});
  455. if(0==f.length)return void e.push(b);
  456. a.o[c].Ia==b&&delete a.o[c],d.ra(f[0],!0),b.destroy()}b.destroy()}function de(a){if(a.h){for(var b=!1,c=0;
  457. c<a.a.a.length;
  458. ++c)for(var d=a.a.a[c],e=0;
  459. e<d.a.length;
  460. ++e){var f=d.a[e];
  461. if("video"==f.contentType)for(var g=0;
  462. g<f.m.length;
  463. ++g){var h=f.m[g],i=h.J;
  464. h.J=!0,a.h.maxWidth&&h.width>a.h.maxWidth&&(h.J=!1),a.h.maxHeight&&h.height>a.h.maxHeight&&(h.J=!1),a.h.maxBandwidth&&h.bandwidth>a.h.maxBandwidth&&(h.J=!1),a.h.minBandwidth&&h.bandwidth<a.h.minBandwidth&&(h.J=!1),i!=h.J&&(b=!0)}}0!=$(a.b).length&&b&&(ee(a),0<a.ja().length||(b=Error("The application has restricted all video tracks!"),b.type="app",b=R(b),a.dispatchEvent(b)))}}function ee(a){var b=Q({type:"trackschanged",bubbles:!0});
  465. a.dispatchEvent(b)}function fe(a,b,c,d,e){if(!a.b.a.hasOwnProperty(b)||!a.c[b])return!1;
  466. for(var f=a.b.get(b),g=0;
  467. g<f.length;
  468. ++g)for(var h=f[g],i=0;
  469. i<h.m.length;
  470. ++i){var j=h.m[i];
  471. if(j.A==c)return j.L&&j.J?"text"==b||a.ta?(od(a.S,j),a.c[b].ra(j,d,e),!0):(c=a.o[b],a.o[b]={Ia:j,La:null!=c&&c.La||d,Ma:null!=c&&c.Ma||e},!0):!1}return!1}function ge(a,b){for(var c=0;
  472. 2>=c;
  473. ++c)for(var d=0;
  474. d<b.length;
  475. ++d){var e=b[d];
  476. if(S(c,a.F,e.lang))return b.splice(d,1),void b.splice(0,0,e)}for(d=0;
  477. d<b.length;
  478. ++d)if(e=b[d],e.b){b.splice(d,1),b.splice(0,0,e);
  479. break}}function he(a){for(var b=[],c=["audio","video","text"],d=0;
  480. d<c.length;
  481. ++d){var e=c[d];
  482. a.b.a.hasOwnProperty(e)&&b.push(a.b.get(e)[0])}for(var f=ie(a,b),d=0;
  483. d<c.length;
  484. ++d)if(e=c[d],a.b.a.hasOwnProperty(e)&&!f[e])return a=Error("Unable to select an initial "+e+" stream: all "+e+" streams have been restricted (by the application or by the key system)."),a.type="stream",Promise.reject(a);
  485. return b=U(f).map(function(a){return a.G.create()}),Promise.all(b).then(oa(a,function(a){return a.every(function(a){return a.length()})&&(a=re(this,a))?je(this,f)?(this.H.start(),le(this,f,a),Promise.resolve()):(a=Error("Failed to create Stream objects."),a.type="stream",Promise.reject(a)):(a=Error("Some streams are not available."),a.type="stream",Promise.reject(a))}))["catch"](oa(a,function(a){return"aborted"!=a.type?(Object.keys(this.c),this.a.b?(se(this,0),Promise.resolve()):Promise.reject(a)):void 0}))}function ie(a,b){for(var c={},d=0;
  486. d<b.length;
  487. ++d){var e=b[d],f=null;
  488. if("video"==e.contentType){var g=a.H.getInitialVideoTrackId();
  489. if(null==g)continue;
  490. if(f=e.m.filter(function(a){return a.A==g}),0==f.length)continue;
  491. f=f[0]}else if("audio"==e.contentType){if(f=e.m.filter(function(a){return a.L&&a.J}),0==f.length)continue;
  492. f=e.m[Math.floor(f.length/2)]}else 0<e.m.length&&(f=e.m[0]);
  493. c[e.contentType]=f}return c}function je(a,b){var c,d={};
  494. for(c in b){var e=b[c],e="text"==c?new $c(a,a.f):ke(a,e);
  495. if(!e)return U(d).forEach(function(a){a.destroy()}),!1;
  496. d[c]=e}return a.c=d,!0}function ke(a,b){var c=new Rc(a,a.f,a.g,Lc(b),a.X);
  497. return c.H(a.D),c}function le(a,b,c){a.ua=a.f.playbackRate,a.f.playbackRate=0,ne(a,c);
  498. var d;
  499. d=a.a.b?c.end:a.Y&&a.Y<=c.end&&a.Y>=c.start?a.Y:c.start,ca(a.i,a.f,"seeking",a.sb.bind(a)),a.f.currentTime!=d&&(a.f.currentTime=d,a.B=d),oe(a,c.start,c.end),c=[];
  500. for(var e in a.c){d=a.c[e],c.push(d.cb(a.ca)),ca(a.i,d,"ended",a.ub.bind(a));
  501. var f=b[e];
  502. od(a.S,f),d.ra(f,!1)}Promise.all(c).then(a.jb.bind(a))["catch"](oa(a,function(a){"destroy"!=a.type&&(a=R(a),this.dispatchEvent(a))})),a.Fa(a.da)}function me(a,b,c){(b=re(a,b))&&(ne(a,b),oe(a,b.start,b.end)),0!=c?(c=a.f.currentTime+c,a.f.currentTime=c,a.B=c):c=a.f.currentTime,a.a.b&&b&&(a.V=b.end-c,a.V=Math.max(a.V,0)),a.f.playbackRate=a.ua,a.a.b&&null!=a.a.f&&se(a,a.V),te(a),a.ca.resolve()}function ne(a,b){if(a.a.b)isNaN(a.g.duration)&&(a.g.duration=b.end+2592e3);
  503. else if(isNaN(a.g.duration)||b.end>a.g.duration){a.g.duration=b.end;
  504. for(var c=0;
  505. c<a.g.sourceBuffers.length;
  506. ++c)a.g.sourceBuffers[c].appendWindowEnd=b.end}}function oe(a,b,c){b=Q({type:"seekrangechanged",bubbles:!0,start:b,end:c}),a.dispatchEvent(b)}function pe(a,b,c,d){return b>=c-.01?!1:(a.f.currentTime=Math.min(c+(a.a.b?a.a.c:0),d),!0)}function qe(a){return U(a.c).map(function(a){return a.Qa()}).filter(function(a){return null!=a})}function re(a,b){for(var c=0,d=Number.POSITIVE_INFINITY,e=0;
  507. e<b.length;
  508. ++e){var f=b[e].Ba(),c=Math.max(c,f.start);
  509. null!=f.end&&(d=Math.min(d,f.end))}if(d==Number.POSITIVE_INFINITY){if(d=a.a.a[0],!d.b)return null;
  510. d=(d.start||0)+d.b}return a.a.b&&(d=Math.max(d-(a.a.c+a.V),c)),c>d?null:{start:c,end:d}}function se(b,c){if(null!=b.a.f){var d=Math.max(b.a.f,3),d=Math.max(d-c,0);
  511. b.Z=a.setTimeout(b.wb.bind(b),1e3*d)}}function te(b){b.a.b&&(b.W=a.setTimeout(b.xb.bind(b),1e3))}function ue(a){for(var b in a.c)a.c[b].H(a.D)}function ve(a,b,c,d){c||(c=new ha),d||(d=new $d),be.call(this,null,c,d),this.ka=a,this.M=b,this.l=[],this.O=[],this.T=[],this.j=null}function we(a,b,c){b||(b=new ha),c||(c=new $d),be.call(this,null,b,c),this.T=a,this.M=[],this.timeoutMs=3e4,this.l={},this.j=this.O=null}function xe(a,b,c,d){var e=new rd(a.X,a);
  512. return null!=a.l.segmentRequestTimeout&&(e.b=Number(a.l.segmentRequestTimeout)),za(e).then(oa(a,function(){return sd(e,b,this.M,d,c)})).then(function(a){return Aa(e),Promise.resolve(a)})["catch"](function(a){return Aa(e),Promise.reject(a)})}function ye(a){var b=new rd(null,null);
  513. return za(b).then(oa(a,function(){return td(b,this.T)})).then(function(){return Aa(b),Promise.resolve()})["catch"](function(a){return Aa(b),Promise.reject(a)})}function ze(b){var c=document.createElement("video");
  514. c.src=a.URL.createObjectURL(b.g);
  515. var d=new Ad(null,c,b);
  516. return null!=b.l.licenseRequestTimeout&&(d.w=Number(b.l.licenseRequestTimeout)),b.U().then(function(){return d.initialize()}).then(oa(b,function(){return Bd(d,this.timeoutMs)})).then(function(){return Cd(d)}).then(oa(b,function(){return d.destroy(),this.destroy(),Promise.resolve()}))["catch"](oa(b,function(a){return d.destroy(),this.destroy(),Promise.reject(a)}))}var Ae,Be=this;
  517. e("error"),e("warn"),e("info"),e("log"),e("debug");
  518. var Ce=a.performance&&a.performance.now?a.performance.now.bind(a.performance):Date.now,De={};
  519. b("shaka.player.AudioTrack.compare",function(a,b){return a.lang<b.lang?-1:a.lang>b.lang?1:a.bandwidth<b.bandwidth?-1:a.bandwidth>b.bandwidth?1:0}),j.prototype.clone=function(){var a=new j;
  520. return a.maxHeight=this.maxHeight,a.maxWidth=this.maxWidth,a.maxBandwidth=this.maxBandwidth,a.minBandwidth=this.minBandwidth,a},b("shaka.player.TextStyle",k),k.prototype.a=function(){var b=a.localStorage.getItem("ShakaPlayerTextStyle");
  521. if(b){var c;
  522. try{c=JSON.parse(b)}catch(d){return}if(c&&"object"==typeof c){var e,b=c;
  523. for(e in b)e in this&&(this[e]=b[e])}}},k.prototype.load=k.prototype.a,k.prototype.b=function(){a.localStorage.setItem("ShakaPlayerTextStyle",JSON.stringify(this))},k.prototype.store=k.prototype.b;
  524. var Ee=[255,255,255],Fe=[0,0,0];
  525. k.StandardColors={WHITE:Ee,BLACK:Fe,RED:[255,0,0],GREEN:[0,255,0],BLUE:[0,0,255],YELLOW:[255,255,0],MAGENTA:[255,0,255],CYAN:[0,255,255]};
  526. var Ge=1;
  527. k.StandardOpacities={OPAQUE:Ge,SEMI_HIGH:.75,SEMI_LOW:.25,TRANSPARENT:0};
  528. var He=[];
  529. k.EdgeStyles={NONE:He,RAISED:[[34,34,34,1,1,0],[34,34,34,2,2,0],[34,34,34,3,3,0]],DEPRESSED:[[204,204,204,1,1,0],[204,204,204,0,1,0],[34,34,34,-1,-1,0],[34,34,34,0,-1,0]],UNIFORM:[[34,34,34,0,0,4],[34,34,34,0,0,4],[34,34,34,0,0,4],[34,34,34,0,0,4]],DROP:[[34,34,34,2,2,3],[34,34,34,2,2,4],[34,34,34,2,2,5]]},b("shaka.player.TextTrack.compare",function(a,b){return a.lang<b.lang?-1:a.lang>b.lang?1:0}),b("shaka.player.VideoTrack.compare",p),b("shaka.polyfill.CustomEvent.install",q),b("shaka.polyfill.Fullscreen.install",s),w.prototype.createSession=function(){},w.prototype.setServerCertificate=function(){},x.prototype.getConfiguration=function(){},x.prototype.createMediaKeys=function(){},b("shaka.polyfill.VideoPlaybackQuality.install",y);
  530. var Ie,Je=0,Ke=1,Le={"output-restricted":"The required output protection is not available.","output-not-allowed":"The required output protection is not available.",expired:"The decryption key has expired.","internal-error":"The key system has encountered an unspecified error."};
  531. O.prototype.sample=function(a,b){var c=Math.pow(this.c,a);
  532. this.b=b*(1-c)+c*this.b,this.a+=a};
  533. var Me=1,Ne=2,Oe={aar:"aa",abk:"ab",afr:"af",aka:"ak",alb:"sq",amh:"am",ara:"ar",arg:"an",arm:"hy",asm:"as",ava:"av",ave:"ae",aym:"ay",aze:"az",bak:"ba",bam:"bm",baq:"eu",bel:"be",ben:"bn",bih:"bh",bis:"bi",bod:"bo",bos:"bs",bre:"br",bul:"bg",bur:"my",cat:"ca",ces:"cs",cha:"ch",che:"ce",chi:"zh",chu:"cu",chv:"cv",cor:"kw",cos:"co",cre:"cr",cym:"cy",cze:"cs",dan:"da",deu:"de",div:"dv",dut:"nl",dzo:"dz",ell:"el",eng:"en",epo:"eo",est:"et",eus:"eu",ewe:"ee",fao:"fo",fas:"fa",fij:"fj",fin:"fi",fra:"fr",fre:"fr",fry:"fy",ful:"ff",geo:"ka",ger:"de",gla:"gd",gle:"ga",glg:"gl",glv:"gv",gre:"el",grn:"gn",guj:"gu",hat:"ht",hau:"ha",heb:"he",her:"hz",hin:"hi",hmo:"ho",hrv:"hr",hun:"hu",hye:"hy",ibo:"ig",ice:"is",ido:"io",iii:"ii",iku:"iu",ile:"ie",ina:"ia",ind:"id",ipk:"ik",isl:"is",ita:"it",jav:"jv",jpn:"ja",kal:"kl",kan:"kn",kas:"ks",kat:"ka",kau:"kr",kaz:"kk",khm:"km",kik:"ki",kin:"rw",kir:"ky",kom:"kv",kon:"kg",kor:"ko",kua:"kj",kur:"ku",lao:"lo",lat:"la",lav:"lv",lim:"li",lin:"ln",lit:"lt",ltz:"lb",lub:"lu",lug:"lg",mac:"mk",mah:"mh",mal:"ml",mao:"mi",mar:"mr",may:"ms",mkd:"mk",mlg:"mg",mlt:"mt",mon:"mn",mri:"mi",msa:"ms",mya:"my",nau:"na",nav:"nv",nbl:"nr",nde:"nd",ndo:"ng",nep:"ne",nld:"nl",nno:"nn",nob:"nb",nor:"no",nya:"ny",oci:"oc",oji:"oj",ori:"or",orm:"om",oss:"os",pan:"pa",per:"fa",pli:"pi",pol:"pl",por:"pt",pus:"ps",que:"qu",roh:"rm",ron:"ro",rum:"ro",run:"rn",rus:"ru",sag:"sg",san:"sa",sin:"si",slk:"sk",slo:"sk",slv:"sl",sme:"se",smo:"sm",sna:"sn",snd:"sd",som:"so",sot:"st",spa:"es",sqi:"sq",srd:"sc",srp:"sr",ssw:"ss",sun:"su",swa:"sw",swe:"sv",tah:"ty",tam:"ta",tat:"tt",tel:"te",tgk:"tg",tgl:"tl",tha:"th",tib:"bo",tir:"ti",ton:"to",tsn:"tn",tso:"ts",tuk:"tk",tur:"tr",twi:"tw",uig:"ug",ukr:"uk",urd:"ur",uzb:"uz",ven:"ve",vie:"vi",vol:"vo",wel:"cy",wln:"wa",wol:"wo",xho:"xh",yid:"yi",yor:"yo",zha:"za",zho:"zh",zul:"zu"};
  534. Z.prototype.push=function(a,b){this.a.hasOwnProperty(a)?this.a[a].push(b):this.a[a]=[b]},Z.prototype.get=function(a){return(a=this.a[a])?a.slice():null},ba.prototype.destroy=function(){da(this),this.a=null},ba.prototype.sa=function(a,b){for(var c=this.a.get(b)||[],d=0;
  535. d<c.length;
  536. ++d){var e=c[d];
  537. e.target==a&&(e.sa(),_(this.a,b,e))}},ea.prototype.sa=function(){this.target&&(this.target.removeEventListener(this.type,this.a,!1),this.a=this.target=null)},b("shaka.util.FakeEventTarget",fa),fa.prototype.addEventListener=function(a,b,c){c||this.xa.push(a,b)},fa.prototype.removeEventListener=function(a,b,c){c||_(this.xa,a,b)},fa.prototype.dispatchEvent=function(a){return delete a.srcElement,delete a.target,delete a.currentTarget,Object.defineProperties(a,{srcElement:{value:null,writable:!0},target:{value:this,writable:!0},currentTarget:{value:null,writable:!0}}),ga(this,a)},c(ha,fa),b("shaka.util.EWMABandwidthEstimator",ha),ha.prototype.sample=function(a,b){if(!(65536>b)){a=Math.max(a,50);
  538. var c=8e3*b/a,d=a/1e3;
  539. this.a.sample(d,c),this.c.sample(d,c),this.dispatchEvent(Q({type:"bandwidth"})),this.b=Date.now()}},ha.prototype.getBandwidth=function(){return.5>this.a.a?5e5:Math.min(P(this.a),P(this.c))},ha.prototype.getDataAge=function(){return(Date.now()-this.b)/1e3},ha.prototype.supportsCaching=function(){return!1},ia.prototype.destroy=function(){this["catch"](function(){});
  540. var a=Error("Destroyed!");
  541. a.type="destroy",this.reject(a)},ka.prototype.start=function(){if(this.f)throw Error("Task already started!");
  542. this.f=!0,this.b.unshift(function(){}),ma(this,void 0)},ka.prototype.end=function(){this.b.splice(1)};
  543. var Pe=1/60;
  544. pa.prototype.destroy=function(){ua(this)["catch"](function(){}),this.f&&this.f.destroy(),this.b=this.a=this.f=null,this.h.destroy(),this.j=this.c=this.h=null},pa.prototype.g=function(){"open"==this.j.readyState&&this.c.abort()},pa.prototype.w=function(){this.f.resolve(),this.f=null},c(ya,fa),c(Ha,ya),b("shaka.util.Uint8ArrayUtils.toString",Ma),b("shaka.util.Uint8ArrayUtils.fromString",Na),b("shaka.util.Uint8ArrayUtils.toBase64",Oa),b("shaka.util.Uint8ArrayUtils.fromBase64",Pa),b("shaka.util.Uint8ArrayUtils.fromHex",function(b){for(var c=new Uint8Array(b.length/2),d=0;
  545. d<b.length;
  546. d+=2)c[d/2]=a.parseInt(b.substr(d,2),16);
  547. return c}),b("shaka.util.Uint8ArrayUtils.toHex",Qa),b("shaka.player.DrmSchemeInfo",Va);
  548. var Qe=1;
  549. Va.DistinctiveIdentifier={OPTIONAL:0,REQUIRED:Qe};
  550. var Re=1;
  551. Va.PersistentState={OPTIONAL:0,REQUIRED:Re},Va.createUnencrypted=function(){return new Va("","",!1,null)},Ya.prototype.createMediaKeys=function(){var a=new Za(this.a);
  552. return Promise.resolve(a)},Ya.prototype.getConfiguration=function(){return this.b},Ae=Za.prototype,Ae.createSession=function(a){var b=a||"temporary";
  553. if("temporary"!=b&&"persistent-license"!=b)throw new TypeError("Session type "+a+" is unsupported on this platform.");
  554. return a=this.b||document.createElement("video"),a.src||(a.src="about:blank"),b=new ab(a,this.g,b),this.c.push(b),b},Ae.setServerCertificate=function(){return Promise.reject(Error("setServerCertificate not supported on this platform."))},Ae.Cb=function(a){a=Q({type:"encrypted",initDataType:"webm",initData:a.initData}),this.b.dispatchEvent(a)},Ae.Bb=function(a){var b=_a(this,a.sessionId);
  555. b&&(a=Q({type:"message",messageType:void 0==b.keyStatuses.a?"licenserequest":"licenserenewal",message:a.message}),b.b&&(b.b.resolve(),b.b=null),b.dispatchEvent(a))},Ae.zb=function(a){(a=_a(this,a.sessionId))&&(cb(a,"usable"),a.a&&a.a.resolve(),a.a=null)},Ae.Ab=function(a){var b=_a(this,a.sessionId);
  556. if(b){var c=Error("EME v0.1b key error");
  557. c.errorCode=a.errorCode,c.errorCode.systemCode=a.systemCode,!a.sessionId&&b.b?(c.method="generateRequest",45==a.systemCode&&(c.message="Unsupported session type."),b.b.reject(c),b.b=null):a.sessionId&&b.a?(c.method="update",b.a.reject(c),b.a=null):(c=a.systemCode,a.errorCode.code==MediaKeyError.MEDIA_KEYERR_OUTPUT?cb(b,"output-restricted"):1==c?cb(b,"expired"):cb(b,"internal-error"))}},c(ab,fa),Ae=ab.prototype,Ae.Ja=function(a,b){if(this.a)this.a.then(this.Ja.bind(this,a,b))["catch"](this.Ja.bind(this,a,b));
  558. else{this.a=a;
  559. var c,d;
  560. "webkit-org.w3.clearkey"==this.c?(c=Ma(new Uint8Array(b)),d=JSON.parse(c),"oct"!=d.keys[0].kty&&(this.a.reject(Error("Response is not a valid JSON Web Key Set.")),this.a=null),c=Pa(d.keys[0].k),d=Pa(d.keys[0].kid)):(c=new Uint8Array(b),d=null);
  561. try{this.f.webkitAddKey(this.c,c,d,this.sessionId)}catch(e){this.a.reject(e),this.a=null}}},Ae.generateRequest=function(a,b){return bb(this,b,null)},Ae.load=function(a){return"persistent-license"==this.g?bb(this,null,a):Promise.reject(Error("Not a persistent session."))},Ae.update=function(a){var b=new ia;
  562. return this.Ja(b,a),b},Ae.close=function(){if("persistent-license"!=this.g){if(!this.sessionId)return this.closed.reject(Error("The session is not callable.")),this.closed;
  563. this.f.webkitCancelKeyRequest(this.c,this.sessionId)}return this.closed.resolve(),this.closed},Ae.remove=function(){return"persistent-license"!=this.g?Promise.reject(Error("Not a persistent session.")):this.close()},db.prototype.next=function(){return this.a>=this.b.length?{value:void 0,done:!0}:{value:this.b[this.a++],done:!1}};
  564. var Se;
  565. Ae=eb.prototype,Ae.entries=function(){var a=Se,b=[];
  566. return this.a&&b.push([a,this.a]),new db(b)},Ae.forEach=function(a){this.a&&a(this.a)},Ae.get=function(a){return this.has(a)?this.a:void 0},Ae.has=function(a){var b=Se;
  567. return!(!this.a||!Ra(new Uint8Array(a),b))},Ae.keys=function(){var a=Se,b=[];
  568. return this.a&&b.push(a),new db(b)},Ae.values=function(){var a=[];
  569. return this.a&&a.push(this.a),new db(a)},b("shaka.polyfill.MediaKeys.install",fb),b("shaka.polyfill.installAll",function(){q(),s(),fb(),y()});
  570. var Te=/^(?:([^:/?#.]+):)?(?:\/\/(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\?([^#]*))?(?:#(.*))?$/;
  571. Ae=hb.prototype,Ae.R="",Ae.aa="",Ae.P="",Ae.fa=null,Ae.N="",Ae.$="",Ae.toString=function(){var a=[],b=this.R;
  572. if(b&&a.push(mb(b,Ue,!0),":"),b=this.P){a.push("//");
  573. var c=this.aa;
  574. c&&a.push(mb(c,Ue,!0),"@"),a.push(encodeURIComponent(b).replace(/%25([0-9a-fA-F]{2})/g,"%$1")),b=this.fa,null!=b&&a.push(":",String(b))}return(b=this.N)&&(this.P&&"/"!=b.charAt(0)&&a.push("/"),a.push(mb(b,"/"==b.charAt(0)?We:Ve,!0))),(b=this.a.toString())&&a.push("?",b),(b=this.$)&&a.push("#",mb(b,Ye)),a.join("")},Ae.resolve=function(a){var b=this.clone();
  575. "data"===b.R&&(b=new hb);
  576. var c=!!a.R;
  577. c?ib(b,a.R):c=!!a.aa,c?b.aa=a.aa:c=!!a.P,c?b.P=a.P:c=null!=a.fa;
  578. var d=a.N;
  579. if(c)jb(b,a.fa);
  580. else if(c=!!a.N){if("/"!=d.charAt(0))if(this.P&&!this.N)d="/"+d;
  581. else{var e=b.N.lastIndexOf("/");
  582. -1!=e&&(d=b.N.substr(0,e+1)+d)}if(".."==d||"."==d)d="";
  583. else if(-1!=d.indexOf("./")||-1!=d.indexOf("/.")){for(var e=0==d.lastIndexOf("/",0),d=d.split("/"),f=[],g=0;
  584. g<d.length;
  585. ){var h=d[g++];
  586. "."==h?e&&g==d.length&&f.push(""):".."==h?((1<f.length||1==f.length&&""!=f[0])&&f.pop(),e&&g==d.length&&f.push("")):(f.push(h),e=!0)}d=f.join("/")}}return c?b.N=d:c=""!==a.a.toString(),c?kb(b,a.a.clone()):c=!!a.$,c&&(b.$=a.$),b},Ae.clone=function(){return new hb(this)};
  587. var Ue=/[#\/\?@]/g,Ve=/[\#\?:]/g,We=/[\#\?]/g,Xe=/[\#\?@]/g,Ye=/#/g;
  588. ob.prototype.a=null,ob.prototype.c=null,ob.prototype.toString=function(){if(this.b)return this.b;
  589. if(!this.a)return"";
  590. var a,b=[];
  591. for(a in this.a)for(var c=encodeURIComponent(a),d=this.a[a],e=0;
  592. e<d.length;
  593. e++){var f=c;
  594. ""!==d[e]&&(f+="="+encodeURIComponent(d[e])),b.push(f)}return this.b=b.join("&")},ob.prototype.clone=function(){var a=new ob;
  595. if(a.b=this.b,this.a){var b,c={};
  596. for(b in this.a)c[b]=this.a[b].concat();
  597. a.a=c,a.c=this.c}return a},Ab.prototype.clone=function(){var a=new Ab;
  598. return a.s=Rb(this.s),a.g=this.g,a.f=this.f,a.a=Sb(this.a),a.b=Sb(this.b),a.c=Sb(this.c),a},Bb.prototype.clone=function(){var a=new Bb;
  599. return a.url=Rb(this.url),a.a=Sb(this.a),a},Cb.prototype.clone=function(){var a=new Cb;
  600. return a.url=Rb(this.url),a.a=Sb(this.a),a},Db.prototype.clone=function(){var a=new Db;
  601. return a.s=Rb(this.s),a.f=this.f,a.g=this.g,a.b=this.b,a.i=this.i,a.h=Sb(this.h),a.a=Rb(this.a)||[],a.c=Sb(this.c),a},Eb.prototype.clone=function(){var a=new Eb;
  602. return a.b=Rb(this.b),a.a=Sb(this.a),a},Fb.prototype.clone=function(){var a=new Fb;
  603. return a.b=this.b,a.i=this.i,a.a=this.a,a.j=this.j,a.h=this.h,a.f=this.f,a.g=this.g,a.c=Sb(this.c),a},Gb.prototype.clone=function(){var a=new Gb;
  604. return a.a=Rb(this.a)||[],a},Hb.prototype.clone=function(){var a=new Hb;
  605. return a.b=this.b,
  606. a.a=this.a,a.c=this.c,a},Ib.prototype.clone=function(){return new Ib(this.na,this.end)},qb.TAG_NAME="MPD",rb.TAG_NAME="Period",sb.TAG_NAME="AdaptationSet",tb.TAG_NAME="Role",ub.TAG_NAME="ContentComponent",vb.TAG_NAME="Representation",wb.TAG_NAME="ContentProtection",xb.TAG_NAME="cenc:pssh",yb.TAG_NAME="BaseURL",zb.TAG_NAME="Location",Ab.TAG_NAME="SegmentBase",Bb.TAG_NAME="RepresentationIndex",Cb.TAG_NAME="Initialization",Db.TAG_NAME="SegmentList",Eb.TAG_NAME="SegmentURL",Fb.TAG_NAME="SegmentTemplate",Gb.TAG_NAME="SegmentTimeline",Hb.TAG_NAME="S",qb.prototype.parse=function(a,b){this.url=a.s,this.id=Tb(b,"id",$b),this.type=Tb(b,"type",$b)||"static",this.c=Tb(b,"mediaPresentationDuration",Vb),this.g=Tb(b,"minBufferTime",Vb,this.g);
  607. var c=b.getElementsByTagName("UTCTiming");
  608. c.length&&(c=Tb(c[0],"value",Ub,0))&&(Je=1e3*c-Date.now()),this.b=Tb(b,"availabilityStartTime",Ub,this.b),this.f=Tb(b,"timeShiftBufferDepth",Vb,this.f),this.h=Tb(b,"suggestedPresentationDelay",Vb,this.h);
  609. var c=a.s,d=Pb(this,b,yb);
  610. this.s=Kb(c,d),(d=Nb(this,b,zb))&&(this.i=Lb(c,d.url)),this.a=Pb(this,b,rb)},rb.prototype.parse=function(a,b){this.id=Tb(b,"id",$b),this.start=Tb(b,"start",Vb),this.a=Tb(b,"duration",Vb);
  611. var c=Pb(this,b,yb);
  612. this.s=Kb(a.s,c),this.c=Nb(this,b,Ab),this.f=Nb(this,b,Db),this.g=Nb(this,b,Fb),this.b=Pb(this,b,sb),Jb(this)},sb.prototype.parse=function(a,b){var c=Nb(this,b,ub)||{},d=Nb(this,b,tb);
  613. this.id=Tb(b,"id",$b),this.group=Tb(b,"group",Zb),this.lang=Tb(b,"lang",$b,c.lang),this.contentType=Tb(b,"contentType",$b,c.contentType),this.width=Tb(b,"width",Yb),this.height=Tb(b,"height",Yb),this.b=Tb(b,"mimeType",$b),this.i=Tb(b,"codecs",$b),this.c=d&&"main"==d.value,this.lang&&(this.lang=T(this.lang)),c=Pb(this,b,yb),this.s=Kb(a.s,c),this.j=Pb(this,b,wb),!this.contentType&&this.b&&(this.contentType=this.b.split("/")[0]),this.f=a.c?Mb(this,b,a.c):Nb(this,b,Ab),this.g=a.f?Mb(this,b,a.f):Nb(this,b,Db),this.h=a.g?Mb(this,b,a.g):Nb(this,b,Fb),this.a=Pb(this,b,vb),!this.b&&this.a.length&&(this.b=this.a[0].f,!this.contentType&&this.b&&(this.contentType=this.b.split("/")[0]))},tb.prototype.parse=function(a,b){this.value=Tb(b,"value",$b)},ub.prototype.parse=function(a,b){this.id=Tb(b,"id",$b),this.lang=Tb(b,"lang",$b),this.contentType=Tb(b,"contentType",$b),this.lang&&(this.lang=T(this.lang))},vb.prototype.parse=function(a,b){this.id=Tb(b,"id",$b),this.bandwidth=Tb(b,"bandwidth",Yb),this.width=Tb(b,"width",Yb,a.width),this.height=Tb(b,"height",Yb,a.height),this.f=Tb(b,"mimeType",$b,a.b),this.h=Tb(b,"codecs",$b,a.i),this.lang=a.lang;
  614. var c=Pb(this,b,yb);
  615. this.s=Kb(a.s,c),this.c=Pb(this,b,wb),this.g=a.f?Mb(this,b,a.f):Nb(this,b,Ab),this.b=a.g?Mb(this,b,a.g):Nb(this,b,Db),this.a=a.h?Mb(this,b,a.h):Nb(this,b,Fb),this.c=this.c.concat(a.j)},wb.prototype.parse=function(a,b){this.b=b,this.schemeIdUri=Tb(b,"schemeIdUri",$b),this.value=Tb(b,"value",$b);
  616. var c=Tb(b,"cenc:default_KID",$b);
  617. c&&(this.a=c.replace(/[-]/g,"")),this.pssh=Nb(this,b,xb),this.children=Array.prototype.slice.call(b.childNodes)},xb.prototype.parse=function(a,b){var c=Qb(b);
  618. if(c){this.psshBox=Pa(c);
  619. try{this.parsedPssh=new gb(this.psshBox)}catch(d){if(!(d instanceof RangeError))throw d}}},yb.prototype.parse=function(a,b){this.url=Qb(b)},zb.prototype.parse=function(a,b){this.url=Qb(b)},Ab.prototype.parse=function(a,b){this.s=a.s||this.s,this.g=Tb(b,"timescale",Yb,this.g),this.f=Tb(b,"presentationTimeOffset",Zb,this.f),this.a=Tb(b,"indexRange",Wb,this.a),this.b=Nb(this,b,Bb)||this.b,this.c=Nb(this,b,Cb)||this.c},Bb.prototype.parse=function(a,b){var c=Tb(b,"sourceURL",$b);
  620. this.url=Lb(a.s,c),this.a=Tb(b,"range",Wb,Sb(a.a))},Cb.prototype.parse=function(a,b){var c=Tb(b,"sourceURL",$b);
  621. this.url=Lb(a.s,c),this.a=Tb(b,"range",Wb)},Db.prototype.parse=function(a,b){this.s=a.s||this.s,this.f=Tb(b,"timescale",Yb,this.f),this.g=Tb(b,"presentationTimeOffset",Zb,this.g),this.b=Tb(b,"duration",Yb,this.b),this.i=Tb(b,"startNumber",Zb,this.i),this.h=Nb(this,b,Cb)||this.h;
  622. var c=Pb(this,b,Eb);
  623. this.a=c&&0<c.length?c:this.a,this.c=Nb(this,b,Gb)||this.c},Eb.prototype.parse=function(a,b){var c=Tb(b,"media",$b);
  624. this.b=Lb(a.s,c),this.a=Tb(b,"mediaRange",Wb)},Fb.prototype.parse=function(a,b){this.b=Tb(b,"timescale",Yb,this.b),this.i=Tb(b,"presentationTimeOffset",Zb,this.i),this.a=Tb(b,"duration",Yb,this.a),this.j=Tb(b,"startNumber",Zb,this.j),this.h=Tb(b,"media",$b,this.h),this.f=Tb(b,"index",$b,this.f),this.g=Tb(b,"initialization",$b,this.g),this.c=Nb(this,b,Gb)||this.c},Gb.prototype.parse=function(a,b){this.a=Pb(this,b,Hb)},Hb.prototype.parse=function(a,b){this.b=Tb(b,"t",Zb),this.a=Tb(b,"d",Zb),this.c=Tb(b,"r",Xb)},Ae=_b.prototype,Ae.bb=function(){if(this.a)return this.c;
  625. if(0==this.url.lastIndexOf("data:",0)){var b=this.url.split(":")[1].split(";
  626. ").pop().split(","),c=b.pop(),c="base64"==b.pop()?a.atob(c.replace(/-/g,"+").replace(/_/g,"/")):a.decodeURIComponent(c);
  627. return"arraybuffer"==this.b.f&&(c=Na(c).buffer),b=JSON.parse(JSON.stringify(new XMLHttpRequest)),b.response=c,b.responseText=c.toString(),c=this.c,c.resolve(b),bc(this),c}if(0==this.url.lastIndexOf("idb:",0))return dc(this);
  628. this.h++,this.i=Date.now(),this.g||(this.g=this.b.h),this.a=new XMLHttpRequest,b=this.url,(this.f&&!this.f.supportsCaching()||this.b.g)&&(b=new hb(b),pb(b.a,"_",Date.now()),b=b.toString()),this.a.open(this.b.method,b,!0),this.a.responseType=this.b.f,this.a.timeout=this.b.c,this.a.withCredentials=this.b.i,this.a.onload=this.mb.bind(this),this.b.g&&(this.a.onreadystatechange=this.qb.bind(this)),this.a.onerror=this.Ib.bind(this),this.a.ontimeout=this.vb.bind(this);
  629. for(c in this.b.b)this.a.setRequestHeader(c,this.b.b[c]);
  630. return this.a.send(this.b.body),this.c},Ae.mb=function(a){this.f&&this.f.sample(Date.now()-this.i,a.loaded),200<=this.a.status&&299>=this.a.status?(this.c.resolve(this.a),bc(this)):this.h<this.b.a?fc(this):(a=ec(this,"HTTP error.","net"),this.c.reject(a),bc(this))},Ae.qb=function(){if(this.a.readyState==XMLHttpRequest.HEADERS_RECEIVED){var a=Date.parse(this.a.getResponseHeader("Date"));
  631. a&&(Je=a-Date.now())}},Ae.Ib=function(){var a=ec(this,"Network failure.","net");
  632. this.c.reject(a),bc(this)},Ae.vb=function(){if(this.h<this.b.a)fc(this);
  633. else{var a=ec(this,"Request timed out.","net");
  634. this.c.reject(a),bc(this)}},gc.prototype.g=function(){if(this.b){this.a=null;
  635. var a=this.b;
  636. if(a.a&&a.a.readyState!=XMLHttpRequest.DONE){a.a.abort();
  637. var b=ec(a,"Request aborted.","aborted");
  638. a.c.reject(b),bc(a)}this.b=null}},gc.prototype.clone=function(){return new gc(this.i,this.c.map(function(a){return a.clone()}),this.f,this.h)},gc.prototype.toString=function(){return this.c[0].toString()},qc.prototype.destroy=function(){this.a&&(this.a.g(),this.a=null)},qc.prototype.create=function(){return this.a?ic(this.a):Promise.resolve(null)},vc.prototype.parse=function(a,b,c,d){var e=null;
  639. try{a:{var f=[],g=new C(a),h=F(g);
  640. if(1936286840!=F(g))e=null;
  641. else{1==h&&(h=G(g));
  642. var i=E(g);
  643. I(g,3),I(g,4);
  644. var j=F(g);
  645. if(0==j)e=null;
  646. else{var k,l;
  647. 0==i?(k=F(g),l=F(g)):(k=G(g),l=G(g)),I(g,2);
  648. var m=g.b.getUint16(g.a,g.c);
  649. for(g.a+=2,a=k,b=b+h+l,h=0;
  650. m>h;
  651. h++){var n=F(g);
  652. l=(2147483648&n)>>>31;
  653. var i=2147483647&n,o=F(g);
  654. if(F(g),1==l){e=null;
  655. break a}var p=new gc(d,c,b,b+i-1);
  656. f.push(new rc(a/j,(a+o)/j,p)),a+=o,b+=i}e=f}}}}catch(q){if(!(q instanceof RangeError))throw q}return e},wc.prototype.destroy=function(){this.u=null},Ae=wc.prototype,Ae.length=function(){return this.u.length},Ae.get=function(a){if(0>a||a>=this.u.length)throw new RangeError("SegmentIndex: The specified index is out of range.");
  657. return this.u[a]},Ae.ia=function(a){return a=tc(this.u,a),a>=0?this.u[a]:null},Ae.Ca=function(a){return zc(this,a),!0},Ae.ha=function(a){var b=a-this.g;
  658. return 0==b?0:(this.u=uc(this.u,b),this.g=a,b)},Ae.Ba=function(){return 0<this.length()?{start:xc(this).b,end:yc(this).a}:{start:0,end:0}},c(Ac,wc),Ac.prototype.destroy=function(){this.o=this.f=null,wc.prototype.destroy.call(this)},Ac.prototype.ia=function(a){return Dc(this,B()/1e3),wc.prototype.ia.call(this,a)},Ac.prototype.Ca=function(a){return zc(this,a),null==this.b&&Bc(this),!0},Ac.prototype.ha=function(a){return a=wc.prototype.ha.call(this,a),Math.min.apply(null,this.u.filter(function(a){return null!=a.a}).map(function(a){return a.a-a.b})),null!=this.b&&(this.v+=a,this.c+=a,this.b+=a),a},Ac.prototype.Ba=function(){return Cc(this,B()/1e3)},c(Ec,Ac),Ec.prototype.destroy=function(){this.w=this.l=null,Ac.prototype.destroy.call(this)},Ec.prototype.ia=function(a){var b=B()/1e3;
  659. return Fc(this,b),Dc(this,b),wc.prototype.ia.call(this,a)},Ec.prototype.Ca=function(a){return null==this.a&&a instanceof Ec&&null!=a.a?(this.a=a.a,this.i=a.i,this.h=a.h,zc(this,a),Fc(this,B()/1e3),Bc(this),!0):!1},Ec.prototype.ha=function(a){return a=Ac.prototype.ha.call(this,a),null!=this.a&&(this.a+=a,this.i+=a),a},Ec.prototype.Ba=function(){var a=B()/1e3;
  660. return Fc(this,a),Cc(this,a)},Gc.prototype.destroy=function(){this.g=this.c=this.b=this.f=null,this.a&&(this.a.destroy(),this.a=null)},Gc.prototype.create=function(){if(this.a)return Promise.resolve(this.a);
  661. if("dynamic"==this.f.type)try{this.a=new Ec(this.f,this.b,this.c,this.h,this.g)}catch(a){return Promise.reject(a)}else{var b;
  662. if(b=this.c.a,b=mc(this.g,this.c,1,Math.ceil(this.b.a/(b.a/b.b)))){if(0<b.length){var c=b[b.length-1];
  663. b[b.length-1]=sc(c,c.b,this.b.a)}b=new wc(b)}else b=null;
  664. if(this.a=b,!this.a)return b=Error("Failed to generate SegmentReferences"),b.type="stream",Promise.reject(b)}return Promise.resolve(this.a)},Hc.prototype.destroy=function(){this.f=this.g=this.b=this.c=null,this.a&&(this.a.destroy(),this.a=null)},Hc.prototype.create=function(){if(this.a)return Promise.resolve(this.a);
  665. var a=this.g.b,b=[];
  666. a.c&&(b=pc(a.c,a.f||1,this.b.a||0));
  667. var c=0;
  668. a.b&&a.i?c=a.b*a.i:0<b.length&&(c=b[0].start-(a.g||0));
  669. var d=a.a.length;
  670. 0<b.length&&b.length!=a.a.length&&(d=Math.min(b.length,a.a.length));
  671. for(var e=[],f=0;
  672. d>f;
  673. ++f){var g=a.a[f],h=c/a.f,i=null,j=null;
  674. a.b?(i=c+a.b,j=i/a.f):0<b.length?(i=b[f].end-(a.g||0),j=i/a.f):(j=h+this.b.a,i=j*a.f);
  675. var c=i,i=0,k=null;
  676. g.a&&(i=g.a.na,k=g.a.end),e.push(new rc(h,j,new gc(this.f,g.b,i,k)))}return"dynamic"==this.c.type?this.a=new Ac(e,this.c,this.b,this.h):this.a=new wc(e),Promise.resolve(this.a)},Ic.prototype.destroy=function(){this.g=this.f=this.c=this.b=null,this.a&&(this.a.destroy(),this.a=null)},Ic.prototype.create=function(){if(this.a)return Promise.resolve(this.a);
  677. for(var a=this.f.a,b=pc(a.c,a.b||1,this.c.a||0),c=[],d=0;
  678. d<b.length;
  679. ++d){var e=b[d].start,f=e/a.b,g=b[d].end/a.b,e=nc(this.g,this.f,d+a.j,e);
  680. if(!e)return a=Error("Failed to generate media URL."),a.type="dash",Promise.reject(a);
  681. var h=(a.i||0)/a.b;
  682. c.push(new rc(f-h,g-h,e))}return"dynamic"==this.b.type?this.a=new Ac(c,this.b,this.c,this.h):this.a=new wc(c),Promise.resolve(this.a)},Jc.prototype.destroy=function(){this.b=null,this.a&&(this.a.destroy(),this.a=null)},Jc.prototype.create=function(){if(this.a)return Promise.resolve(this.a);
  683. for(var a=[],b=0;
  684. b<this.b.length;
  685. ++b){var c=this.b[b];
  686. a.push(new rc(c.start_time,c.end_time,new gc(null,[new hb(c.url)],c.start_byte,null)))}return this.b=null,this.a=new wc(a),Promise.resolve(this.a)};
  687. var Ze=0;
  688. Kc.prototype.destroy=function(){this.G&&(this.G.destroy(),this.G=null),this.C&&(this.C.destroy(),this.C=null)};
  689. var $e=0;
  690. Mc.prototype.destroy=function(){for(var a=0;
  691. a<this.m.length;
  692. ++a)this.m[a].destroy();
  693. this.a=this.m=null},Oc.prototype.destroy=function(){for(var a=0;
  694. a<this.a.length;
  695. ++a)this.a[a].destroy();
  696. this.a=null},Pc.prototype.destroy=function(){for(var a=0;
  697. a<this.a.length;
  698. ++a)this.a[a].destroy();
  699. this.a=null},c(Rc,fa),Rc.prototype.H=function(a){null!=a.initialStreamBufferSize&&(this.B=Number(a.initialStreamBufferSize)),null!=a.streamBufferSize&&(this.K=Number(a.streamBufferSize)),null!=a.segmentRequestTimeout&&(this.a.l=Number(a.segmentRequestTimeout))},Rc.prototype.destroy=function(){Yc(this),this.h.destroy(),this.b=this.h=null,this.a.destroy(),this.v=this.c=this.a=null},Ae=Rc.prototype,Ae.oa=function(){return this.b},Ae.Qa=function(){return this.F},Ae.cb=function(a){return this.f||a.then(function(){this.f=!0,this.g||Xc(this,0)}.bind(this))["catch"](function(){}),this.h},Ae.Ra=function(){return this.j},Ae.ra=function(a,b,c){if(a!=this.b){var d=[a.G.create(),a.C.create()];
  700. Promise.all(d).then(oa(this,function(d){if(this.c){var e=this.b;
  701. this.b=a,this.F=d[0],this.w=d[1],this.I=!0,this.l||(e?b&&Sc(this,!0,c):Xc(this,0))}}))["catch"](oa(this,function(a){"aborted"!=a.type&&(this.f?(a=R(a),this.dispatchEvent(a)):this.h.reject(a))}))}},Ae.Wa=function(){return Sc(this,!1)},Ae.wa=function(){},Ae.Aa=function(){return!0},Ae.yb=function(){if(this.o&&!this.f)this.g=null;
  702. else{var a;
  703. if((a=this.f&&!this.j)&&(a=1<this.a.c.buffered.length),a)Sc(this,!0);
  704. else{this.g=null,a=this.b;
  705. var b=this.F,c=this.c.currentTime;
  706. qa(this.a,this.o?c:c+(this.i||0))>=(this.o?Math.max(this.B,this.K):this.B)?(Uc(this),Xc(this,1e3/(Math.abs(this.c.playbackRate)||1))):(b=Tc(this,c,b))?(b=ra(this.a,b,a.c,this.w),this.w=null,this.I&&(this.I=!1,Vc(this,a)),this.j=!1,b.then(oa(this,function(a){null==this.i&&(this.i=a),this.D&&0<qa(this.a,c)&&(this.D=!1,this.c.currentTime+=.001),Xc(this,0)}))["catch"](oa(this,function(a){if("aborted"!=a.type){var b=[0,404,410];
  707. "net"==a.type&&-1!=b.indexOf(a.Mb.status)&&this.b&&Xc(this,5e3),a=R(a),this.dispatchEvent(a)}}))):(Uc(this),this.f&&!this.j&&(this.j=!0,Wc(this)),Xc(this,1e3))}}},Zc.prototype.destroy=function(){this.a&&(this.a.destroy(),this.a=null)},Zc.prototype.create=function(){if(this.a)return Promise.resolve(this.a);
  708. var a=new rc(0,null,this.b);
  709. return this.a=new wc([a]),Promise.resolve(this.a)},c($c,fa),$c.prototype.H=function(){},$c.prototype.destroy=function(){this.a&&this.b.removeChild(this.a),this.c.destroy(),this.v=this.b=this.f=this.h=this.a=this.c=null},Ae=$c.prototype,Ae.oa=function(){return this.f},Ae.Qa=function(){return this.h},Ae.cb=function(){return this.c},Ae.Ra=function(){return!0},Ae.ra=function(a){a.G.create().then(oa(this,function(b){if(this.b){if(0==b.length())return Promise.reject(Error("No subtitles URL available."));
  710. var c=this.f;
  711. this.f=a,this.h=b,b=xc(b).url.c[0].toString();
  712. var d=this.Aa();
  713. this.a&&(this.wa(!1),this.b.removeChild(this.a)),this.a=document.createElement("track"),this.b.appendChild(this.a),this.a.src=b,this.wa(d),b=Q({type:"adaptation",bubbles:!0,contentType:"text",size:null,bandwidth:a.bandwidth}),this.dispatchEvent(b),c||this.c.resolve(0)}}))},Ae.Wa=function(){},Ae.wa=function(a){this.g=a,this.a&&(this.a.track.mode=a?"showing":"disabled")},Ae.Aa=function(){return this.a&&(this.g="showing"==this.a.track.mode),this.g},_c.prototype.parse=function(a,b,c,d){var e=null;
  714. try{var f,g=new J(b);
  715. if(440786851!=K(g).id)f=null;
  716. else{var h=K(g);
  717. if(408125543!=h.id)f=null;
  718. else{var i,j=h.a.byteOffset,k=new J(h.a);
  719. for(b=null;
  720. D(k.a);
  721. ){var l=K(k);
  722. if(357149030==l.id){b=l;
  723. break}}if(b){for(var m=new J(b.a),k=1e6;
  724. D(m.a);
  725. ){var n=K(m);
  726. if(2807729==n.id){k=N(n);
  727. break}}i=k/1e9}else i=null;
  728. f=i?{Eb:j,Jb:i}:null}}if(f){var o=K(new J(a));
  729. if(475249515!=o.id)e=null;
  730. else{var p=f.Eb,q=f.Jb;
  731. a=[];
  732. var r=new J(o.a);
  733. for(f=o=-1;
  734. D(r.a);
  735. ){var s=K(r);
  736. if(187==s.id){var t,u=new J(s.a),v=K(u);
  737. if(179!=v.id)t=null;
  738. else{var w=N(v),x=K(u);
  739. if(183!=x.id)t=null;
  740. else{for(var y=new J(x.a),j=0;
  741. D(y.a);
  742. ){var z=K(y);
  743. if(241==z.id){j=N(z);
  744. break}}t={Lb:w,Db:j}}}if(t){var A=q*t.Lb,B=p+t.Db;
  745. if(o>=0){var C=new gc(d,c,f,B-1);
  746. a.push(new rc(o,A,C))}o=A,f=B}}}o>=0&&(C=new gc(d,c,f,null),a.push(new rc(o,null,C))),e=a}}else e=null}catch(E){if(!(E instanceof RangeError))throw E}return e},ad.prototype.destroy=function(){this.h=this.j=this.g=null,this.a.g(),this.a=null,this.c&&(this.c.g(),this.c=null),this.i&&(this.i.destroy(),this.i=null),this.b=null},ad.prototype.create=function(){if(this.b)return this.b;
  747. var a=[ic(this.a)];
  748. return"webm"==this.f&&a.push(ic(this.c)),this.b=Promise.all(a).then(oa(this,function(a){var b=a[0];
  749. a=a[1]||null;
  750. var c=null;
  751. if("mp4"==this.f?(c=new vc,c=c.parse(new DataView(b),this.a.f,this.a.c,this.h)):"webm"==this.f&&(c=new _c,c=c.parse(new DataView(b),new DataView(a),this.a.c,this.h)),!c)return b=Error("Failed to parse SegmentReferences from "+this.a.toString()+" (or one of its fallbacks)."),b.type="stream",Promise.reject(b);
  752. var d;
  753. return d="dynamic"==this.g.type?new Ac(c,this.g,this.j,this.v):new wc(c),Promise.resolve(d)}))},c(rd,ya),rd.prototype.g=function(a,b,c){var d=new ia;
  754. a={stream_id:c.qa,mime_type:a.a,codecs:a.b,init_segment:b,references:c.u};
  755. var e=Da(this).put(a);
  756. return e.onsuccess=function(){d.resolve(c.qa)},e.onerror=function(){d.reject(e.error)},d},rd.prototype.f=function(a,b){for(var c=Promise.resolve(),d=0;
  757. d<a.length();
  758. ++d)var e=a.get(d),f=d==a.length()-1,f=this.c.bind(this,e,b,f),c=c.then(this.i.bind(this,e)),c=c.then(f);
  759. return c.then(function(){return Promise.resolve(b)})["catch"](oa(this,function(a){return xd(this,b.qa),Promise.reject(a)}))},rd.prototype.c=function(a,b,c,d){var e=new ia;
  760. 0==b.ga.byteLength&&(b.za=a),b.ga=wd(b.ga,d),b.Va++;
  761. var f=Q({type:"progress",detail:b.Va/b.Kb*100,bubbles:!0});
  762. if(1048576<=b.ga.byteLength||c){c={stream_id:b.qa,segment_id:b.Da,content:b.ga};
  763. var g=Ca(this).put(c);
  764. b.u.push({start_time:b.za.b,start_byte:b.za.url.f,end_time:a.a,url:"idb://"+b.qa+"/"+b.Da}),b.Da++,b.ga=new ArrayBuffer(0),g.onerror=function(){e.reject(g.error)},g.onsuccess=oa(this,function(){this.dispatchEvent(f),e.resolve()})}else this.dispatchEvent(f),e.resolve();
  765. return e},rd.prototype.i=function(a){var b=new ac;
  766. return b.c=1e3*this.b,ic(a.url,b,this.j)},c(Ad,fa),Ad.prototype.destroy=function(){this.v=null;
  767. for(var b=0;
  768. b<this.f.length;
  769. ++b)this.f[b].close()["catch"](function(){});
  770. this.f=[],this.j=this.a=this.h=null,this.c.destroy(),this.c=null,this.l.destroy(),this.l=null,this.i&&(a.clearTimeout(this.i),this.i=null),this.g=this.b=null},Ad.prototype.initialize=function(){for(var a=new Z,b=this.b.Pa(),c=0;
  771. c<b.length;
  772. ++c){var d=b[c];
  773. d.a.a||d.b&&!Kd(d.b)||a.push(d.contentType,d)}for(var c={},d=!1,e=0;
  774. e<b.length;
  775. ++e){var f=b[e];
  776. if(f.a.a&&!a.a.hasOwnProperty(f.contentType)){var g=f.a.a,h=c[g];
  777. if(h||(h=f.a,h={audioCapabilities:void 0,videoCapabilities:void 0,initDataTypes:void 0,distinctiveIdentifier:h.g?"required":"optional",persistentState:h.v||this.b.ea()?"required":"optional",sessionTypes:[this.b.ea()?"persistent-license":"temporary"]},c[g]=h),f.b&&(g=f.contentType+"Capabilities",g in h)){d=!0,h[g]||(h[g]=[]);
  778. var i;
  779. "audio"==f.contentType?i=f.a.f:"video"==f.contentType&&(i=f.a.i),h[g].push({contentType:f.b,robustness:i})}}}if(!d){if(!b.length)throw a=Error("No DrmInfo exists!"),a.type="drm",a;
  780. this.a=b[0].a}return 0==Object.keys(c).length?(this.b.Ea(a),this.c.resolve(),Promise.resolve()):(i=new ia,c=Dd(this,c,i),c=c.then(this.ib.bind(this,b,a)),c=c.then(this.Fb.bind(this)),i.reject(null),c)},Ae=Ad.prototype,Ae.ib=function(a,b,c){if(!this.g)return Ed();
  781. for(var d=c.keySystem,e=c.getConfiguration(),f=["audio","video"],g=0;
  782. g<f.length;
  783. ++g){var h=f[g];
  784. if(!b.a.hasOwnProperty(h)){var i=e[h+"Capabilities"];
  785. if(i&&i.length){for(var i=i[0],j=[],k={},l=0;
  786. l<a.length;
  787. ++l){var m=a[l];
  788. if(m.a.a==d&&m.b==i.contentType&&!(m.id in k)){j.push(m),k[m.id]=!0;
  789. var n;
  790. if(this.a){n=this.a;
  791. var m=m.a,o=new Sa;
  792. o.a=n.a,o.h=n.h,o.j=n.j,o.l=n.l,o.o=n.o,o.g=n.g,o.v=n.v,o.f=n.f,o.i=n.i,o.c=n.c?new Uint8Array(n.c.buffer):null,Ua(o,n.b),Ua(o,m.b),n=o}else n=m.a;
  793. this.a=n}}b.a[h]=j}}}return this.b.Ea(b),c.createMediaKeys()},Ae.Fb=function(a){return this.g?(this.h=a,this.g.setMediaKeys(this.h).then(oa(this,function(){return this.g?this.a.c?this.h.setServerCertificate(this.a.c):Promise.resolve():Ed()})).then(oa(this,function(){if(!this.g)return Ed();
  794. if(0<this.b.va().length)Fd(this);
  795. else{for(var a=0;
  796. a<this.a.b.length;
  797. ++a){var b=this.a.b[a];
  798. this.Sa({type:"encrypted",initDataType:b.initDataType,initData:b.initData})}0==this.a.b.length&&ca(this.l,this.g,"encrypted",this.Sa.bind(this))}}))):Ed()},Ae.Sa=function(a){var b=new Uint8Array(a.initData),c=Array.prototype.join.apply(b);
  799. if(!this.j[c]){try{var d=Gd(this)}catch(e){return d=R(e),this.dispatchEvent(d),void this.c.reject(e)}a=d.generateRequest(a.initDataType,a.initData),this.j[c]=!0,a["catch"](oa(this,function(a){if(this.j){this.j[c]=!1;
  800. var b=R(a);
  801. this.dispatchEvent(b),this.c.reject(a)}})),this.f.push(d)}},Ae.tb=function(a){Hd(this,a.target,this.a,a.message)},Ae.lb=function(a){a=a.target.keyStatuses;
  802. for(var b={},c=a.keys(),d=c.next();
  803. !d.done;
  804. d=c.next()){var e=Qa(new Uint8Array(d.value)),d=a.get(d.value);
  805. b[e]=d}this.b.Ta(b)},c(Jd,fa),b("shaka.player.Player",Jd),Jd.version="1.5.2-npm-dirty",Jd.isBrowserSupported=function(){return!!(a.MediaSource&&a.MediaKeys&&a.navigator&&a.navigator.requestMediaKeySystemAccess&&a.MediaKeySystemAccess&&a.MediaKeySystemAccess.prototype.getConfiguration&&a.Promise&&Element.prototype.requestFullscreen&&document.exitFullscreen&&"fullscreenElement"in document&&a.Uint8Array)},Jd.isTypeSupported=Kd,Jd.setTextStyle=function(a){var b=document.getElementById("ShakaPlayerTextStyle");
  806. for(b||(b=document.createElement("style"),b.id="ShakaPlayerTextStyle",document.head.appendChild(b)),b=b.sheet;
  807. b.cssRules.length;
  808. )b.deleteRule(0);
  809. b.insertRule("::cue { "+l(a)+" }",0)},Jd.prototype.destroy=function(){return this.w().then(oa(this,function(){this.f.destroy(),this.a=this.f=null}))["catch"](function(){})},Jd.prototype.destroy=Jd.prototype.destroy,Jd.prototype.w=function(){if(!this.b)return Promise.resolve();
  810. this.i&&Pd(this),this.a.pause(),da(this.f),Od(this),Md(this),this.l&&(this.l.destroy(),this.l=null),this.a.src="";
  811. var a=this.a.setMediaKeys(null);
  812. return this.b&&(this.b.destroy(),this.b=null),this.i=!1,this.g=new nd,a},Jd.prototype.unload=Jd.prototype.w,Jd.prototype.ya=function(a){var b=this.w();
  813. return this.a.autoplay&&(f("load"),ca(this.f,this.a,"timeupdate",this.kb.bind(this))),a.K(this.c),a.$a(this.F),this.F=null,b=b.then(oa(this,function(){return a.U()})),b["catch"](oa(this,function(b){return a.destroy(),Promise.reject(b)})),b.then(oa(this,function(){return this.a?(this.b=a,ca(this.f,this.b,"seekrangechanged",this.rb.bind(this)),this.l=new Ad(this,this.a,this.b),this.l.initialize()):Ld()})).then(oa(this,function(){return this.a?(ca(this.f,this.a,"error",this.Gb.bind(this)),ca(this.f,this.a,"playing",this.pb.bind(this)),ca(this.f,this.a,"pause",this.ob.bind(this)),this.b.Ka(this,this.a)):Ld()})).then(oa(this,function(){return this.a?void Nd(this):Ld()}))["catch"](oa(this,function(a){if(!this.a)return Ld();
  814. if("destroy"!=a.type){var b=R(a);
  815. this.dispatchEvent(b)}return this.w().then(function(){return Promise.reject(a)})}))},Jd.prototype.load=Jd.prototype.ya,Ae=Jd.prototype,Ae.kb=function(){g("load"),this.g.playbackLatency=h("load")/1e3,this.f.sa(this.a,"timeupdate")},Ae.Gb=function(){if(this.a.error){var a=this.a.error.code;
  816. a!=MediaError.MEDIA_ERR_ABORTED&&(a=Error(_e[a]||"Unknown playback error."),a.type="playback",a=R(a),this.dispatchEvent(a))}},Ae.pb=function(){f("playing"),!this.j&&0>this.o&&(this.a.playbackRate=0,this.D(this.a.currentTime,Date.now(),this.o)),this.i&&Pd(this)},Ae.ob=function(){g("playing");
  817. var a=h("playing");
  818. if(!isNaN(a)){var b=this.g;
  819. b.playTime+=a/1e3}Md(this)},Ae.rb=function(a){this.H=a.start},Ae.ab=function(){if(!this.a.paused){g("playing");
  820. var a=h("playing");
  821. if(!isNaN(a)){var b=this.g;
  822. b.playTime+=a/1e3,f("playing")}}return a=this.g,b=this.a,b.getVideoPlaybackQuality&&(b=b.getVideoPlaybackQuality(),a.decodedFrames=b.totalVideoFrames,a.droppedFrames=b.droppedVideoFrames),this.g},Jd.prototype.getStats=Jd.prototype.ab,Jd.prototype.ma=function(){return this.b?this.b.ja():[]},Jd.prototype.getVideoTracks=Jd.prototype.ma,Jd.prototype.ua=function(){return this.b?this.b.pa():[]},Jd.prototype.getAudioTracks=Jd.prototype.ua,Jd.prototype.la=function(){return this.b?this.b.Ha():[]},Jd.prototype.getTextTracks=Jd.prototype.la,Jd.prototype.ta=function(){return this.b?this.b.Ga():[]},Jd.prototype.getApplicationTracks=Jd.prototype.ta,Jd.prototype.selectVideoTrack=function(a,b){return this.b?this.b.selectVideoTrack(a,void 0==b?!0:b):!1},Jd.prototype.selectVideoTrack=Jd.prototype.selectVideoTrack,Jd.prototype.fb=function(a,b){return this.b?this.b.Ya(a,void 0==b?!0:b):!1},Jd.prototype.selectAudioTrack=Jd.prototype.fb,Jd.prototype.gb=function(a){return this.b?this.b.Za(a,!1):!1},Jd.prototype.selectTextTrack=Jd.prototype.gb,Jd.prototype.T=function(a){this.b&&this.b.Fa(a)},Jd.prototype.enableTextTrack=Jd.prototype.T,Jd.prototype.K=function(a){this.h({enableAdaptation:a})},Jd.prototype.enableAdaptation=Jd.prototype.K,Jd.prototype.S=function(){return this.c.enableAdaptation},Jd.prototype.getAdaptationEnabled=Jd.prototype.S,Jd.prototype.da=function(a){this.h({streamBufferSize:a})},Jd.prototype.setStreamBufferSize=Jd.prototype.da,Jd.prototype.X=function(){return Number(this.c.streamBufferSize)},Jd.prototype.getStreamBufferSize=Jd.prototype.X,Jd.prototype.eb=function(a){this.h({licenseRequestTimeout:a/1e3})},Jd.prototype.setLicenseRequestTimeout=Jd.prototype.eb,Jd.prototype.Z=function(a){this.h({mpdRequestTimeout:a/1e3})},Jd.prototype.setMpdRequestTimeout=Jd.prototype.Z,Jd.prototype.M=function(a){this.h({segmentRequestTimeout:a/1e3})},Jd.prototype.setRangeRequestTimeout=Jd.prototype.M,Jd.prototype.ca=function(a){this.h({preferredLanguage:a})},Jd.prototype.setPreferredLanguage=Jd.prototype.ca,Jd.prototype.ba=function(a){Md(this),a>=0?this.a.playbackRate=a:this.a.paused||(this.a.playbackRate=0,this.D(this.a.currentTime,Date.now(),a)),this.o=a},Jd.prototype.setPlaybackRate=Jd.prototype.ba,Jd.prototype.V=function(){return this.o},Jd.prototype.getPlaybackRate=Jd.prototype.V,Jd.prototype.O=function(a){this.h({restrictions:a})},Jd.prototype.setRestrictions=Jd.prototype.O,Jd.prototype.W=function(){return this.c.restrictions.clone()},Jd.prototype.getRestrictions=Jd.prototype.W,Jd.prototype.hb=function(a){this.F=a},Jd.prototype.setPlaybackStartTime=Jd.prototype.hb,Jd.prototype.I=function(){return this.b?this.b.Xa():!1},Jd.prototype.isLive=Jd.prototype.I,Jd.prototype.h=function(a){if(a){var b=X(a,"enableAdaptation","boolean");
  823. null!=b&&(this.c.enableAdaptation=b),b=V(a,"streamBufferSize"),null!=b&&(this.c.streamBufferSize=b),b=V(a,"licenseRequestTimeout"),null!=b&&(this.c.licenseRequestTimeout=b),b=V(a,"mpdRequestTimeout"),null!=b&&(this.c.mpdRequestTimeout=b),b=V(a,"segmentRequestTimeout"),null!=b&&(this.c.segmentRequestTimeout=b),b=W(a,"preferredLanguage"),null!=b&&(this.c.preferredLanguage=b),a=Y(a,"restrictions",j),null!=a&&(this.c.restrictions=a.clone()),this.b&&this.b.K(this.c)}},Jd.prototype.configure=Jd.prototype.h,Jd.prototype.ka=function(){return this.c},Jd.prototype.getConfiguration=Jd.prototype.ka,Jd.prototype.D=function(b,c,d){this.j=null;
  824. var e=(Date.now()-c)/1e3*d;
  825. this.a.currentTime<this.H+(this.I()?1:.05)?this.a.pause():(e=Math.max(this.H,b+e),this.a.currentTime=e,this.j=a.setTimeout(this.D.bind(this,b,c,d),250))},Jd.prototype.Y=function(){if(Nd(this),!this.a.ended&&!this.a.seeking){var a=this.a.buffered,b=a.length?a.end(a.length-1):0,a=Math.max(b-this.a.currentTime,0);
  826. if(this.i)a>this.b.Oa()&&(Pd(this),this.a.play());
  827. else{var c=this.a.duration,c=isNaN(c)?0:Math.max(c-.05,0),b=b>=c||this.a.currentTime>=c;
  828. !this.a.paused&&!b&&.2>a&&(this.i=!0,this.a.pause(),this.g.bufferingHistory.push(B()/1e3),f("buffering"),this.dispatchEvent(Q({type:"bufferingStart"})))}}};
  829. var _e={2:"A network failure occured while loading media content.",3:"The browser failed to decode the media content.",4:"The browser does not support the media content."};
  830. Td.prototype.destroy=function(){this.a.destroy(),this.a=null},b("shaka.media.SimpleAbrManager",$d),$d.prototype.destroy=function(){this.f.destroy(),this.a=this.b=this.f=null},$d.prototype.initialize=function(a,b){this.b||this.a||(this.b=a,this.a=b)},$d.prototype.start=function(){this.b&&this.a&&!this.g&&(this.c=Date.now()+4e3,ca(this.f,this.b,"bandwidth",this.v.bind(this)),ca(this.f,this.a,"adaptation",this.j.bind(this)),ca(this.f,this.a,"trackschanged",this.h.bind(this)),this.g=!0)},$d.prototype.enable=function(a){this.i=a},$d.prototype.getInitialVideoTrackId=function(){if(!this.b||!this.a)return null;
  831. var a=_d(this);
  832. return a?a.id:null},$d.prototype.selectVideoTrack=function(a,b,c){this.g&&this.a.selectVideoTrack(a.id,b,c)},$d.prototype.v=function(){Date.now()<this.c||this.h()},$d.prototype.h=function(){if(this.i){var a=_d(this);
  833. if(a){if(a.active)return void(this.c=Date.now()+3e3);
  834. this.selectVideoTrack(a,!1)}this.c=Number.POSITIVE_INFINITY}},$d.prototype.j=function(){this.c==Number.POSITIVE_INFINITY&&(this.c=Date.now()+3e4)},c(ae,fa),b("shaka.player.HttpVideoSource",ae),ae.prototype.K=function(){},ae.prototype.destroy=function(){this.a&&(this.a.parentElement.removeChild(this.a),this.a=null),this.v=this.b=null},Ae=ae.prototype,Ae.Ka=function(a,b){this.v=a;
  835. var c=b.mediaKeys;
  836. return b.src=this.f,c=b.setMediaKeys(c),this.c&&(this.a=document.createElement("track"),this.a.src=this.c,b.appendChild(this.a),this.a.track.mode="showing"),c},Ae.U=function(){return Promise.resolve()},Ae.ja=function(){return[]},Ae.pa=function(){return[]},Ae.Ha=function(){return[]},Ae.Ga=function(){return[]},Ae.Oa=function(){return 5},Ae.Pa=function(){var a=new Qc;
  837. return a.a=this.b,[a]},Ae.Ea=function(){},ae.prototype.selectVideoTrack=function(){return!1},Ae=ae.prototype,Ae.Ya=function(){return!1},Ae.Za=function(){return!1},Ae.Fa=function(a){this.a&&(this.a.track.mode=a?"showing":"disabled")},Ae.$a=function(){},Ae.va=function(){return[]},Ae.ea=function(){return!1},Ae.Xa=function(){return!1},Ae.Ta=function(a){for(var b in a){var c=a[b],d=Le[c]||null;
  838. if(d){var e=ja(b),d=Error("Key "+e+" is not usable. "+d);
  839. d.type="drm",d.code=c,c=R(d),this.dispatchEvent(c)}}},c(be,fa),b("shaka.player.StreamVideoSource",be),be.prototype.K=function(a){null!=a.streamBufferSize&&(this.D.streamBufferSize=a.streamBufferSize),null!=a.segmentRequestTimeout&&(this.D.segmentRequestTimeout=a.segmentRequestTimeout),ue(this),null!=a.enableAdaptation&&this.H.enable(Boolean(a.enableAdaptation)),null!=a.mpdRequestTimeout&&(this.ba=Number(a.mpdRequestTimeout)),null!=a.preferredLanguage&&(this.F=T(String(a.preferredLanguage))),null!=a.restrictions&&(this.h=a.restrictions,this.I&&de(this))},be.prototype.destroy=function(){this.w.destroy(),this.ca.destroy(),this.ca=this.w=null,this.W&&(a.clearTimeout(this.W),this.W=null),this.Z&&(a.clearTimeout(this.Z),this.Z=null),this.o=null,this.i.destroy(),this.i=null,U(this.c).forEach(function(a){a.destroy()}),this.b=this.c=null,this.a&&(this.a.destroy(),this.a=null),this.H.destroy(),this.v=this.h=this.S=this.f=this.g=this.X=this.H=null},Ae=be.prototype,Ae.Ka=function(b,c){if(!this.I){var d=Error("Cannot call attach() right now.");
  840. return d.type="app",Promise.reject(d)}return this.v=b,this.f=c,this.S=b.ab(),ca(this.i,this.g,"sourceopen",this.nb.bind(this)),ca(this.i,this.X,"bandwidth",this.Hb.bind(this)),d=this.f.mediaKeys,this.f.src=a.URL.createObjectURL(this.g),d=this.f.setMediaKeys(d),Promise.all([this.w,d])},Ae.U=function(){if(this.I){var a=Error("Cannot call load() right now.");
  841. return a.type="app",Promise.reject(a)}return this.a&&0!=this.a.a.length?(a=this.a.a,Qd(a),Rd(a),0==this.a.a.length||0==this.a.a[0].a.length?(a=Error("The manifest specifies content that cannot be displayed on this browser/platform."),a.type="stream",Promise.reject(a)):(this.I=!0,this.D.initialStreamBufferSize=this.a.c,ue(this),de(this),Promise.resolve())):(a=Error("The manifest does not specify any content."),a.type="stream",Promise.reject(a))},Ae.wb=function(){var a=Date.now(),b=this.Z=null;
  842. this.Ua(this.a.g).then(oa(this,function(a){return b=new Td(a),Ud(b,this.a)})).then(oa(this,function(c){b.destroy(),b=null;
  843. for(var d=0;
  844. d<c.length;
  845. ++d)ce(this,c[d]);
  846. this.D.initialStreamBufferSize=this.a.c,ue(this),de(this),0==Object.keys(this.c).length?he(this):se(this,(Date.now()-a)/1e3)}))["catch"](oa(this,function(a){b&&(b.destroy(),b=null),"aborted"!=a.type&&(a=R(a),this.dispatchEvent(a),this.a&&se(this,0))}))},Ae.Ua=function(){return Promise.reject("Cannot update manifest with this VideoSource implementation.")},Ae.ja=function(){if(!this.b.a.hasOwnProperty("video"))return[];
  847. for(var a=this.c.video,a=(a=a?a.oa():null)?a.A:0,b=[],c=this.b.get("video"),d=0;
  848. d<c.length;
  849. ++d)for(var e=c[d],f=0;
  850. f<e.m.length;
  851. ++f){var g=e.m[f];
  852. if(g.L&&g.J){var h=g.A,g=new o(h,g.bandwidth,g.width,g.height);
  853. h==a&&(g.active=!0),
  854. b.push(g)}}return b},be.prototype.getVideoTracks=be.prototype.ja,be.prototype.pa=function(){if(!this.b.a.hasOwnProperty("audio"))return[];
  855. for(var a=this.c.audio,a=(a=a?a.oa():null)?a.A:0,b=[],c=this.b.get("audio"),d=0;
  856. d<c.length;
  857. ++d)for(var e=c[d],f=e.lang,g=0;
  858. g<e.m.length;
  859. ++g){var h=e.m[g];
  860. if(h.L&&h.J){var j=h.A,h=new i(j,h.bandwidth,f);
  861. j==a&&(h.active=!0),b.push(h)}}return b},be.prototype.getAudioTracks=be.prototype.pa,be.prototype.Ha=function(){if(!this.b.a.hasOwnProperty("text"))return[];
  862. for(var a=this.c.text,b=a?a.oa():null,b=b?b.A:0,c=[],d=this.b.get("text"),e=0;
  863. e<d.length;
  864. ++e)for(var f=d[e],g=f.lang,h=0;
  865. h<f.m.length;
  866. ++h){var i=f.m[h].A,j=new n(i,g);
  867. i==b&&(j.active=!0,j.enabled=a.Aa()),c.push(j)}return c},be.prototype.getTextTracks=be.prototype.Ha,be.prototype.Ga=function(){if(!this.b.a.hasOwnProperty("application"))return[];
  868. for(var a=[],b=this.b.get("application"),c=0;
  869. c<b.length;
  870. ++c){for(var d=b[c],e=d.lang,f="",g=0;
  871. g<d.m.length;
  872. ++g)f=d.m[g].id;
  873. a.push({lang:e,id:f})}return a},be.prototype.getApplicationTracks=be.prototype.Ga,be.prototype.Oa=function(){return Number(this.D.initialStreamBufferSize)},be.prototype.Pa=function(){var a;
  874. if(this.I){a=this.a.a[0];
  875. for(var b=[],c=0;
  876. c<a.a.length;
  877. ++c)b.push.apply(b,Nc(a.a[c]));
  878. a=b}else a=[];
  879. return a},be.prototype.Ea=function(a){if(this.I){for(var b={},c=this.a.a[0],d=0;
  880. d<c.a.length;
  881. ++d){var e=c.a[d];
  882. b[e.A]=e}for(this.b.a={},c=aa(a),d=0;
  883. d<c.length;
  884. ++d){var e=c[d],f=a.get(e);
  885. if("video"==e){var g=f[0].id;
  886. this.b.push(e,b[g])}else if("audio"==e)for(var g=f[0].b.split(";")[0],h=0;
  887. h<f.length;
  888. ++h){var i=f[h];
  889. i.b.split(";")[0]==g&&this.b.push(e,b[i.id])}else for(h=0;
  890. h<f.length;
  891. ++h)g=f[h].id,this.b.push(e,b[g])}this.da=!0,(a=this.b.get("audio"))&&(ge(this,a),this.b.a.audio=a,a=a[0].lang||this.F,S(2,this.F,a)&&(this.da=!1)),(a=this.b.get("text"))&&(ge(this,a),this.b.a.text=a,a=a[0].lang||this.F,S(2,this.F,a)||(this.da=!1))}},be.prototype.selectVideoTrack=function(a,b,c){return fe(this,"video",a,b,c)},Ae=be.prototype,Ae.Ya=function(a,b){return fe(this,"audio",a,b)},Ae.Za=function(a,b){return fe(this,"text",a,b)},Ae.Fa=function(a){var b=this.c.text;
  892. b&&b.wa(a)},Ae.$a=function(a){this.Y=a},Ae.va=function(){return[]},Ae.ea=function(){return!1},Ae.Xa=function(){return this.a?this.a.b:!1},Ae.Ta=function(a){for(var b,c=!1,d=new Z,e=$(this.b),f=0;
  893. f<e.length;
  894. ++f)for(var g=e[f],h=0;
  895. h<g.m.length;
  896. ++h){var i=g.m[h];
  897. i.f.forEach(function(a){d.push(a,i)})}for(b in a)if(e=Le[a[b]]||null,g=d.get(b))for(f=0;
  898. f<g.length;
  899. ++f)i=g[f],h=i.L,i.L=!e,h!=i.L&&(c=!0);
  900. else ja(b);
  901. c&&(ee(this),b=this.pa(),a=this.ja(),b=this.b.a.hasOwnProperty("audio")&&0==b.length,a=this.b.a.hasOwnProperty("video")&&0==a.length,b||a)&&(a=Error("The key system has restricted all "+(b&&a?"audio and video tracks.":b?"audio tracks.":"video tracks.")),a.type="drm",a=R(a),this.dispatchEvent(a))},Ae.nb=function(){this.i.sa(this.g,"sourceopen"),he(this).then(oa(this,function(){this.w&&this.w.resolve()}))["catch"](oa(this,function(a){this.w&&this.w.reject(a)}))},Ae.jb=function(a){d(a&&a.length==Object.keys(this.c).length);
  902. for(var b=Number.POSITIVE_INFINITY,c=Number.NEGATIVE_INFINITY,e=0;
  903. e<a.length;
  904. ++e)var f=a[e],b=Math.min(b,f),c=Math.max(c,f);
  905. for(a=qe(this),e=0;
  906. e<a.length;
  907. ++e)a[e].ha(c);
  908. me(this,a,c),e=$(this.b).map(function(a){return a.m}).reduce(function(a,b){return a.concat(b)},[]).map(function(a){var b=[a.G.create()];
  909. return a.C&&b.push(a.C.create()),Promise.all(b)}),Promise.all(e).then(oa(this,function(a){for(var b=0;
  910. b<a.length;
  911. ++b)a[b][0].ha(c);
  912. this.ta=!0;
  913. for(var d in this.o)a=this.o[d],b=this.c[d],od(this.S,a.Ia),b.ra(a.Ia,a.La,a.Ma);
  914. this.o={}}))["catch"](oa(this,function(a){"aborted"!=a.type&&(a=R(a),this.dispatchEvent(a))}))},Ae.xb=function(){this.W=null,te(this);
  915. var a=re(this,qe(this));
  916. a&&(oe(this,a.start,a.end),this.f.paused||pe(this,this.f.currentTime,a.start,a.end))},Ae.sb=function(){var a=this.f.currentTime;
  917. if(null!=this.B){if(a>=this.B-.01&&a<=this.B+.01)return void(this.B=null);
  918. this.B=null}var b=re(this,qe(this));
  919. if(b){var c=b.end;
  920. if((b=pe(this,a,b.start,c))||(c+.01>=a?b=!1:(this.f.currentTime=c,b=!0)),!b)for(var d in this.c)this.c[d].Wa()}},Ae.ub=function(){if(!this.a.b){for(var a in this.c)if(!this.c[a].Ra())return;
  921. this.g.endOfStream()}},Ae.Hb=function(){var a=this.S,b=this.X.getBandwidth();
  922. a.estimatedBandwidth=b,a.bandwidthHistory.push(new qd(b))},c(ve,be),b("shaka.player.DashVideoSource",ve),ve.prototype.la=function(a,b,c){this.l.push(a),this.O.push(b||""),this.T.push(c||"")},ve.prototype.addExternalCaptions=ve.prototype.la,ve.prototype.ma=function(a){this.j=a},ve.prototype.setNetworkCallback=ve.prototype.ma,ve.prototype.destroy=function(){this.j=this.M=null,be.prototype.destroy.call(this)},ve.prototype.U=function(){var a=new gc(this.j,[new hb(this.ka)]);
  923. return lc(new kc(a,this.ba)).then(oa(this,function(a){for(var b=0;
  924. b<this.l.length;
  925. b++){var c=a,d=this.l[b],e=this.O[b],f=this.T[b];
  926. if(0!==c.a.length){var g=new sb;
  927. g.contentType="text",g.lang=e||"en",g.c=!0,e=new vb,e.bandwidth=0,e.f=f||"text/vtt",e.s=[new hb(d)],g.a.push(e),c.a[0].b.push(g),Jb(c.a[0])}}return this.a=cd(new bd(this.M),a,this.j),be.prototype.U.call(this)}))},ve.prototype.Ua=function(a){return lc(new kc(a,this.ba)).then(oa(this,function(a){return a=cd(new bd(this.M),a,this.j),Promise.resolve(a)}))},c(we,be),b("shaka.player.OfflineVideoSource",we),we.prototype.K=function(a){null!=a.licenseRequestTimeout&&(this.l.licenseRequestTimeout=a.licenseRequestTimeout),null!=a.segmentRequestTimeout&&(this.l.segmentRequestTimeout=a.segmentRequestTimeout),be.prototype.K.call(this,a)},b("shaka.player.OfflineVideoSource.retrieveGroupIds",function(){var a=new Ha,b=za(a).then(function(){return Ia(a)});
  928. return b.then(function(){Aa(a)})["catch"](function(){Aa(a)}),b}),we.prototype.ya=function(b,c,d,e){var f,g=null,h={},i=[];
  929. return b=new gc(this.O,[new hb(b)]),lc(new kc(b,this.ba)).then(oa(this,function(a){return this.a=cd(new bd(d),a,this.O),this.a.b?(a=Error("Unable to store live streams offline."),a.type="app",Promise.reject(a)):(this.K({preferredLanguage:c}),be.prototype.U.call(this))})).then(oa(this,function(){var b=document.createElement("video");
  930. return b.src=a.URL.createObjectURL(this.g),f=new Ad(null,b,this),null!=this.l.licenseRequestTimeout&&(f.w=Number(this.l.licenseRequestTimeout)),ca(this.i,f,"sessionReady",this.ka.bind(this)),ca(this.i,f,"error",function(a){g=a}),f.initialize()})).then(oa(this,function(){for(var a=$(this.b),b=0;
  931. b<a.length;
  932. ++b)for(var c=a[b],d=0;
  933. d<c.m.length;
  934. ++d){var f=c.m[d];
  935. h[f.A]=f}return e()})).then(oa(this,function(a){for(var b=0;
  936. b<a.length;
  937. ++b){var c=a[b],d=h[c];
  938. if(!d)return Promise.reject(Error("Invalid stream ID chosen: "+c));
  939. i.push(d)}var e=["audio","video"];
  940. return i=i.filter(function(a){return!(0>e.indexOf(a.a.split("/")[0]))}),a=i.map(function(a){return a.C.create()}),Promise.all(a)})).then(oa(this,function(a){for(var b=i,c=[],d=0;
  941. d<b.length;
  942. ++d)try{c[d]=this.g.addSourceBuffer(Lc(b[d]))}catch(e){}if(b.length!=c.length)a=Error("Error initializing streams."),a.type="storage",a=Promise.reject(a);
  943. else{for(d=0;
  944. d<a.length;
  945. ++d)(b=a[d])&&c[d].appendBuffer(b);
  946. a=Promise.resolve()}return a})).then(oa(this,function(){return Bd(f,this.timeoutMs)})).then(oa(this,function(){return g?Promise.reject(g):xe(this,i,f.a,this.a.a[0].b)})).then(oa(this,function(a){return this.T=a,g?(ye(this),Promise.reject(g)):Promise.resolve(a)}))},b("shaka.player.OfflineVideoSource.prototype.store",we.prototype.ya),we.prototype.ma=function(a){this.O=a},we.prototype.setNetworkCallback=we.prototype.ma,we.prototype.ka=function(a){this.M.push(a.detail.sessionId)},we.prototype.U=function(){var a,b,c=new Ha;
  947. return za(c).then(oa(this,function(){return Ja(c,this.T)})).then(oa(this,function(d){var e=[];
  948. this.M=d.session_ids,a=d.duration,b={keySystem:d.key_system,distinctiveIdentifierRequired:d.distinctive_identifier,persistentStorageRequired:!0,audioRobustness:d.audio_robustness,videoRobustness:d.video_robustness,withCredentials:d.with_credentials,licenseServerUrl:d.license_server};
  949. for(var f=0;
  950. f<d.stream_ids.length;
  951. ++f)e.push(Ka(c,d.stream_ids[f]));
  952. return Promise.all(e)})).then(oa(this,function(c){var d=a,e=b,f=new Pc;
  953. f.c=5;
  954. for(var g=new Oc,h=0;
  955. h<c.length;
  956. ++h){var i=c[h],j=new Kc,k=new Jc(i.references),l=new Uint8Array(i.init_segment),l=new hb("data:application/octet-stream;base64,"+Oa(l)),l=new qc(new gc(this.O,[l],0,null));
  957. j.G=k,j.C=l,j.a=i.mime_type,j.b=i.codecs,j.L=!0,this.j&&(null!=this.j.licenseServerUrl&&(e.licenseServerUrl=this.j.licenseServerUrl),null!=this.j.withCredentials&&(e.withCredentials=this.j.withCredentials),e.licensePostProcessor=this.j.licensePostProcessor,e.licensePreProcessor=this.j.licensePreProcessor,e.serverCertificate=this.j.serverCertificate),i=Ta(e),k=new Mc,k.m.push(j),k.a.push(i),k.contentType=j.a.split("/")[0],g.a.push(k),g.b=d}return f.a.push(g),this.a=f,be.prototype.U.call(this)})).then(function(){return Aa(c),Promise.resolve()})["catch"](function(a){return Aa(c),Promise.reject(a)})},we.prototype.la=function(a,b){a&&(this.j={licenseServerUrl:a.licenseServerUrl,withCredentials:a.withCredentials,serverCertificate:a.serverCertificate,licensePreProcessor:a.licensePreProcessor,licensePostProcessor:a.licensePostProcessor});
  958. var c=null;
  959. return ze(this)["catch"](function(a){return b?(c=a,Promise.resolve()):Promise.reject(a)}).then(oa(this,function(){return ye(this)})).then(function(){return Promise.resolve(c)})},we.prototype.deleteGroup=we.prototype.la,we.prototype.va=function(){return this.M},we.prototype.ea=function(){return!0}}).bind(a,this)(),"undefined"!=typeof module&&module.exports?module.exports=a.shaka:"undefined"!=typeof define&&define.amd?define(function(){return a.shaka}):this.shaka=a.shaka}();
  960. var Hogan={};
  961. !function(a){function b(a,b,c){var d;
  962. return b&&"object"==typeof b&&(void 0!==b[a]?d=b[a]:c&&b.get&&"function"==typeof b.get&&(d=b.get(a))),d}function c(a,b,c,d,e,f){function g(){}function h(){}g.prototype=a,h.prototype=a.subs;
  963. var i,j=new g;
  964. j.subs=new h,j.subsText={},j.buf="",d=d||{},j.stackSubs=d,j.subsText=f;
  965. for(i in b)d[i]||(d[i]=b[i]);
  966. for(i in d)j.subs[i]=d[i];
  967. e=e||{},j.stackPartials=e;
  968. for(i in c)e[i]||(e[i]=c[i]);
  969. for(i in e)j.partials[i]=e[i];
  970. return j}function d(a){return String(null===a||void 0===a?"":a)}function e(a){return a=d(a),k.test(a)?a.replace(f,"&amp;").replace(g,"&lt;").replace(h,"&gt;").replace(i,"&#39;").replace(j,"&quot;"):a}a.Template=function(a,b,c,d){a=a||{},this.r=a.code||this.r,this.c=c,this.options=d||{},this.text=b||"",this.partials=a.partials||{},this.subs=a.subs||{},this.buf=""},a.Template.prototype={r:function(){return""},v:e,t:d,render:function(a,b,c){return this.ri([a],b||{},c)},ri:function(a,b,c){return this.r(a,b,c)},ep:function(a,b){var d=this.partials[a],e=b[d.name];
  971. if(d.instance&&d.base==e)return d.instance;
  972. if("string"==typeof e){if(!this.c)throw new Error("No compiler available.");
  973. e=this.c.compile(e,this.options)}if(!e)return null;
  974. if(this.partials[a].base=e,d.subs){b.stackText||(b.stackText={});
  975. for(key in d.subs)b.stackText[key]||(b.stackText[key]=void 0!==this.activeSub&&b.stackText[this.activeSub]?b.stackText[this.activeSub]:this.text);
  976. e=c(e,d.subs,d.partials,this.stackSubs,this.stackPartials,b.stackText)}return this.partials[a].instance=e,e},rp:function(a,b,c,d){var e=this.ep(a,c);
  977. return e?e.ri(b,c,d):""},rs:function(a,b,c){var d=a[a.length-1];
  978. if(!l(d))return void c(a,b,this);
  979. for(var e=0;
  980. e<d.length;
  981. e++)a.push(d[e]),c(a,b,this),a.pop()},s:function(a,b,c,d,e,f,g){var h;
  982. return l(a)&&0===a.length?!1:("function"==typeof a&&(a=this.ms(a,b,c,d,e,f,g)),h=!!a,!d&&h&&b&&b.push("object"==typeof a?a:b[b.length-1]),h)},d:function(a,c,d,e){var f,g=a.split("."),h=this.f(g[0],c,d,e),i=this.options.modelGet,j=null;
  983. if("."===a&&l(c[c.length-2]))h=c[c.length-1];
  984. else for(var k=1;
  985. k<g.length;
  986. k++)f=b(g[k],h,i),void 0!==f?(j=h,h=f):h="";
  987. return e&&!h?!1:(e||"function"!=typeof h||(c.push(j),h=this.mv(h,c,d),c.pop()),h)},f:function(a,c,d,e){for(var f=!1,g=null,h=!1,i=this.options.modelGet,j=c.length-1;
  988. j>=0;
  989. j--)if(g=c[j],f=b(a,g,i),void 0!==f){h=!0;
  990. break}return h?(e||"function"!=typeof f||(f=this.mv(f,c,d)),f):e?!1:""},ls:function(a,b,c,e,f){var g=this.options.delimiters;
  991. return this.options.delimiters=f,this.b(this.ct(d(a.call(b,e)),b,c)),this.options.delimiters=g,!1},ct:function(a,b,c){if(this.options.disableLambda)throw new Error("Lambda features disabled.");
  992. return this.c.compile(a,this.options).render(b,c)},b:function(a){this.buf+=a},fl:function(){var a=this.buf;
  993. return this.buf="",a},ms:function(a,b,c,d,e,f,g){var h,i=b[b.length-1],j=a.call(i);
  994. return"function"==typeof j?d?!0:(h=this.activeSub&&this.subsText&&this.subsText[this.activeSub]?this.subsText[this.activeSub]:this.text,this.ls(j,i,c,h.substring(e,f),g)):j},mv:function(a,b,c){var e=b[b.length-1],f=a.call(e);
  995. return"function"==typeof f?this.ct(d(f.call(e)),e,c):f},sub:function(a,b,c,d){var e=this.subs[a];
  996. e&&(this.activeSub=a,e(b,c,this,d),this.activeSub=!1)}};
  997. var f=/&/g,g=/</g,h=/>/g,i=/\'/g,j=/\"/g,k=/[&<>\"\']/,l=Array.isArray||function(a){return"[object Array]"===Object.prototype.toString.call(a)}}("undefined"!=typeof exports?exports:Hogan),function(a){function b(a){"}"===a.n.substr(a.n.length-1)&&(a.n=a.n.substring(0,a.n.length-1))}function c(a){return a.trim?a.trim():a.replace(/^\s*|\s*$/g,"")}function d(a,b,c){if(b.charAt(c)!=a.charAt(0))return!1;
  998. for(var d=1,e=a.length;
  999. e>d;
  1000. d++)if(b.charAt(c+d)!=a.charAt(d))return!1;
  1001. return!0}function e(b,c,d,h){var i=[],j=null,k=null,l=null;
  1002. for(k=d[d.length-1];
  1003. b.length>0;
  1004. ){if(l=b.shift(),k&&"<"==k.tag&&!(l.tag in v))throw new Error("Illegal content in < super tag.");
  1005. if(a.tags[l.tag]<=a.tags.$||f(l,h))d.push(l),l.nodes=e(b,l.tag,d,h);
  1006. else{if("/"==l.tag){if(0===d.length)throw new Error("Closing tag without opener: /"+l.n);
  1007. if(j=d.pop(),l.n!=j.n&&!g(l.n,j.n,h))throw new Error("Nesting error: "+j.n+" vs. "+l.n);
  1008. return j.end=l.i,i}"\n"==l.tag&&(l.last=0==b.length||"\n"==b[0].tag)}i.push(l)}if(d.length>0)throw new Error("missing closing tag: "+d.pop().n);
  1009. return i}function f(a,b){for(var c=0,d=b.length;
  1010. d>c;
  1011. c++)if(b[c].o==a.n)return a.tag="#",!0}function g(a,b,c){for(var d=0,e=c.length;
  1012. e>d;
  1013. d++)if(c[d].c==a&&c[d].o==b)return!0}function h(a){var b=[];
  1014. for(var c in a)b.push('"'+j(c)+'": function(c,p,t,i) {'+a[c]+"}");
  1015. return"{ "+b.join(",")+" }"}function i(a){var b=[];
  1016. for(var c in a.partials)b.push('"'+j(c)+'":{name:"'+j(a.partials[c].name)+'", '+i(a.partials[c])+"}");
  1017. return"partials: {"+b.join(",")+"}, subs: "+h(a.subs)}function j(a){return a.replace(s,"\\\\").replace(p,'\\"').replace(q,"\\n").replace(r,"\\r").replace(t,"\\u2028").replace(u,"\\u2029")}function k(a){return~a.indexOf(".")?"d":"f"}function l(a,b){var c="<"+(b.prefix||""),d=c+a.n+w++;
  1018. return b.partials[d]={name:a.n,partials:{}},b.code+='t.b(t.rp("'+j(d)+'",c,p,"'+(a.indent||"")+'"));',d}function m(a,b){b.code+="t.b(t.t(t."+k(a.n)+'("'+j(a.n)+'",c,p,0)));'}function n(a){return"t.b("+a+");"}var o=/\S/,p=/\"/g,q=/\n/g,r=/\r/g,s=/\\/g,t=/\u2028/,u=/\u2029/;
  1019. a.tags={"#":1,"^":2,"<":3,$:4,"/":5,"!":6,">":7,"=":8,_v:9,"{":10,"&":11,_t:12},a.scan=function(e,f){function g(){s.length>0&&(t.push({tag:"_t",text:new String(s)}),s="")}function h(){for(var b=!0,c=w;
  1020. c<t.length;
  1021. c++)if(b=a.tags[t[c].tag]<a.tags._v||"_t"==t[c].tag&&null===t[c].text.match(o),!b)return!1;
  1022. return b}function i(a,b){if(g(),a&&h())for(var c,d=w;
  1023. d<t.length;
  1024. d++)t[d].text&&((c=t[d+1])&&">"==c.tag&&(c.indent=t[d].text.toString()),t.splice(d,1));
  1025. else b||t.push({tag:"\n"});
  1026. u=!1,w=t.length}function j(a,b){var d="="+y,e=a.indexOf(d,b),f=c(a.substring(a.indexOf("=",b)+1,e)).split(" ");
  1027. return x=f[0],y=f[f.length-1],e+d.length-1}var k=e.length,l=0,m=1,n=2,p=l,q=null,r=null,s="",t=[],u=!1,v=0,w=0,x="{{",y="}}";
  1028. for(f&&(f=f.split(" "),x=f[0],y=f[1]),v=0;
  1029. k>v;
  1030. v++)p==l?d(x,e,v)?(--v,g(),p=m):"\n"==e.charAt(v)?i(u):s+=e.charAt(v):p==m?(v+=x.length-1,r=a.tags[e.charAt(v+1)],q=r?e.charAt(v+1):"_v","="==q?(v=j(e,v),p=l):(r&&v++,p=n),u=v):d(y,e,v)?(t.push({tag:q,n:c(s),otag:x,ctag:y,i:"/"==q?u-x.length:v+y.length}),s="",v+=y.length-1,p=l,"{"==q&&("}}"==y?v++:b(t[t.length-1]))):s+=e.charAt(v);
  1031. return i(u,!0),t};
  1032. var v={_t:!0,"\n":!0,$:!0,"/":!0};
  1033. a.stringify=function(b){return"{code: function (c,p,i) { "+a.wrapMain(b.code)+" },"+i(b)+"}"};
  1034. var w=0;
  1035. a.generate=function(b,c,d){w=0;
  1036. var e={code:"",subs:{},partials:{}};
  1037. return a.walk(b,e),d.asString?this.stringify(e,c,d):this.makeTemplate(e,c,d)},a.wrapMain=function(a){return'var t=this;t.b(i=i||"");'+a+"return t.fl();"},a.template=a.Template,a.makeTemplate=function(a,b,c){var d=this.makePartials(a);
  1038. return d.code=new Function("c","p","i",this.wrapMain(a.code)),new this.template(d,b,this,c)},a.makePartials=function(a){var b,c={subs:{},partials:a.partials,name:a.name};
  1039. for(b in c.partials)c.partials[b]=this.makePartials(c.partials[b]);
  1040. for(b in a.subs)c.subs[b]=new Function("c","p","t","i",a.subs[b]);
  1041. return c},a.codegen={"#":function(b,c){c.code+="if(t.s(t."+k(b.n)+'("'+j(b.n)+'",c,p,1),c,p,0,'+b.i+","+b.end+',"'+b.otag+" "+b.ctag+'")){t.rs(c,p,function(c,p,t){',a.walk(b.nodes,c),c.code+="});c.pop();}"},"^":function(b,c){c.code+="if(!t.s(t."+k(b.n)+'("'+j(b.n)+'",c,p,1),c,p,1,0,0,"")){',a.walk(b.nodes,c),c.code+="};
  1042. "},">":l,"<":function(b,c){var d={partials:{},code:"",subs:{},inPartial:!0};a.walk(b.nodes,d);var e=c.partials[l(b,c)];e.subs=d.subs,e.partials=d.partials},$:function(b,c){var d={subs:{},code:"",partials:c.partials,prefix:b.n};a.walk(b.nodes,d),c.subs[b.n]=d.code,c.inPartial||(c.code+='t.sub("'+j(b.n)+'",c,p,i);
  1043. ')},"\n":function(a,b){b.code+=n('"\\n"'+(a.last?"":" + i"))},_v:function(a,b){b.code+="t.b(t.v(t."+k(a.n)+'("'+j(a.n)+'",c,p,0)));
  1044. '},_t:function(a,b){b.code+=n('"'+j(a.text)+'"')},"{":m,"&":m},a.walk=function(b,c){for(var d,e=0,f=b.length;f>e;e++)d=a.codegen[b[e].tag],d&&d(b[e],c);return c},a.parse=function(a,b,c){return c=c||{},e(a,"",[],c.sectionTags||[])},a.cache={},a.cacheKey=function(a,b){return[a,!!b.asString,!!b.disableLambda,b.delimiters,!!b.modelGet].join("||")},a.compile=function(b,c){c=c||{};
  1045. var d=a.cacheKey(b,c),e=this.cache[d];
  1046. if(e){var f=e.partials;
  1047. for(var g in f)delete f[g].instance;
  1048. return e}return e=this.generate(this.parse(this.scan(b,c.delimiters),b,c),b,c),this.cache[d]=e}}("undefined"!=typeof exports?exports:Hogan),!function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");
  1049. return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){function c(a){var b=a.length,c=_.type(a);
  1050. return"function"===c||_.isWindow(a)?!1:1===a.nodeType&&b?!0:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}function d(a,b,c){if(_.isFunction(b))return _.grep(a,function(a,d){return!!b.call(a,d,a)!==c});
  1051. if(b.nodeType)return _.grep(a,function(a){return a===b!==c});
  1052. if("string"==typeof b){if(ha.test(b))return _.filter(b,a,c);
  1053. b=_.filter(b,a)}return _.grep(a,function(a){return U.call(b,a)>=0!==c})}function e(a,b){for(;
  1054. (a=a[b])&&1!==a.nodeType;
  1055. );
  1056. return a}function f(a){var b=oa[a]={};
  1057. return _.each(a.match(na)||[],function(a,c){b[c]=!0}),b}function g(){Z.removeEventListener("DOMContentLoaded",g,!1),a.removeEventListener("load",g,!1),_.ready()}function h(){Object.defineProperty(this.cache={},0,{get:function(){return{}}}),this.expando=_.expando+h.uid++}function i(a,b,c){var d;
  1058. if(void 0===c&&1===a.nodeType)if(d="data-"+b.replace(ua,"-$1").toLowerCase(),c=a.getAttribute(d),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:ta.test(c)?_.parseJSON(c):c}catch(e){}sa.set(a,b,c)}else c=void 0;
  1059. return c}function j(){return!0}function k(){return!1}function l(){try{return Z.activeElement}catch(a){}}function m(a,b){return _.nodeName(a,"table")&&_.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function n(a){return a.type=(null!==a.getAttribute("type"))+"/"+a.type,a}function o(a){var b=Ka.exec(a.type);
  1060. return b?a.type=b[1]:a.removeAttribute("type"),a}function p(a,b){for(var c=0,d=a.length;
  1061. d>c;
  1062. c++)ra.set(a[c],"globalEval",!b||ra.get(b[c],"globalEval"))}function q(a,b){var c,d,e,f,g,h,i,j;
  1063. if(1===b.nodeType){if(ra.hasData(a)&&(f=ra.access(a),g=ra.set(b,f),j=f.events)){delete g.handle,g.events={};
  1064. for(e in j)for(c=0,d=j[e].length;
  1065. d>c;
  1066. c++)_.event.add(b,e,j[e][c])}sa.hasData(a)&&(h=sa.access(a),i=_.extend({},h),sa.set(b,i))}}function r(a,b){var c=a.getElementsByTagName?a.getElementsByTagName(b||"*"):a.querySelectorAll?a.querySelectorAll(b||"*"):[];
  1067. return void 0===b||b&&_.nodeName(a,b)?_.merge([a],c):c}function s(a,b){var c=b.nodeName.toLowerCase();
  1068. "input"===c&&ya.test(a.type)?b.checked=a.checked:("input"===c||"textarea"===c)&&(b.defaultValue=a.defaultValue)}function t(b,c){var d,e=_(c.createElement(b)).appendTo(c.body),f=a.getDefaultComputedStyle&&(d=a.getDefaultComputedStyle(e[0]))?d.display:_.css(e[0],"display");
  1069. return e.detach(),f}function u(a){var b=Z,c=Oa[a];
  1070. return c||(c=t(a,b),"none"!==c&&c||(Na=(Na||_("<iframe frameborder='0' width='0' height='0'/>")).appendTo(b.documentElement),b=Na[0].contentDocument,b.write(),b.close(),c=t(a,b),Na.detach()),Oa[a]=c),c}function v(a,b,c){var d,e,f,g,h=a.style;
  1071. return c=c||Ra(a),c&&(g=c.getPropertyValue(b)||c[b]),c&&(""!==g||_.contains(a.ownerDocument,a)||(g=_.style(a,b)),Qa.test(g)&&Pa.test(b)&&(d=h.width,e=h.minWidth,f=h.maxWidth,h.minWidth=h.maxWidth=h.width=g,g=c.width,h.width=d,h.minWidth=e,h.maxWidth=f)),void 0!==g?g+"":g}function w(a,b){return{get:function(){return a()?void delete this.get:(this.get=b).apply(this,arguments)}}}function x(a,b){if(b in a)return b;
  1072. for(var c=b[0].toUpperCase()+b.slice(1),d=b,e=Xa.length;
  1073. e--;
  1074. )if(b=Xa[e]+c,b in a)return b;
  1075. return d}function y(a,b,c){var d=Ta.exec(b);
  1076. return d?Math.max(0,d[1]-(c||0))+(d[2]||"px"):b}function z(a,b,c,d,e){for(var f=c===(d?"border":"content")?4:"width"===b?1:0,g=0;
  1077. 4>f;
  1078. f+=2)"margin"===c&&(g+=_.css(a,c+wa[f],!0,e)),d?("content"===c&&(g-=_.css(a,"padding"+wa[f],!0,e)),"margin"!==c&&(g-=_.css(a,"border"+wa[f]+"Width",!0,e))):(g+=_.css(a,"padding"+wa[f],!0,e),"padding"!==c&&(g+=_.css(a,"border"+wa[f]+"Width",!0,e)));
  1079. return g}function A(a,b,c){var d=!0,e="width"===b?a.offsetWidth:a.offsetHeight,f=Ra(a),g="border-box"===_.css(a,"boxSizing",!1,f);
  1080. if(0>=e||null==e){if(e=v(a,b,f),(0>e||null==e)&&(e=a.style[b]),Qa.test(e))return e;
  1081. d=g&&(Y.boxSizingReliable()||e===a.style[b]),e=parseFloat(e)||0}return e+z(a,b,c||(g?"border":"content"),d,f)+"px"}function B(a,b){for(var c,d,e,f=[],g=0,h=a.length;
  1082. h>g;
  1083. g++)d=a[g],d.style&&(f[g]=ra.get(d,"olddisplay"),c=d.style.display,b?(f[g]||"none"!==c||(d.style.display=""),""===d.style.display&&xa(d)&&(f[g]=ra.access(d,"olddisplay",u(d.nodeName)))):(e=xa(d),"none"===c&&e||ra.set(d,"olddisplay",e?c:_.css(d,"display"))));
  1084. for(g=0;
  1085. h>g;
  1086. g++)d=a[g],d.style&&(b&&"none"!==d.style.display&&""!==d.style.display||(d.style.display=b?f[g]||"":"none"));
  1087. return a}function C(a,b,c,d,e){return new C.prototype.init(a,b,c,d,e)}function D(){return setTimeout(function(){Ya=void 0}),Ya=_.now()}function E(a,b){var c,d=0,e={height:a};
  1088. for(b=b?1:0;
  1089. 4>d;
  1090. d+=2-b)c=wa[d],e["margin"+c]=e["padding"+c]=a;
  1091. return b&&(e.opacity=e.width=a),e}function F(a,b,c){for(var d,e=(cb[b]||[]).concat(cb["*"]),f=0,g=e.length;
  1092. g>f;
  1093. f++)if(d=e[f].call(c,b,a))return d}function G(a,b,c){var d,e,f,g,h,i,j,k,l=this,m={},n=a.style,o=a.nodeType&&xa(a),p=ra.get(a,"fxshow");
  1094. c.queue||(h=_._queueHooks(a,"fx"),null==h.unqueued&&(h.unqueued=0,i=h.empty.fire,h.empty.fire=function(){h.unqueued||i()}),h.unqueued++,l.always(function(){l.always(function(){h.unqueued--,_.queue(a,"fx").length||h.empty.fire()})})),1===a.nodeType&&("height"in b||"width"in b)&&(c.overflow=[n.overflow,n.overflowX,n.overflowY],j=_.css(a,"display"),k="none"===j?ra.get(a,"olddisplay")||u(a.nodeName):j,"inline"===k&&"none"===_.css(a,"float")&&(n.display="inline-block")),c.overflow&&(n.overflow="hidden",l.always(function(){n.overflow=c.overflow[0],n.overflowX=c.overflow[1],n.overflowY=c.overflow[2]}));
  1095. for(d in b)if(e=b[d],$a.exec(e)){if(delete b[d],f=f||"toggle"===e,e===(o?"hide":"show")){if("show"!==e||!p||void 0===p[d])continue;
  1096. o=!0}m[d]=p&&p[d]||_.style(a,d)}else j=void 0;
  1097. if(_.isEmptyObject(m))"inline"===("none"===j?u(a.nodeName):j)&&(n.display=j);
  1098. else{p?"hidden"in p&&(o=p.hidden):p=ra.access(a,"fxshow",{}),f&&(p.hidden=!o),o?_(a).show():l.done(function(){_(a).hide()}),l.done(function(){var b;
  1099. ra.remove(a,"fxshow");
  1100. for(b in m)_.style(a,b,m[b])});
  1101. for(d in m)g=F(o?p[d]:0,d,l),d in p||(p[d]=g.start,o&&(g.end=g.start,g.start="width"===d||"height"===d?1:0))}}function H(a,b){var c,d,e,f,g;
  1102. for(c in a)if(d=_.camelCase(c),e=b[d],f=a[c],_.isArray(f)&&(e=f[1],f=a[c]=f[0]),c!==d&&(a[d]=f,delete a[c]),g=_.cssHooks[d],g&&"expand"in g){f=g.expand(f),delete a[d];
  1103. for(c in f)c in a||(a[c]=f[c],b[c]=e)}else b[d]=e}function I(a,b,c){var d,e,f=0,g=bb.length,h=_.Deferred().always(function(){delete i.elem}),i=function(){if(e)return!1;
  1104. for(var b=Ya||D(),c=Math.max(0,j.startTime+j.duration-b),d=c/j.duration||0,f=1-d,g=0,i=j.tweens.length;
  1105. i>g;
  1106. g++)j.tweens[g].run(f);
  1107. return h.notifyWith(a,[j,f,c]),1>f&&i?c:(h.resolveWith(a,[j]),!1)},j=h.promise({elem:a,props:_.extend({},b),opts:_.extend(!0,{specialEasing:{}},c),originalProperties:b,originalOptions:c,startTime:Ya||D(),duration:c.duration,tweens:[],createTween:function(b,c){var d=_.Tween(a,j.opts,b,c,j.opts.specialEasing[b]||j.opts.easing);
  1108. return j.tweens.push(d),d},stop:function(b){var c=0,d=b?j.tweens.length:0;
  1109. if(e)return this;
  1110. for(e=!0;
  1111. d>c;
  1112. c++)j.tweens[c].run(1);
  1113. return b?h.resolveWith(a,[j,b]):h.rejectWith(a,[j,b]),this}}),k=j.props;
  1114. for(H(k,j.opts.specialEasing);
  1115. g>f;
  1116. f++)if(d=bb[f].call(j,a,k,j.opts))return d;
  1117. return _.map(k,F,j),_.isFunction(j.opts.start)&&j.opts.start.call(a,j),_.fx.timer(_.extend(i,{elem:a,anim:j,queue:j.opts.queue})),j.progress(j.opts.progress).done(j.opts.done,j.opts.complete).fail(j.opts.fail).always(j.opts.always)}function J(a){return function(b,c){"string"!=typeof b&&(c=b,b="*");
  1118. var d,e=0,f=b.toLowerCase().match(na)||[];
  1119. if(_.isFunction(c))for(;
  1120. d=f[e++];
  1121. )"+"===d[0]?(d=d.slice(1)||"*",(a[d]=a[d]||[]).unshift(c)):(a[d]=a[d]||[]).push(c)}}function K(a,b,c,d){function e(h){var i;
  1122. return f[h]=!0,_.each(a[h]||[],function(a,h){var j=h(b,c,d);
  1123. return"string"!=typeof j||g||f[j]?g?!(i=j):void 0:(b.dataTypes.unshift(j),e(j),!1)}),i}var f={},g=a===tb;
  1124. return e(b.dataTypes[0])||!f["*"]&&e("*")}function L(a,b){var c,d,e=_.ajaxSettings.flatOptions||{};
  1125. for(c in b)void 0!==b[c]&&((e[c]?a:d||(d={}))[c]=b[c]);
  1126. return d&&_.extend(!0,a,d),a}function M(a,b,c){for(var d,e,f,g,h=a.contents,i=a.dataTypes;
  1127. "*"===i[0];
  1128. )i.shift(),void 0===d&&(d=a.mimeType||b.getResponseHeader("Content-Type"));
  1129. if(d)for(e in h)if(h[e]&&h[e].test(d)){i.unshift(e);
  1130. break}if(i[0]in c)f=i[0];
  1131. else{for(e in c){if(!i[0]||a.converters[e+" "+i[0]]){f=e;
  1132. break}g||(g=e)}f=f||g}return f?(f!==i[0]&&i.unshift(f),c[f]):void 0}function N(a,b,c,d){var e,f,g,h,i,j={},k=a.dataTypes.slice();
  1133. if(k[1])for(g in a.converters)j[g.toLowerCase()]=a.converters[g];
  1134. for(f=k.shift();
  1135. f;
  1136. )if(a.responseFields[f]&&(c[a.responseFields[f]]=b),!i&&d&&a.dataFilter&&(b=a.dataFilter(b,a.dataType)),i=f,f=k.shift())if("*"===f)f=i;
  1137. else if("*"!==i&&i!==f){if(g=j[i+" "+f]||j["* "+f],!g)for(e in j)if(h=e.split(" "),h[1]===f&&(g=j[i+" "+h[0]]||j["* "+h[0]])){g===!0?g=j[e]:j[e]!==!0&&(f=h[0],k.unshift(h[1]));
  1138. break}if(g!==!0)if(g&&a["throws"])b=g(b);
  1139. else try{b=g(b)}catch(l){return{state:"parsererror",error:g?l:"No conversion from "+i+" to "+f}}}return{state:"success",data:b}}function O(a,b,c,d){var e;
  1140. if(_.isArray(b))_.each(b,function(b,e){c||yb.test(a)?d(a,e):O(a+"["+("object"==typeof e?b:"")+"]",e,c,d)});
  1141. else if(c||"object"!==_.type(b))d(a,b);
  1142. else for(e in b)O(a+"["+e+"]",b[e],c,d)}function P(a){return _.isWindow(a)?a:9===a.nodeType&&a.defaultView}var Q=[],R=Q.slice,S=Q.concat,T=Q.push,U=Q.indexOf,V={},W=V.toString,X=V.hasOwnProperty,Y={},Z=a.document,$="2.1.3",_=function(a,b){return new _.fn.init(a,b)},aa=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,ba=/^-ms-/,ca=/-([\da-z])/gi,da=function(a,b){return b.toUpperCase()};
  1143. _.fn=_.prototype={jquery:$,constructor:_,selector:"",length:0,toArray:function(){return R.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:R.call(this)},pushStack:function(a){var b=_.merge(this.constructor(),a);
  1144. return b.prevObject=this,b.context=this.context,b},each:function(a,b){return _.each(this,a,b)},map:function(a){return this.pushStack(_.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(R.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(0>a?b:0);
  1145. return this.pushStack(c>=0&&b>c?[this[c]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:T,sort:Q.sort,splice:Q.splice},_.extend=_.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;
  1146. for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||_.isFunction(g)||(g={}),h===i&&(g=this,h--);
  1147. i>h;
  1148. h++)if(null!=(a=arguments[h]))for(b in a)c=g[b],d=a[b],g!==d&&(j&&d&&(_.isPlainObject(d)||(e=_.isArray(d)))?(e?(e=!1,f=c&&_.isArray(c)?c:[]):f=c&&_.isPlainObject(c)?c:{},g[b]=_.extend(j,f,d)):void 0!==d&&(g[b]=d));
  1149. return g},_.extend({expando:"jQuery"+($+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===_.type(a)},isArray:Array.isArray,isWindow:function(a){return null!=a&&a===a.window},isNumeric:function(a){return!_.isArray(a)&&a-parseFloat(a)+1>=0},isPlainObject:function(a){return"object"!==_.type(a)||a.nodeType||_.isWindow(a)?!1:!a.constructor||X.call(a.constructor.prototype,"isPrototypeOf")},isEmptyObject:function(a){var b;
  1150. for(b in a)return!1;
  1151. return!0},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?V[W.call(a)]||"object":typeof a},globalEval:function(a){var b,c=eval;
  1152. a=_.trim(a),a&&(1===a.indexOf("use strict")?(b=Z.createElement("script"),b.text=a,Z.head.appendChild(b).parentNode.removeChild(b)):c(a))},camelCase:function(a){return a.replace(ba,"ms-").replace(ca,da)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b,d){var e,f=0,g=a.length,h=c(a);
  1153. if(d){if(h)for(;
  1154. g>f&&(e=b.apply(a[f],d),e!==!1);
  1155. f++);
  1156. else for(f in a)if(e=b.apply(a[f],d),e===!1)break}else if(h)for(;
  1157. g>f&&(e=b.call(a[f],f,a[f]),e!==!1);
  1158. f++);
  1159. else for(f in a)if(e=b.call(a[f],f,a[f]),e===!1)break;
  1160. return a},trim:function(a){return null==a?"":(a+"").replace(aa,"")},makeArray:function(a,b){var d=b||[];
  1161. return null!=a&&(c(Object(a))?_.merge(d,"string"==typeof a?[a]:a):T.call(d,a)),d},inArray:function(a,b,c){return null==b?-1:U.call(b,a,c)},merge:function(a,b){for(var c=+b.length,d=0,e=a.length;
  1162. c>d;
  1163. d++)a[e++]=b[d];
  1164. return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;
  1165. g>f;
  1166. f++)d=!b(a[f],f),d!==h&&e.push(a[f]);
  1167. return e},map:function(a,b,d){var e,f=0,g=a.length,h=c(a),i=[];
  1168. if(h)for(;
  1169. g>f;
  1170. f++)e=b(a[f],f,d),null!=e&&i.push(e);
  1171. else for(f in a)e=b(a[f],f,d),null!=e&&i.push(e);
  1172. return S.apply([],i)},guid:1,proxy:function(a,b){var c,d,e;
  1173. return"string"==typeof b&&(c=a[b],b=a,a=c),_.isFunction(a)?(d=R.call(arguments,2),e=function(){return a.apply(b||this,d.concat(R.call(arguments)))},e.guid=a.guid=a.guid||_.guid++,e):void 0},now:Date.now,support:Y}),_.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(a,b){V["[object "+b+"]"]=b.toLowerCase()});
  1174. var ea=function(a){function b(a,b,c,d){var e,f,g,h,i,j,l,n,o,p;
  1175. if((b?b.ownerDocument||b:O)!==G&&F(b),b=b||G,c=c||[],h=b.nodeType,"string"!=typeof a||!a||1!==h&&9!==h&&11!==h)return c;
  1176. if(!d&&I){if(11!==h&&(e=sa.exec(a)))if(g=e[1]){if(9===h){if(f=b.getElementById(g),!f||!f.parentNode)return c;
  1177. if(f.id===g)return c.push(f),c}else if(b.ownerDocument&&(f=b.ownerDocument.getElementById(g))&&M(b,f)&&f.id===g)return c.push(f),c}else{if(e[2])return $.apply(c,b.getElementsByTagName(a)),c;
  1178. if((g=e[3])&&v.getElementsByClassName)return $.apply(c,b.getElementsByClassName(g)),c}if(v.qsa&&(!J||!J.test(a))){if(n=l=N,o=b,p=1!==h&&a,1===h&&"object"!==b.nodeName.toLowerCase()){for(j=z(a),(l=b.getAttribute("id"))?n=l.replace(ua,"\\$&"):b.setAttribute("id",n),
  1179. n="[id='"+n+"'] ",i=j.length;
  1180. i--;
  1181. )j[i]=n+m(j[i]);
  1182. o=ta.test(a)&&k(b.parentNode)||b,p=j.join(",")}if(p)try{return $.apply(c,o.querySelectorAll(p)),c}catch(q){}finally{l||b.removeAttribute("id")}}}return B(a.replace(ia,"$1"),b,c,d)}function c(){function a(c,d){return b.push(c+" ")>w.cacheLength&&delete a[b.shift()],a[c+" "]=d}var b=[];
  1183. return a}function d(a){return a[N]=!0,a}function e(a){var b=G.createElement("div");
  1184. try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function f(a,b){for(var c=a.split("|"),d=a.length;
  1185. d--;
  1186. )w.attrHandle[c[d]]=b}function g(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||V)-(~a.sourceIndex||V);
  1187. if(d)return d;
  1188. if(c)for(;
  1189. c=c.nextSibling;
  1190. )if(c===b)return-1;
  1191. return a?1:-1}function h(a){return function(b){var c=b.nodeName.toLowerCase();
  1192. return"input"===c&&b.type===a}}function i(a){return function(b){var c=b.nodeName.toLowerCase();
  1193. return("input"===c||"button"===c)&&b.type===a}}function j(a){return d(function(b){return b=+b,d(function(c,d){for(var e,f=a([],c.length,b),g=f.length;
  1194. g--;
  1195. )c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function k(a){return a&&"undefined"!=typeof a.getElementsByTagName&&a}function l(){}function m(a){for(var b=0,c=a.length,d="";
  1196. c>b;
  1197. b++)d+=a[b].value;
  1198. return d}function n(a,b,c){var d=b.dir,e=c&&"parentNode"===d,f=Q++;
  1199. return b.first?function(b,c,f){for(;
  1200. b=b[d];
  1201. )if(1===b.nodeType||e)return a(b,c,f)}:function(b,c,g){var h,i,j=[P,f];
  1202. if(g){for(;
  1203. b=b[d];
  1204. )if((1===b.nodeType||e)&&a(b,c,g))return!0}else for(;
  1205. b=b[d];
  1206. )if(1===b.nodeType||e){if(i=b[N]||(b[N]={}),(h=i[d])&&h[0]===P&&h[1]===f)return j[2]=h[2];
  1207. if(i[d]=j,j[2]=a(b,c,g))return!0}}}function o(a){return a.length>1?function(b,c,d){for(var e=a.length;
  1208. e--;
  1209. )if(!a[e](b,c,d))return!1;
  1210. return!0}:a[0]}function p(a,c,d){for(var e=0,f=c.length;
  1211. f>e;
  1212. e++)b(a,c[e],d);
  1213. return d}function q(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;
  1214. i>h;
  1215. h++)(f=a[h])&&(!c||c(f,d,e))&&(g.push(f),j&&b.push(h));
  1216. return g}function r(a,b,c,e,f,g){return e&&!e[N]&&(e=r(e)),f&&!f[N]&&(f=r(f,g)),d(function(d,g,h,i){var j,k,l,m=[],n=[],o=g.length,r=d||p(b||"*",h.nodeType?[h]:h,[]),s=!a||!d&&b?r:q(r,m,a,h,i),t=c?f||(d?a:o||e)?[]:g:s;
  1217. if(c&&c(s,t,h,i),e)for(j=q(t,n),e(j,[],h,i),k=j.length;
  1218. k--;
  1219. )(l=j[k])&&(t[n[k]]=!(s[n[k]]=l));
  1220. if(d){if(f||a){if(f){for(j=[],k=t.length;
  1221. k--;
  1222. )(l=t[k])&&j.push(s[k]=l);
  1223. f(null,t=[],j,i)}for(k=t.length;
  1224. k--;
  1225. )(l=t[k])&&(j=f?aa(d,l):m[k])>-1&&(d[j]=!(g[j]=l))}}else t=q(t===g?t.splice(o,t.length):t),f?f(null,g,t,i):$.apply(g,t)})}function s(a){for(var b,c,d,e=a.length,f=w.relative[a[0].type],g=f||w.relative[" "],h=f?1:0,i=n(function(a){return a===b},g,!0),j=n(function(a){return aa(b,a)>-1},g,!0),k=[function(a,c,d){var e=!f&&(d||c!==C)||((b=c).nodeType?i(a,c,d):j(a,c,d));
  1226. return b=null,e}];
  1227. e>h;
  1228. h++)if(c=w.relative[a[h].type])k=[n(o(k),c)];
  1229. else{if(c=w.filter[a[h].type].apply(null,a[h].matches),c[N]){for(d=++h;
  1230. e>d&&!w.relative[a[d].type];
  1231. d++);
  1232. return r(h>1&&o(k),h>1&&m(a.slice(0,h-1).concat({value:" "===a[h-2].type?"*":""})).replace(ia,"$1"),c,d>h&&s(a.slice(h,d)),e>d&&s(a=a.slice(d)),e>d&&m(a))}k.push(c)}return o(k)}function t(a,c){var e=c.length>0,f=a.length>0,g=function(d,g,h,i,j){var k,l,m,n=0,o="0",p=d&&[],r=[],s=C,t=d||f&&w.find.TAG("*",j),u=P+=null==s?1:Math.random()||.1,v=t.length;
  1233. for(j&&(C=g!==G&&g);
  1234. o!==v&&null!=(k=t[o]);
  1235. o++){if(f&&k){for(l=0;
  1236. m=a[l++];
  1237. )if(m(k,g,h)){i.push(k);
  1238. break}j&&(P=u)}e&&((k=!m&&k)&&n--,d&&p.push(k))}if(n+=o,e&&o!==n){for(l=0;
  1239. m=c[l++];
  1240. )m(p,r,g,h);
  1241. if(d){if(n>0)for(;
  1242. o--;
  1243. )p[o]||r[o]||(r[o]=Y.call(i));
  1244. r=q(r)}$.apply(i,r),j&&!d&&r.length>0&&n+c.length>1&&b.uniqueSort(i)}return j&&(P=u,C=s),p};
  1245. return e?d(g):g}var u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N="sizzle"+1*new Date,O=a.document,P=0,Q=0,R=c(),S=c(),T=c(),U=function(a,b){return a===b&&(E=!0),0},V=1<<31,W={}.hasOwnProperty,X=[],Y=X.pop,Z=X.push,$=X.push,_=X.slice,aa=function(a,b){for(var c=0,d=a.length;
  1246. d>c;
  1247. c++)if(a[c]===b)return c;
  1248. return-1},ba="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",ca="[\\x20\\t\\r\\n\\f]",da="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",ea=da.replace("w","w#"),fa="\\["+ca+"*("+da+")(?:"+ca+"*([*^$|!~]?=)"+ca+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+ea+"))|)"+ca+"*\\]",ga=":("+da+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+fa+")*)|.*)\\)|)",ha=new RegExp(ca+"+","g"),ia=new RegExp("^"+ca+"+|((?:^|[^\\\\])(?:\\\\.)*)"+ca+"+$","g"),ja=new RegExp("^"+ca+"*,"+ca+"*"),ka=new RegExp("^"+ca+"*([>+~]|"+ca+")"+ca+"*"),la=new RegExp("="+ca+"*([^\\]'\"]*?)"+ca+"*\\]","g"),ma=new RegExp(ga),na=new RegExp("^"+ea+"$"),oa={ID:new RegExp("^#("+da+")"),CLASS:new RegExp("^\\.("+da+")"),TAG:new RegExp("^("+da.replace("w","w*")+")"),ATTR:new RegExp("^"+fa),PSEUDO:new RegExp("^"+ga),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+ca+"*(even|odd|(([+-]|)(\\d*)n|)"+ca+"*(?:([+-]|)"+ca+"*(\\d+)|))"+ca+"*\\)|)","i"),bool:new RegExp("^(?:"+ba+")$","i"),needsContext:new RegExp("^"+ca+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+ca+"*((?:-\\d)?\\d*)"+ca+"*\\)|)(?=[^-]|$)","i")},pa=/^(?:input|select|textarea|button)$/i,qa=/^h\d$/i,ra=/^[^{]+\{\s*\[native \w/,sa=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ta=/[+~]/,ua=/'|\\/g,va=new RegExp("\\\\([\\da-f]{1,6}"+ca+"?|("+ca+")|.)","ig"),wa=function(a,b,c){var d="0x"+b-65536;
  1249. return d!==d||c?b:0>d?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)},xa=function(){F()};
  1250. try{$.apply(X=_.call(O.childNodes),O.childNodes),X[O.childNodes.length].nodeType}catch(ya){$={apply:X.length?function(a,b){Z.apply(a,_.call(b))}:function(a,b){for(var c=a.length,d=0;
  1251. a[c++]=b[d++];
  1252. );
  1253. a.length=c-1}}}v=b.support={},y=b.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;
  1254. return b?"HTML"!==b.nodeName:!1},F=b.setDocument=function(a){var b,c,d=a?a.ownerDocument||a:O;
  1255. return d!==G&&9===d.nodeType&&d.documentElement?(G=d,H=d.documentElement,c=d.defaultView,c&&c!==c.top&&(c.addEventListener?c.addEventListener("unload",xa,!1):c.attachEvent&&c.attachEvent("onunload",xa)),I=!y(d),v.attributes=e(function(a){return a.className="i",!a.getAttribute("className")}),v.getElementsByTagName=e(function(a){return a.appendChild(d.createComment("")),!a.getElementsByTagName("*").length}),v.getElementsByClassName=ra.test(d.getElementsByClassName),v.getById=e(function(a){return H.appendChild(a).id=N,!d.getElementsByName||!d.getElementsByName(N).length}),v.getById?(w.find.ID=function(a,b){if("undefined"!=typeof b.getElementById&&I){var c=b.getElementById(a);
  1256. return c&&c.parentNode?[c]:[]}},w.filter.ID=function(a){var b=a.replace(va,wa);
  1257. return function(a){return a.getAttribute("id")===b}}):(delete w.find.ID,w.filter.ID=function(a){var b=a.replace(va,wa);
  1258. return function(a){var c="undefined"!=typeof a.getAttributeNode&&a.getAttributeNode("id");
  1259. return c&&c.value===b}}),w.find.TAG=v.getElementsByTagName?function(a,b){return"undefined"!=typeof b.getElementsByTagName?b.getElementsByTagName(a):v.qsa?b.querySelectorAll(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);
  1260. if("*"===a){for(;
  1261. c=f[e++];
  1262. )1===c.nodeType&&d.push(c);
  1263. return d}return f},w.find.CLASS=v.getElementsByClassName&&function(a,b){return I?b.getElementsByClassName(a):void 0},K=[],J=[],(v.qsa=ra.test(d.querySelectorAll))&&(e(function(a){H.appendChild(a).innerHTML="<a id='"+N+"'></a><select id='"+N+"-\f]' msallowcapture=''><option selected=''></option></select>",a.querySelectorAll("[msallowcapture^='']").length&&J.push("[*^$]="+ca+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||J.push("\\["+ca+"*(?:value|"+ba+")"),a.querySelectorAll("[id~="+N+"-]").length||J.push("~="),a.querySelectorAll(":checked").length||J.push(":checked"),a.querySelectorAll("a#"+N+"+*").length||J.push(".#.+[+~]")}),e(function(a){var b=d.createElement("input");
  1264. b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&J.push("name"+ca+"*[*^$|!~]?="),a.querySelectorAll(":enabled").length||J.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),J.push(",.*:")})),(v.matchesSelector=ra.test(L=H.matches||H.webkitMatchesSelector||H.mozMatchesSelector||H.oMatchesSelector||H.msMatchesSelector))&&e(function(a){v.disconnectedMatch=L.call(a,"div"),L.call(a,"[s!='']:x"),K.push("!=",ga)}),J=J.length&&new RegExp(J.join("|")),K=K.length&&new RegExp(K.join("|")),b=ra.test(H.compareDocumentPosition),M=b||ra.test(H.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;
  1265. return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)for(;
  1266. b=b.parentNode;
  1267. )if(b===a)return!0;
  1268. return!1},U=b?function(a,b){if(a===b)return E=!0,0;
  1269. var c=!a.compareDocumentPosition-!b.compareDocumentPosition;
  1270. return c?c:(c=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&c||!v.sortDetached&&b.compareDocumentPosition(a)===c?a===d||a.ownerDocument===O&&M(O,a)?-1:b===d||b.ownerDocument===O&&M(O,b)?1:D?aa(D,a)-aa(D,b):0:4&c?-1:1)}:function(a,b){if(a===b)return E=!0,0;
  1271. var c,e=0,f=a.parentNode,h=b.parentNode,i=[a],j=[b];
  1272. if(!f||!h)return a===d?-1:b===d?1:f?-1:h?1:D?aa(D,a)-aa(D,b):0;
  1273. if(f===h)return g(a,b);
  1274. for(c=a;
  1275. c=c.parentNode;
  1276. )i.unshift(c);
  1277. for(c=b;
  1278. c=c.parentNode;
  1279. )j.unshift(c);
  1280. for(;
  1281. i[e]===j[e];
  1282. )e++;
  1283. return e?g(i[e],j[e]):i[e]===O?-1:j[e]===O?1:0},d):G},b.matches=function(a,c){return b(a,null,null,c)},b.matchesSelector=function(a,c){if((a.ownerDocument||a)!==G&&F(a),c=c.replace(la,"='$1']"),!(!v.matchesSelector||!I||K&&K.test(c)||J&&J.test(c)))try{var d=L.call(a,c);
  1284. if(d||v.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return b(c,G,null,[a]).length>0},b.contains=function(a,b){return(a.ownerDocument||a)!==G&&F(a),M(a,b)},b.attr=function(a,b){(a.ownerDocument||a)!==G&&F(a);
  1285. var c=w.attrHandle[b.toLowerCase()],d=c&&W.call(w.attrHandle,b.toLowerCase())?c(a,b,!I):void 0;
  1286. return void 0!==d?d:v.attributes||!I?a.getAttribute(b):(d=a.getAttributeNode(b))&&d.specified?d.value:null},b.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},b.uniqueSort=function(a){var b,c=[],d=0,e=0;
  1287. if(E=!v.detectDuplicates,D=!v.sortStable&&a.slice(0),a.sort(U),E){for(;
  1288. b=a[e++];
  1289. )b===a[e]&&(d=c.push(e));
  1290. for(;
  1291. d--;
  1292. )a.splice(c[d],1)}return D=null,a},x=b.getText=function(a){var b,c="",d=0,e=a.nodeType;
  1293. if(e){if(1===e||9===e||11===e){if("string"==typeof a.textContent)return a.textContent;
  1294. for(a=a.firstChild;
  1295. a;
  1296. a=a.nextSibling)c+=x(a)}else if(3===e||4===e)return a.nodeValue}else for(;
  1297. b=a[d++];
  1298. )c+=x(b);
  1299. return c},w=b.selectors={cacheLength:50,createPseudo:d,match:oa,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(va,wa),a[3]=(a[3]||a[4]||a[5]||"").replace(va,wa),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||b.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&b.error(a[0]),a},PSEUDO:function(a){var b,c=!a[6]&&a[2];
  1300. return oa.CHILD.test(a[0])?null:(a[3]?a[2]=a[4]||a[5]||"":c&&ma.test(c)&&(b=z(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(va,wa).toLowerCase();
  1301. return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=R[a+" "];
  1302. return b||(b=new RegExp("(^|"+ca+")"+a+"("+ca+"|$)"))&&R(a,function(a){return b.test("string"==typeof a.className&&a.className||"undefined"!=typeof a.getAttribute&&a.getAttribute("class")||"")})},ATTR:function(a,c,d){return function(e){var f=b.attr(e,a);
  1303. return null==f?"!="===c:c?(f+="","="===c?f===d:"!="===c?f!==d:"^="===c?d&&0===f.indexOf(d):"*="===c?d&&f.indexOf(d)>-1:"$="===c?d&&f.slice(-d.length)===d:"~="===c?(" "+f.replace(ha," ")+" ").indexOf(d)>-1:"|="===c?f===d||f.slice(0,d.length+1)===d+"-":!1):!0}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;
  1304. return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),s=!i&&!h;
  1305. if(q){if(f){for(;
  1306. p;
  1307. ){for(l=b;
  1308. l=l[p];
  1309. )if(h?l.nodeName.toLowerCase()===r:1===l.nodeType)return!1;
  1310. o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&s){for(k=q[N]||(q[N]={}),j=k[a]||[],n=j[0]===P&&j[1],m=j[0]===P&&j[2],l=n&&q.childNodes[n];
  1311. l=++n&&l&&l[p]||(m=n=0)||o.pop();
  1312. )if(1===l.nodeType&&++m&&l===b){k[a]=[P,n,m];
  1313. break}}else if(s&&(j=(b[N]||(b[N]={}))[a])&&j[0]===P)m=j[1];
  1314. else for(;
  1315. (l=++n&&l&&l[p]||(m=n=0)||o.pop())&&((h?l.nodeName.toLowerCase()!==r:1!==l.nodeType)||!++m||(s&&((l[N]||(l[N]={}))[a]=[P,m]),l!==b));
  1316. );
  1317. return m-=e,m===d||m%d===0&&m/d>=0}}},PSEUDO:function(a,c){var e,f=w.pseudos[a]||w.setFilters[a.toLowerCase()]||b.error("unsupported pseudo: "+a);
  1318. return f[N]?f(c):f.length>1?(e=[a,a,"",c],w.setFilters.hasOwnProperty(a.toLowerCase())?d(function(a,b){for(var d,e=f(a,c),g=e.length;
  1319. g--;
  1320. )d=aa(a,e[g]),a[d]=!(b[d]=e[g])}):function(a){return f(a,0,e)}):f}},pseudos:{not:d(function(a){var b=[],c=[],e=A(a.replace(ia,"$1"));
  1321. return e[N]?d(function(a,b,c,d){for(var f,g=e(a,null,d,[]),h=a.length;
  1322. h--;
  1323. )(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,d,f){return b[0]=a,e(b,null,f,c),b[0]=null,!c.pop()}}),has:d(function(a){return function(c){return b(a,c).length>0}}),contains:d(function(a){return a=a.replace(va,wa),function(b){return(b.textContent||b.innerText||x(b)).indexOf(a)>-1}}),lang:d(function(a){return na.test(a||"")||b.error("unsupported lang: "+a),a=a.replace(va,wa).toLowerCase(),function(b){var c;
  1324. do if(c=I?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");
  1325. while((b=b.parentNode)&&1===b.nodeType);
  1326. return!1}}),target:function(b){var c=a.location&&a.location.hash;
  1327. return c&&c.slice(1)===b.id},root:function(a){return a===H},focus:function(a){return a===G.activeElement&&(!G.hasFocus||G.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();
  1328. return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;
  1329. a;
  1330. a=a.nextSibling)if(a.nodeType<6)return!1;
  1331. return!0},parent:function(a){return!w.pseudos.empty(a)},header:function(a){return qa.test(a.nodeName)},input:function(a){return pa.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();
  1332. return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;
  1333. return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:j(function(){return[0]}),last:j(function(a,b){return[b-1]}),eq:j(function(a,b,c){return[0>c?c+b:c]}),even:j(function(a,b){for(var c=0;
  1334. b>c;
  1335. c+=2)a.push(c);
  1336. return a}),odd:j(function(a,b){for(var c=1;
  1337. b>c;
  1338. c+=2)a.push(c);
  1339. return a}),lt:j(function(a,b,c){for(var d=0>c?c+b:c;
  1340. --d>=0;
  1341. )a.push(d);
  1342. return a}),gt:j(function(a,b,c){for(var d=0>c?c+b:c;
  1343. ++d<b;
  1344. )a.push(d);
  1345. return a})}},w.pseudos.nth=w.pseudos.eq;
  1346. for(u in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})w.pseudos[u]=h(u);
  1347. for(u in{submit:!0,reset:!0})w.pseudos[u]=i(u);
  1348. return l.prototype=w.filters=w.pseudos,w.setFilters=new l,z=b.tokenize=function(a,c){var d,e,f,g,h,i,j,k=S[a+" "];
  1349. if(k)return c?0:k.slice(0);
  1350. for(h=a,i=[],j=w.preFilter;
  1351. h;
  1352. ){(!d||(e=ja.exec(h)))&&(e&&(h=h.slice(e[0].length)||h),i.push(f=[])),d=!1,(e=ka.exec(h))&&(d=e.shift(),f.push({value:d,type:e[0].replace(ia," ")}),h=h.slice(d.length));
  1353. for(g in w.filter)!(e=oa[g].exec(h))||j[g]&&!(e=j[g](e))||(d=e.shift(),f.push({value:d,type:g,matches:e}),h=h.slice(d.length));
  1354. if(!d)break}return c?h.length:h?b.error(a):S(a,i).slice(0)},A=b.compile=function(a,b){var c,d=[],e=[],f=T[a+" "];
  1355. if(!f){for(b||(b=z(a)),c=b.length;
  1356. c--;
  1357. )f=s(b[c]),f[N]?d.push(f):e.push(f);
  1358. f=T(a,t(e,d)),f.selector=a}return f},B=b.select=function(a,b,c,d){var e,f,g,h,i,j="function"==typeof a&&a,l=!d&&z(a=j.selector||a);
  1359. if(c=c||[],1===l.length){if(f=l[0]=l[0].slice(0),f.length>2&&"ID"===(g=f[0]).type&&v.getById&&9===b.nodeType&&I&&w.relative[f[1].type]){if(b=(w.find.ID(g.matches[0].replace(va,wa),b)||[])[0],!b)return c;
  1360. j&&(b=b.parentNode),a=a.slice(f.shift().value.length)}for(e=oa.needsContext.test(a)?0:f.length;
  1361. e--&&(g=f[e],!w.relative[h=g.type]);
  1362. )if((i=w.find[h])&&(d=i(g.matches[0].replace(va,wa),ta.test(f[0].type)&&k(b.parentNode)||b))){if(f.splice(e,1),a=d.length&&m(f),!a)return $.apply(c,d),c;
  1363. break}}return(j||A(a,l))(d,b,!I,c,ta.test(a)&&k(b.parentNode)||b),c},v.sortStable=N.split("").sort(U).join("")===N,v.detectDuplicates=!!E,F(),v.sortDetached=e(function(a){return 1&a.compareDocumentPosition(G.createElement("div"))}),e(function(a){return a.innerHTML="<a href='#'></a>","#"===a.firstChild.getAttribute("href")})||f("type|href|height|width",function(a,b,c){return c?void 0:a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),v.attributes&&e(function(a){return a.innerHTML="<input/>",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||f("value",function(a,b,c){return c||"input"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),e(function(a){return null==a.getAttribute("disabled")})||f(ba,function(a,b,c){var d;
  1364. return c?void 0:a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),b}(a);
  1365. _.find=ea,_.expr=ea.selectors,_.expr[":"]=_.expr.pseudos,_.unique=ea.uniqueSort,_.text=ea.getText,_.isXMLDoc=ea.isXML,_.contains=ea.contains;
  1366. var fa=_.expr.match.needsContext,ga=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,ha=/^.[^:#\[\.,]*$/;
  1367. _.filter=function(a,b,c){var d=b[0];
  1368. return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?_.find.matchesSelector(d,a)?[d]:[]:_.find.matches(a,_.grep(b,function(a){return 1===a.nodeType}))},_.fn.extend({find:function(a){var b,c=this.length,d=[],e=this;
  1369. if("string"!=typeof a)return this.pushStack(_(a).filter(function(){for(b=0;
  1370. c>b;
  1371. b++)if(_.contains(e[b],this))return!0}));
  1372. for(b=0;
  1373. c>b;
  1374. b++)_.find(a,e[b],d);
  1375. return d=this.pushStack(c>1?_.unique(d):d),d.selector=this.selector?this.selector+" "+a:a,d},filter:function(a){return this.pushStack(d(this,a||[],!1))},not:function(a){return this.pushStack(d(this,a||[],!0))},is:function(a){return!!d(this,"string"==typeof a&&fa.test(a)?_(a):a||[],!1).length}});
  1376. var ia,ja=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,ka=_.fn.init=function(a,b){var c,d;
  1377. if(!a)return this;
  1378. if("string"==typeof a){if(c="<"===a[0]&&">"===a[a.length-1]&&a.length>=3?[null,a,null]:ja.exec(a),!c||!c[1]&&b)return!b||b.jquery?(b||ia).find(a):this.constructor(b).find(a);
  1379. if(c[1]){if(b=b instanceof _?b[0]:b,_.merge(this,_.parseHTML(c[1],b&&b.nodeType?b.ownerDocument||b:Z,!0)),ga.test(c[1])&&_.isPlainObject(b))for(c in b)_.isFunction(this[c])?this[c](b[c]):this.attr(c,b[c]);
  1380. return this}return d=Z.getElementById(c[2]),d&&d.parentNode&&(this.length=1,this[0]=d),this.context=Z,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):_.isFunction(a)?"undefined"!=typeof ia.ready?ia.ready(a):a(_):(void 0!==a.selector&&(this.selector=a.selector,this.context=a.context),_.makeArray(a,this))};
  1381. ka.prototype=_.fn,ia=_(Z);
  1382. var la=/^(?:parents|prev(?:Until|All))/,ma={children:!0,contents:!0,next:!0,prev:!0};
  1383. _.extend({dir:function(a,b,c){for(var d=[],e=void 0!==c;
  1384. (a=a[b])&&9!==a.nodeType;
  1385. )if(1===a.nodeType){if(e&&_(a).is(c))break;
  1386. d.push(a)}return d},sibling:function(a,b){for(var c=[];
  1387. a;
  1388. a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);
  1389. return c}}),_.fn.extend({has:function(a){var b=_(a,this),c=b.length;
  1390. return this.filter(function(){for(var a=0;
  1391. c>a;
  1392. a++)if(_.contains(this,b[a]))return!0})},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=fa.test(a)||"string"!=typeof a?_(a,b||this.context):0;
  1393. e>d;
  1394. d++)for(c=this[d];
  1395. c&&c!==b;
  1396. c=c.parentNode)if(c.nodeType<11&&(g?g.index(c)>-1:1===c.nodeType&&_.find.matchesSelector(c,a))){f.push(c);
  1397. break}return this.pushStack(f.length>1?_.unique(f):f)},index:function(a){return a?"string"==typeof a?U.call(_(a),this[0]):U.call(this,a.jquery?a[0]:a):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(_.unique(_.merge(this.get(),_(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}}),_.each({parent:function(a){var b=a.parentNode;
  1398. return b&&11!==b.nodeType?b:null},parents:function(a){return _.dir(a,"parentNode")},parentsUntil:function(a,b,c){return _.dir(a,"parentNode",c)},next:function(a){return e(a,"nextSibling")},prev:function(a){return e(a,"previousSibling")},nextAll:function(a){return _.dir(a,"nextSibling")},prevAll:function(a){return _.dir(a,"previousSibling")},nextUntil:function(a,b,c){return _.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return _.dir(a,"previousSibling",c)},siblings:function(a){return _.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return _.sibling(a.firstChild)},contents:function(a){return a.contentDocument||_.merge([],a.childNodes)}},function(a,b){_.fn[a]=function(c,d){var e=_.map(this,b,c);
  1399. return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=_.filter(d,e)),this.length>1&&(ma[a]||_.unique(e),la.test(a)&&e.reverse()),this.pushStack(e)}});
  1400. var na=/\S+/g,oa={};
  1401. _.Callbacks=function(a){a="string"==typeof a?oa[a]||f(a):_.extend({},a);
  1402. var b,c,d,e,g,h,i=[],j=!a.once&&[],k=function(f){for(b=a.memory&&f,c=!0,h=e||0,e=0,g=i.length,d=!0;
  1403. i&&g>h;
  1404. h++)if(i[h].apply(f[0],f[1])===!1&&a.stopOnFalse){b=!1;
  1405. break}d=!1,i&&(j?j.length&&k(j.shift()):b?i=[]:l.disable())},l={add:function(){if(i){var c=i.length;
  1406. !function f(b){_.each(b,function(b,c){var d=_.type(c);
  1407. "function"===d?a.unique&&l.has(c)||i.push(c):c&&c.length&&"string"!==d&&f(c)})}(arguments),d?g=i.length:b&&(e=c,k(b))}return this},remove:function(){return i&&_.each(arguments,function(a,b){for(var c;
  1408. (c=_.inArray(b,i,c))>-1;
  1409. )i.splice(c,1),d&&(g>=c&&g--,h>=c&&h--)}),this},has:function(a){return a?_.inArray(a,i)>-1:!(!i||!i.length)},empty:function(){return i=[],g=0,this},disable:function(){return i=j=b=void 0,this},disabled:function(){return!i},lock:function(){return j=void 0,b||l.disable(),this},locked:function(){return!j},fireWith:function(a,b){return!i||c&&!j||(b=b||[],b=[a,b.slice?b.slice():b],d?j.push(b):k(b)),this},fire:function(){return l.fireWith(this,arguments),this},fired:function(){return!!c}};
  1410. return l},_.extend({Deferred:function(a){var b=[["resolve","done",_.Callbacks("once memory"),"resolved"],["reject","fail",_.Callbacks("once memory"),"rejected"],["notify","progress",_.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;
  1411. return _.Deferred(function(c){_.each(b,function(b,f){var g=_.isFunction(a[b])&&a[b];
  1412. e[f[1]](function(){var a=g&&g.apply(this,arguments);
  1413. a&&_.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[f[0]+"With"](this===d?c.promise():this,g?[a]:arguments)})}),a=null}).promise()},promise:function(a){return null!=a?_.extend(a,d):d}},e={};
  1414. return d.pipe=d.then,_.each(b,function(a,f){var g=f[2],h=f[3];
  1415. d[f[1]]=g.add,h&&g.add(function(){c=h},b[1^a][2].disable,b[2][2].lock),e[f[0]]=function(){return e[f[0]+"With"](this===e?d:this,arguments),this},e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b,c,d,e=0,f=R.call(arguments),g=f.length,h=1!==g||a&&_.isFunction(a.promise)?g:0,i=1===h?a:_.Deferred(),j=function(a,c,d){return function(e){c[a]=this,d[a]=arguments.length>1?R.call(arguments):e,d===b?i.notifyWith(c,d):--h||i.resolveWith(c,d)}};
  1416. if(g>1)for(b=new Array(g),c=new Array(g),d=new Array(g);
  1417. g>e;
  1418. e++)f[e]&&_.isFunction(f[e].promise)?f[e].promise().done(j(e,d,f)).fail(i.reject).progress(j(e,c,b)):--h;
  1419. return h||i.resolveWith(d,f),i.promise()}});
  1420. var pa;
  1421. _.fn.ready=function(a){return _.ready.promise().done(a),this},_.extend({isReady:!1,readyWait:1,holdReady:function(a){a?_.readyWait++:_.ready(!0)},ready:function(a){(a===!0?--_.readyWait:_.isReady)||(_.isReady=!0,a!==!0&&--_.readyWait>0||(pa.resolveWith(Z,[_]),_.fn.triggerHandler&&(_(Z).triggerHandler("ready"),_(Z).off("ready"))))}}),_.ready.promise=function(b){return pa||(pa=_.Deferred(),"complete"===Z.readyState?setTimeout(_.ready):(Z.addEventListener("DOMContentLoaded",g,!1),a.addEventListener("load",g,!1))),pa.promise(b)},_.ready.promise();
  1422. var qa=_.access=function(a,b,c,d,e,f,g){var h=0,i=a.length,j=null==c;
  1423. if("object"===_.type(c)){e=!0;
  1424. for(h in c)_.access(a,b,h,c[h],!0,f,g)}else if(void 0!==d&&(e=!0,_.isFunction(d)||(g=!0),j&&(g?(b.call(a,d),b=null):(j=b,b=function(a,b,c){return j.call(_(a),c)})),b))for(;
  1425. i>h;
  1426. h++)b(a[h],c,g?d:d.call(a[h],h,b(a[h],c)));
  1427. return e?a:j?b.call(a):i?b(a[0],c):f};
  1428. _.acceptData=function(a){return 1===a.nodeType||9===a.nodeType||!+a.nodeType},h.uid=1,h.accepts=_.acceptData,h.prototype={key:function(a){if(!h.accepts(a))return 0;
  1429. var b={},c=a[this.expando];
  1430. if(!c){c=h.uid++;
  1431. try{b[this.expando]={value:c},Object.defineProperties(a,b)}catch(d){b[this.expando]=c,_.extend(a,b)}}return this.cache[c]||(this.cache[c]={}),c},set:function(a,b,c){var d,e=this.key(a),f=this.cache[e];
  1432. if("string"==typeof b)f[b]=c;
  1433. else if(_.isEmptyObject(f))_.extend(this.cache[e],b);
  1434. else for(d in b)f[d]=b[d];
  1435. return f},get:function(a,b){var c=this.cache[this.key(a)];
  1436. return void 0===b?c:c[b]},access:function(a,b,c){var d;
  1437. return void 0===b||b&&"string"==typeof b&&void 0===c?(d=this.get(a,b),void 0!==d?d:this.get(a,_.camelCase(b))):(this.set(a,b,c),void 0!==c?c:b)},remove:function(a,b){var c,d,e,f=this.key(a),g=this.cache[f];
  1438. if(void 0===b)this.cache[f]={};
  1439. else{_.isArray(b)?d=b.concat(b.map(_.camelCase)):(e=_.camelCase(b),b in g?d=[b,e]:(d=e,d=d in g?[d]:d.match(na)||[])),c=d.length;
  1440. for(;
  1441. c--;
  1442. )delete g[d[c]]}},hasData:function(a){return!_.isEmptyObject(this.cache[a[this.expando]]||{})},discard:function(a){a[this.expando]&&delete this.cache[a[this.expando]]}};
  1443. var ra=new h,sa=new h,ta=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,ua=/([A-Z])/g;
  1444. _.extend({hasData:function(a){return sa.hasData(a)||ra.hasData(a)},data:function(a,b,c){return sa.access(a,b,c)},removeData:function(a,b){sa.remove(a,b)},_data:function(a,b,c){return ra.access(a,b,c)},_removeData:function(a,b){ra.remove(a,b)}}),_.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;
  1445. if(void 0===a){if(this.length&&(e=sa.get(f),1===f.nodeType&&!ra.get(f,"hasDataAttrs"))){for(c=g.length;
  1446. c--;
  1447. )g[c]&&(d=g[c].name,0===d.indexOf("data-")&&(d=_.camelCase(d.slice(5)),i(f,d,e[d])));
  1448. ra.set(f,"hasDataAttrs",!0)}return e}return"object"==typeof a?this.each(function(){sa.set(this,a)}):qa(this,function(b){var c,d=_.camelCase(a);
  1449. if(f&&void 0===b){if(c=sa.get(f,a),void 0!==c)return c;
  1450. if(c=sa.get(f,d),void 0!==c)return c;
  1451. if(c=i(f,d,void 0),void 0!==c)return c}else this.each(function(){var c=sa.get(this,d);
  1452. sa.set(this,d,b),-1!==a.indexOf("-")&&void 0!==c&&sa.set(this,a,b)})},null,b,arguments.length>1,null,!0)},removeData:function(a){return this.each(function(){sa.remove(this,a)})}}),_.extend({queue:function(a,b,c){var d;
  1453. return a?(b=(b||"fx")+"queue",d=ra.get(a,b),c&&(!d||_.isArray(c)?d=ra.access(a,b,_.makeArray(c)):d.push(c)),d||[]):void 0},dequeue:function(a,b){b=b||"fx";
  1454. var c=_.queue(a,b),d=c.length,e=c.shift(),f=_._queueHooks(a,b),g=function(){_.dequeue(a,b)};
  1455. "inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";
  1456. return ra.get(a,c)||ra.access(a,c,{empty:_.Callbacks("once memory").add(function(){ra.remove(a,[b+"queue",c])})})}}),_.fn.extend({queue:function(a,b){var c=2;
  1457. return"string"!=typeof a&&(b=a,a="fx",c--),arguments.length<c?_.queue(this[0],a):void 0===b?this:this.each(function(){var c=_.queue(this,a,b);
  1458. _._queueHooks(this,a),"fx"===a&&"inprogress"!==c[0]&&_.dequeue(this,a)})},dequeue:function(a){return this.each(function(){_.dequeue(this,a)})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,b){var c,d=1,e=_.Deferred(),f=this,g=this.length,h=function(){--d||e.resolveWith(f,[f])};
  1459. for("string"!=typeof a&&(b=a,a=void 0),a=a||"fx";
  1460. g--;
  1461. )c=ra.get(f[g],a+"queueHooks"),c&&c.empty&&(d++,c.empty.add(h));
  1462. return h(),e.promise(b)}});
  1463. var va=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,wa=["Top","Right","Bottom","Left"],xa=function(a,b){return a=b||a,"none"===_.css(a,"display")||!_.contains(a.ownerDocument,a)},ya=/^(?:checkbox|radio)$/i;
  1464. !function(){var a=Z.createDocumentFragment(),b=a.appendChild(Z.createElement("div")),c=Z.createElement("input");
  1465. c.setAttribute("type","radio"),c.setAttribute("checked","checked"),c.setAttribute("name","t"),b.appendChild(c),Y.checkClone=b.cloneNode(!0).cloneNode(!0).lastChild.checked,b.innerHTML="<textarea>x</textarea>",Y.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue}();
  1466. var za="undefined";
  1467. Y.focusinBubbles="onfocusin"in a;
  1468. var Aa=/^key/,Ba=/^(?:mouse|pointer|contextmenu)|click/,Ca=/^(?:focusinfocus|focusoutblur)$/,Da=/^([^.]*)(?:\.(.+)|)$/;
  1469. _.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,n,o,p,q=ra.get(a);
  1470. if(q)for(c.handler&&(f=c,c=f.handler,e=f.selector),c.guid||(c.guid=_.guid++),(i=q.events)||(i=q.events={}),(g=q.handle)||(g=q.handle=function(b){return typeof _!==za&&_.event.triggered!==b.type?_.event.dispatch.apply(a,arguments):void 0}),b=(b||"").match(na)||[""],j=b.length;
  1471. j--;
  1472. )h=Da.exec(b[j])||[],n=p=h[1],o=(h[2]||"").split(".").sort(),n&&(l=_.event.special[n]||{},n=(e?l.delegateType:l.bindType)||n,l=_.event.special[n]||{},k=_.extend({type:n,origType:p,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&_.expr.match.needsContext.test(e),namespace:o.join(".")},f),(m=i[n])||(m=i[n]=[],m.delegateCount=0,l.setup&&l.setup.call(a,d,o,g)!==!1||a.addEventListener&&a.addEventListener(n,g,!1)),l.add&&(l.add.call(a,k),k.handler.guid||(k.handler.guid=c.guid)),e?m.splice(m.delegateCount++,0,k):m.push(k),_.event.global[n]=!0)},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,n,o,p,q=ra.hasData(a)&&ra.get(a);
  1473. if(q&&(i=q.events)){for(b=(b||"").match(na)||[""],j=b.length;
  1474. j--;
  1475. )if(h=Da.exec(b[j])||[],n=p=h[1],o=(h[2]||"").split(".").sort(),n){for(l=_.event.special[n]||{},n=(d?l.delegateType:l.bindType)||n,m=i[n]||[],h=h[2]&&new RegExp("(^|\\.)"+o.join("\\.(?:.*\\.|)")+"(\\.|$)"),g=f=m.length;
  1476. f--;
  1477. )k=m[f],!e&&p!==k.origType||c&&c.guid!==k.guid||h&&!h.test(k.namespace)||d&&d!==k.selector&&("**"!==d||!k.selector)||(m.splice(f,1),k.selector&&m.delegateCount--,l.remove&&l.remove.call(a,k));
  1478. g&&!m.length&&(l.teardown&&l.teardown.call(a,o,q.handle)!==!1||_.removeEvent(a,n,q.handle),delete i[n])}else for(n in i)_.event.remove(a,n+b[j],c,d,!0);
  1479. _.isEmptyObject(i)&&(delete q.handle,ra.remove(a,"events"))}},trigger:function(b,c,d,e){var f,g,h,i,j,k,l,m=[d||Z],n=X.call(b,"type")?b.type:b,o=X.call(b,"namespace")?b.namespace.split("."):[];
  1480. if(g=h=d=d||Z,3!==d.nodeType&&8!==d.nodeType&&!Ca.test(n+_.event.triggered)&&(n.indexOf(".")>=0&&(o=n.split("."),n=o.shift(),o.sort()),j=n.indexOf(":")<0&&"on"+n,b=b[_.expando]?b:new _.Event(n,"object"==typeof b&&b),b.isTrigger=e?2:3,b.namespace=o.join("."),b.namespace_re=b.namespace?new RegExp("(^|\\.)"+o.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,b.result=void 0,b.target||(b.target=d),c=null==c?[b]:_.makeArray(c,[b]),l=_.event.special[n]||{},e||!l.trigger||l.trigger.apply(d,c)!==!1)){if(!e&&!l.noBubble&&!_.isWindow(d)){for(i=l.delegateType||n,Ca.test(i+n)||(g=g.parentNode);
  1481. g;
  1482. g=g.parentNode)m.push(g),h=g;
  1483. h===(d.ownerDocument||Z)&&m.push(h.defaultView||h.parentWindow||a)}for(f=0;
  1484. (g=m[f++])&&!b.isPropagationStopped();
  1485. )b.type=f>1?i:l.bindType||n,k=(ra.get(g,"events")||{})[b.type]&&ra.get(g,"handle"),k&&k.apply(g,c),k=j&&g[j],k&&k.apply&&_.acceptData(g)&&(b.result=k.apply(g,c),b.result===!1&&b.preventDefault());
  1486. return b.type=n,e||b.isDefaultPrevented()||l._default&&l._default.apply(m.pop(),c)!==!1||!_.acceptData(d)||j&&_.isFunction(d[n])&&!_.isWindow(d)&&(h=d[j],h&&(d[j]=null),_.event.triggered=n,d[n](),
  1487. _.event.triggered=void 0,h&&(d[j]=h)),b.result}},dispatch:function(a){a=_.event.fix(a);
  1488. var b,c,d,e,f,g=[],h=R.call(arguments),i=(ra.get(this,"events")||{})[a.type]||[],j=_.event.special[a.type]||{};
  1489. if(h[0]=a,a.delegateTarget=this,!j.preDispatch||j.preDispatch.call(this,a)!==!1){for(g=_.event.handlers.call(this,a,i),b=0;
  1490. (e=g[b++])&&!a.isPropagationStopped();
  1491. )for(a.currentTarget=e.elem,c=0;
  1492. (f=e.handlers[c++])&&!a.isImmediatePropagationStopped();
  1493. )(!a.namespace_re||a.namespace_re.test(f.namespace))&&(a.handleObj=f,a.data=f.data,d=((_.event.special[f.origType]||{}).handle||f.handler).apply(e.elem,h),void 0!==d&&(a.result=d)===!1&&(a.preventDefault(),a.stopPropagation()));
  1494. return j.postDispatch&&j.postDispatch.call(this,a),a.result}},handlers:function(a,b){var c,d,e,f,g=[],h=b.delegateCount,i=a.target;
  1495. if(h&&i.nodeType&&(!a.button||"click"!==a.type))for(;
  1496. i!==this;
  1497. i=i.parentNode||this)if(i.disabled!==!0||"click"!==a.type){for(d=[],c=0;
  1498. h>c;
  1499. c++)f=b[c],e=f.selector+" ",void 0===d[e]&&(d[e]=f.needsContext?_(e,this).index(i)>=0:_.find(e,this,null,[i]).length),d[e]&&d.push(f);
  1500. d.length&&g.push({elem:i,handlers:d})}return h<b.length&&g.push({elem:this,handlers:b.slice(h)}),g},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(a,b){return null==a.which&&(a.which=null!=b.charCode?b.charCode:b.keyCode),a}},mouseHooks:{props:"button buttons clientX clientY offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(a,b){var c,d,e,f=b.button;
  1501. return null==a.pageX&&null!=b.clientX&&(c=a.target.ownerDocument||Z,d=c.documentElement,e=c.body,a.pageX=b.clientX+(d&&d.scrollLeft||e&&e.scrollLeft||0)-(d&&d.clientLeft||e&&e.clientLeft||0),a.pageY=b.clientY+(d&&d.scrollTop||e&&e.scrollTop||0)-(d&&d.clientTop||e&&e.clientTop||0)),a.which||void 0===f||(a.which=1&f?1:2&f?3:4&f?2:0),a}},fix:function(a){if(a[_.expando])return a;
  1502. var b,c,d,e=a.type,f=a,g=this.fixHooks[e];
  1503. for(g||(this.fixHooks[e]=g=Ba.test(e)?this.mouseHooks:Aa.test(e)?this.keyHooks:{}),d=g.props?this.props.concat(g.props):this.props,a=new _.Event(f),b=d.length;
  1504. b--;
  1505. )c=d[b],a[c]=f[c];
  1506. return a.target||(a.target=Z),3===a.target.nodeType&&(a.target=a.target.parentNode),g.filter?g.filter(a,f):a},special:{load:{noBubble:!0},focus:{trigger:function(){return this!==l()&&this.focus?(this.focus(),!1):void 0},delegateType:"focusin"},blur:{trigger:function(){return this===l()&&this.blur?(this.blur(),!1):void 0},delegateType:"focusout"},click:{trigger:function(){return"checkbox"===this.type&&this.click&&_.nodeName(this,"input")?(this.click(),!1):void 0},_default:function(a){return _.nodeName(a.target,"a")}},beforeunload:{postDispatch:function(a){void 0!==a.result&&a.originalEvent&&(a.originalEvent.returnValue=a.result)}}},simulate:function(a,b,c,d){var e=_.extend(new _.Event,c,{type:a,isSimulated:!0,originalEvent:{}});
  1507. d?_.event.trigger(e,null,b):_.event.dispatch.call(b,e),e.isDefaultPrevented()&&c.preventDefault()}},_.removeEvent=function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c,!1)},_.Event=function(a,b){return this instanceof _.Event?(a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||void 0===a.defaultPrevented&&a.returnValue===!1?j:k):this.type=a,b&&_.extend(this,b),this.timeStamp=a&&a.timeStamp||_.now(),void(this[_.expando]=!0)):new _.Event(a,b)},_.Event.prototype={isDefaultPrevented:k,isPropagationStopped:k,isImmediatePropagationStopped:k,preventDefault:function(){var a=this.originalEvent;
  1508. this.isDefaultPrevented=j,a&&a.preventDefault&&a.preventDefault()},stopPropagation:function(){var a=this.originalEvent;
  1509. this.isPropagationStopped=j,a&&a.stopPropagation&&a.stopPropagation()},stopImmediatePropagation:function(){var a=this.originalEvent;
  1510. this.isImmediatePropagationStopped=j,a&&a.stopImmediatePropagation&&a.stopImmediatePropagation(),this.stopPropagation()}},_.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(a,b){_.event.special[a]={delegateType:b,bindType:b,handle:function(a){var c,d=this,e=a.relatedTarget,f=a.handleObj;
  1511. return(!e||e!==d&&!_.contains(d,e))&&(a.type=f.origType,c=f.handler.apply(this,arguments),a.type=b),c}}}),Y.focusinBubbles||_.each({focus:"focusin",blur:"focusout"},function(a,b){var c=function(a){_.event.simulate(b,a.target,_.event.fix(a),!0)};
  1512. _.event.special[b]={setup:function(){var d=this.ownerDocument||this,e=ra.access(d,b);
  1513. e||d.addEventListener(a,c,!0),ra.access(d,b,(e||0)+1)},teardown:function(){var d=this.ownerDocument||this,e=ra.access(d,b)-1;
  1514. e?ra.access(d,b,e):(d.removeEventListener(a,c,!0),ra.remove(d,b))}}}),_.fn.extend({on:function(a,b,c,d,e){var f,g;
  1515. if("object"==typeof a){"string"!=typeof b&&(c=c||b,b=void 0);
  1516. for(g in a)this.on(g,b,c,a[g],e);
  1517. return this}if(null==c&&null==d?(d=b,c=b=void 0):null==d&&("string"==typeof b?(d=c,c=void 0):(d=c,c=b,b=void 0)),d===!1)d=k;
  1518. else if(!d)return this;
  1519. return 1===e&&(f=d,d=function(a){return _().off(a),f.apply(this,arguments)},d.guid=f.guid||(f.guid=_.guid++)),this.each(function(){_.event.add(this,a,d,c,b)})},one:function(a,b,c,d){return this.on(a,b,c,d,1)},off:function(a,b,c){var d,e;
  1520. if(a&&a.preventDefault&&a.handleObj)return d=a.handleObj,_(a.delegateTarget).off(d.namespace?d.origType+"."+d.namespace:d.origType,d.selector,d.handler),this;
  1521. if("object"==typeof a){for(e in a)this.off(e,b,a[e]);
  1522. return this}return(b===!1||"function"==typeof b)&&(c=b,b=void 0),c===!1&&(c=k),this.each(function(){_.event.remove(this,a,c,b)})},trigger:function(a,b){return this.each(function(){_.event.trigger(a,b,this)})},triggerHandler:function(a,b){var c=this[0];
  1523. return c?_.event.trigger(a,b,c,!0):void 0}});
  1524. var Ea=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,Fa=/<([\w:]+)/,Ga=/<|&#?\w+;
  1525. /,Ha=/<(?:script|style|link)/i,Ia=/checked\s*(?:[^=]|=\s*.checked.)/i,Ja=/^$|\/(?:java|ecma)script/i,Ka=/^true\/(.*)/,La=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,Ma={option:[1,"<select multiple='multiple'>","</select>"],thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};
  1526. Ma.optgroup=Ma.option,Ma.tbody=Ma.tfoot=Ma.colgroup=Ma.caption=Ma.thead,Ma.th=Ma.td,_.extend({clone:function(a,b,c){var d,e,f,g,h=a.cloneNode(!0),i=_.contains(a.ownerDocument,a);
  1527. if(!(Y.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||_.isXMLDoc(a)))for(g=r(h),f=r(a),d=0,e=f.length;
  1528. e>d;
  1529. d++)s(f[d],g[d]);
  1530. if(b)if(c)for(f=f||r(a),g=g||r(h),d=0,e=f.length;
  1531. e>d;
  1532. d++)q(f[d],g[d]);
  1533. else q(a,h);
  1534. return g=r(h,"script"),g.length>0&&p(g,!i&&r(a,"script")),h},buildFragment:function(a,b,c,d){for(var e,f,g,h,i,j,k=b.createDocumentFragment(),l=[],m=0,n=a.length;
  1535. n>m;
  1536. m++)if(e=a[m],e||0===e)if("object"===_.type(e))_.merge(l,e.nodeType?[e]:e);
  1537. else if(Ga.test(e)){for(f=f||k.appendChild(b.createElement("div")),g=(Fa.exec(e)||["",""])[1].toLowerCase(),h=Ma[g]||Ma._default,f.innerHTML=h[1]+e.replace(Ea,"<$1></$2>")+h[2],j=h[0];
  1538. j--;
  1539. )f=f.lastChild;
  1540. _.merge(l,f.childNodes),f=k.firstChild,f.textContent=""}else l.push(b.createTextNode(e));
  1541. for(k.textContent="",m=0;
  1542. e=l[m++];
  1543. )if((!d||-1===_.inArray(e,d))&&(i=_.contains(e.ownerDocument,e),f=r(k.appendChild(e),"script"),i&&p(f),c))for(j=0;
  1544. e=f[j++];
  1545. )Ja.test(e.type||"")&&c.push(e);
  1546. return k},cleanData:function(a){for(var b,c,d,e,f=_.event.special,g=0;
  1547. void 0!==(c=a[g]);
  1548. g++){if(_.acceptData(c)&&(e=c[ra.expando],e&&(b=ra.cache[e]))){if(b.events)for(d in b.events)f[d]?_.event.remove(c,d):_.removeEvent(c,d,b.handle);
  1549. ra.cache[e]&&delete ra.cache[e]}delete sa.cache[c[sa.expando]]}}}),_.fn.extend({text:function(a){return qa(this,function(a){return void 0===a?_.text(this):this.empty().each(function(){(1===this.nodeType||11===this.nodeType||9===this.nodeType)&&(this.textContent=a)})},null,a,arguments.length)},append:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=m(this,a);
  1550. b.appendChild(a)}})},prepend:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=m(this,a);
  1551. b.insertBefore(a,b.firstChild)}})},before:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},remove:function(a,b){for(var c,d=a?_.filter(a,this):this,e=0;
  1552. null!=(c=d[e]);
  1553. e++)b||1!==c.nodeType||_.cleanData(r(c)),c.parentNode&&(b&&_.contains(c.ownerDocument,c)&&p(r(c,"script")),c.parentNode.removeChild(c));
  1554. return this},empty:function(){for(var a,b=0;
  1555. null!=(a=this[b]);
  1556. b++)1===a.nodeType&&(_.cleanData(r(a,!1)),a.textContent="");
  1557. return this},clone:function(a,b){return a=null==a?!1:a,b=null==b?a:b,this.map(function(){return _.clone(this,a,b)})},html:function(a){return qa(this,function(a){var b=this[0]||{},c=0,d=this.length;
  1558. if(void 0===a&&1===b.nodeType)return b.innerHTML;
  1559. if("string"==typeof a&&!Ha.test(a)&&!Ma[(Fa.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Ea,"<$1></$2>");
  1560. try{for(;
  1561. d>c;
  1562. c++)b=this[c]||{},1===b.nodeType&&(_.cleanData(r(b,!1)),b.innerHTML=a);
  1563. b=0}catch(e){}}b&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=arguments[0];
  1564. return this.domManip(arguments,function(b){a=this.parentNode,_.cleanData(r(this)),a&&a.replaceChild(b,this)}),a&&(a.length||a.nodeType)?this:this.remove()},detach:function(a){return this.remove(a,!0)},domManip:function(a,b){a=S.apply([],a);
  1565. var c,d,e,f,g,h,i=0,j=this.length,k=this,l=j-1,m=a[0],p=_.isFunction(m);
  1566. if(p||j>1&&"string"==typeof m&&!Y.checkClone&&Ia.test(m))return this.each(function(c){var d=k.eq(c);
  1567. p&&(a[0]=m.call(this,c,d.html())),d.domManip(a,b)});
  1568. if(j&&(c=_.buildFragment(a,this[0].ownerDocument,!1,this),d=c.firstChild,1===c.childNodes.length&&(c=d),d)){for(e=_.map(r(c,"script"),n),f=e.length;
  1569. j>i;
  1570. i++)g=c,i!==l&&(g=_.clone(g,!0,!0),f&&_.merge(e,r(g,"script"))),b.call(this[i],g,i);
  1571. if(f)for(h=e[e.length-1].ownerDocument,_.map(e,o),i=0;
  1572. f>i;
  1573. i++)g=e[i],Ja.test(g.type||"")&&!ra.access(g,"globalEval")&&_.contains(h,g)&&(g.src?_._evalUrl&&_._evalUrl(g.src):_.globalEval(g.textContent.replace(La,"")))}return this}}),_.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){_.fn[a]=function(a){for(var c,d=[],e=_(a),f=e.length-1,g=0;
  1574. f>=g;
  1575. g++)c=g===f?this:this.clone(!0),_(e[g])[b](c),T.apply(d,c.get());
  1576. return this.pushStack(d)}});
  1577. var Na,Oa={},Pa=/^margin/,Qa=new RegExp("^("+va+")(?!px)[a-z%]+$","i"),Ra=function(b){return b.ownerDocument.defaultView.opener?b.ownerDocument.defaultView.getComputedStyle(b,null):a.getComputedStyle(b,null)};
  1578. !function(){function b(){g.style.cssText="-webkit-box-sizing:border-box;
  1579. -moz-box-sizing:border-box;
  1580. box-sizing:border-box;
  1581. display:block;
  1582. margin-top:1%;
  1583. top:1%;
  1584. border:1px;
  1585. padding:1px;
  1586. width:4px;
  1587. position:absolute",g.innerHTML="",e.appendChild(f);
  1588. var b=a.getComputedStyle(g,null);
  1589. c="1%"!==b.top,d="4px"===b.width,e.removeChild(f)}var c,d,e=Z.documentElement,f=Z.createElement("div"),g=Z.createElement("div");
  1590. g.style&&(g.style.backgroundClip="content-box",g.cloneNode(!0).style.backgroundClip="",Y.clearCloneStyle="content-box"===g.style.backgroundClip,f.style.cssText="border:0;
  1591. width:0;
  1592. height:0;
  1593. top:0;
  1594. left:-9999px;
  1595. margin-top:1px;
  1596. position:absolute",f.appendChild(g),a.getComputedStyle&&_.extend(Y,{pixelPosition:function(){return b(),c},boxSizingReliable:function(){return null==d&&b(),d},reliableMarginRight:function(){var b,c=g.appendChild(Z.createElement("div"));
  1597. return c.style.cssText=g.style.cssText="-webkit-box-sizing:content-box;
  1598. -moz-box-sizing:content-box;
  1599. box-sizing:content-box;
  1600. display:block;
  1601. margin:0;
  1602. border:0;
  1603. padding:0",c.style.marginRight=c.style.width="0",g.style.width="1px",e.appendChild(f),b=!parseFloat(a.getComputedStyle(c,null).marginRight),e.removeChild(f),g.removeChild(c),b}}))}(),_.swap=function(a,b,c,d){var e,f,g={};
  1604. for(f in b)g[f]=a.style[f],a.style[f]=b[f];
  1605. e=c.apply(a,d||[]);
  1606. for(f in b)a.style[f]=g[f];
  1607. return e};
  1608. var Sa=/^(none|table(?!-c[ea]).+)/,Ta=new RegExp("^("+va+")(.*)$","i"),Ua=new RegExp("^([+-])=("+va+")","i"),Va={position:"absolute",visibility:"hidden",display:"block"},Wa={letterSpacing:"0",fontWeight:"400"},Xa=["Webkit","O","Moz","ms"];
  1609. _.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=v(a,"opacity");
  1610. return""===c?"1":c}}}},cssNumber:{columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":"cssFloat"},style:function(a,b,c,d){if(a&&3!==a.nodeType&&8!==a.nodeType&&a.style){var e,f,g,h=_.camelCase(b),i=a.style;
  1611. return b=_.cssProps[h]||(_.cssProps[h]=x(i,h)),g=_.cssHooks[b]||_.cssHooks[h],void 0===c?g&&"get"in g&&void 0!==(e=g.get(a,!1,d))?e:i[b]:(f=typeof c,"string"===f&&(e=Ua.exec(c))&&(c=(e[1]+1)*e[2]+parseFloat(_.css(a,b)),f="number"),void(null!=c&&c===c&&("number"!==f||_.cssNumber[h]||(c+="px"),Y.clearCloneStyle||""!==c||0!==b.indexOf("background")||(i[b]="inherit"),g&&"set"in g&&void 0===(c=g.set(a,c,d))||(i[b]=c))))}},css:function(a,b,c,d){var e,f,g,h=_.camelCase(b);
  1612. return b=_.cssProps[h]||(_.cssProps[h]=x(a.style,h)),g=_.cssHooks[b]||_.cssHooks[h],g&&"get"in g&&(e=g.get(a,!0,c)),void 0===e&&(e=v(a,b,d)),"normal"===e&&b in Wa&&(e=Wa[b]),""===c||c?(f=parseFloat(e),c===!0||_.isNumeric(f)?f||0:e):e}}),_.each(["height","width"],function(a,b){_.cssHooks[b]={get:function(a,c,d){return c?Sa.test(_.css(a,"display"))&&0===a.offsetWidth?_.swap(a,Va,function(){return A(a,b,d)}):A(a,b,d):void 0},set:function(a,c,d){var e=d&&Ra(a);
  1613. return y(a,c,d?z(a,b,d,"border-box"===_.css(a,"boxSizing",!1,e),e):0)}}}),_.cssHooks.marginRight=w(Y.reliableMarginRight,function(a,b){return b?_.swap(a,{display:"inline-block"},v,[a,"marginRight"]):void 0}),_.each({margin:"",padding:"",border:"Width"},function(a,b){_.cssHooks[a+b]={expand:function(c){for(var d=0,e={},f="string"==typeof c?c.split(" "):[c];
  1614. 4>d;
  1615. d++)e[a+wa[d]+b]=f[d]||f[d-2]||f[0];
  1616. return e}},Pa.test(a)||(_.cssHooks[a+b].set=y)}),_.fn.extend({css:function(a,b){return qa(this,function(a,b,c){var d,e,f={},g=0;
  1617. if(_.isArray(b)){for(d=Ra(a),e=b.length;
  1618. e>g;
  1619. g++)f[b[g]]=_.css(a,b[g],!1,d);
  1620. return f}return void 0!==c?_.style(a,b,c):_.css(a,b)},a,b,arguments.length>1)},show:function(){return B(this,!0)},hide:function(){return B(this)},toggle:function(a){return"boolean"==typeof a?a?this.show():this.hide():this.each(function(){xa(this)?_(this).show():_(this).hide()})}}),_.Tween=C,C.prototype={constructor:C,init:function(a,b,c,d,e,f){this.elem=a,this.prop=c,this.easing=e||"swing",this.options=b,this.start=this.now=this.cur(),this.end=d,this.unit=f||(_.cssNumber[c]?"":"px")},cur:function(){var a=C.propHooks[this.prop];
  1621. return a&&a.get?a.get(this):C.propHooks._default.get(this)},run:function(a){var b,c=C.propHooks[this.prop];
  1622. return this.pos=b=this.options.duration?_.easing[this.easing](a,this.options.duration*a,0,1,this.options.duration):a,this.now=(this.end-this.start)*b+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),c&&c.set?c.set(this):C.propHooks._default.set(this),this}},C.prototype.init.prototype=C.prototype,C.propHooks={_default:{get:function(a){var b;
  1623. return null==a.elem[a.prop]||a.elem.style&&null!=a.elem.style[a.prop]?(b=_.css(a.elem,a.prop,""),b&&"auto"!==b?b:0):a.elem[a.prop]},set:function(a){_.fx.step[a.prop]?_.fx.step[a.prop](a):a.elem.style&&(null!=a.elem.style[_.cssProps[a.prop]]||_.cssHooks[a.prop])?_.style(a.elem,a.prop,a.now+a.unit):a.elem[a.prop]=a.now}}},C.propHooks.scrollTop=C.propHooks.scrollLeft={set:function(a){a.elem.nodeType&&a.elem.parentNode&&(a.elem[a.prop]=a.now)}},_.easing={linear:function(a){return a},swing:function(a){return.5-Math.cos(a*Math.PI)/2}},_.fx=C.prototype.init,_.fx.step={};
  1624. var Ya,Za,$a=/^(?:toggle|show|hide)$/,_a=new RegExp("^(?:([+-])=|)("+va+")([a-z%]*)$","i"),ab=/queueHooks$/,bb=[G],cb={"*":[function(a,b){var c=this.createTween(a,b),d=c.cur(),e=_a.exec(b),f=e&&e[3]||(_.cssNumber[a]?"":"px"),g=(_.cssNumber[a]||"px"!==f&&+d)&&_a.exec(_.css(c.elem,a)),h=1,i=20;
  1625. if(g&&g[3]!==f){f=f||g[3],e=e||[],g=+d||1;
  1626. do h=h||".5",g/=h,_.style(c.elem,a,g+f);
  1627. while(h!==(h=c.cur()/d)&&1!==h&&--i)}return e&&(g=c.start=+g||+d||0,c.unit=f,c.end=e[1]?g+(e[1]+1)*e[2]:+e[2]),c}]};
  1628. _.Animation=_.extend(I,{tweener:function(a,b){_.isFunction(a)?(b=a,a=["*"]):a=a.split(" ");
  1629. for(var c,d=0,e=a.length;
  1630. e>d;
  1631. d++)c=a[d],cb[c]=cb[c]||[],cb[c].unshift(b)},prefilter:function(a,b){b?bb.unshift(a):bb.push(a)}}),_.speed=function(a,b,c){var d=a&&"object"==typeof a?_.extend({},a):{complete:c||!c&&b||_.isFunction(a)&&a,duration:a,easing:c&&b||b&&!_.isFunction(b)&&b};
  1632. return d.duration=_.fx.off?0:"number"==typeof d.duration?d.duration:d.duration in _.fx.speeds?_.fx.speeds[d.duration]:_.fx.speeds._default,(null==d.queue||d.queue===!0)&&(d.queue="fx"),d.old=d.complete,d.complete=function(){_.isFunction(d.old)&&d.old.call(this),d.queue&&_.dequeue(this,d.queue)},d},_.fn.extend({fadeTo:function(a,b,c,d){return this.filter(xa).css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){var e=_.isEmptyObject(a),f=_.speed(b,c,d),g=function(){var b=I(this,_.extend({},a),f);
  1633. (e||ra.get(this,"finish"))&&b.stop(!0)};
  1634. return g.finish=g,e||f.queue===!1?this.each(g):this.queue(f.queue,g)},stop:function(a,b,c){var d=function(a){var b=a.stop;
  1635. delete a.stop,b(c)};
  1636. return"string"!=typeof a&&(c=b,b=a,a=void 0),b&&a!==!1&&this.queue(a||"fx",[]),this.each(function(){var b=!0,e=null!=a&&a+"queueHooks",f=_.timers,g=ra.get(this);
  1637. if(e)g[e]&&g[e].stop&&d(g[e]);
  1638. else for(e in g)g[e]&&g[e].stop&&ab.test(e)&&d(g[e]);
  1639. for(e=f.length;
  1640. e--;
  1641. )f[e].elem!==this||null!=a&&f[e].queue!==a||(f[e].anim.stop(c),b=!1,f.splice(e,1));
  1642. (b||!c)&&_.dequeue(this,a)})},finish:function(a){return a!==!1&&(a=a||"fx"),this.each(function(){var b,c=ra.get(this),d=c[a+"queue"],e=c[a+"queueHooks"],f=_.timers,g=d?d.length:0;
  1643. for(c.finish=!0,_.queue(this,a,[]),e&&e.stop&&e.stop.call(this,!0),b=f.length;
  1644. b--;
  1645. )f[b].elem===this&&f[b].queue===a&&(f[b].anim.stop(!0),f.splice(b,1));
  1646. for(b=0;
  1647. g>b;
  1648. b++)d[b]&&d[b].finish&&d[b].finish.call(this);
  1649. delete c.finish})}}),_.each(["toggle","show","hide"],function(a,b){var c=_.fn[b];
  1650. _.fn[b]=function(a,d,e){return null==a||"boolean"==typeof a?c.apply(this,arguments):this.animate(E(b,!0),a,d,e)}}),_.each({slideDown:E("show"),slideUp:E("hide"),slideToggle:E("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){_.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),_.timers=[],_.fx.tick=function(){var a,b=0,c=_.timers;
  1651. for(Ya=_.now();
  1652. b<c.length;
  1653. b++)a=c[b],a()||c[b]!==a||c.splice(b--,1);
  1654. c.length||_.fx.stop(),Ya=void 0},_.fx.timer=function(a){_.timers.push(a),a()?_.fx.start():_.timers.pop()},_.fx.interval=13,_.fx.start=function(){Za||(Za=setInterval(_.fx.tick,_.fx.interval))},_.fx.stop=function(){clearInterval(Za),Za=null},_.fx.speeds={slow:600,fast:200,_default:400},_.fn.delay=function(a,b){return a=_.fx?_.fx.speeds[a]||a:a,b=b||"fx",this.queue(b,function(b,c){var d=setTimeout(b,a);
  1655. c.stop=function(){clearTimeout(d)}})},function(){var a=Z.createElement("input"),b=Z.createElement("select"),c=b.appendChild(Z.createElement("option"));
  1656. a.type="checkbox",Y.checkOn=""!==a.value,Y.optSelected=c.selected,b.disabled=!0,Y.optDisabled=!c.disabled,a=Z.createElement("input"),a.value="t",a.type="radio",Y.radioValue="t"===a.value}();
  1657. var db,eb,fb=_.expr.attrHandle;
  1658. _.fn.extend({attr:function(a,b){return qa(this,_.attr,a,b,arguments.length>1)},removeAttr:function(a){return this.each(function(){_.removeAttr(this,a)})}}),_.extend({attr:function(a,b,c){var d,e,f=a.nodeType;
  1659. return a&&3!==f&&8!==f&&2!==f?typeof a.getAttribute===za?_.prop(a,b,c):(1===f&&_.isXMLDoc(a)||(b=b.toLowerCase(),d=_.attrHooks[b]||(_.expr.match.bool.test(b)?eb:db)),void 0===c?d&&"get"in d&&null!==(e=d.get(a,b))?e:(e=_.find.attr(a,b),null==e?void 0:e):null!==c?d&&"set"in d&&void 0!==(e=d.set(a,c,b))?e:(a.setAttribute(b,c+""),c):void _.removeAttr(a,b)):void 0},removeAttr:function(a,b){var c,d,e=0,f=b&&b.match(na);
  1660. if(f&&1===a.nodeType)for(;
  1661. c=f[e++];
  1662. )d=_.propFix[c]||c,_.expr.match.bool.test(c)&&(a[d]=!1),a.removeAttribute(c)},attrHooks:{type:{set:function(a,b){if(!Y.radioValue&&"radio"===b&&_.nodeName(a,"input")){var c=a.value;
  1663. return a.setAttribute("type",b),c&&(a.value=c),b}}}}}),eb={set:function(a,b,c){return b===!1?_.removeAttr(a,c):a.setAttribute(c,c),c}},_.each(_.expr.match.bool.source.match(/\w+/g),function(a,b){var c=fb[b]||_.find.attr;
  1664. fb[b]=function(a,b,d){var e,f;
  1665. return d||(f=fb[b],fb[b]=e,e=null!=c(a,b,d)?b.toLowerCase():null,fb[b]=f),e}});
  1666. var gb=/^(?:input|select|textarea|button)$/i;
  1667. _.fn.extend({prop:function(a,b){return qa(this,_.prop,a,b,arguments.length>1)},removeProp:function(a){return this.each(function(){delete this[_.propFix[a]||a]})}}),_.extend({propFix:{"for":"htmlFor","class":"className"},prop:function(a,b,c){var d,e,f,g=a.nodeType;
  1668. return a&&3!==g&&8!==g&&2!==g?(f=1!==g||!_.isXMLDoc(a),f&&(b=_.propFix[b]||b,e=_.propHooks[b]),void 0!==c?e&&"set"in e&&void 0!==(d=e.set(a,c,b))?d:a[b]=c:e&&"get"in e&&null!==(d=e.get(a,b))?d:a[b]):void 0},propHooks:{tabIndex:{get:function(a){return a.hasAttribute("tabindex")||gb.test(a.nodeName)||a.href?a.tabIndex:-1}}}}),Y.optSelected||(_.propHooks.selected={get:function(a){var b=a.parentNode;
  1669. return b&&b.parentNode&&b.parentNode.selectedIndex,null}}),_.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){_.propFix[this.toLowerCase()]=this});
  1670. var hb=/[\t\r\n\f]/g;
  1671. _.fn.extend({addClass:function(a){var b,c,d,e,f,g,h="string"==typeof a&&a,i=0,j=this.length;
  1672. if(_.isFunction(a))return this.each(function(b){_(this).addClass(a.call(this,b,this.className))});
  1673. if(h)for(b=(a||"").match(na)||[];
  1674. j>i;
  1675. i++)if(c=this[i],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(hb," "):" ")){for(f=0;
  1676. e=b[f++];
  1677. )d.indexOf(" "+e+" ")<0&&(d+=e+" ");
  1678. g=_.trim(d),c.className!==g&&(c.className=g)}return this},removeClass:function(a){var b,c,d,e,f,g,h=0===arguments.length||"string"==typeof a&&a,i=0,j=this.length;
  1679. if(_.isFunction(a))return this.each(function(b){_(this).removeClass(a.call(this,b,this.className))});
  1680. if(h)for(b=(a||"").match(na)||[];
  1681. j>i;
  1682. i++)if(c=this[i],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(hb," "):"")){for(f=0;
  1683. e=b[f++];
  1684. )for(;
  1685. d.indexOf(" "+e+" ")>=0;
  1686. )d=d.replace(" "+e+" "," ");
  1687. g=a?_.trim(d):"",c.className!==g&&(c.className=g)}return this},toggleClass:function(a,b){var c=typeof a;
  1688. return"boolean"==typeof b&&"string"===c?b?this.addClass(a):this.removeClass(a):this.each(_.isFunction(a)?function(c){_(this).toggleClass(a.call(this,c,this.className,b),b)}:function(){if("string"===c)for(var b,d=0,e=_(this),f=a.match(na)||[];
  1689. b=f[d++];
  1690. )e.hasClass(b)?e.removeClass(b):e.addClass(b);
  1691. else(c===za||"boolean"===c)&&(this.className&&ra.set(this,"__className__",this.className),this.className=this.className||a===!1?"":ra.get(this,"__className__")||"")})},hasClass:function(a){for(var b=" "+a+" ",c=0,d=this.length;
  1692. d>c;
  1693. c++)if(1===this[c].nodeType&&(" "+this[c].className+" ").replace(hb," ").indexOf(b)>=0)return!0;
  1694. return!1}});
  1695. var ib=/\r/g;
  1696. _.fn.extend({val:function(a){var b,c,d,e=this[0];
  1697. return arguments.length?(d=_.isFunction(a),this.each(function(c){var e;
  1698. 1===this.nodeType&&(e=d?a.call(this,c,_(this).val()):a,null==e?e="":"number"==typeof e?e+="":_.isArray(e)&&(e=_.map(e,function(a){return null==a?"":a+""})),b=_.valHooks[this.type]||_.valHooks[this.nodeName.toLowerCase()],b&&"set"in b&&void 0!==b.set(this,e,"value")||(this.value=e))})):e?(b=_.valHooks[e.type]||_.valHooks[e.nodeName.toLowerCase()],b&&"get"in b&&void 0!==(c=b.get(e,"value"))?c:(c=e.value,"string"==typeof c?c.replace(ib,""):null==c?"":c)):void 0}}),_.extend({valHooks:{option:{get:function(a){var b=_.find.attr(a,"value");
  1699. return null!=b?b:_.trim(_.text(a))}},select:{get:function(a){for(var b,c,d=a.options,e=a.selectedIndex,f="select-one"===a.type||0>e,g=f?null:[],h=f?e+1:d.length,i=0>e?h:f?e:0;
  1700. h>i;
  1701. i++)if(c=d[i],!(!c.selected&&i!==e||(Y.optDisabled?c.disabled:null!==c.getAttribute("disabled"))||c.parentNode.disabled&&_.nodeName(c.parentNode,"optgroup"))){if(b=_(c).val(),f)return b;
  1702. g.push(b)}return g},set:function(a,b){for(var c,d,e=a.options,f=_.makeArray(b),g=e.length;
  1703. g--;
  1704. )d=e[g],(d.selected=_.inArray(d.value,f)>=0)&&(c=!0);
  1705. return c||(a.selectedIndex=-1),f}}}}),_.each(["radio","checkbox"],function(){_.valHooks[this]={set:function(a,b){return _.isArray(b)?a.checked=_.inArray(_(a).val(),b)>=0:void 0}},Y.checkOn||(_.valHooks[this].get=function(a){return null===a.getAttribute("value")?"on":a.value})}),_.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(a,b){_.fn[b]=function(a,c){return arguments.length>0?this.on(b,null,a,c):this.trigger(b)}}),_.fn.extend({hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)},bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:function(a,b,c){return 1===arguments.length?this.off(a,"**"):this.off(b,a||"**",c)}});
  1706. var jb=_.now(),kb=/\?/;
  1707. _.parseJSON=function(a){return JSON.parse(a+"")},_.parseXML=function(a){var b,c;
  1708. if(!a||"string"!=typeof a)return null;
  1709. try{c=new DOMParser,b=c.parseFromString(a,"text/xml")}catch(d){b=void 0}return(!b||b.getElementsByTagName("parsererror").length)&&_.error("Invalid XML: "+a),b};
  1710. var lb=/#.*$/,mb=/([?&])_=[^&]*/,nb=/^(.*?):[ \t]*([^\r\n]*)$/gm,ob=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,pb=/^(?:GET|HEAD)$/,qb=/^\/\//,rb=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,sb={},tb={},ub="*/".concat("*"),vb=a.location.href,wb=rb.exec(vb.toLowerCase())||[];
  1711. _.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:vb,type:"GET",isLocal:ob.test(wb[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded;
  1712. charset=UTF-8",accepts:{"*":ub,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":_.parseJSON,"text xml":_.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(a,b){return b?L(L(a,_.ajaxSettings),b):L(_.ajaxSettings,a)},ajaxPrefilter:J(sb),ajaxTransport:J(tb),ajax:function(a,b){function c(a,b,c,g){var i,k,r,s,u,w=b;
  1713. 2!==t&&(t=2,h&&clearTimeout(h),d=void 0,f=g||"",v.readyState=a>0?4:0,i=a>=200&&300>a||304===a,c&&(s=M(l,v,c)),s=N(l,s,v,i),i?(l.ifModified&&(u=v.getResponseHeader("Last-Modified"),u&&(_.lastModified[e]=u),u=v.getResponseHeader("etag"),u&&(_.etag[e]=u)),204===a||"HEAD"===l.type?w="nocontent":304===a?w="notmodified":(w=s.state,k=s.data,r=s.error,i=!r)):(r=w,(a||!w)&&(w="error",0>a&&(a=0))),v.status=a,v.statusText=(b||w)+"",i?o.resolveWith(m,[k,w,v]):o.rejectWith(m,[v,w,r]),v.statusCode(q),q=void 0,j&&n.trigger(i?"ajaxSuccess":"ajaxError",[v,l,i?k:r]),p.fireWith(m,[v,w]),j&&(n.trigger("ajaxComplete",[v,l]),--_.active||_.event.trigger("ajaxStop")))}"object"==typeof a&&(b=a,a=void 0),b=b||{};
  1714. var d,e,f,g,h,i,j,k,l=_.ajaxSetup({},b),m=l.context||l,n=l.context&&(m.nodeType||m.jquery)?_(m):_.event,o=_.Deferred(),p=_.Callbacks("once memory"),q=l.statusCode||{},r={},s={},t=0,u="canceled",v={readyState:0,getResponseHeader:function(a){var b;
  1715. if(2===t){if(!g)for(g={};
  1716. b=nb.exec(f);
  1717. )g[b[1].toLowerCase()]=b[2];
  1718. b=g[a.toLowerCase()]}return null==b?null:b},getAllResponseHeaders:function(){return 2===t?f:null},setRequestHeader:function(a,b){var c=a.toLowerCase();
  1719. return t||(a=s[c]=s[c]||a,r[a]=b),this},overrideMimeType:function(a){return t||(l.mimeType=a),this},statusCode:function(a){var b;
  1720. if(a)if(2>t)for(b in a)q[b]=[q[b],a[b]];
  1721. else v.always(a[v.status]);
  1722. return this},abort:function(a){var b=a||u;
  1723. return d&&d.abort(b),c(0,b),this}};
  1724. if(o.promise(v).complete=p.add,v.success=v.done,v.error=v.fail,l.url=((a||l.url||vb)+"").replace(lb,"").replace(qb,wb[1]+"//"),l.type=b.method||b.type||l.method||l.type,l.dataTypes=_.trim(l.dataType||"*").toLowerCase().match(na)||[""],null==l.crossDomain&&(i=rb.exec(l.url.toLowerCase()),l.crossDomain=!(!i||i[1]===wb[1]&&i[2]===wb[2]&&(i[3]||("http:"===i[1]?"80":"443"))===(wb[3]||("http:"===wb[1]?"80":"443")))),l.data&&l.processData&&"string"!=typeof l.data&&(l.data=_.param(l.data,l.traditional)),K(sb,l,b,v),2===t)return v;
  1725. j=_.event&&l.global,j&&0===_.active++&&_.event.trigger("ajaxStart"),l.type=l.type.toUpperCase(),l.hasContent=!pb.test(l.type),e=l.url,l.hasContent||(l.data&&(e=l.url+=(kb.test(e)?"&":"?")+l.data,delete l.data),l.cache===!1&&(l.url=mb.test(e)?e.replace(mb,"$1_="+jb++):e+(kb.test(e)?"&":"?")+"_="+jb++)),l.ifModified&&(_.lastModified[e]&&v.setRequestHeader("If-Modified-Since",_.lastModified[e]),_.etag[e]&&v.setRequestHeader("If-None-Match",_.etag[e])),(l.data&&l.hasContent&&l.contentType!==!1||b.contentType)&&v.setRequestHeader("Content-Type",l.contentType),v.setRequestHeader("Accept",l.dataTypes[0]&&l.accepts[l.dataTypes[0]]?l.accepts[l.dataTypes[0]]+("*"!==l.dataTypes[0]?", "+ub+";
  1726. q=0.01":""):l.accepts["*"]);
  1727. for(k in l.headers)v.setRequestHeader(k,l.headers[k]);
  1728. if(l.beforeSend&&(l.beforeSend.call(m,v,l)===!1||2===t))return v.abort();
  1729. u="abort";
  1730. for(k in{success:1,error:1,complete:1})v[k](l[k]);
  1731. if(d=K(tb,l,b,v)){v.readyState=1,j&&n.trigger("ajaxSend",[v,l]),l.async&&l.timeout>0&&(h=setTimeout(function(){v.abort("timeout")},l.timeout));
  1732. try{t=1,d.send(r,c)}catch(w){if(!(2>t))throw w;
  1733. c(-1,w)}}else c(-1,"No Transport");
  1734. return v},getJSON:function(a,b,c){return _.get(a,b,c,"json")},getScript:function(a,b){return _.get(a,void 0,b,"script")}}),_.each(["get","post"],function(a,b){_[b]=function(a,c,d,e){return _.isFunction(c)&&(e=e||d,d=c,c=void 0),_.ajax({url:a,type:b,dataType:e,data:c,success:d})}}),_._evalUrl=function(a){return _.ajax({url:a,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})},_.fn.extend({wrapAll:function(a){var b;
  1735. return _.isFunction(a)?this.each(function(b){_(this).wrapAll(a.call(this,b))}):(this[0]&&(b=_(a,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){for(var a=this;
  1736. a.firstElementChild;
  1737. )a=a.firstElementChild;
  1738. return a}).append(this)),this)},wrapInner:function(a){return this.each(_.isFunction(a)?function(b){_(this).wrapInner(a.call(this,b))}:function(){var b=_(this),c=b.contents();
  1739. c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=_.isFunction(a);
  1740. return this.each(function(c){_(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){_.nodeName(this,"body")||_(this).replaceWith(this.childNodes)}).end()}}),_.expr.filters.hidden=function(a){return a.offsetWidth<=0&&a.offsetHeight<=0},_.expr.filters.visible=function(a){return!_.expr.filters.hidden(a)};
  1741. var xb=/%20/g,yb=/\[\]$/,zb=/\r?\n/g,Ab=/^(?:submit|button|image|reset|file)$/i,Bb=/^(?:input|select|textarea|keygen)/i;
  1742. _.param=function(a,b){var c,d=[],e=function(a,b){b=_.isFunction(b)?b():null==b?"":b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};
  1743. if(void 0===b&&(b=_.ajaxSettings&&_.ajaxSettings.traditional),_.isArray(a)||a.jquery&&!_.isPlainObject(a))_.each(a,function(){e(this.name,this.value)});
  1744. else for(c in a)O(c,a[c],b,e);
  1745. return d.join("&").replace(xb,"+")},_.fn.extend({serialize:function(){return _.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var a=_.prop(this,"elements");
  1746. return a?_.makeArray(a):this}).filter(function(){var a=this.type;
  1747. return this.name&&!_(this).is(":disabled")&&Bb.test(this.nodeName)&&!Ab.test(a)&&(this.checked||!ya.test(a))}).map(function(a,b){var c=_(this).val();
  1748. return null==c?null:_.isArray(c)?_.map(c,function(a){return{name:b.name,value:a.replace(zb,"\r\n")
  1749. }}):{name:b.name,value:c.replace(zb,"\r\n")}}).get()}}),_.ajaxSettings.xhr=function(){try{return new XMLHttpRequest}catch(a){}};
  1750. var Cb=0,Db={},Eb={0:200,1223:204},Fb=_.ajaxSettings.xhr();
  1751. a.attachEvent&&a.attachEvent("onunload",function(){for(var a in Db)Db[a]()}),Y.cors=!!Fb&&"withCredentials"in Fb,Y.ajax=Fb=!!Fb,_.ajaxTransport(function(a){var b;
  1752. return Y.cors||Fb&&!a.crossDomain?{send:function(c,d){var e,f=a.xhr(),g=++Cb;
  1753. if(f.open(a.type,a.url,a.async,a.username,a.password),a.xhrFields)for(e in a.xhrFields)f[e]=a.xhrFields[e];
  1754. a.mimeType&&f.overrideMimeType&&f.overrideMimeType(a.mimeType),a.crossDomain||c["X-Requested-With"]||(c["X-Requested-With"]="XMLHttpRequest");
  1755. for(e in c)f.setRequestHeader(e,c[e]);
  1756. b=function(a){return function(){b&&(delete Db[g],b=f.onload=f.onerror=null,"abort"===a?f.abort():"error"===a?d(f.status,f.statusText):d(Eb[f.status]||f.status,f.statusText,"string"==typeof f.responseText?{text:f.responseText}:void 0,f.getAllResponseHeaders()))}},f.onload=b(),f.onerror=b("error"),b=Db[g]=b("abort");
  1757. try{f.send(a.hasContent&&a.data||null)}catch(h){if(b)throw h}},abort:function(){b&&b()}}:void 0}),_.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(a){return _.globalEval(a),a}}}),_.ajaxPrefilter("script",function(a){void 0===a.cache&&(a.cache=!1),a.crossDomain&&(a.type="GET")}),_.ajaxTransport("script",function(a){if(a.crossDomain){var b,c;
  1758. return{send:function(d,e){b=_("<script>").prop({async:!0,charset:a.scriptCharset,src:a.url}).on("load error",c=function(a){b.remove(),c=null,a&&e("error"===a.type?404:200,a.type)}),Z.head.appendChild(b[0])},abort:function(){c&&c()}}}});
  1759. var Gb=[],Hb=/(=)\?(?=&|$)|\?\?/;
  1760. _.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var a=Gb.pop()||_.expando+"_"+jb++;
  1761. return this[a]=!0,a}}),_.ajaxPrefilter("json jsonp",function(b,c,d){var e,f,g,h=b.jsonp!==!1&&(Hb.test(b.url)?"url":"string"==typeof b.data&&!(b.contentType||"").indexOf("application/x-www-form-urlencoded")&&Hb.test(b.data)&&"data");
  1762. return h||"jsonp"===b.dataTypes[0]?(e=b.jsonpCallback=_.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,h?b[h]=b[h].replace(Hb,"$1"+e):b.jsonp!==!1&&(b.url+=(kb.test(b.url)?"&":"?")+b.jsonp+"="+e),b.converters["script json"]=function(){return g||_.error(e+" was not called"),g[0]},b.dataTypes[0]="json",f=a[e],a[e]=function(){g=arguments},d.always(function(){a[e]=f,b[e]&&(b.jsonpCallback=c.jsonpCallback,Gb.push(e)),g&&_.isFunction(f)&&f(g[0]),g=f=void 0}),"script"):void 0}),_.parseHTML=function(a,b,c){if(!a||"string"!=typeof a)return null;
  1763. "boolean"==typeof b&&(c=b,b=!1),b=b||Z;
  1764. var d=ga.exec(a),e=!c&&[];
  1765. return d?[b.createElement(d[1])]:(d=_.buildFragment([a],b,e),e&&e.length&&_(e).remove(),_.merge([],d.childNodes))};
  1766. var Ib=_.fn.load;
  1767. _.fn.load=function(a,b,c){if("string"!=typeof a&&Ib)return Ib.apply(this,arguments);
  1768. var d,e,f,g=this,h=a.indexOf(" ");
  1769. return h>=0&&(d=_.trim(a.slice(h)),a=a.slice(0,h)),_.isFunction(b)?(c=b,b=void 0):b&&"object"==typeof b&&(e="POST"),g.length>0&&_.ajax({url:a,type:e,dataType:"html",data:b}).done(function(a){f=arguments,g.html(d?_("<div>").append(_.parseHTML(a)).find(d):a)}).complete(c&&function(a,b){g.each(c,f||[a.responseText,b,a])}),this},_.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(a,b){_.fn[b]=function(a){return this.on(b,a)}}),_.expr.filters.animated=function(a){return _.grep(_.timers,function(b){return a===b.elem}).length};
  1770. var Jb=a.document.documentElement;
  1771. _.offset={setOffset:function(a,b,c){var d,e,f,g,h,i,j,k=_.css(a,"position"),l=_(a),m={};
  1772. "static"===k&&(a.style.position="relative"),h=l.offset(),f=_.css(a,"top"),i=_.css(a,"left"),j=("absolute"===k||"fixed"===k)&&(f+i).indexOf("auto")>-1,j?(d=l.position(),g=d.top,e=d.left):(g=parseFloat(f)||0,e=parseFloat(i)||0),_.isFunction(b)&&(b=b.call(a,c,h)),null!=b.top&&(m.top=b.top-h.top+g),null!=b.left&&(m.left=b.left-h.left+e),"using"in b?b.using.call(a,m):l.css(m)}},_.fn.extend({offset:function(a){if(arguments.length)return void 0===a?this:this.each(function(b){_.offset.setOffset(this,a,b)});
  1773. var b,c,d=this[0],e={top:0,left:0},f=d&&d.ownerDocument;
  1774. return f?(b=f.documentElement,_.contains(b,d)?(typeof d.getBoundingClientRect!==za&&(e=d.getBoundingClientRect()),c=P(f),{top:e.top+c.pageYOffset-b.clientTop,left:e.left+c.pageXOffset-b.clientLeft}):e):void 0},position:function(){if(this[0]){var a,b,c=this[0],d={top:0,left:0};
  1775. return"fixed"===_.css(c,"position")?b=c.getBoundingClientRect():(a=this.offsetParent(),b=this.offset(),_.nodeName(a[0],"html")||(d=a.offset()),d.top+=_.css(a[0],"borderTopWidth",!0),d.left+=_.css(a[0],"borderLeftWidth",!0)),{top:b.top-d.top-_.css(c,"marginTop",!0),left:b.left-d.left-_.css(c,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var a=this.offsetParent||Jb;
  1776. a&&!_.nodeName(a,"html")&&"static"===_.css(a,"position");
  1777. )a=a.offsetParent;
  1778. return a||Jb})}}),_.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(b,c){var d="pageYOffset"===c;
  1779. _.fn[b]=function(e){return qa(this,function(b,e,f){var g=P(b);
  1780. return void 0===f?g?g[c]:b[e]:void(g?g.scrollTo(d?a.pageXOffset:f,d?f:a.pageYOffset):b[e]=f)},b,e,arguments.length,null)}}),_.each(["top","left"],function(a,b){_.cssHooks[b]=w(Y.pixelPosition,function(a,c){return c?(c=v(a,b),Qa.test(c)?_(a).position()[b]+"px":c):void 0})}),_.each({Height:"height",Width:"width"},function(a,b){_.each({padding:"inner"+a,content:b,"":"outer"+a},function(c,d){_.fn[d]=function(d,e){var f=arguments.length&&(c||"boolean"!=typeof d),g=c||(d===!0||e===!0?"margin":"border");
  1781. return qa(this,function(b,c,d){var e;
  1782. return _.isWindow(b)?b.document.documentElement["client"+a]:9===b.nodeType?(e=b.documentElement,Math.max(b.body["scroll"+a],e["scroll"+a],b.body["offset"+a],e["offset"+a],e["client"+a])):void 0===d?_.css(b,c,g):_.style(b,c,d,g)},b,f?d:void 0,f,null)}})}),_.fn.size=function(){return this.length},_.fn.andSelf=_.fn.addBack,"function"==typeof define&&define.amd&&define("jquery",[],function(){return _});
  1783. var Kb=a.jQuery,Lb=a.$;
  1784. return _.noConflict=function(b){return a.$===_&&(a.$=Lb),b&&a.jQuery===_&&(a.jQuery=Kb),_},typeof b===za&&(a.jQuery=a.$=_),_}),window.HRZ=window.HRZ||{},window.HRZ.jQuery=$.noConflict(!0),function(a,b,c){!function(c){return"function"==typeof define&&define.amd?define(["jquery"],function(b){return c(b,a,document)}):"object"==typeof exports?module.exports=c(require("jquery"),a,document):c(b,a,document)}(function(a,b,c){"use strict";
  1785. var d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H;
  1786. z={paneClass:"nano-pane",sliderClass:"nano-slider",contentClass:"nano-content",iOSNativeScrolling:!1,preventPageScrolling:!1,disableResize:!1,alwaysVisible:!1,flashDelay:1500,sliderMinHeight:20,sliderMaxHeight:null,documentContext:null,windowContext:null},u="scrollbar",t="scroll",l="mousedown",m="mouseenter",n="mousemove",p="mousewheel",o="mouseup",s="resize",h="drag",i="enter",w="up",r="panedown",f="DOMMouseScroll",g="down",x="wheel",j="keydown",k="keyup",v="touchmove",d="Microsoft Internet Explorer"===b.navigator.appName&&/msie 7./i.test(b.navigator.appVersion)&&b.ActiveXObject,e=null,D=b.requestAnimationFrame,y=b.cancelAnimationFrame,F=c.createElement("div").style,H=function(){var a,b,c,d,e,f;
  1787. for(d=["t","webkitT","MozT","msT","OT"],a=e=0,f=d.length;
  1788. f>e;
  1789. a=++e)if(c=d[a],b=d[a]+"ransform",b in F)return d[a].substr(0,d[a].length-1);
  1790. return!1}(),G=function(a){return H===!1?!1:""===H?a:H+a.charAt(0).toUpperCase()+a.substr(1)},E=G("transform"),B=E!==!1,A=function(){var a,b,d;
  1791. return a=c.createElement("div"),b=a.style,b.position="absolute",b.width="100px",b.height="100px",b.overflow=t,b.top="-9999px",c.body.appendChild(a),d=a.offsetWidth-a.clientWidth,c.body.removeChild(a),d},C=function(){var a,c,d;
  1792. return c=b.navigator.userAgent,(a=/(?=.+Mac OS X)(?=.+Firefox)/.test(c))?(d=/Firefox\/\d{2}\./.exec(c),d&&(d=d[0].replace(/\D+/g,"")),a&&+d>23):!1},q=function(){function j(d,f){this.el=d,this.options=f,e||(e=A()),this.$el=a(this.el),this.doc=a(this.options.documentContext||c),this.win=a(this.options.windowContext||b),this.body=this.doc.find("body"),this.$content=this.$el.children("."+this.options.contentClass),this.$content.attr("tabindex",this.options.tabIndex||0),this.content=this.$content[0],this.previousPosition=0,this.options.iOSNativeScrolling&&null!=this.el.style.WebkitOverflowScrolling?this.nativeScrolling():this.generate(),this.createEvents(),this.addEvents(),this.reset()}return j.prototype.preventScrolling=function(a,b){if(this.isActive)if(a.type===f)(b===g&&a.originalEvent.detail>0||b===w&&a.originalEvent.detail<0)&&a.preventDefault();
  1793. else if(a.type===p){if(!a.originalEvent||!a.originalEvent.wheelDelta)return;
  1794. (b===g&&a.originalEvent.wheelDelta<0||b===w&&a.originalEvent.wheelDelta>0)&&a.preventDefault()}},j.prototype.nativeScrolling=function(){this.$content.css({WebkitOverflowScrolling:"touch"}),this.iOSNativeScrolling=!0,this.isActive=!0},j.prototype.updateScrollValues=function(){var a,b;
  1795. a=this.content,this.maxScrollTop=a.scrollHeight-a.clientHeight,this.prevScrollTop=this.contentScrollTop||0,this.contentScrollTop=a.scrollTop,b=this.contentScrollTop>this.previousPosition?"down":this.contentScrollTop<this.previousPosition?"up":"same",this.previousPosition=this.contentScrollTop,"same"!==b&&this.$el.trigger("update",{position:this.contentScrollTop,maximum:this.maxScrollTop,direction:b}),this.iOSNativeScrolling||(this.maxSliderTop=this.paneHeight-this.sliderHeight,this.sliderTop=0===this.maxScrollTop?0:this.contentScrollTop*this.maxSliderTop/this.maxScrollTop)},j.prototype.setOnScrollStyles=function(){var a;
  1796. B?(a={},a[E]="translate(0, "+this.sliderTop+"px)"):a={top:this.sliderTop},D?(y&&this.scrollRAF&&y(this.scrollRAF),this.scrollRAF=D(function(b){return function(){return b.scrollRAF=null,b.slider.css(a)}}(this))):this.slider.css(a)},j.prototype.createEvents=function(){this.events={down:function(a){return function(b){return a.isBeingDragged=!0,a.offsetY=b.pageY-a.slider.offset().top,a.slider.is(b.target)||(a.offsetY=0),a.pane.addClass("active"),a.doc.bind(n,a.events[h]).bind(o,a.events[w]),a.body.bind(m,a.events[i]),!1}}(this),drag:function(a){return function(b){return a.sliderY=b.pageY-a.$el.offset().top-a.paneTop-(a.offsetY||.5*a.sliderHeight),a.scroll(),a.contentScrollTop>=a.maxScrollTop&&a.prevScrollTop!==a.maxScrollTop?a.$el.trigger("scrollend"):0===a.contentScrollTop&&0!==a.prevScrollTop&&a.$el.trigger("scrolltop"),!1}}(this),up:function(a){return function(b){return a.isBeingDragged=!1,a.pane.removeClass("active"),a.doc.unbind(n,a.events[h]).unbind(o,a.events[w]),a.body.unbind(m,a.events[i]),!1}}(this),resize:function(a){return function(b){a.reset()}}(this),panedown:function(a){return function(b){return a.sliderY=(b.offsetY||b.originalEvent.layerY)-.5*a.sliderHeight,a.scroll(),a.events.down(b),!1}}(this),scroll:function(a){return function(b){a.updateScrollValues(),a.isBeingDragged||(a.iOSNativeScrolling||(a.sliderY=a.sliderTop,a.setOnScrollStyles()),null!=b&&(a.contentScrollTop>=a.maxScrollTop?(a.options.preventPageScrolling&&a.preventScrolling(b,g),a.prevScrollTop!==a.maxScrollTop&&a.$el.trigger("scrollend")):0===a.contentScrollTop&&(a.options.preventPageScrolling&&a.preventScrolling(b,w),0!==a.prevScrollTop&&a.$el.trigger("scrolltop"))))}}(this),wheel:function(a){return function(b){var c;
  1797. return null!=b?(c=b.delta||b.wheelDelta||b.originalEvent&&b.originalEvent.wheelDelta||-b.detail||b.originalEvent&&-b.originalEvent.detail,c&&(a.sliderY+=-c/3),a.scroll(),!1):void 0}}(this),enter:function(a){return function(b){var c;
  1798. return a.isBeingDragged&&1!==(b.buttons||b.which)?(c=a.events)[w].apply(c,arguments):void 0}}(this)}},j.prototype.addEvents=function(){var a;
  1799. this.removeEvents(),a=this.events,this.options.disableResize||this.win.bind(s,a[s]),this.iOSNativeScrolling||(this.slider.bind(l,a[g]),this.pane.bind(l,a[r]).bind(""+p+" "+f,a[x])),this.$content.bind(""+t+" "+p+" "+f+" "+v,a[t])},j.prototype.removeEvents=function(){var a;
  1800. a=this.events,this.win.unbind(s,a[s]),this.iOSNativeScrolling||(this.slider.unbind(),this.pane.unbind()),this.$content.unbind(""+t+" "+p+" "+f+" "+v,a[t])},j.prototype.generate=function(){var a,c,d,f,g,h,i;
  1801. return f=this.options,h=f.paneClass,i=f.sliderClass,a=f.contentClass,(g=this.$el.children("."+h)).length||g.children("."+i).length||this.$el.append('<div class="'+h+'"><div class="'+i+'" /></div>'),this.pane=this.$el.children("."+h),this.slider=this.pane.find("."+i),0===e&&C()?(d=b.getComputedStyle(this.content,null).getPropertyValue("padding-right").replace(/[^0-9.]+/g,""),c={right:-14,paddingRight:+d+14}):e&&(c={right:-e},this.$el.addClass("has-scrollbar")),null!=c&&this.$content.css(c),this},j.prototype.restore=function(){this.stopped=!1,this.iOSNativeScrolling||this.pane.show(),this.addEvents()},j.prototype.reset=function(){var a,b,c,f,g,h,i,j,k,l,m,n;
  1802. return this.iOSNativeScrolling?void(this.contentHeight=this.content.scrollHeight):(this.$el.find("."+this.options.paneClass).length||this.generate().stop(),this.stopped&&this.restore(),a=this.content,f=a.style,g=f.overflowY,d&&this.$content.css({height:this.$content.height()}),b=a.scrollHeight+e,l=parseInt(this.$el.css("max-height"),10),l>0&&(this.$el.height(""),this.$el.height(a.scrollHeight>l?l:a.scrollHeight)),i=this.pane.outerHeight(!1),k=parseInt(this.pane.css("top"),10),h=parseInt(this.pane.css("bottom"),10),j=i+k+h,n=Math.round(j/b*i),n<this.options.sliderMinHeight?n=this.options.sliderMinHeight:null!=this.options.sliderMaxHeight&&n>this.options.sliderMaxHeight&&(n=this.options.sliderMaxHeight),g===t&&f.overflowX!==t&&(n+=e),this.maxSliderTop=j-n,this.contentHeight=b,this.paneHeight=i,this.paneOuterHeight=j,this.sliderHeight=n,this.paneTop=k,this.slider.height(n),this.events.scroll(),this.pane.show(),this.isActive=!0,a.scrollHeight===a.clientHeight||this.pane.outerHeight(!0)>=a.scrollHeight&&g!==t?(this.pane.hide(),this.isActive=!1):this.el.clientHeight===a.scrollHeight&&g===t?this.slider.hide():this.slider.show(),this.pane.css({opacity:this.options.alwaysVisible?1:"",visibility:this.options.alwaysVisible?"visible":""}),c=this.$content.css("position"),("static"===c||"relative"===c)&&(m=parseInt(this.$content.css("right"),10),m&&this.$content.css({right:"",marginRight:m})),this)},j.prototype.scroll=function(){return this.isActive?(this.sliderY=Math.max(0,this.sliderY),this.sliderY=Math.min(this.maxSliderTop,this.sliderY),this.$content.scrollTop(this.maxScrollTop*this.sliderY/this.maxSliderTop),this.iOSNativeScrolling||(this.updateScrollValues(),this.setOnScrollStyles()),this):void 0},j.prototype.scrollBottom=function(a){return this.isActive?(this.$content.scrollTop(this.contentHeight-this.$content.height()-a).trigger(p),this.stop().restore(),this):void 0},j.prototype.scrollTop=function(a){return this.isActive?(this.$content.scrollTop(+a).trigger(p),this.stop().restore(),this):void 0},j.prototype.scrollTo=function(a){return this.isActive?(this.scrollTop(this.$el.find(a).get(0).offsetTop),this):void 0},j.prototype.stop=function(){return y&&this.scrollRAF&&(y(this.scrollRAF),this.scrollRAF=null),this.stopped=!0,this.removeEvents(),this.iOSNativeScrolling||this.pane.hide(),this},j.prototype.destroy=function(){return this.stopped||this.stop(),!this.iOSNativeScrolling&&this.pane.length&&this.pane.remove(),d&&this.$content.height(""),this.$content.removeAttr("tabindex"),this.$el.hasClass("has-scrollbar")&&(this.$el.removeClass("has-scrollbar"),this.$content.css({right:""})),this},j.prototype.flash=function(){return!this.iOSNativeScrolling&&this.isActive?(this.reset(),this.pane.addClass("flashed"),setTimeout(function(a){return function(){a.pane.removeClass("flashed")}}(this),this.options.flashDelay),this):void 0},j}(),a.fn.nanoScroller=function(b){return this.each(function(){var c,d;
  1803. if((d=this.nanoscroller)||(c=a.extend({},z,b),this.nanoscroller=d=new q(this,c)),b&&"object"==typeof b){if(a.extend(d.options,b),null!=b.scrollBottom)return d.scrollBottom(b.scrollBottom);
  1804. if(null!=b.scrollTop)return d.scrollTop(b.scrollTop);
  1805. if(b.scrollTo)return d.scrollTo(b.scrollTo);
  1806. if("bottom"===b.scroll)return d.scrollBottom(0);
  1807. if("top"===b.scroll)return d.scrollTop(0);
  1808. if(b.scroll&&b.scroll instanceof a)return d.scrollTo(b.scroll);
  1809. if(b.stop)return d.stop();
  1810. if(b.destroy)return d.destroy();
  1811. if(b.flash)return d.flash()}return d.reset()})},a.fn.nanoScroller.Constructor=q})}(window,window.HRZ.jQuery),function(){"use strict";
  1812. function a(a){return"function"==typeof a||"object"==typeof a&&null!==a}function b(a){return"function"==typeof a}function c(a){return"object"==typeof a&&null!==a}function d(a){P=a}function e(a){T=a}function f(){return function(){process.nextTick(k)}}function g(){return function(){O(k)}}function h(){var a=0,b=new W(k),c=document.createTextNode("");
  1813. return b.observe(c,{characterData:!0}),function(){c.data=a=++a%2}}function i(){var a=new MessageChannel;
  1814. return a.port1.onmessage=k,function(){a.port2.postMessage(0)}}function j(){return function(){setTimeout(k,1)}}function k(){for(var a=0;
  1815. S>a;
  1816. a+=2){var b=Z[a],c=Z[a+1];
  1817. b(c),Z[a]=void 0,Z[a+1]=void 0}S=0}function l(){try{var a=require,b=a("vertx");
  1818. return O=b.runOnLoop||b.runOnContext,g()}catch(c){return j()}}function m(){}function n(){return new TypeError("You cannot resolve a promise with itself")}function o(){return new TypeError("A promises callback cannot return that same promise.")}function p(a){try{return a.then}catch(b){return ba.error=b,ba}}function q(a,b,c,d){try{a.call(b,c,d)}catch(e){return e}}function r(a,b,c){T(function(a){var d=!1,e=q(c,b,function(c){d||(d=!0,b!==c?u(a,c):w(a,c))},function(b){d||(d=!0,x(a,b))},"Settle: "+(a._label||" unknown promise"));
  1819. !d&&e&&(d=!0,x(a,e))},a)}function s(a,b){b._state===_?w(a,b._result):b._state===aa?x(a,b._result):y(b,void 0,function(b){u(a,b)},function(b){x(a,b)})}function t(a,c){if(c.constructor===a.constructor)s(a,c);
  1820. else{var d=p(c);
  1821. d===ba?x(a,ba.error):void 0===d?w(a,c):b(d)?r(a,c,d):w(a,c)}}function u(b,c){b===c?x(b,n()):a(c)?t(b,c):w(b,c)}function v(a){a._onerror&&a._onerror(a._result),z(a)}function w(a,b){a._state===$&&(a._result=b,a._state=_,0!==a._subscribers.length&&T(z,a))}function x(a,b){a._state===$&&(a._state=aa,a._result=b,T(v,a))}function y(a,b,c,d){var e=a._subscribers,f=e.length;
  1822. a._onerror=null,e[f]=b,e[f+_]=c,e[f+aa]=d,0===f&&a._state&&T(z,a)}function z(a){var b=a._subscribers,c=a._state;
  1823. if(0!==b.length){for(var d,e,f=a._result,g=0;
  1824. g<b.length;
  1825. g+=3)d=b[g],e=b[g+c],d?C(c,d,e,f):e(f);
  1826. a._subscribers.length=0}}function A(){this.error=null}function B(a,b){try{return a(b)}catch(c){return ca.error=c,ca}}function C(a,c,d,e){var f,g,h,i,j=b(d);
  1827. if(j){if(f=B(d,e),f===ca?(i=!0,g=f.error,f=null):h=!0,c===f)return void x(c,o())}else f=e,h=!0;
  1828. c._state!==$||(j&&h?u(c,f):i?x(c,g):a===_?w(c,f):a===aa&&x(c,f))}function D(a,b){try{b(function(b){u(a,b)},function(b){x(a,b)})}catch(c){x(a,c)}}function E(a,b){var c=this;
  1829. c._instanceConstructor=a,c.promise=new a(m),c._validateInput(b)?(c._input=b,c.length=b.length,c._remaining=b.length,c._init(),0===c.length?w(c.promise,c._result):(c.length=c.length||0,c._enumerate(),0===c._remaining&&w(c.promise,c._result))):x(c.promise,c._validationError())}function F(a){return new da(this,a).promise}function G(a){function b(a){u(e,a)}function c(a){x(e,a)}var d=this,e=new d(m);
  1830. if(!R(a))return x(e,new TypeError("You must pass an array to race.")),e;
  1831. for(var f=a.length,g=0;
  1832. e._state===$&&f>g;
  1833. g++)y(d.resolve(a[g]),void 0,b,c);
  1834. return e}function H(a){var b=this;
  1835. if(a&&"object"==typeof a&&a.constructor===b)return a;
  1836. var c=new b(m);
  1837. return u(c,a),c}function I(a){var b=this,c=new b(m);
  1838. return x(c,a),c}function J(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}function K(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}function L(a){this._id=ia++,this._state=void 0,this._result=void 0,this._subscribers=[],m!==a&&(b(a)||J(),this instanceof L||K(),D(this,a))}function M(){var a;
  1839. if("undefined"!=typeof global)a=global;
  1840. else if("undefined"!=typeof self)a=self;
  1841. else try{a=Function("return this")()}catch(b){throw new Error("polyfill failed because global object is unavailable in this environment")}var c=a.Promise;
  1842. c&&"[object Promise]"===Object.prototype.toString.call(c.resolve())&&!c.cast||(a.Promise=ja)}var N;
  1843. N=Array.isArray?Array.isArray:function(a){return"[object Array]"===Object.prototype.toString.call(a)};
  1844. var O,P,Q,R=N,S=0,T=({}.toString,function(a,b){Z[S]=a,Z[S+1]=b,S+=2,2===S&&(P?P(k):Q())}),U="undefined"!=typeof window?window:void 0,V=U||{},W=V.MutationObserver||V.WebKitMutationObserver,X="undefined"!=typeof process&&"[object process]"==={}.toString.call(process),Y="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel,Z=new Array(1e3);
  1845. Q=X?f():W?h():Y?i():void 0===U&&"function"==typeof require?l():j();
  1846. var $=void 0,_=1,aa=2,ba=new A,ca=new A;
  1847. E.prototype._validateInput=function(a){return R(a)},E.prototype._validationError=function(){return new Error("Array Methods must be provided an Array")},E.prototype._init=function(){this._result=new Array(this.length)};
  1848. var da=E;
  1849. E.prototype._enumerate=function(){for(var a=this,b=a.length,c=a.promise,d=a._input,e=0;
  1850. c._state===$&&b>e;
  1851. e++)a._eachEntry(d[e],e)},E.prototype._eachEntry=function(a,b){var d=this,e=d._instanceConstructor;
  1852. c(a)?a.constructor===e&&a._state!==$?(a._onerror=null,d._settledAt(a._state,b,a._result)):d._willSettleAt(e.resolve(a),b):(d._remaining--,d._result[b]=a)},E.prototype._settledAt=function(a,b,c){var d=this,e=d.promise;
  1853. e._state===$&&(d._remaining--,a===aa?x(e,c):d._result[b]=c),0===d._remaining&&w(e,d._result)},E.prototype._willSettleAt=function(a,b){var c=this;
  1854. y(a,void 0,function(a){c._settledAt(_,b,a)},function(a){c._settledAt(aa,b,a)})};
  1855. var ea=F,fa=G,ga=H,ha=I,ia=0,ja=L;
  1856. L.all=ea,L.race=fa,L.resolve=ga,L.reject=ha,L._setScheduler=d,L._setAsap=e,L._asap=T,L.prototype={constructor:L,then:function(a,b){var c=this,d=c._state;
  1857. if(d===_&&!a||d===aa&&!b)return this;
  1858. var e=new this.constructor(m),f=c._result;
  1859. if(d){var g=arguments[d-1];
  1860. T(function(){C(d,e,g,f)})}else y(c,e,a,b);
  1861. return e},"catch":function(a){return this.then(null,a)}};
  1862. var ka=M,la={Promise:ja,polyfill:ka};
  1863. "function"==typeof define&&define.amd?define(function(){return la}):"undefined"!=typeof module&&module.exports?module.exports=la:"undefined"!=typeof this&&(this.ES6Promise=la),ka()}.call(this),!function(a,b){"use strict";
  1864. "function"==typeof define&&define.amd?define("mediator-js",[],function(){return a.Mediator=b(),a.Mediator}):"undefined"!=typeof exports?exports.Mediator=b():a.Mediator=b()}(this,function(){"use strict";
  1865. function a(){var a=function(){return(0|65536*(1+Math.random())).toString(16).substring(1)};
  1866. return a()+a()+"-"+a()+"-"+a()+"-"+a()+"-"+a()+a()+a()}function b(c,d,e){return this instanceof b?(this.id=a(),this.fn=c,this.options=d,this.context=e,void(this.channel=null)):new b(c,d,e)}function c(a,b){return this instanceof c?(this.namespace=a||"",this._subscribers=[],this._channels={},this._parent=b,void(this.stopped=!1)):new c(a)}function d(){return this instanceof d?void(this._channels=new c("")):new d}return b.prototype={update:function(a){a&&(this.fn=a.fn||this.fn,this.context=a.context||this.context,this.options=a.options||this.options,this.channel&&this.options&&void 0!==this.options.priority&&this.channel.setPriority(this.id,this.options.priority))}},c.prototype={addSubscriber:function(a,c,d){var e=new b(a,c,d);
  1867. return c&&void 0!==c.priority?(c.priority=c.priority>>0,c.priority<0&&(c.priority=0),c.priority>=this._subscribers.length&&(c.priority=this._subscribers.length-1),this._subscribers.splice(c.priority,0,e)):this._subscribers.push(e),e.channel=this,e},stopPropagation:function(){this.stopped=!0},getSubscriber:function(a){var b=0,c=this._subscribers.length;
  1868. for(c;
  1869. c>b;
  1870. b++)if(this._subscribers[b].id===a||this._subscribers[b].fn===a)return this._subscribers[b]},setPriority:function(a,b){var c,d,e,f,g=0,h=0;
  1871. for(h=0,f=this._subscribers.length;
  1872. f>h&&this._subscribers[h].id!==a&&this._subscribers[h].fn!==a;
  1873. h++)g++;
  1874. c=this._subscribers[g],d=this._subscribers.slice(0,g),e=this._subscribers.slice(g+1),this._subscribers=d.concat(e),this._subscribers.splice(b,0,c)},addChannel:function(a){this._channels[a]=new c((this.namespace?this.namespace+":":"")+a,this)},hasChannel:function(a){return this._channels.hasOwnProperty(a)},returnChannel:function(a){return this._channels[a]},removeSubscriber:function(a){var b=this._subscribers.length-1;
  1875. if(!a)return void(this._subscribers=[]);
  1876. for(b;
  1877. b>=0;
  1878. b--)(this._subscribers[b].fn===a||this._subscribers[b].id===a)&&(this._subscribers[b].channel=null,this._subscribers.splice(b,1))},publish:function(a){var b,c,d,e=0,f=this._subscribers.length,g=!1;
  1879. for(f;
  1880. f>e;
  1881. e++)g=!1,b=this._subscribers[e],this.stopped||(c=this._subscribers.length,void 0!==b.options&&"function"==typeof b.options.predicate?b.options.predicate.apply(b.context,a)&&(g=!0):g=!0),g&&(b.options&&void 0!==b.options.calls&&(b.options.calls--,b.options.calls<1&&this.removeSubscriber(b.id)),b.fn.apply(b.context,a),d=this._subscribers.length,f=d,d===c-1&&e--);
  1882. this._parent&&this._parent.publish(a),this.stopped=!1}},d.prototype={getChannel:function(a,b){var c=this._channels,d=a.split(":"),e=0,f=d.length;
  1883. if(""===a)return c;
  1884. if(d.length>0)for(f;
  1885. f>e;
  1886. e++){if(!c.hasChannel(d[e])){if(b)break;
  1887. c.addChannel(d[e])}c=c.returnChannel(d[e])}return c},subscribe:function(a,b,c,d){var e=this.getChannel(a||"",!1);
  1888. return c=c||{},d=d||{},e.addSubscriber(b,c,d)},once:function(a,b,c,d){return c=c||{},c.calls=1,this.subscribe(a,b,c,d)},getSubscriber:function(a,b){var c=this.getChannel(b||"",!0);
  1889. return c.namespace!==b?null:c.getSubscriber(a)},remove:function(a,b){var c=this.getChannel(a||"",!0);
  1890. return c.namespace!==a?!1:void c.removeSubscriber(b)},publish:function(a){var b=this.getChannel(a||"",!0);
  1891. if(b.namespace!==a)return null;
  1892. var c=Array.prototype.slice.call(arguments,1);
  1893. c.push(b),b.publish(c)}},d.prototype.on=d.prototype.subscribe,d.prototype.bind=d.prototype.subscribe,d.prototype.emit=d.prototype.publish,d.prototype.trigger=d.prototype.publish,d.prototype.off=d.prototype.remove,d.Channel=c,d.Subscriber=b,d.version="0.9.8",d}),window.Silverlight||(window.Silverlight={}),Silverlight._silverlightCount=0,Silverlight.__onSilverlightInstalledCalled=!1,Silverlight.fwlinkRoot="http://go2.microsoft.com/fwlink/?LinkID=",Silverlight.__installationEventFired=!1,Silverlight.onGetSilverlight=null,Silverlight.onSilverlightInstalled=function(){window.location.reload(!1)},Silverlight.isInstalled=function(a){void 0==a&&(a=null);
  1894. var b=!1;
  1895. try{var c=null,d=!1;
  1896. if(window.ActiveXObject)try{c=new ActiveXObject("AgControl.AgControl"),null===a?b=!0:c.IsVersionSupported(a)&&(b=!0),c=null}catch(e){d=!0}else d=!0;
  1897. if(d){var f=navigator.plugins["Silverlight Plug-In"];
  1898. if(f)if(null===a)b=!0;
  1899. else{var g=f.description;
  1900. "1.0.30226.2"===g&&(g="2.0.30226.2");
  1901. for(var h=g.split(".");
  1902. h.length>3;
  1903. )h.pop();
  1904. for(;
  1905. h.length<4;
  1906. )h.push(0);
  1907. for(var i=a.split(".");
  1908. i.length>4;
  1909. )i.pop();
  1910. var j,k,l=0;
  1911. do j=parseInt(i[l]),k=parseInt(h[l]),l++;
  1912. while(l<i.length&&j===k);
  1913. k>=j&&!isNaN(j)&&(b=!0)}}}catch(e){b=!1}return b},Silverlight.WaitForInstallCompletion=function(){if(!Silverlight.isBrowserRestartRequired&&Silverlight.onSilverlightInstalled){try{navigator.plugins.refresh()}catch(a){}Silverlight.isInstalled(null)&&!Silverlight.__onSilverlightInstalledCalled?(Silverlight.onSilverlightInstalled(),Silverlight.__onSilverlightInstalledCalled=!0):setTimeout(Silverlight.WaitForInstallCompletion,3e3)}},Silverlight.__startup=function(){if(navigator.plugins.refresh(),Silverlight.isBrowserRestartRequired=Silverlight.isInstalled(null),Silverlight.isBrowserRestartRequired){if(window.navigator.mimeTypes){var a=navigator.mimeTypes["application/x-silverlight-2"],b=navigator.mimeTypes["application/x-silverlight-2-b2"],c=navigator.mimeTypes["application/x-silverlight-2-b1"],d=c;
  1914. b&&(d=b),a||!c&&!b?a&&d&&a.enabledPlugin&&d.enabledPlugin&&a.enabledPlugin.description!=d.enabledPlugin.description&&(Silverlight.__installationEventFired||(Silverlight.onRestartRequired(),Silverlight.__installationEventFired=!0)):Silverlight.__installationEventFired||(Silverlight.onUpgradeRequired(),Silverlight.__installationEventFired=!0)}}else Silverlight.WaitForInstallCompletion(),Silverlight.__installationEventFired||(Silverlight.onInstallRequired(),Silverlight.__installationEventFired=!0);
  1915. Silverlight.disableAutoStartup||(window.removeEventListener?window.removeEventListener("load",Silverlight.__startup,!1):window.detachEvent("onload",Silverlight.__startup))},Silverlight.disableAutoStartup||(window.addEventListener?window.addEventListener("load",Silverlight.__startup,!1):window.attachEvent("onload",Silverlight.__startup)),Silverlight.createObject=function(a,b,c,d,e,f,g){var h={},i=d,j=e;
  1916. if(h.version=i.version,i.source=a,h.alt=i.alt,f&&(i.initParams=f),i.isWindowless&&!i.windowless&&(i.windowless=i.isWindowless),i.framerate&&!i.maxFramerate&&(i.maxFramerate=i.framerate),c&&!i.id&&(i.id=c),delete i.ignoreBrowserVer,delete i.inplaceInstallPrompt,delete i.version,delete i.isWindowless,delete i.framerate,delete i.data,delete i.src,delete i.alt,Silverlight.isInstalled(h.version)){for(var k in j)if(j[k]){if("onLoad"==k&&"function"==typeof j[k]&&1!=j[k].length){var l=j[k];
  1917. j[k]=function(a){return l(document.getElementById(c),g,a)}}var m=Silverlight.__getHandlerName(j[k]);
  1918. if(null==m)throw"typeof events."+k+" must be 'function' or 'string'";
  1919. i[k]=m,j[k]=null}slPluginHTML=Silverlight.buildHTML(i)}else slPluginHTML=Silverlight.buildPromptHTML(h);
  1920. return b?void(b.innerHTML=slPluginHTML):slPluginHTML},Silverlight.buildHTML=function(a){var b=[];
  1921. b.push('<object type="application/x-silverlight" data="data:application/x-silverlight,"'),null!=a.id&&b.push(' id="'+Silverlight.HtmlAttributeEncode(a.id)+'"'),null!=a.width&&b.push(' width="'+a.width+'"'),null!=a.height&&b.push(' height="'+a.height+'"'),b.push(" >"),delete a.id,delete a.width,delete a.height;
  1922. for(var c in a)a[c]&&b.push('<param name="'+Silverlight.HtmlAttributeEncode(c)+'" value="'+Silverlight.HtmlAttributeEncode(a[c])+'" />');
  1923. return b.push("</object>"),b.join("")},Silverlight.createObjectEx=function(a){var b=a,c=Silverlight.createObject(b.source,b.parentElement,b.id,b.properties,b.events,b.initParams,b.context);
  1924. return null==b.parentElement?c:void 0},Silverlight.buildPromptHTML=function(a){var b="",c=Silverlight.fwlinkRoot,d=a.version;
  1925. return a.alt?b=a.alt:(d||(d=""),b="<a href='javascript:Silverlight.getSilverlight(\"{1}\");
  1926. ' style='text-decoration: none;
  1927. '><img src='{2}' alt='Get Microsoft Silverlight' style='border-style: none'/></a>",b=b.replace("{1}",d),b=b.replace("{2}",c+"108181")),b},Silverlight.getSilverlight=function(a){Silverlight.onGetSilverlight&&Silverlight.onGetSilverlight();
  1928. var b="",c=String(a).split(".");
  1929. if(c.length>1){var d=parseInt(c[0]);
  1930. b=isNaN(d)||2>d?"1.0":c[0]+"."+c[1]}var e="";
  1931. b.match(/^\d+\056\d+$/)&&(e="&v="+b),Silverlight.followFWLink("149156"+e)},Silverlight.followFWLink=function(a){top.location=Silverlight.fwlinkRoot+String(a)},Silverlight.HtmlAttributeEncode=function(a){var b,c="";
  1932. if(null==a)return null;
  1933. for(var d=0;
  1934. d<a.length;
  1935. d++)b=a.charCodeAt(d),b>96&&123>b||b>64&&91>b||b>43&&58>b&&47!=b||95==b?c+=String.fromCharCode(b):c=c+"&#"+b+";
  1936. ";
  1937. return c},Silverlight.default_error_handler=function(a,b){var c,d=b.ErrorType;
  1938. c=b.ErrorCode;
  1939. var e="\nSilverlight error message     \n";
  1940. e+="ErrorCode: "+c+"\n",e+="ErrorType: "+d+"       \n",e+="Message: "+b.ErrorMessage+"     \n","ParserError"==d?(e+="XamlFile: "+b.xamlFile+"     \n",e+="Line: "+b.lineNumber+"     \n",e+="Position: "+b.charPosition+"     \n"):"RuntimeError"==d&&(0!=b.lineNumber&&(e+="Line: "+b.lineNumber+"     \n",e+="Position: "+b.charPosition+"     \n"),e+="MethodName: "+b.methodName+"     \n"),alert(e)},Silverlight.__cleanup=function(){for(var a=Silverlight._silverlightCount-1;
  1941. a>=0;
  1942. a--)window["__slEvent"+a]=null;
  1943. Silverlight._silverlightCount=0,
  1944. window.removeEventListener?window.removeEventListener("unload",Silverlight.__cleanup,!1):window.detachEvent("onunload",Silverlight.__cleanup)},Silverlight.__getHandlerName=function(a){var b="";
  1945. if("string"==typeof a)b=a;
  1946. else if("function"==typeof a){0==Silverlight._silverlightCount&&(window.addEventListener?window.addEventListener("onunload",Silverlight.__cleanup,!1):window.attachEvent("onunload",Silverlight.__cleanup));
  1947. var c=Silverlight._silverlightCount++;
  1948. b="__slEvent"+c,window[b]=a}else b=null;
  1949. return b},Silverlight.onRequiredVersionAvailable=function(){},Silverlight.onRestartRequired=function(){},Silverlight.onUpgradeRequired=function(){},Silverlight.onInstallRequired=function(){},Silverlight.IsVersionAvailableOnError=function(a,b){var c=!1;
  1950. try{8001!=b.ErrorCode||Silverlight.__installationEventFired?8002!=b.ErrorCode||Silverlight.__installationEventFired?5014==b.ErrorCode||2106==b.ErrorCode?Silverlight.__verifySilverlight2UpgradeSuccess(b.getHost())&&(c=!0):c=!0:(Silverlight.onRestartRequired(),Silverlight.__installationEventFired=!0):(Silverlight.onUpgradeRequired(),Silverlight.__installationEventFired=!0)}catch(d){}return c},Silverlight.IsVersionAvailableOnLoad=function(a){var b=!1;
  1951. try{Silverlight.__verifySilverlight2UpgradeSuccess(a.getHost())&&(b=!0)}catch(c){}return b},Silverlight.__verifySilverlight2UpgradeSuccess=function(a){var b=!1,c="2.0.31005",d=null;
  1952. try{a.IsVersionSupported(c+".99")?(d=Silverlight.onRequiredVersionAvailable,b=!0):d=a.IsVersionSupported(c+".0")?Silverlight.onRestartRequired:Silverlight.onUpgradeRequired,d&&!Silverlight.__installationEventFired&&(d(),Silverlight.__installationEventFired=!0)}catch(e){}return b},window.HRZ=window.HRZ||{},function(a,b,c,d){"use strict";
  1953. function e(e){var f={height:"100%",width:"100%",playerMode:b.constants.playerMode.standard,loadCSS:!0,autoPlay:!0,logLevel:b.constants.logLevel.info,livePassMode:b.constants.LIVE_PASS_MODE.EMPTY,inactivityLimit:14400,showBackToBrowseButton:!1,switchAudioLangs:!0,enableSubtitles:!0,enableScalableLicense:!1,forceHttpsStreaming:!1,bufferReportingPeriod:5,bufferReportingRepeat:10,bufferReloadTime:20},g={},h=b.utils.UrlParams[b.constants.CUSTOM_URL_PARAM.SWITCH_AUDIO_LANGS];
  1954. h&&(g.switchAudioLangs=b.utils.isTrue(a.decodeURIComponent(h)));
  1955. var i=b.utils.UrlParams[b.constants.CUSTOM_URL_PARAM.ENABLE_REPLAY_TV];
  1956. i?g.enableReplayTV=b.utils.isTrue(a.decodeURIComponent(i)):e.enableReplayTV=b.utils.isTrue(e.enableReplayTV);
  1957. var j=b.utils.UrlParams[b.constants.CUSTOM_URL_PARAM.ENABLE_SUBTITLES];
  1958. j?g.enableSubtitles=b.utils.isTrue(a.decodeURIComponent(j)):e.enableSubtitles!==d&&(e.enableSubtitles=b.utils.isTrue(e.enableSubtitles));
  1959. var k=b.utils.UrlParams[b.constants.CUSTOM_URL_PARAM.FORCE_HTTP_STREAMING];
  1960. return k?g.forceHttpsStreaming=b.utils.isTrue(a.decodeURIComponent(k)):e.forceHttpsStreaming=b.utils.isTrue(e.forceHttpsStreaming),c.extend(f,e,g)}function f(a,d){console&&console.log("HRZ-player. v-"+b.config.Branch+b.config.Version),console&&console.log("HRZ-player. Constructor is called."),c.support.cors=!0,b.Mediator.publish("errorHandler:create"),b.config.apiUrl=a.baseUrl+a.countryCode+"/"+a.languageCode+"/web/",this.readyCallback=d,a=a||{},this._subscriptions={},b.MsgManager.setLocale(a.countryCode,a.languageCode),a=e(a),this._playerMode=a.playerMode;
  1961. var f=document.getElementById(a.placeholder);
  1962. this.element=f;
  1963. var g=new c.Deferred;
  1964. f.style.width=a.width,f.style.height=a.height;
  1965. var h=this;
  1966. g.done(function(b){a.authToken=b,h._render(a)}),this._bindSlEvents(),b.data.getSession(a).done(function(a){b.user=a,g.resolve(a.oespToken)}).fail(function(a){b.Mediator.publish("error:hrz",b.errors.OESP_GET_SESSION_ERROR)})}b.Mediator=b.Mediator||new a.Mediator;
  1967. var g=function(a){return c.trim(a).replace(/\s{2,}/gi," ").split(" ")};
  1968. f.prototype.off=function(a){var b;
  1969. if(a){b=g(a);
  1970. for(var c=0,d=b.length;
  1971. d>c;
  1972. c++)this._subscriptions&&delete this._subscriptions[b[c]]}else for(var e in this._subscriptions)this._subscriptions.hasOwnProperty(e)&&this._subscriptions&&delete this._subscriptions[e];
  1973. return this},f.prototype.on=function(a,b){if("string"!=typeof a||"function"!=typeof b)return this;
  1974. for(var c=g(a),d=0,e=c.length;
  1975. e>d;
  1976. d++)this._subscriptions[c[d]]?this._subscriptions[c[d]].handlers.push(b):this._subscriptions[c[d]]={handlers:[b]};
  1977. return this},f.prototype.loadVideo=function(a){this.videoBridge.loadVideo(a),console&&console.log("HRZ-player. loadVideo is called. videoId: "+a)},f.prototype.loadChannel=function(a,b){this.videoBridge.loadChannel(a,b),console&&console.log("HRZ-player. loadChannel is called. channelId: "+a)},f.prototype.replayActivationNeeded=function(a){return this.videoBridge.replayActivationNeeded(a)},f.prototype.play=function(){this.videoBridge.play()},f.prototype.playFrom=function(a){this.videoBridge.playFrom(a)},f.prototype.pause=function(){this.videoBridge.pause()},f.prototype.stop=function(){this.videoBridge.stop()},f.prototype.restart=function(){this.videoBridge.restart()},f.prototype.getDuration=function(){var a=this.videoBridge.getDuration();
  1978. return console&&console.log("HRZ-player. getDuration is called. returns: "+a),a},f.prototype.getPosition=function(){var a=this.videoBridge.getPosition();
  1979. return console&&console.log("HRZ-player. getPosition is called. returns: "+a),a},f.prototype.exitFullScreen=function(){this.videoBridge.exitFullScreen()},f.prototype.isInFullScreen=function(){return this.videoBridge.isInFullScreen()},f.prototype.fullScreen=function(){this.videoBridge.goToFullScreen()},f.prototype.playing=function(){return this.videoBridge.playing()},f.prototype.volume=function(a){return this.videoBridge.volume(a)},f.prototype.setOverlay=function(a){this.videoBridge.setOverlay(a)},f.prototype.setAsWatched=function(){this.videoBridge.setAsWatched()},f.prototype.enterParentalPin=function(a){b.data.enterParentalPin(a)},f.prototype.enterAdultPin=function(a){b.data.enterAdultPin(a)},f.prototype.getItem=function(){return this.videoBridge.getItem()},f.prototype.getSilverlightVersion=function(){return this.videoBridge.getSilverlightVersion()},f.prototype.update=function(){},f.prototype.destroy=function(){this._unBindEvents(),b.Mediator.publish("destroy"),this.element.innerHTML="",console&&console.log("HRZ-player. Destroy is called.")},f.prototype._render=function(a){this._bindMediatorEvents(),this.videoBridge=new b.VideoBridge(a.placeholder,a),this._bindEvents()},f.prototype._bindMediatorEvents=function(){b.Mediator.on("playback:ready",function(){this.readyCallback&&this.readyCallback()},{},this),b.Mediator.on("videoState:inFullScreen",function(a){this._trigger("fullScreen",[a])},{},this),b.Mediator.on("channel:update",function(a){this._trigger("channelSelected",[{channelName:a.title,channelId:a.id,stationId:a.stationId}])},{},this),b.Mediator.on("channel:programUpdate",function(a){this._trigger("programChanged",[{title:a.currentProgram?a.currentProgram.title:"",programId:a.currentProgram?a.currentProgram.id:""}])},{},this),b.Mediator.on("controls:backToBrowseClicked",function(){this._trigger("backToBrowseClicked",[])},{},this),b.Mediator.on("user:inactivity",function(){this._trigger("inactivity",[])},{},this),b.Mediator.on("user:scrubbed",function(a){this._trigger("userScrubbed",[a]),console&&console.log("HRZ-player. userScrubbed is fired. time: "+a)},{},this),b.Mediator.on("video:durationchange",function(a){"live"!==this._playerMode.toLowerCase()&&this._trigger("durationchange",[a]),console&&console.log("HRZ-player. durationchange is fired. duration: "+a)},{},this),b.Mediator.on("startover:restartClicked",function(){this._trigger("restartClicked",[])},{},this),b.Mediator.on("startover:liveClicked",function(){this._trigger("liveClicked",[])},{},this),b.Mediator.on("replayAssetAvailable",function(a){this._trigger("replayAssetAvailable",[a])},{},this),b.Mediator.on("startover:restartClickedInActivationNeededMode",function(a){this._trigger("restartClickedInActivationNeededMode",[])},{},this),b.Mediator.on("video:stateChange",function(a,b){b=b||{},b.doNotExpose!==!0&&this._trigger("stateChange",[{state:a}])},{},this),b.Mediator.on("assetLoaded",function(a){this._trigger("assetLoaded",[])},{},this),b.Mediator.on("public:bookmarked",function(a){this._trigger("bookmarked",[a])},{},this)},f.prototype._bindEvents=function(){},f.prototype._bindSlEvents=function(a){var c=this;
  1980. this.slEvents=this.slEvents||["contentEnd","adultListing","deviceIdAvailable","vodHb","linearHb","linearBuffering","captionLoaded"];
  1981. for(var d=0;
  1982. d<this.slEvents.length;
  1983. d++){var e=this.slEvents[d];
  1984. b.Mediator.on(e,function(a){c._trigger(this.eventName,[a])},{},{eventName:e})}b.Mediator.on("error:public",function(a){var b={errorCode:a.errorCode,errorCodeNum:a.errorCodeNum,eventCode:a.eventCode,eventDescription:a.eventDescription,eventDetails:a.eventDetails,causedPlaybackFailure:a.causedPlaybackFailure};
  1985. b.errorCodeNum=c.videoBridge.getNumericErrorCode(b),c.videoBridge.sendMidStreamError(b),c._trigger("error",[b])})},f.prototype._unBindEvents=function(){this.off(),b.Mediator.off("playback:ready"),b.Mediator.off("videoState:inFullScreen"),b.Mediator.off("channel:update"),b.Mediator.off("channel:programUpdate"),b.Mediator.off("controls:backToBrowseClicked"),b.Mediator.off("error:public"),b.Mediator.off("user:inactivity"),b.Mediator.off("user:scrubbed"),b.Mediator.off("video:durationchange"),b.Mediator.off("startover:restartClicked"),b.Mediator.off("startover:liveClicked"),b.Mediator.off("replayAssetAvailable"),b.Mediator.off("video:stateChange"),b.Mediator.off("public:bookmarked"),this._unBindSlEvents()},f.prototype._unBindSlEvents=function(){for(var a=0;
  1986. a<this.slEvents.length;
  1987. a++){var c=this.slEvents[a];
  1988. b.Mediator.off(c)}},f.prototype._trigger=function(a,b){var c,d=this._subscriptions;
  1989. if("string"!=typeof a)return this;
  1990. for(var e=g(a),f=0,h=e.length;
  1991. h>f;
  1992. f++)if(c=e[f],d[c]){b.unshift({name:c,timestamp:new Date});
  1993. for(var i=0,j=d[c].handlers.length;
  1994. j>i;
  1995. i++)d[c].handlers[i].apply(this,b)}return this},b.Player=f}(window,window.HRZ,window.HRZ.jQuery),window.HRZ=window.HRZ||{},function(a,b,c){"use strict";
  1996. b.constants={BROWSER:{Chrome:"chrome",Edge:"edge",Firefox:"firefox",Safari:"safari",Opera:"opera",InternetExplorer:"ie"},language:{code:{NL:"NL"}},country:{code:{NL:"NL"}},playerMode:{standard:"standard",live:"live"},logLevel:{info:"info",debug:"debug"},LIVE_PASS_MODE:{NONE:"none",TEST:"test",TOUCHSTONE:"touchstone",EMPTY:""},defaults:{VOLUME_BY_DEFAULT:90,UPDATE_TOKEN_INTERVAL_TIME:3e4,CHUNK_DURATION:2e3,BOOKMARKS_WATCHED_EDGE:95},MAGIC_NUMBER:{MAGIC_CONST_FOR_REPLAY:8,MAGIC_CONST_FOR_FAKE_DATA_LOADING:800,PLACE_FOR_LT:"1placeForLT1",PLAYER_MEDIA_ERROR_INTERVAL_TIME:3e3,TIMEOUT_FOR_CAPTIONS:500,MAX_ERROR_CODE_SIZE:63},oespHeader:{X_OESP_TOKEN:"X-OESP-Token",X_OESP_USERNAME:"X-OESP-Username",X_OESP_DRM_SCHEMEIDURI:"X-OESP-DRM-SchemeIdUri",X_OESP_LICENSE_TOKEN:"X-OESP-License-Token",X_OESP_CONTENT_LOCATOR:"X-OESP-Content-Locator",X_CLIENT_ID:"X-Client-Id"},DRM_UUID_CODE:{WIDEVINE:"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed",PLAYREADY:"urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95",ADOBE_PRIMETIME:"urn:uuid:F239E769-EFA3-4850-9C16-A903C6932EFB",GENERIC_CENC_IDENTIFIER:"urn:mpeg:dash:mp4protection:2011"},DRM_KEY_SYSTEM:{WIDEVINE:"com.widevine.alpha",PLAYREADY:"com.microsoft.playready"},CUSTOM_URL_PARAM:{MANIFEST:"--manifest",CONTENT_ID:"--contentId",CONTENT_LOCATOR:"--contentLocator",CUSTOM_LICENSE_SERVER_URL:"customLicenseServerUrl",DISABLE_LICENSE_TOKEN_IN_MANIFEST:"--disableLicenseTokenInManifest",ENABLE_VERBOSE_MODE:"--enableVerboseMode",DISABLE_ADAPTATION:"--disableAdaptation",HTML5:"--html5",SWITCH_AUDIO_LANGS:"--switchAudioLangs",ENABLE_REPLAY_TV:"--enableReplayTV",ENABLE_SUBTITLES:"--enableSubtitles",FORCE_HTTP_STREAMING:"--forceHttpsStreaming",ENABLE_MONITORING:"--enableMonitoring",LOCALE:"--locale"},KEY_CODE:{SPACE:32,ENTER:13,M:77,LEFT_ARROW:37,UP_ARROW:38,RIGHT_ARROW:39,DOWN_ARROW:40,F:70,C:67}},b.languageCode=b.constants.language.code,b.playerMode=b.constants.playerMode}(window,window.HRZ),window.HRZ=window.HRZ||{},function(a,b,c){"use strict";
  1997. b.msg=b.msg||{},b.msg.Manager=function(){this.countryCode="NL",this.languageCode="eng",this.defaultLocaleCode=this.countryCode+"_"+this.languageCode},b.msg.Manager.prototype.setLocale=function(a,d){var e=b.msg[this.defaultLocaleCode];
  1998. if(this.msg=e,a!==c&&d!==c){this.languageCode=d.toLowerCase(),this.countryCode=a.toUpperCase(),this.locale=a.toUpperCase()+"_"+d.toLowerCase();
  1999. var f=b.utils.UrlParams[b.constants.CUSTOM_URL_PARAM.LOCALE];
  2000. if(f&&(this.locale=f),this.msg=b.msg[this.locale]||e,this.msg!==e)for(var g in e)e.hasOwnProperty(g)&&!this.msg[g]&&(this.msg[g]=e[g])}},b.msg.Manager.prototype.get=function(a){return a===c?this.msg:this.msg[a]},b.MsgManager=new b.msg.Manager}(window,window.HRZ),window.HRZ=window.HRZ||{},function(a,b,c){"use strict";
  2001. b.msg=b.msg||{},b.msg.AT_deu={fullScreen:"Vollbild",exitFullScreen:"Vollbild beenden",live:"Live",play:"Play",pause:"Pause",stop:"Stop",volume:"Lautstärke",channels:"Kanäle",replayNoScrubbing:"Dieser Sender erlaubt kein Vor- oder Zurückspulen.",NOW:"JETZT",NEXT:"DEMNÄCHST",nowOnTV:"JETZT IM TV",backToBrowse:"Zurück zur Titelansicht",AUDIO:"AUDIO",SUBTITLES:"UNTERTITEL",Off:"Aus",langsOptionsHeader:"Sprachauswahl",startOver:"Neu starten",backToLiveTV:"Zurück zu Live TV",showProgramInfo:"Info anzeigen",buffering:"Buffering..."}}(window,window.HRZ),window.HRZ=window.HRZ||{},function(a,b,c){"use strict";
  2002. b.msg=b.msg||{},b.msg.CH_deu={fullScreen:"Vollbild",exitFullScreen:"Vollbild beenden",live:"Live",play:"Play",pause:"Pause",stop:"Stop",volume:"Lautstärke",channels:"Kanäle",replayNoScrubbing:"Vorspulen wird von diesem Sender nicht gestattet.",NOW:"LÄUFT JETZT",NEXT:"ES FOLGT",nowOnTV:"LÄUFT JETZT",backToBrowse:"",AUDIO:"AUDIO",SUBTITLES:"UNTERTITEL",Off:"Aus",langsOptionsHeader:"Audiosprache",startOver:"Von vorne beginnen",backToLiveTV:"Zurück nach live TV",showProgramInfo:"Info anzeigen",buffering:"Buffering..."}}(window,window.HRZ),window.HRZ=window.HRZ||{},function(a,b,c){"use strict";
  2003. b.msg=b.msg||{},b.msg.CH_eng={fullScreen:"Full Screen",exitFullScreen:"Exit Full Screen",live:"Live",play:"Play",pause:"Pause",stop:"Stop",volume:"Volume",channels:"Channels",replayNoScrubbing:"This channel doesn't allow to fast forward Replay videos.",NOW:"NOW",NEXT:"NEXT",nowOnTV:"NOW ON TV",backToBrowse:"Back to browse",AUDIO:"AUDIO",SUBTITLES:"SUBTITLES",Off:"Off",langsOptionsHeader:"Language options",startOver:"Start over",backToLiveTV:"Back to live TV",showProgramInfo:"Show program info",buffering:"Buffering..."}}(window,window.HRZ),window.HRZ=window.HRZ||{},function(a,b,c){"use strict";
  2004. b.msg=b.msg||{},b.msg.CH_fra={fullScreen:"Plein écran",exitFullScreen:"Quitter le mode plein écran",live:"En direct",play:"Jouer",pause:"Pause",stop:"Stop",volume:"Volume",channels:"Chaînes",replayNoScrubbing:"Ce canal ne permet pas avance rapide de vidéos Replay.",NOW:"EN CE MOMENT",NEXT:"SUIVANT",nowOnTV:"EN CE MOMENT",backToBrowse:"",AUDIO:"AUDIO",SUBTITLES:"SOUS-TITRES",Off:"Désactivé",langsOptionsHeader:"Options de langue",startOver:"Redémarrer",backToLiveTV:"Regarder TV en direct",showProgramInfo:"Montre programme info",buffering:"Buffering..."}}(window,window.HRZ),window.HRZ=window.HRZ||{},function(a,b,c){"use strict";
  2005. b.msg=b.msg||{},b.msg.CH_ita={fullScreen:"Schermo intero",exitFullScreen:"Esci dalla modalità a schermo intero",live:"Diretta",play:"Play",pause:"Pausa",stop:"Stop",volume:"Volume",channels:"Canali",replayNoScrubbing:"Questo canale non permette l'avanzamento veloce di video Replay.",NOW:"IN ONDA ORA",NEXT:"AVANTI",nowOnTV:"IN ONDA ORA",backToBrowse:"Torna a sfogliare",AUDIO:"AUDIO",SUBTITLES:"SOTTOTITOLI",Off:"Disattiva",langsOptionsHeader:"Optioni di lingua",startOver:"Riavvia",backToLiveTV:"Torna alla live TV",showProgramInfo:"Mostra informazioni sull programma",buffering:"Buffering..."}}(window,window.HRZ),window.HRZ=window.HRZ||{},function(a,b,c){"use strict";
  2006. b.msg=b.msg||{},b.msg.CZ_ces={fullScreen:"Zobrazení na celou obrazovku",exitFullScreen:"Ukončit režim zobrazení na celou obrazovku",live:"Živě",play:"Přehrát",pause:"Pauza",stop:"Stop",volume:"Hlasitost",channels:"Kanály",replayNoScrubbing:"Tento kanál nepovoluje přetáčení Replay videí.",NOW:"NYNÍ V TELEVIZI",NEXT:"DALŠÍ",nowOnTV:"NYNÍ V TELEVIZI",backToBrowse:"Zpět do seznamu",AUDIO:"AUDIO",SUBTITLES:"TITULKY",Off:"Vypnuto",langsOptionsHeader:"Možnosti jazyka",startOver:"Spustit znovu",backToLiveTV:"Zpět do Živé TV",showProgramInfo:"Zobrazit informace o programu",buffering:"Načítání..."}}(window,window.HRZ),window.HRZ=window.HRZ||{},function(a,b,c){"use strict";
  2007. b.msg=b.msg||{},b.msg.DE_deu={fullScreen:"Vollbild",exitFullScreen:"Vollbild beenden",live:"Live",play:"Play",pause:"Pause",stop:"Stop",volume:"Lautstärke",channels:"Kanäle",replayNoScrubbing:"Vorspulen wird von diesem Sender nicht gestattet.",NOW:"LÄUFT JETZT",NEXT:"ES FOLGT",nowOnTV:"JETZT LÄUFT",backToBrowse:"Zurück",AUDIO:"AUDIO",SUBTITLES:"UNTERTITEL",Off:"Aus",langsOptionsHeader:"Audiosprache",startOver:"Von vorne beginnen",backToLiveTV:"Zurück zu Live Sender",showProgramInfo:"Programinfo anzeigen",buffering:"Buffern..."}}(window,window.HRZ),window.HRZ=window.HRZ||{},function(a,b,c){"use strict";
  2008. b.msg=b.msg||{},b.msg.HU_eng={fullScreen:"Full Screen",exitFullScreen:"Exit Full Screen",live:"Live",play:"Play",pause:"Pause",stop:"Stop",volume:"Volume",channels:"Channels",replayNoScrubbing:"This channel doesn't allow to fast forward Replay videos.",NOW:"NOW",NEXT:"NEXT",nowOnTV:"NOW ON TV",backToBrowse:"Back to browse",AUDIO:"AUDIO",SUBTITLES:"SUBTITLES",Off:"Off",langsOptionsHeader:"Language options",startOver:"Start over",backToLiveTV:"Back to live TV",showProgramInfo:"Show program info",buffering:"Buffering..."}}(window,window.HRZ),window.HRZ=window.HRZ||{},function(a,b,c){"use strict";
  2009. b.msg=b.msg||{},b.msg.HU_hun={fullScreen:"Teljes képernyő",exitFullScreen:"Kilépés a teljes képernyőből",live:"Élő",play:"Lejátszás",pause:"Szünet",stop:"Stop",volume:"Hangerő",channels:"Csatornák",replayNoScrubbing:"Ezen a csatornán nem engedélyezett a gyors előretekerés funkció Replay videók esetében.",NOW:"Most",NEXT:"Következő",nowOnTV:"MOST A TV-BEN",backToBrowse:"Vissza a keresőre",AUDIO:"Audio",SUBTITLES:"Feliratok",Off:"Kikapcsolás",langsOptionsHeader:"Nyelvi beállítások",startOver:"Kezdje előről",backToLiveTV:"Vissza az élő adásra",showProgramInfo:"Mutassa meg a műsor információt",buffering:"Pufferelés..."}}(window,window.HRZ),window.HRZ=window.HRZ||{},function(a,b,c){"use strict";
  2010. b.msg=b.msg||{},b.msg.IE_eng={fullScreen:"Full Screen",exitFullScreen:"Exit Full Screen",live:"Live",play:"Play",pause:"Pause",stop:"Stop",volume:"Volume",channels:"Channels",replayNoScrubbing:"This channel doesn't allow to fast forward Replay videos.",NOW:"NOW",NEXT:"NEXT",nowOnTV:"NOW ON TV",backToBrowse:"Back to browse",AUDIO:"AUDIO",SUBTITLES:"SUBTITLES",Off:"Off",langsOptionsHeader:"Language options",startOver:"Start over",backToLiveTV:"Back to live TV",showProgramInfo:"Show program info",buffering:"Buffering..."}}(window,window.HRZ),window.HRZ=window.HRZ||{},function(a,b,c){"use strict";
  2011. b.msg=b.msg||{},b.msg.NL_eng={fullScreen:"Full Screen",exitFullScreen:"Exit Full Screen",live:"Live",play:"Play",pause:"Pause",stop:"Stop",volume:"Volume",channels:"Channels",replayNoScrubbing:"This channel doesn't allow to fast forward Replay videos.",NOW:"NOW",NEXT:"NEXT",nowOnTV:"NOW ON TV",backToBrowse:"Back to browse",AUDIO:"AUDIO",SUBTITLES:"SUBTITLES",Off:"Off",langsOptionsHeader:"Language options",startOver:"Start over",backToLiveTV:"Back to live TV",showProgramInfo:"Show program info",buffering:"Buffering...",assetIsNotAvailable:"This asset is not yet available. Please try again later."}}(window,window.HRZ),window.HRZ=window.HRZ||{},function(a,b,c){"use strict";
  2012. b.msg=b.msg||{},b.msg.NL_nld={fullScreen:"Volledig scherm",exitFullScreen:"Volledig scherm sluiten",live:"Live",play:"Afspelen",pause:"Pauze",stop:"Stop",volume:"Volume",channels:"Zenders",replayNoScrubbing:"Voor deze zender is het niet toegestaan om Replay video's vooruit te spoelen.",NOW:"NU",NEXT:"STRAKS",nowOnTV:"NU OP TV",backToBrowse:"Terug",AUDIO:"AUDIO",SUBTITLES:"ONDERTITELING",Off:"Uitzetten",langsOptionsHeader:"Taal instellingen",startOver:"Afspelen vanaf begin",backToLiveTV:"Terug naar live TV",showProgramInfo:"Toon info",buffering:"Buffering..."}}(window,window.HRZ),window.HRZ=window.HRZ||{},function(a,b,c){"use strict";
  2013. b.msg=b.msg||{},b.msg.PL_pol={fullScreen:"Pełny ekran",exitFullScreen:"Zamknij pełny ekran",live:"Na żywo",play:"Oglądaj",pause:"Pauza",stop:"Stop",volume:"Głośność",channels:"Kanały",replayNoScrubbing:"Ten kanał nie umożliwia przewijania pozycji wideo z menu Przegapione.",NOW:"TERAZ W TV",NEXT:"PÓŹNIEJ",nowOnTV:"TERAZ W TV",backToBrowse:"Cofnij",AUDIO:"ŚCIEŻKA DŹWIĘKOWA",SUBTITLES:"NAPISY",Off:"Wyłącz",langsOptionsHeader:"Opcje językowe",startOver:"Od początku",backToLiveTV:"Wróć do oglądania TV",showProgramInfo:"Pokaż informacje o programie",buffering:"Ładowanie danych"}}(window,window.HRZ),window.HRZ=window.HRZ||{},function(a,b,c){"use strict";
  2014. b.msg=b.msg||{},b.msg.RO_eng={fullScreen:"Full Screen",exitFullScreen:"Exit Full Screen",live:"Live",play:"Play",pause:"Pause",stop:"Stop",volume:"Volume",channels:"Channels",replayNoScrubbing:"This channel doesn't allow to fast forward Replay videos.",NOW:"NOW",NEXT:"NEXT",nowOnTV:"NOW ON TV",backToBrowse:"Back to browse",AUDIO:"AUDIO",SUBTITLES:"SUBTITLES",Off:"Off",langsOptionsHeader:"Language options",startOver:"Start over",backToLiveTV:"Back to live TV",showProgramInfo:"Show program info",buffering:"Buffering..."}}(window,window.HRZ),window.HRZ=window.HRZ||{},function(a,b,c){"use strict";
  2015. b.msg=b.msg||{},b.msg.RO_hun={fullScreen:"Teljes képernyő",exitFullScreen:"Kilépés a teljes képernyőből",live:"Élő",play:"Lejátszás",pause:"Szünet",stop:"Stop",volume:"Hangerő",channels:"Csatornák",replayNoScrubbing:"Ezen a csatornán nem engedélyezett a gyors előretekerés funkció Replay videók esetében.",NOW:"MOST",NEXT:"KÖVETKEZŐ",nowOnTV:"ÉLŐ ADÁS",backToBrowse:"Vissza a keresőre",AUDIO:"AUDIO",SUBTITLES:"FELIRATOK",Off:"Kikapcsolás",langsOptionsHeader:"Nyelvi beállítások",startOver:"Kezdje előről",backToLiveTV:"Vissza az élő adásra",showProgramInfo:"Mutassa meg a műsor információt",buffering:"Pufferelés..."}}(window,window.HRZ),window.HRZ=window.HRZ||{},function(a,b,c){"use strict";
  2016. b.msg=b.msg||{},b.msg.RO_ron={fullScreen:"Ecran complet",exitFullScreen:"Închidere ecran complet",live:"Live",play:"Play",pause:"Pauză",stop:"Stop",volume:"Volum",channels:"Canale",replayNoScrubbing:"Acest canal nu permite derularea înainte a programelor.",NOW:"ACUM",NEXT:"URMEAZĂ",nowOnTV:"ACUM LA TV",backToBrowse:"Înapoi la listă",AUDIO:"AUDIO",SUBTITLES:"SUBTITRĂRI",Off:"Oprit",langsOptionsHeader:"Setări de limbă",startOver:"Reia de la început",backToLiveTV:"Înapoi la canalele TV",showProgramInfo:"Afișează informații program",buffering:"Buffering..."}}(window,window.HRZ),window.HRZ=window.HRZ||{},function(a,b,c){"use strict";
  2017. b.msg=b.msg||{},b.msg.SK_slk={fullScreen:"Celá Obrazovka",exitFullScreen:"Opustiť Celú Obrazovku",live:"Naživo",play:"Prehrať",pause:"Pauza",stop:"Zastaviť",volume:"Hlasitosť",channels:"Stanice",replayNoScrubbing:"Tento kanál nepovoluje přetáčení Replay videí.",NOW:"TERAZ",NEXT:"NASLEDUJE",nowOnTV:"TERAZ V TV",backToBrowse:"Naspäť na vyhľadávanie",AUDIO:"JAZYK",SUBTITLES:"TITULKY",Off:"Vypnuto",langsOptionsHeader:"Možnosti jazyka",startOver:"Prehrať od začiatku",backToLiveTV:"Naspäť k živému vysielaniu",showProgramInfo:"Ukázať informácie o programe",buffering:"Ukladám do vyrovnávacej pamäte..."}}(window,window.HRZ),window.HRZ=window.HRZ||{},function(a,b,c){"use strict";
  2018. b.msg=b.msg||{},b.msg.SK_eng={fullScreen:"Full Screen",exitFullScreen:"Exit Full Screen",live:"Live",play:"Play",pause:"Pause",stop:"Stop",volume:"Volume",channels:"Channels",replayNoScrubbing:"This channel doesn't allow to fast forward Replay videos.",NOW:"NOW",NEXT:"NEXT",nowOnTV:"NOW ON TV",backToBrowse:"Back to browse",AUDIO:"AUDIO",SUBTITLES:"SUBTITLES",Off:"Off",langsOptionsHeader:"Language options",startOver:"Start over",backToLiveTV:"Back to live TV",showProgramInfo:"Show program info",buffering:"Buffering..."}}(window,window.HRZ),window.HRZ=window.HRZ||{},function(a,b,c,d){"use strict";
  2019. b.langCodes=[{iso_639_2b:"aar",iso_639_2t:"aar",iso_639_1:"aa","native":"Qafara"},{iso_639_2b:"abk",iso_639_2t:"abk",iso_639_1:"ab","native":"Аҧсуа"},{iso_639_2b:"ave",iso_639_2t:"ave","native":"avesta"},{iso_639_2b:"afr",iso_639_2t:"afr",iso_639_1:"af","native":"Afrikaans"},{iso_639_2b:"aka",iso_639_2t:"aka","native":"akana"},{iso_639_2b:"amh",iso_639_2t:"amh","native":"አማርኛ"},{iso_639_2b:"arg",iso_639_2t:"arg","native":"aragonés"},{iso_639_2b:"ara",iso_639_2t:"ara",iso_639_1:"ar","native":"العربية"},{iso_639_2b:"asm",iso_639_2t:"asm","native":"অসমীয়া"},{iso_639_2b:"ava",iso_639_2t:"ava","native":"авар мацӀ;
  2020. магӀарул мацӀ"},{iso_639_2b:"aym",iso_639_2t:"aym","native":"aymar aru"},{iso_639_2b:"aze",iso_639_2t:"aze","native":"Azərbaycanca"},{iso_639_2b:"bak",iso_639_2t:"bak","native":"башҡорт теле"},{iso_639_2b:"bel",iso_639_2t:"bel",iso_639_1:"be","native":"Беларуская мова"},{iso_639_2b:"bul",iso_639_2t:"bul",iso_639_1:"bg","native":"български език"},{iso_639_2b:"bih",iso_639_2t:"bih","native":"भोजपुरी"},{iso_639_2b:"bis",iso_639_2t:"bis","native":"Bislama"},{iso_639_2b:"bam",iso_639_2t:"bam","native":"bamanankan"},{iso_639_2b:"ben",iso_639_2t:"ben","native":"বাংলা"},{iso_639_2b:"tib",iso_639_2t:"bod","native":"བོད་ཡིག"},{iso_639_2b:"bre",iso_639_2t:"bre","native":"brezhoneg"},{iso_639_2b:"bos",iso_639_2t:"bos","native":"bosanski jezik"},{iso_639_2b:"cat",iso_639_2t:"cat",iso_639_1:"ca","native":"català;
  2021. valencià"},{iso_639_2b:"che",iso_639_2t:"che","native":"нохчийн мотт"},{iso_639_2b:"cha",iso_639_2t:"cha","native":"Chamoru"},{iso_639_2b:"cos",iso_639_2t:"cos","native":"corsu;
  2022. lingua corsa"},{iso_639_2b:"cre",iso_639_2t:"cre","native":"ᓀᐦᐃᔭᐍᐏᐣ"},{iso_639_2b:"cze",iso_639_2t:"ces",iso_639_1:"cs","native":"čeština"},{iso_639_2b:"chu",iso_639_2t:"chu","native":"ѩзыкъ словѣньскъ"},{iso_639_2b:"chv",iso_639_2t:"chv","native":"чӑваш чӗлхи"},{iso_639_2b:"wel",iso_639_2t:"cym","native":"Cymraeg"},{iso_639_2b:"dan",iso_639_2t:"dan",iso_639_1:"da","native":"dansk"},{iso_639_2b:"ger",iso_639_2t:"deu",iso_639_1:"de","native":"Deutsch"},{iso_639_2b:"div",iso_639_2t:"div","native":"ދިވެހިބަސ"},{iso_639_2b:"dzo",iso_639_2t:"dzo","native":"རྫོང་ཁ"},{iso_639_2b:"ewe",iso_639_2t:"ewe","native":"Ɛʋɛgbɛ"},{iso_639_2b:"gre",iso_639_2t:"ell","native":"Ελληνικά"},{iso_639_2b:"eng",iso_639_2t:"eng",iso_639_1:"en","native":"English"},{iso_639_2b:"epo",iso_639_2t:"epo",iso_639_1:"eo","native":"Esperanto"},{iso_639_2b:"spa",iso_639_2t:"spa",iso_639_1:"es","native":"español"},{iso_639_2b:"est",iso_639_2t:"est",iso_639_1:"et","native":"eesti keel"},{iso_639_2b:"baq",iso_639_2t:"eus",iso_639_1:"eu","native":"euskara"},{iso_639_2b:"per",iso_639_2t:"fas","native":"فارسی"},{iso_639_2b:"ful",iso_639_2t:"ful","native":"Fulfulde;
  2023. Pulaar;
  2024. Pular"},{iso_639_2b:"fin",iso_639_2t:"fin",iso_639_1:"fi","native":"suomi;
  2025. suomen kieli"},{iso_639_2b:"fij",iso_639_2t:"fij","native":"vosa Vakaviti"},{iso_639_2b:"fao",iso_639_2t:"fao","native":"føroyskt"},{iso_639_2b:"fre",iso_639_2t:"fra",iso_639_1:"fr","native":"français;
  2026. langue française"},{iso_639_2b:"fry",iso_639_2t:"fry","native":"frysk"},{iso_639_2b:"gle",iso_639_2t:"gle",iso_639_1:"ga","native":"Gaeilge"},{iso_639_2b:"gla",iso_639_2t:"gla","native":"Gàidhlig"},{iso_639_2b:"glg",iso_639_2t:"glg",iso_639_1:"gl","native":"Galego"},{iso_639_2b:"grn",iso_639_2t:"grn","native":"Avañe'ẽ"},{iso_639_2b:"guj",iso_639_2t:"guj","native":"ગુજરાતી"},{iso_639_2b:"glv",iso_639_2t:"glv","native":"Gaelg;
  2027. Manninagh"},{iso_639_2b:"hau",iso_639_2t:"hau","native":"Hausancī;
  2028. هَوُسَ"},{iso_639_2b:"heb",iso_639_2t:"heb","native":"עִבְרִית;
  2029. עברית"},{iso_639_2b:"hin",iso_639_2t:"hin",iso_639_1:"hi","native":"हिन्दी"},{iso_639_2b:"hmo",iso_639_2t:"hmo","native":"Hiri Motu"},{iso_639_2b:"hrv",iso_639_2t:"hrv",iso_639_1:"hr","native":"hrvatski jezik"},{iso_639_2b:"hat",iso_639_2t:"hat","native":"Kreyòl ayisyen"},{iso_639_2b:"hun",iso_639_2t:"hun",iso_639_1:"hu","native":"magyar"},{iso_639_2b:"arm",iso_639_2t:"hye",iso_639_1:"hy","native":"Հայերեն լեզու"},{iso_639_2b:"her",iso_639_2t:"her","native":"Otjiherero"},{iso_639_2b:"ina",iso_639_2t:"ina","native":"interlingua"},{iso_639_2b:"ind",iso_639_2t:"ind",iso_639_1:"id","native":"Bahasa Indonesia"},{iso_639_2b:"ile",iso_639_2t:"ile","native":"Interlingue"},{iso_639_2b:"ibo",iso_639_2t:"ibo","native":"Igbo"},{iso_639_2b:"iii",iso_639_2t:"iii","native":"ꆇꉙ"},{iso_639_2b:"ipk",iso_639_2t:"ipk","native":"Iñupiaq;
  2030. Iñupiatun"},{iso_639_2b:"ido",iso_639_2t:"ido","native":"Ido"},{iso_639_2b:"ice",iso_639_2t:"isl",iso_639_1:"is","native":"íslenska"},{iso_639_2b:"ita",iso_639_2t:"ita",iso_639_1:"it","native":"italiano"},{iso_639_2b:"iku",iso_639_2t:"iku","native":"ᐃᓄᒃᑎᑐᑦ"},{iso_639_2b:"jpn",iso_639_2t:"jpn",iso_639_1:"ja","native":"日本語"},{iso_639_2b:"jav",iso_639_2t:"jav","native":"basa Jawa (ꦧꦱꦗꦮ)"},{iso_639_2b:"geo",iso_639_2t:"kat",iso_639_1:"ka","native":"ქართული ენა (kartuli ena)"},{iso_639_2b:"kon",iso_639_2t:"kon","native":"Kikongo"},{iso_639_2b:"kik",iso_639_2t:"kik","native":"Gĩkũyũ"},{iso_639_2b:"kua",iso_639_2t:"kua","native":"kuanyama"},{iso_639_2b:"kaz",iso_639_2t:"kaz",iso_639_1:"kk","native":"Қазақ тілі"},{iso_639_2b:"kal",iso_639_2t:"kal","native":"kalaallisut;
  2031. kalaallit oqaasii"},{iso_639_2b:"khm",iso_639_2t:"khm","native":"ភាសាខ្មែរ"},{iso_639_2b:"kan",iso_639_2t:"kan","native":"ಕನ್ನಡ"},{iso_639_2b:"kor",iso_639_2t:"kor",iso_639_1:"ko","native":"한국어 (韓國語);
  2032. 조선말 (朝鮮語)"},{iso_639_2b:"kau",iso_639_2t:"kau","native":"kanuri"},{iso_639_2b:"kas",iso_639_2t:"kas","native":"कॉशुर;
  2033. کٲشُر"},{iso_639_2b:"kur",iso_639_2t:"kur","native":"Kurdî;
  2034. كوردي"},{iso_639_2b:"kom",iso_639_2t:"kom","native":"коми кыв"},{iso_639_2b:"cor",iso_639_2t:"cor","native":"Kernewek"},{iso_639_2b:"kir",iso_639_2t:"kir","native":"кыргыз тили"},{iso_639_2b:"lat",iso_639_2t:"lat",iso_639_1:"la","native":"latine;
  2035. lingua Latina"},{iso_639_2b:"ltz",iso_639_2t:"ltz",iso_639_1:"lb","native":"Lëtzebuergesch"},{iso_639_2b:"lug",iso_639_2t:"lug","native":"Luganda"},{iso_639_2b:"lim",iso_639_2t:"lim","native":"Limburgs"},{iso_639_2b:"lin",iso_639_2t:"lin","native":"lingala"},{iso_639_2b:"lao",iso_639_2t:"lao","native":"ພາສາລາວ"},{iso_639_2b:"lit",iso_639_2t:"lit",iso_639_1:"lt","native":"lietuvių kalba"},{iso_639_2b:"lub",iso_639_2t:"lub","native":null},{iso_639_2b:"lav",iso_639_2t:"lav","native":"latviešu valoda"},{iso_639_2b:"mlg",iso_639_2t:"mlg","native":"Malagasy fiteny"},{iso_639_2b:"mah",iso_639_2t:"mah","native":"Kajin M̧ajeļ"},{iso_639_2b:"mao",iso_639_2t:"mri","native":"te reo Māori"},{iso_639_2b:"mac",iso_639_2t:"mkd","native":"македонски јазик"},{iso_639_2b:"mal",iso_639_2t:"mal","native":"മലയാളം"},{iso_639_2b:"mon",iso_639_2t:"mon","native":"монгол хэл"},{iso_639_2b:"mar",iso_639_2t:"mar","native":"मराठी"},{iso_639_2b:"may",iso_639_2t:"msa","native":"bahasa Melayu;
  2036. بهاس ملايو"},{iso_639_2b:"mlt",iso_639_2t:"mlt","native":"Malti"},{iso_639_2b:"bur",iso_639_2t:"mya","native":"မြန်မာစာ"},{iso_639_2b:"nau",iso_639_2t:"nau","native":"Ekakairũ Naoero"},{iso_639_2b:"nob",iso_639_2t:"nob","native":"bokmål"},{iso_639_2b:"nde",iso_639_2t:"nde","native":"isiNdebele"},{iso_639_2b:"nep",iso_639_2t:"nep","native":"नेपाली"},{iso_639_2b:"ndo",iso_639_2t:"ndo","native":"Owambo"},{iso_639_2b:"dut",iso_639_2t:"nld",iso_639_1:"nl","native":"Nederlands"},{iso_639_2b:"nno",iso_639_2t:"nno","native":"nynorsk"},{iso_639_2b:"nor",iso_639_2t:"nor",iso_639_1:"no","native":"Norsk"},{iso_639_2b:"nbl",iso_639_2t:"nbl","native":"isiNdebele"},{iso_639_2b:"nav",iso_639_2t:"nav","native":"Diné bizaad;
  2037. Dinékʼehǰí"},{iso_639_2b:"nya",iso_639_2t:"nya","native":"chiCheŵa;
  2038. chinyanja"},{iso_639_2b:"oci",iso_639_2t:"oci","native":"Occitan"},{iso_639_2b:"oji",iso_639_2t:"oji","native":"ᐊᓂᔑᓇᐯᒧᐏᐣ (Anishinaabemowin)"},{iso_639_2b:"orm",iso_639_2t:"orm","native":"Afaan Oromoo"
  2039. },{iso_639_2b:"ori",iso_639_2t:"ori","native":"ଓଡ଼ିଆ"},{iso_639_2b:"oss",iso_639_2t:"oss","native":"ирон ӕвзаг"},{iso_639_2b:"pan",iso_639_2t:"pan","native":"ਪੰਜਾਬੀ;
  2040. پنجابی"},{iso_639_2b:"pli",iso_639_2t:"pli","native":"पालि"},{iso_639_2b:"pol",iso_639_2t:"pol",iso_639_1:"pl","native":"polski"},{iso_639_2b:"pus",iso_639_2t:"pus","native":"پښتو"},{iso_639_2b:"por",iso_639_2t:"por",iso_639_1:"pt","native":"português"},{iso_639_2b:"que",iso_639_2t:"que","native":"Runa Simi;
  2041. Kichwa"},{iso_639_2b:"roh",iso_639_2t:"roh","native":"rumantsch grischun"},{iso_639_2b:"run",iso_639_2t:"run","native":"Rundi"},{iso_639_2b:"rum",iso_639_2t:"ron",iso_639_1:"ro","native":"română"},{iso_639_2b:"rus",iso_639_2t:"rus",iso_639_1:"ru","native":"русский язык"},{iso_639_2b:"kin",iso_639_2t:"kin","native":"Ikinyarwanda"},{iso_639_2b:"san",iso_639_2t:"san","native":"संस्कृतम्"},{iso_639_2b:"srd",iso_639_2t:"srd","native":"sardu"},{iso_639_2b:"snd",iso_639_2t:"snd","native":"سنڌي، سندھی;
  2042. सिन्धी"},{iso_639_2b:"sme",iso_639_2t:"sme","native":"sámi;
  2043. sámegiella"},{iso_639_2b:"sag",iso_639_2t:"sag","native":"yângâ tî sängö"},{iso_639_2b:"sin",iso_639_2t:"sin","native":"සිංහල"},{iso_639_2b:"slo",iso_639_2t:"slk",iso_639_1:"sk","native":"slovenčina"},{iso_639_2b:"slv",iso_639_2t:"slv","native":"slovenščina"},{iso_639_2b:"smo",iso_639_2t:"smo","native":"gagana fa'a Samoa"},{iso_639_2b:"sna",iso_639_2t:"sna","native":"chiShona"},{iso_639_2b:"som",iso_639_2t:"som","native":"Soomaaliga;
  2044. af Soomaali"},{iso_639_2b:"alb",iso_639_2t:"sqi",iso_639_1:"sq","native":"Shqip"},{iso_639_2b:"srp",iso_639_2t:"srp",iso_639_1:"sr","native":"српски језик;
  2045. srpski jezik"},{iso_639_2b:"ssw",iso_639_2t:"ssw","native":"siSwati"},{iso_639_2b:"sot",iso_639_2t:"sot","native":"Sesotho"},{iso_639_2b:"sun",iso_639_2t:"sun","native":"basa Sunda"},{iso_639_2b:"swe",iso_639_2t:"swe",iso_639_1:"sv","native":"svenska"},{iso_639_2b:"swa",iso_639_2t:"swa","native":"Kiswahili"},{iso_639_2b:"tam",iso_639_2t:"tam","native":"தமிழ்"},{iso_639_2b:"tel",iso_639_2t:"tel","native":"తెలుగు"},{iso_639_2b:"tgk",iso_639_2t:"tgk","native":"тоҷикӣ;
  2046. تاجیکی"},{iso_639_2b:"tha",iso_639_2t:"tha",iso_639_1:"th","native":"ภาษาไทย"},{iso_639_2b:"tir",iso_639_2t:"tir","native":"ትግርኛ"},{iso_639_2b:"tuk",iso_639_2t:"tuk","native":"Түркмен"},{iso_639_2b:"tgl",iso_639_2t:"tgl","native":"Wikang Tagalog;
  2047. ᜏᜒᜃᜅ᜔ ᜆᜄᜎᜓᜄ᜔"},{iso_639_2b:"tsn",iso_639_2t:"tsn","native":"Setswana"},{iso_639_2b:"ton",iso_639_2t:"ton","native":"faka-Tonga"},{iso_639_2b:"tur",iso_639_2t:"tur",iso_639_1:"tr","native":"Türkçe"},{iso_639_2b:"tso",iso_639_2t:"tso","native":"Xitsonga"},{iso_639_2b:"tat",iso_639_2t:"tat","native":"татарча;
  2048. tatarça;
  2049. تاتارچا"},{iso_639_2b:"twi",iso_639_2t:"twi","native":"Twi"},{iso_639_2b:"tah",iso_639_2t:"tah","native":"te reo Tahiti;
  2050. te reo Māʼohi"},{iso_639_2b:"uig",iso_639_2t:"uig","native":"Uyƣurqə;
  2051. Uyğurçe;
  2052. ئۇيغۇرچ"},{iso_639_2b:"ukr",iso_639_2t:"ukr",iso_639_1:"uk","native":"українська мова"},{iso_639_2b:"urd",iso_639_2t:"urd","native":"اردو"},{iso_639_2b:"uzb",iso_639_2t:"uzb","native":"O'zbek;
  2053. Ўзбек;
  2054. أۇزبېك"},{iso_639_2b:"ven",iso_639_2t:"ven","native":"Tshivenḓa"},{iso_639_2b:"vie",iso_639_2t:"vie","native":"Tiếng Việt"},{iso_639_2b:"vol",iso_639_2t:"vol","native":"Volapük"},{iso_639_2b:"wln",iso_639_2t:"wln","native":"walon"},{iso_639_2b:"wol",iso_639_2t:"wol","native":"Wolof"},{iso_639_2b:"xho",iso_639_2t:"xho","native":"isiXhosa"},{iso_639_2b:"yid",iso_639_2t:"yid","native":"ייִדיש"},{iso_639_2b:"yor",iso_639_2t:"yor","native":"Yorùbá"},{iso_639_2b:"zha",iso_639_2t:"zha","native":"Saɯ cueŋƅ;
  2055. Saw cuengh"},{iso_639_2b:"chi",iso_639_2t:"zho",iso_639_1:"zh","native":"漢語;
  2056. 汉语;
  2057. 中文"},{iso_639_2b:"zul",iso_639_2t:"zul","native":"isiZulu"},{iso_639_2b:"gos","native":"Gesproken ondertiteling"}]}(window,window.HRZ,window.HRZ.jQuery),function(a,b,c,d){"use strict";
  2058. b.data=b.data||{},b.data.getSession=function(a){a=a||{};
  2059. var e=null,f=null;
  2060. a.authToken?(f={},f["X-OESP-Token"]=a.authToken,f["X-OESP-Username"]=a.userName):a.password!==d&&(e={username:a.userName,password:a.password});
  2061. var g=b.config.apiUrl;
  2062. return g||(g=a.baseUrl+a.countryCode+"/"+a.languageCode+"/web/"),c.ajax({url:g+"session",dataType:"json",contentType:"application/json;
  2063. charset=utf-8",type:null!==f?"GET":"POST",data:null!==e?JSON.stringify(e):null,headers:f,cache:!1})}}(window,window.HRZ,window.HRZ.jQuery),function(a,b,c,d){"use strict";
  2064. b.data=b.data||{},b.data.getChannels=function(a){return a=a||"Orion-HSS",c.ajax({url:b.config.apiUrl+"channels",dataType:"json",contentType:"application/json;
  2065. charset=utf-8",data:{byAssetTypes:a,byLocationId:b.user.locationId,personalised:!0,includeInvisible:!0},type:"GET",headers:{"X-OESP-Token":b.user.oespToken,"X-OESP-Username":b.user.username}})}}(window,window.HRZ,window.HRZ.jQuery),function(a,b,c,d){"use strict";
  2066. b.data=b.data||{},b.data.getMediaItem=function(a){return c.ajax({url:b.config.apiUrl+"mediaitems/"+a,dataType:"json",type:"GET",headers:{"X-OESP-Token":b.user.oespToken,"X-OESP-Username":b.user.username}})}}(window,window.HRZ,window.HRZ.jQuery),function(a,b,c,d){"use strict";
  2067. b.data=b.data||{},b.data.getListings=function(a){a=a||{};
  2068. var e=b.config.apiUrl+"listings";
  2069. return a.listingId?e+="/"+a.listingId:(e+="?",a.locationId&&(e+="&byLocationId="+a.locationId),a.stationId&&(e+="&byStationId="+a.stationId),a.startTime&&(e+="&byStartTime="+a.startTime),a.endTime&&(e+="&byEndTime="+a.endTime),a.endIndex&&(e+="&endIndex="+a.endIndex),a.isReplayTvAvailable!==d&&(e+="&byIsReplayTvAvailable="+a.isReplayTvAvailable),a.sort!==d&&(e+="&sort="+a.sort)),c.ajax({url:e,dataType:"json",type:"GET",headers:{"X-OESP-Token":b.user.oespToken,"X-OESP-Username":b.user.username}})}}(window,window.HRZ,window.HRZ.jQuery),function(a,b,c,d){"use strict";
  2070. b.data=b.data||{},b.data.getEntitlements=function(a){var d=b.config.apiUrl+"listings/{0}/entitlements",e=d.replace("{0}",a);
  2071. return c.ajax({url:e,dataType:"json",type:"GET",headers:{"X-OESP-Token":b.user.oespToken,"X-OESP-Username":b.user.username}})}}(window,window.HRZ,window.HRZ.jQuery),function(a,b,c,d){"use strict";
  2072. b.data=b.data||{},b.data.getSchedules=function(a){var d=b.config.apiUrl+"programschedules/"+a.requestDate+"/"+a.quarter;
  2073. return c.ajax({url:d,dataType:"json",type:"GET"})}}(window,window.HRZ,window.HRZ.jQuery),function(a,b,c,d){"use strict";
  2074. b.data=b.data||{},b.data.getTime=function(a){return c.ajax({url:b.config.apiUrl+"time/"+b.user.locationId,dataType:"json",contentType:"application/json;
  2075. charset=utf-8",type:"GET"})}}(window,window.HRZ,window.HRZ.jQuery),function(a,b,c,d){"use strict";
  2076. b.data=b.data||{},b.data.setBookmark=function(a,d,e,f){var g="/"+e;
  2077. f&&(g="");
  2078. var h={offset:d,playState:a};
  2079. return f&&(h.listingId=f),c.ajax({url:b.config.apiUrl+"bookmarks"+g,dataType:"json",contentType:"application/json;
  2080. charset=utf-8",type:"PUT",data:JSON.stringify(h),headers:{"X-OESP-Token":b.user.oespToken,"X-OESP-Username":b.user.username}})},b.data.getBookmark=function(a){return c.ajax({url:b.config.apiUrl+"bookmarks",dataType:"json",contentType:"application/json;
  2081. charset=utf-8",type:"GET",data:{byMediaGroupId:a},headers:{"X-OESP-Token":b.user.oespToken,"X-OESP-Username":b.user.username}})}}(window,window.HRZ,window.HRZ.jQuery),function(a,b,c,d){"use strict";
  2082. b.data=b.data||{},b.data.enterParentalPin=function(a){var d={value:a};
  2083. return c.ajax({url:b.config.apiUrl+"profile/parental/verifypin",dataType:"json",contentType:"application/json;
  2084. charset=utf-8",type:"POST",data:JSON.stringify(d),headers:{"X-OESP-Token":b.user.oespToken,"X-OESP-Username":b.user.username}})}}(window,window.HRZ,window.HRZ.jQuery),function(a,b,c,d){"use strict";
  2085. b.data=b.data||{},b.data.enterAdultPin=function(a){var d={value:a};
  2086. return c.ajax({url:b.config.apiUrl+"profile/adult/verifypin",dataType:"json",contentType:"application/json;
  2087. charset=utf-8",type:"POST",data:JSON.stringify(d),headers:{"X-OESP-Token":b.user.oespToken,"X-OESP-Username":b.user.username}})}}(window,window.HRZ,window.HRZ.jQuery),function(a,b,c,d){"use strict";
  2088. b.data=b.data||{},b.data.licenseToken=function(a){var d={};
  2089. d[b.constants.oespHeader.X_OESP_TOKEN]=b.user.oespToken,d[b.constants.oespHeader.X_OESP_USERNAME]=b.user.username;
  2090. var e={contentLocator:a.contentLocator};
  2091. a.licenseToken&&(e.token=a.licenseToken),a.adultCredential&&(e.adultCredential=a.adultCredential);
  2092. var f=b.config.apiUrl+"license/token";
  2093. return c.ajax({url:f,dataType:"json",contentType:"application/json",type:"POST",data:JSON.stringify(e),headers:d})}}(window,window.HRZ,window.HRZ.jQuery),window.HRZ=window.HRZ||{},function(a,b,c,d){"use strict";
  2094. function e(d,e){this._loadCSS(e.loadCSS),this.placeholder=c("#"+d),b.CustomParams={};
  2095. var f=a.hrz.views["player/views/player-element.mustache"].render();
  2096. this.placeholder.html(f),this.element=this.placeholder.find(".hrz-player-container"),b.utils.browser().name!==b.constants.BROWSER.Chrome&&b.utils.browser().name!==b.constants.BROWSER.Edge||(b.HTML5=!0);
  2097. var g=b.utils.UrlParams[b.constants.CUSTOM_URL_PARAM.HTML5];
  2098. g&&(b.HTML5=b.utils.isTrue(g)),b.utils.isTrue(b.utils.UrlParams[b.constants.CUSTOM_URL_PARAM.DISABLE_ADAPTATION])&&(b.DisableAdaptation=!0),b.CustomParams.EnableVerboseMode=b.utils.isTrue(b.utils.UrlParams[b.constants.CUSTOM_URL_PARAM.ENABLE_VERBOSE_MODE]),b.utils.isTrue(b.utils.UrlParams[b.constants.CUSTOM_URL_PARAM.DISABLE_LICENSE_TOKEN_IN_MANIFEST])?b.UseLicenseTokenInManifest=!1:b.UseLicenseTokenInManifest=!0,b.CustomManifest=b.utils.UrlParams[b.constants.CUSTOM_URL_PARAM.MANIFEST],b.CustomContentId=b.utils.UrlParams[b.constants.CUSTOM_URL_PARAM.CONTENT_ID],b.CustomContentLocator=b.utils.UrlParams[b.constants.CUSTOM_URL_PARAM.CONTENT_LOCATOR];
  2099. var h=b.utils.UrlParams[b.constants.CUSTOM_URL_PARAM.CUSTOM_LICENSE_SERVER_URL];
  2100. h&&(b.CustomLicenseServerUrl=a.decodeURIComponent(h)),this.poster=e.posterFrameUrl,this._videoId=e.videoId,this._isReplayMode=b.utils.isTrue(e.isReplayMode),this._switchAudioLangs=e.switchAudioLangs,this._enableSubtitles=e.enableSubtitles,this._channelId=e.channelId,this._onDemand="live"!==e.playerMode,this._forceHttpsStreaming=e.forceHttpsStreaming,b.utils.ManifestHelper.setScalableLicenseMode(e.enableScalableLicense),b.utils.ManifestHelper.setMyPrimeProviderIds(e.myPrimeProviderIds),this._inactivityLimit=1e3*parseInt(e.inactivityLimit),this._channelsLoadedDefer=c.Deferred(),b.Mediator.publish("bookmarks:create",{isReplayMode:this._isReplayMode,isLive:this._onDemand===!1}),"live"===e.playerMode?this._initTimeService().done(this._init.bind(this,d,e)):this._init(d,e)}e.prototype._init=function(a,b){this._bindMediatorEvents(b),this._render(a,b),this._bindEvents(b),this._initLoading()},e.prototype._toggleCaptionsContainer=function(a){a===d&&(a=this.nodes.captionsContainer.hasClass("hrz-hidden")),a===!0?this.nodes.captionsContainer.removeClass("hrz-hidden"):this.nodes.captionsContainer.addClass("hrz-hidden").css("background-image","")},e.prototype._initLoading=function(){var c=this;
  2101. this.nodes.splashscreen.removeClass("hrz-player-splashscreen-overlay-fadeIn"),this._fakeLoadingPercent=86,b.Mediator.on("video:downloadProgress",function(a){this.nodes.splashscreen.removeClass("hrz-hidden"),a-=15,a>=0&&this._updateLoadingSplashScreen(a)},{},this),b.Mediator.on("video:downloadCompleted",function(d){this._fakeLoadingInterval=a.setInterval(function(){c._updateLoadingSplashScreen(c._fakeLoadingPercent++)},b.constants.MAGIC_NUMBER.MAGIC_CONST_FOR_FAKE_DATA_LOADING)},{},this)},e.prototype._updateLoadingSplashScreen=function(a){var b=this.nodes.splashscreenLoadingElementSVG_.r.animVal.value,c=2*Math.PI*b,d=c/100;
  2102. this.nodes.splashscreenLoadingElement.attr("stroke-dasharray",d*a+(" "+c))},e.prototype._removeSplashscreen=function(){this._fakeLoadingInterval&&a.clearTimeout(this._fakeLoadingInterval),this.nodes.splashscreen.addClass("hrz-player-splashscreen-overlay-fadeIn"),this.nodes.splashscreenLoadingTriangle.attr("fill","#11A8DD"),this._updateLoadingSplashScreen(100),a.setTimeout(function(){this.nodes.splashscreen.addClass("hrz-hidden"),this.nodes.splashscreen.removeClass("hrz-player-splashscreen-overlay-fadeIn")}.bind(this),600)},e.prototype._initTimeService=function(){return b.data.getTime().done(function(a){b.utils.InitTimeService(a)})},e.prototype._loadCSS=function(a){a!==!1&&b.utils.loadCSS()},e.prototype.toggle=function(){this._playbackReady===!0&&(this.playing()?this.video.pause():this.controls.isReplayMode()===!0?this.playFrom(this.getPosition()):this.play())},e.prototype.TimelineClicked=function(a){this.video.playFrom(a)},e.prototype.volumeChanged=function(a){this.video.volume(a/100)},e.prototype.videoStateChange=function(a){"paused"===a?this.element.addClass("hrz-player-paused"):this.element.removeClass("hrz-player-paused"),"playing"===a&&this.element.addClass("playbackWasStarted")},e.prototype.onCaptionLoaded=function(c){var d=this,e=b.constants.defaults.CHUNK_DURATION;
  2103. if(c){if("text"===c.type)this.nodes.captionsContainer.html(c.value);
  2104. else{var f=JSON.parse(c),g="data:image/png;
  2105. base64,"+f.Caption;
  2106. this.nodes.captionsContainer.css("background-image",'url("'+g+'")'),f.Duration&&(e=f.Duration)}this._captionsTimeout&&a.clearTimeout(this._captionsTimeout),this._captionsTimeout=a.setTimeout(function(){d.nodes.captionsContainer.css("background-image","").html("")},e+b.constants.MAGIC_NUMBER.TIMEOUT_FOR_CAPTIONS)}},e.prototype._onPlaybackReady=function(){var a=this;
  2107. this.nodes.overlay.removeClass("hrz-hidden"),this.element.removeClass("hrz-player-loading"),this.poster&&this.nodes.overlay.css("background-image",'url("'+this.poster+'")'),this._setToggleControlsTimeout(),this._onDemand===!1?this._channelId&&this._channelsLoadedDefer.done(function(){a.loadChannel(a._channelId)}):this._videoId&&this.loadVideo(this._videoId),b.Mediator.publish("volume:initialization",this.volume()),this._playbackReady=!0},e.prototype._onAudioAndSubsStreamsAvailable=function(a){if(b.utils.isTrue(this._switchAudioLangs)||b.utils.isTrue(this._enableSubtitles)){b.utils.isTrue(this._switchAudioLangs)===!1&&(a[0]=[]),b.utils.isTrue(this._enableSubtitles)===!1&&(a[1]=[]);
  2108. var c=this.element.find("#hrz-player-controls-btn-langs");
  2109. if(a[0].length<=1&&0===a[1].length)return void c.addClass("hrz-hidden");
  2110. if(b.utils.isTrue(this._switchAudioLangs)===!1&&b.utils.isTrue(this._enableSubtitles)===!1)return;
  2111. if(b.utils.isTrue(this._switchAudioLangs)===!1&&b.utils.isTrue(this._enableSubtitles)===!0&&0===a[1].length)return void c.addClass("hrz-hidden");
  2112. if(b.utils.isTrue(this._switchAudioLangs)===!0&&b.utils.isTrue(this._enableSubtitles)===!1&&0===a[0].length)return void c.addClass("hrz-hidden");
  2113. c.removeClass("hrz-hidden"),b.audioController?(b.audioController.update(a),this._assetLoadedHackHandler()):b.Mediator.publish("audioController:create","hrz-player-controls-btn-langs","hrz-player-controls-langs-placeholder",a)}},e.prototype._bindMediatorEvents=function(){b.Mediator.once("destroy",this._destroy,{},this),b.Mediator.on("controls:toggle",this.toggle,{},this),b.Mediator.on("controls:timeline",this.TimelineClicked,{},this),b.Mediator.on("controls:volumeChanged",this.volumeChanged,{},this),b.Mediator.on("video:stateChange",this.videoStateChange,{},this),b.Mediator.on("video:captionLoaded",this.onCaptionLoaded,{},this),b.Mediator.on("channel:manifestUpdate",this._onChannelManifestUpdate,{},this),b.Mediator.on("playback:ready",this._onPlaybackReady,{},this),b.Mediator.on("controls:fullscreen",this._toggleFullScreen,{},this),b.Mediator.on("video:buffering",this._onBuffering,{},this),b.Mediator.on("cmd:loadManifest",this._loadManifest,{},this),b.Mediator.on("video:loaded",function(){this.nodes.overlay.css("background-image",""),this.nodes.splashscreenLoadingBackground.addClass("hrz-hidden"),this._isReplayMode!==!0&&b.Mediator.publish("assetLoaded")},{},this),b.Mediator.on("video:audioLangsAndSubtitles",this._onAudioAndSubsStreamsAvailable,{},this),b.Mediator.on("video.contentStart",this._onVideoStart,{},this),b.Mediator.on("captions:toggleContainer",this._toggleCaptionsContainer,{},this),b.Mediator.once("channelsModel:channelsLoaded",function(){this._channelsLoadedDefer&&this._channelsLoadedDefer.resolve()},{},this),b.Mediator.on("audioController:created",function(){this._assetLoadedHackHandler()},{},this),b.Mediator.on("startOverOffsetReceived",function(a){this._offsetForStartOver=a},{},this)},e.prototype._bindEvents=function(d){var e=this;
  2114. this.element.on("dblclick",".hrz-player-overlay",function(){e._toggleTimeout&&(a.clearTimeout(e._toggleTimeout),e._toggleTimeout=null),e._toggleFullScreen()}).on("click",".hrz-player-overlay",function(){e._toggleTimeout||(e._toggleTimeout=a.setTimeout(function(){e.toggle(),e._toggleTimeout=null},300))}).on("click",".hrz-player-play-big-btn",function(){e.toggle()}).on("click",".hrz-player-backToBrowse-btn",function(){b.Mediator.publish("controls:backToBrowseClicked")}),b.Mediator.on("controls:fullInfoOpened",function(){this._disableMouseMoveTimeout=!0,this._mouseMoveTimeout&&a.clearTimeout(this._mouseMoveTimeout)},{},this),b.Mediator.on("controls:fullInfoClosed",function(){this._disableMouseMoveTimeout=!1},{},this),b.Mediator.on("controls:channelsViewOpened",function(){this._disableMouseMoveTimeout=!0,this._mouseMoveTimeout&&a.clearTimeout(this._mouseMoveTimeout)},{},this),b.Mediator.on("controls:channelsViewClosed",function(){this._disableMouseMoveTimeout=!1},{},this),b.Mediator.on("controls:switchAudioLang",function(a){this._switchAudioLang(a)},{},this),b.Mediator.on("controls:switchSubs",function(a){this._switchSubs(a)},{},this),b.Mediator.on("timeService:timeupdate",this._globalTimeUpdated,{},this),b.Mediator.on("video:timeupdate",this._onVideoTimeUpdate,{},this),this.element.on("mouseenter","#hrz-player-controls-container",function(){e._isUserOverControls=!0,e._disableMouseMoveTimeout===!0&&e._mouseMoveTimeout&&a.clearTimeout(e._mouseMoveTimeout)}).on("mouseleave","#hrz-player-controls-container",function(){e._isUserOverControls=!1});
  2115. var f=0,g=0;
  2116. this.element.on("mouseenter",function(a){e._userFocused=!0}),c(a.document).on("mousedown.hrz_player",function(a){0===c(a.target).parents(".hrz-player-container").length&&(e._userFocused=!1)}),this.element.on("mousemove",function(a){e._userFocused=!0;
  2117. var b=a.clientX,c=a.clientY;
  2118. f&&g&&b===f&&c===g||(f=b,g=c,e._isUserOverControls===!0&&e._disableMouseMoveTimeout===!0||e._setToggleControlsTimeout(d))}),c(a.document).on("keydown.hrz_player",function(a){var c,d;
  2119. if(e._userFocused===!0&&e.element.is(":visible")){var f=a.keyCode||a.which;
  2120. switch(f){case b.constants.KEY_CODE.SPACE:case b.constants.KEY_CODE.ENTER:e.toggle(),a.preventDefault();
  2121. break;
  2122. case b.constants.KEY_CODE.M:b.Mediator.publish("volume:toggle"),a.preventDefault();
  2123. break;
  2124. case b.constants.KEY_CODE.DOWN_ARROW:b.Mediator.publish("volume:toggle",e.volume(),-.1),a.preventDefault();
  2125. break;
  2126. case b.constants.KEY_CODE.UP_ARROW:b.Mediator.publish("volume:toggle",e.volume(),.1),a.preventDefault();
  2127. break;
  2128. case b.constants.KEY_CODE.F:e._toggleFullScreen(),a.preventDefault();
  2129. break;
  2130. case b.constants.KEY_CODE.C:b.Mediator.publish("subs:toggle"),a.preventDefault();
  2131. break;
  2132. case b.constants.KEY_CODE.LEFT_ARROW:e._onDemand!==!0&&e.controls.isReplayMode()!==!0||(c=e.getPosition()-5,d=e.getDuration(),e.controls.seekTo(c>=0?c:0,d)),a.preventDefault();
  2133. break;
  2134. case b.constants.KEY_CODE.RIGHT_ARROW:e._onDemand!==!0&&e.controls.isReplayMode()!==!0||(c=e.getPosition()+5,d=e.getDuration(),e.controls.seekTo(d>=c?c:d,d)),a.preventDefault()}if((e._onDemand===!0||e.controls.isReplayMode()===!0)&&f>=48&&57>=f||f>=96&&105>=f){var g=57>=f?f-48:f-96;
  2135. d=e.getDuration(),e.controls.seekTo(d*(g/10),d)}}})},e.prototype._onFullscreenChange=function(){b.Mediator.publish("videoState:inFullScreen",this._isInFullscreen())},e.prototype._unBindEvents=function(){b.Mediator.off("controls:toggle"),b.Mediator.off("controls:timeline"),b.Mediator.off("controls:fullscreen"),b.Mediator.off("controls:volumeChanged"),b.Mediator.off("video:stateChange"),b.Mediator.off("video:captionLoaded"),b.Mediator.off("video:buffering"),b.Mediator.off("channel:manifestUpdate"),b.Mediator.off("playback:ready"),b.Mediator.off("video:loaded"),b.Mediator.off("cmd:loadManifest"),b.Mediator.off("controls:switchAudioLang"),b.Mediator.off("video:audioLangsAndSubtitles"),b.Mediator.off("timeService:timeupdate"),b.Mediator.off("video.contentStart"),b.Mediator.off("channelsModel:channelsLoaded"),b.Mediator.off("captions:toggleContainer"),b.Mediator.off("controls:switchSubs"),b.Mediator.off("audioController:created"),b.Mediator.off("video:timeupdate"),b.Mediator.off("startOverOffsetReceived"),c(a.document).off(".hrz_player")},e.prototype._assetLoadedHackHandler=function(c){if(b.audioController&&b.audioController.multiAudio()){var d=this;
  2136. this._currVolume=this.volume(),console&&console.log("currv: "+this._currVolume),this.volume(0),a._assetLoadedHackHandlerTimeout&&clearTimeout(a._assetLoadedHackHandlerTimeout),a._assetLoadedHackHandlerTimeout=a.setTimeout(function(){d.volume(d._currVolume),console&&console.log("currv_ag: "+d._currVolume)},2300)}},e.prototype._onVideoStart=function(){var c=this;
  2137. this._removeSplashscreen(),this.controls.isReplayMode()!==!0&&this._isReplayMode!==!0||(this._replayStartFromZeroTimeout=a.setTimeout(function(){c.playFrom(c._offsetForStartOver||0),c._isReplayMode===!0&&b.Mediator.publish("assetLoaded")},300))},e.prototype._onVideoTimeUpdate=function(a){if(this._onDemand===!0){var c=this.getDuration();
  2138. if(c){var d=this.getPosition();
  2139. if(d){var e=d/c*100;
  2140. e>b.constants.defaults.BOOKMARKS_WATCHED_EDGE?b.Mediator.publish("bookmarks:setAsWatched"):b.Mediator.publish("bookmarks:timeInWatchedRange")}}}},e.prototype._globalTimeUpdated=function(a){var c;
  2141. this.controls.isReplayMode()===!0&&(c=this.getDuration(),c>0&&b.Mediator.publish("channelsModel:replaydurationchange",c))},e.prototype._setToggleControlsTimeout=function(c){var d=this;
  2142. this._mouseMoveTimeout&&a.clearTimeout(this._mouseMoveTimeout),this._userInactivityInterval&&a.clearInterval(this._userInactivityInterval),this.element.addClass("hrz-player-userActive"),this._mouseMoveTimeout=a.setTimeout(function(){d.element.removeClass("hrz-player-userActive"),b.Mediator.publish("controls:hidden"),d._userInactivityInterval=a.setInterval(function(){b.Mediator.publish("user:inactivity")},d._inactivityLimit)},3e3)},e.prototype._render=function(d,e){var f=a.hrz.views["player/views/player-semantics.mustache"].render({msg:b.MsgManager.get(),showBackToBrowseButton:b.utils.isTrue(e.showBackToBrowseButton)});
  2143. this.element.html(f),this.controls=new b.VideoControls("hrz-player-controls-container",{onDemand:this._onDemand,favorites:e.favouriteChannelList,switchAudioLangs:b.utils.isTrue(e.switchAudioLangs),enableSubtitles:e.enableSubtitles,enableReplayTV:b.utils.isTrue(e.enableReplayTV)}),this.controls.replayActivationNeeded(e.replayActivationNeeded),this.nodes={},this.nodes.captionsContainer=c("#hrz-player-captions-container"),this.nodes.publicOverlay=c(".hrz-player-public-overlay"),this.nodes.overlay=this.element.find(".hrz-player-overlay"),this.nodes.buffering=this.element.find(".hrz-player-buffering"),this.nodes.splashscreen=this.element.find(".hrz-player-splashscreen-overlay"),this.nodes.splashscreenLoadingElement=this.nodes.splashscreen.find("#hrz-loading-circle"),this.nodes.splashscreenLoadingElementSVG_=this.nodes.splashscreenLoadingElement[0],this.nodes.splashscreenLoadingTriangle=this.nodes.splashscreen.find("#hrz-loading-triangle"),this.nodes.splashscreenLoadingBackground=this.nodes.splashscreen.find(".hrz-player-splashscreen-overlay-background"),this._renderPlayback(this.element.find(".hrz-player-video-container"),e)},e.prototype._renderPlayback=function(a,c){b.HTML5===!0?this.video=new b.Video(a,c):this.video=new b.SilverlightVideo(a,c)},e.prototype._getContentLocator=function(){var a,b=this.getItem();
  2144. return b.videoStream&&b.videoStream.contentLocator&&(a=b.contentLocator),a},e.prototype._onBuffering=function(a){this.nodes.splashscreen.hasClass("hrz-hidden")||this._removeSplashscreen(),"buffering"===a?this.nodes.buffering.removeClass("hrz-hidden"):this.nodes.buffering.addClass("hrz-hidden")},e.prototype._isInFullscreen=function(){var a=document.fullscreenElement||document.msFullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement;
  2145. return a!==d&&null!==a},e.prototype._toggleFullScreen=function(){this._isInFullscreen()?this._exitFullScreen():this._goToFullScreen()},e.prototype._goToFullScreen=function(){if(this._playbackReady===!0){var b=this.element[0];
  2146. b.requestFullscreen?(!a._doNotBindFullScreenEvent&&c(document).on("fullscreenchange",this._onFullscreenChange.bind(this)),b.requestFullscreen()):b.msRequestFullscreen?(!a._doNotBindFullScreenEvent&&c(document).on("MSFullscreenChange",this._onFullscreenChange.bind(this)),b.msRequestFullscreen()):b.mozRequestFullScreen?(!a._doNotBindFullScreenEvent&&c(document).on("mozfullscreenchange",this._onFullscreenChange.bind(this)),b.mozRequestFullScreen()):b.webkitRequestFullscreen&&(!a._doNotBindFullScreenEvent&&c(document).on("webkitfullscreenchange",this._onFullscreenChange.bind(this)),b.webkitRequestFullscreen()),a._doNotBindFullScreenEvent=!0}},e.prototype._exitFullScreen=function(){document.cancelFullscreen?document.cancelFullscreen():document.msExitFullscreen?document.msExitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitCancelFullScreen&&document.webkitCancelFullScreen()},e.prototype._isInFullscreen=function(){var a=document.fullscreenElement||document.msFullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement;
  2147. return a!==d&&null!==a},e.prototype._loadMediaItem=function(a){var c=this;
  2148. this.mediaItemModel=new b.MediaItemModel(a,this._isReplayMode),this.controls.setModel(this.mediaItemModel),this.mediaItemModel.manifestReady().done(function(a){c._loadManifest(a)})},e.prototype._loadManifest=function(a){b.Mediator.publish("manifest:onLoading",a),b.CustomManifest&&(a.manifest=b.CustomManifest),b.CustomContentId&&(a.contentId=b.CustomContentId),a.manifest&&this._forceHttpsStreaming===!0&&(a.manifest=a.manifest.replace("http://","https://")),this.category=a.metadataInitial.categoryTag,this.video.loadManifest(a)},e.prototype._setOverlay=function(a){a?this.nodes.publicOverlay.html(a).removeClass("hrz-hidden"):this.nodes.publicOverlay.addClass("hrz-hidden").html("")},e.prototype._onChannelManifestUpdate=function(a){this._loadManifest(a)},e.prototype._switchAudioLang=function(a){this.video.switchAudioLang&&this.video.switchAudioLang(a)},e.prototype._switchSubs=function(a){this.nodes.captionsContainer.css("background-image",""),this.video.switchSubs&&this.video.switchSubs(a)},e.prototype.loadVideo=function(a){this._loadMediaItem(a)},e.prototype.loadChannel=function(a,c){c=c||{};
  2149. var d=this;
  2150. this._channelsLoadedDefer.done(function(){d.controls.replayActivationNeeded(c.replayActivationNeeded),b.Mediator.publish("controls:updateChannel",a,c)}),console.log("offset: "+(c?c.offset:"undefined")),c.showStartoverByDefaultWithData&&c.offset&&(this._offsetForStartOver=c.offset)},e.prototype.replayActivationNeeded=function(a){return this.controls.replayActivationNeeded(a)},e.prototype.play=function(){this.video.play()},e.prototype.playFrom=function(a){this.video.playFrom(a),console.log("playFrom is calle, time:"+a)},e.prototype.pause=function(){this.video.pause()},e.prototype.stop=function(){this.video.stop();
  2151. var a=this._onDemand===!0?"paused":"stopped";
  2152. b.Mediator.publish("video:stateChange",a)},e.prototype.restart=function(){this.video.playFrom(0)},e.prototype.getDuration=function(){return this.controls.isReplayMode()===!0?this.video.getDuration():this.mediaItemModel&&this.mediaItemModel.duration()||0},e.prototype.getPosition=function(){return this.video.getPosition()},e.prototype.playing=function(){return this.video.playing()},e.prototype.volume=function(a){var b=this.video.volume(a);
  2153. return b},e.prototype.getDeviceId=function(){return this.video.getDeviceId()},e.prototype.exitFullScreen=function(){this._exitFullScreen()},e.prototype.isInFullScreen=function(){return this._isInFullscreen()},e.prototype.goToFullScreen=function(){this._goToFullScreen()},e.prototype.setOverlay=function(a){this._setOverlay(a)},e.prototype.setAsWatched=function(){b.Mediator.publish("bookmarks:setAsWatched")},e.prototype.getItem=function(){var a;
  2154. return a=this.mediaItemModel?this.mediaItemModel.getItem():this.controls.getItem()},e.prototype.getSilverlightVersion=function(){return b.HTML5!==!0?this.video.getSilverlightVersion():d},e.prototype.getNumericErrorCode=function(a){var c=a.errorCodeNum||b.ErrorCode[a.errorCode+"_NUM"]||"";
  2155. return a.errorCode===b.ErrorCode.PLAYER_MEDIA_ERROR&&b.HTML5===!0&&(c=a.eventDescription),a.errorCode===b.ErrorCode.DEVICE_REGISTRATION_ERROR&&(c=b.ErrorCode[a.errorCode+"_NUM_"+a.eventDetails]||""),c+="",c.length>b.constants.MAGIC_NUMBER.MAX_ERROR_CODE_SIZE&&(c=c.substring(0,b.constants.MAGIC_NUMBER.MAX_ERROR_CODE_SIZE)),c},e.prototype.sendMidStreamError=function(a){if(a.causedPlaybackFailure===!0){var c=this.getItem(),d={eventName:"playbackError",appName:"Orion "+(b.HTML5===!0?"HTML5":"Silverlight")+" Player "+b.config.Version,errorCode:a.errorCodeNum,category:this.category||"Linear",contentId:c?c.stationServiceId||c.id:""};
  2156. this.video.sendMidStreamError(d)}},e.prototype._destroy=function(){this._unBindEvents(),this._mouseMoveTimeout&&a.clearTimeout(this._mouseMoveTimeout),this._userInactivityInterval&&a.clearTimeout(this._userInactivityInterval),this._toggleTimeout&&a.clearTimeout(this._toggleTimeout),this._replayStartFromZeroTimeout&&a.clearTimeout(this._replayStartFromZeroTimeout),this._captionsTimeout&&a.clearTimeout(this._captionsTimeout),a._assetLoadedHackHandlerTimeout&&clearTimeout(a._assetLoadedHackHandlerTimeout),this._fakeLoadingInterval&&a.clearTimeout(this._fakeLoadingInterval),this.video&&this.video.destroy&&this.video.destroy()},b.VideoBridge=e}(window,window.HRZ,window.HRZ.jQuery),window.HRZ=window.HRZ||{},function(a,b,c,d){"use strict";
  2157. function e(a,b){b=b||{},this.onDemand=b.onDemand,this.userAct=!1,this.element=c("#"+a),this.render(b),this.cacheNodes(),this.bindEvents()}b.Mediator=b.Mediator||new a.Mediator,e.prototype.setModel=function(a){var b=this;
  2158. a&&(this.mediaItemModel=a,this.mediaItemModel.itemReady().done(function(){b._onVodMediaItemLoaded()}))},e.prototype.render=function(c){c=c||{},c.msg=b.MsgManager.get(),this.onDemand!==!0&&(c.showReplay=c.enableReplayTV===!0);
  2159. var d=a.hrz.views["player/views/controls.mustache"].render(c);
  2160. this.element.html(d),c.onDemand!==!0&&(this.channelsControl=new b.ChannelsVideoControls("hrz-player-channels-placeholder",c));
  2161. new b.ControlsVolume(this.element.find(".hrz-player-controls-volume"))},e.prototype.cacheNodes=function(a){this.nodes=this.nodes||{},this.nodes.fullScreenBtn=this.element.find(".hrz-player-controls-fullscreen"),this.nodes.fullScreenBtnLabel=this.nodes.fullScreenBtn.find(".hrz-player-controls-btn-label-content"),this.nodes.toggleBtn=this.element.find(".hrz-player-controls-toggle"),this.nodes.toggleBtnLabel=this.nodes.toggleBtn.find(".hrz-player-controls-btn-label-content"),this.nodes.volumeBtn=this.element.find(".hrz-player-controls-volume"),this.nodes.timelinePastTime=this.element.find(".hrz-player-controls-time-line-past"),this.nodes.fullTime=this.element.find(".hrz-player-controls-time-full"),this.nodes.pastTime=this.element.find(".hrz-player-controls-time-past"),this.nodes.timeline=this.element.find(".hrz-player-controls-time-line"),this.nodes.timelineProgress=this.element.find(".hrz-player-controls-time-line-progress"),this.nodes.timelineMarker=this.element.find(".hrz-player-controls-time-line-marker"),this.nodes.timelineTooltip=this.element.find(".hrz-player-controls-timeline-tooltip"),this.nodes.channel=this.element.find(".hrz-player-timeline-program-channel"),this.nodes.programTitle=this.element.find(".hrz-player-timeline-program-title"),this.nodes.programTime=this.element.find(".hrz-player-timeline-program-time"),this.nodes.programFullInfoPlaceholder=this.element.find(".hrz-program-fullinfo-placeholder"),this.nodes.scrubbingAlert=this.element.find(".hrz-player-controls-timeline-noscrubbing"),
  2162. this.nodes.replayBtn=this.element.find(".hrz-player-controls-replay"),this.nodes.replayBtnLabel=this.nodes.replayBtn.find(".hrz-player-controls-btn-label-content")},e.prototype.bindEvents=function(){var a=this;
  2163. this.nodes.fullScreenBtn.on("click",function(){b.Mediator.publish("controls:fullscreen")}),this.nodes.toggleBtn.on("click",function(){var a=c(this);
  2164. a.hasClass("disabled")||(b.Mediator.publish("controls:toggle"),a.addClass("disabled"))}),this.nodes.volumeBtn.on("click",function(){b.Mediator.publish("controls:volume")}),this.element.on("click",".hrz-player-controls-channels",function(b){a.channelsControl.toggle(),a._hideTimelineProgram(),b.stopPropagation()}),this.element.on("click",".hrz-player-controls-subs",function(b){a.channelsControl&&a.channelsControl.toggle(!1),a._hideTimelineProgram(),b.stopPropagation()}),this.element.on("click",".hrz-player-timeline-program",this._onToggleTimelineProgram.bind(this)),this.nodes.replayBtn.on("click",this._onReplayBtnClicked.bind(this)),b.Mediator.on("video:stateChange",function(c){var d=b.MsgManager.get();
  2165. a.nodes.toggleBtn.removeClass("disabled"),"paused"===c?(a.nodes.toggleBtn.removeClass("hrz-player-controls-toggle-pause"),a.nodes.toggleBtnLabel.html(d.play)):"playing"===c&&(a.nodes.toggleBtn.addClass("hrz-player-controls-toggle-pause"),a.onDemand===!0||a.replayMode===!0?a.nodes.toggleBtnLabel.html(d.pause):a.nodes.toggleBtnLabel.html(d.stop))}),b.Mediator.on("video:timeupdate",this._onTimeUpdate,{},this),b.Mediator.on("timeService:timeupdate",this._onGlobalTimeUpdated,{},this),b.Mediator.on("video:durationchange",function(c){a.onDemand===!0&&(a.mediaItemModel.duration(c),a.mediaItemModel.setCanSeek(!0),a.nodes.fullTime.html(b.utils.SecondsToHHMMSS(c))),a.replayMode===!0&&b.Mediator.publish("channelsModel:replaydurationchange",c)}),b.Mediator.on("live:durationchange",function(c){a.nodes.fullTime.html(b.utils.SecondsToHHMMSS(c))}),b.Mediator.on("replay:progress",function(b){a.element.find(".hrz-player-controls-time-line-progress").css("width",100*b+"%")}),b.Mediator.on("channel:updateView",this._onChannelUpdateView,{},this),b.Mediator.on("channel:programUpdate",this._onChannelProgramUpdate,{},this),b.Mediator.on("channel:updateCurrentProgramDetails",this._onUpdateCurrentProgramDetails,{},this),b.Mediator.on("channel:updateNextProgramDetails",this._onUpdateNextProgramDetails,{},this),b.Mediator.on("videoState:inFullScreen",function(c){var d=b.MsgManager.get();
  2166. c===!0?(a.nodes.fullScreenBtn.addClass("hrz-player-controls-fullscreen-exit"),a.nodes.fullScreenBtnLabel.html(d.exitFullScreen)):(a.nodes.fullScreenBtn.removeClass("hrz-player-controls-fullscreen-exit"),a.nodes.fullScreenBtnLabel.html(d.fullScreen))}),b.Mediator.on("controls:hidden",this._hideControls,{},this),b.Mediator.on("controls:updateButtonHint",this._updateRestartHint,{},this),b.Mediator.on("channelsModel:replayManifestLoading",this._onReplayManifestLoading,{},this),b.Mediator.on("channelsModel:liveManifestLoading",this._onLiveManifestLoading,{},this),b.Mediator.on("controls:replayAvailable",this._onReplayAvailable,{},this),b.Mediator.once("destroy",this.destroy,{},this),this._bindTimelineEvents()},e.prototype._unBindEvents=function(){b.Mediator.off("channel:updateView"),b.Mediator.off("channel:programUpdate"),b.Mediator.off("channel:updateCurrentProgramDetails"),b.Mediator.off("channel:updateNextProgramDetails"),b.Mediator.off("video:durationchange"),b.Mediator.off("video:timeupdate"),b.Mediator.off("videoState:inFullScreen"),b.Mediator.off("controls:hidden"),b.Mediator.off("controls:updateButtonHint"),b.Mediator.off("channelsModel:replayManifestLoading"),b.Mediator.off("channelsModel:liveManifestLoading"),b.Mediator.off("controls:replayAvailable"),b.Mediator.off("timeService:timeupdate"),b.Mediator.off("video:stateChange")},e.prototype._onReplayAvailable=function(a){a===!0?this.nodes.replayBtn.removeClass("hrz-hidden"):this.nodes.replayBtn.addClass("hrz-hidden")},e.prototype._onReplayManifestLoading=function(){this.element.find(".hrz-player-controls-replay").addClass("hrz-player-controls-replay-backtolive"),this.element.find(".hrz-player-controls-channels").addClass("hrz-hidden"),this.nodes.timeline.removeClass("hrz-player-controls-time-line-live").addClass("hrz-player-controls-time-line-replay"),this.nodes.toggleBtn.removeClass("hrz-controls-toggle-btn-live"),this.nodes.toggleBtnLabel.html(b.MsgManager.get().pause),this.replayMode=!0},e.prototype._onLiveManifestLoading=function(){this.element.find(".hrz-player-controls-replay").removeClass("hrz-player-controls-replay-backtolive"),this.element.find(".hrz-player-controls-channels").removeClass("hrz-hidden"),this.nodes.timeline.addClass("hrz-player-controls-time-line-live").removeClass("hrz-player-controls-time-line-replay"),this.nodes.toggleBtn.addClass("hrz-controls-toggle-btn-live"),this.nodes.toggleBtnLabel.html(b.MsgManager.get().stop),this.nodes.timelineProgress.css("width",""),this.replayMode=!1},e.prototype._updateRestartHint=function(){this.channelsControl.isInReplayMode()?this.nodes.replayBtnLabel.html(b.MsgManager.get().backToLiveTV):this.nodes.replayBtnLabel.html(b.MsgManager.get().startOver)},e.prototype._onReplayBtnClicked=function(){if(this.channelsControl.isInReplayMode())b.Mediator.publish("startover:liveClicked");
  2167. else{if(this._replayActivationNeeded===!0)return void b.Mediator.publish("startover:restartClickedInActivationNeededMode");
  2168. b.Mediator.publish("startover:restartClicked")}this.channelsControl.toggleReplayTV(),b.Mediator.publish("controls:updateButtonHint")},e.prototype.replayActivationNeeded=function(a){return a!==d&&(this._replayActivationNeeded=b.utils.isTrue(a)),this._replayActivationNeeded===!0},e.prototype._onToggleTimelineProgram=function(a){a&&a.stopPropagation(),this.nodes.programFullInfoPlaceholder.hasClass("hrz-hidden")?(this.nodes.programFullInfoPlaceholder.removeClass("hrz-hidden"),this.channelsControl&&this.channelsControl.toggle(!1),b.Mediator.publish("controls:fullInfoOpened"),this.element.find(".hrz-program-fullinfo-description").nanoScroller({alwaysVisible:!0})):this._hideTimelineProgram()},e.prototype._onGlobalTimeUpdated=function(){this.replayMode===!0},e.prototype._hideControls=function(){this._hideTimelineProgram(),this._toggleTimelineTooltip(!1)},e.prototype._toggleTimelineTooltip=function(a){a===!1?this.nodes.timelineTooltip.addClass("hrz-hidden"):a===!0?this.nodes.timelineTooltip.removeClass("hrz-hidden"):this.nodes.timelineTooltip.hasClass("hrz-hidden")?this.nodes.timelineTooltip.removeClass("hrz-hidden"):this.nodes.timelineTooltip.addClass("hrz-hidden")},e.prototype._hideTimelineProgram=function(){this.nodes.programFullInfoPlaceholder.hasClass("hrz-hidden")||b.Mediator.publish("controls:fullInfoClosed"),this.nodes.programFullInfoPlaceholder.addClass("hrz-hidden")},e.prototype._onChannelUpdateView=function(a){this.nodes.channel.css("background-image",'url("'+a.logo+'")')},e.prototype._onChannelProgramUpdate=function(c){c.currentProgram&&(this.nodes.programTitle.html(c.currentProgram.title),this.nodes.programTime.html(c.currentProgram.startTime+" - "+c.currentProgram.endTime));
  2169. var d=a.hrz.views["player/views/program-current-next.mustache"].render({channel:c,msg:b.MsgManager.get()});
  2170. this.nodes.programFullInfoPlaceholder.html(d)},e.prototype._onUpdateCurrentProgramDetails=function(a){var b=this.nodes.programFullInfoPlaceholder.find(".hrz-program-fullinfo-left");
  2171. b.find(".hrz-program-fullinfo-image").css("background-image",'url("'+a.image+'")'),b.find(".hrz-program-fullinfo-description-text").html(a.description)},e.prototype._onUpdateNextProgramDetails=function(a){var b=this.nodes.programFullInfoPlaceholder.find(".hrz-program-fullinfo-right");
  2172. b.find(".hrz-program-fullinfo-image").css("background-image",'url("'+a.image+'")'),b.find(".hrz-program-fullinfo-description-text").html(a.description)},e.prototype._onVodMediaItemLoaded=function(){var b=a.hrz.views["player/views/program.mustache"].render(this.mediaItemModel.getVodProgramData());
  2173. this.nodes.programFullInfoPlaceholder.html(b),this.nodes.programTitle.html(this.mediaItemModel.getTitle())},e.prototype._onTimeUpdate=function(a){var c,d;
  2174. this.onDemand===!0?(c=this.mediaItemModel.duration(),this.mediaItemModel.currentTime(a),a>c&&(this.mediaItemModel.duration(a),this.nodes.fullTime.html(b.utils.SecondsToHHMMSS(a)))):this.replayMode===!0?(c=this.channelsControl.getReplayDuration(),this.channelsControl.updateReplayCurrentTime(a)):(a=this.channelsControl.getProgramCurrentTime(),c=this.channelsControl.getProgramDuration()),d=a/c*100,this._setPastTime(d,a)},e.prototype._bindTimelineEvents=function(){var a=this,b=!1,e=null,f=!1;
  2175. this.nodes.timelineMarker.on("click",function(a){a.stopPropagation()}),this.nodes.timelineProgress.on("click",function(b){if(a.replayMode===!0);
  2176. else if(a.onDemand!==!0||!a.mediaItemModel||a.mediaItemModel.canSeek()!==!0)return;
  2177. var e=b.originalEvent,f=(e.offsetX!==d?e.offsetX:e.layerX)/c(this).outerWidth();
  2178. f>1?f=1:0>f&&(f=0);
  2179. var g;
  2180. g=a.mediaItemModel?a.mediaItemModel.duration():a.channelsControl.getReplayDuration();
  2181. var h=g*f;
  2182. a.seekTo(h,g,f)}),this.nodes.timelineMarker.on("mousedown",function(c){(a.replayMode===!0||a.mediaItemModel&&a.mediaItemModel.canSeek())&&(b=!0,a.userAct=!0),c.stopPropagation()}),this.nodes.timelineMarker.on("click",function(a){a.stopPropagation()}),c(document).on("click",function(b){a._hideTimelineProgram(),a.channelsControl&&a.channelsControl.toggle(!1)}),this.element.on("click",".hrz-program-fullinfo-placeholder",function(a){a.stopPropagation()}),c(document).on("mousemove",function(c){if(b){f=!0;
  2183. var d=c.pageX,g=a.nodes.timelineProgress.outerWidth(),h=a.nodes.timelineProgress.offset().left;
  2184. e=(d-h)/g*100,e>100&&(e=100),0>e&&(e=0),a._updateTimeline(e),a._updateTimeTooltip(e/100,!0)}}),c(document).on("mouseup",function(){var c=!1;
  2185. if(f===!0)if(a.onDemand===!0||a.replayMode===!0)if(a.replayMode===!0&&a.channelsControl&&a.channelsControl.canScrubReplay(e)||a.mediaItemModel&&a.mediaItemModel.canScrub(e)===!0){var d;
  2186. d=a.replayMode===!0?a.channelsControl.getReplayDuration():a.mediaItemModel.duration();
  2187. var g=e/100;
  2188. g>1&&(g=1);
  2189. var h=d*g;
  2190. a._seekTo(h),a._toggleTimelineTooltip(!1)}else a._showScrubbingAlert();
  2191. else c=!0;
  2192. if(b=!1,a.userAct=!1,f=!1,c===!0){var i=a.mediaItemModel.currentTime();
  2193. a._onTimeUpdate(i)}}),this.nodes.timelineProgress.on("mousemove",function(b){if(a.replayMode===!0);
  2194. else if(a.onDemand!==!0||!a.mediaItemModel||a.mediaItemModel.canSeek()!==!0||f===!0)return;
  2195. if(b.target===a.nodes.timelineMarker[0])return void a._toggleTimelineTooltip(!1);
  2196. a._toggleTimelineTooltip(!0);
  2197. var e=b.originalEvent,g=(e.offsetX!==d?e.offsetX:e.layerX)/c(this).outerWidth();
  2198. g>1?g=1:0>g&&(g=0),a._updateTimeTooltip(g)}),this.nodes.timelineProgress.on("mouseleave",function(b){a._toggleTimelineTooltip(!1)})},e.prototype._showScrubbingAlert=function(){var b=this;
  2199. this.nodes.scrubbingAlert.removeClass("hrz-hidden"),this._scrubbingTimeout&&a.clearTimeout(this._scrubbingTimeout),this._scrubbingTimeout=a.setTimeout(function(){b.nodes.scrubbingAlert.addClass("hrz-hidden")},3e3)},e.prototype.seekTo=function(a,b,c){c=c||a/b,this.onDemand===!0?this.mediaItemModel.canScrub(100*c)?this._seekTo(a):this._showScrubbingAlert():this.channelsControl&&this.channelsControl.canScrubReplay(100*c)?this._seekTo(a):this._showScrubbingAlert()},e.prototype._seekTo=function(c){c>=0&&(b.Mediator.publish("controls:timeline",c),this._userScrubbedTimeout&&a.clearTimeout(this._userScrubbedTimeout),this._userScrubbedTimeout=a.setTimeout(function(){b.Mediator.publish("user:scrubbed",c)},200))},e.prototype._updateTimeline=function(a){this.nodes.timelinePastTime.css("width",a+"%")},e.prototype._updateTimeTooltip=function(a,c){c===!0?this.nodes.timelineTooltip.addClass("hrz-player-controls-timeline-tooltip-above-marker"):this.nodes.timelineTooltip.removeClass("hrz-player-controls-timeline-tooltip-above-marker");
  2200. var d;
  2201. d=this.replayMode===!0?this.channelsControl.getReplayDuration():this.mediaItemModel.duration();
  2202. var e=d*a,f=b.utils.SecondsToHHMMSS(e),g=this.nodes.timelineTooltip.outerWidth(),h=g/2,i=this.nodes.timelineTooltip.parent().outerWidth(),j=this.nodes.timeline.outerWidth(),k=i*a-h;
  2203. k+g>j?this.nodes.timelineTooltip.css("left","").css("right","0px"):0>k?this.nodes.timelineTooltip.css("right","").css("left","0px"):this.nodes.timelineTooltip.css("right","").css("left",k+"px"),this._toggleTimelineTooltip(!0),this.nodes.timelineTooltip.html(f)},e.prototype.getItem=function(){return this.channelsControl.getItem()},e.prototype.destroy=function(){this._userScrubbedTimeout&&a.clearTimeout(this._userScrubbedTimeout),this._unBindEvents(),this.volumeCtrl&&this.volumeCtrl.destroy()},e.prototype._setPastTime=function(a,c){this.userAct===!1&&(this.replayMode===!0&&(a=a>99?100:parseInt(a)),this.nodes.timelinePastTime.css("width",a+"%")),this.nodes.pastTime.html(b.utils.SecondsToHHMMSS(c))},e.prototype.isReplayMode=function(){return this.replayMode===!0},b.VideoControls=e}(window,window.HRZ,window.HRZ.jQuery),window.HRZ=window.HRZ||{},function(a,b,c,d){"use strict";
  2204. function e(a){this.element=a,this._bindEvents(),this.volume=f.MAX}var f={MIN:0,MAX:100};
  2205. e.prototype._bindEvents=function(){var a=this,e=!1,f=null,g=null;
  2206. this.element.on("mousedown",".hrz-player-controls-volume-popup-marker",function(b){e=!0,null===f&&(f=a.element.find(".hrz-player-controls-volume-popup-full").height()),g=a.element.find(".hrz-player-controls-volume-popup-full").offset().top,b.stopPropagation()}),c(document).on("mousemove",function(b){if(e){var c=b.pageY,d=(f-(c-g))/f*100;
  2207. 100>=d&&d>=0&&a._updateVolume(d)}}),c(document).on("mouseup",function(){e===!0&&(e=!1)}),this.element.on("click",".hrz-player-controls-volume-popup-marker",function(a){a.stopPropagation()}),this.element.on("click",".hrz-player-controls-volume-popup-full",function(b){var c=b.originalEvent,e=c.offsetY;
  2208. e===d&&(e=c.layerY);
  2209. var f=100*(1-e/this.offsetHeight);
  2210. 100>=f&&f>=0&&a._updateVolume(f)}),this.element.on("click",function(b){b.target===b.currentTarget&&a._toggle()}),b.Mediator.on("volume:initialization",this._onVolumeInitialization,{},this),b.Mediator.on("volume:toggle",this._onVolumeToggle,{},this)},e.prototype._localStorageVolume=function(b){var c;
  2211. if(a.localStorage)if(b!==d)a.localStorage.volumeValue=b;
  2212. else{var e=a.localStorage.volumeValue;
  2213. e&&(c=parseInt(e))}return c},e.prototype._onVolumeInitialization=function(){var a=this._localStorageVolume();
  2214. this._updateVolume(a!==d?a:b.constants.defaults.VOLUME_BY_DEFAULT)},e.prototype._onVolumeToggle=function(a,b){var c;
  2215. b===d?this._toggle():(c=100*(a+b),c>f.MAX?c=f.MAX:c<f.MIN&&(c=f.MIN),console.log("volume: "+c),this._updateVolume(c))},e.prototype._unBindEvents=function(){b.Mediator.off("volume:initialization"),b.Mediator.off("volume:toggle")},e.prototype._updateVolume=function(a){b.Mediator.publish("controls:volumeChanged",a),this.volume=a,this._localStorageVolume(a),this._updateVolumeCSS(a)},e.prototype._updateVolumeCSS=function(a){this.element.find(".hrz-player-controls-volume-popup-current").css("height",f.MAX-a+"%"),a===f.MIN?this.element.addClass("hrz-player-controls-volume-zero"):this.element.removeClass("hrz-player-controls-volume-zero")},e.prototype._toggle=function(){this.volume!==f.MIN?(this.prevValue=this.volume||b.constants.defaults.VOLUME_BY_DEFAULT,this._updateVolume(f.MIN)):(this._updateVolume(this.prevValue||b.constants.defaults.VOLUME_BY_DEFAULT),this.prevValue=null)},e.prototype.destroy=function(){b.Mediator.off("volume:initialization")},b.ControlsVolume=e}(window,window.HRZ,window.HRZ.jQuery),window.HRZ=window.HRZ||{},function(a,b,c,d){"use strict";
  2216. function e(a,b){this.element=c("#"+a),this.createModel(b),this.bindEvents()}b.Mediator=b.Mediator||new a.Mediator,e.prototype._updateProgramsDetails=function(a){a.currentProgram&&this._model.getProgramDetails(a.currentProgram).done(function(a){b.Mediator.publish("channel:updateCurrentProgramDetails",a)}).fail(function(){}),a.nextProgram&&this._model.getProgramDetails(a.nextProgram).done(function(a){b.Mediator.publish("channel:updateNextProgramDetails",a)}).fail(function(){})},e.prototype.createModel=function(a){this._model=new b.ChannelsModel(a)},e.prototype._render=function(){var b=this._model.getViewModel(),c=a.hrz.views["player/views/controls-channels.mustache"].render(b);
  2217. this.element.html(c);
  2218. var d=this._model.channel();
  2219. this.element.find(".hrz-player-controls-channels-popup-nano").nanoScroller({alwaysVisible:!0,scrollTo:this.element.find('.hrz-player-controls-channels-item[data-id="'+(d?d.id:"")+'"]')}),this._recalculateChannelsHeight()},e.prototype._recalculateChannelsHeight=function(){var a;
  2220. if(this._noNeedToRecalculate!==!0){if(this.element.find(".hrz-player-controls-channels-item").length>=5)return void(this._noNeedToRecalculate=!0);
  2221. if(this._channelsHeightRecalculated)a=this._channelsHeightRecalculated;
  2222. else{var b=this.element.find(".hrz-player-controls-channels-item");
  2223. a=b.outerHeight()*b.length+this.element.find(".hrz-player-controls-channels-popup-header").height(),this._channelsHeightRecalculated=a}var c=-(a+9);
  2224. this.element.find(".hrz-player-controls-channels-popup").css("top",c+"px").css("height",a+"px")}},e.prototype._updateChannel=function(a,c){var d=this;
  2225. this.element.addClass("hrz-channel-loading");
  2226. var e=this._model.channel(a);
  2227. b.Mediator.publish("channel:updateView",e),b.Mediator.publish("channel:update",e),this._model.onEpgReady().done(function(){b.Mediator.publish("channel:programUpdate",e),e.currentProgram&&b.Mediator.publish("live:durationchange",e.currentProgram.duration),d._updateProgramsDetails(e)}),c&&"object"==typeof c.showStartoverByDefaultWithData?this._model.enableReplayTV(c.showStartoverByDefaultWithData):(this._model.checkReplayTV(this._model.channel()),this._model.manifestReady().done(function(a){b.Mediator.publish("channel:manifestUpdate",a)}).fail(function(){}),this._model&&this._model.backToLive(!0)),b.Mediator.publish("controls:updateButtonHint")},e.prototype._updateChannelExternal=function(a,c){b.Mediator.publish("captions:toggleContainer",!1),this._model&&this._model.isUserEntitledToPlayChannel(a)?this._updateChannel(a,c):b.Mediator.publish("error:hrz",b.errors.PLAYER_CRID_MISSING)},e.prototype.bindEvents=function(a){var d=this;
  2228. this.element.on("click",".hrz-player-controls-channels-item",function(a){var b=c(this).data("id")+"";
  2229. d._updateChannel(b),d.toggle()}),this.element.on("click",".hrz-player-controls-channels-close-btn",function(a){d.toggle()}),this.element.on("click",function(a){a.stopPropagation()}),b.Mediator.on("controls:updateChannel",this._updateChannelExternal,{},this),b.Mediator.on("timeService:timeupdate",this._globalTimeUpdated,{},this),b.Mediator.on("controls:hidden",this.toggle.bind(this,!1),{},this),b.Mediator.on("channelsModel:replaydurationchange",this._onReplayDurationChange,{},this),b.Mediator.on("video:loaded",function(){this.element.removeClass("hrz-channel-loading")},{},this),b.Mediator.once("destroy",this.destroy,{},this)},e.prototype._onReplayDurationChange=function(a){this._model.replayDuration(a);
  2230. var c=this._model.getReplayPercentage();
  2231. b.Mediator.publish("replay:progress",c)},e.prototype.toggle=function(a){if(a===!1)return this.element.addClass("hrz-hidden"),void b.Mediator.publish("controls:channelsViewClosed");
  2232. if(this.element.hasClass("hrz-hidden")){if(this.element.hasClass("hrz-channel-loading"))return;
  2233. this.element.removeClass("hrz-hidden"),b.Mediator.publish("controls:channelsViewOpened"),this._render()}else this.element.addClass("hrz-hidden"),b.Mediator.publish("controls:channelsViewClosed")},e.prototype._unBindEvents=function(){b.Mediator.off("controls:updateChannel"),b.Mediator.off("timeService:timeupdate"),b.Mediator.off("controls:hidden"),b.Mediator.off("video:loaded"),b.Mediator.off("channelsModel:replaydurationchange")},e.prototype._globalTimeUpdated=function(a){if(this.isInReplayMode()===!1&&this._model&&this._model.programExpired(a)){var c=this._model.channel();
  2234. c.currentProgram&&(b.Mediator.publish("channel:updateView",c),b.Mediator.publish("channel:programUpdate",c),this._model.checkReplayTV(c),this._updateProgramsDetails(c))}},e.prototype.getProgramCurrentTime=function(){return this._model.getProgramCurrentTime()},e.prototype.getProgramDuration=function(){return this._model.getProgramDuration()},e.prototype.toggleReplayTV=function(a){this._model.inReplayMode?this._model.backToLive():this._model.enableReplayTV(a)},e.prototype.getReplayDuration=function(){return this._model.replayDuration()},e.prototype.getItem=function(){var a=this.isInReplayMode()===!0?this._model._getStartoverItem():this._model.channel();
  2235. return a},e.prototype.destroy=function(){this._unBindEvents(),this._model&&this._model.destroy()},e.prototype.isInReplayMode=function(){return this._model.inReplayMode===!0},e.prototype.canScrubReplay=function(a){return this._model.canScrubReplay(a)===!0},e.prototype.updateReplayCurrentTime=function(a){return this._model.currentReplayTime(a)},b.ChannelsVideoControls=e}(window,window.HRZ,window.HRZ.jQuery),window.HRZ=window.HRZ||{},function(a,b,c,d){"use strict";
  2236. function e(a,b,d){this._button=c("#"+a),this._element=c("#"+b),this._render(d),this._bindEvents(),this._init(d)}var f="hrz-player-controls-langs-item-active";
  2237. b.Mediator=b.Mediator||new a.Mediator;
  2238. var g=500;
  2239. e.prototype._init=function(a){var b=a[0];
  2240. this._subsList=a[1],this._applyDefaultAudioStream(b),this._applyDefaultSubsStream(this._subsList),b.length>1&&(this._multiAudio=!0);
  2241. var c="hrz-player-controls-langs-single";
  2242. 1===b.length||0===this._subsList.length?this._element.addClass(c):this._element.removeClass(c),this._temporaryDisable=!1},e.prototype._applyDefaultSubsStream=function(a,c){if(a.length&&(c=c||this._localStorageSubs(),a.indexOf(c)>=0)){var d=this._element.find('.hrz-player-controls-langs-item[data-subs="'+c+'"]');
  2243. d.length&&(b.Mediator.publish("controls:switchSubs",c),this._currentSubs=c,d.addClass(f).siblings().removeClass(f),b.Mediator.publish("captions:toggleContainer",!0))}},e.prototype._applyDefaultAudioStream=function(c){if(c.length){var d=this._localStorageAudioStream();
  2244. if(c.indexOf(d)>=0){var e=this._element.find('.hrz-player-controls-langs-item[data-lang="'+d+'"]');
  2245. e.length&&(a.setTimeout(function(){b.Mediator.publish("controls:switchAudioLang",d),console.log("switchAudioLang "+d)},g),e.addClass(f).siblings().removeClass(f))}}},e.prototype._bindEvents=function(){b.Mediator.on("controls:hidden",this._toggle.bind(this,!1),{},this),c(document).on("click",this._toggle.bind(this,!1)),this._element.on("click",function(a){a.stopPropagation()}),this._button.on("click",this._toggle.bind(this));
  2246. var a=this;
  2247. this._element.on("click",".hrz-player-controls-langs-item",function(){var d=c(this).data("lang");
  2248. d&&(a._localStorageAudioStream(d),b.Mediator.publish("controls:switchAudioLang",d));
  2249. var e=c(this).data("subs");
  2250. e&&("off"===e&&(e=""),b.Mediator.publish("controls:switchSubs",e),a._currentSubs=e,a._localStorageSubs(e),b.Mediator.publish("captions:toggleContainer",""!==e)),c(this).addClass(f).siblings().removeClass(f),a._toggle()}),b.Mediator.on("controls:fullInfoOpened",this._toggle.bind(this,!1)),b.Mediator.on("controls:channelsViewOpened",this._toggle.bind(this,!1)),b.Mediator.on("channel:update",function(){this._temporaryDisable=!0},{},this),b.Mediator.on("subs:toggle",this._toggleSubs,{},this)},e.prototype._toggleSubs=function(){this._element.find("."+f);
  2251. this._currentSubs&&this._subsList&&this._subsList.length?(this._element.find('.hrz-player-controls-langs-item[data-subs="off"]').addClass(f).siblings().removeClass(f),b.Mediator.publish("controls:switchSubs",""),b.Mediator.publish("captions:toggleContainer",!1),this._currentSubs=""):this._applyDefaultSubsStream(this._subsList)},e.prototype._render=function(c){var d=a.hrz.views["player/views/player-controls-langs.mustache"].render({msg:b.MsgManager.get(),audioLangs:this._getLangsModel(c[0]),subtitles:this._getLangsModel(c[1])});
  2252. this._element.html(d),this._element.find(".hrz-player-controls-audio-left .hrz-player-controls-langs-item:first").addClass("hrz-player-controls-langs-item-active")},e.prototype._getLangsModel=function(a){var c=[];
  2253. if(a&&a.length)for(var d=0;
  2254. d<a.length;
  2255. d++){var e=a[d],f=b.langCodes.filter(function(a){return a.iso_639_2b===e||a.iso_639_2t===e||a.iso_639_1===e}),g=f&&f.length?f[0]["native"]:e;
  2256. "gos"===e.toLowerCase()&&"eng"===b.MsgManager.languageCode&&(g="Audio Description"),c.push({langCode:e,langTitle:g})}return c},e.prototype._toggle=function(a){if(a===!1)return void this._element.addClass("hrz-hidden");
  2257. if(this._element.hasClass("hrz-hidden")){if(this._temporaryDisable===!0)return;
  2258. this._element.removeClass("hrz-hidden"),this._element.find(".nano").nanoScroller({alwaysVisible:!0,disableResize:!0,scrollTo:this._element.find(".hrz-player-controls-langs-item-active")});
  2259. var b,c=this._element.find(".hrz-player-controls-audio-left .hrz-player-controls-langs-item"),d=this._element.find(".hrz-player-controls-audio-right .hrz-player-controls-langs-item"),e=c.outerHeight()*c.length,f=d.outerHeight()*d.length;
  2260. b=e>f?e:f,b=b+this._element.find(".hrz-player-controls-langs-header").outerHeight()+15,200>b&&this._element.css("height",b+"px").css("top",-(b+10))}else this._element.addClass("hrz-hidden")},e.prototype._localStorageSubs=function(b){var c;
  2261. if(a.localStorage)if(b!==d)a.localStorage["hrz.subs"]=b,c=b;
  2262. else{var e=a.localStorage["hrz.subs"];
  2263. e&&(c=e.toLowerCase())}return c},e.prototype._localStorageAudioStream=function(b){var c,e="hrz.audioStreamCode";
  2264. if(a.localStorage)if(b!==d)a.localStorage[e]=b,c=b;
  2265. else{var f=a.localStorage[e];
  2266. f&&(c=f.toLowerCase())}return c},e.prototype.multiAudio=function(){return this._multiAudio===!0},e.prototype.update=function(a){this._render(a),this._init(a)},e.prototype.destroy=function(){b.Mediator.off("controls:fullInfoOpened"),b.Mediator.off("controls:channelsViewOpened"),b.Mediator.off("channel:update"),b.Mediator.off("subs:toggle")},b.Mediator.on("audioController:create",function(a,c,d){b.audioController=new e(a,c,d),b.Mediator.publish("audioController:created"),b.Mediator.once("destroy",function(){b.audioController&&b.audioController.destroy(),b.audioController=null})})}(window,window.HRZ,window.HRZ.jQuery),window.HRZ=window.HRZ||{},function(a,b,c,d){"use strict";
  2267. function e(a,d){var e=this;
  2268. e._isReplay=d,this._manifestReady=c.Deferred(),this._manifestReady.fail(function(a){b.Mediator.publish("error:hrz",a)}),this._itemReady=c.Deferred(),this._loadMediaItem(a,d),this._itemReady.done(function(){e.getManifestData()})}e.prototype._loadMediaItem=function(a,c){var d=this;
  2269. c===!0?b.data.getListings({listingId:a}).done(function(a){d.item=a.program,d.item.id=a.id,d.item.stationId=a.stationId,d._initData(),d._itemReady.resolve(),d._getEntitlements()}):b.data.getMediaItem(a).done(function(a){d.item=a,d._initData(),d._itemReady.resolve(),d._getEntitlements()})},e.prototype._initData=function(){this.item.duration&&(this._duration=this.item.duration)},e.prototype._getEntitlements=function(){var a=this;
  2270. this.item.isReplayTv===!0&&b.data.getEntitlements(this.item.listingId).done(function(b){a._setPermissions(b)})},e.prototype._setPermissions=function(a){var b=a.permissions||[];
  2271. if(b&&b.length>0)for(var c=0;
  2272. c<b.length;
  2273. c++)"scrub"===b[c].toLowerCase()&&(this._canScrub=!0)},e.prototype.getManifestData=function(){var c=this.item.videoStreams,d="",e="";
  2274. if(c&&c.length)for(var f=0;
  2275. f<c.length;
  2276. f++)if("Orion-HSS"===c[f].assetType){d=c[f].url,e=b.CustomContentId||c[f].protectionKey;
  2277. break}d?(a.location.protocol.indexOf("https")>=0&&(d=d.replace("http://","https://")),this.getSMIL(d,e)):this._manifestReady.reject(b.errors.PLAYER_NO_SUITABLE_ASSET)},e.prototype.itemReady=function(){return this._manifestReady.promise()},e.prototype.manifestReady=function(){return this._manifestReady.promise()},e.prototype._getDeviceType=function(){var a="Orion-HSS";
  2278. return this._isReplay===!0&&(a="Orion-Replay-HSS"),a},e.prototype.getSMIL=function(a,d){var e=this;
  2279. a=a.replace("format=","formatDummy="),c.ajax({url:a,data:{format:"SMIL"},type:"GET"}).done(function(a){var c=b.errorHandler.checkSMILForErrors(a);
  2280. if(c)return void e._manifestReady.reject(c);
  2281. var f=a.match(/<video src=\"(.*?)\"/),g=f&&f.length>1&&f[1]||"";
  2282. if(g){var h=e._getManifestData(g,d);
  2283. e._manifestReady.resolve(h)}else e._manifestReady.reject(b.errors.RESTRICTION_POLICY_ERROR)}).fail(function(){e._manifestReady.reject(b.errors.RESTRICTION_POLICY_ERROR)})},e.prototype._getManifestData=function(a,c){var d=b.utils.ManifestHelper.getVodMetadata(this.item);
  2284. this._isReplay===!0&&(d.isListingTrue=!0);
  2285. var e={manifest:a+"&device="+this._getDeviceType(),videoId:this.item.id,contentId:c,metadata:b.utils.ManifestHelper.formatMedataForSL(d),metadataInitial:d};
  2286. return e},e.prototype.getTitle=function(){return this.item.title},e.prototype.getVodImage=function(a){var b="";
  2287. a=a||"adi-poster";
  2288. var c=this.item.images;
  2289. if(c&&c.length>0)for(var d=0;
  2290. d<c.length;
  2291. d++)c[d].assetType===a&&(b=c[d].url);
  2292. return b},e.prototype.canScrub=function(a){if(this._isReplay===!0&&this._canScrub!==!0){var b=this._duration*a/100;
  2293. if(this._currentTime===d||b>this._currentTime)return!1}return!0},e.prototype.setCanSeek=function(a){a!==d&&(this._canSeek=a)},e.prototype.canSeek=function(){return this._canSeek===!0},e.prototype.getVodProgramData=function(){var a=this.getVodImage("boxart-medium");
  2294. return a||(a=this.getVodImage("adi-poster")),{title:this.item.title,description:this.item.longDescription,image:a,onDemand:!0}},e.prototype.duration=function(a){return a!==d&&(this._duration=a),this._duration},e.prototype.currentTime=function(a){return a!==d&&(this._currentTime=a),this._currentTime},e.prototype.getItem=function(){return this.item},b.MediaItemModel=e}(window,window.HRZ,window.HRZ.jQuery),window.HRZ=window.HRZ||{},function(a,b,c,d){"use strict";
  2295. function e(a){var d=this;
  2296. this._epgIsReady=c.Deferred(),this._loadChannels().done(function(a){d._viewModel=d._getViewModel(a.channels),b.Mediator.publish("channelsModel:channelsLoaded"),d._channelsByStationId=d._getChannelsByStationId(),d._getChannelsListings().done(function(){d._getChannelsListings(!0).done(function(){d._epgIsReady.resolve()}),d._setUpdateLinearSchedulesTimeout()})});
  2297. var e=(a.favorites||"").split("+");
  2298. e&&e.length&&""!==e[0]&&(this._favorites=c(e).map(String.prototype.trim))}e.prototype.onEpgReady=function(){return this._epgIsReady.promise()},e.prototype._setUpdateLinearSchedulesTimeout=function(){var b=this;
  2299. this._updateLinearSchedulesTimeout=a.setTimeout(function(){b._getChannelsListings(!0),b._setUpdateLinearSchedulesTimeout()},216e5)},e.prototype._loadChannels=function(){var a=b.HTML5===!0?"Orion-DASH":"";
  2300. return b.data.getChannels(a)},e.prototype._getViewModel=function(a){for(var b=[],e=[],f=0;
  2301. f<a.length;
  2302. f++){var g=a[f],h=this.getStation(g),i={id:g.id,number:this.getChannelNumber(g),title:this.getChannelTitle(g),logo:this.getChannelLogo(g),stationId:h.id,stationServiceId:h.serviceId,videoStream:this._getVideoStream(h.videoStreams),visible:g.visible!==!1};
  2303. if(this._favorites){var j=c.inArray(g.channelNumber+"",this._favorites);
  2304. if(j>=0){e[j]=i;
  2305. continue}}b.push(i)}return e.filter(function(a){return a!==d}).concat(b)},e.prototype._getVideoStream=function(a){var c={},d=b.HTML5===!0?"Orion-DASH":"Orion-HSS";
  2306. if(a&&a.length)for(var e=0;
  2307. e<a.length;
  2308. e++)if(a[e].assetType===d){c.url=a[e].url,c.contentId=b.CustomContentId||a[e].protectionKey,c.contentLocator=b.CustomContentLocator||a[e].contentLocator;
  2309. break}return c},e.prototype._getChannelsByStationId=function(){for(var a={},b=0;
  2310. b<this._viewModel.length;
  2311. b++)a[this._viewModel[b].stationId+""]=this._viewModel[b];
  2312. return a},e.prototype.getChannelNumber=function(a){var b="",c=a.channelNumber;
  2313. if("number"==typeof c){b=c+"";
  2314. for(var d=3,e=b.length;
  2315. d>e;
  2316. d--)b="0"+b}return b},e.prototype.getStation=function(a){return a.stationSchedules[0].station},e.prototype.getStationId=function(a){return a.stationSchedules[0].station.id},e.prototype.getChannelTitle=function(a){return a.stationSchedules[0].station.title},e.prototype.getChannelLogo=function(a){var b="",c=a.stationSchedules[0].station.images;
  2317. if(c&&c.length>0)for(var d=0,e=c.length;
  2318. e>d;
  2319. d++){var f=c[d];
  2320.  
  2321. "station-logo-medium"===f.assetType&&(b=f.url)}return b},e.prototype._getChannelsListings=function(a){var c=this,d=this._getSchedulesParams(a);
  2322. return b.data.getSchedules(d).done(function(a){for(var d=b.utils.timeService.now(),e=0;
  2323. e<a.entries.length;
  2324. e++){var f=a.entries[e],g=c._channelsByStationId[f.o];
  2325. g&&c._parseAndAddPrograms(g,f.l,d)}})},e.prototype._getSchedulesParams=function(a){function c(a){var b=a.getMonth()+1+"";
  2326. b.length<2&&(b="0"+b);
  2327. var c=a.getDate()+"";
  2328. return c.length<2&&(c="0"+c),a.getFullYear()+b+c}function d(a){var b=a.getHours(),c=4;
  2329. return b>=0&&5>=b?c=1:b>=6&&11>=b?c=2:b>=12&&17>=b&&(c=3),c}var e=b.utils.timeService.now(),f=c(e),g=d(e);
  2330. if(a===!0&&(g+=1,g>4)){g=1;
  2331. var h=new Date(e.setDate(e.getDate()+1));
  2332. f=c(h)}return{requestDate:f,quarter:g}},e.prototype._getProgramModelByListing=function(a){var c=b.utils.timeService.newDate(a.s),d=b.utils.timeService.newDate(a.e),e=(d-c)/1e3;
  2333. return{title:a.t,id:a.i,startTime:c,endTime:d,duration:e}},e.prototype._parseAndAddPrograms=function(a,d,e){if(a.programs=a.programs||[],e=e||b.utils.timeService.now(),d&&d.length){for(var f=0;
  2334. f<d.length;
  2335. f++){var g=d[f],h=this._getProgramModelByListing(g),i=c.grep(a.programs,function(a){return a.id===h.id});
  2336. 0===i.length&&h.endTime>=e&&a.programs.push(h)}this._setPrograms(a)}},e.prototype._getProgramViewModel=function(a){return{title:a.title,startTime:b.utils.TimeToHHMM(a.startTime),endTime:b.utils.TimeToHHMM(a.endTime),id:a.id,duration:a.duration,pureStartTime:a.startTime,pureEndTime:a.endTime}},e.prototype._setPrograms=function(a){a.currentProgram=d,a.nextProgram=d;
  2337. for(var c=a.programs||[],e=b.utils.timeService.now(),f=0;
  2338. f<c.length;
  2339. f++){var g=c[f];
  2340. if(g.startTime<=e&&g.endTime>e){a.currentProgram=this._getProgramViewModel(g),c[f+1]&&(a.nextProgram=this._getProgramViewModel(c[f+1]));
  2341. break}}},e.prototype.getViewModel=function(){return{channels:this._viewModel,nowTime:b.utils.TimeToHHMM(b.utils.timeService.now()),msg:b.MsgManager.get()}},e.prototype.manifestReady=function(){var d=this,e=this._channelView,f=c.Deferred();
  2342. if(f.fail(function(a){b.Mediator.publish("error:hrz",a)}),e&&e.manifestUrl){var g=this._getManifestData(e,e.manifestUrl,e.videoStream.contentId);
  2343. f.resolve(g)}if(!e.videoStream||!e.videoStream.url||b.HTML5!==!0&&!e.videoStream.contentId)return f.reject(b.errors.PLAYER_NO_SUITABLE_ASSET);
  2344. var h=e.videoStream.url.replace("format=","formatDummy=");
  2345. if(a.location.protocol.indexOf("https")>=0&&(h=h.replace("http://","https://")),b.CustomManifest){e.manifestUrl=b.CustomManifest;
  2346. var i=d._getManifestData(e,b.CustomManifest,e.videoStream.contentId);
  2347. return f.resolve(i),f.promise()}return c.ajax({url:h,data:{format:"SMIL"},type:"GET"}).done(function(a){var c=b.errorHandler.checkSMILForErrors(a);
  2348. if(c)return void f.reject(c);
  2349. var g=d._getManifestUrlFromSMILResponse(a);
  2350. if(g){e.manifestUrl=g;
  2351. var h=d._getManifestData(e,g,e.videoStream.contentId);
  2352. f.resolve(h)}else f.reject(b.errors.RESTRICTION_POLICY_ERROR)}).fail(function(){f.reject(b.errors.RESTRICTION_POLICY_ERROR)}),f.promise()},e.prototype._getManifestUrlFromSMILResponse=function(a){var b="",c=a.match(/<ref src=\"(.*?)\"/);
  2353. return(!c||c.length<2)&&(c=a.match(/<video src=\"(.*?)\"/)),b=c&&c.length>1&&c[1]||""},e.prototype._getManifestData=function(a,c,d){var e=b.utils.ManifestHelper.getLinearMetadata(a),f={manifest:c,channelId:a.id,contentId:a.videoStream.contentId,contentLocator:a.videoStream.contentLocator,metadata:b.utils.ManifestHelper.formatMedataForSL(e),metadataInitial:e};
  2354. return f},e.prototype._setChannel=function(a){for(var b=0;
  2355. b<this._viewModel.length;
  2356. b++)if(a===this._viewModel[b].id){this._channelView=this._viewModel[b];
  2357. break}},e.prototype._getProgramDetailsModelByListing=function(a){var b=a.program||{},c="",d=b.images;
  2358. if(d&&d.length>0)for(var e=0;
  2359. e<d.length;
  2360. e++)if("boxart-small"===d[e].assetType){c=d[e].url;
  2361. break}return{image:c,description:b.description}},e.prototype.channel=function(a){return a&&this._setChannel(a),this._setPrograms(this._channelView),this._channelView},e.prototype.getProgramCurrentTime=function(){var a=b.utils.timeService.now(),c=0;
  2362. return this._channelView.currentProgram&&(c=(a-this._channelView.currentProgram.pureStartTime)/1e3),c},e.prototype.getProgramDuration=function(){var a=0;
  2363. return this._channelView.currentProgram&&(a=this._channelView.currentProgram.duration),a},e.prototype.getProgramDetails=function(a){var d=c.Deferred(),e=this;
  2364. return a?b.data.getListings({listingId:a.id}).done(function(a){d.resolve(e._getProgramDetailsModelByListing(a))}).fail(function(){d.reject()}):d.reject(),d.promise()},e.prototype.programExpired=function(a){var b=this._channelView;
  2365. return b&&b.currentProgram&&b.currentProgram.pureEndTime<a?(this._setPrograms(b),!0):!1},e.prototype.isUserEntitledToPlayChannel=function(a){var b=!1;
  2366. if(a=(a||"")+"",this._viewModel){var d=c.grep(this._viewModel,function(b){return b.id===a});
  2367. d.length>0&&(b=!0)}return b},e.prototype.destroy=function(){this._updateLinearSchedulesTimeout&&a.clearTimeout(this._updateLinearSchedulesTimeout)},b.ChannelsModel=e}(window,window.HRZ,window.HRZ.jQuery),window.HRZ=window.HRZ||{},function(a,b,c,d){"use strict";
  2368. b.ChannelsModel.prototype._getReplayEntitlements=function(a){var c=this;
  2369. return b.data.getEntitlements(a).done(function(a){c._setPermissions(a)})},b.ChannelsModel.prototype._setPermissions=function(a){a.entitled!==!0&&this._publishReplayAvailabilityState(!1);
  2370. var b=a.permissions||[];
  2371. if(b&&b.length>0)for(var c=0;
  2372. c<b.length;
  2373. c++)"scrub"===b[c].toLowerCase()&&(this._allowScrub=!0)},b.ChannelsModel.prototype._publishReplayAvailabilityState=function(a){b.Mediator.publish("controls:replayAvailable",a)},b.ChannelsModel.prototype._checkReplayTV=function(a){this._allowScrub=!1;
  2374. var c=b.utils.timeService.nowUTC().getTime(),d={stationId:a.stationId,startTime:"~"+c,endTime:c+"~",isReplayTvAvailable:!0,sort:"startTime|DESC"};
  2375. b.data.getListings(d).done(this._checkReplayTVListings.bind(this)).fail(this._publishReplayAvailabilityState.bind(this,!1))},b.ChannelsModel.prototype._getStartoverUrl=function(a,d,e){var f=this;
  2376. return c.ajax({url:a,data:{format:"SMIL"},type:"GET"}).done(function(a){f._replayManifestStream={url:f._getManifestUrlFromSMILResponse(a)+"&device=Orion-Replay-HSS",contentId:e,id:d},b.Mediator.publish("replayAssetAvailable",d),f._publishReplayAvailabilityState(!0)}).fail(function(){f._publishReplayAvailabilityState(!1)})},b.ChannelsModel.prototype._getStartoverItem=function(){return this._replayManifestStream},b.ChannelsModel.prototype._checkReplayTVListings=function(b){var c=this;
  2377. if(b&&b.listings&&b.listings.length&&b.listings[0].program){var d=b.listings[0].id,e=this._getVideoStream(b.listings[0].program.videoStreams);
  2378. if(!e.url)return void this._publishReplayAvailabilityState(!1);
  2379. var f=e.url.replace("format=","formatDummy=");
  2380. this._startOverListing=b.listings[0],a.location.protocol.indexOf("https")>=0&&(f=f.replace("http://","https://"));
  2381. var g=this._getReplayEntitlements(b.listings[0].id);
  2382. g.done(function(a){a&&a.entitled===!0?c._getStartoverUrl(f,d,e.contentId):c._publishReplayAvailabilityState(!1)})}else this._publishReplayAvailabilityState(!1)},b.ChannelsModel.prototype._loadReplayStream=function(d){var e=this._getVideoStream(d.program.videoStreams);
  2383. if(!e.url)return this._publishReplayAvailabilityState(!1),b.Mediator.publish("error:hrz",b.errors.PLAYER_NO_SUITABLE_ASSET),c.Deferred().reject();
  2384. var f=e.url.replace("format=","formatDummy=");
  2385. return this._startOverListing=d,a.location.protocol.indexOf("https")>=0&&(f=f.replace("http://","https://")),this._getStartoverUrl(f,d.id,e.contentId)},b.ChannelsModel.prototype._getStartOverManifestData=function(a,c){var d=b.utils.ManifestHelper.getVodMetadata(this._startOverListing.program);
  2386. d.isListingTrue=!0;
  2387. var e={manifest:a,videoId:this._startOverListing.program.listingId,contentId:c,metadata:b.utils.ManifestHelper.formatMedataForSL(d),metadataInitial:d};
  2388. return e},b.ChannelsModel.prototype.enableReplayTV=function(a){var b=this;
  2389. this.inReplayMode=!0,a?this._loadReplayStream(a).done(function(){b._playReplayManifest(),b._getReplayEntitlements(a.id)}):this._playReplayManifest()},b.ChannelsModel.prototype._playReplayManifest=function(){var a=this,c=b.data.getBookmark(this._startOverListing.mediaGroupId);
  2390. c.done(function(c){var d=0;
  2391. c&&c.bookmarks.length&&("playing"===c.bookmarks[0].playState||"paused"===c.bookmarks[0].playState)&&(d=c.bookmarks[0].offset/1e3),b.Mediator.publish("startOverOffsetReceived",d);
  2392. var e=a._getStartOverManifestData(a._replayManifestStream.url,a._replayManifestStream.contentId);
  2393. b.Mediator.publish("cmd:loadManifest",e),b.Mediator.publish("channelsModel:replayManifestLoading")})},b.ChannelsModel.prototype.backToLive=function(a){this.inReplayMode=!1,b.Mediator.publish("channelsModel:liveManifestLoading"),a!==!0&&this.manifestReady().done(this._replay_onLiveManifestReady.bind(this))},b.ChannelsModel.prototype._replay_onLiveManifestReady=function(a){b.Mediator.publish("cmd:loadManifest",a)},b.ChannelsModel.prototype.replayDuration=function(a){if(a!==d){a>b.constants.MAGIC_NUMBER.MAGIC_CONST_FOR_REPLAY+1&&(a-=b.constants.MAGIC_NUMBER.MAGIC_CONST_FOR_REPLAY),this._replayDuration=a;
  2394. var c=this._channelView.currentProgram.duration;
  2395. c&&this._replayDuration>c&&b.Mediator.publish("live:durationchange",this._replayDuration)}return this._replayDuration},b.ChannelsModel.prototype.getReplayPercentage=function(){var a=this._replayDuration||0,b=this._channelView.currentProgram.duration||1;
  2396. return a/b},b.ChannelsModel.prototype.canScrubReplay=function(a){if(this._allowScrub!==!0){var b=this.replayDuration(),c=b*a/100,e=this.currentReplayTime();
  2397. if(e===d||c>e)return!1}return!0},b.ChannelsModel.prototype.checkReplayTV=function(a){this._checkReplayTV(a)},b.ChannelsModel.prototype.currentReplayTime=function(a){return a!==d&&(this._currentReplayTime=a),this._currentReplayTime}}(window,window.HRZ,window.HRZ.jQuery),window.HRZ=window.HRZ||{},function(a,b,c,d){"use strict";
  2398. function e(){b.Mediator.on("error:hrz",this._onError,{},this),b.Mediator.on("error:silverlight",this._onSilverlightError,{},this),b.Mediator.on("error:html5",this._onHtml5Error,{},this),b.Mediator.on("error:oesp",this._onOESPError,{},this),b.Mediator.on("error:conviva",this._onConvivaError,{},this)}b.Mediator=b.Mediator||new a.Mediator,e.prototype._onError=function(a){b.Mediator.publish("error:public",a)},e.prototype._onSilverlightError=function(a){b.Mediator.publish("error:public",a)},e.prototype._onHtml5Error=function(a){a.causedPlaybackFailure===!0&&b.Conviva&&b.Conviva.reportError(b.ErrorCode.PLAYER_MEDIA_ERROR),b.Mediator.publish("error:public",a)},e.prototype._onConvivaError=function(){var a=b.errors[b.ErrorCode.LIVEPASS_FAILURE];
  2399. b.Mediator.publish("error:public",a)},e.prototype._onOESPError=function(a,c){var d,e;
  2400. if("string"==typeof a)try{e=JSON.parse(a)}catch(f){e={}}else e=a.responseJSON||{};
  2401. var g=e.length?e[0]:e,h=b.html5Errors[g.code+"_"+g.reason];
  2402. h||(h=b.html5Errors[g.code]),h?(d={errorCode:h.commonCode,eventDescription:h.description,causedPlaybackFailure:!0},h.commonCode===b.ErrorCode.DEVICE_REGISTRATION_ERROR&&(d.eventDetails=g.code)):(c&&(a=c),d={errorCode:b.ErrorCode.OESP_ERROR,eventDescription:a.status+', Status text: "'+a.statusText+'", response headers: '+a.getAllResponseHeaders(),causedPlaybackFailure:!0}),d.causedPlaybackFailure===!0&&b.Conviva&&b.Conviva.reportError(d.errorCode),b.Mediator.publish("error:public",d)},e.prototype.destroy=function(){b.Mediator.off("error:hrz"),b.Mediator.off("error:silverlight"),b.Mediator.off("error:html5"),b.Mediator.off("error:oesp"),b.Mediator.off("error:conviva")},e.prototype.checkSMILForErrors=function(a){var c=null;
  2403. return a?a.indexOf("GeoLocationBlocked")>=0?(c=b.errors.RESTRICTION_POLICY_FAILED,c.eventCode="IP_GEO_BLOCKED"):a.indexOf("IpBlocked")>=0?(c=b.errors.RESTRICTION_POLICY_FAILED,c.eventCode="IP_BLOCKED"):(a.indexOf("Unavailable.flv")>=0||a.indexOf('<param name="isException" value="true"/>')>=0)&&(c=b.errors.RESTRICTION_POLICY_ERROR):c=b.errors.RESTRICTION_POLICY_ERROR,c},b.Mediator.on("errorHandler:create",function(){b.errorHandler=new e,b.Mediator.once("destroy",function(){b.errorHandler&&b.errorHandler.destroy(),b.errorHandler=null})})}(window,window.HRZ,window.HRZ.jQuery),window.HRZ=window.HRZ||{},function(a,b,c,d){"use strict";
  2404. b.ErrorCode={PLAYER_MEDIA_ERROR:"PLAYER_MEDIA_ERROR",PLAYER_MEDIA_ERROR_NUM:"",LICENSE_CONCURRENT_HB_FAILURE:"LICENSE_CONCURRENT_HB_FAILURE",LICENSE_CONCURRENT_HB_FAILURE_NUM:-2003,LICENSE_ADULT_PIN_NOT_VERIFIED:"LICENSE_ADULT_PIN_NOT_VERIFIED",LICENSE_ADULT_PIN_NOT_VERIFIED_NUM:-2006,LICENSE_PARENTAL_PIN_NOT_VERIFIED:"LICENSE_PARENTAL_PIN_NOT_VERIFIED",LICENSE_PARENTAL_PIN_NOT_VERIFIED_NUM:-2007,LICENSE_NOT_AUTHORISED:"LICENSE_NOT_AUTHORISED",LICENSE_NOT_AUTHORISED_NUM:143,LICENSE_INVALID_CHANNEL_ID:"LICENSE_INVALID_CHANNEL_ID",LICENSE_INVALID_CHANNEL_ID_NUM:141,LICENSE_USER_NOT_ENTITLED:"LICENSE_USER_NOT_ENTITLED",LICENSE_USER_NOT_ENTITLED_NUM:142,LICENSE_SYSTEM_ERROR:"LICENSE_SYSTEM_ERROR",LICENSE_SYSTEM_ERROR_NUM:146,LINEAR_BLACKOUT_OCCURRED:"LINEAR_BLACKOUT_OCCURRED",LINEAR_BLACKOUT_OCCURRED_NUM:-2014,DEVICE_REGISTRATION_ERROR:"DEVICE_REGISTRATION_ERROR",DEVICE_REGISTRATION_ERROR_NUM_deviceUnregistered:-2016,DEVICE_REGISTRATION_ERROR_NUM_unknownDevice:-2016,DEVICE_REGISTRATION_ERROR_NUM_deviceUnregisteredDeviceLimitReached:-2017,DEVICE_REGISTRATION_ERROR_NUM_deviceUnregisteredActionLimitReached:-2018,OESP_ERROR:"OESP_ERROR",OESP_ERROR_NUM:244,RESTRICTION_POLICY_FAILED:"RESTRICTION_POLICY_FAILED",RESTRICTION_POLICY_FAILED_NUM:-2030,RESTRICTION_POLICY_ERROR:"RESTRICTION_POLICY_ERROR",RESTRICTION_POLICY_ERROR_NUM:65,OESP_GET_SESSION_ERROR:"OESP_GET_SESSION_ERROR",OESP_GET_SESSION_ERROR_NUM:-2030,PLAYER_NO_SUITABLE_ASSET:"PLAYER_NO_SUITABLE_ASSET",PLAYER_NO_SUITABLE_ASSET_NUM:-2030,PLAYER_CRID_MISSING:"PLAYER_CRID_MISSING",PLAYER_CRID_MISSING_NUM:-2030,LIVEPASS_FAILURE:"LIVEPASS_FAILURE",LIVEPASS_FAILURE_NUM:-2030},b.errors={OESP_GET_SESSION_ERROR:{errorCode:b.ErrorCode.OESP_GET_SESSION_ERROR,eventDescription:"The request to get the user session unexepectedly failed",causedPlaybackFailure:!0},PLAYER_NO_SUITABLE_ASSET:{errorCode:b.ErrorCode.PLAYER_NO_SUITABLE_ASSET,eventDescription:"Appropriate stream cannot be found",causedPlaybackFailure:!0},RESTRICTION_POLICY_FAILED:{errorCode:b.ErrorCode.RESTRICTION_POLICY_FAILED,eventDescription:"The current user is not allowed access due to their current location or because their IP Address has been blocked",causedPlaybackFailure:!0},RESTRICTION_POLICY_ERROR:{errorCode:b.ErrorCode.RESTRICTION_POLICY_ERROR,eventDescription:"A request for MPX to resolve the manifest location results in an unexpected exception ",causedPlaybackFailure:!0},PLAYER_CRID_MISSING:{errorCode:b.ErrorCode.PLAYER_CRID_MISSING,eventDescription:"An invalid attempt to play a channel or on demand asset where the id of the asset cannot be ascertained",causedPlaybackFailure:!0},LIVEPASS_FAILURE:{errorCode:b.ErrorCode.LIVEPASS_FAILURE,eventDescription:"Conviva initialization was failed",causedPlaybackFailure:!1}}}(window,window.HRZ,window.HRZ.jQuery),window.HRZ=window.HRZ||{},function(a,b,c,d){"use strict";
  2405. b.html5Errors={adultCredentialVerification_invalid:{description:"The adult credential has been locked out after too many failed attempts",commonCode:b.ErrorCode.LICENSE_ADULT_PIN_NOT_VERIFIED},adultCredentialVerification_prohibited:{description:"The adult credential must be verified to continue playback",commonCode:b.ErrorCode.LICENSE_ADULT_PIN_NOT_VERIFIED},adultCredentialVerification:{description:"adultCredentialVerification",commonCode:b.ErrorCode.LICENSE_ADULT_PIN_NOT_VERIFIED},parentalCredentialVerification:{description:"This means that the parental credential must be verified",commonCode:b.ErrorCode.LICENSE_PARENTAL_PIN_NOT_VERIFIED},concurrency:{description:"The license could not be acquired because the number of concurrent linear or VOD streams would be exceeded according to OESP rules",commonCode:b.ErrorCode.LICENSE_CONCURRENT_HB_FAILURE},ipAddress_mandatory:{description:"The customer's IP address was not found.",commonCode:b.ErrorCode.LICENSE_NOT_AUTHORISED},ipAddress_prohibited:{description:"The customer has exceeded the number of IP address switches allowed.",commonCode:b.ErrorCode.LICENSE_NOT_AUTHORISED},ipAddress:{description:"Problems with the customer's IP address",commonCode:b.ErrorCode.LICENSE_NOT_AUTHORISED},contentLocator_invalid:{description:"No media could be found for the content locator.",commonCode:b.ErrorCode.LICENSE_INVALID_CHANNEL_ID},contentLocator_prohibited:{description:"The user is not allowed access to this content, i.e. is not entitled",commonCode:b.ErrorCode.LICENSE_USER_NOT_ENTITLED},contentLocator:{description:"No media could be found for the content locator.",commonCode:b.ErrorCode.LICENSE_INVALID_CHANNEL_ID},token:{description:"The token is invalid. This is deliberately obscure for security purposes but this includes HMAC tampering, an unknown token or an invalid streaming session ID.",commonCode:b.ErrorCode.LICENSE_NOT_AUTHORISED},license:{description:"The license could not be acquired (i.e. an error was encountered during the Irdeto calls.)",commonCode:b.ErrorCode.LICENSE_SYSTEM_ERROR},"X-OESP-DRM-SchemeIdUri":{description:"The Content Protection Scheme URI is unknown.",commonCode:b.ErrorCode.LICENSE_NOT_AUTHORISED},blackout:{description:"A blackout error code from the OESP upon performing a blackout",commonCode:b.ErrorCode.LINEAR_BLACKOUT_OCCURRED},deviceUnregistered:{description:"Device not registered but registrations are allowed",commonCode:b.ErrorCode.DEVICE_REGISTRATION_ERROR},unknownDevice:{description:"Device not registered and registration is not possible because the back-end did not return a license",commonCode:b.ErrorCode.DEVICE_REGISTRATION_ERROR},deviceUnregisteredDeviceLimitReached:{description:"Device not registered and device limit has been reached",commonCode:b.ErrorCode.DEVICE_REGISTRATION_ERROR},deviceUnregisteredActionLimitReached:{description:"Device not registered and (add) action limit has been reached",commonCode:b.ErrorCode.DEVICE_REGISTRATION_ERROR}}}(window,window.HRZ,window.HRZ.jQuery),window.HRZ=window.HRZ||{},function(a,b,c,d){"use strict";
  2406. function e(a){var c=this;
  2407. this._isReplayMode=a.isReplayMode,this._isLive=a.isLive,this._isInStartOverMode=!1,b.Mediator.on("video:stateChange",function(a){var b="",d=c.time;
  2408. switch(a){case"paused":b="paused";
  2409. break;
  2410. case"playing":b="playing";
  2411. break;
  2412. case"complete":b="stopped",d=0}c._setBookmark(b,d)}),b.Mediator.on("video:timeupdate",function(a){c.time=0,"number"==typeof a&&(c.time=Math.floor(1e3*a))}),b.Mediator.on("manifest:onLoading",function(a){c.videoId=a.videoId,c.mediaType=a.metadataInitial.mediaType||"",c._prevBookmark=null,c._playingFired=!1}),b.Mediator.on("bookmarks:setAsWatched",function(){c._setBookmark("stopped",0)}),b.Mediator.on("channelsModel:replayManifestLoading",function(){c._isInStartOverMode=!0}),b.Mediator.on("channelsModel:liveManifestLoading",function(){c._isInStartOverMode=!1}),b.Mediator.on("bookmarks:timeInWatchedRange",function(){c._prevBookmark=null})}b.Mediator=b.Mediator||new a.Mediator,e.prototype._setBookmark=function(a,c){if(!this._playingFired&&"playing"===a)return void(this._playingFired=!0);
  2413. if(a&&this._playingFired===!0&&this.time&&this.mediaType&&"trailer"!==this.mediaType.toLowerCase()&&"preview"!==this.mediaType.toLowerCase()&&this._canSetBookmark()){var d=this.videoId,e=null;
  2414. this._isReplayMode!==!0&&this._isInStartOverMode!==!0||(e=this.videoId,d=null),b.data.setBookmark(a,c,d,e),b.Mediator.publish("public:bookmarked",{playState:a,offset:c,videoId:d,listingId:e}),this._prevBookmark={playState:a,videoId:this.videoId}}},e.prototype._canSetBookmark=function(){var a=!0;
  2415. return this._prevBookmark&&"stopped"===this._prevBookmark.playState&&this._prevBookmark.videoId===this.videoId&&(a=!1),this._isLive===!0&&(a=!1),this._isInStartOverMode===!0&&(a=!0),a},e.prototype.destroy=function(){b.Mediator.off("video:stateChange"),b.Mediator.off("video:timeupdate"),b.Mediator.off("manifest:onLoading"),b.Mediator.off("bookmarks:setAsWatched"),b.Mediator.off("bookmarks:timeInWatchedRange")},b.Mediator.on("bookmarks:create",function(a){b.bookmarksController=new e(a),b.Mediator.once("destroy",function(){b.bookmarksController&&b.bookmarksController.destroy(),b.bookmarksController=null})})}(window,window.HRZ,window.HRZ.jQuery),function(a,b,c,d){"use strict";
  2416. function e(a,d){this._player=d,this.ready=c.Deferred();
  2417. var e=b.utils.getConvivaSettingsByLivePassMode(a);
  2418. return this.settings=e,e.customerId?(this.bindEvents(),this.instantiateInterfaces(),void this.ready.resolve()):(this._isDisabled=!0,void this.ready.resolve())}b.Mediator=b.Mediator||new a.Mediator;
  2419. var f,g="MPEG-DASH",h="VELOCIX";
  2420. e.prototype.instantiateInterfaces=function(){var c=b.namespace("HRZ.conviva.interfaces");
  2421. f=a.Conviva;
  2422. var d=new f.SystemInterface(new c.time,new c.timer,new c.HTTP,new c.storage,new c.metadata,new c.logging),e=new f.SystemSettings;
  2423. this.systemFactory=new f.SystemFactory(d,e),this.clientSettings=new f.ClientSettings(this.settings.customerId),this.settings.serviceUrl&&(this.clientSettings.gatewayUrl=this.settings.serviceUrl)},e.prototype.onReady=function(){return this.ready.promise()},e.prototype.bindEvents=function(){b.Mediator.subscribe("Conviva:trackvideo",this.createSession,{},this),b.Mediator.subscribe("video:bitratechanged",this.bitRateChanged,{},this),b.Mediator.subscribe("video:buffering",this.setPlayerState,{},this),b.Mediator.subscribe("video:stateChange",this.setPlayerState,{},this)},e.prototype.createSession=function(a){if(this._isDisabled!==!0){this.cleanup(),this.client=new f.Client(this.clientSettings,this.systemFactory);
  2424. var b=this.createMeta(a),c=this.client.createSession(b);
  2425. c!==f.Client.NO_SESSION_KEY&&(this.sessionKey=c,this.playerStateManager=this.client.getPlayerStateManager(),this.client.attachPlayer(c,this.playerStateManager),this.playerStateManager.setPlayerType(this.playerType))}},e.prototype.createMeta=function(a){var c=new f.ContentMetadata;
  2426. if(c.custom={},a.metadataInitial.stationId?(this.playerType="LIVE",c.assetName="["+a.metadataInitial.stationId+"] "+a.metadataInitial.title,c.streamType=f.ContentMetadata.StreamType.LIVE,c.custom.assetName=a.metadataInitial.title,c.custom.channel=a.metadataInitial.title,c.custom.contentId=a.metadataInitial.stationServiceId,c.custom.isLive="true",c.custom.stationId=a.metadataInitial.stationId,c.custom.streamingProtocol=g):(this.playerType="VOD",c.streamType=f.ContentMetadata.StreamType.VOD,c.assetName=a.metadataInitial.title,c.duration=Math.round(a.metadataInitial.duration/1e3)),c.custom.playerVersion=b.config.Version,c.streamUrl=a.manifest,c.StreamType=this.playerType,c.defaultResource=h,b.user){c.viewerId=b.user.trackingId,c.custom.affiliate=b.user.countryCode;
  2427. var d="";
  2428. b.user.parentalPinVerified===!0?d="parental":b.user.adultPinVerified===!0&&(d="adult"),d&&(c.custom.pinEntered=d)}return c},e.prototype.setPlayerState=function(a){switch(a){case"buffering":this.playerStateManager&&this.playerStateManager.setPlayerState(f.PlayerStateManager.PlayerState.BUFFERING);
  2429. break;
  2430. case"playing":case"buffered":this.playerStateManager&&this.playerStateManager.setPlayerState(f.PlayerStateManager.PlayerState.PLAYING);
  2431. break;
  2432. case"stopped":this.playerStateManager&&this.playerStateManager.setPlayerState(f.PlayerStateManager.PlayerState.STOPPED);
  2433. break;
  2434. case"paused":this.playerStateManager&&this.playerStateManager.setPlayerState(f.PlayerStateManager.PlayerState.PAUSED);
  2435. break;
  2436. default:this.playerStateManager&&this.playerStateManager.setPlayerState(f.PlayerStateManager.PlayerState.UNKNOWN)}},e.prototype.bitRateChanged=function(a){a=Math.round(a/1024),this.playerStateManager&&this.playerStateManager.setBitrateKbps(a)},e.prototype.destroy=function(){this.cleanup(),this.client.release(),this.client=d,this.systemFactory.release(),this.systemFactory=d},e.prototype.cleanup=function(){this.client&&this.client.cleanupSession(this.sessionKey),this.sessionKey=d,this.client&&this.client.releasePlayerStateManager(this.playerStateManager),this.playerStateManager=d},e.prototype.reportError=function(a){a&&this.playerStateManager&&this.playerStateManager.sendError(a,f.Client.ErrorSeverity.FATAL)},e.prototype.sendMidStreamError=function(a){this.client&&this.client.sendCustomEvent(this.sessionKey||f.Client.NO_SESSION_KEY,a.eventName+" - "+a.errorCode)},b.ConvivaStatistics=e}(window,window.HRZ,window.HRZ.jQuery),window.HRZ=window.HRZ||{},function(a,b,c,d,e){"use strict";
  2437. function f(a,c){this._licenseTokenInterval=null,this._licenseTokenTimeout=null,this._licenseTokenExpirationTime=null,this._convivaInitializationFailedEventPublished=!1,this._onPlayerMediaErrorInterval=null,this._currentSubsLang=null,this._currentSubsModel=null,this._currentData=null,this._buffering=!1,this._estimator=e,this._rangeEnd=e,this._hbTimePlayed=e,b._splashScreenLoaded=!1,this._element=a,this._isPlayReady=b.utils.browser().name===b.constants.BROWSER.Edge,this._enableMonitoringMode=b.utils.getValueFromUrlOrCookie(b.constants.CUSTOM_URL_PARAM.ENABLE_MONITORING)===!0,this._render(c),b.Conviva||(b.Conviva=new b.ConvivaStatistics(c.livePassMode,this)),this._initShakaPlayer(),this._bindEvents()}b.Mediator=b.Mediator||new a.Mediator,f.prototype._initShakaPlayer=function(c){d.polyfill.installAll(),this._player=new d.player.Player(this._nodes._video),b.DisableAdaptation===!0&&this._player.enableAdaptation(!1),b.CustomParams.EnableVerboseMode===!0&&d.log.setLevel(d.log.Level.V1),a.setTimeout(function(){b.Mediator.publish("playback:ready")},0)},f.prototype._render=function(c){var d=a.hrz.views["player/views/video.mustache"].render({autoplay:b.utils.isTrue(c.autoPlay),width:c.width,height:c.height,enableMonitoringMode:this._enableMonitoringMode});
  2438. this._element.html(d),this._nodes={},this._nodes.video=this._element.find("video"),this._nodes._video=this._element.find("video")[0],this._nodes.monitoring=this._element.find(".hrz-player-video-monitoring")},f.prototype._bindEvents=function(c){var d=this;
  2439. this._nodes.video.on("timeupdate",function(a){b.Mediator.publish("video:timeupdate",a.target.currentTime),d._checkForBandwidthChanged()}).on("durationchange",function(a){var c=a.target.duration;
  2440. c&&b.Mediator.publish("video:durationchange",c)}).on("play",function(a){d._buffering!==!0&&(b.Mediator.publish("video:buffering","buffered"),b.Mediator.publish("video:stateChange","playing"),d._hbTimePlayed===e&&d._exposeHb(!0,0))}).on("pause",function(a){d._buffering!==!0&&b.Mediator.publish("video:stateChange","paused")}).on("timeupdate",function(c){var f,g,h=d._nodes._video.currentTime,i=a.HRZ_SegmentsMap,j=i?Object.keys(i):e;
  2441. if(j&&j.length){for(g=0;
  2442. g<j.length;
  2443. g++){var k=j[g],l=i[k];
  2444. if(l.startTime<h&&l.endTime>h){if(f=k,d._currentSubsModel&&d._currentSubsModel[d._currentSubsLang]){var m=d._currentSubsModel[d._currentSubsLang].subs[l.segmentNumber];
  2445. m&&b.Mediator.publish("video:captionLoaded",{type:"text",value:m})}break}}if(f)for(g=0;
  2446. g<j.length;
  2447. g++)j[g]<f&&delete i[j[g]]}}).on("loadeddata",function(a){b.Mediator.publish("video:loaded"),d._getAudioTracks(),b._splashScreenLoaded=!0}),this._player.addEventListener("error",this._onShakaError.bind(this)),this._player.addEventListener("bufferingStart",this._onShakaBuffering.bind(this,!0)),this._player.addEventListener("bufferingEnd",this._onShakaBuffering.bind(this,!1))},f.prototype._checkForBandwidthChanged=function(){var a=this._player.getStats().streamStats?this._player.getStats().streamStats.videoBandwidth:0;
  2448. this._enableMonitoringMode===!0&&this._nodes.monitoring.html("Current bandwidth: "+a),a!==this._currentBandwidth&&(this._currentBandwidth=a,b.Mediator.publish("video:bitratechanged",a))},f.prototype._getAudioTracks=function(){var a,c,d=[],e=[],f=[];
  2449. d.push(e),d.push(f);
  2450. var g=this._player.getAudioTracks();
  2451. if(g.length>1)for(a=0;
  2452. a<g.length;
  2453. a++)c=g[a].lang,c&&"unknown"!==c&&(c=c.toLowerCase(),e.push(c));
  2454. this._currentSubsModel={};
  2455. var h=this._player.getApplicationTracks();
  2456. for(a=0;
  2457. a<h.length;
  2458. a++){var i=h[a];
  2459. c=i.lang,c&&"unknown"!==c&&(c=c.toLowerCase(),this._currentSubsModel[c]={id:i.id,subs:{}},f.push(c))}b.Mediator.publish("video:audioLangsAndSubtitles",d)},f.prototype._onShakaError=function(a){if(a.detail&&a.detail.url&&a.detail.url.indexOf("license/eme")>=0){var c=new DataView(a.detail.xhr.response),d=new TextDecoder("utf-8"),e=d.decode(c);
  2460. if(e)return void b.Mediator.publish("error:oesp",e,a.detail.xhr)}var f=!0;
  2461. return this._nodes.video[0].paused!==!1?void this._setOnPlayerMediaErrorInterval(a):(f=!1,void this._publishPlayerMediaError(!1,a))},f.prototype._publishPlayerMediaError=function(a,c){a===e&&(a=!0),b.Mediator.publish("error:html5",{errorCode:b.ErrorCode.PLAYER_MEDIA_ERROR,eventDescription:c.detail?c.detail.message:null,causedPlaybackFailure:a})},f.prototype._setOnPlayerMediaErrorInterval=function(c){null===this._onPlayerMediaErrorInterval&&(this._onPlayerMediaErrorIntervalCount=0,this._onPlayerMediaErrorInterval=a.setInterval(function(){this._nodes.video[0].paused===!1?(this._onPlayerMediaErrorInterval&&a.clearInterval(this._onPlayerMediaErrorInterval),this._onPlayerMediaErrorInterval=null,this._onPlayerMediaErrorIntervalCount=0,this._publishPlayerMediaError(!1,c)):this._onPlayerMediaErrorIntervalCount++,this._onPlayerMediaErrorIntervalCount>=4&&(this._publishPlayerMediaError(!0,c),this._onPlayerMediaErrorInterval&&a.clearInterval(this._onPlayerMediaErrorInterval),this._onPlayerMediaErrorInterval=null)}.bind(this),b.constants.MAGIC_NUMBER.PLAYER_MEDIA_ERROR_INTERVAL_TIME))},f.prototype._onShakaBuffering=function(a){var c="";
  2462. this._buffering=a===!0,this._buffering&&(c="buffering"),b.Mediator.publish("video:buffering",c)},f.prototype._licenseResponsePostPreprocessor=function(a){var c=d.util.Uint8ArrayUtils;
  2463. c.toString(a);
  2464. return console.log("shaka response stream length: "+a.length),!b._splashScreenLoaded&&b.Mediator.publish("video:downloadProgress",80),a},f.prototype._licenseRequestPreprocessor=function(a){a.headers[b.constants.oespHeader.X_OESP_TOKEN]=b.user.oespToken,a.headers[b.constants.oespHeader.X_OESP_USERNAME]=b.user.username,a.headers[b.constants.oespHeader.X_OESP_DRM_SCHEMEIDURI]=b.constants.DRM_UUID_CODE.WIDEVINE,a.headers[b.constants.oespHeader.X_OESP_LICENSE_TOKEN]=b.user.licenseToken,b.currentContentLocator&&(a.headers[b.constants.oespHeader.X_OESP_CONTENT_LOCATOR]=b.currentContentLocator)},f.prototype._interpretContentProtection=function(a,c){return a.toLowerCase()===b.constants.DRM_UUID_CODE.WIDEVINE?[{keySystem:b.constants.DRM_KEY_SYSTEM.WIDEVINE,licenseServerUrl:b.CustomLicenseServerUrl?b.CustomLicenseServerUrl:b.config.apiUrl+"license/eme",licensePreProcessor:b.CustomLicenseServerUrl?null:this._licenseRequestPreprocessor,licensePostProcessor:this._licenseResponsePostPreprocessor}]:(a.toLowerCase()===b.constants.DRM_UUID_CODE.GENERIC_CENC_IDENTIFIER,null)},f.prototype.loadManifest=function(c){var d=this;
  2465. this._currentData=c,!b._splashScreenLoaded&&b.Mediator.publish("video:downloadProgress",20),this._subsForBufferedChunksWereProcessed=!1,this.stop().done(function(){!b._splashScreenLoaded&&b.Mediator.publish("video:downloadProgress",40),c.contentLocator!==b.currentContentLocator&&(b.user&&(b.user.licenseToken=e),this._currentSubsModel=null,a.HRZ_SegmentsMap=e),d._hbTimePlayed=e,this._clearLicenseTokenExpiration(),b._splashScreenLoaded&&b.Mediator.publish("video:buffering","buffering"),b.Conviva.onReady().always(function(){b.currentContentLocator=c.contentLocator,b.CustomLicenseServerUrl&&b.UseLicenseTokenInManifest!==!0?this._initVideoSource(c):this._getLicenseToken().done(function(a,e){!b._splashScreenLoaded&&b.Mediator.publish("video:downloadProgress",70),b.user.licenseToken=a,d._initVideoSource(c),d._setUpdateLicenseTokenInterval(e)}),b.Mediator.publish("Conviva:trackvideo",c)}.bind(this)).fail(function(){this._convivaInitializationFailedEventPublished!==!0&&(b.Mediator.publish("error:conviva"),this._convivaInitializationFailedEventPublished=!0)}.bind(this))}.bind(this))},f.prototype._initVideoSource=function(a){var c=this;
  2466. this._estimator=this._estimator||new d.util.EWMABandwidthEstimator;
  2467.  
  2468. var f=a.manifest;
  2469. b.UseLicenseTokenInManifest===!0&&(f=b.utils.addTokenToManifest(a.manifest,b.constants.MAGIC_NUMBER.PLACE_FOR_LT)),this._rangeEnd=e;
  2470. var g=new d.player.DashVideoSource(f,this._interpretContentProtection.bind(this),this._estimator);
  2471. this._source=g,this._player.addEventListener("seekrangechanged",function(a){c._rangeEnd=a.end}),g.setNetworkCallback(function(a){var d=a.replace(b.constants.MAGIC_NUMBER.PLACE_FOR_LT,b.user.licenseToken);
  2472. if(c._currentSubsLang){var e=c._parseIndexFromUrl(d);
  2473. e&&(c._getNetworkSubsByUrl(d,e),c._subsForBufferedChunksWereProcessed||(c._subsForBufferedChunksWereProcessed=!0,c._getSubsForBufferedChunks(d,e)))}return d}),this._player.load(g)},f.prototype._getSubsForBufferedChunks=function(b,c){c=c||this._parseIndexFromUrl(b);
  2474. var d=a.HRZ_SegmentsMap?Object.keys(a.HRZ_SegmentsMap):e;
  2475. if(c&&d&&d.length)for(var f=d.length-1;
  2476. f>=0;
  2477. f--){var g=d[f];
  2478. if(a.parseInt(g)===c){for(var h=1;
  2479. 10>=h;
  2480. h++)this._getNetworkSubsByUrl(b.replace(c,c-h));
  2481. break}}},f.prototype._parseIndexFromUrl=function(b){var c;
  2482. if(b&&b.indexOf(".m4s")>=0){var d=b.substring(b.lastIndexOf("/")+1,b.lastIndexOf(".m4s"));
  2483. d=a.parseInt(d),a.isNaN(d)===!1&&(c=d)}return c},f.prototype._getNetworkSubsByUrl=function(a,b){if(b=b||this._parseIndexFromUrl(a),b&&this._currentSubsModel&&this._currentSubsModel[this._currentSubsLang]&&this._currentSubsModel[this._currentSubsLang].subs[b]===e){a=a.replace("/"+b+".m4s",""),a=a.substring(0,a.lastIndexOf("/")),a=a+"/"+this._currentSubsModel[this._currentSubsLang].id+"/"+b+".m4s";
  2484. var c=new XMLHttpRequest;
  2485. c.open("GET",a,!0),c.responseType="arraybuffer",c.addEventListener("load",function(){if(200===c.status&&this._currentSubsModel&&this._currentSubsModel[this._currentSubsLang]){var a=this._currentSubsModel[this._currentSubsLang].subs;
  2486. if(a){var d=String.fromCharCode.apply(null,new Uint8Array(c.response||""));
  2487. if(d){var e=this._getSubsFromResponse(d);
  2488. e&&(a[b]=e)}}}}.bind(this)),c.send()}},f.prototype._getSubsFromResponse=function(a){var b="";
  2489. if(!a)return b;
  2490. var c=a.split("payl");
  2491. if(c.length>1){for(var d=1;
  2492. d<c.length-1;
  2493. d++){var e=c[d].split("vtt");
  2494. e.length>1&&(c[d]=e[0])}c.splice(0,1),b=c.join("<br/>")}return b},f.prototype._exposeHb=function(a,c){this._hbTimePlayed===e&&(this._hbTimePlayed=0),this._hbTimePlayed+=c!==e?c:this._licenseTokenExpirationTime||b.constants.defaults.UPDATE_TOKEN_INTERVAL_TIME,a!==!0&&this.playing()!==!0||b.Mediator.publish("linearHb",{timePlayed:this._hbTimePlayed/1e3})},f.prototype._setUpdateLicenseTokenInterval=function(c){this._licenseTokenInterval&&a.clearInterval(this._licenseTokenInterval),this._licenseTokenExpirationTime=c||b.constants.defaults.UPDATE_TOKEN_INTERVAL_TIME,this._licenseTokenInterval=a.setInterval(function(){this._getLicenseToken().done(function(a){b.user.licenseToken=a,this._exposeHb()}.bind(this))}.bind(this),this._licenseTokenExpirationTime)},f.prototype._getLicenseToken=function(){var a=c.Deferred();
  2495. return b.data.licenseToken({contentLocator:b.currentContentLocator,licenseToken:b.user.licenseToken}).done(function(b){a.resolve(b.token,b.interval)}).fail(function(c){b.Mediator.publish("error:oesp",c),a.reject()}),a.promise()},f.prototype._setLicenseTokenExpiration=function(){this._licenseTokenTimeout&&a.clearTimeout(this._licenseTokenTimeout),this._licenseTokenTimeout=a.setTimeout(function(){b.user&&(b.user.licenseToken=e)},this._licenseTokenExpirationTime||b.constants.defaults.UPDATE_TOKEN_INTERVAL_TIME)},f.prototype._clearLicenseTokenExpiration=function(){this._licenseTokenTimeout&&a.clearTimeout(this._licenseTokenTimeout)},f.prototype.play=function(){this._rangeEnd&&(this._nodes._video.currentTime=this._rangeEnd),this._nodes._video.play()},f.prototype.playFrom=function(a){this._nodes._video.currentTime=a},f.prototype.pause=function(){this._nodes._video.pause()},f.prototype.stop=function(){this._player&&(this._unloadedPromise=this._player.unload()),this._unloadedPromise?this._unloadedPromise.then(function(){b.resolve()}):b.resolve(),this._licenseTokenInterval&&a.clearInterval(this._licenseTokenInterval),this._licenseTokenInterval=null,this._onPlayerMediaErrorInterval&&a.clearInterval(this._onPlayerMediaErrorInterval),this._onPlayerMediaErrorInterval=null,this._setLicenseTokenExpiration();
  2496. var b=c.Deferred();
  2497. return b.promise()},f.prototype.volume=function(a){return a!==e&&(this._nodes._video.volume=a),this._nodes._video.volume},f.prototype.playing=function(){return this._nodes._video.paused!==!0},f.prototype.getPosition=function(){return this._nodes._video.currentTime},f.prototype.switchAudioLang=function(a){for(var b=this._player.getAudioTracks(),c=0;
  2498. c<b.length;
  2499. c++){var d=b[c].lang;
  2500. if(d&&d.toLowerCase()===a){this._player.selectAudioTrack(b[c].id);
  2501. break}}},f.prototype.switchSubs=function(a){a&&this._currentSubsModel&&this._currentSubsModel[a]?(this._currentSubsLang=a,this._subsForBufferedChunksWereProcessed=!1):this._currentSubsLang=null},f.prototype.sendMidStreamError=function(a){b.Conviva.sendMidStreamError(a)},f.prototype.destroy=function(){this._licenseTokenInterval&&a.clearInterval(this._licenseTokenInterval),this._licenseTokenInterval=null,this._onPlayerMediaErrorInterval&&a.clearInterval(this._onPlayerMediaErrorInterval),this._onPlayerMediaErrorInterval=null,this._clearLicenseTokenExpiration(),b.user&&(b.user.licenseToken=e),b.Conviva&&b.Conviva.destroy(),this._player&&this._player.destroy(),this._estimator=e,this._rangeEnd=e},b.Video=f}(window,window.HRZ,window.HRZ.jQuery,window.shaka),window.HRZ=window.HRZ||{},function(a,b,c,d){"use strict";
  2502. function e(c,d){this.render(c,d),a.silverlightEventsHandler=new b.SilverlightEventsHandler}b.Mediator=b.Mediator||new a.Mediator,e.prototype.render=function(d,e){function f(a){h.onSilverlightLoad(a,n)}function g(a,b){h.onSilverlightError(a,b)}var h=this,i=c('script[src*="/hrzPlayer.js"]')[0].src,j=i.replace("hrzPlayer.js","silverlight/Orion.Host.xap");
  2503. e.OESPBaseUrl=e.baseUrl;
  2504. var k=this.getParamsString(e),l={width:e.width,height:e.height,background:"transparent",version:"5.0.61118.0",windowless:"true"},m=b.utils.isTrue(b.utils.UrlParams[b.constants.CUSTOM_URL_PARAM.ENABLE_MONITORING]);
  2505. m===!0&&(l.enableGPUAcceleration="true"),l.onSourceDownloadProgressChanged="sl_onSourceDownloadProgressChanged",l.onsourcedownloadcomplete="sl_onsourcedownloadcomplete";
  2506. var n="sl-player-object-"+Date.now();
  2507. a.Silverlight.createObject(j,d[0],n,l,{onError:g,onLoad:f},k,"context")},e.prototype.getParamsString=function(a){var c=[];
  2508. b.user.oespToken&&c.push("authToken="+b.user.oespToken),b.user.username&&c.push("OESPUsername="+b.user.username),b.user.trackingId&&c.push("trackingId="+b.user.trackingId),c.push("width="+(a.width||"100%")),c.push("height="+(a.height||"100%"));
  2509. for(var d=["playerMode","OESPBaseUrl","countryCode","languageCode","autoPlay","logLevel","listingsInterval","bufferReportingPeriod","bufferReportingRepeat","errorDelay","bufferReloadTime"],e=0;
  2510. e<d.length;
  2511. e++){var f=d[e];
  2512. c.push(f+"="+(a[f]?a[f]:""))}var g=b.utils.getConvivaSettingsByLivePassMode(a.livePassMode);
  2513. return g.serviceUrl&&(c.push("convivaServiceUrl="+g.serviceUrl),c.push("convivaCustomerId="+g.customerId)),c.push("playerLoadedCallback=slPlayerLoaded"),c.push("errorCallback=onErrorOccurred"),c.push("debugCallback=onDebug"),c.join(",")},e.prototype.onSilverlightError=function(b,c){if(c){if(c.ErrorMessage)return void a.silverlightEventsHandler.publish("error:silverlight",{eventCode:c.ErrorCode,eventDescription:c.ErrorType,eventDetails:c.ErrorMessage,causedPlaybackFailure:!0});
  2514. a.silverlightEventsHandler.publish("error:silverlight",c)}},e.prototype.onSilverlightLoad=function(b,c){var d=b.getHost()||document.getElementById(c);
  2515. this.orionPlayer=d.Content.OrionPlayer,this.bindSilverlightEvents(),a.silverlightEventsHandler.publish("playback:ready")},e.prototype.bindSilverlightEvents=function(){a.silverlightEventsHandler.setup(this.orionPlayer)},e.prototype.loadManifest=function(a){this.orionPlayer.loadManifest(a.manifest,a.contentId,a.videoId,a.channelId,a.metadata)},e.prototype.loadVideo=function(a){this.orionPlayer.loadVideo(a)},e.prototype.loadChannel=function(a){this.orionPlayer.loadChannel(a)},e.prototype.play=function(){this.orionPlayer.playVideo()},e.prototype.playFrom=function(a){this.orionPlayer.playFrom(a)},e.prototype.pause=function(){this.orionPlayer.pauseVideo()},e.prototype.stop=function(){this.orionPlayer.stopVideo()},e.prototype.restart=function(){this.orionPlayer.restart()},e.prototype.getDuration=function(){return this.orionPlayer.getDuration()},e.prototype.getPosition=function(){return this.orionPlayer.getPosition()},e.prototype.volume=function(a){return a!==d&&""!==a||(a=123),this.orionPlayer?this.orionPlayer.volume(a):void 0},e.prototype.playing=function(){return this.orionPlayer.playing()},e.prototype.getDeviceId=function(){return this.orionPlayer.getDeviceId()},e.prototype.switchAudioLang=function(a){this.orionPlayer.sendMessage("switchAudioLang",a)},e.prototype.switchSubs=function(a){this.orionPlayer.sendMessage("switchSubs",a)},e.prototype.getSilverlightVersion=function(){return this.orionPlayer.getSilverlightVersion()},e.prototype.sendMidStreamError=function(a){this.orionPlayer.sendMidStreamError(a.eventName,a.appName,a.errorCode,a.category,a.contentId)},b.SilverlightVideo=e}(window,window.HRZ,window.HRZ.jQuery),window.HRZ=window.HRZ||{},function(a,b,c){"use strict";
  2516. function d(){this.slEvents=["assetLoaded","assetReady","contentStart","contentEnd","stateChange","adultListing","deviceIdAvailable","vodHb","linearHb","linearBuffering","captionLoaded","timeupdate","durationchange","buffering","exposedMessage"]}b.Mediator=b.Mediator||new a.Mediator,d.prototype.setup=function(a){for(var b=0;
  2517. b<this.slEvents.length;
  2518. b++){var c=this.slEvents[b],d="sl_"+c;
  2519. a.addListener(c,d)}},d.prototype.publish=function(a,c){b.Mediator.publish(a,c)},b.SilverlightEventsHandler=d,a.onErrorOccurred=function(b){a.silverlightEventsHandler.publish("error:silverlight",b)},a.sl_assetLoaded=function(b){a.silverlightEventsHandler.publish("video:loaded")},a.sl_assetReady=function(b){a.silverlightEventsHandler.publish("assetReady",b)},a.sl_contentStart=function(b){a.silverlightEventsHandler.publish("contentStart",b),a.silverlightEventsHandler.publish("video.contentStart")},a.sl_contentEnd=function(b){a.silverlightEventsHandler.publish("contentEnd",b)},a.sl_stateChange=function(b){a.silverlightEventsHandler.publish("video:stateChange",b.state)},a.sl_adultListing=function(b){a.silverlightEventsHandler.publish("adultListing",b)},a.sl_deviceIdAvailable=function(b){a.silverlightEventsHandler.publish("deviceIdAvailable",b)},a.sl_vodHb=function(b){a.silverlightEventsHandler.publish("vodHb",b)},a.sl_linearHb=function(b){a.silverlightEventsHandler.publish("linearHb",b)},a.sl_linearBuffering=function(b){a.silverlightEventsHandler.publish("linearBuffering",b)},a.sl_captionLoaded=function(b){a.silverlightEventsHandler.publish("captionLoaded",b),a.silverlightEventsHandler.publish("video:captionLoaded",b.caption)},a.sl_timeupdate=function(b){a.silverlightEventsHandler.publish("video:timeupdate",b.currentTime)},a.sl_durationchange=function(b){a.silverlightEventsHandler.publish("video:durationchange",b.duration)},a.sl_buffering=function(b){a.silverlightEventsHandler.publish("video:buffering",b.state)},a.sl_exposedMessage=function(a){switch(a.message){case"audioLangsAndSubtitles":var c=JSON.parse(a.JSON);
  2520. b.Mediator.publish("video:audioLangsAndSubtitles",c)}},a.sl_onSourceDownloadProgressChanged=function(a,c){b.Mediator.publish("video:downloadProgress",Math.round(100*c.Progress))},a.sl_onsourcedownloadcomplete=function(a,c){b.Mediator.publish("video:downloadCompleted")}}(window,window.HRZ),window.HRZ=window.HRZ||{},function(a,b,c,d){"use strict";
  2521. var e=b.namespace("HRZ.utils");
  2522. e.GetUrl=function(a){var b=document.createElement("a");
  2523. return b.href=a,{path:b.pathname,protocol:b.protocol,host:b.host}},e.loadCSS=function(){var b=a.document.createElement("style");
  2524. b.type="text/css",b.id="hrz-theme";
  2525. var d=c('script[src*="/hrzPlayer.js"]')[0].src,e=d.replace("hrzPlayer.js","theme-default.css");
  2526. c.get(e,function(c){b.innerHTML=c,b.textContent=c,a.document.head.appendChild(b)})},e.isTrue=function(a){return/^true$/i.test(a)},e.isFalse=function(a){return/^false$/i.test(a)},e.addTokenToManifest=function(a,b){if(a&&b){var c=a.split("/"),d=c.indexOf("dash");
  2527. if(d>=0){var e=d+1;
  2528. c[e]=c[e]+";
  2529. vxttoken="+b,a=c.join("/")}}return a},e.replaceLicenseTokenInUrl=function(a,b){return a&&b?a.replace(/(vxttoken=)(.+?)(?=\/)/,"$1"+b):a},e.browser=function(){var c,d={},e=a.navigator.userAgent.toLowerCase();
  2530. return c=e.indexOf(b.constants.BROWSER.Edge)>=0?b.constants.BROWSER.Edge:e.indexOf(b.constants.BROWSER.Firefox)>=0?b.constants.BROWSER.Firefox:e.indexOf(b.constants.BROWSER.Safari)>=0&&e.indexOf(b.constants.BROWSER.Chrome)<0?b.constants.BROWSER.Safari:a.chrome?b.constants.BROWSER.Chrome:a.opera?b.constants.BROWSER.Opera:b.constants.BROWSER.InternetExplorer,d.name=c,d},e.getConvivaSettingsByLivePassMode=function(a){a=a||"";
  2531. var c,d;
  2532. switch(a.toLowerCase()){case b.constants.LIVE_PASS_MODE.NONE:c=null,d=null;
  2533. break;
  2534. case b.constants.LIVE_PASS_MODE.TOUCHSTONE:c=b.HTML5===!0?b.config.Conviva.SERVICE_URL.TESTONLY:b.config.Conviva.SERVICE_URL.TESTONLY_SL,d=b.HTML5===!0?b.config.Conviva.CUSTOMER_ID.C3_LibertyGlobal_Test:b.config.Conviva.CUSTOMER_ID.C3_LibertyGlobal_Test_SL;
  2535. break;
  2536. case b.constants.LIVE_PASS_MODE.TEST:c=b.HTML5===!0?b.config.Conviva.SERVICE_URL.LIVEPASS:b.config.Conviva.SERVICE_URL.LIVEPASS_SL,d=b.HTML5===!0?b.config.Conviva.CUSTOMER_ID.C3_LibertyGlobal_Test:b.config.Conviva.CUSTOMER_ID.C3_LibertyGlobal_Test_SL;
  2537. break;
  2538. default:c=b.HTML5===!0?b.config.Conviva.SERVICE_URL.LIVEPASS:b.config.Conviva.SERVICE_URL.LIVEPASS_SL,d=b.HTML5===!0?b.config.Conviva.CUSTOMER_ID.C3_LibertyGlobal:b.config.Conviva.CUSTOMER_ID.C3_LibertyGlobal_SL}return{serviceUrl:c,customerId:d}},e.getCookie=function(a){var b=document.cookie.match(new RegExp(a+"=([^;
  2539. ]+)"));
  2540. return b?b[1]:void 0},e.getValueFromUrlOrCookie=function(a){var c=b.utils.UrlParams[a];
  2541. return c||(c=b.utils.getCookie(c)),c&&b.utils.isTrue(c)?c=!0:c&&b.utils.isFalse(c)&&(c=!1),c}}(window,window.HRZ,window.HRZ.jQuery),window.HRZ=window.HRZ||{},function(a,b,c,d){"use strict";
  2542. b.utils=b.utils||{},b.Mediator=b.Mediator||new a.Mediator,b.utils.SecondsToHHMMSS=function(a){var b=Math.floor(a/3600),c=Math.floor((a-3600*b)/60),d=Math.floor(a-3600*b-60*c),e="";
  2543. b>0&&(10>b&&(b="0"+b),e=b+":"),10>c&&(c="0"+c),10>d&&(d="0"+d);
  2544. var f=e+c+":"+d;
  2545. return f},b.utils.TimeToHHMM=function(a){var b=a.getHours(),c=a.getMinutes();
  2546. return 10>b&&(b="0"+b),10>c&&(c="0"+c),b+":"+c};
  2547. var e=function(a){this.setTimeFromResponse(a),b.Mediator.once("destroy",this.destroy,{},this)};
  2548. e.prototype.setTimeFromResponse=function(c){var d=this,e=new Date(c.timestamp);
  2549. this.offset=this._parseOffset(c.offset),this._now=this.newDate(e),this._timeInterval=a.setInterval(function(){d._now.setSeconds(d._now.getSeconds()+1),b.Mediator.publish("timeService:timeupdate",d._now)},1e3)},e.prototype._parseOffset=function(a){var b=0,c=0,d=1;
  2550. return a&&a.length>0&&(d=parseInt(a.substring(0,1)+"1")||1,b=a.substring(1,3)||0,c=a.substring(3,5)||0),{hours:b*d,minutes:c*d}},e.prototype.now=function(){return new Date(this._now)},e.prototype.newDate=function(a){var b=new Date(a);
  2551. return new Date(b.getUTCFullYear(),b.getUTCMonth(),b.getUTCDate(),b.getUTCHours()+this.offset.hours,b.getUTCMinutes()+this.offset.minutes,b.getUTCSeconds(),b.getUTCMilliseconds())},e.prototype.nowUTC=function(){var a=this.now(),b=-a.getTimezoneOffset(),c=b-(60*this.offset.hours+this.offset.minutes);
  2552. return new Date(a.getUTCFullYear(),a.getUTCMonth(),a.getUTCDate(),a.getUTCHours(),a.getUTCMinutes()+b+c,a.getUTCSeconds(),a.getUTCMilliseconds())},e.prototype.destroy=function(b){this._timeInterval&&a.clearInterval(this._timeInterval)},b.utils.InitTimeService=function(a){b.utils.timeService=new e(a)}}(window,window.HRZ,window.HRZ.jQuery),window.HRZ=window.HRZ||{},function(a,b,c,d){"use strict";
  2553. b.utils=b.utils||{};
  2554. var e=function(){var c={};
  2555. a.location.href.replace(/[?&]+([^=&]+)=([^&]*)/gi,function(a,d,e){d===b.constants.CUSTOM_URL_PARAM.MANIFEST&&(e=decodeURIComponent(e)),c[d]=e});
  2556. return c};
  2557. b.utils.UrlParams=e()}(window,window.HRZ,window.HRZ.jQuery),window.HRZ=window.HRZ||{},function(a,b,c,d){"use strict";
  2558. b.utils=b.utils||{},b.utils.ManifestHelper={},b.utils.ManifestHelper._getVodType=function(a){var b="";
  2559. return a.currentVodTypes&&(c.inArray("tvod",a.currentVodTypes)>=0?b="TVOD":c.inArray("svod",a.currentVodTypes)>=0&&(b="SVOD")),b},b.utils.ManifestHelper._getCategoryTag=function(a){var b="";
  2560. return this._myPrimeProviderIds&&this._myPrimeProviderIds.length&&this._myPrimeProviderIds.indexOf(a.providerId)>=0&&(b="My Prime"),!b&&a.isReplayTv===!0&&a.listingId&&(b="Replay"),!b&&a.latestBroadcastStartTime&&(b="Catchup"),b||(b="On Demand"),b},b.utils.ManifestHelper._getGenreTag=function(a){var b="";
  2561. return a.categories&&a.categories.length&&(b=a.categories[0].title),b},b.utils.ManifestHelper._getPubDateTag=function(a){var b="",c={0:"January",1:"February",2:"March",3:"April",4:"May",5:"June",6:"July",7:"August",8:"September",9:"October",10:"November",11:"December"};
  2562. if(a){var d=new Date(a);
  2563. b=c[d.getMonth()]+" "+d.getDate()+", "+d.getFullYear()}return b},b.utils.ManifestHelper.getVodMetadata=function(a){var b={mediaType:a.mediaType,parentalRating:a.parentalRating,title:a.title,isAdult:a.isAdult,providerId:a.providerId,seasonEpisodeNumber:a.seasonEpisodeNumber||a.seriesEpisodeNumber,seasonNumber:a.seasonNumber||a.seriesNumber,secondaryTitle:a.secondaryTitle,vodType:this._getVodType(a),categoryTag:this._getCategoryTag(a),genreTag:this._getGenreTag(a),pubDateTag:this._getPubDateTag(a.availableDate)};
  2564. return b},b.utils.ManifestHelper.getLinearMetadata=function(a){var b={stationId:a.stationId,title:a.title,stationServiceId:a.stationServiceId};
  2565. return this._useScalableLicense===!0&&(b.useScalableLicense=!0),b},b.utils.ManifestHelper.formatMedataForSL=function(a){a=a||{};
  2566. var b=[];
  2567. for(var c in a)a.hasOwnProperty(c)&&b.push({Key:c,Value:a[c]});
  2568. return JSON.stringify(b)},b.utils.ManifestHelper.setScalableLicenseMode=function(a){this._useScalableLicense=b.utils.isTrue(a)},b.utils.ManifestHelper.setMyPrimeProviderIds=function(a){a!==d&&(this._myPrimeProviderIds=a)}}(window,window.HRZ,window.HRZ.jQuery),window.HRZ=window.HRZ||{},function(a,b,c){"use strict";
  2569. b.config={},b.config.prod={apiUrl:"https://web-api2.horizon.tv/oesp/api",posterUrl:"https://www.horizon.tv/etc/designs/orion/upc/nl/img/backgrounds/player_bg.png"},b.config.lab3b={apiUrl:"https://web-api2.horizon.tv/oesp/api",posterUrl:"https://www.horizon.tv/etc/designs/orion/upc/nl/img/backgrounds/player_bg.png"},b.config.dev={apiUrl:"https://web-api2.horizon.tv/oesp/api",posterUrl:"https://www.horizon.tv/etc/designs/orion/upc/nl/img/backgrounds/player_bg.png"},b.config.ClientId="Silverlight1.0.82||"+a.navigator.userAgent,b.config.Conviva={CUSTOMER_ID:{C3_LibertyGlobal:"be43a77aab46b08d647243e0ade3d4ba6506d488",C3_LibertyGlobal_Test:"9e13c48fa88c05e31ab7488167c7bc9cb0d1413b",C3_LibertyGlobal_SL:"c3.Libertyglobal",C3_LibertyGlobal_Test_SL:"c3.Libertyglobal-Test"},SERVICE_URL:{TESTONLY:"https://libertyglobal-test.testonly.conviva.com",LIVEPASS:"",TESTONLY_SL:"https://libertyglobal.testonly.conviva.com",LIVEPASS_SL:"https://livepass.conviva.com"}},b.config.Branch="R",b.config.Version="109.0.0"}(window,window.HRZ),window.HRZ=function(a,b,c){"use strict";
  2570. return{createPlayer:function(a,c){var d=new b.Player(a,c);
  2571. return d},jQuery:b.jQuery,languageCode:b.languageCode,countryCode:b.countryCode,playerMode:b.playerMode,utils:{urlParams:b.utils.UrlParams,isTrue:b.utils.isTrue},data:b.data,ErrorCode:b.ErrorCode,namespace:b.namespace,version:b.config.Version}}(window,window.HRZ);
  2572. var Conviva=Conviva||{};
  2573. !function(){"use strict";
  2574. if("undefined"==typeof Conviva.PrivateLoader){var a=Conviva.PrivateLoader={};
  2575. !function(){var b=a.Client=function(a,f){function h(a,b){if(!(a instanceof c))throw new Error("clientSettings parameter should be an instance of ClientSettings.");
  2576. if(!(b instanceof e))throw new Error("systemFactory parameter should be an instance of SystemFactory.");
  2577. this._settings=a,this._settings.sanitize(),this._systemFactory=b,this._systemFactory.configure("SDK",this._settings),this._exceptionCatcher=this._systemFactory.buildExceptionCatcher(),this._exceptionCatcher.runProtected("Client.init",function(){i._id=J.uinteger32(),i._logger=i._systemFactory.buildLogger(),i._logger.setModuleName("Client"),i._logger.info("init(): url="+i._settings.gatewayUrl+" customerKey="+i._settings.customerKey),i._config=i._systemFactory.buildConfig(),i._config.load(),i._sessionFactory=i._systemFactory.buildSessionFactory(i,i._settings,i._config),i._logger.info("init(): done.")},function(a){throw new Error("Client constructor failed.")})}var i=this;
  2578. this._logger=null,this._sessionFactory=null,this._systemFactory=null,this._globalSessionKey=-1,this._settings=null,this._systemSettings=null,this._exceptionCatcher=null,this._config=null,this._id=-1,this._released=!1,h.apply(this,arguments),this.release=function(){this._released||this._exceptionCatcher.runProtected("Client.release",function(){i._logger.info("release()"),i._sessionFactory.cleanup(),i._sessionFactory=null,i._globalSessionKey=-1,i._logger=null,i._id=-1,i._exceptionCatcher=null,i._settings=null,i._systemSettings=null,i._systemFactory=null,i._released=!0})},this.createSession=function(a){if(!this._released){var c=b.NO_SESSION_KEY;
  2579. return this._exceptionCatcher.runProtected("Client.createSession",function(){c=i._sessionFactory.makeVideoSession(a)}),c}},this.reportError=function(a,b,c){this._released||this._exceptionCatcher.runProtected("Client.reportError",function(){var d=i._sessionFactory.getVideoSession(a);
  2580. null!=d&&d.reportError(b,c)})},this.updateContentMetadata=function(a,b){this._released||this._exceptionCatcher.runProtected("Client.updateContentMetadata",function(){var c=i._sessionFactory.getVideoSession(a);
  2581. null!=c&&c.updateContentMetadata(b)})},this.detachPlayer=function(a){this._released||this._exceptionCatcher.runProtected("Client.detachPlayer",function(){var b=i._sessionFactory.getVideoSession(a);
  2582. null!=b&&b.detachPlayer()})},this.attachPlayer=function(a,b){return this._released?void 0:b instanceof g?void this._exceptionCatcher.runProtected("Client.attachPlayer",function(){var c=i._sessionFactory.getVideoSession(a);
  2583. null!=c&&c.attachPlayer(b)}):void i._logger.error("attachPlayer(): expecting an instance of PlayerStateManager for playerStateManager parameter")},this.contentPreload=function(a){this._released||this._exceptionCatcher.runProtected("Client.contentPreload",function(){var b=i._sessionFactory.getVideoSession(a);
  2584. null!=b&&b.contentPreload()})},this.contentStart=function(a){this._released||this._exceptionCatcher.runProtected("Client.contentStart",function(){var b=i._sessionFactory.getVideoSession(a);
  2585. null!=b&&b.contentStart()})},this.sendCustomEvent=function(a,c,e){this._released||this._exceptionCatcher.runProtected("Client.sendCustomEvent",function(){if(a==b.NO_SESSION_KEY){if(i._globalSessionKey<0){var f=new d;
  2586. i._globalSessionKey=i._sessionFactory.makeGlobalSession(f,null)}a=i._globalSessionKey}var g=null;
  2587. g=G.DictionaryFromRepr(e);
  2588. var h=i._sessionFactory.getSession(a);
  2589. null!=h&&h.sendCustomEvent(c,g)})},this.adStart=function(a,c,d,e){return this._released?void 0:c!==b.AdStream.CONTENT&&c!==b.AdStream.SEPARATE?void this._logger.error("adStart(): ignored, invalid value for adStream parameter: "+c):d!==b.AdPlayer.CONTENT&&d!==b.AdPlayer.SEPARATE?void this._logger.error("adStart(): ignored, invalid value for adPlayer parameter: "+d):e!==b.AdPosition.PREROLL&&e!==b.AdPosition.MIDROLL&&e!==b.AdPosition.POSTROLL?void this._logger.error("adStart(): ignored, invalid value for adPosition parameter: "+e):void this._exceptionCatcher.runProtected("Client.adStart",function(){var b=i._sessionFactory.getVideoSession(a);
  2590. null!=b&&b.adStart(c,d,e)})},this.adEnd=function(a){this._released||this._exceptionCatcher.runProtected("Client.adEnd",function(){var b=i._sessionFactory.getVideoSession(a);
  2591. null!=b&&b.adEnd()})},this.cleanupSession=function(a){this._released||this._exceptionCatcher.runProtected("Client.cleanupSession",function(){var b=i._sessionFactory.getVideoSession(a);
  2592. null!=b&&i._sessionFactory.cleanupSession(a)})},this.getPlayerStateManager=function(){if(this._released)throw new Error("This instance of Conviva.Client has been released.");
  2593. return new g(this._systemFactory)},this.releasePlayerStateManager=function(a){if(this._released)throw new Error("This instance of Conviva.Client has been released.");
  2594. this._exceptionCatcher.runProtected("Client.releasePlayerStateManager",function(){a instanceof g&&a.release()})},this.getSettings=function(){return this._released?void 0:this._settings},this.getId=function(){return this._id}};
  2595. b.version="2.91.0.24548",b.NO_SESSION_KEY=-2,b.AdPosition={PREROLL:"PREROLL",MIDROLL:"MIDROLL",POSTROLL:"POSTROLL"},b.AdStream={CONTENT:"CONTENT",SEPARATE:"SEPARATE"},b.AdPlayer={CONTENT:"CONTENT",SEPARATE:"SEPARATE"},b.ErrorSeverity={FATAL:0,WARNING:1},b.DeviceType={DESKTOP:"DESKTOP",CONSOLE:"Console",SETTOP:"Settop",MOBILE:"Mobile",TABLET:"Tablet",SMARTTV:"SmartTV",UNKNOWN:"Unknown"};
  2596. var c=a.ClientSettings=function(a){function b(a){if(!G.isValidString(a))throw new Error("customerKey must be valid");
  2597. this.customerKey=a}this.customerKey=null,this.heartbeatInterval=c.defaultProductionHeartbeatInterval,this.gatewayUrl=c.defaultProductionGatewayUrl,b.apply(this,arguments),this.sanitize=function(){var a=this.heartbeatInterval;
  2598. if(this.heartbeatInterval=c.defaultProductionHeartbeatInterval,"number"==typeof a){var b=G.NumberToUnsignedInt(a);
  2599. b===a&&(this.heartbeatInterval=b)}var d=this.gatewayUrl;
  2600. this.gatewayUrl=c.defaultProductionGatewayUrl,G.isValidString(d)&&(this.gatewayUrl=d)}};
  2601. c.defaultDevelopmentGatewayUrl="https://testonly.conviva.com",c.defaultProductionGatewayUrl="https://cws.conviva.com",c.defaultDevelopmentHeartbeatInterval=5,c.defaultProductionHeartbeatInterval=20;
  2602. var d=a.ContentMetadata=function(){function a(){return this._custom}function b(a){function b(a){return null!=a&&"undefined"!=a&&"null"!=a&&""!=a}if("object"==typeof a){var c={};
  2603. for(var d in a)if(b(d)){var e=a[d];
  2604. b(e)&&(c[d]=e)}this._custom=c}}function c(){return this._defaultBitrateKbps}function e(a){this._defaultBitrateKbps=g.sanitizeBitrateKbps(a)}function f(){return this._streamType}function h(a){(a===d.StreamType.UNKNOWN||a===d.StreamType.VOD||a===d.StreamType.LIVE)&&(this._streamType=a)}function i(){return this._duration}function j(a){this._duration=K.Integer(a,0,null,-1)}function k(){return this._encodedFrameRate}function l(a){this._encodedFrameRate=K.Integer(a,0,null,-1)}function m(){}this.assetName=null,this._custom={},G.defGet(this,"custom",a),G.defSet(this,"custom",b),this._defaultBitrateKbps=-2,G.defGet(this,"defaultBitrateKbps",c),G.defSet(this,"defaultBitrateKbps",e),this.defaultResource=null,this.viewerId=null,this.applicationName=null,this.streamUrl=null,this._streamType=d.StreamType.UNKNOWN,G.defGet(this,"streamType",f),G.defSet(this,"streamType",h),this._duration=null,G.defGet(this,"duration",i),G.defSet(this,"duration",j),this._encodedFrameRate=-1,G.defGet(this,"encodedFrameRate",k),G.defSet(this,"encodedFrameRate",l),m.apply(this,arguments)};
  2605. d.ConstructClone=function(a){if(null==a)return null;
  2606. var b=new d;
  2607. b.assetName=a.assetName,b.applicationName=a.applicationName,b.streamUrl=a.streamUrl,b.viewerId=a.viewerId,b.defaultBitrateKbps=a.defaultBitrateKbps,b.defaultResource=a.defaultResource,b.streamType=a.streamType,b.duration=a.duration,b.encodedFrameRate=a.encodedFrameRate;
  2608. for(var c in a.custom)b.custom[c]=a.custom[c];
  2609. return b},d.StreamType={UNKNOWN:"UNKNOWN",LIVE:"LIVE",VOD:"VOD"};
  2610. var e=a.SystemFactory=function(a,b){function c(a,b){this._systemInterface=a,this._timeInterface=this._systemInterface._timeInterface,this._timerInterface=this._systemInterface._timerInterface,this._httpInterface=this._systemInterface._httpInterface,this._storageInterface=this._systemInterface._storageInterface,this._metadataInterface=this._systemInterface._metadataInterface,this._loggingInterface=this._systemInterface._loggingInterface,b instanceof f||(b=new f),this._settings=b,this._settings.sanitize()}c.apply(this,arguments),this.configure=function(a,b){this._packageName=a,this._clientSettings=b},this.release=function(){"function"==typeof this._systemInterface.release&&(this._systemInterface.release(),this._systemInterface=null),this._packageName=null,this._settings=null,this._logBuffer=null};
  2611. var d=this,e={build:function(){return new M(d._loggingInterface,d._timeInterface,d.getSettings(),d._logBuffer,d._packageName)}};
  2612. this.buildLogger=function(){return e.build()},this.buildSessionFactory=function(a,b,c){return new u(a,b,c,this)},this.buildPing=function(){return new A(this.buildLogger(),this.buildHttpClient(),this._clientSettings)},this.buildCallbackWithTimeout=function(){return new v(this.buildTimer())},this.buildHttpClient=function(){return new L(this.buildLogger(),this._httpInterface,this.getSettings())},this.buildExceptionCatcher=function(){return new y(this.buildLogger(),this.buildPing(),this.getSettings())},this.buildTime=function(){return new P(this._timeInterface)},this.buildTimer=function(){return new Q(this._timerInterface,this.buildExceptionCatcher())},this.buildStorage=function(){return new N(this._storageInterface)},this.buildConfig=function(){return new w(this.buildLogger(),this.buildStorage(),this.buildJsonInterface(),this.buildCallbackWithTimeout(),this.getSettings())},this.buildSystemMetadata=function(){return new O(this._metadataInterface,this.buildExceptionCatcher())},this.buildProtocol=function(){return new r},this.buildJsonInterface=function(){return new q},this.getLogBuffer=function(){return this._logBuffer},this.getSettings=function(){return this._settings},this._logBuffer=new z},f=a.SystemSettings=function(){function a(){}this.logLevel=f.defaultProductionLogLevel,this.allowUncaughtExceptions=f.defaultProductionAllowUncaughtExceptions,this.storageTimeout=f.defaultStorageTimeout,this.httpTimeout=f.defaultHttpTimeout,a.apply(this,arguments),this.sanitize=function(){var a=this.logLevel;
  2613. if(this.logLevel=f.defaultProductionLogLevel,"number"==typeof a){var b=G.NumberToUnsignedInt(a);
  2614. b===a&&b>=f.LogLevel.DEBUG&&b<=f.LogLevel.ERROR&&(this.logLevel=b)}var c=this.allowUncaughtExceptions;
  2615. this.allowUncaughtExceptions=f.defaultProductionAllowUncaughtExceptions,G.isBoolean(c)&&(this.allowUncaughtExceptions=c);
  2616. var d=this.storageTimeout;
  2617. if(this.storageTimeout=f.defaultStorageTimeout,"number"==typeof d){var e=G.NumberToUnsignedInt(d);
  2618. e===d&&(this.storageTimeout=e)}var g=this.httpTimeout;
  2619. if(this.httpTimeout=f.defaultHttpTimeout,"number"==typeof g){var h=G.NumberToUnsignedInt(g);
  2620. h===g&&(this.httpTimeout=h)}}};
  2621. f.LogLevel={DEBUG:0,INFO:1,WARNING:2,ERROR:3,NONE:4},f.defaultDevelopmentLogLevel=f.LogLevel.DEBUG,f.defaultProductionLogLevel=f.LogLevel.ERROR,f.defaultDevelopmentAllowUncaughtExceptions=!0,f.defaultProductionAllowUncaughtExceptions=!1,f.defaultStorageTimeout=10,f.defaultHttpTimeout=10;
  2622. var g=a.PlayerStateManager=function(a){function b(a){c._systemFactory=a,c._logger=c._systemFactory.buildLogger(),c._logger.setModuleName("PlayerStateManager"),c._exceptionCatcher=c._systemFactory.buildExceptionCatcher()}var c=this;
  2623. c._monitorNotifier=null,c._bitrateKbps=-2,c._playerState=g.PlayerState.UNKNOWN,c._currentMetadata={},c._renderedFrameRate=-1,c._encodedFrameRate=-1,c._duration=-1,c._playerVersion=null,c._playerType=null,c._lastError=null,c._pendingErrors=new H,this.release=function(){c._exceptionCatcher&&c._exceptionCatcher.runProtected("PlayerStateManager.release",function(){c.notifyListeners(s.REASON_RELEASE),c.removeMonitoringNotifier()})},this.getRenderedFrameRate=function(){return c._renderedFrameRate},this.setRenderedFrameRate=function(a){c._exceptionCatcher&&c._exceptionCatcher.runProtected("PlayerStateManager.setRenderedFrameRate",function(){c._renderedFrameRate=K.Integer(a,-1,null,-1)})},this.getEncodedFrameRate=function(){return c._encodedFrameRate;
  2624.  
  2625. },this.setEncodedFrameRate=function(a){c._exceptionCatcher&&c._exceptionCatcher.runProtected("PlayerStateManager.setEncodedFrameRate",function(){c._encodedFrameRate=K.Integer(a,0,null,-1);
  2626. var b={};
  2627. b[s.METADATA_ENCODED_FRAMERATE]=c._encodedFrameRate.toString(),c.setMetadata(b)})},this.getDuration=function(){return c._duration},this.setDuration=function(a){c._exceptionCatcher&&c._exceptionCatcher.runProtected("PlayerStateManager.setDuration",function(){c._duration=K.Integer(a,0,null,-1);
  2628. var b={};
  2629. b[s.METADATA_DURATION]=c._duration.toString(),c.setMetadata(b)})},this.getPlayerType=function(){return c._playerType},this.setPlayerType=function(a){c._playerType=a},this.getPlayerVersion=function(){return c._playerVersion},this.setPlayerVersion=function(a){c._playerVersion=a},this.setMonitoringNotifier=function(a,b){return null!=c._monitorNotifier?!1:(c._monitorNotifier=a,c._logger&&c._logger.setSessionId(b),!0)},this.removeMonitoringNotifier=function(){c._monitorNotifier=null,c._logger&&c._logger.setSessionId(null)},this.pushCurrentState=function(){if(null!=c._monitorNotifier){c.setPlayerState(c.getPlayerState()),c.setBitrateKbps(c.getBitrateKbps()),c.setMetadata(c.getMetadata());
  2630. for(var a=c._pendingErrors.Values(),b=0;
  2631. b<a.length;
  2632. b++){var d=a[b];
  2633. c.setError(d)}c._pendingErrors.Clear()}},this.getPlayerState=function(){return c._playerState},this.setPlayerState=function(a){c._exceptionCatcher&&c._exceptionCatcher.runProtected("PlayerStateManager.setPlayerState",function(){g.isValidPlayerState(a)?(c.notifyListeners(s.REASON_PLAYERSTATECHANGE,a),c._playerState=a):c._logger&&c._logger.error("PlayerStateManager.SetPlayerState(): invalid state: "+a)})},this.getBitrateKbps=function(){return c._bitrateKbps},this.setBitrateKbps=function(a){c._exceptionCatcher&&c._exceptionCatcher.runProtected("PlayerStateManager.setBitrateKbps",function(){var b=g.sanitizeBitrateKbps(a);
  2634. b>=-1&&(c.notifyListeners(s.REASON_BITRATECHANGE,b),c._bitrateKbps=b)})},this.setError=function(a){c._lastError=a,null!=c._monitorNotifier?c.notifyListeners(s.REASON_ERRORCHANGE,c._lastError):c._pendingErrors.Add(c._lastError)},this.sendError=function(a,b){c._exceptionCatcher&&c._exceptionCatcher.runProtected("PlayerStateManager.sendError",function(){var d=new Conviva.PrivateLoader.StreamerError(a,b);
  2635. c.setError(d)})},this.reset=function(){c._exceptionCatcher&&c._exceptionCatcher.runProtected("PlayerStateManager.reset",function(){c._bitrateKbps=-2,c._playerState=g.PlayerState.UNKNOWN,c._currentMetadata={},c._renderedFrameRate=-1,c._encodedFrameRate=-1,c._duration=-1,c._playerVersion=null,c._playerType=null,c._lastError=null,c._pendingErrors=new H})},this.getError=function(){return c._lastError},this.getMetadata=function(){return c._currentMetadata},this.setMetadata=function(a){for(var b in a)c._currentMetadata[b]=a[b];
  2636. c.notifyListeners(s.REASON_METADATACHANGE,c._currentMetadata)},this.log=function(a,b){c._logger&&c._logger.log(a,b)},this.notifyListeners=function(a,b){null!=c._monitorNotifier&&c.notifyListener(c._monitorNotifier,a,b)},this.notifyListener=function(a,b,d){c._exceptionCatcher&&c._exceptionCatcher.runProtected("PlayerStateManager.notifyListener",function(){a(b,d)})},b.apply(c,arguments)};
  2637. g.PlayerState={STOPPED:"STOPPED",PLAYING:"PLAYING",BUFFERING:"BUFFERING",PAUSED:"PAUSED",UNKNOWN:"UNKNOWN",NOT_MONITORED:"NOT_MONITORED"},g.isValidPlayerState=function(a){return a===g.PlayerState.STOPPED||a===g.PlayerState.PLAYING||a===g.PlayerState.BUFFERING||a===g.PlayerState.PAUSED||a===g.PlayerState.UNKNOWN||a===g.PlayerState.NOT_MONITORED},g.sanitizeBitrateKbps=function(a){return-1==a||-2==a?a:a=K.Integer(a,0,null,-1)};
  2638. var h=a.HttpInterface=function(){this.makeRequest=function(a,b,c,d,e,f){},this.release=function(){}},i=a.LoggingInterface=function(){this.consoleLog=function(a,b){},this.release=function(){}},j=a.MetadataInterface=function(){this.getBrowserName=function(){},this.getBrowserVersion=function(){},this.getDeviceBrand=function(){},this.getDeviceManufacturer=function(){},this.getDeviceModel=function(){},this.getDeviceType=function(){},this.getDeviceVersion=function(){},this.getFrameworkName=function(){},this.getFrameworkVersion=function(){},this.getOperatingSystemName=function(){},this.getOperatingSystemVersion=function(){},this.release=function(){}},k=a.StorageInterface=function(){this.saveData=function(a,b,c,d){},this.loadData=function(a,b,c){},this.release=function(){}},l=a.SystemInterface=function(a,b,c,d,e,f){function g(a,b,c,d,e,f){l.validateInterface(a,new m,"TimeInterface"),l.validateInterface(b,new n,"TimerInterface"),l.validateInterface(c,new h,"HttpInterface"),l.validateInterface(d,new k,"StorageInterface"),l.validateInterface(e,new j,"MetadataInterface"),l.validateInterface(f,new i,"LoggingInterface"),this._timeInterface=a,this._timerInterface=b,this._httpInterface=c,this._storageInterface=d,this._metadataInterface=e,this._loggingInterface=f}g.apply(this,arguments),this.release=function(){null!=this._timeInterface&&(this._timeInterface.release(),this._timeInterface=null),null!=this._timerInterface&&(this._timerInterface.release(),this._timerInterface=null),null!=this._httpInterface&&(this._httpInterface.release(),this._httpInterface=null),null!=this._storageInterface&&(this._storageInterface.release(),this._storageInterface=null),null!=this._metadataInterface&&(this._metadataInterface.release(),this._metadataInterface=null),null!=this._loggingInterface&&(this._loggingInterface.release(),this._loggingInterface=null)}};
  2639. l.validateInterface=function(a,b,c){for(var d in b)if("release"!==d&&"function"!=typeof a[d])throw new Error("Expected method "+d+" in "+c+" implementation.")};
  2640. var m=a.TimeInterface=function(){this.getEpochTimeMs=function(){},this.release=function(){}},n=a.TimerInterface=function(){this.createTimer=function(a,b,c){},this.release=function(){}},o=a.JSON2={};
  2641. !function(){function a(a){return 10>a?"0"+a:a}function b(a){return d.lastIndex=0,d.test(a)?'"'+a.replace(d,function(a){var b=g[a];
  2642. return"string"==typeof b?b:"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+a+'"'}function c(a,d){var g,i,j,k,l,m=e,n=d[a];
  2643. switch(n&&"object"==typeof n&&"function"==typeof n.toJSON&&(n=n.toJSON(a)),"function"==typeof h&&(n=h.call(d,a,n)),typeof n){case"string":return b(n);
  2644. case"number":return isFinite(n)?String(n):"null";
  2645. case"boolean":case"null":return String(n);
  2646. case"object":if(!n)return"null";
  2647. if(e+=f,l=[],"[object Array]"===Object.prototype.toString.apply(n)){for(k=n.length,g=0;
  2648. k>g;
  2649. g+=1)l[g]=c(g,n)||"null";
  2650. return j=0===l.length?"[]":e?"[\n"+e+l.join(",\n"+e)+"\n"+m+"]":"["+l.join(",")+"]",e=m,j}if(h&&"object"==typeof h)for(k=h.length,g=0;
  2651. k>g;
  2652. g+=1)"string"==typeof h[g]&&(i=h[g],j=c(i,n),j&&l.push(b(i)+(e?": ":":")+j));
  2653. else for(i in n)Object.prototype.hasOwnProperty.call(n,i)&&(j=c(i,n),j&&l.push(b(i)+(e?": ":":")+j));
  2654. return j=0===l.length?"{}":e?"{\n"+e+l.join(",\n"+e)+"\n"+m+"}":"{"+l.join(",")+"}",e=m,j}}"function"!=typeof Date.prototype.toJSON&&(Date.prototype.toJSON=function(){return isFinite(this.valueOf())?this.getUTCFullYear()+"-"+a(this.getUTCMonth()+1)+"-"+a(this.getUTCDate())+"T"+a(this.getUTCHours())+":"+a(this.getUTCMinutes())+":"+a(this.getUTCSeconds())+"Z":null},String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(){return this.valueOf()});
  2655. var d,e,f,g,h;
  2656. "function"!=typeof o.stringify&&(d=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,g={"\b":"\\b","   ":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},o.stringify=function(a,b,d){var g;
  2657. if(e="",f="","number"==typeof d)for(g=0;
  2658. d>g;
  2659. g+=1)f+=" ";
  2660. else"string"==typeof d&&(f=d);
  2661. if(h=b,b&&"function"!=typeof b&&("object"!=typeof b||"number"!=typeof b.length))throw new Error("JSON2.stringify");
  2662. return c("",{"":a})})}();
  2663. var p=a.JsonParse=function(){var a,b,c,d,e={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:"\n",r:"\r",t:"   "},f=function(b){throw{name:"SyntaxError",message:b,at:a,text:c}},g=function(d){return d&&d!==b&&f("Expected '"+d+"' instead of '"+b+"'"),b=c.charAt(a),a+=1,b},h=function(){var a,c="";
  2664. for("-"===b&&(c="-",g("-"));
  2665. b>="0"&&"9">=b;
  2666. )c+=b,g();
  2667. if("."===b)for(c+=".";
  2668. g()&&b>="0"&&"9">=b;
  2669. )c+=b;
  2670. if("e"===b||"E"===b)for(c+=b,g(),("-"===b||"+"===b)&&(c+=b,g());
  2671. b>="0"&&"9">=b;
  2672. )c+=b,g();
  2673. return a=+c,isNaN(a)?void f("Bad number"):a},i=function(){var a,c,d,h="";
  2674. if('"'===b)for(;
  2675. g();
  2676. ){if('"'===b)return g(),h;
  2677. if("\\"===b)if(g(),"u"===b){for(d=0,c=0;
  2678. 4>c&&(a=parseInt(g(),16),isFinite(a));
  2679. c+=1)d=16*d+a;
  2680. h+=String.fromCharCode(d)}else{if("string"!=typeof e[b])break;
  2681. h+=e[b]}else h+=b}f("Bad string")},j=function(){for(;
  2682. b&&" ">=b;
  2683. )g()},k=function(){switch(b){case"t":return g("t"),g("r"),g("u"),g("e"),!0;
  2684. case"f":return g("f"),g("a"),g("l"),g("s"),g("e"),!1;
  2685. case"n":return g("n"),g("u"),g("l"),g("l"),null}f("Unexpected '"+b+"'")},l=function(){var a=[];
  2686. if("["===b){if(g("["),j(),"]"===b)return g("]"),a;
  2687. for(;
  2688. b;
  2689. ){if(a.push(d()),j(),"]"===b)return g("]"),a;
  2690. g(","),j()}}f("Bad array")},m=function(){var a,c={};
  2691. if("{"===b){if(g("{"),j(),"}"===b)return g("}"),c;
  2692. for(;
  2693. b;
  2694. ){if(a=i(),j(),g(":"),Object.hasOwnProperty.call(c,a)&&f('Duplicate key "'+a+'"'),c[a]=d(),j(),"}"===b)return g("}"),c;
  2695. g(","),j()}}f("Bad object")};
  2696. return d=function(){switch(j(),b){case"{":return m();
  2697. case"[":return l();
  2698. case'"':return i();
  2699. case"-":return h();
  2700. default:return b>="0"&&"9">=b?h():k()}},function(e,g){var h;
  2701. return c=e,a=0,b=" ",h=d(),j(),b&&f("Syntax error"),"function"==typeof g?function i(a,b){var c,d,e=a[b];
  2702. if(e&&"object"==typeof e)for(c in e)Object.hasOwnProperty.call(e,c)&&(d=i(e,c),void 0!==d?e[c]=d:delete e[c]);
  2703. return g.call(a,b,e)}({"":h},""):h}}(),q=(a.JSONInterface=function(){this.encode=function(a){},this.decode=function(a){}},a.LibJSONInterface=function(){this.encode=function(a){var b=null;
  2704. try{b=o.stringify(a)}catch(c){}return b},this.decode=function(a){var b=null;
  2705. try{b=p(a)}catch(c){}return"object"!=typeof b&&(b=null),b}}),r=a.Protocol=function(){this.buildPlatformMetadata=function(a){return{sch:r.SDK_METADATA_SCHEMA,br:a[O.BROWSER_NAME],brv:a[O.BROWSER_VERSION],dvb:a[O.DEVICE_BRAND],dvma:a[O.DEVICE_MANUFACTURER],dvm:a[O.DEVICE_MODEL],dvt:a[O.DEVICE_TYPE],dvv:a[O.DEVICE_VERSION],fw:a[O.FRAMEWORK_NAME],fwv:a[O.FRAMEWORK_VERSION],os:a[O.OPERATING_SYSTEM_NAME],osv:a[O.OPERATING_SYSTEM_VERSION]}}};
  2706. r.version="1.7",r.gatewayPath="/0/wsg",r.DEFAULT_CLIENT_ID="0",r.BACKEND_RESPONSE_NO_ERRORS="ok",r.SDK_METADATA_SCHEMA="sdk.js.1",r.convertPlayerState=function(a){switch(a){case g.PlayerState.STOPPED:return r.eStopped;
  2707. case g.PlayerState.PLAYING:return r.ePlaying;
  2708. case g.PlayerState.BUFFERING:return r.eBuffering;
  2709. case g.PlayerState.PAUSED:return r.ePaused;
  2710. case g.PlayerState.NOT_MONITORED:return r.eNotMonitored;
  2711. default:return r.eUnknown}},r.eStopped=1,r.ePlaying=3,r.eBuffering=6,r.ePaused=12,r.eNotMonitored=98,r.eUnknown=100,r.SessionFlags={GLOBAL:0,VIDEO:1,QUALITY_METRICS:2,BITRATE_METRICS:4};
  2712. var s=a.Monitor=function(){function a(a,c,d,e){b._sessionId=a,b._eventQueue=c,b._contentMetadata=d,b._systemFactory=e,b._logger=b._systemFactory.buildLogger(),b._logger.setModuleName("Monitor"),b._logger.setSessionId(G.ToString(b._sessionId)),b._exceptionCatcher=b._systemFactory.buildExceptionCatcher(),b._time=b._systemFactory.buildTime()}var b=this;
  2713. b._sessionId=0,b._playerStateManager=null,b._eventQueue=null,b._contentMetadata=null,b._bitrateKbps=-2,b._resource=null,b._playerState=g.PlayerState.NOT_MONITORED,b._sessionFlags=r.SessionFlags.VIDEO+r.SessionFlags.QUALITY_METRICS+r.SessionFlags.BITRATE_METRICS,b._startTimeMs=0,b._hasJoined=!1,b._pauseJoin=!1,b._encodedFps=-1,b._contentLengthSec=-1,b._playingFpsObservationCount=0,b._playingFpsTotal=0,b._averageFps=-1,b._adPlaying=!1,b._adStream=null,b._adPlayer=null,b._adPosition=null,b._ignorePlayerState=!1,b._pooledPlayerState=g.PlayerState.NOT_MONITORED,b._ignoreBitrateAndResource=!1,b._ignoreError=!1,this.start=function(a){b._startTimeMs=a},this.setDefaultBitrateAndResource=function(){b._logger.debug("setDefaultBitrateAndResource()"),null!=b._contentMetadata&&(b._contentMetadata.defaultBitrateKbps>0&&b._bitrateKbps<0&&b.setBitrateKbps(b._contentMetadata.defaultBitrateKbps),null!=b._contentMetadata.defaultResource&&null==b._resource&&b.setResource(b._contentMetadata.defaultResource))},this.setBitrateKbps=function(a){if(b._logger.debug("setBitrateKbps()"),b._ignoreBitrateAndResource)return void b._logger.info("setBitrateKbps(): ignored");
  2714. var c=b._bitrateKbps;
  2715. c!==a&&a>=-1&&(b._logger.info("Change bitrate from "+c+" to "+a,b._sessionId),b.enqueueBitrateChangeEvent(c,a),b._bitrateKbps=a)},this.setResource=function(a){if(b._logger.debug("setResource()"),b._ignoreBitrateAndResource)return void b._logger.info("setResource(): ignored");
  2716. var c=b._resource;
  2717. c!==a&&null!==a&&(b._logger.info("Change resource from "+c+" to "+a,b._sessionId),b.enqueueResourceChangeEvent(c,a),b._resource=a)},this.attachPlayer=function(a){return b._logger.debug("attachPlayer()"),null!=b._playerStateManager?void b._logger.error("attachPlayer(): detach current PlayerStateManager first"):void b._exceptionCatcher.runProtected("Monitor.attachPlayer()",function(){a.setMonitoringNotifier(b.notificationFromStreamerProxy,b._sessionId)?(a.pushCurrentState(),b._playerStateManager=a):b._logger.error("attachPlayer(): instance of PlayerStateManager is already attached to a session")})},this.detachPlayer=function(){b._logger.debug("detachPlayer()"),b.updateMetrics(),null!==b._playerStateManager&&(b._exceptionCatcher.runProtected("Monitor.detachPlayer",function(){b._playerStateManager.removeMonitoringNotifier()}),b._playerStateManager=null,b.SetPlayerState(g.PlayerState.NOT_MONITORED))},this.contentPreload=function(){return b._logger.debug("contentPreload()"),b._preloading?void b._logger.debug("contentPreload(): called twice, ignoring"):(b._preloading=!0,void(b._ignorePlayerState=!0))},this.contentStart=function(){return b._logger.debug("contentStart()"),b._preloading?(b._preloading=!1,void(b._adPlaying||(b._ignorePlayerState=!1,b.SetPlayerState(b._pooledPlayerState)))):void b._logger.warning("contentStart(): called without contentPreload, ignoring")},this.adStart=function(a,c,d){return b._logger.debug("adStart()"),b._adPlaying?void b._logger.warning("adStart(): multiple adStart calls, ignoring"):(b._adPlaying=!0,b._adStream=a,b._adPlayer=c,b._adPosition=d,b._hasJoined||b.togglePauseJoin(!0),void(b._adStream==Conviva.Client.AdStream.CONTENT||b._adPlayer==Conviva.Client.AdPlayer.SEPARATE?(b._playerState!==g.PlayerState.NOT_MONITORED&&(b._pooledPlayerState=b._playerState),b.SetPlayerState(g.PlayerState.NOT_MONITORED),b._ignorePlayerState=!0):b._adStream==Conviva.Client.AdStream.SEPARATE&&b._adPlayer==Conviva.Client.AdPlayer.CONTENT&&(b._playerState!==g.PlayerState.NOT_MONITORED&&(b._pooledPlayerState=b._playerState),b.SetPlayerState(g.PlayerState.NOT_MONITORED),b._ignorePlayerState=!0,b._ignoreBitrateAndResource=!0,b._ignoreError=!0)))},this.adEnd=function(){return b._logger.debug("adEnd()"),b._adPlaying?(b._hasJoined||b.togglePauseJoin(!1),b._adStream==Conviva.Client.AdStream.CONTENT||b._adPlayer==Conviva.Client.AdPlayer.SEPARATE?b._preloading||(b._ignorePlayerState=!1,b.SetPlayerState(b._pooledPlayerState)):b._adStream==Conviva.Client.AdStream.SEPARATE&&b._adPlayer==Conviva.Client.AdPlayer.CONTENT&&(b._ignoreBitrateAndResource=!1,b._ignoreError=!1,b._preloading||(b._ignorePlayerState=!1,b.SetPlayerState(b._pooledPlayerState))),b._adPlaying=!1,void(b._adStream=b._adPlayer=b._adPosition=null)):void b._logger.debug("adEnd(): called before adStart, ignoring")},this.togglePauseJoin=function(a){if(b._logger.debug("togglePauseJoin()"),b._pauseJoin===a)return void b._logger.debug("togglePauseJoin(): same value, ignoring");
  2718. var c=new E,d=new E;
  2719. d.SetValue("pj",b._pauseJoin),b._pauseJoin=!b._pauseJoin,c.SetValue("pj",b._pauseJoin),b.declareStateChange(c,d)},this.notificationFromStreamerProxy=function(a,c){b._logger.debug("notificationFromStreamerProxy(): "+a),b._exceptionCatcher.runProtected("Monitor.notificationFromStreamerProxy",function(){switch(a){case s.REASON_PLAYERSTATECHANGE:var d=c;
  2720. b.OnPlayerStateChange(d);
  2721. break;
  2722. case s.REASON_BITRATECHANGE:var e=c;
  2723. b.setBitrateKbps(e);
  2724. break;
  2725. case s.REASON_ERRORCHANGE:var f=c;
  2726. b.OnError(f);
  2727. break;
  2728. case s.REASON_METADATACHANGE:b.OnMetadata(c);
  2729. break;
  2730. case s.REASON_RELEASE:b.detachPlayer()}})},this.OnPlayerStateChange=function(a){if(b._playerState!=a){if(b._playerState==g.PlayerState.NOT_MONITORED&&a!=g.PlayerState.NOT_MONITORED&&(b._pooledPlayerState=a),b._ignorePlayerState)return void b._logger.debug("OnPlayerStateChange(): "+a+" (pooled, "+(b._adPlaying?"ad playing":"preloading")+")");
  2731. b._logger.debug("OnPlayerStateChange(): "+a);
  2732. var c=new E,d=new E;
  2733. c.SetValue("ps",r.convertPlayerState(a)),d.SetValue("ps",r.convertPlayerState(b._playerState)),b._hasJoined||a!=g.PlayerState.PLAYING||(b.togglePauseJoin(!1),b._hasJoined=!0),b._logger.info("OnPlayerStateChange(): changing player state from "+b._playerState+" to "+a),b._playerState=a,b.declareStateChange(c,d)}},this.SetPlayerState=function(a){b._playerState!=a&&b.OnPlayerStateChange(a)},this.OnError=function(a){return"string"!=typeof a.errorCode||""===a.errorCode?void b._logger.error("OnError(): invalid error message string: "+a.errorCode):a.severity!==Conviva.Client.ErrorSeverity.FATAL&&a.severity!==Conviva.Client.ErrorSeverity.WARNING?void b._logger.error("OnError(): invalid error severity: "+a.severity):b._ignoreError?void b._logger.debug("OnError(): ignored"):void b.declareError(a.errorCode,a.severity==Conviva.Client.ErrorSeverity.FATAL)},this.OnMetadata=function(a){var c=G.DictionaryFromRepr(a);
  2734. if(c.ContainsKey(s.METADATA_ENCODED_FRAMERATE)){var d=c.GetValue(s.METADATA_ENCODED_FRAMERATE),e=G.StringToIntSafe(d,-1);
  2735. e>0?(b._encodedFps=e,b._logger.info("OnMetadata(): Received "+s.METADATA_ENCODED_FRAMERATE+" metadata: "+b._encodedFps,b._sessionId)):b._logger.warning("OnMetadata(): Ignored invalid "+s.METADATA_ENCODED_FRAMERATE+" metadata: "+d,b._sessionId)}if(c.ContainsKey(s.METADATA_DURATION)){var f=c.GetValue(s.METADATA_DURATION),g=G.StringToIntSafe(f,-1);
  2736. g>0?(b._contentLengthSec=K.Integer(g,0,null,-1),b._logger.info("OnMetadata(): Received "+s.METADATA_DURATION+" metadata: "+b._contentLengthSec,b._sessionId)):b._logger.warning("OnMetadata(): Ignored invalid "+s.METADATA_DURATION+" metadata: "+f,b._sessionId)}},this.updateHeartbeat=function(a){if(b.updateMetrics(),I.setDictValue(a,"ps",r.convertPlayerState(b._playerState)),I.setDictValue(a,"pj",b._pauseJoin),I.setDictValue(a,"sf",b._sessionFlags),null!=b._contentMetadata&&b._contentMetadata.duration>0){var c=K.Integer(b._contentMetadata.duration,0,null,-1);
  2737. I.setDictValue(a,"cl",c)}else b._contentLengthSec>0&&I.setDictValue(a,"cl",b._contentLengthSec);
  2738. if(b._bitrateKbps>0&&I.setDictValue(a,"br",b._bitrateKbps),null!==b._resource&&I.setDictValue(a,"rs",b._resource),null!=b._contentMetadata&&b._contentMetadata.encodedFrameRate>0?I.setDictValue(a,"efps",b._contentMetadata.encodedFrameRate):b._encodedFps>0&&I.setDictValue(a,"efps",b._encodedFps),b._averageFps>=0&&I.setDictValue(a,"afps",b._averageFps),null!=b._playerStateManager){if(null==a.pm.fw){var d=null;
  2739. b._exceptionCatcher.runProtected("Monitor.updateHeartbeat:PlayerType",function(){d=b._playerStateManager.getPlayerType()}),null!=d&&(a.pm.fw=d)}if(null==a.pm.fwv){var e=null;
  2740. b._exceptionCatcher.runProtected("Monitor.updateHeartbeat:PlayerVersion",function(){e=b._playerStateManager.getPlayerVersion()}),null!=e&&(a.pm.fwv=e)}}},this.cleanup=function(){null!=b._playerStateManager&&b.detachPlayer(),b._eventQueue=null,b._contentMetadata=null,b._streamInfo=null},this.updateMetrics=function(){if(null!=b._playerStateManager&&b._playerState==g.PlayerState.PLAYING){var a=b._playerStateManager.getRenderedFrameRate();
  2741. a>=0&&(b._playingFpsTotal+=a,b._playingFpsObservationCount++,b._averageFps=G.slint.Cast(1*b._playingFpsTotal/b._playingFpsObservationCount))}},this.getSessionTime=function(){return G.slint.Cast(b._time.current()-b._startTimeMs)},this.enqueueEvent=function(a,c){c.SetValue("t",a),c.SetValue("st",b.getSessionTime()),c.SetValue("seq",b._eventQueue.getNumber()),b._eventQueue.enqueue(G.StringDictionaryToRepr(c))},this.enqueueBitrateChangeEvent=function(a,c){var d=new E,e=new E;
  2742. a>=-1&&e.SetValue("br",a),d.SetValue("br",c),b.declareStateChange(d,e)},this.enqueueResourceChangeEvent=function(a,c){var d=new E,e=new E;
  2743. null!==a&&e.SetValue("rs",a),d.SetValue("rs",c),b.declareStateChange(d,e)},this.declareError=function(a,c){var d=new E;
  2744. d.SetValue("ft",c),d.SetValue("err",a),b.enqueueEvent("CwsErrorEvent",d)},this.declareStateChange=function(a,c){var d=G.StringDictionaryToRepr(a),e=G.StringDictionaryToRepr(c),f=new E;
  2745. f.SetValue("new",d),null!=c&&I.dictCount(e)>0&&f.SetValue("old",e),b.enqueueEvent("CwsStateChangeEvent",f)},a.apply(b,arguments)};
  2746. s.verifyPlayerStateManager=function(a){return null==a?!1:"object"!=typeof a?!1:"function"!=typeof a.getStateManager?!1:a.getStateManager()instanceof g},s.REASON_PLAYERSTATECHANGE="PlayerStateChange",s.REASON_BITRATECHANGE="BitrateChange",s.REASON_METADATACHANGE="MetadataChange",s.REASON_ERRORCHANGE="ErrorChange",s.REASON_RELEASE="Release",s.REASON_LOG="Log",s.METADATA_DURATION="duration",s.METADATA_ENCODED_FRAMERATE="framerate";
  2747. var t=a.Session=function(){function a(a,b,d,e,f,g,h,i){c._id=a,c._eventQueue=b,c._contentMetadata=d,c._monitor=e,c._client=f,c._clientSettings=g,c._clientConfig=h,c._systemFactory=i,c._time=c._systemFactory.buildTime(),c._timer=c._systemFactory.buildTimer(),c._jsonInterface=c._systemFactory.buildJsonInterface(),c._exceptionCatcher=c._systemFactory.buildExceptionCatcher(),c._logger=c._systemFactory.buildLogger(),c._logger.setModuleName("Session"),c._logger.setSessionId(G.ToString(c._id)),c._httpClient=c._systemFactory.buildHttpClient(),c._systemMetadata=c._systemFactory.buildSystemMetadata(),c._protocol=c._systemFactory.buildProtocol(),c._callbackWithTimeout=c._systemFactory.buildCallbackWithTimeout(),c._systemSettings=c._systemFactory.getSettings()}var c=this;
  2748. c._contentMetadata=null,c._clientSettings=null,c._systemFactory=null,c._monitor=null,c._eventQueue=null,c._heartbeatTimerCancel=null,c._id=0,c._startTimeMs=0,c._heartbeatSequenceNumber=0,c._cleanedUp=!1,a.apply(c,arguments),this.start=function(){c.isVideoSession()&&null!=c._contentMetadata&&c._logger.info("start(): assetName="+c._contentMetadata.assetName),c._startTimeMs=c._time.current(),c.isVideoSession()&&(c._monitor.start(c._startTimeMs),c._monitor.setDefaultBitrateAndResource()),c._heartbeatSequenceNumber=0,c._clientConfig.isReady()?c.sendHeartbeat():(c._onConfigLoaded=function(){c.sendHeartbeat()},c._clientConfig.register(c._onConfigLoaded)),c.resetHeartbeatTimer()},this.cleanup=function(){c._logger.info("cleanup()"+c.sessionTypeTag()),c.cancelHeartbeatTimer(),c._logger.debug("Schedule the last hb before session cleanup"+c.sessionTypeTag()),c.isVideoSession()&&c.enqueueSessionEndEvent(),c.sendHeartbeat(),c.cleanupAll()},this.cleanupAll=function(){c.isVideoSession()&&(c._monitor.cleanup(),c._monitor=null),c._eventQueue.flush(),c._eventQueue=null,c._contentMetadata=null,c._clientSettings=null,c._systemFactory=null,c._time=null,c._timer=null,c._jsonInterface=null,c._logger=null,c._exceptionCatcher=null,c._cleanedUp=!0},this.getSessionTime=function(){return G.slint.Cast(c._time.current()-c._startTimeMs)},this.enqueueSessionEndEvent=function(){var a=new E;
  2749. a.SetValue("t","CwsSessionEndEvent"),a.SetValue("st",c.getSessionTime()),a.SetValue("seq",c._eventQueue.getNumber()),c._eventQueue.enqueue(G.StringDictionaryToRepr(a))},this.adStart=function(a,b,d){c._monitor.adStart(a,b,d)},this.adEnd=function(){c._monitor.adEnd()},this.detachPlayer=function(){c._monitor.detachPlayer()},this.attachPlayer=function(a){c._monitor.attachPlayer(a)},this.contentPreload=function(){c._monitor.contentPreload()},this.contentStart=function(){c._monitor.contentStart()},this.cancelHeartbeatTimer=function(){null!=c._heartbeatTimerCancel&&(c._heartbeatTimerCancel(),c._heartbeatTimerCancel=null)},this.resetHeartbeatTimer=function(){c.cancelHeartbeatTimer();
  2750. var a=1e3*c._clientSettings.heartbeatInterval;
  2751. c._heartbeatTimerCancel=c._timer.create(c.sendHeartbeat,a,"Session.sendHeartbeat")},this.reportError=function(a,b){c._logger.info("reportError(): "+a),c._monitor.OnError(new C(a,b))},this.updateContentMetadata=function(a){c._logger.debug("updateContentMetadata(): enter"),c._exceptionCatcher.runProtected("Session.updateContentMetadata",function(){c.mergeContentMetadata(a),c._monitor.setDefaultBitrateAndResource()})},this.mergeContentMetadata=function(a){if(null==a)return void c._logger.warning("mergeContentMetadata(): null ContentMetadata");
  2752. null==c._contentMetadata&&(c._contentMetadata=new d),null==c._contentMetadata.assetName?c._contentMetadata.assetName=a.assetName:c._logger.warning("mergeContentMetadata(): assetName was already set."),null==c._contentMetadata.applicationName?c._contentMetadata.applicationName=a.applicationName:c._logger.warning("mergeContentMetadata(): applicationName was already set."),null==c._contentMetadata.streamUrl?c._contentMetadata.streamUrl=a.streamUrl:c._logger.warning("mergeContentMetadata(): streamUrl was already set."),null==c._contentMetadata.viewerId?c._contentMetadata.viewerId=a.viewerId:c._logger.warning("mergeContentMetadata(): viewerId was already set."),c._contentMetadata.defaultBitrateKbps<=0?c._contentMetadata.defaultBitrateKbps=a.defaultBitrateKbps:c._logger.warning("mergeContentMetadata(): defaultBitrateKbps was already set."),null==c._contentMetadata.defaultResource?c._contentMetadata.defaultResource=a.defaultResource:c._logger.warning("mergeContentMetadata(): defaultResource was already set."),c._contentMetadata.duration<=0?c._contentMetadata.duration=a.duration:c._logger.warning("mergeContentMetadata(): duration was already set."),c._contentMetadata.encodedFrameRate<=0?c._contentMetadata.encodedFrameRate=a.encodedFrameRate:c._logger.warning("mergeContentMetadata(): encodedFrameRate was already set."),c._contentMetadata.streamType==d.StreamType.UNKNOWN?c._contentMetadata.streamType=a.streamType:c._logger.warning("mergeContentMetadata(): streamType was already set.");
  2753. var b={};
  2754. for(var e in c._contentMetadata.custom)b[e]=c._contentMetadata.custom[e];
  2755. for(var f in a.custom){var g=b[f];
  2756. null==g?b[f]=a.custom[f]:c._logger.warning("mergeContentMetadata(): custom."+f+" was already set.")}c._contentMetadata.custom=b},this.sendCustomEvent=function(a,b){c._logger.info("sendEvent(): eventName="+a+c.sessionTypeTag());
  2757. var d=new E;
  2758. d.SetValue("name",a);
  2759. var e=G.StringDictionaryToRepr(b);
  2760. d.SetValue("attr",e),d.SetValue("t","CwsCustomEvent"),d.SetValue("st",c.getSessionTime()),d.SetValue("seq",c._eventQueue.getNumber()),c._eventQueue.enqueue(G.StringDictionaryToRepr(d))},this.sendHeartbeat=function(){if(!c._cleanedUp){var a=c.makeHeartbeat();
  2761. null!=a&&c.encodeAndPostHeartbeat(a,null)}},this.makeHeartbeat=function(){var a={};
  2762. if(I.setDictValue(a,"t","CwsSessionHb"),I.setDictValue(a,"cid",c._clientSettings.customerKey),I.setDictValue(a,"clid",c._clientConfig.get("clientId")),I.setDictValue(a,"sid",c._id),I.setDictValue(a,"seq",c._heartbeatSequenceNumber),I.setDictValue(a,"pver",r.version),I.setDictValue(a,"clv",b.version),I.setDictValue(a,"iid",c._client.getId()),I.setDictValue(a,"pm",c._protocol.buildPlatformMetadata(c._systemMetadata.get())),c._contentMetadata&&null!=c._contentMetadata.viewerId&&I.setDictValue(a,"vid",c._contentMetadata.viewerId),c._contentMetadata&&null!=c._contentMetadata.streamUrl&&I.setDictValue(a,"url",c._contentMetadata.streamUrl),c._contentMetadata&&null!=c._contentMetadata.applicationName&&I.setDictValue(a,"pn",c._contentMetadata.applicationName),c._contentMetadata&&I.dictCount(c._contentMetadata.custom)>0&&I.setDictValue(a,"tags",c._contentMetadata.custom),c.isVideoSession()){if(c._contentMetadata&&null!=c._contentMetadata.assetName&&I.setDictValue(a,"an",c._contentMetadata.assetName),c._contentMetadata)switch(c._contentMetadata.streamType){case d.StreamType.LIVE:I.setDictValue(a,"lv",!0);
  2763. break;
  2764. case d.StreamType.VOD:I.setDictValue(a,"lv",!1)}c._monitor.updateHeartbeat(a)}else I.setDictValue(a,"sf",r.SessionFlags.GLOBAL);
  2765. var e=c._eventQueue.flush();
  2766. if(I.setDictValue(a,"evs",e),c.isGlobalSession()&&0===I.listCount(e))return null;
  2767. I.setDictValue(a,"sdk",!0),c._clientConfig.get("sendLogs")&&I.setDictValue(a,"lg",c._systemFactory.getLogBuffer().flush());
  2768. var f=c._time.current();
  2769. return I.setDictValue(a,"st",G.slint.Cast(f-c._startTimeMs)),I.setDictValue(a,"cts",f/1e3),c._heartbeatSequenceNumber++,a},this.isGlobalSession=function(){return null==c._monitor},this.isVideoSession=function(){return null!=c._monitor},this.sessionTypeTag=function(){return c.isGlobalSession()?" (global session)":""},this.encodeAndPostHeartbeat=function(a){var b=c._jsonInterface.encode(a),d=c._clientSettings.gatewayUrl+r.gatewayPath,e="application/json";
  2770. c._logger.info("encodeAndPostHeartbeat(): Send HB["+(c._heartbeatSequenceNumber-1)+"]"+c.sessionTypeTag());
  2771. var f=c._callbackWithTimeout.getWrapperCallback(c.onHeartbeatResponse,1e3*c._systemSettings.httpTimeout,"heartbeat HTTP timeout");
  2772. c._httpClient.request("POST",d,b,e,f)},this.onHeartbeatResponse=function(a,b){c._cleanedUp||c._exceptionCatcher.runProtected("onHeartbeatResponse",function(){if(a){var d=c._jsonInterface.decode(b),e=G.DictionaryFromRepr(d);
  2773. if(null!=e){if(e.ContainsKey("clid")){var f=e.GetValue("clid").toString();
  2774. f!=c._clientConfig.get("clientId")&&(c._logger.debug("onHeartbeatResponse(): setting the client id to "+f+" (from server)"),c._clientConfig.set("clientId",f),c._clientConfig.save())}var g=e.ContainsKey("slg")&&G.isBoolean(e.GetValue("slg"));
  2775. if(g!==c._clientConfig.get("sendLogs")&&(c._logger.debug("onHeartbeatResponse(): turning "+(g?"on":"off")+" sending of logs"),c._clientConfig.set("sendLogs",g)),e.ContainsKey("hbi")){var h=G.slint.Cast(e.GetValue("hbi")),i=h;
  2776. i!=c._clientSettings.heartbeatInterval&&(c._logger.debug("onHeartbeatResponse(): received hbIntervalMs from server: "+i),c._clientSettings.heartbeatInterval=i,null!=c._heartbeatTimerCancel&&c.resetHeartbeatTimer())}if(e.ContainsKey("gw")){var j=e.GetValue("gw");
  2777. j!=c._clientSettings.gatewayUrl&&(c._logger.debug("onHeartbeatResponse(): received gatewayUrl from server: "+j),c._clientSettings.gatewayUrl=j)}if(e.ContainsKey("err")){var k=e.GetValue("err");
  2778. k!=r.BACKEND_RESPONSE_NO_ERRORS&&c._logger.error("onHeartbeatResponse(): error posting heartbeat: "+k)}}else c._logger.warning("onHeartbeatResponse(): decoded heartbeat response is null.")}else G.isValidString(b)?c._logger.error("onHeartbeatResponse(): failed to send heartbeat: "+b):c._logger.error("onHeartbeatResponse(): received no response (or a bad response) to heartbeat POST request")})}},u=a.SessionFactory=function(){function a(a,c,d,e){b._client=a,b._clientSettings=c,b._clientConfig=d,b._systemFactory=e,b._logger=b._systemFactory.buildLogger(),b._logger.setModuleName("SessionFactory"),b._nextSessionKey=0,b._sessionsByKey=new E}var b=this;
  2779. b._logger=null,b._logBuffer=null,b._nextSessionKey=0,b._sessionsByKey=null,a.apply(b,arguments),this.cleanup=function(){if(b._logger=null,b._logBuffer=null,null!=b._sessionsByKey)for(var a=b._sessionsByKey.KeyValuePairs(),c=0;
  2780. c<a.length;
  2781. c++){var d=a[c],e=d.Value();
  2782. e.cleanup()}b._sessionsByKey=null,b._nextSessionKey=0},this.newSessionKey=function(){var a=b._nextSessionKey;
  2783. return b._nextSessionKey++,a},this.makeVideoSession=function(a){return b.makeSession(a,!1)},this.makeGlobalSession=function(a){return b.makeSession(a,!0)},this.buildGlobalSession=function(a,c,d){return new t(a,c,d,null,b._client,b._clientSettings,b._clientConfig,b._systemFactory)},this.buildVideoSession=function(a,c,d,e){return new t(a,c,d,e,b._client,b._clientSettings,b._clientConfig,b._systemFactory)},this.buildEventQueue=function(){return new x},this.generateSessionId=function(){return J.integer32()},this.buildMonitor=function(a,c,d){return new s(a,c,d,b._systemFactory)},this.makeSession=function(a,c){var e,f=d.ConstructClone(a),g=b.generateSessionId(),h=b.buildEventQueue();
  2784. if(c)e=b.buildGlobalSession(g,h,f);
  2785. else{
  2786. var i=b.buildMonitor(g,h,f);
  2787. e=b.buildVideoSession(g,h,f,i)}var j=b.newSessionKey();
  2788. return b.addSession(j,e),e.start(),j},this.getSession=function(a){return b._sessionsByKey.ContainsKey(a)?b._sessionsByKey.GetValue(a):(b._logger.error("Client: invalid sessionKey. Did you cleanup that session previously?"),null)},this.getVideoSession=function(a){if(b._sessionsByKey.ContainsKey(a)){var c=b._sessionsByKey.GetValue(a);
  2789. if(c.isVideoSession())return c}return b._logger.error("Client: invalid sessionKey. Did you cleanup that session previously?"),null},this.addSession=function(a,c){b._sessionsByKey.SetValue(a,c)},this.removeSession=function(a){b._sessionsByKey.Remove(a)},this.cleanupSession=function(a){var c=b.getSession(a);
  2790. null!=c&&(b.removeSession(a),c.cleanup())}},v=a.CallbackWithTimeout=function(a){this._timer=a,this.getWrapperCallback=function(a,b,c){var d=!1,e=function(){d||(d=!0,a(!1,c+" ("+b+" ms)"))};
  2791. this._timer.createOnce(e,b,"CallbackWithTimeout.wrap");
  2792. var f=function(b,c){d||(d=!0,a(b,c))};
  2793. return f}},w=a.Config=function(a,b,c,d,e){var f=this;
  2794. this._logger=a,this._logger.setModuleName("Config"),this._storage=b,this._jsonInterface=c,this._callbackWithTimeout=d,this._systemSettings=e,this._defaultConfig={clientId:r.DEFAULT_CLIENT_ID,sendLogs:!1},this._config=G.ShallowCopy(this._defaultConfig),this._loaded=!1,this._waitingConsumers=[],this.isReady=function(){return this._loaded},this.load=function(){var a=function(a,b){a?(f._parse(b),f._logger.debug("load(): configuration successfully loaded from local storage.")):f._logger.error("load(): error loading configuration from local storage: "+b),f._loaded=!0,f._notify()},b=this._callbackWithTimeout.getWrapperCallback(a,1e3*this._systemSettings.storageTimeout,"storage load timeout");
  2795. this._storage.load(w.STORAGE_KEY,b)},this._parse=function(a){var b=this._jsonInterface.decode(a);
  2796. if(null!=b&&this._config.clientId==r.DEFAULT_CLIENT_ID){var c=b[w.CONFIG_STORAGE_KEY_CLIENT_ID];
  2797. null!=c&&c!=r.DEFAULT_CLIENT_ID&&""!=c&&"null"!=c&&(this._config.clientId=c,this._logger.info("parse(): setting the client id to "+c+" (from local storage)"))}},this._marshall=function(){var a={};
  2798. return a[w.CONFIG_STORAGE_KEY_CLIENT_ID]=this._config.clientId,this._jsonInterface.encode(a)},this.save=function(){var a=function(a,b){a?f._logger.debug("save(): configuration successfully saved to local storage."):f._logger.error("save(): error saving configuration to local storage: "+b)},b=this._callbackWithTimeout.getWrapperCallback(a,1e3*this._systemSettings.storageTimeout,"storage save timeout");
  2799. this._storage.save(w.STORAGE_KEY,this._marshall(),b)},this.register=function(a){return this.isReady()?void a():void this._waitingConsumers.push(a)},this.get=function(a){return this._loaded?this._config[a]:null},this.set=function(a,b){this._loaded&&(this._config[a]=b)},this._notify=function(){for(var a;
  2800. null!=(a=this._waitingConsumers.pop());
  2801. )a()}};
  2802. w.STORAGE_KEY="sdkConfig",w.CONFIG_STORAGE_KEY_CLIENT_ID="clId";
  2803. var x=a.EventQueue=function(){this._events=[],this._nextEventNumber=0,this.enqueue=function(a){this._events.push(a)},this.getNumber=function(){var a=this._nextEventNumber;
  2804. return this._nextEventNumber++,a},this.flush=function(){var a=this._events;
  2805. return this._events=[],a}},y=a.ExceptionCatcher=function(a,b,c){this._logger=a,this._logger.setModuleName("ExceptionCatcher"),this._ping=b,this._systemSettings=c,this.runProtected=function(a,b,c){try{b()}catch(d){if(null!=c)c(d);
  2806. else{if(this._systemSettings.allowUncaughtExceptions)throw d;
  2807. this.onUncaughtException(a,d)}}},this.onUncaughtException=function(a,b){try{this._ping.send("Uncaught exception: "+a+": "+b.toString())}catch(c){this._logger.error("Caught exception while sending ping: "+c.toString())}}},z=a.LogBuffer=function(){var a=32;
  2808. this._buffer=[],this.add=function(b){this._buffer.length>=a&&this._buffer.shift(),this._buffer.push(b)},this.flush=function(){var a=this._buffer;
  2809. return this._buffer=[],a}},A=a.Ping=function(a,c,d){this._isSendingPing=!1,this._cachedBasePingUrl=null,this._logger=a,this._logger.setModuleName("Ping"),this._httpClient=c,this._clientSettings=d,this.send=function(a){if(!this._isSendingPing){this._isSendingPing=!0;
  2810. var b=this.getBasePingUrl()+"&d="+G.UrlEncodeString(a.toString());
  2811. this._logger.error("send(): "+b),this._httpClient.request("GET",b,null,null,null),this._isSendingPing=!1}},this.getBasePingUrl=function(){if(!this._cachedBasePingUrl){var a=A.SERVICE_URL+"?comp="+A.COMPONENT_NAME+"&clv="+b.version;
  2812. this._clientSettings&&(a+="&cid="+this._clientSettings.customerKey),a+="&sch="+r.SDK_METADATA_SCHEMA,this._clientSettings&&(this._cachedBasePingUrl=a)}return this._cachedBasePingUrl}};
  2813. A.COMPONENT_NAME="sdkjs",A.SERVICE_URL="https://pings.conviva.com/ping.ping";
  2814. var B=a.PlayerStates=function(){function a(){this.stateToInt=new E,this.stateToInt.SetValue(B.PLAYING,B.ePlaying),this.stateToInt.SetValue(B.STOPPED,B.eStopped),this.stateToInt.SetValue(B.PAUSED,B.ePaused),this.stateToInt.SetValue(B.BUFFERING,B.eBuffering),this.stateToInt.SetValue(B.NOT_MONITORED,B.eNotMonitored),this.stateToInt.SetValue(B.UNKNOWN,B.eUnknown)}var b=this;
  2815. this.stateToInt=null,this.stringToInt=function(a){return this.stateToInt.ContainsKey(a)?this.stateToInt.GetValue(a):B.eUnknown},this.validString=function(a){return this.stateToInt.ContainsKey(a)},a.apply(b)},C=a.StreamerError=function(){function a(a,b){c.errorCode=a,c.severity=b}var c=this;
  2816. c.errorCode=null,c.severity=b.ErrorSeverity.FATAL,a.apply(c,arguments)},D=a.ArrayCS=function(){function a(a){void 0===a&&(a=0),b.arr=new Array(a)}var b=this;
  2817. b.arr=null,this.ToRepr=function(){return b.arr},this.Length=function(){return b.arr.length},this.GetValue=function(a){if(a>=b.arr.length)throw new Error("Index out of bounds: "+a+" (length "+b.arr.length+")");
  2818. if(0>a)throw new Error("Index out of bounds: "+a);
  2819. return b.arr[a]},this.SetValue=function(a,c){if(a>=b.arr.length)throw new Error("Index out of bounds: "+a+" (length "+b.arr.length+")");
  2820. if(0>a)throw new Error("Index out of bounds: "+a);
  2821. b.arr[a]=c},this.Values=function(){return b.arr},a.apply(this,arguments)};
  2822. D.Create=function(){for(var a=new D,b=[],c=0;
  2823. c<arguments.length;
  2824. c++)b.push(arguments[c]);
  2825. return a.arr=b,a},D.FromRepr=function(a){if(null==a)return null;
  2826. var b=new D;
  2827. return b.arr=a,b};
  2828. var E=a.DictionaryCS=function(){function a(){b.obj={}}var b=this;
  2829. b.obj=null,a.apply(this,arguments),this.ToObject=function(){return b.obj},this.GetValue=function(a){return b.obj[a]},this.SetValue=function(a,c){b.obj[a]=c},this.Clear=function(){G.forEachProp(b.obj,function(a){delete b.obj[a]})},this.ContainsKey=function(a){return void 0!==b.obj[a]},this.Keys=function(){var a=[];
  2830. return G.forEachProp(b.obj,function(b){a.push(b)}),a},this.KeyValuePairs=function(){var a=[];
  2831. return G.forEachProp(b.obj,function(c){a.push(new F(c,b.obj[c]))}),a},this.Add=this.SetValue,this.Remove=function(a){return b.ContainsKey(a)?(delete b.obj[a],!0):!1}};
  2832. E.FromRepr=function(a){if(null==a)return null;
  2833. if(a instanceof E)return a;
  2834. a.hasOwnProperty("ToObject")&&(a=a.ToObject());
  2835. var b=new E;
  2836. return G.forEachProp(a,function(c){b.obj[c]=a[c]}),b},E.Create=function(){for(var a=new E,b=0;
  2837. b+1<arguments.length;
  2838. b+=2)a.obj[arguments[b]]=arguments[b+1];
  2839. return a};
  2840. var F=a.KeyValuePairCS=function(){function a(a,c){b.key=a,b.val=c}var b=this;
  2841. b.key=null,b.val=null,a.apply(this,arguments),this.Value=function(){return b.val}},G=a.Lang=function(){};
  2842. G.DictionaryFromRepr=function(a){var b=E.FromRepr(a);
  2843. return b},G.StringDictionaryToRepr=function(a){return null==a?null:a.hasOwnProperty("ToObject")?a.ToObject():a},G.StringToInt=function(a){return parseInt(a)},G.ToString=function(a){return""+a},G.NumberToInt=function(a){return Math.floor(a)},G.NumberToUnsignedInt=function(a){return Math.abs(G.NumberToInt(a))},G.AsDouble=function(a){return Number(a)},G.AsBoolean=function(a){return Boolean(a)},G.isValidString=function(a){return"string"==typeof a&&""!==a},G.isBoolean=function(a){return"boolean"==typeof a},G.UrlEncodeString=function(a){return escape(a)},G.StringToIntSafe=function(a,b){var c=b;
  2844. try{c=G.StringToInt(a)}catch(d){}return c},G.ShallowCopy=function(a){var b={};
  2845. for(var c in a)b[c]=a[c];
  2846. return b},G.ShallowCopyOmitNull=function(a){var b={};
  2847. for(var c in a)null!=a[c]&&(b[c]=a[c]);
  2848. return b},G.isArray=function(a){return a.constructor==Array?!0:"undefined"!=typeof a.length},G.forEachProp=function(a,b){if(G.isArray(a))for(var c=0;
  2849. c<a.length;
  2850. c++)b(c);
  2851. else for(var d in a)a.hasOwnProperty(d)&&b(d)},G.forEachPropValue=function(a,b){if(G.isArray(a))for(var c=0;
  2852. c<a.length;
  2853. c++)b(a[c]);
  2854. else for(var d in a)a.hasOwnProperty(d)&&b(a[d])},G.defGet=function(a,b,c){if("undefined"!=typeof Object.defineProperty)Object.defineProperty(a,b,{configurable:!0,enumerable:!0,get:c});
  2855. else{if("undefined"==typeof a.__defineGetter__)throw new Error("JavaScript runtime must support either Object.defineProperty or __defineGetter__");
  2856. a.__defineGetter__(b,c)}},G.defSet=function(a,b,c){if("undefined"!=typeof Object.defineProperty)Object.defineProperty(a,b,{configurable:!0,set:c});
  2857. else{if("undefined"==typeof a.__defineSetter__)throw new Error("JavaScript runtime must support either Object.defineProperty or __defineSetter__");
  2858. a.__defineSetter__(b,c)}},function(){var a={};
  2859. a.two32=4294967296,a.uintRegex=new RegExp("^[0-9]+$"),a.MaxValue=a.two32-1,a.MinValue=0,G.sluint={},G.sluint.Cast=function(b){var c=parseInt(b);
  2860. return c>a.MaxValue?c%=a.two32:0>c&&(c=-c%a.two32,c=a.two32-c),c};
  2861. var b={};
  2862. b.intRegex=new RegExp("^[+-]?[0-9]+$"),b.MaxValue=2147483647,b.MinValue=-2147483648,G.slint={},G.slint.Cast=function(c){var d=G.sluint.Cast(c);
  2863. return d>b.MaxValue&&(d-=a.two32),d}}();
  2864. var H=a.ListCS=function(){function a(){D.call(b,0)}var b=this;
  2865. b.arr=null,this.ToRepr=function(){return b.arr},this.Add=function(a){b.arr.push(a)},this.Clear=function(a){b.arr.length=0},a.apply(this,arguments)},I=a.NativeLang=function(){};
  2866. I.dictCount=function(a){var b,c=0;
  2867. for(b in a)a.hasOwnProperty(b)&&c++;
  2868. return c},I.setDictValue=function(a,b,c){a[b]=c},I.listCount=function(a){return a.length},I.GetField=function(a,b){return b[a]},I.GetStringField=function(a,b){var c=I.GetField(a,b);
  2869. return c?c.toString():null};
  2870. var J=a.Random=function(){};
  2871. J.integer32=function(){return Math.floor(4294967295*Math.random())-2147483648},J.uinteger32=function(){return Math.floor(4294967295*Math.random())};
  2872. var K=a.Sanitize={};
  2873. K.Integer=function(a,b,c,d){if(isNaN(a))return d;
  2874. if("number"!=typeof a)return d;
  2875. if(a==d)return d;
  2876. var e=G.NumberToInt(a);
  2877. return K.EnforceBoundaries(e,b,c)},K.EnforceBoundaries=function(a,b,c){return null!=c&&a>c?a=c:null!=b&&b>a&&(a=b),a};
  2878. var L=a.HttpClient=function(a,b,c){this._httpInterface=b,this._systemSettings=c,this.request=function(a,b,c,d,e){var f=1e3*this._systemSettings.httpTimeout;
  2879. this._httpInterface.makeRequest(a,b,c,d,f,e)}},M=a.Logger=function(a,b,c,d,e){this._consoleInterface=a,this._timeInterface=b,this._settings=c,this._logBuffer=d,this._packageName=e,this.debug=function(a){this._settings.logLevel<=f.LogLevel.DEBUG&&this.log(a,f.LogLevel.DEBUG)},this.info=function(a){this._settings.logLevel<=f.LogLevel.INFO&&this.log(a,f.LogLevel.INFO)},this.warning=function(a){this._settings.logLevel<=f.LogLevel.WARNING&&this.log(a,f.LogLevel.WARNING)},this.error=function(a){this._settings.logLevel<=f.LogLevel.ERROR&&this.log(a,f.LogLevel.ERROR)},this.log=function(a,b){var c=this.formatMessage(a,b);
  2880. this._logBuffer.add(c),this._consoleInterface.consoleLog(c,b)},this.prependModuleName=function(a){var b=a;
  2881. return null!=this._moduleName&&""!=this._moduleName&&(b="["+this._moduleName+"] "+b),b},this.prependPackageName=function(a){var b=a;
  2882. return null!=this._packageName&&""!=this._packageName&&(b="["+this._packageName+"] "+b),b},this.prependConvivaNamespace=function(a){var b=a;
  2883. return null!=this._packageName&&""!=this._packageName&&(b="[Conviva] "+b),b},this.prependTime=function(a){var b=this._timeInterface.getEpochTimeMs(),c=(b/1e3).toFixed(3).toString();
  2884. return"["+c+"] "+a},this.prependLogLevel=function(a,b){var c=M.getLogLevelString(b),d=a;
  2885. return null!=this._packageName&&""!=this._packageName&&(d="["+c+"] "+d),d},this.prependSessionId=function(a){var b=a;
  2886. return null!=this._sessionId&&(b="sid="+this._sessionId+" "+b),b},this.setSessionId=function(a){this._sessionId=a},this.setModuleName=function(a){this._moduleName=a},this.formatMessage=function(a,b){return this.prependConvivaNamespace(this.prependTime(this.prependLogLevel(this.prependPackageName(this.prependModuleName(this.prependSessionId(a))),b)))}};
  2887. M.getLogLevelString=function(a){var b;
  2888. switch(a){case f.LogLevel.ERROR:b="ERROR";
  2889. break;
  2890. case f.LogLevel.WARNING:b="WARNING";
  2891. break;
  2892. case f.LogLevel.INFO:b="INFO";
  2893. break;
  2894. case f.LogLevel.DEBUG:b="DEBUG"}return b};
  2895. var N=a.Storage=function(a){this._storageInterface=a,this.load=function(a,b){this._storageInterface.loadData(N.STORAGE_SPACE,a,b)},this.save=function(a,b,c){this._storageInterface.saveData(N.STORAGE_SPACE,a,b,c)}};
  2896. N.STORAGE_SPACE="Conviva";
  2897. var O=a.SystemMetadata=function(a,c){this._metadataInterface=a,this._exceptionCatcher=c,this._cachedMetadata=null,this.get=function(){return this._cachedMetadata||this.retrieve(),this._cachedMetadata},this.retrieve=function(){function a(a,b){d._exceptionCatcher.runProtected("Session.getSystemMetadataSchema(): "+a,function(){var c=b[a];
  2898. b[a]=c()})}var c={};
  2899. c[O.BROWSER_NAME]=this._metadataInterface.getBrowserName,c[O.BROWSER_VERSION]=this._metadataInterface.getBrowserVersion,c[O.DEVICE_BRAND]=this._metadataInterface.getDeviceBrand,c[O.DEVICE_MANUFACTURER]=this._metadataInterface.getDeviceManufacturer,c[O.DEVICE_MODEL]=this._metadataInterface.getDeviceModel,c[O.DEVICE_TYPE]=this._metadataInterface.getDeviceType,c[O.DEVICE_VERSION]=this._metadataInterface.getDeviceVersion,c[O.FRAMEWORK_NAME]=this._metadataInterface.getFrameworkName,c[O.FRAMEWORK_VERSION]=this._metadataInterface.getFrameworkVersion,c[O.OPERATING_SYSTEM_NAME]=this._metadataInterface.getOperatingSystemName,c[O.OPERATING_SYSTEM_VERSION]=this._metadataInterface.getOperatingSystemVersion;
  2900. var d=this;
  2901. for(var e in c)a(e,c),G.isValidString(c[e])||delete c[e];
  2902. c[O.DEVICE_TYPE]!==b.DeviceType.DESKTOP&&c[O.DEVICE_TYPE]!==b.DeviceType.CONSOLE&&c[O.DEVICE_TYPE]!==b.DeviceType.SETTOP&&c[O.DEVICE_TYPE]!==b.DeviceType.MOBILE&&c[O.DEVICE_TYPE]!==b.DeviceType.TABLET&&c[O.DEVICE_TYPE]!==b.DeviceType.SMARTTV&&delete c[O.DEVICE_TYPE],this._cachedMetadata=G.ShallowCopyOmitNull(c)}};
  2903. O.BROWSER_NAME="browserName",O.BROWSER_VERSION="browserVersion",O.DEVICE_BRAND="deviceBrand",O.DEVICE_MANUFACTURER="deviceManufacturer",O.DEVICE_MODEL="deviceModel",O.DEVICE_TYPE="deviceType",O.DEVICE_VERSION="deviceVersion",O.FRAMEWORK_NAME="frameworkName",O.FRAMEWORK_VERSION="frameworkVersion",O.OPERATING_SYSTEM_NAME="operatingSystemName",O.OPERATING_SYSTEM_VERSION="operatingSystemVersion";
  2904. var P=a.Time=function(a){this._timeInterface=a,this.current=function(a){return this._timeInterface.getEpochTimeMs()}},Q=a.Timer=function(a,b){var c=this;
  2905. this._timerInterface=a,this._exceptionCatcher=b,this.create=function(a,b,d){var e=function(){c._exceptionCatcher&&c._exceptionCatcher.runProtected(d,function(){a()})},f=this._timerInterface.createTimer(e,b,d);
  2906. return f},this.createOnce=function(a,b,d){var e={cancel:null},f=function(){c._exceptionCatcher&&c._exceptionCatcher.runProtected(d,function(){"function"==typeof e.cancel&&(e.cancel(),e.cancel=null,e=null),a()})},g=this._timerInterface.createTimer(f,b,d);
  2907. return e.cancel=g,g}}}(),Conviva.Client=a.Client,Conviva.ContentMetadata=a.ContentMetadata,Conviva.PlayerStateManager=a.PlayerStateManager,Conviva.SystemSettings=a.SystemSettings,Conviva.ClientSettings=a.ClientSettings,Conviva.SystemInterface=a.SystemInterface,Conviva.HttpInterface=a.HttpInterface,Conviva.TimeInterface=a.TimeInterface,Conviva.TimerInterface=a.TimerInterface,Conviva.LoggingInterface=a.LoggingInterface,Conviva.MetadataInterface=a.MetadataInterface,Conviva.StorageInterface=a.StorageInterface,Conviva.SystemFactory=a.SystemFactory}}(),function(){function a(){this.makeRequest=function(a,b,c,d,e,f){return this.makeRequestStandard.apply(this,arguments)},this.makeRequestStandard=function(a,b,c,d,e,f){var g=new XMLHttpRequest;
  2908. return g.open(a,b,!0),d&&g.overrideMimeType&&(g.overrideMimeType=d),d&&g.setRequestHeader&&g.setRequestHeader("Content-Type",d),e>0&&(g.timeout=e,g.ontimeout=function(){g.ontimeout=g.onreadystatechange=null,f&&f(!1,"timeout after "+e+" ms")}),g.onreadystatechange=function(){4===g.readyState&&(g.ontimeout=g.onreadystatechange=null,200==g.status?f&&f(!0,g.responseText):f&&f(!1,"http status "+g.status))},g.send(c),null},this.release=function(){}}HRZ.namespace("HRZ.conviva.interfaces").HTTP=a}(),function(){function a(){this.consoleLog=function(a,b){"undefined"!=typeof console&&(console.log&&b===Conviva.SystemSettings.LogLevel.DEBUG||b===Conviva.SystemSettings.LogLevel.INFO?console.log(a):console.warn&&b===Conviva.SystemSettings.LogLevel.WARNING?console.warn(a):console.error&&b===Conviva.SystemSettings.LogLevel.ERROR&&console.error(a))},this.release=function(){}}HRZ.namespace("HRZ.conviva.interfaces").logging=a}(),function(){function a(){this.getBrowserName=function(){return null},this.getBrowserVersion=function(){return null},this.getDeviceBrand=function(){return null},this.getDeviceManufacturer=function(){return null},this.getDeviceModel=function(){return null},this.getDeviceType=function(){return null},this.getDeviceVersion=function(){return null},this.getFrameworkName=function(){return"Shaka"},this.getFrameworkVersion=function(){return"1.5.2"},this.getOperatingSystemName=function(){return null},this.getOperatingSystemVersion=function(){return null},this.release=function(){}}HRZ.namespace("HRZ.conviva.interfaces").metadata=a}(),function(){function a(){this.saveData=function(a,b,c,d){var e=a+"."+b;
  2909. try{localStorage.setItem(e,c),d(!0,null)}catch(f){d(!1,f.toString())}},this.loadData=function(a,b,c){var d=a+"."+b;
  2910. try{var e=localStorage.getItem(d);
  2911. c(!0,e)}catch(f){c(!1,f.toString())}},this.release=function(){}}HRZ.namespace("HRZ.conviva.interfaces").storage=a}(),function(){function a(){this.getEpochTimeMs=function(){var a=new Date;
  2912. return a.getTime()},this.release=function(){}}HRZ.namespace("HRZ.conviva.interfaces").time=a}(),function(){function a(){this.createTimer=function(a,b,c){var d=setInterval(a,b);
  2913. return function(){-1!==d&&(clearInterval(d),d=-1)}},this.release=function(){}}HRZ.namespace("HRZ.conviva.interfaces").timer=a}(),this.hrz=this.hrz||{},this.hrz.views=this.hrz.views||{},this.hrz.views["player/views/controls-channels.mustache"]=new Hogan.Template({code:function(a,b,c){var d=this;
  2914. return d.b(c=c||""),d.b('<div class="hrz-player-controls-channels-popup">'),d.b("\n"+c),d.b('   <div class="hrz-player-controls-channels-popup-header">'),d.b("\n"+c),d.b('     <span class="hrz-player-controls-channels-popup-now">'),d.b(d.v(d.d("msg.nowOnTV",a,b,0))),d.b('</span><span class="hrz-player-controls-channels-popup-time">'),d.b(d.v(d.f("nowTime",a,b,0))),d.b("</span>"),d.b("\n"+c),d.b('     <div class="hrz-player-controls-channels-close-btn"></div>'),d.b("\n"+c),d.b("  </div>"),d.b("\n"+c),d.b('  <div class="hrz-player-controls-channels-popup-nano nano">'),d.b("\n"+c),d.b('      <div class="nano-content">'),d.b("\n"+c),d.s(d.f("channels",a,b,1),a,b,0,430,881,"{{ }}")&&(d.rs(a,b,function(a,b,d){d.s(d.f("visible",a,b,1),a,b,0,446,865,"{{ }}")&&(d.rs(a,b,function(a,b,d){d.b('           <div data-id="'),d.b(d.v(d.f("id",a,b,0))),d.b('" class="hrz-player-controls-channels-item">'),d.b("\n"+c),d.b('                <div class="hrz-player-controls-channels-logo" style="background-image: url('),d.b(d.v(d.f("logo",a,b,0))),d.b(')">'),d.b("\n"+c),d.b("             </div>"),d.b("\n"+c),d.b('              <span class="hrz-player-controls-channels-title">'),d.b("\n"+c),d.b("                   "),d.b(d.v(d.d("currentProgram.title",a,b,0))),d.b("\n"+c),d.b("                </span>"),d.b("\n"+c),d.b("             <br/>"),d.b("\n"+c),d.b('               <span class="hrz-player-controls-channels-time">'),d.b("\n"+c),d.b("                    "),d.b(d.v(d.d("currentProgram.startTime",a,b,0))),d.b(" - "),d.b(d.v(d.d("currentProgram.endTime",a,b,0))),d.b("\n"+c),d.b("               </span>"),d.b("\n"+c),d.b("         </div>"),d.b("\n"+c)}),a.pop())}),a.pop()),d.b("        </div>"),d.b("\n"+c),d.b("  </div>"),d.b("\n"+c),d.b("</div>"),d.fl()},partials:{},subs:{}}),this.hrz.views["player/views/controls.mustache"]=new Hogan.Template({code:function(a,b,c){var d=this;
  2915. return d.b(c=c||""),d.b('<div class="hrz-player-controls hrz-user-select-none '),d.s(d.f("onDemand",a,b,1),a,b,1,0,0,"")||d.b("hrz-player-controls-live"),d.b('">'),d.b("\n"+c),d.b('   <div class="hrz-player-controls-btn hrz-player-controls-toggle '),d.s(d.f("onDemand",a,b,1),a,b,1,0,0,"")||d.b("hrz-controls-toggle-btn-live"),d.b(' hrz-player-controls-toggle-pause disabled">'),d.b("\n"+c),d.b('        <div class="hrz-player-controls-popup hrz-player-controls-btn-label">'),d.b("\n"+c),d.b('           <span class="hrz-player-controls-btn-label-content">'),d.b(d.v(d.d("msg.pause",a,b,0))),d.b("</span>"),d.b("\n"+c),d.b("        </div>"),d.b("\n"+c),d.b("  </div>"),d.b("\n"+c),d.s(d.f("showReplay",a,b,1),a,b,0,452,702,"{{ }}")&&(d.rs(a,b,function(a,b,d){d.b('    <div class="hrz-player-controls-btn hrz-player-controls-replay hrz-hidden">'),d.b("\n"+c),d.b('     <div class="hrz-player-controls-popup hrz-player-controls-btn-label">'),d.b("\n"+c),d.b('           <span class="hrz-player-controls-btn-label-content">'),d.b(d.v(d.d("msg.startOver",a,b,0))),d.b("</span>"),d.b("\n"+c),d.b("        </div>"),d.b("\n"+c),d.b("  </div>"),d.b("\n"+c)}),a.pop()),d.b('   <div class="hrz-player-controls-time-text">'),d.b("\n"+c),d.b('     <span class="hrz-player-controls-time-past">00:00</span>/<span class="hrz-player-controls-time-full">00:00</span>'),d.b("\n"+c),d.b("   </div>"),d.b("\n"+c),d.b('  <div class="hrz-player-controls-time-line '),d.s(d.f("onDemand",a,b,1),a,b,1,0,0,"")||d.b("hrz-player-controls-time-line-live"),d.b('">'),d.b("\n"+c),d.b('     <div class="hrz-player-controls-time-line-progress">'),d.b("\n"+c),d.b('            <div class="hrz-player-controls-time-line-past">'),d.b("\n"+c),d.b('                <div class="hrz-player-controls-time-line-marker">'),d.b("\n"+c),d.b("              </div>"),d.b("\n"+c),d.b("          </div>"),d.b("\n"+c),d.b('          <div class="hrz-player-controls-timeline-tooltip hrz-hidden">'),d.b("\n"+c),d.b("           </div>"),d.b("\n"+c),d.b("      </div>"),d.b("\n"+c),d.b('      <div class="hrz-player-controls-timeline-noscrubbing hrz-hidden">'),d.b("\n"+c),d.b('           <span class="hrz-player-controls-timeline-noscrubbing-message">'),d.b(d.v(d.d("msg.replayNoScrubbing",a,b,0))),d.b("</span>"),d.b("\n"+c),d.b("     </div>"),d.b("\n"+c),d.b("  </div>"),d.b("\n"+c),d.b('  <div class="hrz-player-timeline-program">'),d.b("\n"+c),d.s(d.f("onDemand",a,b,1),a,b,1,0,0,"")||(d.b('     <div class="hrz-player-timeline-program-channel">'),d.b("\n"+c),d.b("       </div>"),d.b("\n"+c)),d.b('     <div class="hrz-player-timeline-program-title">'),d.b("\n"+c),d.b("     </div>"),d.b("\n"+c),d.s(d.f("onDemand",a,b,1),a,b,1,0,0,"")||(d.b('        <div class="hrz-player-timeline-program-time"></div>'),d.b("\n"+c)),d.b('       <div class="hrz-player-timeline-program-info">'),d.b("\n"+c),d.b("      </div>"),d.b("\n"+c),d.b('      <div class="hrz-player-controls-popup hrz-player-controls-btn-label">'),d.b("\n"+c),d.b('           <span class="hrz-player-controls-btn-label-content">'),d.b(d.v(d.d("msg.showProgramInfo",a,b,0))),d.b("</span>"),d.b("\n"+c),d.b("      </div>"),d.b("\n"+c),d.b("  </div>"),d.b("\n"+c),d.b('  <div class="hrz-program-fullinfo-placeholder hrz-hidden"></div>'),d.b("\n"+c),d.b(' <div class="hrz-player-controls-right-buttons">'),d.b("\n"+c),d.s(d.f("onDemand",a,b,1),a,b,1,0,0,"")||(d.b('       <div class="hrz-player-controls-btn hrz-player-controls-channels hrz-channel-loading">'),d.b("\n"+c),d.b('          <div class="hrz-player-controls-popup hrz-player-controls-btn-label">'),d.b("\n"+c),d.b('               <span class="hrz-player-controls-btn-label-content">'),d.b(d.v(d.d("msg.channels",a,b,0))),d.b("</span>"),d.b("\n"+c),d.b("         </div>"),d.b("\n"+c),d.b("      </div>"),d.b("\n"+c),d.b('      <div id="hrz-player-channels-placeholder" class="hrz-hidden hrz-channel-loading">'),d.b("\n"+c),d.b("       </div>"),d.b("\n"+c)),d.b('     <div id="hrz-player-controls-btn-langs" class="hrz-player-controls-btn hrz-player-controls-subs hrz-hidden">'),d.b("\n"+c),d.b('            <div class="hrz-player-controls-popup hrz-player-controls-btn-label">'),d.b("\n"+c),d.b('               <span class="hrz-player-controls-btn-label-content">'),d.b(d.v(d.d("msg.langsOptionsHeader",a,b,0))),d.b("</span>"),d.b("\n"+c),d.b("           </div>"),d.b("\n"+c),d.b("      </div>"),d.b("\n"+c),d.b('      <div class="hrz-player-controls-btn hrz-player-controls-volume">'),d.b("\n"+c),d.b('            <div class="hrz-player-controls-popup hrz-player-controls-volume-popup">'),d.b("\n"+c),d.b('                <div class="hrz-player-controls-volume-popup-full">'),d.b("\n"+c),d.b('                 <div class="hrz-player-controls-volume-popup-current">'),d.b("\n"+c),d.b('                      <div class="hrz-player-controls-volume-popup-marker">'),d.b("\n"+c),d.b("                       </div>"),d.b("\n"+c),d.b("                  </div>"),d.b("\n"+c),d.b("              </div>"),d.b("\n"+c),d.b("          </div>"),d.b("\n"+c),d.b("      </div>"),d.b("\n"+c),d.b('      <div class="hrz-player-controls-btn hrz-player-controls-fullscreen">'),d.b("\n"+c),d.b('            <div class="hrz-player-controls-popup hrz-player-controls-btn-label">'),d.b("\n"+c),d.b('               <span class="hrz-player-controls-btn-label-content">'),d.b(d.v(d.d("msg.fullScreen",a,b,0))),d.b("</span>"),d.b("\n"+c),d.b("           </div>"),d.b("\n"+c),d.b("      </div>"),d.b("\n"+c),d.b("  </div>"),d.b("\n"+c),d.b('  <div id="hrz-player-controls-langs-placeholder" class="hrz-hidden">'),d.b("\n"+c),d.b(" </div>"),d.b("\n"+c),d.b("</div>"),d.fl()},partials:{},subs:{}}),this.hrz.views["player/views/player-controls-langs.mustache"]=new Hogan.Template({code:function(a,b,c){var d=this;
  2916. return d.b(c=c||""),d.s(d.d("audioLangs.length",a,b,1),a,b,0,22,338,"{{ }}")&&(d.rs(a,b,function(a,b,d){d.b('<div class="hrz-player-controls-audio-left">'),d.b("\n"+c),d.b('   <div class="hrz-player-controls-langs-header">'),d.b(d.v(d.d("msg.AUDIO",a,b,0))),d.b("</div>"),d.b("\n"+c),d.b('   <div class="nano">'),d.b("\n"+c),d.b('      <div class="nano-content">'),d.b("\n"+c),d.s(d.f("audioLangs",a,b,1),a,b,0,202,298,"{{ }}")&&(d.rs(a,b,function(a,b,d){d.b('            <div data-lang="'),d.b(d.v(d.f("langCode",a,b,0))),d.b('" class="hrz-player-controls-langs-item">'),d.b(d.v(d.f("langTitle",a,b,0))),d.b("</div>"),d.b("\n"+c)}),a.pop()),d.b("     </div>"),d.b("\n"+c),d.b("  </div>"),d.b("\n"+c),d.b("</div>"),d.b("\n"+c)}),a.pop()),d.s(d.d("subtitles.length",a,b,1),a,b,0,382,820,"{{ }}")&&(d.rs(a,b,function(a,b,d){d.b('<div class="hrz-player-controls-audio-right">'),d.b("\n"+c),d.b('    <div class="hrz-player-controls-langs-header">'),d.b(d.v(d.d("msg.SUBTITLES",a,b,0))),d.b("</div>"),d.b("\n"+c),d.b('   <div class="nano">'),d.b("\n"+c),d.b('      <div class="nano-content">'),d.b("\n"+c),d.b('          <div data-subs="off" class="hrz-player-controls-langs-item hrz-player-controls-langs-item-active">'),d.b(d.v(d.d("msg.Off",a,b,0))),d.b("</div>"),d.b("\n"+c),d.s(d.f("subtitles",a,b,1),a,b,0,685,781,"{{ }}")&&(d.rs(a,b,function(a,b,d){d.b('            <div data-subs="'),d.b(d.v(d.f("langCode",a,b,0))),d.b('" class="hrz-player-controls-langs-item">'),d.b(d.v(d.f("langTitle",a,b,0))),d.b("</div>"),d.b("\n"+c)}),a.pop()),d.b("     </div>"),d.b("\n"+c),d.b("  </div>"),d.b("\n"+c),d.b("</div>"),d.b("\n"+c)}),a.pop()),d.fl()},partials:{},subs:{}}),this.hrz.views["player/views/player-element.mustache"]=new Hogan.Template({code:function(a,b,c){var d=this;
  2917. return d.b(c=c||""),d.b('<div class="hrz-player-container hrz-user-select-none hrz-player-fullscreen hrz-player-userActive hrz-player-loading"></div>'),d.fl()},partials:{},subs:{}}),this.hrz.views["player/views/player-semantics.mustache"]=new Hogan.Template({code:function(a,b,c){var d=this;
  2918. return d.b(c=c||""),d.b('<div class="hrz-player-video-container">'),d.b("\n"+c),d.b("</div>"),d.b("\n"+c),d.b('<div id="hrz-player-controls-container" class="hrz-player-controls-container">'),d.b("\n"+c),d.b("</div>"),d.b("\n"+c),d.b('<div id="hrz-player-captions-container" class="hrz-player-captions-container hrz-hidden">'),d.b("\n"+c),d.b("</div>"),d.b("\n"+c),d.b('<div class="hrz-player-splashscreen-overlay hrz-hidden">'),d.b("\n"+c),d.b('  <div class="hrz-player-splashscreen-overlay-background"></div>'),d.b("\n"+c),d.b('  <svg width="327px" height="327px" viewBox="0 0 327 327" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:sketch="http://www.bohemiancoding.com/sketch/ns">'),d.b("\n"+c),d.b("     <defs>"),d.b("\n"+c),d.b('          <filter x="-50%" y="-50%" width="200%" height="200%" filterUnits="objectBoundingBox" id="filter-1">'),d.b("\n"+c),d.b('             <feOffset dx="0" dy="0" in="SourceAlpha" result="shadowOffsetOuter1"></feOffset>'),d.b("\n"+c),d.b('                <feGaussianBlur stdDeviation="19" in="shadowOffsetOuter1" result="shadowBlurOuter1"></feGaussianBlur>'),d.b("\n"+c),d.b('               <feColorMatrix values="0 0 0 0 0   0 0 0 0 0   0 0 0 0 0  0 0 0 0.7 0" in="shadowBlurOuter1" type="matrix" result="shadowMatrixOuter1"></feColorMatrix>'),d.b("\n"+c),d.b("             <feMerge>"),d.b("\n"+c),d.b('                   <feMergeNode in="shadowMatrixOuter1"></feMergeNode>'),d.b("\n"+c),d.b('                 <feMergeNode in="SourceGraphic"></feMergeNode>'),d.b("\n"+c),d.b("              </feMerge>"),d.b("\n"+c),d.b("          </filter>"),d.b("\n"+c),d.b("       </defs>"),d.b("\n"+c),d.b('     <g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" sketch:type="MSPage">'),d.b("\n"+c),d.b('         <g id="1920x1080_playerloading" sketch:type="MSArtboardGroup" transform="translate(-797.000000, -377.000000)">'),d.b("\n"+c),d.b('              <g sketch:type="MSLayerGroup" transform="translate(834.000000, 414.000000)">'),d.b("\n"+c),d.b('                    <circle stroke="#FFFFFF" stroke-width="20.196" opacity="0.5" fill-opacity="0.7" fill="#000000" filter="url(#filter-1)" sketch:type="MSShapeGroup" cx="126.5" cy="126.5" r="126.5"></circle>'),d.b("\n"+c),d.b('                 <path d="M174.776234,126.248259 L99.2538462,75.9 L99.2538462,176.596517 L174.776234,126.248259 L174.776234,126.248259 Z" id="hrz-loading-triangle" opacity="0.6" fill="#FFFFFF" sketch:type="MSShapeGroup"></path>'),d.b("\n"+c),d.b("              </g>"),d.b("\n"+c),d.b("            </g>"),d.b("\n"+c),d.b("        </g>"),d.b("\n"+c),d.b("    </svg>"),d.b("\n"+c),d.b('  <svg id="hrz-loading-svg" width="327px" height="327px" viewBox="0 0 327 327" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:sketch="http://www.bohemiancoding.com/sketch/ns">'),d.b("\n"+c),d.b("        <defs>"),d.b("\n"+c),d.b('          <filter x="-50%" y="-50%" width="200%" height="200%" filterUnits="objectBoundingBox">'),d.b("\n"+c),d.b('               <feOffset dx="0" dy="0" in="SourceAlpha" result="shadowOffsetOuter1"></feOffset>'),d.b("\n"+c),d.b('                <feGaussianBlur stdDeviation="19" in="shadowOffsetOuter1" result="shadowBlurOuter1"></feGaussianBlur>'),d.b("\n"+c),d.b('               <feColorMatrix values="0 0 0 0 0   0 0 0 0 0   0 0 0 0 0  0 0 0 0.7 0" in="shadowBlurOuter1" type="matrix" result="shadowMatrixOuter1"></feColorMatrix>'),d.b("\n"+c),d.b("             <feMerge>"),d.b("\n"+c),d.b('                   <feMergeNode in="shadowMatrixOuter1"></feMergeNode>'),d.b("\n"+c),d.b('                 <feMergeNode in="SourceGraphic"></feMergeNode>'),d.b("\n"+c),d.b("              </feMerge>"),d.b("\n"+c),d.b("          </filter>"),d.b("\n"+c),d.b("       </defs>"),d.b("\n"+c),d.b('     <g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" sketch:type="MSPage">'),d.b("\n"+c),d.b('         <g sketch:type="MSArtboardGroup" transform="translate(-797.000000, -377.000000)">'),d.b("\n"+c),d.b('               <g sketch:type="MSLayerGroup" transform="translate(834.000000, 414.000000)">'),d.b("\n"+c),d.b('                    <circle cx="126.5" cy="126.5" stroke-dasharray="0 794.82227" style="" fill="" id="hrz-loading-circle" stroke-width="20.196" stroke="#11A8DD" r="126.5"></circle>'),d.b("\n"+c),d.b("                </g>"),d.b("\n"+c),d.b("            </g>"),d.b("\n"+c),d.b("        </g>"),d.b("\n"+c),d.b("    </svg>"),
  2919. d.b("\n"+c),d.b("</div>"),d.b("\n"+c),d.b('<div class="hrz-player-overlay hrz-hidden">'),d.b("\n"+c),d.b("</div>"),d.b("\n"+c),d.b('<div class="hrz-player-play-big-btn">'),d.b("\n"+c),d.b("</div>"),d.b("\n"+c),d.s(d.f("showBackToBrowseButton",a,b,1),a,b,0,3589,3658,"{{ }}")&&(d.rs(a,b,function(a,b,d){d.b('<div class="hrz-player-backToBrowse-btn">'),d.b(d.v(d.d("msg.backToBrowse",a,b,0))),d.b("</div>"),d.b("\n"+c)}),a.pop()),d.b('<div class="hrz-player-buffering hrz-hidden">'),d.b("\n"+c),d.b('  <div class="hrz-player-buffering-content">'),d.b("\n"+c),d.b('      <div class="hrz-player-buffering-spinner">'),d.b("\n"+c),d.b('          <div class="hrz-spinner-item hrz-spinner-item-0">'),d.b("\n"+c),d.b('               <div class="hrz-spinner-item-child hrz-spinner-item-child-0">'),d.b("\n"+c),d.b("               </div>"),d.b("\n"+c),d.b("          </div>"),d.b("\n"+c),d.b('          <div class="hrz-spinner-item hrz-spinner-item-1">'),d.b("\n"+c),d.b('               <div class="hrz-spinner-item-child hrz-spinner-item-child-1">'),d.b("\n"+c),d.b("               </div>"),d.b("\n"+c),d.b("          </div>"),d.b("\n"+c),d.b('          <div class="hrz-spinner-item hrz-spinner-item-2">'),d.b("\n"+c),d.b('               <div class="hrz-spinner-item-child hrz-spinner-item-child-2">'),d.b("\n"+c),d.b("               </div>"),d.b("\n"+c),d.b("          </div>"),d.b("\n"+c),d.b('          <div class="hrz-spinner-item hrz-spinner-item-3">'),d.b("\n"+c),d.b('               <div class="hrz-spinner-item-child hrz-spinner-item-child-3">'),d.b("\n"+c),d.b("               </div>"),d.b("\n"+c),d.b("          </div>"),d.b("\n"+c),d.b('          <div class="hrz-spinner-item hrz-spinner-item-4">'),d.b("\n"+c),d.b('               <div class="hrz-spinner-item-child hrz-spinner-item-child-4">'),d.b("\n"+c),d.b("               </div>"),d.b("\n"+c),d.b("          </div>"),d.b("\n"+c),d.b('          <div class="hrz-spinner-item hrz-spinner-item-5">'),d.b("\n"+c),d.b('               <div class="hrz-spinner-item-child hrz-spinner-item-child-5">'),d.b("\n"+c),d.b("               </div>"),d.b("\n"+c),d.b("          </div>"),d.b("\n"+c),d.b('          <div class="hrz-spinner-item hrz-spinner-item-6">'),d.b("\n"+c),d.b('               <div class="hrz-spinner-item-child hrz-spinner-item-child-6">'),d.b("\n"+c),d.b("               </div>"),d.b("\n"+c),d.b("          </div>"),d.b("\n"+c),d.b('          <div class="hrz-spinner-item hrz-spinner-item-7">'),d.b("\n"+c),d.b('               <div class="hrz-spinner-item-child hrz-spinner-item-child-7">'),d.b("\n"+c),d.b("               </div>"),d.b("\n"+c),d.b("          </div>"),d.b("\n"+c),d.b('          <div class="hrz-spinner-item hrz-spinner-item-8">'),d.b("\n"+c),d.b('               <div class="hrz-spinner-item-child hrz-spinner-item-child-8">'),d.b("\n"+c),d.b("               </div>"),d.b("\n"+c),d.b("          </div>"),d.b("\n"+c),d.b('          <div class="hrz-spinner-item hrz-spinner-item-9">'),d.b("\n"+c),d.b('               <div class="hrz-spinner-item-child hrz-spinner-item-child-9">'),d.b("\n"+c),d.b("               </div>"),d.b("\n"+c),d.b("          </div>"),d.b("\n"+c),d.b('          <div class="hrz-spinner-item hrz-spinner-item-10">'),d.b("\n"+c),d.b('              <div class="hrz-spinner-item-child hrz-spinner-item-child-10">'),d.b("\n"+c),d.b("              </div>"),d.b("\n"+c),d.b("          </div>"),d.b("\n"+c),d.b("      </div>"),d.b("\n"+c),d.b("  "),d.b(d.v(d.d("msg.buffering",a,b,0))),d.b("</div>"),d.b("\n"+c),d.b("</div>"),d.b("\n"+c),d.b('<div class="hrz-player-public-overlay hrz-hidden"></div>'),d.fl()},partials:{},subs:{}}),this.hrz.views["player/views/program-current-next.mustache"]=new Hogan.Template({code:function(a,b,c){var d=this;
  2920. return d.b(c=c||""),d.b('<div class="hrz-program-fullinfo-container">'),d.b("\n"+c),d.s(d.f("channel",a,b,1),a,b,0,58,1234,"{{ }}")&&(d.rs(a,b,function(a,b,d){d.s(d.f("currentProgram",a,b,1),a,b,0,80,628,"{{ }}")&&(d.rs(a,b,function(a,b,d){d.b('       <div class="hrz-program-fullinfo-left">'),d.b("\n"+c),d.b('         <div class="hrz-program-fullinfo-header">'),d.b("\n"+c),d.b('               <div class="hrz-program-fullinfo-header-text">'),d.b(d.v(d.d("msg.NOW",a,b,0))),d.b(": "),d.b(d.v(d.f("title",a,b,0))),d.b("</div>"),d.b("\n"+c),d.b('              <div class="hrz-program-fullinfo-header-time">'),d.b(d.v(d.f("startTime",a,b,0))),d.b(" - "),d.b(d.v(d.f("endTime",a,b,0))),d.b("</div>"),d.b("\n"+c),d.b("         </div>"),d.b("\n"+c),d.b('          <div class="hrz-program-fullinfo-image" style="background-image:url('),d.b(d.v(d.f("image",a,b,0))),d.b(');
  2921. "></div>'),d.b("\n"+c),d.b('            <div class="hrz-program-fullinfo-description nano">'),d.b("\n"+c),d.b('             <div class="nano-content">'),d.b("\n"+c),d.b('                  <div class="hrz-program-fullinfo-description-text">'),d.b(d.v(d.f("description",a,b,0))),d.b("</div>"),d.b("\n"+c),d.b("                </div>"),d.b("\n"+c),d.b("          </div>"),d.b("\n"+c),d.b("      </div>"),d.b("\n"+c)}),a.pop()),d.s(d.f("nextProgram",a,b,1),a,b,0,666,1216,"{{ }}")&&(d.rs(a,b,function(a,b,d){d.b('       <div class="hrz-program-fullinfo-right">'),d.b("\n"+c),d.b('            <div class="hrz-program-fullinfo-header">'),d.b("\n"+c),d.b('               <div class="hrz-program-fullinfo-header-text">'),d.b(d.v(d.d("msg.NEXT",a,b,0))),d.b(": "),d.b(d.v(d.f("title",a,b,0))),d.b("</div>"),d.b("\n"+c),d.b('             <div class="hrz-program-fullinfo-header-time">'),d.b(d.v(d.f("startTime",a,b,0))),d.b(" - "),d.b(d.v(d.f("endTime",a,b,0))),d.b("</div>"),d.b("\n"+c),d.b("         </div>"),d.b("\n"+c),d.b('          <div class="hrz-program-fullinfo-image" style="background-image:url('),d.b(d.v(d.f("image",a,b,0))),d.b(');
  2922. "></div>'),d.b("\n"+c),d.b('            <div class="hrz-program-fullinfo-description nano">'),d.b("\n"+c),d.b('             <div class="nano-content">'),d.b("\n"+c),d.b('                  <div class="hrz-program-fullinfo-description-text">'),d.b(d.v(d.f("description",a,b,0))),d.b("</div>"),d.b("\n"+c),d.b("                </div>"),d.b("\n"+c),d.b("          </div>"),d.b("\n"+c),d.b("      </div>"),d.b("\n"+c)}),a.pop())}),a.pop()),d.b("</div>"),d.fl()},partials:{},subs:{}}),this.hrz.views["player/views/program.mustache"]=new Hogan.Template({code:function(a,b,c){var d=this;
  2923. return d.b(c=c||""),d.b('<div class="hrz-program-fullinfo-container hrz-program-fullinfo-container-vod">'),d.b("\n"+c),d.b('    <div class="hrz-program-fullinfo-left">'),d.b("\n"+c),d.b('     <div class="hrz-program-fullinfo-header">'),d.b("\n"+c),d.b('           <div class="hrz-program-fullinfo-header-text">'),d.b(d.v(d.f("title",a,b,0))),d.b("</div>"),d.b("\n"+c),d.b("       </div>"),d.b("\n"+c),d.b('      <div class="hrz-program-fullinfo-image" style="background-image:url('),d.b(d.v(d.f("image",a,b,0))),d.b(');
  2924. "></div>'),d.b("\n"+c),d.b('        <div class="hrz-program-fullinfo-description nano">'),d.b("\n"+c),d.b('         <div class="nano-content">'),d.b("\n"+c),d.b('              <div class="hrz-program-fullinfo-description-text">'),d.b(d.v(d.f("description",a,b,0))),d.b("</div>"),d.b("\n"+c),d.b("            </div>"),d.b("\n"+c),d.b("      </div>"),d.b("\n"+c),d.b("  </div>"),d.b("\n"+c),d.b("</div>"),d.fl()},partials:{},subs:{}}),this.hrz.views["player/views/video.mustache"]=new Hogan.Template({code:function(a,b,c){var d=this;
  2925. return d.b(c=c||""),d.b('<video width="'),d.b(d.v(d.f("width",a,b,0))),d.b('" height="'),d.b(d.v(d.f("height",a,b,0))),d.b('" '),d.s(d.f("autoplay",a,b,1),a,b,0,58,66,"{{ }}")&&(d.rs(a,b,function(a,b,c){c.b("autoplay")}),a.pop()),d.b(' id="hrz-player-video" class="hrz-player-video"></video>'),d.b("\n"+c),d.s(d.f("enableMonitoringMode",a,b,1),a,b,0,161,210,"{{ }}")&&(d.rs(a,b,function(a,b,d){d.b('<div class="hrz-player-video-monitoring"></div>'),d.b("\n"+c)}),a.pop()),d.fl()},partials:{},subs:{}});
Add Comment
Please, Sign In to add comment