2025-04-30 20:18:25 -04:00

161 lines
1.2 MiB
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

var Bk=(E,A)=>()=>(A||E((A={exports:{}}).exports,A),A.exports);var lP=Bk((bP,sg)=>{(function(){const A=document.createElement("link").relList;if(A&&A.supports&&A.supports("modulepreload"))return;for(const w of document.querySelectorAll('link[rel="modulepreload"]'))S(w);new MutationObserver(w=>{for(const P of w)if(P.type==="childList")for(const O of P.addedNodes)O.tagName==="LINK"&&O.rel==="modulepreload"&&S(O)}).observe(document,{childList:!0,subtree:!0});function k(w){const P={};return w.integrity&&(P.integrity=w.integrity),w.referrerPolicy&&(P.referrerPolicy=w.referrerPolicy),w.crossOrigin==="use-credentials"?P.credentials="include":w.crossOrigin==="anonymous"?P.credentials="omit":P.credentials="same-origin",P}function S(w){if(w.ep)return;w.ep=!0;const P=k(w);fetch(w.href,P)}})();var Vk=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Np(E){return E&&E.__esModule&&Object.prototype.hasOwnProperty.call(E,"default")?E.default:E}var o2={exports:{}},tg={};/**
* @license React
* react-jsx-runtime.production.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var VA;function Hk(){if(VA)return tg;VA=1;var E=Symbol.for("react.transitional.element"),A=Symbol.for("react.fragment");function k(S,w,P){var O=null;if(P!==void 0&&(O=""+P),w.key!==void 0&&(O=""+w.key),"key"in w){P={};for(var h in w)h!=="key"&&(P[h]=w[h])}else P=w;return w=P.ref,{$$typeof:E,type:S,key:O,ref:w!==void 0?w:null,props:P}}return tg.Fragment=A,tg.jsx=k,tg.jsxs=k,tg}var HA;function Kk(){return HA||(HA=1,o2.exports=Hk()),o2.exports}var te=Kk(),l2={exports:{}},qt={};/**
* @license React
* react.production.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var KA;function qk(){if(KA)return qt;KA=1;var E=Symbol.for("react.transitional.element"),A=Symbol.for("react.portal"),k=Symbol.for("react.fragment"),S=Symbol.for("react.strict_mode"),w=Symbol.for("react.profiler"),P=Symbol.for("react.consumer"),O=Symbol.for("react.context"),h=Symbol.for("react.forward_ref"),s=Symbol.for("react.suspense"),a=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),v=Symbol.iterator;function M(ae){return ae===null||typeof ae!="object"?null:(ae=v&&ae[v]||ae["@@iterator"],typeof ae=="function"?ae:null)}var F={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},b=Object.assign,J={};function $(ae,Ne,tt){this.props=ae,this.context=Ne,this.refs=J,this.updater=tt||F}$.prototype.isReactComponent={},$.prototype.setState=function(ae,Ne){if(typeof ae!="object"&&typeof ae!="function"&&ae!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,ae,Ne,"setState")},$.prototype.forceUpdate=function(ae){this.updater.enqueueForceUpdate(this,ae,"forceUpdate")};function ce(){}ce.prototype=$.prototype;function Re(ae,Ne,tt){this.props=ae,this.context=Ne,this.refs=J,this.updater=tt||F}var ee=Re.prototype=new ce;ee.constructor=Re,b(ee,$.prototype),ee.isPureReactComponent=!0;var be=Array.isArray,Oe={H:null,A:null,T:null,S:null,V:null},ot=Object.prototype.hasOwnProperty;function et(ae,Ne,tt,Fe,z,Et){return tt=Et.ref,{$$typeof:E,type:ae,key:Ne,ref:tt!==void 0?tt:null,props:Et}}function pt(ae,Ne){return et(ae.type,Ne,void 0,void 0,void 0,ae.props)}function Nt(ae){return typeof ae=="object"&&ae!==null&&ae.$$typeof===E}function _(ae){var Ne={"=":"=0",":":"=2"};return"$"+ae.replace(/[=:]/g,function(tt){return Ne[tt]})}var se=/\/+/g;function pe(ae,Ne){return typeof ae=="object"&&ae!==null&&ae.key!=null?_(""+ae.key):Ne.toString(36)}function rt(){}function Ue(ae){switch(ae.status){case"fulfilled":return ae.value;case"rejected":throw ae.reason;default:switch(typeof ae.status=="string"?ae.then(rt,rt):(ae.status="pending",ae.then(function(Ne){ae.status==="pending"&&(ae.status="fulfilled",ae.value=Ne)},function(Ne){ae.status==="pending"&&(ae.status="rejected",ae.reason=Ne)})),ae.status){case"fulfilled":return ae.value;case"rejected":throw ae.reason}}throw ae}function Me(ae,Ne,tt,Fe,z){var Et=typeof ae;(Et==="undefined"||Et==="boolean")&&(ae=null);var yt=!1;if(ae===null)yt=!0;else switch(Et){case"bigint":case"string":case"number":yt=!0;break;case"object":switch(ae.$$typeof){case E:case A:yt=!0;break;case p:return yt=ae._init,Me(yt(ae._payload),Ne,tt,Fe,z)}}if(yt)return z=z(ae),yt=Fe===""?"."+pe(ae,0):Fe,be(z)?(tt="",yt!=null&&(tt=yt.replace(se,"$&/")+"/"),Me(z,Ne,tt,"",function(cl){return cl})):z!=null&&(Nt(z)&&(z=pt(z,tt+(z.key==null||ae&&ae.key===z.key?"":(""+z.key).replace(se,"$&/")+"/")+yt)),Ne.push(z)),1;yt=0;var qi=Fe===""?".":Fe+":";if(be(ae))for(var xn=0;xn<ae.length;xn++)Fe=ae[xn],Et=qi+pe(Fe,xn),yt+=Me(Fe,Ne,tt,Et,z);else if(xn=M(ae),typeof xn=="function")for(ae=xn.call(ae),xn=0;!(Fe=ae.next()).done;)Fe=Fe.value,Et=qi+pe(Fe,xn++),yt+=Me(Fe,Ne,tt,Et,z);else if(Et==="object"){if(typeof ae.then=="function")return Me(Ue(ae),Ne,tt,Fe,z);throw Ne=String(ae),Error("Objects are not valid as a React child (found: "+(Ne==="[object Object]"?"object with keys {"+Object.keys(ae).join(", ")+"}":Ne)+"). If you meant to render a collection of children, use an array instead.")}return yt}function Te(ae,Ne,tt){if(ae==null)return ae;var Fe=[],z=0;return Me(ae,Fe,"","",function(Et){return Ne.call(tt,Et,z++)}),Fe}function je(ae){if(ae._status===-1){var Ne=ae._result;Ne=Ne(),Ne.then(function(tt){(ae._status===0||ae._status===-1)&&(ae._status=1,ae._result=tt)},function(tt){(ae._status===0||ae._status===-1)&&(ae._status=2,ae._result=tt)}),ae._status===-1&&(ae._status=0,ae._result=Ne)}if(ae._status===1)return ae._result.default;throw ae._result}var ht=typeof reportError=="function"?reportError:function(ae){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var Ne=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof ae=="object"&&ae!==null&&typeof ae.message=="string"?String(ae.message):String(ae),error:ae});if(!window.dispatchEvent(Ne))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",ae);return}console.error(ae)};function Tn(){}return qt.Children={map:Te,forEach:function(ae,Ne,tt){Te(ae,function(){Ne.apply(this,arguments)},tt)},count:function(ae){var Ne=0;return Te(ae,function(){Ne++}),Ne},toArray:function(ae){return Te(ae,function(Ne){return Ne})||[]},only:function(ae){if(!Nt(ae))throw Error("React.Children.only expected to receive a single React element child.");return ae}},qt.Component=$,qt.Fragment=k,qt.Profiler=w,qt.PureComponent=Re,qt.StrictMode=S,qt.Suspense=s,qt.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=Oe,qt.__COMPILER_RUNTIME={__proto__:null,c:function(ae){return Oe.H.useMemoCache(ae)}},qt.cache=function(ae){return function(){return ae.apply(null,arguments)}},qt.cloneElement=function(ae,Ne,tt){if(ae==null)throw Error("The argument must be a React element, but you passed "+ae+".");var Fe=b({},ae.props),z=ae.key,Et=void 0;if(Ne!=null)for(yt in Ne.ref!==void 0&&(Et=void 0),Ne.key!==void 0&&(z=""+Ne.key),Ne)!ot.call(Ne,yt)||yt==="key"||yt==="__self"||yt==="__source"||yt==="ref"&&Ne.ref===void 0||(Fe[yt]=Ne[yt]);var yt=arguments.length-2;if(yt===1)Fe.children=tt;else if(1<yt){for(var qi=Array(yt),xn=0;xn<yt;xn++)qi[xn]=arguments[xn+2];Fe.children=qi}return et(ae.type,z,void 0,void 0,Et,Fe)},qt.createContext=function(ae){return ae={$$typeof:O,_currentValue:ae,_currentValue2:ae,_threadCount:0,Provider:null,Consumer:null},ae.Provider=ae,ae.Consumer={$$typeof:P,_context:ae},ae},qt.createElement=function(ae,Ne,tt){var Fe,z={},Et=null;if(Ne!=null)for(Fe in Ne.key!==void 0&&(Et=""+Ne.key),Ne)ot.call(Ne,Fe)&&Fe!=="key"&&Fe!=="__self"&&Fe!=="__source"&&(z[Fe]=Ne[Fe]);var yt=arguments.length-2;if(yt===1)z.children=tt;else if(1<yt){for(var qi=Array(yt),xn=0;xn<yt;xn++)qi[xn]=arguments[xn+2];z.children=qi}if(ae&&ae.defaultProps)for(Fe in yt=ae.defaultProps,yt)z[Fe]===void 0&&(z[Fe]=yt[Fe]);return et(ae,Et,void 0,void 0,null,z)},qt.createRef=function(){return{current:null}},qt.forwardRef=function(ae){return{$$typeof:h,render:ae}},qt.isValidElement=Nt,qt.lazy=function(ae){return{$$typeof:p,_payload:{_status:-1,_result:ae},_init:je}},qt.memo=function(ae,Ne){return{$$typeof:a,type:ae,compare:Ne===void 0?null:Ne}},qt.startTransition=function(ae){var Ne=Oe.T,tt={};Oe.T=tt;try{var Fe=ae(),z=Oe.S;z!==null&&z(tt,Fe),typeof Fe=="object"&&Fe!==null&&typeof Fe.then=="function"&&Fe.then(Tn,ht)}catch(Et){ht(Et)}finally{Oe.T=Ne}},qt.unstable_useCacheRefresh=function(){return Oe.H.useCacheRefresh()},qt.use=function(ae){return Oe.H.use(ae)},qt.useActionState=function(ae,Ne,tt){return Oe.H.useActionState(ae,Ne,tt)},qt.useCallback=function(ae,Ne){return Oe.H.useCallback(ae,Ne)},qt.useContext=function(ae){return Oe.H.useContext(ae)},qt.useDebugValue=function(){},qt.useDeferredValue=function(ae,Ne){return Oe.H.useDeferredValue(ae,Ne)},qt.useEffect=function(ae,Ne,tt){var Fe=Oe.H;if(typeof tt=="function")throw Error("useEffect CRUD overload is not enabled in this build of React.");return Fe.useEffect(ae,Ne)},qt.useId=function(){return Oe.H.useId()},qt.useImperativeHandle=function(ae,Ne,tt){return Oe.H.useImperativeHandle(ae,Ne,tt)},qt.useInsertionEffect=function(ae,Ne){return Oe.H.useInsertionEffect(ae,Ne)},qt.useLayoutEffect=function(ae,Ne){return Oe.H.useLayoutEffect(ae,Ne)},qt.useMemo=function(ae,Ne){return Oe.H.useMemo(ae,Ne)},qt.useOptimistic=function(ae,Ne){return Oe.H.useOptimistic(ae,Ne)},qt.useReducer=function(ae,Ne,tt){return Oe.H.useReducer(ae,Ne,tt)},qt.useRef=function(ae){return Oe.H.useRef(ae)},qt.useState=function(ae){return Oe.H.useState(ae)},qt.useSyncExternalStore=function(ae,Ne,tt){return Oe.H.useSyncExternalStore(ae,Ne,tt)},qt.useTransition=function(){return Oe.H.useTransition()},qt.version="19.1.0",qt}var qA;function y0(){return qA||(qA=1,l2.exports=qk()),l2.exports}var ve=y0();const cg=Np(ve);var a2={exports:{}},ng={},u2={exports:{}},s2={};/**
* @license React
* scheduler.production.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var FA;function Fk(){return FA||(FA=1,function(E){function A(Te,je){var ht=Te.length;Te.push(je);e:for(;0<ht;){var Tn=ht-1>>>1,ae=Te[Tn];if(0<w(ae,je))Te[Tn]=je,Te[ht]=ae,ht=Tn;else break e}}function k(Te){return Te.length===0?null:Te[0]}function S(Te){if(Te.length===0)return null;var je=Te[0],ht=Te.pop();if(ht!==je){Te[0]=ht;e:for(var Tn=0,ae=Te.length,Ne=ae>>>1;Tn<Ne;){var tt=2*(Tn+1)-1,Fe=Te[tt],z=tt+1,Et=Te[z];if(0>w(Fe,ht))z<ae&&0>w(Et,Fe)?(Te[Tn]=Et,Te[z]=ht,Tn=z):(Te[Tn]=Fe,Te[tt]=ht,Tn=tt);else if(z<ae&&0>w(Et,ht))Te[Tn]=Et,Te[z]=ht,Tn=z;else break e}}return je}function w(Te,je){var ht=Te.sortIndex-je.sortIndex;return ht!==0?ht:Te.id-je.id}if(E.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var P=performance;E.unstable_now=function(){return P.now()}}else{var O=Date,h=O.now();E.unstable_now=function(){return O.now()-h}}var s=[],a=[],p=1,v=null,M=3,F=!1,b=!1,J=!1,$=!1,ce=typeof setTimeout=="function"?setTimeout:null,Re=typeof clearTimeout=="function"?clearTimeout:null,ee=typeof setImmediate<"u"?setImmediate:null;function be(Te){for(var je=k(a);je!==null;){if(je.callback===null)S(a);else if(je.startTime<=Te)S(a),je.sortIndex=je.expirationTime,A(s,je);else break;je=k(a)}}function Oe(Te){if(J=!1,be(Te),!b)if(k(s)!==null)b=!0,ot||(ot=!0,pe());else{var je=k(a);je!==null&&Me(Oe,je.startTime-Te)}}var ot=!1,et=-1,pt=5,Nt=-1;function _(){return $?!0:!(E.unstable_now()-Nt<pt)}function se(){if($=!1,ot){var Te=E.unstable_now();Nt=Te;var je=!0;try{e:{b=!1,J&&(J=!1,Re(et),et=-1),F=!0;var ht=M;try{t:{for(be(Te),v=k(s);v!==null&&!(v.expirationTime>Te&&_());){var Tn=v.callback;if(typeof Tn=="function"){v.callback=null,M=v.priorityLevel;var ae=Tn(v.expirationTime<=Te);if(Te=E.unstable_now(),typeof ae=="function"){v.callback=ae,be(Te),je=!0;break t}v===k(s)&&S(s),be(Te)}else S(s);v=k(s)}if(v!==null)je=!0;else{var Ne=k(a);Ne!==null&&Me(Oe,Ne.startTime-Te),je=!1}}break e}finally{v=null,M=ht,F=!1}je=void 0}}finally{je?pe():ot=!1}}}var pe;if(typeof ee=="function")pe=function(){ee(se)};else if(typeof MessageChannel<"u"){var rt=new MessageChannel,Ue=rt.port2;rt.port1.onmessage=se,pe=function(){Ue.postMessage(null)}}else pe=function(){ce(se,0)};function Me(Te,je){et=ce(function(){Te(E.unstable_now())},je)}E.unstable_IdlePriority=5,E.unstable_ImmediatePriority=1,E.unstable_LowPriority=4,E.unstable_NormalPriority=3,E.unstable_Profiling=null,E.unstable_UserBlockingPriority=2,E.unstable_cancelCallback=function(Te){Te.callback=null},E.unstable_forceFrameRate=function(Te){0>Te||125<Te?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):pt=0<Te?Math.floor(1e3/Te):5},E.unstable_getCurrentPriorityLevel=function(){return M},E.unstable_next=function(Te){switch(M){case 1:case 2:case 3:var je=3;break;default:je=M}var ht=M;M=je;try{return Te()}finally{M=ht}},E.unstable_requestPaint=function(){$=!0},E.unstable_runWithPriority=function(Te,je){switch(Te){case 1:case 2:case 3:case 4:case 5:break;default:Te=3}var ht=M;M=Te;try{return je()}finally{M=ht}},E.unstable_scheduleCallback=function(Te,je,ht){var Tn=E.unstable_now();switch(typeof ht=="object"&&ht!==null?(ht=ht.delay,ht=typeof ht=="number"&&0<ht?Tn+ht:Tn):ht=Tn,Te){case 1:var ae=-1;break;case 2:ae=250;break;case 5:ae=1073741823;break;case 4:ae=1e4;break;default:ae=5e3}return ae=ht+ae,Te={id:p++,callback:je,priorityLevel:Te,startTime:ht,expirationTime:ae,sortIndex:-1},ht>Tn?(Te.sortIndex=ht,A(a,Te),k(s)===null&&Te===k(a)&&(J?(Re(et),et=-1):J=!0,Me(Oe,ht-Tn))):(Te.sortIndex=ae,A(s,Te),b||F||(b=!0,ot||(ot=!0,pe()))),Te},E.unstable_shouldYield=_,E.unstable_wrapCallback=function(Te){var je=M;return function(){var ht=M;M=je;try{return Te.apply(this,arguments)}finally{M=ht}}}}(s2)),s2}var zA;function zk(){return zA||(zA=1,u2.exports=Fk()),u2.exports}var c2={exports:{}},gr={};/**
* @license React
* react-dom.production.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var GA;function Gk(){if(GA)return gr;GA=1;var E=y0();function A(s){var a="https://react.dev/errors/"+s;if(1<arguments.length){a+="?args[]="+encodeURIComponent(arguments[1]);for(var p=2;p<arguments.length;p++)a+="&args[]="+encodeURIComponent(arguments[p])}return"Minified React error #"+s+"; visit "+a+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function k(){}var S={d:{f:k,r:function(){throw Error(A(522))},D:k,C:k,L:k,m:k,X:k,S:k,M:k},p:0,findDOMNode:null},w=Symbol.for("react.portal");function P(s,a,p){var v=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:w,key:v==null?null:""+v,children:s,containerInfo:a,implementation:p}}var O=E.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function h(s,a){if(s==="font")return"";if(typeof a=="string")return a==="use-credentials"?a:""}return gr.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=S,gr.createPortal=function(s,a){var p=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!a||a.nodeType!==1&&a.nodeType!==9&&a.nodeType!==11)throw Error(A(299));return P(s,a,null,p)},gr.flushSync=function(s){var a=O.T,p=S.p;try{if(O.T=null,S.p=2,s)return s()}finally{O.T=a,S.p=p,S.d.f()}},gr.preconnect=function(s,a){typeof s=="string"&&(a?(a=a.crossOrigin,a=typeof a=="string"?a==="use-credentials"?a:"":void 0):a=null,S.d.C(s,a))},gr.prefetchDNS=function(s){typeof s=="string"&&S.d.D(s)},gr.preinit=function(s,a){if(typeof s=="string"&&a&&typeof a.as=="string"){var p=a.as,v=h(p,a.crossOrigin),M=typeof a.integrity=="string"?a.integrity:void 0,F=typeof a.fetchPriority=="string"?a.fetchPriority:void 0;p==="style"?S.d.S(s,typeof a.precedence=="string"?a.precedence:void 0,{crossOrigin:v,integrity:M,fetchPriority:F}):p==="script"&&S.d.X(s,{crossOrigin:v,integrity:M,fetchPriority:F,nonce:typeof a.nonce=="string"?a.nonce:void 0})}},gr.preinitModule=function(s,a){if(typeof s=="string")if(typeof a=="object"&&a!==null){if(a.as==null||a.as==="script"){var p=h(a.as,a.crossOrigin);S.d.M(s,{crossOrigin:p,integrity:typeof a.integrity=="string"?a.integrity:void 0,nonce:typeof a.nonce=="string"?a.nonce:void 0})}}else a==null&&S.d.M(s)},gr.preload=function(s,a){if(typeof s=="string"&&typeof a=="object"&&a!==null&&typeof a.as=="string"){var p=a.as,v=h(p,a.crossOrigin);S.d.L(s,p,{crossOrigin:v,integrity:typeof a.integrity=="string"?a.integrity:void 0,nonce:typeof a.nonce=="string"?a.nonce:void 0,type:typeof a.type=="string"?a.type:void 0,fetchPriority:typeof a.fetchPriority=="string"?a.fetchPriority:void 0,referrerPolicy:typeof a.referrerPolicy=="string"?a.referrerPolicy:void 0,imageSrcSet:typeof a.imageSrcSet=="string"?a.imageSrcSet:void 0,imageSizes:typeof a.imageSizes=="string"?a.imageSizes:void 0,media:typeof a.media=="string"?a.media:void 0})}},gr.preloadModule=function(s,a){if(typeof s=="string")if(a){var p=h(a.as,a.crossOrigin);S.d.m(s,{as:typeof a.as=="string"&&a.as!=="script"?a.as:void 0,crossOrigin:p,integrity:typeof a.integrity=="string"?a.integrity:void 0})}else S.d.m(s)},gr.requestFormReset=function(s){S.d.r(s)},gr.unstable_batchedUpdates=function(s,a){return s(a)},gr.useFormState=function(s,a,p){return O.H.useFormState(s,a,p)},gr.useFormStatus=function(){return O.H.useHostTransitionStatus()},gr.version="19.1.0",gr}var XA;function Xk(){if(XA)return c2.exports;XA=1;function E(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(E)}catch(A){console.error(A)}}return E(),c2.exports=Gk(),c2.exports}/**
* @license React
* react-dom-client.production.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var YA;function Yk(){if(YA)return ng;YA=1;var E=zk(),A=y0(),k=Xk();function S(o){var u="https://react.dev/errors/"+o;if(1<arguments.length){u+="?args[]="+encodeURIComponent(arguments[1]);for(var d=2;d<arguments.length;d++)u+="&args[]="+encodeURIComponent(arguments[d])}return"Minified React error #"+o+"; visit "+u+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function w(o){return!(!o||o.nodeType!==1&&o.nodeType!==9&&o.nodeType!==11)}function P(o){var u=o,d=o;if(o.alternate)for(;u.return;)u=u.return;else{o=u;do u=o,(u.flags&4098)!==0&&(d=u.return),o=u.return;while(o)}return u.tag===3?d:null}function O(o){if(o.tag===13){var u=o.memoizedState;if(u===null&&(o=o.alternate,o!==null&&(u=o.memoizedState)),u!==null)return u.dehydrated}return null}function h(o){if(P(o)!==o)throw Error(S(188))}function s(o){var u=o.alternate;if(!u){if(u=P(o),u===null)throw Error(S(188));return u!==o?null:o}for(var d=o,g=u;;){var C=d.return;if(C===null)break;var I=C.alternate;if(I===null){if(g=C.return,g!==null){d=g;continue}break}if(C.child===I.child){for(I=C.child;I;){if(I===d)return h(C),o;if(I===g)return h(C),u;I=I.sibling}throw Error(S(188))}if(d.return!==g.return)d=C,g=I;else{for(var B=!1,H=C.child;H;){if(H===d){B=!0,d=C,g=I;break}if(H===g){B=!0,g=C,d=I;break}H=H.sibling}if(!B){for(H=I.child;H;){if(H===d){B=!0,d=I,g=C;break}if(H===g){B=!0,g=I,d=C;break}H=H.sibling}if(!B)throw Error(S(189))}}if(d.alternate!==g)throw Error(S(190))}if(d.tag!==3)throw Error(S(188));return d.stateNode.current===d?o:u}function a(o){var u=o.tag;if(u===5||u===26||u===27||u===6)return o;for(o=o.child;o!==null;){if(u=a(o),u!==null)return u;o=o.sibling}return null}var p=Object.assign,v=Symbol.for("react.element"),M=Symbol.for("react.transitional.element"),F=Symbol.for("react.portal"),b=Symbol.for("react.fragment"),J=Symbol.for("react.strict_mode"),$=Symbol.for("react.profiler"),ce=Symbol.for("react.provider"),Re=Symbol.for("react.consumer"),ee=Symbol.for("react.context"),be=Symbol.for("react.forward_ref"),Oe=Symbol.for("react.suspense"),ot=Symbol.for("react.suspense_list"),et=Symbol.for("react.memo"),pt=Symbol.for("react.lazy"),Nt=Symbol.for("react.activity"),_=Symbol.for("react.memo_cache_sentinel"),se=Symbol.iterator;function pe(o){return o===null||typeof o!="object"?null:(o=se&&o[se]||o["@@iterator"],typeof o=="function"?o:null)}var rt=Symbol.for("react.client.reference");function Ue(o){if(o==null)return null;if(typeof o=="function")return o.$$typeof===rt?null:o.displayName||o.name||null;if(typeof o=="string")return o;switch(o){case b:return"Fragment";case $:return"Profiler";case J:return"StrictMode";case Oe:return"Suspense";case ot:return"SuspenseList";case Nt:return"Activity"}if(typeof o=="object")switch(o.$$typeof){case F:return"Portal";case ee:return(o.displayName||"Context")+".Provider";case Re:return(o._context.displayName||"Context")+".Consumer";case be:var u=o.render;return o=o.displayName,o||(o=u.displayName||u.name||"",o=o!==""?"ForwardRef("+o+")":"ForwardRef"),o;case et:return u=o.displayName||null,u!==null?u:Ue(o.type)||"Memo";case pt:u=o._payload,o=o._init;try{return Ue(o(u))}catch{}}return null}var Me=Array.isArray,Te=A.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,je=k.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ht={pending:!1,data:null,method:null,action:null},Tn=[],ae=-1;function Ne(o){return{current:o}}function tt(o){0>ae||(o.current=Tn[ae],Tn[ae]=null,ae--)}function Fe(o,u){ae++,Tn[ae]=o.current,o.current=u}var z=Ne(null),Et=Ne(null),yt=Ne(null),qi=Ne(null);function xn(o,u){switch(Fe(yt,u),Fe(Et,o),Fe(z,null),u.nodeType){case 9:case 11:o=(o=u.documentElement)&&(o=o.namespaceURI)?$d(o):0;break;default:if(o=u.tagName,u=u.namespaceURI)u=$d(u),o=Dm(u,o);else switch(o){case"svg":o=1;break;case"math":o=2;break;default:o=0}}tt(z),Fe(z,o)}function cl(){tt(z),tt(Et),tt(yt)}function jp(o){o.memoizedState!==null&&Fe(qi,o);var u=z.current,d=Dm(u,o.type);u!==d&&(Fe(Et,o),Fe(z,d))}function Xf(o){Et.current===o&&(tt(z),tt(Et)),qi.current===o&&(tt(qi),Rf._currentValue=ht)}var Pe=Object.prototype.hasOwnProperty,Bp=E.unstable_scheduleCallback,Vp=E.unstable_cancelCallback,Wu=E.unstable_shouldYield,Yf=E.unstable_requestPaint,tr=E.unstable_now,C0=E.unstable_getCurrentPriorityLevel,no=E.unstable_ImmediatePriority,bt=E.unstable_UserBlockingPriority,_o=E.unstable_NormalPriority,b0=E.unstable_LowPriority,I0=E.unstable_IdlePriority,G2=E.log,Sg=E.unstable_setDisableYieldValue,ea=null,vt=null;function fl(o){if(typeof G2=="function"&&Sg(o),vt&&typeof vt.setStrictMode=="function")try{vt.setStrictMode(ea,o)}catch{}}var vr=Math.clz32?Math.clz32:Hp,D0=Math.log,wg=Math.LN2;function Hp(o){return o>>>=0,o===0?32:31-(D0(o)/wg|0)|0}var Ot=256,Wf=4194304;function ja(o){var u=o&42;if(u!==0)return u;switch(o&-o){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return o&4194048;case 4194304:case 8388608:case 16777216:case 33554432:return o&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return o}}function Tc(o,u,d){var g=o.pendingLanes;if(g===0)return 0;var C=0,I=o.suspendedLanes,B=o.pingedLanes;o=o.warmLanes;var H=g&134217727;return H!==0?(g=H&~I,g!==0?C=ja(g):(B&=H,B!==0?C=ja(B):d||(d=H&~o,d!==0&&(C=ja(d))))):(H=g&~I,H!==0?C=ja(H):B!==0?C=ja(B):d||(d=g&~o,d!==0&&(C=ja(d)))),C===0?0:u!==0&&u!==C&&(u&I)===0&&(I=C&-C,d=u&-u,I>=d||I===32&&(d&4194048)!==0)?u:C}function xc(o,u){return(o.pendingLanes&~(o.suspendedLanes&~o.pingedLanes)&u)===0}function pn(o,u){switch(o){case 1:case 2:case 4:case 8:case 64:return u+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return u+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Ec(){var o=Ot;return Ot<<=1,(Ot&4194048)===0&&(Ot=256),o}function Ac(){var o=Wf;return Wf<<=1,(Wf&62914560)===0&&(Wf=4194304),o}function Cc(o){for(var u=[],d=0;31>d;d++)u.push(o);return u}function io(o,u){o.pendingLanes|=u,u!==268435456&&(o.suspendedLanes=0,o.pingedLanes=0,o.warmLanes=0)}function Qu(o,u,d,g,C,I){var B=o.pendingLanes;o.pendingLanes=d,o.suspendedLanes=0,o.pingedLanes=0,o.warmLanes=0,o.expiredLanes&=d,o.entangledLanes&=d,o.errorRecoveryDisabledLanes&=d,o.shellSuspendCounter=0;var H=o.entanglements,ie=o.expirationTimes,me=o.hiddenUpdates;for(d=B&~d;0<d;){var Ae=31-vr(d),Ie=1<<Ae;H[Ae]=0,ie[Ae]=-1;var Se=me[Ae];if(Se!==null)for(me[Ae]=null,Ae=0;Ae<Se.length;Ae++){var we=Se[Ae];we!==null&&(we.lane&=-536870913)}d&=~Ie}g!==0&&Ju(o,g,0),I!==0&&C===0&&o.tag!==0&&(o.suspendedLanes|=I&~(B&~u))}function Ju(o,u,d){o.pendingLanes|=u,o.suspendedLanes&=~u;var g=31-vr(u);o.entangledLanes|=u,o.entanglements[g]=o.entanglements[g]|1073741824|d&4194090}function Tg(o,u){var d=o.entangledLanes|=u;for(o=o.entanglements;d;){var g=31-vr(d),C=1<<g;C&u|o[g]&u&&(o[g]|=u),d&=~C}}function Qf(o){switch(o){case 2:o=1;break;case 8:o=4;break;case 32:o=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:o=128;break;case 268435456:o=134217728;break;default:o=0}return o}function Kp(o){return o&=-o,2<o?8<o?(o&134217727)!==0?32:268435456:8:2}function xg(){var o=je.p;return o!==0?o:(o=window.event,o===void 0?32:hy(o.type))}function O0(o,u){var d=je.p;try{return je.p=o,u()}finally{je.p=d}}var ta=Math.random().toString(36).slice(2),Jn="__reactFiber$"+ta,ki="__reactProps$"+ta,Ba="__reactContainer$"+ta,na="__reactEvents$"+ta,dl="__reactListeners$"+ta,Sr="__reactHandles$"+ta,Ze="__reactResources$"+ta,Zu="__reactMarker$"+ta;function Ei(o){delete o[Jn],delete o[ki],delete o[na],delete o[dl],delete o[Sr]}function ia(o){var u=o[Jn];if(u)return u;for(var d=o.parentNode;d;){if(u=d[Ba]||d[Jn]){if(d=u.alternate,u.child!==null||d!==null&&d.child!==null)for(o=Rm(o);o!==null;){if(d=o[Jn])return d;o=Rm(o)}return u}o=d,d=o.parentNode}return null}function Y(o){if(o=o[Jn]||o[Ba]){var u=o.tag;if(u===5||u===6||u===13||u===26||u===27||u===3)return o}return null}function pl(o){var u=o.tag;if(u===5||u===26||u===27||u===6)return o.stateNode;throw Error(S(33))}function Va(o){var u=o[Ze];return u||(u=o[Ze]={hoistableStyles:new Map,hoistableScripts:new Map}),u}function ri(o){o[Zu]=!0}var Jf=new Set,bc={};function Uo(o,u){ro(o,u),ro(o+"Capture",u)}function ro(o,u){for(bc[o]=u,o=0;o<u.length;o++)Jf.add(u[o])}var Ic=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),dt={},oo={};function Dc(o){return Pe.call(oo,o)?!0:Pe.call(dt,o)?!1:Ic.test(o)?oo[o]=!0:(dt[o]=!0,!1)}function ra(o,u,d){if(Dc(u))if(d===null)o.removeAttribute(u);else{switch(typeof d){case"undefined":case"function":case"symbol":o.removeAttribute(u);return;case"boolean":var g=u.toLowerCase().slice(0,5);if(g!=="data-"&&g!=="aria-"){o.removeAttribute(u);return}}o.setAttribute(u,""+d)}}function nr(o,u,d){if(d===null)o.removeAttribute(u);else{switch(typeof d){case"undefined":case"function":case"symbol":case"boolean":o.removeAttribute(u);return}o.setAttribute(u,""+d)}}function di(o,u,d,g){if(g===null)o.removeAttribute(d);else{switch(typeof g){case"undefined":case"function":case"symbol":case"boolean":o.removeAttribute(d);return}o.setAttributeNS(u,d,""+g)}}var lo,jo;function hl(o){if(lo===void 0)try{throw Error()}catch(d){var u=d.stack.trim().match(/\n( *(at )?)/);lo=u&&u[1]||"",jo=-1<d.stack.indexOf(`
at`)?" (<anonymous>)":-1<d.stack.indexOf("@")?"@unknown:0:0":""}return`
`+lo+o+jo}var ir=!1;function Zf(o,u){if(!o||ir)return"";ir=!0;var d=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var g={DetermineComponentFrameRoot:function(){try{if(u){var Ie=function(){throw Error()};if(Object.defineProperty(Ie.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Ie,[])}catch(we){var Se=we}Reflect.construct(o,[],Ie)}else{try{Ie.call()}catch(we){Se=we}o.call(Ie.prototype)}}else{try{throw Error()}catch(we){Se=we}(Ie=o())&&typeof Ie.catch=="function"&&Ie.catch(function(){})}}catch(we){if(we&&Se&&typeof we.stack=="string")return[we.stack,Se.stack]}return[null,null]}};g.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var C=Object.getOwnPropertyDescriptor(g.DetermineComponentFrameRoot,"name");C&&C.configurable&&Object.defineProperty(g.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var I=g.DetermineComponentFrameRoot(),B=I[0],H=I[1];if(B&&H){var ie=B.split(`
`),me=H.split(`
`);for(C=g=0;g<ie.length&&!ie[g].includes("DetermineComponentFrameRoot");)g++;for(;C<me.length&&!me[C].includes("DetermineComponentFrameRoot");)C++;if(g===ie.length||C===me.length)for(g=ie.length-1,C=me.length-1;1<=g&&0<=C&&ie[g]!==me[C];)C--;for(;1<=g&&0<=C;g--,C--)if(ie[g]!==me[C]){if(g!==1||C!==1)do if(g--,C--,0>C||ie[g]!==me[C]){var Ae=`
`+ie[g].replace(" at new "," at ");return o.displayName&&Ae.includes("<anonymous>")&&(Ae=Ae.replace("<anonymous>",o.displayName)),Ae}while(1<=g&&0<=C);break}}}finally{ir=!1,Error.prepareStackTrace=d}return(d=o?o.displayName||o.name:"")?hl(d):""}function oi(o){switch(o.tag){case 26:case 27:case 5:return hl(o.type);case 16:return hl("Lazy");case 13:return hl("Suspense");case 19:return hl("SuspenseList");case 0:case 15:return Zf(o.type,!1);case 11:return Zf(o.type.render,!1);case 1:return Zf(o.type,!0);case 31:return hl("Activity");default:return""}}function Ha(o){try{var u="";do u+=oi(o),o=o.return;while(o);return u}catch(d){return`
Error generating stack: `+d.message+`
`+d.stack}}function Gn(o){switch(typeof o){case"bigint":case"boolean":case"number":case"string":case"undefined":return o;case"object":return o;default:return""}}function Oc(o){var u=o.type;return(o=o.nodeName)&&o.toLowerCase()==="input"&&(u==="checkbox"||u==="radio")}function Eg(o){var u=Oc(o)?"checked":"value",d=Object.getOwnPropertyDescriptor(o.constructor.prototype,u),g=""+o[u];if(!o.hasOwnProperty(u)&&typeof d<"u"&&typeof d.get=="function"&&typeof d.set=="function"){var C=d.get,I=d.set;return Object.defineProperty(o,u,{configurable:!0,get:function(){return C.call(this)},set:function(B){g=""+B,I.call(this,B)}}),Object.defineProperty(o,u,{enumerable:d.enumerable}),{getValue:function(){return g},setValue:function(B){g=""+B},stopTracking:function(){o._valueTracker=null,delete o[u]}}}}function $u(o){o._valueTracker||(o._valueTracker=Eg(o))}function yl(o){if(!o)return!1;var u=o._valueTracker;if(!u)return!0;var d=u.getValue(),g="";return o&&(g=Oc(o)?o.checked?"true":"false":o.value),o=g,o!==d?(u.setValue(o),!0):!1}function es(o){if(o=o||(typeof document<"u"?document:void 0),typeof o>"u")return null;try{return o.activeElement||o.body}catch{return o.body}}var qp=/[\n"\\]/g;function zt(o){return o.replace(qp,function(u){return"\\"+u.charCodeAt(0).toString(16)+" "})}function oa(o,u,d,g,C,I,B,H){o.name="",B!=null&&typeof B!="function"&&typeof B!="symbol"&&typeof B!="boolean"?o.type=B:o.removeAttribute("type"),u!=null?B==="number"?(u===0&&o.value===""||o.value!=u)&&(o.value=""+Gn(u)):o.value!==""+Gn(u)&&(o.value=""+Gn(u)):B!=="submit"&&B!=="reset"||o.removeAttribute("value"),u!=null?zp(o,B,Gn(u)):d!=null?zp(o,B,Gn(d)):g!=null&&o.removeAttribute("value"),C==null&&I!=null&&(o.defaultChecked=!!I),C!=null&&(o.checked=C&&typeof C!="function"&&typeof C!="symbol"),H!=null&&typeof H!="function"&&typeof H!="symbol"&&typeof H!="boolean"?o.name=""+Gn(H):o.removeAttribute("name")}function Fp(o,u,d,g,C,I,B,H){if(I!=null&&typeof I!="function"&&typeof I!="symbol"&&typeof I!="boolean"&&(o.type=I),u!=null||d!=null){if(!(I!=="submit"&&I!=="reset"||u!=null))return;d=d!=null?""+Gn(d):"",u=u!=null?""+Gn(u):d,H||u===o.value||(o.value=u),o.defaultValue=u}g=g??C,g=typeof g!="function"&&typeof g!="symbol"&&!!g,o.checked=H?o.checked:!!g,o.defaultChecked=!!g,B!=null&&typeof B!="function"&&typeof B!="symbol"&&typeof B!="boolean"&&(o.name=B)}function zp(o,u,d){u==="number"&&es(o.ownerDocument)===o||o.defaultValue===""+d||(o.defaultValue=""+d)}function Ka(o,u,d,g){if(o=o.options,u){u={};for(var C=0;C<d.length;C++)u["$"+d[C]]=!0;for(d=0;d<o.length;d++)C=u.hasOwnProperty("$"+o[d].value),o[d].selected!==C&&(o[d].selected=C),C&&g&&(o[d].defaultSelected=!0)}else{for(d=""+Gn(d),u=null,C=0;C<o.length;C++){if(o[C].value===d){o[C].selected=!0,g&&(o[C].defaultSelected=!0);return}u!==null||o[C].disabled||(u=o[C])}u!==null&&(u.selected=!0)}}function Gp(o,u,d){if(u!=null&&(u=""+Gn(u),u!==o.value&&(o.value=u),d==null)){o.defaultValue!==u&&(o.defaultValue=u);return}o.defaultValue=d!=null?""+Gn(d):""}function $f(o,u,d,g){if(u==null){if(g!=null){if(d!=null)throw Error(S(92));if(Me(g)){if(1<g.length)throw Error(S(93));g=g[0]}d=g}d==null&&(d=""),u=d}d=Gn(u),o.defaultValue=d,g=o.textContent,g===d&&g!==""&&g!==null&&(o.value=g)}function ao(o,u){if(u){var d=o.firstChild;if(d&&d===o.lastChild&&d.nodeType===3){d.nodeValue=u;return}}o.textContent=u}var qa=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function nn(o,u,d){var g=u.indexOf("--")===0;d==null||typeof d=="boolean"||d===""?g?o.setProperty(u,""):u==="float"?o.cssFloat="":o[u]="":g?o.setProperty(u,d):typeof d!="number"||d===0||qa.has(u)?u==="float"?o.cssFloat=d:o[u]=(""+d).trim():o[u]=d+"px"}function gl(o,u,d){if(u!=null&&typeof u!="object")throw Error(S(62));if(o=o.style,d!=null){for(var g in d)!d.hasOwnProperty(g)||u!=null&&u.hasOwnProperty(g)||(g.indexOf("--")===0?o.setProperty(g,""):g==="float"?o.cssFloat="":o[g]="");for(var C in u)g=u[C],u.hasOwnProperty(C)&&d[C]!==g&&nn(o,C,g)}else for(var I in u)u.hasOwnProperty(I)&&nn(o,I,u[I])}function Nr(o){if(o.indexOf("-")===-1)return!1;switch(o){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Pr=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),Xp=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function ts(o){return Xp.test(""+o)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":o}var Ai=null;function ed(o){return o=o.target||o.srcElement||window,o.correspondingUseElement&&(o=o.correspondingUseElement),o.nodeType===3?o.parentNode:o}var Ln=null,ml=null;function Bo(o){var u=Y(o);if(u&&(o=u.stateNode)){var d=o[ki]||null;e:switch(o=u.stateNode,u.type){case"input":if(oa(o,d.value,d.defaultValue,d.defaultValue,d.checked,d.defaultChecked,d.type,d.name),u=d.name,d.type==="radio"&&u!=null){for(d=o;d.parentNode;)d=d.parentNode;for(d=d.querySelectorAll('input[name="'+zt(""+u)+'"][type="radio"]'),u=0;u<d.length;u++){var g=d[u];if(g!==o&&g.form===o.form){var C=g[ki]||null;if(!C)throw Error(S(90));oa(g,C.value,C.defaultValue,C.defaultValue,C.checked,C.defaultChecked,C.type,C.name)}}for(u=0;u<d.length;u++)g=d[u],g.form===o.form&&yl(g)}break e;case"textarea":Gp(o,d.value,d.defaultValue);break e;case"select":u=d.value,u!=null&&Ka(o,!!d.multiple,u,!1)}}}var Fi=!1;function la(o,u,d){if(Fi)return o(u,d);Fi=!0;try{var g=o(u);return g}finally{if(Fi=!1,(Ln!==null||ml!==null)&&(gf(),Ln&&(u=Ln,o=ml,ml=Ln=null,Bo(u),o)))for(u=0;u<o.length;u++)Bo(o[u])}}function wr(o,u){var d=o.stateNode;if(d===null)return null;var g=d[ki]||null;if(g===null)return null;d=g[u];e:switch(u){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(g=!g.disabled)||(o=o.type,g=!(o==="button"||o==="input"||o==="select"||o==="textarea")),o=!g;break e;default:o=!1}if(o)return null;if(d&&typeof d!="function")throw Error(S(231,u,typeof d));return d}var Gt=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),_n=!1;if(Gt)try{var Lr={};Object.defineProperty(Lr,"passive",{get:function(){_n=!0}}),window.addEventListener("test",Lr,Lr),window.removeEventListener("test",Lr,Lr)}catch{_n=!1}var vl=null,aa=null,pi=null;function td(){if(pi)return pi;var o,u=aa,d=u.length,g,C="value"in vl?vl.value:vl.textContent,I=C.length;for(o=0;o<d&&u[o]===C[o];o++);var B=d-o;for(g=1;g<=B&&u[d-g]===C[I-g];g++);return pi=C.slice(o,1<g?1-g:void 0)}function at(o){var u=o.keyCode;return"charCode"in o?(o=o.charCode,o===0&&u===13&&(o=13)):o=u,o===10&&(o=13),32<=o||o===13?o:0}function En(){return!0}function Ag(){return!1}function zi(o){function u(d,g,C,I,B){this._reactName=d,this._targetInst=C,this.type=g,this.nativeEvent=I,this.target=B,this.currentTarget=null;for(var H in o)o.hasOwnProperty(H)&&(d=o[H],this[H]=d?d(I):I[H]);return this.isDefaultPrevented=(I.defaultPrevented!=null?I.defaultPrevented:I.returnValue===!1)?En:Ag,this.isPropagationStopped=Ag,this}return p(u.prototype,{preventDefault:function(){this.defaultPrevented=!0;var d=this.nativeEvent;d&&(d.preventDefault?d.preventDefault():typeof d.returnValue!="unknown"&&(d.returnValue=!1),this.isDefaultPrevented=En)},stopPropagation:function(){var d=this.nativeEvent;d&&(d.stopPropagation?d.stopPropagation():typeof d.cancelBubble!="unknown"&&(d.cancelBubble=!0),this.isPropagationStopped=En)},persist:function(){},isPersistent:En}),u}var uo={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(o){return o.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},ns=zi(uo),is=p({},uo,{view:0,detail:0}),Cg=zi(is),Un,Sl,rs,os=p({},is,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:ua,button:0,buttons:0,relatedTarget:function(o){return o.relatedTarget===void 0?o.fromElement===o.srcElement?o.toElement:o.fromElement:o.relatedTarget},movementX:function(o){return"movementX"in o?o.movementX:(o!==rs&&(rs&&o.type==="mousemove"?(Un=o.screenX-rs.screenX,Sl=o.screenY-rs.screenY):Sl=Un=0,rs=o),Un)},movementY:function(o){return"movementY"in o?o.movementY:Sl}}),ls=zi(os),Yp=p({},os,{dataTransfer:0}),kc=zi(Yp),rr=p({},is,{relatedTarget:0}),Rc=zi(rr),bg=p({},uo,{animationName:0,elapsedTime:0,pseudoElement:0}),Wp=zi(bg),as=p({},uo,{clipboardData:function(o){return"clipboardData"in o?o.clipboardData:window.clipboardData}}),Fa=zi(as),Gi=p({},uo,{data:0}),Qp=zi(Gi),Ig={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},_r={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},Jp={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function us(o){var u=this.nativeEvent;return u.getModifierState?u.getModifierState(o):(o=Jp[o])?!!u[o]:!1}function ua(){return us}var ss=p({},is,{key:function(o){if(o.key){var u=Ig[o.key]||o.key;if(u!=="Unidentified")return u}return o.type==="keypress"?(o=at(o),o===13?"Enter":String.fromCharCode(o)):o.type==="keydown"||o.type==="keyup"?_r[o.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:ua,charCode:function(o){return o.type==="keypress"?at(o):0},keyCode:function(o){return o.type==="keydown"||o.type==="keyup"?o.keyCode:0},which:function(o){return o.type==="keypress"?at(o):o.type==="keydown"||o.type==="keyup"?o.keyCode:0}}),za=zi(ss),Ga=p({},os,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),cs=zi(Ga),fs=p({},is,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:ua}),k0=zi(fs),so=p({},uo,{propertyName:0,elapsedTime:0,pseudoElement:0}),Xa=zi(so),Zp=p({},os,{deltaX:function(o){return"deltaX"in o?o.deltaX:"wheelDeltaX"in o?-o.wheelDeltaX:0},deltaY:function(o){return"deltaY"in o?o.deltaY:"wheelDeltaY"in o?-o.wheelDeltaY:"wheelDelta"in o?-o.wheelDelta:0},deltaZ:0,deltaMode:0}),Mc=zi(Zp),Ya=p({},uo,{newState:0,oldState:0}),$p=zi(Ya),R0=[9,13,27,32],ds=Gt&&"CompositionEvent"in window,ps=null;Gt&&"documentMode"in document&&(ps=document.documentMode);var Lt=Gt&&"TextEvent"in window&&!ps,In=Gt&&(!ds||ps&&8<ps&&11>=ps),Xi=" ",Ur=!1;function An(o,u){switch(o){case"keyup":return R0.indexOf(u.keyCode)!==-1;case"keydown":return u.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Tr(o){return o=o.detail,typeof o=="object"&&"data"in o?o.data:null}var Ge=!1;function wl(o,u){switch(o){case"compositionend":return Tr(u);case"keypress":return u.which!==32?null:(Ur=!0,Xi);case"textInput":return o=u.data,o===Xi&&Ur?null:o;default:return null}}function Dg(o,u){if(Ge)return o==="compositionend"||!ds&&An(o,u)?(o=td(),pi=aa=vl=null,Ge=!1,o):null;switch(o){case"paste":return null;case"keypress":if(!(u.ctrlKey||u.altKey||u.metaKey)||u.ctrlKey&&u.altKey){if(u.char&&1<u.char.length)return u.char;if(u.which)return String.fromCharCode(u.which)}return null;case"compositionend":return In&&u.locale!=="ko"?null:u.data;default:return null}}var Vo={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Tl(o){var u=o&&o.nodeName&&o.nodeName.toLowerCase();return u==="input"?!!Vo[o.type]:u==="textarea"}function co(o,u,d,g){Ln?ml?ml.push(g):ml=[g]:Ln=g,u=rc(u,"onChange"),0<u.length&&(d=new ns("onChange","change",null,d,g),o.push({event:d,listeners:u}))}var sa=null,Zn=null;function xl(o){Qd(o,0)}function $n(o){var u=pl(o);if(yl(u))return o}function hs(o,u){if(o==="change")return u}var Nc=!1;if(Gt){var eh;if(Gt){var ys="oninput"in document;if(!ys){var th=document.createElement("div");th.setAttribute("oninput","return;"),ys=typeof th.oninput=="function"}eh=ys}else eh=!1;Nc=eh&&(!document.documentMode||9<document.documentMode)}function nh(){sa&&(sa.detachEvent("onpropertychange",ih),Zn=sa=null)}function ih(o){if(o.propertyName==="value"&&$n(Zn)){var u=[];co(u,Zn,o,ed(o)),la(xl,u)}}function Og(o,u,d){o==="focusin"?(nh(),sa=u,Zn=d,sa.attachEvent("onpropertychange",ih)):o==="focusout"&&nh()}function rh(o){if(o==="selectionchange"||o==="keyup"||o==="keydown")return $n(Zn)}function oh(o,u){if(o==="click")return $n(u)}function lh(o,u){if(o==="input"||o==="change")return $n(u)}function Qt(o,u){return o===u&&(o!==0||1/o===1/u)||o!==o&&u!==u}var or=typeof Object.is=="function"?Object.is:Qt;function ca(o,u){if(or(o,u))return!0;if(typeof o!="object"||o===null||typeof u!="object"||u===null)return!1;var d=Object.keys(o),g=Object.keys(u);if(d.length!==g.length)return!1;for(g=0;g<d.length;g++){var C=d[g];if(!Pe.call(u,C)||!or(o[C],u[C]))return!1}return!0}function Pc(o){for(;o&&o.firstChild;)o=o.firstChild;return o}function ah(o,u){var d=Pc(o);o=0;for(var g;d;){if(d.nodeType===3){if(g=o+d.textContent.length,o<=u&&g>=u)return{node:d,offset:u-o};o=g}e:{for(;d;){if(d.nextSibling){d=d.nextSibling;break e}d=d.parentNode}d=void 0}d=Pc(d)}}function kg(o,u){return o&&u?o===u?!0:o&&o.nodeType===3?!1:u&&u.nodeType===3?kg(o,u.parentNode):"contains"in o?o.contains(u):o.compareDocumentPosition?!!(o.compareDocumentPosition(u)&16):!1:!1}function uh(o){o=o!=null&&o.ownerDocument!=null&&o.ownerDocument.defaultView!=null?o.ownerDocument.defaultView:window;for(var u=es(o.document);u instanceof o.HTMLIFrameElement;){try{var d=typeof u.contentWindow.location.href=="string"}catch{d=!1}if(d)o=u.contentWindow;else break;u=es(o.document)}return u}function Wa(o){var u=o&&o.nodeName&&o.nodeName.toLowerCase();return u&&(u==="input"&&(o.type==="text"||o.type==="search"||o.type==="tel"||o.type==="url"||o.type==="password")||u==="textarea"||o.contentEditable==="true")}var nd=Gt&&"documentMode"in document&&11>=document.documentMode,Yi=null,Lc=null,El=null,id=!1;function gs(o,u,d){var g=d.window===d?d.document:d.nodeType===9?d:d.ownerDocument;id||Yi==null||Yi!==es(g)||(g=Yi,"selectionStart"in g&&Wa(g)?g={start:g.selectionStart,end:g.selectionEnd}:(g=(g.ownerDocument&&g.ownerDocument.defaultView||window).getSelection(),g={anchorNode:g.anchorNode,anchorOffset:g.anchorOffset,focusNode:g.focusNode,focusOffset:g.focusOffset}),El&&ca(El,g)||(El=g,g=rc(Lc,"onSelect"),0<g.length&&(u=new ns("onSelect","select",null,u,d),o.push({event:u,listeners:g}),u.target=Yi)))}function xr(o,u){var d={};return d[o.toLowerCase()]=u.toLowerCase(),d["Webkit"+o]="webkit"+u,d["Moz"+o]="moz"+u,d}var Ho={animationend:xr("Animation","AnimationEnd"),animationiteration:xr("Animation","AnimationIteration"),animationstart:xr("Animation","AnimationStart"),transitionrun:xr("Transition","TransitionRun"),transitionstart:xr("Transition","TransitionStart"),transitioncancel:xr("Transition","TransitionCancel"),transitionend:xr("Transition","TransitionEnd")},Al={},rd={};Gt&&(rd=document.createElement("div").style,"AnimationEvent"in window||(delete Ho.animationend.animation,delete Ho.animationiteration.animation,delete Ho.animationstart.animation),"TransitionEvent"in window||delete Ho.transitionend.transition);function fa(o){if(Al[o])return Al[o];if(!Ho[o])return o;var u=Ho[o],d;for(d in u)if(u.hasOwnProperty(d)&&d in rd)return Al[o]=u[d];return o}var sh=fa("animationend"),ch=fa("animationiteration"),Qa=fa("animationstart"),fh=fa("transitionrun"),ms=fa("transitionstart"),Rg=fa("transitioncancel"),Ko=fa("transitionend"),Mg=new Map,qo="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");qo.push("scrollEnd");function hi(o,u){Mg.set(o,u),Uo(u,[o])}var Cl=new WeakMap;function lr(o,u){if(typeof o=="object"&&o!==null){var d=Cl.get(o);return d!==void 0?d:(u={value:o,source:u,stack:Ha(u)},Cl.set(o,u),u)}return{value:o,source:u,stack:Ha(u)}}var yi=[],da=0,_c=0;function Uc(){for(var o=da,u=_c=da=0;u<o;){var d=yi[u];yi[u++]=null;var g=yi[u];yi[u++]=null;var C=yi[u];yi[u++]=null;var I=yi[u];if(yi[u++]=null,g!==null&&C!==null){var B=g.pending;B===null?C.next=C:(C.next=B.next,B.next=C),g.pending=C}I!==0&&od(d,C,I)}}function vs(o,u,d,g){yi[da++]=o,yi[da++]=u,yi[da++]=d,yi[da++]=g,_c|=g,o.lanes|=g,o=o.alternate,o!==null&&(o.lanes|=g)}function hn(o,u,d,g){return vs(o,u,d,g),ld(o)}function fo(o,u){return vs(o,null,null,u),ld(o)}function od(o,u,d){o.lanes|=d;var g=o.alternate;g!==null&&(g.lanes|=d);for(var C=!1,I=o.return;I!==null;)I.childLanes|=d,g=I.alternate,g!==null&&(g.childLanes|=d),I.tag===22&&(o=I.stateNode,o===null||o._visibility&1||(C=!0)),o=I,I=I.return;return o.tag===3?(I=o.stateNode,C&&u!==null&&(C=31-vr(d),o=I.hiddenUpdates,g=o[C],g===null?o[C]=[u]:g.push(u),u.lane=d|536870912),I):null}function ld(o){if(50<Ys)throw Ys=0,Dt=null,Error(S(185));for(var u=o.return;u!==null;)o=u,u=o.return;return o.tag===3?o.stateNode:null}var bl={};function gi(o,u,d,g){this.tag=o,this.key=d,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=u,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=g,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function li(o,u,d,g){return new gi(o,u,d,g)}function Ri(o){return o=o.prototype,!(!o||!o.isReactComponent)}function jn(o,u){var d=o.alternate;return d===null?(d=li(o.tag,u,o.key,o.mode),d.elementType=o.elementType,d.type=o.type,d.stateNode=o.stateNode,d.alternate=o,o.alternate=d):(d.pendingProps=u,d.type=o.type,d.flags=0,d.subtreeFlags=0,d.deletions=null),d.flags=o.flags&65011712,d.childLanes=o.childLanes,d.lanes=o.lanes,d.child=o.child,d.memoizedProps=o.memoizedProps,d.memoizedState=o.memoizedState,d.updateQueue=o.updateQueue,u=o.dependencies,d.dependencies=u===null?null:{lanes:u.lanes,firstContext:u.firstContext},d.sibling=o.sibling,d.index=o.index,d.ref=o.ref,d.refCleanup=o.refCleanup,d}function ad(o,u){o.flags&=65011714;var d=o.alternate;return d===null?(o.childLanes=0,o.lanes=u,o.child=null,o.subtreeFlags=0,o.memoizedProps=null,o.memoizedState=null,o.updateQueue=null,o.dependencies=null,o.stateNode=null):(o.childLanes=d.childLanes,o.lanes=d.lanes,o.child=d.child,o.subtreeFlags=0,o.deletions=null,o.memoizedProps=d.memoizedProps,o.memoizedState=d.memoizedState,o.updateQueue=d.updateQueue,o.type=d.type,u=d.dependencies,o.dependencies=u===null?null:{lanes:u.lanes,firstContext:u.firstContext}),o}function jc(o,u,d,g,C,I){var B=0;if(g=o,typeof o=="function")Ri(o)&&(B=1);else if(typeof o=="string")B=Bm(o,d,z.current)?26:o==="html"||o==="head"||o==="body"?27:5;else e:switch(o){case Nt:return o=li(31,d,u,C),o.elementType=Nt,o.lanes=I,o;case b:return Ja(d.children,C,I,u);case J:B=8,C|=24;break;case $:return o=li(12,d,u,C|2),o.elementType=$,o.lanes=I,o;case Oe:return o=li(13,d,u,C),o.elementType=Oe,o.lanes=I,o;case ot:return o=li(19,d,u,C),o.elementType=ot,o.lanes=I,o;default:if(typeof o=="object"&&o!==null)switch(o.$$typeof){case ce:case ee:B=10;break e;case Re:B=9;break e;case be:B=11;break e;case et:B=14;break e;case pt:B=16,g=null;break e}B=29,d=Error(S(130,o===null?"null":typeof o,"")),g=null}return u=li(B,d,u,C),u.elementType=o,u.type=g,u.lanes=I,u}function Ja(o,u,d,g){return o=li(7,o,g,u),o.lanes=d,o}function po(o,u,d){return o=li(6,o,null,u),o.lanes=d,o}function ho(o,u,d){return u=li(4,o.children!==null?o.children:[],o.key,u),u.lanes=d,u.stateNode={containerInfo:o.containerInfo,pendingChildren:null,implementation:o.implementation},u}var kn=[],Il=0,Dl=null,ud=0,jr=[],Er=0,pa=null,Ol=1,Ar="";function Za(o,u){kn[Il++]=ud,kn[Il++]=Dl,Dl=o,ud=u}function Ng(o,u,d){jr[Er++]=Ol,jr[Er++]=Ar,jr[Er++]=pa,pa=o;var g=Ol;o=Ar;var C=32-vr(g)-1;g&=~(1<<C),d+=1;var I=32-vr(u)+C;if(30<I){var B=C-C%5;I=(g&(1<<B)-1).toString(32),g>>=B,C-=B,Ol=1<<32-vr(u)+C|d<<C|g,Ar=I+o}else Ol=1<<I|d<<C|g,Ar=o}function Fo(o){o.return!==null&&(Za(o,1),Ng(o,1,0))}function $a(o){for(;o===Dl;)Dl=kn[--Il],kn[Il]=null,ud=kn[--Il],kn[Il]=null;for(;o===pa;)pa=jr[--Er],jr[Er]=null,Ar=jr[--Er],jr[Er]=null,Ol=jr[--Er],jr[Er]=null}var Dn=null,Cn=null,Jt=!1,kl=null,It=!1,Rl=Error(S(519));function Ml(o){var u=Error(S(418,""));throw Vc(lr(u,o)),Rl}function sd(o){var u=o.stateNode,d=o.type,g=o.memoizedProps;switch(u[Jn]=o,u[ki]=g,d){case"dialog":Ht("cancel",u),Ht("close",u);break;case"iframe":case"object":case"embed":Ht("load",u);break;case"video":case"audio":for(d=0;d<ic.length;d++)Ht(ic[d],u);break;case"source":Ht("error",u);break;case"img":case"image":case"link":Ht("error",u),Ht("load",u);break;case"details":Ht("toggle",u);break;case"input":Ht("invalid",u),Fp(u,g.value,g.defaultValue,g.checked,g.defaultChecked,g.type,g.name,!0),$u(u);break;case"select":Ht("invalid",u);break;case"textarea":Ht("invalid",u),$f(u,g.value,g.defaultValue,g.children),$u(u)}d=g.children,typeof d!="string"&&typeof d!="number"&&typeof d!="bigint"||u.textContent===""+d||g.suppressHydrationWarning===!0||Jd(u.textContent,d)?(g.popover!=null&&(Ht("beforetoggle",u),Ht("toggle",u)),g.onScroll!=null&&Ht("scroll",u),g.onScrollEnd!=null&&Ht("scrollend",u),g.onClick!=null&&(u.onclick=Iu),u=!0):u=!1,u||Ml(o)}function Bc(o){for(Dn=o.return;Dn;)switch(Dn.tag){case 5:case 13:It=!1;return;case 27:case 3:It=!0;return;default:Dn=Dn.return}}function Ss(o){if(o!==Dn)return!1;if(!Jt)return Bc(o),Jt=!0,!1;var u=o.tag,d;if((d=u!==3&&u!==27)&&((d=u===5)&&(d=o.type,d=!(d!=="form"&&d!=="button")||iy(o.type,o.memoizedProps)),d=!d),d&&Cn&&Ml(o),Bc(o),u===13){if(o=o.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(S(317));e:{for(o=o.nextSibling,u=0;o;){if(o.nodeType===8)if(d=o.data,d==="/$"){if(u===0){Cn=Ao(o.nextSibling);break e}u--}else d!=="$"&&d!=="$!"&&d!=="$?"||u++;o=o.nextSibling}Cn=null}}else u===27?(u=Cn,Eo(o.type)?(o=Cf,Cf=null,Cn=o):Cn=u):Cn=Dn?Ao(o.stateNode.nextSibling):null;return!0}function ws(){Cn=Dn=null,Jt=!1}function dh(){var o=kl;return o!==null&&(vi===null?vi=o:vi.push.apply(vi,o),kl=null),o}function Vc(o){kl===null?kl=[o]:kl.push(o)}var ph=Ne(null),zo=null,Nl=null;function Pl(o,u,d){Fe(ph,u._currentValue),u._currentValue=d}function Ll(o){o._currentValue=ph.current,tt(ph)}function hh(o,u,d){for(;o!==null;){var g=o.alternate;if((o.childLanes&u)!==u?(o.childLanes|=u,g!==null&&(g.childLanes|=u)):g!==null&&(g.childLanes&u)!==u&&(g.childLanes|=u),o===d)break;o=o.return}}function cd(o,u,d,g){var C=o.child;for(C!==null&&(C.return=o);C!==null;){var I=C.dependencies;if(I!==null){var B=C.child;I=I.firstContext;e:for(;I!==null;){var H=I;I=C;for(var ie=0;ie<u.length;ie++)if(H.context===u[ie]){I.lanes|=d,H=I.alternate,H!==null&&(H.lanes|=d),hh(I.return,d,o),g||(B=null);break e}I=H.next}}else if(C.tag===18){if(B=C.return,B===null)throw Error(S(341));B.lanes|=d,I=B.alternate,I!==null&&(I.lanes|=d),hh(B,d,o),B=null}else B=C.child;if(B!==null)B.return=C;else for(B=C;B!==null;){if(B===o){B=null;break}if(C=B.sibling,C!==null){C.return=B.return,B=C;break}B=B.return}C=B}}function Hc(o,u,d,g){o=null;for(var C=u,I=!1;C!==null;){if(!I){if((C.flags&524288)!==0)I=!0;else if((C.flags&262144)!==0)break}if(C.tag===10){var B=C.alternate;if(B===null)throw Error(S(387));if(B=B.memoizedProps,B!==null){var H=C.type;or(C.pendingProps.value,B.value)||(o!==null?o.push(H):o=[H])}}else if(C===qi.current){if(B=C.alternate,B===null)throw Error(S(387));B.memoizedState.memoizedState!==C.memoizedState.memoizedState&&(o!==null?o.push(Rf):o=[Rf])}C=C.return}o!==null&&cd(u,o,d,g),u.flags|=262144}function Kc(o){for(o=o.firstContext;o!==null;){if(!or(o.context._currentValue,o.memoizedValue))return!0;o=o.next}return!1}function ha(o){zo=o,Nl=null,o=o.dependencies,o!==null&&(o.firstContext=null)}function ai(o){return Pg(zo,o)}function Ts(o,u){return zo===null&&ha(o),Pg(o,u)}function Pg(o,u){var d=u._currentValue;if(u={context:u,memoizedValue:d,next:null},Nl===null){if(o===null)throw Error(S(308));Nl=u,o.dependencies={lanes:0,firstContext:u},o.flags|=524288}else Nl=Nl.next=u;return d}var M0=typeof AbortController<"u"?AbortController:function(){var o=[],u=this.signal={aborted:!1,addEventListener:function(d,g){o.push(g)}};this.abort=function(){u.aborted=!0,o.forEach(function(d){return d()})}},N0=E.unstable_scheduleCallback,eu=E.unstable_NormalPriority,Bn={$$typeof:ee,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function qc(){return{controller:new M0,data:new Map,refCount:0}}function tu(o){o.refCount--,o.refCount===0&&N0(eu,function(){o.controller.abort()})}var xs=null,Fc=0,nu=0,Go=null;function fd(o,u){if(xs===null){var d=xs=[];Fc=0,nu=Zh(),Go={status:"pending",value:void 0,then:function(g){d.push(g)}}}return Fc++,u.then(iu,iu),u}function iu(){if(--Fc===0&&xs!==null){Go!==null&&(Go.status="fulfilled");var o=xs;xs=null,nu=0,Go=null;for(var u=0;u<o.length;u++)(0,o[u])()}}function Lg(o,u){var d=[],g={status:"pending",value:null,reason:null,then:function(C){d.push(C)}};return o.then(function(){g.status="fulfilled",g.value=u;for(var C=0;C<d.length;C++)(0,d[C])(u)},function(C){for(g.status="rejected",g.reason=C,C=0;C<d.length;C++)(0,d[C])(void 0)}),g}var yh=Te.S;Te.S=function(o,u){typeof u=="object"&&u!==null&&typeof u.then=="function"&&fd(o,u),yh!==null&&yh(o,u)};var ya=Ne(null);function dd(){var o=ya.current;return o!==null?o:On.pooledCache}function ru(o,u){u===null?Fe(ya,ya.current):Fe(ya,u.pool)}function _g(){var o=dd();return o===null?null:{parent:Bn._currentValue,pool:o}}var ga=Error(S(460)),Ug=Error(S(474)),en=Error(S(542)),pd={then:function(){}};function hd(o){return o=o.status,o==="fulfilled"||o==="rejected"}function yd(){}function jg(o,u,d){switch(d=o[d],d===void 0?o.push(u):d!==u&&(u.then(yd,yd),u=d),u.status){case"fulfilled":return u.value;case"rejected":throw o=u.reason,Br(o),o;default:if(typeof u.status=="string")u.then(yd,yd);else{if(o=On,o!==null&&100<o.shellSuspendCounter)throw Error(S(482));o=u,o.status="pending",o.then(function(g){if(u.status==="pending"){var C=u;C.status="fulfilled",C.value=g}},function(g){if(u.status==="pending"){var C=u;C.status="rejected",C.reason=g}})}switch(u.status){case"fulfilled":return u.value;case"rejected":throw o=u.reason,Br(o),o}throw Es=u,ga}}var Es=null;function gh(){if(Es===null)throw Error(S(459));var o=Es;return Es=null,o}function Br(o){if(o===ga||o===en)throw Error(S(483))}var kt=!1;function yn(o){o.updateQueue={baseState:o.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function _l(o,u){o=o.updateQueue,u.updateQueue===o&&(u.updateQueue={baseState:o.baseState,firstBaseUpdate:o.firstBaseUpdate,lastBaseUpdate:o.lastBaseUpdate,shared:o.shared,callbacks:null})}function Xo(o){return{lane:o,tag:0,payload:null,callback:null,next:null}}function Cr(o,u,d){var g=o.updateQueue;if(g===null)return null;if(g=g.shared,(fn&2)!==0){var C=g.pending;return C===null?u.next=u:(u.next=C.next,C.next=u),g.pending=u,u=ld(o),od(o,null,d),u}return vs(o,g,u,d),ld(o)}function As(o,u,d){if(u=u.updateQueue,u!==null&&(u=u.shared,(d&4194048)!==0)){var g=u.lanes;g&=o.pendingLanes,d|=g,u.lanes=d,Tg(o,d)}}function gd(o,u){var d=o.updateQueue,g=o.alternate;if(g!==null&&(g=g.updateQueue,d===g)){var C=null,I=null;if(d=d.firstBaseUpdate,d!==null){do{var B={lane:d.lane,tag:d.tag,payload:d.payload,callback:null,next:null};I===null?C=I=B:I=I.next=B,d=d.next}while(d!==null);I===null?C=I=u:I=I.next=u}else C=I=u;d={baseState:g.baseState,firstBaseUpdate:C,lastBaseUpdate:I,shared:g.shared,callbacks:g.callbacks},o.updateQueue=d;return}o=d.lastBaseUpdate,o===null?d.firstBaseUpdate=u:o.next=u,d.lastBaseUpdate=u}var mh=!1;function ke(){if(mh){var o=Go;if(o!==null)throw o}}function Cs(o,u,d,g){mh=!1;var C=o.updateQueue;kt=!1;var I=C.firstBaseUpdate,B=C.lastBaseUpdate,H=C.shared.pending;if(H!==null){C.shared.pending=null;var ie=H,me=ie.next;ie.next=null,B===null?I=me:B.next=me,B=ie;var Ae=o.alternate;Ae!==null&&(Ae=Ae.updateQueue,H=Ae.lastBaseUpdate,H!==B&&(H===null?Ae.firstBaseUpdate=me:H.next=me,Ae.lastBaseUpdate=ie))}if(I!==null){var Ie=C.baseState;B=0,Ae=me=ie=null,H=I;do{var Se=H.lane&-536870913,we=Se!==H.lane;if(we?(tn&Se)===Se:(g&Se)===Se){Se!==0&&Se===nu&&(mh=!0),Ae!==null&&(Ae=Ae.next={lane:0,tag:H.tag,payload:H.payload,callback:null,next:null});e:{var At=o,wt=H;Se=u;var Sn=d;switch(wt.tag){case 1:if(At=wt.payload,typeof At=="function"){Ie=At.call(Sn,Ie,Se);break e}Ie=At;break e;case 3:At.flags=At.flags&-65537|128;case 0:if(At=wt.payload,Se=typeof At=="function"?At.call(Sn,Ie,Se):At,Se==null)break e;Ie=p({},Ie,Se);break e;case 2:kt=!0}}Se=H.callback,Se!==null&&(o.flags|=64,we&&(o.flags|=8192),we=C.callbacks,we===null?C.callbacks=[Se]:we.push(Se))}else we={lane:Se,tag:H.tag,payload:H.payload,callback:H.callback,next:null},Ae===null?(me=Ae=we,ie=Ie):Ae=Ae.next=we,B|=Se;if(H=H.next,H===null){if(H=C.shared.pending,H===null)break;we=H,H=we.next,we.next=null,C.lastBaseUpdate=we,C.shared.pending=null}}while(!0);Ae===null&&(ie=Ie),C.baseState=ie,C.firstBaseUpdate=me,C.lastBaseUpdate=Ae,I===null&&(C.shared.lanes=0),el|=B,o.lanes=B,o.memoizedState=Ie}}function zc(o,u){if(typeof o!="function")throw Error(S(191,o));o.call(u)}function Ut(o,u){var d=o.callbacks;if(d!==null)for(o.callbacks=null,o=0;o<d.length;o++)zc(d[o],u)}var yo=Ne(null),Yo=Ne(0);function Xt(o,u){o=Fl,Fe(Yo,o),Fe(yo,u),Fl=o|u.baseLanes}function go(){Fe(Yo,Fl),Fe(yo,yo.current)}function md(){Fl=Yo.current,tt(yo),tt(Yo)}var cn=0,Vt=null,gn=null,ui=null,Gc=!1,ou=!1,Wo=!1,Wi=0,bs=0,Ul=null,Is=0;function ct(){throw Error(S(321))}function Xc(o,u){if(u===null)return!1;for(var d=0;d<u.length&&d<o.length;d++)if(!or(o[d],u[d]))return!1;return!0}function vh(o,u,d,g,C,I){return cn=I,Vt=u,u.memoizedState=null,u.updateQueue=null,u.lanes=0,Te.H=o===null||o.memoizedState===null?kd:Ps,Wo=!1,I=d(g,C),Wo=!1,ou&&(I=vd(u,d,g,C)),ma(o),I}function ma(o){Te.H=Zc;var u=gn!==null&&gn.next!==null;if(cn=0,ui=gn=Vt=null,Gc=!1,bs=0,Ul=null,u)throw Error(S(300));o===null||Ci||(o=o.dependencies,o!==null&&Kc(o)&&(Ci=!0))}function vd(o,u,d,g){Vt=o;var C=0;do{if(ou&&(Ul=null),bs=0,ou=!1,25<=C)throw Error(S(301));if(C+=1,ui=gn=null,o.updateQueue!=null){var I=o.updateQueue;I.lastEffect=null,I.events=null,I.stores=null,I.memoCache!=null&&(I.memoCache.index=0)}Te.H=cu,I=u(d,g)}while(ou);return I}function Zt(){var o=Te.H,u=o.useState()[0];return u=typeof u.then=="function"?lu(u):u,o=o.useState()[0],(gn!==null?gn.memoizedState:null)!==o&&(Vt.flags|=1024),u}function mo(){var o=Wi!==0;return Wi=0,o}function Sd(o,u,d){u.updateQueue=o.updateQueue,u.flags&=-2053,o.lanes&=~d}function jt(o){if(Gc){for(o=o.memoizedState;o!==null;){var u=o.queue;u!==null&&(u.pending=null),o=o.next}Gc=!1}cn=0,ui=gn=Vt=null,ou=!1,bs=Wi=0,Ul=null}function $e(){var o={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return ui===null?Vt.memoizedState=ui=o:ui=ui.next=o,ui}function bn(){if(gn===null){var o=Vt.alternate;o=o!==null?o.memoizedState:null}else o=gn.next;var u=ui===null?Vt.memoizedState:ui.next;if(u!==null)ui=u,gn=o;else{if(o===null)throw Vt.alternate===null?Error(S(467)):Error(S(310));gn=o,o={memoizedState:gn.memoizedState,baseState:gn.baseState,baseQueue:gn.baseQueue,queue:gn.queue,next:null},ui===null?Vt.memoizedState=ui=o:ui=ui.next=o}return ui}function Mi(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function lu(o){var u=bs;return bs+=1,Ul===null&&(Ul=[]),o=jg(Ul,o,u),u=Vt,(ui===null?u.memoizedState:ui.next)===null&&(u=u.alternate,Te.H=u===null||u.memoizedState===null?kd:Ps),o}function jl(o){if(o!==null&&typeof o=="object"){if(typeof o.then=="function")return lu(o);if(o.$$typeof===ee)return ai(o)}throw Error(S(438,String(o)))}function wd(o){var u=null,d=Vt.updateQueue;if(d!==null&&(u=d.memoCache),u==null){var g=Vt.alternate;g!==null&&(g=g.updateQueue,g!==null&&(g=g.memoCache,g!=null&&(u={data:g.data.map(function(C){return C.slice()}),index:0})))}if(u==null&&(u={data:[],index:0}),d===null&&(d=Mi(),Vt.updateQueue=d),d.memoCache=u,d=u.data[u.index],d===void 0)for(d=u.data[u.index]=Array(o),g=0;g<o;g++)d[g]=_;return u.index++,d}function Vr(o,u){return typeof u=="function"?u(o):u}function vo(o){var u=bn();return Sh(u,gn,o)}function Sh(o,u,d){var g=o.queue;if(g===null)throw Error(S(311));g.lastRenderedReducer=d;var C=o.baseQueue,I=g.pending;if(I!==null){if(C!==null){var B=C.next;C.next=I.next,I.next=B}u.baseQueue=C=I,g.pending=null}if(I=o.baseState,C===null)o.memoizedState=I;else{u=C.next;var H=B=null,ie=null,me=u,Ae=!1;do{var Ie=me.lane&-536870913;if(Ie!==me.lane?(tn&Ie)===Ie:(cn&Ie)===Ie){var Se=me.revertLane;if(Se===0)ie!==null&&(ie=ie.next={lane:0,revertLane:0,action:me.action,hasEagerState:me.hasEagerState,eagerState:me.eagerState,next:null}),Ie===nu&&(Ae=!0);else if((cn&Se)===Se){me=me.next,Se===nu&&(Ae=!0);continue}else Ie={lane:0,revertLane:me.revertLane,action:me.action,hasEagerState:me.hasEagerState,eagerState:me.eagerState,next:null},ie===null?(H=ie=Ie,B=I):ie=ie.next=Ie,Vt.lanes|=Se,el|=Se;Ie=me.action,Wo&&d(I,Ie),I=me.hasEagerState?me.eagerState:d(I,Ie)}else Se={lane:Ie,revertLane:me.revertLane,action:me.action,hasEagerState:me.hasEagerState,eagerState:me.eagerState,next:null},ie===null?(H=ie=Se,B=I):ie=ie.next=Se,Vt.lanes|=Ie,el|=Ie;me=me.next}while(me!==null&&me!==u);if(ie===null?B=I:ie.next=H,!or(I,o.memoizedState)&&(Ci=!0,Ae&&(d=Go,d!==null)))throw d;o.memoizedState=I,o.baseState=B,o.baseQueue=ie,g.lastRenderedState=I}return C===null&&(g.lanes=0),[o.memoizedState,g.dispatch]}function Td(o){var u=bn(),d=u.queue;if(d===null)throw Error(S(311));d.lastRenderedReducer=o;var g=d.dispatch,C=d.pending,I=u.memoizedState;if(C!==null){d.pending=null;var B=C=C.next;do I=o(I,B.action),B=B.next;while(B!==C);or(I,u.memoizedState)||(Ci=!0),u.memoizedState=I,u.baseQueue===null&&(u.baseState=I),d.lastRenderedState=I}return[I,g]}function xd(o,u,d){var g=Vt,C=bn(),I=Jt;if(I){if(d===void 0)throw Error(S(407));d=d()}else d=u();var B=!or((gn||C).memoizedState,d);B&&(C.memoizedState=d,Ci=!0),C=C.queue;var H=Bg.bind(null,g,C,o);if(ks(2048,8,H,[o]),C.getSnapshot!==u||B||ui!==null&&ui.memoizedState.tag&1){if(g.flags|=2048,au(9,Ad(),Wc.bind(null,g,C,d,u),null),On===null)throw Error(S(349));I||(cn&124)!==0||Yc(g,u,d)}return d}function Yc(o,u,d){o.flags|=16384,o={getSnapshot:u,value:d},u=Vt.updateQueue,u===null?(u=Mi(),Vt.updateQueue=u,u.stores=[o]):(d=u.stores,d===null?u.stores=[o]:d.push(o))}function Wc(o,u,d,g){u.value=d,u.getSnapshot=g,Vg(u)&&wh(o)}function Bg(o,u,d){return d(function(){Vg(u)&&wh(o)})}function Vg(o){var u=o.getSnapshot;o=o.value;try{var d=u();return!or(o,d)}catch{return!0}}function wh(o){var u=fo(o,2);u!==null&&Pn(u,o,2)}function Th(o){var u=$e();if(typeof o=="function"){var d=o;if(o=d(),Wo){fl(!0);try{d()}finally{fl(!1)}}}return u.memoizedState=u.baseState=o,u.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Vr,lastRenderedState:o},u}function xh(o,u,d,g){return o.baseState=d,Sh(o,gn,typeof g=="function"?g:Vr)}function Hg(o,u,d,g,C){if(Jc(o))throw Error(S(485));if(o=u.action,o!==null){var I={payload:C,action:o,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(B){I.listeners.push(B)}};Te.T!==null?d(!0):I.isTransition=!1,g(I),d=u.pending,d===null?(I.next=u.pending=I,Kg(u,I)):(I.next=d.next,u.pending=d.next=I)}}function Kg(o,u){var d=u.action,g=u.payload,C=o.state;if(u.isTransition){var I=Te.T,B={};Te.T=B;try{var H=d(C,g),ie=Te.S;ie!==null&&ie(B,H),qg(o,u,H)}catch(me){Ed(o,u,me)}finally{Te.T=I}}else try{I=d(C,g),qg(o,u,I)}catch(me){Ed(o,u,me)}}function qg(o,u,d){d!==null&&typeof d=="object"&&typeof d.then=="function"?d.then(function(g){Fg(o,u,g)},function(g){return Ed(o,u,g)}):Fg(o,u,d)}function Fg(o,u,d){u.status="fulfilled",u.value=d,Ds(u),o.state=d,u=o.pending,u!==null&&(d=u.next,d===u?o.pending=null:(d=d.next,u.next=d,Kg(o,d)))}function Ed(o,u,d){var g=o.pending;if(o.pending=null,g!==null){g=g.next;do u.status="rejected",u.reason=d,Ds(u),u=u.next;while(u!==g)}o.action=null}function Ds(o){o=o.listeners;for(var u=0;u<o.length;u++)(0,o[u])()}function Eh(o,u){return u}function Ah(o,u){if(Jt){var d=On.formState;if(d!==null){e:{var g=Vt;if(Jt){if(Cn){t:{for(var C=Cn,I=It;C.nodeType!==8;){if(!I){C=null;break t}if(C=Ao(C.nextSibling),C===null){C=null;break t}}I=C.data,C=I==="F!"||I==="F"?C:null}if(C){Cn=Ao(C.nextSibling),g=C.data==="F!";break e}}Ml(g)}g=!1}g&&(u=d[0])}}return d=$e(),d.memoizedState=d.baseState=u,g={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Eh,lastRenderedState:u},d.queue=g,d=Ns.bind(null,Vt,g),g.dispatch=d,g=Th(!1),I=Dd.bind(null,Vt,!1,g.queue),g=$e(),C={state:u,dispatch:null,action:o,pending:null},g.queue=C,d=Hg.bind(null,Vt,C,I,d),C.dispatch=d,g.memoizedState=o,[u,d,!1]}function zg(o){var u=bn();return Gg(u,gn,o)}function Gg(o,u,d){if(u=Sh(o,u,Eh)[0],o=vo(Vr)[0],typeof u=="object"&&u!==null&&typeof u.then=="function")try{var g=lu(u)}catch(B){throw B===ga?en:B}else g=u;u=bn();var C=u.queue,I=C.dispatch;return d!==u.memoizedState&&(Vt.flags|=2048,au(9,Ad(),Ch.bind(null,C,d),null)),[g,I,o]}function Ch(o,u){o.action=u}function bh(o){var u=bn(),d=gn;if(d!==null)return Gg(u,d,o);bn(),u=u.memoizedState,d=bn();var g=d.queue.dispatch;return d.memoizedState=o,[u,g,!1]}function au(o,u,d,g){return o={tag:o,create:d,deps:g,inst:u,next:null},u=Vt.updateQueue,u===null&&(u=Mi(),Vt.updateQueue=u),d=u.lastEffect,d===null?u.lastEffect=o.next=o:(g=d.next,d.next=o,o.next=g,u.lastEffect=o),o}function Ad(){return{destroy:void 0,resource:void 0}}function Xg(){return bn().memoizedState}function Os(o,u,d,g){var C=$e();g=g===void 0?null:g,Vt.flags|=o,C.memoizedState=au(1|u,Ad(),d,g)}function ks(o,u,d,g){var C=bn();g=g===void 0?null:g;var I=C.memoizedState.inst;gn!==null&&g!==null&&Xc(g,gn.memoizedState.deps)?C.memoizedState=au(u,I,d,g):(Vt.flags|=o,C.memoizedState=au(1|u,I,d,g))}function Yg(o,u){Os(8390656,8,o,u)}function Wg(o,u){ks(2048,8,o,u)}function Ih(o,u){return ks(4,2,o,u)}function Rs(o,u){return ks(4,4,o,u)}function Dh(o,u){if(typeof u=="function"){o=o();var d=u(o);return function(){typeof d=="function"?d():u(null)}}if(u!=null)return o=o(),u.current=o,function(){u.current=null}}function Qg(o,u,d){d=d!=null?d.concat([o]):null,ks(4,4,Dh.bind(null,u,o),d)}function uu(){}function Jg(o,u){var d=bn();u=u===void 0?null:u;var g=d.memoizedState;return u!==null&&Xc(u,g[1])?g[0]:(d.memoizedState=[o,u],o)}function Zg(o,u){var d=bn();u=u===void 0?null:u;var g=d.memoizedState;if(u!==null&&Xc(u,g[1]))return g[0];if(g=o(),Wo){fl(!0);try{o()}finally{fl(!1)}}return d.memoizedState=[g,u],g}function Cd(o,u,d){return d===void 0||(cn&1073741824)!==0?o.memoizedState=u:(o.memoizedState=d,o=yf(),Vt.lanes|=o,el|=o,d)}function $g(o,u,d,g){return or(d,u)?d:yo.current!==null?(o=Cd(o,d,g),or(o,u)||(Ci=!0),o):(cn&42)===0?(Ci=!0,o.memoizedState=d):(o=yf(),Vt.lanes|=o,el|=o,u)}function Oh(o,u,d,g,C){var I=je.p;je.p=I!==0&&8>I?I:8;var B=Te.T,H={};Te.T=H,Dd(o,!1,u,d);try{var ie=C(),me=Te.S;if(me!==null&&me(H,ie),ie!==null&&typeof ie=="object"&&typeof ie.then=="function"){var Ae=Lg(ie,g);su(o,u,Ae,Hn(o))}else su(o,u,g,Hn(o))}catch(Ie){su(o,u,{then:function(){},status:"rejected",reason:Ie},Hn())}finally{je.p=I,Te.T=B}}function P0(){}function kh(o,u,d,g){if(o.tag!==5)throw Error(S(476));var C=em(o).queue;Oh(o,C,u,ht,d===null?P0:function(){return Qc(o),d(g)})}function em(o){var u=o.memoizedState;if(u!==null)return u;u={memoizedState:ht,baseState:ht,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Vr,lastRenderedState:ht},next:null};var d={};return u.next={memoizedState:d,baseState:d,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Vr,lastRenderedState:d},next:null},o.memoizedState=u,o=o.alternate,o!==null&&(o.memoizedState=u),u}function Qc(o){var u=em(o).next.queue;su(o,u,{},Hn())}function bd(){return ai(Rf)}function Rh(){return bn().memoizedState}function Id(){return bn().memoizedState}function L0(o){for(var u=o.return;u!==null;){switch(u.tag){case 24:case 3:var d=Hn();o=Xo(d);var g=Cr(u,o,d);g!==null&&(Pn(g,u,d),As(g,u,d)),u={cache:qc()},o.payload=u;return}u=u.return}}function Ms(o,u,d){var g=Hn();d={lane:g,revertLane:0,action:d,hasEagerState:!1,eagerState:null,next:null},Jc(o)?Mh(u,d):(d=hn(o,u,d,g),d!==null&&(Pn(d,o,g),Od(d,u,g)))}function Ns(o,u,d){var g=Hn();su(o,u,d,g)}function su(o,u,d,g){var C={lane:g,revertLane:0,action:d,hasEagerState:!1,eagerState:null,next:null};if(Jc(o))Mh(u,C);else{var I=o.alternate;if(o.lanes===0&&(I===null||I.lanes===0)&&(I=u.lastRenderedReducer,I!==null))try{var B=u.lastRenderedState,H=I(B,d);if(C.hasEagerState=!0,C.eagerState=H,or(H,B))return vs(o,u,C,0),On===null&&Uc(),!1}catch{}finally{}if(d=hn(o,u,C,g),d!==null)return Pn(d,o,g),Od(d,u,g),!0}return!1}function Dd(o,u,d,g){if(g={lane:2,revertLane:Zh(),action:g,hasEagerState:!1,eagerState:null,next:null},Jc(o)){if(u)throw Error(S(479))}else u=hn(o,d,g,2),u!==null&&Pn(u,o,2)}function Jc(o){var u=o.alternate;return o===Vt||u!==null&&u===Vt}function Mh(o,u){ou=Gc=!0;var d=o.pending;d===null?u.next=u:(u.next=d.next,d.next=u),o.pending=u}function Od(o,u,d){if((d&4194048)!==0){var g=u.lanes;g&=o.pendingLanes,d|=g,u.lanes=d,Tg(o,d)}}var Zc={readContext:ai,use:jl,useCallback:ct,useContext:ct,useEffect:ct,useImperativeHandle:ct,useLayoutEffect:ct,useInsertionEffect:ct,useMemo:ct,useReducer:ct,useRef:ct,useState:ct,useDebugValue:ct,useDeferredValue:ct,useTransition:ct,useSyncExternalStore:ct,useId:ct,useHostTransitionStatus:ct,useFormState:ct,useActionState:ct,useOptimistic:ct,useMemoCache:ct,useCacheRefresh:ct},kd={readContext:ai,use:jl,useCallback:function(o,u){return $e().memoizedState=[o,u===void 0?null:u],o},useContext:ai,useEffect:Yg,useImperativeHandle:function(o,u,d){d=d!=null?d.concat([o]):null,Os(4194308,4,Dh.bind(null,u,o),d)},useLayoutEffect:function(o,u){return Os(4194308,4,o,u)},useInsertionEffect:function(o,u){Os(4,2,o,u)},useMemo:function(o,u){var d=$e();u=u===void 0?null:u;var g=o();if(Wo){fl(!0);try{o()}finally{fl(!1)}}return d.memoizedState=[g,u],g},useReducer:function(o,u,d){var g=$e();if(d!==void 0){var C=d(u);if(Wo){fl(!0);try{d(u)}finally{fl(!1)}}}else C=u;return g.memoizedState=g.baseState=C,o={pending:null,lanes:0,dispatch:null,lastRenderedReducer:o,lastRenderedState:C},g.queue=o,o=o.dispatch=Ms.bind(null,Vt,o),[g.memoizedState,o]},useRef:function(o){var u=$e();return o={current:o},u.memoizedState=o},useState:function(o){o=Th(o);var u=o.queue,d=Ns.bind(null,Vt,u);return u.dispatch=d,[o.memoizedState,d]},useDebugValue:uu,useDeferredValue:function(o,u){var d=$e();return Cd(d,o,u)},useTransition:function(){var o=Th(!1);return o=Oh.bind(null,Vt,o.queue,!0,!1),$e().memoizedState=o,[!1,o]},useSyncExternalStore:function(o,u,d){var g=Vt,C=$e();if(Jt){if(d===void 0)throw Error(S(407));d=d()}else{if(d=u(),On===null)throw Error(S(349));(tn&124)!==0||Yc(g,u,d)}C.memoizedState=d;var I={value:d,getSnapshot:u};return C.queue=I,Yg(Bg.bind(null,g,I,o),[o]),g.flags|=2048,au(9,Ad(),Wc.bind(null,g,I,d,u),null),d},useId:function(){var o=$e(),u=On.identifierPrefix;if(Jt){var d=Ar,g=Ol;d=(g&~(1<<32-vr(g)-1)).toString(32)+d,u="«"+u+"R"+d,d=Wi++,0<d&&(u+="H"+d.toString(32)),u+="»"}else d=Is++,u="«"+u+"r"+d.toString(32)+"»";return o.memoizedState=u},useHostTransitionStatus:bd,useFormState:Ah,useActionState:Ah,useOptimistic:function(o){var u=$e();u.memoizedState=u.baseState=o;var d={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return u.queue=d,u=Dd.bind(null,Vt,!0,d),d.dispatch=u,[o,u]},useMemoCache:wd,useCacheRefresh:function(){return $e().memoizedState=L0.bind(null,Vt)}},Ps={readContext:ai,use:jl,useCallback:Jg,useContext:ai,useEffect:Wg,useImperativeHandle:Qg,useInsertionEffect:Ih,useLayoutEffect:Rs,useMemo:Zg,useReducer:vo,useRef:Xg,useState:function(){return vo(Vr)},useDebugValue:uu,useDeferredValue:function(o,u){var d=bn();return $g(d,gn.memoizedState,o,u)},useTransition:function(){var o=vo(Vr)[0],u=bn().memoizedState;return[typeof o=="boolean"?o:lu(o),u]},useSyncExternalStore:xd,useId:Rh,useHostTransitionStatus:bd,useFormState:zg,useActionState:zg,useOptimistic:function(o,u){var d=bn();return xh(d,gn,o,u)},useMemoCache:wd,useCacheRefresh:Id},cu={readContext:ai,use:jl,useCallback:Jg,useContext:ai,useEffect:Wg,useImperativeHandle:Qg,useInsertionEffect:Ih,useLayoutEffect:Rs,useMemo:Zg,useReducer:Td,useRef:Xg,useState:function(){return Td(Vr)},useDebugValue:uu,useDeferredValue:function(o,u){var d=bn();return gn===null?Cd(d,o,u):$g(d,gn.memoizedState,o,u)},useTransition:function(){var o=Td(Vr)[0],u=bn().memoizedState;return[typeof o=="boolean"?o:lu(o),u]},useSyncExternalStore:xd,useId:Rh,useHostTransitionStatus:bd,useFormState:bh,useActionState:bh,useOptimistic:function(o,u){var d=bn();return gn!==null?xh(d,gn,o,u):(d.baseState=o,[o,d.queue.dispatch])},useMemoCache:wd,useCacheRefresh:Id},Ls=null,_s=0;function Bl(o){var u=_s;return _s+=1,Ls===null&&(Ls=[]),jg(Ls,o,u)}function va(o,u){u=u.props.ref,o.ref=u!==void 0?u:null}function fu(o,u){throw u.$$typeof===v?Error(S(525)):(o=Object.prototype.toString.call(u),Error(S(31,o==="[object Object]"?"object with keys {"+Object.keys(u).join(", ")+"}":o)))}function $c(o){var u=o._init;return u(o._payload)}function ef(o){function u(he,ue){if(o){var ge=he.deletions;ge===null?(he.deletions=[ue],he.flags|=16):ge.push(ue)}}function d(he,ue){if(!o)return null;for(;ue!==null;)u(he,ue),ue=ue.sibling;return null}function g(he){for(var ue=new Map;he!==null;)he.key!==null?ue.set(he.key,he):ue.set(he.index,he),he=he.sibling;return ue}function C(he,ue){return he=jn(he,ue),he.index=0,he.sibling=null,he}function I(he,ue,ge){return he.index=ge,o?(ge=he.alternate,ge!==null?(ge=ge.index,ge<ue?(he.flags|=67108866,ue):ge):(he.flags|=67108866,ue)):(he.flags|=1048576,ue)}function B(he){return o&&he.alternate===null&&(he.flags|=67108866),he}function H(he,ue,ge,Ce){return ue===null||ue.tag!==6?(ue=po(ge,he.mode,Ce),ue.return=he,ue):(ue=C(ue,ge),ue.return=he,ue)}function ie(he,ue,ge,Ce){var it=ge.type;return it===b?Ae(he,ue,ge.props.children,Ce,ge.key):ue!==null&&(ue.elementType===it||typeof it=="object"&&it!==null&&it.$$typeof===pt&&$c(it)===ue.type)?(ue=C(ue,ge.props),va(ue,ge),ue.return=he,ue):(ue=jc(ge.type,ge.key,ge.props,null,he.mode,Ce),va(ue,ge),ue.return=he,ue)}function me(he,ue,ge,Ce){return ue===null||ue.tag!==4||ue.stateNode.containerInfo!==ge.containerInfo||ue.stateNode.implementation!==ge.implementation?(ue=ho(ge,he.mode,Ce),ue.return=he,ue):(ue=C(ue,ge.children||[]),ue.return=he,ue)}function Ae(he,ue,ge,Ce,it){return ue===null||ue.tag!==7?(ue=Ja(ge,he.mode,Ce,it),ue.return=he,ue):(ue=C(ue,ge),ue.return=he,ue)}function Ie(he,ue,ge){if(typeof ue=="string"&&ue!==""||typeof ue=="number"||typeof ue=="bigint")return ue=po(""+ue,he.mode,ge),ue.return=he,ue;if(typeof ue=="object"&&ue!==null){switch(ue.$$typeof){case M:return ge=jc(ue.type,ue.key,ue.props,null,he.mode,ge),va(ge,ue),ge.return=he,ge;case F:return ue=ho(ue,he.mode,ge),ue.return=he,ue;case pt:var Ce=ue._init;return ue=Ce(ue._payload),Ie(he,ue,ge)}if(Me(ue)||pe(ue))return ue=Ja(ue,he.mode,ge,null),ue.return=he,ue;if(typeof ue.then=="function")return Ie(he,Bl(ue),ge);if(ue.$$typeof===ee)return Ie(he,Ts(he,ue),ge);fu(he,ue)}return null}function Se(he,ue,ge,Ce){var it=ue!==null?ue.key:null;if(typeof ge=="string"&&ge!==""||typeof ge=="number"||typeof ge=="bigint")return it!==null?null:H(he,ue,""+ge,Ce);if(typeof ge=="object"&&ge!==null){switch(ge.$$typeof){case M:return ge.key===it?ie(he,ue,ge,Ce):null;case F:return ge.key===it?me(he,ue,ge,Ce):null;case pt:return it=ge._init,ge=it(ge._payload),Se(he,ue,ge,Ce)}if(Me(ge)||pe(ge))return it!==null?null:Ae(he,ue,ge,Ce,null);if(typeof ge.then=="function")return Se(he,ue,Bl(ge),Ce);if(ge.$$typeof===ee)return Se(he,ue,Ts(he,ge),Ce);fu(he,ge)}return null}function we(he,ue,ge,Ce,it){if(typeof Ce=="string"&&Ce!==""||typeof Ce=="number"||typeof Ce=="bigint")return he=he.get(ge)||null,H(ue,he,""+Ce,it);if(typeof Ce=="object"&&Ce!==null){switch(Ce.$$typeof){case M:return he=he.get(Ce.key===null?ge:Ce.key)||null,ie(ue,he,Ce,it);case F:return he=he.get(Ce.key===null?ge:Ce.key)||null,me(ue,he,Ce,it);case pt:var Kt=Ce._init;return Ce=Kt(Ce._payload),we(he,ue,ge,Ce,it)}if(Me(Ce)||pe(Ce))return he=he.get(ge)||null,Ae(ue,he,Ce,it,null);if(typeof Ce.then=="function")return we(he,ue,ge,Bl(Ce),it);if(Ce.$$typeof===ee)return we(he,ue,ge,Ts(ue,Ce),it);fu(ue,Ce)}return null}function At(he,ue,ge,Ce){for(var it=null,Kt=null,lt=ue,Ct=ue=0,wi=null;lt!==null&&Ct<ge.length;Ct++){lt.index>Ct?(wi=lt,lt=null):wi=lt.sibling;var an=Se(he,lt,ge[Ct],Ce);if(an===null){lt===null&&(lt=wi);break}o&&lt&&an.alternate===null&&u(he,lt),ue=I(an,ue,Ct),Kt===null?it=an:Kt.sibling=an,Kt=an,lt=wi}if(Ct===ge.length)return d(he,lt),Jt&&Za(he,Ct),it;if(lt===null){for(;Ct<ge.length;Ct++)lt=Ie(he,ge[Ct],Ce),lt!==null&&(ue=I(lt,ue,Ct),Kt===null?it=lt:Kt.sibling=lt,Kt=lt);return Jt&&Za(he,Ct),it}for(lt=g(lt);Ct<ge.length;Ct++)wi=we(lt,he,Ct,ge[Ct],Ce),wi!==null&&(o&&wi.alternate!==null&&lt.delete(wi.key===null?Ct:wi.key),ue=I(wi,ue,Ct),Kt===null?it=wi:Kt.sibling=wi,Kt=wi);return o&&lt.forEach(function(Ra){return u(he,Ra)}),Jt&&Za(he,Ct),it}function wt(he,ue,ge,Ce){if(ge==null)throw Error(S(151));for(var it=null,Kt=null,lt=ue,Ct=ue=0,wi=null,an=ge.next();lt!==null&&!an.done;Ct++,an=ge.next()){lt.index>Ct?(wi=lt,lt=null):wi=lt.sibling;var Ra=Se(he,lt,an.value,Ce);if(Ra===null){lt===null&&(lt=wi);break}o&&lt&&Ra.alternate===null&&u(he,lt),ue=I(Ra,ue,Ct),Kt===null?it=Ra:Kt.sibling=Ra,Kt=Ra,lt=wi}if(an.done)return d(he,lt),Jt&&Za(he,Ct),it;if(lt===null){for(;!an.done;Ct++,an=ge.next())an=Ie(he,an.value,Ce),an!==null&&(ue=I(an,ue,Ct),Kt===null?it=an:Kt.sibling=an,Kt=an);return Jt&&Za(he,Ct),it}for(lt=g(lt);!an.done;Ct++,an=ge.next())an=we(lt,he,Ct,an.value,Ce),an!==null&&(o&&an.alternate!==null&&lt.delete(an.key===null?Ct:an.key),ue=I(an,ue,Ct),Kt===null?it=an:Kt.sibling=an,Kt=an);return o&&lt.forEach(function(l1){return u(he,l1)}),Jt&&Za(he,Ct),it}function Sn(he,ue,ge,Ce){if(typeof ge=="object"&&ge!==null&&ge.type===b&&ge.key===null&&(ge=ge.props.children),typeof ge=="object"&&ge!==null){switch(ge.$$typeof){case M:e:{for(var it=ge.key;ue!==null;){if(ue.key===it){if(it=ge.type,it===b){if(ue.tag===7){d(he,ue.sibling),Ce=C(ue,ge.props.children),Ce.return=he,he=Ce;break e}}else if(ue.elementType===it||typeof it=="object"&&it!==null&&it.$$typeof===pt&&$c(it)===ue.type){d(he,ue.sibling),Ce=C(ue,ge.props),va(Ce,ge),Ce.return=he,he=Ce;break e}d(he,ue);break}else u(he,ue);ue=ue.sibling}ge.type===b?(Ce=Ja(ge.props.children,he.mode,Ce,ge.key),Ce.return=he,he=Ce):(Ce=jc(ge.type,ge.key,ge.props,null,he.mode,Ce),va(Ce,ge),Ce.return=he,he=Ce)}return B(he);case F:e:{for(it=ge.key;ue!==null;){if(ue.key===it)if(ue.tag===4&&ue.stateNode.containerInfo===ge.containerInfo&&ue.stateNode.implementation===ge.implementation){d(he,ue.sibling),Ce=C(ue,ge.children||[]),Ce.return=he,he=Ce;break e}else{d(he,ue);break}else u(he,ue);ue=ue.sibling}Ce=ho(ge,he.mode,Ce),Ce.return=he,he=Ce}return B(he);case pt:return it=ge._init,ge=it(ge._payload),Sn(he,ue,ge,Ce)}if(Me(ge))return At(he,ue,ge,Ce);if(pe(ge)){if(it=pe(ge),typeof it!="function")throw Error(S(150));return ge=it.call(ge),wt(he,ue,ge,Ce)}if(typeof ge.then=="function")return Sn(he,ue,Bl(ge),Ce);if(ge.$$typeof===ee)return Sn(he,ue,Ts(he,ge),Ce);fu(he,ge)}return typeof ge=="string"&&ge!==""||typeof ge=="number"||typeof ge=="bigint"?(ge=""+ge,ue!==null&&ue.tag===6?(d(he,ue.sibling),Ce=C(ue,ge),Ce.return=he,he=Ce):(d(he,ue),Ce=po(ge,he.mode,Ce),Ce.return=he,he=Ce),B(he)):d(he,ue)}return function(he,ue,ge,Ce){try{_s=0;var it=Sn(he,ue,ge,Ce);return Ls=null,it}catch(lt){if(lt===ga||lt===en)throw lt;var Kt=li(29,lt,null,he.mode);return Kt.lanes=Ce,Kt.return=he,Kt}finally{}}}var du=ef(!0),Nh=ef(!1),Hr=Ne(null),ar=null;function Xn(o){var u=o.alternate;Fe(si,si.current&1),Fe(Hr,o),ar===null&&(u===null||yo.current!==null||u.memoizedState!==null)&&(ar=o)}function Sa(o){if(o.tag===22){if(Fe(si,si.current),Fe(Hr,o),ar===null){var u=o.alternate;u!==null&&u.memoizedState!==null&&(ar=o)}}else br()}function br(){Fe(si,si.current),Fe(Hr,Hr.current)}function Qo(o){tt(Hr),ar===o&&(ar=null),tt(si)}var si=Ne(0);function wa(o){for(var u=o;u!==null;){if(u.tag===13){var d=u.memoizedState;if(d!==null&&(d=d.dehydrated,d===null||d.data==="$?"||oc(d)))return u}else if(u.tag===19&&u.memoizedProps.revealOrder!==void 0){if((u.flags&128)!==0)return u}else if(u.child!==null){u.child.return=u,u=u.child;continue}if(u===o)break;for(;u.sibling===null;){if(u.return===null||u.return===o)return null;u=u.return}u.sibling.return=u.return,u=u.sibling}return null}function Vl(o,u,d,g){u=o.memoizedState,d=d(g,u),d=d==null?u:p({},u,d),o.memoizedState=d,o.lanes===0&&(o.updateQueue.baseState=d)}var pu={enqueueSetState:function(o,u,d){o=o._reactInternals;var g=Hn(),C=Xo(g);C.payload=u,d!=null&&(C.callback=d),u=Cr(o,C,g),u!==null&&(Pn(u,o,g),As(u,o,g))},enqueueReplaceState:function(o,u,d){o=o._reactInternals;var g=Hn(),C=Xo(g);C.tag=1,C.payload=u,d!=null&&(C.callback=d),u=Cr(o,C,g),u!==null&&(Pn(u,o,g),As(u,o,g))},enqueueForceUpdate:function(o,u){o=o._reactInternals;var d=Hn(),g=Xo(d);g.tag=2,u!=null&&(g.callback=u),u=Cr(o,g,d),u!==null&&(Pn(u,o,d),As(u,o,d))}};function tm(o,u,d,g,C,I,B){return o=o.stateNode,typeof o.shouldComponentUpdate=="function"?o.shouldComponentUpdate(g,I,B):u.prototype&&u.prototype.isPureReactComponent?!ca(d,g)||!ca(C,I):!0}function rn(o,u,d,g){o=u.state,typeof u.componentWillReceiveProps=="function"&&u.componentWillReceiveProps(d,g),typeof u.UNSAFE_componentWillReceiveProps=="function"&&u.UNSAFE_componentWillReceiveProps(d,g),u.state!==o&&pu.enqueueReplaceState(u,u.state,null)}function Ta(o,u){var d=u;if("ref"in u){d={};for(var g in u)g!=="ref"&&(d[g]=u[g])}if(o=o.defaultProps){d===u&&(d=p({},d));for(var C in o)d[C]===void 0&&(d[C]=o[C])}return d}var tf=typeof reportError=="function"?reportError:function(o){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var u=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof o=="object"&&o!==null&&typeof o.message=="string"?String(o.message):String(o),error:o});if(!window.dispatchEvent(u))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",o);return}console.error(o)};function St(o){tf(o)}function Ph(o){console.error(o)}function Hl(o){tf(o)}function nf(o,u){try{var d=o.onUncaughtError;d(u.value,{componentStack:u.stack})}catch(g){setTimeout(function(){throw g})}}function nm(o,u,d){try{var g=o.onCaughtError;g(d.value,{componentStack:d.stack,errorBoundary:u.tag===1?u.stateNode:null})}catch(C){setTimeout(function(){throw C})}}function Lh(o,u,d){return d=Xo(d),d.tag=3,d.payload={element:null},d.callback=function(){nf(o,u)},d}function im(o){return o=Xo(o),o.tag=3,o}function rm(o,u,d,g){var C=d.type.getDerivedStateFromError;if(typeof C=="function"){var I=g.value;o.payload=function(){return C(I)},o.callback=function(){nm(u,d,g)}}var B=d.stateNode;B!==null&&typeof B.componentDidCatch=="function"&&(o.callback=function(){nm(u,d,g),typeof C!="function"&&(zl===null?zl=new Set([this]):zl.add(this));var H=g.stack;this.componentDidCatch(g.value,{componentStack:H!==null?H:""})})}function _0(o,u,d,g,C){if(d.flags|=32768,g!==null&&typeof g=="object"&&typeof g.then=="function"){if(u=d.alternate,u!==null&&Hc(u,d,C,!0),d=Hr.current,d!==null){switch(d.tag){case 13:return ar===null?Zs():d.alternate===null&&_e===0&&(_e=3),d.flags&=-257,d.flags|=65536,d.lanes=C,g===pd?d.flags|=16384:(u=d.updateQueue,u===null?d.updateQueue=new Set([g]):u.add(g),Qh(o,g,C)),!1;case 22:return d.flags|=65536,g===pd?d.flags|=16384:(u=d.updateQueue,u===null?(u={transitions:null,markerInstances:null,retryQueue:new Set([g])},d.updateQueue=u):(d=u.retryQueue,d===null?u.retryQueue=new Set([g]):d.add(g)),Qh(o,g,C)),!1}throw Error(S(435,d.tag))}return Qh(o,g,C),Zs(),!1}if(Jt)return u=Hr.current,u!==null?((u.flags&65536)===0&&(u.flags|=256),u.flags|=65536,u.lanes=C,g!==Rl&&(o=Error(S(422),{cause:g}),Vc(lr(o,d)))):(g!==Rl&&(u=Error(S(423),{cause:g}),Vc(lr(u,d))),o=o.current.alternate,o.flags|=65536,C&=-C,o.lanes|=C,g=lr(g,d),C=Lh(o.stateNode,g,C),gd(o,C),_e!==4&&(_e=2)),!1;var I=Error(S(520),{cause:g});if(I=lr(I,d),Gs===null?Gs=[I]:Gs.push(I),_e!==4&&(_e=2),u===null)return!0;g=lr(g,d),d=u;do{switch(d.tag){case 3:return d.flags|=65536,o=C&-C,d.lanes|=o,o=Lh(d.stateNode,g,o),gd(d,o),!1;case 1:if(u=d.type,I=d.stateNode,(d.flags&128)===0&&(typeof u.getDerivedStateFromError=="function"||I!==null&&typeof I.componentDidCatch=="function"&&(zl===null||!zl.has(I))))return d.flags|=65536,C&=-C,d.lanes|=C,C=im(C),rm(C,o,d,g),gd(d,C),!1}d=d.return}while(d!==null);return!1}var om=Error(S(461)),Ci=!1;function Ni(o,u,d,g){u.child=o===null?Nh(u,null,d,g):du(u,o.child,d,g)}function lm(o,u,d,g,C){d=d.render;var I=u.ref;if("ref"in g){var B={};for(var H in g)H!=="ref"&&(B[H]=g[H])}else B=g;return ha(u),g=vh(o,u,d,B,I,C),H=mo(),o!==null&&!Ci?(Sd(o,u,C),Kl(o,u,C)):(Jt&&H&&Fo(u),u.flags|=1,Ni(o,u,g,C),u.child)}function rf(o,u,d,g,C){if(o===null){var I=d.type;return typeof I=="function"&&!Ri(I)&&I.defaultProps===void 0&&d.compare===null?(u.tag=15,u.type=I,am(o,u,I,g,C)):(o=jc(d.type,null,g,u,u.mode,C),o.ref=u.ref,o.return=u,u.child=o)}if(I=o.child,!wo(o,C)){var B=I.memoizedProps;if(d=d.compare,d=d!==null?d:ca,d(B,g)&&o.ref===u.ref)return Kl(o,u,C)}return u.flags|=1,o=jn(I,g),o.ref=u.ref,o.return=u,u.child=o}function am(o,u,d,g,C){if(o!==null){var I=o.memoizedProps;if(ca(I,g)&&o.ref===u.ref)if(Ci=!1,u.pendingProps=g=I,wo(o,C))(o.flags&131072)!==0&&(Ci=!0);else return u.lanes=o.lanes,Kl(o,u,C)}return _h(o,u,d,g,C)}function Rd(o,u,d){var g=u.pendingProps,C=g.children,I=o!==null?o.memoizedState:null;if(g.mode==="hidden"){if((u.flags&128)!==0){if(g=I!==null?I.baseLanes|d:d,o!==null){for(C=u.child=o.child,I=0;C!==null;)I=I|C.lanes|C.childLanes,C=C.sibling;u.childLanes=I&~g}else u.childLanes=0,u.child=null;return um(o,u,g,d)}if((d&536870912)!==0)u.memoizedState={baseLanes:0,cachePool:null},o!==null&&ru(u,I!==null?I.cachePool:null),I!==null?Xt(u,I):go(),Sa(u);else return u.lanes=u.childLanes=536870912,um(o,u,I!==null?I.baseLanes|d:d,d)}else I!==null?(ru(u,I.cachePool),Xt(u,I),br(),u.memoizedState=null):(o!==null&&ru(u,null),go(),br());return Ni(o,u,C,d),u.child}function um(o,u,d,g){var C=dd();return C=C===null?null:{parent:Bn._currentValue,pool:C},u.memoizedState={baseLanes:d,cachePool:C},o!==null&&ru(u,null),go(),Sa(u),o!==null&&Hc(o,u,g,!0),null}function Md(o,u){var d=u.ref;if(d===null)o!==null&&o.ref!==null&&(u.flags|=4194816);else{if(typeof d!="function"&&typeof d!="object")throw Error(S(284));(o===null||o.ref!==d)&&(u.flags|=4194816)}}function _h(o,u,d,g,C){return ha(u),d=vh(o,u,d,g,void 0,C),g=mo(),o!==null&&!Ci?(Sd(o,u,C),Kl(o,u,C)):(Jt&&g&&Fo(u),u.flags|=1,Ni(o,u,d,C),u.child)}function sm(o,u,d,g,C,I){return ha(u),u.updateQueue=null,d=vd(u,g,d,C),ma(o),g=mo(),o!==null&&!Ci?(Sd(o,u,I),Kl(o,u,I)):(Jt&&g&&Fo(u),u.flags|=1,Ni(o,u,d,I),u.child)}function of(o,u,d,g,C){if(ha(u),u.stateNode===null){var I=bl,B=d.contextType;typeof B=="object"&&B!==null&&(I=ai(B)),I=new d(g,I),u.memoizedState=I.state!==null&&I.state!==void 0?I.state:null,I.updater=pu,u.stateNode=I,I._reactInternals=u,I=u.stateNode,I.props=g,I.state=u.memoizedState,I.refs={},yn(u),B=d.contextType,I.context=typeof B=="object"&&B!==null?ai(B):bl,I.state=u.memoizedState,B=d.getDerivedStateFromProps,typeof B=="function"&&(Vl(u,d,B,g),I.state=u.memoizedState),typeof d.getDerivedStateFromProps=="function"||typeof I.getSnapshotBeforeUpdate=="function"||typeof I.UNSAFE_componentWillMount!="function"&&typeof I.componentWillMount!="function"||(B=I.state,typeof I.componentWillMount=="function"&&I.componentWillMount(),typeof I.UNSAFE_componentWillMount=="function"&&I.UNSAFE_componentWillMount(),B!==I.state&&pu.enqueueReplaceState(I,I.state,null),Cs(u,g,I,C),ke(),I.state=u.memoizedState),typeof I.componentDidMount=="function"&&(u.flags|=4194308),g=!0}else if(o===null){I=u.stateNode;var H=u.memoizedProps,ie=Ta(d,H);I.props=ie;var me=I.context,Ae=d.contextType;B=bl,typeof Ae=="object"&&Ae!==null&&(B=ai(Ae));var Ie=d.getDerivedStateFromProps;Ae=typeof Ie=="function"||typeof I.getSnapshotBeforeUpdate=="function",H=u.pendingProps!==H,Ae||typeof I.UNSAFE_componentWillReceiveProps!="function"&&typeof I.componentWillReceiveProps!="function"||(H||me!==B)&&rn(u,I,g,B),kt=!1;var Se=u.memoizedState;I.state=Se,Cs(u,g,I,C),ke(),me=u.memoizedState,H||Se!==me||kt?(typeof Ie=="function"&&(Vl(u,d,Ie,g),me=u.memoizedState),(ie=kt||tm(u,d,ie,g,Se,me,B))?(Ae||typeof I.UNSAFE_componentWillMount!="function"&&typeof I.componentWillMount!="function"||(typeof I.componentWillMount=="function"&&I.componentWillMount(),typeof I.UNSAFE_componentWillMount=="function"&&I.UNSAFE_componentWillMount()),typeof I.componentDidMount=="function"&&(u.flags|=4194308)):(typeof I.componentDidMount=="function"&&(u.flags|=4194308),u.memoizedProps=g,u.memoizedState=me),I.props=g,I.state=me,I.context=B,g=ie):(typeof I.componentDidMount=="function"&&(u.flags|=4194308),g=!1)}else{I=u.stateNode,_l(o,u),B=u.memoizedProps,Ae=Ta(d,B),I.props=Ae,Ie=u.pendingProps,Se=I.context,me=d.contextType,ie=bl,typeof me=="object"&&me!==null&&(ie=ai(me)),H=d.getDerivedStateFromProps,(me=typeof H=="function"||typeof I.getSnapshotBeforeUpdate=="function")||typeof I.UNSAFE_componentWillReceiveProps!="function"&&typeof I.componentWillReceiveProps!="function"||(B!==Ie||Se!==ie)&&rn(u,I,g,ie),kt=!1,Se=u.memoizedState,I.state=Se,Cs(u,g,I,C),ke();var we=u.memoizedState;B!==Ie||Se!==we||kt||o!==null&&o.dependencies!==null&&Kc(o.dependencies)?(typeof H=="function"&&(Vl(u,d,H,g),we=u.memoizedState),(Ae=kt||tm(u,d,Ae,g,Se,we,ie)||o!==null&&o.dependencies!==null&&Kc(o.dependencies))?(me||typeof I.UNSAFE_componentWillUpdate!="function"&&typeof I.componentWillUpdate!="function"||(typeof I.componentWillUpdate=="function"&&I.componentWillUpdate(g,we,ie),typeof I.UNSAFE_componentWillUpdate=="function"&&I.UNSAFE_componentWillUpdate(g,we,ie)),typeof I.componentDidUpdate=="function"&&(u.flags|=4),typeof I.getSnapshotBeforeUpdate=="function"&&(u.flags|=1024)):(typeof I.componentDidUpdate!="function"||B===o.memoizedProps&&Se===o.memoizedState||(u.flags|=4),typeof I.getSnapshotBeforeUpdate!="function"||B===o.memoizedProps&&Se===o.memoizedState||(u.flags|=1024),u.memoizedProps=g,u.memoizedState=we),I.props=g,I.state=we,I.context=ie,g=Ae):(typeof I.componentDidUpdate!="function"||B===o.memoizedProps&&Se===o.memoizedState||(u.flags|=4),typeof I.getSnapshotBeforeUpdate!="function"||B===o.memoizedProps&&Se===o.memoizedState||(u.flags|=1024),g=!1)}return I=g,Md(o,u),g=(u.flags&128)!==0,I||g?(I=u.stateNode,d=g&&typeof d.getDerivedStateFromError!="function"?null:I.render(),u.flags|=1,o!==null&&g?(u.child=du(u,o.child,null,C),u.child=du(u,null,d,C)):Ni(o,u,d,C),u.memoizedState=I.state,o=u.child):o=Kl(o,u,C),o}function cm(o,u,d,g){return ws(),u.flags|=256,Ni(o,u,d,g),u.child}var bi={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Us(o){return{baseLanes:o,cachePool:_g()}}function qe(o,u,d){return o=o!==null?o.childLanes&~d:0,u&&(o|=Or),o}function Uh(o,u,d){var g=u.pendingProps,C=!1,I=(u.flags&128)!==0,B;if((B=I)||(B=o!==null&&o.memoizedState===null?!1:(si.current&2)!==0),B&&(C=!0,u.flags&=-129),B=(u.flags&32)!==0,u.flags&=-33,o===null){if(Jt){if(C?Xn(u):br(),Jt){var H=Cn,ie;if(ie=H){e:{for(ie=H,H=It;ie.nodeType!==8;){if(!H){H=null;break e}if(ie=Ao(ie.nextSibling),ie===null){H=null;break e}}H=ie}H!==null?(u.memoizedState={dehydrated:H,treeContext:pa!==null?{id:Ol,overflow:Ar}:null,retryLane:536870912,hydrationErrors:null},ie=li(18,null,null,0),ie.stateNode=H,ie.return=u,u.child=ie,Dn=u,Cn=null,ie=!0):ie=!1}ie||Ml(u)}if(H=u.memoizedState,H!==null&&(H=H.dehydrated,H!==null))return oc(H)?u.lanes=32:u.lanes=536870912,null;Qo(u)}return H=g.children,g=g.fallback,C?(br(),C=u.mode,H=lf({mode:"hidden",children:H},C),g=Ja(g,C,d,null),H.return=u,g.return=u,H.sibling=g,u.child=H,C=u.child,C.memoizedState=Us(d),C.childLanes=qe(o,B,d),u.memoizedState=bi,g):(Xn(u),So(u,H))}if(ie=o.memoizedState,ie!==null&&(H=ie.dehydrated,H!==null)){if(I)u.flags&256?(Xn(u),u.flags&=-257,u=hu(o,u,d)):u.memoizedState!==null?(br(),u.child=o.child,u.flags|=128,u=null):(br(),C=g.fallback,H=u.mode,g=lf({mode:"visible",children:g.children},H),C=Ja(C,H,d,null),C.flags|=2,g.return=u,C.return=u,g.sibling=C,u.child=g,du(u,o.child,null,d),g=u.child,g.memoizedState=Us(d),g.childLanes=qe(o,B,d),u.memoizedState=bi,u=C);else if(Xn(u),oc(H)){if(B=H.nextSibling&&H.nextSibling.dataset,B)var me=B.dgst;B=me,g=Error(S(419)),g.stack="",g.digest=B,Vc({value:g,source:null,stack:null}),u=hu(o,u,d)}else if(Ci||Hc(o,u,d,!1),B=(d&o.childLanes)!==0,Ci||B){if(B=On,B!==null&&(g=d&-d,g=(g&42)!==0?1:Qf(g),g=(g&(B.suspendedLanes|d))!==0?0:g,g!==0&&g!==ie.retryLane))throw ie.retryLane=g,fo(o,g),Pn(B,o,g),om;H.data==="$?"||Zs(),u=hu(o,u,d)}else H.data==="$?"?(u.flags|=192,u.child=o.child,u=null):(o=ie.treeContext,Cn=Ao(H.nextSibling),Dn=u,Jt=!0,kl=null,It=!1,o!==null&&(jr[Er++]=Ol,jr[Er++]=Ar,jr[Er++]=pa,Ol=o.id,Ar=o.overflow,pa=u),u=So(u,g.children),u.flags|=4096);return u}return C?(br(),C=g.fallback,H=u.mode,ie=o.child,me=ie.sibling,g=jn(ie,{mode:"hidden",children:g.children}),g.subtreeFlags=ie.subtreeFlags&65011712,me!==null?C=jn(me,C):(C=Ja(C,H,d,null),C.flags|=2),C.return=u,g.return=u,g.sibling=C,u.child=g,g=C,C=u.child,H=o.child.memoizedState,H===null?H=Us(d):(ie=H.cachePool,ie!==null?(me=Bn._currentValue,ie=ie.parent!==me?{parent:me,pool:me}:ie):ie=_g(),H={baseLanes:H.baseLanes|d,cachePool:ie}),C.memoizedState=H,C.childLanes=qe(o,B,d),u.memoizedState=bi,g):(Xn(u),d=o.child,o=d.sibling,d=jn(d,{mode:"visible",children:g.children}),d.return=u,d.sibling=null,o!==null&&(B=u.deletions,B===null?(u.deletions=[o],u.flags|=16):B.push(o)),u.child=d,u.memoizedState=null,d)}function So(o,u){return u=lf({mode:"visible",children:u},o.mode),u.return=o,o.child=u}function lf(o,u){return o=li(22,o,null,u),o.lanes=0,o.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null},o}function hu(o,u,d){return du(u,o.child,null,d),o=So(u,u.pendingProps.children),o.flags|=2,u.memoizedState=null,o}function Nd(o,u,d){o.lanes|=u;var g=o.alternate;g!==null&&(g.lanes|=u),hh(o.return,u,d)}function af(o,u,d,g,C){var I=o.memoizedState;I===null?o.memoizedState={isBackwards:u,rendering:null,renderingStartTime:0,last:g,tail:d,tailMode:C}:(I.isBackwards=u,I.rendering=null,I.renderingStartTime=0,I.last=g,I.tail=d,I.tailMode=C)}function jh(o,u,d){var g=u.pendingProps,C=g.revealOrder,I=g.tail;if(Ni(o,u,g.children,d),g=si.current,(g&2)!==0)g=g&1|2,u.flags|=128;else{if(o!==null&&(o.flags&128)!==0)e:for(o=u.child;o!==null;){if(o.tag===13)o.memoizedState!==null&&Nd(o,d,u);else if(o.tag===19)Nd(o,d,u);else if(o.child!==null){o.child.return=o,o=o.child;continue}if(o===u)break e;for(;o.sibling===null;){if(o.return===null||o.return===u)break e;o=o.return}o.sibling.return=o.return,o=o.sibling}g&=1}switch(Fe(si,g),C){case"forwards":for(d=u.child,C=null;d!==null;)o=d.alternate,o!==null&&wa(o)===null&&(C=d),d=d.sibling;d=C,d===null?(C=u.child,u.child=null):(C=d.sibling,d.sibling=null),af(u,!1,C,d,I);break;case"backwards":for(d=null,C=u.child,u.child=null;C!==null;){if(o=C.alternate,o!==null&&wa(o)===null){u.child=C;break}o=C.sibling,C.sibling=d,d=C,C=o}af(u,!0,d,null,I);break;case"together":af(u,!1,null,null,void 0);break;default:u.memoizedState=null}return u.child}function Kl(o,u,d){if(o!==null&&(u.dependencies=o.dependencies),el|=u.lanes,(d&u.childLanes)===0)if(o!==null){if(Hc(o,u,d,!1),(d&u.childLanes)===0)return null}else return null;if(o!==null&&u.child!==o.child)throw Error(S(153));if(u.child!==null){for(o=u.child,d=jn(o,o.pendingProps),u.child=d,d.return=u;o.sibling!==null;)o=o.sibling,d=d.sibling=jn(o,o.pendingProps),d.return=u;d.sibling=null}return u.child}function wo(o,u){return(o.lanes&u)!==0?!0:(o=o.dependencies,!!(o!==null&&Kc(o)))}function fm(o,u,d){switch(u.tag){case 3:xn(u,u.stateNode.containerInfo),Pl(u,Bn,o.memoizedState.cache),ws();break;case 27:case 5:jp(u);break;case 4:xn(u,u.stateNode.containerInfo);break;case 10:Pl(u,u.type,u.memoizedProps.value);break;case 13:var g=u.memoizedState;if(g!==null)return g.dehydrated!==null?(Xn(u),u.flags|=128,null):(d&u.child.childLanes)!==0?Uh(o,u,d):(Xn(u),o=Kl(o,u,d),o!==null?o.sibling:null);Xn(u);break;case 19:var C=(o.flags&128)!==0;if(g=(d&u.childLanes)!==0,g||(Hc(o,u,d,!1),g=(d&u.childLanes)!==0),C){if(g)return jh(o,u,d);u.flags|=128}if(C=u.memoizedState,C!==null&&(C.rendering=null,C.tail=null,C.lastEffect=null),Fe(si,si.current),g)break;return null;case 22:case 23:return u.lanes=0,Rd(o,u,d);case 24:Pl(u,Bn,o.memoizedState.cache)}return Kl(o,u,d)}function Bh(o,u,d){if(o!==null)if(o.memoizedProps!==u.pendingProps)Ci=!0;else{if(!wo(o,d)&&(u.flags&128)===0)return Ci=!1,fm(o,u,d);Ci=(o.flags&131072)!==0}else Ci=!1,Jt&&(u.flags&1048576)!==0&&Ng(u,ud,u.index);switch(u.lanes=0,u.tag){case 16:e:{o=u.pendingProps;var g=u.elementType,C=g._init;if(g=C(g._payload),u.type=g,typeof g=="function")Ri(g)?(o=Ta(g,o),u.tag=1,u=of(null,u,g,o,d)):(u.tag=0,u=_h(null,u,g,o,d));else{if(g!=null){if(C=g.$$typeof,C===be){u.tag=11,u=lm(null,u,g,o,d);break e}else if(C===et){u.tag=14,u=rf(null,u,g,o,d);break e}}throw u=Ue(g)||g,Error(S(306,u,""))}}return u;case 0:return _h(o,u,u.type,u.pendingProps,d);case 1:return g=u.type,C=Ta(g,u.pendingProps),of(o,u,g,C,d);case 3:e:{if(xn(u,u.stateNode.containerInfo),o===null)throw Error(S(387));g=u.pendingProps;var I=u.memoizedState;C=I.element,_l(o,u),Cs(u,g,null,d);var B=u.memoizedState;if(g=B.cache,Pl(u,Bn,g),g!==I.cache&&cd(u,[Bn],d,!0),ke(),g=B.element,I.isDehydrated)if(I={element:g,isDehydrated:!1,cache:B.cache},u.updateQueue.baseState=I,u.memoizedState=I,u.flags&256){u=cm(o,u,g,d);break e}else if(g!==C){C=lr(Error(S(424)),u),Vc(C),u=cm(o,u,g,d);break e}else{switch(o=u.stateNode.containerInfo,o.nodeType){case 9:o=o.body;break;default:o=o.nodeName==="HTML"?o.ownerDocument.body:o}for(Cn=Ao(o.firstChild),Dn=u,Jt=!0,kl=null,It=!0,d=Nh(u,null,g,d),u.child=d;d;)d.flags=d.flags&-3|4096,d=d.sibling}else{if(ws(),g===C){u=Kl(o,u,d);break e}Ni(o,u,g,d)}u=u.child}return u;case 26:return Md(o,u),o===null?(d=_m(u.type,null,u.pendingProps,null))?u.memoizedState=d:Jt||(d=u.type,o=u.pendingProps,g=Ou(yt.current).createElement(d),g[Jn]=u,g[ki]=o,ln(g,d,o),ri(g),u.stateNode=g):u.memoizedState=_m(u.type,o.memoizedProps,u.pendingProps,o.memoizedState),null;case 27:return jp(u),o===null&&Jt&&(g=u.stateNode=Mm(u.type,u.pendingProps,yt.current),Dn=u,It=!0,C=Cn,Eo(u.type)?(Cf=C,Cn=Ao(g.firstChild)):Cn=C),Ni(o,u,u.pendingProps.children,d),Md(o,u),o===null&&(u.flags|=4194304),u.child;case 5:return o===null&&Jt&&((C=g=Cn)&&(g=ba(g,u.type,u.pendingProps,It),g!==null?(u.stateNode=g,Dn=u,Cn=Ao(g.firstChild),It=!1,C=!0):C=!1),C||Ml(u)),jp(u),C=u.type,I=u.pendingProps,B=o!==null?o.memoizedProps:null,g=I.children,iy(C,I)?g=null:B!==null&&iy(C,B)&&(u.flags|=32),u.memoizedState!==null&&(C=vh(o,u,Zt,null,null,d),Rf._currentValue=C),Md(o,u),Ni(o,u,g,d),u.child;case 6:return o===null&&Jt&&((o=d=Cn)&&(d=Z0(d,u.pendingProps,It),d!==null?(u.stateNode=d,Dn=u,Cn=null,o=!0):o=!1),o||Ml(u)),null;case 13:return Uh(o,u,d);case 4:return xn(u,u.stateNode.containerInfo),g=u.pendingProps,o===null?u.child=du(u,null,g,d):Ni(o,u,g,d),u.child;case 11:return lm(o,u,u.type,u.pendingProps,d);case 7:return Ni(o,u,u.pendingProps,d),u.child;case 8:return Ni(o,u,u.pendingProps.children,d),u.child;case 12:return Ni(o,u,u.pendingProps.children,d),u.child;case 10:return g=u.pendingProps,Pl(u,u.type,g.value),Ni(o,u,g.children,d),u.child;case 9:return C=u.type._context,g=u.pendingProps.children,ha(u),C=ai(C),g=g(C),u.flags|=1,Ni(o,u,g,d),u.child;case 14:return rf(o,u,u.type,u.pendingProps,d);case 15:return am(o,u,u.type,u.pendingProps,d);case 19:return jh(o,u,d);case 31:return g=u.pendingProps,d=u.mode,g={mode:g.mode,children:g.children},o===null?(d=lf(g,d),d.ref=u.ref,u.child=d,d.return=u,u=d):(d=jn(o.child,g),d.ref=u.ref,u.child=d,d.return=u,u=d),u;case 22:return Rd(o,u,d);case 24:return ha(u),g=ai(Bn),o===null?(C=dd(),C===null&&(C=On,I=qc(),C.pooledCache=I,I.refCount++,I!==null&&(C.pooledCacheLanes|=d),C=I),u.memoizedState={parent:g,cache:C},yn(u),Pl(u,Bn,C)):((o.lanes&d)!==0&&(_l(o,u),Cs(u,null,null,d),ke()),C=o.memoizedState,I=u.memoizedState,C.parent!==g?(C={parent:g,cache:g},u.memoizedState=C,u.lanes===0&&(u.memoizedState=u.updateQueue.baseState=C),Pl(u,Bn,g)):(g=I.cache,Pl(u,Bn,g),g!==C.cache&&cd(u,[Bn],d,!0))),Ni(o,u,u.pendingProps.children,d),u.child;case 29:throw u.pendingProps}throw Error(S(156,u.tag))}function _i(o){o.flags|=4}function Pd(o,u){if(u.type!=="stylesheet"||(u.state.loading&4)!==0)o.flags&=-16777217;else if(o.flags|=16777216,!ay(u)){if(u=Hr.current,u!==null&&((tn&4194048)===tn?ar!==null:(tn&62914560)!==tn&&(tn&536870912)===0||u!==ar))throw Es=pd,Ug;o.flags|=8192}}function uf(o,u){u!==null&&(o.flags|=4),o.flags&16384&&(u=o.tag!==22?Ac():536870912,o.lanes|=u,zs|=u)}function js(o,u){if(!Jt)switch(o.tailMode){case"hidden":u=o.tail;for(var d=null;u!==null;)u.alternate!==null&&(d=u),u=u.sibling;d===null?o.tail=null:d.sibling=null;break;case"collapsed":d=o.tail;for(var g=null;d!==null;)d.alternate!==null&&(g=d),d=d.sibling;g===null?u||o.tail===null?o.tail=null:o.tail.sibling=null:g.sibling=null}}function Rn(o){var u=o.alternate!==null&&o.alternate.child===o.child,d=0,g=0;if(u)for(var C=o.child;C!==null;)d|=C.lanes|C.childLanes,g|=C.subtreeFlags&65011712,g|=C.flags&65011712,C.return=o,C=C.sibling;else for(C=o.child;C!==null;)d|=C.lanes|C.childLanes,g|=C.subtreeFlags,g|=C.flags,C.return=o,C=C.sibling;return o.subtreeFlags|=g,o.childLanes=d,u}function U0(o,u,d){var g=u.pendingProps;switch($a(u),u.tag){case 31:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Rn(u),null;case 1:return Rn(u),null;case 3:return d=u.stateNode,g=null,o!==null&&(g=o.memoizedState.cache),u.memoizedState.cache!==g&&(u.flags|=2048),Ll(Bn),cl(),d.pendingContext&&(d.context=d.pendingContext,d.pendingContext=null),(o===null||o.child===null)&&(Ss(u)?_i(u):o===null||o.memoizedState.isDehydrated&&(u.flags&256)===0||(u.flags|=1024,dh())),Rn(u),null;case 26:return d=u.memoizedState,o===null?(_i(u),d!==null?(Rn(u),Pd(u,d)):(Rn(u),u.flags&=-16777217)):d?d!==o.memoizedState?(_i(u),Rn(u),Pd(u,d)):(Rn(u),u.flags&=-16777217):(o.memoizedProps!==g&&_i(u),Rn(u),u.flags&=-16777217),null;case 27:Xf(u),d=yt.current;var C=u.type;if(o!==null&&u.stateNode!=null)o.memoizedProps!==g&&_i(u);else{if(!g){if(u.stateNode===null)throw Error(S(166));return Rn(u),null}o=z.current,Ss(u)?sd(u):(o=Mm(C,g,d),u.stateNode=o,_i(u))}return Rn(u),null;case 5:if(Xf(u),d=u.type,o!==null&&u.stateNode!=null)o.memoizedProps!==g&&_i(u);else{if(!g){if(u.stateNode===null)throw Error(S(166));return Rn(u),null}if(o=z.current,Ss(u))sd(u);else{switch(C=Ou(yt.current),o){case 1:o=C.createElementNS("http://www.w3.org/2000/svg",d);break;case 2:o=C.createElementNS("http://www.w3.org/1998/Math/MathML",d);break;default:switch(d){case"svg":o=C.createElementNS("http://www.w3.org/2000/svg",d);break;case"math":o=C.createElementNS("http://www.w3.org/1998/Math/MathML",d);break;case"script":o=C.createElement("div"),o.innerHTML="<script><\/script>",o=o.removeChild(o.firstChild);break;case"select":o=typeof g.is=="string"?C.createElement("select",{is:g.is}):C.createElement("select"),g.multiple?o.multiple=!0:g.size&&(o.size=g.size);break;default:o=typeof g.is=="string"?C.createElement(d,{is:g.is}):C.createElement(d)}}o[Jn]=u,o[ki]=g;e:for(C=u.child;C!==null;){if(C.tag===5||C.tag===6)o.appendChild(C.stateNode);else if(C.tag!==4&&C.tag!==27&&C.child!==null){C.child.return=C,C=C.child;continue}if(C===u)break e;for(;C.sibling===null;){if(C.return===null||C.return===u)break e;C=C.return}C.sibling.return=C.return,C=C.sibling}u.stateNode=o;e:switch(ln(o,d,g),d){case"button":case"input":case"select":case"textarea":o=!!g.autoFocus;break e;case"img":o=!0;break e;default:o=!1}o&&_i(u)}}return Rn(u),u.flags&=-16777217,null;case 6:if(o&&u.stateNode!=null)o.memoizedProps!==g&&_i(u);else{if(typeof g!="string"&&u.stateNode===null)throw Error(S(166));if(o=yt.current,Ss(u)){if(o=u.stateNode,d=u.memoizedProps,g=null,C=Dn,C!==null)switch(C.tag){case 27:case 5:g=C.memoizedProps}o[Jn]=u,o=!!(o.nodeValue===d||g!==null&&g.suppressHydrationWarning===!0||Jd(o.nodeValue,d)),o||Ml(u)}else o=Ou(o).createTextNode(g),o[Jn]=u,u.stateNode=o}return Rn(u),null;case 13:if(g=u.memoizedState,o===null||o.memoizedState!==null&&o.memoizedState.dehydrated!==null){if(C=Ss(u),g!==null&&g.dehydrated!==null){if(o===null){if(!C)throw Error(S(318));if(C=u.memoizedState,C=C!==null?C.dehydrated:null,!C)throw Error(S(317));C[Jn]=u}else ws(),(u.flags&128)===0&&(u.memoizedState=null),u.flags|=4;Rn(u),C=!1}else C=dh(),o!==null&&o.memoizedState!==null&&(o.memoizedState.hydrationErrors=C),C=!0;if(!C)return u.flags&256?(Qo(u),u):(Qo(u),null)}if(Qo(u),(u.flags&128)!==0)return u.lanes=d,u;if(d=g!==null,o=o!==null&&o.memoizedState!==null,d){g=u.child,C=null,g.alternate!==null&&g.alternate.memoizedState!==null&&g.alternate.memoizedState.cachePool!==null&&(C=g.alternate.memoizedState.cachePool.pool);var I=null;g.memoizedState!==null&&g.memoizedState.cachePool!==null&&(I=g.memoizedState.cachePool.pool),I!==C&&(g.flags|=2048)}return d!==o&&d&&(u.child.flags|=8192),uf(u,u.updateQueue),Rn(u),null;case 4:return cl(),o===null&&xf(u.stateNode.containerInfo),Rn(u),null;case 10:return Ll(u.type),Rn(u),null;case 19:if(tt(si),C=u.memoizedState,C===null)return Rn(u),null;if(g=(u.flags&128)!==0,I=C.rendering,I===null)if(g)js(C,!1);else{if(_e!==0||o!==null&&(o.flags&128)!==0)for(o=u.child;o!==null;){if(I=wa(o),I!==null){for(u.flags|=128,js(C,!1),o=I.updateQueue,u.updateQueue=o,uf(u,o),u.subtreeFlags=0,o=d,d=u.child;d!==null;)ad(d,o),d=d.sibling;return Fe(si,si.current&1|2),u.child}o=o.sibling}C.tail!==null&&tr()>Xs&&(u.flags|=128,g=!0,js(C,!1),u.lanes=4194304)}else{if(!g)if(o=wa(I),o!==null){if(u.flags|=128,g=!0,o=o.updateQueue,u.updateQueue=o,uf(u,o),js(C,!0),C.tail===null&&C.tailMode==="hidden"&&!I.alternate&&!Jt)return Rn(u),null}else 2*tr()-C.renderingStartTime>Xs&&d!==536870912&&(u.flags|=128,g=!0,js(C,!1),u.lanes=4194304);C.isBackwards?(I.sibling=u.child,u.child=I):(o=C.last,o!==null?o.sibling=I:u.child=I,C.last=I)}return C.tail!==null?(u=C.tail,C.rendering=u,C.tail=u.sibling,C.renderingStartTime=tr(),u.sibling=null,o=si.current,Fe(si,g?o&1|2:o&1),u):(Rn(u),null);case 22:case 23:return Qo(u),md(),g=u.memoizedState!==null,o!==null?o.memoizedState!==null!==g&&(u.flags|=8192):g&&(u.flags|=8192),g?(d&536870912)!==0&&(u.flags&128)===0&&(Rn(u),u.subtreeFlags&6&&(u.flags|=8192)):Rn(u),d=u.updateQueue,d!==null&&uf(u,d.retryQueue),d=null,o!==null&&o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(d=o.memoizedState.cachePool.pool),g=null,u.memoizedState!==null&&u.memoizedState.cachePool!==null&&(g=u.memoizedState.cachePool.pool),g!==d&&(u.flags|=2048),o!==null&&tt(ya),null;case 24:return d=null,o!==null&&(d=o.memoizedState.cache),u.memoizedState.cache!==d&&(u.flags|=2048),Ll(Bn),Rn(u),null;case 25:return null;case 30:return null}throw Error(S(156,u.tag))}function yu(o,u){switch($a(u),u.tag){case 1:return o=u.flags,o&65536?(u.flags=o&-65537|128,u):null;case 3:return Ll(Bn),cl(),o=u.flags,(o&65536)!==0&&(o&128)===0?(u.flags=o&-65537|128,u):null;case 26:case 27:case 5:return Xf(u),null;case 13:if(Qo(u),o=u.memoizedState,o!==null&&o.dehydrated!==null){if(u.alternate===null)throw Error(S(340));ws()}return o=u.flags,o&65536?(u.flags=o&-65537|128,u):null;case 19:return tt(si),null;case 4:return cl(),null;case 10:return Ll(u.type),null;case 22:case 23:return Qo(u),md(),o!==null&&tt(ya),o=u.flags,o&65536?(u.flags=o&-65537|128,u):null;case 24:return Ll(Bn),null;case 25:return null;default:return null}}function gu(o,u){switch($a(u),u.tag){case 3:Ll(Bn),cl();break;case 26:case 27:case 5:Xf(u);break;case 4:cl();break;case 13:Qo(u);break;case 19:tt(si);break;case 10:Ll(u.type);break;case 22:case 23:Qo(u),md(),o!==null&&tt(ya);break;case 24:Ll(Bn)}}function Ir(o,u){try{var d=u.updateQueue,g=d!==null?d.lastEffect:null;if(g!==null){var C=g.next;d=C;do{if((d.tag&o)===o){g=void 0;var I=d.create,B=d.inst;g=I(),B.destroy=g}d=d.next}while(d!==C)}}catch(H){mn(u,u.return,H)}}function Jo(o,u,d){try{var g=u.updateQueue,C=g!==null?g.lastEffect:null;if(C!==null){var I=C.next;g=I;do{if((g.tag&o)===o){var B=g.inst,H=B.destroy;if(H!==void 0){B.destroy=void 0,C=u;var ie=d,me=H;try{me()}catch(Ae){mn(C,ie,Ae)}}}g=g.next}while(g!==I)}}catch(Ae){mn(u,u.return,Ae)}}function Ui(o){var u=o.updateQueue;if(u!==null){var d=o.stateNode;try{Ut(u,d)}catch(g){mn(o,o.return,g)}}}function mt(o,u,d){d.props=Ta(o.type,o.memoizedProps),d.state=o.memoizedState;try{d.componentWillUnmount()}catch(g){mn(o,u,g)}}function mu(o,u){try{var d=o.ref;if(d!==null){switch(o.tag){case 26:case 27:case 5:var g=o.stateNode;break;case 30:g=o.stateNode;break;default:g=o.stateNode}typeof d=="function"?o.refCleanup=d(g):d.current=g}}catch(C){mn(o,u,C)}}function Mn(o,u){var d=o.ref,g=o.refCleanup;if(d!==null)if(typeof g=="function")try{g()}catch(C){mn(o,u,C)}finally{o.refCleanup=null,o=o.alternate,o!=null&&(o.refCleanup=null)}else if(typeof d=="function")try{d(null)}catch(C){mn(o,u,C)}else d.current=null}function Le(o){var u=o.type,d=o.memoizedProps,g=o.stateNode;try{e:switch(u){case"button":case"input":case"select":case"textarea":d.autoFocus&&g.focus();break e;case"img":d.src?g.src=d.src:d.srcSet&&(g.srcset=d.srcSet)}}catch(C){mn(o,o.return,C)}}function xa(o,u,d){try{var g=o.stateNode;Im(g,o.type,d,u),g[ki]=u}catch(C){mn(o,o.return,C)}}function Ke(o){return o.tag===5||o.tag===3||o.tag===26||o.tag===27&&Eo(o.type)||o.tag===4}function Rt(o){e:for(;;){for(;o.sibling===null;){if(o.return===null||Ke(o.return))return null;o=o.return}for(o.sibling.return=o.return,o=o.sibling;o.tag!==5&&o.tag!==6&&o.tag!==18;){if(o.tag===27&&Eo(o.type)||o.flags&2||o.child===null||o.tag===4)continue e;o.child.return=o,o=o.child}if(!(o.flags&2))return o.stateNode}}function Bs(o,u,d){var g=o.tag;if(g===5||g===6)o=o.stateNode,u?(d.nodeType===9?d.body:d.nodeName==="HTML"?d.ownerDocument.body:d).insertBefore(o,u):(u=d.nodeType===9?d.body:d.nodeName==="HTML"?d.ownerDocument.body:d,u.appendChild(o),d=d._reactRootContainer,d!=null||u.onclick!==null||(u.onclick=Iu));else if(g!==4&&(g===27&&Eo(o.type)&&(d=o.stateNode,u=null),o=o.child,o!==null))for(Bs(o,u,d),o=o.sibling;o!==null;)Bs(o,u,d),o=o.sibling}function Ld(o,u,d){var g=o.tag;if(g===5||g===6)o=o.stateNode,u?d.insertBefore(o,u):d.appendChild(o);else if(g!==4&&(g===27&&Eo(o.type)&&(d=o.stateNode),o=o.child,o!==null))for(Ld(o,u,d),o=o.sibling;o!==null;)Ld(o,u,d),o=o.sibling}function $t(o){var u=o.stateNode,d=o.memoizedProps;try{for(var g=o.type,C=u.attributes;C.length;)u.removeAttributeNode(C[0]);ln(u,g,d),u[Jn]=o,u[ki]=d}catch(I){mn(o,o.return,I)}}var To=!1,Yn=!1,Vh=!1,dm=typeof WeakSet=="function"?WeakSet:Set,mi=null;function Vs(o,u){if(o=o.containerInfo,Du=rp,o=uh(o),Wa(o)){if("selectionStart"in o)var d={start:o.selectionStart,end:o.selectionEnd};else e:{d=(d=o.ownerDocument)&&d.defaultView||window;var g=d.getSelection&&d.getSelection();if(g&&g.rangeCount!==0){d=g.anchorNode;var C=g.anchorOffset,I=g.focusNode;g=g.focusOffset;try{d.nodeType,I.nodeType}catch{d=null;break e}var B=0,H=-1,ie=-1,me=0,Ae=0,Ie=o,Se=null;t:for(;;){for(var we;Ie!==d||C!==0&&Ie.nodeType!==3||(H=B+C),Ie!==I||g!==0&&Ie.nodeType!==3||(ie=B+g),Ie.nodeType===3&&(B+=Ie.nodeValue.length),(we=Ie.firstChild)!==null;)Se=Ie,Ie=we;for(;;){if(Ie===o)break t;if(Se===d&&++me===C&&(H=B),Se===I&&++Ae===g&&(ie=B),(we=Ie.nextSibling)!==null)break;Ie=Se,Se=Ie.parentNode}Ie=we}d=H===-1||ie===-1?null:{start:H,end:ie}}else d=null}d=d||{start:0,end:0}}else d=null;for(Af={focusedElem:o,selectionRange:d},rp=!1,mi=u;mi!==null;)if(u=mi,o=u.child,(u.subtreeFlags&1024)!==0&&o!==null)o.return=u,mi=o;else for(;mi!==null;){switch(u=mi,I=u.alternate,o=u.flags,u.tag){case 0:break;case 11:case 15:break;case 1:if((o&1024)!==0&&I!==null){o=void 0,d=u,C=I.memoizedProps,I=I.memoizedState,g=d.stateNode;try{var At=Ta(d.type,C,d.elementType===d.type);o=g.getSnapshotBeforeUpdate(At,I),g.__reactInternalSnapshotBeforeUpdate=o}catch(wt){mn(d,d.return,wt)}}break;case 3:if((o&1024)!==0){if(o=u.stateNode.containerInfo,d=o.nodeType,d===9)ep(o);else if(d===1)switch(o.nodeName){case"HEAD":case"HTML":case"BODY":ep(o);break;default:o.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((o&1024)!==0)throw Error(S(163))}if(o=u.sibling,o!==null){o.return=u.return,mi=o;break}mi=u.return}}function _d(o,u,d){var g=d.flags;switch(d.tag){case 0:case 11:case 15:cr(o,d),g&4&&Ir(5,d);break;case 1:if(cr(o,d),g&4)if(o=d.stateNode,u===null)try{o.componentDidMount()}catch(B){mn(d,d.return,B)}else{var C=Ta(d.type,u.memoizedProps);u=u.memoizedState;try{o.componentDidUpdate(C,u,o.__reactInternalSnapshotBeforeUpdate)}catch(B){mn(d,d.return,B)}}g&64&&Ui(d),g&512&&mu(d,d.return);break;case 3:if(cr(o,d),g&64&&(o=d.updateQueue,o!==null)){if(u=null,d.child!==null)switch(d.child.tag){case 27:case 5:u=d.child.stateNode;break;case 1:u=d.child.stateNode}try{Ut(o,u)}catch(B){mn(d,d.return,B)}}break;case 27:u===null&&g&4&&$t(d);case 26:case 5:cr(o,d),u===null&&g&4&&Le(d),g&512&&mu(d,d.return);break;case 12:cr(o,d);break;case 13:cr(o,d),g&4&&ym(o,d),g&64&&(o=d.memoizedState,o!==null&&(o=o.dehydrated,o!==null&&(d=Sf.bind(null,d),tp(o,d))));break;case 22:if(g=d.memoizedState!==null||To,!g){u=u!==null&&u.memoizedState!==null||Yn,C=To;var I=Yn;To=g,(Yn=u)&&!I?Dr(o,d,(d.subtreeFlags&8772)!==0):cr(o,d),To=C,Yn=I}break;case 30:break;default:cr(o,d)}}function pm(o){var u=o.alternate;u!==null&&(o.alternate=null,pm(u)),o.child=null,o.deletions=null,o.sibling=null,o.tag===5&&(u=o.stateNode,u!==null&&Ei(u)),o.stateNode=null,o.return=null,o.dependencies=null,o.memoizedProps=null,o.memoizedState=null,o.pendingProps=null,o.stateNode=null,o.updateQueue=null}var Nn=null,ji=!1;function ql(o,u,d){for(d=d.child;d!==null;)hm(o,u,d),d=d.sibling}function hm(o,u,d){if(vt&&typeof vt.onCommitFiberUnmount=="function")try{vt.onCommitFiberUnmount(ea,d)}catch{}switch(d.tag){case 26:Yn||Mn(d,u),ql(o,u,d),d.memoizedState?d.memoizedState.count--:d.stateNode&&(d=d.stateNode,d.parentNode.removeChild(d));break;case 27:Yn||Mn(d,u);var g=Nn,C=ji;Eo(d.type)&&(Nn=d.stateNode,ji=!1),ql(o,u,d),Ru(d.stateNode),Nn=g,ji=C;break;case 5:Yn||Mn(d,u);case 6:if(g=Nn,C=ji,Nn=null,ql(o,u,d),Nn=g,ji=C,Nn!==null)if(ji)try{(Nn.nodeType===9?Nn.body:Nn.nodeName==="HTML"?Nn.ownerDocument.body:Nn).removeChild(d.stateNode)}catch(I){mn(d,u,I)}else try{Nn.removeChild(d.stateNode)}catch(I){mn(d,u,I)}break;case 18:Nn!==null&&(ji?(o=Nn,ku(o.nodeType===9?o.body:o.nodeName==="HTML"?o.ownerDocument.body:o,d.stateNode),cc(o)):ku(Nn,d.stateNode));break;case 4:g=Nn,C=ji,Nn=d.stateNode.containerInfo,ji=!0,ql(o,u,d),Nn=g,ji=C;break;case 0:case 11:case 14:case 15:Yn||Jo(2,d,u),Yn||Jo(4,d,u),ql(o,u,d);break;case 1:Yn||(Mn(d,u),g=d.stateNode,typeof g.componentWillUnmount=="function"&&mt(d,u,g)),ql(o,u,d);break;case 21:ql(o,u,d);break;case 22:Yn=(g=Yn)||d.memoizedState!==null,ql(o,u,d),Yn=g;break;default:ql(o,u,d)}}function ym(o,u){if(u.memoizedState===null&&(o=u.alternate,o!==null&&(o=o.memoizedState,o!==null&&(o=o.dehydrated,o!==null))))try{cc(o)}catch(d){mn(u,u.return,d)}}function j0(o){switch(o.tag){case 13:case 19:var u=o.stateNode;return u===null&&(u=o.stateNode=new dm),u;case 22:return o=o.stateNode,u=o._retryCache,u===null&&(u=o._retryCache=new dm),u;default:throw Error(S(435,o.tag))}}function Hs(o,u){var d=j0(o);u.forEach(function(g){var C=xm.bind(null,o,g);d.has(g)||(d.add(g),g.then(C,C))})}function ur(o,u){var d=u.deletions;if(d!==null)for(var g=0;g<d.length;g++){var C=d[g],I=o,B=u,H=B;e:for(;H!==null;){switch(H.tag){case 27:if(Eo(H.type)){Nn=H.stateNode,ji=!1;break e}break;case 5:Nn=H.stateNode,ji=!1;break e;case 3:case 4:Nn=H.stateNode.containerInfo,ji=!0;break e}H=H.return}if(Nn===null)throw Error(S(160));hm(I,B,C),Nn=null,ji=!1,I=C.alternate,I!==null&&(I.return=null),C.return=null}if(u.subtreeFlags&13878)for(u=u.child;u!==null;)Ea(u,o),u=u.sibling}var sr=null;function Ea(o,u){var d=o.alternate,g=o.flags;switch(o.tag){case 0:case 11:case 14:case 15:ur(u,o),Ii(o),g&4&&(Jo(3,o,o.return),Ir(3,o),Jo(5,o,o.return));break;case 1:ur(u,o),Ii(o),g&512&&(Yn||d===null||Mn(d,d.return)),g&64&&To&&(o=o.updateQueue,o!==null&&(g=o.callbacks,g!==null&&(d=o.shared.hiddenCallbacks,o.shared.hiddenCallbacks=d===null?g:d.concat(g))));break;case 26:var C=sr;if(ur(u,o),Ii(o),g&512&&(Yn||d===null||Mn(d,d.return)),g&4){var I=d!==null?d.memoizedState:null;if(g=o.memoizedState,d===null)if(g===null)if(o.stateNode===null){e:{g=o.type,d=o.memoizedProps,C=C.ownerDocument||C;t:switch(g){case"title":I=C.getElementsByTagName("title")[0],(!I||I[Zu]||I[Jn]||I.namespaceURI==="http://www.w3.org/2000/svg"||I.hasAttribute("itemprop"))&&(I=C.createElement(g),C.head.insertBefore(I,C.querySelector("head > title"))),ln(I,g,d),I[Jn]=o,ri(I),g=I;break e;case"link":var B=jm("link","href",C).get(g+(d.href||""));if(B){for(var H=0;H<B.length;H++)if(I=B[H],I.getAttribute("href")===(d.href==null||d.href===""?null:d.href)&&I.getAttribute("rel")===(d.rel==null?null:d.rel)&&I.getAttribute("title")===(d.title==null?null:d.title)&&I.getAttribute("crossorigin")===(d.crossOrigin==null?null:d.crossOrigin)){B.splice(H,1);break t}}I=C.createElement(g),ln(I,g,d),C.head.appendChild(I);break;case"meta":if(B=jm("meta","content",C).get(g+(d.content||""))){for(H=0;H<B.length;H++)if(I=B[H],I.getAttribute("content")===(d.content==null?null:""+d.content)&&I.getAttribute("name")===(d.name==null?null:d.name)&&I.getAttribute("property")===(d.property==null?null:d.property)&&I.getAttribute("http-equiv")===(d.httpEquiv==null?null:d.httpEquiv)&&I.getAttribute("charset")===(d.charSet==null?null:d.charSet)){B.splice(H,1);break t}}I=C.createElement(g),ln(I,g,d),C.head.appendChild(I);break;default:throw Error(S(468,g))}I[Jn]=o,ri(I),g=I}o.stateNode=g}else ci(C,o.type,o.stateNode);else o.stateNode=Um(C,g,o.memoizedProps);else I!==g?(I===null?d.stateNode!==null&&(d=d.stateNode,d.parentNode.removeChild(d)):I.count--,g===null?ci(C,o.type,o.stateNode):Um(C,g,o.memoizedProps)):g===null&&o.stateNode!==null&&xa(o,o.memoizedProps,d.memoizedProps)}break;case 27:ur(u,o),Ii(o),g&512&&(Yn||d===null||Mn(d,d.return)),d!==null&&g&4&&xa(o,o.memoizedProps,d.memoizedProps);break;case 5:if(ur(u,o),Ii(o),g&512&&(Yn||d===null||Mn(d,d.return)),o.flags&32){C=o.stateNode;try{ao(C,"")}catch(we){mn(o,o.return,we)}}g&4&&o.stateNode!=null&&(C=o.memoizedProps,xa(o,C,d!==null?d.memoizedProps:C)),g&1024&&(Vh=!0);break;case 6:if(ur(u,o),Ii(o),g&4){if(o.stateNode===null)throw Error(S(162));g=o.memoizedProps,d=o.stateNode;try{d.nodeValue=g}catch(we){mn(o,o.return,we)}}break;case 3:if(Df=null,C=sr,sr=Ia(u.containerInfo),ur(u,o),sr=C,Ii(o),g&4&&d!==null&&d.memoizedState.isDehydrated)try{cc(u.containerInfo)}catch(we){mn(o,o.return,we)}Vh&&(Vh=!1,Ud(o));break;case 4:g=sr,sr=Ia(o.stateNode.containerInfo),ur(u,o),Ii(o),sr=g;break;case 12:ur(u,o),Ii(o);break;case 13:ur(u,o),Ii(o),o.child.flags&8192&&o.memoizedState!==null!=(d!==null&&d.memoizedState!==null)&&(Bd=tr()),g&4&&(g=o.updateQueue,g!==null&&(o.updateQueue=null,Hs(o,g)));break;case 22:C=o.memoizedState!==null;var ie=d!==null&&d.memoizedState!==null,me=To,Ae=Yn;if(To=me||C,Yn=Ae||ie,ur(u,o),Yn=Ae,To=me,Ii(o),g&8192)e:for(u=o.stateNode,u._visibility=C?u._visibility&-2:u._visibility|1,C&&(d===null||ie||To||Yn||vu(o)),d=null,u=o;;){if(u.tag===5||u.tag===26){if(d===null){ie=d=u;try{if(I=ie.stateNode,C)B=I.style,typeof B.setProperty=="function"?B.setProperty("display","none","important"):B.display="none";else{H=ie.stateNode;var Ie=ie.memoizedProps.style,Se=Ie!=null&&Ie.hasOwnProperty("display")?Ie.display:null;H.style.display=Se==null||typeof Se=="boolean"?"":(""+Se).trim()}}catch(we){mn(ie,ie.return,we)}}}else if(u.tag===6){if(d===null){ie=u;try{ie.stateNode.nodeValue=C?"":ie.memoizedProps}catch(we){mn(ie,ie.return,we)}}}else if((u.tag!==22&&u.tag!==23||u.memoizedState===null||u===o)&&u.child!==null){u.child.return=u,u=u.child;continue}if(u===o)break e;for(;u.sibling===null;){if(u.return===null||u.return===o)break e;d===u&&(d=null),u=u.return}d===u&&(d=null),u.sibling.return=u.return,u=u.sibling}g&4&&(g=o.updateQueue,g!==null&&(d=g.retryQueue,d!==null&&(g.retryQueue=null,Hs(o,d))));break;case 19:ur(u,o),Ii(o),g&4&&(g=o.updateQueue,g!==null&&(o.updateQueue=null,Hs(o,g)));break;case 30:break;case 21:break;default:ur(u,o),Ii(o)}}function Ii(o){var u=o.flags;if(u&2){try{for(var d,g=o.return;g!==null;){if(Ke(g)){d=g;break}g=g.return}if(d==null)throw Error(S(160));switch(d.tag){case 27:var C=d.stateNode,I=Rt(o);Ld(o,I,C);break;case 5:var B=d.stateNode;d.flags&32&&(ao(B,""),d.flags&=-33);var H=Rt(o);Ld(o,H,B);break;case 3:case 4:var ie=d.stateNode.containerInfo,me=Rt(o);Bs(o,me,ie);break;default:throw Error(S(161))}}catch(Ae){mn(o,o.return,Ae)}o.flags&=-3}u&4096&&(o.flags&=-4097)}function Ud(o){if(o.subtreeFlags&1024)for(o=o.child;o!==null;){var u=o;Ud(u),u.tag===5&&u.flags&1024&&u.stateNode.reset(),o=o.sibling}}function cr(o,u){if(u.subtreeFlags&8772)for(u=u.child;u!==null;)_d(o,u.alternate,u),u=u.sibling}function vu(o){for(o=o.child;o!==null;){var u=o;switch(u.tag){case 0:case 11:case 14:case 15:Jo(4,u,u.return),vu(u);break;case 1:Mn(u,u.return);var d=u.stateNode;typeof d.componentWillUnmount=="function"&&mt(u,u.return,d),vu(u);break;case 27:Ru(u.stateNode);case 26:case 5:Mn(u,u.return),vu(u);break;case 22:u.memoizedState===null&&vu(u);break;case 30:vu(u);break;default:vu(u)}o=o.sibling}}function Dr(o,u,d){for(d=d&&(u.subtreeFlags&8772)!==0,u=u.child;u!==null;){var g=u.alternate,C=o,I=u,B=I.flags;switch(I.tag){case 0:case 11:case 15:Dr(C,I,d),Ir(4,I);break;case 1:if(Dr(C,I,d),g=I,C=g.stateNode,typeof C.componentDidMount=="function")try{C.componentDidMount()}catch(me){mn(g,g.return,me)}if(g=I,C=g.updateQueue,C!==null){var H=g.stateNode;try{var ie=C.shared.hiddenCallbacks;if(ie!==null)for(C.shared.hiddenCallbacks=null,C=0;C<ie.length;C++)zc(ie[C],H)}catch(me){mn(g,g.return,me)}}d&&B&64&&Ui(I),mu(I,I.return);break;case 27:$t(I);case 26:case 5:Dr(C,I,d),d&&g===null&&B&4&&Le(I),mu(I,I.return);break;case 12:Dr(C,I,d);break;case 13:Dr(C,I,d),d&&B&4&&ym(C,I);break;case 22:I.memoizedState===null&&Dr(C,I,d),mu(I,I.return);break;case 30:break;default:Dr(C,I,d)}u=u.sibling}}function Hh(o,u){var d=null;o!==null&&o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(d=o.memoizedState.cachePool.pool),o=null,u.memoizedState!==null&&u.memoizedState.cachePool!==null&&(o=u.memoizedState.cachePool.pool),o!==d&&(o!=null&&o.refCount++,d!=null&&tu(d))}function Ks(o,u){o=null,u.alternate!==null&&(o=u.alternate.memoizedState.cache),u=u.memoizedState.cache,u!==o&&(u.refCount++,o!=null&&tu(o))}function Zo(o,u,d,g){if(u.subtreeFlags&10256)for(u=u.child;u!==null;)gm(o,u,d,g),u=u.sibling}function gm(o,u,d,g){var C=u.flags;switch(u.tag){case 0:case 11:case 15:Zo(o,u,d,g),C&2048&&Ir(9,u);break;case 1:Zo(o,u,d,g);break;case 3:Zo(o,u,d,g),C&2048&&(o=null,u.alternate!==null&&(o=u.alternate.memoizedState.cache),u=u.memoizedState.cache,u!==o&&(u.refCount++,o!=null&&tu(o)));break;case 12:if(C&2048){Zo(o,u,d,g),o=u.stateNode;try{var I=u.memoizedProps,B=I.id,H=I.onPostCommit;typeof H=="function"&&H(B,u.alternate===null?"mount":"update",o.passiveEffectDuration,-0)}catch(ie){mn(u,u.return,ie)}}else Zo(o,u,d,g);break;case 13:Zo(o,u,d,g);break;case 23:break;case 22:I=u.stateNode,B=u.alternate,u.memoizedState!==null?I._visibility&2?Zo(o,u,d,g):sf(o,u):I._visibility&2?Zo(o,u,d,g):(I._visibility|=2,Su(o,u,d,g,(u.subtreeFlags&10256)!==0)),C&2048&&Hh(B,u);break;case 24:Zo(o,u,d,g),C&2048&&Ks(u.alternate,u);break;default:Zo(o,u,d,g)}}function Su(o,u,d,g,C){for(C=C&&(u.subtreeFlags&10256)!==0,u=u.child;u!==null;){var I=o,B=u,H=d,ie=g,me=B.flags;switch(B.tag){case 0:case 11:case 15:Su(I,B,H,ie,C),Ir(8,B);break;case 23:break;case 22:var Ae=B.stateNode;B.memoizedState!==null?Ae._visibility&2?Su(I,B,H,ie,C):sf(I,B):(Ae._visibility|=2,Su(I,B,H,ie,C)),C&&me&2048&&Hh(B.alternate,B);break;case 24:Su(I,B,H,ie,C),C&&me&2048&&Ks(B.alternate,B);break;default:Su(I,B,H,ie,C)}u=u.sibling}}function sf(o,u){if(u.subtreeFlags&10256)for(u=u.child;u!==null;){var d=o,g=u,C=g.flags;switch(g.tag){case 22:sf(d,g),C&2048&&Hh(g.alternate,g);break;case 24:sf(d,g),C&2048&&Ks(g.alternate,g);break;default:sf(d,g)}u=u.sibling}}var cf=8192;function qs(o){if(o.subtreeFlags&cf)for(o=o.child;o!==null;)jd(o),o=o.sibling}function jd(o){switch(o.tag){case 26:qs(o),o.flags&cf&&o.memoizedState!==null&&Of(sr,o.memoizedState,o.memoizedProps);break;case 5:qs(o);break;case 3:case 4:var u=sr;sr=Ia(o.stateNode.containerInfo),qs(o),sr=u;break;case 22:o.memoizedState===null&&(u=o.alternate,u!==null&&u.memoizedState!==null?(u=cf,cf=16777216,qs(o),cf=u):qs(o));break;default:qs(o)}}function ff(o){var u=o.alternate;if(u!==null&&(o=u.child,o!==null)){u.child=null;do u=o.sibling,o.sibling=null,o=u;while(o!==null)}}function $o(o){var u=o.deletions;if((o.flags&16)!==0){if(u!==null)for(var d=0;d<u.length;d++){var g=u[d];mi=g,Vn(g,o)}ff(o)}if(o.subtreeFlags&10256)for(o=o.child;o!==null;)wu(o),o=o.sibling}function wu(o){switch(o.tag){case 0:case 11:case 15:$o(o),o.flags&2048&&Jo(9,o,o.return);break;case 3:$o(o);break;case 12:$o(o);break;case 22:var u=o.stateNode;o.memoizedState!==null&&u._visibility&2&&(o.return===null||o.return.tag!==13)?(u._visibility&=-3,Kr(o)):$o(o);break;default:$o(o)}}function Kr(o){var u=o.deletions;if((o.flags&16)!==0){if(u!==null)for(var d=0;d<u.length;d++){var g=u[d];mi=g,Vn(g,o)}ff(o)}for(o=o.child;o!==null;){switch(u=o,u.tag){case 0:case 11:case 15:Jo(8,u,u.return),Kr(u);break;case 22:d=u.stateNode,d._visibility&2&&(d._visibility&=-3,Kr(u));break;default:Kr(u)}o=o.sibling}}function Vn(o,u){for(;mi!==null;){var d=mi;switch(d.tag){case 0:case 11:case 15:Jo(8,d,u);break;case 23:case 22:if(d.memoizedState!==null&&d.memoizedState.cachePool!==null){var g=d.memoizedState.cachePool.pool;g!=null&&g.refCount++}break;case 24:tu(d.memoizedState.cache)}if(g=d.child,g!==null)g.return=d,mi=g;else e:for(d=o;mi!==null;){g=mi;var C=g.sibling,I=g.return;if(pm(g),g===d){mi=null;break e}if(C!==null){C.return=I,mi=C;break e}mi=I}}}var df={getCacheForType:function(o){var u=ai(Bn),d=u.data.get(o);return d===void 0&&(d=o(),u.data.set(o,d)),d}},Kh=typeof WeakMap=="function"?WeakMap:Map,fn=0,On=null,Yt=null,tn=0,dn=0,fr=null,Aa=!1,Fs=!1,pf=!1,Fl=0,_e=0,el=0,xo=0,qh=0,Or=0,zs=0,Gs=null,vi=null,Fh=!1,Bd=0,Xs=1/0,hf=null,zl=null,Di=0,Gl=null,Tu=null,xu=0,Vd=0,Hd=null,zh=null,Ys=0,Dt=null;function Hn(){if((fn&2)!==0&&tn!==0)return tn&-tn;if(Te.T!==null){var o=nu;return o!==0?o:Zh()}return xg()}function yf(){Or===0&&(Or=(tn&536870912)===0||Jt?Ec():536870912);var o=Hr.current;return o!==null&&(o.flags|=32),Or}function Pn(o,u,d){(o===On&&(dn===2||dn===9)||o.cancelPendingCommit!==null)&&(Js(o,0),tl(o,tn,Or,!1)),io(o,d),((fn&2)===0||o!==On)&&(o===On&&((fn&2)===0&&(xo|=d),_e===4&&tl(o,tn,Or,!1)),il(o))}function sn(o,u,d){if((fn&6)!==0)throw Error(S(327));var g=!d&&(u&124)===0&&(u&o.expiredLanes)===0||xc(o,u),C=g?B0(o,u):Eu(o,u,!0),I=g;do{if(C===0){Fs&&!g&&tl(o,u,0,!1);break}else{if(d=o.current.alternate,I&&!Gh(d)){C=Eu(o,u,!1),I=!1;continue}if(C===2){if(I=u,o.errorRecoveryDisabledLanes&I)var B=0;else B=o.pendingLanes&-536870913,B=B!==0?B:B&536870912?536870912:0;if(B!==0){u=B;e:{var H=o;C=Gs;var ie=H.current.memoizedState.isDehydrated;if(ie&&(Js(H,B).flags|=256),B=Eu(H,B,!1),B!==2){if(pf&&!ie){H.errorRecoveryDisabledLanes|=I,xo|=I,C=4;break e}I=vi,vi=C,I!==null&&(vi===null?vi=I:vi.push.apply(vi,I))}C=B}if(I=!1,C!==2)continue}}if(C===1){Js(o,0),tl(o,u,0,!0);break}e:{switch(g=o,I=C,I){case 0:case 1:throw Error(S(345));case 4:if((u&4194048)!==u)break;case 6:tl(g,u,Or,!Aa);break e;case 2:vi=null;break;case 3:case 5:break;default:throw Error(S(329))}if((u&62914560)===u&&(C=Bd+300-tr(),10<C)){if(tl(g,u,Or,!Aa),Tc(g,0,!0)!==0)break e;g.timeoutHandle=Om(Ws.bind(null,g,d,vi,hf,Fh,u,Or,xo,zs,Aa,I,2,-0,0),C);break e}Ws(g,d,vi,hf,Fh,u,Or,xo,zs,Aa,I,0,-0,0)}}break}while(!0);il(o)}function Ws(o,u,d,g,C,I,B,H,ie,me,Ae,Ie,Se,we){if(o.timeoutHandle=-1,Ie=u.subtreeFlags,(Ie&8192||(Ie&16785408)===16785408)&&(Kn={stylesheets:null,count:0,unsuspend:Si},jd(u),Ie=i1(),Ie!==null)){o.cancelPendingCommit=Ie(qd.bind(null,o,u,I,d,g,C,B,H,ie,Ae,1,Se,we)),tl(o,I,B,!me);return}qd(o,u,I,d,g,C,B,H,ie)}function Gh(o){for(var u=o;;){var d=u.tag;if((d===0||d===11||d===15)&&u.flags&16384&&(d=u.updateQueue,d!==null&&(d=d.stores,d!==null)))for(var g=0;g<d.length;g++){var C=d[g],I=C.getSnapshot;C=C.value;try{if(!or(I(),C))return!1}catch{return!1}}if(d=u.child,u.subtreeFlags&16384&&d!==null)d.return=u,u=d;else{if(u===o)break;for(;u.sibling===null;){if(u.return===null||u.return===o)return!0;u=u.return}u.sibling.return=u.return,u=u.sibling}}return!0}function tl(o,u,d,g){u&=~qh,u&=~xo,o.suspendedLanes|=u,o.pingedLanes&=~u,g&&(o.warmLanes|=u),g=o.expirationTimes;for(var C=u;0<C;){var I=31-vr(C),B=1<<I;g[I]=-1,C&=~B}d!==0&&Ju(o,d,u)}function gf(){return(fn&6)===0?(rl(0),!1):!0}function Qs(){if(Yt!==null){if(dn===0)var o=Yt.return;else o=Yt,Nl=zo=null,jt(o),Ls=null,_s=0,o=Yt;for(;o!==null;)gu(o.alternate,o),o=o.return;Yt=null}}function Js(o,u){var d=o.timeoutHandle;d!==-1&&(o.timeoutHandle=-1,W0(d)),d=o.cancelPendingCommit,d!==null&&(o.cancelPendingCommit=null,d()),Qs(),On=o,Yt=d=jn(o.current,null),tn=u,dn=0,fr=null,Aa=!1,Fs=xc(o,u),pf=!1,zs=Or=qh=xo=el=_e=0,vi=Gs=null,Fh=!1,(u&8)!==0&&(u|=u&32);var g=o.entangledLanes;if(g!==0)for(o=o.entanglements,g&=u;0<g;){var C=31-vr(g),I=1<<C;u|=o[C],g&=~I}return Fl=u,Uc(),d}function mm(o,u){Vt=null,Te.H=Zc,u===ga||u===en?(u=gh(),dn=3):u===Ug?(u=gh(),dn=4):dn=u===om?8:u!==null&&typeof u=="object"&&typeof u.then=="function"?6:1,fr=u,Yt===null&&(_e=1,nf(o,lr(u,o.current)))}function Xh(){var o=Te.H;return Te.H=Zc,o===null?Zc:o}function vm(){var o=Te.A;return Te.A=df,o}function Zs(){_e=4,Aa||(tn&4194048)!==tn&&Hr.current!==null||(Fs=!0),(el&134217727)===0&&(xo&134217727)===0||On===null||tl(On,tn,Or,!1)}function Eu(o,u,d){var g=fn;fn|=2;var C=Xh(),I=vm();(On!==o||tn!==u)&&(hf=null,Js(o,u)),u=!1;var B=_e;e:do try{if(dn!==0&&Yt!==null){var H=Yt,ie=fr;switch(dn){case 8:Qs(),B=6;break e;case 3:case 2:case 9:case 6:Hr.current===null&&(u=!0);var me=dn;if(dn=0,fr=null,Au(o,H,ie,me),d&&Fs){B=0;break e}break;default:me=dn,dn=0,fr=null,Au(o,H,ie,me)}}Yh(),B=_e;break}catch(Ae){mm(o,Ae)}while(!0);return u&&o.shellSuspendCounter++,Nl=zo=null,fn=g,Te.H=C,Te.A=I,Yt===null&&(On=null,tn=0,Uc()),B}function Yh(){for(;Yt!==null;)Sm(Yt)}function B0(o,u){var d=fn;fn|=2;var g=Xh(),C=vm();On!==o||tn!==u?(hf=null,Xs=tr()+500,Js(o,u)):Fs=xc(o,u);e:do try{if(dn!==0&&Yt!==null){u=Yt;var I=fr;t:switch(dn){case 1:dn=0,fr=null,Au(o,u,I,1);break;case 2:case 9:if(hd(I)){dn=0,fr=null,$s(u);break}u=function(){dn!==2&&dn!==9||On!==o||(dn=7),il(o)},I.then(u,u);break e;case 3:dn=7;break e;case 4:dn=5;break e;case 7:hd(I)?(dn=0,fr=null,$s(u)):(dn=0,fr=null,Au(o,u,I,7));break;case 5:var B=null;switch(Yt.tag){case 26:B=Yt.memoizedState;case 5:case 27:var H=Yt;if(!B||ay(B)){dn=0,fr=null;var ie=H.sibling;if(ie!==null)Yt=ie;else{var me=H.return;me!==null?(Yt=me,mf(me)):Yt=null}break t}}dn=0,fr=null,Au(o,u,I,5);break;case 6:dn=0,fr=null,Au(o,u,I,6);break;case 8:Qs(),_e=6;break e;default:throw Error(S(462))}}Kd();break}catch(Ae){mm(o,Ae)}while(!0);return Nl=zo=null,Te.H=g,Te.A=C,fn=d,Yt!==null?0:(On=null,tn=0,Uc(),_e)}function Kd(){for(;Yt!==null&&!Wu();)Sm(Yt)}function Sm(o){var u=Bh(o.alternate,o,Fl);o.memoizedProps=o.pendingProps,u===null?mf(o):Yt=u}function $s(o){var u=o,d=u.alternate;switch(u.tag){case 15:case 0:u=sm(d,u,u.pendingProps,u.type,void 0,tn);break;case 11:u=sm(d,u,u.pendingProps,u.type.render,u.ref,tn);break;case 5:jt(u);default:gu(d,u),u=Yt=ad(u,Fl),u=Bh(d,u,Fl)}o.memoizedProps=o.pendingProps,u===null?mf(o):Yt=u}function Au(o,u,d,g){Nl=zo=null,jt(u),Ls=null,_s=0;var C=u.return;try{if(_0(o,C,u,d,tn)){_e=1,nf(o,lr(d,o.current)),Yt=null;return}}catch(I){if(C!==null)throw Yt=C,I;_e=1,nf(o,lr(d,o.current)),Yt=null;return}u.flags&32768?(Jt||g===1?o=!0:Fs||(tn&536870912)!==0?o=!1:(Aa=o=!0,(g===2||g===9||g===3||g===6)&&(g=Hr.current,g!==null&&g.tag===13&&(g.flags|=16384))),qr(u,o)):mf(u)}function mf(o){var u=o;do{if((u.flags&32768)!==0){qr(u,Aa);return}o=u.return;var d=U0(u.alternate,u,Fl);if(d!==null){Yt=d;return}if(u=u.sibling,u!==null){Yt=u;return}Yt=u=o}while(u!==null);_e===0&&(_e=5)}function qr(o,u){do{var d=yu(o.alternate,o);if(d!==null){d.flags&=32767,Yt=d;return}if(d=o.return,d!==null&&(d.flags|=32768,d.subtreeFlags=0,d.deletions=null),!u&&(o=o.sibling,o!==null)){Yt=o;return}Yt=o=d}while(o!==null);_e=6,Yt=null}function qd(o,u,d,g,C,I,B,H,ie){o.cancelPendingCommit=null;do vf();while(Di!==0);if((fn&6)!==0)throw Error(S(327));if(u!==null){if(u===o.current)throw Error(S(177));if(I=u.lanes|u.childLanes,I|=_c,Qu(o,d,I,B,H,ie),o===On&&(Yt=On=null,tn=0),Tu=u,Gl=o,xu=d,Vd=I,Hd=C,zh=g,(u.subtreeFlags&10256)!==0||(u.flags&10256)!==0?(o.callbackNode=null,o.callbackPriority=0,H0(_o,function(){return zd(),null})):(o.callbackNode=null,o.callbackPriority=0),g=(u.flags&13878)!==0,(u.subtreeFlags&13878)!==0||g){g=Te.T,Te.T=null,C=je.p,je.p=2,B=fn,fn|=4;try{Vs(o,u,d)}finally{fn=B,je.p=C,Te.T=g}}Di=1,Wh(),wm(),ec()}}function Wh(){if(Di===1){Di=0;var o=Gl,u=Tu,d=(u.flags&13878)!==0;if((u.subtreeFlags&13878)!==0||d){d=Te.T,Te.T=null;var g=je.p;je.p=2;var C=fn;fn|=4;try{Ea(u,o);var I=Af,B=uh(o.containerInfo),H=I.focusedElem,ie=I.selectionRange;if(B!==H&&H&&H.ownerDocument&&kg(H.ownerDocument.documentElement,H)){if(ie!==null&&Wa(H)){var me=ie.start,Ae=ie.end;if(Ae===void 0&&(Ae=me),"selectionStart"in H)H.selectionStart=me,H.selectionEnd=Math.min(Ae,H.value.length);else{var Ie=H.ownerDocument||document,Se=Ie&&Ie.defaultView||window;if(Se.getSelection){var we=Se.getSelection(),At=H.textContent.length,wt=Math.min(ie.start,At),Sn=ie.end===void 0?wt:Math.min(ie.end,At);!we.extend&&wt>Sn&&(B=Sn,Sn=wt,wt=B);var he=ah(H,wt),ue=ah(H,Sn);if(he&&ue&&(we.rangeCount!==1||we.anchorNode!==he.node||we.anchorOffset!==he.offset||we.focusNode!==ue.node||we.focusOffset!==ue.offset)){var ge=Ie.createRange();ge.setStart(he.node,he.offset),we.removeAllRanges(),wt>Sn?(we.addRange(ge),we.extend(ue.node,ue.offset)):(ge.setEnd(ue.node,ue.offset),we.addRange(ge))}}}}for(Ie=[],we=H;we=we.parentNode;)we.nodeType===1&&Ie.push({element:we,left:we.scrollLeft,top:we.scrollTop});for(typeof H.focus=="function"&&H.focus(),H=0;H<Ie.length;H++){var Ce=Ie[H];Ce.element.scrollLeft=Ce.left,Ce.element.scrollTop=Ce.top}}rp=!!Du,Af=Du=null}finally{fn=C,je.p=g,Te.T=d}}o.current=u,Di=2}}function wm(){if(Di===2){Di=0;var o=Gl,u=Tu,d=(u.flags&8772)!==0;if((u.subtreeFlags&8772)!==0||d){d=Te.T,Te.T=null;var g=je.p;je.p=2;var C=fn;fn|=4;try{_d(o,u.alternate,u)}finally{fn=C,je.p=g,Te.T=d}}Di=3}}function ec(){if(Di===4||Di===3){Di=0,Yf();var o=Gl,u=Tu,d=xu,g=zh;(u.subtreeFlags&10256)!==0||(u.flags&10256)!==0?Di=5:(Di=0,Tu=Gl=null,Fd(o,o.pendingLanes));var C=o.pendingLanes;if(C===0&&(zl=null),Kp(d),u=u.stateNode,vt&&typeof vt.onCommitFiberRoot=="function")try{vt.onCommitFiberRoot(ea,u,void 0,(u.current.flags&128)===128)}catch{}if(g!==null){u=Te.T,C=je.p,je.p=2,Te.T=null;try{for(var I=o.onRecoverableError,B=0;B<g.length;B++){var H=g[B];I(H.value,{componentStack:H.stack})}}finally{Te.T=u,je.p=C}}(xu&3)!==0&&vf(),il(o),C=o.pendingLanes,(d&4194090)!==0&&(C&42)!==0?o===Dt?Ys++:(Ys=0,Dt=o):Ys=0,rl(0)}}function Fd(o,u){(o.pooledCacheLanes&=u)===0&&(u=o.pooledCache,u!=null&&(o.pooledCache=null,tu(u)))}function vf(o){return Wh(),wm(),ec(),zd()}function zd(){if(Di!==5)return!1;var o=Gl,u=Vd;Vd=0;var d=Kp(xu),g=Te.T,C=je.p;try{je.p=32>d?32:d,Te.T=null,d=Hd,Hd=null;var I=Gl,B=xu;if(Di=0,Tu=Gl=null,xu=0,(fn&6)!==0)throw Error(S(331));var H=fn;if(fn|=4,wu(I.current),gm(I,I.current,B,d),fn=H,rl(0,!1),vt&&typeof vt.onPostCommitFiberRoot=="function")try{vt.onPostCommitFiberRoot(ea,I)}catch{}return!0}finally{je.p=C,Te.T=g,Fd(o,u)}}function Tm(o,u,d){u=lr(d,u),u=Lh(o.stateNode,u,2),o=Cr(o,u,2),o!==null&&(io(o,2),il(o))}function mn(o,u,d){if(o.tag===3)Tm(o,o,d);else for(;u!==null;){if(u.tag===3){Tm(u,o,d);break}else if(u.tag===1){var g=u.stateNode;if(typeof u.type.getDerivedStateFromError=="function"||typeof g.componentDidCatch=="function"&&(zl===null||!zl.has(g))){o=lr(d,o),d=im(2),g=Cr(u,d,2),g!==null&&(rm(d,g,u,o),io(g,2),il(g));break}}u=u.return}}function Qh(o,u,d){var g=o.pingCache;if(g===null){g=o.pingCache=new Kh;var C=new Set;g.set(u,C)}else C=g.get(u),C===void 0&&(C=new Set,g.set(u,C));C.has(d)||(pf=!0,C.add(d),o=V0.bind(null,o,u,d),u.then(o,o))}function V0(o,u,d){var g=o.pingCache;g!==null&&g.delete(u),o.pingedLanes|=o.suspendedLanes&d,o.warmLanes&=~d,On===o&&(tn&d)===d&&(_e===4||_e===3&&(tn&62914560)===tn&&300>tr()-Bd?(fn&2)===0&&Js(o,0):qh|=d,zs===tn&&(zs=0)),il(o)}function Gd(o,u){u===0&&(u=Ac()),o=fo(o,u),o!==null&&(io(o,u),il(o))}function Sf(o){var u=o.memoizedState,d=0;u!==null&&(d=u.retryLane),Gd(o,d)}function xm(o,u){var d=0;switch(o.tag){case 13:var g=o.stateNode,C=o.memoizedState;C!==null&&(d=C.retryLane);break;case 19:g=o.stateNode;break;case 22:g=o.stateNode._retryCache;break;default:throw Error(S(314))}g!==null&&g.delete(u),Gd(o,d)}function H0(o,u){return Bp(o,u)}var Xd=null,tc=null,Jh=!1,nc=!1,Yd=!1,nl=0;function il(o){o!==tc&&o.next===null&&(tc===null?Xd=tc=o:tc=tc.next=o),nc=!0,Jh||(Jh=!0,q0())}function rl(o,u){if(!Yd&&nc){Yd=!0;do for(var d=!1,g=Xd;g!==null;){if(o!==0){var C=g.pendingLanes;if(C===0)var I=0;else{var B=g.suspendedLanes,H=g.pingedLanes;I=(1<<31-vr(42|o)+1)-1,I&=C&~(B&~H),I=I&201326741?I&201326741|1:I?I|2:0}I!==0&&(d=!0,Wd(g,I))}else I=tn,I=Tc(g,g===On?I:0,g.cancelPendingCommit!==null||g.timeoutHandle!==-1),(I&3)===0||xc(g,I)||(d=!0,Wd(g,I));g=g.next}while(d);Yd=!1}}function K0(){wf()}function wf(){nc=Jh=!1;var o=0;nl!==0&&(Y0()&&(o=nl),nl=0);for(var u=tr(),d=null,g=Xd;g!==null;){var C=g.next,I=Em(g,u);I===0?(g.next=null,d===null?Xd=C:d.next=C,C===null&&(tc=d)):(d=g,(o!==0||(I&3)!==0)&&(nc=!0)),g=C}rl(o)}function Em(o,u){for(var d=o.suspendedLanes,g=o.pingedLanes,C=o.expirationTimes,I=o.pendingLanes&-62914561;0<I;){var B=31-vr(I),H=1<<B,ie=C[B];ie===-1?((H&d)===0||(H&g)!==0)&&(C[B]=pn(H,u)):ie<=u&&(o.expiredLanes|=H),I&=~H}if(u=On,d=tn,d=Tc(o,o===u?d:0,o.cancelPendingCommit!==null||o.timeoutHandle!==-1),g=o.callbackNode,d===0||o===u&&(dn===2||dn===9)||o.cancelPendingCommit!==null)return g!==null&&g!==null&&Vp(g),o.callbackNode=null,o.callbackPriority=0;if((d&3)===0||xc(o,d)){if(u=d&-d,u===o.callbackPriority)return u;switch(g!==null&&Vp(g),Kp(d)){case 2:case 8:d=bt;break;case 32:d=_o;break;case 268435456:d=I0;break;default:d=_o}return g=Tf.bind(null,o),d=Bp(d,g),o.callbackPriority=u,o.callbackNode=d,u}return g!==null&&g!==null&&Vp(g),o.callbackPriority=2,o.callbackNode=null,2}function Tf(o,u){if(Di!==0&&Di!==5)return o.callbackNode=null,o.callbackPriority=0,null;var d=o.callbackNode;if(vf()&&o.callbackNode!==d)return null;var g=tn;return g=Tc(o,o===On?g:0,o.cancelPendingCommit!==null||o.timeoutHandle!==-1),g===0?null:(sn(o,g,u),Em(o,tr()),o.callbackNode!=null&&o.callbackNode===d?Tf.bind(null,o):null)}function Wd(o,u){if(vf())return null;sn(o,u,!0)}function q0(){Q0(function(){(fn&6)!==0?Bp(no,K0):wf()})}function Zh(){return nl===0&&(nl=Ec()),nl}function Am(o){return o==null||typeof o=="symbol"||typeof o=="boolean"?null:typeof o=="function"?o:ts(""+o)}function Cm(o,u){var d=u.ownerDocument.createElement("input");return d.name=u.name,d.value=u.value,o.id&&d.setAttribute("form",o.id),u.parentNode.insertBefore(d,u),o=new FormData(o),d.parentNode.removeChild(d),o}function F0(o,u,d,g,C){if(u==="submit"&&d&&d.stateNode===C){var I=Am((C[ki]||null).action),B=g.submitter;B&&(u=(u=B[ki]||null)?Am(u.formAction):B.getAttribute("formAction"),u!==null&&(I=u,B=null));var H=new ns("action","action",null,g,C);o.push({event:H,listeners:[{instance:null,listener:function(){if(g.defaultPrevented){if(nl!==0){var ie=B?Cm(C,B):new FormData(C);kh(d,{pending:!0,data:ie,method:C.method,action:I},null,ie)}}else typeof I=="function"&&(H.preventDefault(),ie=B?Cm(C,B):new FormData(C),kh(d,{pending:!0,data:ie,method:C.method,action:I},I,ie))},currentTarget:C}]})}}for(var $h=0;$h<qo.length;$h++){var ey=qo[$h],z0=ey.toLowerCase(),G0=ey[0].toUpperCase()+ey.slice(1);hi(z0,"on"+G0)}hi(sh,"onAnimationEnd"),hi(ch,"onAnimationIteration"),hi(Qa,"onAnimationStart"),hi("dblclick","onDoubleClick"),hi("focusin","onFocus"),hi("focusout","onBlur"),hi(fh,"onTransitionRun"),hi(ms,"onTransitionStart"),hi(Rg,"onTransitionCancel"),hi(Ko,"onTransitionEnd"),ro("onMouseEnter",["mouseout","mouseover"]),ro("onMouseLeave",["mouseout","mouseover"]),ro("onPointerEnter",["pointerout","pointerover"]),ro("onPointerLeave",["pointerout","pointerover"]),Uo("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Uo("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Uo("onBeforeInput",["compositionend","keypress","textInput","paste"]),Uo("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Uo("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Uo("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var ic="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),ty=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(ic));function Qd(o,u){u=(u&4)!==0;for(var d=0;d<o.length;d++){var g=o[d],C=g.event;g=g.listeners;e:{var I=void 0;if(u)for(var B=g.length-1;0<=B;B--){var H=g[B],ie=H.instance,me=H.currentTarget;if(H=H.listener,ie!==I&&C.isPropagationStopped())break e;I=H,C.currentTarget=me;try{I(C)}catch(Ae){tf(Ae)}C.currentTarget=null,I=ie}else for(B=0;B<g.length;B++){if(H=g[B],ie=H.instance,me=H.currentTarget,H=H.listener,ie!==I&&C.isPropagationStopped())break e;I=H,C.currentTarget=me;try{I(C)}catch(Ae){tf(Ae)}C.currentTarget=null,I=ie}}}}function Ht(o,u){var d=u[na];d===void 0&&(d=u[na]=new Set);var g=o+"__bubble";d.has(g)||(Oi(u,o,2,!1),d.add(g))}function Cu(o,u,d){var g=0;u&&(g|=4),Oi(d,o,g,u)}var bu="_reactListening"+Math.random().toString(36).slice(2);function xf(o){if(!o[bu]){o[bu]=!0,Jf.forEach(function(d){d!=="selectionchange"&&(ty.has(d)||Cu(d,!1,o),Cu(d,!0,o))});var u=o.nodeType===9?o:o.ownerDocument;u===null||u[bu]||(u[bu]=!0,Cu("selectionchange",!1,u))}}function Oi(o,u,d,g){switch(hy(u)){case 2:var C=o1;break;case 8:C=fy;break;default:C=Da}d=C.bind(null,u,d,o),C=void 0,!_n||u!=="touchstart"&&u!=="touchmove"&&u!=="wheel"||(C=!0),g?C!==void 0?o.addEventListener(u,d,{capture:!0,passive:C}):o.addEventListener(u,d,!0):C!==void 0?o.addEventListener(u,d,{passive:C}):o.addEventListener(u,d,!1)}function Ca(o,u,d,g,C){var I=g;if((u&1)===0&&(u&2)===0&&g!==null)e:for(;;){if(g===null)return;var B=g.tag;if(B===3||B===4){var H=g.stateNode.containerInfo;if(H===C)break;if(B===4)for(B=g.return;B!==null;){var ie=B.tag;if((ie===3||ie===4)&&B.stateNode.containerInfo===C)return;B=B.return}for(;H!==null;){if(B=ia(H),B===null)return;if(ie=B.tag,ie===5||ie===6||ie===26||ie===27){g=I=B;continue e}H=H.parentNode}}g=g.return}la(function(){var me=I,Ae=ed(d),Ie=[];e:{var Se=Mg.get(o);if(Se!==void 0){var we=ns,At=o;switch(o){case"keypress":if(at(d)===0)break e;case"keydown":case"keyup":we=za;break;case"focusin":At="focus",we=Rc;break;case"focusout":At="blur",we=Rc;break;case"beforeblur":case"afterblur":we=Rc;break;case"click":if(d.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":we=ls;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":we=kc;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":we=k0;break;case sh:case ch:case Qa:we=Wp;break;case Ko:we=Xa;break;case"scroll":case"scrollend":we=Cg;break;case"wheel":we=Mc;break;case"copy":case"cut":case"paste":we=Fa;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":we=cs;break;case"toggle":case"beforetoggle":we=$p}var wt=(u&4)!==0,Sn=!wt&&(o==="scroll"||o==="scrollend"),he=wt?Se!==null?Se+"Capture":null:Se;wt=[];for(var ue=me,ge;ue!==null;){var Ce=ue;if(ge=Ce.stateNode,Ce=Ce.tag,Ce!==5&&Ce!==26&&Ce!==27||ge===null||he===null||(Ce=wr(ue,he),Ce!=null&&wt.push(Xl(ue,Ce,ge))),Sn)break;ue=ue.return}0<wt.length&&(Se=new we(Se,At,null,d,Ae),Ie.push({event:Se,listeners:wt}))}}if((u&7)===0){e:{if(Se=o==="mouseover"||o==="pointerover",we=o==="mouseout"||o==="pointerout",Se&&d!==Ai&&(At=d.relatedTarget||d.fromElement)&&(ia(At)||At[Ba]))break e;if((we||Se)&&(Se=Ae.window===Ae?Ae:(Se=Ae.ownerDocument)?Se.defaultView||Se.parentWindow:window,we?(At=d.relatedTarget||d.toElement,we=me,At=At?ia(At):null,At!==null&&(Sn=P(At),wt=At.tag,At!==Sn||wt!==5&&wt!==27&&wt!==6)&&(At=null)):(we=null,At=me),we!==At)){if(wt=ls,Ce="onMouseLeave",he="onMouseEnter",ue="mouse",(o==="pointerout"||o==="pointerover")&&(wt=cs,Ce="onPointerLeave",he="onPointerEnter",ue="pointer"),Sn=we==null?Se:pl(we),ge=At==null?Se:pl(At),Se=new wt(Ce,ue+"leave",we,d,Ae),Se.target=Sn,Se.relatedTarget=ge,Ce=null,ia(Ae)===me&&(wt=new wt(he,ue+"enter",At,d,Ae),wt.target=ge,wt.relatedTarget=Sn,Ce=wt),Sn=Ce,we&&At)t:{for(wt=we,he=At,ue=0,ge=wt;ge;ge=Yl(ge))ue++;for(ge=0,Ce=he;Ce;Ce=Yl(Ce))ge++;for(;0<ue-ge;)wt=Yl(wt),ue--;for(;0<ge-ue;)he=Yl(he),ge--;for(;ue--;){if(wt===he||he!==null&&wt===he.alternate)break t;wt=Yl(wt),he=Yl(he)}wt=null}else wt=null;we!==null&&bm(Ie,Se,we,wt,!1),At!==null&&Sn!==null&&bm(Ie,Sn,At,wt,!0)}}e:{if(Se=me?pl(me):window,we=Se.nodeName&&Se.nodeName.toLowerCase(),we==="select"||we==="input"&&Se.type==="file")var it=hs;else if(Tl(Se))if(Nc)it=lh;else{it=rh;var Kt=Og}else we=Se.nodeName,!we||we.toLowerCase()!=="input"||Se.type!=="checkbox"&&Se.type!=="radio"?me&&Nr(me.elementType)&&(it=hs):it=oh;if(it&&(it=it(o,me))){co(Ie,it,d,Ae);break e}Kt&&Kt(o,Se,me),o==="focusout"&&me&&Se.type==="number"&&me.memoizedProps.value!=null&&zp(Se,"number",Se.value)}switch(Kt=me?pl(me):window,o){case"focusin":(Tl(Kt)||Kt.contentEditable==="true")&&(Yi=Kt,Lc=me,El=null);break;case"focusout":El=Lc=Yi=null;break;case"mousedown":id=!0;break;case"contextmenu":case"mouseup":case"dragend":id=!1,gs(Ie,d,Ae);break;case"selectionchange":if(nd)break;case"keydown":case"keyup":gs(Ie,d,Ae)}var lt;if(ds)e:{switch(o){case"compositionstart":var Ct="onCompositionStart";break e;case"compositionend":Ct="onCompositionEnd";break e;case"compositionupdate":Ct="onCompositionUpdate";break e}Ct=void 0}else Ge?An(o,d)&&(Ct="onCompositionEnd"):o==="keydown"&&d.keyCode===229&&(Ct="onCompositionStart");Ct&&(In&&d.locale!=="ko"&&(Ge||Ct!=="onCompositionStart"?Ct==="onCompositionEnd"&&Ge&&(lt=td()):(vl=Ae,aa="value"in vl?vl.value:vl.textContent,Ge=!0)),Kt=rc(me,Ct),0<Kt.length&&(Ct=new Qp(Ct,o,null,d,Ae),Ie.push({event:Ct,listeners:Kt}),lt?Ct.data=lt:(lt=Tr(d),lt!==null&&(Ct.data=lt)))),(lt=Lt?wl(o,d):Dg(o,d))&&(Ct=rc(me,"onBeforeInput"),0<Ct.length&&(Kt=new Qp("onBeforeInput","beforeinput",null,d,Ae),Ie.push({event:Kt,listeners:Ct}),Kt.data=lt)),F0(Ie,o,me,d,Ae)}Qd(Ie,u)})}function Xl(o,u,d){return{instance:o,listener:u,currentTarget:d}}function rc(o,u){for(var d=u+"Capture",g=[];o!==null;){var C=o,I=C.stateNode;if(C=C.tag,C!==5&&C!==26&&C!==27||I===null||(C=wr(o,d),C!=null&&g.unshift(Xl(o,C,I)),C=wr(o,u),C!=null&&g.push(Xl(o,C,I))),o.tag===3)return g;o=o.return}return[]}function Yl(o){if(o===null)return null;do o=o.return;while(o&&o.tag!==5&&o.tag!==27);return o||null}function bm(o,u,d,g,C){for(var I=u._reactName,B=[];d!==null&&d!==g;){var H=d,ie=H.alternate,me=H.stateNode;if(H=H.tag,ie!==null&&ie===g)break;H!==5&&H!==26&&H!==27||me===null||(ie=me,C?(me=wr(d,I),me!=null&&B.unshift(Xl(d,me,ie))):C||(me=wr(d,I),me!=null&&B.push(Xl(d,me,ie)))),d=d.return}B.length!==0&&o.push({event:u,listeners:B})}var ny=/\r\n?/g,X0=/\u0000|\uFFFD/g;function Ef(o){return(typeof o=="string"?o:""+o).replace(ny,`
`).replace(X0,"")}function Jd(o,u){return u=Ef(u),Ef(o)===u}function Iu(){}function on(o,u,d,g,C,I){switch(d){case"children":typeof g=="string"?u==="body"||u==="textarea"&&g===""||ao(o,g):(typeof g=="number"||typeof g=="bigint")&&u!=="body"&&ao(o,""+g);break;case"className":nr(o,"class",g);break;case"tabIndex":nr(o,"tabindex",g);break;case"dir":case"role":case"viewBox":case"width":case"height":nr(o,d,g);break;case"style":gl(o,g,I);break;case"data":if(u!=="object"){nr(o,"data",g);break}case"src":case"href":if(g===""&&(u!=="a"||d!=="href")){o.removeAttribute(d);break}if(g==null||typeof g=="function"||typeof g=="symbol"||typeof g=="boolean"){o.removeAttribute(d);break}g=ts(""+g),o.setAttribute(d,g);break;case"action":case"formAction":if(typeof g=="function"){o.setAttribute(d,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof I=="function"&&(d==="formAction"?(u!=="input"&&on(o,u,"name",C.name,C,null),on(o,u,"formEncType",C.formEncType,C,null),on(o,u,"formMethod",C.formMethod,C,null),on(o,u,"formTarget",C.formTarget,C,null)):(on(o,u,"encType",C.encType,C,null),on(o,u,"method",C.method,C,null),on(o,u,"target",C.target,C,null)));if(g==null||typeof g=="symbol"||typeof g=="boolean"){o.removeAttribute(d);break}g=ts(""+g),o.setAttribute(d,g);break;case"onClick":g!=null&&(o.onclick=Iu);break;case"onScroll":g!=null&&Ht("scroll",o);break;case"onScrollEnd":g!=null&&Ht("scrollend",o);break;case"dangerouslySetInnerHTML":if(g!=null){if(typeof g!="object"||!("__html"in g))throw Error(S(61));if(d=g.__html,d!=null){if(C.children!=null)throw Error(S(60));o.innerHTML=d}}break;case"multiple":o.multiple=g&&typeof g!="function"&&typeof g!="symbol";break;case"muted":o.muted=g&&typeof g!="function"&&typeof g!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(g==null||typeof g=="function"||typeof g=="boolean"||typeof g=="symbol"){o.removeAttribute("xlink:href");break}d=ts(""+g),o.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",d);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":g!=null&&typeof g!="function"&&typeof g!="symbol"?o.setAttribute(d,""+g):o.removeAttribute(d);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":g&&typeof g!="function"&&typeof g!="symbol"?o.setAttribute(d,""):o.removeAttribute(d);break;case"capture":case"download":g===!0?o.setAttribute(d,""):g!==!1&&g!=null&&typeof g!="function"&&typeof g!="symbol"?o.setAttribute(d,g):o.removeAttribute(d);break;case"cols":case"rows":case"size":case"span":g!=null&&typeof g!="function"&&typeof g!="symbol"&&!isNaN(g)&&1<=g?o.setAttribute(d,g):o.removeAttribute(d);break;case"rowSpan":case"start":g==null||typeof g=="function"||typeof g=="symbol"||isNaN(g)?o.removeAttribute(d):o.setAttribute(d,g);break;case"popover":Ht("beforetoggle",o),Ht("toggle",o),ra(o,"popover",g);break;case"xlinkActuate":di(o,"http://www.w3.org/1999/xlink","xlink:actuate",g);break;case"xlinkArcrole":di(o,"http://www.w3.org/1999/xlink","xlink:arcrole",g);break;case"xlinkRole":di(o,"http://www.w3.org/1999/xlink","xlink:role",g);break;case"xlinkShow":di(o,"http://www.w3.org/1999/xlink","xlink:show",g);break;case"xlinkTitle":di(o,"http://www.w3.org/1999/xlink","xlink:title",g);break;case"xlinkType":di(o,"http://www.w3.org/1999/xlink","xlink:type",g);break;case"xmlBase":di(o,"http://www.w3.org/XML/1998/namespace","xml:base",g);break;case"xmlLang":di(o,"http://www.w3.org/XML/1998/namespace","xml:lang",g);break;case"xmlSpace":di(o,"http://www.w3.org/XML/1998/namespace","xml:space",g);break;case"is":ra(o,"is",g);break;case"innerText":case"textContent":break;default:(!(2<d.length)||d[0]!=="o"&&d[0]!=="O"||d[1]!=="n"&&d[1]!=="N")&&(d=Pr.get(d)||d,ra(o,d,g))}}function Zd(o,u,d,g,C,I){switch(d){case"style":gl(o,g,I);break;case"dangerouslySetInnerHTML":if(g!=null){if(typeof g!="object"||!("__html"in g))throw Error(S(61));if(d=g.__html,d!=null){if(C.children!=null)throw Error(S(60));o.innerHTML=d}}break;case"children":typeof g=="string"?ao(o,g):(typeof g=="number"||typeof g=="bigint")&&ao(o,""+g);break;case"onScroll":g!=null&&Ht("scroll",o);break;case"onScrollEnd":g!=null&&Ht("scrollend",o);break;case"onClick":g!=null&&(o.onclick=Iu);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!bc.hasOwnProperty(d))e:{if(d[0]==="o"&&d[1]==="n"&&(C=d.endsWith("Capture"),u=d.slice(2,C?d.length-7:void 0),I=o[ki]||null,I=I!=null?I[d]:null,typeof I=="function"&&o.removeEventListener(u,I,C),typeof g=="function")){typeof I!="function"&&I!==null&&(d in o?o[d]=null:o.hasAttribute(d)&&o.removeAttribute(d)),o.addEventListener(u,g,C);break e}d in o?o[d]=g:g===!0?o.setAttribute(d,""):ra(o,d,g)}}}function ln(o,u,d){switch(u){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Ht("error",o),Ht("load",o);var g=!1,C=!1,I;for(I in d)if(d.hasOwnProperty(I)){var B=d[I];if(B!=null)switch(I){case"src":g=!0;break;case"srcSet":C=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(S(137,u));default:on(o,u,I,B,d,null)}}C&&on(o,u,"srcSet",d.srcSet,d,null),g&&on(o,u,"src",d.src,d,null);return;case"input":Ht("invalid",o);var H=I=B=C=null,ie=null,me=null;for(g in d)if(d.hasOwnProperty(g)){var Ae=d[g];if(Ae!=null)switch(g){case"name":C=Ae;break;case"type":B=Ae;break;case"checked":ie=Ae;break;case"defaultChecked":me=Ae;break;case"value":I=Ae;break;case"defaultValue":H=Ae;break;case"children":case"dangerouslySetInnerHTML":if(Ae!=null)throw Error(S(137,u));break;default:on(o,u,g,Ae,d,null)}}Fp(o,I,H,ie,me,B,C,!1),$u(o);return;case"select":Ht("invalid",o),g=B=I=null;for(C in d)if(d.hasOwnProperty(C)&&(H=d[C],H!=null))switch(C){case"value":I=H;break;case"defaultValue":B=H;break;case"multiple":g=H;default:on(o,u,C,H,d,null)}u=I,d=B,o.multiple=!!g,u!=null?Ka(o,!!g,u,!1):d!=null&&Ka(o,!!g,d,!0);return;case"textarea":Ht("invalid",o),I=C=g=null;for(B in d)if(d.hasOwnProperty(B)&&(H=d[B],H!=null))switch(B){case"value":g=H;break;case"defaultValue":C=H;break;case"children":I=H;break;case"dangerouslySetInnerHTML":if(H!=null)throw Error(S(91));break;default:on(o,u,B,H,d,null)}$f(o,g,C,I),$u(o);return;case"option":for(ie in d)if(d.hasOwnProperty(ie)&&(g=d[ie],g!=null))switch(ie){case"selected":o.selected=g&&typeof g!="function"&&typeof g!="symbol";break;default:on(o,u,ie,g,d,null)}return;case"dialog":Ht("beforetoggle",o),Ht("toggle",o),Ht("cancel",o),Ht("close",o);break;case"iframe":case"object":Ht("load",o);break;case"video":case"audio":for(g=0;g<ic.length;g++)Ht(ic[g],o);break;case"image":Ht("error",o),Ht("load",o);break;case"details":Ht("toggle",o);break;case"embed":case"source":case"link":Ht("error",o),Ht("load",o);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(me in d)if(d.hasOwnProperty(me)&&(g=d[me],g!=null))switch(me){case"children":case"dangerouslySetInnerHTML":throw Error(S(137,u));default:on(o,u,me,g,d,null)}return;default:if(Nr(u)){for(Ae in d)d.hasOwnProperty(Ae)&&(g=d[Ae],g!==void 0&&Zd(o,u,Ae,g,d,void 0));return}}for(H in d)d.hasOwnProperty(H)&&(g=d[H],g!=null&&on(o,u,H,g,d,null))}function Im(o,u,d,g){switch(u){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var C=null,I=null,B=null,H=null,ie=null,me=null,Ae=null;for(we in d){var Ie=d[we];if(d.hasOwnProperty(we)&&Ie!=null)switch(we){case"checked":break;case"value":break;case"defaultValue":ie=Ie;default:g.hasOwnProperty(we)||on(o,u,we,null,g,Ie)}}for(var Se in g){var we=g[Se];if(Ie=d[Se],g.hasOwnProperty(Se)&&(we!=null||Ie!=null))switch(Se){case"type":I=we;break;case"name":C=we;break;case"checked":me=we;break;case"defaultChecked":Ae=we;break;case"value":B=we;break;case"defaultValue":H=we;break;case"children":case"dangerouslySetInnerHTML":if(we!=null)throw Error(S(137,u));break;default:we!==Ie&&on(o,u,Se,we,g,Ie)}}oa(o,B,H,ie,me,Ae,I,C);return;case"select":we=B=H=Se=null;for(I in d)if(ie=d[I],d.hasOwnProperty(I)&&ie!=null)switch(I){case"value":break;case"multiple":we=ie;default:g.hasOwnProperty(I)||on(o,u,I,null,g,ie)}for(C in g)if(I=g[C],ie=d[C],g.hasOwnProperty(C)&&(I!=null||ie!=null))switch(C){case"value":Se=I;break;case"defaultValue":H=I;break;case"multiple":B=I;default:I!==ie&&on(o,u,C,I,g,ie)}u=H,d=B,g=we,Se!=null?Ka(o,!!d,Se,!1):!!g!=!!d&&(u!=null?Ka(o,!!d,u,!0):Ka(o,!!d,d?[]:"",!1));return;case"textarea":we=Se=null;for(H in d)if(C=d[H],d.hasOwnProperty(H)&&C!=null&&!g.hasOwnProperty(H))switch(H){case"value":break;case"children":break;default:on(o,u,H,null,g,C)}for(B in g)if(C=g[B],I=d[B],g.hasOwnProperty(B)&&(C!=null||I!=null))switch(B){case"value":Se=C;break;case"defaultValue":we=C;break;case"children":break;case"dangerouslySetInnerHTML":if(C!=null)throw Error(S(91));break;default:C!==I&&on(o,u,B,C,g,I)}Gp(o,Se,we);return;case"option":for(var At in d)if(Se=d[At],d.hasOwnProperty(At)&&Se!=null&&!g.hasOwnProperty(At))switch(At){case"selected":o.selected=!1;break;default:on(o,u,At,null,g,Se)}for(ie in g)if(Se=g[ie],we=d[ie],g.hasOwnProperty(ie)&&Se!==we&&(Se!=null||we!=null))switch(ie){case"selected":o.selected=Se&&typeof Se!="function"&&typeof Se!="symbol";break;default:on(o,u,ie,Se,g,we)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var wt in d)Se=d[wt],d.hasOwnProperty(wt)&&Se!=null&&!g.hasOwnProperty(wt)&&on(o,u,wt,null,g,Se);for(me in g)if(Se=g[me],we=d[me],g.hasOwnProperty(me)&&Se!==we&&(Se!=null||we!=null))switch(me){case"children":case"dangerouslySetInnerHTML":if(Se!=null)throw Error(S(137,u));break;default:on(o,u,me,Se,g,we)}return;default:if(Nr(u)){for(var Sn in d)Se=d[Sn],d.hasOwnProperty(Sn)&&Se!==void 0&&!g.hasOwnProperty(Sn)&&Zd(o,u,Sn,void 0,g,Se);for(Ae in g)Se=g[Ae],we=d[Ae],!g.hasOwnProperty(Ae)||Se===we||Se===void 0&&we===void 0||Zd(o,u,Ae,Se,g,we);return}}for(var he in d)Se=d[he],d.hasOwnProperty(he)&&Se!=null&&!g.hasOwnProperty(he)&&on(o,u,he,null,g,Se);for(Ie in g)Se=g[Ie],we=d[Ie],!g.hasOwnProperty(Ie)||Se===we||Se==null&&we==null||on(o,u,Ie,Se,g,we)}var Du=null,Af=null;function Ou(o){return o.nodeType===9?o:o.ownerDocument}function $d(o){switch(o){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function Dm(o,u){if(o===0)switch(u){case"svg":return 1;case"math":return 2;default:return 0}return o===1&&u==="foreignObject"?0:o}function iy(o,u){return o==="textarea"||o==="noscript"||typeof u.children=="string"||typeof u.children=="number"||typeof u.children=="bigint"||typeof u.dangerouslySetInnerHTML=="object"&&u.dangerouslySetInnerHTML!==null&&u.dangerouslySetInnerHTML.__html!=null}var ry=null;function Y0(){var o=window.event;return o&&o.type==="popstate"?o===ry?!1:(ry=o,!0):(ry=null,!1)}var Om=typeof setTimeout=="function"?setTimeout:void 0,W0=typeof clearTimeout=="function"?clearTimeout:void 0,km=typeof Promise=="function"?Promise:void 0,Q0=typeof queueMicrotask=="function"?queueMicrotask:typeof km<"u"?function(o){return km.resolve(null).then(o).catch(J0)}:Om;function J0(o){setTimeout(function(){throw o})}function Eo(o){return o==="head"}function ku(o,u){var d=u,g=0,C=0;do{var I=d.nextSibling;if(o.removeChild(d),I&&I.nodeType===8)if(d=I.data,d==="/$"){if(0<g&&8>g){d=g;var B=o.ownerDocument;if(d&1&&Ru(B.documentElement),d&2&&Ru(B.body),d&4)for(d=B.head,Ru(d),B=d.firstChild;B;){var H=B.nextSibling,ie=B.nodeName;B[Zu]||ie==="SCRIPT"||ie==="STYLE"||ie==="LINK"&&B.rel.toLowerCase()==="stylesheet"||d.removeChild(B),B=H}}if(C===0){o.removeChild(I),cc(u);return}C--}else d==="$"||d==="$?"||d==="$!"?C++:g=d.charCodeAt(0)-48;else g=0;d=I}while(d);cc(u)}function ep(o){var u=o.firstChild;for(u&&u.nodeType===10&&(u=u.nextSibling);u;){var d=u;switch(u=u.nextSibling,d.nodeName){case"HTML":case"HEAD":case"BODY":ep(d),Ei(d);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(d.rel.toLowerCase()==="stylesheet")continue}o.removeChild(d)}}function ba(o,u,d,g){for(;o.nodeType===1;){var C=d;if(o.nodeName.toLowerCase()!==u.toLowerCase()){if(!g&&(o.nodeName!=="INPUT"||o.type!=="hidden"))break}else if(g){if(!o[Zu])switch(u){case"meta":if(!o.hasAttribute("itemprop"))break;return o;case"link":if(I=o.getAttribute("rel"),I==="stylesheet"&&o.hasAttribute("data-precedence"))break;if(I!==C.rel||o.getAttribute("href")!==(C.href==null||C.href===""?null:C.href)||o.getAttribute("crossorigin")!==(C.crossOrigin==null?null:C.crossOrigin)||o.getAttribute("title")!==(C.title==null?null:C.title))break;return o;case"style":if(o.hasAttribute("data-precedence"))break;return o;case"script":if(I=o.getAttribute("src"),(I!==(C.src==null?null:C.src)||o.getAttribute("type")!==(C.type==null?null:C.type)||o.getAttribute("crossorigin")!==(C.crossOrigin==null?null:C.crossOrigin))&&I&&o.hasAttribute("async")&&!o.hasAttribute("itemprop"))break;return o;default:return o}}else if(u==="input"&&o.type==="hidden"){var I=C.name==null?null:""+C.name;if(C.type==="hidden"&&o.getAttribute("name")===I)return o}else return o;if(o=Ao(o.nextSibling),o===null)break}return null}function Z0(o,u,d){if(u==="")return null;for(;o.nodeType!==3;)if((o.nodeType!==1||o.nodeName!=="INPUT"||o.type!=="hidden")&&!d||(o=Ao(o.nextSibling),o===null))return null;return o}function oc(o){return o.data==="$!"||o.data==="$?"&&o.ownerDocument.readyState==="complete"}function tp(o,u){var d=o.ownerDocument;if(o.data!=="$?"||d.readyState==="complete")u();else{var g=function(){u(),d.removeEventListener("DOMContentLoaded",g)};d.addEventListener("DOMContentLoaded",g),o._reactRetry=g}}function Ao(o){for(;o!=null;o=o.nextSibling){var u=o.nodeType;if(u===1||u===3)break;if(u===8){if(u=o.data,u==="$"||u==="$!"||u==="$?"||u==="F!"||u==="F")break;if(u==="/$")return null}}return o}var Cf=null;function Rm(o){o=o.previousSibling;for(var u=0;o;){if(o.nodeType===8){var d=o.data;if(d==="$"||d==="$!"||d==="$?"){if(u===0)return o;u--}else d==="/$"&&u++}o=o.previousSibling}return null}function Mm(o,u,d){switch(u=Ou(d),o){case"html":if(o=u.documentElement,!o)throw Error(S(452));return o;case"head":if(o=u.head,!o)throw Error(S(453));return o;case"body":if(o=u.body,!o)throw Error(S(454));return o;default:throw Error(S(451))}}function Ru(o){for(var u=o.attributes;u.length;)o.removeAttributeNode(u[0]);Ei(o)}var Qi=new Map,dr=new Set;function Ia(o){return typeof o.getRootNode=="function"?o.getRootNode():o.nodeType===9?o:o.ownerDocument}var Wl=je.d;je.d={f:Nm,r:$0,D:e1,C:Mu,L:oy,m:t1,X:n1,S:Lm,M:ly};function Nm(){var o=Wl.f(),u=gf();return o||u}function $0(o){var u=Y(o);u!==null&&u.tag===5&&u.type==="form"?Qc(u):Wl.r(o)}var lc=typeof document>"u"?null:document;function Pm(o,u,d){var g=lc;if(g&&typeof u=="string"&&u){var C=zt(u);C='link[rel="'+o+'"][href="'+C+'"]',typeof d=="string"&&(C+='[crossorigin="'+d+'"]'),dr.has(C)||(dr.add(C),o={rel:o,crossOrigin:d,href:u},g.querySelector(C)===null&&(u=g.createElement("link"),ln(u,"link",o),ri(u),g.head.appendChild(u)))}}function e1(o){Wl.D(o),Pm("dns-prefetch",o,null)}function Mu(o,u){Wl.C(o,u),Pm("preconnect",o,u)}function oy(o,u,d){Wl.L(o,u,d);var g=lc;if(g&&o&&u){var C='link[rel="preload"][as="'+zt(u)+'"]';u==="image"&&d&&d.imageSrcSet?(C+='[imagesrcset="'+zt(d.imageSrcSet)+'"]',typeof d.imageSizes=="string"&&(C+='[imagesizes="'+zt(d.imageSizes)+'"]')):C+='[href="'+zt(o)+'"]';var I=C;switch(u){case"style":I=Fr(o);break;case"script":I=ol(o)}Qi.has(I)||(o=p({rel:"preload",href:u==="image"&&d&&d.imageSrcSet?void 0:o,as:u},d),Qi.set(I,o),g.querySelector(C)!==null||u==="style"&&g.querySelector(kr(I))||u==="script"&&g.querySelector(Co(I))||(u=g.createElement("link"),ln(u,"link",o),ri(u),g.head.appendChild(u)))}}function t1(o,u){Wl.m(o,u);var d=lc;if(d&&o){var g=u&&typeof u.as=="string"?u.as:"script",C='link[rel="modulepreload"][as="'+zt(g)+'"][href="'+zt(o)+'"]',I=C;switch(g){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":I=ol(o)}if(!Qi.has(I)&&(o=p({rel:"modulepreload",href:o},u),Qi.set(I,o),d.querySelector(C)===null)){switch(g){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(d.querySelector(Co(I)))return}g=d.createElement("link"),ln(g,"link",o),ri(g),d.head.appendChild(g)}}}function Lm(o,u,d){Wl.S(o,u,d);var g=lc;if(g&&o){var C=Va(g).hoistableStyles,I=Fr(o);u=u||"default";var B=C.get(I);if(!B){var H={loading:0,preload:null};if(B=g.querySelector(kr(I)))H.loading=5;else{o=p({rel:"stylesheet",href:o,"data-precedence":u},d),(d=Qi.get(I))&&np(o,d);var ie=B=g.createElement("link");ri(ie),ln(ie,"link",o),ie._p=new Promise(function(me,Ae){ie.onload=me,ie.onerror=Ae}),ie.addEventListener("load",function(){H.loading|=1}),ie.addEventListener("error",function(){H.loading|=2}),H.loading|=4,bf(B,u,g)}B={type:"stylesheet",instance:B,count:1,state:H},C.set(I,B)}}}function n1(o,u){Wl.X(o,u);var d=lc;if(d&&o){var g=Va(d).hoistableScripts,C=ol(o),I=g.get(C);I||(I=d.querySelector(Co(C)),I||(o=p({src:o,async:!0},u),(u=Qi.get(C))&&If(o,u),I=d.createElement("script"),ri(I),ln(I,"link",o),d.head.appendChild(I)),I={type:"script",instance:I,count:1,state:null},g.set(C,I))}}function ly(o,u){Wl.M(o,u);var d=lc;if(d&&o){var g=Va(d).hoistableScripts,C=ol(o),I=g.get(C);I||(I=d.querySelector(Co(C)),I||(o=p({src:o,async:!0,type:"module"},u),(u=Qi.get(C))&&If(o,u),I=d.createElement("script"),ri(I),ln(I,"link",o),d.head.appendChild(I)),I={type:"script",instance:I,count:1,state:null},g.set(C,I))}}function _m(o,u,d,g){var C=(C=yt.current)?Ia(C):null;if(!C)throw Error(S(446));switch(o){case"meta":case"title":return null;case"style":return typeof d.precedence=="string"&&typeof d.href=="string"?(u=Fr(d.href),d=Va(C).hoistableStyles,g=d.get(u),g||(g={type:"style",instance:null,count:0,state:null},d.set(u,g)),g):{type:"void",instance:null,count:0,state:null};case"link":if(d.rel==="stylesheet"&&typeof d.href=="string"&&typeof d.precedence=="string"){o=Fr(d.href);var I=Va(C).hoistableStyles,B=I.get(o);if(B||(C=C.ownerDocument||C,B={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},I.set(o,B),(I=C.querySelector(kr(o)))&&!I._p&&(B.instance=I,B.state.loading=5),Qi.has(o)||(d={rel:"preload",as:"style",href:d.href,crossOrigin:d.crossOrigin,integrity:d.integrity,media:d.media,hrefLang:d.hrefLang,referrerPolicy:d.referrerPolicy},Qi.set(o,d),I||uc(C,o,d,B.state))),u&&g===null)throw Error(S(528,""));return B}if(u&&g!==null)throw Error(S(529,""));return null;case"script":return u=d.async,d=d.src,typeof d=="string"&&u&&typeof u!="function"&&typeof u!="symbol"?(u=ol(d),d=Va(C).hoistableScripts,g=d.get(u),g||(g={type:"script",instance:null,count:0,state:null},d.set(u,g)),g):{type:"void",instance:null,count:0,state:null};default:throw Error(S(444,o))}}function Fr(o){return'href="'+zt(o)+'"'}function kr(o){return'link[rel="stylesheet"]['+o+"]"}function ac(o){return p({},o,{"data-precedence":o.precedence,precedence:null})}function uc(o,u,d,g){o.querySelector('link[rel="preload"][as="style"]['+u+"]")?g.loading=1:(u=o.createElement("link"),g.preload=u,u.addEventListener("load",function(){return g.loading|=1}),u.addEventListener("error",function(){return g.loading|=2}),ln(u,"link",d),ri(u),o.head.appendChild(u))}function ol(o){return'[src="'+zt(o)+'"]'}function Co(o){return"script[async]"+o}function Um(o,u,d){if(u.count++,u.instance===null)switch(u.type){case"style":var g=o.querySelector('style[data-href~="'+zt(d.href)+'"]');if(g)return u.instance=g,ri(g),g;var C=p({},d,{"data-href":d.href,"data-precedence":d.precedence,href:null,precedence:null});return g=(o.ownerDocument||o).createElement("style"),ri(g),ln(g,"style",C),bf(g,d.precedence,o),u.instance=g;case"stylesheet":C=Fr(d.href);var I=o.querySelector(kr(C));if(I)return u.state.loading|=4,u.instance=I,ri(I),I;g=ac(d),(C=Qi.get(C))&&np(g,C),I=(o.ownerDocument||o).createElement("link"),ri(I);var B=I;return B._p=new Promise(function(H,ie){B.onload=H,B.onerror=ie}),ln(I,"link",g),u.state.loading|=4,bf(I,d.precedence,o),u.instance=I;case"script":return I=ol(d.src),(C=o.querySelector(Co(I)))?(u.instance=C,ri(C),C):(g=d,(C=Qi.get(I))&&(g=p({},d),If(g,C)),o=o.ownerDocument||o,C=o.createElement("script"),ri(C),ln(C,"link",g),o.head.appendChild(C),u.instance=C);case"void":return null;default:throw Error(S(443,u.type))}else u.type==="stylesheet"&&(u.state.loading&4)===0&&(g=u.instance,u.state.loading|=4,bf(g,d.precedence,o));return u.instance}function bf(o,u,d){for(var g=d.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),C=g.length?g[g.length-1]:null,I=C,B=0;B<g.length;B++){var H=g[B];if(H.dataset.precedence===u)I=H;else if(I!==C)break}I?I.parentNode.insertBefore(o,I.nextSibling):(u=d.nodeType===9?d.head:d,u.insertBefore(o,u.firstChild))}function np(o,u){o.crossOrigin==null&&(o.crossOrigin=u.crossOrigin),o.referrerPolicy==null&&(o.referrerPolicy=u.referrerPolicy),o.title==null&&(o.title=u.title)}function If(o,u){o.crossOrigin==null&&(o.crossOrigin=u.crossOrigin),o.referrerPolicy==null&&(o.referrerPolicy=u.referrerPolicy),o.integrity==null&&(o.integrity=u.integrity)}var Df=null;function jm(o,u,d){if(Df===null){var g=new Map,C=Df=new Map;C.set(d,g)}else C=Df,g=C.get(d),g||(g=new Map,C.set(d,g));if(g.has(o))return g;for(g.set(o,null),d=d.getElementsByTagName(o),C=0;C<d.length;C++){var I=d[C];if(!(I[Zu]||I[Jn]||o==="link"&&I.getAttribute("rel")==="stylesheet")&&I.namespaceURI!=="http://www.w3.org/2000/svg"){var B=I.getAttribute(u)||"";B=o+B;var H=g.get(B);H?H.push(I):g.set(B,[I])}}return g}function ci(o,u,d){o=o.ownerDocument||o,o.head.insertBefore(d,u==="title"?o.querySelector("head > title"):null)}function Bm(o,u,d){if(d===1||u.itemProp!=null)return!1;switch(o){case"meta":case"title":return!0;case"style":if(typeof u.precedence!="string"||typeof u.href!="string"||u.href==="")break;return!0;case"link":if(typeof u.rel!="string"||typeof u.href!="string"||u.href===""||u.onLoad||u.onError)break;switch(u.rel){case"stylesheet":return o=u.disabled,typeof u.precedence=="string"&&o==null;default:return!0}case"script":if(u.async&&typeof u.async!="function"&&typeof u.async!="symbol"&&!u.onLoad&&!u.onError&&u.src&&typeof u.src=="string")return!0}return!1}function ay(o){return!(o.type==="stylesheet"&&(o.state.loading&3)===0)}var Kn=null;function Si(){}function Of(o,u,d){if(Kn===null)throw Error(S(475));var g=Kn;if(u.type==="stylesheet"&&(typeof d.media!="string"||matchMedia(d.media).matches!==!1)&&(u.state.loading&4)===0){if(u.instance===null){var C=Fr(d.href),I=o.querySelector(kr(C));if(I){o=I._p,o!==null&&typeof o=="object"&&typeof o.then=="function"&&(g.count++,g=kf.bind(g),o.then(g,g)),u.state.loading|=4,u.instance=I,ri(I);return}I=o.ownerDocument||o,d=ac(d),(C=Qi.get(C))&&np(d,C),I=I.createElement("link"),ri(I);var B=I;B._p=new Promise(function(H,ie){B.onload=H,B.onerror=ie}),ln(I,"link",d),u.instance=I}g.stylesheets===null&&(g.stylesheets=new Map),g.stylesheets.set(u,o),(o=u.state.preload)&&(u.state.loading&3)===0&&(g.count++,u=kf.bind(g),o.addEventListener("load",u),o.addEventListener("error",u))}}function i1(){if(Kn===null)throw Error(S(475));var o=Kn;return o.stylesheets&&o.count===0&&uy(o,o.stylesheets),0<o.count?function(u){var d=setTimeout(function(){if(o.stylesheets&&uy(o,o.stylesheets),o.unsuspend){var g=o.unsuspend;o.unsuspend=null,g()}},6e4);return o.unsuspend=u,function(){o.unsuspend=null,clearTimeout(d)}}:null}function kf(){if(this.count--,this.count===0){if(this.stylesheets)uy(this,this.stylesheets);else if(this.unsuspend){var o=this.unsuspend;this.unsuspend=null,o()}}}var bo=null;function uy(o,u){o.stylesheets=null,o.unsuspend!==null&&(o.count++,bo=new Map,u.forEach(r1,o),bo=null,kf.call(o))}function r1(o,u){if(!(u.state.loading&4)){var d=bo.get(o);if(d)var g=d.get(null);else{d=new Map,bo.set(o,d);for(var C=o.querySelectorAll("link[data-precedence],style[data-precedence]"),I=0;I<C.length;I++){var B=C[I];(B.nodeName==="LINK"||B.getAttribute("media")!=="not all")&&(d.set(B.dataset.precedence,B),g=B)}g&&d.set(null,g)}C=u.instance,B=C.getAttribute("data-precedence"),I=d.get(B)||g,I===g&&d.set(null,C),d.set(B,C),this.count++,g=kf.bind(this),C.addEventListener("load",g),C.addEventListener("error",g),I?I.parentNode.insertBefore(C,I.nextSibling):(o=o.nodeType===9?o.head:o,o.insertBefore(C,o.firstChild)),u.state.loading|=4}}var Rf={$$typeof:ee,Provider:null,Consumer:null,_currentValue:ht,_currentValue2:ht,_threadCount:0};function sy(o,u,d,g,C,I,B,H){this.tag=1,this.containerInfo=o,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Cc(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Cc(0),this.hiddenUpdates=Cc(null),this.identifierPrefix=g,this.onUncaughtError=C,this.onCaughtError=I,this.onRecoverableError=B,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=H,this.incompleteTransitions=new Map}function Vm(o,u,d,g,C,I,B,H,ie,me,Ae,Ie){return o=new sy(o,u,d,B,H,ie,me,Ie),u=1,I===!0&&(u|=24),I=li(3,null,null,u),o.current=I,I.stateNode=o,u=qc(),u.refCount++,o.pooledCache=u,u.refCount++,I.memoizedState={element:g,isDehydrated:d,cache:u},yn(I),o}function Hm(o){return o?(o=bl,o):bl}function ip(o,u,d,g,C,I){C=Hm(C),g.context===null?g.context=C:g.pendingContext=C,g=Xo(u),g.payload={element:d},I=I===void 0?null:I,I!==null&&(g.callback=I),d=Cr(o,g,u),d!==null&&(Pn(d,o,u),As(d,o,u))}function Km(o,u){if(o=o.memoizedState,o!==null&&o.dehydrated!==null){var d=o.retryLane;o.retryLane=d!==0&&d<u?d:u}}function cy(o,u){Km(o,u),(o=o.alternate)&&Km(o,u)}function qm(o){if(o.tag===13){var u=fo(o,67108864);u!==null&&Pn(u,o,67108864),cy(o,67108864)}}var rp=!0;function o1(o,u,d,g){var C=Te.T;Te.T=null;var I=je.p;try{je.p=2,Da(o,u,d,g)}finally{je.p=I,Te.T=C}}function fy(o,u,d,g){var C=Te.T;Te.T=null;var I=je.p;try{je.p=8,Da(o,u,d,g)}finally{je.p=I,Te.T=C}}function Da(o,u,d,g){if(rp){var C=dy(g);if(C===null)Ca(o,u,g,op,d),Fm(o,g);else if(ap(C,o,u,d,g))g.stopPropagation();else if(Fm(o,g),u&4&&-1<lp.indexOf(o)){for(;C!==null;){var I=Y(C);if(I!==null)switch(I.tag){case 3:if(I=I.stateNode,I.current.memoizedState.isDehydrated){var B=ja(I.pendingLanes);if(B!==0){var H=I;for(H.pendingLanes|=2,H.entangledLanes|=2;B;){var ie=1<<31-vr(B);H.entanglements[1]|=ie,B&=~ie}il(I),(fn&6)===0&&(Xs=tr()+500,rl(0))}}break;case 13:H=fo(I,2),H!==null&&Pn(H,I,2),gf(),cy(I,2)}if(I=dy(g),I===null&&Ca(o,u,g,op,d),I===C)break;C=I}C!==null&&g.stopPropagation()}else Ca(o,u,g,null,d)}}function dy(o){return o=ed(o),py(o)}var op=null;function py(o){if(op=null,o=ia(o),o!==null){var u=P(o);if(u===null)o=null;else{var d=u.tag;if(d===13){if(o=O(u),o!==null)return o;o=null}else if(d===3){if(u.stateNode.current.memoizedState.isDehydrated)return u.tag===3?u.stateNode.containerInfo:null;o=null}else u!==o&&(o=null)}}return op=o,null}function hy(o){switch(o){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(C0()){case no:return 2;case bt:return 8;case _o:case b0:return 32;case I0:return 268435456;default:return 32}default:return 32}}var yy=!1,Io=null,Oa=null,ll=null,sc=new Map,ka=new Map,Do=[],lp="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function Fm(o,u){switch(o){case"focusin":case"focusout":Io=null;break;case"dragenter":case"dragleave":Oa=null;break;case"mouseover":case"mouseout":ll=null;break;case"pointerover":case"pointerout":sc.delete(u.pointerId);break;case"gotpointercapture":case"lostpointercapture":ka.delete(u.pointerId)}}function Nu(o,u,d,g,C,I){return o===null||o.nativeEvent!==I?(o={blockedOn:u,domEventName:d,eventSystemFlags:g,nativeEvent:I,targetContainers:[C]},u!==null&&(u=Y(u),u!==null&&qm(u)),o):(o.eventSystemFlags|=g,u=o.targetContainers,C!==null&&u.indexOf(C)===-1&&u.push(C),o)}function ap(o,u,d,g,C){switch(u){case"focusin":return Io=Nu(Io,o,u,d,g,C),!0;case"dragenter":return Oa=Nu(Oa,o,u,d,g,C),!0;case"mouseover":return ll=Nu(ll,o,u,d,g,C),!0;case"pointerover":var I=C.pointerId;return sc.set(I,Nu(sc.get(I)||null,o,u,d,g,C)),!0;case"gotpointercapture":return I=C.pointerId,ka.set(I,Nu(ka.get(I)||null,o,u,d,g,C)),!0}return!1}function gy(o){var u=ia(o.target);if(u!==null){var d=P(u);if(d!==null){if(u=d.tag,u===13){if(u=O(d),u!==null){o.blockedOn=u,O0(o.priority,function(){if(d.tag===13){var g=Hn();g=Qf(g);var C=fo(d,g);C!==null&&Pn(C,d,g),cy(d,g)}});return}}else if(u===3&&d.stateNode.current.memoizedState.isDehydrated){o.blockedOn=d.tag===3?d.stateNode.containerInfo:null;return}}}o.blockedOn=null}function Pu(o){if(o.blockedOn!==null)return!1;for(var u=o.targetContainers;0<u.length;){var d=dy(o.nativeEvent);if(d===null){d=o.nativeEvent;var g=new d.constructor(d.type,d);Ai=g,d.target.dispatchEvent(g),Ai=null}else return u=Y(d),u!==null&&qm(u),o.blockedOn=d,!1;u.shift()}return!0}function Mf(o,u,d){Pu(o)&&d.delete(u)}function up(){yy=!1,Io!==null&&Pu(Io)&&(Io=null),Oa!==null&&Pu(Oa)&&(Oa=null),ll!==null&&Pu(ll)&&(ll=null),sc.forEach(Mf),ka.forEach(Mf)}function Lu(o,u){o.blockedOn===u&&(o.blockedOn=null,yy||(yy=!0,E.unstable_scheduleCallback(E.unstable_NormalPriority,up)))}var Bi=null;function my(o){Bi!==o&&(Bi=o,E.unstable_scheduleCallback(E.unstable_NormalPriority,function(){Bi===o&&(Bi=null);for(var u=0;u<o.length;u+=3){var d=o[u],g=o[u+1],C=o[u+2];if(typeof g!="function"){if(py(g||d)===null)continue;break}var I=Y(d);I!==null&&(o.splice(u,3),u-=3,kh(I,{pending:!0,data:C,method:d.method,action:g},g,C))}}))}function cc(o){function u(ie){return Lu(ie,o)}Io!==null&&Lu(Io,o),Oa!==null&&Lu(Oa,o),ll!==null&&Lu(ll,o),sc.forEach(u),ka.forEach(u);for(var d=0;d<Do.length;d++){var g=Do[d];g.blockedOn===o&&(g.blockedOn=null)}for(;0<Do.length&&(d=Do[0],d.blockedOn===null);)gy(d),d.blockedOn===null&&Do.shift();if(d=(o.ownerDocument||o).$$reactFormReplay,d!=null)for(g=0;g<d.length;g+=3){var C=d[g],I=d[g+1],B=C[ki]||null;if(typeof I=="function")B||my(d);else if(B){var H=null;if(I&&I.hasAttribute("formAction")){if(C=I,B=I[ki]||null)H=B.formAction;else if(py(C)!==null)continue}else H=B.action;typeof H=="function"?d[g+1]=H:(d.splice(g,3),g-=3),my(d)}}}function sp(o){this._internalRoot=o}Nf.prototype.render=sp.prototype.render=function(o){var u=this._internalRoot;if(u===null)throw Error(S(409));var d=u.current,g=Hn();ip(d,g,o,u,null,null)},Nf.prototype.unmount=sp.prototype.unmount=function(){var o=this._internalRoot;if(o!==null){this._internalRoot=null;var u=o.containerInfo;ip(o.current,2,null,o,null,null),gf(),u[Ba]=null}};function Nf(o){this._internalRoot=o}Nf.prototype.unstable_scheduleHydration=function(o){if(o){var u=xg();o={blockedOn:null,target:o,priority:u};for(var d=0;d<Do.length&&u!==0&&u<Do[d].priority;d++);Do.splice(d,0,o),d===0&&gy(o)}};var vy=A.version;if(vy!=="19.1.0")throw Error(S(527,vy,"19.1.0"));je.findDOMNode=function(o){var u=o._reactInternals;if(u===void 0)throw typeof o.render=="function"?Error(S(188)):(o=Object.keys(o).join(","),Error(S(268,o)));return o=s(u),o=o!==null?a(o):null,o=o===null?null:o.stateNode,o};var zm={bundleType:0,version:"19.1.0",rendererPackageName:"react-dom",currentDispatcherRef:Te,reconcilerVersion:"19.1.0"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var fc=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!fc.isDisabled&&fc.supportsFiber)try{ea=fc.inject(zm),vt=fc}catch{}}return ng.createRoot=function(o,u){if(!w(o))throw Error(S(299));var d=!1,g="",C=St,I=Ph,B=Hl,H=null;return u!=null&&(u.unstable_strictMode===!0&&(d=!0),u.identifierPrefix!==void 0&&(g=u.identifierPrefix),u.onUncaughtError!==void 0&&(C=u.onUncaughtError),u.onCaughtError!==void 0&&(I=u.onCaughtError),u.onRecoverableError!==void 0&&(B=u.onRecoverableError),u.unstable_transitionCallbacks!==void 0&&(H=u.unstable_transitionCallbacks)),u=Vm(o,1,!1,null,null,d,g,C,I,B,H,null),o[Ba]=u.current,xf(o),new sp(u)},ng.hydrateRoot=function(o,u,d){if(!w(o))throw Error(S(299));var g=!1,C="",I=St,B=Ph,H=Hl,ie=null,me=null;return d!=null&&(d.unstable_strictMode===!0&&(g=!0),d.identifierPrefix!==void 0&&(C=d.identifierPrefix),d.onUncaughtError!==void 0&&(I=d.onUncaughtError),d.onCaughtError!==void 0&&(B=d.onCaughtError),d.onRecoverableError!==void 0&&(H=d.onRecoverableError),d.unstable_transitionCallbacks!==void 0&&(ie=d.unstable_transitionCallbacks),d.formState!==void 0&&(me=d.formState)),u=Vm(o,1,!0,u,d??null,g,C,I,B,H,ie,me),u.context=Hm(null),d=u.current,g=Hn(),g=Qf(g),C=Xo(g),C.callback=null,Cr(d,C,g),d=g,u.current.lanes=d,io(u,d),il(u),o[Ba]=u.current,xf(o),new Nf(u)},ng.version="19.1.0",ng}var WA;function Wk(){if(WA)return a2.exports;WA=1;function E(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(E)}catch(A){console.error(A)}}return E(),a2.exports=Yk(),a2.exports}var Qk=Wk(),ig={},QA;function Jk(){if(QA)return ig;QA=1,Object.defineProperty(ig,"__esModule",{value:!0}),ig.parse=O,ig.serialize=a;const E=/^[\u0021-\u003A\u003C\u003E-\u007E]+$/,A=/^[\u0021-\u003A\u003C-\u007E]*$/,k=/^([.]?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)([.][a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*$/i,S=/^[\u0020-\u003A\u003D-\u007E]*$/,w=Object.prototype.toString,P=(()=>{const M=function(){};return M.prototype=Object.create(null),M})();function O(M,F){const b=new P,J=M.length;if(J<2)return b;const $=(F==null?void 0:F.decode)||p;let ce=0;do{const Re=M.indexOf("=",ce);if(Re===-1)break;const ee=M.indexOf(";",ce),be=ee===-1?J:ee;if(Re>be){ce=M.lastIndexOf(";",Re-1)+1;continue}const Oe=h(M,ce,Re),ot=s(M,Re,Oe),et=M.slice(Oe,ot);if(b[et]===void 0){let pt=h(M,Re+1,be),Nt=s(M,be,pt);const _=$(M.slice(pt,Nt));b[et]=_}ce=be+1}while(ce<J);return b}function h(M,F,b){do{const J=M.charCodeAt(F);if(J!==32&&J!==9)return F}while(++F<b);return b}function s(M,F,b){for(;F>b;){const J=M.charCodeAt(--F);if(J!==32&&J!==9)return F+1}return b}function a(M,F,b){const J=(b==null?void 0:b.encode)||encodeURIComponent;if(!E.test(M))throw new TypeError(`argument name is invalid: ${M}`);const $=J(F);if(!A.test($))throw new TypeError(`argument val is invalid: ${F}`);let ce=M+"="+$;if(!b)return ce;if(b.maxAge!==void 0){if(!Number.isInteger(b.maxAge))throw new TypeError(`option maxAge is invalid: ${b.maxAge}`);ce+="; Max-Age="+b.maxAge}if(b.domain){if(!k.test(b.domain))throw new TypeError(`option domain is invalid: ${b.domain}`);ce+="; Domain="+b.domain}if(b.path){if(!S.test(b.path))throw new TypeError(`option path is invalid: ${b.path}`);ce+="; Path="+b.path}if(b.expires){if(!v(b.expires)||!Number.isFinite(b.expires.valueOf()))throw new TypeError(`option expires is invalid: ${b.expires}`);ce+="; Expires="+b.expires.toUTCString()}if(b.httpOnly&&(ce+="; HttpOnly"),b.secure&&(ce+="; Secure"),b.partitioned&&(ce+="; Partitioned"),b.priority)switch(typeof b.priority=="string"?b.priority.toLowerCase():void 0){case"low":ce+="; Priority=Low";break;case"medium":ce+="; Priority=Medium";break;case"high":ce+="; Priority=High";break;default:throw new TypeError(`option priority is invalid: ${b.priority}`)}if(b.sameSite)switch(typeof b.sameSite=="string"?b.sameSite.toLowerCase():b.sameSite){case!0:case"strict":ce+="; SameSite=Strict";break;case"lax":ce+="; SameSite=Lax";break;case"none":ce+="; SameSite=None";break;default:throw new TypeError(`option sameSite is invalid: ${b.sameSite}`)}return ce}function p(M){if(M.indexOf("%")===-1)return M;try{return decodeURIComponent(M)}catch{return M}}function v(M){return w.call(M)==="[object Date]"}return ig}Jk();var JA="popstate";function Zk(E={}){function A(S,w){let{pathname:P,search:O,hash:h}=S.location;return C2("",{pathname:P,search:O,hash:h},w.state&&w.state.usr||null,w.state&&w.state.key||"default")}function k(S,w){return typeof w=="string"?w:fg(w)}return eR(A,k,null,E)}function ii(E,A){if(E===!1||E===null||typeof E>"u")throw new Error(A)}function _a(E,A){if(!E){typeof console<"u"&&console.warn(A);try{throw new Error(A)}catch{}}}function $k(){return Math.random().toString(36).substring(2,10)}function ZA(E,A){return{usr:E.state,key:E.key,idx:A}}function C2(E,A,k=null,S){return{pathname:typeof E=="string"?E:E.pathname,search:"",hash:"",...typeof A=="string"?Pp(A):A,state:k,key:A&&A.key||S||$k()}}function fg({pathname:E="/",search:A="",hash:k=""}){return A&&A!=="?"&&(E+=A.charAt(0)==="?"?A:"?"+A),k&&k!=="#"&&(E+=k.charAt(0)==="#"?k:"#"+k),E}function Pp(E){let A={};if(E){let k=E.indexOf("#");k>=0&&(A.hash=E.substring(k),E=E.substring(0,k));let S=E.indexOf("?");S>=0&&(A.search=E.substring(S),E=E.substring(0,S)),E&&(A.pathname=E)}return A}function eR(E,A,k,S={}){let{window:w=document.defaultView,v5Compat:P=!1}=S,O=w.history,h="POP",s=null,a=p();a==null&&(a=0,O.replaceState({...O.state,idx:a},""));function p(){return(O.state||{idx:null}).idx}function v(){h="POP";let $=p(),ce=$==null?null:$-a;a=$,s&&s({action:h,location:J.location,delta:ce})}function M($,ce){h="PUSH";let Re=C2(J.location,$,ce);a=p()+1;let ee=ZA(Re,a),be=J.createHref(Re);try{O.pushState(ee,"",be)}catch(Oe){if(Oe instanceof DOMException&&Oe.name==="DataCloneError")throw Oe;w.location.assign(be)}P&&s&&s({action:h,location:J.location,delta:1})}function F($,ce){h="REPLACE";let Re=C2(J.location,$,ce);a=p();let ee=ZA(Re,a),be=J.createHref(Re);O.replaceState(ee,"",be),P&&s&&s({action:h,location:J.location,delta:0})}function b($){let ce=w.location.origin!=="null"?w.location.origin:w.location.href,Re=typeof $=="string"?$:fg($);return Re=Re.replace(/ $/,"%20"),ii(ce,`No window.location.(origin|href) available to create URL for href: ${Re}`),new URL(Re,ce)}let J={get action(){return h},get location(){return E(w,O)},listen($){if(s)throw new Error("A history only accepts one active listener");return w.addEventListener(JA,v),s=$,()=>{w.removeEventListener(JA,v),s=null}},createHref($){return A(w,$)},createURL:b,encodeLocation($){let ce=b($);return{pathname:ce.pathname,search:ce.search,hash:ce.hash}},push:M,replace:F,go($){return O.go($)}};return J}function IC(E,A,k="/"){return tR(E,A,k,!1)}function tR(E,A,k,S){let w=typeof A=="string"?Pp(A):A,P=Xu(w.pathname||"/",k);if(P==null)return null;let O=DC(E);nR(O);let h=null;for(let s=0;h==null&&s<O.length;++s){let a=pR(P);h=fR(O[s],a,S)}return h}function DC(E,A=[],k=[],S=""){let w=(P,O,h)=>{let s={relativePath:h===void 0?P.path||"":h,caseSensitive:P.caseSensitive===!0,childrenIndex:O,route:P};s.relativePath.startsWith("/")&&(ii(s.relativePath.startsWith(S),`Absolute route path "${s.relativePath}" nested under path "${S}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),s.relativePath=s.relativePath.slice(S.length));let a=Gu([S,s.relativePath]),p=k.concat(s);P.children&&P.children.length>0&&(ii(P.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${a}".`),DC(P.children,A,p,a)),!(P.path==null&&!P.index)&&A.push({path:a,score:sR(a,P.index),routesMeta:p})};return E.forEach((P,O)=>{var h;if(P.path===""||!((h=P.path)!=null&&h.includes("?")))w(P,O);else for(let s of OC(P.path))w(P,O,s)}),A}function OC(E){let A=E.split("/");if(A.length===0)return[];let[k,...S]=A,w=k.endsWith("?"),P=k.replace(/\?$/,"");if(S.length===0)return w?[P,""]:[P];let O=OC(S.join("/")),h=[];return h.push(...O.map(s=>s===""?P:[P,s].join("/"))),w&&h.push(...O),h.map(s=>E.startsWith("/")&&s===""?"/":s)}function nR(E){E.sort((A,k)=>A.score!==k.score?k.score-A.score:cR(A.routesMeta.map(S=>S.childrenIndex),k.routesMeta.map(S=>S.childrenIndex)))}var iR=/^:[\w-]+$/,rR=3,oR=2,lR=1,aR=10,uR=-2,$A=E=>E==="*";function sR(E,A){let k=E.split("/"),S=k.length;return k.some($A)&&(S+=uR),A&&(S+=oR),k.filter(w=>!$A(w)).reduce((w,P)=>w+(iR.test(P)?rR:P===""?lR:aR),S)}function cR(E,A){return E.length===A.length&&E.slice(0,-1).every((S,w)=>S===A[w])?E[E.length-1]-A[A.length-1]:0}function fR(E,A,k=!1){let{routesMeta:S}=E,w={},P="/",O=[];for(let h=0;h<S.length;++h){let s=S[h],a=h===S.length-1,p=P==="/"?A:A.slice(P.length)||"/",v=f0({path:s.relativePath,caseSensitive:s.caseSensitive,end:a},p),M=s.route;if(!v&&a&&k&&!S[S.length-1].route.index&&(v=f0({path:s.relativePath,caseSensitive:s.caseSensitive,end:!1},p)),!v)return null;Object.assign(w,v.params),O.push({params:w,pathname:Gu([P,v.pathname]),pathnameBase:mR(Gu([P,v.pathnameBase])),route:M}),v.pathnameBase!=="/"&&(P=Gu([P,v.pathnameBase]))}return O}function f0(E,A){typeof E=="string"&&(E={path:E,caseSensitive:!1,end:!0});let[k,S]=dR(E.path,E.caseSensitive,E.end),w=A.match(k);if(!w)return null;let P=w[0],O=P.replace(/(.)\/+$/,"$1"),h=w.slice(1);return{params:S.reduce((a,{paramName:p,isOptional:v},M)=>{if(p==="*"){let b=h[M]||"";O=P.slice(0,P.length-b.length).replace(/(.)\/+$/,"$1")}const F=h[M];return v&&!F?a[p]=void 0:a[p]=(F||"").replace(/%2F/g,"/"),a},{}),pathname:P,pathnameBase:O,pattern:E}}function dR(E,A=!1,k=!0){_a(E==="*"||!E.endsWith("*")||E.endsWith("/*"),`Route path "${E}" will be treated as if it were "${E.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${E.replace(/\*$/,"/*")}".`);let S=[],w="^"+E.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(O,h,s)=>(S.push({paramName:h,isOptional:s!=null}),s?"/?([^\\/]+)?":"/([^\\/]+)"));return E.endsWith("*")?(S.push({paramName:"*"}),w+=E==="*"||E==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):k?w+="\\/*$":E!==""&&E!=="/"&&(w+="(?:(?=\\/|$))"),[new RegExp(w,A?void 0:"i"),S]}function pR(E){try{return E.split("/").map(A=>decodeURIComponent(A).replace(/\//g,"%2F")).join("/")}catch(A){return _a(!1,`The URL path "${E}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${A}).`),E}}function Xu(E,A){if(A==="/")return E;if(!E.toLowerCase().startsWith(A.toLowerCase()))return null;let k=A.endsWith("/")?A.length-1:A.length,S=E.charAt(k);return S&&S!=="/"?null:E.slice(k)||"/"}function hR(E,A="/"){let{pathname:k,search:S="",hash:w=""}=typeof E=="string"?Pp(E):E;return{pathname:k?k.startsWith("/")?k:yR(k,A):A,search:vR(S),hash:SR(w)}}function yR(E,A){let k=A.replace(/\/+$/,"").split("/");return E.split("/").forEach(w=>{w===".."?k.length>1&&k.pop():w!=="."&&k.push(w)}),k.length>1?k.join("/"):"/"}function f2(E,A,k,S){return`Cannot include a '${E}' character in a manually specified \`to.${A}\` field [${JSON.stringify(S)}]. Please separate it out to the \`to.${k}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function gR(E){return E.filter((A,k)=>k===0||A.route.path&&A.route.path.length>0)}function kC(E){let A=gR(E);return A.map((k,S)=>S===A.length-1?k.pathname:k.pathnameBase)}function RC(E,A,k,S=!1){let w;typeof E=="string"?w=Pp(E):(w={...E},ii(!w.pathname||!w.pathname.includes("?"),f2("?","pathname","search",w)),ii(!w.pathname||!w.pathname.includes("#"),f2("#","pathname","hash",w)),ii(!w.search||!w.search.includes("#"),f2("#","search","hash",w)));let P=E===""||w.pathname==="",O=P?"/":w.pathname,h;if(O==null)h=k;else{let v=A.length-1;if(!S&&O.startsWith("..")){let M=O.split("/");for(;M[0]==="..";)M.shift(),v-=1;w.pathname=M.join("/")}h=v>=0?A[v]:"/"}let s=hR(w,h),a=O&&O!=="/"&&O.endsWith("/"),p=(P||O===".")&&k.endsWith("/");return!s.pathname.endsWith("/")&&(a||p)&&(s.pathname+="/"),s}var Gu=E=>E.join("/").replace(/\/\/+/g,"/"),mR=E=>E.replace(/\/+$/,"").replace(/^\/*/,"/"),vR=E=>!E||E==="?"?"":E.startsWith("?")?E:"?"+E,SR=E=>!E||E==="#"?"":E.startsWith("#")?E:"#"+E;function wR(E){return E!=null&&typeof E.status=="number"&&typeof E.statusText=="string"&&typeof E.internal=="boolean"&&"data"in E}var MC=["POST","PUT","PATCH","DELETE"];new Set(MC);var TR=["GET",...MC];new Set(TR);var Lp=ve.createContext(null);Lp.displayName="DataRouter";var g0=ve.createContext(null);g0.displayName="DataRouterState";var NC=ve.createContext({isTransitioning:!1});NC.displayName="ViewTransition";var xR=ve.createContext(new Map);xR.displayName="Fetchers";var ER=ve.createContext(null);ER.displayName="Await";var Ua=ve.createContext(null);Ua.displayName="Navigation";var hg=ve.createContext(null);hg.displayName="Location";var Yu=ve.createContext({outlet:null,matches:[],isDataRoute:!1});Yu.displayName="Route";var j2=ve.createContext(null);j2.displayName="RouteError";function AR(E,{relative:A}={}){ii(yg(),"useHref() may be used only in the context of a <Router> component.");let{basename:k,navigator:S}=ve.useContext(Ua),{hash:w,pathname:P,search:O}=gg(E,{relative:A}),h=P;return k!=="/"&&(h=P==="/"?k:Gu([k,P])),S.createHref({pathname:h,search:O,hash:w})}function yg(){return ve.useContext(hg)!=null}function Gf(){return ii(yg(),"useLocation() may be used only in the context of a <Router> component."),ve.useContext(hg).location}var PC="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function LC(E){ve.useContext(Ua).static||ve.useLayoutEffect(E)}function CR(){let{isDataRoute:E}=ve.useContext(Yu);return E?jR():bR()}function bR(){ii(yg(),"useNavigate() may be used only in the context of a <Router> component.");let E=ve.useContext(Lp),{basename:A,navigator:k}=ve.useContext(Ua),{matches:S}=ve.useContext(Yu),{pathname:w}=Gf(),P=JSON.stringify(kC(S)),O=ve.useRef(!1);return LC(()=>{O.current=!0}),ve.useCallback((s,a={})=>{if(_a(O.current,PC),!O.current)return;if(typeof s=="number"){k.go(s);return}let p=RC(s,JSON.parse(P),w,a.relative==="path");E==null&&A!=="/"&&(p.pathname=p.pathname==="/"?A:Gu([A,p.pathname])),(a.replace?k.replace:k.push)(p,a.state,a)},[A,k,P,w,E])}ve.createContext(null);function gg(E,{relative:A}={}){let{matches:k}=ve.useContext(Yu),{pathname:S}=Gf(),w=JSON.stringify(kC(k));return ve.useMemo(()=>RC(E,JSON.parse(w),S,A==="path"),[E,w,S,A])}function IR(E,A){return _C(E,A)}function _C(E,A,k,S){var Re;ii(yg(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:w,static:P}=ve.useContext(Ua),{matches:O}=ve.useContext(Yu),h=O[O.length-1],s=h?h.params:{},a=h?h.pathname:"/",p=h?h.pathnameBase:"/",v=h&&h.route;{let ee=v&&v.path||"";UC(a,!v||ee.endsWith("*")||ee.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${a}" (under <Route path="${ee}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
Please change the parent <Route path="${ee}"> to <Route path="${ee==="/"?"*":`${ee}/*`}">.`)}let M=Gf(),F;if(A){let ee=typeof A=="string"?Pp(A):A;ii(p==="/"||((Re=ee.pathname)==null?void 0:Re.startsWith(p)),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${p}" but pathname "${ee.pathname}" was given in the \`location\` prop.`),F=ee}else F=M;let b=F.pathname||"/",J=b;if(p!=="/"){let ee=p.replace(/^\//,"").split("/");J="/"+b.replace(/^\//,"").split("/").slice(ee.length).join("/")}let $=!P&&k&&k.matches&&k.matches.length>0?k.matches:IC(E,{pathname:J});_a(v||$!=null,`No routes matched location "${F.pathname}${F.search}${F.hash}" `),_a($==null||$[$.length-1].route.element!==void 0||$[$.length-1].route.Component!==void 0||$[$.length-1].route.lazy!==void 0,`Matched leaf route at location "${F.pathname}${F.search}${F.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let ce=MR($&&$.map(ee=>Object.assign({},ee,{params:Object.assign({},s,ee.params),pathname:Gu([p,w.encodeLocation?w.encodeLocation(ee.pathname).pathname:ee.pathname]),pathnameBase:ee.pathnameBase==="/"?p:Gu([p,w.encodeLocation?w.encodeLocation(ee.pathnameBase).pathname:ee.pathnameBase])})),O,k,S);return A&&ce?ve.createElement(hg.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...F},navigationType:"POP"}},ce):ce}function DR(){let E=UR(),A=wR(E)?`${E.status} ${E.statusText}`:E instanceof Error?E.message:JSON.stringify(E),k=E instanceof Error?E.stack:null,S="rgba(200,200,200, 0.5)",w={padding:"0.5rem",backgroundColor:S},P={padding:"2px 4px",backgroundColor:S},O=null;return console.error("Error handled by React Router default ErrorBoundary:",E),O=ve.createElement(ve.Fragment,null,ve.createElement("p",null,"💿 Hey developer 👋"),ve.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",ve.createElement("code",{style:P},"ErrorBoundary")," or"," ",ve.createElement("code",{style:P},"errorElement")," prop on your route.")),ve.createElement(ve.Fragment,null,ve.createElement("h2",null,"Unexpected Application Error!"),ve.createElement("h3",{style:{fontStyle:"italic"}},A),k?ve.createElement("pre",{style:w},k):null,O)}var OR=ve.createElement(DR,null),kR=class extends ve.Component{constructor(E){super(E),this.state={location:E.location,revalidation:E.revalidation,error:E.error}}static getDerivedStateFromError(E){return{error:E}}static getDerivedStateFromProps(E,A){return A.location!==E.location||A.revalidation!=="idle"&&E.revalidation==="idle"?{error:E.error,location:E.location,revalidation:E.revalidation}:{error:E.error!==void 0?E.error:A.error,location:A.location,revalidation:E.revalidation||A.revalidation}}componentDidCatch(E,A){console.error("React Router caught the following error during render",E,A)}render(){return this.state.error!==void 0?ve.createElement(Yu.Provider,{value:this.props.routeContext},ve.createElement(j2.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function RR({routeContext:E,match:A,children:k}){let S=ve.useContext(Lp);return S&&S.static&&S.staticContext&&(A.route.errorElement||A.route.ErrorBoundary)&&(S.staticContext._deepestRenderedBoundaryId=A.route.id),ve.createElement(Yu.Provider,{value:E},k)}function MR(E,A=[],k=null,S=null){if(E==null){if(!k)return null;if(k.errors)E=k.matches;else if(A.length===0&&!k.initialized&&k.matches.length>0)E=k.matches;else return null}let w=E,P=k==null?void 0:k.errors;if(P!=null){let s=w.findIndex(a=>a.route.id&&(P==null?void 0:P[a.route.id])!==void 0);ii(s>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(P).join(",")}`),w=w.slice(0,Math.min(w.length,s+1))}let O=!1,h=-1;if(k)for(let s=0;s<w.length;s++){let a=w[s];if((a.route.HydrateFallback||a.route.hydrateFallbackElement)&&(h=s),a.route.id){let{loaderData:p,errors:v}=k,M=a.route.loader&&!p.hasOwnProperty(a.route.id)&&(!v||v[a.route.id]===void 0);if(a.route.lazy||M){O=!0,h>=0?w=w.slice(0,h+1):w=[w[0]];break}}}return w.reduceRight((s,a,p)=>{let v,M=!1,F=null,b=null;k&&(v=P&&a.route.id?P[a.route.id]:void 0,F=a.route.errorElement||OR,O&&(h<0&&p===0?(UC("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),M=!0,b=null):h===p&&(M=!0,b=a.route.hydrateFallbackElement||null)));let J=A.concat(w.slice(0,p+1)),$=()=>{let ce;return v?ce=F:M?ce=b:a.route.Component?ce=ve.createElement(a.route.Component,null):a.route.element?ce=a.route.element:ce=s,ve.createElement(RR,{match:a,routeContext:{outlet:s,matches:J,isDataRoute:k!=null},children:ce})};return k&&(a.route.ErrorBoundary||a.route.errorElement||p===0)?ve.createElement(kR,{location:k.location,revalidation:k.revalidation,component:F,error:v,children:$(),routeContext:{outlet:null,matches:J,isDataRoute:!0}}):$()},null)}function B2(E){return`${E} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function NR(E){let A=ve.useContext(Lp);return ii(A,B2(E)),A}function PR(E){let A=ve.useContext(g0);return ii(A,B2(E)),A}function LR(E){let A=ve.useContext(Yu);return ii(A,B2(E)),A}function V2(E){let A=LR(E),k=A.matches[A.matches.length-1];return ii(k.route.id,`${E} can only be used on routes that contain a unique "id"`),k.route.id}function _R(){return V2("useRouteId")}function UR(){var S;let E=ve.useContext(j2),A=PR("useRouteError"),k=V2("useRouteError");return E!==void 0?E:(S=A.errors)==null?void 0:S[k]}function jR(){let{router:E}=NR("useNavigate"),A=V2("useNavigate"),k=ve.useRef(!1);return LC(()=>{k.current=!0}),ve.useCallback(async(w,P={})=>{_a(k.current,PC),k.current&&(typeof w=="number"?E.navigate(w):await E.navigate(w,{fromRouteId:A,...P}))},[E,A])}var eC={};function UC(E,A,k){!A&&!eC[E]&&(eC[E]=!0,_a(!1,k))}ve.memo(BR);function BR({routes:E,future:A,state:k}){return _C(E,void 0,k,A)}function kp(E){ii(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function VR({basename:E="/",children:A=null,location:k,navigationType:S="POP",navigator:w,static:P=!1}){ii(!yg(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let O=E.replace(/^\/*/,"/"),h=ve.useMemo(()=>({basename:O,navigator:w,static:P,future:{}}),[O,w,P]);typeof k=="string"&&(k=Pp(k));let{pathname:s="/",search:a="",hash:p="",state:v=null,key:M="default"}=k,F=ve.useMemo(()=>{let b=Xu(s,O);return b==null?null:{location:{pathname:b,search:a,hash:p,state:v,key:M},navigationType:S}},[O,s,a,p,v,M,S]);return _a(F!=null,`<Router basename="${O}"> is not able to match the URL "${s}${a}${p}" because it does not start with the basename, so the <Router> won't render anything.`),F==null?null:ve.createElement(Ua.Provider,{value:h},ve.createElement(hg.Provider,{children:A,value:F}))}function HR({children:E,location:A}){return IR(b2(E),A)}function b2(E,A=[]){let k=[];return ve.Children.forEach(E,(S,w)=>{if(!ve.isValidElement(S))return;let P=[...A,w];if(S.type===ve.Fragment){k.push.apply(k,b2(S.props.children,P));return}ii(S.type===kp,`[${typeof S.type=="string"?S.type:S.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),ii(!S.props.index||!S.props.children,"An index route cannot have child routes.");let O={id:S.props.id||P.join("-"),caseSensitive:S.props.caseSensitive,element:S.props.element,Component:S.props.Component,index:S.props.index,path:S.props.path,loader:S.props.loader,action:S.props.action,hydrateFallbackElement:S.props.hydrateFallbackElement,HydrateFallback:S.props.HydrateFallback,errorElement:S.props.errorElement,ErrorBoundary:S.props.ErrorBoundary,hasErrorBoundary:S.props.hasErrorBoundary===!0||S.props.ErrorBoundary!=null||S.props.errorElement!=null,shouldRevalidate:S.props.shouldRevalidate,handle:S.props.handle,lazy:S.props.lazy};S.props.children&&(O.children=b2(S.props.children,P)),k.push(O)}),k}var l0="get",a0="application/x-www-form-urlencoded";function m0(E){return E!=null&&typeof E.tagName=="string"}function KR(E){return m0(E)&&E.tagName.toLowerCase()==="button"}function qR(E){return m0(E)&&E.tagName.toLowerCase()==="form"}function FR(E){return m0(E)&&E.tagName.toLowerCase()==="input"}function zR(E){return!!(E.metaKey||E.altKey||E.ctrlKey||E.shiftKey)}function GR(E,A){return E.button===0&&(!A||A==="_self")&&!zR(E)}var r0=null;function XR(){if(r0===null)try{new FormData(document.createElement("form"),0),r0=!1}catch{r0=!0}return r0}var YR=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function d2(E){return E!=null&&!YR.has(E)?(_a(!1,`"${E}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${a0}"`),null):E}function WR(E,A){let k,S,w,P,O;if(qR(E)){let h=E.getAttribute("action");S=h?Xu(h,A):null,k=E.getAttribute("method")||l0,w=d2(E.getAttribute("enctype"))||a0,P=new FormData(E)}else if(KR(E)||FR(E)&&(E.type==="submit"||E.type==="image")){let h=E.form;if(h==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let s=E.getAttribute("formaction")||h.getAttribute("action");if(S=s?Xu(s,A):null,k=E.getAttribute("formmethod")||h.getAttribute("method")||l0,w=d2(E.getAttribute("formenctype"))||d2(h.getAttribute("enctype"))||a0,P=new FormData(h,E),!XR()){let{name:a,type:p,value:v}=E;if(p==="image"){let M=a?`${a}.`:"";P.append(`${M}x`,"0"),P.append(`${M}y`,"0")}else a&&P.append(a,v)}}else{if(m0(E))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');k=l0,S=null,w=a0,O=E}return P&&w==="text/plain"&&(O=P,P=void 0),{action:S,method:k.toLowerCase(),encType:w,formData:P,body:O}}function H2(E,A){if(E===!1||E===null||typeof E>"u")throw new Error(A)}async function QR(E,A){if(E.id in A)return A[E.id];try{let k=await import(E.module);return A[E.id]=k,k}catch(k){return console.error(`Error loading route module \`${E.module}\`, reloading page...`),console.error(k),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function JR(E){return E==null?!1:E.href==null?E.rel==="preload"&&typeof E.imageSrcSet=="string"&&typeof E.imageSizes=="string":typeof E.rel=="string"&&typeof E.href=="string"}async function ZR(E,A,k){let S=await Promise.all(E.map(async w=>{let P=A.routes[w.route.id];if(P){let O=await QR(P,k);return O.links?O.links():[]}return[]}));return n4(S.flat(1).filter(JR).filter(w=>w.rel==="stylesheet"||w.rel==="preload").map(w=>w.rel==="stylesheet"?{...w,rel:"prefetch",as:"style"}:{...w,rel:"prefetch"}))}function tC(E,A,k,S,w,P){let O=(s,a)=>k[a]?s.route.id!==k[a].route.id:!0,h=(s,a)=>{var p;return k[a].pathname!==s.pathname||((p=k[a].route.path)==null?void 0:p.endsWith("*"))&&k[a].params["*"]!==s.params["*"]};return P==="assets"?A.filter((s,a)=>O(s,a)||h(s,a)):P==="data"?A.filter((s,a)=>{var v;let p=S.routes[s.route.id];if(!p||!p.hasLoader)return!1;if(O(s,a)||h(s,a))return!0;if(s.route.shouldRevalidate){let M=s.route.shouldRevalidate({currentUrl:new URL(w.pathname+w.search+w.hash,window.origin),currentParams:((v=k[0])==null?void 0:v.params)||{},nextUrl:new URL(E,window.origin),nextParams:s.params,defaultShouldRevalidate:!0});if(typeof M=="boolean")return M}return!0}):[]}function $R(E,A,{includeHydrateFallback:k}={}){return e4(E.map(S=>{let w=A.routes[S.route.id];if(!w)return[];let P=[w.module];return w.clientActionModule&&(P=P.concat(w.clientActionModule)),w.clientLoaderModule&&(P=P.concat(w.clientLoaderModule)),k&&w.hydrateFallbackModule&&(P=P.concat(w.hydrateFallbackModule)),w.imports&&(P=P.concat(w.imports)),P}).flat(1))}function e4(E){return[...new Set(E)]}function t4(E){let A={},k=Object.keys(E).sort();for(let S of k)A[S]=E[S];return A}function n4(E,A){let k=new Set;return new Set(A),E.reduce((S,w)=>{let P=JSON.stringify(t4(w));return k.has(P)||(k.add(P),S.push({key:P,link:w})),S},[])}var i4=new Set([100,101,204,205]);function r4(E,A){let k=typeof E=="string"?new URL(E,typeof window>"u"?"server://singlefetch/":window.location.origin):E;return k.pathname==="/"?k.pathname="_root.data":A&&Xu(k.pathname,A)==="/"?k.pathname=`${A.replace(/\/$/,"")}/_root.data`:k.pathname=`${k.pathname.replace(/\/$/,"")}.data`,k}function jC(){let E=ve.useContext(Lp);return H2(E,"You must render this element inside a <DataRouterContext.Provider> element"),E}function o4(){let E=ve.useContext(g0);return H2(E,"You must render this element inside a <DataRouterStateContext.Provider> element"),E}var K2=ve.createContext(void 0);K2.displayName="FrameworkContext";function BC(){let E=ve.useContext(K2);return H2(E,"You must render this element inside a <HydratedRouter> element"),E}function l4(E,A){let k=ve.useContext(K2),[S,w]=ve.useState(!1),[P,O]=ve.useState(!1),{onFocus:h,onBlur:s,onMouseEnter:a,onMouseLeave:p,onTouchStart:v}=A,M=ve.useRef(null);ve.useEffect(()=>{if(E==="render"&&O(!0),E==="viewport"){let J=ce=>{ce.forEach(Re=>{O(Re.isIntersecting)})},$=new IntersectionObserver(J,{threshold:.5});return M.current&&$.observe(M.current),()=>{$.disconnect()}}},[E]),ve.useEffect(()=>{if(S){let J=setTimeout(()=>{O(!0)},100);return()=>{clearTimeout(J)}}},[S]);let F=()=>{w(!0)},b=()=>{w(!1),O(!1)};return k?E!=="intent"?[P,M,{}]:[P,M,{onFocus:rg(h,F),onBlur:rg(s,b),onMouseEnter:rg(a,F),onMouseLeave:rg(p,b),onTouchStart:rg(v,F)}]:[!1,M,{}]}function rg(E,A){return k=>{E&&E(k),k.defaultPrevented||A(k)}}function a4({page:E,...A}){let{router:k}=jC(),S=ve.useMemo(()=>IC(k.routes,E,k.basename),[k.routes,E,k.basename]);return S?ve.createElement(s4,{page:E,matches:S,...A}):null}function u4(E){let{manifest:A,routeModules:k}=BC(),[S,w]=ve.useState([]);return ve.useEffect(()=>{let P=!1;return ZR(E,A,k).then(O=>{P||w(O)}),()=>{P=!0}},[E,A,k]),S}function s4({page:E,matches:A,...k}){let S=Gf(),{manifest:w,routeModules:P}=BC(),{basename:O}=jC(),{loaderData:h,matches:s}=o4(),a=ve.useMemo(()=>tC(E,A,s,w,S,"data"),[E,A,s,w,S]),p=ve.useMemo(()=>tC(E,A,s,w,S,"assets"),[E,A,s,w,S]),v=ve.useMemo(()=>{if(E===S.pathname+S.search+S.hash)return[];let b=new Set,J=!1;if(A.forEach(ce=>{var ee;let Re=w.routes[ce.route.id];!Re||!Re.hasLoader||(!a.some(be=>be.route.id===ce.route.id)&&ce.route.id in h&&((ee=P[ce.route.id])!=null&&ee.shouldRevalidate)||Re.hasClientLoader?J=!0:b.add(ce.route.id))}),b.size===0)return[];let $=r4(E,O);return J&&b.size>0&&$.searchParams.set("_routes",A.filter(ce=>b.has(ce.route.id)).map(ce=>ce.route.id).join(",")),[$.pathname+$.search]},[O,h,S,w,a,A,E,P]),M=ve.useMemo(()=>$R(p,w),[p,w]),F=u4(p);return ve.createElement(ve.Fragment,null,v.map(b=>ve.createElement("link",{key:b,rel:"prefetch",as:"fetch",href:b,...k})),M.map(b=>ve.createElement("link",{key:b,rel:"modulepreload",href:b,...k})),F.map(({key:b,link:J})=>ve.createElement("link",{key:b,...J})))}function c4(...E){return A=>{E.forEach(k=>{typeof k=="function"?k(A):k!=null&&(k.current=A)})}}var VC=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{VC&&(window.__reactRouterVersion="7.5.2")}catch{}function f4({basename:E,children:A,window:k}){let S=ve.useRef();S.current==null&&(S.current=Zk({window:k,v5Compat:!0}));let w=S.current,[P,O]=ve.useState({action:w.action,location:w.location}),h=ve.useCallback(s=>{ve.startTransition(()=>O(s))},[O]);return ve.useLayoutEffect(()=>w.listen(h),[w,h]),ve.createElement(VR,{basename:E,children:A,location:P.location,navigationType:P.action,navigator:w})}var HC=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,KC=ve.forwardRef(function({onClick:A,discover:k="render",prefetch:S="none",relative:w,reloadDocument:P,replace:O,state:h,target:s,to:a,preventScrollReset:p,viewTransition:v,...M},F){let{basename:b}=ve.useContext(Ua),J=typeof a=="string"&&HC.test(a),$,ce=!1;if(typeof a=="string"&&J&&($=a,VC))try{let Nt=new URL(window.location.href),_=a.startsWith("//")?new URL(Nt.protocol+a):new URL(a),se=Xu(_.pathname,b);_.origin===Nt.origin&&se!=null?a=se+_.search+_.hash:ce=!0}catch{_a(!1,`<Link to="${a}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}let Re=AR(a,{relative:w}),[ee,be,Oe]=l4(S,M),ot=h4(a,{replace:O,state:h,target:s,preventScrollReset:p,relative:w,viewTransition:v});function et(Nt){A&&A(Nt),Nt.defaultPrevented||ot(Nt)}let pt=ve.createElement("a",{...M,...Oe,href:$||Re,onClick:ce||P?A:et,ref:c4(F,be),target:s,"data-discover":!J&&k==="render"?"true":void 0});return ee&&!J?ve.createElement(ve.Fragment,null,pt,ve.createElement(a4,{page:Re})):pt});KC.displayName="Link";var Jl=ve.forwardRef(function({"aria-current":A="page",caseSensitive:k=!1,className:S="",end:w=!1,style:P,to:O,viewTransition:h,children:s,...a},p){let v=gg(O,{relative:a.relative}),M=Gf(),F=ve.useContext(g0),{navigator:b,basename:J}=ve.useContext(Ua),$=F!=null&&S4(v)&&h===!0,ce=b.encodeLocation?b.encodeLocation(v).pathname:v.pathname,Re=M.pathname,ee=F&&F.navigation&&F.navigation.location?F.navigation.location.pathname:null;k||(Re=Re.toLowerCase(),ee=ee?ee.toLowerCase():null,ce=ce.toLowerCase()),ee&&J&&(ee=Xu(ee,J)||ee);const be=ce!=="/"&&ce.endsWith("/")?ce.length-1:ce.length;let Oe=Re===ce||!w&&Re.startsWith(ce)&&Re.charAt(be)==="/",ot=ee!=null&&(ee===ce||!w&&ee.startsWith(ce)&&ee.charAt(ce.length)==="/"),et={isActive:Oe,isPending:ot,isTransitioning:$},pt=Oe?A:void 0,Nt;typeof S=="function"?Nt=S(et):Nt=[S,Oe?"active":null,ot?"pending":null,$?"transitioning":null].filter(Boolean).join(" ");let _=typeof P=="function"?P(et):P;return ve.createElement(KC,{...a,"aria-current":pt,className:Nt,ref:p,style:_,to:O,viewTransition:h},typeof s=="function"?s(et):s)});Jl.displayName="NavLink";var d4=ve.forwardRef(({discover:E="render",fetcherKey:A,navigate:k,reloadDocument:S,replace:w,state:P,method:O=l0,action:h,onSubmit:s,relative:a,preventScrollReset:p,viewTransition:v,...M},F)=>{let b=m4(),J=v4(h,{relative:a}),$=O.toLowerCase()==="get"?"get":"post",ce=typeof h=="string"&&HC.test(h),Re=ee=>{if(s&&s(ee),ee.defaultPrevented)return;ee.preventDefault();let be=ee.nativeEvent.submitter,Oe=(be==null?void 0:be.getAttribute("formmethod"))||O;b(be||ee.currentTarget,{fetcherKey:A,method:Oe,navigate:k,replace:w,state:P,relative:a,preventScrollReset:p,viewTransition:v})};return ve.createElement("form",{ref:F,method:$,action:J,onSubmit:S?s:Re,...M,"data-discover":!ce&&E==="render"?"true":void 0})});d4.displayName="Form";function p4(E){return`${E} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function qC(E){let A=ve.useContext(Lp);return ii(A,p4(E)),A}function h4(E,{target:A,replace:k,state:S,preventScrollReset:w,relative:P,viewTransition:O}={}){let h=CR(),s=Gf(),a=gg(E,{relative:P});return ve.useCallback(p=>{if(GR(p,A)){p.preventDefault();let v=k!==void 0?k:fg(s)===fg(a);h(E,{replace:v,state:S,preventScrollReset:w,relative:P,viewTransition:O})}},[s,h,a,k,S,A,E,w,P,O])}var y4=0,g4=()=>`__${String(++y4)}__`;function m4(){let{router:E}=qC("useSubmit"),{basename:A}=ve.useContext(Ua),k=_R();return ve.useCallback(async(S,w={})=>{let{action:P,method:O,encType:h,formData:s,body:a}=WR(S,A);if(w.navigate===!1){let p=w.fetcherKey||g4();await E.fetch(p,k,w.action||P,{preventScrollReset:w.preventScrollReset,formData:s,body:a,formMethod:w.method||O,formEncType:w.encType||h,flushSync:w.flushSync})}else await E.navigate(w.action||P,{preventScrollReset:w.preventScrollReset,formData:s,body:a,formMethod:w.method||O,formEncType:w.encType||h,replace:w.replace,state:w.state,fromRouteId:k,flushSync:w.flushSync,viewTransition:w.viewTransition})},[E,A,k])}function v4(E,{relative:A}={}){let{basename:k}=ve.useContext(Ua),S=ve.useContext(Yu);ii(S,"useFormAction must be used inside a RouteContext");let[w]=S.matches.slice(-1),P={...gg(E||".",{relative:A})},O=Gf();if(E==null){P.search=O.search;let h=new URLSearchParams(P.search),s=h.getAll("index");if(s.some(p=>p==="")){h.delete("index"),s.filter(v=>v).forEach(v=>h.append("index",v));let p=h.toString();P.search=p?`?${p}`:""}}return(!E||E===".")&&w.route.index&&(P.search=P.search?P.search.replace(/^\?/,"?index&"):"?index"),k!=="/"&&(P.pathname=P.pathname==="/"?k:Gu([k,P.pathname])),fg(P)}function S4(E,A={}){let k=ve.useContext(NC);ii(k!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:S}=qC("useViewTransitionState"),w=gg(E,{relative:A.relative});if(!k.isTransitioning)return!1;let P=Xu(k.currentLocation.pathname,S)||k.currentLocation.pathname,O=Xu(k.nextLocation.pathname,S)||k.nextLocation.pathname;return f0(w.pathname,O)!=null||f0(w.pathname,P)!=null}new TextEncoder;[...i4];/*!
* protobuf.js v7.4.0 (c) 2016, daniel wirtz
* compiled thu, 22 aug 2024 20:30:39 utc
* licensed under the bsd-3-clause license
* see: https://github.com/dcodeio/protobuf.js for details
*/(function(E){(function(A,k,S){var w=function P(O){var h=k[O];return h||A[O][0].call(h=k[O]={exports:{}},P,h,h.exports),h.exports}(S[0]);w.util.global.protobuf=w,typeof define=="function"&&define.amd&&define(["long"],function(P){return P&&P.isLong&&(w.util.Long=P,w.configure()),w}),typeof sg=="object"&&sg&&sg.exports&&(sg.exports=w)})({1:[function(A,k,S){k.exports=function(w,P){for(var O=Array(arguments.length-1),h=0,s=2,a=!0;s<arguments.length;)O[h++]=arguments[s++];return new Promise(function(p,v){O[h]=function(M){if(a)if(a=!1,M)v(M);else{for(var F=Array(arguments.length-1),b=0;b<F.length;)F[b++]=arguments[b];p.apply(null,F)}};try{w.apply(P||null,O)}catch(M){a&&(a=!1,v(M))}})}},{}],2:[function(A,k,S){S.length=function(s){var a=s.length;if(!a)return 0;for(var p=0;1<--a%4&&(s[0|a]||"")=="=";)++p;return Math.ceil(3*s.length)/4-p};for(var w=Array(64),P=Array(123),O=0;O<64;)P[w[O]=O<26?O+65:O<52?O+71:O<62?O-4:O-59|43]=O++;S.encode=function(s,a,p){for(var v,M=null,F=[],b=0,J=0;a<p;){var $=s[a++];switch(J){case 0:F[b++]=w[$>>2],v=(3&$)<<4,J=1;break;case 1:F[b++]=w[v|$>>4],v=(15&$)<<2,J=2;break;case 2:F[b++]=w[v|$>>6],F[b++]=w[63&$],J=0}8191<b&&((M=M||[]).push(String.fromCharCode.apply(String,F)),b=0)}return J&&(F[b++]=w[v],F[b++]=61,J===1&&(F[b++]=61)),M?(b&&M.push(String.fromCharCode.apply(String,F.slice(0,b))),M.join("")):String.fromCharCode.apply(String,F.slice(0,b))};var h="invalid encoding";S.decode=function(s,a,p){for(var v,M=p,F=0,b=0;b<s.length;){var J=s.charCodeAt(b++);if(J==61&&1<F)break;if((J=P[J])===E)throw Error(h);switch(F){case 0:v=J,F=1;break;case 1:a[p++]=v<<2|(48&J)>>4,v=J,F=2;break;case 2:a[p++]=(15&v)<<4|(60&J)>>2,v=J,F=3;break;case 3:a[p++]=(3&v)<<6|J,F=0}}if(F===1)throw Error(h);return p-M},S.test=function(s){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(s)}},{}],3:[function(A,k,S){function w(){this.t={}}(k.exports=w).prototype.on=function(P,O,h){return(this.t[P]||(this.t[P]=[])).push({fn:O,ctx:h||this}),this},w.prototype.off=function(P,O){if(P===E)this.t={};else if(O===E)this.t[P]=[];else for(var h=this.t[P],s=0;s<h.length;)h[s].fn===O?h.splice(s,1):++s;return this},w.prototype.emit=function(P){var O=this.t[P];if(O){for(var h=[],s=1;s<arguments.length;)h.push(arguments[s++]);for(s=0;s<O.length;)O[s].fn.apply(O[s++].ctx,h)}return this}},{}],4:[function(A,k,S){function w(a){function p(se,pe,rt,Ue){var Me=pe<0?1:0;se((pe=Me?-pe:pe)===0?0<1/pe?0:2147483648:isNaN(pe)?2143289344:34028234663852886e22<pe?(Me<<31|2139095040)>>>0:pe<11754943508222875e-54?(Me<<31|Math.round(pe/1401298464324817e-60))>>>0:(Me<<31|127+(se=Math.floor(Math.log(pe)/Math.LN2))<<23|8388607&Math.round(pe*Math.pow(2,-se)*8388608))>>>0,rt,Ue)}function v(se,pe,rt){return se=se(pe,rt),pe=2*(se>>31)+1,rt=se>>>23&255,se&=8388607,rt==255?se?NaN:1/0*pe:rt==0?1401298464324817e-60*pe*se:pe*Math.pow(2,rt-150)*(8388608+se)}function M(se,pe,rt){$[0]=se,pe[rt]=ce[0],pe[rt+1]=ce[1],pe[rt+2]=ce[2],pe[rt+3]=ce[3]}function F(se,pe,rt){$[0]=se,pe[rt]=ce[3],pe[rt+1]=ce[2],pe[rt+2]=ce[1],pe[rt+3]=ce[0]}function b(se,pe){return ce[0]=se[pe],ce[1]=se[pe+1],ce[2]=se[pe+2],ce[3]=se[pe+3],$[0]}function J(se,pe){return ce[3]=se[pe],ce[2]=se[pe+1],ce[1]=se[pe+2],ce[0]=se[pe+3],$[0]}var $,ce,Re,ee,be;function Oe(se,pe,rt,Ue,Me,Te){var je,ht=Ue<0?1:0;(Ue=ht?-Ue:Ue)===0?(se(0,Me,Te+pe),se(0<1/Ue?0:2147483648,Me,Te+rt)):isNaN(Ue)?(se(0,Me,Te+pe),se(2146959360,Me,Te+rt)):17976931348623157e292<Ue?(se(0,Me,Te+pe),se((ht<<31|2146435072)>>>0,Me,Te+rt)):Ue<22250738585072014e-324?(se((je=Ue/5e-324)>>>0,Me,Te+pe),se((ht<<31|je/4294967296)>>>0,Me,Te+rt)):(se(4503599627370496*(je=Ue*Math.pow(2,-(Ue=(Ue=Math.floor(Math.log(Ue)/Math.LN2))===1024?1023:Ue)))>>>0,Me,Te+pe),se((ht<<31|Ue+1023<<20|1048576*je&1048575)>>>0,Me,Te+rt))}function ot(se,pe,rt,Ue,Me){return pe=se(Ue,Me+pe),se=se(Ue,Me+rt),Ue=2*(se>>31)+1,Me=se>>>20&2047,rt=4294967296*(1048575&se)+pe,Me==2047?rt?NaN:1/0*Ue:Me==0?5e-324*Ue*rt:Ue*Math.pow(2,Me-1075)*(rt+4503599627370496)}function et(se,pe,rt){Re[0]=se,pe[rt]=ee[0],pe[rt+1]=ee[1],pe[rt+2]=ee[2],pe[rt+3]=ee[3],pe[rt+4]=ee[4],pe[rt+5]=ee[5],pe[rt+6]=ee[6],pe[rt+7]=ee[7]}function pt(se,pe,rt){Re[0]=se,pe[rt]=ee[7],pe[rt+1]=ee[6],pe[rt+2]=ee[5],pe[rt+3]=ee[4],pe[rt+4]=ee[3],pe[rt+5]=ee[2],pe[rt+6]=ee[1],pe[rt+7]=ee[0]}function Nt(se,pe){return ee[0]=se[pe],ee[1]=se[pe+1],ee[2]=se[pe+2],ee[3]=se[pe+3],ee[4]=se[pe+4],ee[5]=se[pe+5],ee[6]=se[pe+6],ee[7]=se[pe+7],Re[0]}function _(se,pe){return ee[7]=se[pe],ee[6]=se[pe+1],ee[5]=se[pe+2],ee[4]=se[pe+3],ee[3]=se[pe+4],ee[2]=se[pe+5],ee[1]=se[pe+6],ee[0]=se[pe+7],Re[0]}return typeof Float32Array<"u"?($=new Float32Array([-0]),ce=new Uint8Array($.buffer),be=ce[3]===128,a.writeFloatLE=be?M:F,a.writeFloatBE=be?F:M,a.readFloatLE=be?b:J,a.readFloatBE=be?J:b):(a.writeFloatLE=p.bind(null,P),a.writeFloatBE=p.bind(null,O),a.readFloatLE=v.bind(null,h),a.readFloatBE=v.bind(null,s)),typeof Float64Array<"u"?(Re=new Float64Array([-0]),ee=new Uint8Array(Re.buffer),be=ee[7]===128,a.writeDoubleLE=be?et:pt,a.writeDoubleBE=be?pt:et,a.readDoubleLE=be?Nt:_,a.readDoubleBE=be?_:Nt):(a.writeDoubleLE=Oe.bind(null,P,0,4),a.writeDoubleBE=Oe.bind(null,O,4,0),a.readDoubleLE=ot.bind(null,h,0,4),a.readDoubleBE=ot.bind(null,s,4,0)),a}function P(a,p,v){p[v]=255&a,p[v+1]=a>>>8&255,p[v+2]=a>>>16&255,p[v+3]=a>>>24}function O(a,p,v){p[v]=a>>>24,p[v+1]=a>>>16&255,p[v+2]=a>>>8&255,p[v+3]=255&a}function h(a,p){return(a[p]|a[p+1]<<8|a[p+2]<<16|a[p+3]<<24)>>>0}function s(a,p){return(a[p]<<24|a[p+1]<<16|a[p+2]<<8|a[p+3])>>>0}k.exports=w(w)},{}],5:[function(A,k,S){function w(P){try{var O=void 0;if(O&&(O.length||Object.keys(O).length))return O}catch{}return null}k.exports=w},{}],6:[function(A,k,S){k.exports=function(w,P,O){var h=O||8192,s=h>>>1,a=null,p=h;return function(v){return v<1||s<v?w(v):(h<p+v&&(a=w(h),p=0),v=P.call(a,p,p+=v),7&p&&(p=1+(7|p)),v)}}},{}],7:[function(A,k,S){S.length=function(w){for(var P,O=0,h=0;h<w.length;++h)(P=w.charCodeAt(h))<128?O+=1:P<2048?O+=2:(64512&P)==55296&&(64512&w.charCodeAt(h+1))==56320?(++h,O+=4):O+=3;return O},S.read=function(w,P,O){if(O-P<1)return"";for(var h,s=null,a=[],p=0;P<O;)(h=w[P++])<128?a[p++]=h:191<h&&h<224?a[p++]=(31&h)<<6|63&w[P++]:239<h&&h<365?(h=((7&h)<<18|(63&w[P++])<<12|(63&w[P++])<<6|63&w[P++])-65536,a[p++]=55296+(h>>10),a[p++]=56320+(1023&h)):a[p++]=(15&h)<<12|(63&w[P++])<<6|63&w[P++],8191<p&&((s=s||[]).push(String.fromCharCode.apply(String,a)),p=0);return s?(p&&s.push(String.fromCharCode.apply(String,a.slice(0,p))),s.join("")):String.fromCharCode.apply(String,a.slice(0,p))},S.write=function(w,P,O){for(var h,s,a=O,p=0;p<w.length;++p)(h=w.charCodeAt(p))<128?P[O++]=h:(h<2048?P[O++]=h>>6|192:((64512&h)==55296&&(64512&(s=w.charCodeAt(p+1)))==56320?(++p,P[O++]=(h=65536+((1023&h)<<10)+(1023&s))>>18|240,P[O++]=h>>12&63|128):P[O++]=h>>12|224,P[O++]=h>>6&63|128),P[O++]=63&h|128);return O-a}},{}],8:[function(A,k,S){var w=S;function P(){w.util.n(),w.Writer.n(w.BufferWriter),w.Reader.n(w.BufferReader)}w.build="minimal",w.Writer=A(16),w.BufferWriter=A(17),w.Reader=A(9),w.BufferReader=A(10),w.util=A(15),w.rpc=A(12),w.roots=A(11),w.configure=P,P()},{10:10,11:11,12:12,15:15,16:16,17:17,9:9}],9:[function(A,k,S){k.exports=a;var w,P=A(15),O=P.LongBits,h=P.utf8;function s($,ce){return RangeError("index out of range: "+$.pos+" + "+(ce||1)+" > "+$.len)}function a($){this.buf=$,this.pos=0,this.len=$.length}function p(){return P.Buffer?function($){return(a.create=function(ce){return P.Buffer.isBuffer(ce)?new w(ce):M(ce)})($)}:M}var v,M=typeof Uint8Array<"u"?function($){if($ instanceof Uint8Array||Array.isArray($))return new a($);throw Error("illegal buffer")}:function($){if(Array.isArray($))return new a($);throw Error("illegal buffer")};function F(){var $=new O(0,0),ce=0;if(!(4<this.len-this.pos)){for(;ce<3;++ce){if(this.pos>=this.len)throw s(this);if($.lo=($.lo|(127&this.buf[this.pos])<<7*ce)>>>0,this.buf[this.pos++]<128)return $}return $.lo=($.lo|(127&this.buf[this.pos++])<<7*ce)>>>0,$}for(;ce<4;++ce)if($.lo=($.lo|(127&this.buf[this.pos])<<7*ce)>>>0,this.buf[this.pos++]<128)return $;if($.lo=($.lo|(127&this.buf[this.pos])<<28)>>>0,$.hi=($.hi|(127&this.buf[this.pos])>>4)>>>0,this.buf[this.pos++]<128)return $;if(ce=0,4<this.len-this.pos){for(;ce<5;++ce)if($.hi=($.hi|(127&this.buf[this.pos])<<7*ce+3)>>>0,this.buf[this.pos++]<128)return $}else for(;ce<5;++ce){if(this.pos>=this.len)throw s(this);if($.hi=($.hi|(127&this.buf[this.pos])<<7*ce+3)>>>0,this.buf[this.pos++]<128)return $}throw Error("invalid varint encoding")}function b($,ce){return($[ce-4]|$[ce-3]<<8|$[ce-2]<<16|$[ce-1]<<24)>>>0}function J(){if(this.pos+8>this.len)throw s(this,8);return new O(b(this.buf,this.pos+=4),b(this.buf,this.pos+=4))}a.create=p(),a.prototype.i=P.Array.prototype.subarray||P.Array.prototype.slice,a.prototype.uint32=(v=4294967295,function(){if(v=(127&this.buf[this.pos])>>>0,this.buf[this.pos++]<128||(v=(v|(127&this.buf[this.pos])<<7)>>>0,this.buf[this.pos++]<128||(v=(v|(127&this.buf[this.pos])<<14)>>>0,this.buf[this.pos++]<128||(v=(v|(127&this.buf[this.pos])<<21)>>>0,this.buf[this.pos++]<128||(v=(v|(15&this.buf[this.pos])<<28)>>>0,this.buf[this.pos++]<128||!((this.pos+=5)>this.len))))))return v;throw this.pos=this.len,s(this,10)}),a.prototype.int32=function(){return 0|this.uint32()},a.prototype.sint32=function(){var $=this.uint32();return $>>>1^-(1&$)|0},a.prototype.bool=function(){return this.uint32()!==0},a.prototype.fixed32=function(){if(this.pos+4>this.len)throw s(this,4);return b(this.buf,this.pos+=4)},a.prototype.sfixed32=function(){if(this.pos+4>this.len)throw s(this,4);return 0|b(this.buf,this.pos+=4)},a.prototype.float=function(){if(this.pos+4>this.len)throw s(this,4);var $=P.float.readFloatLE(this.buf,this.pos);return this.pos+=4,$},a.prototype.double=function(){if(this.pos+8>this.len)throw s(this,4);var $=P.float.readDoubleLE(this.buf,this.pos);return this.pos+=8,$},a.prototype.bytes=function(){var $=this.uint32(),ce=this.pos,Re=this.pos+$;if(Re>this.len)throw s(this,$);return this.pos+=$,Array.isArray(this.buf)?this.buf.slice(ce,Re):ce===Re?($=P.Buffer)?$.alloc(0):new this.buf.constructor(0):this.i.call(this.buf,ce,Re)},a.prototype.string=function(){var $=this.bytes();return h.read($,0,$.length)},a.prototype.skip=function($){if(typeof $=="number"){if(this.pos+$>this.len)throw s(this,$);this.pos+=$}else do if(this.pos>=this.len)throw s(this);while(128&this.buf[this.pos++]);return this},a.prototype.skipType=function($){switch($){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:for(;($=7&this.uint32())!=4;)this.skipType($);break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+$+" at offset "+this.pos)}return this},a.n=function($){w=$,a.create=p(),w.n();var ce=P.Long?"toLong":"toNumber";P.merge(a.prototype,{int64:function(){return F.call(this)[ce](!1)},uint64:function(){return F.call(this)[ce](!0)},sint64:function(){return F.call(this).zzDecode()[ce](!1)},fixed64:function(){return J.call(this)[ce](!0)},sfixed64:function(){return J.call(this)[ce](!1)}})}},{15:15}],10:[function(A,k,S){k.exports=O;var w=A(9),P=((O.prototype=Object.create(w.prototype)).constructor=O,A(15));function O(h){w.call(this,h)}O.n=function(){P.Buffer&&(O.prototype.i=P.Buffer.prototype.slice)},O.prototype.string=function(){var h=this.uint32();return this.buf.utf8Slice?this.buf.utf8Slice(this.pos,this.pos=Math.min(this.pos+h,this.len)):this.buf.toString("utf-8",this.pos,this.pos=Math.min(this.pos+h,this.len))},O.n()},{15:15,9:9}],11:[function(A,k,S){k.exports={}},{}],12:[function(A,k,S){S.Service=A(13)},{13:13}],13:[function(A,k,S){k.exports=P;var w=A(15);function P(O,h,s){if(typeof O!="function")throw TypeError("rpcImpl must be a function");w.EventEmitter.call(this),this.rpcImpl=O,this.requestDelimited=!!h,this.responseDelimited=!!s}((P.prototype=Object.create(w.EventEmitter.prototype)).constructor=P).prototype.rpcCall=function O(h,s,a,p,v){if(!p)throw TypeError("request must be specified");var M=this;if(!v)return w.asPromise(O,M,h,s,a,p);if(!M.rpcImpl)return setTimeout(function(){v(Error("already ended"))},0),E;try{return M.rpcImpl(h,s[M.requestDelimited?"encodeDelimited":"encode"](p).finish(),function(F,b){if(F)return M.emit("error",F,h),v(F);if(b===null)return M.end(!0),E;if(!(b instanceof a))try{b=a[M.responseDelimited?"decodeDelimited":"decode"](b)}catch(J){return M.emit("error",J,h),v(J)}return M.emit("data",b,h),v(null,b)})}catch(F){return M.emit("error",F,h),setTimeout(function(){v(F)},0),E}},P.prototype.end=function(O){return this.rpcImpl&&(O||this.rpcImpl(null,null,null),this.rpcImpl=null,this.emit("end").off()),this}},{15:15}],14:[function(A,k,S){k.exports=P;var w=A(15);function P(s,a){this.lo=s>>>0,this.hi=a>>>0}var O=P.zero=new P(0,0),h=(O.toNumber=function(){return 0},O.zzEncode=O.zzDecode=function(){return this},O.length=function(){return 1},P.zeroHash="\0\0\0\0\0\0\0\0",P.fromNumber=function(s){var a,p;return s===0?O:(p=(s=(a=s<0)?-s:s)>>>0,s=(s-p)/4294967296>>>0,a&&(s=~s>>>0,p=~p>>>0,4294967295<++p&&(p=0,4294967295<++s&&(s=0))),new P(p,s))},P.from=function(s){if(typeof s=="number")return P.fromNumber(s);if(w.isString(s)){if(!w.Long)return P.fromNumber(parseInt(s,10));s=w.Long.fromString(s)}return s.low||s.high?new P(s.low>>>0,s.high>>>0):O},P.prototype.toNumber=function(s){var a;return!s&&this.hi>>>31?(s=1+~this.lo>>>0,a=~this.hi>>>0,-(s+4294967296*(a=s?a:a+1>>>0))):this.lo+4294967296*this.hi},P.prototype.toLong=function(s){return w.Long?new w.Long(0|this.lo,0|this.hi,!!s):{low:0|this.lo,high:0|this.hi,unsigned:!!s}},String.prototype.charCodeAt);P.fromHash=function(s){return s==="\0\0\0\0\0\0\0\0"?O:new P((h.call(s,0)|h.call(s,1)<<8|h.call(s,2)<<16|h.call(s,3)<<24)>>>0,(h.call(s,4)|h.call(s,5)<<8|h.call(s,6)<<16|h.call(s,7)<<24)>>>0)},P.prototype.toHash=function(){return String.fromCharCode(255&this.lo,this.lo>>>8&255,this.lo>>>16&255,this.lo>>>24,255&this.hi,this.hi>>>8&255,this.hi>>>16&255,this.hi>>>24)},P.prototype.zzEncode=function(){var s=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^s)>>>0,this.lo=(this.lo<<1^s)>>>0,this},P.prototype.zzDecode=function(){var s=-(1&this.lo);return this.lo=((this.lo>>>1|this.hi<<31)^s)>>>0,this.hi=(this.hi>>>1^s)>>>0,this},P.prototype.length=function(){var s=this.lo,a=(this.lo>>>28|this.hi<<4)>>>0,p=this.hi>>>24;return p==0?a==0?s<16384?s<128?1:2:s<2097152?3:4:a<16384?a<128?5:6:a<2097152?7:8:p<128?9:10}},{15:15}],15:[function(A,k,S){var w=S;function P(h,s,a){for(var p=Object.keys(s),v=0;v<p.length;++v)h[p[v]]!==E&&a||(h[p[v]]=s[p[v]]);return h}function O(h){function s(a,p){if(!(this instanceof s))return new s(a,p);Object.defineProperty(this,"message",{get:function(){return a}}),Error.captureStackTrace?Error.captureStackTrace(this,s):Object.defineProperty(this,"stack",{value:Error().stack||""}),p&&P(this,p)}return s.prototype=Object.create(Error.prototype,{constructor:{value:s,writable:!0,enumerable:!1,configurable:!0},name:{get:function(){return h},set:E,enumerable:!1,configurable:!0},toString:{value:function(){return this.name+": "+this.message},writable:!0,enumerable:!1,configurable:!0}}),s}w.asPromise=A(1),w.base64=A(2),w.EventEmitter=A(3),w.float=A(4),w.inquire=A(5),w.utf8=A(7),w.pool=A(6),w.LongBits=A(14),w.isNode=!!(typeof global<"u"&&global&&global.process&&global.process.versions&&global.process.versions.node),w.global=w.isNode&&global||!1||typeof self<"u"&&self||this,w.emptyArray=Object.freeze?Object.freeze([]):[],w.emptyObject=Object.freeze?Object.freeze({}):{},w.isInteger=Number.isInteger||function(h){return typeof h=="number"&&isFinite(h)&&Math.floor(h)===h},w.isString=function(h){return typeof h=="string"||h instanceof String},w.isObject=function(h){return h&&typeof h=="object"},w.isset=w.isSet=function(h,s){var a=h[s];return a!=null&&h.hasOwnProperty(s)&&(typeof a!="object"||0<(Array.isArray(a)?a:Object.keys(a)).length)},w.Buffer=function(){try{var h=w.inquire("buffer").Buffer;return h.prototype.utf8Write?h:null}catch{return null}}(),w.r=null,w.u=null,w.newBuffer=function(h){return typeof h=="number"?w.Buffer?w.u(h):new w.Array(h):w.Buffer?w.r(h):typeof Uint8Array>"u"?h:new Uint8Array(h)},w.Array=typeof Uint8Array<"u"?Uint8Array:Array,w.Long=w.global.dcodeIO&&w.global.dcodeIO.Long||w.global.Long||w.inquire("long"),w.key2Re=/^true|false|0|1$/,w.key32Re=/^-?(?:0|[1-9][0-9]*)$/,w.key64Re=/^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/,w.longToHash=function(h){return h?w.LongBits.from(h).toHash():w.LongBits.zeroHash},w.longFromHash=function(h,s){return h=w.LongBits.fromHash(h),w.Long?w.Long.fromBits(h.lo,h.hi,s):h.toNumber(!!s)},w.merge=P,w.lcFirst=function(h){return(h[0]||"").toLowerCase()+h.substring(1)},w.newError=O,w.ProtocolError=O("ProtocolError"),w.oneOfGetter=function(h){for(var s={},a=0;a<h.length;++a)s[h[a]]=1;return function(){for(var p=Object.keys(this),v=p.length-1;-1<v;--v)if(s[p[v]]===1&&this[p[v]]!==E&&this[p[v]]!==null)return p[v]}},w.oneOfSetter=function(h){return function(s){for(var a=0;a<h.length;++a)h[a]!==s&&delete this[h[a]]}},w.toJSONOptions={longs:String,enums:String,bytes:String,json:!0},w.n=function(){var h=w.Buffer;h?(w.r=h.from!==Uint8Array.from&&h.from||function(s,a){return new h(s,a)},w.u=h.allocUnsafe||function(s){return new h(s)}):w.r=w.u=null}},{1:1,14:14,2:2,3:3,4:4,5:5,6:6,7:7}],16:[function(A,k,S){k.exports=M;var w,P=A(15),O=P.LongBits,h=P.base64,s=P.utf8;function a(ee,be,Oe){this.fn=ee,this.len=be,this.next=E,this.val=Oe}function p(){}function v(ee){this.head=ee.head,this.tail=ee.tail,this.len=ee.len,this.next=ee.states}function M(){this.len=0,this.head=new a(p,0,0),this.tail=this.head,this.states=null}function F(){return P.Buffer?function(){return(M.create=function(){return new w})()}:function(){return new M}}function b(ee,be,Oe){be[Oe]=255&ee}function J(ee,be){this.len=ee,this.next=E,this.val=be}function $(ee,be,Oe){for(;ee.hi;)be[Oe++]=127&ee.lo|128,ee.lo=(ee.lo>>>7|ee.hi<<25)>>>0,ee.hi>>>=7;for(;127<ee.lo;)be[Oe++]=127&ee.lo|128,ee.lo=ee.lo>>>7;be[Oe++]=ee.lo}function ce(ee,be,Oe){be[Oe]=255&ee,be[Oe+1]=ee>>>8&255,be[Oe+2]=ee>>>16&255,be[Oe+3]=ee>>>24}M.create=F(),M.alloc=function(ee){return new P.Array(ee)},P.Array!==Array&&(M.alloc=P.pool(M.alloc,P.Array.prototype.subarray)),M.prototype.e=function(ee,be,Oe){return this.tail=this.tail.next=new a(ee,be,Oe),this.len+=be,this},(J.prototype=Object.create(a.prototype)).fn=function(ee,be,Oe){for(;127<ee;)be[Oe++]=127&ee|128,ee>>>=7;be[Oe]=ee},M.prototype.uint32=function(ee){return this.len+=(this.tail=this.tail.next=new J((ee>>>=0)<128?1:ee<16384?2:ee<2097152?3:ee<268435456?4:5,ee)).len,this},M.prototype.int32=function(ee){return ee<0?this.e($,10,O.fromNumber(ee)):this.uint32(ee)},M.prototype.sint32=function(ee){return this.uint32((ee<<1^ee>>31)>>>0)},M.prototype.int64=M.prototype.uint64=function(ee){return ee=O.from(ee),this.e($,ee.length(),ee)},M.prototype.sint64=function(ee){return ee=O.from(ee).zzEncode(),this.e($,ee.length(),ee)},M.prototype.bool=function(ee){return this.e(b,1,ee?1:0)},M.prototype.sfixed32=M.prototype.fixed32=function(ee){return this.e(ce,4,ee>>>0)},M.prototype.sfixed64=M.prototype.fixed64=function(ee){return ee=O.from(ee),this.e(ce,4,ee.lo).e(ce,4,ee.hi)},M.prototype.float=function(ee){return this.e(P.float.writeFloatLE,4,ee)},M.prototype.double=function(ee){return this.e(P.float.writeDoubleLE,8,ee)};var Re=P.Array.prototype.set?function(ee,be,Oe){be.set(ee,Oe)}:function(ee,be,Oe){for(var ot=0;ot<ee.length;++ot)be[Oe+ot]=ee[ot]};M.prototype.bytes=function(ee){var be,Oe=ee.length>>>0;return Oe?(P.isString(ee)&&(be=M.alloc(Oe=h.length(ee)),h.decode(ee,be,0),ee=be),this.uint32(Oe).e(Re,Oe,ee)):this.e(b,1,0)},M.prototype.string=function(ee){var be=s.length(ee);return be?this.uint32(be).e(s.write,be,ee):this.e(b,1,0)},M.prototype.fork=function(){return this.states=new v(this),this.head=this.tail=new a(p,0,0),this.len=0,this},M.prototype.reset=function(){return this.states?(this.head=this.states.head,this.tail=this.states.tail,this.len=this.states.len,this.states=this.states.next):(this.head=this.tail=new a(p,0,0),this.len=0),this},M.prototype.ldelim=function(){var ee=this.head,be=this.tail,Oe=this.len;return this.reset().uint32(Oe),Oe&&(this.tail.next=ee.next,this.tail=be,this.len+=Oe),this},M.prototype.finish=function(){for(var ee=this.head.next,be=this.constructor.alloc(this.len),Oe=0;ee;)ee.fn(ee.val,be,Oe),Oe+=ee.len,ee=ee.next;return be},M.n=function(ee){w=ee,M.create=F(),w.n()}},{15:15}],17:[function(A,k,S){k.exports=O;var w=A(16),P=((O.prototype=Object.create(w.prototype)).constructor=O,A(15));function O(){w.call(this)}function h(s,a,p){s.length<40?P.utf8.write(s,a,p):a.utf8Write?a.utf8Write(s,p):a.write(s,p)}O.n=function(){O.alloc=P.u,O.writeBytesBuffer=P.Buffer&&P.Buffer.prototype instanceof Uint8Array&&P.Buffer.prototype.set.name==="set"?function(s,a,p){a.set(s,p)}:function(s,a,p){if(s.copy)s.copy(a,p,0,s.length);else for(var v=0;v<s.length;)a[p++]=s[v++]}},O.prototype.bytes=function(s){var a=(s=P.isString(s)?P.r(s,"base64"):s).length>>>0;return this.uint32(a),a&&this.e(O.writeBytesBuffer,a,s),this},O.prototype.string=function(s){var a=P.Buffer.byteLength(s);return this.uint32(a),a&&this.e(h,a,s),this},O.n()},{15:15,16:16}]},{},[8])})();(function(E){var A=E.Reader,k=E.Writer,S=E.util,w=E.roots.default||(E.roots.default={});return w.license_protocol=function(){var P={};return P.LicenseType=function(){var O={},h=Object.create(O);return h[O[1]="STREAMING"]=1,h[O[2]="OFFLINE"]=2,h[O[3]="AUTOMATIC"]=3,h}(),P.PlatformVerificationStatus=function(){var O={},h=Object.create(O);return h[O[0]="PLATFORM_UNVERIFIED"]=0,h[O[1]="PLATFORM_TAMPERED"]=1,h[O[2]="PLATFORM_SOFTWARE_VERIFIED"]=2,h[O[3]="PLATFORM_HARDWARE_VERIFIED"]=3,h[O[4]="PLATFORM_NO_VERIFICATION"]=4,h[O[5]="PLATFORM_SECURE_STORAGE_SOFTWARE_VERIFIED"]=5,h}(),P.LicenseIdentification=function(){function O(h){if(h)for(var s=Object.keys(h),a=0;a<s.length;a+=1)h[s[a]]!=null&&(this[s[a]]=h[s[a]])}return O.prototype.requestId=S.newBuffer([]),O.prototype.sessionId=S.newBuffer([]),O.prototype.purchaseId=S.newBuffer([]),O.prototype.type=1,O.prototype.version=0,O.prototype.providerSessionToken=S.newBuffer([]),O.create=function(s){return new O(s)},O.encode=function(s,a){return a||(a=k.create()),s.requestId!=null&&Object.hasOwnProperty.call(s,"requestId")&&a.uint32(10).bytes(s.requestId),s.sessionId!=null&&Object.hasOwnProperty.call(s,"sessionId")&&a.uint32(18).bytes(s.sessionId),s.purchaseId!=null&&Object.hasOwnProperty.call(s,"purchaseId")&&a.uint32(26).bytes(s.purchaseId),s.type!=null&&Object.hasOwnProperty.call(s,"type")&&a.uint32(32).int32(s.type),s.version!=null&&Object.hasOwnProperty.call(s,"version")&&a.uint32(40).int32(s.version),s.providerSessionToken!=null&&Object.hasOwnProperty.call(s,"providerSessionToken")&&a.uint32(50).bytes(s.providerSessionToken),a},O.encodeDelimited=function(s,a){return this.encode(s,a).ldelim()},O.decode=function(s,a){s instanceof A||(s=A.create(s));for(var p=a===void 0?s.len:s.pos+a,v=new w.license_protocol.LicenseIdentification;s.pos<p;){var M=s.uint32();switch(M>>>3){case 1:{v.requestId=s.bytes();break}case 2:{v.sessionId=s.bytes();break}case 3:{v.purchaseId=s.bytes();break}case 4:{v.type=s.int32();break}case 5:{v.version=s.int32();break}case 6:{v.providerSessionToken=s.bytes();break}default:s.skipType(M&7);break}}return v},O.decodeDelimited=function(s){return s instanceof A||(s=new A(s)),this.decode(s,s.uint32())},O.verify=function(s){if(typeof s!="object"||s===null)return"object expected";if(s.requestId!=null&&s.hasOwnProperty("requestId")&&!(s.requestId&&typeof s.requestId.length=="number"||S.isString(s.requestId)))return"requestId: buffer expected";if(s.sessionId!=null&&s.hasOwnProperty("sessionId")&&!(s.sessionId&&typeof s.sessionId.length=="number"||S.isString(s.sessionId)))return"sessionId: buffer expected";if(s.purchaseId!=null&&s.hasOwnProperty("purchaseId")&&!(s.purchaseId&&typeof s.purchaseId.length=="number"||S.isString(s.purchaseId)))return"purchaseId: buffer expected";if(s.type!=null&&s.hasOwnProperty("type"))switch(s.type){default:return"type: enum value expected";case 1:case 2:case 3:break}return s.version!=null&&s.hasOwnProperty("version")&&!S.isInteger(s.version)?"version: integer expected":s.providerSessionToken!=null&&s.hasOwnProperty("providerSessionToken")&&!(s.providerSessionToken&&typeof s.providerSessionToken.length=="number"||S.isString(s.providerSessionToken))?"providerSessionToken: buffer expected":null},O.fromObject=function(s){if(s instanceof w.license_protocol.LicenseIdentification)return s;var a=new w.license_protocol.LicenseIdentification;switch(s.requestId!=null&&(typeof s.requestId=="string"?S.base64.decode(s.requestId,a.requestId=S.newBuffer(S.base64.length(s.requestId)),0):s.requestId.length>=0&&(a.requestId=s.requestId)),s.sessionId!=null&&(typeof s.sessionId=="string"?S.base64.decode(s.sessionId,a.sessionId=S.newBuffer(S.base64.length(s.sessionId)),0):s.sessionId.length>=0&&(a.sessionId=s.sessionId)),s.purchaseId!=null&&(typeof s.purchaseId=="string"?S.base64.decode(s.purchaseId,a.purchaseId=S.newBuffer(S.base64.length(s.purchaseId)),0):s.purchaseId.length>=0&&(a.purchaseId=s.purchaseId)),s.type){default:if(typeof s.type=="number"){a.type=s.type;break}break;case"STREAMING":case 1:a.type=1;break;case"OFFLINE":case 2:a.type=2;break;case"AUTOMATIC":case 3:a.type=3;break}return s.version!=null&&(a.version=s.version|0),s.providerSessionToken!=null&&(typeof s.providerSessionToken=="string"?S.base64.decode(s.providerSessionToken,a.providerSessionToken=S.newBuffer(S.base64.length(s.providerSessionToken)),0):s.providerSessionToken.length>=0&&(a.providerSessionToken=s.providerSessionToken)),a},O.toObject=function(s,a){a||(a={});var p={};return a.defaults&&(a.bytes===String?p.requestId="":(p.requestId=[],a.bytes!==Array&&(p.requestId=S.newBuffer(p.requestId))),a.bytes===String?p.sessionId="":(p.sessionId=[],a.bytes!==Array&&(p.sessionId=S.newBuffer(p.sessionId))),a.bytes===String?p.purchaseId="":(p.purchaseId=[],a.bytes!==Array&&(p.purchaseId=S.newBuffer(p.purchaseId))),p.type=a.enums===String?"STREAMING":1,p.version=0,a.bytes===String?p.providerSessionToken="":(p.providerSessionToken=[],a.bytes!==Array&&(p.providerSessionToken=S.newBuffer(p.providerSessionToken)))),s.requestId!=null&&s.hasOwnProperty("requestId")&&(p.requestId=a.bytes===String?S.base64.encode(s.requestId,0,s.requestId.length):a.bytes===Array?Array.prototype.slice.call(s.requestId):s.requestId),s.sessionId!=null&&s.hasOwnProperty("sessionId")&&(p.sessionId=a.bytes===String?S.base64.encode(s.sessionId,0,s.sessionId.length):a.bytes===Array?Array.prototype.slice.call(s.sessionId):s.sessionId),s.purchaseId!=null&&s.hasOwnProperty("purchaseId")&&(p.purchaseId=a.bytes===String?S.base64.encode(s.purchaseId,0,s.purchaseId.length):a.bytes===Array?Array.prototype.slice.call(s.purchaseId):s.purchaseId),s.type!=null&&s.hasOwnProperty("type")&&(p.type=a.enums===String?w.license_protocol.LicenseType[s.type]===void 0?s.type:w.license_protocol.LicenseType[s.type]:s.type),s.version!=null&&s.hasOwnProperty("version")&&(p.version=s.version),s.providerSessionToken!=null&&s.hasOwnProperty("providerSessionToken")&&(p.providerSessionToken=a.bytes===String?S.base64.encode(s.providerSessionToken,0,s.providerSessionToken.length):a.bytes===Array?Array.prototype.slice.call(s.providerSessionToken):s.providerSessionToken),p},O.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},O.getTypeUrl=function(s){return s===void 0&&(s="type.googleapis.com"),s+"/license_protocol.LicenseIdentification"},O}(),P.License=function(){function O(h){if(this.key=[],this.groupIds=[],h)for(var s=Object.keys(h),a=0;a<s.length;a+=1)h[s[a]]!=null&&(this[s[a]]=h[s[a]])}return O.prototype.id=null,O.prototype.policy=null,O.prototype.key=S.emptyArray,O.prototype.licenseStartTime=S.Long?S.Long.fromBits(0,0,!1):0,O.prototype.remoteAttestationVerified=!1,O.prototype.providerClientToken=S.newBuffer([]),O.prototype.protectionScheme=0,O.prototype.srmRequirement=S.newBuffer([]),O.prototype.srmUpdate=S.newBuffer([]),O.prototype.platformVerificationStatus=4,O.prototype.groupIds=S.emptyArray,O.create=function(s){return new O(s)},O.encode=function(s,a){if(a||(a=k.create()),s.id!=null&&Object.hasOwnProperty.call(s,"id")&&w.license_protocol.LicenseIdentification.encode(s.id,a.uint32(10).fork()).ldelim(),s.policy!=null&&Object.hasOwnProperty.call(s,"policy")&&w.license_protocol.License.Policy.encode(s.policy,a.uint32(18).fork()).ldelim(),s.key!=null&&s.key.length)for(var p=0;p<s.key.length;p+=1)w.license_protocol.License.KeyContainer.encode(s.key[p],a.uint32(26).fork()).ldelim();if(s.licenseStartTime!=null&&Object.hasOwnProperty.call(s,"licenseStartTime")&&a.uint32(32).int64(s.licenseStartTime),s.remoteAttestationVerified!=null&&Object.hasOwnProperty.call(s,"remoteAttestationVerified")&&a.uint32(40).bool(s.remoteAttestationVerified),s.providerClientToken!=null&&Object.hasOwnProperty.call(s,"providerClientToken")&&a.uint32(50).bytes(s.providerClientToken),s.protectionScheme!=null&&Object.hasOwnProperty.call(s,"protectionScheme")&&a.uint32(56).uint32(s.protectionScheme),s.srmRequirement!=null&&Object.hasOwnProperty.call(s,"srmRequirement")&&a.uint32(66).bytes(s.srmRequirement),s.srmUpdate!=null&&Object.hasOwnProperty.call(s,"srmUpdate")&&a.uint32(74).bytes(s.srmUpdate),s.platformVerificationStatus!=null&&Object.hasOwnProperty.call(s,"platformVerificationStatus")&&a.uint32(80).int32(s.platformVerificationStatus),s.groupIds!=null&&s.groupIds.length)for(var p=0;p<s.groupIds.length;p+=1)a.uint32(90).bytes(s.groupIds[p]);return a},O.encodeDelimited=function(s,a){return this.encode(s,a).ldelim()},O.decode=function(s,a){s instanceof A||(s=A.create(s));for(var p=a===void 0?s.len:s.pos+a,v=new w.license_protocol.License;s.pos<p;){var M=s.uint32();switch(M>>>3){case 1:{v.id=w.license_protocol.LicenseIdentification.decode(s,s.uint32());break}case 2:{v.policy=w.license_protocol.License.Policy.decode(s,s.uint32());break}case 3:{v.key&&v.key.length||(v.key=[]),v.key.push(w.license_protocol.License.KeyContainer.decode(s,s.uint32()));break}case 4:{v.licenseStartTime=s.int64();break}case 5:{v.remoteAttestationVerified=s.bool();break}case 6:{v.providerClientToken=s.bytes();break}case 7:{v.protectionScheme=s.uint32();break}case 8:{v.srmRequirement=s.bytes();break}case 9:{v.srmUpdate=s.bytes();break}case 10:{v.platformVerificationStatus=s.int32();break}case 11:{v.groupIds&&v.groupIds.length||(v.groupIds=[]),v.groupIds.push(s.bytes());break}default:s.skipType(M&7);break}}return v},O.decodeDelimited=function(s){return s instanceof A||(s=new A(s)),this.decode(s,s.uint32())},O.verify=function(s){if(typeof s!="object"||s===null)return"object expected";if(s.id!=null&&s.hasOwnProperty("id")){var a=w.license_protocol.LicenseIdentification.verify(s.id);if(a)return"id."+a}if(s.policy!=null&&s.hasOwnProperty("policy")){var a=w.license_protocol.License.Policy.verify(s.policy);if(a)return"policy."+a}if(s.key!=null&&s.hasOwnProperty("key")){if(!Array.isArray(s.key))return"key: array expected";for(var p=0;p<s.key.length;p+=1){var a=w.license_protocol.License.KeyContainer.verify(s.key[p]);if(a)return"key."+a}}if(s.licenseStartTime!=null&&s.hasOwnProperty("licenseStartTime")&&!S.isInteger(s.licenseStartTime)&&!(s.licenseStartTime&&S.isInteger(s.licenseStartTime.low)&&S.isInteger(s.licenseStartTime.high)))return"licenseStartTime: integer|Long expected";if(s.remoteAttestationVerified!=null&&s.hasOwnProperty("remoteAttestationVerified")&&typeof s.remoteAttestationVerified!="boolean")return"remoteAttestationVerified: boolean expected";if(s.providerClientToken!=null&&s.hasOwnProperty("providerClientToken")&&!(s.providerClientToken&&typeof s.providerClientToken.length=="number"||S.isString(s.providerClientToken)))return"providerClientToken: buffer expected";if(s.protectionScheme!=null&&s.hasOwnProperty("protectionScheme")&&!S.isInteger(s.protectionScheme))return"protectionScheme: integer expected";if(s.srmRequirement!=null&&s.hasOwnProperty("srmRequirement")&&!(s.srmRequirement&&typeof s.srmRequirement.length=="number"||S.isString(s.srmRequirement)))return"srmRequirement: buffer expected";if(s.srmUpdate!=null&&s.hasOwnProperty("srmUpdate")&&!(s.srmUpdate&&typeof s.srmUpdate.length=="number"||S.isString(s.srmUpdate)))return"srmUpdate: buffer expected";if(s.platformVerificationStatus!=null&&s.hasOwnProperty("platformVerificationStatus"))switch(s.platformVerificationStatus){default:return"platformVerificationStatus: enum value expected";case 0:case 1:case 2:case 3:case 4:case 5:break}if(s.groupIds!=null&&s.hasOwnProperty("groupIds")){if(!Array.isArray(s.groupIds))return"groupIds: array expected";for(var p=0;p<s.groupIds.length;p+=1)if(!(s.groupIds[p]&&typeof s.groupIds[p].length=="number"||S.isString(s.groupIds[p])))return"groupIds: buffer[] expected"}return null},O.fromObject=function(s){if(s instanceof w.license_protocol.License)return s;var a=new w.license_protocol.License;if(s.id!=null){if(typeof s.id!="object")throw TypeError(".license_protocol.License.id: object expected");a.id=w.license_protocol.LicenseIdentification.fromObject(s.id)}if(s.policy!=null){if(typeof s.policy!="object")throw TypeError(".license_protocol.License.policy: object expected");a.policy=w.license_protocol.License.Policy.fromObject(s.policy)}if(s.key){if(!Array.isArray(s.key))throw TypeError(".license_protocol.License.key: array expected");a.key=[];for(var p=0;p<s.key.length;p+=1){if(typeof s.key[p]!="object")throw TypeError(".license_protocol.License.key: object expected");a.key[p]=w.license_protocol.License.KeyContainer.fromObject(s.key[p])}}switch(s.licenseStartTime!=null&&(S.Long?(a.licenseStartTime=S.Long.fromValue(s.licenseStartTime)).unsigned=!1:typeof s.licenseStartTime=="string"?a.licenseStartTime=parseInt(s.licenseStartTime,10):typeof s.licenseStartTime=="number"?a.licenseStartTime=s.licenseStartTime:typeof s.licenseStartTime=="object"&&(a.licenseStartTime=new S.LongBits(s.licenseStartTime.low>>>0,s.licenseStartTime.high>>>0).toNumber())),s.remoteAttestationVerified!=null&&(a.remoteAttestationVerified=!!s.remoteAttestationVerified),s.providerClientToken!=null&&(typeof s.providerClientToken=="string"?S.base64.decode(s.providerClientToken,a.providerClientToken=S.newBuffer(S.base64.length(s.providerClientToken)),0):s.providerClientToken.length>=0&&(a.providerClientToken=s.providerClientToken)),s.protectionScheme!=null&&(a.protectionScheme=s.protectionScheme>>>0),s.srmRequirement!=null&&(typeof s.srmRequirement=="string"?S.base64.decode(s.srmRequirement,a.srmRequirement=S.newBuffer(S.base64.length(s.srmRequirement)),0):s.srmRequirement.length>=0&&(a.srmRequirement=s.srmRequirement)),s.srmUpdate!=null&&(typeof s.srmUpdate=="string"?S.base64.decode(s.srmUpdate,a.srmUpdate=S.newBuffer(S.base64.length(s.srmUpdate)),0):s.srmUpdate.length>=0&&(a.srmUpdate=s.srmUpdate)),s.platformVerificationStatus){case"PLATFORM_UNVERIFIED":case 0:a.platformVerificationStatus=0;break;case"PLATFORM_TAMPERED":case 1:a.platformVerificationStatus=1;break;case"PLATFORM_SOFTWARE_VERIFIED":case 2:a.platformVerificationStatus=2;break;case"PLATFORM_HARDWARE_VERIFIED":case 3:a.platformVerificationStatus=3;break;default:if(typeof s.platformVerificationStatus=="number"){a.platformVerificationStatus=s.platformVerificationStatus;break}break;case"PLATFORM_NO_VERIFICATION":case 4:a.platformVerificationStatus=4;break;case"PLATFORM_SECURE_STORAGE_SOFTWARE_VERIFIED":case 5:a.platformVerificationStatus=5;break}if(s.groupIds){if(!Array.isArray(s.groupIds))throw TypeError(".license_protocol.License.groupIds: array expected");a.groupIds=[];for(var p=0;p<s.groupIds.length;p+=1)typeof s.groupIds[p]=="string"?S.base64.decode(s.groupIds[p],a.groupIds[p]=S.newBuffer(S.base64.length(s.groupIds[p])),0):s.groupIds[p].length>=0&&(a.groupIds[p]=s.groupIds[p])}return a},O.toObject=function(s,a){a||(a={});var p={};if((a.arrays||a.defaults)&&(p.key=[],p.groupIds=[]),a.defaults){if(p.id=null,p.policy=null,S.Long){var v=new S.Long(0,0,!1);p.licenseStartTime=a.longs===String?v.toString():a.longs===Number?v.toNumber():v}else p.licenseStartTime=a.longs===String?"0":0;p.remoteAttestationVerified=!1,a.bytes===String?p.providerClientToken="":(p.providerClientToken=[],a.bytes!==Array&&(p.providerClientToken=S.newBuffer(p.providerClientToken))),p.protectionScheme=0,a.bytes===String?p.srmRequirement="":(p.srmRequirement=[],a.bytes!==Array&&(p.srmRequirement=S.newBuffer(p.srmRequirement))),a.bytes===String?p.srmUpdate="":(p.srmUpdate=[],a.bytes!==Array&&(p.srmUpdate=S.newBuffer(p.srmUpdate))),p.platformVerificationStatus=a.enums===String?"PLATFORM_NO_VERIFICATION":4}if(s.id!=null&&s.hasOwnProperty("id")&&(p.id=w.license_protocol.LicenseIdentification.toObject(s.id,a)),s.policy!=null&&s.hasOwnProperty("policy")&&(p.policy=w.license_protocol.License.Policy.toObject(s.policy,a)),s.key&&s.key.length){p.key=[];for(var M=0;M<s.key.length;M+=1)p.key[M]=w.license_protocol.License.KeyContainer.toObject(s.key[M],a)}if(s.licenseStartTime!=null&&s.hasOwnProperty("licenseStartTime")&&(typeof s.licenseStartTime=="number"?p.licenseStartTime=a.longs===String?String(s.licenseStartTime):s.licenseStartTime:p.licenseStartTime=a.longs===String?S.Long.prototype.toString.call(s.licenseStartTime):a.longs===Number?new S.LongBits(s.licenseStartTime.low>>>0,s.licenseStartTime.high>>>0).toNumber():s.licenseStartTime),s.remoteAttestationVerified!=null&&s.hasOwnProperty("remoteAttestationVerified")&&(p.remoteAttestationVerified=s.remoteAttestationVerified),s.providerClientToken!=null&&s.hasOwnProperty("providerClientToken")&&(p.providerClientToken=a.bytes===String?S.base64.encode(s.providerClientToken,0,s.providerClientToken.length):a.bytes===Array?Array.prototype.slice.call(s.providerClientToken):s.providerClientToken),s.protectionScheme!=null&&s.hasOwnProperty("protectionScheme")&&(p.protectionScheme=s.protectionScheme),s.srmRequirement!=null&&s.hasOwnProperty("srmRequirement")&&(p.srmRequirement=a.bytes===String?S.base64.encode(s.srmRequirement,0,s.srmRequirement.length):a.bytes===Array?Array.prototype.slice.call(s.srmRequirement):s.srmRequirement),s.srmUpdate!=null&&s.hasOwnProperty("srmUpdate")&&(p.srmUpdate=a.bytes===String?S.base64.encode(s.srmUpdate,0,s.srmUpdate.length):a.bytes===Array?Array.prototype.slice.call(s.srmUpdate):s.srmUpdate),s.platformVerificationStatus!=null&&s.hasOwnProperty("platformVerificationStatus")&&(p.platformVerificationStatus=a.enums===String?w.license_protocol.PlatformVerificationStatus[s.platformVerificationStatus]===void 0?s.platformVerificationStatus:w.license_protocol.PlatformVerificationStatus[s.platformVerificationStatus]:s.platformVerificationStatus),s.groupIds&&s.groupIds.length){p.groupIds=[];for(var M=0;M<s.groupIds.length;M+=1)p.groupIds[M]=a.bytes===String?S.base64.encode(s.groupIds[M],0,s.groupIds[M].length):a.bytes===Array?Array.prototype.slice.call(s.groupIds[M]):s.groupIds[M]}return p},O.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},O.getTypeUrl=function(s){return s===void 0&&(s="type.googleapis.com"),s+"/license_protocol.License"},O.Policy=function(){function h(s){if(s)for(var a=Object.keys(s),p=0;p<a.length;p+=1)s[a[p]]!=null&&(this[a[p]]=s[a[p]])}return h.prototype.canPlay=!1,h.prototype.canPersist=!1,h.prototype.canRenew=!1,h.prototype.rentalDurationSeconds=S.Long?S.Long.fromBits(0,0,!1):0,h.prototype.playbackDurationSeconds=S.Long?S.Long.fromBits(0,0,!1):0,h.prototype.licenseDurationSeconds=S.Long?S.Long.fromBits(0,0,!1):0,h.prototype.renewalRecoveryDurationSeconds=S.Long?S.Long.fromBits(0,0,!1):0,h.prototype.renewalServerUrl="",h.prototype.renewalDelaySeconds=S.Long?S.Long.fromBits(0,0,!1):0,h.prototype.renewalRetryIntervalSeconds=S.Long?S.Long.fromBits(0,0,!1):0,h.prototype.renewWithUsage=!1,h.prototype.alwaysIncludeClientId=!1,h.prototype.playStartGracePeriodSeconds=S.Long?S.Long.fromBits(0,0,!1):0,h.prototype.softEnforcePlaybackDuration=!1,h.prototype.softEnforceRentalDuration=!0,h.create=function(a){return new h(a)},h.encode=function(a,p){return p||(p=k.create()),a.canPlay!=null&&Object.hasOwnProperty.call(a,"canPlay")&&p.uint32(8).bool(a.canPlay),a.canPersist!=null&&Object.hasOwnProperty.call(a,"canPersist")&&p.uint32(16).bool(a.canPersist),a.canRenew!=null&&Object.hasOwnProperty.call(a,"canRenew")&&p.uint32(24).bool(a.canRenew),a.rentalDurationSeconds!=null&&Object.hasOwnProperty.call(a,"rentalDurationSeconds")&&p.uint32(32).int64(a.rentalDurationSeconds),a.playbackDurationSeconds!=null&&Object.hasOwnProperty.call(a,"playbackDurationSeconds")&&p.uint32(40).int64(a.playbackDurationSeconds),a.licenseDurationSeconds!=null&&Object.hasOwnProperty.call(a,"licenseDurationSeconds")&&p.uint32(48).int64(a.licenseDurationSeconds),a.renewalRecoveryDurationSeconds!=null&&Object.hasOwnProperty.call(a,"renewalRecoveryDurationSeconds")&&p.uint32(56).int64(a.renewalRecoveryDurationSeconds),a.renewalServerUrl!=null&&Object.hasOwnProperty.call(a,"renewalServerUrl")&&p.uint32(66).string(a.renewalServerUrl),a.renewalDelaySeconds!=null&&Object.hasOwnProperty.call(a,"renewalDelaySeconds")&&p.uint32(72).int64(a.renewalDelaySeconds),a.renewalRetryIntervalSeconds!=null&&Object.hasOwnProperty.call(a,"renewalRetryIntervalSeconds")&&p.uint32(80).int64(a.renewalRetryIntervalSeconds),a.renewWithUsage!=null&&Object.hasOwnProperty.call(a,"renewWithUsage")&&p.uint32(88).bool(a.renewWithUsage),a.alwaysIncludeClientId!=null&&Object.hasOwnProperty.call(a,"alwaysIncludeClientId")&&p.uint32(96).bool(a.alwaysIncludeClientId),a.playStartGracePeriodSeconds!=null&&Object.hasOwnProperty.call(a,"playStartGracePeriodSeconds")&&p.uint32(104).int64(a.playStartGracePeriodSeconds),a.softEnforcePlaybackDuration!=null&&Object.hasOwnProperty.call(a,"softEnforcePlaybackDuration")&&p.uint32(112).bool(a.softEnforcePlaybackDuration),a.softEnforceRentalDuration!=null&&Object.hasOwnProperty.call(a,"softEnforceRentalDuration")&&p.uint32(120).bool(a.softEnforceRentalDuration),p},h.encodeDelimited=function(a,p){return this.encode(a,p).ldelim()},h.decode=function(a,p){a instanceof A||(a=A.create(a));for(var v=p===void 0?a.len:a.pos+p,M=new w.license_protocol.License.Policy;a.pos<v;){var F=a.uint32();switch(F>>>3){case 1:{M.canPlay=a.bool();break}case 2:{M.canPersist=a.bool();break}case 3:{M.canRenew=a.bool();break}case 4:{M.rentalDurationSeconds=a.int64();break}case 5:{M.playbackDurationSeconds=a.int64();break}case 6:{M.licenseDurationSeconds=a.int64();break}case 7:{M.renewalRecoveryDurationSeconds=a.int64();break}case 8:{M.renewalServerUrl=a.string();break}case 9:{M.renewalDelaySeconds=a.int64();break}case 10:{M.renewalRetryIntervalSeconds=a.int64();break}case 11:{M.renewWithUsage=a.bool();break}case 12:{M.alwaysIncludeClientId=a.bool();break}case 13:{M.playStartGracePeriodSeconds=a.int64();break}case 14:{M.softEnforcePlaybackDuration=a.bool();break}case 15:{M.softEnforceRentalDuration=a.bool();break}default:a.skipType(F&7);break}}return M},h.decodeDelimited=function(a){return a instanceof A||(a=new A(a)),this.decode(a,a.uint32())},h.verify=function(a){return typeof a!="object"||a===null?"object expected":a.canPlay!=null&&a.hasOwnProperty("canPlay")&&typeof a.canPlay!="boolean"?"canPlay: boolean expected":a.canPersist!=null&&a.hasOwnProperty("canPersist")&&typeof a.canPersist!="boolean"?"canPersist: boolean expected":a.canRenew!=null&&a.hasOwnProperty("canRenew")&&typeof a.canRenew!="boolean"?"canRenew: boolean expected":a.rentalDurationSeconds!=null&&a.hasOwnProperty("rentalDurationSeconds")&&!S.isInteger(a.rentalDurationSeconds)&&!(a.rentalDurationSeconds&&S.isInteger(a.rentalDurationSeconds.low)&&S.isInteger(a.rentalDurationSeconds.high))?"rentalDurationSeconds: integer|Long expected":a.playbackDurationSeconds!=null&&a.hasOwnProperty("playbackDurationSeconds")&&!S.isInteger(a.playbackDurationSeconds)&&!(a.playbackDurationSeconds&&S.isInteger(a.playbackDurationSeconds.low)&&S.isInteger(a.playbackDurationSeconds.high))?"playbackDurationSeconds: integer|Long expected":a.licenseDurationSeconds!=null&&a.hasOwnProperty("licenseDurationSeconds")&&!S.isInteger(a.licenseDurationSeconds)&&!(a.licenseDurationSeconds&&S.isInteger(a.licenseDurationSeconds.low)&&S.isInteger(a.licenseDurationSeconds.high))?"licenseDurationSeconds: integer|Long expected":a.renewalRecoveryDurationSeconds!=null&&a.hasOwnProperty("renewalRecoveryDurationSeconds")&&!S.isInteger(a.renewalRecoveryDurationSeconds)&&!(a.renewalRecoveryDurationSeconds&&S.isInteger(a.renewalRecoveryDurationSeconds.low)&&S.isInteger(a.renewalRecoveryDurationSeconds.high))?"renewalRecoveryDurationSeconds: integer|Long expected":a.renewalServerUrl!=null&&a.hasOwnProperty("renewalServerUrl")&&!S.isString(a.renewalServerUrl)?"renewalServerUrl: string expected":a.renewalDelaySeconds!=null&&a.hasOwnProperty("renewalDelaySeconds")&&!S.isInteger(a.renewalDelaySeconds)&&!(a.renewalDelaySeconds&&S.isInteger(a.renewalDelaySeconds.low)&&S.isInteger(a.renewalDelaySeconds.high))?"renewalDelaySeconds: integer|Long expected":a.renewalRetryIntervalSeconds!=null&&a.hasOwnProperty("renewalRetryIntervalSeconds")&&!S.isInteger(a.renewalRetryIntervalSeconds)&&!(a.renewalRetryIntervalSeconds&&S.isInteger(a.renewalRetryIntervalSeconds.low)&&S.isInteger(a.renewalRetryIntervalSeconds.high))?"renewalRetryIntervalSeconds: integer|Long expected":a.renewWithUsage!=null&&a.hasOwnProperty("renewWithUsage")&&typeof a.renewWithUsage!="boolean"?"renewWithUsage: boolean expected":a.alwaysIncludeClientId!=null&&a.hasOwnProperty("alwaysIncludeClientId")&&typeof a.alwaysIncludeClientId!="boolean"?"alwaysIncludeClientId: boolean expected":a.playStartGracePeriodSeconds!=null&&a.hasOwnProperty("playStartGracePeriodSeconds")&&!S.isInteger(a.playStartGracePeriodSeconds)&&!(a.playStartGracePeriodSeconds&&S.isInteger(a.playStartGracePeriodSeconds.low)&&S.isInteger(a.playStartGracePeriodSeconds.high))?"playStartGracePeriodSeconds: integer|Long expected":a.softEnforcePlaybackDuration!=null&&a.hasOwnProperty("softEnforcePlaybackDuration")&&typeof a.softEnforcePlaybackDuration!="boolean"?"softEnforcePlaybackDuration: boolean expected":a.softEnforceRentalDuration!=null&&a.hasOwnProperty("softEnforceRentalDuration")&&typeof a.softEnforceRentalDuration!="boolean"?"softEnforceRentalDuration: boolean expected":null},h.fromObject=function(a){if(a instanceof w.license_protocol.License.Policy)return a;var p=new w.license_protocol.License.Policy;return a.canPlay!=null&&(p.canPlay=!!a.canPlay),a.canPersist!=null&&(p.canPersist=!!a.canPersist),a.canRenew!=null&&(p.canRenew=!!a.canRenew),a.rentalDurationSeconds!=null&&(S.Long?(p.rentalDurationSeconds=S.Long.fromValue(a.rentalDurationSeconds)).unsigned=!1:typeof a.rentalDurationSeconds=="string"?p.rentalDurationSeconds=parseInt(a.rentalDurationSeconds,10):typeof a.rentalDurationSeconds=="number"?p.rentalDurationSeconds=a.rentalDurationSeconds:typeof a.rentalDurationSeconds=="object"&&(p.rentalDurationSeconds=new S.LongBits(a.rentalDurationSeconds.low>>>0,a.rentalDurationSeconds.high>>>0).toNumber())),a.playbackDurationSeconds!=null&&(S.Long?(p.playbackDurationSeconds=S.Long.fromValue(a.playbackDurationSeconds)).unsigned=!1:typeof a.playbackDurationSeconds=="string"?p.playbackDurationSeconds=parseInt(a.playbackDurationSeconds,10):typeof a.playbackDurationSeconds=="number"?p.playbackDurationSeconds=a.playbackDurationSeconds:typeof a.playbackDurationSeconds=="object"&&(p.playbackDurationSeconds=new S.LongBits(a.playbackDurationSeconds.low>>>0,a.playbackDurationSeconds.high>>>0).toNumber())),a.licenseDurationSeconds!=null&&(S.Long?(p.licenseDurationSeconds=S.Long.fromValue(a.licenseDurationSeconds)).unsigned=!1:typeof a.licenseDurationSeconds=="string"?p.licenseDurationSeconds=parseInt(a.licenseDurationSeconds,10):typeof a.licenseDurationSeconds=="number"?p.licenseDurationSeconds=a.licenseDurationSeconds:typeof a.licenseDurationSeconds=="object"&&(p.licenseDurationSeconds=new S.LongBits(a.licenseDurationSeconds.low>>>0,a.licenseDurationSeconds.high>>>0).toNumber())),a.renewalRecoveryDurationSeconds!=null&&(S.Long?(p.renewalRecoveryDurationSeconds=S.Long.fromValue(a.renewalRecoveryDurationSeconds)).unsigned=!1:typeof a.renewalRecoveryDurationSeconds=="string"?p.renewalRecoveryDurationSeconds=parseInt(a.renewalRecoveryDurationSeconds,10):typeof a.renewalRecoveryDurationSeconds=="number"?p.renewalRecoveryDurationSeconds=a.renewalRecoveryDurationSeconds:typeof a.renewalRecoveryDurationSeconds=="object"&&(p.renewalRecoveryDurationSeconds=new S.LongBits(a.renewalRecoveryDurationSeconds.low>>>0,a.renewalRecoveryDurationSeconds.high>>>0).toNumber())),a.renewalServerUrl!=null&&(p.renewalServerUrl=String(a.renewalServerUrl)),a.renewalDelaySeconds!=null&&(S.Long?(p.renewalDelaySeconds=S.Long.fromValue(a.renewalDelaySeconds)).unsigned=!1:typeof a.renewalDelaySeconds=="string"?p.renewalDelaySeconds=parseInt(a.renewalDelaySeconds,10):typeof a.renewalDelaySeconds=="number"?p.renewalDelaySeconds=a.renewalDelaySeconds:typeof a.renewalDelaySeconds=="object"&&(p.renewalDelaySeconds=new S.LongBits(a.renewalDelaySeconds.low>>>0,a.renewalDelaySeconds.high>>>0).toNumber())),a.renewalRetryIntervalSeconds!=null&&(S.Long?(p.renewalRetryIntervalSeconds=S.Long.fromValue(a.renewalRetryIntervalSeconds)).unsigned=!1:typeof a.renewalRetryIntervalSeconds=="string"?p.renewalRetryIntervalSeconds=parseInt(a.renewalRetryIntervalSeconds,10):typeof a.renewalRetryIntervalSeconds=="number"?p.renewalRetryIntervalSeconds=a.renewalRetryIntervalSeconds:typeof a.renewalRetryIntervalSeconds=="object"&&(p.renewalRetryIntervalSeconds=new S.LongBits(a.renewalRetryIntervalSeconds.low>>>0,a.renewalRetryIntervalSeconds.high>>>0).toNumber())),a.renewWithUsage!=null&&(p.renewWithUsage=!!a.renewWithUsage),a.alwaysIncludeClientId!=null&&(p.alwaysIncludeClientId=!!a.alwaysIncludeClientId),a.playStartGracePeriodSeconds!=null&&(S.Long?(p.playStartGracePeriodSeconds=S.Long.fromValue(a.playStartGracePeriodSeconds)).unsigned=!1:typeof a.playStartGracePeriodSeconds=="string"?p.playStartGracePeriodSeconds=parseInt(a.playStartGracePeriodSeconds,10):typeof a.playStartGracePeriodSeconds=="number"?p.playStartGracePeriodSeconds=a.playStartGracePeriodSeconds:typeof a.playStartGracePeriodSeconds=="object"&&(p.playStartGracePeriodSeconds=new S.LongBits(a.playStartGracePeriodSeconds.low>>>0,a.playStartGracePeriodSeconds.high>>>0).toNumber())),a.softEnforcePlaybackDuration!=null&&(p.softEnforcePlaybackDuration=!!a.softEnforcePlaybackDuration),a.softEnforceRentalDuration!=null&&(p.softEnforceRentalDuration=!!a.softEnforceRentalDuration),p},h.toObject=function(a,p){p||(p={});var v={};if(p.defaults){if(v.canPlay=!1,v.canPersist=!1,v.canRenew=!1,S.Long){var M=new S.Long(0,0,!1);v.rentalDurationSeconds=p.longs===String?M.toString():p.longs===Number?M.toNumber():M}else v.rentalDurationSeconds=p.longs===String?"0":0;if(S.Long){var M=new S.Long(0,0,!1);v.playbackDurationSeconds=p.longs===String?M.toString():p.longs===Number?M.toNumber():M}else v.playbackDurationSeconds=p.longs===String?"0":0;if(S.Long){var M=new S.Long(0,0,!1);v.licenseDurationSeconds=p.longs===String?M.toString():p.longs===Number?M.toNumber():M}else v.licenseDurationSeconds=p.longs===String?"0":0;if(S.Long){var M=new S.Long(0,0,!1);v.renewalRecoveryDurationSeconds=p.longs===String?M.toString():p.longs===Number?M.toNumber():M}else v.renewalRecoveryDurationSeconds=p.longs===String?"0":0;if(v.renewalServerUrl="",S.Long){var M=new S.Long(0,0,!1);v.renewalDelaySeconds=p.longs===String?M.toString():p.longs===Number?M.toNumber():M}else v.renewalDelaySeconds=p.longs===String?"0":0;if(S.Long){var M=new S.Long(0,0,!1);v.renewalRetryIntervalSeconds=p.longs===String?M.toString():p.longs===Number?M.toNumber():M}else v.renewalRetryIntervalSeconds=p.longs===String?"0":0;if(v.renewWithUsage=!1,v.alwaysIncludeClientId=!1,S.Long){var M=new S.Long(0,0,!1);v.playStartGracePeriodSeconds=p.longs===String?M.toString():p.longs===Number?M.toNumber():M}else v.playStartGracePeriodSeconds=p.longs===String?"0":0;v.softEnforcePlaybackDuration=!1,v.softEnforceRentalDuration=!0}return a.canPlay!=null&&a.hasOwnProperty("canPlay")&&(v.canPlay=a.canPlay),a.canPersist!=null&&a.hasOwnProperty("canPersist")&&(v.canPersist=a.canPersist),a.canRenew!=null&&a.hasOwnProperty("canRenew")&&(v.canRenew=a.canRenew),a.rentalDurationSeconds!=null&&a.hasOwnProperty("rentalDurationSeconds")&&(typeof a.rentalDurationSeconds=="number"?v.rentalDurationSeconds=p.longs===String?String(a.rentalDurationSeconds):a.rentalDurationSeconds:v.rentalDurationSeconds=p.longs===String?S.Long.prototype.toString.call(a.rentalDurationSeconds):p.longs===Number?new S.LongBits(a.rentalDurationSeconds.low>>>0,a.rentalDurationSeconds.high>>>0).toNumber():a.rentalDurationSeconds),a.playbackDurationSeconds!=null&&a.hasOwnProperty("playbackDurationSeconds")&&(typeof a.playbackDurationSeconds=="number"?v.playbackDurationSeconds=p.longs===String?String(a.playbackDurationSeconds):a.playbackDurationSeconds:v.playbackDurationSeconds=p.longs===String?S.Long.prototype.toString.call(a.playbackDurationSeconds):p.longs===Number?new S.LongBits(a.playbackDurationSeconds.low>>>0,a.playbackDurationSeconds.high>>>0).toNumber():a.playbackDurationSeconds),a.licenseDurationSeconds!=null&&a.hasOwnProperty("licenseDurationSeconds")&&(typeof a.licenseDurationSeconds=="number"?v.licenseDurationSeconds=p.longs===String?String(a.licenseDurationSeconds):a.licenseDurationSeconds:v.licenseDurationSeconds=p.longs===String?S.Long.prototype.toString.call(a.licenseDurationSeconds):p.longs===Number?new S.LongBits(a.licenseDurationSeconds.low>>>0,a.licenseDurationSeconds.high>>>0).toNumber():a.licenseDurationSeconds),a.renewalRecoveryDurationSeconds!=null&&a.hasOwnProperty("renewalRecoveryDurationSeconds")&&(typeof a.renewalRecoveryDurationSeconds=="number"?v.renewalRecoveryDurationSeconds=p.longs===String?String(a.renewalRecoveryDurationSeconds):a.renewalRecoveryDurationSeconds:v.renewalRecoveryDurationSeconds=p.longs===String?S.Long.prototype.toString.call(a.renewalRecoveryDurationSeconds):p.longs===Number?new S.LongBits(a.renewalRecoveryDurationSeconds.low>>>0,a.renewalRecoveryDurationSeconds.high>>>0).toNumber():a.renewalRecoveryDurationSeconds),a.renewalServerUrl!=null&&a.hasOwnProperty("renewalServerUrl")&&(v.renewalServerUrl=a.renewalServerUrl),a.renewalDelaySeconds!=null&&a.hasOwnProperty("renewalDelaySeconds")&&(typeof a.renewalDelaySeconds=="number"?v.renewalDelaySeconds=p.longs===String?String(a.renewalDelaySeconds):a.renewalDelaySeconds:v.renewalDelaySeconds=p.longs===String?S.Long.prototype.toString.call(a.renewalDelaySeconds):p.longs===Number?new S.LongBits(a.renewalDelaySeconds.low>>>0,a.renewalDelaySeconds.high>>>0).toNumber():a.renewalDelaySeconds),a.renewalRetryIntervalSeconds!=null&&a.hasOwnProperty("renewalRetryIntervalSeconds")&&(typeof a.renewalRetryIntervalSeconds=="number"?v.renewalRetryIntervalSeconds=p.longs===String?String(a.renewalRetryIntervalSeconds):a.renewalRetryIntervalSeconds:v.renewalRetryIntervalSeconds=p.longs===String?S.Long.prototype.toString.call(a.renewalRetryIntervalSeconds):p.longs===Number?new S.LongBits(a.renewalRetryIntervalSeconds.low>>>0,a.renewalRetryIntervalSeconds.high>>>0).toNumber():a.renewalRetryIntervalSeconds),a.renewWithUsage!=null&&a.hasOwnProperty("renewWithUsage")&&(v.renewWithUsage=a.renewWithUsage),a.alwaysIncludeClientId!=null&&a.hasOwnProperty("alwaysIncludeClientId")&&(v.alwaysIncludeClientId=a.alwaysIncludeClientId),a.playStartGracePeriodSeconds!=null&&a.hasOwnProperty("playStartGracePeriodSeconds")&&(typeof a.playStartGracePeriodSeconds=="number"?v.playStartGracePeriodSeconds=p.longs===String?String(a.playStartGracePeriodSeconds):a.playStartGracePeriodSeconds:v.playStartGracePeriodSeconds=p.longs===String?S.Long.prototype.toString.call(a.playStartGracePeriodSeconds):p.longs===Number?new S.LongBits(a.playStartGracePeriodSeconds.low>>>0,a.playStartGracePeriodSeconds.high>>>0).toNumber():a.playStartGracePeriodSeconds),a.softEnforcePlaybackDuration!=null&&a.hasOwnProperty("softEnforcePlaybackDuration")&&(v.softEnforcePlaybackDuration=a.softEnforcePlaybackDuration),a.softEnforceRentalDuration!=null&&a.hasOwnProperty("softEnforceRentalDuration")&&(v.softEnforceRentalDuration=a.softEnforceRentalDuration),v},h.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},h.getTypeUrl=function(a){return a===void 0&&(a="type.googleapis.com"),a+"/license_protocol.License.Policy"},h}(),O.KeyContainer=function(){function h(s){if(this.videoResolutionConstraints=[],s)for(var a=Object.keys(s),p=0;p<a.length;p+=1)s[a[p]]!=null&&(this[a[p]]=s[a[p]])}return h.prototype.id=S.newBuffer([]),h.prototype.iv=S.newBuffer([]),h.prototype.key=S.newBuffer([]),h.prototype.type=1,h.prototype.level=1,h.prototype.requiredProtection=null,h.prototype.requestedProtection=null,h.prototype.keyControl=null,h.prototype.operatorSessionKeyPermissions=null,h.prototype.videoResolutionConstraints=S.emptyArray,h.prototype.antiRollbackUsageTable=!1,h.prototype.trackLabel="",h.create=function(a){return new h(a)},h.encode=function(a,p){if(p||(p=k.create()),a.id!=null&&Object.hasOwnProperty.call(a,"id")&&p.uint32(10).bytes(a.id),a.iv!=null&&Object.hasOwnProperty.call(a,"iv")&&p.uint32(18).bytes(a.iv),a.key!=null&&Object.hasOwnProperty.call(a,"key")&&p.uint32(26).bytes(a.key),a.type!=null&&Object.hasOwnProperty.call(a,"type")&&p.uint32(32).int32(a.type),a.level!=null&&Object.hasOwnProperty.call(a,"level")&&p.uint32(40).int32(a.level),a.requiredProtection!=null&&Object.hasOwnProperty.call(a,"requiredProtection")&&w.license_protocol.License.KeyContainer.OutputProtection.encode(a.requiredProtection,p.uint32(50).fork()).ldelim(),a.requestedProtection!=null&&Object.hasOwnProperty.call(a,"requestedProtection")&&w.license_protocol.License.KeyContainer.OutputProtection.encode(a.requestedProtection,p.uint32(58).fork()).ldelim(),a.keyControl!=null&&Object.hasOwnProperty.call(a,"keyControl")&&w.license_protocol.License.KeyContainer.KeyControl.encode(a.keyControl,p.uint32(66).fork()).ldelim(),a.operatorSessionKeyPermissions!=null&&Object.hasOwnProperty.call(a,"operatorSessionKeyPermissions")&&w.license_protocol.License.KeyContainer.OperatorSessionKeyPermissions.encode(a.operatorSessionKeyPermissions,p.uint32(74).fork()).ldelim(),a.videoResolutionConstraints!=null&&a.videoResolutionConstraints.length)for(var v=0;v<a.videoResolutionConstraints.length;v+=1)w.license_protocol.License.KeyContainer.VideoResolutionConstraint.encode(a.videoResolutionConstraints[v],p.uint32(82).fork()).ldelim();return a.antiRollbackUsageTable!=null&&Object.hasOwnProperty.call(a,"antiRollbackUsageTable")&&p.uint32(88).bool(a.antiRollbackUsageTable),a.trackLabel!=null&&Object.hasOwnProperty.call(a,"trackLabel")&&p.uint32(98).string(a.trackLabel),p},h.encodeDelimited=function(a,p){return this.encode(a,p).ldelim()},h.decode=function(a,p){a instanceof A||(a=A.create(a));for(var v=p===void 0?a.len:a.pos+p,M=new w.license_protocol.License.KeyContainer;a.pos<v;){var F=a.uint32();switch(F>>>3){case 1:{M.id=a.bytes();break}case 2:{M.iv=a.bytes();break}case 3:{M.key=a.bytes();break}case 4:{M.type=a.int32();break}case 5:{M.level=a.int32();break}case 6:{M.requiredProtection=w.license_protocol.License.KeyContainer.OutputProtection.decode(a,a.uint32());break}case 7:{M.requestedProtection=w.license_protocol.License.KeyContainer.OutputProtection.decode(a,a.uint32());break}case 8:{M.keyControl=w.license_protocol.License.KeyContainer.KeyControl.decode(a,a.uint32());break}case 9:{M.operatorSessionKeyPermissions=w.license_protocol.License.KeyContainer.OperatorSessionKeyPermissions.decode(a,a.uint32());break}case 10:{M.videoResolutionConstraints&&M.videoResolutionConstraints.length||(M.videoResolutionConstraints=[]),M.videoResolutionConstraints.push(w.license_protocol.License.KeyContainer.VideoResolutionConstraint.decode(a,a.uint32()));break}case 11:{M.antiRollbackUsageTable=a.bool();break}case 12:{M.trackLabel=a.string();break}default:a.skipType(F&7);break}}return M},h.decodeDelimited=function(a){return a instanceof A||(a=new A(a)),this.decode(a,a.uint32())},h.verify=function(a){if(typeof a!="object"||a===null)return"object expected";if(a.id!=null&&a.hasOwnProperty("id")&&!(a.id&&typeof a.id.length=="number"||S.isString(a.id)))return"id: buffer expected";if(a.iv!=null&&a.hasOwnProperty("iv")&&!(a.iv&&typeof a.iv.length=="number"||S.isString(a.iv)))return"iv: buffer expected";if(a.key!=null&&a.hasOwnProperty("key")&&!(a.key&&typeof a.key.length=="number"||S.isString(a.key)))return"key: buffer expected";if(a.type!=null&&a.hasOwnProperty("type"))switch(a.type){default:return"type: enum value expected";case 1:case 2:case 3:case 4:case 5:case 6:break}if(a.level!=null&&a.hasOwnProperty("level"))switch(a.level){default:return"level: enum value expected";case 1:case 2:case 3:case 4:case 5:break}if(a.requiredProtection!=null&&a.hasOwnProperty("requiredProtection")){var p=w.license_protocol.License.KeyContainer.OutputProtection.verify(a.requiredProtection);if(p)return"requiredProtection."+p}if(a.requestedProtection!=null&&a.hasOwnProperty("requestedProtection")){var p=w.license_protocol.License.KeyContainer.OutputProtection.verify(a.requestedProtection);if(p)return"requestedProtection."+p}if(a.keyControl!=null&&a.hasOwnProperty("keyControl")){var p=w.license_protocol.License.KeyContainer.KeyControl.verify(a.keyControl);if(p)return"keyControl."+p}if(a.operatorSessionKeyPermissions!=null&&a.hasOwnProperty("operatorSessionKeyPermissions")){var p=w.license_protocol.License.KeyContainer.OperatorSessionKeyPermissions.verify(a.operatorSessionKeyPermissions);if(p)return"operatorSessionKeyPermissions."+p}if(a.videoResolutionConstraints!=null&&a.hasOwnProperty("videoResolutionConstraints")){if(!Array.isArray(a.videoResolutionConstraints))return"videoResolutionConstraints: array expected";for(var v=0;v<a.videoResolutionConstraints.length;v+=1){var p=w.license_protocol.License.KeyContainer.VideoResolutionConstraint.verify(a.videoResolutionConstraints[v]);if(p)return"videoResolutionConstraints."+p}}return a.antiRollbackUsageTable!=null&&a.hasOwnProperty("antiRollbackUsageTable")&&typeof a.antiRollbackUsageTable!="boolean"?"antiRollbackUsageTable: boolean expected":a.trackLabel!=null&&a.hasOwnProperty("trackLabel")&&!S.isString(a.trackLabel)?"trackLabel: string expected":null},h.fromObject=function(a){if(a instanceof w.license_protocol.License.KeyContainer)return a;var p=new w.license_protocol.License.KeyContainer;switch(a.id!=null&&(typeof a.id=="string"?S.base64.decode(a.id,p.id=S.newBuffer(S.base64.length(a.id)),0):a.id.length>=0&&(p.id=a.id)),a.iv!=null&&(typeof a.iv=="string"?S.base64.decode(a.iv,p.iv=S.newBuffer(S.base64.length(a.iv)),0):a.iv.length>=0&&(p.iv=a.iv)),a.key!=null&&(typeof a.key=="string"?S.base64.decode(a.key,p.key=S.newBuffer(S.base64.length(a.key)),0):a.key.length>=0&&(p.key=a.key)),a.type){default:if(typeof a.type=="number"){p.type=a.type;break}break;case"SIGNING":case 1:p.type=1;break;case"CONTENT":case 2:p.type=2;break;case"KEY_CONTROL":case 3:p.type=3;break;case"OPERATOR_SESSION":case 4:p.type=4;break;case"ENTITLEMENT":case 5:p.type=5;break;case"OEM_CONTENT":case 6:p.type=6;break}switch(a.level){default:if(typeof a.level=="number"){p.level=a.level;break}break;case"SW_SECURE_CRYPTO":case 1:p.level=1;break;case"SW_SECURE_DECODE":case 2:p.level=2;break;case"HW_SECURE_CRYPTO":case 3:p.level=3;break;case"HW_SECURE_DECODE":case 4:p.level=4;break;case"HW_SECURE_ALL":case 5:p.level=5;break}if(a.requiredProtection!=null){if(typeof a.requiredProtection!="object")throw TypeError(".license_protocol.License.KeyContainer.requiredProtection: object expected");p.requiredProtection=w.license_protocol.License.KeyContainer.OutputProtection.fromObject(a.requiredProtection)}if(a.requestedProtection!=null){if(typeof a.requestedProtection!="object")throw TypeError(".license_protocol.License.KeyContainer.requestedProtection: object expected");p.requestedProtection=w.license_protocol.License.KeyContainer.OutputProtection.fromObject(a.requestedProtection)}if(a.keyControl!=null){if(typeof a.keyControl!="object")throw TypeError(".license_protocol.License.KeyContainer.keyControl: object expected");p.keyControl=w.license_protocol.License.KeyContainer.KeyControl.fromObject(a.keyControl)}if(a.operatorSessionKeyPermissions!=null){if(typeof a.operatorSessionKeyPermissions!="object")throw TypeError(".license_protocol.License.KeyContainer.operatorSessionKeyPermissions: object expected");p.operatorSessionKeyPermissions=w.license_protocol.License.KeyContainer.OperatorSessionKeyPermissions.fromObject(a.operatorSessionKeyPermissions)}if(a.videoResolutionConstraints){if(!Array.isArray(a.videoResolutionConstraints))throw TypeError(".license_protocol.License.KeyContainer.videoResolutionConstraints: array expected");p.videoResolutionConstraints=[];for(var v=0;v<a.videoResolutionConstraints.length;v+=1){if(typeof a.videoResolutionConstraints[v]!="object")throw TypeError(".license_protocol.License.KeyContainer.videoResolutionConstraints: object expected");p.videoResolutionConstraints[v]=w.license_protocol.License.KeyContainer.VideoResolutionConstraint.fromObject(a.videoResolutionConstraints[v])}}return a.antiRollbackUsageTable!=null&&(p.antiRollbackUsageTable=!!a.antiRollbackUsageTable),a.trackLabel!=null&&(p.trackLabel=String(a.trackLabel)),p},h.toObject=function(a,p){p||(p={});var v={};if((p.arrays||p.defaults)&&(v.videoResolutionConstraints=[]),p.defaults&&(p.bytes===String?v.id="":(v.id=[],p.bytes!==Array&&(v.id=S.newBuffer(v.id))),p.bytes===String?v.iv="":(v.iv=[],p.bytes!==Array&&(v.iv=S.newBuffer(v.iv))),p.bytes===String?v.key="":(v.key=[],p.bytes!==Array&&(v.key=S.newBuffer(v.key))),v.type=p.enums===String?"SIGNING":1,v.level=p.enums===String?"SW_SECURE_CRYPTO":1,v.requiredProtection=null,v.requestedProtection=null,v.keyControl=null,v.operatorSessionKeyPermissions=null,v.antiRollbackUsageTable=!1,v.trackLabel=""),a.id!=null&&a.hasOwnProperty("id")&&(v.id=p.bytes===String?S.base64.encode(a.id,0,a.id.length):p.bytes===Array?Array.prototype.slice.call(a.id):a.id),a.iv!=null&&a.hasOwnProperty("iv")&&(v.iv=p.bytes===String?S.base64.encode(a.iv,0,a.iv.length):p.bytes===Array?Array.prototype.slice.call(a.iv):a.iv),a.key!=null&&a.hasOwnProperty("key")&&(v.key=p.bytes===String?S.base64.encode(a.key,0,a.key.length):p.bytes===Array?Array.prototype.slice.call(a.key):a.key),a.type!=null&&a.hasOwnProperty("type")&&(v.type=p.enums===String?w.license_protocol.License.KeyContainer.KeyType[a.type]===void 0?a.type:w.license_protocol.License.KeyContainer.KeyType[a.type]:a.type),a.level!=null&&a.hasOwnProperty("level")&&(v.level=p.enums===String?w.license_protocol.License.KeyContainer.SecurityLevel[a.level]===void 0?a.level:w.license_protocol.License.KeyContainer.SecurityLevel[a.level]:a.level),a.requiredProtection!=null&&a.hasOwnProperty("requiredProtection")&&(v.requiredProtection=w.license_protocol.License.KeyContainer.OutputProtection.toObject(a.requiredProtection,p)),a.requestedProtection!=null&&a.hasOwnProperty("requestedProtection")&&(v.requestedProtection=w.license_protocol.License.KeyContainer.OutputProtection.toObject(a.requestedProtection,p)),a.keyControl!=null&&a.hasOwnProperty("keyControl")&&(v.keyControl=w.license_protocol.License.KeyContainer.KeyControl.toObject(a.keyControl,p)),a.operatorSessionKeyPermissions!=null&&a.hasOwnProperty("operatorSessionKeyPermissions")&&(v.operatorSessionKeyPermissions=w.license_protocol.License.KeyContainer.OperatorSessionKeyPermissions.toObject(a.operatorSessionKeyPermissions,p)),a.videoResolutionConstraints&&a.videoResolutionConstraints.length){v.videoResolutionConstraints=[];for(var M=0;M<a.videoResolutionConstraints.length;M+=1)v.videoResolutionConstraints[M]=w.license_protocol.License.KeyContainer.VideoResolutionConstraint.toObject(a.videoResolutionConstraints[M],p)}return a.antiRollbackUsageTable!=null&&a.hasOwnProperty("antiRollbackUsageTable")&&(v.antiRollbackUsageTable=a.antiRollbackUsageTable),a.trackLabel!=null&&a.hasOwnProperty("trackLabel")&&(v.trackLabel=a.trackLabel),v},h.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},h.getTypeUrl=function(a){return a===void 0&&(a="type.googleapis.com"),a+"/license_protocol.License.KeyContainer"},h.KeyType=function(){var s={},a=Object.create(s);return a[s[1]="SIGNING"]=1,a[s[2]="CONTENT"]=2,a[s[3]="KEY_CONTROL"]=3,a[s[4]="OPERATOR_SESSION"]=4,a[s[5]="ENTITLEMENT"]=5,a[s[6]="OEM_CONTENT"]=6,a}(),h.SecurityLevel=function(){var s={},a=Object.create(s);return a[s[1]="SW_SECURE_CRYPTO"]=1,a[s[2]="SW_SECURE_DECODE"]=2,a[s[3]="HW_SECURE_CRYPTO"]=3,a[s[4]="HW_SECURE_DECODE"]=4,a[s[5]="HW_SECURE_ALL"]=5,a}(),h.KeyControl=function(){function s(a){if(a)for(var p=Object.keys(a),v=0;v<p.length;v+=1)a[p[v]]!=null&&(this[p[v]]=a[p[v]])}return s.prototype.keyControlBlock=S.newBuffer([]),s.prototype.iv=S.newBuffer([]),s.create=function(p){return new s(p)},s.encode=function(p,v){return v||(v=k.create()),p.keyControlBlock!=null&&Object.hasOwnProperty.call(p,"keyControlBlock")&&v.uint32(10).bytes(p.keyControlBlock),p.iv!=null&&Object.hasOwnProperty.call(p,"iv")&&v.uint32(18).bytes(p.iv),v},s.encodeDelimited=function(p,v){return this.encode(p,v).ldelim()},s.decode=function(p,v){p instanceof A||(p=A.create(p));for(var M=v===void 0?p.len:p.pos+v,F=new w.license_protocol.License.KeyContainer.KeyControl;p.pos<M;){var b=p.uint32();switch(b>>>3){case 1:{F.keyControlBlock=p.bytes();break}case 2:{F.iv=p.bytes();break}default:p.skipType(b&7);break}}return F},s.decodeDelimited=function(p){return p instanceof A||(p=new A(p)),this.decode(p,p.uint32())},s.verify=function(p){return typeof p!="object"||p===null?"object expected":p.keyControlBlock!=null&&p.hasOwnProperty("keyControlBlock")&&!(p.keyControlBlock&&typeof p.keyControlBlock.length=="number"||S.isString(p.keyControlBlock))?"keyControlBlock: buffer expected":p.iv!=null&&p.hasOwnProperty("iv")&&!(p.iv&&typeof p.iv.length=="number"||S.isString(p.iv))?"iv: buffer expected":null},s.fromObject=function(p){if(p instanceof w.license_protocol.License.KeyContainer.KeyControl)return p;var v=new w.license_protocol.License.KeyContainer.KeyControl;return p.keyControlBlock!=null&&(typeof p.keyControlBlock=="string"?S.base64.decode(p.keyControlBlock,v.keyControlBlock=S.newBuffer(S.base64.length(p.keyControlBlock)),0):p.keyControlBlock.length>=0&&(v.keyControlBlock=p.keyControlBlock)),p.iv!=null&&(typeof p.iv=="string"?S.base64.decode(p.iv,v.iv=S.newBuffer(S.base64.length(p.iv)),0):p.iv.length>=0&&(v.iv=p.iv)),v},s.toObject=function(p,v){v||(v={});var M={};return v.defaults&&(v.bytes===String?M.keyControlBlock="":(M.keyControlBlock=[],v.bytes!==Array&&(M.keyControlBlock=S.newBuffer(M.keyControlBlock))),v.bytes===String?M.iv="":(M.iv=[],v.bytes!==Array&&(M.iv=S.newBuffer(M.iv)))),p.keyControlBlock!=null&&p.hasOwnProperty("keyControlBlock")&&(M.keyControlBlock=v.bytes===String?S.base64.encode(p.keyControlBlock,0,p.keyControlBlock.length):v.bytes===Array?Array.prototype.slice.call(p.keyControlBlock):p.keyControlBlock),p.iv!=null&&p.hasOwnProperty("iv")&&(M.iv=v.bytes===String?S.base64.encode(p.iv,0,p.iv.length):v.bytes===Array?Array.prototype.slice.call(p.iv):p.iv),M},s.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},s.getTypeUrl=function(p){return p===void 0&&(p="type.googleapis.com"),p+"/license_protocol.License.KeyContainer.KeyControl"},s}(),h.OutputProtection=function(){function s(a){if(a)for(var p=Object.keys(a),v=0;v<p.length;v+=1)a[p[v]]!=null&&(this[p[v]]=a[p[v]])}return s.prototype.hdcp=0,s.prototype.cgmsFlags=42,s.prototype.hdcpSrmRule=0,s.prototype.disableAnalogOutput=!1,s.prototype.disableDigitalOutput=!1,s.create=function(p){return new s(p)},s.encode=function(p,v){return v||(v=k.create()),p.hdcp!=null&&Object.hasOwnProperty.call(p,"hdcp")&&v.uint32(8).int32(p.hdcp),p.cgmsFlags!=null&&Object.hasOwnProperty.call(p,"cgmsFlags")&&v.uint32(16).int32(p.cgmsFlags),p.hdcpSrmRule!=null&&Object.hasOwnProperty.call(p,"hdcpSrmRule")&&v.uint32(24).int32(p.hdcpSrmRule),p.disableAnalogOutput!=null&&Object.hasOwnProperty.call(p,"disableAnalogOutput")&&v.uint32(32).bool(p.disableAnalogOutput),p.disableDigitalOutput!=null&&Object.hasOwnProperty.call(p,"disableDigitalOutput")&&v.uint32(40).bool(p.disableDigitalOutput),v},s.encodeDelimited=function(p,v){return this.encode(p,v).ldelim()},s.decode=function(p,v){p instanceof A||(p=A.create(p));for(var M=v===void 0?p.len:p.pos+v,F=new w.license_protocol.License.KeyContainer.OutputProtection;p.pos<M;){var b=p.uint32();switch(b>>>3){case 1:{F.hdcp=p.int32();break}case 2:{F.cgmsFlags=p.int32();break}case 3:{F.hdcpSrmRule=p.int32();break}case 4:{F.disableAnalogOutput=p.bool();break}case 5:{F.disableDigitalOutput=p.bool();break}default:p.skipType(b&7);break}}return F},s.decodeDelimited=function(p){return p instanceof A||(p=new A(p)),this.decode(p,p.uint32())},s.verify=function(p){if(typeof p!="object"||p===null)return"object expected";if(p.hdcp!=null&&p.hasOwnProperty("hdcp"))switch(p.hdcp){default:return"hdcp: enum value expected";case 0:case 1:case 2:case 3:case 4:case 5:case 255:break}if(p.cgmsFlags!=null&&p.hasOwnProperty("cgmsFlags"))switch(p.cgmsFlags){default:return"cgmsFlags: enum value expected";case 42:case 0:case 2:case 3:break}if(p.hdcpSrmRule!=null&&p.hasOwnProperty("hdcpSrmRule"))switch(p.hdcpSrmRule){default:return"hdcpSrmRule: enum value expected";case 0:case 1:break}return p.disableAnalogOutput!=null&&p.hasOwnProperty("disableAnalogOutput")&&typeof p.disableAnalogOutput!="boolean"?"disableAnalogOutput: boolean expected":p.disableDigitalOutput!=null&&p.hasOwnProperty("disableDigitalOutput")&&typeof p.disableDigitalOutput!="boolean"?"disableDigitalOutput: boolean expected":null},s.fromObject=function(p){if(p instanceof w.license_protocol.License.KeyContainer.OutputProtection)return p;var v=new w.license_protocol.License.KeyContainer.OutputProtection;switch(p.hdcp){default:if(typeof p.hdcp=="number"){v.hdcp=p.hdcp;break}break;case"HDCP_NONE":case 0:v.hdcp=0;break;case"HDCP_V1":case 1:v.hdcp=1;break;case"HDCP_V2":case 2:v.hdcp=2;break;case"HDCP_V2_1":case 3:v.hdcp=3;break;case"HDCP_V2_2":case 4:v.hdcp=4;break;case"HDCP_V2_3":case 5:v.hdcp=5;break;case"HDCP_NO_DIGITAL_OUTPUT":case 255:v.hdcp=255;break}switch(p.cgmsFlags){default:if(typeof p.cgmsFlags=="number"){v.cgmsFlags=p.cgmsFlags;break}break;case"CGMS_NONE":case 42:v.cgmsFlags=42;break;case"COPY_FREE":case 0:v.cgmsFlags=0;break;case"COPY_ONCE":case 2:v.cgmsFlags=2;break;case"COPY_NEVER":case 3:v.cgmsFlags=3;break}switch(p.hdcpSrmRule){default:if(typeof p.hdcpSrmRule=="number"){v.hdcpSrmRule=p.hdcpSrmRule;break}break;case"HDCP_SRM_RULE_NONE":case 0:v.hdcpSrmRule=0;break;case"CURRENT_SRM":case 1:v.hdcpSrmRule=1;break}return p.disableAnalogOutput!=null&&(v.disableAnalogOutput=!!p.disableAnalogOutput),p.disableDigitalOutput!=null&&(v.disableDigitalOutput=!!p.disableDigitalOutput),v},s.toObject=function(p,v){v||(v={});var M={};return v.defaults&&(M.hdcp=v.enums===String?"HDCP_NONE":0,M.cgmsFlags=v.enums===String?"CGMS_NONE":42,M.hdcpSrmRule=v.enums===String?"HDCP_SRM_RULE_NONE":0,M.disableAnalogOutput=!1,M.disableDigitalOutput=!1),p.hdcp!=null&&p.hasOwnProperty("hdcp")&&(M.hdcp=v.enums===String?w.license_protocol.License.KeyContainer.OutputProtection.HDCP[p.hdcp]===void 0?p.hdcp:w.license_protocol.License.KeyContainer.OutputProtection.HDCP[p.hdcp]:p.hdcp),p.cgmsFlags!=null&&p.hasOwnProperty("cgmsFlags")&&(M.cgmsFlags=v.enums===String?w.license_protocol.License.KeyContainer.OutputProtection.CGMS[p.cgmsFlags]===void 0?p.cgmsFlags:w.license_protocol.License.KeyContainer.OutputProtection.CGMS[p.cgmsFlags]:p.cgmsFlags),p.hdcpSrmRule!=null&&p.hasOwnProperty("hdcpSrmRule")&&(M.hdcpSrmRule=v.enums===String?w.license_protocol.License.KeyContainer.OutputProtection.HdcpSrmRule[p.hdcpSrmRule]===void 0?p.hdcpSrmRule:w.license_protocol.License.KeyContainer.OutputProtection.HdcpSrmRule[p.hdcpSrmRule]:p.hdcpSrmRule),p.disableAnalogOutput!=null&&p.hasOwnProperty("disableAnalogOutput")&&(M.disableAnalogOutput=p.disableAnalogOutput),p.disableDigitalOutput!=null&&p.hasOwnProperty("disableDigitalOutput")&&(M.disableDigitalOutput=p.disableDigitalOutput),M},s.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},s.getTypeUrl=function(p){return p===void 0&&(p="type.googleapis.com"),p+"/license_protocol.License.KeyContainer.OutputProtection"},s.HDCP=function(){var a={},p=Object.create(a);return p[a[0]="HDCP_NONE"]=0,p[a[1]="HDCP_V1"]=1,p[a[2]="HDCP_V2"]=2,p[a[3]="HDCP_V2_1"]=3,p[a[4]="HDCP_V2_2"]=4,p[a[5]="HDCP_V2_3"]=5,p[a[255]="HDCP_NO_DIGITAL_OUTPUT"]=255,p}(),s.CGMS=function(){var a={},p=Object.create(a);return p[a[42]="CGMS_NONE"]=42,p[a[0]="COPY_FREE"]=0,p[a[2]="COPY_ONCE"]=2,p[a[3]="COPY_NEVER"]=3,p}(),s.HdcpSrmRule=function(){var a={},p=Object.create(a);return p[a[0]="HDCP_SRM_RULE_NONE"]=0,p[a[1]="CURRENT_SRM"]=1,p}(),s}(),h.VideoResolutionConstraint=function(){function s(a){if(a)for(var p=Object.keys(a),v=0;v<p.length;v+=1)a[p[v]]!=null&&(this[p[v]]=a[p[v]])}return s.prototype.minResolutionPixels=0,s.prototype.maxResolutionPixels=0,s.prototype.requiredProtection=null,s.create=function(p){return new s(p)},s.encode=function(p,v){return v||(v=k.create()),p.minResolutionPixels!=null&&Object.hasOwnProperty.call(p,"minResolutionPixels")&&v.uint32(8).uint32(p.minResolutionPixels),p.maxResolutionPixels!=null&&Object.hasOwnProperty.call(p,"maxResolutionPixels")&&v.uint32(16).uint32(p.maxResolutionPixels),p.requiredProtection!=null&&Object.hasOwnProperty.call(p,"requiredProtection")&&w.license_protocol.License.KeyContainer.OutputProtection.encode(p.requiredProtection,v.uint32(26).fork()).ldelim(),v},s.encodeDelimited=function(p,v){return this.encode(p,v).ldelim()},s.decode=function(p,v){p instanceof A||(p=A.create(p));for(var M=v===void 0?p.len:p.pos+v,F=new w.license_protocol.License.KeyContainer.VideoResolutionConstraint;p.pos<M;){var b=p.uint32();switch(b>>>3){case 1:{F.minResolutionPixels=p.uint32();break}case 2:{F.maxResolutionPixels=p.uint32();break}case 3:{F.requiredProtection=w.license_protocol.License.KeyContainer.OutputProtection.decode(p,p.uint32());break}default:p.skipType(b&7);break}}return F},s.decodeDelimited=function(p){return p instanceof A||(p=new A(p)),this.decode(p,p.uint32())},s.verify=function(p){if(typeof p!="object"||p===null)return"object expected";if(p.minResolutionPixels!=null&&p.hasOwnProperty("minResolutionPixels")&&!S.isInteger(p.minResolutionPixels))return"minResolutionPixels: integer expected";if(p.maxResolutionPixels!=null&&p.hasOwnProperty("maxResolutionPixels")&&!S.isInteger(p.maxResolutionPixels))return"maxResolutionPixels: integer expected";if(p.requiredProtection!=null&&p.hasOwnProperty("requiredProtection")){var v=w.license_protocol.License.KeyContainer.OutputProtection.verify(p.requiredProtection);if(v)return"requiredProtection."+v}return null},s.fromObject=function(p){if(p instanceof w.license_protocol.License.KeyContainer.VideoResolutionConstraint)return p;var v=new w.license_protocol.License.KeyContainer.VideoResolutionConstraint;if(p.minResolutionPixels!=null&&(v.minResolutionPixels=p.minResolutionPixels>>>0),p.maxResolutionPixels!=null&&(v.maxResolutionPixels=p.maxResolutionPixels>>>0),p.requiredProtection!=null){if(typeof p.requiredProtection!="object")throw TypeError(".license_protocol.License.KeyContainer.VideoResolutionConstraint.requiredProtection: object expected");v.requiredProtection=w.license_protocol.License.KeyContainer.OutputProtection.fromObject(p.requiredProtection)}return v},s.toObject=function(p,v){v||(v={});var M={};return v.defaults&&(M.minResolutionPixels=0,M.maxResolutionPixels=0,M.requiredProtection=null),p.minResolutionPixels!=null&&p.hasOwnProperty("minResolutionPixels")&&(M.minResolutionPixels=p.minResolutionPixels),p.maxResolutionPixels!=null&&p.hasOwnProperty("maxResolutionPixels")&&(M.maxResolutionPixels=p.maxResolutionPixels),p.requiredProtection!=null&&p.hasOwnProperty("requiredProtection")&&(M.requiredProtection=w.license_protocol.License.KeyContainer.OutputProtection.toObject(p.requiredProtection,v)),M},s.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},s.getTypeUrl=function(p){return p===void 0&&(p="type.googleapis.com"),p+"/license_protocol.License.KeyContainer.VideoResolutionConstraint"},s}(),h.OperatorSessionKeyPermissions=function(){function s(a){if(a)for(var p=Object.keys(a),v=0;v<p.length;v+=1)a[p[v]]!=null&&(this[p[v]]=a[p[v]])}return s.prototype.allowEncrypt=!1,s.prototype.allowDecrypt=!1,s.prototype.allowSign=!1,s.prototype.allowSignatureVerify=!1,s.create=function(p){return new s(p)},s.encode=function(p,v){return v||(v=k.create()),p.allowEncrypt!=null&&Object.hasOwnProperty.call(p,"allowEncrypt")&&v.uint32(8).bool(p.allowEncrypt),p.allowDecrypt!=null&&Object.hasOwnProperty.call(p,"allowDecrypt")&&v.uint32(16).bool(p.allowDecrypt),p.allowSign!=null&&Object.hasOwnProperty.call(p,"allowSign")&&v.uint32(24).bool(p.allowSign),p.allowSignatureVerify!=null&&Object.hasOwnProperty.call(p,"allowSignatureVerify")&&v.uint32(32).bool(p.allowSignatureVerify),v},s.encodeDelimited=function(p,v){return this.encode(p,v).ldelim()},s.decode=function(p,v){p instanceof A||(p=A.create(p));for(var M=v===void 0?p.len:p.pos+v,F=new w.license_protocol.License.KeyContainer.OperatorSessionKeyPermissions;p.pos<M;){var b=p.uint32();switch(b>>>3){case 1:{F.allowEncrypt=p.bool();break}case 2:{F.allowDecrypt=p.bool();break}case 3:{F.allowSign=p.bool();break}case 4:{F.allowSignatureVerify=p.bool();break}default:p.skipType(b&7);break}}return F},s.decodeDelimited=function(p){return p instanceof A||(p=new A(p)),this.decode(p,p.uint32())},s.verify=function(p){return typeof p!="object"||p===null?"object expected":p.allowEncrypt!=null&&p.hasOwnProperty("allowEncrypt")&&typeof p.allowEncrypt!="boolean"?"allowEncrypt: boolean expected":p.allowDecrypt!=null&&p.hasOwnProperty("allowDecrypt")&&typeof p.allowDecrypt!="boolean"?"allowDecrypt: boolean expected":p.allowSign!=null&&p.hasOwnProperty("allowSign")&&typeof p.allowSign!="boolean"?"allowSign: boolean expected":p.allowSignatureVerify!=null&&p.hasOwnProperty("allowSignatureVerify")&&typeof p.allowSignatureVerify!="boolean"?"allowSignatureVerify: boolean expected":null},s.fromObject=function(p){if(p instanceof w.license_protocol.License.KeyContainer.OperatorSessionKeyPermissions)return p;var v=new w.license_protocol.License.KeyContainer.OperatorSessionKeyPermissions;return p.allowEncrypt!=null&&(v.allowEncrypt=!!p.allowEncrypt),p.allowDecrypt!=null&&(v.allowDecrypt=!!p.allowDecrypt),p.allowSign!=null&&(v.allowSign=!!p.allowSign),p.allowSignatureVerify!=null&&(v.allowSignatureVerify=!!p.allowSignatureVerify),v},s.toObject=function(p,v){v||(v={});var M={};return v.defaults&&(M.allowEncrypt=!1,M.allowDecrypt=!1,M.allowSign=!1,M.allowSignatureVerify=!1),p.allowEncrypt!=null&&p.hasOwnProperty("allowEncrypt")&&(M.allowEncrypt=p.allowEncrypt),p.allowDecrypt!=null&&p.hasOwnProperty("allowDecrypt")&&(M.allowDecrypt=p.allowDecrypt),p.allowSign!=null&&p.hasOwnProperty("allowSign")&&(M.allowSign=p.allowSign),p.allowSignatureVerify!=null&&p.hasOwnProperty("allowSignatureVerify")&&(M.allowSignatureVerify=p.allowSignatureVerify),M},s.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},s.getTypeUrl=function(p){return p===void 0&&(p="type.googleapis.com"),p+"/license_protocol.License.KeyContainer.OperatorSessionKeyPermissions"},s}(),h}(),O}(),P.ProtocolVersion=function(){var O={},h=Object.create(O);return h[O[20]="VERSION_2_0"]=20,h[O[21]="VERSION_2_1"]=21,h[O[22]="VERSION_2_2"]=22,h}(),P.LicenseRequest=function(){function O(h){if(h)for(var s=Object.keys(h),a=0;a<s.length;a+=1)h[s[a]]!=null&&(this[s[a]]=h[s[a]])}return O.prototype.clientId=null,O.prototype.contentId=null,O.prototype.type=1,O.prototype.requestTime=S.Long?S.Long.fromBits(0,0,!1):0,O.prototype.keyControlNonceDeprecated=S.newBuffer([]),O.prototype.protocolVersion=20,O.prototype.keyControlNonce=0,O.prototype.encryptedClientId=null,O.create=function(s){return new O(s)},O.encode=function(s,a){return a||(a=k.create()),s.clientId!=null&&Object.hasOwnProperty.call(s,"clientId")&&w.license_protocol.ClientIdentification.encode(s.clientId,a.uint32(10).fork()).ldelim(),s.contentId!=null&&Object.hasOwnProperty.call(s,"contentId")&&w.license_protocol.LicenseRequest.ContentIdentification.encode(s.contentId,a.uint32(18).fork()).ldelim(),s.type!=null&&Object.hasOwnProperty.call(s,"type")&&a.uint32(24).int32(s.type),s.requestTime!=null&&Object.hasOwnProperty.call(s,"requestTime")&&a.uint32(32).int64(s.requestTime),s.keyControlNonceDeprecated!=null&&Object.hasOwnProperty.call(s,"keyControlNonceDeprecated")&&a.uint32(42).bytes(s.keyControlNonceDeprecated),s.protocolVersion!=null&&Object.hasOwnProperty.call(s,"protocolVersion")&&a.uint32(48).int32(s.protocolVersion),s.keyControlNonce!=null&&Object.hasOwnProperty.call(s,"keyControlNonce")&&a.uint32(56).uint32(s.keyControlNonce),s.encryptedClientId!=null&&Object.hasOwnProperty.call(s,"encryptedClientId")&&w.license_protocol.EncryptedClientIdentification.encode(s.encryptedClientId,a.uint32(66).fork()).ldelim(),a},O.encodeDelimited=function(s,a){return this.encode(s,a).ldelim()},O.decode=function(s,a){s instanceof A||(s=A.create(s));for(var p=a===void 0?s.len:s.pos+a,v=new w.license_protocol.LicenseRequest;s.pos<p;){var M=s.uint32();switch(M>>>3){case 1:{v.clientId=w.license_protocol.ClientIdentification.decode(s,s.uint32());break}case 2:{v.contentId=w.license_protocol.LicenseRequest.ContentIdentification.decode(s,s.uint32());break}case 3:{v.type=s.int32();break}case 4:{v.requestTime=s.int64();break}case 5:{v.keyControlNonceDeprecated=s.bytes();break}case 6:{v.protocolVersion=s.int32();break}case 7:{v.keyControlNonce=s.uint32();break}case 8:{v.encryptedClientId=w.license_protocol.EncryptedClientIdentification.decode(s,s.uint32());break}default:s.skipType(M&7);break}}return v},O.decodeDelimited=function(s){return s instanceof A||(s=new A(s)),this.decode(s,s.uint32())},O.verify=function(s){if(typeof s!="object"||s===null)return"object expected";if(s.clientId!=null&&s.hasOwnProperty("clientId")){var a=w.license_protocol.ClientIdentification.verify(s.clientId);if(a)return"clientId."+a}if(s.contentId!=null&&s.hasOwnProperty("contentId")){var a=w.license_protocol.LicenseRequest.ContentIdentification.verify(s.contentId);if(a)return"contentId."+a}if(s.type!=null&&s.hasOwnProperty("type"))switch(s.type){default:return"type: enum value expected";case 1:case 2:case 3:break}if(s.requestTime!=null&&s.hasOwnProperty("requestTime")&&!S.isInteger(s.requestTime)&&!(s.requestTime&&S.isInteger(s.requestTime.low)&&S.isInteger(s.requestTime.high)))return"requestTime: integer|Long expected";if(s.keyControlNonceDeprecated!=null&&s.hasOwnProperty("keyControlNonceDeprecated")&&!(s.keyControlNonceDeprecated&&typeof s.keyControlNonceDeprecated.length=="number"||S.isString(s.keyControlNonceDeprecated)))return"keyControlNonceDeprecated: buffer expected";if(s.protocolVersion!=null&&s.hasOwnProperty("protocolVersion"))switch(s.protocolVersion){default:return"protocolVersion: enum value expected";case 20:case 21:case 22:break}if(s.keyControlNonce!=null&&s.hasOwnProperty("keyControlNonce")&&!S.isInteger(s.keyControlNonce))return"keyControlNonce: integer expected";if(s.encryptedClientId!=null&&s.hasOwnProperty("encryptedClientId")){var a=w.license_protocol.EncryptedClientIdentification.verify(s.encryptedClientId);if(a)return"encryptedClientId."+a}return null},O.fromObject=function(s){if(s instanceof w.license_protocol.LicenseRequest)return s;var a=new w.license_protocol.LicenseRequest;if(s.clientId!=null){if(typeof s.clientId!="object")throw TypeError(".license_protocol.LicenseRequest.clientId: object expected");a.clientId=w.license_protocol.ClientIdentification.fromObject(s.clientId)}if(s.contentId!=null){if(typeof s.contentId!="object")throw TypeError(".license_protocol.LicenseRequest.contentId: object expected");a.contentId=w.license_protocol.LicenseRequest.ContentIdentification.fromObject(s.contentId)}switch(s.type){default:if(typeof s.type=="number"){a.type=s.type;break}break;case"NEW":case 1:a.type=1;break;case"RENEWAL":case 2:a.type=2;break;case"RELEASE":case 3:a.type=3;break}switch(s.requestTime!=null&&(S.Long?(a.requestTime=S.Long.fromValue(s.requestTime)).unsigned=!1:typeof s.requestTime=="string"?a.requestTime=parseInt(s.requestTime,10):typeof s.requestTime=="number"?a.requestTime=s.requestTime:typeof s.requestTime=="object"&&(a.requestTime=new S.LongBits(s.requestTime.low>>>0,s.requestTime.high>>>0).toNumber())),s.keyControlNonceDeprecated!=null&&(typeof s.keyControlNonceDeprecated=="string"?S.base64.decode(s.keyControlNonceDeprecated,a.keyControlNonceDeprecated=S.newBuffer(S.base64.length(s.keyControlNonceDeprecated)),0):s.keyControlNonceDeprecated.length>=0&&(a.keyControlNonceDeprecated=s.keyControlNonceDeprecated)),s.protocolVersion){default:if(typeof s.protocolVersion=="number"){a.protocolVersion=s.protocolVersion;break}break;case"VERSION_2_0":case 20:a.protocolVersion=20;break;case"VERSION_2_1":case 21:a.protocolVersion=21;break;case"VERSION_2_2":case 22:a.protocolVersion=22;break}if(s.keyControlNonce!=null&&(a.keyControlNonce=s.keyControlNonce>>>0),s.encryptedClientId!=null){if(typeof s.encryptedClientId!="object")throw TypeError(".license_protocol.LicenseRequest.encryptedClientId: object expected");a.encryptedClientId=w.license_protocol.EncryptedClientIdentification.fromObject(s.encryptedClientId)}return a},O.toObject=function(s,a){a||(a={});var p={};if(a.defaults){if(p.clientId=null,p.contentId=null,p.type=a.enums===String?"NEW":1,S.Long){var v=new S.Long(0,0,!1);p.requestTime=a.longs===String?v.toString():a.longs===Number?v.toNumber():v}else p.requestTime=a.longs===String?"0":0;a.bytes===String?p.keyControlNonceDeprecated="":(p.keyControlNonceDeprecated=[],a.bytes!==Array&&(p.keyControlNonceDeprecated=S.newBuffer(p.keyControlNonceDeprecated))),p.protocolVersion=a.enums===String?"VERSION_2_0":20,p.keyControlNonce=0,p.encryptedClientId=null}return s.clientId!=null&&s.hasOwnProperty("clientId")&&(p.clientId=w.license_protocol.ClientIdentification.toObject(s.clientId,a)),s.contentId!=null&&s.hasOwnProperty("contentId")&&(p.contentId=w.license_protocol.LicenseRequest.ContentIdentification.toObject(s.contentId,a)),s.type!=null&&s.hasOwnProperty("type")&&(p.type=a.enums===String?w.license_protocol.LicenseRequest.RequestType[s.type]===void 0?s.type:w.license_protocol.LicenseRequest.RequestType[s.type]:s.type),s.requestTime!=null&&s.hasOwnProperty("requestTime")&&(typeof s.requestTime=="number"?p.requestTime=a.longs===String?String(s.requestTime):s.requestTime:p.requestTime=a.longs===String?S.Long.prototype.toString.call(s.requestTime):a.longs===Number?new S.LongBits(s.requestTime.low>>>0,s.requestTime.high>>>0).toNumber():s.requestTime),s.keyControlNonceDeprecated!=null&&s.hasOwnProperty("keyControlNonceDeprecated")&&(p.keyControlNonceDeprecated=a.bytes===String?S.base64.encode(s.keyControlNonceDeprecated,0,s.keyControlNonceDeprecated.length):a.bytes===Array?Array.prototype.slice.call(s.keyControlNonceDeprecated):s.keyControlNonceDeprecated),s.protocolVersion!=null&&s.hasOwnProperty("protocolVersion")&&(p.protocolVersion=a.enums===String?w.license_protocol.ProtocolVersion[s.protocolVersion]===void 0?s.protocolVersion:w.license_protocol.ProtocolVersion[s.protocolVersion]:s.protocolVersion),s.keyControlNonce!=null&&s.hasOwnProperty("keyControlNonce")&&(p.keyControlNonce=s.keyControlNonce),s.encryptedClientId!=null&&s.hasOwnProperty("encryptedClientId")&&(p.encryptedClientId=w.license_protocol.EncryptedClientIdentification.toObject(s.encryptedClientId,a)),p},O.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},O.getTypeUrl=function(s){return s===void 0&&(s="type.googleapis.com"),s+"/license_protocol.LicenseRequest"},O.ContentIdentification=function(){function h(a){if(a)for(var p=Object.keys(a),v=0;v<p.length;v+=1)a[p[v]]!=null&&(this[p[v]]=a[p[v]])}h.prototype.widevinePsshData=null,h.prototype.webmKeyId=null,h.prototype.existingLicense=null,h.prototype.initData=null;var s;return Object.defineProperty(h.prototype,"contentIdVariant",{get:S.oneOfGetter(s=["widevinePsshData","webmKeyId","existingLicense","initData"]),set:S.oneOfSetter(s)}),h.create=function(p){return new h(p)},h.encode=function(p,v){return v||(v=k.create()),p.widevinePsshData!=null&&Object.hasOwnProperty.call(p,"widevinePsshData")&&w.license_protocol.LicenseRequest.ContentIdentification.WidevinePsshData.encode(p.widevinePsshData,v.uint32(10).fork()).ldelim(),p.webmKeyId!=null&&Object.hasOwnProperty.call(p,"webmKeyId")&&w.license_protocol.LicenseRequest.ContentIdentification.WebmKeyId.encode(p.webmKeyId,v.uint32(18).fork()).ldelim(),p.existingLicense!=null&&Object.hasOwnProperty.call(p,"existingLicense")&&w.license_protocol.LicenseRequest.ContentIdentification.ExistingLicense.encode(p.existingLicense,v.uint32(26).fork()).ldelim(),p.initData!=null&&Object.hasOwnProperty.call(p,"initData")&&w.license_protocol.LicenseRequest.ContentIdentification.InitData.encode(p.initData,v.uint32(34).fork()).ldelim(),v},h.encodeDelimited=function(p,v){return this.encode(p,v).ldelim()},h.decode=function(p,v){p instanceof A||(p=A.create(p));for(var M=v===void 0?p.len:p.pos+v,F=new w.license_protocol.LicenseRequest.ContentIdentification;p.pos<M;){var b=p.uint32();switch(b>>>3){case 1:{F.widevinePsshData=w.license_protocol.LicenseRequest.ContentIdentification.WidevinePsshData.decode(p,p.uint32());break}case 2:{F.webmKeyId=w.license_protocol.LicenseRequest.ContentIdentification.WebmKeyId.decode(p,p.uint32());break}case 3:{F.existingLicense=w.license_protocol.LicenseRequest.ContentIdentification.ExistingLicense.decode(p,p.uint32());break}case 4:{F.initData=w.license_protocol.LicenseRequest.ContentIdentification.InitData.decode(p,p.uint32());break}default:p.skipType(b&7);break}}return F},h.decodeDelimited=function(p){return p instanceof A||(p=new A(p)),this.decode(p,p.uint32())},h.verify=function(p){if(typeof p!="object"||p===null)return"object expected";var v={};if(p.widevinePsshData!=null&&p.hasOwnProperty("widevinePsshData")){v.contentIdVariant=1;{var M=w.license_protocol.LicenseRequest.ContentIdentification.WidevinePsshData.verify(p.widevinePsshData);if(M)return"widevinePsshData."+M}}if(p.webmKeyId!=null&&p.hasOwnProperty("webmKeyId")){if(v.contentIdVariant===1)return"contentIdVariant: multiple values";v.contentIdVariant=1;{var M=w.license_protocol.LicenseRequest.ContentIdentification.WebmKeyId.verify(p.webmKeyId);if(M)return"webmKeyId."+M}}if(p.existingLicense!=null&&p.hasOwnProperty("existingLicense")){if(v.contentIdVariant===1)return"contentIdVariant: multiple values";v.contentIdVariant=1;{var M=w.license_protocol.LicenseRequest.ContentIdentification.ExistingLicense.verify(p.existingLicense);if(M)return"existingLicense."+M}}if(p.initData!=null&&p.hasOwnProperty("initData")){if(v.contentIdVariant===1)return"contentIdVariant: multiple values";v.contentIdVariant=1;{var M=w.license_protocol.LicenseRequest.ContentIdentification.InitData.verify(p.initData);if(M)return"initData."+M}}return null},h.fromObject=function(p){if(p instanceof w.license_protocol.LicenseRequest.ContentIdentification)return p;var v=new w.license_protocol.LicenseRequest.ContentIdentification;if(p.widevinePsshData!=null){if(typeof p.widevinePsshData!="object")throw TypeError(".license_protocol.LicenseRequest.ContentIdentification.widevinePsshData: object expected");v.widevinePsshData=w.license_protocol.LicenseRequest.ContentIdentification.WidevinePsshData.fromObject(p.widevinePsshData)}if(p.webmKeyId!=null){if(typeof p.webmKeyId!="object")throw TypeError(".license_protocol.LicenseRequest.ContentIdentification.webmKeyId: object expected");v.webmKeyId=w.license_protocol.LicenseRequest.ContentIdentification.WebmKeyId.fromObject(p.webmKeyId)}if(p.existingLicense!=null){if(typeof p.existingLicense!="object")throw TypeError(".license_protocol.LicenseRequest.ContentIdentification.existingLicense: object expected");v.existingLicense=w.license_protocol.LicenseRequest.ContentIdentification.ExistingLicense.fromObject(p.existingLicense)}if(p.initData!=null){if(typeof p.initData!="object")throw TypeError(".license_protocol.LicenseRequest.ContentIdentification.initData: object expected");v.initData=w.license_protocol.LicenseRequest.ContentIdentification.InitData.fromObject(p.initData)}return v},h.toObject=function(p,v){v||(v={});var M={};return p.widevinePsshData!=null&&p.hasOwnProperty("widevinePsshData")&&(M.widevinePsshData=w.license_protocol.LicenseRequest.ContentIdentification.WidevinePsshData.toObject(p.widevinePsshData,v),v.oneofs&&(M.contentIdVariant="widevinePsshData")),p.webmKeyId!=null&&p.hasOwnProperty("webmKeyId")&&(M.webmKeyId=w.license_protocol.LicenseRequest.ContentIdentification.WebmKeyId.toObject(p.webmKeyId,v),v.oneofs&&(M.contentIdVariant="webmKeyId")),p.existingLicense!=null&&p.hasOwnProperty("existingLicense")&&(M.existingLicense=w.license_protocol.LicenseRequest.ContentIdentification.ExistingLicense.toObject(p.existingLicense,v),v.oneofs&&(M.contentIdVariant="existingLicense")),p.initData!=null&&p.hasOwnProperty("initData")&&(M.initData=w.license_protocol.LicenseRequest.ContentIdentification.InitData.toObject(p.initData,v),v.oneofs&&(M.contentIdVariant="initData")),M},h.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},h.getTypeUrl=function(p){return p===void 0&&(p="type.googleapis.com"),p+"/license_protocol.LicenseRequest.ContentIdentification"},h.WidevinePsshData=function(){function a(p){if(this.psshData=[],p)for(var v=Object.keys(p),M=0;M<v.length;M+=1)p[v[M]]!=null&&(this[v[M]]=p[v[M]])}return a.prototype.psshData=S.emptyArray,a.prototype.licenseType=1,a.prototype.requestId=S.newBuffer([]),a.create=function(v){return new a(v)},a.encode=function(v,M){if(M||(M=k.create()),v.psshData!=null&&v.psshData.length)for(var F=0;F<v.psshData.length;F+=1)M.uint32(10).bytes(v.psshData[F]);return v.licenseType!=null&&Object.hasOwnProperty.call(v,"licenseType")&&M.uint32(16).int32(v.licenseType),v.requestId!=null&&Object.hasOwnProperty.call(v,"requestId")&&M.uint32(26).bytes(v.requestId),M},a.encodeDelimited=function(v,M){return this.encode(v,M).ldelim()},a.decode=function(v,M){v instanceof A||(v=A.create(v));for(var F=M===void 0?v.len:v.pos+M,b=new w.license_protocol.LicenseRequest.ContentIdentification.WidevinePsshData;v.pos<F;){var J=v.uint32();switch(J>>>3){case 1:{b.psshData&&b.psshData.length||(b.psshData=[]),b.psshData.push(v.bytes());break}case 2:{b.licenseType=v.int32();break}case 3:{b.requestId=v.bytes();break}default:v.skipType(J&7);break}}return b},a.decodeDelimited=function(v){return v instanceof A||(v=new A(v)),this.decode(v,v.uint32())},a.verify=function(v){if(typeof v!="object"||v===null)return"object expected";if(v.psshData!=null&&v.hasOwnProperty("psshData")){if(!Array.isArray(v.psshData))return"psshData: array expected";for(var M=0;M<v.psshData.length;M+=1)if(!(v.psshData[M]&&typeof v.psshData[M].length=="number"||S.isString(v.psshData[M])))return"psshData: buffer[] expected"}if(v.licenseType!=null&&v.hasOwnProperty("licenseType"))switch(v.licenseType){default:return"licenseType: enum value expected";case 1:case 2:case 3:break}return v.requestId!=null&&v.hasOwnProperty("requestId")&&!(v.requestId&&typeof v.requestId.length=="number"||S.isString(v.requestId))?"requestId: buffer expected":null},a.fromObject=function(v){if(v instanceof w.license_protocol.LicenseRequest.ContentIdentification.WidevinePsshData)return v;var M=new w.license_protocol.LicenseRequest.ContentIdentification.WidevinePsshData;if(v.psshData){if(!Array.isArray(v.psshData))throw TypeError(".license_protocol.LicenseRequest.ContentIdentification.WidevinePsshData.psshData: array expected");M.psshData=[];for(var F=0;F<v.psshData.length;F+=1)typeof v.psshData[F]=="string"?S.base64.decode(v.psshData[F],M.psshData[F]=S.newBuffer(S.base64.length(v.psshData[F])),0):v.psshData[F].length>=0&&(M.psshData[F]=v.psshData[F])}switch(v.licenseType){default:if(typeof v.licenseType=="number"){M.licenseType=v.licenseType;break}break;case"STREAMING":case 1:M.licenseType=1;break;case"OFFLINE":case 2:M.licenseType=2;break;case"AUTOMATIC":case 3:M.licenseType=3;break}return v.requestId!=null&&(typeof v.requestId=="string"?S.base64.decode(v.requestId,M.requestId=S.newBuffer(S.base64.length(v.requestId)),0):v.requestId.length>=0&&(M.requestId=v.requestId)),M},a.toObject=function(v,M){M||(M={});var F={};if((M.arrays||M.defaults)&&(F.psshData=[]),M.defaults&&(F.licenseType=M.enums===String?"STREAMING":1,M.bytes===String?F.requestId="":(F.requestId=[],M.bytes!==Array&&(F.requestId=S.newBuffer(F.requestId)))),v.psshData&&v.psshData.length){F.psshData=[];for(var b=0;b<v.psshData.length;b+=1)F.psshData[b]=M.bytes===String?S.base64.encode(v.psshData[b],0,v.psshData[b].length):M.bytes===Array?Array.prototype.slice.call(v.psshData[b]):v.psshData[b]}return v.licenseType!=null&&v.hasOwnProperty("licenseType")&&(F.licenseType=M.enums===String?w.license_protocol.LicenseType[v.licenseType]===void 0?v.licenseType:w.license_protocol.LicenseType[v.licenseType]:v.licenseType),v.requestId!=null&&v.hasOwnProperty("requestId")&&(F.requestId=M.bytes===String?S.base64.encode(v.requestId,0,v.requestId.length):M.bytes===Array?Array.prototype.slice.call(v.requestId):v.requestId),F},a.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},a.getTypeUrl=function(v){return v===void 0&&(v="type.googleapis.com"),v+"/license_protocol.LicenseRequest.ContentIdentification.WidevinePsshData"},a}(),h.WebmKeyId=function(){function a(p){if(p)for(var v=Object.keys(p),M=0;M<v.length;M+=1)p[v[M]]!=null&&(this[v[M]]=p[v[M]])}return a.prototype.header=S.newBuffer([]),a.prototype.licenseType=1,a.prototype.requestId=S.newBuffer([]),a.create=function(v){return new a(v)},a.encode=function(v,M){return M||(M=k.create()),v.header!=null&&Object.hasOwnProperty.call(v,"header")&&M.uint32(10).bytes(v.header),v.licenseType!=null&&Object.hasOwnProperty.call(v,"licenseType")&&M.uint32(16).int32(v.licenseType),v.requestId!=null&&Object.hasOwnProperty.call(v,"requestId")&&M.uint32(26).bytes(v.requestId),M},a.encodeDelimited=function(v,M){return this.encode(v,M).ldelim()},a.decode=function(v,M){v instanceof A||(v=A.create(v));for(var F=M===void 0?v.len:v.pos+M,b=new w.license_protocol.LicenseRequest.ContentIdentification.WebmKeyId;v.pos<F;){var J=v.uint32();switch(J>>>3){case 1:{b.header=v.bytes();break}case 2:{b.licenseType=v.int32();break}case 3:{b.requestId=v.bytes();break}default:v.skipType(J&7);break}}return b},a.decodeDelimited=function(v){return v instanceof A||(v=new A(v)),this.decode(v,v.uint32())},a.verify=function(v){if(typeof v!="object"||v===null)return"object expected";if(v.header!=null&&v.hasOwnProperty("header")&&!(v.header&&typeof v.header.length=="number"||S.isString(v.header)))return"header: buffer expected";if(v.licenseType!=null&&v.hasOwnProperty("licenseType"))switch(v.licenseType){default:return"licenseType: enum value expected";case 1:case 2:case 3:break}return v.requestId!=null&&v.hasOwnProperty("requestId")&&!(v.requestId&&typeof v.requestId.length=="number"||S.isString(v.requestId))?"requestId: buffer expected":null},a.fromObject=function(v){if(v instanceof w.license_protocol.LicenseRequest.ContentIdentification.WebmKeyId)return v;var M=new w.license_protocol.LicenseRequest.ContentIdentification.WebmKeyId;switch(v.header!=null&&(typeof v.header=="string"?S.base64.decode(v.header,M.header=S.newBuffer(S.base64.length(v.header)),0):v.header.length>=0&&(M.header=v.header)),v.licenseType){default:if(typeof v.licenseType=="number"){M.licenseType=v.licenseType;break}break;case"STREAMING":case 1:M.licenseType=1;break;case"OFFLINE":case 2:M.licenseType=2;break;case"AUTOMATIC":case 3:M.licenseType=3;break}return v.requestId!=null&&(typeof v.requestId=="string"?S.base64.decode(v.requestId,M.requestId=S.newBuffer(S.base64.length(v.requestId)),0):v.requestId.length>=0&&(M.requestId=v.requestId)),M},a.toObject=function(v,M){M||(M={});var F={};return M.defaults&&(M.bytes===String?F.header="":(F.header=[],M.bytes!==Array&&(F.header=S.newBuffer(F.header))),F.licenseType=M.enums===String?"STREAMING":1,M.bytes===String?F.requestId="":(F.requestId=[],M.bytes!==Array&&(F.requestId=S.newBuffer(F.requestId)))),v.header!=null&&v.hasOwnProperty("header")&&(F.header=M.bytes===String?S.base64.encode(v.header,0,v.header.length):M.bytes===Array?Array.prototype.slice.call(v.header):v.header),v.licenseType!=null&&v.hasOwnProperty("licenseType")&&(F.licenseType=M.enums===String?w.license_protocol.LicenseType[v.licenseType]===void 0?v.licenseType:w.license_protocol.LicenseType[v.licenseType]:v.licenseType),v.requestId!=null&&v.hasOwnProperty("requestId")&&(F.requestId=M.bytes===String?S.base64.encode(v.requestId,0,v.requestId.length):M.bytes===Array?Array.prototype.slice.call(v.requestId):v.requestId),F},a.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},a.getTypeUrl=function(v){return v===void 0&&(v="type.googleapis.com"),v+"/license_protocol.LicenseRequest.ContentIdentification.WebmKeyId"},a}(),h.ExistingLicense=function(){function a(p){if(p)for(var v=Object.keys(p),M=0;M<v.length;M+=1)p[v[M]]!=null&&(this[v[M]]=p[v[M]])}return a.prototype.licenseId=null,a.prototype.secondsSinceStarted=S.Long?S.Long.fromBits(0,0,!1):0,a.prototype.secondsSinceLastPlayed=S.Long?S.Long.fromBits(0,0,!1):0,a.prototype.sessionUsageTableEntry=S.newBuffer([]),a.create=function(v){return new a(v)},a.encode=function(v,M){return M||(M=k.create()),v.licenseId!=null&&Object.hasOwnProperty.call(v,"licenseId")&&w.license_protocol.LicenseIdentification.encode(v.licenseId,M.uint32(10).fork()).ldelim(),v.secondsSinceStarted!=null&&Object.hasOwnProperty.call(v,"secondsSinceStarted")&&M.uint32(16).int64(v.secondsSinceStarted),v.secondsSinceLastPlayed!=null&&Object.hasOwnProperty.call(v,"secondsSinceLastPlayed")&&M.uint32(24).int64(v.secondsSinceLastPlayed),v.sessionUsageTableEntry!=null&&Object.hasOwnProperty.call(v,"sessionUsageTableEntry")&&M.uint32(34).bytes(v.sessionUsageTableEntry),M},a.encodeDelimited=function(v,M){return this.encode(v,M).ldelim()},a.decode=function(v,M){v instanceof A||(v=A.create(v));for(var F=M===void 0?v.len:v.pos+M,b=new w.license_protocol.LicenseRequest.ContentIdentification.ExistingLicense;v.pos<F;){var J=v.uint32();switch(J>>>3){case 1:{b.licenseId=w.license_protocol.LicenseIdentification.decode(v,v.uint32());break}case 2:{b.secondsSinceStarted=v.int64();break}case 3:{b.secondsSinceLastPlayed=v.int64();break}case 4:{b.sessionUsageTableEntry=v.bytes();break}default:v.skipType(J&7);break}}return b},a.decodeDelimited=function(v){return v instanceof A||(v=new A(v)),this.decode(v,v.uint32())},a.verify=function(v){if(typeof v!="object"||v===null)return"object expected";if(v.licenseId!=null&&v.hasOwnProperty("licenseId")){var M=w.license_protocol.LicenseIdentification.verify(v.licenseId);if(M)return"licenseId."+M}return v.secondsSinceStarted!=null&&v.hasOwnProperty("secondsSinceStarted")&&!S.isInteger(v.secondsSinceStarted)&&!(v.secondsSinceStarted&&S.isInteger(v.secondsSinceStarted.low)&&S.isInteger(v.secondsSinceStarted.high))?"secondsSinceStarted: integer|Long expected":v.secondsSinceLastPlayed!=null&&v.hasOwnProperty("secondsSinceLastPlayed")&&!S.isInteger(v.secondsSinceLastPlayed)&&!(v.secondsSinceLastPlayed&&S.isInteger(v.secondsSinceLastPlayed.low)&&S.isInteger(v.secondsSinceLastPlayed.high))?"secondsSinceLastPlayed: integer|Long expected":v.sessionUsageTableEntry!=null&&v.hasOwnProperty("sessionUsageTableEntry")&&!(v.sessionUsageTableEntry&&typeof v.sessionUsageTableEntry.length=="number"||S.isString(v.sessionUsageTableEntry))?"sessionUsageTableEntry: buffer expected":null},a.fromObject=function(v){if(v instanceof w.license_protocol.LicenseRequest.ContentIdentification.ExistingLicense)return v;var M=new w.license_protocol.LicenseRequest.ContentIdentification.ExistingLicense;if(v.licenseId!=null){if(typeof v.licenseId!="object")throw TypeError(".license_protocol.LicenseRequest.ContentIdentification.ExistingLicense.licenseId: object expected");M.licenseId=w.license_protocol.LicenseIdentification.fromObject(v.licenseId)}return v.secondsSinceStarted!=null&&(S.Long?(M.secondsSinceStarted=S.Long.fromValue(v.secondsSinceStarted)).unsigned=!1:typeof v.secondsSinceStarted=="string"?M.secondsSinceStarted=parseInt(v.secondsSinceStarted,10):typeof v.secondsSinceStarted=="number"?M.secondsSinceStarted=v.secondsSinceStarted:typeof v.secondsSinceStarted=="object"&&(M.secondsSinceStarted=new S.LongBits(v.secondsSinceStarted.low>>>0,v.secondsSinceStarted.high>>>0).toNumber())),v.secondsSinceLastPlayed!=null&&(S.Long?(M.secondsSinceLastPlayed=S.Long.fromValue(v.secondsSinceLastPlayed)).unsigned=!1:typeof v.secondsSinceLastPlayed=="string"?M.secondsSinceLastPlayed=parseInt(v.secondsSinceLastPlayed,10):typeof v.secondsSinceLastPlayed=="number"?M.secondsSinceLastPlayed=v.secondsSinceLastPlayed:typeof v.secondsSinceLastPlayed=="object"&&(M.secondsSinceLastPlayed=new S.LongBits(v.secondsSinceLastPlayed.low>>>0,v.secondsSinceLastPlayed.high>>>0).toNumber())),v.sessionUsageTableEntry!=null&&(typeof v.sessionUsageTableEntry=="string"?S.base64.decode(v.sessionUsageTableEntry,M.sessionUsageTableEntry=S.newBuffer(S.base64.length(v.sessionUsageTableEntry)),0):v.sessionUsageTableEntry.length>=0&&(M.sessionUsageTableEntry=v.sessionUsageTableEntry)),M},a.toObject=function(v,M){M||(M={});var F={};if(M.defaults){if(F.licenseId=null,S.Long){var b=new S.Long(0,0,!1);F.secondsSinceStarted=M.longs===String?b.toString():M.longs===Number?b.toNumber():b}else F.secondsSinceStarted=M.longs===String?"0":0;if(S.Long){var b=new S.Long(0,0,!1);F.secondsSinceLastPlayed=M.longs===String?b.toString():M.longs===Number?b.toNumber():b}else F.secondsSinceLastPlayed=M.longs===String?"0":0;M.bytes===String?F.sessionUsageTableEntry="":(F.sessionUsageTableEntry=[],M.bytes!==Array&&(F.sessionUsageTableEntry=S.newBuffer(F.sessionUsageTableEntry)))}return v.licenseId!=null&&v.hasOwnProperty("licenseId")&&(F.licenseId=w.license_protocol.LicenseIdentification.toObject(v.licenseId,M)),v.secondsSinceStarted!=null&&v.hasOwnProperty("secondsSinceStarted")&&(typeof v.secondsSinceStarted=="number"?F.secondsSinceStarted=M.longs===String?String(v.secondsSinceStarted):v.secondsSinceStarted:F.secondsSinceStarted=M.longs===String?S.Long.prototype.toString.call(v.secondsSinceStarted):M.longs===Number?new S.LongBits(v.secondsSinceStarted.low>>>0,v.secondsSinceStarted.high>>>0).toNumber():v.secondsSinceStarted),v.secondsSinceLastPlayed!=null&&v.hasOwnProperty("secondsSinceLastPlayed")&&(typeof v.secondsSinceLastPlayed=="number"?F.secondsSinceLastPlayed=M.longs===String?String(v.secondsSinceLastPlayed):v.secondsSinceLastPlayed:F.secondsSinceLastPlayed=M.longs===String?S.Long.prototype.toString.call(v.secondsSinceLastPlayed):M.longs===Number?new S.LongBits(v.secondsSinceLastPlayed.low>>>0,v.secondsSinceLastPlayed.high>>>0).toNumber():v.secondsSinceLastPlayed),v.sessionUsageTableEntry!=null&&v.hasOwnProperty("sessionUsageTableEntry")&&(F.sessionUsageTableEntry=M.bytes===String?S.base64.encode(v.sessionUsageTableEntry,0,v.sessionUsageTableEntry.length):M.bytes===Array?Array.prototype.slice.call(v.sessionUsageTableEntry):v.sessionUsageTableEntry),F},a.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},a.getTypeUrl=function(v){return v===void 0&&(v="type.googleapis.com"),v+"/license_protocol.LicenseRequest.ContentIdentification.ExistingLicense"},a}(),h.InitData=function(){function a(p){if(p)for(var v=Object.keys(p),M=0;M<v.length;M+=1)p[v[M]]!=null&&(this[v[M]]=p[v[M]])}return a.prototype.initDataType=1,a.prototype.initData=S.newBuffer([]),a.prototype.licenseType=1,a.prototype.requestId=S.newBuffer([]),a.create=function(v){return new a(v)},a.encode=function(v,M){return M||(M=k.create()),v.initDataType!=null&&Object.hasOwnProperty.call(v,"initDataType")&&M.uint32(8).int32(v.initDataType),v.initData!=null&&Object.hasOwnProperty.call(v,"initData")&&M.uint32(18).bytes(v.initData),v.licenseType!=null&&Object.hasOwnProperty.call(v,"licenseType")&&M.uint32(24).int32(v.licenseType),v.requestId!=null&&Object.hasOwnProperty.call(v,"requestId")&&M.uint32(34).bytes(v.requestId),M},a.encodeDelimited=function(v,M){return this.encode(v,M).ldelim()},a.decode=function(v,M){v instanceof A||(v=A.create(v));for(var F=M===void 0?v.len:v.pos+M,b=new w.license_protocol.LicenseRequest.ContentIdentification.InitData;v.pos<F;){var J=v.uint32();switch(J>>>3){case 1:{b.initDataType=v.int32();break}case 2:{b.initData=v.bytes();break}case 3:{b.licenseType=v.int32();break}case 4:{b.requestId=v.bytes();break}default:v.skipType(J&7);break}}return b},a.decodeDelimited=function(v){return v instanceof A||(v=new A(v)),this.decode(v,v.uint32())},a.verify=function(v){if(typeof v!="object"||v===null)return"object expected";if(v.initDataType!=null&&v.hasOwnProperty("initDataType"))switch(v.initDataType){default:return"initDataType: enum value expected";case 1:case 2:break}if(v.initData!=null&&v.hasOwnProperty("initData")&&!(v.initData&&typeof v.initData.length=="number"||S.isString(v.initData)))return"initData: buffer expected";if(v.licenseType!=null&&v.hasOwnProperty("licenseType"))switch(v.licenseType){default:return"licenseType: enum value expected";case 1:case 2:case 3:break}return v.requestId!=null&&v.hasOwnProperty("requestId")&&!(v.requestId&&typeof v.requestId.length=="number"||S.isString(v.requestId))?"requestId: buffer expected":null},a.fromObject=function(v){if(v instanceof w.license_protocol.LicenseRequest.ContentIdentification.InitData)return v;var M=new w.license_protocol.LicenseRequest.ContentIdentification.InitData;switch(v.initDataType){default:if(typeof v.initDataType=="number"){M.initDataType=v.initDataType;break}break;case"CENC":case 1:M.initDataType=1;break;case"WEBM":case 2:M.initDataType=2;break}switch(v.initData!=null&&(typeof v.initData=="string"?S.base64.decode(v.initData,M.initData=S.newBuffer(S.base64.length(v.initData)),0):v.initData.length>=0&&(M.initData=v.initData)),v.licenseType){default:if(typeof v.licenseType=="number"){M.licenseType=v.licenseType;break}break;case"STREAMING":case 1:M.licenseType=1;break;case"OFFLINE":case 2:M.licenseType=2;break;case"AUTOMATIC":case 3:M.licenseType=3;break}return v.requestId!=null&&(typeof v.requestId=="string"?S.base64.decode(v.requestId,M.requestId=S.newBuffer(S.base64.length(v.requestId)),0):v.requestId.length>=0&&(M.requestId=v.requestId)),M},a.toObject=function(v,M){M||(M={});var F={};return M.defaults&&(F.initDataType=M.enums===String?"CENC":1,M.bytes===String?F.initData="":(F.initData=[],M.bytes!==Array&&(F.initData=S.newBuffer(F.initData))),F.licenseType=M.enums===String?"STREAMING":1,M.bytes===String?F.requestId="":(F.requestId=[],M.bytes!==Array&&(F.requestId=S.newBuffer(F.requestId)))),v.initDataType!=null&&v.hasOwnProperty("initDataType")&&(F.initDataType=M.enums===String?w.license_protocol.LicenseRequest.ContentIdentification.InitData.InitDataType[v.initDataType]===void 0?v.initDataType:w.license_protocol.LicenseRequest.ContentIdentification.InitData.InitDataType[v.initDataType]:v.initDataType),v.initData!=null&&v.hasOwnProperty("initData")&&(F.initData=M.bytes===String?S.base64.encode(v.initData,0,v.initData.length):M.bytes===Array?Array.prototype.slice.call(v.initData):v.initData),v.licenseType!=null&&v.hasOwnProperty("licenseType")&&(F.licenseType=M.enums===String?w.license_protocol.LicenseType[v.licenseType]===void 0?v.licenseType:w.license_protocol.LicenseType[v.licenseType]:v.licenseType),v.requestId!=null&&v.hasOwnProperty("requestId")&&(F.requestId=M.bytes===String?S.base64.encode(v.requestId,0,v.requestId.length):M.bytes===Array?Array.prototype.slice.call(v.requestId):v.requestId),F},a.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},a.getTypeUrl=function(v){return v===void 0&&(v="type.googleapis.com"),v+"/license_protocol.LicenseRequest.ContentIdentification.InitData"},a.InitDataType=function(){var p={},v=Object.create(p);return v[p[1]="CENC"]=1,v[p[2]="WEBM"]=2,v}(),a}(),h}(),O.RequestType=function(){var h={},s=Object.create(h);return s[h[1]="NEW"]=1,s[h[2]="RENEWAL"]=2,s[h[3]="RELEASE"]=3,s}(),O}(),P.MetricData=function(){function O(h){if(this.metricData=[],h)for(var s=Object.keys(h),a=0;a<s.length;a+=1)h[s[a]]!=null&&(this[s[a]]=h[s[a]])}return O.prototype.stageName="",O.prototype.metricData=S.emptyArray,O.create=function(s){return new O(s)},O.encode=function(s,a){if(a||(a=k.create()),s.stageName!=null&&Object.hasOwnProperty.call(s,"stageName")&&a.uint32(10).string(s.stageName),s.metricData!=null&&s.metricData.length)for(var p=0;p<s.metricData.length;p+=1)w.license_protocol.MetricData.TypeValue.encode(s.metricData[p],a.uint32(18).fork()).ldelim();return a},O.encodeDelimited=function(s,a){return this.encode(s,a).ldelim()},O.decode=function(s,a){s instanceof A||(s=A.create(s));for(var p=a===void 0?s.len:s.pos+a,v=new w.license_protocol.MetricData;s.pos<p;){var M=s.uint32();switch(M>>>3){case 1:{v.stageName=s.string();break}case 2:{v.metricData&&v.metricData.length||(v.metricData=[]),v.metricData.push(w.license_protocol.MetricData.TypeValue.decode(s,s.uint32()));break}default:s.skipType(M&7);break}}return v},O.decodeDelimited=function(s){return s instanceof A||(s=new A(s)),this.decode(s,s.uint32())},O.verify=function(s){if(typeof s!="object"||s===null)return"object expected";if(s.stageName!=null&&s.hasOwnProperty("stageName")&&!S.isString(s.stageName))return"stageName: string expected";if(s.metricData!=null&&s.hasOwnProperty("metricData")){if(!Array.isArray(s.metricData))return"metricData: array expected";for(var a=0;a<s.metricData.length;a+=1){var p=w.license_protocol.MetricData.TypeValue.verify(s.metricData[a]);if(p)return"metricData."+p}}return null},O.fromObject=function(s){if(s instanceof w.license_protocol.MetricData)return s;var a=new w.license_protocol.MetricData;if(s.stageName!=null&&(a.stageName=String(s.stageName)),s.metricData){if(!Array.isArray(s.metricData))throw TypeError(".license_protocol.MetricData.metricData: array expected");a.metricData=[];for(var p=0;p<s.metricData.length;p+=1){if(typeof s.metricData[p]!="object")throw TypeError(".license_protocol.MetricData.metricData: object expected");a.metricData[p]=w.license_protocol.MetricData.TypeValue.fromObject(s.metricData[p])}}return a},O.toObject=function(s,a){a||(a={});var p={};if((a.arrays||a.defaults)&&(p.metricData=[]),a.defaults&&(p.stageName=""),s.stageName!=null&&s.hasOwnProperty("stageName")&&(p.stageName=s.stageName),s.metricData&&s.metricData.length){p.metricData=[];for(var v=0;v<s.metricData.length;v+=1)p.metricData[v]=w.license_protocol.MetricData.TypeValue.toObject(s.metricData[v],a)}return p},O.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},O.getTypeUrl=function(s){return s===void 0&&(s="type.googleapis.com"),s+"/license_protocol.MetricData"},O.MetricType=function(){var h={},s=Object.create(h);return s[h[1]="LATENCY"]=1,s[h[2]="TIMESTAMP"]=2,s}(),O.TypeValue=function(){function h(s){if(s)for(var a=Object.keys(s),p=0;p<a.length;p+=1)s[a[p]]!=null&&(this[a[p]]=s[a[p]])}return h.prototype.type=1,h.prototype.value=S.Long?S.Long.fromBits(0,0,!1):0,h.create=function(a){return new h(a)},h.encode=function(a,p){return p||(p=k.create()),a.type!=null&&Object.hasOwnProperty.call(a,"type")&&p.uint32(8).int32(a.type),a.value!=null&&Object.hasOwnProperty.call(a,"value")&&p.uint32(16).int64(a.value),p},h.encodeDelimited=function(a,p){return this.encode(a,p).ldelim()},h.decode=function(a,p){a instanceof A||(a=A.create(a));for(var v=p===void 0?a.len:a.pos+p,M=new w.license_protocol.MetricData.TypeValue;a.pos<v;){var F=a.uint32();switch(F>>>3){case 1:{M.type=a.int32();break}case 2:{M.value=a.int64();break}default:a.skipType(F&7);break}}return M},h.decodeDelimited=function(a){return a instanceof A||(a=new A(a)),this.decode(a,a.uint32())},h.verify=function(a){if(typeof a!="object"||a===null)return"object expected";if(a.type!=null&&a.hasOwnProperty("type"))switch(a.type){default:return"type: enum value expected";case 1:case 2:break}return a.value!=null&&a.hasOwnProperty("value")&&!S.isInteger(a.value)&&!(a.value&&S.isInteger(a.value.low)&&S.isInteger(a.value.high))?"value: integer|Long expected":null},h.fromObject=function(a){if(a instanceof w.license_protocol.MetricData.TypeValue)return a;var p=new w.license_protocol.MetricData.TypeValue;switch(a.type){default:if(typeof a.type=="number"){p.type=a.type;break}break;case"LATENCY":case 1:p.type=1;break;case"TIMESTAMP":case 2:p.type=2;break}return a.value!=null&&(S.Long?(p.value=S.Long.fromValue(a.value)).unsigned=!1:typeof a.value=="string"?p.value=parseInt(a.value,10):typeof a.value=="number"?p.value=a.value:typeof a.value=="object"&&(p.value=new S.LongBits(a.value.low>>>0,a.value.high>>>0).toNumber())),p},h.toObject=function(a,p){p||(p={});var v={};if(p.defaults)if(v.type=p.enums===String?"LATENCY":1,S.Long){var M=new S.Long(0,0,!1);v.value=p.longs===String?M.toString():p.longs===Number?M.toNumber():M}else v.value=p.longs===String?"0":0;return a.type!=null&&a.hasOwnProperty("type")&&(v.type=p.enums===String?w.license_protocol.MetricData.MetricType[a.type]===void 0?a.type:w.license_protocol.MetricData.MetricType[a.type]:a.type),a.value!=null&&a.hasOwnProperty("value")&&(typeof a.value=="number"?v.value=p.longs===String?String(a.value):a.value:v.value=p.longs===String?S.Long.prototype.toString.call(a.value):p.longs===Number?new S.LongBits(a.value.low>>>0,a.value.high>>>0).toNumber():a.value),v},h.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},h.getTypeUrl=function(a){return a===void 0&&(a="type.googleapis.com"),a+"/license_protocol.MetricData.TypeValue"},h}(),O}(),P.VersionInfo=function(){function O(h){if(h)for(var s=Object.keys(h),a=0;a<s.length;a+=1)h[s[a]]!=null&&(this[s[a]]=h[s[a]])}return O.prototype.licenseSdkVersion="",O.prototype.licenseServiceVersion="",O.create=function(s){return new O(s)},O.encode=function(s,a){return a||(a=k.create()),s.licenseSdkVersion!=null&&Object.hasOwnProperty.call(s,"licenseSdkVersion")&&a.uint32(10).string(s.licenseSdkVersion),s.licenseServiceVersion!=null&&Object.hasOwnProperty.call(s,"licenseServiceVersion")&&a.uint32(18).string(s.licenseServiceVersion),a},O.encodeDelimited=function(s,a){return this.encode(s,a).ldelim()},O.decode=function(s,a){s instanceof A||(s=A.create(s));for(var p=a===void 0?s.len:s.pos+a,v=new w.license_protocol.VersionInfo;s.pos<p;){var M=s.uint32();switch(M>>>3){case 1:{v.licenseSdkVersion=s.string();break}case 2:{v.licenseServiceVersion=s.string();break}default:s.skipType(M&7);break}}return v},O.decodeDelimited=function(s){return s instanceof A||(s=new A(s)),this.decode(s,s.uint32())},O.verify=function(s){return typeof s!="object"||s===null?"object expected":s.licenseSdkVersion!=null&&s.hasOwnProperty("licenseSdkVersion")&&!S.isString(s.licenseSdkVersion)?"licenseSdkVersion: string expected":s.licenseServiceVersion!=null&&s.hasOwnProperty("licenseServiceVersion")&&!S.isString(s.licenseServiceVersion)?"licenseServiceVersion: string expected":null},O.fromObject=function(s){if(s instanceof w.license_protocol.VersionInfo)return s;var a=new w.license_protocol.VersionInfo;return s.licenseSdkVersion!=null&&(a.licenseSdkVersion=String(s.licenseSdkVersion)),s.licenseServiceVersion!=null&&(a.licenseServiceVersion=String(s.licenseServiceVersion)),a},O.toObject=function(s,a){a||(a={});var p={};return a.defaults&&(p.licenseSdkVersion="",p.licenseServiceVersion=""),s.licenseSdkVersion!=null&&s.hasOwnProperty("licenseSdkVersion")&&(p.licenseSdkVersion=s.licenseSdkVersion),s.licenseServiceVersion!=null&&s.hasOwnProperty("licenseServiceVersion")&&(p.licenseServiceVersion=s.licenseServiceVersion),p},O.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},O.getTypeUrl=function(s){return s===void 0&&(s="type.googleapis.com"),s+"/license_protocol.VersionInfo"},O}(),P.SignedMessage=function(){function O(h){if(this.metricData=[],h)for(var s=Object.keys(h),a=0;a<s.length;a+=1)h[s[a]]!=null&&(this[s[a]]=h[s[a]])}return O.prototype.type=1,O.prototype.msg=S.newBuffer([]),O.prototype.signature=S.newBuffer([]),O.prototype.sessionKey=S.newBuffer([]),O.prototype.remoteAttestation=S.newBuffer([]),O.prototype.metricData=S.emptyArray,O.prototype.serviceVersionInfo=null,O.prototype.sessionKeyType=1,O.prototype.oemcryptoCoreMessage=S.newBuffer([]),O.create=function(s){return new O(s)},O.encode=function(s,a){if(a||(a=k.create()),s.type!=null&&Object.hasOwnProperty.call(s,"type")&&a.uint32(8).int32(s.type),s.msg!=null&&Object.hasOwnProperty.call(s,"msg")&&a.uint32(18).bytes(s.msg),s.signature!=null&&Object.hasOwnProperty.call(s,"signature")&&a.uint32(26).bytes(s.signature),s.sessionKey!=null&&Object.hasOwnProperty.call(s,"sessionKey")&&a.uint32(34).bytes(s.sessionKey),s.remoteAttestation!=null&&Object.hasOwnProperty.call(s,"remoteAttestation")&&a.uint32(42).bytes(s.remoteAttestation),s.metricData!=null&&s.metricData.length)for(var p=0;p<s.metricData.length;p+=1)w.license_protocol.MetricData.encode(s.metricData[p],a.uint32(50).fork()).ldelim();return s.serviceVersionInfo!=null&&Object.hasOwnProperty.call(s,"serviceVersionInfo")&&w.license_protocol.VersionInfo.encode(s.serviceVersionInfo,a.uint32(58).fork()).ldelim(),s.sessionKeyType!=null&&Object.hasOwnProperty.call(s,"sessionKeyType")&&a.uint32(64).int32(s.sessionKeyType),s.oemcryptoCoreMessage!=null&&Object.hasOwnProperty.call(s,"oemcryptoCoreMessage")&&a.uint32(74).bytes(s.oemcryptoCoreMessage),a},O.encodeDelimited=function(s,a){return this.encode(s,a).ldelim()},O.decode=function(s,a){s instanceof A||(s=A.create(s));for(var p=a===void 0?s.len:s.pos+a,v=new w.license_protocol.SignedMessage;s.pos<p;){var M=s.uint32();switch(M>>>3){case 1:{v.type=s.int32();break}case 2:{v.msg=s.bytes();break}case 3:{v.signature=s.bytes();break}case 4:{v.sessionKey=s.bytes();break}case 5:{v.remoteAttestation=s.bytes();break}case 6:{v.metricData&&v.metricData.length||(v.metricData=[]),v.metricData.push(w.license_protocol.MetricData.decode(s,s.uint32()));break}case 7:{v.serviceVersionInfo=w.license_protocol.VersionInfo.decode(s,s.uint32());break}case 8:{v.sessionKeyType=s.int32();break}case 9:{v.oemcryptoCoreMessage=s.bytes();break}default:s.skipType(M&7);break}}return v},O.decodeDelimited=function(s){return s instanceof A||(s=new A(s)),this.decode(s,s.uint32())},O.verify=function(s){if(typeof s!="object"||s===null)return"object expected";if(s.type!=null&&s.hasOwnProperty("type"))switch(s.type){default:return"type: enum value expected";case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:case 9:case 10:break}if(s.msg!=null&&s.hasOwnProperty("msg")&&!(s.msg&&typeof s.msg.length=="number"||S.isString(s.msg)))return"msg: buffer expected";if(s.signature!=null&&s.hasOwnProperty("signature")&&!(s.signature&&typeof s.signature.length=="number"||S.isString(s.signature)))return"signature: buffer expected";if(s.sessionKey!=null&&s.hasOwnProperty("sessionKey")&&!(s.sessionKey&&typeof s.sessionKey.length=="number"||S.isString(s.sessionKey)))return"sessionKey: buffer expected";if(s.remoteAttestation!=null&&s.hasOwnProperty("remoteAttestation")&&!(s.remoteAttestation&&typeof s.remoteAttestation.length=="number"||S.isString(s.remoteAttestation)))return"remoteAttestation: buffer expected";if(s.metricData!=null&&s.hasOwnProperty("metricData")){if(!Array.isArray(s.metricData))return"metricData: array expected";for(var a=0;a<s.metricData.length;a+=1){var p=w.license_protocol.MetricData.verify(s.metricData[a]);if(p)return"metricData."+p}}if(s.serviceVersionInfo!=null&&s.hasOwnProperty("serviceVersionInfo")){var p=w.license_protocol.VersionInfo.verify(s.serviceVersionInfo);if(p)return"serviceVersionInfo."+p}if(s.sessionKeyType!=null&&s.hasOwnProperty("sessionKeyType"))switch(s.sessionKeyType){default:return"sessionKeyType: enum value expected";case 0:case 1:case 2:break}return s.oemcryptoCoreMessage!=null&&s.hasOwnProperty("oemcryptoCoreMessage")&&!(s.oemcryptoCoreMessage&&typeof s.oemcryptoCoreMessage.length=="number"||S.isString(s.oemcryptoCoreMessage))?"oemcryptoCoreMessage: buffer expected":null},O.fromObject=function(s){if(s instanceof w.license_protocol.SignedMessage)return s;var a=new w.license_protocol.SignedMessage;switch(s.type){default:if(typeof s.type=="number"){a.type=s.type;break}break;case"LICENSE_REQUEST":case 1:a.type=1;break;case"LICENSE":case 2:a.type=2;break;case"ERROR_RESPONSE":case 3:a.type=3;break;case"SERVICE_CERTIFICATE_REQUEST":case 4:a.type=4;break;case"SERVICE_CERTIFICATE":case 5:a.type=5;break;case"SUB_LICENSE":case 6:a.type=6;break;case"CAS_LICENSE_REQUEST":case 7:a.type=7;break;case"CAS_LICENSE":case 8:a.type=8;break;case"EXTERNAL_LICENSE_REQUEST":case 9:a.type=9;break;case"EXTERNAL_LICENSE":case 10:a.type=10;break}if(s.msg!=null&&(typeof s.msg=="string"?S.base64.decode(s.msg,a.msg=S.newBuffer(S.base64.length(s.msg)),0):s.msg.length>=0&&(a.msg=s.msg)),s.signature!=null&&(typeof s.signature=="string"?S.base64.decode(s.signature,a.signature=S.newBuffer(S.base64.length(s.signature)),0):s.signature.length>=0&&(a.signature=s.signature)),s.sessionKey!=null&&(typeof s.sessionKey=="string"?S.base64.decode(s.sessionKey,a.sessionKey=S.newBuffer(S.base64.length(s.sessionKey)),0):s.sessionKey.length>=0&&(a.sessionKey=s.sessionKey)),s.remoteAttestation!=null&&(typeof s.remoteAttestation=="string"?S.base64.decode(s.remoteAttestation,a.remoteAttestation=S.newBuffer(S.base64.length(s.remoteAttestation)),0):s.remoteAttestation.length>=0&&(a.remoteAttestation=s.remoteAttestation)),s.metricData){if(!Array.isArray(s.metricData))throw TypeError(".license_protocol.SignedMessage.metricData: array expected");a.metricData=[];for(var p=0;p<s.metricData.length;p+=1){if(typeof s.metricData[p]!="object")throw TypeError(".license_protocol.SignedMessage.metricData: object expected");a.metricData[p]=w.license_protocol.MetricData.fromObject(s.metricData[p])}}if(s.serviceVersionInfo!=null){if(typeof s.serviceVersionInfo!="object")throw TypeError(".license_protocol.SignedMessage.serviceVersionInfo: object expected");a.serviceVersionInfo=w.license_protocol.VersionInfo.fromObject(s.serviceVersionInfo)}switch(s.sessionKeyType){case"UNDEFINED":case 0:a.sessionKeyType=0;break;default:if(typeof s.sessionKeyType=="number"){a.sessionKeyType=s.sessionKeyType;break}break;case"WRAPPED_AES_KEY":case 1:a.sessionKeyType=1;break;case"EPHERMERAL_ECC_PUBLIC_KEY":case 2:a.sessionKeyType=2;break}return s.oemcryptoCoreMessage!=null&&(typeof s.oemcryptoCoreMessage=="string"?S.base64.decode(s.oemcryptoCoreMessage,a.oemcryptoCoreMessage=S.newBuffer(S.base64.length(s.oemcryptoCoreMessage)),0):s.oemcryptoCoreMessage.length>=0&&(a.oemcryptoCoreMessage=s.oemcryptoCoreMessage)),a},O.toObject=function(s,a){a||(a={});var p={};if((a.arrays||a.defaults)&&(p.metricData=[]),a.defaults&&(p.type=a.enums===String?"LICENSE_REQUEST":1,a.bytes===String?p.msg="":(p.msg=[],a.bytes!==Array&&(p.msg=S.newBuffer(p.msg))),a.bytes===String?p.signature="":(p.signature=[],a.bytes!==Array&&(p.signature=S.newBuffer(p.signature))),a.bytes===String?p.sessionKey="":(p.sessionKey=[],a.bytes!==Array&&(p.sessionKey=S.newBuffer(p.sessionKey))),a.bytes===String?p.remoteAttestation="":(p.remoteAttestation=[],a.bytes!==Array&&(p.remoteAttestation=S.newBuffer(p.remoteAttestation))),p.serviceVersionInfo=null,p.sessionKeyType=a.enums===String?"WRAPPED_AES_KEY":1,a.bytes===String?p.oemcryptoCoreMessage="":(p.oemcryptoCoreMessage=[],a.bytes!==Array&&(p.oemcryptoCoreMessage=S.newBuffer(p.oemcryptoCoreMessage)))),s.type!=null&&s.hasOwnProperty("type")&&(p.type=a.enums===String?w.license_protocol.SignedMessage.MessageType[s.type]===void 0?s.type:w.license_protocol.SignedMessage.MessageType[s.type]:s.type),s.msg!=null&&s.hasOwnProperty("msg")&&(p.msg=a.bytes===String?S.base64.encode(s.msg,0,s.msg.length):a.bytes===Array?Array.prototype.slice.call(s.msg):s.msg),s.signature!=null&&s.hasOwnProperty("signature")&&(p.signature=a.bytes===String?S.base64.encode(s.signature,0,s.signature.length):a.bytes===Array?Array.prototype.slice.call(s.signature):s.signature),s.sessionKey!=null&&s.hasOwnProperty("sessionKey")&&(p.sessionKey=a.bytes===String?S.base64.encode(s.sessionKey,0,s.sessionKey.length):a.bytes===Array?Array.prototype.slice.call(s.sessionKey):s.sessionKey),s.remoteAttestation!=null&&s.hasOwnProperty("remoteAttestation")&&(p.remoteAttestation=a.bytes===String?S.base64.encode(s.remoteAttestation,0,s.remoteAttestation.length):a.bytes===Array?Array.prototype.slice.call(s.remoteAttestation):s.remoteAttestation),s.metricData&&s.metricData.length){p.metricData=[];for(var v=0;v<s.metricData.length;v+=1)p.metricData[v]=w.license_protocol.MetricData.toObject(s.metricData[v],a)}return s.serviceVersionInfo!=null&&s.hasOwnProperty("serviceVersionInfo")&&(p.serviceVersionInfo=w.license_protocol.VersionInfo.toObject(s.serviceVersionInfo,a)),s.sessionKeyType!=null&&s.hasOwnProperty("sessionKeyType")&&(p.sessionKeyType=a.enums===String?w.license_protocol.SignedMessage.SessionKeyType[s.sessionKeyType]===void 0?s.sessionKeyType:w.license_protocol.SignedMessage.SessionKeyType[s.sessionKeyType]:s.sessionKeyType),s.oemcryptoCoreMessage!=null&&s.hasOwnProperty("oemcryptoCoreMessage")&&(p.oemcryptoCoreMessage=a.bytes===String?S.base64.encode(s.oemcryptoCoreMessage,0,s.oemcryptoCoreMessage.length):a.bytes===Array?Array.prototype.slice.call(s.oemcryptoCoreMessage):s.oemcryptoCoreMessage),p},O.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},O.getTypeUrl=function(s){return s===void 0&&(s="type.googleapis.com"),s+"/license_protocol.SignedMessage"},O.MessageType=function(){var h={},s=Object.create(h);return s[h[1]="LICENSE_REQUEST"]=1,s[h[2]="LICENSE"]=2,s[h[3]="ERROR_RESPONSE"]=3,s[h[4]="SERVICE_CERTIFICATE_REQUEST"]=4,s[h[5]="SERVICE_CERTIFICATE"]=5,s[h[6]="SUB_LICENSE"]=6,s[h[7]="CAS_LICENSE_REQUEST"]=7,s[h[8]="CAS_LICENSE"]=8,s[h[9]="EXTERNAL_LICENSE_REQUEST"]=9,s[h[10]="EXTERNAL_LICENSE"]=10,s}(),O.SessionKeyType=function(){var h={},s=Object.create(h);return s[h[0]="UNDEFINED"]=0,s[h[1]="WRAPPED_AES_KEY"]=1,s[h[2]="EPHERMERAL_ECC_PUBLIC_KEY"]=2,s}(),O}(),P.HashAlgorithmProto=function(){var O={},h=Object.create(O);return h[O[0]="HASH_ALGORITHM_UNSPECIFIED"]=0,h[O[1]="HASH_ALGORITHM_SHA_1"]=1,h[O[2]="HASH_ALGORITHM_SHA_256"]=2,h[O[3]="HASH_ALGORITHM_SHA_384"]=3,h}(),P.ClientIdentification=function(){function O(h){if(this.clientInfo=[],this.deviceCredentials=[],h)for(var s=Object.keys(h),a=0;a<s.length;a+=1)h[s[a]]!=null&&(this[s[a]]=h[s[a]])}return O.prototype.type=0,O.prototype.token=S.newBuffer([]),O.prototype.clientInfo=S.emptyArray,O.prototype.providerClientToken=S.newBuffer([]),O.prototype.licenseCounter=0,O.prototype.clientCapabilities=null,O.prototype.vmpData=S.newBuffer([]),O.prototype.deviceCredentials=S.emptyArray,O.create=function(s){return new O(s)},O.encode=function(s,a){if(a||(a=k.create()),s.type!=null&&Object.hasOwnProperty.call(s,"type")&&a.uint32(8).int32(s.type),s.token!=null&&Object.hasOwnProperty.call(s,"token")&&a.uint32(18).bytes(s.token),s.clientInfo!=null&&s.clientInfo.length)for(var p=0;p<s.clientInfo.length;p+=1)w.license_protocol.ClientIdentification.NameValue.encode(s.clientInfo[p],a.uint32(26).fork()).ldelim();if(s.providerClientToken!=null&&Object.hasOwnProperty.call(s,"providerClientToken")&&a.uint32(34).bytes(s.providerClientToken),s.licenseCounter!=null&&Object.hasOwnProperty.call(s,"licenseCounter")&&a.uint32(40).uint32(s.licenseCounter),s.clientCapabilities!=null&&Object.hasOwnProperty.call(s,"clientCapabilities")&&w.license_protocol.ClientIdentification.ClientCapabilities.encode(s.clientCapabilities,a.uint32(50).fork()).ldelim(),s.vmpData!=null&&Object.hasOwnProperty.call(s,"vmpData")&&a.uint32(58).bytes(s.vmpData),s.deviceCredentials!=null&&s.deviceCredentials.length)for(var p=0;p<s.deviceCredentials.length;p+=1)w.license_protocol.ClientIdentification.ClientCredentials.encode(s.deviceCredentials[p],a.uint32(66).fork()).ldelim();return a},O.encodeDelimited=function(s,a){return this.encode(s,a).ldelim()},O.decode=function(s,a){s instanceof A||(s=A.create(s));for(var p=a===void 0?s.len:s.pos+a,v=new w.license_protocol.ClientIdentification;s.pos<p;){var M=s.uint32();switch(M>>>3){case 1:{v.type=s.int32();break}case 2:{v.token=s.bytes();break}case 3:{v.clientInfo&&v.clientInfo.length||(v.clientInfo=[]),v.clientInfo.push(w.license_protocol.ClientIdentification.NameValue.decode(s,s.uint32()));break}case 4:{v.providerClientToken=s.bytes();break}case 5:{v.licenseCounter=s.uint32();break}case 6:{v.clientCapabilities=w.license_protocol.ClientIdentification.ClientCapabilities.decode(s,s.uint32());break}case 7:{v.vmpData=s.bytes();break}case 8:{v.deviceCredentials&&v.deviceCredentials.length||(v.deviceCredentials=[]),v.deviceCredentials.push(w.license_protocol.ClientIdentification.ClientCredentials.decode(s,s.uint32()));break}default:s.skipType(M&7);break}}return v},O.decodeDelimited=function(s){return s instanceof A||(s=new A(s)),this.decode(s,s.uint32())},O.verify=function(s){if(typeof s!="object"||s===null)return"object expected";if(s.type!=null&&s.hasOwnProperty("type"))switch(s.type){default:return"type: enum value expected";case 0:case 1:case 2:case 3:break}if(s.token!=null&&s.hasOwnProperty("token")&&!(s.token&&typeof s.token.length=="number"||S.isString(s.token)))return"token: buffer expected";if(s.clientInfo!=null&&s.hasOwnProperty("clientInfo")){if(!Array.isArray(s.clientInfo))return"clientInfo: array expected";for(var a=0;a<s.clientInfo.length;a+=1){var p=w.license_protocol.ClientIdentification.NameValue.verify(s.clientInfo[a]);if(p)return"clientInfo."+p}}if(s.providerClientToken!=null&&s.hasOwnProperty("providerClientToken")&&!(s.providerClientToken&&typeof s.providerClientToken.length=="number"||S.isString(s.providerClientToken)))return"providerClientToken: buffer expected";if(s.licenseCounter!=null&&s.hasOwnProperty("licenseCounter")&&!S.isInteger(s.licenseCounter))return"licenseCounter: integer expected";if(s.clientCapabilities!=null&&s.hasOwnProperty("clientCapabilities")){var p=w.license_protocol.ClientIdentification.ClientCapabilities.verify(s.clientCapabilities);if(p)return"clientCapabilities."+p}if(s.vmpData!=null&&s.hasOwnProperty("vmpData")&&!(s.vmpData&&typeof s.vmpData.length=="number"||S.isString(s.vmpData)))return"vmpData: buffer expected";if(s.deviceCredentials!=null&&s.hasOwnProperty("deviceCredentials")){if(!Array.isArray(s.deviceCredentials))return"deviceCredentials: array expected";for(var a=0;a<s.deviceCredentials.length;a+=1){var p=w.license_protocol.ClientIdentification.ClientCredentials.verify(s.deviceCredentials[a]);if(p)return"deviceCredentials."+p}}return null},O.fromObject=function(s){if(s instanceof w.license_protocol.ClientIdentification)return s;var a=new w.license_protocol.ClientIdentification;switch(s.type){default:if(typeof s.type=="number"){a.type=s.type;break}break;case"KEYBOX":case 0:a.type=0;break;case"DRM_DEVICE_CERTIFICATE":case 1:a.type=1;break;case"REMOTE_ATTESTATION_CERTIFICATE":case 2:a.type=2;break;case"OEM_DEVICE_CERTIFICATE":case 3:a.type=3;break}if(s.token!=null&&(typeof s.token=="string"?S.base64.decode(s.token,a.token=S.newBuffer(S.base64.length(s.token)),0):s.token.length>=0&&(a.token=s.token)),s.clientInfo){if(!Array.isArray(s.clientInfo))throw TypeError(".license_protocol.ClientIdentification.clientInfo: array expected");a.clientInfo=[];for(var p=0;p<s.clientInfo.length;p+=1){if(typeof s.clientInfo[p]!="object")throw TypeError(".license_protocol.ClientIdentification.clientInfo: object expected");a.clientInfo[p]=w.license_protocol.ClientIdentification.NameValue.fromObject(s.clientInfo[p])}}if(s.providerClientToken!=null&&(typeof s.providerClientToken=="string"?S.base64.decode(s.providerClientToken,a.providerClientToken=S.newBuffer(S.base64.length(s.providerClientToken)),0):s.providerClientToken.length>=0&&(a.providerClientToken=s.providerClientToken)),s.licenseCounter!=null&&(a.licenseCounter=s.licenseCounter>>>0),s.clientCapabilities!=null){if(typeof s.clientCapabilities!="object")throw TypeError(".license_protocol.ClientIdentification.clientCapabilities: object expected");a.clientCapabilities=w.license_protocol.ClientIdentification.ClientCapabilities.fromObject(s.clientCapabilities)}if(s.vmpData!=null&&(typeof s.vmpData=="string"?S.base64.decode(s.vmpData,a.vmpData=S.newBuffer(S.base64.length(s.vmpData)),0):s.vmpData.length>=0&&(a.vmpData=s.vmpData)),s.deviceCredentials){if(!Array.isArray(s.deviceCredentials))throw TypeError(".license_protocol.ClientIdentification.deviceCredentials: array expected");a.deviceCredentials=[];for(var p=0;p<s.deviceCredentials.length;p+=1){if(typeof s.deviceCredentials[p]!="object")throw TypeError(".license_protocol.ClientIdentification.deviceCredentials: object expected");a.deviceCredentials[p]=w.license_protocol.ClientIdentification.ClientCredentials.fromObject(s.deviceCredentials[p])}}return a},O.toObject=function(s,a){a||(a={});var p={};if((a.arrays||a.defaults)&&(p.clientInfo=[],p.deviceCredentials=[]),a.defaults&&(p.type=a.enums===String?"KEYBOX":0,a.bytes===String?p.token="":(p.token=[],a.bytes!==Array&&(p.token=S.newBuffer(p.token))),a.bytes===String?p.providerClientToken="":(p.providerClientToken=[],a.bytes!==Array&&(p.providerClientToken=S.newBuffer(p.providerClientToken))),p.licenseCounter=0,p.clientCapabilities=null,a.bytes===String?p.vmpData="":(p.vmpData=[],a.bytes!==Array&&(p.vmpData=S.newBuffer(p.vmpData)))),s.type!=null&&s.hasOwnProperty("type")&&(p.type=a.enums===String?w.license_protocol.ClientIdentification.TokenType[s.type]===void 0?s.type:w.license_protocol.ClientIdentification.TokenType[s.type]:s.type),s.token!=null&&s.hasOwnProperty("token")&&(p.token=a.bytes===String?S.base64.encode(s.token,0,s.token.length):a.bytes===Array?Array.prototype.slice.call(s.token):s.token),s.clientInfo&&s.clientInfo.length){p.clientInfo=[];for(var v=0;v<s.clientInfo.length;v+=1)p.clientInfo[v]=w.license_protocol.ClientIdentification.NameValue.toObject(s.clientInfo[v],a)}if(s.providerClientToken!=null&&s.hasOwnProperty("providerClientToken")&&(p.providerClientToken=a.bytes===String?S.base64.encode(s.providerClientToken,0,s.providerClientToken.length):a.bytes===Array?Array.prototype.slice.call(s.providerClientToken):s.providerClientToken),s.licenseCounter!=null&&s.hasOwnProperty("licenseCounter")&&(p.licenseCounter=s.licenseCounter),s.clientCapabilities!=null&&s.hasOwnProperty("clientCapabilities")&&(p.clientCapabilities=w.license_protocol.ClientIdentification.ClientCapabilities.toObject(s.clientCapabilities,a)),s.vmpData!=null&&s.hasOwnProperty("vmpData")&&(p.vmpData=a.bytes===String?S.base64.encode(s.vmpData,0,s.vmpData.length):a.bytes===Array?Array.prototype.slice.call(s.vmpData):s.vmpData),s.deviceCredentials&&s.deviceCredentials.length){p.deviceCredentials=[];for(var v=0;v<s.deviceCredentials.length;v+=1)p.deviceCredentials[v]=w.license_protocol.ClientIdentification.ClientCredentials.toObject(s.deviceCredentials[v],a)}return p},O.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},O.getTypeUrl=function(s){return s===void 0&&(s="type.googleapis.com"),s+"/license_protocol.ClientIdentification"},O.TokenType=function(){var h={},s=Object.create(h);return s[h[0]="KEYBOX"]=0,s[h[1]="DRM_DEVICE_CERTIFICATE"]=1,s[h[2]="REMOTE_ATTESTATION_CERTIFICATE"]=2,s[h[3]="OEM_DEVICE_CERTIFICATE"]=3,s}(),O.NameValue=function(){function h(s){if(s)for(var a=Object.keys(s),p=0;p<a.length;p+=1)s[a[p]]!=null&&(this[a[p]]=s[a[p]])}return h.prototype.name="",h.prototype.value="",h.create=function(a){return new h(a)},h.encode=function(a,p){return p||(p=k.create()),a.name!=null&&Object.hasOwnProperty.call(a,"name")&&p.uint32(10).string(a.name),a.value!=null&&Object.hasOwnProperty.call(a,"value")&&p.uint32(18).string(a.value),p},h.encodeDelimited=function(a,p){return this.encode(a,p).ldelim()},h.decode=function(a,p){a instanceof A||(a=A.create(a));for(var v=p===void 0?a.len:a.pos+p,M=new w.license_protocol.ClientIdentification.NameValue;a.pos<v;){var F=a.uint32();switch(F>>>3){case 1:{M.name=a.string();break}case 2:{M.value=a.string();break}default:a.skipType(F&7);break}}return M},h.decodeDelimited=function(a){return a instanceof A||(a=new A(a)),this.decode(a,a.uint32())},h.verify=function(a){return typeof a!="object"||a===null?"object expected":a.name!=null&&a.hasOwnProperty("name")&&!S.isString(a.name)?"name: string expected":a.value!=null&&a.hasOwnProperty("value")&&!S.isString(a.value)?"value: string expected":null},h.fromObject=function(a){if(a instanceof w.license_protocol.ClientIdentification.NameValue)return a;var p=new w.license_protocol.ClientIdentification.NameValue;return a.name!=null&&(p.name=String(a.name)),a.value!=null&&(p.value=String(a.value)),p},h.toObject=function(a,p){p||(p={});var v={};return p.defaults&&(v.name="",v.value=""),a.name!=null&&a.hasOwnProperty("name")&&(v.name=a.name),a.value!=null&&a.hasOwnProperty("value")&&(v.value=a.value),v},h.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},h.getTypeUrl=function(a){return a===void 0&&(a="type.googleapis.com"),a+"/license_protocol.ClientIdentification.NameValue"},h}(),O.ClientCapabilities=function(){function h(s){if(this.supportedCertificateKeyType=[],s)for(var a=Object.keys(s),p=0;p<a.length;p+=1)s[a[p]]!=null&&(this[a[p]]=s[a[p]])}return h.prototype.clientToken=!1,h.prototype.sessionToken=!1,h.prototype.videoResolutionConstraints=!1,h.prototype.maxHdcpVersion=0,h.prototype.oemCryptoApiVersion=0,h.prototype.antiRollbackUsageTable=!1,h.prototype.srmVersion=0,h.prototype.canUpdateSrm=!1,h.prototype.supportedCertificateKeyType=S.emptyArray,h.prototype.analogOutputCapabilities=0,h.prototype.canDisableAnalogOutput=!1,h.prototype.resourceRatingTier=0,h.create=function(a){return new h(a)},h.encode=function(a,p){if(p||(p=k.create()),a.clientToken!=null&&Object.hasOwnProperty.call(a,"clientToken")&&p.uint32(8).bool(a.clientToken),a.sessionToken!=null&&Object.hasOwnProperty.call(a,"sessionToken")&&p.uint32(16).bool(a.sessionToken),a.videoResolutionConstraints!=null&&Object.hasOwnProperty.call(a,"videoResolutionConstraints")&&p.uint32(24).bool(a.videoResolutionConstraints),a.maxHdcpVersion!=null&&Object.hasOwnProperty.call(a,"maxHdcpVersion")&&p.uint32(32).int32(a.maxHdcpVersion),a.oemCryptoApiVersion!=null&&Object.hasOwnProperty.call(a,"oemCryptoApiVersion")&&p.uint32(40).uint32(a.oemCryptoApiVersion),a.antiRollbackUsageTable!=null&&Object.hasOwnProperty.call(a,"antiRollbackUsageTable")&&p.uint32(48).bool(a.antiRollbackUsageTable),a.srmVersion!=null&&Object.hasOwnProperty.call(a,"srmVersion")&&p.uint32(56).uint32(a.srmVersion),a.canUpdateSrm!=null&&Object.hasOwnProperty.call(a,"canUpdateSrm")&&p.uint32(64).bool(a.canUpdateSrm),a.supportedCertificateKeyType!=null&&a.supportedCertificateKeyType.length)for(var v=0;v<a.supportedCertificateKeyType.length;v+=1)p.uint32(72).int32(a.supportedCertificateKeyType[v]);return a.analogOutputCapabilities!=null&&Object.hasOwnProperty.call(a,"analogOutputCapabilities")&&p.uint32(80).int32(a.analogOutputCapabilities),a.canDisableAnalogOutput!=null&&Object.hasOwnProperty.call(a,"canDisableAnalogOutput")&&p.uint32(88).bool(a.canDisableAnalogOutput),a.resourceRatingTier!=null&&Object.hasOwnProperty.call(a,"resourceRatingTier")&&p.uint32(96).uint32(a.resourceRatingTier),p},h.encodeDelimited=function(a,p){return this.encode(a,p).ldelim()},h.decode=function(a,p){a instanceof A||(a=A.create(a));for(var v=p===void 0?a.len:a.pos+p,M=new w.license_protocol.ClientIdentification.ClientCapabilities;a.pos<v;){var F=a.uint32();switch(F>>>3){case 1:{M.clientToken=a.bool();break}case 2:{M.sessionToken=a.bool();break}case 3:{M.videoResolutionConstraints=a.bool();break}case 4:{M.maxHdcpVersion=a.int32();break}case 5:{M.oemCryptoApiVersion=a.uint32();break}case 6:{M.antiRollbackUsageTable=a.bool();break}case 7:{M.srmVersion=a.uint32();break}case 8:{M.canUpdateSrm=a.bool();break}case 9:{if(M.supportedCertificateKeyType&&M.supportedCertificateKeyType.length||(M.supportedCertificateKeyType=[]),(F&7)===2)for(var b=a.uint32()+a.pos;a.pos<b;)M.supportedCertificateKeyType.push(a.int32());else M.supportedCertificateKeyType.push(a.int32());break}case 10:{M.analogOutputCapabilities=a.int32();break}case 11:{M.canDisableAnalogOutput=a.bool();break}case 12:{M.resourceRatingTier=a.uint32();break}default:a.skipType(F&7);break}}return M},h.decodeDelimited=function(a){return a instanceof A||(a=new A(a)),this.decode(a,a.uint32())},h.verify=function(a){if(typeof a!="object"||a===null)return"object expected";if(a.clientToken!=null&&a.hasOwnProperty("clientToken")&&typeof a.clientToken!="boolean")return"clientToken: boolean expected";if(a.sessionToken!=null&&a.hasOwnProperty("sessionToken")&&typeof a.sessionToken!="boolean")return"sessionToken: boolean expected";if(a.videoResolutionConstraints!=null&&a.hasOwnProperty("videoResolutionConstraints")&&typeof a.videoResolutionConstraints!="boolean")return"videoResolutionConstraints: boolean expected";if(a.maxHdcpVersion!=null&&a.hasOwnProperty("maxHdcpVersion"))switch(a.maxHdcpVersion){default:return"maxHdcpVersion: enum value expected";case 0:case 1:case 2:case 3:case 4:case 5:case 255:break}if(a.oemCryptoApiVersion!=null&&a.hasOwnProperty("oemCryptoApiVersion")&&!S.isInteger(a.oemCryptoApiVersion))return"oemCryptoApiVersion: integer expected";if(a.antiRollbackUsageTable!=null&&a.hasOwnProperty("antiRollbackUsageTable")&&typeof a.antiRollbackUsageTable!="boolean")return"antiRollbackUsageTable: boolean expected";if(a.srmVersion!=null&&a.hasOwnProperty("srmVersion")&&!S.isInteger(a.srmVersion))return"srmVersion: integer expected";if(a.canUpdateSrm!=null&&a.hasOwnProperty("canUpdateSrm")&&typeof a.canUpdateSrm!="boolean")return"canUpdateSrm: boolean expected";if(a.supportedCertificateKeyType!=null&&a.hasOwnProperty("supportedCertificateKeyType")){if(!Array.isArray(a.supportedCertificateKeyType))return"supportedCertificateKeyType: array expected";for(var p=0;p<a.supportedCertificateKeyType.length;p+=1)switch(a.supportedCertificateKeyType[p]){default:return"supportedCertificateKeyType: enum value[] expected";case 0:case 1:case 2:case 3:case 4:break}}if(a.analogOutputCapabilities!=null&&a.hasOwnProperty("analogOutputCapabilities"))switch(a.analogOutputCapabilities){default:return"analogOutputCapabilities: enum value expected";case 0:case 1:case 2:case 3:break}return a.canDisableAnalogOutput!=null&&a.hasOwnProperty("canDisableAnalogOutput")&&typeof a.canDisableAnalogOutput!="boolean"?"canDisableAnalogOutput: boolean expected":a.resourceRatingTier!=null&&a.hasOwnProperty("resourceRatingTier")&&!S.isInteger(a.resourceRatingTier)?"resourceRatingTier: integer expected":null},h.fromObject=function(a){if(a instanceof w.license_protocol.ClientIdentification.ClientCapabilities)return a;var p=new w.license_protocol.ClientIdentification.ClientCapabilities;switch(a.clientToken!=null&&(p.clientToken=!!a.clientToken),a.sessionToken!=null&&(p.sessionToken=!!a.sessionToken),a.videoResolutionConstraints!=null&&(p.videoResolutionConstraints=!!a.videoResolutionConstraints),a.maxHdcpVersion){default:if(typeof a.maxHdcpVersion=="number"){p.maxHdcpVersion=a.maxHdcpVersion;break}break;case"HDCP_NONE":case 0:p.maxHdcpVersion=0;break;case"HDCP_V1":case 1:p.maxHdcpVersion=1;break;case"HDCP_V2":case 2:p.maxHdcpVersion=2;break;case"HDCP_V2_1":case 3:p.maxHdcpVersion=3;break;case"HDCP_V2_2":case 4:p.maxHdcpVersion=4;break;case"HDCP_V2_3":case 5:p.maxHdcpVersion=5;break;case"HDCP_NO_DIGITAL_OUTPUT":case 255:p.maxHdcpVersion=255;break}if(a.oemCryptoApiVersion!=null&&(p.oemCryptoApiVersion=a.oemCryptoApiVersion>>>0),a.antiRollbackUsageTable!=null&&(p.antiRollbackUsageTable=!!a.antiRollbackUsageTable),a.srmVersion!=null&&(p.srmVersion=a.srmVersion>>>0),a.canUpdateSrm!=null&&(p.canUpdateSrm=!!a.canUpdateSrm),a.supportedCertificateKeyType){if(!Array.isArray(a.supportedCertificateKeyType))throw TypeError(".license_protocol.ClientIdentification.ClientCapabilities.supportedCertificateKeyType: array expected");p.supportedCertificateKeyType=[];for(var v=0;v<a.supportedCertificateKeyType.length;v+=1)switch(a.supportedCertificateKeyType[v]){default:if(typeof a.supportedCertificateKeyType[v]=="number"){p.supportedCertificateKeyType[v]=a.supportedCertificateKeyType[v];break}case"RSA_2048":case 0:p.supportedCertificateKeyType[v]=0;break;case"RSA_3072":case 1:p.supportedCertificateKeyType[v]=1;break;case"ECC_SECP256R1":case 2:p.supportedCertificateKeyType[v]=2;break;case"ECC_SECP384R1":case 3:p.supportedCertificateKeyType[v]=3;break;case"ECC_SECP521R1":case 4:p.supportedCertificateKeyType[v]=4;break}}switch(a.analogOutputCapabilities){default:if(typeof a.analogOutputCapabilities=="number"){p.analogOutputCapabilities=a.analogOutputCapabilities;break}break;case"ANALOG_OUTPUT_UNKNOWN":case 0:p.analogOutputCapabilities=0;break;case"ANALOG_OUTPUT_NONE":case 1:p.analogOutputCapabilities=1;break;case"ANALOG_OUTPUT_SUPPORTED":case 2:p.analogOutputCapabilities=2;break;case"ANALOG_OUTPUT_SUPPORTS_CGMS_A":case 3:p.analogOutputCapabilities=3;break}return a.canDisableAnalogOutput!=null&&(p.canDisableAnalogOutput=!!a.canDisableAnalogOutput),a.resourceRatingTier!=null&&(p.resourceRatingTier=a.resourceRatingTier>>>0),p},h.toObject=function(a,p){p||(p={});var v={};if((p.arrays||p.defaults)&&(v.supportedCertificateKeyType=[]),p.defaults&&(v.clientToken=!1,v.sessionToken=!1,v.videoResolutionConstraints=!1,v.maxHdcpVersion=p.enums===String?"HDCP_NONE":0,v.oemCryptoApiVersion=0,v.antiRollbackUsageTable=!1,v.srmVersion=0,v.canUpdateSrm=!1,v.analogOutputCapabilities=p.enums===String?"ANALOG_OUTPUT_UNKNOWN":0,v.canDisableAnalogOutput=!1,v.resourceRatingTier=0),a.clientToken!=null&&a.hasOwnProperty("clientToken")&&(v.clientToken=a.clientToken),a.sessionToken!=null&&a.hasOwnProperty("sessionToken")&&(v.sessionToken=a.sessionToken),a.videoResolutionConstraints!=null&&a.hasOwnProperty("videoResolutionConstraints")&&(v.videoResolutionConstraints=a.videoResolutionConstraints),a.maxHdcpVersion!=null&&a.hasOwnProperty("maxHdcpVersion")&&(v.maxHdcpVersion=p.enums===String?w.license_protocol.ClientIdentification.ClientCapabilities.HdcpVersion[a.maxHdcpVersion]===void 0?a.maxHdcpVersion:w.license_protocol.ClientIdentification.ClientCapabilities.HdcpVersion[a.maxHdcpVersion]:a.maxHdcpVersion),a.oemCryptoApiVersion!=null&&a.hasOwnProperty("oemCryptoApiVersion")&&(v.oemCryptoApiVersion=a.oemCryptoApiVersion),a.antiRollbackUsageTable!=null&&a.hasOwnProperty("antiRollbackUsageTable")&&(v.antiRollbackUsageTable=a.antiRollbackUsageTable),a.srmVersion!=null&&a.hasOwnProperty("srmVersion")&&(v.srmVersion=a.srmVersion),a.canUpdateSrm!=null&&a.hasOwnProperty("canUpdateSrm")&&(v.canUpdateSrm=a.canUpdateSrm),a.supportedCertificateKeyType&&a.supportedCertificateKeyType.length){v.supportedCertificateKeyType=[];for(var M=0;M<a.supportedCertificateKeyType.length;M+=1)v.supportedCertificateKeyType[M]=p.enums===String?w.license_protocol.ClientIdentification.ClientCapabilities.CertificateKeyType[a.supportedCertificateKeyType[M]]===void 0?a.supportedCertificateKeyType[M]:w.license_protocol.ClientIdentification.ClientCapabilities.CertificateKeyType[a.supportedCertificateKeyType[M]]:a.supportedCertificateKeyType[M]}return a.analogOutputCapabilities!=null&&a.hasOwnProperty("analogOutputCapabilities")&&(v.analogOutputCapabilities=p.enums===String?w.license_protocol.ClientIdentification.ClientCapabilities.AnalogOutputCapabilities[a.analogOutputCapabilities]===void 0?a.analogOutputCapabilities:w.license_protocol.ClientIdentification.ClientCapabilities.AnalogOutputCapabilities[a.analogOutputCapabilities]:a.analogOutputCapabilities),a.canDisableAnalogOutput!=null&&a.hasOwnProperty("canDisableAnalogOutput")&&(v.canDisableAnalogOutput=a.canDisableAnalogOutput),a.resourceRatingTier!=null&&a.hasOwnProperty("resourceRatingTier")&&(v.resourceRatingTier=a.resourceRatingTier),v},h.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},h.getTypeUrl=function(a){return a===void 0&&(a="type.googleapis.com"),a+"/license_protocol.ClientIdentification.ClientCapabilities"},h.HdcpVersion=function(){var s={},a=Object.create(s);return a[s[0]="HDCP_NONE"]=0,a[s[1]="HDCP_V1"]=1,a[s[2]="HDCP_V2"]=2,a[s[3]="HDCP_V2_1"]=3,a[s[4]="HDCP_V2_2"]=4,a[s[5]="HDCP_V2_3"]=5,a[s[255]="HDCP_NO_DIGITAL_OUTPUT"]=255,a}(),h.CertificateKeyType=function(){var s={},a=Object.create(s);return a[s[0]="RSA_2048"]=0,a[s[1]="RSA_3072"]=1,a[s[2]="ECC_SECP256R1"]=2,a[s[3]="ECC_SECP384R1"]=3,a[s[4]="ECC_SECP521R1"]=4,a}(),h.AnalogOutputCapabilities=function(){var s={},a=Object.create(s);return a[s[0]="ANALOG_OUTPUT_UNKNOWN"]=0,a[s[1]="ANALOG_OUTPUT_NONE"]=1,a[s[2]="ANALOG_OUTPUT_SUPPORTED"]=2,a[s[3]="ANALOG_OUTPUT_SUPPORTS_CGMS_A"]=3,a}(),h}(),O.ClientCredentials=function(){function h(s){if(s)for(var a=Object.keys(s),p=0;p<a.length;p+=1)s[a[p]]!=null&&(this[a[p]]=s[a[p]])}return h.prototype.type=0,h.prototype.token=S.newBuffer([]),h.create=function(a){return new h(a)},h.encode=function(a,p){return p||(p=k.create()),a.type!=null&&Object.hasOwnProperty.call(a,"type")&&p.uint32(8).int32(a.type),a.token!=null&&Object.hasOwnProperty.call(a,"token")&&p.uint32(18).bytes(a.token),p},h.encodeDelimited=function(a,p){return this.encode(a,p).ldelim()},h.decode=function(a,p){a instanceof A||(a=A.create(a));for(var v=p===void 0?a.len:a.pos+p,M=new w.license_protocol.ClientIdentification.ClientCredentials;a.pos<v;){var F=a.uint32();switch(F>>>3){case 1:{M.type=a.int32();break}case 2:{M.token=a.bytes();break}default:a.skipType(F&7);break}}return M},h.decodeDelimited=function(a){return a instanceof A||(a=new A(a)),this.decode(a,a.uint32())},h.verify=function(a){if(typeof a!="object"||a===null)return"object expected";if(a.type!=null&&a.hasOwnProperty("type"))switch(a.type){default:return"type: enum value expected";case 0:case 1:case 2:case 3:break}return a.token!=null&&a.hasOwnProperty("token")&&!(a.token&&typeof a.token.length=="number"||S.isString(a.token))?"token: buffer expected":null},h.fromObject=function(a){if(a instanceof w.license_protocol.ClientIdentification.ClientCredentials)return a;var p=new w.license_protocol.ClientIdentification.ClientCredentials;switch(a.type){default:if(typeof a.type=="number"){p.type=a.type;break}break;case"KEYBOX":case 0:p.type=0;break;case"DRM_DEVICE_CERTIFICATE":case 1:p.type=1;break;case"REMOTE_ATTESTATION_CERTIFICATE":case 2:p.type=2;break;case"OEM_DEVICE_CERTIFICATE":case 3:p.type=3;break}return a.token!=null&&(typeof a.token=="string"?S.base64.decode(a.token,p.token=S.newBuffer(S.base64.length(a.token)),0):a.token.length>=0&&(p.token=a.token)),p},h.toObject=function(a,p){p||(p={});var v={};return p.defaults&&(v.type=p.enums===String?"KEYBOX":0,p.bytes===String?v.token="":(v.token=[],p.bytes!==Array&&(v.token=S.newBuffer(v.token)))),a.type!=null&&a.hasOwnProperty("type")&&(v.type=p.enums===String?w.license_protocol.ClientIdentification.TokenType[a.type]===void 0?a.type:w.license_protocol.ClientIdentification.TokenType[a.type]:a.type),a.token!=null&&a.hasOwnProperty("token")&&(v.token=p.bytes===String?S.base64.encode(a.token,0,a.token.length):p.bytes===Array?Array.prototype.slice.call(a.token):a.token),v},h.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},h.getTypeUrl=function(a){return a===void 0&&(a="type.googleapis.com"),a+"/license_protocol.ClientIdentification.ClientCredentials"},h}(),O}(),P.EncryptedClientIdentification=function(){function O(h){if(h)for(var s=Object.keys(h),a=0;a<s.length;a+=1)h[s[a]]!=null&&(this[s[a]]=h[s[a]])}return O.prototype.providerId="",O.prototype.serviceCertificateSerialNumber=S.newBuffer([]),O.prototype.encryptedClientId=S.newBuffer([]),O.prototype.encryptedClientIdIv=S.newBuffer([]),O.prototype.encryptedPrivacyKey=S.newBuffer([]),O.create=function(s){return new O(s)},O.encode=function(s,a){return a||(a=k.create()),s.providerId!=null&&Object.hasOwnProperty.call(s,"providerId")&&a.uint32(10).string(s.providerId),s.serviceCertificateSerialNumber!=null&&Object.hasOwnProperty.call(s,"serviceCertificateSerialNumber")&&a.uint32(18).bytes(s.serviceCertificateSerialNumber),s.encryptedClientId!=null&&Object.hasOwnProperty.call(s,"encryptedClientId")&&a.uint32(26).bytes(s.encryptedClientId),s.encryptedClientIdIv!=null&&Object.hasOwnProperty.call(s,"encryptedClientIdIv")&&a.uint32(34).bytes(s.encryptedClientIdIv),s.encryptedPrivacyKey!=null&&Object.hasOwnProperty.call(s,"encryptedPrivacyKey")&&a.uint32(42).bytes(s.encryptedPrivacyKey),a},O.encodeDelimited=function(s,a){return this.encode(s,a).ldelim()},O.decode=function(s,a){s instanceof A||(s=A.create(s));for(var p=a===void 0?s.len:s.pos+a,v=new w.license_protocol.EncryptedClientIdentification;s.pos<p;){var M=s.uint32();switch(M>>>3){case 1:{v.providerId=s.string();break}case 2:{v.serviceCertificateSerialNumber=s.bytes();break}case 3:{v.encryptedClientId=s.bytes();break}case 4:{v.encryptedClientIdIv=s.bytes();break}case 5:{v.encryptedPrivacyKey=s.bytes();break}default:s.skipType(M&7);break}}return v},O.decodeDelimited=function(s){return s instanceof A||(s=new A(s)),this.decode(s,s.uint32())},O.verify=function(s){return typeof s!="object"||s===null?"object expected":s.providerId!=null&&s.hasOwnProperty("providerId")&&!S.isString(s.providerId)?"providerId: string expected":s.serviceCertificateSerialNumber!=null&&s.hasOwnProperty("serviceCertificateSerialNumber")&&!(s.serviceCertificateSerialNumber&&typeof s.serviceCertificateSerialNumber.length=="number"||S.isString(s.serviceCertificateSerialNumber))?"serviceCertificateSerialNumber: buffer expected":s.encryptedClientId!=null&&s.hasOwnProperty("encryptedClientId")&&!(s.encryptedClientId&&typeof s.encryptedClientId.length=="number"||S.isString(s.encryptedClientId))?"encryptedClientId: buffer expected":s.encryptedClientIdIv!=null&&s.hasOwnProperty("encryptedClientIdIv")&&!(s.encryptedClientIdIv&&typeof s.encryptedClientIdIv.length=="number"||S.isString(s.encryptedClientIdIv))?"encryptedClientIdIv: buffer expected":s.encryptedPrivacyKey!=null&&s.hasOwnProperty("encryptedPrivacyKey")&&!(s.encryptedPrivacyKey&&typeof s.encryptedPrivacyKey.length=="number"||S.isString(s.encryptedPrivacyKey))?"encryptedPrivacyKey: buffer expected":null},O.fromObject=function(s){if(s instanceof w.license_protocol.EncryptedClientIdentification)return s;var a=new w.license_protocol.EncryptedClientIdentification;return s.providerId!=null&&(a.providerId=String(s.providerId)),s.serviceCertificateSerialNumber!=null&&(typeof s.serviceCertificateSerialNumber=="string"?S.base64.decode(s.serviceCertificateSerialNumber,a.serviceCertificateSerialNumber=S.newBuffer(S.base64.length(s.serviceCertificateSerialNumber)),0):s.serviceCertificateSerialNumber.length>=0&&(a.serviceCertificateSerialNumber=s.serviceCertificateSerialNumber)),s.encryptedClientId!=null&&(typeof s.encryptedClientId=="string"?S.base64.decode(s.encryptedClientId,a.encryptedClientId=S.newBuffer(S.base64.length(s.encryptedClientId)),0):s.encryptedClientId.length>=0&&(a.encryptedClientId=s.encryptedClientId)),s.encryptedClientIdIv!=null&&(typeof s.encryptedClientIdIv=="string"?S.base64.decode(s.encryptedClientIdIv,a.encryptedClientIdIv=S.newBuffer(S.base64.length(s.encryptedClientIdIv)),0):s.encryptedClientIdIv.length>=0&&(a.encryptedClientIdIv=s.encryptedClientIdIv)),s.encryptedPrivacyKey!=null&&(typeof s.encryptedPrivacyKey=="string"?S.base64.decode(s.encryptedPrivacyKey,a.encryptedPrivacyKey=S.newBuffer(S.base64.length(s.encryptedPrivacyKey)),0):s.encryptedPrivacyKey.length>=0&&(a.encryptedPrivacyKey=s.encryptedPrivacyKey)),a},O.toObject=function(s,a){a||(a={});var p={};return a.defaults&&(p.providerId="",a.bytes===String?p.serviceCertificateSerialNumber="":(p.serviceCertificateSerialNumber=[],a.bytes!==Array&&(p.serviceCertificateSerialNumber=S.newBuffer(p.serviceCertificateSerialNumber))),a.bytes===String?p.encryptedClientId="":(p.encryptedClientId=[],a.bytes!==Array&&(p.encryptedClientId=S.newBuffer(p.encryptedClientId))),a.bytes===String?p.encryptedClientIdIv="":(p.encryptedClientIdIv=[],a.bytes!==Array&&(p.encryptedClientIdIv=S.newBuffer(p.encryptedClientIdIv))),a.bytes===String?p.encryptedPrivacyKey="":(p.encryptedPrivacyKey=[],a.bytes!==Array&&(p.encryptedPrivacyKey=S.newBuffer(p.encryptedPrivacyKey)))),s.providerId!=null&&s.hasOwnProperty("providerId")&&(p.providerId=s.providerId),s.serviceCertificateSerialNumber!=null&&s.hasOwnProperty("serviceCertificateSerialNumber")&&(p.serviceCertificateSerialNumber=a.bytes===String?S.base64.encode(s.serviceCertificateSerialNumber,0,s.serviceCertificateSerialNumber.length):a.bytes===Array?Array.prototype.slice.call(s.serviceCertificateSerialNumber):s.serviceCertificateSerialNumber),s.encryptedClientId!=null&&s.hasOwnProperty("encryptedClientId")&&(p.encryptedClientId=a.bytes===String?S.base64.encode(s.encryptedClientId,0,s.encryptedClientId.length):a.bytes===Array?Array.prototype.slice.call(s.encryptedClientId):s.encryptedClientId),s.encryptedClientIdIv!=null&&s.hasOwnProperty("encryptedClientIdIv")&&(p.encryptedClientIdIv=a.bytes===String?S.base64.encode(s.encryptedClientIdIv,0,s.encryptedClientIdIv.length):a.bytes===Array?Array.prototype.slice.call(s.encryptedClientIdIv):s.encryptedClientIdIv),s.encryptedPrivacyKey!=null&&s.hasOwnProperty("encryptedPrivacyKey")&&(p.encryptedPrivacyKey=a.bytes===String?S.base64.encode(s.encryptedPrivacyKey,0,s.encryptedPrivacyKey.length):a.bytes===Array?Array.prototype.slice.call(s.encryptedPrivacyKey):s.encryptedPrivacyKey),p},O.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},O.getTypeUrl=function(s){return s===void 0&&(s="type.googleapis.com"),s+"/license_protocol.EncryptedClientIdentification"},O}(),P.DrmCertificate=function(){function O(h){if(this.serviceTypes=[],h)for(var s=Object.keys(h),a=0;a<s.length;a+=1)h[s[a]]!=null&&(this[s[a]]=h[s[a]])}return O.prototype.type=0,O.prototype.serialNumber=S.newBuffer([]),O.prototype.creationTimeSeconds=0,O.prototype.expirationTimeSeconds=0,O.prototype.publicKey=S.newBuffer([]),O.prototype.systemId=0,O.prototype.testDeviceDeprecated=!1,O.prototype.providerId="",O.prototype.serviceTypes=S.emptyArray,O.prototype.algorithm=1,O.prototype.rotId=S.newBuffer([]),O.prototype.encryptionKey=null,O.create=function(s){return new O(s)},O.encode=function(s,a){if(a||(a=k.create()),s.type!=null&&Object.hasOwnProperty.call(s,"type")&&a.uint32(8).int32(s.type),s.serialNumber!=null&&Object.hasOwnProperty.call(s,"serialNumber")&&a.uint32(18).bytes(s.serialNumber),s.creationTimeSeconds!=null&&Object.hasOwnProperty.call(s,"creationTimeSeconds")&&a.uint32(24).uint32(s.creationTimeSeconds),s.publicKey!=null&&Object.hasOwnProperty.call(s,"publicKey")&&a.uint32(34).bytes(s.publicKey),s.systemId!=null&&Object.hasOwnProperty.call(s,"systemId")&&a.uint32(40).uint32(s.systemId),s.testDeviceDeprecated!=null&&Object.hasOwnProperty.call(s,"testDeviceDeprecated")&&a.uint32(48).bool(s.testDeviceDeprecated),s.providerId!=null&&Object.hasOwnProperty.call(s,"providerId")&&a.uint32(58).string(s.providerId),s.serviceTypes!=null&&s.serviceTypes.length)for(var p=0;p<s.serviceTypes.length;p+=1)a.uint32(64).int32(s.serviceTypes[p]);return s.algorithm!=null&&Object.hasOwnProperty.call(s,"algorithm")&&a.uint32(72).int32(s.algorithm),s.rotId!=null&&Object.hasOwnProperty.call(s,"rotId")&&a.uint32(82).bytes(s.rotId),s.encryptionKey!=null&&Object.hasOwnProperty.call(s,"encryptionKey")&&w.license_protocol.DrmCertificate.EncryptionKey.encode(s.encryptionKey,a.uint32(90).fork()).ldelim(),s.expirationTimeSeconds!=null&&Object.hasOwnProperty.call(s,"expirationTimeSeconds")&&a.uint32(96).uint32(s.expirationTimeSeconds),a},O.encodeDelimited=function(s,a){return this.encode(s,a).ldelim()},O.decode=function(s,a){s instanceof A||(s=A.create(s));for(var p=a===void 0?s.len:s.pos+a,v=new w.license_protocol.DrmCertificate;s.pos<p;){var M=s.uint32();switch(M>>>3){case 1:{v.type=s.int32();break}case 2:{v.serialNumber=s.bytes();break}case 3:{v.creationTimeSeconds=s.uint32();break}case 12:{v.expirationTimeSeconds=s.uint32();break}case 4:{v.publicKey=s.bytes();break}case 5:{v.systemId=s.uint32();break}case 6:{v.testDeviceDeprecated=s.bool();break}case 7:{v.providerId=s.string();break}case 8:{if(v.serviceTypes&&v.serviceTypes.length||(v.serviceTypes=[]),(M&7)===2)for(var F=s.uint32()+s.pos;s.pos<F;)v.serviceTypes.push(s.int32());else v.serviceTypes.push(s.int32());break}case 9:{v.algorithm=s.int32();break}case 10:{v.rotId=s.bytes();break}case 11:{v.encryptionKey=w.license_protocol.DrmCertificate.EncryptionKey.decode(s,s.uint32());break}default:s.skipType(M&7);break}}return v},O.decodeDelimited=function(s){return s instanceof A||(s=new A(s)),this.decode(s,s.uint32())},O.verify=function(s){if(typeof s!="object"||s===null)return"object expected";if(s.type!=null&&s.hasOwnProperty("type"))switch(s.type){default:return"type: enum value expected";case 0:case 1:case 2:case 3:case 4:break}if(s.serialNumber!=null&&s.hasOwnProperty("serialNumber")&&!(s.serialNumber&&typeof s.serialNumber.length=="number"||S.isString(s.serialNumber)))return"serialNumber: buffer expected";if(s.creationTimeSeconds!=null&&s.hasOwnProperty("creationTimeSeconds")&&!S.isInteger(s.creationTimeSeconds))return"creationTimeSeconds: integer expected";if(s.expirationTimeSeconds!=null&&s.hasOwnProperty("expirationTimeSeconds")&&!S.isInteger(s.expirationTimeSeconds))return"expirationTimeSeconds: integer expected";if(s.publicKey!=null&&s.hasOwnProperty("publicKey")&&!(s.publicKey&&typeof s.publicKey.length=="number"||S.isString(s.publicKey)))return"publicKey: buffer expected";if(s.systemId!=null&&s.hasOwnProperty("systemId")&&!S.isInteger(s.systemId))return"systemId: integer expected";if(s.testDeviceDeprecated!=null&&s.hasOwnProperty("testDeviceDeprecated")&&typeof s.testDeviceDeprecated!="boolean")return"testDeviceDeprecated: boolean expected";if(s.providerId!=null&&s.hasOwnProperty("providerId")&&!S.isString(s.providerId))return"providerId: string expected";if(s.serviceTypes!=null&&s.hasOwnProperty("serviceTypes")){if(!Array.isArray(s.serviceTypes))return"serviceTypes: array expected";for(var a=0;a<s.serviceTypes.length;a+=1)switch(s.serviceTypes[a]){default:return"serviceTypes: enum value[] expected";case 0:case 1:case 2:case 3:case 4:break}}if(s.algorithm!=null&&s.hasOwnProperty("algorithm"))switch(s.algorithm){default:return"algorithm: enum value expected";case 0:case 1:case 2:case 3:case 4:break}if(s.rotId!=null&&s.hasOwnProperty("rotId")&&!(s.rotId&&typeof s.rotId.length=="number"||S.isString(s.rotId)))return"rotId: buffer expected";if(s.encryptionKey!=null&&s.hasOwnProperty("encryptionKey")){var p=w.license_protocol.DrmCertificate.EncryptionKey.verify(s.encryptionKey);if(p)return"encryptionKey."+p}return null},O.fromObject=function(s){if(s instanceof w.license_protocol.DrmCertificate)return s;var a=new w.license_protocol.DrmCertificate;switch(s.type){default:if(typeof s.type=="number"){a.type=s.type;break}break;case"ROOT":case 0:a.type=0;break;case"DEVICE_MODEL":case 1:a.type=1;break;case"DEVICE":case 2:a.type=2;break;case"SERVICE":case 3:a.type=3;break;case"PROVISIONER":case 4:a.type=4;break}if(s.serialNumber!=null&&(typeof s.serialNumber=="string"?S.base64.decode(s.serialNumber,a.serialNumber=S.newBuffer(S.base64.length(s.serialNumber)),0):s.serialNumber.length>=0&&(a.serialNumber=s.serialNumber)),s.creationTimeSeconds!=null&&(a.creationTimeSeconds=s.creationTimeSeconds>>>0),s.expirationTimeSeconds!=null&&(a.expirationTimeSeconds=s.expirationTimeSeconds>>>0),s.publicKey!=null&&(typeof s.publicKey=="string"?S.base64.decode(s.publicKey,a.publicKey=S.newBuffer(S.base64.length(s.publicKey)),0):s.publicKey.length>=0&&(a.publicKey=s.publicKey)),s.systemId!=null&&(a.systemId=s.systemId>>>0),s.testDeviceDeprecated!=null&&(a.testDeviceDeprecated=!!s.testDeviceDeprecated),s.providerId!=null&&(a.providerId=String(s.providerId)),s.serviceTypes){if(!Array.isArray(s.serviceTypes))throw TypeError(".license_protocol.DrmCertificate.serviceTypes: array expected");a.serviceTypes=[];for(var p=0;p<s.serviceTypes.length;p+=1)switch(s.serviceTypes[p]){default:if(typeof s.serviceTypes[p]=="number"){a.serviceTypes[p]=s.serviceTypes[p];break}case"UNKNOWN_SERVICE_TYPE":case 0:a.serviceTypes[p]=0;break;case"LICENSE_SERVER_SDK":case 1:a.serviceTypes[p]=1;break;case"LICENSE_SERVER_PROXY_SDK":case 2:a.serviceTypes[p]=2;break;case"PROVISIONING_SDK":case 3:a.serviceTypes[p]=3;break;case"CAS_PROXY_SDK":case 4:a.serviceTypes[p]=4;break}}switch(s.algorithm){case"UNKNOWN_ALGORITHM":case 0:a.algorithm=0;break;default:if(typeof s.algorithm=="number"){a.algorithm=s.algorithm;break}break;case"RSA":case 1:a.algorithm=1;break;case"ECC_SECP256R1":case 2:a.algorithm=2;break;case"ECC_SECP384R1":case 3:a.algorithm=3;break;case"ECC_SECP521R1":case 4:a.algorithm=4;break}if(s.rotId!=null&&(typeof s.rotId=="string"?S.base64.decode(s.rotId,a.rotId=S.newBuffer(S.base64.length(s.rotId)),0):s.rotId.length>=0&&(a.rotId=s.rotId)),s.encryptionKey!=null){if(typeof s.encryptionKey!="object")throw TypeError(".license_protocol.DrmCertificate.encryptionKey: object expected");a.encryptionKey=w.license_protocol.DrmCertificate.EncryptionKey.fromObject(s.encryptionKey)}return a},O.toObject=function(s,a){a||(a={});var p={};if((a.arrays||a.defaults)&&(p.serviceTypes=[]),a.defaults&&(p.type=a.enums===String?"ROOT":0,a.bytes===String?p.serialNumber="":(p.serialNumber=[],a.bytes!==Array&&(p.serialNumber=S.newBuffer(p.serialNumber))),p.creationTimeSeconds=0,a.bytes===String?p.publicKey="":(p.publicKey=[],a.bytes!==Array&&(p.publicKey=S.newBuffer(p.publicKey))),p.systemId=0,p.testDeviceDeprecated=!1,p.providerId="",p.algorithm=a.enums===String?"RSA":1,a.bytes===String?p.rotId="":(p.rotId=[],a.bytes!==Array&&(p.rotId=S.newBuffer(p.rotId))),p.encryptionKey=null,p.expirationTimeSeconds=0),s.type!=null&&s.hasOwnProperty("type")&&(p.type=a.enums===String?w.license_protocol.DrmCertificate.Type[s.type]===void 0?s.type:w.license_protocol.DrmCertificate.Type[s.type]:s.type),s.serialNumber!=null&&s.hasOwnProperty("serialNumber")&&(p.serialNumber=a.bytes===String?S.base64.encode(s.serialNumber,0,s.serialNumber.length):a.bytes===Array?Array.prototype.slice.call(s.serialNumber):s.serialNumber),s.creationTimeSeconds!=null&&s.hasOwnProperty("creationTimeSeconds")&&(p.creationTimeSeconds=s.creationTimeSeconds),s.publicKey!=null&&s.hasOwnProperty("publicKey")&&(p.publicKey=a.bytes===String?S.base64.encode(s.publicKey,0,s.publicKey.length):a.bytes===Array?Array.prototype.slice.call(s.publicKey):s.publicKey),s.systemId!=null&&s.hasOwnProperty("systemId")&&(p.systemId=s.systemId),s.testDeviceDeprecated!=null&&s.hasOwnProperty("testDeviceDeprecated")&&(p.testDeviceDeprecated=s.testDeviceDeprecated),s.providerId!=null&&s.hasOwnProperty("providerId")&&(p.providerId=s.providerId),s.serviceTypes&&s.serviceTypes.length){p.serviceTypes=[];for(var v=0;v<s.serviceTypes.length;v+=1)p.serviceTypes[v]=a.enums===String?w.license_protocol.DrmCertificate.ServiceType[s.serviceTypes[v]]===void 0?s.serviceTypes[v]:w.license_protocol.DrmCertificate.ServiceType[s.serviceTypes[v]]:s.serviceTypes[v]}return s.algorithm!=null&&s.hasOwnProperty("algorithm")&&(p.algorithm=a.enums===String?w.license_protocol.DrmCertificate.Algorithm[s.algorithm]===void 0?s.algorithm:w.license_protocol.DrmCertificate.Algorithm[s.algorithm]:s.algorithm),s.rotId!=null&&s.hasOwnProperty("rotId")&&(p.rotId=a.bytes===String?S.base64.encode(s.rotId,0,s.rotId.length):a.bytes===Array?Array.prototype.slice.call(s.rotId):s.rotId),s.encryptionKey!=null&&s.hasOwnProperty("encryptionKey")&&(p.encryptionKey=w.license_protocol.DrmCertificate.EncryptionKey.toObject(s.encryptionKey,a)),s.expirationTimeSeconds!=null&&s.hasOwnProperty("expirationTimeSeconds")&&(p.expirationTimeSeconds=s.expirationTimeSeconds),p},O.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},O.getTypeUrl=function(s){return s===void 0&&(s="type.googleapis.com"),s+"/license_protocol.DrmCertificate"},O.Type=function(){var h={},s=Object.create(h);return s[h[0]="ROOT"]=0,s[h[1]="DEVICE_MODEL"]=1,s[h[2]="DEVICE"]=2,s[h[3]="SERVICE"]=3,s[h[4]="PROVISIONER"]=4,s}(),O.ServiceType=function(){var h={},s=Object.create(h);return s[h[0]="UNKNOWN_SERVICE_TYPE"]=0,s[h[1]="LICENSE_SERVER_SDK"]=1,s[h[2]="LICENSE_SERVER_PROXY_SDK"]=2,s[h[3]="PROVISIONING_SDK"]=3,s[h[4]="CAS_PROXY_SDK"]=4,s}(),O.Algorithm=function(){var h={},s=Object.create(h);return s[h[0]="UNKNOWN_ALGORITHM"]=0,s[h[1]="RSA"]=1,s[h[2]="ECC_SECP256R1"]=2,s[h[3]="ECC_SECP384R1"]=3,s[h[4]="ECC_SECP521R1"]=4,s}(),O.EncryptionKey=function(){function h(s){if(s)for(var a=Object.keys(s),p=0;p<a.length;p+=1)s[a[p]]!=null&&(this[a[p]]=s[a[p]])}return h.prototype.publicKey=S.newBuffer([]),h.prototype.algorithm=1,h.create=function(a){return new h(a)},h.encode=function(a,p){return p||(p=k.create()),a.publicKey!=null&&Object.hasOwnProperty.call(a,"publicKey")&&p.uint32(10).bytes(a.publicKey),a.algorithm!=null&&Object.hasOwnProperty.call(a,"algorithm")&&p.uint32(16).int32(a.algorithm),p},h.encodeDelimited=function(a,p){return this.encode(a,p).ldelim()},h.decode=function(a,p){a instanceof A||(a=A.create(a));for(var v=p===void 0?a.len:a.pos+p,M=new w.license_protocol.DrmCertificate.EncryptionKey;a.pos<v;){var F=a.uint32();switch(F>>>3){case 1:{M.publicKey=a.bytes();break}case 2:{M.algorithm=a.int32();break}default:a.skipType(F&7);break}}return M},h.decodeDelimited=function(a){return a instanceof A||(a=new A(a)),this.decode(a,a.uint32())},h.verify=function(a){if(typeof a!="object"||a===null)return"object expected";if(a.publicKey!=null&&a.hasOwnProperty("publicKey")&&!(a.publicKey&&typeof a.publicKey.length=="number"||S.isString(a.publicKey)))return"publicKey: buffer expected";if(a.algorithm!=null&&a.hasOwnProperty("algorithm"))switch(a.algorithm){default:return"algorithm: enum value expected";case 0:case 1:case 2:case 3:case 4:break}return null},h.fromObject=function(a){if(a instanceof w.license_protocol.DrmCertificate.EncryptionKey)return a;var p=new w.license_protocol.DrmCertificate.EncryptionKey;switch(a.publicKey!=null&&(typeof a.publicKey=="string"?S.base64.decode(a.publicKey,p.publicKey=S.newBuffer(S.base64.length(a.publicKey)),0):a.publicKey.length>=0&&(p.publicKey=a.publicKey)),a.algorithm){case"UNKNOWN_ALGORITHM":case 0:p.algorithm=0;break;default:if(typeof a.algorithm=="number"){p.algorithm=a.algorithm;break}break;case"RSA":case 1:p.algorithm=1;break;case"ECC_SECP256R1":case 2:p.algorithm=2;break;case"ECC_SECP384R1":case 3:p.algorithm=3;break;case"ECC_SECP521R1":case 4:p.algorithm=4;break}return p},h.toObject=function(a,p){p||(p={});var v={};return p.defaults&&(p.bytes===String?v.publicKey="":(v.publicKey=[],p.bytes!==Array&&(v.publicKey=S.newBuffer(v.publicKey))),v.algorithm=p.enums===String?"RSA":1),a.publicKey!=null&&a.hasOwnProperty("publicKey")&&(v.publicKey=p.bytes===String?S.base64.encode(a.publicKey,0,a.publicKey.length):p.bytes===Array?Array.prototype.slice.call(a.publicKey):a.publicKey),a.algorithm!=null&&a.hasOwnProperty("algorithm")&&(v.algorithm=p.enums===String?w.license_protocol.DrmCertificate.Algorithm[a.algorithm]===void 0?a.algorithm:w.license_protocol.DrmCertificate.Algorithm[a.algorithm]:a.algorithm),v},h.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},h.getTypeUrl=function(a){return a===void 0&&(a="type.googleapis.com"),a+"/license_protocol.DrmCertificate.EncryptionKey"},h}(),O}(),P.SignedDrmCertificate=function(){function O(h){if(h)for(var s=Object.keys(h),a=0;a<s.length;a+=1)h[s[a]]!=null&&(this[s[a]]=h[s[a]])}return O.prototype.drmCertificate=S.newBuffer([]),O.prototype.signature=S.newBuffer([]),O.prototype.signer=null,O.prototype.hashAlgorithm=0,O.create=function(s){return new O(s)},O.encode=function(s,a){return a||(a=k.create()),s.drmCertificate!=null&&Object.hasOwnProperty.call(s,"drmCertificate")&&a.uint32(10).bytes(s.drmCertificate),s.signature!=null&&Object.hasOwnProperty.call(s,"signature")&&a.uint32(18).bytes(s.signature),s.signer!=null&&Object.hasOwnProperty.call(s,"signer")&&w.license_protocol.SignedDrmCertificate.encode(s.signer,a.uint32(26).fork()).ldelim(),s.hashAlgorithm!=null&&Object.hasOwnProperty.call(s,"hashAlgorithm")&&a.uint32(32).int32(s.hashAlgorithm),a},O.encodeDelimited=function(s,a){return this.encode(s,a).ldelim()},O.decode=function(s,a){s instanceof A||(s=A.create(s));for(var p=a===void 0?s.len:s.pos+a,v=new w.license_protocol.SignedDrmCertificate;s.pos<p;){var M=s.uint32();switch(M>>>3){case 1:{v.drmCertificate=s.bytes();break}case 2:{v.signature=s.bytes();break}case 3:{v.signer=w.license_protocol.SignedDrmCertificate.decode(s,s.uint32());break}case 4:{v.hashAlgorithm=s.int32();break}default:s.skipType(M&7);break}}return v},O.decodeDelimited=function(s){return s instanceof A||(s=new A(s)),this.decode(s,s.uint32())},O.verify=function(s){if(typeof s!="object"||s===null)return"object expected";if(s.drmCertificate!=null&&s.hasOwnProperty("drmCertificate")&&!(s.drmCertificate&&typeof s.drmCertificate.length=="number"||S.isString(s.drmCertificate)))return"drmCertificate: buffer expected";if(s.signature!=null&&s.hasOwnProperty("signature")&&!(s.signature&&typeof s.signature.length=="number"||S.isString(s.signature)))return"signature: buffer expected";if(s.signer!=null&&s.hasOwnProperty("signer")){var a=w.license_protocol.SignedDrmCertificate.verify(s.signer);if(a)return"signer."+a}if(s.hashAlgorithm!=null&&s.hasOwnProperty("hashAlgorithm"))switch(s.hashAlgorithm){default:return"hashAlgorithm: enum value expected";case 0:case 1:case 2:case 3:break}return null},O.fromObject=function(s){if(s instanceof w.license_protocol.SignedDrmCertificate)return s;var a=new w.license_protocol.SignedDrmCertificate;if(s.drmCertificate!=null&&(typeof s.drmCertificate=="string"?S.base64.decode(s.drmCertificate,a.drmCertificate=S.newBuffer(S.base64.length(s.drmCertificate)),0):s.drmCertificate.length>=0&&(a.drmCertificate=s.drmCertificate)),s.signature!=null&&(typeof s.signature=="string"?S.base64.decode(s.signature,a.signature=S.newBuffer(S.base64.length(s.signature)),0):s.signature.length>=0&&(a.signature=s.signature)),s.signer!=null){if(typeof s.signer!="object")throw TypeError(".license_protocol.SignedDrmCertificate.signer: object expected");a.signer=w.license_protocol.SignedDrmCertificate.fromObject(s.signer)}switch(s.hashAlgorithm){default:if(typeof s.hashAlgorithm=="number"){a.hashAlgorithm=s.hashAlgorithm;break}break;case"HASH_ALGORITHM_UNSPECIFIED":case 0:a.hashAlgorithm=0;break;case"HASH_ALGORITHM_SHA_1":case 1:a.hashAlgorithm=1;break;case"HASH_ALGORITHM_SHA_256":case 2:a.hashAlgorithm=2;break;case"HASH_ALGORITHM_SHA_384":case 3:a.hashAlgorithm=3;break}return a},O.toObject=function(s,a){a||(a={});var p={};return a.defaults&&(a.bytes===String?p.drmCertificate="":(p.drmCertificate=[],a.bytes!==Array&&(p.drmCertificate=S.newBuffer(p.drmCertificate))),a.bytes===String?p.signature="":(p.signature=[],a.bytes!==Array&&(p.signature=S.newBuffer(p.signature))),p.signer=null,p.hashAlgorithm=a.enums===String?"HASH_ALGORITHM_UNSPECIFIED":0),s.drmCertificate!=null&&s.hasOwnProperty("drmCertificate")&&(p.drmCertificate=a.bytes===String?S.base64.encode(s.drmCertificate,0,s.drmCertificate.length):a.bytes===Array?Array.prototype.slice.call(s.drmCertificate):s.drmCertificate),s.signature!=null&&s.hasOwnProperty("signature")&&(p.signature=a.bytes===String?S.base64.encode(s.signature,0,s.signature.length):a.bytes===Array?Array.prototype.slice.call(s.signature):s.signature),s.signer!=null&&s.hasOwnProperty("signer")&&(p.signer=w.license_protocol.SignedDrmCertificate.toObject(s.signer,a)),s.hashAlgorithm!=null&&s.hasOwnProperty("hashAlgorithm")&&(p.hashAlgorithm=a.enums===String?w.license_protocol.HashAlgorithmProto[s.hashAlgorithm]===void 0?s.hashAlgorithm:w.license_protocol.HashAlgorithmProto[s.hashAlgorithm]:s.hashAlgorithm),p},O.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},O.getTypeUrl=function(s){return s===void 0&&(s="type.googleapis.com"),s+"/license_protocol.SignedDrmCertificate"},O}(),P.WidevinePsshData=function(){function O(h){if(this.keyIds=[],this.groupIds=[],this.entitledKeys=[],h)for(var s=Object.keys(h),a=0;a<s.length;a+=1)h[s[a]]!=null&&(this[s[a]]=h[s[a]])}return O.prototype.keyIds=S.emptyArray,O.prototype.contentId=S.newBuffer([]),O.prototype.cryptoPeriodIndex=0,O.prototype.protectionScheme=0,O.prototype.cryptoPeriodSeconds=0,O.prototype.type=0,O.prototype.keySequence=0,O.prototype.groupIds=S.emptyArray,O.prototype.entitledKeys=S.emptyArray,O.prototype.videoFeature="",O.prototype.algorithm=0,O.prototype.provider="",O.prototype.trackType="",O.prototype.policy="",O.prototype.groupedLicense=S.newBuffer([]),O.create=function(s){return new O(s)},O.encode=function(s,a){if(a||(a=k.create()),s.algorithm!=null&&Object.hasOwnProperty.call(s,"algorithm")&&a.uint32(8).int32(s.algorithm),s.keyIds!=null&&s.keyIds.length)for(var p=0;p<s.keyIds.length;p+=1)a.uint32(18).bytes(s.keyIds[p]);if(s.provider!=null&&Object.hasOwnProperty.call(s,"provider")&&a.uint32(26).string(s.provider),s.contentId!=null&&Object.hasOwnProperty.call(s,"contentId")&&a.uint32(34).bytes(s.contentId),s.trackType!=null&&Object.hasOwnProperty.call(s,"trackType")&&a.uint32(42).string(s.trackType),s.policy!=null&&Object.hasOwnProperty.call(s,"policy")&&a.uint32(50).string(s.policy),s.cryptoPeriodIndex!=null&&Object.hasOwnProperty.call(s,"cryptoPeriodIndex")&&a.uint32(56).uint32(s.cryptoPeriodIndex),s.groupedLicense!=null&&Object.hasOwnProperty.call(s,"groupedLicense")&&a.uint32(66).bytes(s.groupedLicense),s.protectionScheme!=null&&Object.hasOwnProperty.call(s,"protectionScheme")&&a.uint32(72).uint32(s.protectionScheme),s.cryptoPeriodSeconds!=null&&Object.hasOwnProperty.call(s,"cryptoPeriodSeconds")&&a.uint32(80).uint32(s.cryptoPeriodSeconds),s.type!=null&&Object.hasOwnProperty.call(s,"type")&&a.uint32(88).int32(s.type),s.keySequence!=null&&Object.hasOwnProperty.call(s,"keySequence")&&a.uint32(96).uint32(s.keySequence),s.groupIds!=null&&s.groupIds.length)for(var p=0;p<s.groupIds.length;p+=1)a.uint32(106).bytes(s.groupIds[p]);if(s.entitledKeys!=null&&s.entitledKeys.length)for(var p=0;p<s.entitledKeys.length;p+=1)w.license_protocol.WidevinePsshData.EntitledKey.encode(s.entitledKeys[p],a.uint32(114).fork()).ldelim();return s.videoFeature!=null&&Object.hasOwnProperty.call(s,"videoFeature")&&a.uint32(122).string(s.videoFeature),a},O.encodeDelimited=function(s,a){return this.encode(s,a).ldelim()},O.decode=function(s,a){s instanceof A||(s=A.create(s));for(var p=a===void 0?s.len:s.pos+a,v=new w.license_protocol.WidevinePsshData;s.pos<p;){var M=s.uint32();switch(M>>>3){case 2:{v.keyIds&&v.keyIds.length||(v.keyIds=[]),v.keyIds.push(s.bytes());break}case 4:{v.contentId=s.bytes();break}case 7:{v.cryptoPeriodIndex=s.uint32();break}case 9:{v.protectionScheme=s.uint32();break}case 10:{v.cryptoPeriodSeconds=s.uint32();break}case 11:{v.type=s.int32();break}case 12:{v.keySequence=s.uint32();break}case 13:{v.groupIds&&v.groupIds.length||(v.groupIds=[]),v.groupIds.push(s.bytes());break}case 14:{v.entitledKeys&&v.entitledKeys.length||(v.entitledKeys=[]),v.entitledKeys.push(w.license_protocol.WidevinePsshData.EntitledKey.decode(s,s.uint32()));break}case 15:{v.videoFeature=s.string();break}case 1:{v.algorithm=s.int32();break}case 3:{v.provider=s.string();break}case 5:{v.trackType=s.string();break}case 6:{v.policy=s.string();break}case 8:{v.groupedLicense=s.bytes();break}default:s.skipType(M&7);break}}return v},O.decodeDelimited=function(s){return s instanceof A||(s=new A(s)),this.decode(s,s.uint32())},O.verify=function(s){if(typeof s!="object"||s===null)return"object expected";if(s.keyIds!=null&&s.hasOwnProperty("keyIds")){if(!Array.isArray(s.keyIds))return"keyIds: array expected";for(var a=0;a<s.keyIds.length;a+=1)if(!(s.keyIds[a]&&typeof s.keyIds[a].length=="number"||S.isString(s.keyIds[a])))return"keyIds: buffer[] expected"}if(s.contentId!=null&&s.hasOwnProperty("contentId")&&!(s.contentId&&typeof s.contentId.length=="number"||S.isString(s.contentId)))return"contentId: buffer expected";if(s.cryptoPeriodIndex!=null&&s.hasOwnProperty("cryptoPeriodIndex")&&!S.isInteger(s.cryptoPeriodIndex))return"cryptoPeriodIndex: integer expected";if(s.protectionScheme!=null&&s.hasOwnProperty("protectionScheme")&&!S.isInteger(s.protectionScheme))return"protectionScheme: integer expected";if(s.cryptoPeriodSeconds!=null&&s.hasOwnProperty("cryptoPeriodSeconds")&&!S.isInteger(s.cryptoPeriodSeconds))return"cryptoPeriodSeconds: integer expected";if(s.type!=null&&s.hasOwnProperty("type"))switch(s.type){default:return"type: enum value expected";case 0:case 1:case 2:break}if(s.keySequence!=null&&s.hasOwnProperty("keySequence")&&!S.isInteger(s.keySequence))return"keySequence: integer expected";if(s.groupIds!=null&&s.hasOwnProperty("groupIds")){if(!Array.isArray(s.groupIds))return"groupIds: array expected";for(var a=0;a<s.groupIds.length;a+=1)if(!(s.groupIds[a]&&typeof s.groupIds[a].length=="number"||S.isString(s.groupIds[a])))return"groupIds: buffer[] expected"}if(s.entitledKeys!=null&&s.hasOwnProperty("entitledKeys")){if(!Array.isArray(s.entitledKeys))return"entitledKeys: array expected";for(var a=0;a<s.entitledKeys.length;a+=1){var p=w.license_protocol.WidevinePsshData.EntitledKey.verify(s.entitledKeys[a]);if(p)return"entitledKeys."+p}}if(s.videoFeature!=null&&s.hasOwnProperty("videoFeature")&&!S.isString(s.videoFeature))return"videoFeature: string expected";if(s.algorithm!=null&&s.hasOwnProperty("algorithm"))switch(s.algorithm){default:return"algorithm: enum value expected";case 0:case 1:break}return s.provider!=null&&s.hasOwnProperty("provider")&&!S.isString(s.provider)?"provider: string expected":s.trackType!=null&&s.hasOwnProperty("trackType")&&!S.isString(s.trackType)?"trackType: string expected":s.policy!=null&&s.hasOwnProperty("policy")&&!S.isString(s.policy)?"policy: string expected":s.groupedLicense!=null&&s.hasOwnProperty("groupedLicense")&&!(s.groupedLicense&&typeof s.groupedLicense.length=="number"||S.isString(s.groupedLicense))?"groupedLicense: buffer expected":null},O.fromObject=function(s){if(s instanceof w.license_protocol.WidevinePsshData)return s;var a=new w.license_protocol.WidevinePsshData;if(s.keyIds){if(!Array.isArray(s.keyIds))throw TypeError(".license_protocol.WidevinePsshData.keyIds: array expected");a.keyIds=[];for(var p=0;p<s.keyIds.length;p+=1)typeof s.keyIds[p]=="string"?S.base64.decode(s.keyIds[p],a.keyIds[p]=S.newBuffer(S.base64.length(s.keyIds[p])),0):s.keyIds[p].length>=0&&(a.keyIds[p]=s.keyIds[p])}switch(s.contentId!=null&&(typeof s.contentId=="string"?S.base64.decode(s.contentId,a.contentId=S.newBuffer(S.base64.length(s.contentId)),0):s.contentId.length>=0&&(a.contentId=s.contentId)),s.cryptoPeriodIndex!=null&&(a.cryptoPeriodIndex=s.cryptoPeriodIndex>>>0),s.protectionScheme!=null&&(a.protectionScheme=s.protectionScheme>>>0),s.cryptoPeriodSeconds!=null&&(a.cryptoPeriodSeconds=s.cryptoPeriodSeconds>>>0),s.type){default:if(typeof s.type=="number"){a.type=s.type;break}break;case"SINGLE":case 0:a.type=0;break;case"ENTITLEMENT":case 1:a.type=1;break;case"ENTITLED_KEY":case 2:a.type=2;break}if(s.keySequence!=null&&(a.keySequence=s.keySequence>>>0),s.groupIds){if(!Array.isArray(s.groupIds))throw TypeError(".license_protocol.WidevinePsshData.groupIds: array expected");a.groupIds=[];for(var p=0;p<s.groupIds.length;p+=1)typeof s.groupIds[p]=="string"?S.base64.decode(s.groupIds[p],a.groupIds[p]=S.newBuffer(S.base64.length(s.groupIds[p])),0):s.groupIds[p].length>=0&&(a.groupIds[p]=s.groupIds[p])}if(s.entitledKeys){if(!Array.isArray(s.entitledKeys))throw TypeError(".license_protocol.WidevinePsshData.entitledKeys: array expected");a.entitledKeys=[];for(var p=0;p<s.entitledKeys.length;p+=1){if(typeof s.entitledKeys[p]!="object")throw TypeError(".license_protocol.WidevinePsshData.entitledKeys: object expected");a.entitledKeys[p]=w.license_protocol.WidevinePsshData.EntitledKey.fromObject(s.entitledKeys[p])}}switch(s.videoFeature!=null&&(a.videoFeature=String(s.videoFeature)),s.algorithm){default:if(typeof s.algorithm=="number"){a.algorithm=s.algorithm;break}break;case"UNENCRYPTED":case 0:a.algorithm=0;break;case"AESCTR":case 1:a.algorithm=1;break}return s.provider!=null&&(a.provider=String(s.provider)),s.trackType!=null&&(a.trackType=String(s.trackType)),s.policy!=null&&(a.policy=String(s.policy)),s.groupedLicense!=null&&(typeof s.groupedLicense=="string"?S.base64.decode(s.groupedLicense,a.groupedLicense=S.newBuffer(S.base64.length(s.groupedLicense)),0):s.groupedLicense.length>=0&&(a.groupedLicense=s.groupedLicense)),a},O.toObject=function(s,a){a||(a={});var p={};if((a.arrays||a.defaults)&&(p.keyIds=[],p.groupIds=[],p.entitledKeys=[]),a.defaults&&(p.algorithm=a.enums===String?"UNENCRYPTED":0,p.provider="",a.bytes===String?p.contentId="":(p.contentId=[],a.bytes!==Array&&(p.contentId=S.newBuffer(p.contentId))),p.trackType="",p.policy="",p.cryptoPeriodIndex=0,a.bytes===String?p.groupedLicense="":(p.groupedLicense=[],a.bytes!==Array&&(p.groupedLicense=S.newBuffer(p.groupedLicense))),p.protectionScheme=0,p.cryptoPeriodSeconds=0,p.type=a.enums===String?"SINGLE":0,p.keySequence=0,p.videoFeature=""),s.algorithm!=null&&s.hasOwnProperty("algorithm")&&(p.algorithm=a.enums===String?w.license_protocol.WidevinePsshData.Algorithm[s.algorithm]===void 0?s.algorithm:w.license_protocol.WidevinePsshData.Algorithm[s.algorithm]:s.algorithm),s.keyIds&&s.keyIds.length){p.keyIds=[];for(var v=0;v<s.keyIds.length;v+=1)p.keyIds[v]=a.bytes===String?S.base64.encode(s.keyIds[v],0,s.keyIds[v].length):a.bytes===Array?Array.prototype.slice.call(s.keyIds[v]):s.keyIds[v]}if(s.provider!=null&&s.hasOwnProperty("provider")&&(p.provider=s.provider),s.contentId!=null&&s.hasOwnProperty("contentId")&&(p.contentId=a.bytes===String?S.base64.encode(s.contentId,0,s.contentId.length):a.bytes===Array?Array.prototype.slice.call(s.contentId):s.contentId),s.trackType!=null&&s.hasOwnProperty("trackType")&&(p.trackType=s.trackType),s.policy!=null&&s.hasOwnProperty("policy")&&(p.policy=s.policy),s.cryptoPeriodIndex!=null&&s.hasOwnProperty("cryptoPeriodIndex")&&(p.cryptoPeriodIndex=s.cryptoPeriodIndex),s.groupedLicense!=null&&s.hasOwnProperty("groupedLicense")&&(p.groupedLicense=a.bytes===String?S.base64.encode(s.groupedLicense,0,s.groupedLicense.length):a.bytes===Array?Array.prototype.slice.call(s.groupedLicense):s.groupedLicense),s.protectionScheme!=null&&s.hasOwnProperty("protectionScheme")&&(p.protectionScheme=s.protectionScheme),s.cryptoPeriodSeconds!=null&&s.hasOwnProperty("cryptoPeriodSeconds")&&(p.cryptoPeriodSeconds=s.cryptoPeriodSeconds),s.type!=null&&s.hasOwnProperty("type")&&(p.type=a.enums===String?w.license_protocol.WidevinePsshData.Type[s.type]===void 0?s.type:w.license_protocol.WidevinePsshData.Type[s.type]:s.type),s.keySequence!=null&&s.hasOwnProperty("keySequence")&&(p.keySequence=s.keySequence),s.groupIds&&s.groupIds.length){p.groupIds=[];for(var v=0;v<s.groupIds.length;v+=1)p.groupIds[v]=a.bytes===String?S.base64.encode(s.groupIds[v],0,s.groupIds[v].length):a.bytes===Array?Array.prototype.slice.call(s.groupIds[v]):s.groupIds[v]}if(s.entitledKeys&&s.entitledKeys.length){p.entitledKeys=[];for(var v=0;v<s.entitledKeys.length;v+=1)p.entitledKeys[v]=w.license_protocol.WidevinePsshData.EntitledKey.toObject(s.entitledKeys[v],a)}return s.videoFeature!=null&&s.hasOwnProperty("videoFeature")&&(p.videoFeature=s.videoFeature),p},O.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},O.getTypeUrl=function(s){return s===void 0&&(s="type.googleapis.com"),s+"/license_protocol.WidevinePsshData"},O.Type=function(){var h={},s=Object.create(h);return s[h[0]="SINGLE"]=0,s[h[1]="ENTITLEMENT"]=1,s[h[2]="ENTITLED_KEY"]=2,s}(),O.EntitledKey=function(){function h(s){if(s)for(var a=Object.keys(s),p=0;p<a.length;p+=1)s[a[p]]!=null&&(this[a[p]]=s[a[p]])}return h.prototype.entitlementKeyId=S.newBuffer([]),h.prototype.keyId=S.newBuffer([]),h.prototype.key=S.newBuffer([]),h.prototype.iv=S.newBuffer([]),h.prototype.entitlementKeySizeBytes=32,h.create=function(a){return new h(a)},h.encode=function(a,p){return p||(p=k.create()),a.entitlementKeyId!=null&&Object.hasOwnProperty.call(a,"entitlementKeyId")&&p.uint32(10).bytes(a.entitlementKeyId),a.keyId!=null&&Object.hasOwnProperty.call(a,"keyId")&&p.uint32(18).bytes(a.keyId),a.key!=null&&Object.hasOwnProperty.call(a,"key")&&p.uint32(26).bytes(a.key),a.iv!=null&&Object.hasOwnProperty.call(a,"iv")&&p.uint32(34).bytes(a.iv),a.entitlementKeySizeBytes!=null&&Object.hasOwnProperty.call(a,"entitlementKeySizeBytes")&&p.uint32(40).uint32(a.entitlementKeySizeBytes),p},h.encodeDelimited=function(a,p){return this.encode(a,p).ldelim()},h.decode=function(a,p){a instanceof A||(a=A.create(a));for(var v=p===void 0?a.len:a.pos+p,M=new w.license_protocol.WidevinePsshData.EntitledKey;a.pos<v;){var F=a.uint32();switch(F>>>3){case 1:{M.entitlementKeyId=a.bytes();break}case 2:{M.keyId=a.bytes();break}case 3:{M.key=a.bytes();break}case 4:{M.iv=a.bytes();break}case 5:{M.entitlementKeySizeBytes=a.uint32();break}default:a.skipType(F&7);break}}return M},h.decodeDelimited=function(a){return a instanceof A||(a=new A(a)),this.decode(a,a.uint32())},h.verify=function(a){return typeof a!="object"||a===null?"object expected":a.entitlementKeyId!=null&&a.hasOwnProperty("entitlementKeyId")&&!(a.entitlementKeyId&&typeof a.entitlementKeyId.length=="number"||S.isString(a.entitlementKeyId))?"entitlementKeyId: buffer expected":a.keyId!=null&&a.hasOwnProperty("keyId")&&!(a.keyId&&typeof a.keyId.length=="number"||S.isString(a.keyId))?"keyId: buffer expected":a.key!=null&&a.hasOwnProperty("key")&&!(a.key&&typeof a.key.length=="number"||S.isString(a.key))?"key: buffer expected":a.iv!=null&&a.hasOwnProperty("iv")&&!(a.iv&&typeof a.iv.length=="number"||S.isString(a.iv))?"iv: buffer expected":a.entitlementKeySizeBytes!=null&&a.hasOwnProperty("entitlementKeySizeBytes")&&!S.isInteger(a.entitlementKeySizeBytes)?"entitlementKeySizeBytes: integer expected":null},h.fromObject=function(a){if(a instanceof w.license_protocol.WidevinePsshData.EntitledKey)return a;var p=new w.license_protocol.WidevinePsshData.EntitledKey;return a.entitlementKeyId!=null&&(typeof a.entitlementKeyId=="string"?S.base64.decode(a.entitlementKeyId,p.entitlementKeyId=S.newBuffer(S.base64.length(a.entitlementKeyId)),0):a.entitlementKeyId.length>=0&&(p.entitlementKeyId=a.entitlementKeyId)),a.keyId!=null&&(typeof a.keyId=="string"?S.base64.decode(a.keyId,p.keyId=S.newBuffer(S.base64.length(a.keyId)),0):a.keyId.length>=0&&(p.keyId=a.keyId)),a.key!=null&&(typeof a.key=="string"?S.base64.decode(a.key,p.key=S.newBuffer(S.base64.length(a.key)),0):a.key.length>=0&&(p.key=a.key)),a.iv!=null&&(typeof a.iv=="string"?S.base64.decode(a.iv,p.iv=S.newBuffer(S.base64.length(a.iv)),0):a.iv.length>=0&&(p.iv=a.iv)),a.entitlementKeySizeBytes!=null&&(p.entitlementKeySizeBytes=a.entitlementKeySizeBytes>>>0),p},h.toObject=function(a,p){p||(p={});var v={};return p.defaults&&(p.bytes===String?v.entitlementKeyId="":(v.entitlementKeyId=[],p.bytes!==Array&&(v.entitlementKeyId=S.newBuffer(v.entitlementKeyId))),p.bytes===String?v.keyId="":(v.keyId=[],p.bytes!==Array&&(v.keyId=S.newBuffer(v.keyId))),p.bytes===String?v.key="":(v.key=[],p.bytes!==Array&&(v.key=S.newBuffer(v.key))),p.bytes===String?v.iv="":(v.iv=[],p.bytes!==Array&&(v.iv=S.newBuffer(v.iv))),v.entitlementKeySizeBytes=32),a.entitlementKeyId!=null&&a.hasOwnProperty("entitlementKeyId")&&(v.entitlementKeyId=p.bytes===String?S.base64.encode(a.entitlementKeyId,0,a.entitlementKeyId.length):p.bytes===Array?Array.prototype.slice.call(a.entitlementKeyId):a.entitlementKeyId),a.keyId!=null&&a.hasOwnProperty("keyId")&&(v.keyId=p.bytes===String?S.base64.encode(a.keyId,0,a.keyId.length):p.bytes===Array?Array.prototype.slice.call(a.keyId):a.keyId),a.key!=null&&a.hasOwnProperty("key")&&(v.key=p.bytes===String?S.base64.encode(a.key,0,a.key.length):p.bytes===Array?Array.prototype.slice.call(a.key):a.key),a.iv!=null&&a.hasOwnProperty("iv")&&(v.iv=p.bytes===String?S.base64.encode(a.iv,0,a.iv.length):p.bytes===Array?Array.prototype.slice.call(a.iv):a.iv),a.entitlementKeySizeBytes!=null&&a.hasOwnProperty("entitlementKeySizeBytes")&&(v.entitlementKeySizeBytes=a.entitlementKeySizeBytes),v},h.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},h.getTypeUrl=function(a){return a===void 0&&(a="type.googleapis.com"),a+"/license_protocol.WidevinePsshData.EntitledKey"},h}(),O.Algorithm=function(){var h={},s=Object.create(h);return s[h[0]="UNENCRYPTED"]=0,s[h[1]="AESCTR"]=1,s}(),O}(),P.FileHashes=function(){function O(h){if(this.signatures=[],h)for(var s=Object.keys(h),a=0;a<s.length;a+=1)h[s[a]]!=null&&(this[s[a]]=h[s[a]])}return O.prototype.signer=S.newBuffer([]),O.prototype.signatures=S.emptyArray,O.create=function(s){return new O(s)},O.encode=function(s,a){if(a||(a=k.create()),s.signer!=null&&Object.hasOwnProperty.call(s,"signer")&&a.uint32(10).bytes(s.signer),s.signatures!=null&&s.signatures.length)for(var p=0;p<s.signatures.length;p+=1)w.license_protocol.FileHashes.Signature.encode(s.signatures[p],a.uint32(18).fork()).ldelim();return a},O.encodeDelimited=function(s,a){return this.encode(s,a).ldelim()},O.decode=function(s,a){s instanceof A||(s=A.create(s));for(var p=a===void 0?s.len:s.pos+a,v=new w.license_protocol.FileHashes;s.pos<p;){var M=s.uint32();switch(M>>>3){case 1:{v.signer=s.bytes();break}case 2:{v.signatures&&v.signatures.length||(v.signatures=[]),v.signatures.push(w.license_protocol.FileHashes.Signature.decode(s,s.uint32()));break}default:s.skipType(M&7);break}}return v},O.decodeDelimited=function(s){return s instanceof A||(s=new A(s)),this.decode(s,s.uint32())},O.verify=function(s){if(typeof s!="object"||s===null)return"object expected";if(s.signer!=null&&s.hasOwnProperty("signer")&&!(s.signer&&typeof s.signer.length=="number"||S.isString(s.signer)))return"signer: buffer expected";if(s.signatures!=null&&s.hasOwnProperty("signatures")){if(!Array.isArray(s.signatures))return"signatures: array expected";for(var a=0;a<s.signatures.length;a+=1){var p=w.license_protocol.FileHashes.Signature.verify(s.signatures[a]);if(p)return"signatures."+p}}return null},O.fromObject=function(s){if(s instanceof w.license_protocol.FileHashes)return s;var a=new w.license_protocol.FileHashes;if(s.signer!=null&&(typeof s.signer=="string"?S.base64.decode(s.signer,a.signer=S.newBuffer(S.base64.length(s.signer)),0):s.signer.length>=0&&(a.signer=s.signer)),s.signatures){if(!Array.isArray(s.signatures))throw TypeError(".license_protocol.FileHashes.signatures: array expected");a.signatures=[];for(var p=0;p<s.signatures.length;p+=1){if(typeof s.signatures[p]!="object")throw TypeError(".license_protocol.FileHashes.signatures: object expected");a.signatures[p]=w.license_protocol.FileHashes.Signature.fromObject(s.signatures[p])}}return a},O.toObject=function(s,a){a||(a={});var p={};if((a.arrays||a.defaults)&&(p.signatures=[]),a.defaults&&(a.bytes===String?p.signer="":(p.signer=[],a.bytes!==Array&&(p.signer=S.newBuffer(p.signer))),s.signer!=null&&s.hasOwnProperty("signer")&&(p.signer=a.bytes===String?S.base64.encode(s.signer,0,s.signer.length):a.bytes===Array?Array.prototype.slice.call(s.signer):s.signer)),s.signatures&&s.signatures.length){p.signatures=[];for(var v=0;v<s.signatures.length;v+=1)p.signatures[v]=w.license_protocol.FileHashes.Signature.toObject(s.signatures[v],a)}return p},O.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},O.getTypeUrl=function(s){return s===void 0&&(s="type.googleapis.com"),s+"/license_protocol.FileHashes"},O.Signature=function(){function h(s){if(s)for(var a=Object.keys(s),p=0;p<a.length;p+=1)s[a[p]]!=null&&(this[a[p]]=s[a[p]])}return h.prototype.filename="",h.prototype.testSigning=!1,h.prototype.SHA512Hash=S.newBuffer([]),h.prototype.mainExe=!1,h.prototype.signature=S.newBuffer([]),h.create=function(a){return new h(a)},h.encode=function(a,p){return p||(p=k.create()),a.filename!=null&&Object.hasOwnProperty.call(a,"filename")&&p.uint32(10).string(a.filename),a.testSigning!=null&&Object.hasOwnProperty.call(a,"testSigning")&&p.uint32(16).bool(a.testSigning),a.SHA512Hash!=null&&Object.hasOwnProperty.call(a,"SHA512Hash")&&p.uint32(26).bytes(a.SHA512Hash),a.mainExe!=null&&Object.hasOwnProperty.call(a,"mainExe")&&p.uint32(32).bool(a.mainExe),a.signature!=null&&Object.hasOwnProperty.call(a,"signature")&&p.uint32(42).bytes(a.signature),p},h.encodeDelimited=function(a,p){return this.encode(a,p).ldelim()},h.decode=function(a,p){a instanceof A||(a=A.create(a));for(var v=p===void 0?a.len:a.pos+p,M=new w.license_protocol.FileHashes.Signature;a.pos<v;){var F=a.uint32();switch(F>>>3){case 1:{M.filename=a.string();break}case 2:{M.testSigning=a.bool();break}case 3:{M.SHA512Hash=a.bytes();break}case 4:{M.mainExe=a.bool();break}case 5:{M.signature=a.bytes();break}default:a.skipType(F&7);break}}return M},h.decodeDelimited=function(a){return a instanceof A||(a=new A(a)),this.decode(a,a.uint32())},h.verify=function(a){return typeof a!="object"||a===null?"object expected":a.filename!=null&&a.hasOwnProperty("filename")&&!S.isString(a.filename)?"filename: string expected":a.testSigning!=null&&a.hasOwnProperty("testSigning")&&typeof a.testSigning!="boolean"?"testSigning: boolean expected":a.SHA512Hash!=null&&a.hasOwnProperty("SHA512Hash")&&!(a.SHA512Hash&&typeof a.SHA512Hash.length=="number"||S.isString(a.SHA512Hash))?"SHA512Hash: buffer expected":a.mainExe!=null&&a.hasOwnProperty("mainExe")&&typeof a.mainExe!="boolean"?"mainExe: boolean expected":a.signature!=null&&a.hasOwnProperty("signature")&&!(a.signature&&typeof a.signature.length=="number"||S.isString(a.signature))?"signature: buffer expected":null},h.fromObject=function(a){if(a instanceof w.license_protocol.FileHashes.Signature)return a;var p=new w.license_protocol.FileHashes.Signature;return a.filename!=null&&(p.filename=String(a.filename)),a.testSigning!=null&&(p.testSigning=!!a.testSigning),a.SHA512Hash!=null&&(typeof a.SHA512Hash=="string"?S.base64.decode(a.SHA512Hash,p.SHA512Hash=S.newBuffer(S.base64.length(a.SHA512Hash)),0):a.SHA512Hash.length>=0&&(p.SHA512Hash=a.SHA512Hash)),a.mainExe!=null&&(p.mainExe=!!a.mainExe),a.signature!=null&&(typeof a.signature=="string"?S.base64.decode(a.signature,p.signature=S.newBuffer(S.base64.length(a.signature)),0):a.signature.length>=0&&(p.signature=a.signature)),p},h.toObject=function(a,p){p||(p={});var v={};return p.defaults&&(v.filename="",v.testSigning=!1,p.bytes===String?v.SHA512Hash="":(v.SHA512Hash=[],p.bytes!==Array&&(v.SHA512Hash=S.newBuffer(v.SHA512Hash))),v.mainExe=!1,p.bytes===String?v.signature="":(v.signature=[],p.bytes!==Array&&(v.signature=S.newBuffer(v.signature)))),a.filename!=null&&a.hasOwnProperty("filename")&&(v.filename=a.filename),a.testSigning!=null&&a.hasOwnProperty("testSigning")&&(v.testSigning=a.testSigning),a.SHA512Hash!=null&&a.hasOwnProperty("SHA512Hash")&&(v.SHA512Hash=p.bytes===String?S.base64.encode(a.SHA512Hash,0,a.SHA512Hash.length):p.bytes===Array?Array.prototype.slice.call(a.SHA512Hash):a.SHA512Hash),a.mainExe!=null&&a.hasOwnProperty("mainExe")&&(v.mainExe=a.mainExe),a.signature!=null&&a.hasOwnProperty("signature")&&(v.signature=p.bytes===String?S.base64.encode(a.signature,0,a.signature.length):p.bytes===Array?Array.prototype.slice.call(a.signature):a.signature),v},h.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},h.getTypeUrl=function(a){return a===void 0&&(a="type.googleapis.com"),a+"/license_protocol.FileHashes.Signature"},h}(),O}(),P}(),w})(protobuf);const{SignedMessage:w4,LicenseRequest:T4}=protobuf.roots.default.license_protocol;function FC(E){const A=Array.from(E).map(k=>String.fromCharCode(k)).join("");return btoa(A)}function x4(E){E=E.replace(/^await\s+/,"");const A=/fetch\(['"](.+?)['"],\s*(\{.+?\})\)/s;E.split(`
`).map(O=>O.trim()).filter(Boolean);const k={method:"UNDEFINED",url:"",headers:{},body:null},S=E.match(A);if(!S)throw console.log(E),new Error("Invalid 'Copy as fetch' string.");k.url=S[1];const w=S[2],P=JSON.parse(w);return P.method&&(k.method=P.method),P.headers&&(k.headers=P.headers),P.body&&(k.body=P.body),k}const E4=new Uint8Array([237,239,139,169,121,214,74,206,163,200,39,220,213,29,33,237]),A4=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]),C4=new Uint8Array([112,115,115,104]);function I2(E,A){const k=new ArrayBuffer(4);return new DataView(k).setUint32(0,E,A),new Uint8Array(k)}function p2(E,A){const k=new ArrayBuffer(2);return new DataView(k).setUint16(0,E,A),new Uint8Array(k)}function nC(E,A){const k=E.length,S=k+32,w=new Uint8Array([...I2(S,!1),...C4,...new Uint8Array(4),...A,...I2(k,!1),...E]);return FC(w)}function b4(E){const A=new Uint8Array([...p2(1,!0),...p2(E.length,!0),...E]);return new Uint8Array([...I2(A.length+2+4,!0),...p2(1,!0),...A])}function I4(E){const A=new Uint8Array(E.length*2);for(let k=0;k<E.length;k++){const S=E.charCodeAt(k);A[k*2]=S&255,A[k*2+1]=S>>8}return A}function D4(E){return Uint8Array.from(E.split("").map(A=>A.charCodeAt()))}async function O4(){try{const E=await navigator.clipboard.readText(),A=x4(E);let k,S;if(A.body.startsWith("<")){S=A.body;const w=S.match(/.*(<WRMHEADER.*<\/WRMHEADER>).*/),P=w?w[1]:null,O=I4(P),h=b4(O);k=nC(h,A4)}else{const w=D4(A.body);let P,O;try{P=w4.decode(w),O=T4.decode(P.msg)}catch(h){console.error("Decoding failed, returning empty pssh",h),k=""}if(O&&O.contentId&&O.contentId.widevinePsshData){const h=O.contentId.widevinePsshData.psshData[0];k=nC(h,E4)}k4(w)?S=FC(w):S=A.body}document.getElementById("licurl").value=A.url,document.getElementById("headers").value=JSON.stringify(A.headers),document.getElementById("pssh").value=k,document.getElementById("data").value=S}catch(E){console.error("Failed to read clipboard contents:",E)}}function k4(E){return E.some(A=>A>127)}var h2={exports:{}},y2,iC;function R4(){if(iC)return y2;iC=1;var E="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return y2=E,y2}var g2,rC;function M4(){if(rC)return g2;rC=1;var E=R4();function A(){}function k(){}return k.resetWarningCache=A,g2=function(){function S(O,h,s,a,p,v){if(v!==E){var M=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw M.name="Invariant Violation",M}}S.isRequired=S;function w(){return S}var P={array:S,bigint:S,bool:S,func:S,number:S,object:S,string:S,symbol:S,any:S,arrayOf:w,element:S,elementType:S,instanceOf:w,node:S,objectOf:w,oneOf:w,oneOfType:w,shape:w,exact:w,checkPropTypes:k,resetWarningCache:A};return P.PropTypes=P,P},g2}var oC;function N4(){return oC||(oC=1,h2.exports=M4()()),h2.exports}var P4=N4();const Wn=Np(P4);var m2,lC;function L4(){if(lC)return m2;lC=1;function E(h){return h&&typeof h=="object"&&"default"in h?h.default:h}var A=y0(),k=E(A);function S(h,s,a){return s in h?Object.defineProperty(h,s,{value:a,enumerable:!0,configurable:!0,writable:!0}):h[s]=a,h}function w(h,s){h.prototype=Object.create(s.prototype),h.prototype.constructor=h,h.__proto__=s}var P=!!(typeof window<"u"&&window.document&&window.document.createElement);function O(h,s,a){if(typeof h!="function")throw new Error("Expected reducePropsToState to be a function.");if(typeof s!="function")throw new Error("Expected handleStateChangeOnClient to be a function.");if(typeof a<"u"&&typeof a!="function")throw new Error("Expected mapStateOnServer to either be undefined or a function.");function p(v){return v.displayName||v.name||"Component"}return function(M){if(typeof M!="function")throw new Error("Expected WrappedComponent to be a React component.");var F=[],b;function J(){b=h(F.map(function(ce){return ce.props})),$.canUseDOM?s(b):a&&(b=a(b))}var $=function(ce){w(Re,ce);function Re(){return ce.apply(this,arguments)||this}Re.peek=function(){return b},Re.rewind=function(){if(Re.canUseDOM)throw new Error("You may only call rewind() on the server. Call peek() to read the current state.");var Oe=b;return b=void 0,F=[],Oe};var ee=Re.prototype;return ee.UNSAFE_componentWillMount=function(){F.push(this),J()},ee.componentDidUpdate=function(){J()},ee.componentWillUnmount=function(){var Oe=F.indexOf(this);F.splice(Oe,1),J()},ee.render=function(){return k.createElement(M,this.props)},Re}(A.PureComponent);return S($,"displayName","SideEffect("+p(M)+")"),S($,"canUseDOM",P),$}}return m2=O,m2}var _4=L4();const U4=Np(_4);var v2,aC;function j4(){if(aC)return v2;aC=1;var E=typeof Element<"u",A=typeof Map=="function",k=typeof Set=="function",S=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function w(P,O){if(P===O)return!0;if(P&&O&&typeof P=="object"&&typeof O=="object"){if(P.constructor!==O.constructor)return!1;var h,s,a;if(Array.isArray(P)){if(h=P.length,h!=O.length)return!1;for(s=h;s--!==0;)if(!w(P[s],O[s]))return!1;return!0}var p;if(A&&P instanceof Map&&O instanceof Map){if(P.size!==O.size)return!1;for(p=P.entries();!(s=p.next()).done;)if(!O.has(s.value[0]))return!1;for(p=P.entries();!(s=p.next()).done;)if(!w(s.value[1],O.get(s.value[0])))return!1;return!0}if(k&&P instanceof Set&&O instanceof Set){if(P.size!==O.size)return!1;for(p=P.entries();!(s=p.next()).done;)if(!O.has(s.value[0]))return!1;return!0}if(S&&ArrayBuffer.isView(P)&&ArrayBuffer.isView(O)){if(h=P.length,h!=O.length)return!1;for(s=h;s--!==0;)if(P[s]!==O[s])return!1;return!0}if(P.constructor===RegExp)return P.source===O.source&&P.flags===O.flags;if(P.valueOf!==Object.prototype.valueOf&&typeof P.valueOf=="function"&&typeof O.valueOf=="function")return P.valueOf()===O.valueOf();if(P.toString!==Object.prototype.toString&&typeof P.toString=="function"&&typeof O.toString=="function")return P.toString()===O.toString();if(a=Object.keys(P),h=a.length,h!==Object.keys(O).length)return!1;for(s=h;s--!==0;)if(!Object.prototype.hasOwnProperty.call(O,a[s]))return!1;if(E&&P instanceof Element)return!1;for(s=h;s--!==0;)if(!((a[s]==="_owner"||a[s]==="__v"||a[s]==="__o")&&P.$$typeof)&&!w(P[a[s]],O[a[s]]))return!1;return!0}return P!==P&&O!==O}return v2=function(O,h){try{return w(O,h)}catch(s){if((s.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw s}},v2}var B4=j4();const V4=Np(B4);/*
object-assign
(c) Sindre Sorhus
@license MIT
*/var S2,uC;function H4(){if(uC)return S2;uC=1;var E=Object.getOwnPropertySymbols,A=Object.prototype.hasOwnProperty,k=Object.prototype.propertyIsEnumerable;function S(P){if(P==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(P)}function w(){try{if(!Object.assign)return!1;var P=new String("abc");if(P[5]="de",Object.getOwnPropertyNames(P)[0]==="5")return!1;for(var O={},h=0;h<10;h++)O["_"+String.fromCharCode(h)]=h;var s=Object.getOwnPropertyNames(O).map(function(p){return O[p]});if(s.join("")!=="0123456789")return!1;var a={};return"abcdefghijklmnopqrst".split("").forEach(function(p){a[p]=p}),Object.keys(Object.assign({},a)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return S2=w()?Object.assign:function(P,O){for(var h,s=S(P),a,p=1;p<arguments.length;p++){h=Object(arguments[p]);for(var v in h)A.call(h,v)&&(s[v]=h[v]);if(E){a=E(h);for(var M=0;M<a.length;M++)k.call(h,a[M])&&(s[a[M]]=h[a[M]])}}return s},S2}var K4=H4();const q4=Np(K4);var qf={BODY:"bodyAttributes",HTML:"htmlAttributes",TITLE:"titleAttributes"},_t={BASE:"base",BODY:"body",HEAD:"head",HTML:"html",LINK:"link",META:"meta",NOSCRIPT:"noscript",SCRIPT:"script",STYLE:"style",TITLE:"title"};Object.keys(_t).map(function(E){return _t[E]});var Qn={CHARSET:"charset",CSS_TEXT:"cssText",HREF:"href",HTTPEQUIV:"http-equiv",INNER_HTML:"innerHTML",ITEM_PROP:"itemprop",NAME:"name",PROPERTY:"property",REL:"rel",SRC:"src",TARGET:"target"},d0={accesskey:"accessKey",charset:"charSet",class:"className",contenteditable:"contentEditable",contextmenu:"contextMenu","http-equiv":"httpEquiv",itemprop:"itemProp",tabindex:"tabIndex"},dg={DEFAULT_TITLE:"defaultTitle",DEFER:"defer",ENCODE_SPECIAL_CHARACTERS:"encodeSpecialCharacters",ON_CHANGE_CLIENT_STATE:"onChangeClientState",TITLE_TEMPLATE:"titleTemplate"},F4=Object.keys(d0).reduce(function(E,A){return E[d0[A]]=A,E},{}),z4=[_t.NOSCRIPT,_t.SCRIPT,_t.STYLE],Zl="data-react-helmet",G4=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(E){return typeof E}:function(E){return E&&typeof Symbol=="function"&&E.constructor===Symbol&&E!==Symbol.prototype?"symbol":typeof E},X4=function(E,A){if(!(E instanceof A))throw new TypeError("Cannot call a class as a function")},Y4=function(){function E(A,k){for(var S=0;S<k.length;S++){var w=k[S];w.enumerable=w.enumerable||!1,w.configurable=!0,"value"in w&&(w.writable=!0),Object.defineProperty(A,w.key,w)}}return function(A,k,S){return k&&E(A.prototype,k),S&&E(A,S),A}}(),$r=Object.assign||function(E){for(var A=1;A<arguments.length;A++){var k=arguments[A];for(var S in k)Object.prototype.hasOwnProperty.call(k,S)&&(E[S]=k[S])}return E},W4=function(E,A){if(typeof A!="function"&&A!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof A);E.prototype=Object.create(A&&A.prototype,{constructor:{value:E,enumerable:!1,writable:!0,configurable:!0}}),A&&(Object.setPrototypeOf?Object.setPrototypeOf(E,A):E.__proto__=A)},sC=function(E,A){var k={};for(var S in E)A.indexOf(S)>=0||Object.prototype.hasOwnProperty.call(E,S)&&(k[S]=E[S]);return k},Q4=function(E,A){if(!E)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return A&&(typeof A=="object"||typeof A=="function")?A:E},D2=function(A){var k=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return k===!1?String(A):String(A).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;")},J4=function(A){var k=Rp(A,_t.TITLE),S=Rp(A,dg.TITLE_TEMPLATE);if(S&&k)return S.replace(/%s/g,function(){return Array.isArray(k)?k.join(""):k});var w=Rp(A,dg.DEFAULT_TITLE);return k||w||void 0},Z4=function(A){return Rp(A,dg.ON_CHANGE_CLIENT_STATE)||function(){}},w2=function(A,k){return k.filter(function(S){return typeof S[A]<"u"}).map(function(S){return S[A]}).reduce(function(S,w){return $r({},S,w)},{})},$4=function(A,k){return k.filter(function(S){return typeof S[_t.BASE]<"u"}).map(function(S){return S[_t.BASE]}).reverse().reduce(function(S,w){if(!S.length)for(var P=Object.keys(w),O=0;O<P.length;O++){var h=P[O],s=h.toLowerCase();if(A.indexOf(s)!==-1&&w[s])return S.concat(w)}return S},[])},og=function(A,k,S){var w={};return S.filter(function(P){return Array.isArray(P[A])?!0:(typeof P[A]<"u"&&iM("Helmet: "+A+' should be of type "Array". Instead found type "'+G4(P[A])+'"'),!1)}).map(function(P){return P[A]}).reverse().reduce(function(P,O){var h={};O.filter(function(M){for(var F=void 0,b=Object.keys(M),J=0;J<b.length;J++){var $=b[J],ce=$.toLowerCase();k.indexOf(ce)!==-1&&!(F===Qn.REL&&M[F].toLowerCase()==="canonical")&&!(ce===Qn.REL&&M[ce].toLowerCase()==="stylesheet")&&(F=ce),k.indexOf($)!==-1&&($===Qn.INNER_HTML||$===Qn.CSS_TEXT||$===Qn.ITEM_PROP)&&(F=$)}if(!F||!M[F])return!1;var Re=M[F].toLowerCase();return w[F]||(w[F]={}),h[F]||(h[F]={}),w[F][Re]?!1:(h[F][Re]=!0,!0)}).reverse().forEach(function(M){return P.push(M)});for(var s=Object.keys(h),a=0;a<s.length;a++){var p=s[a],v=q4({},w[p],h[p]);w[p]=v}return P},[]).reverse()},Rp=function(A,k){for(var S=A.length-1;S>=0;S--){var w=A[S];if(w.hasOwnProperty(k))return w[k]}return null},eM=function(A){return{baseTag:$4([Qn.HREF,Qn.TARGET],A),bodyAttributes:w2(qf.BODY,A),defer:Rp(A,dg.DEFER),encode:Rp(A,dg.ENCODE_SPECIAL_CHARACTERS),htmlAttributes:w2(qf.HTML,A),linkTags:og(_t.LINK,[Qn.REL,Qn.HREF],A),metaTags:og(_t.META,[Qn.NAME,Qn.CHARSET,Qn.HTTPEQUIV,Qn.PROPERTY,Qn.ITEM_PROP],A),noscriptTags:og(_t.NOSCRIPT,[Qn.INNER_HTML],A),onChangeClientState:Z4(A),scriptTags:og(_t.SCRIPT,[Qn.SRC,Qn.INNER_HTML],A),styleTags:og(_t.STYLE,[Qn.CSS_TEXT],A),title:J4(A),titleAttributes:w2(qf.TITLE,A)}},O2=function(){var E=Date.now();return function(A){var k=Date.now();k-E>16?(E=k,A(k)):setTimeout(function(){O2(A)},0)}}(),cC=function(A){return clearTimeout(A)},tM=typeof window<"u"?window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||O2:global.requestAnimationFrame||O2,nM=typeof window<"u"?window.cancelAnimationFrame||window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame||cC:global.cancelAnimationFrame||cC,iM=function(A){return console&&typeof console.warn=="function"&&console.warn(A)},lg=null,rM=function(A){lg&&nM(lg),A.defer?lg=tM(function(){fC(A,function(){lg=null})}):(fC(A),lg=null)},fC=function(A,k){var S=A.baseTag,w=A.bodyAttributes,P=A.htmlAttributes,O=A.linkTags,h=A.metaTags,s=A.noscriptTags,a=A.onChangeClientState,p=A.scriptTags,v=A.styleTags,M=A.title,F=A.titleAttributes;k2(_t.BODY,w),k2(_t.HTML,P),oM(M,F);var b={baseTag:Op(_t.BASE,S),linkTags:Op(_t.LINK,O),metaTags:Op(_t.META,h),noscriptTags:Op(_t.NOSCRIPT,s),scriptTags:Op(_t.SCRIPT,p),styleTags:Op(_t.STYLE,v)},J={},$={};Object.keys(b).forEach(function(ce){var Re=b[ce],ee=Re.newTags,be=Re.oldTags;ee.length&&(J[ce]=ee),be.length&&($[ce]=b[ce].oldTags)}),k&&k(),a(A,J,$)},zC=function(A){return Array.isArray(A)?A.join(""):A},oM=function(A,k){typeof A<"u"&&document.title!==A&&(document.title=zC(A)),k2(_t.TITLE,k)},k2=function(A,k){var S=document.getElementsByTagName(A)[0];if(S){for(var w=S.getAttribute(Zl),P=w?w.split(","):[],O=[].concat(P),h=Object.keys(k),s=0;s<h.length;s++){var a=h[s],p=k[a]||"";S.getAttribute(a)!==p&&S.setAttribute(a,p),P.indexOf(a)===-1&&P.push(a);var v=O.indexOf(a);v!==-1&&O.splice(v,1)}for(var M=O.length-1;M>=0;M--)S.removeAttribute(O[M]);P.length===O.length?S.removeAttribute(Zl):S.getAttribute(Zl)!==h.join(",")&&S.setAttribute(Zl,h.join(","))}},Op=function(A,k){var S=document.head||document.querySelector(_t.HEAD),w=S.querySelectorAll(A+"["+Zl+"]"),P=Array.prototype.slice.call(w),O=[],h=void 0;return k&&k.length&&k.forEach(function(s){var a=document.createElement(A);for(var p in s)if(s.hasOwnProperty(p))if(p===Qn.INNER_HTML)a.innerHTML=s.innerHTML;else if(p===Qn.CSS_TEXT)a.styleSheet?a.styleSheet.cssText=s.cssText:a.appendChild(document.createTextNode(s.cssText));else{var v=typeof s[p]>"u"?"":s[p];a.setAttribute(p,v)}a.setAttribute(Zl,"true"),P.some(function(M,F){return h=F,a.isEqualNode(M)})?P.splice(h,1):O.push(a)}),P.forEach(function(s){return s.parentNode.removeChild(s)}),O.forEach(function(s){return S.appendChild(s)}),{oldTags:P,newTags:O}},GC=function(A){return Object.keys(A).reduce(function(k,S){var w=typeof A[S]<"u"?S+'="'+A[S]+'"':""+S;return k?k+" "+w:w},"")},lM=function(A,k,S,w){var P=GC(S),O=zC(k);return P?"<"+A+" "+Zl+'="true" '+P+">"+D2(O,w)+"</"+A+">":"<"+A+" "+Zl+'="true">'+D2(O,w)+"</"+A+">"},aM=function(A,k,S){return k.reduce(function(w,P){var O=Object.keys(P).filter(function(a){return!(a===Qn.INNER_HTML||a===Qn.CSS_TEXT)}).reduce(function(a,p){var v=typeof P[p]>"u"?p:p+'="'+D2(P[p],S)+'"';return a?a+" "+v:v},""),h=P.innerHTML||P.cssText||"",s=z4.indexOf(A)===-1;return w+"<"+A+" "+Zl+'="true" '+O+(s?"/>":">"+h+"</"+A+">")},"")},XC=function(A){var k=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return Object.keys(A).reduce(function(S,w){return S[d0[w]||w]=A[w],S},k)},uM=function(A){var k=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return Object.keys(A).reduce(function(S,w){return S[F4[w]||w]=A[w],S},k)},sM=function(A,k,S){var w,P=(w={key:k},w[Zl]=!0,w),O=XC(S,P);return[cg.createElement(_t.TITLE,O,k)]},cM=function(A,k){return k.map(function(S,w){var P,O=(P={key:w},P[Zl]=!0,P);return Object.keys(S).forEach(function(h){var s=d0[h]||h;if(s===Qn.INNER_HTML||s===Qn.CSS_TEXT){var a=S.innerHTML||S.cssText;O.dangerouslySetInnerHTML={__html:a}}else O[s]=S[h]}),cg.createElement(A,O)})},zu=function(A,k,S){switch(A){case _t.TITLE:return{toComponent:function(){return sM(A,k.title,k.titleAttributes)},toString:function(){return lM(A,k.title,k.titleAttributes,S)}};case qf.BODY:case qf.HTML:return{toComponent:function(){return XC(k)},toString:function(){return GC(k)}};default:return{toComponent:function(){return cM(A,k)},toString:function(){return aM(A,k,S)}}}},YC=function(A){var k=A.baseTag,S=A.bodyAttributes,w=A.encode,P=A.htmlAttributes,O=A.linkTags,h=A.metaTags,s=A.noscriptTags,a=A.scriptTags,p=A.styleTags,v=A.title,M=v===void 0?"":v,F=A.titleAttributes;return{base:zu(_t.BASE,k,w),bodyAttributes:zu(qf.BODY,S,w),htmlAttributes:zu(qf.HTML,P,w),link:zu(_t.LINK,O,w),meta:zu(_t.META,h,w),noscript:zu(_t.NOSCRIPT,s,w),script:zu(_t.SCRIPT,a,w),style:zu(_t.STYLE,p,w),title:zu(_t.TITLE,{title:M,titleAttributes:F},w)}},fM=function(A){var k,S;return S=k=function(w){W4(P,w);function P(){return X4(this,P),Q4(this,w.apply(this,arguments))}return P.prototype.shouldComponentUpdate=function(h){return!V4(this.props,h)},P.prototype.mapNestedChildrenToProps=function(h,s){if(!s)return null;switch(h.type){case _t.SCRIPT:case _t.NOSCRIPT:return{innerHTML:s};case _t.STYLE:return{cssText:s}}throw new Error("<"+h.type+" /> elements are self-closing and can not contain children. Refer to our API for more information.")},P.prototype.flattenArrayTypeChildren=function(h){var s,a=h.child,p=h.arrayTypeChildren,v=h.newChildProps,M=h.nestedChildren;return $r({},p,(s={},s[a.type]=[].concat(p[a.type]||[],[$r({},v,this.mapNestedChildrenToProps(a,M))]),s))},P.prototype.mapObjectTypeChildren=function(h){var s,a,p=h.child,v=h.newProps,M=h.newChildProps,F=h.nestedChildren;switch(p.type){case _t.TITLE:return $r({},v,(s={},s[p.type]=F,s.titleAttributes=$r({},M),s));case _t.BODY:return $r({},v,{bodyAttributes:$r({},M)});case _t.HTML:return $r({},v,{htmlAttributes:$r({},M)})}return $r({},v,(a={},a[p.type]=$r({},M),a))},P.prototype.mapArrayTypeChildrenToProps=function(h,s){var a=$r({},s);return Object.keys(h).forEach(function(p){var v;a=$r({},a,(v={},v[p]=h[p],v))}),a},P.prototype.warnOnInvalidChildren=function(h,s){return!0},P.prototype.mapChildrenToProps=function(h,s){var a=this,p={};return cg.Children.forEach(h,function(v){if(!(!v||!v.props)){var M=v.props,F=M.children,b=sC(M,["children"]),J=uM(b);switch(a.warnOnInvalidChildren(v,F),v.type){case _t.LINK:case _t.META:case _t.NOSCRIPT:case _t.SCRIPT:case _t.STYLE:p=a.flattenArrayTypeChildren({child:v,arrayTypeChildren:p,newChildProps:J,nestedChildren:F});break;default:s=a.mapObjectTypeChildren({child:v,newProps:s,newChildProps:J,nestedChildren:F});break}}}),s=this.mapArrayTypeChildrenToProps(p,s),s},P.prototype.render=function(){var h=this.props,s=h.children,a=sC(h,["children"]),p=$r({},a);return s&&(p=this.mapChildrenToProps(s,p)),cg.createElement(A,p)},Y4(P,null,[{key:"canUseDOM",set:function(h){A.canUseDOM=h}}]),P}(cg.Component),k.propTypes={base:Wn.object,bodyAttributes:Wn.object,children:Wn.oneOfType([Wn.arrayOf(Wn.node),Wn.node]),defaultTitle:Wn.string,defer:Wn.bool,encodeSpecialCharacters:Wn.bool,htmlAttributes:Wn.object,link:Wn.arrayOf(Wn.object),meta:Wn.arrayOf(Wn.object),noscript:Wn.arrayOf(Wn.object),onChangeClientState:Wn.func,script:Wn.arrayOf(Wn.object),style:Wn.arrayOf(Wn.object),title:Wn.string,titleAttributes:Wn.object,titleTemplate:Wn.string},k.defaultProps={defer:!0,encodeSpecialCharacters:!0},k.peek=A.peek,k.rewind=function(){var w=A.rewind();return w||(w=YC({baseTag:[],bodyAttributes:{},htmlAttributes:{},linkTags:[],metaTags:[],noscriptTags:[],scriptTags:[],styleTags:[],title:"",titleAttributes:{}})),w},S},dM=function(){return null},pM=U4(eM,rM,YC)(dM),Mp=fM(pM);Mp.renderStatic=Mp.rewind;function hM(){const[E,A]=ve.useState(""),[k,S]=ve.useState(""),[w,P]=ve.useState(""),[O,h]=ve.useState(""),[s,a]=ve.useState(""),[p,v]=ve.useState(""),[M,F]=ve.useState(""),[b,J]=ve.useState(!1),[$,ce]=ve.useState([]),[Re,ee]=ve.useState("default"),be=ve.useRef(null),Oe=ve.useRef(null),ot=()=>{b&&J(!1),A(""),S(""),P(""),h(""),a(""),v("")},et=_=>{_.preventDefault(),fetch("/api/decrypt",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({pssh:E,licurl:k,proxy:w,headers:O,cookies:s,data:p,device:Re})}).then(se=>se.json()).then(se=>{const pe=se.message.replace(/\n/g,"<br />");F(pe),J(!0)}).catch(se=>{console.error("Error during decryption request:",se),F("Error: Unable to process request."),J(!0)})},pt=_=>{if(_.preventDefault(),Oe.current){const se=Oe.current.innerText;navigator.clipboard.writeText(se).catch(pe=>{alert("Failed to copy!"),console.error(pe)})}},Nt=()=>{event.preventDefault(),O4().then(()=>{A(document.getElementById("pssh").value),S(document.getElementById("licurl").value),h(document.getElementById("headers").value),v(document.getElementById("data").value)}).catch(_=>{alert("Failed to paste from fetch!")})};return ve.useEffect(()=>{b&&be.current&&be.current.scrollIntoView({behavior:"smooth"})},[M,b]),ve.useEffect(()=>{fetch("/login/status",{method:"POST"}).then(_=>_.json()).then(_=>{if(_.message==="True")return fetch("/userinfo",{method:"POST"});throw new Error("Not logged in")}).then(_=>_.json()).then(_=>{const pe=["CDRM-Project Public Widevine CDM","CDRM-Project Public PlayReady CDM",...[..._.Widevine_Devices,..._.Playready_Devices]];ce(pe.length>0?pe:[]),ee(pe.length>0?pe[0]:"default")}).catch(()=>{ce([]),ee("default")})},[]),te.jsxs(te.Fragment,{children:[te.jsxs("div",{className:"flex flex-col w-full overflow-y-auto p-4 min-h-full",children:[te.jsx(Mp,{children:te.jsx("title",{children:"CDRM-Project"})}),te.jsxs("form",{className:"flex flex-col w-full h-full bg-black/5 p-4 overflow-y-auto",children:[te.jsx("label",{htmlFor:"pssh",className:"text-white w-8/10 self-center",children:"PSSH: "}),te.jsx("input",{type:"text",id:"pssh",className:"w-8/10 border-2 border-sky-500/25 rounded-xl h-10 self-center m-2 text-white p-1",value:E,onChange:_=>A(_.target.value)}),te.jsx("label",{htmlFor:"licurl",className:"text-white w-8/10 self-center",children:"License URL: "}),te.jsx("input",{type:"text",id:"licurl",className:"w-8/10 border-2 border-sky-500/25 rounded-xl h-10 self-center m-2 text-white p-1",value:k,onChange:_=>S(_.target.value)}),te.jsx("label",{htmlFor:"proxy",className:"text-white w-8/10 self-center",children:"Proxy: "}),te.jsx("input",{type:"text",id:"proxy",className:"w-8/10 border-2 border-sky-500/25 rounded-xl h-10 self-center m-2 text-white p-1",value:w,onChange:_=>P(_.target.value)}),te.jsx("label",{htmlFor:"headers",className:"text-white w-8/10 self-center",children:"Headers: "}),te.jsx("textarea",{id:"headers",className:"w-8/10 border-2 border-sky-500/25 rounded-xl self-center m-2 text-white p-1 h-48",value:O,onChange:_=>h(_.target.value)}),te.jsx("label",{htmlFor:"cookies",className:"text-white w-8/10 self-center",children:"Cookies: "}),te.jsx("textarea",{id:"cookies",className:"w-8/10 border-2 border-sky-500/25 rounded-xl self-center m-2 text-white p-1 h-48",value:s,onChange:_=>a(_.target.value)}),te.jsx("label",{htmlFor:"data",className:"text-white w-8/10 self-center",children:"Data: "}),te.jsx("textarea",{id:"data",className:"w-8/10 border-2 border-sky-500/25 rounded-xl self-center m-2 text-white p-1 h-48",value:p,onChange:_=>v(_.target.value)}),$.length>0&&te.jsxs(te.Fragment,{children:[te.jsx("label",{htmlFor:"device",className:"text-white w-8/10 self-center",children:"Select Device:"}),te.jsx("select",{id:"device",className:"w-8/10 border-2 border-sky-500/25 rounded-xl h-10 self-center m-2 text-white bg-black p-1",value:Re,onChange:_=>ee(_.target.value),children:$.map((_,se)=>te.jsx("option",{value:_,children:_},se))})]}),te.jsxs("div",{className:"flex flex-col lg:flex-row w-full self-center mt-5 items-center lg:justify-around lg:items-stretch",children:[te.jsx("button",{type:"button",className:"bg-sky-500/50 rounded-xl text-white text-bold text-xl p-1 lg:w-1/5 lg:h-12 truncate w-1/2",onClick:et,children:"Submit"}),te.jsx("button",{onClick:Nt,className:"bg-yellow-500/50 rounded-xl text-white text-bold text-xl p-1 lg:w-1/5 lg:h-12 truncate mt-5 w-1/2 lg:mt-0",children:"Paste from fetch"}),te.jsx("button",{type:"button",className:"bg-red-500/50 rounded-xl text-white text-bold text-xl p-1 lg:w-1/5 lg:h-12 truncate mt-5 w-1/2 lg:mt-0",onClick:ot,children:"Reset"})]})]})]}),b&&te.jsxs("div",{id:"main_content",className:"flex-col w-full h-full p-10 items-center justify-center self-center",children:[te.jsx("div",{className:"flex flex-col w-full h-full overflow-y-auto items-center",children:te.jsxs("div",{className:"w-8/10 grow p-4 text-white text-bold text-center text-xl md:text-3xl border-2 border-sky-500/25 rounded-xl bg-black/5",children:[te.jsx("p",{className:"w-full border-b-2 border-white/75 pb-2",children:"Results:"}),te.jsx("p",{className:"w-full grow pt-10 break-words overflow-y-auto",ref:Oe,dangerouslySetInnerHTML:{__html:M}}),te.jsx("div",{ref:be})]})}),te.jsx("div",{className:"flex flex-col lg:flex-row w-full self-center mt-5 items-center lg:justify-around lg:items-stretch",children:te.jsx("button",{className:"bg-green-500/50 rounded-xl text-white text-bold text-xl p-1 lg:w-1/5 lg:h-12 truncate w-1/2",onClick:pt,children:"Copy Results"})})]})]})}function yM(){const[E,A]=ve.useState(""),[k,S]=ve.useState([]),[w,P]=ve.useState(0),O=ve.useRef(null);ve.useEffect(()=>{(async()=>{try{const v=await(await fetch("/api/cache/keycount")).json();P(v.count)}catch(p){console.error("Error fetching key count:",p)}})()},[]);const h=a=>{const p=a.target.value;A(p),O.current&&clearTimeout(O.current),O.current=setTimeout(()=>{p.trim()!==""?s(p):S([])},1e3)},s=a=>{fetch("/api/cache/search",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({input:a})}).then(p=>p.json()).then(p=>S(p)).catch(p=>console.error("Error:",p))};return te.jsxs("div",{className:"flex flex-col w-full h-full overflow-y-auto p-4",children:[te.jsx(Mp,{children:te.jsx("title",{children:"Cache"})}),te.jsxs("div",{className:"flex flex-col lg:flex-row w-full lg:h-12 items-center",children:[te.jsx("input",{type:"text",value:E,onChange:h,placeholder:`Search ${w} keys...`,className:"lg:grow w-full border-2 border-emerald-500/25 rounded-xl h-10 self-center m-2 text-white p-1 focus:outline-none focus:ring-2 focus:ring-emerald-500/50 transition-all duration-200 ease-in-out"}),te.jsx("a",{href:"/api/cache/download",className:"bg-emerald-500/50 rounded-xl text-white text-bold text-xl p-1 lg:w-1/5 lg:h-10 truncate w-full text-center flex items-center justify-center m-2",children:"Download Cache"})]}),te.jsx("div",{className:"w-full grow p-4 border-2 border-emerald-500/50 rounded-2xl mt-5 overflow-y-auto",children:te.jsxs("table",{className:"min-w-full text-white",children:[te.jsx("thead",{children:te.jsxs("tr",{children:[te.jsx("th",{className:"p-2 border border-black",children:"PSSH"}),te.jsx("th",{className:"p-2 border border-black",children:"KID"}),te.jsx("th",{className:"p-2 border border-black",children:"Key"})]})}),te.jsx("tbody",{children:k.length>0?k.map((a,p)=>te.jsxs("tr",{children:[te.jsx("td",{className:"p-2 border border-black",children:a.PSSH}),te.jsx("td",{className:"p-2 border border-black",children:a.KID}),te.jsx("td",{className:"p-2 border border-black",children:a.Key})]},p)):te.jsx("tr",{children:te.jsx("td",{colSpan:"3",className:"p-2 border border-black text-center",children:"No data found"})})})]})})]})}const{protocol:R2,hostname:gM,port:o0}=window.location;let ug=`${R2}//${gM}`;(R2==="http:"&&o0!=="80"||R2==="https:"&&o0!=="443"&&o0!=="")&&(ug+=`:${o0}`);function mM(){const[E,A]=ve.useState({device_type:"",system_id:"",security_level:"",host:"",secret:"",device_name:""}),[k,S]=ve.useState({security_level:"",host:"",secret:"",device_name:""});return ve.useEffect(()=>{fetch("/remotecdm/widevine/deviceinfo").then(w=>w.json()).then(w=>{A({device_type:w.device_type,system_id:w.system_id,security_level:w.security_level,host:w.host,secret:w.secret,device_name:w.device_name})}).catch(w=>console.error("Error fetching Widevine info:",w)),fetch("/remotecdm/playready/deviceinfo").then(w=>w.json()).then(w=>{S({security_level:w.security_level,host:w.host,secret:w.secret,device_name:w.device_name})}).catch(w=>console.error("Error fetching PlayReady info:",w))},[]),te.jsxs("div",{className:"flex flex-col w-full overflow-y-auto p-4 text-white",children:[te.jsx(Mp,{children:te.jsx("title",{children:"API"})}),te.jsxs("details",{open:!0,className:"w-full list-none",children:[te.jsx("summary",{className:"text-2xl",children:"Sending a decryption request"}),te.jsx("div",{className:"mt-5 p-5 rounded-lg border-2 border-indigo-500/50",children:te.jsx("pre",{className:"rounded-lg font-mono whitespace-pre-wrap text-white overflow-auto",children:`import requests
print(requests.post(
url='${ug}/api/decrypt',
headers={
'Content-Type': 'application/json',
},
json={
'pssh': 'AAAAW3Bzc2gAAAAA7e+LqXnWSs6jyCfc1R0h7QAAADsIARIQ62dqu8s0Xpa7z2FmMPGj2hoNd2lkZXZpbmVfdGVzdCIQZmtqM2xqYVNkZmFsa3IzaioCSEQyAA==',
'licurl': 'https://cwip-shaka-proxy.appspot.com/no_auth',
'headers': str({
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:134.0) Gecko/20100101 Firefox/134.0',
'Accept': '*/*',
'Accept-Language': 'en-US,en;q=0.5',
})
}
).json()['message'])`})})]}),te.jsxs("details",{open:!0,className:"w-full list-none mt-5",children:[te.jsx("summary",{className:"text-2xl",children:"Sending a search request"}),te.jsx("div",{className:"mt-5 border-2 border-indigo-500/50 p-5 rounded-lg",children:te.jsx("pre",{className:"rounded-lg font-mono whitespace-pre text-white overflow-x-auto max-w-full p-5",children:`import requests
print(requests.post(
url='${ug}/api/cache/search',
json={
'input': 'AAAAW3Bzc2gAAAAA7e+LqXnWSs6jyCfc1R0h7QAAADsIARIQ62dqu8s0Xpa7z2FmMPGj2hoNd2lkZXZpbmVfdGVzdCIQZmtqM2xqYVNkZmFsa3IzaioCSEQyAA=='
}
).json())`})})]}),te.jsxs("details",{open:!0,className:"w-full list-none mt-5",children:[te.jsx("summary",{className:"text-2xl",children:"PyWidevine RemoteCDM info"}),te.jsx("div",{className:"mt-5 border-2 border-indigo-500/50 p-5 rounded-lg overflow-x-auto",children:te.jsxs("p",{children:[te.jsx("strong",{children:"Device Type:"})," '",E.device_type,"'",te.jsx("br",{}),te.jsx("strong",{children:"System ID:"})," ",E.system_id,te.jsx("br",{}),te.jsx("strong",{children:"Security Level:"})," ",E.security_level,te.jsx("br",{}),te.jsx("strong",{children:"Host:"})," ",ug,"/remotecdm/widevine",te.jsx("br",{}),te.jsx("strong",{children:"Secret:"})," '",E.secret,"'",te.jsx("br",{}),te.jsx("strong",{children:"Device Name:"})," ",E.device_name]})})]}),te.jsxs("details",{open:!0,className:"w-full list-none mt-5",children:[te.jsx("summary",{className:"text-2xl",children:"PyPlayready RemoteCDM info"}),te.jsx("div",{className:"mt-5 border-2 border-indigo-500/50 p-5 rounded-lg overflow-x-auto",children:te.jsxs("p",{children:[te.jsx("strong",{children:"Security Level:"})," ",k.security_level,te.jsx("br",{}),te.jsx("strong",{children:"Host:"})," ",ug,"/remotecdm/playready",te.jsx("br",{}),te.jsx("strong",{children:"Secret:"})," '",k.secret,"'",te.jsx("br",{}),te.jsx("strong",{children:"Device Name:"})," ",k.device_name]})})]})]})}var T2={};/*
@license
Shaka Player
Copyright 2016 Google LLC
SPDX-License-Identifier: Apache-2.0
*/var dC;function vM(){return dC||(dC=1,function(E){(function(){var A=typeof window<"u"?window:Vk,k={};(function(w,P,O){var h;function s(e){var t=0;return function(){return t<e.length?{done:!1,value:e[t++]}:{done:!0}}}var a=typeof Object.defineProperties=="function"?Object.defineProperty:function(e,t,n){return e==Array.prototype||e==Object.prototype||(e[t]=n.value),e};function p(e){e=[typeof globalThis=="object"&&globalThis,e,typeof w=="object"&&w,typeof self=="object"&&self,typeof P=="object"&&P];for(var t=0;t<e.length;++t){var n=e[t];if(n&&n.Math==Math)return n}throw Error("Cannot find global object")}var v=p(this);function M(e,t){if(t)e:{var n=v;e=e.split(".");for(var i=0;i<e.length-1;i++){var r=e[i];if(!(r in n))break e;n=n[r]}e=e[e.length-1],i=n[e],t=t(i),t!=i&&t!=null&&a(n,e,{configurable:!0,writable:!0,value:t})}}M("Symbol",function(e){function t(l){if(this instanceof t)throw new TypeError("Symbol is not a constructor");return new n(i+(l||"")+"_"+r++,l)}function n(l,c){this.g=l,a(this,"description",{configurable:!0,writable:!0,value:c})}if(e)return e;n.prototype.toString=function(){return this.g};var i="jscomp_symbol_"+(1e9*Math.random()>>>0)+"_",r=0;return t}),M("Symbol.iterator",function(e){if(e)return e;e=Symbol("Symbol.iterator");for(var t="Array Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array".split(" "),n=0;n<t.length;n++){var i=v[t[n]];typeof i=="function"&&typeof i.prototype[e]!="function"&&a(i.prototype,e,{configurable:!0,writable:!0,value:function(){return F(s(this))}})}return e});function F(e){return e={next:e},e[Symbol.iterator]=function(){return this},e}function b(e){var t=typeof Symbol<"u"&&Symbol.iterator&&e[Symbol.iterator];if(t)return t.call(e);if(typeof e.length=="number")return{next:s(e)};throw Error(String(e)+" is not an iterable or ArrayLike")}function J(e){if(!(e instanceof Array)){e=b(e);for(var t,n=[];!(t=e.next()).done;)n.push(t.value);e=n}return e}var $=typeof Object.create=="function"?Object.create:function(e){function t(){}return t.prototype=e,new t},ce;if(typeof Object.setPrototypeOf=="function")ce=Object.setPrototypeOf;else{var Re;e:{var ee={a:!0},be={};try{be.__proto__=ee,Re=be.a;break e}catch{}Re=!1}ce=Re?function(e,t){if(e.__proto__=t,e.__proto__!==t)throw new TypeError(e+" is not extensible");return e}:null}var Oe=ce;function ot(e,t){if(e.prototype=$(t.prototype),e.prototype.constructor=e,Oe)Oe(e,t);else for(var n in t)if(n!="prototype")if(Object.defineProperties){var i=Object.getOwnPropertyDescriptor(t,n);i&&Object.defineProperty(e,n,i)}else e[n]=t[n];e.Tk=t.prototype}function et(){this.o=!1,this.l=null,this.h=void 0,this.g=1,this.j=this.m=0,this.A=this.i=null}function pt(e){if(e.o)throw new TypeError("Generator is already running");e.o=!0}et.prototype.u=function(e){this.h=e};function Nt(e,t){e.i={Ng:t,Zg:!0},e.g=e.m||e.j}et.prototype.return=function(e){this.i={return:e},this.g=this.j};function _(e,t,n){return e.g=n,{value:t}}et.prototype.s=function(e){this.g=e};function se(e){e.g=0}function pe(e,t,n){e.m=t,n!=null&&(e.j=n)}function rt(e,t){e.m=0,e.j=t||0}function Ue(e,t,n){e.g=t,e.m=n||0}function Me(e,t){return e.m=t||0,t=e.i.Ng,e.i=null,t}function Te(e){e.A=[e.i],e.m=0,e.j=0}function je(e,t){var n=e.A.splice(0)[0];(n=e.i=e.i||n)?n.Zg?e.g=e.m||e.j:n.s!=null&&e.j<n.s?(e.g=n.s,e.i=null):e.g=e.j:e.g=t}function ht(e){this.g=new et,this.h=e}function Tn(e,t){pt(e.g);var n=e.g.l;return n?ae(e,"return"in n?n.return:function(i){return{value:i,done:!0}},t,e.g.return):(e.g.return(t),Ne(e))}function ae(e,t,n,i){try{var r=t.call(e.g.l,n);if(!(r instanceof Object))throw new TypeError("Iterator result "+r+" is not an object");if(!r.done)return e.g.o=!1,r;var l=r.value}catch(c){return e.g.l=null,Nt(e.g,c),Ne(e)}return e.g.l=null,i.call(e.g,l),Ne(e)}function Ne(e){for(;e.g.g;)try{var t=e.h(e.g);if(t)return e.g.o=!1,{value:t.value,done:!1}}catch(n){e.g.h=void 0,Nt(e.g,n)}if(e.g.o=!1,e.g.i){if(t=e.g.i,e.g.i=null,t.Zg)throw t.Ng;return{value:t.return,done:!0}}return{value:void 0,done:!0}}function tt(e){this.next=function(t){return pt(e.g),e.g.l?t=ae(e,e.g.l.next,t,e.g.u):(e.g.u(t),t=Ne(e)),t},this.throw=function(t){return pt(e.g),e.g.l?t=ae(e,e.g.l.throw,t,e.g.u):(Nt(e.g,t),t=Ne(e)),t},this.return=function(t){return Tn(e,t)},this[Symbol.iterator]=function(){return this}}function Fe(e){function t(i){return e.next(i)}function n(i){return e.throw(i)}return new Promise(function(i,r){function l(c){c.done?i(c.value):Promise.resolve(c.value).then(t,n).then(l,r)}l(e.next())})}function z(e){return Fe(new tt(new ht(e)))}function Et(){for(var e=Number(this),t=[],n=e;n<arguments.length;n++)t[n-e]=arguments[n];return t}M("Promise",function(e){function t(c){this.h=0,this.i=void 0,this.g=[],this.o=!1;var f=this.j();try{c(f.resolve,f.reject)}catch(y){f.reject(y)}}function n(){this.g=null}function i(c){return c instanceof t?c:new t(function(f){f(c)})}if(e)return e;n.prototype.h=function(c){if(this.g==null){this.g=[];var f=this;this.i(function(){f.l()})}this.g.push(c)};var r=v.setTimeout;n.prototype.i=function(c){r(c,0)},n.prototype.l=function(){for(;this.g&&this.g.length;){var c=this.g;this.g=[];for(var f=0;f<c.length;++f){var y=c[f];c[f]=null;try{y()}catch(m){this.j(m)}}}this.g=null},n.prototype.j=function(c){this.i(function(){throw c})},t.prototype.j=function(){function c(m){return function(T){y||(y=!0,m.call(f,T))}}var f=this,y=!1;return{resolve:c(this.F),reject:c(this.l)}},t.prototype.F=function(c){if(c===this)this.l(new TypeError("A Promise cannot resolve to itself"));else if(c instanceof t)this.H(c);else{e:switch(typeof c){case"object":var f=c!=null;break e;case"function":f=!0;break e;default:f=!1}f?this.C(c):this.m(c)}},t.prototype.C=function(c){var f=void 0;try{f=c.then}catch(y){this.l(y);return}typeof f=="function"?this.I(f,c):this.m(c)},t.prototype.l=function(c){this.u(2,c)},t.prototype.m=function(c){this.u(1,c)},t.prototype.u=function(c,f){if(this.h!=0)throw Error("Cannot settle("+c+", "+f+"): Promise already settled in state"+this.h);this.h=c,this.i=f,this.h===2&&this.G(),this.A()},t.prototype.G=function(){var c=this;r(function(){if(c.B()){var f=v.console;typeof f<"u"&&f.error(c.i)}},1)},t.prototype.B=function(){if(this.o)return!1;var c=v.CustomEvent,f=v.Event,y=v.dispatchEvent;return typeof y>"u"?!0:(typeof c=="function"?c=new c("unhandledrejection",{cancelable:!0}):typeof f=="function"?c=new f("unhandledrejection",{cancelable:!0}):(c=v.document.createEvent("CustomEvent"),c.initCustomEvent("unhandledrejection",!1,!0,c)),c.promise=this,c.reason=this.i,y(c))},t.prototype.A=function(){if(this.g!=null){for(var c=0;c<this.g.length;++c)l.h(this.g[c]);this.g=null}};var l=new n;return t.prototype.H=function(c){var f=this.j();c.Sd(f.resolve,f.reject)},t.prototype.I=function(c,f){var y=this.j();try{c.call(f,y.resolve,y.reject)}catch(m){y.reject(m)}},t.prototype.then=function(c,f){function y(D,R){return typeof D=="function"?function(N){try{m(D(N))}catch(U){T(U)}}:R}var m,T,x=new t(function(D,R){m=D,T=R});return this.Sd(y(c,m),y(f,T)),x},t.prototype.catch=function(c){return this.then(void 0,c)},t.prototype.Sd=function(c,f){function y(){switch(m.h){case 1:c(m.i);break;case 2:f(m.i);break;default:throw Error("Unexpected state: "+m.h)}}var m=this;this.g==null?l.h(y):this.g.push(y),this.o=!0},t.resolve=i,t.reject=function(c){return new t(function(f,y){y(c)})},t.race=function(c){return new t(function(f,y){for(var m=b(c),T=m.next();!T.done;T=m.next())i(T.value).Sd(f,y)})},t.all=function(c){var f=b(c),y=f.next();return y.done?i([]):new t(function(m,T){function x(N){return function(U){D[N]=U,R--,R==0&&m(D)}}var D=[],R=0;do D.push(void 0),R++,i(y.value).Sd(x(D.length-1),T),y=f.next();while(!y.done)})},t});function yt(e,t){return Object.prototype.hasOwnProperty.call(e,t)}M("WeakMap",function(e){function t(y){if(this.g=(f+=Math.random()+1).toString(),y){y=b(y);for(var m;!(m=y.next()).done;)m=m.value,this.set(m[0],m[1])}}function n(){}function i(y){var m=typeof y;return m==="object"&&y!==null||m==="function"}function r(y){if(!yt(y,c)){var m=new n;a(y,c,{value:m})}}function l(y){var m=Object[y];m&&(Object[y]=function(T){return T instanceof n?T:(Object.isExtensible(T)&&r(T),m(T))})}if(function(){if(!e||!Object.seal)return!1;try{var y=Object.seal({}),m=Object.seal({}),T=new e([[y,2],[m,3]]);return T.get(y)!=2||T.get(m)!=3?!1:(T.delete(y),T.set(m,4),!T.has(y)&&T.get(m)==4)}catch{return!1}}())return e;var c="$jscomp_hidden_"+Math.random();l("freeze"),l("preventExtensions"),l("seal");var f=0;return t.prototype.set=function(y,m){if(!i(y))throw Error("Invalid WeakMap key");if(r(y),!yt(y,c))throw Error("WeakMap key fail: "+y);return y[c][this.g]=m,this},t.prototype.get=function(y){return i(y)&&yt(y,c)?y[c][this.g]:void 0},t.prototype.has=function(y){return i(y)&&yt(y,c)&&yt(y[c],this.g)},t.prototype.delete=function(y){return i(y)&&yt(y,c)&&yt(y[c],this.g)?delete y[c][this.g]:!1},t}),M("Map",function(e){function t(){var f={};return f.Yb=f.next=f.head=f}function n(f,y){var m=f[1];return F(function(){if(m){for(;m.head!=f[1];)m=m.Yb;for(;m.next!=m.head;)return m=m.next,{done:!1,value:y(m)};m=null}return{done:!0,value:void 0}})}function i(f,y){var m=y&&typeof y;m=="object"||m=="function"?l.has(y)?m=l.get(y):(m=""+ ++c,l.set(y,m)):m="p_"+y;var T=f[0][m];if(T&&yt(f[0],m))for(f=0;f<T.length;f++){var x=T[f];if(y!==y&&x.key!==x.key||y===x.key)return{id:m,list:T,index:f,entry:x}}return{id:m,list:T,index:-1,entry:void 0}}function r(f){if(this[0]={},this[1]=t(),this.size=0,f){f=b(f);for(var y;!(y=f.next()).done;)y=y.value,this.set(y[0],y[1])}}if(function(){if(!e||typeof e!="function"||!e.prototype.entries||typeof Object.seal!="function")return!1;try{var f=Object.seal({x:4}),y=new e(b([[f,"s"]]));if(y.get(f)!="s"||y.size!=1||y.get({x:4})||y.set({x:4},"t")!=y||y.size!=2)return!1;var m=y.entries(),T=m.next();return T.done||T.value[0]!=f||T.value[1]!="s"?!1:(T=m.next(),!(T.done||T.value[0].x!=4||T.value[1]!="t"||!m.next().done))}catch{return!1}}())return e;var l=new WeakMap;r.prototype.set=function(f,y){f=f===0?0:f;var m=i(this,f);return m.list||(m.list=this[0][m.id]=[]),m.entry?m.entry.value=y:(m.entry={next:this[1],Yb:this[1].Yb,head:this[1],key:f,value:y},m.list.push(m.entry),this[1].Yb.next=m.entry,this[1].Yb=m.entry,this.size++),this},r.prototype.delete=function(f){return f=i(this,f),f.entry&&f.list?(f.list.splice(f.index,1),f.list.length||delete this[0][f.id],f.entry.Yb.next=f.entry.next,f.entry.next.Yb=f.entry.Yb,f.entry.head=null,this.size--,!0):!1},r.prototype.clear=function(){this[0]={},this[1]=this[1].Yb=t(),this.size=0},r.prototype.has=function(f){return!!i(this,f).entry},r.prototype.get=function(f){return(f=i(this,f).entry)&&f.value},r.prototype.entries=function(){return n(this,function(f){return[f.key,f.value]})},r.prototype.keys=function(){return n(this,function(f){return f.key})},r.prototype.values=function(){return n(this,function(f){return f.value})},r.prototype.forEach=function(f,y){for(var m=this.entries(),T;!(T=m.next()).done;)T=T.value,f.call(y,T[1],T[0],this)},r.prototype[Symbol.iterator]=r.prototype.entries;var c=0;return r}),M("Set",function(e){function t(n){if(this.g=new Map,n){n=b(n);for(var i;!(i=n.next()).done;)this.add(i.value)}this.size=this.g.size}return function(){if(!e||typeof e!="function"||!e.prototype.entries||typeof Object.seal!="function")return!1;try{var n=Object.seal({x:4}),i=new e(b([n]));if(!i.has(n)||i.size!=1||i.add(n)!=i||i.size!=1||i.add({x:4})!=i||i.size!=2)return!1;var r=i.entries(),l=r.next();return l.done||l.value[0]!=n||l.value[1]!=n?!1:(l=r.next(),l.done||l.value[0]==n||l.value[0].x!=4||l.value[1]!=l.value[0]?!1:r.next().done)}catch{return!1}}()?e:(t.prototype.add=function(n){return n=n===0?0:n,this.g.set(n,n),this.size=this.g.size,this},t.prototype.delete=function(n){return n=this.g.delete(n),this.size=this.g.size,n},t.prototype.clear=function(){this.g.clear(),this.size=0},t.prototype.has=function(n){return this.g.has(n)},t.prototype.entries=function(){return this.g.entries()},t.prototype.values=function(){return this.g.values()},t.prototype.keys=t.prototype.values,t.prototype[Symbol.iterator]=t.prototype.values,t.prototype.forEach=function(n,i){var r=this;this.g.forEach(function(l){return n.call(i,l,l,r)})},t)});function qi(e,t){e instanceof String&&(e+="");var n=0,i=!1,r={next:function(){if(!i&&n<e.length){var l=n++;return{value:t(l,e[l]),done:!1}}return i=!0,{done:!0,value:void 0}}};return r[Symbol.iterator]=function(){return r},r}M("Array.prototype.values",function(e){return e||function(){return qi(this,function(t,n){return n})}}),M("Array.from",function(e){return e||function(t,n,i){n=n??function(f){return f};var r=[],l=typeof Symbol<"u"&&Symbol.iterator&&t[Symbol.iterator];if(typeof l=="function"){t=l.call(t);for(var c=0;!(l=t.next()).done;)r.push(n.call(i,l.value,c++))}else for(l=t.length,c=0;c<l;c++)r.push(n.call(i,t[c],c));return r}}),M("Array.prototype.keys",function(e){return e||function(){return qi(this,function(t){return t})}}),M("Object.is",function(e){return e||function(t,n){return t===n?t!==0||1/t===1/n:t!==t&&n!==n}}),M("Array.prototype.includes",function(e){return e||function(t,n){var i=this;i instanceof String&&(i=String(i));var r=i.length;for(n=n||0,0>n&&(n=Math.max(n+r,0));n<r;n++){var l=i[n];if(l===t||Object.is(l,t))return!0}return!1}});function xn(e,t,n){if(e==null)throw new TypeError("The 'this' value for String.prototype."+n+" must not be null or undefined");if(t instanceof RegExp)throw new TypeError("First argument to String.prototype."+n+" must not be a regular expression");return e+""}M("String.prototype.includes",function(e){return e||function(t,n){return xn(this,t,"includes").indexOf(t,n||0)!==-1}}),M("String.fromCodePoint",function(e){return e||function(t){for(var n="",i=0;i<arguments.length;i++){var r=Number(arguments[i]);if(0>r||1114111<r||r!==Math.floor(r))throw new RangeError("invalid_code_point "+r);65535>=r?n+=String.fromCharCode(r):(r-=65536,n+=String.fromCharCode(r>>>10&1023|55296),n+=String.fromCharCode(r&1023|56320))}return n}});function cl(e,t,n){e instanceof String&&(e=String(e));for(var i=e.length,r=0;r<i;r++){var l=e[r];if(t.call(n,l,r,e))return{Xg:r,v:l}}return{Xg:-1,v:void 0}}M("Array.prototype.findIndex",function(e){return e||function(t,n){return cl(this,t,n).Xg}}),M("WeakSet",function(e){function t(n){if(this.g=new WeakMap,n){n=b(n);for(var i;!(i=n.next()).done;)this.add(i.value)}}return function(){if(!e||!Object.seal)return!1;try{var n=Object.seal({}),i=Object.seal({}),r=new e([n]);return!r.has(n)||r.has(i)?!1:(r.delete(n),r.add(i),!r.has(n)&&r.has(i))}catch{return!1}}()?e:(t.prototype.add=function(n){return this.g.set(n,!0),this},t.prototype.has=function(n){return this.g.has(n)},t.prototype.delete=function(n){return this.g.delete(n)},t)}),M("Array.prototype.find",function(e){return e||function(t,n){return cl(this,t,n).v}}),M("String.prototype.startsWith",function(e){return e||function(t,n){var i=xn(this,t,"startsWith"),r=i.length,l=t.length;n=Math.max(0,Math.min(n|0,i.length));for(var c=0;c<l&&n<r;)if(i[n++]!=t[c++])return!1;return c>=l}}),M("Object.entries",function(e){return e||function(t){var n=[],i;for(i in t)yt(t,i)&&n.push([i,t[i]]);return n}});var jp=typeof Object.assign=="function"?Object.assign:function(e,t){for(var n=1;n<arguments.length;n++){var i=arguments[n];if(i)for(var r in i)yt(i,r)&&(e[r]=i[r])}return e};M("Object.assign",function(e){return e||jp}),M("Promise.prototype.finally",function(e){return e||function(t){return this.then(function(n){return Promise.resolve(t()).then(function(){return n})},function(n){return Promise.resolve(t()).then(function(){throw n})})}}),M("Array.prototype.entries",function(e){return e||function(){return qi(this,function(t,n){return[t,n]})}}),M("Number.isNaN",function(e){return e||function(t){return typeof t=="number"&&isNaN(t)}}),M("String.prototype.repeat",function(e){return e||function(t){var n=xn(this,null,"repeat");if(0>t||1342177279<t)throw new RangeError("Invalid count value");t|=0;for(var i="";t;)t&1&&(i+=n),(t>>>=1)&&(n+=n);return i}}),M("Number.EPSILON",function(){return Math.pow(2,-52)}),M("Number.MAX_SAFE_INTEGER",function(){return 9007199254740991}),M("Number.isFinite",function(e){return e||function(t){return typeof t!="number"?!1:!isNaN(t)&&t!==1/0&&t!==-1/0}}),M("Object.values",function(e){return e||function(t){var n=[],i;for(i in t)yt(t,i)&&n.push(t[i]);return n}}),M("Math.log2",function(e){return e||function(t){return Math.log(t)/Math.LN2}}),M("String.prototype.endsWith",function(e){return e||function(t,n){var i=xn(this,t,"endsWith");n===void 0&&(n=i.length),n=Math.max(0,Math.min(n|0,i.length));for(var r=t.length;0<r&&0<n;)if(i[--n]!=t[--r])return!1;return 0>=r}}),M("Math.trunc",function(e){return e||function(t){if(t=Number(t),isNaN(t)||t===1/0||t===-1/0||t===0)return t;var n=Math.floor(Math.abs(t));return 0>t?-n:n}});var Xf=this||self;function Pe(e,t){e=e.split(".");var n=Xf;e[0]in n||typeof n.execScript>"u"||n.execScript("var "+e[0]);for(var i;e.length&&(i=e.shift());)e.length||t===void 0?n[i]&&n[i]!==Object.prototype[i]?n=n[i]:n=n[i]={}:n[i]=t}function Bp(){}function Vp(){}function Wu(e){this.g=Math.exp(Math.log(.5)/e),this.i=this.h=0}Wu.prototype.sample=function(e,t){var n=Math.pow(this.g,e);t=t*(1-n)+n*this.h,isNaN(t)||(this.h=t,this.i+=e)};function Yf(e){return e.h/(1-Math.pow(e.g,e.i))}function tr(){this.h=new Wu(2),this.j=new Wu(5),this.g=0,this.i=128e3,this.l=16e3}tr.prototype.configure=function(e){this.i=e.minTotalBytes,this.l=e.minBytes,this.h.g=Math.exp(Math.log(.5)/e.fastHalfLife),this.j.g=Math.exp(Math.log(.5)/e.slowHalfLife)},tr.prototype.sample=function(e,t){if(!(t<this.l)){var n=8e3*t/e;e/=1e3,this.g+=t,this.h.sample(e,n),this.j.sample(e,n)}},tr.prototype.getBandwidthEstimate=function(e){return this.g<this.i?e:Math.min(Yf(this.h),Yf(this.j))};function C0(){}function no(){}function bt(){}function _o(e){var t=Et.apply(1,arguments);Sg.has(e)||(Sg.add(e),bt.apply(C0,J(t)))}function b0(){}function I0(){}function G2(){}var Sg=new Set;w.console&&(new Map().set(1,function(){return console.error.apply(console,J(Et.apply(0,arguments)))}).set(2,function(){return console.warn.apply(console,J(Et.apply(0,arguments)))}).set(3,function(){return console.info.apply(console,J(Et.apply(0,arguments)))}).set(4,function(){return console.log.apply(console,J(Et.apply(0,arguments)))}).set(5,function(){return console.debug.apply(console,J(Et.apply(0,arguments)))}).set(6,function(){return console.debug.apply(console,J(Et.apply(0,arguments)))}),bt=function(){return console.warn.apply(console,J(Et.apply(0,arguments)))},no=function(){console.error.apply(console,J(Et.apply(0,arguments)))});function ea(){this.g=new Map}h=ea.prototype,h.push=function(e,t){this.g.has(e)?this.g.get(e).push(t):this.g.set(e,[t])},h.get=function(e){return this.g.has(e)?this.g.get(e).slice():null},h.remove=function(e,t){if(this.g.has(e)){var n=this.g.get(e).filter(function(i){return i!=t});this.g.set(e,n),n.length||this.g.delete(e)}},h.forEach=function(e){this.g.forEach(function(t,n){e(n,t)})},h.size=function(){return this.g.size},h.keys=function(){return Array.from(this.g.keys())};function vt(){this.g=new ea}h=vt.prototype,h.release=function(){this.Qa(),this.g=null},h.D=function(e,t,n,i){this.g&&(e=new fl(e,t,n,i),this.g.push(t,e))},h.ma=function(e,t,n,i){function r(c){l.Ja(e,t,r),n(c)}var l=this;this.D(e,t,r,i)},h.Ja=function(e,t,n){if(this.g){var i=this.g.get(t)||[];i=b(i);for(var r=i.next();!r.done;r=i.next())r=r.value,r.target!=e||n!=r.listener&&n||(r.Ja(),this.g.remove(t,r))}},h.Qa=function(){if(this.g){for(var e=[],t=b(this.g.g.values()),n=t.next();!n.done;n=t.next())e.push.apply(e,J(n.value));for(e=b(e),t=e.next();!t.done;t=e.next())t.value.Ja();this.g.g.clear()}},Pe("shaka.util.EventManager",vt),vt.prototype.removeAll=vt.prototype.Qa,vt.prototype.unlisten=vt.prototype.Ja,vt.prototype.listenOnce=vt.prototype.ma,vt.prototype.listen=vt.prototype.D,vt.prototype.release=vt.prototype.release;function fl(e,t,n,i){this.target=e,this.type=t,this.listener=n,this.g=vr(e,i),this.target.addEventListener(t,n,this.g)}fl.prototype.Ja=function(){this.target.removeEventListener(this.type,this.listener,this.g),this.listener=this.target=null,this.g=!1};function vr(e,t){if(t==null)return!1;if(typeof t=="boolean")return t;var n=new Set(["passive","capture"]);return Object.keys(t).filter(function(i){return!n.has(i)}),D0(e)?t:t.capture||!1}function D0(e){var t=wg;if(t==null){t=!1;try{var n={},i={get:function(){return t=!0,!1}};Object.defineProperty(n,"passive",i),Object.defineProperty(n,"capture",i),i=function(){},e.addEventListener("test",i,n),e.removeEventListener("test",i,n)}catch{t=!1}wg=t}return t||!1}var wg=void 0;Pe("shaka.config.AutoShowText",{NEVER:0,ALWAYS:1,IF_PREFERRED_TEXT_LANGUAGE:2,IF_SUBTITLES_MAY_BE_NEEDED:3});function Hp(e,t){this.g=e,this.h=t}Hp.prototype.toString=function(){return"v"+this.g+"."+this.h};function Ot(e,t){var n=new Hp(5,0),i=Tc,r=i.g,l=n.h-r.h;(0<(n.g-r.g||l)?i.i:i.h)(i.g,n,e,t)}function Wf(e,t,n,i){bt([n,"has been deprecated and will be removed in",t,". We are currently at version",e,". Additional information:",i].join(" "))}function ja(e,t,n,i){no([n,"has been deprecated and has been removed in",t,". We are now at version",e,". Additional information:",i].join(" "))}var Tc=null;/*
@license
Copyright 2008 The Closure Library Authors
SPDX-License-Identifier: Apache-2.0
*/var xc=RegExp("^(?:([^:/?#.]+):)?(?://(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\\?([^#]*))?(?:#(.*))?$");/*
@license
Copyright 2006 The Closure Library Authors
SPDX-License-Identifier: Apache-2.0
*/function pn(e){var t;e instanceof pn?(Ec(this,e.Kb),this.Hc=e.Hc,Ac(this,e.nb),Cc(this,e.$c),this.ab=e.ab,io(this,e.g.clone()),this.qc=e.qc):e&&(t=String(e).match(xc))?(Ec(this,t[1]||"",!0),this.Hc=Qu(t[2]||""),Ac(this,t[3]||"",!0),Cc(this,t[4]),this.ab=Qu(t[5]||"",!0),io(this,t[6]||"",!0),this.qc=Qu(t[7]||"")):this.g=new Jn(null)}h=pn.prototype,h.Kb="",h.Hc="",h.nb="",h.$c=null,h.ab="",h.qc="",h.toString=function(){var e=[],t=this.Kb;if(t&&e.push(Ju(t,Qf,!0),":"),t=this.nb){e.push("//");var n=this.Hc;n&&e.push(Ju(n,Qf,!0),"@"),e.push(encodeURIComponent(t).replace(/%25([0-9a-fA-F]{2})/g,"%$1")),t=this.$c,t!=null&&e.push(":",String(t))}return(t=this.ab)&&(this.nb&&t.charAt(0)!="/"&&e.push("/"),e.push(Ju(t,t.charAt(0)=="/"?xg:Kp,!0))),(t=this.g.toString())&&e.push("?",t),(t=this.qc)&&e.push("#",Ju(t,ta)),e.join("")},h.resolve=function(e){var t=this.clone();t.Kb==="data"&&(t=new pn);var n=!!e.Kb;n?Ec(t,e.Kb):n=!!e.Hc,n?t.Hc=e.Hc:n=!!e.nb,n?Ac(t,e.nb):n=e.$c!=null;var i=e.ab;if(n)Cc(t,e.$c);else if(n=!!e.ab){if(i.charAt(0)!="/")if(this.nb&&!this.ab)i="/"+i;else{var r=t.ab.lastIndexOf("/");r!=-1&&(i=t.ab.substr(0,r+1)+i)}if(i==".."||i==".")i="";else if(i.indexOf("./")!=-1||i.indexOf("/.")!=-1){r=i.lastIndexOf("/",0)==0,i=i.split("/");for(var l=[],c=0;c<i.length;){var f=i[c++];f=="."?r&&c==i.length&&l.push(""):f==".."?((1<l.length||l.length==1&&l[0]!="")&&l.pop(),r&&c==i.length&&l.push("")):(l.push(f),r=!0)}i=l.join("/")}}return n?t.ab=i:n=e.g.toString()!=="",n?io(t,e.g.clone()):n=!!e.qc,n&&(t.qc=e.qc),t},h.clone=function(){return new pn(this)};function Ec(e,t,n){e.Kb=n?Qu(t,!0):t,e.Kb&&(e.Kb=e.Kb.replace(/:$/,""))}function Ac(e,t,n){e.nb=n?Qu(t,!0):t}function Cc(e,t){if(t){if(t=Number(t),isNaN(t)||0>t)throw Error("Bad port number "+t);e.$c=t}else e.$c=null}function io(e,t,n){t instanceof Jn?e.g=t:(n||(t=Ju(t,O0)),e.g=new Jn(t))}function Qu(e,t){return e?t?decodeURI(e):decodeURIComponent(e):""}function Ju(e,t,n){return e!=null?(e=encodeURI(e).replace(t,Tg),n&&(e=e.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),e):null}function Tg(e){return e=e.charCodeAt(0),"%"+(e>>4&15).toString(16)+(e&15).toString(16)}var Qf=/[#\/\?@]/g,Kp=/[#\?:]/g,xg=/[#\?]/g,O0=/[#\?@]/g,ta=/#/g;function Jn(e){this.g=e||null}function ki(e){if(!e.Va&&(e.Va=new Map,e.kd=0,e.g))for(var t=e.g.split("&"),n=0;n<t.length;n++){var i=t[n].indexOf("="),r=null;if(0<=i){var l=t[n].substring(0,i);r=t[n].substring(i+1)}else l=t[n];l=decodeURIComponent(l.replace(/\+/g," ")),r=r||"",e.add(l,decodeURIComponent(r.replace(/\+/g," ")))}}h=Jn.prototype,h.Va=null,h.kd=null;function Ba(e){return ki(e),e.kd}h.add=function(e,t){ki(this),this.g=null;var n=this.Va.has(e)?this.Va.get(e):null;return n||this.Va.set(e,n=[]),n.push(t),this.kd++,this},h.set=function(e,t){return ki(this),this.g=null,this.Va.has(e)?this.Va.set(e,[t]):this.add(e,t),this},h.get=function(e){return ki(this),this.Va.get(e)||[]},h.toString=function(){if(this.g)return this.g;if(!this.Va||!this.Va.size)return"";for(var e=[],t=b(this.Va.keys()),n=t.next();!n.done;n=t.next()){var i=n.value;n=encodeURIComponent(i),i=this.Va.get(i);for(var r=0;r<i.length;r++){var l=n;i[r]!==""&&(l+="="+encodeURIComponent(i[r])),e.push(l)}}return this.g=e.join("&")},h.clone=function(){var e=new Jn;if(e.g=this.g,this.Va){for(var t=new Map,n=b(this.Va),i=n.next();!i.done;i=n.next()){var r=b(i.value);i=r.next().value,r=r.next().value,t.set(i,r.concat())}e.Va=t,e.kd=this.kd}return e};function na(){}function dl(e,t){if(!e&&!t)return!0;if(!e||!t||e.byteLength!=t.byteLength)return!1;if((ArrayBuffer.isView(e)?e.buffer:e)==(ArrayBuffer.isView(t)?t.buffer:t)&&(e.byteOffset||0)==(t.byteOffset||0))return!0;var n=Ze(e);t=Ze(t);for(var i=0;i<e.byteLength;i++)if(n[i]!=t[i])return!1;return!0}function Sr(e){return ArrayBuffer.isView(e)?e.byteOffset==0&&e.byteLength==e.buffer.byteLength?e.buffer:new Uint8Array(e).buffer:e}function Ze(e,t,n){return n=n===void 0?1/0:n,ia(e,t===void 0?0:t,n,Uint8Array)}function Zu(e,t,n){return n=n===void 0?1/0:n,ia(e,t===void 0?0:t,n,Uint16Array)}function Ei(e,t,n){return n=n===void 0?1/0:n,ia(e,t===void 0?0:t,n,DataView)}function ia(e,t,n,i){var r=ArrayBuffer.isView(e)?e.buffer:e,l=1;"BYTES_PER_ELEMENT"in i&&(l=i.BYTES_PER_ELEMENT);var c=((e.byteOffset||0)+e.byteLength)/l;return e=Math.floor(Math.max(0,Math.min(((e.byteOffset||0)+t)/l,c))),new i(r,e,Math.floor(Math.min(e+Math.max(n,0),c))-e)}Pe("shaka.util.BufferUtils",na),na.toDataView=Ei,na.toUint16=Zu,na.toUint8=Ze,na.toArrayBuffer=Sr,na.equal=dl;function Y(e,t,n){var i=Et.apply(3,arguments);this.severity=e,this.category=t,this.code=n,this.data=i,this.handled=!1,this.message="Shaka Error "+this.code;try{throw Error(this.message||"Shaka Error")}catch(r){this.stack=r.stack}}Y.prototype.toString=function(){return"shaka.util.Error "+JSON.stringify(this,null," ")},Pe("shaka.util.Error",Y),Y.Severity={RECOVERABLE:1,CRITICAL:2},Y.Category={NETWORK:1,TEXT:2,MEDIA:3,MANIFEST:4,STREAMING:5,DRM:6,PLAYER:7,CAST:8,STORAGE:9,ADS:10},Y.Code={UNSUPPORTED_SCHEME:1e3,BAD_HTTP_STATUS:1001,HTTP_ERROR:1002,TIMEOUT:1003,MALFORMED_DATA_URI:1004,REQUEST_FILTER_ERROR:1006,RESPONSE_FILTER_ERROR:1007,MALFORMED_TEST_URI:1008,UNEXPECTED_TEST_REQUEST:1009,ATTEMPTS_EXHAUSTED:1010,SEGMENT_MISSING:1011,INVALID_TEXT_HEADER:2e3,INVALID_TEXT_CUE:2001,UNABLE_TO_DETECT_ENCODING:2003,BAD_ENCODING:2004,INVALID_XML:2005,INVALID_MP4_TTML:2007,INVALID_MP4_VTT:2008,UNABLE_TO_EXTRACT_CUE_START_TIME:2009,INVALID_MP4_CEA:2010,TEXT_COULD_NOT_GUESS_MIME_TYPE:2011,CANNOT_ADD_EXTERNAL_TEXT_TO_SRC_EQUALS:2012,TEXT_ONLY_WEBVTT_SRC_EQUALS:2013,MISSING_TEXT_PLUGIN:2014,CHAPTERS_TRACK_FAILED:2015,UNSUPPORTED_EXTERNAL_THUMBNAILS_URI:2017,BUFFER_READ_OUT_OF_BOUNDS:3e3,JS_INTEGER_OVERFLOW:3001,EBML_OVERFLOW:3002,EBML_BAD_FLOATING_POINT_SIZE:3003,MP4_SIDX_WRONG_BOX_TYPE:3004,MP4_SIDX_INVALID_TIMESCALE:3005,MP4_SIDX_TYPE_NOT_SUPPORTED:3006,WEBM_CUES_ELEMENT_MISSING:3007,WEBM_EBML_HEADER_ELEMENT_MISSING:3008,WEBM_SEGMENT_ELEMENT_MISSING:3009,WEBM_INFO_ELEMENT_MISSING:3010,WEBM_DURATION_ELEMENT_MISSING:3011,WEBM_CUE_TRACK_POSITIONS_ELEMENT_MISSING:3012,WEBM_CUE_TIME_ELEMENT_MISSING:3013,MEDIA_SOURCE_OPERATION_FAILED:3014,MEDIA_SOURCE_OPERATION_THREW:3015,VIDEO_ERROR:3016,QUOTA_EXCEEDED_ERROR:3017,TRANSMUXING_FAILED:3018,CONTENT_TRANSFORMATION_FAILED:3019,MSS_MISSING_DATA_FOR_TRANSMUXING:3020,MSS_TRANSMUXING_FAILED:3022,TRANSMUXING_NO_VIDEO_DATA:3023,STREAMING_NOT_ALLOWED:3024,UNABLE_TO_GUESS_MANIFEST_TYPE:4e3,DASH_INVALID_XML:4001,DASH_NO_SEGMENT_INFO:4002,DASH_EMPTY_ADAPTATION_SET:4003,DASH_EMPTY_PERIOD:4004,DASH_WEBM_MISSING_INIT:4005,DASH_UNSUPPORTED_CONTAINER:4006,DASH_PSSH_BAD_ENCODING:4007,DASH_NO_COMMON_KEY_SYSTEM:4008,DASH_MULTIPLE_KEY_IDS_NOT_SUPPORTED:4009,DASH_CONFLICTING_KEY_IDS:4010,RESTRICTIONS_CANNOT_BE_MET:4012,HLS_PLAYLIST_HEADER_MISSING:4015,INVALID_HLS_TAG:4016,HLS_INVALID_PLAYLIST_HIERARCHY:4017,DASH_DUPLICATE_REPRESENTATION_ID:4018,HLS_MULTIPLE_MEDIA_INIT_SECTIONS_FOUND:4020,HLS_REQUIRED_ATTRIBUTE_MISSING:4023,HLS_REQUIRED_TAG_MISSING:4024,HLS_COULD_NOT_GUESS_CODECS:4025,HLS_KEYFORMATS_NOT_SUPPORTED:4026,DASH_UNSUPPORTED_XLINK_ACTUATE:4027,DASH_XLINK_DEPTH_LIMIT:4028,CONTENT_UNSUPPORTED_BY_BROWSER:4032,CANNOT_ADD_EXTERNAL_TEXT_TO_LIVE_STREAM:4033,NO_VARIANTS:4036,PERIOD_FLATTENING_FAILED:4037,INCONSISTENT_DRM_ACROSS_PERIODS:4038,HLS_VARIABLE_NOT_FOUND:4039,HLS_MSE_ENCRYPTED_MP2T_NOT_SUPPORTED:4040,HLS_MSE_ENCRYPTED_LEGACY_APPLE_MEDIA_KEYS_NOT_SUPPORTED:4041,NO_WEB_CRYPTO_API:4042,CANNOT_ADD_EXTERNAL_THUMBNAILS_TO_LIVE_STREAM:4045,MSS_INVALID_XML:4046,MSS_LIVE_CONTENT_NOT_SUPPORTED:4047,AES_128_INVALID_IV_LENGTH:4048,AES_128_INVALID_KEY_LENGTH:4049,DASH_CONFLICTING_AES_128:4050,DASH_UNSUPPORTED_AES_128:4051,DASH_INVALID_PATCH:4052,HLS_EMPTY_MEDIA_PLAYLIST:4053,DASH_MSE_ENCRYPTED_LEGACY_APPLE_MEDIA_KEYS_NOT_SUPPORTED:4054,STREAMING_ENGINE_STARTUP_INVALID_STATE:5006,NO_RECOGNIZED_KEY_SYSTEMS:6e3,REQUESTED_KEY_SYSTEM_CONFIG_UNAVAILABLE:6001,FAILED_TO_CREATE_CDM:6002,FAILED_TO_ATTACH_TO_VIDEO:6003,INVALID_SERVER_CERTIFICATE:6004,FAILED_TO_CREATE_SESSION:6005,FAILED_TO_GENERATE_LICENSE_REQUEST:6006,LICENSE_REQUEST_FAILED:6007,LICENSE_RESPONSE_REJECTED:6008,ENCRYPTED_CONTENT_WITHOUT_DRM_INFO:6010,NO_LICENSE_SERVER_GIVEN:6012,OFFLINE_SESSION_REMOVED:6013,EXPIRED:6014,SERVER_CERTIFICATE_REQUIRED:6015,INIT_DATA_TRANSFORM_ERROR:6016,SERVER_CERTIFICATE_REQUEST_FAILED:6017,MIN_HDCP_VERSION_NOT_MATCH:6018,ERROR_CHECKING_HDCP_VERSION:6019,MISSING_EME_SUPPORT:6020,LOAD_INTERRUPTED:7e3,OPERATION_ABORTED:7001,NO_VIDEO_ELEMENT:7002,OBJECT_DESTROYED:7003,CONTENT_NOT_LOADED:7004,SRC_EQUALS_PRELOAD_NOT_SUPPORTED:7005,PRELOAD_DESTROYED:7006,CAST_API_UNAVAILABLE:8e3,NO_CAST_RECEIVERS:8001,ALREADY_CASTING:8002,UNEXPECTED_CAST_ERROR:8003,CAST_CANCELED_BY_USER:8004,CAST_CONNECTION_TIMED_OUT:8005,CAST_RECEIVER_APP_UNAVAILABLE:8006,STORAGE_NOT_SUPPORTED:9e3,INDEXED_DB_ERROR:9001,DEPRECATED_OPERATION_ABORTED:9002,REQUESTED_ITEM_NOT_FOUND:9003,MALFORMED_OFFLINE_URI:9004,CANNOT_STORE_LIVE_OFFLINE:9005,NO_INIT_DATA_FOR_OFFLINE:9007,LOCAL_PLAYER_INSTANCE_REQUIRED:9008,NEW_KEY_OPERATION_NOT_SUPPORTED:9011,KEY_NOT_FOUND:9012,MISSING_STORAGE_CELL:9013,STORAGE_LIMIT_REACHED:9014,DOWNLOAD_SIZE_CALLBACK_ERROR:9015,MODIFY_OPERATION_NOT_SUPPORTED:9016,INDEXED_DB_INIT_TIMED_OUT:9017,CS_IMA_SDK_MISSING:1e4,CS_AD_MANAGER_NOT_INITIALIZED:10001,SS_IMA_SDK_MISSING:10002,SS_AD_MANAGER_NOT_INITIALIZED:10003,CURRENT_DAI_REQUEST_NOT_FINISHED:10004,MT_AD_MANAGER_NOT_INITIALIZED:10005,INTERSTITIAL_AD_MANAGER_NOT_INITIALIZED:10006,VAST_INVALID_XML:10007};function pl(e){this.h=e,this.g=void 0}pl.prototype.value=function(){return this.g===void 0&&(this.g=this.h()),this.g};function Va(e,t){return e.length&&t.length&&e!==t?0<ri(e,t).length:!0}function ri(e,t){if(!e.length)return t;if(!t.length)return e;var n=[];e=b(e);for(var i=e.next();!i.done;i=e.next()){i=i.value;for(var r=b(t),l=r.next();!l.done;l=r.next())if(l=l.value,i.keySystem==l.keySystem){r=new Map;for(var c=b((i.initData||[]).concat(l.initData||[])),f=c.next();!f.done;f=c.next())f=f.value,r.set(f.keyId,f);r=Array.from(r.values()),c=i.keyIds&&l.keyIds?new Set([].concat(J(i.keyIds),J(l.keyIds))):i.keyIds||l.keyIds,n.push({keySystem:i.keySystem,licenseServerUri:i.licenseServerUri||l.licenseServerUri,distinctiveIdentifierRequired:i.distinctiveIdentifierRequired||l.distinctiveIdentifierRequired,persistentStateRequired:i.persistentStateRequired||l.persistentStateRequired,videoRobustness:i.videoRobustness||l.videoRobustness,audioRobustness:i.audioRobustness||l.audioRobustness,serverCertificate:i.serverCertificate||l.serverCertificate,serverCertificateUri:i.serverCertificateUri||l.serverCertificateUri,initData:r,keyIds:c});break}}return n}function Jf(e){return e?!!e.match(/^com\.(microsoft|chromecast)\.playready/):!1}function bc(e){return e?!!e.match(/^com\.apple\.fps/):!1}var Uo=new pl(function(){return Sr(new Uint8Array([0]))}),ro=new Map;function Ic(e){this.h=e,this.g=null}Ic.prototype.da=function(e){var t=this;this.stop();var n=!0,i=null;return this.g=function(){w.clearTimeout(i),n=!1},i=w.setTimeout(function(){n&&t.h()},1e3*e),this},Ic.prototype.stop=function(){this.g&&(this.g(),this.g=null)};function dt(e){this.h=e,this.g=null}dt.prototype.sb=function(){return this.stop(),this.h(),this},dt.prototype.da=function(e){var t=this;return this.stop(),this.g=new Ic(function(){t.h()}).da(e),this},dt.prototype.ua=function(e){var t=this;return this.stop(),this.g=new Ic(function(){t.g.da(e),t.h()}).da(e),this},dt.prototype.stop=function(){this.g&&(this.g.stop(),this.g=null)},Pe("shaka.util.Timer",dt),dt.prototype.stop=dt.prototype.stop,dt.prototype.tickEvery=dt.prototype.ua,dt.prototype.tickAfter=dt.prototype.da,dt.prototype.tickNow=dt.prototype.sb;function oo(){var e=w.ManagedMediaSource||w.MediaSource;return!!(e&&e.isTypeSupported)}function Dc(e){return Fp().canPlayType(e)!=""}function ra(){return!!navigator.userAgent.match(/Edge?\//)}function nr(){return zt("Xbox One")}function di(){return zt("Tizen")}function lo(){return zt("Tizen 3")}function jo(){return zt("Web0S")}function hl(){return jo()&&Zf()===38}function ir(){return zt("CrKey")&&!zt("VIZIO SmartCast")}function Zf(){if(!zt("Chrome")||navigator.userAgent.match(/Edge\//))return null;var e=navigator.userAgent.match(/Chrome\/(\d+)/);return e?parseInt(e[1],10):null}function oi(){return oa()&&((navigator.userAgentData&&navigator.userAgentData.platform?navigator.userAgentData.platform.toLowerCase()=="macos":navigator.platform?navigator.platform.toLowerCase().includes("mac"):!1)||(/(?:iPhone|iPad|iPod)/.test(navigator.userAgent)?!0:oa()&&1<navigator.maxTouchPoints))}function Ha(){return zt("PlayStation 5")}function Gn(){return zt("PlayStation 4")}function Oc(){return zt("Hisense")||zt("VIDAA")}function Eg(){if(!oi()&&(!oa()||oi()))return null;var e=navigator.userAgent.match(/Version\/(\d+)/);return e||(e=navigator.userAgent.match(/OS (\d+)(?:_\d+)?/))?parseInt(e[1],10):null}function $u(){return navigator.userAgentData&&navigator.userAgentData.platform?navigator.userAgentData.platform.toLowerCase()=="windows":navigator.platform?navigator.platform.toLowerCase().includes("win32"):!1}function yl(){return navigator.userAgentData&&navigator.userAgentData.platform?navigator.userAgentData.platform.toLowerCase()=="android":zt("Android")}function es(){return navigator.userAgentData&&navigator.userAgentData.platform?navigator.userAgentData.platform.toLowerCase()=="fuchsia":zt("Fuchsia")}function qp(){return!!(di()||jo()||nr()||Gn()||Ha()||ir()||Oc()||zt("VIZIO SmartCast")||oa()&&!oi())}function zt(e){return(navigator.userAgent||"").includes(e)}function oa(){return(navigator.vendor||"").includes("Apple")}function Fp(){return ao||($f||($f=new dt(function(){ao=null})),(ao=document.getElementsByTagName("video")[0]||document.getElementsByTagName("audio")[0])||(ao=document.createElement("video")),$f.da(1),ao)}function zp(){if(lo()||zt("Tizen 2")||hl()||Gn()||Ha())return!1;var e=Eg();return!(oa()&&!oi()&&e!=null&&15>e)}function Ka(){var e,t,n,i,r,l,c,f,y,m,T,x,D,R,N,U,L;return z(function(j){switch(j.g){case 1:if(e={width:1/0,height:1/0},ir()){if(R=w.cast&&cast.__platform__&&cast.__platform__.canDisplayType,e.width=1280,e.height=720,pe(j,14),!(N=R)){j.s(16);break}return _(j,cast.__platform__.canDisplayType('video/mp4; codecs="avc1.640028"; width=3840; height=2160'),17)}if(di()){t=w.devicePixelRatio,e.width=1920<w.screen.width*t?3840:1920,e.height=1080<w.screen.height*t?2160:1080;try{webapis.systeminfo&&webapis.systeminfo.getMaxVideoResolution?(n=webapis.systeminfo.getMaxVideoResolution(),e.width=n.width,e.height=n.height):webapis.productinfo.is8KPanelSupported&&webapis.productinfo.is8KPanelSupported()?(e.width=7680,e.height=4320):webapis.productinfo.isUdPanelSupported&&webapis.productinfo.isUdPanelSupported()&&(e.width=3840,e.height=2160)}catch{bt("Tizen: Error detecting screen size, default screen size 1920x1080.")}j.s(3);break}if(jo()){try{i=JSON.parse(w.PalmSystem.deviceInfo),e.width=Math.max(1920,i.screenWidth),e.height=Math.max(1080,i.screenHeight)}catch{bt("WebOS: Error detecting screen size, default screen size 1920x1080."),e.width=1920,e.height=1080}j.s(3);break}if(Oc()){if(r=null,w.Hisense_Get4KSupportState)try{r=w.Hisense_Get4KSupportState()}catch{}r==null&&(r=zt("UHD")),r?(e.width=3840,e.height=2160):(e.width=1920,e.height=1080),j.s(3);break}if(!Gn()&&!Ha()){l=void 0;try{l=typeof Windows<"u"?Windows:chrome.webview.hostObjects.sync.Windows}catch{}if(l){e.width=1920,e.height=1080;try{c=new l.Media.Protection.ProtectionCapabilities,f=l.Media.Protection.ProtectionCapabilityResult,y=null;do y=c.isTypeSupported('video/mp4;codecs="hvc1,mp4a";features="decode-res-x=3840,decode-res-y=2160,decode-bitrate=20000,decode-fps=30,decode-bpc=10,display-res-x=3840,display-res-y=2160,display-bpc=8"',"com.microsoft.playready.recommendation");while(y===f.maybe);y===f.probably&&(e.width=3840,e.height=2160)}catch{bt("Xbox: Error detecting screen size, default screen size 1920x1080.")}}else nr()&&(e.width=1920,e.height=1080,bt("Xbox: Error detecting screen size, default screen size 1920x1080."));j.s(3);break}return m=!1,pe(j,8),_(j,w.msdk.device.getDisplayInfo(),10);case 10:T=j.h,m=T.resolution==="4K",Ue(j,9);break;case 8:return Me(j),pe(j,11),_(j,w.msdk.device.getDisplayInfoImmediate(),13);case 13:x=j.h,m=x.resolution==="4K",Ue(j,9);break;case 11:D=Me(j),bt("PlayStation: Failed to get the display info:",D);case 9:m?(e.width=3840,e.height=2160):(e.width=1920,e.height=1080),j.s(3);break;case 17:N=j.h;case 16:if(N){e.width=3840,e.height=2160,j.s(18);break}if(!(U=R)){j.s(19);break}return _(j,cast.__platform__.canDisplayType('video/mp4; codecs="avc1.640028"; width=1920; height=1080'),20);case 20:U=j.h;case 19:U&&(e.width=1920,e.height=1080);case 18:Ue(j,3);break;case 14:L=Me(j),no("Failed to check canDisplayType:",L);case 3:return j.return(e)}})}function Gp(e){return w.matchMedia!==void 0&&w.matchMedia("(color-gamut: p3)").matches?e?"HLG":"PQ":"SDR"}var $f=null,ao=null;function qa(){}function nn(e){if(!e)return"";if(e=Ze(e),e[0]==239&&e[1]==187&&e[2]==191&&(e=e.subarray(3)),w.TextDecoder&&!Gn())return e=new TextDecoder().decode(e),e.includes("<22>")&&no('Decoded string contains an "unknown character" codepoint. That probably means the UTF8 encoding was incorrect!'),e;for(var t="",n=0;n<e.length;++n){var i=65533;if((e[n]&128)==0?i=e[n]:e.length>=n+2&&(e[n]&224)==192&&(e[n+1]&192)==128?(i=(e[n]&31)<<6|e[n+1]&63,n+=1):e.length>=n+3&&(e[n]&240)==224&&(e[n+1]&192)==128&&(e[n+2]&192)==128?(i=(e[n]&15)<<12|(e[n+1]&63)<<6|e[n+2]&63,n+=2):e.length>=n+4&&(e[n]&241)==240&&(e[n+1]&192)==128&&(e[n+2]&192)==128&&(e[n+3]&192)==128&&(i=(e[n]&7)<<18|(e[n+1]&63)<<12|(e[n+2]&63)<<6|e[n+3]&63,n+=3),65535>=i)t+=String.fromCharCode(i);else{i-=65536;var r=i&1023;t+=String.fromCharCode(55296+(i>>10)),t+=String.fromCharCode(56320+r)}}return t}function gl(e,t,n){if(!e)return"";if(!n&&e.byteLength%2!=0)throw new Y(2,2,2004);n=Math.floor(e.byteLength/2);var i=new Uint16Array(n);e=Ei(e);for(var r=0;r<n;r++)i[r]=e.getUint16(2*r,t);return ts(i)}function Nr(e){function t(i){return n.byteLength<=i||9<=n[i]&&126>=n[i]}if(!e)return"";var n=Ze(e);if(n[0]==239&&n[1]==187&&n[2]==191)return nn(n);if(n[0]==254&&n[1]==255)return gl(n.subarray(2),!1);if(n[0]==255&&n[1]==254)return gl(n.subarray(2),!0);if(n[0]==0&&n[2]==0)return gl(e,!1);if(n[1]==0&&n[3]==0)return gl(e,!0);if(t(0)&&t(1)&&t(2)&&t(3))return nn(e);throw new Y(2,2,2003)}function Pr(e){if(w.TextEncoder&&!Gn()){var t=new TextEncoder;return Sr(t.encode(e))}e=encodeURIComponent(e),e=unescape(e),t=new Uint8Array(e.length);for(var n=0;n<e.length;n++)t[n]=e[n].charCodeAt(0);return Sr(t)}function Xp(e,t){for(var n=new ArrayBuffer(2*e.length),i=new DataView(n),r=0;r<e.length;++r)i.setUint16(2*r,e.charCodeAt(r),t);return n}function ts(e){return ed.value()(e)}function Ai(e){var t={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&apos;":"'","&nbsp;":" ","&lrm;":"","&rlm;":""},n=/&(?:amp|lt|gt|quot|apos|nbsp|lrm|rlm|#[xX]?[0-9a-fA-F]+);/g,i=RegExp(n.source);return e&&i.test(e)?e.replace(n,function(r){return r[1]=="#"?(r=r[2]=="x"||r[2]=="X"?parseInt(r.substring(3),16):parseInt(r.substring(2),10),0<=r&&1114111>=r?String.fromCodePoint(r):""):t[r]||"'"}):e||""}Pe("shaka.util.StringUtils",qa),qa.resetFromCharCode=function(){ed.g=void 0},qa.toUTF16=Xp,qa.toUTF8=Pr,qa.fromBytesAutoDetect=Nr,qa.fromUTF16=gl,qa.fromUTF8=nn;var ed=new pl(function(){function e(n){try{var i=new Uint8Array(n);return 0<String.fromCharCode.apply(null,i).length}catch{return!1}}for(var t={jc:65536};0<t.jc;t={jc:t.jc},t.jc/=2)if(e(t.jc))return function(n){return function(i){for(var r="",l=0;l<i.length;l+=n.jc)r+=String.fromCharCode.apply(null,i.subarray(l,l+n.jc));return r}}(t);return null});function Ln(){}function ml(e){return e=ts(Ze(e)),btoa(e)}function Bo(e,t){return t=t??!0,e=ml(e).replace(/\+/g,"-").replace(/\//g,"_"),t?e:e.replace(/[=]*$/,"")}function Fi(e){e=w.atob(e.replace(/-/g,"+").replace(/_/g,"/"));for(var t=new Uint8Array(e.length),n=0;n<e.length;++n)t[n]=e.charCodeAt(n);return t}function la(e){for(var t=e.length/2,n=new Uint8Array(t),i=0;i<t;i++)n[i]=w.parseInt(e.substr(2*i,2),16);return n}function wr(e){var t=Ze(e);e="",t=b(t);for(var n=t.next();!n.done;n=t.next())n=n.value,n=n.toString(16),n.length==1&&(n="0"+n),e+=n;return e}function Gt(){for(var e=Et.apply(0,arguments),t=0,n=0;n<e.length;++n)t+=e[n].byteLength;t=new Uint8Array(t);for(var i=n=0;i<e.length;++i){var r=e[i];ArrayBuffer.isView(r)&&r.BYTES_PER_ELEMENT===1?t.set(r,n):t.set(Ze(r),n),n+=r.byteLength}return t}Pe("shaka.util.Uint8ArrayUtils",Ln),Ln.concat=Gt,Ln.toHex=wr,Ln.fromHex=la,Ln.fromBase64=Fi,Ln.toBase64=Bo,Ln.toStandardBase64=ml;function _n(e,t,n){if(n=n===void 0?"":n,t.length==0)return e;if(e.length==1&&t.length==1){var i=new pn(e[0]);return t=new pn(t[0]),t=i.resolve(t),n&&io(t,n),[t.toString()]}t=t.map(function(f){return new pn(f)}),i=[],e=b(e);for(var r=e.next();!r.done;r=e.next()){r=new pn(r.value);for(var l=b(t),c=l.next();!c.done;c=l.next())c=r.resolve(c.value),n&&io(c,n),i.push(c.toString())}return i}function Lr(e,t,n,i){return e={keySystem:e,encryptionScheme:t,licenseServerUri:"",distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",sessionType:"",initData:n||[],keyIds:new Set},i&&(e.keySystemUris=new Set([i])),e}function vl(e,t){t=t===void 0?"cenc":t;var n=[],i=[],r=[];e.forEach(function(c,f){var y=f;y.length!=22&&(y=Bo(la(f),!1));var m=c;m.length!=22&&(m=Bo(la(c),!1)),c={kty:"oct",kid:y,k:m},n.push(c),i.push(c.kid),r.push(f)}),e=JSON.stringify({keys:n});var l=JSON.stringify({kids:i});return l=[{initData:Ze(Pr(l)),initDataType:"keyids"}],{keySystem:"org.w3.clearkey",encryptionScheme:t,licenseServerUri:"data:application/json;base64,"+w.btoa(e),distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",sessionType:"",initData:l,keyIds:new Set(r)}}function aa(e,t){if(t.length==1)return t[0];if(e=pi(e,t),e!=null)return e;throw new Y(2,4,4025,t)}function pi(e,t){var n=zi.get(e);n=b(n);for(var i=n.next();!i.done;i=n.next()){i=i.value;for(var r=b(t),l=r.next();!l.done;l=r.next())if(l=l.value,i.test(l.trim()))return l.trim()}return e==at?"":null}function td(e,t){var n=[];e=zi.get(e),e=b(e);for(var i=e.next();!i.done;i=e.next()){i=i.value;for(var r=b(t),l=r.next();!l.done;l=r.next())l=l.value,i.test(l.trim())&&n.push(l.trim())}return n}var at="text",En={la:"video",V:"audio",za:at,$e:"image",Mj:"application"},Ag=1/15,zi=new Map().set("audio",[/^vorbis$/,/^Opus$/,/^opus$/,/^fLaC$/,/^flac$/,/^mp4a/,/^[ae]c-3$/,/^ac-4/,/^dts[cex]$/,/^iamf/,/^mhm[12]/,/^ac3$/,/^eac3$/]).set("video",[/^avc/,/^hev/,/^hvc/,/^vvc/,/^vvi/,/^vp0?[89]/,/^av01/,/^dvh/,/^dva/,/^dav/]).set("text",[/^vtt$/,/^wvtt/,/^stpp/]);function uo(e,t,n,i){this.g=null,this.l=e,this.i=t,this.m=n,this.o=i,this.j=!1;e:{if(typeof libDPIModule>"u"&&bt("Could not find LCEVC Library dependencies on this page"),typeof LCEVCdec<"u")this.h=LCEVCdec;else if(typeof LcevcDil<"u")this.h=LcevcDil,this.j=!0,Ot("LcevcDil","lcevc_dil.js is deprecated, please use lcevc_dec.js instead");else{bt("Could not find LCEVC Library on this page"),e=!1;break e}typeof this.h.SupportObject>"u"?(bt("Could not find LCEVC Library on this page"),e=!1):(this.h.SupportObject.SupportStatus||bt(this.h.SupportObject.SupportError),e=typeof this.h<"u"&&typeof libDPIModule<"u"&&this.i instanceof HTMLCanvasElement&&this.h.SupportObject.SupportStatus)}e&&!this.g&&this.h.SupportObject.webGLSupport(this.i)&&(this.i.classList.remove("shaka-hidden"),this.g=this.j?new this.h.LcevcDil(this.l,this.i,this.m):new this.h.LCEVCdec(this.l,this.i,this.m))}function ns(e,t,n,i){i.type!=="video"||e.o&&!i.baseOriginalId||e.g&&e.g.appendBuffer(t,"video",i.id,-n,!e.o)}function is(e){e.g&&e.i.classList.add("shaka-hidden")}uo.prototype.release=function(){this.g&&(this.g.close(),this.g=null)};function Cg(e){return e&&typeof LCEVCdec<"u"?e.codecs=="lvc1":!1}Pe("shaka.lcevc.Dec",uo),uo.prototype.release=uo.prototype.release;function Un(e){if(os.has(e))return os.get(e);var t=w.ManagedMediaSource||w.MediaSource;return t?(t=t.isTypeSupported(e),os.set(e,t),t):!1}function Sl(){var e=w.ManagedSourceBuffer||w.SourceBuffer;return!!e&&!!e.prototype&&!!e.prototype.changeType}function rs(){var e=w.ManagedMediaSource||w.MediaSource;return e&&e.prototype?!!e.prototype.setLiveSeekableRange&&!!e.prototype.clearLiveSeekableRange:!1}var os=new Map;function ls(){}ls.prototype.extract=function(){},ls.prototype.decode=function(){return[]},ls.prototype.clear=function(){},ls.prototype.getStreams=function(){return[]};function Yp(){}Yp.prototype.init=function(){},Yp.prototype.parse=function(){return[]};function kc(){}kc.prototype.init=function(){},kc.prototype.i=function(){},kc.prototype.g=function(){},kc.prototype.j=function(){},Pe("shaka.media.IClosedCaptionParser",kc);function rr(e){this.l=new Yp,(e=bg(e.toLowerCase()))&&(this.l=e()),this.h=new ls,(e=as)&&(this.h=e())}rr.prototype.init=function(e,t){t!==void 0&&t||this.g(),this.l.init(e)},rr.prototype.i=function(e){e=this.l.parse(e),e=b(e);for(var t=e.next();!t.done;t=e.next()){t=t.value;var n=Ze(t.packet);0<n.length&&this.h.extract(n,t.pts)}return this.h.decode()},rr.prototype.g=function(){this.h.clear()},rr.prototype.j=function(){return this.h.getStreams()};function Rc(e,t){Wp.set(e,t)}function bg(e){return Wp.get(e)}Pe("shaka.media.ClosedCaptionParser",rr),rr.findDecoder=function(){return as},rr.unregisterDecoder=function(){as=null},rr.registerDecoder=function(e){as=e},rr.findParser=bg,rr.unregisterParser=function(e){Wp.delete(e)},rr.registerParser=Rc;var Wp=new Map,as=null;function Fa(){this.id="",this.regionAnchorY=this.regionAnchorX=this.viewportAnchorY=this.viewportAnchorX=0,this.height=this.width=100,this.viewportAnchorUnits=this.widthUnits=this.heightUnits=Gi,this.scroll=Qp}Pe("shaka.text.CueRegion",Fa);var Gi=1;Fa.units={PX:0,PERCENTAGE:Gi,LINES:2};var Qp="";Fa.scrollMode={NONE:Qp,UP:"up"};function Ig(e,t){return typeof e=="number"&&typeof t=="number"&&isNaN(e)&&isNaN(t)?!0:e===t}function _r(e,t){t=e.indexOf(t),-1<t&&e.splice(t,1)}function Jp(e,t,n){if(n||(n=Ig),e.length!=t.length)return!1;t=t.slice(),e=b(e);for(var i=e.next(),r={};!i.done;r={ah:void 0},i=e.next()){if(r.ah=i.value,i=t.findIndex(function(l){return function(c){return n(l.ah,c)}}(r)),i==-1)return!1;t[i]=t[t.length-1],t.pop()}return t.length==0}function us(e,t,n){if(e===t)return!0;if(!e||!t)return e==t;if(n||(n=Ig),e.length!=t.length)return!1;for(var i=0;i<e.length;i++)if(!n(e[i],t[i]))return!1;return!0}function ua(e){this.h=e||"",this.g=0}function ss(e){za(e,/[ \t]+/gm)}function za(e,t){return t.lastIndex=e.g,t=t.exec(e.h),t=t==null?null:{position:t.index,length:t[0].length,results:t},e.g==e.h.length||t==null||t.position!=e.g?null:(e.g+=t.length,t.results)}function Ga(e){return e.g==e.h.length?null:(e=za(e,/[^ \t\n]*/gm))?e[0]:null}function cs(e){if(e=za(e,k0),e==null)return null;var t=Number(e[2]),n=Number(e[3]);return 59<t||59<n?null:(Number(e[6])||0)/1e3+n+60*t+3600*(Number(e[1])||0)}function fs(e){return e?cs(new ua(e)):null}var k0=/(?:(\d{1,}):)?(\d{2}):(\d{2})((\.(\d{1,3})))?/g;function so(e){function t(i){switch(typeof i){case"undefined":case"boolean":case"number":case"string":case"symbol":case"function":return i;default:if(!i||ArrayBuffer.isView(i))return i;if(n.has(i))return null;var r=i.constructor==Array;if(i.constructor!=Object&&!r)return null;n.add(i);var l=r?[]:{},c;for(c in i)l[c]=t(i[c]);return r&&(l.length=i.length),l}}var n=new WeakSet;return t(e)}function Xa(e){var t={},n;for(n in e)t[n]=e[n];return t}function Zp(e){if(Array.isArray(e)){for(var t=[],n=0;n<e.length;n++){var i=n.toString(),r=e[n];r!==void 0&&(r=Zp(r))&&t.push(i+":"+r)}e="["+t.join(",")+"]"}else if(typeof e=="function")e="";else if(e instanceof Object){for(n=Object.keys(e),n.sort(),t=[],n=b(n),i=n.next();!i.done;i=n.next())r=i.value,i=JSON.stringify(r),r=e[r],r!==void 0&&(r=Zp(r))&&t.push(i+":"+r);e="{"+t.join(",")+"}"}else e=JSON.stringify(e);return e}function Mc(e,t){var n=n===void 0?!1:n;return e=Nr(e),Ya(e,t,n)}function Ya(e,t,n){return e=R0(e,n===void 0?!1:n),!t&&e.length?e[0]:(e=e.find(function(i){return t.split(",").includes(i.tagName)}))?e:null}function $p(e){return oh.has(e)?oh.get(e):""}function R0(e,t){function n(l,c){c=c===void 0?!1:c;for(var f=[];e[r];)if(e.charCodeAt(r)==60){if(e.charCodeAt(r+1)===47){c=r+2,r=e.indexOf(">",r),c=e.substring(c,r);var y=c.indexOf(l);if(y==-1){var m=l.indexOf(".");0<m&&(y=c.indexOf(l.substring(0,m)))}if(y==-1)throw l=e.substring(0,r).split(`
`),Error(`Unexpected close tag
Line: `+(l.length-1)+`
Column: `+(l[l.length-1].length+1)+`
Char: `+e[r]);r+1&&(r+=1);break}else if(e.charCodeAt(r+1)===33){if(e.charCodeAt(r+2)==45){for(;r!==-1&&(e.charCodeAt(r)!==62||e.charCodeAt(r-1)!=45||e.charCodeAt(r-2)!=45||r==-1);)r=e.indexOf(">",r+1);r===-1&&(r=e.length)}else if(e.charCodeAt(r+2)===91&&e.charCodeAt(r+8)===91&&e.substr(r+3,5).toLowerCase()==="cdata"){y=e.indexOf("]]>",r),y==-1?(f.push(e.substr(r+9)),r=e.length):(f.push(e.substring(r+9,y)),r=y+3);continue}r++;continue}e:{m=c,r++;var T=i(),x={};for(y=[];e.charCodeAt(r)!==62&&e[r];){var D=e.charCodeAt(r);if(64<D&&91>D||96<D&&123>D){D=i();for(var R=e.charCodeAt(r);R&&R!==39&&R!==34&&!(64<R&&91>R||96<R&&123>R)&&R!==62;)r++,R=e.charCodeAt(r);var N=r+1;if(r=e.indexOf(e[r],N),N=e.slice(N,r),R===39||R===34){if(r===-1){if(m={tagName:T,attributes:x,children:y,parent:null},t)for(T=0;T<y.length;T++)typeof y[T]!="string"&&(y[T].parent=m);y=m;break e}}else N=null,r--;if(D.startsWith("xmlns:")){R=N;var U=D.split(":")[1];oh.set(R,U),lh.set(U,R)}T==="tt"&&D==="xml:space"&&N==="preserve"&&(m=!0),x[D]=N}r++}for(e.charCodeAt(r-1)!==47?(r++,y=n(T,m)):r++,m={tagName:T,attributes:x,children:y,parent:null},T=y.length,x=0;x<T;x++)D=y[x],typeof D!="string"?t&&(D.parent=m):x==T-1&&D==`
`&&y.pop();y=m}if(f.push(y),typeof y=="string")break;y.tagName[0]==="?"&&y.children&&(f.push.apply(f,J(y.children)),y.children=[])}else y=r,r=e.indexOf("<",r)-1,r===-2&&(r=e.length),y=e.slice(y,r+1),c?0<y.length&&f.push(y):(f.length&&y.length==1&&y[0]==`
`||0<y.trim().length)&&f.push(y),r++;return f}function i(){for(var l=r;`\r
>/= `.indexOf(e[r])===-1&&e[r];)r++;return e.slice(l,r)}var r=0;return n("")}function ds(e){return typeof e=="string"}function ps(e){var t=[];if(!e.children)return[];e=b(e.children);for(var n=e.next();!n.done;n=e.next())n=n.value,typeof n!="string"&&t.push(n);return t}function Lt(e,t){var n=[];if(!e.children)return[];e=b(e.children);for(var i=e.next();!i.done;i=e.next())i=i.value,i.tagName===t&&n.push(i);return n}function In(e){return typeof e=="string"?Ai(e):(e=e.children.reduce(function(t,n){return typeof n=="string"?t+n:t},""),e===""?null:Ai(e))}function Xi(e){return Array.from(e.children).every(function(t){return typeof t=="string"})?((e=In(e))&&(e=e.trim()),e):null}function Ur(e,t,n){if(n=n===void 0?[]:n,e.tagName===t&&n.push(e),e.children){e=b(e.children);for(var i=e.next();!i.done;i=e.next())Ur(i.value,t,n)}return n}function An(e,t){return e=Lt(e,t),e.length!=1?null:e[0]}function Tr(e,t,n){return e=Dg(e,t,n),e.length!=1?null:e[0]}function Ge(e,t,n,i){i=i===void 0?null:i;var r=null;return e=e.attributes[t],e!=null&&(r=n(e)),r??i}function wl(e,t,n){return t=$p(t),e.attributes[t+":"+n]||null}function Dg(e,t,n){var i=$p(t);if(t=[],e.children)for(n=i?i+":"+n:n,e=b(e.children),i=e.next();!i.done;i=e.next())(i=i.value)&&i.tagName===n&&t.push(i);return t}function Vo(e,t,n){t=b(t);for(var i=t.next();!i.done;i=t.next())if(i=wl(e,i.value,n))return i;return null}function Tl(e){return e?(/^\d+-\d+-\d+T\d+:\d+:\d+(\.\d+)?$/.test(e)&&(e+="Z"),e=Date.parse(e),isNaN(e)?null:e/1e3):null}function co(e){return!e||(e=RegExp("^P(?:([0-9]*)Y)?(?:([0-9]*)M)?(?:([0-9]*)D)?(?:T(?:([0-9]*)H)?(?:([0-9]*)M)?(?:([0-9.]*)S)?)?$","i").exec(e),!e)?null:(e=31536e3*Number(e[1]||null)+2592e3*Number(e[2]||null)+86400*Number(e[3]||null)+3600*Number(e[4]||null)+60*Number(e[5]||null)+Number(e[6]||null),isFinite(e)?e:null)}function sa(e){var t=/([0-9]+)-([0-9]+)/.exec(e);return!t||(e=Number(t[1]),!isFinite(e))?null:(t=Number(t[2]),isFinite(t)?{start:e,end:t}:null)}function Zn(e){return e=Number(e),e%1===0?e:null}function xl(e){return e=Number(e),e%1===0&&0<e?e:null}function $n(e){return e=Number(e),e%1===0&&0<=e?e:null}function hs(e){return e=Number(e),isNaN(e)?null:e}function Nc(e){return e?e.toLowerCase()==="true":!1}function eh(e){var t,n=(t=e.match(/^(\d+)\/(\d+)$/))?Number(t[1])/Number(t[2]):Number(e);return isNaN(n)?null:n}function ys(e){var t=[];e=Ai(e).split(/\/+(?=(?:[^'"]*['"][^'"]*['"])*[^'"]*$)/),e=b(e);for(var n=e.next();!n.done;n=e.next()){n=n.value;var i=n.match(/^([\w]+)/);if(i){var r=n.match(/(@id='(.*?)')/),l=n.match(/(@t='(\d+)')/),c=n.match(/(@n='(\d+)')/),f=n.match(/\[(\d+)\]/);t.push({name:i[0],id:r?r[0].match(/'(.*?)'/)[0].replace(/'/gm,""):null,t:l?Number(l[0].match(/'(.*?)'/)[0].replace(/'/gm,"")):null,n:c?Number(c[0].match(/'(.*?)'/)[0].replace(/'/gm,"")):null,position:f?Number(f[1])-1:null,ac:n.split("/@")[1]||null})}else n.startsWith("@")&&t.length&&(t[t.length-1].ac=n.slice(1))}return t}function th(e,t){var n=ys(t.attributes.sel||"");if(n.length){var i=n[n.length-1],r=t.attributes.pos||null;n=i.position,n==null&&(i.t!==null&&(n=nh(e,"t",i.t)),i.n!==null&&(n=nh(e,"n",i.n))),n===null?n=r==="prepend"?0:e.length:r==="prepend"?--n:r==="after"&&++n,r=t.tagName,(i=i.ac)&&e[n]?ih(e[n],r,i,Xi(t)||""):(r!=="remove"&&r!=="replace"||e.splice(n,1),r!=="add"&&r!=="replace"||e.splice.apply(e,[n,0].concat(J(t.children))))}}function nh(e,t,n){var i=0;e=b(e);for(var r=e.next();!r.done;r=e.next()){if(Number(r.value.attributes[t])===n)return i;i++}return null}function ih(e,t,n,i){t==="remove"?delete e.attributes[n]:(t==="add"||t==="replace")&&(e.attributes[n]=i)}function Og(e){var t="",n=e.tagName.split(":");0<n.length&&(t=n[0],t=lh.has(t)?lh.get(t):""),t=document.createElementNS(t,e.tagName);for(var i in e.attributes)t.setAttribute(i,e.attributes[i]);for(e=b(e.children),i=e.next();!i.done;i=e.next())i=i.value,n=void 0,typeof i=="string"?n=new Text(i):n=Og(i),t.appendChild(n);return t}function rh(e){if(!e)return null;var t={tagName:e.tagName,attributes:Xa(e.attributes),children:[],parent:null};e=b(e.children);for(var n=e.next();!n.done;n=e.next())n=n.value,typeof n=="string"||(n=rh(n),n.parent=t),t.children.push(n);return t}var oh=new Map,lh=new Map;function Qt(e,t,n){this.startTime=e,this.endTime=t,this.payload=n,this.region=new Fa,this.position=null,this.positionAlign=nd,this.size=0,this.textAlign=Yi,this.direction=gs,this.writingMode=xr,this.lineInterpretation=Ho,this.line=null,this.lineHeight="",this.lineAlign=Al,this.displayAlign=El,this.fontSize=this.border=this.backgroundImage=this.backgroundColor=this.color="",this.fontWeight=ch,this.fontStyle=fh,this.linePadding=this.letterSpacing=this.fontFamily="",this.opacity=1,this.textCombineUpright="",this.textDecoration=[],this.textStrokeWidth=this.textStrokeColor=this.textShadow="",this.wrapLine=!0,this.id="",this.nestedCues=[],this.lineBreak=this.isContainer=!1,this.rubyTag=null,this.cellResolution={oc:32,rows:15}}function or(e,t){return e=new Qt(e,t,""),e.lineBreak=!0,e}Qt.prototype.clone=function(){var e=new Qt(0,0,""),t;for(t in this)e[t]=this[t],e[t]&&e[t].constructor==Array&&(e[t]=e[t].slice());return e};function ca(e,t){if(e.payload!=t.payload||!(.001>Math.abs(e.startTime-t.startTime)&&.001>Math.abs(e.endTime-t.endTime)))return!1;for(var n in e)if(n!="startTime"&&n!="endTime"&&n!="payload"){if(n=="nestedCues"){if(!us(e.nestedCues,t.nestedCues,ca))return!1}else if(n=="region"||n=="cellResolution"){for(var i in e[n])if(e[n][i]!=t[n][i])return!1}else if(Array.isArray(e[n])){if(!us(e[n],t[n]))return!1}else if(e[n]!=t[n])return!1}return!0}function Pc(e,t){t=t===void 0?new Map:t;var n=e.payload;if(n.includes("<")){t.size===0&&ah(t);var i=n;n=[];for(var r=-1,l=0;l<i.length;l++)i[l]==="<"?r=l+1:i[l]===">"&&0<r&&(r=i.substr(r,l-r),r.match(Mg)&&n.push(r),r=-1);for(n=b(n),l=n.next();!l.done;l=n.next())l=l.value,i=i.replace("<"+l+">",'<div time="'+l+'">'),i+="</div>";e:{l=i,r=[];var c=-1;n="",i=!1;for(var f=0;f<l.length;f++)if(l[f]==="/"){var y=l.indexOf(">",f);if(y===-1){n=l;break e}if((y=l.substring(f+1,y))&&y=="v"){i=!0;var m=null;if(r.length&&(m=r[r.length-1]),m){if(m===y)n+="/"+y+">";else{if(!m.startsWith("v")){n+=l[f];continue}n+="/"+m+">"}f+=y.length+1}else n+=l[f]}else n+=l[f]}else l[f]==="<"?(c=f+1,l[c]!="v"&&(c=-1)):l[f]===">"&&0<c&&(r.push(l.substr(c,f-c)),c=-1),n+=l[f];for(l=b(r),r=l.next();!r.done;r=l.next())r=r.value,c=r.replace(" ",".voice-"),n=n.replace("<"+r+">","<"+c+">"),n=n.replace("</"+r+">","</"+c+">"),i||(n+="</"+c+">")}n=kg(n),e.payload="";try{var T=Ya("<span>"+n+"</span>","span")}catch{}if(T)if(T=T.children,T.length!=1||T[0].tagName)for(T=b(T),n=T.next();!n.done;n=T.next())uh(n.value,e,t);else e.payload=Ai(n);else e.payload=Ai(n)}else e.payload=Ai(n)}function ah(e){for(var t=b(Object.entries(fa)),n=t.next();!n.done;n=t.next()){var i=b(n.value);n=i.next().value,i=i.next().value;var r=new Qt(0,0,"");r.color=i,e.set("."+n,r)}for(t=b(Object.entries(sh)),n=t.next();!n.done;n=t.next())i=b(n.value),n=i.next().value,i=i.next().value,r=new Qt(0,0,""),r.backgroundColor=i,e.set("."+n,r)}function kg(e){var t={"< ":""," >":" &gt;"},n=/(< +>|<\s|\s>)/g,i=RegExp(n.source);return e&&i.test(e)?e.replace(n,function(r){return t[r]||""}):e||""}function uh(e,t,n){var i=t.clone();if(i.nestedCues=[],i.payload="",i.rubyTag="",i.line=null,i.region=new Fa,i.position=null,i.size=0,i.textAlign=Yi,e.tagName)for(var r=b(e.tagName.split(/(?=[ .])+/g)),l=r.next();!l.done;l=r.next()){var c=l=l.value;if(c.startsWith(".voice-")){var f=c.split("-").pop();c='v[voice="'+f+'"]',n.has(c)||(c="v[voice="+f+"]")}switch(n.has(c)&&(f=i,c=n.get(c))&&(f.backgroundColor=Wa(c.backgroundColor,f.backgroundColor),f.color=Wa(c.color,f.color),f.fontFamily=Wa(c.fontFamily,f.fontFamily),f.fontSize=Wa(c.fontSize,f.fontSize),f.textShadow=Wa(c.textShadow,f.textShadow),f.fontWeight=c.fontWeight,f.fontStyle=c.fontStyle,f.opacity=c.opacity,f.rubyTag=c.rubyTag,f.textCombineUpright=c.textCombineUpright,f.wrapLine=c.wrapLine),l){case"br":i=or(i.startTime,i.endTime),t.nestedCues.push(i);return;case"b":i.fontWeight=Qa;break;case"i":i.fontStyle=ms;break;case"u":i.textDecoration.push(Ko);break;case"font":(l=e.attributes.color)&&(i.color=l);break;case"div":if(l=e.attributes.time,!l)break;(l=fs(l))&&(i.startTime=l);break;case"ruby":case"rp":case"rt":i.rubyTag=l}}if(r=e.children,ds(e)||r.length==1&&ds(r[0]))for(n=In(e).split(`
`),e=!0,n=b(n),r=n.next();!r.done;r=n.next())r=r.value,e||(e=or(i.startTime,i.endTime),t.nestedCues.push(e)),0<r.length&&(e=i.clone(),e.payload=Ai(r),t.nestedCues.push(e)),e=!1;else for(t.nestedCues.push(i),t=b(r),e=t.next();!e.done;e=t.next())uh(e.value,i,n)}function Wa(e,t){return e&&0<e.length?e:t}Pe("shaka.text.Cue",Qt),Qt.parseCuePayload=Pc,Qt.equal=ca,Qt.prototype.clone=Qt.prototype.clone;var nd="auto";Qt.positionAlign={LEFT:"line-left",RIGHT:"line-right",CENTER:"center",AUTO:nd};var Yi="center",Lc={LEFT:"left",RIGHT:"right",CENTER:Yi,START:"start",END:"end"};Qt.textAlign=Lc;var El="after",id={BEFORE:"before",CENTER:"center",AFTER:El};Qt.displayAlign=id;var gs="ltr";Qt.direction={HORIZONTAL_LEFT_TO_RIGHT:gs,HORIZONTAL_RIGHT_TO_LEFT:"rtl"};var xr="horizontal-tb";Qt.writingMode={HORIZONTAL_TOP_TO_BOTTOM:xr,VERTICAL_LEFT_TO_RIGHT:"vertical-lr",VERTICAL_RIGHT_TO_LEFT:"vertical-rl"};var Ho=0;Qt.lineInterpretation={LINE_NUMBER:Ho,PERCENTAGE:1};var Al="start",rd={CENTER:"center",START:Al,END:"end"};Qt.lineAlign=rd;var fa={white:"white",lime:"lime",cyan:"cyan",red:"red",yellow:"yellow",magenta:"magenta",blue:"blue",black:"black"};Qt.defaultTextColor=fa;var sh={bg_white:"white",bg_lime:"lime",bg_cyan:"cyan",bg_red:"red",bg_yellow:"yellow",bg_magenta:"magenta",bg_blue:"blue",bg_black:"black"};Qt.defaultTextBackgroundColor=sh;var ch=400,Qa=700;Qt.fontWeight={NORMAL:ch,BOLD:Qa};var fh="normal",ms="italic",Rg={NORMAL:fh,ITALIC:ms,OBLIQUE:"oblique"};Qt.fontStyle=Rg;var Ko="underline";Qt.textDecoration={UNDERLINE:Ko,LINE_THROUGH:"lineThrough",OVERLINE:"overline"};var Mg=/(?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{2,3})/g;function qo(){}qo.prototype.destroy=function(){};function hi(e,t,n){lr.set(e.toLowerCase().split(";")[0]+"-"+n,{priority:n,se:t})}function Cl(e,t){for(var n=e.toLowerCase().split(";")[0],i=b([Uc,_c,da,yi]),r=i.next();!r.done;r=i.next())if(r=lr.get(n+"-"+r.value)){var l=r.se(),c=l.isSupported(e,t);if(l.destroy(),c)return r.se}return null}Pe("shaka.transmuxer.TransmuxerEngine",qo),qo.findTransmuxer=Cl,qo.unregisterTransmuxer=function(e,t){lr.delete(e.toLowerCase().split(";")[0]+"-"+t)},qo.registerTransmuxer=hi,qo.prototype.destroy=qo.prototype.destroy;var lr=new Map,yi=1,da=2,_c=3,Uc=4;qo.PluginPriority={FALLBACK:yi,PREFERRED_SECONDARY:da,PREFERRED:_c,APPLICATION:Uc};function vs(){}function hn(e,t){var n=e;return t&&!po.includes(e)&&(n+='; codecs="'+t+'"'),n}function fo(e,t){return t&&(e+='; codecs="'+t+'"'),e}function od(e,t,n){var i=hn(e,t);return t=fo(e,t),Cl(t)?(e=Cl(t))?(e=e(),n=e.convertCodecs(n,t),e.destroy()):n=t:n=e!="video/mp2t"&&n=="audio"?i.replace("video","audio"):i,n}function ld(e,t,n){var i=[t];return Ja.forEach(function(r,l){var c=e[l];l=="codecs"?po.includes(e.mimeType)||i.push('codecs="'+n+'"'):c&&i.push(r+'="'+c+'"')}),e.hdr=="PQ"&&i.push('eotf="smpte2084"'),i.join(";")}function bl(e){return e.split(";")[0].split("/")[1]}function gi(e){var t=jc(e);switch(e=t[0].toLowerCase(),t=t[1].toLowerCase(),!0){case(e==="mp4a"&&t==="69"):case(e==="mp4a"&&t==="6b"):case(e==="mp4a"&&t==="40.34"):return"mp3";case(e==="mp4a"&&t==="66"):case(e==="mp4a"&&t==="67"):case(e==="mp4a"&&t==="68"):case(e==="mp4a"&&t==="40.2"):case(e==="mp4a"&&t==="40.02"):case(e==="mp4a"&&t==="40.5"):case(e==="mp4a"&&t==="40.05"):case(e==="mp4a"&&t==="40.29"):case(e==="mp4a"&&t==="40.42"):return"aac";case(e==="mp4a"&&t==="a5"):case e==="ac3":case e==="ac-3":return"ac-3";case(e==="mp4a"&&t==="a6"):case e==="eac3":case e==="ec-3":return"ec-3";case e==="ac-4":return"ac-4";case(e==="mp4a"&&t==="b2"):return"dtsx";case(e==="mp4a"&&t==="a9"):return"dtsc";case e==="vp09":case e==="vp9":return"vp9";case e==="avc1":case e==="avc3":return"avc";case e==="hvc1":case e==="hev1":return"hevc";case e==="vvc1":case e==="vvi1":return"vvc";case e==="dvh1":case e==="dvhe":return t&&t.startsWith("05")?"dovi-p5":"dovi-hevc";case e==="dvav":case e==="dva1":return"dovi-avc";case e==="dav1":return"dovi-av1";case e==="dvc1":case e==="dvi1":return"dovi-vvc"}return e}function li(e){var t=[];e=b(e.split(","));for(var n=e.next();!n.done;n=e.next())n=jc(n.value),t.push(n[0]);return t.sort().join(",")}function Ri(e){return e.split(";")[0]}function jn(e){return e=e.split(/ *; */),e.shift(),(e=e.find(function(t){return t.startsWith("codecs=")}))?e.split("=")[1].replace(/^"|"$/g,""):""}function ad(e){return e==="application/x-mpegurl"||e==="application/vnd.apple.mpegurl"}function jc(e){e=e.split(".");var t=e[0];return e.shift(),[t,e.join(".")]}Pe("shaka.util.MimeUtils",vs),vs.getFullTypeWithAllCodecs=fo,vs.getFullType=hn;var Ja=new Map().set("codecs","codecs").set("frameRate","framerate").set("bandwidth","bitrate").set("width","width").set("height","height").set("channelsCount","channels"),po=["audio/aac","audio/ac3","audio/ec3","audio/mpeg"];function ho(e){this.i=null,this.j=e,this.B=!1,this.l=this.u=0,this.m=1/0,this.h=this.g=null,this.C="",this.A=function(){},this.o=new Map}function kn(e,t){Ar.set(e,t)}function Il(e){return Ar.get(e)}function Dl(e){return Ar.has(e)?!0:e=="application/cea-608"||e=="application/cea-708"?!!as:!1}ho.prototype.destroy=function(){return this.j=this.i=null,this.o.clear(),Promise.resolve()};function ud(e,t,n,i,r){var l,c,f,y,m,T,x;return z(function(D){if(D.g==1)return _(D,Promise.resolve(),2);if(!e.i||!e.j)return D.return();if(n==null||i==null)return e.i.parseInit(Ze(t)),D.return();for(l=e.B?n:e.u,c={periodStart:e.u,segmentStart:n,segmentEnd:i,vttOffset:l},f=e.i.parseMedia(Ze(t),c,r,[]),y=b(f),m=y.next();!m.done;m=y.next())T=m.value,e.A(T,r||null,c);x=f.filter(function(R){return R.startTime>=e.l&&R.startTime<e.m}),e.j.append(x),e.g==null&&(e.g=Math.max(n,e.l)),e.h=Math.min(i,e.m),se(D)})}ho.prototype.remove=function(e,t){var n=this;return z(function(i){if(i.g==1)return _(i,Promise.resolve(),2);!n.j||!n.j.remove(e,t)||n.g==null||t<=n.g||e>=n.h||(e<=n.g&&t>=n.h?n.g=n.h=null:e<=n.g&&t<n.h?n.g=t:e>n.g&&t>=n.h&&(n.h=e)),se(i)})};function jr(e,t,n){e.l=t,e.m=n}function Er(e,t,n){if(e.C=t,t=e.o.get(t))for(var i=b(t.keys()),r=i.next();!r.done;r=i.next())(r=t.get(r.value).filter(function(l){return l.endTime<=n}))&&e.j.append(r)}function pa(e,t,n){t.startTime+=n,t.endTime+=n,t=b(t.nestedCues);for(var i=t.next();!i.done;i=t.next())pa(e,i.value,n)}function Ol(e,t,n,i,r){var l=n+" "+i,c=new Map;t=b(t);for(var f=t.next();!f.done;f=t.next()){var y=f.value;f=y.stream,y=y.cue,c.has(f)||c.set(f,new Map),c.get(f).has(l)||c.get(f).set(l,[]),pa(e,y,r),y.startTime>=e.l&&y.startTime<e.m&&(c.get(f).get(l).push(y),f==e.C&&e.j.append([y]))}for(r=b(c.keys()),l=r.next();!l.done;l=r.next())for(l=l.value,e.o.has(l)||e.o.set(l,new Map),t=b(c.get(l).keys()),f=t.next();!f.done;f=t.next())f=f.value,y=c.get(l).get(f),e.o.get(l).set(f,y);e.g=e.g==null?Math.max(n,e.l):Math.min(e.g,Math.max(n,e.l)),e.h=Math.max(e.h,Math.min(i,e.m))}Pe("shaka.text.TextEngine",ho),ho.prototype.destroy=ho.prototype.destroy,ho.findParser=Il,ho.unregisterParser=function(e){Ar.delete(e)},ho.registerParser=kn;var Ar=new Map;function Za(e,t){return e.concat(t)}function Ng(){}function Fo(e){return e!=null}function $a(e,t){return Promise.race([t,new Promise(function(n,i){new dt(i).da(e)})])}function Dn(){}function Cn(e,t){return e=It(e),t=It(t),e.split("-")[0]==t.split("-")[0]}function Jt(e,t){return e=It(e),t=It(t),e=e.split("-"),t=t.split("-"),e[0]==t[0]&&e.length==1&&t.length==2}function kl(e,t){return e=It(e),t=It(t),e=e.split("-"),t=t.split("-"),e.length==2&&t.length==2&&e[0]==t[0]}function It(e){e=b(e.split("-x-"));var t=e.next().value;t=t===void 0?"":t,e=e.next().value,e=e===void 0?"":e;var n=b(t.split("-"));return t=n.next().value,t=t===void 0?"":t,n=n.next().value,n=n===void 0?"":n,e=e?"x-"+e:"",t=t.toLowerCase(),t=Ss.get(t)||t,n=n.toUpperCase(),(n?t+"-"+n:t)+(e?"-"+e:"")}function Rl(e,t){return e=It(e),t=It(t),t==e?4:Jt(t,e)?3:kl(t,e)?2:Jt(e,t)?1:0}function Ml(e){var t=e.indexOf("-");return e=0<=t?e.substring(0,t):e,e=e.toLowerCase(),e=Ss.get(e)||e}function sd(e){return e.language?It(e.language):e.audio&&e.audio.language?It(e.audio.language):e.video&&e.video.language?It(e.video.language):"und"}function Bc(e,t){e=It(e);var n=new Set;t=b(t);for(var i=t.next();!i.done;i=t.next())n.add(It(i.value));for(t=b(n),i=t.next();!i.done;i=t.next())if(i=i.value,i==e)return i;for(t=b(n),i=t.next();!i.done;i=t.next())if(i=i.value,Jt(i,e))return i;for(t=b(n),i=t.next();!i.done;i=t.next())if(i=i.value,kl(i,e))return i;for(n=b(n),t=n.next();!t.done;t=n.next())if(t=t.value,Jt(e,t))return t;return null}Pe("shaka.util.LanguageUtils",Dn),Dn.findClosestLocale=Bc,Dn.getLocaleForVariant=sd,Dn.getLocaleForText=function(e){return It(e.language||"und")},Dn.getBase=Ml,Dn.relatedness=Rl,Dn.areSiblings=function(e,t){var n=Ml(e),i=Ml(t);return e!=n&&t!=i&&n==i},Dn.normalize=It,Dn.isSiblingOf=kl,Dn.isParentOf=Jt,Dn.areLanguageCompatible=Cn,Dn.areLocaleCompatible=function(e,t){return e=It(e),t=It(t),e==t};var Ss=new Map([["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"]]);function ws(){}function dh(e,t,n,i,r){function l(j){var V=String(j.width||"")+String(j.height||"")+String(Math.round(j.frameRate||0))+(j.hdr||"")+j.fastSwitching;return j.dependencyStream&&(V+=j.dependencyStream.baseOriginalId||""),V}function c(j){var V=j.language+(j.channelsCount||0)+(j.audioSamplingRate||0)+j.roles.join(",")+j.label+j.groupId+j.fastSwitching;return j.dependencyStream&&(V+=j.dependencyStream.baseOriginalId||""),V}if(r.length){var f=e.textStreams;r=b(r);for(var y=r.next(),m={};!y.done;m={sg:void 0},y=r.next())if(m.sg=y.value,y=f.filter(function(j){return function(V){return!!(V.codecs.startsWith(j.sg)||V.mimeType.startsWith(j.sg))}}(m)),y.length){f=y;break}e.textStreams=f}if(f=e.variants,(t.length||n.length)&&(f=Vc(f,t,n)),i.length){for(t=new ea,n=b(f),f=n.next();!f.done;f=n.next())f=f.value,t.push(String(f.video.width||0),f);var T=[];t.forEach(function(j,V){j=0;var X=[];V=b(V);for(var G=V.next(),Z={};!G.done;Z={Pe:void 0},G=V.next())Z.Pe=G.value,G=i.filter(function(q){return function(K){return q.Pe.decodingInfos[0][K]}}(Z)).length,G>j?(j=G,X=[Z.Pe]):G==j&&X.push(Z.Pe);T.push.apply(T,J(X))}),f=T}for(n=new Set,t=new Set,f=b(f),r=f.next();!r.done;r=f.next())r=r.value,r.audio&&n.add(r.audio),r.video&&t.add(r.video);f=Array.from(n).sort(function(j,V){return j.bandwidth-V.bandwidth});var x=[];for(n=new Map,f=b(f),r=f.next();!r.done;r=f.next()){if(r=r.value,y=c(r),m=n.get(y)||[],m.length){var D=m[m.length-1],R=gi(D.codecs),N=gi(r.codecs);R!=N||r.bandwidth&&D.bandwidth&&!(r.bandwidth>D.bandwidth)||(m.push(r),x.push(r.id))}else m.push(r),x.push(r.id);n.set(y,m)}var U={vp8:1,avc:1,"dovi-avc":.95,vp9:.9,vp09:.9,hevc:.85,"dovi-hevc":.8,"dovi-p5":.75,av01:.7,"dovi-av1":.65,vvc:.6};f=Array.from(t).sort(function(j,V){if(!j.bandwidth||!V.bandwidth||j.bandwidth==V.bandwidth){if(j.codecs&&V.codecs&&j.codecs!=V.codecs&&j.width==V.width){var X=gi(j.codecs),G=gi(V.codecs);if(X!=G)return(U[X]||1)-(U[G]||1)}return j.width-V.width}return j.bandwidth-V.bandwidth}),t=Sl();var L=[];for(n=new Map,f=b(f),r=f.next();!r.done;r=f.next()){if(r=r.value,y=l(r),m=n.get(y)||[],m.length){if(D=m[m.length-1],!t&&(R=gi(D.codecs),N=gi(r.codecs),R!==N))continue;R=gi(D.codecs),N=gi(r.codecs),R!=N||r.bandwidth&&D.bandwidth&&!(r.bandwidth>D.bandwidth)||(m.push(r),L.push(r.id))}else m.push(r),L.push(r.id);n.set(y,m)}e.variants=e.variants.filter(function(j){var V=j.audio;return j=j.video,!(V&&!x.includes(V.id)||j&&!L.includes(j.id))})}function Vc(e,t,n){t=b(t);for(var i=t.next(),r={};!i.done;r={Lh:void 0},i=t.next())if(r.Lh=i.value,i=e.filter(function(l){return function(c){return c.video&&c.video.codecs.startsWith(l.Lh)}}(r)),i.length){e=i;break}for(n=b(n),t=n.next(),i={};!t.done;i={Cg:void 0},t=n.next())if(i.Cg=t.value,t=e.filter(function(l){return function(c){return c.audio&&c.audio.codecs.startsWith(l.Cg)}}(i)),t.length){e=t;break}return e}function ph(e,t,n){e.variants=e.variants.filter(function(i){return zo(i,t,n)})}function zo(e,t,n){function i(f,y,m){return f>=y&&f<=m}var r=e.video;if(r&&r.width&&r.height){var l=r.width,c=r.height;if(c>l&&(c=b([c,l]),l=c.next().value,c=c.next().value),!i(l,t.minWidth,Math.min(t.maxWidth,n.width))||!i(c,t.minHeight,Math.min(t.maxHeight,n.height))||!i(r.width*r.height,t.minPixels,t.maxPixels))return!1}return!(e&&e.video&&e.video.frameRate&&!i(e.video.frameRate,t.minFrameRate,t.maxFrameRate)||e&&e.audio&&e.audio.channelsCount&&!i(e.audio.channelsCount,t.minChannelsCount,t.maxChannelsCount)||!i(e.bandwidth,t.minBandwidth,t.maxBandwidth))}function Nl(e,t,n,i){return n=n===void 0?[]:n,i=i===void 0?{}:i,z(function(r){return r.g==1?_(r,Pl(e,t,0<t.offlineSessionIds.length,n,i),2):(Pg(t),_(r,M0(t),0))})}function Pl(e,t,n,i,r){var l,c;return z(function(f){if(f.g==1)return nr()&&Ll(t.variants),_(f,Kc(t.variants,n,!1,i),2);l=null,e&&(c=e.h)&&(l=c.keySystem),t.variants=t.variants.filter(function(y){var m=hh(y,l,r);if(!m){var T=[];y.audio&&T.push(ya(y.audio)),y.video&&T.push(ya(y.video))}return m}),se(f)})}function Ll(e){var t=new Map().set("dvav","avc3").set("dva1","avc1").set("dvhe","hev1").set("dvh1","hvc1").set("dvc1","vvc1").set("dvi1","vvi1"),n=new Set;e=b(e);for(var i=e.next();!i.done;i=e.next())i=i.value,i.video&&n.add(i.video);for(n=b(n),e=n.next();!e.done;e=n.next()){e=e.value,i=b(t);for(var r=i.next();!r.done;r=i.next()){var l=b(r.value);if(r=l.next().value,l=l.next().value,e.codecs.includes(r)){e.codecs=e.codecs.replace(r,l);break}}}}function hh(e,t,n){if(!e.decodingInfos.some(function(y){return!(!y.supported||t&&(y=y.keySystemAccess)&&(n[y.keySystem]||y.keySystem)!=t)}))return!1;var i=nr(),r=zt("Firefox")&&yl(),l=e.video,c=l&&l.width||0,f=l&&l.height||0;return i&&l&&(1920<c||1080<f)&&(l.codecs.includes("avc1.")||l.codecs.includes("avc3."))||(i=l&&l.dependencyStream)&&!Cg(i)?!1:(e=e.audio,!(r&&e&&e.encrypted&&e.codecs.toLowerCase().includes("opus")||e&&e.dependencyStream))}function cd(e,t){var n,i,r,l,c,f,y;return z(function(m){if(m.g==1){for(n=function(T,x){if(T){var D=Xa(T);return D.supported=T.supported&&x.supported,D.powerEfficient=T.powerEfficient&&x.powerEfficient,D.smooth=T.smooth&&x.smooth,x.keySystemAccess&&!D.keySystemAccess&&(D.keySystemAccess=x.keySystemAccess),D}return x},i=null,r=[],l=b(t),c=l.next(),f={};!c.done;f={cache:void 0,Rd:void 0},c=l.next())y=c.value,f.Rd=Zp(y),f.cache=ru,f.cache.has(f.Rd)?i=n(i,f.cache.get(f.Rd)):r.push(Hc(y).then(function(T){return function(x){var D=null;x=b(x||[]);for(var R=x.next();!R.done;R=x.next())D=n(D,R.value);D&&(T.cache.set(T.Rd,D),i=n(i,D))}}(f)));return _(m,Promise.all(r),2)}i&&e.decodingInfos.push(i),se(m)})}function Hc(e){var t=[""];e.video&&(t=jn(e.video.contentType).split(","));var n=[""];e.audio&&(n=jn(e.audio.contentType).split(","));var i=[];t=b(t);for(var r=t.next();!r.done;r=t.next()){r=r.value;for(var l=b(n),c=l.next(),f={};!c.done;f={pc:void 0},c=l.next())c=c.value,f.pc=so(e),e.video&&(f.pc.video.contentType=hn(Ri(f.pc.video.contentType),r)),e.audio&&(f.pc.audio.contentType=hn(Ri(f.pc.audio.contentType),c)),i.push(new Promise(function(y){return function(m,T){(yl()?$a(5,navigator.mediaCapabilities.decodingInfo(y.pc)):navigator.mediaCapabilities.decodingInfo(y.pc)).then(function(x){m(x)}).catch(T)}}(f)))}return Promise.all(i).catch(function(){return JSON.stringify(e),null})}function Kc(e,t,n,i){var r,l,c,f,y,m,T,x,D,R,N,U,L,j,V,X,G,Z;return z(function(q){switch(q.g){case 1:if(e.some(function(K){return K.decodingInfos.length}))return q.return();r=b(i),l=r.next(),c={};case 2:if(l.done){q.s(4);break}c.mh=l.value,f=!1,y=b(e),m=y.next();case 5:if(m.done){q.s(7);break}T=m.value,x=ha(T,t,n).filter(function(K){return function(W){return W=W[0],(W.keySystemConfiguration&&W.keySystemConfiguration.keySystem)===K.mh}}(c)),D=b(x),R=D.next();case 8:if(R.done){q.s(10);break}return N=R.value,_(q,cd(T,N),9);case 9:R=D.next(),q.s(8);break;case 10:T.decodingInfos.length&&(f=!0),m=y.next(),q.s(5);break;case 7:if(f)return q.return();c={mh:void 0},l=r.next(),q.s(2);break;case 4:U=b(e),L=U.next();case 12:if(L.done){q.s(0);break}j=L.value,V=ha(j,t,n).filter(function(K){return K=K[0],K=K.keySystemConfiguration&&K.keySystemConfiguration.keySystem,!K||!i.includes(K)}),X=b(V),G=X.next();case 15:if(G.done){L=U.next(),q.s(12);break}return Z=G.value,_(q,cd(j,Z),16);case 16:G=X.next(),q.s(15)}})}function ha(e,t,n){var i=e.audio,r=e.video,l=[],c=[];if(r)for(var f=b(r.fullMimeTypes),y=f.next();!y.done;y=f.next()){y=y.value;var m=jn(y);if(m.includes(",")&&!i){var T=m.split(","),x=Ri(y);m=aa("video",T),T=aa("audio",T),T=ai(T,x),x=od(x,T,"audio"),c.push({contentType:x,channels:2,bitrate:e.bandwidth||1,samplerate:1,spatialRendering:!1})}if(m=Ts(m),y={contentType:od(Ri(y),m,"video"),width:r.width||64,height:r.height||64,bitrate:r.bandwidth||e.bandwidth||1,framerate:r.frameRate||1},r.hdr)switch(r.hdr){case"SDR":y.transferFunction="srgb";break;case"PQ":y.transferFunction="pq";break;case"HLG":y.transferFunction="hlg"}r.colorGamut&&(y.colorGamut=r.colorGamut),l.push(y)}if(i)for(f=b(i.fullMimeTypes),y=f.next();!y.done;y=f.next())m=y.value,y=Ri(m),m=ai(jn(m),y),y=od(y,m,"audio"),c.push({contentType:y,channels:i.channelsCount||2,bitrate:i.bandwidth||e.bandwidth||1,samplerate:i.audioSamplingRate||1,spatialRendering:i.spatialAudio});for(f=[],l.length==0&&l.push(null),c.length==0&&c.push(null),l=b(l),y=l.next();!y.done;y=l.next())for(y=y.value,m=b(c),x=m.next();!x.done;x=m.next())x=x.value,T={type:n?"file":"media-source"},y&&(T.video=y),x&&(T.audio=x),f.push(T);if(c=(e.video?e.video.drmInfos:[]).concat(e.audio?e.audio.drmInfos:[]),!c.length)return[f];for(e=[],n=new Map,c=b(c),l=c.next();!l.done;l=c.next())l=l.value,n.get(l.keySystem)||n.set(l.keySystem,[]),n.get(l.keySystem).push(l);for(c=t?"required":"optional",t=t?["persistent-license"]:["temporary"],l=b(n.keys()),y=l.next();!y.done;y=l.next()){for(y=y.value,x=n.get(y),m=new Map,x=b(x),T=x.next();!T.done;T=x.next()){T=T.value;var D=T.videoRobustness+","+T.audioRobustness;m.get(D)||m.set(D,[]),m.get(D).push(T)}for(m=b(m.values()),x=m.next();!x.done;x=m.next()){x=x.value,T=[],D=b(f);for(var R=D.next();!R.done;R=D.next()){R=Object.assign({},R.value);for(var N={keySystem:y,initDataType:"cenc",persistentState:c,distinctiveIdentifier:"optional",sessionTypes:t},U=b(x),L=U.next();!L.done;L=U.next()){if(L=L.value,L.initData&&L.initData.length){for(var j=new Set,V=b(L.initData),X=V.next();!X.done;X=V.next())j.add(X.value.initDataType);N.initDataType=L.initData[0].initDataType}L.distinctiveIdentifierRequired&&(N.distinctiveIdentifier="required"),L.persistentStateRequired&&(N.persistentState="required"),L.sessionType&&(N.sessionTypes=[L.sessionType]),i&&(N.audio?(L.encryptionScheme&&(N.audio.encryptionScheme=N.audio.encryptionScheme||L.encryptionScheme),N.audio.robustness=N.audio.robustness||L.audioRobustness):(N.audio={robustness:L.audioRobustness},L.encryptionScheme&&(N.audio.encryptionScheme=L.encryptionScheme)),N.audio.robustness==""&&delete N.audio.robustness),r&&(N.video?(L.encryptionScheme&&(N.video.encryptionScheme=N.video.encryptionScheme||L.encryptionScheme),N.video.robustness=N.video.robustness||L.videoRobustness):(N.video={robustness:L.videoRobustness},L.encryptionScheme&&(N.video.encryptionScheme=L.encryptionScheme)),N.video.robustness==""&&delete N.video.robustness)}R.keySystemConfiguration=N,T.push(R)}e.push(T)}}return e}function ai(e,t){return e.toLowerCase()=="flac"?oi()?"fLaC":"flac":e.toLowerCase()==="opus"?oi()&&bl(t)=="mp4"?"Opus":"opus":e.toLowerCase()=="ac-3"&&lo()?"ec-3":e}function Ts(e){if(e.includes("avc1")){var t=e.split(".");if(t.length==3)return e=t.shift()+".",e+=parseInt(t.shift(),10).toString(16),e+=("000"+parseInt(t.shift(),10).toString(16)).slice(-4)}else if(e=="vp9")return"vp09.00.41.08";return e}function Pg(e){e.textStreams=e.textStreams.filter(function(t){return t=hn(t.mimeType,t.codecs),Dl(t)})}function M0(e){var t,n,i,r,l,c,f;return z(function(y){switch(y.g){case 1:t=[],n=b(e.imageStreams),i=n.next();case 2:if(i.done){y.s(4);break}if(r=i.value,l=r.mimeType,l=="application/mp4"&&r.codecs=="mjpg"&&(l="image/jpg"),ga.has(l)){y.s(5);break}if(c=Ug.get(l),!c){ga.set(l,!1),y.s(5);break}return _(y,N0(c),7);case 7:f=y.h,ga.set(l,f);case 5:ga.get(l)&&t.push(r),i=n.next(),y.s(2);break;case 4:e.imageStreams=t,se(y)}})}function N0(e){return new Promise(function(t){var n=new Image;n.src=e,"decode"in n?n.decode().then(function(){t(!0)}).catch(function(){t(!1)}):n.onload=n.onerror=function(){t(n.height===2)}})}function eu(e){var t=e.audio,n=e.video,i=t?t.mimeType:null,r=n?n.mimeType:null,l=t?t.codecs:null,c=n?n.codecs:null,f=t?t.groupId:null,y=[];n&&y.push(n.mimeType),t&&y.push(t.mimeType),y=y[0]||null;var m=[];t&&m.push(t.kind),n&&m.push(n.kind),m=m[0]||null;var T=new Set;if(t)for(var x=b(t.roles),D=x.next();!D.done;D=x.next())T.add(D.value);if(n)for(x=b(n.roles),D=x.next();!D.done;D=x.next())T.add(D.value);if(e={id:e.id,active:!1,type:"variant",bandwidth:e.bandwidth,language:e.language,label:null,kind:m,width:null,height:null,frameRate:null,pixelAspectRatio:null,hdr:null,colorGamut:null,videoLayout:null,mimeType:y,audioMimeType:i,videoMimeType:r,codecs:"",audioCodec:l,videoCodec:c,primary:e.primary,roles:Array.from(T),audioRoles:null,forced:!1,videoId:null,audioId:null,audioGroupId:f,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,tilesLayout:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:null,originalImageId:null,accessibilityPurpose:null,originalLanguage:null},n&&(e.videoId=n.id,e.originalVideoId=n.originalId,e.width=n.width||null,e.height=n.height||null,e.frameRate=n.frameRate||null,e.pixelAspectRatio=n.pixelAspectRatio||null,e.videoBandwidth=n.bandwidth||null,e.hdr=n.hdr||null,e.colorGamut=n.colorGamut||null,e.videoLayout=n.videoLayout||null,(i=n.dependencyStream)&&(e.width=i.width||e.width,e.height=i.height||e.height,e.videoCodec=i.codecs||e.videoCodec),c.includes(","))){e.channelsCount=n.channelsCount,e.audioSamplingRate=n.audioSamplingRate,e.spatialAudio=n.spatialAudio,e.originalLanguage=n.originalLanguage,e.audioMimeType=r,n=c.split(",");try{e.videoCodec=aa("video",n),e.audioCodec=aa("audio",n)}catch{}}return t&&(e.audioId=t.id,e.originalAudioId=t.originalId,e.channelsCount=t.channelsCount,e.audioSamplingRate=t.audioSamplingRate,e.audioBandwidth=t.bandwidth||null,e.spatialAudio=t.spatialAudio,e.label=t.label,e.audioRoles=t.roles,e.accessibilityPurpose=t.accessibilityPurpose,e.originalLanguage=t.originalLanguage,t=t.dependencyStream)&&(e.audioCodec=t.codecs||e.audioCodec),t=[],e.videoCodec&&t.push(e.videoCodec),e.audioCodec&&t.push(e.audioCodec),e.codecs=t.join(", "),e}function Bn(e){return{id:e.id,active:!1,type:at,bandwidth:0,language:e.language,label:e.label,kind:e.kind||null,width:null,height:null,frameRate:null,pixelAspectRatio:null,hdr:null,colorGamut:null,videoLayout:null,mimeType:e.mimeType,audioMimeType:null,videoMimeType:null,codecs:e.codecs||null,audioCodec:null,videoCodec:null,primary:e.primary,roles:e.roles,audioRoles:null,forced:e.forced,videoId:null,audioId:null,audioGroupId:null,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,tilesLayout:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:e.originalId,originalImageId:null,accessibilityPurpose:e.accessibilityPurpose,originalLanguage:e.originalLanguage}}function qc(e){var t=e.width||null,n=e.height||null,i=null;e.segmentIndex&&(i=Hn(e.segmentIndex));var r=e.tilesLayout;return i&&(r=i.tilesLayout||r),r&&t!=null&&(t/=Number(r.split("x")[0])),r&&n!=null&&(n/=Number(r.split("x")[1])),{id:e.id,active:!1,type:"image",bandwidth:e.bandwidth||0,language:"",label:null,kind:null,width:t,height:n,frameRate:null,pixelAspectRatio:null,hdr:null,colorGamut:null,videoLayout:null,mimeType:e.mimeType,audioMimeType:null,videoMimeType:null,codecs:e.codecs||null,audioCodec:null,videoCodec:null,primary:!1,roles:[],audioRoles:null,forced:!1,videoId:null,audioId:null,audioGroupId:null,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,tilesLayout:r||null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:null,originalImageId:e.originalId,accessibilityPurpose:null,originalLanguage:null}}function tu(e){return e.__shaka_id||(e.__shaka_id=_g++),e.__shaka_id}function xs(e){var t=nu(e);return t.active=e.mode!="disabled",t.type="text",t.originalTextId=e.id,e.kind=="captions"&&(t.mimeType="unknown"),e.kind=="subtitles"&&(t.mimeType="text/vtt"),e.kind&&(t.roles=[e.kind]),e.kind=="forced"&&(t.forced=!0),t}function Fc(e){var t=nu(e);return t.active=e.enabled,t.type="variant",t.originalAudioId=e.id,e.kind=="main"&&(t.primary=!0),e.kind&&(t.roles=[e.kind],t.audioRoles=[e.kind],t.label=e.label),t}function nu(e){var t=e.language;return{id:tu(e),active:!1,type:"",bandwidth:0,language:It(t||"und"),label:e.label,kind:e.kind,width:null,height:null,frameRate:null,pixelAspectRatio:null,hdr:null,colorGamut:null,videoLayout:null,mimeType:null,audioMimeType:null,videoMimeType:null,codecs:null,audioCodec:null,videoCodec:null,primary:!1,roles:[],forced:!1,audioRoles:null,videoId:null,audioId:null,audioGroupId:null,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,tilesLayout:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:null,originalImageId:null,accessibilityPurpose:null,originalLanguage:t}}function Go(e){return e.allowedByApplication&&e.allowedByKeySystem&&e.disabledUntilTime==0}function fd(e){return e.filter(function(t){return Go(t)})}function iu(e,t,n,i){var r=e,l=e.filter(function(y){return y.primary});l.length&&(r=l);var c=r.length?r[0].language:"";if(r=r.filter(function(y){return y.language==c}),t){var f=Bc(It(t),e.map(function(y){return y.language}));f&&(r=e.filter(function(y){return It(y.language)==f}))}if(r=r.filter(function(y){return y.forced==i}),n){if(e=Lg(r,n),e.length)return e}else if(e=r.filter(function(y){return y.roles.length==0}),e.length)return e;return e=r.map(function(y){return y.roles}).reduce(Za,[]),e.length?Lg(r,e[0]):r}function Lg(e,t){return e.filter(function(n){return n.roles.includes(t)})}function yh(e,t){t.length&&(t=t.filter(function(n){return gi(e.codecs)==gi(n.codecs)}).sort(function(n,i){return n.bandwidth&&i.bandwidth&&n.bandwidth!=i.bandwidth?n.bandwidth-i.bandwidth:(n.width||0)-(i.width||0)}),e.trickModeVideo=t[0],1<t.length&&(t=t.find(function(n){return e.width==n.width&&e.height==n.height})))&&(e.trickModeVideo=t)}function ya(e){return e.type=="audio"?"type=audio codecs="+e.codecs+" bandwidth="+e.bandwidth+" channelsCount="+e.channelsCount+" audioSamplingRate="+e.audioSamplingRate:e.type=="video"?"type=video codecs="+e.codecs+" bandwidth="+e.bandwidth+" frameRate="+e.frameRate+" width="+e.width+" height="+e.height:"unexpected stream type"}function dd(e,t,n){if(n.autoShowText==0)return!1;if(n.autoShowText==1)return!0;var i=It(n.preferredTextLanguage);return t=It(t.language),n.autoShowText==2?Cn(t,i):n.autoShowText==3?e?(e=It(e.language),Cn(t,i)&&!Cn(e,t)):!1:(bt("Invalid autoShowText setting!"),!1)}Pe("shaka.util.StreamUtils",ws),ws.meetsRestrictions=zo;var ru=new Map,_g=0,ga=new Map().set("image/svg+xml",!0).set("image/png",!0).set("image/jpeg",!0).set("image/jpg",!0),Ug=new Map().set("image/webp","data:image/webp;base64,UklGRjoAAABXRUJQVlA4IC4AAACyAgCdASoCAAIALmk0mk0iIiIiIgBoSygABc6WWgAA/veff/0PP8bA//LwYAAA").set("image/avif","data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAAB0AAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAIAAAACAAAAEHBpeGkAAAAAAwgICAAAAAxhdjFDgQ0MAAAAABNjb2xybmNseAACAAIAAYAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAACVtZGF0EgAKCBgANogQEAwgMg8f8D///8WfhwB8+ErK42A=");function en(){var e=this;this.G=null,this.o=!1,this.m=new tr,this.j=new vt,navigator.connection&&navigator.connection.addEventListener&&this.j.D(navigator.connection,"change",function(){if(e.o&&e.g.useNetworkInformation){e.m=new tr,e.g&&e.m.configure(e.g.advanced);var t=e.chooseVariant();t&&navigator.onLine&&e.G(t,e.g.clearBufferSwitch,e.g.safeMarginSwitch)}}),this.F=[],this.H=1,this.I=!1,this.h=this.l=this.g=this.u=null,this.A=new dt(function(){if(e.o&&(e.g.restrictToElementSize||e.g.restrictToScreenSize)){var t=e.chooseVariant();t&&e.G(t,e.g.clearBufferSwitch,e.g.safeMarginSwitch)}}),this.B=w,"documentPictureInPicture"in w&&this.j.D(w.documentPictureInPicture,"enter",function(){e.B=w.documentPictureInPicture.window,e.A&&e.A.sb(),e.j.ma(e.B,"pagehide",function(){e.B=w,e.A&&e.A.sb()})}),this.C=this.i=null}h=en.prototype,h.stop=function(){this.G=null,this.o=!1,this.F=[],this.H=1,this.l=this.u=null,this.h&&(this.h.disconnect(),this.h=null),this.A.stop(),this.C=this.i=null},h.release=function(){this.j.release(),this.A=null},h.init=function(e){this.G=e},h.chooseVariant=function(){var e=1/0,t=1/0;if(this.g.restrictToScreenSize){var n=this.g.ignoreDevicePixelRatio?1:this.B.devicePixelRatio;e=this.B.screen.height*n,t=this.B.screen.width*n}if(this.h&&this.g.restrictToElementSize){n=this.g.ignoreDevicePixelRatio?1:this.B.devicePixelRatio;var i=this.l.clientHeight,r=this.l.clientWidth;this.i&&document.pictureInPictureElement&&document.pictureInPictureElement==this.l&&(i=this.i.height,r=this.i.width),e=Math.min(e,i*n),t=Math.min(t,r*n)}if(n=this.F.filter(function(m){return m&&!(m.audio&&m.audio.fastSwitching||m.video&&m.video.fastSwitching)}),n.length||(n=this.F),i=n,n.length!=this.F.length&&(i=this.F.filter(function(m){return m&&!!(m.audio&&m.audio.fastSwitching||m.video&&m.video.fastSwitching)})),n=hd(this,this.g.restrictions,i,1/0,1/0),e!=1/0||t!=1/0){for(n=yd(n),n=b(n),r=n.next();!r.done;r=n.next())if(r=r.value,r.height>=e&&r.width>=t){e=r.height,t=r.width;break}n=hd(this,this.g.restrictions,i,e,t)}for(e=this.getBandwidthEstimate(),i.length&&!n.length&&(n=hd(this,null,i,1/0,1/0),n=[n[0]]),t=n[0]||null,i=0;i<n.length;i++){r=n[i];for(var l=isNaN(this.H)?1:Math.abs(this.H),c=l*r.bandwidth/this.g.bandwidthDowngradeTarget,f={bandwidth:1/0},y=i+1;y<n.length;y++)if(r.bandwidth!=n[y].bandwidth){f=n[y];break}l=l*f.bandwidth/this.g.bandwidthUpgradeTarget,e>=c&&e<=l&&(t.bandwidth!=r.bandwidth||t.bandwidth==r.bandwidth&&t.video&&r.video&&(t.video.width<r.video.width||t.video.height<r.video.height))&&(t=r)}return this.u=Date.now(),t},h.enable=function(){this.o=!0},h.disable=function(){this.o=!1},h.segmentDownloaded=function(e,t,n){e<this.g.cacheLoadThreshold||(this.m.sample(e,t),n&&this.u!=null&&this.o&&pd(this))},h.trySuggestStreams=function(){this.u!=null&&this.o&&pd(this)},h.getBandwidthEstimate=function(){var e=this.g.defaultBandwidthEstimate;return navigator.connection&&navigator.connection.downlink&&this.g.useNetworkInformation&&(e=1e6*navigator.connection.downlink),navigator.connection&&navigator.connection.downlink&&this.g.useNetworkInformation&&this.g.preferNetworkInformationBandwidth?e:(e=this.m.getBandwidthEstimate(e),this.C?this.C.getBandwidthEstimate(e):e)},h.setVariants=function(e){this.F=e},h.playbackRateChanged=function(e){this.H=e},h.setMediaElement=function(e){function t(){n.A.da(jg)}var n=this;this.l=e,this.h&&(this.h.disconnect(),this.h=null),this.l&&"ResizeObserver"in w&&(this.h=new ResizeObserver(t),this.h.observe(this.l)),this.j.D(e,"enterpictureinpicture",function(i){i.pictureInPictureWindow&&(n.i=i.pictureInPictureWindow,n.j.D(n.i,"resize",t))}),this.j.D(e,"leavepictureinpicture",function(){n.i&&n.j.Ja(n.i,"resize",t),n.i=null})},h.setCmsdManager=function(e){this.C=e},h.configure=function(e){this.g=e,this.m&&this.g&&this.m.configure(this.g.advanced)};function pd(e){if(!e.I){var t=e.m;if(!(t.g>=t.i))return;e.I=!0,e.u-=1e3*(e.g.switchInterval-e.g.minTimeToSwitch)}Date.now()-e.u<1e3*e.g.switchInterval||(t=e.chooseVariant(),e.getBandwidthEstimate(),t&&e.G(t,e.g.clearBufferSwitch,e.g.safeMarginSwitch))}function hd(e,t,n,i,r){if(e.C){var l=e.C.Ug();l&&(n=n.filter(function(c){return c.bandwidth&&l?c.bandwidth<=l:!0}))}return t&&(n=n.filter(function(c){return zo(c,t,{width:r,height:i})})),n.sort(function(c,f){return c.bandwidth-f.bandwidth})}function yd(e){var t=[];e=b(e);for(var n=e.next();!n.done;n=e.next())(n=n.value.video)&&n.height&&n.width&&t.push({height:n.height,width:n.width});return t.sort(function(i,r){return i.width-r.width})}Pe("shaka.abr.SimpleAbrManager",en),en.prototype.configure=en.prototype.configure,en.prototype.setCmsdManager=en.prototype.setCmsdManager,en.prototype.setMediaElement=en.prototype.setMediaElement,en.prototype.playbackRateChanged=en.prototype.playbackRateChanged,en.prototype.setVariants=en.prototype.setVariants,en.prototype.getBandwidthEstimate=en.prototype.getBandwidthEstimate,en.prototype.trySuggestStreams=en.prototype.trySuggestStreams,en.prototype.segmentDownloaded=en.prototype.segmentDownloaded,en.prototype.disable=en.prototype.disable,en.prototype.enable=en.prototype.enable,en.prototype.chooseVariant=en.prototype.chooseVariant,en.prototype.init=en.prototype.init,en.prototype.release=en.prototype.release,en.prototype.stop=en.prototype.stop;var jg=1;Pe("shaka.config.CrossBoundaryStrategy",{KEEP:"keep",RESET:"reset",RESET_TO_ENCRYPTED:"reset_to_encrypted",RESET_ON_ENCRYPTION_CHANGE:"RESET_ON_ENCRYPTION_CHANGE"});function Es(e,t){var n=Br();this.l=e.maxAttempts==null?n.maxAttempts:e.maxAttempts,this.j=e.baseDelay==null?n.baseDelay:e.baseDelay,this.o=e.fuzzFactor==null?n.fuzzFactor:e.fuzzFactor,this.m=e.backoffFactor==null?n.backoffFactor:e.backoffFactor,this.g=0,this.h=this.j,(this.i=t===void 0?!1:t)&&(this.g=1)}function gh(e){var t,n;return z(function(i){if(i.g==1){if(e.g>=e.l)if(e.i)e.g=1,e.h=e.j;else throw new Y(2,7,1010);return t=e.g,e.g++,t==0?i.return():(n=e.h*(1+(2*Math.random()-1)*e.o),_(i,new Promise(function(r){new dt(r).da(n/1e3)}),2))}e.h*=e.m,se(i)})}function Br(){return{maxAttempts:2,baseDelay:1e3,backoffFactor:2,fuzzFactor:.5,timeout:3e4,stallTimeout:5e3,connectionTimeout:1e4}}function kt(){var e,t,n=new Promise(function(i,r){e=i,t=r});return n.resolve=e,n.reject=t,n}kt.prototype.resolve=function(){},kt.prototype.reject=function(){};function yn(e,t){this.promise=e,this.i=t,this.g=null}function _l(e){return new yn(Promise.reject(e),function(){return Promise.resolve()})}function Xo(){var e=Promise.reject(new Y(2,7,7001));return e.catch(function(){}),new yn(e,function(){return Promise.resolve()})}function Cr(e){return new yn(Promise.resolve(e),function(){return Promise.resolve()})}function As(e){return new yn(e,function(){return e.catch(function(){})})}yn.prototype.abort=function(){return this.g||(this.g=this.i()),this.g};function gd(e){return new yn(Promise.all(e.map(function(t){return t.promise})),function(){return Promise.all(e.map(function(t){return t.abort()}))})}yn.prototype.finally=function(e){return this.promise.then(function(){return e(!0)},function(){return e(!1)}),this},yn.prototype.Ha=function(e,t){function n(f){return function(y){if(r.g&&f)l.reject(c);else{var m=f?e:t;m?i=mh(m,y,l):(f?l.resolve:l.reject)(y)}}}function i(){return l.reject(c),r.abort()}var r=this,l=new kt;l.catch(function(){});var c=new Y(2,7,7001);return this.promise.then(n(!0),n(!1)),new yn(l,function(){return i()})};function mh(e,t,n){try{var i=e(t);return i&&i.promise&&i.abort?(n.resolve(i.promise),function(){return i.abort()}):(n.resolve(i),function(){return Promise.resolve(i).then(function(){},function(){})})}catch(r){return n.reject(r),function(){return Promise.resolve()}}}v.Object.defineProperties(yn.prototype,{aborted:{configurable:!0,enumerable:!0,get:function(){return this.g!==null}}}),Pe("shaka.util.AbortableOperation",yn),yn.prototype.chain=yn.prototype.Ha,yn.prototype.finally=yn.prototype.finally,yn.all=gd,yn.prototype.abort=yn.prototype.abort,yn.notAbortable=As,yn.completed=Cr,yn.aborted=Xo,yn.failed=_l;function ke(e,t){if(t)if(t instanceof Map)for(var n=b(t.keys()),i=n.next();!i.done;i=n.next())i=i.value,Object.defineProperty(this,i,{value:t.get(i),writable:!0,enumerable:!0});else for(n in t)Object.defineProperty(this,n,{value:t[n],writable:!0,enumerable:!0});this.defaultPrevented=this.cancelable=this.bubbles=!1,this.timeStamp=w.performance&&w.performance.now?w.performance.now():Date.now(),this.type=e,this.isTrusted=!1,this.target=this.currentTarget=null,this.g=!1}function Cs(e){var t=new ke(e.type),n;for(n in e)Object.defineProperty(t,n,{value:e[n],writable:!0,enumerable:!0});return t}ke.prototype.preventDefault=function(){this.cancelable&&(this.defaultPrevented=!0)},ke.prototype.stopImmediatePropagation=function(){this.g=!0},ke.prototype.stopPropagation=function(){},Pe("shaka.util.FakeEvent",ke);var zc={Oj:"abrstatuschanged",Pj:"adaptation",Qj:"audiotrackchanged",Rj:"audiotrackschanged",Sj:"boundarycrossed",Tj:"buffering",Uj:"complete",Vj:"downloadcompleted",Wj:"downloadfailed",Xj:"downloadheadersreceived",Yj:"drmsessionupdate",$j:"emsg",uk:"prft",Error:"error",ak:"expirationupdated",bk:"firstquartile",ck:"gapjumped",fk:"keystatuschanged",jk:"loaded",kk:"loading",mk:"manifestparsed",nk:"manifestupdated",pk:"mediaqualitychanged",qk:"mediasourcerecovered",Metadata:"metadata",rk:"midpoint",sk:"nospatialvideoinfo",tk:"onstatechange",vk:"ratechange",xk:"segmentappended",yk:"sessiondata",zk:"spatialvideoinfo",Ak:"stalldetected",Bk:"started",Ck:"statechanged",Dk:"streaming",Ek:"textchanged",Fk:"texttrackvisibility",Gk:"thirdquartile",Hk:"timelineregionadded",Ik:"timelineregionenter",Jk:"timelineregionexit",Kk:"trackschanged",Mk:"unloading",Ok:"variantchanged"};function Ut(){this.Ea=new ea,this.Ge=this}Ut.prototype.addEventListener=function(e,t){this.Ea&&this.Ea.push(e,t)},Ut.prototype.removeEventListener=function(e,t){this.Ea&&this.Ea.remove(e,t)},Ut.prototype.dispatchEvent=function(e){if(!this.Ea)return!0;var t=this.Ea.get(e.type)||[],n=this.Ea.get("All");for(n&&(t=t.concat(n)),t=b(t),n=t.next();!n.done;n=t.next()){n=n.value,e.target=this.Ge,e.currentTarget=this.Ge;try{n.handleEvent?n.handleEvent(e):n.call(this,e)}catch{}if(e.g)break}return e.defaultPrevented},Ut.prototype.release=function(){this.Ea=null};function yo(){this.g=[]}function Yo(e,t){e.g.push(t.finally(function(){_r(e.g,t)}))}yo.prototype.destroy=function(){for(var e=[],t=b(this.g),n=t.next();!n.done;n=t.next())n=n.value,n.promise.catch(function(){}),e.push(n.abort());return this.g=[],Promise.all(e)};function Xt(e,t,n,i,r,l,c){Ut.call(this),this.i=!1,this.u=new yo,this.g=new Set,this.h=new Set,this.m=e||null,this.l=t||null,this.C=n||null,this.F=i||null,this.G=r||null,this.I=l||null,this.H=c||null,this.A=this.B=!1,this.o=16e3,this.j=new Map}ot(Xt,Ut),h=Xt.prototype,h.kg=function(e){this.B=e},h.lg=function(e){this.A=e};function go(e,t,n,i){i=i===void 0?!1:i,n=n||bs;var r=Ul.get(e);(!r||n>=r.priority)&&Ul.set(e,{priority:n,se:t,ij:i})}function md(e,t){for(var n=b(e.g),i=n.next();!i.done;i=n.next())t.g.add(i.value);for(e=b(e.h),n=e.next();!n.done;n=e.next())t.h.add(n.value)}h.lj=function(e){this.g.add(e)},h.Hj=function(e){this.g.delete(e)},h.$h=function(){this.g.clear()},h.mj=function(e){this.h.add(e)},h.Ij=function(e){this.h.delete(e)},h.ai=function(){this.h.clear()},h.Hg=function(){this.j.clear()};function cn(e,t,n){return{uris:e,method:"GET",body:null,headers:{},allowCrossSiteCredentials:!1,retryParameters:t,licenseRequestType:null,sessionId:null,drmInfo:null,initData:null,initDataType:null,streamDataCallback:n===void 0?null:n}}h.destroy=function(){return this.i=!0,this.g.clear(),this.h.clear(),this.j.clear(),Ut.prototype.release.call(this),this.u.destroy()},h.request=function(e,t,n){var i=this,r=new ou;if(this.i){var l=Promise.reject(new Y(2,7,7001));return l.catch(function(){}),new Wo(l,function(){return Promise.resolve()},r)}t.method=t.method||"GET",t.headers=t.headers||{},t.retryParameters=t.retryParameters?so(t.retryParameters):Br(),t.uris=so(t.uris),l=Vt(this,e,t,n);var c=l.Ha(function(){return gn(i,e,t,n,new Es(t.retryParameters,!1),0,null,r)}),f=c.Ha(function(D){return ui(i,e,D,n)}),y=Date.now(),m=0;l.promise.then(function(){m=Date.now()-y},function(){});var T=0;c.promise.then(function(){T=Date.now()},function(){});var x=f.Ha(function(D){var R=Date.now()-T,N=D.response;return N.timeMs+=m,N.timeMs+=R,D.Oi||!i.m||N.fromCache||t.method=="HEAD"||e!=Wi||i.m(N.timeMs,N.data.byteLength,Gc(n)),i.H&&i.H(e,N,n),N},function(D){throw D&&(D.severity=2),D});return l=new Wo(x.promise,function(){return x.abort()},r),Yo(this.u,l),l};function Vt(e,t,n,i){function r(f){l=l.Ha(function(){return n.body&&(n.body=Sr(n.body)),f(t,n,i)})}var l=Cr(void 0);e.G&&r(e.G),e=b(e.g);for(var c=e.next();!c.done;c=e.next())r(c.value);return l.Ha(void 0,function(f){throw f instanceof Y&&f.code==7001?f:new Y(2,1,1006,f)})}function gn(e,t,n,i,r,l,c,f){e.B&&(n.uris[l]=n.uris[l].replace("https://","http://")),e.A&&(n.uris[l]=n.uris[l].replace("http://","https://")),0<l&&e.I&&e.I(t,i,n.uris[l],n.uris[l-1]);var y=new pn(n.uris[l]),m=y.Kb,T=!1;m||(m=location.protocol,m=m.slice(0,-1),Ec(y,m),n.uris[l]=y.toString()),m=m.toLowerCase();var x=(m=Ul.get(m))?m.se:null;if(!x)return _l(new Y(2,1,1e3,y));var D=m.ij;(y=e.j.get(y.nb))&&(n.headers["common-access-token"]=y);var R=null,N=null,U=!1,L=!1,j;return As(gh(r)).Ha(function(){if(e.i)return Xo();j=Date.now();var V=0;n.requestStartTime=Date.now();var X=x(n.uris[l],n,t,function(q,K,W){R&&R.stop(),N&&N.da(Z/1e3),e.m&&t==Wi&&(V++,n.packetNumber=V,e.m(q,K,Gc(i),n),T=!0,f.g=W)},function(q){L=!0,n.timeToFirstByte=Date.now()-n.requestStartTime,e.l&&e.l(q,n,t)},{minBytesForProgressEvents:e.o});if(!D)return X;var G=n.retryParameters.connectionTimeout;G&&(R=new dt(function(){U=!0,X.abort()}),R.da(G/1e3));var Z=n.retryParameters.stallTimeout;return Z&&(N=new dt(function(){U=!0,X.abort()})),X}).Ha(function(V){R&&R.stop(),N&&N.stop(),V.timeMs==null&&(V.timeMs=Date.now()-j);var X=V.headers["common-access-token"];if(X){var G=new pn(V.uri);e.j.set(G.nb,X)}return X={response:V,Oi:T},!L&&e.l&&e.l(V.headers,n,t),e.C&&e.C(n,V),X},function(V){if(R&&R.stop(),N&&N.stop(),e.F){var X=null,G=0;V instanceof Y&&(X=V,V.code==1001&&(G=V.data[1])),e.F(n,X,G,U)}if(e.i)return Xo();if(U&&(V=new Y(1,1,1003,n.uris[l],t)),V instanceof Y){if(V.code==7001)throw V;if(V.code==1010)throw c;if(V.severity==1){if(X=new Map().set("error",V),X=new ke("retry",X),X.cancelable=!0,e.dispatchEvent(X),X.defaultPrevented)throw V;return l=(l+1)%n.uris.length,gn(e,t,n,i,r,l,V,f)}}throw V})}function ui(e,t,n,i){var r=Cr(void 0);e=b(e.h);for(var l=e.next(),c={};!l.done;c={ph:void 0},l=e.next())c.ph=l.value,r=r.Ha(function(f){return function(){var y=n.response;return y.data&&(y.data=Sr(y.data)),(0,f.ph)(t,y,i)}}(c));return r.Ha(function(){return n},function(f){var y=2;if(f instanceof Y){if(f.code==7001)throw f;y=f.severity}throw new Y(y,1,1007,f)})}function Gc(e){if(e){var t=e.segment;if(e=e.stream,t&&e&&e.fastSwitching&&t.o)return!1}return!0}Pe("shaka.net.NetworkingEngine",Xt),Xt.prototype.request=Xt.prototype.request,Xt.prototype.destroy=Xt.prototype.destroy,Xt.makeRequest=cn,Xt.defaultRetryParameters=function(){return Br()},Xt.prototype.clearCommonAccessTokenMap=Xt.prototype.Hg,Xt.prototype.clearAllResponseFilters=Xt.prototype.ai,Xt.prototype.unregisterResponseFilter=Xt.prototype.Ij,Xt.prototype.registerResponseFilter=Xt.prototype.mj,Xt.prototype.clearAllRequestFilters=Xt.prototype.$h,Xt.prototype.unregisterRequestFilter=Xt.prototype.Hj,Xt.prototype.registerRequestFilter=Xt.prototype.lj,Xt.unregisterScheme=function(e){Ul.delete(e)},Xt.registerScheme=go,Xt.prototype.setForceHTTPS=Xt.prototype.lg,Xt.prototype.setForceHTTP=Xt.prototype.kg;function ou(){this.g=0}Xt.NumBytesRemainingClass=ou;function Wo(e,t,n){yn.call(this,e,t),this.h=n}ot(Wo,yn),Xt.PendingRequest=Wo;var Wi=1;Xt.RequestType={MANIFEST:0,SEGMENT:Wi,LICENSE:2,APP:3,TIMING:4,SERVER_CERTIFICATE:5,KEY:6,ADS:7,CONTENT_STEERING:8},Xt.AdvancedRequestType={INIT_SEGMENT:0,MEDIA_SEGMENT:1,MEDIA_PLAYLIST:2,MASTER_PLAYLIST:3,MPD:4,MSS:5,MPD_PATCH:6,MEDIATAILOR_SESSION_INFO:7,MEDIATAILOR_TRACKING_INFO:8,MEDIATAILOR_STATIC_RESOURCE:9,MEDIATAILOR_TRACKING_EVENT:10,INTERSTITIAL_ASSET_LIST:11,INTERSTITIAL_AD_URL:12};var bs=3;Xt.PluginPriority={FALLBACK:1,PREFERRED:2,APPLICATION:bs};var Ul=new Map;function Is(e){this.g=!1,this.h=new kt,this.i=e}Is.prototype.destroy=function(){var e=this;return this.g?this.h:(this.g=!0,this.i().then(function(){e.h.resolve()},function(){e.h.resolve()}))};function ct(e,t){if(e.g)throw t instanceof Y&&t.code==7003?t:new Y(2,7,7003,t)}function Xc(e,t){var n=[];e=b(e);for(var i=e.next();!i.done;i=e.next())n.push(t(i.value));return n}function vh(e,t){e=b(e);for(var n=e.next();!n.done;n=e.next())if(!t(n.value))return!1;return!0}function ma(e){for(var t=new Map,n=b(Object.keys(e)),i=n.next();!i.done;i=n.next())i=i.value,t.set(i,e[i]);return t}function vd(e){var t={};return e.forEach(function(n,i){t[i]=n}),t}function Zt(e,t){this.h=Ei(e),this.i=t==Sd,this.g=0}h=Zt.prototype,h.ta=function(){return this.g<this.h.byteLength},h.Ba=function(){return this.g},h.getLength=function(){return this.h.byteLength},h.X=function(){try{var e=this.h.getUint8(this.g);return this.g+=1,e}catch{throw mo()}},h.na=function(){try{var e=this.h.getUint16(this.g,this.i);return this.g+=2,e}catch{throw mo()}},h.S=function(){try{var e=this.h.getUint32(this.g,this.i);return this.g+=4,e}catch{throw mo()}},h.$f=function(){try{var e=this.h.getInt32(this.g,this.i);return this.g+=4,e}catch{throw mo()}},h.bd=function(){try{if(this.i)var e=this.h.getUint32(this.g,!0),t=this.h.getUint32(this.g+4,!0);else t=this.h.getUint32(this.g,!1),e=this.h.getUint32(this.g+4,!1)}catch{throw mo()}if(2097151<t)throw new Y(2,3,3001);return this.g+=8,t*Math.pow(2,32)+e},h.Cb=function(e){if(this.g+e>this.h.byteLength)throw mo();var t=Ze(this.h,this.g,e);return this.g+=e,t},h.skip=function(e){if(this.g+e>this.h.byteLength)throw mo();this.g+=e},h.qh=function(e){if(this.g<e)throw mo();this.g-=e},h.seek=function(e){if(0>e||e>this.h.byteLength)throw mo();this.g=e},h.Cc=function(){for(var e=this.g;this.ta()&&this.h.getUint8(this.g)!=0;)this.g+=1;return e=Ze(this.h,e,this.g-e),this.g+=1,nn(e)};function mo(){return new Y(2,3,3e3)}Pe("shaka.util.DataViewReader",Zt),Zt.prototype.readTerminatedString=Zt.prototype.Cc,Zt.prototype.seek=Zt.prototype.seek,Zt.prototype.rewind=Zt.prototype.qh,Zt.prototype.skip=Zt.prototype.skip,Zt.prototype.readBytes=Zt.prototype.Cb,Zt.prototype.readUint64=Zt.prototype.bd,Zt.prototype.readInt32=Zt.prototype.$f,Zt.prototype.readUint32=Zt.prototype.S,Zt.prototype.readUint16=Zt.prototype.na,Zt.prototype.readUint8=Zt.prototype.X,Zt.prototype.getLength=Zt.prototype.getLength,Zt.prototype.getPosition=Zt.prototype.Ba,Zt.prototype.hasMoreData=Zt.prototype.ta;var Sd=1;Zt.Endianness={BIG_ENDIAN:0,LITTLE_ENDIAN:Sd};function jt(){this.i=new Map,this.h=new Map,this.g=!1}h=jt.prototype,h.box=function(e,t){return e=wd(e),this.i.set(e,Sh),this.h.set(e,t),this},h.R=function(e,t){return e=wd(e),this.i.set(e,Td),this.h.set(e,t),this},h.stop=function(){this.g=!0},h.parse=function(e,t,n){for(e=new Zt(e,0),this.g=!1;e.ta()&&!this.g;)this.Yc(0,e,t,n)},h.Yc=function(e,t,n,i){var r=t.Ba();if(i&&r+8>t.getLength())this.g=!0;else{var l=t.S(),c=t.S(),f=Vr(c),y=!1;switch(l){case 0:l=t.getLength()-r;break;case 1:if(i&&t.Ba()+8>t.getLength()){this.g=!0;return}l=t.bd(),y=!0}var m=this.h.get(c);if(m){var T=null,x=null;if(this.i.get(c)==Td){if(i&&t.Ba()+4>t.getLength()){this.g=!0;return}x=t.S(),T=x>>>24,x&=16777215}c=r+l,n&&c>t.getLength()&&(c=t.getLength()),i&&c>t.getLength()?this.g=!0:(i=c-t.Ba(),t=0<i?t.Cb(i):new Uint8Array(0),t=new Zt(t,0),m({name:f,parser:this,partialOkay:n||!1,version:T,flags:x,reader:t,size:l,start:r+e,has64BitSize:y}))}else t.skip(Math.min(r+l-t.Ba(),t.getLength()-t.Ba()))}};function $e(e){for(var t=vo(e);e.reader.ta()&&!e.parser.g;)e.parser.Yc(e.start+t,e.reader,e.partialOkay)}function bn(e){for(var t=vo(e),n=e.reader.S(),i=0;i<n&&(e.parser.Yc(e.start+t,e.reader,e.partialOkay),!e.parser.g);i++);}function Mi(e){var t=vo(e);for(e.reader.skip(78);e.reader.ta()&&!e.parser.g;)e.parser.Yc(e.start+t,e.reader,e.partialOkay)}function lu(e){var t=vo(e);e.reader.skip(8);var n=e.reader.na();for(e.reader.skip(6),n==2?e.reader.skip(48):e.reader.skip(12),n==1&&e.reader.skip(16);e.reader.ta()&&!e.parser.g;)e.parser.Yc(e.start+t,e.reader,e.partialOkay)}function jl(e){return function(t){e(t.reader.Cb(t.reader.getLength()-t.reader.Ba()))}}function wd(e){var t=0;e=b(e);for(var n=e.next();!n.done;n=e.next())t=t<<8|n.value.charCodeAt(0);return t}function Vr(e){return String.fromCharCode(e>>24&255,e>>16&255,e>>8&255,e&255)}function vo(e){return 8+(e.has64BitSize?8:0)+(e.flags!=null?4:0)}Pe("shaka.util.Mp4Parser",jt),jt.headerSize=vo,jt.typeToString=Vr,jt.allData=jl,jt.audioSampleEntry=lu,jt.visualSampleEntry=Mi,jt.sampleDescription=bn,jt.children=$e,jt.prototype.parseNext=jt.prototype.Yc,jt.prototype.parse=jt.prototype.parse,jt.prototype.stop=jt.prototype.stop,jt.prototype.fullBox=jt.prototype.R,jt.prototype.box=jt.prototype.box;var Sh=0,Td=1;function xd(e){var t=this;this.g=[],this.h=[],this.data=[],new jt().box("moov",$e).box("moof",$e).R("pssh",function(n){if(!(1<n.version)){var i=Ze(n.reader.h,-12,n.size);if(t.data.push(i),t.g.push(wr(n.reader.Cb(16))),0<n.version){i=n.reader.S();for(var r=0;r<i;r++){var l=wr(n.reader.Cb(16));t.h.push(l)}}}}).parse(e)}function Yc(e,t,n,i){var r=e.length,l=t.length+16+r;0<i&&(l+=4+16*n.size);var c=new Uint8Array(l),f=Ei(c),y=0;if(f.setUint32(y,l),y+=4,f.setUint32(y,1886614376),y+=4,1>i?f.setUint32(y,0):f.setUint32(y,16777216),y+=4,c.set(t,y),y+=t.length,0<i)for(f.setUint32(y,n.size),y+=4,t=b(n),n=t.next();!n.done;n=t.next())n=la(n.value),c.set(n,y),y+=n.length;return f.setUint32(y,r),c.set(e,y+4),c}function Wc(e){var t=this;this.C=e,this.j=this.A=null,this.ka=this.ea=!1,this.H=0,this.h=null,this.o=new vt,this.i=new Map,this.T=[],this.B=new Map,this.K=!1,this.m=new kt,this.g=null,this.u=function(n){n.severity==2&&t.m.reject(n),e.onError(n)},this.Z=new Map,this.fa=new Map,this.L=new dt(function(){return Yg(t)}),this.O=!1,this.M=[],this.W=!1,this.I=new dt(function(){Qg(t)}),this.m.catch(function(){}),this.l=new Is(function(){return Bg(t)}),this.$=!1,this.F=this.G=null,this.P=function(){return!1}}h=Wc.prototype,h.destroy=function(){return this.l.destroy()};function Bg(e){return z(function(t){switch(t.g){case 1:return e.o.release(),e.o=null,e.m.reject(),e.I.stop(),e.I=null,e.L.stop(),e.L=null,_(t,Rs(e),2);case 2:if(!e.j){t.s(3);break}return pe(t,4),_(t,e.j.setMediaKeys(null),6);case 6:Ue(t,5);break;case 4:Me(t);case 5:e.j=null;case 3:e.h=null,e.A=null,e.B=new Map,e.g=null,e.u=function(){},e.C=null,e.$=!1,e.G=null,se(t)}})}h.configure=function(e,t){this.g=e,t&&(this.P=t),this.I&&this.I.ua(this.g.updateExpirationTime)};function Vg(e,t,n){return e.ka=!0,e.B=new Map,e.O=n,xh(e,t,!1)}function wh(e,t,n,i){i=i===void 0?!0:i,e.B=new Map,n=b(n);for(var r=n.next();!r.done;r=n.next())e.B.set(r.value,{initData:null,initDataType:null});for(n=b(e.g.persistentSessionsMetadata),r=n.next();!r.done;r=n.next())r=r.value,e.B.set(r.sessionId,{initData:r.initData,initDataType:r.initDataType});return e.O=0<e.B.size,xh(e,t,i)}function Th(e,t,n,i,r,l){var c=new Map;return r={audioCapabilities:r,videoCapabilities:l,distinctiveIdentifier:"optional",persistentState:"required",sessionTypes:["persistent-license"],label:t},r.drmInfos=[{keySystem:t,licenseServerUri:n,distinctiveIdentifierRequired:!1,persistentStateRequired:!0,audioRobustness:"",videoRobustness:"",serverCertificate:i,serverCertificateUri:"",initData:null,keyIds:null}],c.set(t,r),Ah(e,c,[])}function xh(e,t,n){var i,r,l,c,f,y,m,T,x,D,R,N,U,L,j,V,X,G,Z,q;return z(function(K){if(K.g==1){for(Oh(e.g.clearKeys,t),i=t.some(function(W){return!!(W.video&&W.video.drmInfos.length||W.audio&&W.audio.drmInfos.length)}),!i&&n&&(r=ma(e.g.servers),Zg(t,r)),l=new Set,c=b(t),f=c.next();!f.done;f=c.next())for(y=f.value,m=Dh(y),T=b(m),x=T.next();!x.done;x=T.next())D=x.value,l.add(D);for(R=b(l),N=R.next();!N.done;N=R.next())U=N.value,$g(U,ma(e.g.servers),ma(e.g.advanced||{}),e.g.keySystemsMapping);for(L=function(W,Q){var oe=[];W=b(W);for(var ne=W.next();!ne.done;ne=W.next()){ne=ne.value;var re=ne[Q]||e.g.advanced&&e.g.advanced[ne.keySystem]&&e.g.advanced[ne.keySystem][Q]||"",le;if((le=re=="")&&(le=(le=ne.keySystem)?!!le.match(/^com\.widevine\.alpha/):!1),le&&(Q=="audioRobustness"?re=[e.g.defaultAudioRobustnessForWidevine]:Q=="videoRobustness"&&(re=[e.g.defaultVideoRobustnessForWidevine])),typeof re=="string")oe.push(ne);else if(Array.isArray(re))for(re.length===0&&(re=[""]),re=b(re),le=re.next();!le.done;le=re.next()){var fe={};oe.push(Object.assign({},ne,(fe[Q]=le.value,fe)))}}return oe},j=new Set,V=b(t),X=V.next();!X.done;X=V.next())G=X.value,G.video&&!j.has(G.video)&&(G.video.drmInfos=L(G.video.drmInfos,"videoRobustness"),G.video.drmInfos=L(G.video.drmInfos,"audioRobustness"),j.add(G.video)),G.audio&&!j.has(G.audio)&&(G.audio.drmInfos=L(G.audio.drmInfos,"videoRobustness"),G.audio.drmInfos=L(G.audio.drmInfos,"audioRobustness"),j.add(G.audio));return j.clear(),_(K,Kc(t,e.O,e.$,e.g.preferredKeySystems),2)}return ct(e.l),Z=i||Object.keys(e.g.servers).length,Z?(q=Ah(e,void 0,t),K.return(i?q:q.catch(function(){}))):(e.ea=!0,K.return(Promise.resolve()))})}function Hg(e){var t;return z(function(n){switch(n.g){case 1:if(e.j.mediaKeys)return n.return();if(!e.G){n.s(2);break}return _(n,e.G,3);case 3:return ct(e.l),n.return();case 2:return pe(n,4),e.G=e.j.setMediaKeys(e.A),_(n,e.G,6);case 6:Ue(n,5);break;case 4:t=Me(n),e.u(new Y(2,6,6003,t.message));case 5:ct(e.l),se(n)}})}function Kg(e,t){return z(function(n){if(n.g==1)return _(n,Hg(e),2);Ds(e,t.initDataType,Ze(t.initData)),se(n)})}h.Lb=function(e){var t=this;return z(function(n){if(n.g==1)return t.j===e?n.return():t.A?(t.j=e,t.o.ma(t.j,"play",function(){for(var i=b(t.M),r=i.next();!r.done;r=i.next())Os(t,r.value);t.W=!0,t.M=[]}),t.j.remote?(t.o.D(t.j.remote,"connect",function(){return Rs(t)}),t.o.D(t.j.remote,"connecting",function(){return Rs(t)}),t.o.D(t.j.remote,"disconnect",function(){return Rs(t)})):"webkitCurrentPlaybackTargetIsWireless"in t.j&&t.o.D(t.j,"webkitcurrentplaybacktargetiswirelesschanged",function(){return Rs(t)}),t.F=t.h&&t.h.initData.find(function(i){return 0<i.initData.length})||null,t.F||t.h.keySystem!=="com.apple.fps"||t.B.size?_(n,Hg(t),2):n.s(2)):(t.o.ma(e,"encrypted",function(){t.u(new Y(2,6,6010))}),n.return());Ed(t).catch(function(){}),t.F||t.B.size||t.g.parseInbandPsshEnabled||t.o.D(t.j,"encrypted",function(i){return Kg(t,i)}),se(n)})};function qg(e){var t,n,i,r,l;return z(function(c){switch(c.g){case 1:if(!e.A||!e.h)return c.return();if(!e.h.serverCertificateUri||e.h.serverCertificate&&e.h.serverCertificate.length){c.s(2);break}return t=cn([e.h.serverCertificateUri],e.g.retryParameters),pe(c,3),n=e.C.Xb.request(5,t,{isPreload:e.P()}),_(c,n.promise,5);case 5:i=c.h,e.h.serverCertificate=Ze(i.data),Ue(c,4);break;case 3:throw r=Me(c),new Y(2,6,6017,r);case 4:if(e.l.g)return c.return();case 2:return!e.h.serverCertificate||!e.h.serverCertificate.length?c.return():(pe(c,6),_(c,e.A.setServerCertificate(e.h.serverCertificate),8));case 8:Ue(c,0);break;case 6:throw l=Me(c),new Y(2,6,6004,l.message)}})}function Fg(e,t){var n,i,r;return z(function(l){if(l.g==1)return _(l,au(e,t,{initData:null,initDataType:null}),2);if(l.g!=3)return n=l.h,n?(i=[],(r=e.i.get(n))&&(r.ub=new kt,i.push(r.ub)),i.push(n.remove()),_(l,Promise.all(i),3)):l.return();e.i.delete(n),se(l)})}function Ed(e){var t,n,i,r,l;return z(function(c){if(c.g==1)return e.B.size?(e.B.forEach(function(f,y){au(e,y,f)}),_(c,e.m,3)):c.s(2);if(c.g!=2){if(t=e.h&&e.h.keyIds||new Set([]),0<t.size&&Jg(e))return c.return(e.m);e.K=!1,e.m=new kt,e.m.catch(function(){})}for(n=(e.h?e.h.initData:[])||[],i=b(n),r=i.next();!r.done;r=i.next())l=r.value,Ds(e,l.initDataType,l.initData);return uu(e)&&e.m.resolve(),c.return(e.m)})}function Ds(e,t,n){if(n.length){if(e.g.ignoreDuplicateInitData){var i=e.i.values();i=b(i);for(var r=i.next();!r.done;r=i.next())if(dl(n,r.value.initData))return;var l=!1;if(e.B.forEach(function(c){!l&&dl(n,c.initData)&&(l=!0)}),l)return}e.K=!0,0<e.i.size&&uu(e)&&(e.m.resolve(),e.K=!1,e.m=new kt,e.m.catch(function(){})),Ad(e,t,n,e.h.sessionType)}}function Eh(e){return e=e.i.keys(),e=Xc(e,function(t){return t.sessionId}),Array.from(e)}h.Gf=function(){var e=this,t=this.i.keys();return t=Xc(t,function(n){var i=e.i.get(n);return{sessionId:n.sessionId,sessionType:i.type,initData:i.initData,initDataType:i.initDataType}}),Array.from(t)},h.pd=function(){var e=1/0,t=this.i.keys();t=b(t);for(var n=t.next();!n.done;n=t.next())n=n.value,isNaN(n.expiration)||(e=Math.min(e,n.expiration));return e},h.Yd=function(){return vd(this.fa)};function Ah(e,t,n){var i,r,l,c,f,y,m,T;return z(function(x){switch(x.g){case 1:if(i=new Map,n.length){r=zg(e,n,i),x.s(2);break}return _(x,Gg(e,t),3);case 3:r=x.h;case 2:if(l=r,!l)throw navigator.requestMediaKeySystemAccess?new Y(2,6,6001):new Y(2,6,6020);if(ct(e.l),pe(x,4),l.getConfiguration(),c=e.g.keySystemsMapping[l.keySystem]||l.keySystem,n.length){var D=c,R=i.get(c),N=[],U=[],L=[],j=[],V=[],X=new Set,G=new Set;Cd(R,N,U,j,L,V,X,G);var Z=e.O?"persistent-license":"temporary";for(D={keySystem:D,encryptionScheme:N[0],licenseServerUri:U[0],distinctiveIdentifierRequired:R[0].distinctiveIdentifierRequired,persistentStateRequired:R[0].persistentStateRequired,sessionType:R[0].sessionType||Z,audioRobustness:R[0].audioRobustness||"",videoRobustness:R[0].videoRobustness||"",serverCertificate:j[0],serverCertificateUri:L[0],initData:V,keyIds:X},0<G.size&&(D.keySystemUris=G),R=b(R),G=R.next();!G.done;G=R.next())G=G.value,G.distinctiveIdentifierRequired&&(D.distinctiveIdentifierRequired=G.distinctiveIdentifierRequired),G.persistentStateRequired&&(D.persistentStateRequired=G.persistentStateRequired);R=D}else R=c,G=t.get(c),D=[],N=[],U=[],L=[],j=[],V=new Set,Cd(G.drmInfos,D,N,L,U,j,V),R={keySystem:R,encryptionScheme:D[0],licenseServerUri:N[0],distinctiveIdentifierRequired:G.distinctiveIdentifier=="required",persistentStateRequired:G.persistentState=="required",sessionType:G.sessionTypes[0]||"temporary",audioRobustness:(G.audioCapabilities?G.audioCapabilities[0].robustness:"")||"",videoRobustness:(G.videoCapabilities?G.videoCapabilities[0].robustness:"")||"",serverCertificate:L[0],serverCertificateUri:U[0],initData:j,keyIds:V};if(e.h=R,!e.h.licenseServerUri)throw new Y(2,6,6012,e.h.keySystem);return _(x,l.createMediaKeys(),6);case 6:if(f=x.h,ct(e.l),e.A=f,!(e.g.minHdcpVersion!=""&&"getStatusForPolicy"in e.A)){x.s(7);break}return pe(x,8),_(x,e.A.getStatusForPolicy({minHdcpVersion:e.g.minHdcpVersion}),10);case 10:if(y=x.h,y!="usable")throw new Y(2,6,6018);ct(e.l),Ue(x,7,4);break;case 8:throw m=Me(x,4),m instanceof Y?m:new Y(2,6,6019,m.message);case 7:return e.ea=!0,_(x,qg(e),11);case 11:ct(e.l),Ue(x,0);break;case 4:throw T=Me(x),ct(e.l,T),e.h=null,T instanceof Y?T:new Y(2,6,6002,T.message)}})}function zg(e,t,n){for(var i=b(t),r=i.next();!r.done;r=i.next()){r=b(Dh(r.value));for(var l=r.next();!l.done;l=r.next())l=l.value,n.has(l.keySystem)||n.set(l.keySystem,[]),n.get(l.keySystem).push(l)}if(n.size==1&&n.has(""))throw new Y(2,6,6e3);i=e.g.preferredKeySystems,i.length||(r=ma(e.g.servers),r.size==1&&(i=Array.from(r.keys()))),r=b(i);var c=r.next();for(l={};!c.done;l={nh:void 0},c=r.next()){l.nh=c.value,c=b(t);for(var f=c.next();!f.done;f=c.next())if(f=f.value.decodingInfos.find(function(x){return function(D){return D.supported&&D.keySystemAccess!=null&&D.keySystemAccess.keySystem==x.nh}}(l)))return f.keySystemAccess}for(r=b([!0,!1]),l=r.next();!l.done;l=r.next())for(l=l.value,c=b(t),f=c.next();!f.done;f=c.next()){f=b(f.value.decodingInfos);for(var y=f.next();!y.done;y=f.next())if(y=y.value,y.supported&&y.keySystemAccess){var m=y.keySystemAccess.keySystem;if(!i.includes(m)){var T=n.get(m);for(!T&&e.g.keySystemsMapping[m]&&(T=n.get(e.g.keySystemsMapping[m])),m=b(T),T=m.next();!T.done;T=m.next())if(!!T.value.licenseServerUri==l)return y.keySystemAccess}}}return null}function Gg(e,t){var n,i,r,l,c,f,y,m,T,x,D,R,N,U,L,j;return z(function(V){switch(V.g){case 1:if(t.size==1&&t.has(""))throw new Y(2,6,6e3);for(i=b(t.values()),r=i.next();!r.done;r=i.next())l=r.value,l.audioCapabilities.length==0&&delete l.audioCapabilities,l.videoCapabilities.length==0&&delete l.videoCapabilities;c=b(e.g.preferredKeySystems),f=c.next();case 2:if(f.done){V.s(4);break}if(y=f.value,!t.has(y)){V.s(3);break}return m=t.get(y),pe(V,6),_(V,navigator.requestMediaKeySystemAccess(y,[m]),8);case 8:return n=V.h,V.return(n);case 6:Me(V);case 7:ct(e.l);case 3:f=c.next(),V.s(2);break;case 4:T=b([!0,!1]),x=T.next();case 9:if(x.done){V.s(11);break}D=x.value,R=b(t.keys()),N=R.next();case 12:if(N.done){x=T.next(),V.s(9);break}if(U=N.value,L=t.get(U),j=L.drmInfos.some(function(X){return!!X.licenseServerUri}),j!=D){V.s(13);break}return pe(V,15),_(V,navigator.requestMediaKeySystemAccess(U,[L]),17);case 17:return n=V.h,V.return(n);case 15:Me(V);case 16:ct(e.l);case 13:N=R.next(),V.s(12);break;case 11:return V.return(n)}})}function Ch(e){uu(e)&&e.m.resolve()}function bh(e,t){new dt(function(){t.loaded=!0,Ch(e)}).da(kh)}function au(e,t,n){var i,r,l,c,f,y,m;return z(function(T){switch(T.g){case 1:try{i=e.A.createSession("persistent-license")}catch(x){return r=new Y(2,6,6005,x.message),e.u(r),T.return(Promise.reject(r))}return e.o.D(i,"message",function(x){e.j&&e.g.delayLicenseRequestUntilPlayed&&e.j.paused&&!e.W?e.M.push(x):Os(e,x)}),e.o.D(i,"keystatuseschange",function(x){return ks(e,x)}),l={initData:n.initData,initDataType:n.initDataType,loaded:!1,Vf:1/0,ub:null,type:"persistent-license"},e.i.set(i,l),pe(T,2),_(T,i.load(t),4);case 4:return c=T.h,ct(e.l),c||(e.i.delete(i),f=e.g.persistentSessionOnlinePlayback?1:2,e.u(new Y(f,6,6013)),l.loaded=!0),bh(e,l),Ch(e),T.return(i);case 2:y=Me(T),ct(e.l,y),e.i.delete(i),m=e.g.persistentSessionOnlinePlayback?1:2,e.u(new Y(m,6,6005,y.message)),l.loaded=!0,Ch(e);case 3:return T.return(Promise.resolve())}})}function Ad(e,t,n,i){try{var r=e.A.createSession(i)}catch(l){e.u(new Y(2,6,6005,l.message));return}e.o.D(r,"message",function(l){e.j&&e.g.delayLicenseRequestUntilPlayed&&e.j.paused&&!e.W?e.M.push(l):Os(e,l)}),e.o.D(r,"keystatuseschange",function(l){return ks(e,l)}),e.i.set(r,{initData:n,initDataType:t,loaded:!1,Vf:1/0,ub:null,type:i});try{n=e.g.initDataTransform(n,t,e.h)}catch(l){t=l,l instanceof Y||(t=new Y(2,6,6016,l)),e.u(t);return}e.g.logLicenseExchange&&Bo(n),r.generateRequest(t,n).catch(function(l){if(!e.l.g){e.i.delete(r);var c=l.errorCode;if(c&&c.systemCode){var f=c.systemCode;0>f&&(f+=Math.pow(2,32)),f="0x"+f.toString(16)}e.u(new Y(2,6,6006,l.message,l,f))}})}function Xg(e){return z(function(t){return t.g==1?e.K?_(t,e.m,3):t.s(0):_(t,Promise.all(e.T.map(function(n){return n.promise})),0)})}function Os(e,t){var n,i,r,l,c,f,y,m,T,x,D,R,N,U;z(function(L){switch(L.g){case 1:if(n=t.target,e.g.logLicenseExchange&&Bo(t.message),i=e.i.get(n),r=e.h.licenseServerUri,l=e.g.advanced[e.h.keySystem],t.messageType=="individualization-request"&&l&&l.individualizationServer&&(r=l.individualizationServer),c=cn([r],e.g.retryParameters),c.body=t.message,c.method="POST",c.licenseRequestType=t.messageType,c.sessionId=n.sessionId,c.drmInfo=e.h,i&&(c.initData=i.initData,c.initDataType=i.initDataType),l&&l.headers)for(f in l.headers)c.headers[f]=l.headers[f];if(e.h.keySystem==="org.w3.clearkey"){var j=c,V=e.h;try{var X=Nr(j.body);if(X){var G=JSON.parse(X);G.type||(G.type=V.sessionType,j.body=Pr(JSON.stringify(G)))}}catch{}}if(Jf(e.h.keySystem))if(j=gl(c.body,!0,!0),j.includes("PlayReadyKeyMessage")){for(j=Ya(j,"PlayReadyKeyMessage"),V=Ur(j,"HttpHeader"),V=b(V),X=V.next();!X.done;X=V.next())G=X.value,X=Ur(G,"name")[0],G=Ur(G,"value")[0],c.headers[In(X)]=In(G);j=Ur(j,"Challenge")[0],c.body=Fi(In(j))}else c.headers["Content-Type"]="text/xml; charset=utf-8";return y=Date.now(),pe(L,2),T=e.C.Xb.request(2,c,{isPreload:e.P()}),e.T.push(T),_(L,T.promise,4);case 4:m=L.h,_r(e.T,T),Ue(L,3);break;case 2:return x=Me(L),e.l.g||(D=new Y(2,6,6007,x),e.i.size==1?(e.u(D),i&&i.ub&&i.ub.reject(D)):(i&&i.ub&&i.ub.reject(D),e.i.delete(n),uu(e)&&(e.m.resolve(),e.L.da(.1)))),L.return();case 3:return e.l.g?L.return():(e.H+=(Date.now()-y)/1e3,e.g.logLicenseExchange&&Bo(m.data),pe(L,5),_(L,n.update(m.data),7));case 7:Ue(L,6);break;case 5:return R=Me(L),N=new Y(2,6,6008,R.message),e.u(N),i&&i.ub&&i.ub.reject(N),L.return();case 6:if(e.l.g)return L.return();U=new ke("drmsessionupdate"),e.C.onEvent(U),i&&(i.ub&&i.ub.resolve(),bh(e,i)),se(L)}})}function ks(e,t){t=t.target;var n=e.i.get(t),i=!1;t.keyStatuses.forEach(function(l,c){if(typeof c=="string"){var f=c;c=l,l=f}if(Jf(e.h.keySystem)&&c.byteLength==16&&(ra()||Gn())){f=Ei(c);var y=f.getUint32(0,!0),m=f.getUint16(4,!0),T=f.getUint16(6,!0);f.setUint32(0,y,!1),f.setUint16(4,m,!1),f.setUint16(6,T,!1)}l!="status-pending"&&(n.loaded=!0),l=="expired"&&(i=!0),c=wr(c).slice(0,32),e.Z.set(c,l)});var r=t.expiration-Date.now();(0>r||i&&1e3>r)&&n&&!n.ub&&(e.i.delete(t),Ih(t)),uu(e)&&(e.m.resolve(),e.L.da(em))}function Yg(e){var t=e.Z,n=e.fa;n.clear(),t.forEach(function(i,r){return n.set(r,i)}),t=Array.from(n.values()),t.length&&t.every(function(i){return i=="expired"})&&e.u(new Y(2,6,6014)),e.C.pe(vd(n))}function Wg(){var e,t,n,i,r,l,c,f,y,m,T,x,D,R,N,U,L,j,V,X,G,Z,q,K,W,Q,oe,ne,re,le,fe,ye,de,xe;return z(function(De){if(De.g==1){if(e="org.w3.clearkey com.widevine.alpha com.widevine.alpha.experiment com.microsoft.playready com.microsoft.playready.hardware com.microsoft.playready.recommendation com.chromecast.playready com.apple.fps.1_0 com.apple.fps com.huawei.wiseplay".split(" "),!(w.MediaKeys&&w.navigator&&w.navigator.requestMediaKeySystemAccess&&w.MediaKeySystemAccess&&w.MediaKeySystemAccess.prototype.getConfiguration)){for(t={},n=b(e),i=n.next();!i.done;i=n.next())r=i.value,t[r]=null;return De.return(t)}for(l="1.0 1.1 1.2 1.3 1.4 2.0 2.1 2.2 2.3".split(" "),c=["SW_SECURE_CRYPTO","SW_SECURE_DECODE","HW_SECURE_CRYPTO","HW_SECURE_DECODE","HW_SECURE_ALL"],f=["150","2000","3000"],y={"com.widevine.alpha":c,"com.widevine.alpha.experiment":c,"com.microsoft.playready.recommendation":f},m=[{contentType:'video/mp4; codecs="avc1.42E01E"'},{contentType:'video/webm; codecs="vp8"'}],T=[{contentType:'audio/mp4; codecs="mp4a.40.2"'},{contentType:'audio/webm; codecs="opus"'}],x={videoCapabilities:m,audioCapabilities:T,initDataTypes:["cenc","sinf","skd","keyids"]},D=[null,"cenc","cbcs","cbcs-1-9"],R=new Map,N=function(Je,Ve){var Pt,Tt,ft,gt,Mt,ut,xt,nt,st,Wt,ni,vn,wn;return z(function(Fn){switch(Fn.g){case 1:return pe(Fn,2),_(Fn,Ve.createMediaKeys(),5);case 5:Pt=Fn.h;case 4:Ue(Fn,3);break;case 2:return Me(Fn),Fn.return();case 3:if(ft=(Tt=Ve.getConfiguration().sessionTypes)?Tt.includes("persistent-license"):!1,lo()&&(ft=!1),gt=Ve.getConfiguration().videoCapabilities,Mt=Ve.getConfiguration().audioCapabilities,ut={persistentState:ft,encryptionSchemes:[],videoRobustnessLevels:[],audioRobustnessLevels:[],minHdcpVersions:[]},R.has(Je)&&R.get(Je)?ut=R.get(Je):R.set(Je,ut),(xt=gt[0].encryptionScheme)&&!ut.encryptionSchemes.includes(xt)&&ut.encryptionSchemes.push(xt),(nt=gt[0].robustness)&&!ut.videoRobustnessLevels.includes(nt)&&ut.videoRobustnessLevels.push(nt),(st=Mt[0].robustness)&&!ut.audioRobustnessLevels.includes(st)&&ut.audioRobustnessLevels.push(st),"getStatusForPolicy"in Pt){for(Wt=[],ni=b(l),vn=ni.next(),wn={};!vn.done;wn={td:void 0},vn=ni.next())wn.td=vn.value,ut.minHdcpVersions.includes(wn.td)||Wt.push(Pt.getStatusForPolicy({minHdcpVersion:wn.td}).then(function(fi){return function(Vf){Vf!="usable"||ut.minHdcpVersions.includes(fi.td)||ut.minHdcpVersions.push(fi.td)}}(wn)));return _(Fn,Promise.all(Wt),0)}Fn.s(0)}})},U=function(Je,Ve,Pt,Tt){var ft,gt,Mt,ut,xt,nt,st,Wt,ni,vn;return z(function(wn){switch(wn.g){case 1:for(pe(wn,2),ft=so(x),gt=b(ft.videoCapabilities),Mt=gt.next();!Mt.done;Mt=gt.next())ut=Mt.value,ut.encryptionScheme=Ve,ut.robustness=Pt;for(xt=b(ft.audioCapabilities),nt=xt.next();!nt.done;nt=xt.next())st=nt.value,st.encryptionScheme=Ve,st.robustness=Tt;return Wt=so(ft),Wt.persistentState="required",Wt.sessionTypes=["persistent-license"],ni=[Wt,ft],yl()?_(wn,$a(5,navigator.requestMediaKeySystemAccess(Je,ni)),7):_(wn,navigator.requestMediaKeySystemAccess(Je,ni),6);case 6:vn=wn.h,wn.s(5);break;case 7:vn=wn.h;case 5:return _(wn,N(Je,vn),8);case 8:Ue(wn,0);break;case 2:Me(wn),se(wn)}})},L=function(Je,Ve,Pt,Tt){var ft,gt,Mt;return z(function(ut){switch(ut.g){case 1:return pe(ut,2),ft={type:"media-source",video:{contentType:m[0].contentType,width:640,height:480,bitrate:1,framerate:1},audio:{contentType:T[0].contentType,channels:2,bitrate:1,samplerate:1},keySystemConfiguration:{keySystem:Je,video:{encryptionScheme:Ve,robustness:Pt},audio:{encryptionScheme:Ve,robustness:Tt}}},yl()?_(ut,$a(5,navigator.mediaCapabilities.decodingInfo(ft)),7):_(ut,navigator.mediaCapabilities.decodingInfo(ft),6);case 6:gt=ut.h,ut.s(5);break;case 7:gt=ut.h;case 5:return Mt=gt.keySystemAccess,_(ut,N(Je,Mt),8);case 8:Ue(ut,0);break;case 2:Me(ut),se(ut)}})},j=b(e),V=j.next();!V.done;V=j.next())X=V.value,R.set(X,null);for(G=function(Je){return!(Je==="org.w3.clearkey"&&oi())},Z=[],q=b(D),K=q.next();!K.done;K=q.next())for(W=K.value,Q=b(e),oe=Q.next();!oe.done;oe=Q.next())ne=oe.value,G(ne)&&(Z.push(U(ne,W,"","")),Z.push(L(ne,W,"","")));for(re=b(e),le=re.next();!le.done;le=re.next())for(fe=le.value,ye=b(y[fe]||[]),de=ye.next();!de.done;de=ye.next())xe=de.value,G(fe)&&(Z.push(U(fe,null,xe,"")),Z.push(U(fe,null,"",xe)),Z.push(L(fe,null,xe,"")),Z.push(L(fe,null,"",xe)));return _(De,Promise.all(Z),2)}return De.return(vd(R))})}function Ih(e){return z(function(t){if(t.g==1)return pe(t,2),_(t,$a(P0,Promise.all([e.close().catch(function(){}),e.closed])),4);if(t.g!=2)return Ue(t,0);Me(t),se(t)})}function Rs(e){var t;return z(function(n){return t=Array.from(e.i.entries()),e.i.clear(),_(n,Promise.all(t.map(function(i){i=b(i);var r=i.next().value,l=i.next().value;return z(function(c){if(c.g==1)return pe(c,2),e.ka||e.B.has(r.sessionId)||l.type!=="persistent-license"||e.g.persistentSessionOnlinePlayback?_(c,Ih(r),5):_(c,r.remove(),5);if(c.g!=2)return Ue(c,0);Me(c),se(c)})})),0)})}function Dh(e){return(e.video?e.video.drmInfos:[]).concat(e.audio?e.audio.drmInfos:[])}function Qg(e){e.i.forEach(function(t,n){var i=t.Vf,r=n.expiration;isNaN(r)&&(r=1/0),r!=i&&(e.C.onExpirationUpdated(n.sessionId,r),t.Vf=r)})}function uu(e){return e=e.i.values(),vh(e,function(t){return t.loaded})}function Jg(e){for(var t=b(e.h&&e.h.keyIds||new Set([])),n=t.next();!n.done;n=t.next())if(e.Z.get(n.value)!=="usable")return!1;return!0}function Zg(e,t){var n=[];for(t.forEach(function(i,r){n.push({keySystem:r,licenseServerUri:i,distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",initData:[],keyIds:new Set})}),e=b(e),t=e.next();!t.done;t=e.next())t=t.value,t.video&&(t.video.drmInfos=n),t.audio&&(t.audio.drmInfos=n)}function Cd(e,t,n,i,r,l,c,f){var y=[];e=b(e);for(var m=e.next(),T={};!m.done;T={va:void 0},m=e.next()){if(T.va=m.value,t.includes(T.va.encryptionScheme)||t.push(T.va.encryptionScheme),T.va.keySystem=="org.w3.clearkey"&&T.va.licenseServerUri.startsWith("data:application/json;base64,")?y.includes(T.va.licenseServerUri)||y.push(T.va.licenseServerUri):n.includes(T.va.licenseServerUri)||n.push(T.va.licenseServerUri),r.includes(T.va.serverCertificateUri)||r.push(T.va.serverCertificateUri),T.va.serverCertificate&&(i.some(function(R){return function(N){return dl(N,R.va.serverCertificate)}}(T))||i.push(T.va.serverCertificate)),T.va.initData){m=b(T.va.initData);for(var x=m.next(),D={};!x.done;D={Mf:void 0},x=m.next())D.Mf=x.value,l.some(function(R){return function(N){var U=R.Mf;return N.keyId&&N.keyId==U.keyId?!0:N.initDataType==U.initDataType&&dl(N.initData,U.initData)}}(D))||l.push(D.Mf)}if(T.va.keyIds)for(m=b(T.va.keyIds),x=m.next();!x.done;x=m.next())c.add(x.value);if(T.va.keySystemUris&&f)for(T=b(T.va.keySystemUris),m=T.next();!m.done;m=T.next())f.add(m.value)}if(y.length==1)n.push(y[0]);else if(0<y.length){for(t=[],y=b(y),i=y.next();!i.done;i=y.next())i=w.atob(i.value.split("data:application/json;base64,").pop()),i=JSON.parse(i),t.push.apply(t,J(i.keys));y=JSON.stringify({keys:t}),n.push("data:application/json;base64,"+w.btoa(y))}}function $g(e,t,n,i){var r=e.keySystem;r&&(r!="org.w3.clearkey"||!e.licenseServerUri)&&(t.size&&t.get(r)&&(t=t.get(r),e.licenseServerUri=t),e.keyIds||(e.keyIds=new Set),(n=n.get(r))&&(e.distinctiveIdentifierRequired||(e.distinctiveIdentifierRequired=n.distinctiveIdentifierRequired),e.persistentStateRequired||(e.persistentStateRequired=n.persistentStateRequired),e.serverCertificate||(e.serverCertificate=n.serverCertificate),n.sessionType&&(e.sessionType=n.sessionType),e.serverCertificateUri||(e.serverCertificateUri=n.serverCertificateUri)),i[r]&&(e.keySystem=i[r]),w.cast&&w.cast.__platform__&&r=="com.microsoft.playready"&&(e.keySystem="com.chromecast.playready"))}function Oh(e,t){if(e=ma(e),e.size!=0){e=vl(e),t=b(t);for(var n=t.next();!n.done;n=t.next())n=n.value,n.video&&(n.video.drmInfos=[e]),n.audio&&(n.audio.drmInfos=[e])}}var P0=1,kh=5,em=.5;function Qc(e,t,n){for(n=n===void 0?!0:n,this.h=e,this.g=new Set([e]),t=t||[],e=b(t),t=e.next();!t.done;t=e.next())this.add(t.value,n)}Qc.prototype.add=function(e,t){var n=this.h;t=t===void 0?!0:t;var i;if(!(i=!!n.audio!=!!e.audio||!!n.video!=!!e.video||n.language!=e.language)&&(i=n.audio&&e.audio)){i=n.audio;var r=e.audio;i=!(!((!i.channelsCount||!r.channelsCount||2<i.channelsCount||2<r.channelsCount)&&i.channelsCount!=r.channelsCount||i.spatialAudio!==r.spatialAudio||t&&!bd(i,r))&&Rh(i.roles,r.roles)&&i.groupId===r.groupId)}return!i&&(i=n.video&&e.video)&&(n=n.video,i=e.video,i=!((!t||bd(n,i))&&Rh(n.roles,i.roles))),i?!1:(this.g.add(e),!0)},Qc.prototype.values=function(){return this.g.values()};function bd(e,t){if(e.mimeType!=t.mimeType||(e=e.codecs.split(",").map(function(i){return li(i)}),t=t.codecs.split(",").map(function(i){return li(i)}),e.length!=t.length))return!1;e.sort(),t.sort();for(var n=0;n<e.length;n++)if(e[n]!=t[n])return!1;return!0}function Rh(e,t){if(e=new Set(e),t=new Set(t),e.delete("main"),t.delete("main"),e.size!=t.size)return!1;e=b(e);for(var n=e.next();!n.done;n=e.next())if(!t.has(n.value))return!1;return!0}Pe("shaka.media.AdaptationSet",Qc),Pe("shaka.config.CodecSwitchingStrategy",{RELOAD:"reload",SMOOTH:"smooth"});function Id(){}Id.prototype.create=function(){},Id.prototype.configure=function(){},Pe("shaka.media.AdaptationSetCriteria",Id);function L0(){this.g=Ns,this.i=new Map().set(Ns,2).set(Ms,1),this.h=0}var Ms=0,Ns=1;/*
@license
Shaka Player
Copyright 2023 Google LLC
SPDX-License-Identifier: Apache-2.0
*/function su(e,t,n){this.g=e,this.i=t,this.h=n}function Dd(e,t){return z(function(n){if(n.g==1)return _(n,Nl(e.h,t,e.g.drm.preferredKeySystems,e.g.drm.keySystemsMapping),2);if(e.g.streaming.dontChooseCodecs||dh(t,e.g.preferredVideoCodecs,e.g.preferredAudioCodecs,e.g.preferredDecodingAttributes,e.g.preferredTextFormats),!t.variants.some(Go))throw new Y(2,4,4032);return n.return(Mh(e,t))})}function Jc(e,t){var n=e.g.restrictions;e=e.i;var i=!1;t=b(t.variants);for(var r=t.next();!r.done;r=t.next()){r=r.value;var l=r.allowedByApplication;r.allowedByApplication=zo(r,n,e),l!=r.allowedByApplication&&(i=!0)}return i}function Mh(e,t){var n=Jc(e,t);if(t){var i=e.h?e.h.h:null;if(i&&e.h.A)for(var r=b(t.variants),l=r.next();!l.done;l=r.next())l=l.value,Od(e,i.keySystem,l.video),Od(e,i.keySystem,l.audio);Zc(e,t)}return n}function Od(e,t,n){if(n){n=b(n.drmInfos);for(var i=n.next();!i.done;i=n.next())if(i=i.value,i.keySystem==t){i=b(i.initData||[]);for(var r=i.next();!r.done;r=i.next())r=r.value,Ds(e.h,r.initDataType,r.initData)}}}function Zc(e,t){e=e.h?e.h.Yd():{};var n=Object.keys(e);n=n.length&&n[0]=="00";var i=!1,r=!1,l=new Set,c=new Set;t=b(t.variants);for(var f=t.next();!f.done;f=t.next()){f=f.value;var y=[];f.audio&&y.push(f.audio),f.video&&y.push(f.video),y=b(y);for(var m=y.next();!m.done;m=y.next())if(m=m.value,m.keyIds.size){m=b(m.keyIds);for(var T=m.next();!T.done;T=m.next()){T=T.value;var x=e[n?"00":T];x?kd.includes(x)&&c.add(x):l.add(T)}}f.allowedByApplication?f.allowedByKeySystem&&(i=!0):r=!0}if(!i)throw e={hasAppRestrictions:r,missingKeys:Array.from(l),restrictedKeyStatuses:Array.from(c)},new Y(2,4,4012,e)}var kd=["output-restricted","internal-error"];function Ps(){}function cu(e,t){Bl.set(e,t)}function Ls(){var e={};if(oo())for(var t=b(Bl.keys()),n=t.next();!n.done;n=t.next())e[n.value]=!0;for(t=b(["application/dash+xml","application/x-mpegurl","application/vnd.apple.mpegurl","application/vnd.ms-sstr+xml"]),n=t.next();!n.done;n=t.next())n=n.value,e[n]=oo()?Bl.has(n):Dc(n);return e}function _s(e,t){if(t){var n=Bl.get(t.toLowerCase());if(n)return n}throw new Y(2,4,4e3,e,t)}Pe("shaka.media.ManifestParser",Ps),Ps.unregisterParserByMime=function(e){Bl.delete(e)},Ps.registerParserByMime=cu,Ps.registerParserByExtension=function(){Ot("ManifestParser.registerParserByExtension","Please use an ManifestParser with registerParserByMime function.")},Ps.AccessibilityPurpose={Nk:"visually impaired",dk:"hard of hearing"};var Bl=new Map;function va(e,t){var n=null,i=null,r=null,l=null,c=e.S();return t&1&&(r=e.bd()),t&2&&(l=e.S()),t&8&&(n=e.S()),t&16&&(i=e.S()),{trackId:c,ld:n,md:i,Wh:r,rh:l}}function fu(e,t){return t==1?(t=e.S(),e=e.S(),{baseMediaDecodeTime:t*Math.pow(2,32)+e}):{baseMediaDecodeTime:e.S()}}function $c(e,t){return t==1?(e.skip(8),e.skip(8)):(e.skip(4),e.skip(4)),t=e.S(),e.skip(4),e=e.na(),{timescale:t,language:String.fromCharCode((e>>10)+96)+String.fromCharCode(((e&960)>>5)+96)+String.fromCharCode((e&31)+96)}}function ef(e,t,n){var i=e.S(),r=[],l=null;n&1&&(l=e.$f()),n&4&&e.skip(4);for(var c=0;c<i;c++){var f={gg:null,sampleSize:null,ye:null};n&256&&(f.gg=e.S()),n&512&&(f.sampleSize=e.S()),n&1024&&e.skip(4),n&2048&&(f.ye=t==0?e.S():e.$f()),r.push(f)}return{Sk:i,fg:r,nf:l}}function du(e){e.skip(6),e.skip(2),e.skip(8);var t=e.na();return e.skip(2),e.skip(2),e.skip(2),e=e.na()+e.na()/65536,{channelCount:t,sampleRate:e}}function Nh(e){return e=e.S(),{codec:Vr(e)}}function Hr(e){var t=null,n=null,i=e.Cb(4),r=String.fromCharCode(i[0]);if(r+=String.fromCharCode(i[1]),r+=String.fromCharCode(i[2]),r+=String.fromCharCode(i[3]),r==="nclx"){switch(e.na()){case 1:case 5:case 6:case 7:t="srgb";break;case 9:t="rec2020";break;case 11:case 12:t="p3"}switch(i=e.na(),e.na(),i){case 1:case 6:case 13:case 14:case 15:n="SDR";break;case 16:n="PQ";break;case 18:n="HLG"}}return{colorGamut:t,Nd:n}}function ar(e,t){return t=t===void 0?!1:t,e=e.toString(16).toUpperCase(),t?e:("0"+e).slice(-2)}function Xn(e){return(10>e?"0":"")+e}function Sa(e){if(!Ph){Ph=!0;var t=new Uint8Array([105,115,111,109]),n=new Uint8Array([97,118,99,49]),i=new Uint8Array([0,0,0,1]);rf=St("ftyp",t,i,t,n),t=St("dref",am),Rd=St("dinf",t)}this.g=e}function br(e){for(var t=[],n=b(e.g),i=n.next();!i.done;i=n.next()){var r=t,l=r.push,c=i.value;i=St;var f=c.id+1,y=c.stream.width||0,m=c.stream.height||0;c.type=="audio"&&(m=y=0);var T=c.duration*c.timescale,x=Math.floor(T/(Hl+1));switch(T=Math.floor(T%(Hl+1)),f=new Uint8Array([1,0,0,7,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3].concat(J(rn(f,4)),[0,0,0,0],J(rn(x,4)),J(rn(T,4)),[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0],J(rn(y,2)),[0,0],J(rn(m,2)),[0,0])),f=St("tkhd",f),y=St,x=c.duration*c.timescale,m=Math.floor(x/(Hl+1)),x=Math.floor(x%(Hl+1)),T=c.stream.language,T=T.charCodeAt(0)-96<<10|T.charCodeAt(1)-96<<5|T.charCodeAt(2)-96,m=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3].concat(J(rn(c.timescale,4)),J(rn(m,4)),J(rn(x,4)),J(rn(T,2)),[0,0])),m=St("mdhd",m),x=c,T=new Uint8Array([]),x.type){case"video":T=nm;break;case"audio":T=Lh}x=St("hdlr",T);e:{switch(c.type){case"video":c=St("minf",St("vmhd",Ci),Rd,Qo(c));break e;case"audio":c=St("minf",St("smhd",Ni),Rd,Qo(c));break e}c=new Uint8Array([])}c=y("mdia",m,x,c),i=i("trak",f,c),l.call(r,i)}for(t=Gt.apply(Ln,J(t)),l=e.g[0],n=St,i=l.duration*l.timescale,r=Math.floor(i/(Hl+1)),i=Math.floor(i%(Hl+1)),r=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3].concat(J(rn(l.timescale,4)),J(rn(r,4)),J(rn(i,4)),[0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255])),r=St("mvhd",r),i=[],e=b(e.g),y=e.next();!y.done;y=e.next())c=i,f=c.push,y=new Uint8Array([0,0,0,0].concat(J(rn(y.value.id+1,4)),[0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0])),y=St("trex",y),f.call(c,y);if(e=Gt.apply(Ln,J(i)),e=St("mvex",e),i=[],l.encrypted){for(l=b(l.stream.drmInfos),c=l.next();!c.done;c=l.next())if(c=c.value,c.initData)for(c=b(c.initData),f=c.next();!f.done;f=c.next())i.push(f.value.initData);l=Gt.apply(Ln,J(i))}else l=new Uint8Array([]);return e=n("moov",r,t,e,l),t=new Uint8Array(rf.byteLength+e.byteLength),t.set(rf),t.set(e,rf.byteLength),t}function Qo(e){var t=St,n="aac";e.codecs.includes("mp3")?n="mp3":e.codecs.includes("ac-3")?n=lo()?"ec-3":"ac-3":e.codecs.includes("ec-3")?n="ec-3":e.codecs.includes("opus")&&(n="opus");var i=new Uint8Array([]);switch(e.type){case"video":if(e.codecs.includes("avc1")){if(n=e.stream.width||0,i=e.stream.height||0,0<e.Ca.byteLength)var r=St("avcC",e.Ca);else{r=St;for(var l=7,c=[],f=[],y=0,m=0,T=0,x=0;x<e.lb.length;x++){var D=Ta(e.lb[x]);switch(D[0]&31){case 7:c.push(D),l+=D.length+2;break;case 8:f.push(D),l+=D.length+2}}for(0<c.length&&(y=c[0][1],T=c[0][2],m=c[0][3]),l=new Uint8Array(l),x=0,l[x++]=1,l[x++]=y,l[x++]=T,l[x++]=m,l[x++]=255,l[x++]=224|c.length,y=0;y<c.length;y++)l[x++]=(c[y].length&65280)>>8,l[x++]=c[y].length&255,l.set(c[y],x),x+=c[y].length;for(l[x++]=f.length,c=0;c<f.length;c++)l[x++]=(f[c].length&65280)>>8,l[x++]=f[c].length&255,l.set(f[c],x),x+=f[c].length;r=r("avcC",l)}n=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].concat(J(rn(n,2)),J(rn(i,2)),[0,72,0,0,0,72,0,0,0,0,0,0,0,1,19,118,105,100,101,111,106,115,45,99,111,110,116,114,105,98,45,104,108,115,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17])),i="avc1",f=si(e),c=new Uint8Array([]),e.encrypted&&(c=Vl(0,e.stream,e.codecs),i="encv"),i=St(i,n,r,f,c)}else e.codecs.includes("hvc1")&&(i=e.stream.width||0,r=e.stream.height||0,n=new Uint8Array([]),0<e.Ca.byteLength&&(n=St("hvcC",e.Ca)),i=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].concat(J(rn(i,2)),J(rn(r,2)),[0,72,0,0,0,72,0,0,0,0,0,0,0,1,19,118,105,100,101,111,106,115,45,99,111,110,116,114,105,98,45,104,108,115,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17])),r="hvc1",f=si(e),c=new Uint8Array([]),e.encrypted&&(c=Vl(0,e.stream,e.codecs),r="encv"),i=St(r,i,n,f,c));break;case"audio":n=="mp3"?e=St(".mp3",wa(e)):n=="ac-3"?(n=St("dac3",e.ra),i="ac-3",r=new Uint8Array([]),e.encrypted&&(r=Vl(0,e.stream,e.codecs),i="enca"),e=St(i,wa(e),n,r)):n=="ec-3"?(n=St("dec3",e.ra),i="ec-3",r=new Uint8Array([]),e.encrypted&&(r=Vl(0,e.stream,e.codecs),i="enca"),e=St(i,wa(e),n,r)):n=="opus"?(n=St("dOps",e.ra),i="Opus",r=new Uint8Array([]),e.encrypted&&(r=Vl(0,e.stream,e.codecs),i="enca"),e=St(i,wa(e),n,r)):(0<e.ra.byteLength?n=St("esds",e.ra):(n=St,i=e.id+1,r=e.stream.channelsCount||2,c=e.stream.audioSamplingRate||44100,y=aa("audio",e.codecs.split(",")),m={96e3:0,88200:1,64e3:2,48e3:3,44100:4,32e3:5,24e3:6,22050:7,16e3:8,12e3:9,11025:10,8e3:11,7350:12},f=m[c],(y==="mp4a.40.5"||y==="mp4a.40.29")&&(f=m[2*c]),c=parseInt(y.split(".").pop(),10),i=new Uint8Array([0,0,0,0,3,25].concat(J(rn(i,2)),[0,4,17,64,21,0,0,0,0,0,0,0,0,0,0,0,5,2,c<<3|f>>>1,f<<7|r<<3,6,1,2])),n=n("esds",i)),i="mp4a",r=new Uint8Array([]),e.encrypted&&(r=Vl(0,e.stream,e.codecs),i="enca"),e=St(i,wa(e),n,r)),i=e}return e=St("stsd",lm,i),t("stbl",e,St("stts",im),St("stsc",rm),St("stsz",om),St("stco",_0))}function si(e){if(!e.Ia&&!e.Ka)return new Uint8Array([]);var t=e.Ka;return e=new Uint8Array([].concat(J(rn(e.Ia,4)),J(rn(t,4)))),St("pasp",e)}function wa(e){return new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,e.stream.channelsCount||2,0,16,0,0,0,0].concat(J(rn(e.stream.audioSamplingRate||44100,2)),[0,0]))}function Vl(e,t,n){e=St,n=new Uint8Array([].concat(J(rn(tf(n.split(".")[0]),4)))),n=St("frma",n);var i="cenc",r=t.drmInfos[0];r&&r.encryptionScheme&&(i=r.encryptionScheme),i=new Uint8Array([0,0,0,0].concat(J(rn(tf(i),4)),[0,1,0,0])),i=St("schm",i),r=St;var l=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]);t=b(t.drmInfos);for(var c=t.next();!c.done;c=t.next())if((c=c.value)&&c.keyIds&&c.keyIds.size){c=b(c.keyIds);for(var f=c.next();!f.done;f=c.next())l=Ta(f.value)}return t=new Uint8Array([0,0,0,0,0,0,1,8]),t=St("tenc",t,l),e("sinf",n,i,r("schi",t))}function pu(e){var t=[];e=b(e.g);for(var n=e.next();!n.done;n=e.next()){n=n.value;var i=t.push,r=i.apply,l=St,c=new Uint8Array([0,0,0,0].concat(J(rn(n.data?n.data.Db:0,4))));c=St("mfhd",c);var f,y=n.data?n.data.jb:[],m=new Uint8Array(4+y.length);for(f=0;f<y.length;f++){var T=y[f].flags;m[f+4]=T.Ya<<4|T.$a<<2|T.Za}y=St("sdtp",m);var x=y.length+92;m=St,f=new Uint8Array([0,0,0,58].concat(J(rn(n.id+1,4)),[0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0])),f=St("tfhd",f),T=n.data?n.data.baseMediaDecodeTime:0;var D=Math.floor(T%(Hl+1));T=new Uint8Array([1,0,0,0].concat(J(rn(Math.floor(T/(Hl+1)),4)),J(rn(D,4)))),T=St("tfdt",T);var R=x;x=n.data?n.data.jb:[],D=x.length;var N=12+16*D,U=new Uint8Array(N);for(R+=8+N,U.set([n.type==="video"?1:0,0,15,1].concat(J(rn(D,4)),J(rn(R,4))),0),R=0;R<D;R++){var L=x[R];N=rn(L.duration,4);var j=rn(L.size,4),V=L.flags;L=rn(L.eb,4),U.set([].concat(J(N),J(j),[V.hb<<2|V.Ya,V.$a<<6|V.Za<<4|V.ib,V.Xa&61440,V.Xa&15],J(L)),12+16*R)}x=St("trun",U),y=m("traf",f,T,x,y),l=l("moof",c,y),r.call(i,t,[l,tm(n)])}return Gt.apply(Ln,J(t))}function tm(e){return e=(e.data?e.data.jb:[]).map(function(t){return t.data}),e=Gt.apply(Ln,J(e)),St("mdat",e)}function rn(e,t){var n=[];for(--t;0<=t;t--)n.push(e>>8*t&255);return n}function Ta(e){for(var t=new Uint8Array(e.length/2),n=0;n<e.length/2;n+=1)t[n]=parseInt(String(e[2*n]+e[2*n+1]),16);return t}function tf(e){for(var t=0,n=0;n<e.length;n+=1)t|=e.charCodeAt(n)<<8*(e.length-n-1);return t}function St(e){var t=Et.apply(1,arguments),n=nf.get(e);n||(n=[e.charCodeAt(0),e.charCodeAt(1),e.charCodeAt(2),e.charCodeAt(3)],nf.set(e,n));for(var i=8,r=t.length-1;0<=r;r--)i+=t[r].byteLength;for(r=new Uint8Array(i),r[0]=i>>24&255,r[1]=i>>16&255,r[2]=i>>8&255,r[3]=i&255,r.set(n,4),n=0,i=8;n<t.length;n++)r.set(t[n],i),i+=t[n].byteLength;return r}var Ph=!1,Hl=Math.pow(2,32)-1,nf=new Map,nm=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),Lh=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]),im=new Uint8Array([0,0,0,0,0,0,0,0]),rm=new Uint8Array([0,0,0,0,0,0,0,0]),_0=new Uint8Array([0,0,0,0,0,0,0,0]),om=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),Ci=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]),Ni=new Uint8Array([0,0,0,0,0,0,0,0]),lm=new Uint8Array([0,0,0,0,0,0,0,1]),rf=new Uint8Array([]),am=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),Rd=new Uint8Array([]);function um(e,t,n){function i(R){x.push({box:R,hh:1701733217})}function r(R){x.push({box:R,hh:1701733238})}function l(R){y=!0,R.parser.stop()}function c(R){T.push(R),$e(R)}var f=t=Ze(t),y=!1,m,T=[],x=[];if(new jt().box("moov",c).box("trak",c).box("mdia",c).box("minf",c).box("stbl",c).R("stsd",function(R){m=R,T.push(R),bn(R)}).R("encv",l).R("enca",l).R("dvav",r).R("dva1",r).R("dvh1",r).R("dvhe",r).R("dvc1",r).R("dvi1",r).R("hev1",r).R("hvc1",r).R("avc1",r).R("avc3",r).R("ac-3",i).R("ec-3",i).R("ac-4",i).R("Opus",i).R("fLaC",i).R("mp4a",i).parse(t),y)return t;if(x.length==0||!m)throw wr(t),new Y(2,3,3019,n);x.reverse(),n=b(x);for(var D=n.next();!D.done;D=n.next())D=D.value,f=sm(e,f,m,D.box,T,D.hh);return ra()&&$u()&&!nr()?(e=new Uint8Array(t.byteLength+f.byteLength),e.set(f),e.set(t,f.byteLength),e):f}function Md(e){e=Ze(e);var t=[];new jt().box("mdat",function(c){t.push(c)}).parse(e);for(var n=[],i=0;i<t.length;i++){var r=t[i-1],l=t[i];n.push(_h(e.subarray(r?r.start+r.size:0,l.start+l.size)))}return Gt.apply(Ln,J(n))}function _h(e){function t(x){c.push(x),$e(x)}var n,i,r,l,c=[];if(new jt().box("moof",t).box("traf",t).R("tfhd",function(x){n=x,r=va(x.reader,x.flags)}).R("trun",function(x){i=x,l=ef(x.reader,x.version,x.flags)}).parse(e),r&&r.rh!==2){var f=n.start+vo(n)+4+(r.Wh!==null?8:0),y=Ei(e);if(r.rh!==null)y.setUint32(f,2);else{of(e,n.start,n.size+4);var m=y.getUint32(n.start+8);y.setUint32(n.start+8,m|2),l&&l.nf!==null&&y.setInt32(i.start+vo(i)+4,l.nf+4),m=e.subarray(0,f),y=e.subarray(f),e=new Uint8Array(e.byteLength+4),e.set(m),m=[];for(var T=3;0<=T;T--)m.push(2>>8*T&255);for(e.set(new Uint8Array(m),f),e.set(y,f+4),f=b(c),y=f.next();!y.done;y=f.next())y=y.value,of(e,y.start,y.size+4)}}return e}function sm(e,t,n,i,r,l){var c=Vl(new Sa([]),e,i.name),f=t.subarray(i.start,i.start+i.size);for(e=new Uint8Array(i.size+c.byteLength),e.set(f,0),Ei(e).setUint32(4,l),e.set(c,i.size),of(e,0,e.byteLength),l=new Uint8Array(t.byteLength+e.byteLength),i=oi()||nr()||ra()?i.start:i.start+i.size,c=t.subarray(i),l.set(t.subarray(0,i)),l.set(e,i),l.set(c,i+e.byteLength),t=b(r),r=t.next();!r.done;r=t.next())r=r.value,of(l,r.start,r.size+e.byteLength);return e=Ei(l,n.start),n=vo(n),t=e.getUint32(n),e.setUint32(n,t+1),l}function of(e,t,n){e=Ei(e,t),t=e.getUint32(0),t!=0&&(t==1?(e.setUint32(8,n>>32),e.setUint32(12,n&4294967295)):e.setUint32(0,n))}function cm(e){function t(r){i.push({start:r.start,size:r.size}),$e(r)}var n=Ze(e),i=[];return new jt().box("moov",t).box("trak",t).box("mdia",t).box("minf",t).box("stbl",t).box("stsd",function(r){i.push({start:r.start,size:r.size});for(var l=Ei(n,r.start),c=0;c<r.size-3;c++){var f=l.getUint32(c);f==1633889587?l.setUint32(c,1700998451):f==1684103987&&l.setUint32(c,1684366131)}}).parse(n),n}function bi(e,t,n,i,r,l,c,f){this.N=e,this.Sa=t,this.wa=n,this.Wc=i===void 0?null:i,this.timescale=r===void 0?null:r,this.h=l===void 0?null:l,this.aesKey=c===void 0?null:c,this.g=this.mimeType=this.codecs=null,this.encrypted=f===void 0?!1:f}bi.prototype.uc=function(){return this.Sa},bi.prototype.tc=function(){return this.wa},bi.prototype.Kd=function(e){this.h=e},bi.prototype.Ib=function(){return this.h};function Us(e,t){return e===t?!0:e&&t?e.uc()==t.uc()&&e.tc()==t.tc()&&us(e.N().sort(),t.N().sort())&&dl(e.Ib(),t.Ib()):e==t}Pe("shaka.media.InitSegmentReference",bi),bi.prototype.getEndByte=bi.prototype.tc,bi.prototype.getStartByte=bi.prototype.uc;function qe(e,t,n,i,r,l,c,f,y,m,T,x,D,R,N,U){for(m=m===void 0?[]:m,R=R===void 0?So:R,this.startTime=e,this.j=this.endTime=t,this.C=n,this.Sa=i,this.wa=r,this.Y=l,this.timestampOffset=c,this.appendWindowStart=f,this.appendWindowEnd=y,this.g=m,this.tilesLayout=T===void 0?"":T,this.B=x===void 0?null:x,this.h=D===void 0?null:D,this.status=R,this.preload=!1,this.l=!0,this.m=!1,this.aesKey=N===void 0?null:N,this.thumbnailSprite=null,this.i=-1,this.A=U===void 0?!1:U,this.F=this.o=!1,e=b(this.g),t=e.next();!t.done;t=e.next())t.value.fh();this.A&&this.g.length&&this.g[this.g.length-1].eh(),this.u=this.bandwidth=this.mimeType=this.codecs=null,this.G=!1}h=qe.prototype,h.N=function(){return this.C()},h.getStartTime=function(){return this.startTime},h.mi=function(){return this.endTime},h.uc=function(){return this.Sa},h.tc=function(){return this.wa},h.Ji=function(){return this.tilesLayout},h.Ii=function(){return this.B},h.dc=function(){return this.status},h.aj=function(){this.status=lf},h.Sf=function(){this.preload=!0},h.isPreload=function(){return this.preload},h.Vc=function(){this.l=!1},h.Ti=function(){return this.l},h.fh=function(){this.o=!0},h.Vi=function(){return this.o},h.eh=function(){this.F=!0},h.Ui=function(){return this.F},h.dh=function(){this.m=!0},h.Pi=function(){return this.m},h.De=function(e){this.thumbnailSprite=e},h.Gi=function(){return this.thumbnailSprite},h.offset=function(e){this.startTime+=e,this.endTime+=e,this.j+=e;for(var t=b(this.g),n=t.next();!n.done;n=t.next())n=n.value,n.startTime+=e,n.endTime+=e,n.j+=e},h.qg=function(e){this.h==null?no("Sync attempted without sync time!"):(e=this.h-e-this.startTime,.001<=Math.abs(e)&&this.offset(e))},h.Kd=function(e,t){this.u=e,this.G=t===void 0?!1:t},h.Ib=function(e){var t=this.u;return(e===void 0||e)&&this.G&&(this.u=null),t};function Uh(e,t){e.Y=t,e=b(e.g);for(var n=e.next();!n.done;n=e.next())Uh(n.value,t)}Pe("shaka.media.SegmentReference",qe),qe.prototype.getSegmentData=qe.prototype.Ib,qe.prototype.setSegmentData=qe.prototype.Kd,qe.prototype.syncAgainst=qe.prototype.qg,qe.prototype.offset=qe.prototype.offset,qe.prototype.getThumbnailSprite=qe.prototype.Gi,qe.prototype.setThumbnailSprite=qe.prototype.De,qe.prototype.hasByterangeOptimization=qe.prototype.Pi,qe.prototype.markAsByterangeOptimization=qe.prototype.dh,qe.prototype.isLastPartial=qe.prototype.Ui,qe.prototype.markAsLastPartial=qe.prototype.eh,qe.prototype.isPartial=qe.prototype.Vi,qe.prototype.markAsPartial=qe.prototype.fh,qe.prototype.isIndependent=qe.prototype.Ti,qe.prototype.markAsNonIndependent=qe.prototype.Vc,qe.prototype.isPreload=qe.prototype.isPreload,qe.prototype.markAsPreload=qe.prototype.Sf,qe.prototype.markAsUnavailable=qe.prototype.aj,qe.prototype.getStatus=qe.prototype.dc,qe.prototype.getTileDuration=qe.prototype.Ii,qe.prototype.getTilesLayout=qe.prototype.Ji,qe.prototype.getEndByte=qe.prototype.tc,qe.prototype.getStartByte=qe.prototype.uc,qe.prototype.getEndTime=qe.prototype.mi,qe.prototype.getStartTime=qe.prototype.getStartTime,qe.prototype.getUris=qe.prototype.N;var So=0,lf=1;qe.Status={Nj:So,Lk:lf,lk:2};function hu(e){return e.length==1&&1e-4>e.end(0)-e.start(0)}function Nd(e){return!e||hu(e)?null:e.length?e.end(e.length-1):null}function af(e,t){return!e||!e.length||hu(e)||t>e.end(e.length-1)?!1:t>=e.start(0)}function jh(e,t){if(!e||!e.length||hu(e))return 0;var n=0;e=b(wo(e));for(var i=e.next();!i.done;i=e.next()){var r=i.value;i=r.start,r=r.end,r>t&&(n+=r-Math.max(i,t))}return n}function Kl(e,t,n){return!e||!e.length||hu(e)?null:(e=wo(e).findIndex(function(i,r,l){return i.start>t&&(r==0||l[r-1].end-t<=n)}),0<=e?e:null)}function wo(e){if(!e)return[];for(var t=[],n=0;n<e.length;n++)t.push({start:e.start(n),end:e.end(n)});return t}function fm(){}function Bh(e,t){var n=document.createElement("source");return n.src=e,n.type=t===void 0?"":t,n}function _i(e){for(;e.firstChild;)e.removeChild(e.firstChild)}Pe("shaka.util.Dom",fm),fm.removeAllChildren=_i;/*
@license
Shaka Player
Copyright 2022 Google LLC
SPDX-License-Identifier: Apache-2.0
*/function Pd(){}function uf(e,t){return t+10<=e.length&&e[t]===73&&e[t+1]===68&&e[t+2]===51&&255>e[t+3]&&255>e[t+4]&&128>e[t+6]&&128>e[t+7]&&128>e[t+8]&&128>e[t+9]}function js(e,t){return t+10<=e.length&&e[t]===51&&e[t+1]===68&&e[t+2]===73&&255>e[t+3]&&255>e[t+4]&&128>e[t+6]&&128>e[t+7]&&128>e[t+8]&&128>e[t+9]}function Rn(e,t){var n=(e[t]&127)<<21;return n|=(e[t+1]&127)<<14,n|=(e[t+2]&127)<<7,n|=e[t+3]&127}function U0(e){var t={key:e.type,description:"",data:"",mimeType:null,pictureType:null};if(e.type==="APIC"){if(2>e.size||e.data[0]!==3)return null;var n=e.data.subarray(1).indexOf(0);if(n===-1)return null;var i=nn(Ze(e.data,1,n)),r=e.data[2+n],l=e.data.subarray(3+n).indexOf(0);if(l===-1)return null;var c=nn(Ze(e.data,3+n,l)),f;return i==="-->"?f=nn(Ze(e.data,4+n+l)):f=Sr(e.data.subarray(4+n+l)),t.mimeType=i,t.pictureType=r,t.description=c,t.data=f,t}return e.type==="TXXX"?2>e.size||e.data[0]!==3||(i=e.data.subarray(1).indexOf(0),i===-1)?null:(n=nn(Ze(e.data,1,i)),e=nn(Ze(e.data,2+i)).replace(/\0*$/,""),t.description=n,t.data=e,t):e.type==="WXXX"?2>e.size||e.data[0]!==3||(i=e.data.subarray(1).indexOf(0),i===-1)?null:(n=nn(Ze(e.data,1,i)),e=nn(Ze(e.data,2+i)).replace(/\0*$/,""),t.description=n,t.data=e,t):e.type==="PRIV"?2>e.size||(n=e.data.indexOf(0),n===-1)?null:(n=nn(Ze(e.data,0,n)),t.description=n,n=="com.apple.streaming.transportStreamTimestamp"?(n=e.data.subarray(n.length+1),e=n[3]&1,n=(n[4]<<23)+(n[5]<<15)+(n[6]<<7)+n[7],n/=45,e&&(n+=4772185884e-2),t.data=n):(e=Sr(e.data.subarray(n.length+1)),t.data=e),t):e.type[0]==="T"?2>e.size||e.data[0]!==3?null:(e=nn(e.data.subarray(1)).replace(/\0*$/,""),t.data=e,t):e.type[0]==="W"?(e=nn(e.data).replace(/\0*$/,""),t.data=e,t):e.data?(t.data=Sr(e.data),t):null}function yu(e){for(var t=0,n=[];uf(e,t);){var i=Rn(e,t+6);for(e[t+5]>>6&1&&(t+=10),t+=10,i=t+i;t+10<i;){var r=e.subarray(t),l=Rn(r,4);r={type:String.fromCharCode(r[0],r[1],r[2],r[3]),size:l,data:r.subarray(10,10+l)},(l=U0(r))&&n.push(l),t+=r.size+10}js(e,t)&&(t+=10)}return n}function gu(e,t){for(var n=t=t===void 0?0:t,i=0;uf(e,t);)e[t+5]>>6&1&&(i+=10),i+=10,i+=Rn(e,t+6),js(e,t+10)&&(i+=10),t+=i;return 0<i?e.subarray(n,n+i):new Uint8Array([])}Pe("shaka.util.Id3Utils",Pd),Pd.getID3Data=gu,Pd.getID3Frames=yu;function Ir(e,t){if(this.j=e,t!==void 0&&t){t=new Uint8Array(e.byteLength);for(var n=0,i=0;i<e.byteLength;i++)2<=i&&e[i]==3&&e[i-1]==0&&e[i-2]==0||(t[n]=e[i],n++);this.j=Ze(t,0,n)}this.i=this.j.byteLength,this.g=this.h=0}function Jo(e){var t=e.j.byteLength-e.i,n=new Uint8Array(4),i=Math.min(4,e.i);i!==0&&(n.set(e.j.subarray(t,t+i)),e.h=new Zt(n,0).S(),e.g=8*i,e.i-=i)}function Ui(e,t){if(e.g<=t){t-=e.g;var n=Math.floor(t/8);t-=8*n,e.g-=n,Jo(e)}e.h<<=t,e.g-=t}function mt(e,t){var n=Math.min(e.g,t),i=e.h>>>32-n;return e.g-=n,0<e.g?e.h<<=n:0<e.i&&Jo(e),n=t-n,0<n?i<<n|mt(e,n):i}function mu(e){var t;for(t=0;t<e.g;++t)if((e.h&2147483648>>>t)!==0)return e.h<<=t,e.g-=t,t;return Jo(e),t+mu(e)}function Mn(e){Ui(e,1+mu(e))}function Le(e){var t=mu(e);return mt(e,t+1)-1}function xa(e){return e=Le(e),1&e?1+e>>>1:-1*(e>>>1)}function Ke(e){return mt(e,1)===1}function Rt(e){return mt(e,8)}function Bs(e,t){for(var n=8,i=8,r=0;r<t;r++)i!==0&&(i=xa(e),i=(n+i+256)%256),n=i===0?n:i}function Ld(e){return Rt(e),Le(e),Le(e)}Pe("shaka.util.ExpGolomb",Ir);function $t(){this.G=null,this.H=!1,this.m=this.I=null,this.j=[],this.g=[],this.A=this.B=null,this.i=[],this.h=[],this.C=null,this.l=[],this.F=this.o=this.u=null}h=$t.prototype,h.clearData=function(){this.j=[],this.g=[],this.i=[],this.h=[],this.l=[]},h.parse=function(e){if(564>e.length)return this;for(var t=Math.max(0,_d(e)),n=e.length-(e.length+t)%188,i=!1,r=t;r<n;r+=188)if(e[r]==71){var l=!!(e[r+1]&64),c=((e[r+1]&31)<<8)+e[r+2];if(1<(e[r+3]&48)>>4){var f=r+5+e[r+4];if(f==r+188)continue}else f=r+4;switch(c){case 0:l&&(f+=e[f]+1),this.G=(e[f+10]&31)<<8|e[f+11];break;case 17:case 8191:break;case this.G:l&&(f+=e[f]+1),l=e,c={audio:-1,video:-1,ce:-1,audioCodec:"",videoCodec:""};var y=f+3+((l[f+1]&15)<<8|l[f+2])-4;for(f+=12+((l[f+10]&15)<<8|l[f+11]);f<y;){var m=(l[f+1]&31)<<8|l[f+2],T=(l[f+3]&15)<<8|l[f+4];switch(l[f]){case 6:if(0<T)for(var x=f+5,D=T;2<D;){var R=l[x+1]+2;switch(l[x]){case 5:var N=ts(l.subarray(x+2,x+R));c.audio==-1&&N==="Opus"?(c.audio=m,c.audioCodec="opus"):c.video==-1&&N==="AV01"&&(c.video=m,c.videoCodec="av1");break;case 106:c.audio==-1&&(c.audio=m,c.audioCodec="ac3");break;case 122:c.audio==-1&&(c.audio=m,c.audioCodec="ec3");break;case 124:c.audio==-1&&(c.audio=m,c.audioCodec="aac");break;case 127:c.audioCodec=="opus"&&(N=null,l[x+2]===128&&(N=l[x+3]),N!=null&&(this.F={channelCount:(N&15)===0?2:N&15,Zh:N,sampleRate:48e3}))}x+=R,D-=R}break;case 15:c.audio==-1&&(c.audio=m,c.audioCodec="aac");break;case 17:c.audio==-1&&(c.audio=m,c.audioCodec="aac-loas");break;case 21:c.ce==-1&&(c.ce=m);break;case 27:c.video==-1&&(c.video=m,c.videoCodec="avc");break;case 3:case 4:c.audio==-1&&(c.audio=m,c.audioCodec="mp3");break;case 36:c.video==-1&&(c.video=m,c.videoCodec="hvc");break;case 129:c.audio==-1&&(c.audio=m,c.audioCodec="ac3");break;case 132:case 135:c.audio==-1&&(c.audio=m,c.audioCodec="ec3")}f+=T+5}l=c,l.video!=-1&&(this.I=l.video,this.m=l.videoCodec),l.audio!=-1&&(this.B=l.audio,this.A=l.audioCodec),l.ce!=-1&&(this.C=l.ce),i&&!this.H&&(i=!1,r=t-188),this.H=!0;break;case this.I:f=e.subarray(f,r+188),l?this.j.push([f]):this.j.length&&this.j[this.j.length-1]&&this.j[this.j.length-1].push(f);break;case this.B:f=e.subarray(f,r+188),l?this.i.push([f]):this.i.length&&this.i[this.i.length-1]&&this.i[this.i.length-1].push(f);break;case this.C:f=e.subarray(f,r+188),l?this.l.push([f]):this.l.length&&this.l[this.l.length-1]&&this.l[this.l.length-1].push(f);break;default:i=!0}}return this};function To(e,t){if((t[0]<<16|t[1]<<8|t[2])!==1)return null;var n={data:new Uint8Array(0),packetLength:t[4]<<8|t[5],pts:null,dts:null,nalus:[]};if(n.packetLength&&n.packetLength>t.byteLength-6)return null;var i=t[7];if(i&192){var r=536870912*(t[9]&14)+4194304*(t[10]&255)+16384*(t[11]&254)+128*(t[12]&255)+(t[13]&254)/2;e.u==null&&(e.u=r),n.pts=mi(r,e.u),e.u=n.pts,n.dts=n.pts,i&64&&(i=536870912*(t[14]&14)+4194304*(t[15]&255)+16384*(t[16]&254)+128*(t[17]&255)+(t[18]&254)/2,e.o==null&&(e.o=i),n.dts=mi(i,e.o)),e.o=n.dts}return e=t[8]+9,t.byteLength<=e?null:(n.data=t.subarray(e),n)}h.hj=function(e){return Ot("TsParser.parseAvcNalus","Please use parseNalus function instead."),this.Xf(e,{Dd:null,state:null})},h.Xf=function(e,t){var n=e.pts?e.pts/9e4:null;e=e.data;var i=e.byteLength,r=1;this.m=="hvc"&&(r=2);var l=t.state||0,c=l,f=0,y=[],m=-1,T=0;for(l==-1&&(m=0,T=this.m=="hvc"?e[0]>>1&63:e[0]&31,l=0,f=1);f<i;){var x=e[f++];l?l===1?l=x?0:2:x?x==1?(x=f-l-1,0<=m?y.push({data:e.subarray(m+r,x),fullData:e.subarray(m,x),type:T,time:n,state:null}):(l=y.length?y[y.length-1]:t.Dd)&&(c&&f<=4-c&&l.state&&(l.data=l.data.subarray(0,l.data.byteLength-c),l.fullData=l.fullData.subarray(0,l.fullData.byteLength-c)),0<x&&(x=e.subarray(0,x),l.data=Gt(l.data,x),l.fullData=Gt(l.fullData,x),l.state=0)),f<i?(T=this.m=="hvc"?e[f]>>1&63:e[f]&31,m=f,l=0):l=-1):l=0:l=3:l=x?0:1}return 0<=m&&0<=l&&y.push({data:e.subarray(m+r,i),fullData:e.subarray(m,i),type:T,time:n,state:l}),!y.length&&t.Dd&&(n=y.length?y[y.length-1]:t.Dd)&&(n.data=Gt(n.data,e),n.fullData=Gt(n.fullData,e)),t.state=l,y},h.getMetadata=function(){for(var e=[],t=b(this.l),n=t.next();!n.done;n=t.next())n=Gt.apply(Ln,J(n.value)),(n=To(this,n))&&e.push({cueTime:n.pts?n.pts/9e4:null,data:n.data,frames:yu(n.data),dts:n.dts,pts:n.pts});return e},h.fb=function(){if(this.i.length&&!this.h.length){for(var e=!1,t=b(this.i),n=t.next();!n.done;n=t.next()){var i=Gt.apply(Ln,J(n.value)),r=To(this,i);n=this.h.length?this.h[this.h.length-1]:null,r&&r.pts!=null&&r.dts!=null&&(!n||n.pts!=r.pts&&n.dts!=r.dts)?(this.h.length&&r.dts<(n.dts||0)&&(e=!0),this.h.push(r)):this.h.length&&(i=r?r.data:i)&&(n=this.h.pop(),n.data=Gt(n.data,i),this.h.push(n))}e&&(this.h=this.h.sort(function(l,c){var f=(l.pts||0)-(c.pts||0);return(l.dts||0)-(c.dts||0)||f}))}return this.h},h.wc=function(e){if(e=e===void 0?!0:e,this.j.length&&!this.g.length){for(var t=!1,n=b(this.j),i=n.next();!i.done;i=n.next()){var r=Gt.apply(Ln,J(i.value)),l=To(this,r);i=this.g.length?this.g[this.g.length-1]:null,l&&l.pts!=null&&l.dts!=null&&(!i||i.pts!=l.pts&&i.dts!=l.dts)?(this.g.length&&l.dts<(i.dts||0)&&(t=!0),this.g.push(l)):this.g.length&&(r=l?l.data:r)&&(i=this.g.pop(),i.data=Gt(i.data,r),this.g.push(i))}if(e){for(n={Dd:null,state:null},i=[],r=b(this.g),l=r.next();!l.done;l=r.next())l=l.value,l.nalus=this.Xf(l,n),l.nalus.length&&(i.push(l),n.Dd=l.nalus[l.nalus.length-1]);this.g=i}t&&(this.g=this.g.sort(function(c,f){var y=(c.pts||0)-(f.pts||0);return(c.dts||0)-(f.dts||0)||y}))}return e?this.g:(e=this.g,this.g=[],e)},h.getStartTime=function(e){if(e=="audio"){e=null;var t=this.fb();return t.length&&(e=t[0],e=Math.min(e.dts,e.pts)/9e4),e}return e=="video"?(e=null,t=this.wc(!1),t.length&&(e=t[0],e=Math.min(e.dts,e.pts)/9e4),e):null},h.od=function(){return{audio:this.A,video:this.m}},h.be=function(){for(var e=[],t=b(this.wc()),n=t.next();!n.done;n=t.next())e.push.apply(e,J(n.value.nalus));return e},h.Mi=function(){Ot("TsParser.getVideoResolution","Please use getVideoInfo function instead.");var e=this.Kf();return{height:e.height,width:e.width}},h.Kf=function(){return this.m=="hvc"?dm(this):Vh(this)};function Yn(e){var t=e.wc();return 1<t.length&&(e=t[0].pts,t=t[1].pts,!isNaN(t-e))?String(1/(t-e)*9e4):null}function Vh(e){var t={height:null,width:null,codec:null,frameRate:null},n=e.be();if(!n.length||(n=n.find(function(R){return R.type==7}),!n))return t;n=new Ir(n.data);var i=Rt(n),r=Rt(n),l=Rt(n);if(Mn(n),pm.includes(i)){var c=Le(n);if(c===3&&Ui(n,1),Mn(n),Mn(n),Ui(n,1),Ke(n)){c=c!==3?8:12;for(var f=0;f<c;f++)Ke(n)&&(6>f?Bs(n,16):Bs(n,64))}}if(Mn(n),c=Le(n),c===0)Le(n);else if(c===1)for(Ui(n,1),Mn(n),Mn(n),c=Le(n),f=0;f<c;f++)Mn(n);Mn(n),Ui(n,1),c=Le(n),f=Le(n);var y=mt(n,1);y===0&&Ui(n,1),Ui(n,1);var m=0,T=0,x=0,D=0;return Ke(n)&&(m=Le(n),T=Le(n),x=Le(n),D=Le(n)),t.height=String((2-y)*(f+1)*16-2*x-2*D),t.width=String(16*(c+1)-2*m-2*T),t.codec="avc1."+("0"+i.toString(16).toUpperCase()).slice(-2)+("0"+r.toString(16).toUpperCase()).slice(-2)+("0"+l.toString(16).toUpperCase()).slice(-2),t.frameRate=Yn(e),t}function dm(e){var t={height:null,width:null,codec:null,frameRate:null},n=e.be();if(!n.length||(n=n.find(function(Z){return Z.type==33}),!n))return t;var i=new Ir(n.fullData,!0);Rt(i),Rt(i),mt(i,4);var r=mt(i,3);Ke(i);var l=mt(i,2),c=mt(i,1),f=mt(i,5),y=mt(i,32);n=Rt(i);for(var m=Rt(i),T=Rt(i),x=Rt(i),D=Rt(i),R=Rt(i),N=Rt(i),U=[],L=[],j=0;j<r;j++)U.push(Ke(i)),L.push(Ke(i));if(0<r)for(j=r;8>j;j++)mt(i,2);for(j=0;j<r;j++)U[j]&&mt(i,88),L[j]&&Rt(i);Le(i),r=Le(i),r==3&&mt(i,1),U=Le(i),L=Le(i);var V=j=0,X=0,G=0;return Ke(i)&&(j+=Le(i),V+=Le(i),X+=Le(i),G+=Le(i)),t.width=String(U-(j+V)*(r===1||r===2?2:1)),t.height=String(L-(X+G)*(r===1?2:1)),i=function(Z){for(var q=0,K=0;32>K;K++)q|=(Z>>K&1)<<31-K;return q>>>0}(y),c=c==1?"H":"L",l="hvc1"+("."+["","A","B","C"][l]+f),l+="."+i.toString(16).toUpperCase(),l+="."+c+N,R&&(l+="."+R.toString(16).toUpperCase()),D&&(l+="."+D.toString(16).toUpperCase()),x&&(l+="."+x.toString(16).toUpperCase()),T&&(l+="."+T.toString(16).toUpperCase()),m&&(l+="."+m.toString(16).toUpperCase()),n&&(l+="."+n.toString(16).toUpperCase()),t.codec=l,t.frameRate=Yn(e),t}function mi(e,t){var n=1;for(e>t&&(n=-1);4294967296<Math.abs(t-e);)e+=8589934592*n;return e}function Vs(e){return!(0>_d(e))}function _d(e){for(var t=Math.min(1e3,e.length-564),n=0;n<t;){if(e[n]==71&&e[n+188]==71&&e[n+376]==71)return n;n++}return-1}Pe("shaka.util.TsParser",$t),$t.syncOffset=_d,$t.probe=Vs,$t.prototype.getVideoInfo=$t.prototype.Kf,$t.prototype.getVideoResolution=$t.prototype.Mi,$t.prototype.getVideoNalus=$t.prototype.be,$t.prototype.getCodecs=$t.prototype.od,$t.prototype.getStartTime=$t.prototype.getStartTime,$t.prototype.getVideoData=$t.prototype.wc,$t.prototype.getAudioData=$t.prototype.fb,$t.prototype.getMetadata=$t.prototype.getMetadata,$t.prototype.parseNalus=$t.prototype.Xf,$t.prototype.parseAvcNalus=$t.prototype.hj,$t.prototype.parse=$t.prototype.parse,$t.prototype.clearData=$t.prototype.clearData,$t.Timescale=9e4;var pm=[100,110,122,244,44,83,86,118,128,138,139,134];function Nn(e,t,n,i){var r=this;this.g=e,this.K=n,this.A=null,this.ea=t,this.l=new Map,this.B=new Map,this.Aa=new Map,this.h=null,this.Ea=!1,this.I=i||null,this.u=new Map,this.o=new vt,this.j=new Map,this.L=null,this.G=new kt,this.Ga="",this.Na=!1,this.sa=!0,this.$=!1,this.C=this.M=null,this.i=ji(this,this.G),this.ya=this.H=!1,this.O=new Is(function(){return j0(r)}),this.F=!1,this.P="UNKNOWN",this.La=this.Ma=!1,this.Fa=new kt,this.m=!1,this.pa=null,this.Z=new Map,this.ka=this.T=this.oa=this.W=null,this.fa=new kt,this.g.remote&&(this.$=this.g.remote.state!="disconnected",this.o.D(this.g.remote,"connect",function(){r.$=r.g.remote.state!="disconnected"}),this.o.D(this.g.remote,"connecting",function(){r.$=r.g.remote.state!="disconnected"}),this.o.D(this.g.remote,"disconnect",function(){r.$=r.g.remote.state!="disconnected"}))}function ji(e,t){if(e.sa=!0,w.ManagedMediaSource){e.C||(e.g.disableRemotePlayback=!0);var n=new ManagedMediaSource;e.o.D(n,"startstreaming",function(){e.sa=!0}),e.o.D(n,"endstreaming",function(){e.sa=!1})}else n=new MediaSource;return e.o.ma(n,"sourceopen",function(){URL.revokeObjectURL(e.Ga),t.resolve()}),e.o.ma(e.g,"playing",function(){e.Na=!0}),e.Ga=pf(n),e.g.removeAttribute("src"),e.M&&e.g.removeChild(e.M),e.C&&e.g.removeChild(e.C),e.M=Bh(e.Ga),e.g.appendChild(e.M),e.C&&e.g.appendChild(e.C),e.g.load(),n}function ql(e,t,n){e.g&&w.ManagedMediaSource&&e.i&&(e.C&&e.g.removeChild(e.C),e.C=Bh(t,n),e.g.appendChild(e.C),e.g.disableRemotePlayback=!1)}function hm(e,t){var n,i,r,l,c,f,y,m,T,x,D;return z(function(R){if(R.g==1)return e.createSegmentIndex?_(R,e.createSegmentIndex(),2):R.s(2);if(!e.segmentIndex)return R.return(!1);if(e.segmentIndex.getNumReferences()==0)return R.return(!0);for(n=En,i=new Set,r=b(e.segmentIndex),l=r.next();!l.done;l=r.next())if(c=l.value,f=c.mimeType||e.mimeType||"",y=c.codecs||e.codecs||"",(f!=e.mimeType||y!=e.codecs)&&(m=f+":"+y,!i.has(m))){if(i.add(m),t==n.za){if(T=hn(f,y),!Dl(T))return R.return(!1)}else if(t==n.la?y=Ts(y):t==n.V&&(y=ai(y,f)),x=ld(e,f,y),D=fo(f,y),!Un(x)&&!Cl(D))return R.return(!1)}return R.return(!0)})}function ym(){var e='video/mp4; codecs="avc1.42E01E",video/mp4; codecs="avc3.42E01E",video/mp4; codecs="hev1.1.6.L93.90",video/mp4; codecs="hvc1.1.6.L93.90",video/mp4; codecs="hev1.2.4.L153.B0"; eotf="smpte2084",video/mp4; codecs="hvc1.2.4.L153.B0"; eotf="smpte2084",video/mp4; codecs="vp9",video/mp4; codecs="vp09.00.10.08",video/mp4; codecs="av01.0.01M.08",video/mp4; codecs="dvh1.05.01",video/mp4; codecs="dvh1.20.01",audio/mp4; codecs="mp4a.40.2",audio/mp4; codecs="ac-3",audio/mp4; codecs="ec-3",audio/mp4; codecs="ac-4.02.01.01",audio/mp4; codecs="opus",audio/mp4; codecs="flac",audio/mp4; codecs="dtsc",audio/mp4; codecs="dtse",audio/mp4; codecs="dtsx",video/webm; codecs="vp8",video/webm; codecs="vp9",video/webm; codecs="vp09.00.10.08",audio/webm; codecs="vorbis",audio/webm; codecs="opus",video/mp2t; codecs="avc1.42E01E",video/mp2t; codecs="avc3.42E01E",video/mp2t; codecs="hvc1.1.6.L93.90",video/mp2t; codecs="mp4a.40.2",video/mp2t; codecs="ac-3",video/mp2t; codecs="ec-3",text/vtt,application/mp4; codecs="wvtt",application/ttml+xml,application/mp4; codecs="stpp"'.split(",").concat(J(po)),t={};e=b(e);for(var n=e.next();!n.done;n=e.next()){n=n.value,Dl(n)?t[n]=!0:t[n]=oo()?Un(n)||!!Cl(n):Dc(n);var i=n.split(";")[0];t[i]=t[i]||t[n]}return t}h=Nn.prototype,h.destroy=function(){return this.O.destroy()};function j0(e){var t,n,i,r,l,c,f,y,m,T,x,D,R,N,U;return z(function(L){if(L.g==1){for(t=[],n=b(e.u),i=n.next();!i.done;i=n.next())for(r=i.value,l=b(r),c=l.next().value,f=l.next().value,y=f[0],m=c,e.u.set(m,f.slice(0,1)),y&&t.push(y.p.catch(Ng)),T=b(f.slice(1)),x=T.next();!x.done;x=T.next())D=x.value,D.p.reject(new Y(2,7,7003,void 0));return e.h&&t.push(e.h.destroy()),_(L,Promise.all(t),2)}for(R=b(e.j.values()),N=R.next();!N.done;N=R.next())U=N.value,U.destroy();e.o&&(e.o.release(),e.o=null),e.g&&e.C&&e.g.removeChild(e.C),e.g&&e.M&&(e.g.removeChild(e.M),e.g.load(),e.g.disableRemotePlayback=!1),e.g=null,e.M=null,e.C=null,e.A=null,e.i=null,e.h=null,e.ea=null,e.l.clear(),e.Aa.clear(),e.j.clear(),e.L=null,e.u.clear(),e.I=null,e.Z.clear(),e.K=null,se(L)})}h.init=function(e,t,n,i){t=t===void 0?!1:t,n=n===void 0?"UNKNOWN":n,i=i===void 0?!1:i;var r=this,l,c,f,y,m,T;return z(function(x){switch(x.g){case 1:return l=En,_(x,r.G,2);case 2:if(!Ea(r)&&!Ii(r)){x.s(3);break}return no("Expected MediaSource to be open during init(); reopening the media source."),r.G=new kt,r.i=ji(r,r.G),_(x,r.G,3);case 3:r.F=t,r.P=n,r.Ma=i,r.La=!r.F&&r.P=="HLS"&&!r.Ma,r.Z.clear(),r.W=null,r.oa=null,r.T=null,r.ka=null,r.fa=new kt,c=b(e.keys()),f=c.next();case 5:if(f.done){x.s(7);break}return y=f.value,m=e.get(y),_(x,Hs(r,y,m,m.codecs),8);case 8:r.m?(r.u.set(l.V,[]),r.u.set(l.la,[])):r.u.set(y,[]),f=c.next(),x.s(5);break;case 7:(T=e.get(l.V))&&T.isAudioMuxedInVideo&&(r.m=!0),se(x)}})};function Hs(e,t,n,i){var r,l,c,f,y,m,T,x,D,R,N,U;return z(function(L){switch(L.g){case 1:return r=En,l=Bp,c=Vp,_(L,hm(n,t),2);case 2:if(c.call(l,L.h,"Type negotiation should happen before MediaSourceEngine.init!"),t==r.V&&i&&(i=ai(i,n.mimeType)),f=hn(n.mimeType,i),t==r.za){sr(e,f,e.F,n.external),L.s(0);break}if(y=e.A.forceTransmux,(!Un(f)||!e.F&&po.includes(f))&&(y=!0),m=fo(n.mimeType,i),!y){L.s(4);break}if(T=pi(r.V,(i||"").split(",")),x=pi(r.la,(i||"").split(",")),!T||!x){L.s(5);break}return e.m=!0,_(L,Hs(e,r.V,n,T),6);case 6:return _(L,Hs(e,r.la,n,x),7);case 7:return L.return();case 5:(D=Cl(m))&&(R=D(),e.j.set(t,R),f=R.convertCodecs(t,m));case 4:N=f+e.A.addExtraFeaturesToSourceBuffer(f),ct(e.O);try{U=e.i.addSourceBuffer(N)}catch(j){throw new Y(2,3,3015,j,"The mediaSource_ status was "+e.i.readyState+" expected 'open'",null)}e.F&&(U.mode=Fl),e.o.D(U,"error",function(){var j=e.u.get(t)[0];j.p.reject(new Y(2,3,3014,e.g.error?e.g.error.code:0,j.uri))}),e.o.D(U,"updateend",function(){return Kr(e,t)}),e.l.set(t,U),e.B.set(t,f),e.Aa.set(t,!!n.drmInfos.length),se(L)}})}h.configure=function(e){this.A=e,this.h&&(this.h.A=e.modifyCueCallback)};function ur(e){return e.sa&&!e.$&&!e.H}function sr(e,t,n,i){e.h||(e.h=new ho(e.ea),e.h&&(e.h.A=e.A.modifyCueCallback));var r=e.h;i=i||e.Ea,e=e.P,t=="application/cea-608"||t=="application/cea-708"?r.i=null:(r.i=Ar.get(t)(),r.i.setSequenceMode?r.i.setSequenceMode(n):Ot("Text parsers w/ setSequenceMode",'Text parsers should have a "setSequenceMode" method!'),r.i.setManifestType?r.i.setManifestType(e):Ot("Text parsers w/ setManifestType",'Text parsers should have a "setManifestType" method!'),r.B=i)}function Ea(e){return e.H?!1:e.i?e.i.readyState=="ended":!0}function Ii(e){return e.H?!1:e.i?e.i.readyState=="closed":!0}function Ud(e,t){return e.l.size?t==at?e=e.h.g:(e=Dr(e,t),e=!e||hu(e)?null:e.length==1&&0>e.start(0)?0:e.length?e.start(0):null):e=null,e}function cr(e,t){return e.l.size?t==at?e.h.h:Nd(Dr(e,t)):null}function vu(e,t,n){return t==at?(e=e.h,e.h==null||e.h<n?0:e.h-Math.max(n,e.g)):(e=Dr(e,t),jh(e,n))}h.Fb=function(){var e={total:this.H?[]:wo(this.g.buffered),audio:wo(Dr(this,"audio")),video:wo(Dr(this,"video")),text:[]};if(this.h){var t=this.h.g,n=this.h.h;t!=null&&n!=null&&e.text.push({start:t,end:n})}return e};function Dr(e,t){if(e.H||e.$)return null;try{return e.l.get(t).buffered}catch{return e.l.has(t),null}}function Hh(e,t,n,i,r,l){var c=null,f=[],y=Ze(n);if(po.includes(l))t=yu(y),t.length&&i&&((n=t.find(function(R){return R.description==="com.apple.streaming.transportStreamTimestamp"}))&&(c=Math.round(n.data)/1e3),e.K.onMetadata([{cueTime:i.startTime,data:y,frames:t,dts:i.startTime,pts:i.startTime}],0,i.endTime));else if(l.includes("/mp4")&&i&&i.Y&&i.Y.timescale){var m=i.Y.timescale;if(!isNaN(m)){var T=r.emsgSchemeIdUris!=null&&0<r.emsgSchemeIdUris.length||e.A.dispatchAllEmsgBoxes,x=0,D=!1;y=new jt,T&&y.R("emsg",function(R){var N=r.emsgSchemeIdUris;if(R.version===0)var U=R.reader.Cc(),L=R.reader.Cc(),j=R.reader.S(),V=R.reader.S(),X=R.reader.S(),G=R.reader.S(),Z=i.startTime+V/j;else j=R.reader.S(),Z=R.reader.bd()/j+i.timestampOffset,V=Z-i.startTime,X=R.reader.S(),G=R.reader.S(),U=R.reader.Cc(),L=R.reader.Cc();R=R.reader.Cb(R.reader.getLength()-R.reader.Ba()),(N&&N.includes(U)||e.A.dispatchAllEmsgBoxes)&&(U=="urn:mpeg:dash:event:2012"?e.K.gj():(N=Z+X/j,j={startTime:Z,endTime:N,schemeIdUri:U,value:L,timescale:j,presentationTimeDelta:V,eventDuration:X,id:G,messageData:R},G=new Map().set("detail",j),new ke("emsg",G).cancelable=!0,e.K.ej(j),(U=="https://aomedia.org/emsg/ID3"||U=="https://developer.apple.com/streaming/emsg-id3")&&(U=yu(R),U.length&&e.K.onMetadata([{cueTime:Z,data:R,frames:U,dts:Z,pts:Z}],0,N))))}),y.R("prft",function(R){var N=R.reader,U=R.version;N.S(),R=N.S();var L=N.S();R=1e3*R+L/Math.pow(2,32)*1e3,U===0?N=N.S():(U=N.S(),N=N.S(),N=U*Math.pow(2,32)+N),R=new Date(new Date(Date.UTC(1900,0,1,0,0,0)).getTime()+R).getTime(),N=new Map().set("detail",{wallClockTime:R,programStartDate:new Date(R-N/m*1e3)}),N=new ke("prft",N),e.K.onEvent(N)}).box("moof",$e).box("traf",$e).R("tfdt",function(R){D||(x=fu(R.reader,R.version).baseMediaDecodeTime/m,D=!0,T||R.parser.stop())}).parse(n,!0),D&&i.timestampOffset==0&&(c=x)}}else l.includes("/mp4")||l.includes("/webm")||!Vs(y)||(e.Z.has(t)?e.Z.get(t).clearData():e.Z.set(t,new $t),f=e.Z.get(t).parse(y),y=f.getStartTime(t),y!=null&&(c=y),f=f.getMetadata());return{timestamp:c,metadata:f}}function Ks(e,t,n,i,r,l,c,f,y,m){c=c===void 0?!1:c,f=f===void 0?!1:f,y=y===void 0?!1:y,m=m===void 0?!1:m;var T,x,D,R,N,U,L,j,V,X,G,Z,q,K,W,Q,oe;return z(function(ne){switch(ne.g){case 1:if(T=En,t!=T.za){ne.s(2);break}if(e.P!="HLS"){ne.s(3);break}return _(ne,e.Fa,4);case 4:x=ne.h,e.h.u=x;case 3:return _(ne,ud(e.h,n,i?i.startTime:null,i?i.endTime:null,i?i.N()[0]:null),5);case 5:return ne.return();case 2:if(m||!e.m){ne.s(6);break}return _(ne,Ks(e,T.V,n,i,r,l,c,f,y,!0),7);case 7:return _(ne,Ks(e,T.la,n,i,r,l,c,f,y,!0),8);case 8:return ne.return();case 6:if(!e.l.has(t))return ne.return();if(D=e.l.get(t).timestampOffset,R=e.B.get(t),e.j.has(t)&&(R=e.j.get(t).getOriginalMimeType()),i&&(N=Hh(e,t,n,i,r,R),U=N.timestamp,L=N.metadata,U!=null&&(e.W==null&&t==T.la&&(e.W=U,e.oa=i.startTime,e.T!=null&&(j=0,e.oa==e.ka&&(j=e.W-e.T),e.fa.resolve(j))),e.T==null&&t==T.V&&(e.T=U,e.ka=i.startTime,e.W!=null&&(V=0,e.oa==e.ka&&(V=e.W-e.T),e.fa.resolve(V))),X=U,G=po,!e.F&&G.includes(e.B.get(t))&&(X=0),Z=i.startTime-X,q=Math.abs(D-Z),(.001<=q||c||f)&&(!y||0<Z||!D)&&(D=Z,e.La&&(Vn(e,t,function(){return $o(e,t)},null),Vn(e,t,function(){return wu(e,t,D)},null))),(t==T.la||!e.l.has(T.la))&&e.Fa.resolve(D)),L.length)&&e.K.onMetadata(L,D,i?i.endTime:null),l&&t==T.la&&(e.h||sr(e,"application/cea-608",e.F,!1),e.L||(K=R.split(";",1)[0],e.L=new rr(K)),i?(W=e.L.i(n),W.length&&Ol(e.h,W,i.startTime,i.endTime,D)):e.L.init(n,f)),!e.j.has(t)){ne.s(9);break}return _(ne,e.j.get(t).transmux(n,r,i,e.i.duration,t),10);case 10:n=ne.h;case 9:if(n=On(e,r,n,i,t),!i||!e.F||t==T.za){ne.s(11);break}if(!c&&!f){ne.s(11);break}if(Q=i.startTime,e.P!="HLS"||e.m||t!=T.V||!e.l.has(T.la)){ne.s(13);break}return _(ne,e.fa,14);case 14:oe=ne.h,.15<Math.abs(oe)&&(Q-=oe);case 13:Vn(e,t,function(){return $o(e,t)},null),Vn(e,t,function(){return wu(e,t,Q)},null);case 11:return _(ne,Vn(e,t,function(){var re=n;e.I&&ns(e.I,re,D,r),e.l.get(t).appendBuffer(re)},i?i.N()[0]:null),15);case 15:se(ne)}})}function Zo(e,t){var n=cr(e,"video")||0;Er(e.h,t,n)}function gm(e){e.h&&Er(e.h,"",0)}h.remove=function(e,t,n){var i=this,r;return z(function(l){return l.g==1?(r=En,e==r.za?_(l,i.h.remove(t,n),0):n>t?_(l,Vn(i,e,function(){return ff(i,e,t,n)},null),5):l.s(0)):i.m?_(l,Vn(i,r.V,function(){return ff(i,r.V,t,n)},null),0):l.s(0)})};function Su(e,t){var n;return z(function(i){return i.g==1?(n=En,t==n.za?e.h?_(i,e.h.remove(0,1/0),0):i.return():_(i,Vn(e,t,function(){return ff(e,t,0,e.i.duration)},null),4)):e.m?_(i,Vn(e,n.V,function(){return ff(e,n.V,0,e.i.duration)},null),0):i.s(0)})}h.flush=function(e){var t=this,n;return z(function(i){return i.g==1?(n=En,e==n.za?i.return():_(i,Vn(t,e,function(){t.g.currentTime-=.001,Kr(t,e)},null),2)):t.m?_(i,Vn(t,n.V,function(){var r=n.V;t.g.currentTime-=.001,Kr(t,r)},null),0):i.s(0)})};function sf(e,t,n,i,r,l,c,f,y){var m,T,x;return z(function(D){return D.g==1?(m=En,t==m.za?(l||(e.h.u=n),jr(e.h,i,r),D.return()):(T=[],_(D,Aa(e,t,c,f,y),2))):(x=D.h,x||(T.push(Vn(e,t,function(){return $o(e,t)},null)),e.m&&T.push(Vn(e,m.V,function(){return $o(e,m.V)},null))),l||(T.push(Vn(e,t,function(){return wu(e,t,n)},null)),e.m&&T.push(Vn(e,m.V,function(){return wu(e,m.V,n)},null))),(i!=0||r!=1/0)&&(T.push(Vn(e,t,function(){var R=e.l.get(t);R.appendWindowStart=0,R.appendWindowEnd=r,R.appendWindowStart=i,Kr(e,t)},null)),e.m&&T.push(Vn(e,m.V,function(){var R=m.V,N=e.l.get(R);N.appendWindowStart=0,N.appendWindowEnd=r,N.appendWindowStart=i,Kr(e,R)},null))),T.length?_(D,Promise.all(T),0):D.s(0))})}function cf(e,t,n){var i,r;return z(function(l){return l.g==1?(i=En,t==i.za||(t==i.la&&(e.Fa=new kt),!e.F||(r=cr(e,t))&&.1>Math.abs(r-n))?l.return():(Vn(e,t,function(){return $o(e,t)},null),e.m&&Vn(e,i.V,function(){return $o(e,i.V)},null),_(l,Vn(e,t,function(){return wu(e,t,n)},null),2))):e.m?_(l,Vn(e,i.V,function(){return wu(e,i.V,n)},null),0):l.s(0)})}h.endOfStream=function(e){var t=this;return z(function(n){return _(n,df(t,function(){Ea(t)||Ii(t)||(e?t.i.endOfStream(e):t.i.endOfStream())}),0)})},h.bb=function(e){var t=this;return z(function(n){return _(n,df(t,function(){if(e<t.i.duration)for(var i=b(t.l.keys()),r=i.next();!r.done;r=i.next()){r=r.value;var l={start:function(){},p:new kt,uri:null};t.u.get(r).unshift(l)}t.i.duration=e,t.pa=e}),0)})},h.getDuration=function(){return this.i.duration};function qs(e,t,n){z(function(i){return Ea(e)||Ii(e)?i.return():_(i,df(e,function(){Ea(e)||Ii(e)||e.i.setLiveSeekableRange(t,n)}),0)})}function jd(e){z(function(t){return Ea(e)||Ii(e)?t.return():_(t,df(e,function(){Ea(e)||Ii(e)||e.i.clearLiveSeekableRange()}),0)})}function ff(e,t,n,i){i<=n?Kr(e,t):e.l.get(t).remove(n,i)}function $o(e,t){var n=e.l.get(t),i=n.appendWindowStart,r=n.appendWindowEnd;n.abort(),n.appendWindowStart=i,n.appendWindowEnd=r,Kr(e,t)}function wu(e,t,n){0>n&&(n+=.001);var i=!0;e.P=="HLS"&&(i=cr(e,t),i=!i||.15<Math.abs(i-n)),i&&(e.l.get(t).timestampOffset=n),Kr(e,t)}function Kr(e,t){if(!e.H){var n=e.u.get(t)[0];n&&(n.p.resolve(),Kh(e,t))}}function Vn(e,t,n,i){return ct(e.O),n={start:n,p:new kt,uri:i},e.u.get(t).push(n),e.u.get(t).length==1&&fn(e,t),n.p}function df(e,t){var n,i,r,l,c,f,y,m,T,x,D,R,N;return z(function(U){switch(U.g){case 1:for(ct(e.O),n=[],i=Array.from(e.l.keys()),r=b(i),l=r.next(),c={};!l.done;c={ready:void 0},l=r.next())f=l.value,c.ready=new kt,y={start:function(L){return function(){return L.ready.resolve()}}(c),p:c.ready,uri:null},m=e.u.get(f),m.push(y),n.push(c.ready),m.length==1&&y.start();return pe(U,2),_(U,Promise.all(n),4);case 4:Ue(U,3);break;case 2:throw T=Me(U),T;case 3:return pe(U,5,6),_(U,t(),6);case 6:for(Te(U),x=b(i),D=x.next();!D.done;D=x.next())R=D.value,Kh(e,R);je(U,0);break;case 5:throw N=Me(U),new Y(2,3,3015,N,e.g.error||"No error in the media element",null)}})}function Kh(e,t){e.u.get(t).shift(),fn(e,t)}function fn(e,t){var n=e.u.get(t)[0];if(n)try{n.start()}catch(i){i.name=="QuotaExceededError"?n.p.reject(new Y(2,3,3017,t)):ur(e)?n.p.reject(new Y(2,3,3015,i,e.g.error||"No error in the media element",n.uri)):n.p.reject(new Y(2,3,3024,t)),Kh(e,t)}}function On(e,t,n,i,r){if(bl(e.B.get(r))!="mp4")return n;var l=i===null,c=e.Aa.get(r),f=e.K.si(),y=!1;return i&&i.Y&&(y=i.Y.encrypted),i=i?i.N()[0]:null,(e=e.A.insertFakeEncryptionInInit&&c)&&(f=Jf(f),e=oi()&&r==="audio"||di()||nr()||zt("SOPOpenBrowser")||ra()&&$u()&&f),e&&(l?n=um(t,n,i):((t=!y)&&(t=oi()&&r==="audio"),t&&(n=Md(n)))),l&&lo()&&(n=cm(n)),n}function Yt(e,t,n,i){return Vn(e,t,function(){if(t!==at){if(e.B.get(t),Sl()){e.j.has(t)&&(e.j.get(t).destroy(),e.j.delete(t)),i&&e.j.set(t,i);var r=n+e.A.addExtraFeaturesToSourceBuffer(n);e.l.get(t).changeType(r),e.B.set(t,n)}Kr(e,t)}},null)}function tn(e,t){var n,i,r,l,c,f,y,m,T,x,D,R,N,U,L,j,V,X,G,Z;return z(function(q){switch(q.g){case 1:if(e.H)return q.return();for(n=En,e.H=!0,e.m=!1,i=e.g.currentTime,r=e.g.autoplay,e.g.paused||(e.ya=!0),e.Na&&(e.g.autoplay=!1),rt(q,2),e.o.Qa(),l=b(e.j.values()),c=l.next();!c.done;c=l.next())f=c.value,f.destroy();for(y=b(e.l.values()),m=y.next();!m.done;m=y.next()){T=m.value;try{e.i.removeSourceBuffer(T)}catch{}}return e.j.clear(),e.l.clear(),x=e.i.duration,e.G=new kt,e.i=ji(e,e.G),_(q,e.G,4);case 4:!isNaN(x)&&x?e.i.duration=x:!isNaN(e.pa)&&e.pa&&(e.i.duration=e.pa),D=new kt,R=e.i.sourceBuffers,N=t.size,U=0,L=function(){U++,U===N&&(D.resolve(),e.o.Ja(R,"addsourcebuffer",L))},e.o.D(R,"addsourcebuffer",L),j=b(t.keys()),V=j.next();case 5:return V.done?((Z=t.get(n.V))&&Z.isAudioMuxedInVideo&&(e.m=!0),e.m&&!e.u.has(n.V)&&e.u.set(n.V,[]),e.g.currentTime=i,_(q,D,2)):(X=V.value,G=t.get(X),_(q,Hs(e,X,G,G.codecs),6));case 6:V=j.next(),q.s(5);break;case 2:Te(q),e.H=!1,ct(e.O),e.o.ma(e.g,"canplaythrough",function(){e.O.g||(e.g.autoplay=r,e.ya&&(e.ya=!1,e.g.play()))}),je(q,0)}})}function dn(e,t){return df(e,function(){return tn(e,t)})}function fr(e,t,n,i){var r=!1,l=pi("audio",(i||"").split(",")),c=pi("video",(i||"").split(",")),f=c;t=="audio"&&(f=l),f||(f=i),i=hn(n,f);var y=e.A.forceTransmux;if((!Un(i)||!e.F&&po.includes(i))&&(y=!0),y&&(e=fo(n,f),n=Cl(e))){var m=n();l&&c&&(r=!0),i=m.convertCodecs(t,e)}return t=gi(jn(i)),{ug:m,Fj:r,Eg:Ri(i),codec:t,mimeType:i}}function Aa(e,t,n,i,r){var l,c,f,y,m,T,x,D,R,N,U,L,j,V;return z(function(X){return X.g==1?(l=En,t==l.za?X.return(!1):(c=gi(jn(e.B.get(t))),f=Ri(e.B.get(t)),y=fr(e,t,n,i),m=y.ug,T=y.Fj,x=y.Eg,D=y.codec,R=y.mimeType,N=!0,T&&e.B.has(l.V)&&(U=fr(e,l.V,n,i),L=gi(jn(e.B.get(l.V))),j=Ri(e.B.get(l.V)),N=L==U.codec&&j==U.Eg,U.ug&&U.ug.destroy()),c===D&&f===x&&N?(e.j.has(t)&&!m?(e.j.get(t).destroy(),e.j.delete(t)):!e.j.has(t)&&m?e.j.set(t,m):m&&(e.j.has(t)&&e.j.get(t).transmux!=m.transmux?(e.j.get(t).destroy(),e.j.delete(t),e.j.set(t,m)):m.destroy()),X.return(!1)):(V=!0,(e.m||T&&m&&!e.j.has(t))&&(V=!1),V&&e.A.codecSwitchingStrategy==="smooth"&&Sl()?_(X,Yt(e,t,R,m),3):(m&&m.destroy(),_(X,dn(e,r),3))))):X.return(!0)})}function Fs(e,t,n,i){if(t==at)var r=!1;else{r=gi(jn(e.B.get(t)));var l=Ri(e.B.get(t)),c=hn(n,i),f=e.A.forceTransmux;(!Un(c)||!e.F&&po.includes(c))&&(f=!0),n=fo(n,i),f&&(f=Cl(n))&&(f=f(),c=f.convertCodecs(t,n),f.destroy()),t=gi(jn(c)),c=Ri(c),r=r!==t||l!==c}return r?e.A.codecSwitchingStrategy!=="smooth"||!Sl()||e.m:!1}var pf=w.URL.createObjectURL,Fl="sequence";function _e(e,t,n){this.i=e,this.C=t,this.o=this.l=1/0,this.h=1,this.g=this.j=null,this.A=0,this.B=!0,this.I=!1,this.H=0,this.F=n===void 0?!0:n,this.G=0,this.u=!1,this.m=e}h=_e.prototype,h.getDuration=function(){return this.l},h.vi=function(){return this.h},h.yh=function(e){this.i=e},h.bb=function(e){this.l=e},h.Bi=function(){return this.i},h.wh=function(e){this.A=e},h.Gc=function(e){e&&!this.B&&(this.I=!0),this.B=e},h.Ce=function(e){this.o=e},h.ae=function(){return this.o},h.jg=function(e){this.C=e},h.li=function(){return this.C},h.kh=function(e,t){if(e.length!=0){var n=(Date.now()+this.A)/1e3;if(e=e.filter(function(r){return r.start+t<n}),e.length!=0){var i=e[e.length-1].end+t;this.ne(e[0].start+t),this.h=e.reduce(function(r,l){return Math.max(r,l.end-l.start)},this.h),this.g=Math.max(this.g,i),this.i!=null&&this.F&&!this.u&&(this.i=n-this.g-this.h)}}},h.Ed=function(e){if(e.length!=0){var t=e[0].startTime,n=e[0].endTime,i=(Date.now()+this.A)/1e3;e=b(e);for(var r=e.next();!r.done;r=e.next())r=r.value,i<r.startTime||(t=Math.min(t,r.startTime),n=Math.max(n,r.endTime),this.h=Math.max(this.h,r.endTime-r.startTime));this.ne(t),this.g=Math.max(this.g,n),this.i!=null&&this.F&&!this.u&&(this.i=i-this.g-this.h)}},h.jh=function(e,t){this.ne(e),t==1/0||this.U()||(this.g=Math.max(this.g,t))},h.wi=function(){return this.g},h.ie=function(){this.u=!0},h.Wi=function(){return this.u},h.xh=function(e){this.m=e},h.ri=function(){return this.m},h.ne=function(e){this.j==null?this.j=e:this.I||(this.j=Math.min(this.j,e))},h.Tf=function(e){this.h=Math.max(this.h,e)},h.offset=function(e){this.j!=null&&(this.j+=e),this.g!=null&&(this.g+=e)},h.U=function(){return this.l==1/0&&!this.B},h.yc=function(){return this.l!=1/0&&!this.B},h.pb=function(){return Math.max(this.H,this.cc()-this.o)},h.Bh=function(e){this.H=e},h.cc=function(){return this.U()||this.yc()?Math.min(Math.max(0,(Date.now()+this.A)/1e3-this.h-this.i)+this.G,this.l):this.g?Math.min(this.g,this.l):this.l},h.qd=function(e){var t=Math.max(this.j,this.H);return this.o==1/0?Math.ceil(1e3*t)/1e3:Math.max(t,Math.min(this.cc()-this.o+e,this.ob()))},h.Hb=function(){return this.qd(0)},h.ob=function(){return Math.max(0,this.cc()-(this.U()||this.yc()?this.C:0))},h.Kh=function(){return!(this.i==null||this.g!=null&&this.F)},h.vh=function(e){this.G=e},h.ii=function(){return this.G},Pe("shaka.media.PresentationTimeline",_e),_e.prototype.getAvailabilityTimeOffset=_e.prototype.ii,_e.prototype.setAvailabilityTimeOffset=_e.prototype.vh,_e.prototype.usingPresentationStartTime=_e.prototype.Kh,_e.prototype.getSeekRangeEnd=_e.prototype.ob,_e.prototype.getSeekRangeStart=_e.prototype.Hb,_e.prototype.getSafeSeekRangeStart=_e.prototype.qd,_e.prototype.getSegmentAvailabilityEnd=_e.prototype.cc,_e.prototype.setUserSeekStart=_e.prototype.Bh,_e.prototype.getSegmentAvailabilityStart=_e.prototype.pb,_e.prototype.isInProgress=_e.prototype.yc,_e.prototype.isLive=_e.prototype.U,_e.prototype.offset=_e.prototype.offset,_e.prototype.notifyMaxSegmentDuration=_e.prototype.Tf,_e.prototype.notifyMinSegmentStartTime=_e.prototype.ne,_e.prototype.getInitialProgramDateTime=_e.prototype.ri,_e.prototype.setInitialProgramDateTime=_e.prototype.xh,_e.prototype.isStartTimeLocked=_e.prototype.Wi,_e.prototype.lockStartTime=_e.prototype.ie,_e.prototype.getMaxSegmentEndTime=_e.prototype.wi,_e.prototype.notifyPeriodDuration=_e.prototype.jh,_e.prototype.notifySegments=_e.prototype.Ed,_e.prototype.notifyTimeRange=_e.prototype.kh,_e.prototype.getDelay=_e.prototype.li,_e.prototype.setDelay=_e.prototype.jg,_e.prototype.getSegmentAvailabilityDuration=_e.prototype.ae,_e.prototype.setSegmentAvailabilityDuration=_e.prototype.Ce,_e.prototype.setStatic=_e.prototype.Gc,_e.prototype.setClockOffset=_e.prototype.wh,_e.prototype.getPresentationStartTime=_e.prototype.Bi,_e.prototype.setDuration=_e.prototype.bb,_e.prototype.setPresentationStartTime=_e.prototype.yh,_e.prototype.getMaxSegmentDuration=_e.prototype.vi,_e.prototype.getDuration=_e.prototype.getDuration;function el(e,t,n,i){var r=this;this.u=i,this.g=e,this.B=t,this.h=n,this.o=new vt,this.l=!1,this.F=e.readyState,this.G=this.C=this.j=0,this.m=qh(this),this.A=!1,this.o.D(e,"waiting",function(){return xo(r)}),this.i=new dt(function(){xo(r)}).ua(this.h.gapJumpTimerTime)}el.prototype.release=function(){this.o&&(this.o.release(),this.o=null),this.i!=null&&(this.i.stop(),this.i=null),this.m&&(this.m.release(),this.m=null),this.g=this.B=this.u=null},el.prototype.qe=function(){this.A=!0,this.i&&this.i.ua(this.h.gapJumpTimerTime),xo(this)};function xo(e){if(e.g.readyState!=0){if(e.g.seeking){if(!e.l)return}else e.l=!1;if(!e.g.paused||e.g.currentTime==e.j&&(e.g.autoplay||e.g.currentTime!=e.j)){e.g.readyState!=e.F&&(e.F=e.g.readyState);var t;if(!(t=!e.m)){t=e.m;var n=t.j,i=Gs(n),r=n.g.currentTime,l=Date.now()/1e3;(t.g!=r||t.m!=i)&&(t.l=l,t.g=r,t.m=i,t.h=!1),r=l-t.l,(i=r>=t.o&&i&&!t.h)&&(t.i&&t.i(t.g,r),t.h=!0,t.g=n.g.currentTime),t=!i}t&&(t=e.g.currentTime,n=e.g.buffered,i=Kl(n,t,e.h.gapDetectionThreshold),i==null||i==0&&!e.A||(r=n.start(i),(l=e.h.gapPadding)&&(r=Math.ceil(100*(r+l))/100),r>=e.B.ob()||.001>r-t||(i!=0&&n.end(i-1),e.g.currentTime=r,t==e.j&&(e.j=r),e.C++,e.u(new ke("gapjumped")))))}}}function qh(e){if(!e.h.stallEnabled)return null;var t=e.h.stallSkip;return new Or(new zs(e.g),e.h.stallThreshold,function(){var n;return z(function(i){if(i.g==1)return n=wo(e.g.buffered),n.length?t?(e.g.currentTime+=t,i.s(2)):_(i,e.g.play(),3):i.return();if(i.g!=2){if(!e.g)return i.return();e.g.pause(),e.g.play()}e.G++,e.u(new ke("stalldetected")),se(i)})})}function Or(e,t,n){this.j=e,this.m=Gs(e),this.g=e.g.currentTime,this.l=Date.now()/1e3,this.h=!1,this.o=t,this.i=n}Or.prototype.release=function(){this.i=this.j=null};function zs(e){this.g=e}function Gs(e){if(e.g.paused||e.g.playbackRate==0||e.g.buffered.length==0)var t=!1;else e:{t=e.g.currentTime,e=b(wo(e.g.buffered));for(var n=e.next();!n.done;n=e.next())if(n=n.value,!(t<n.start-.1||t>n.end-.5)){t=!0;break e}t=!1}return t}function vi(e,t,n,i){t==HTMLMediaElement.HAVE_NOTHING||e.readyState>=t?i():(t=Fh.value().get(t),n.ma(e,t,i))}var Fh=new pl(function(){return new Map([[HTMLMediaElement.HAVE_METADATA,"loadedmetadata"],[HTMLMediaElement.HAVE_CURRENT_DATA,"loadeddata"],[HTMLMediaElement.HAVE_FUTURE_DATA,"canplay"],[HTMLMediaElement.HAVE_ENOUGH_DATA,"canplaythrough"]])});function Bd(e,t,n,i){var r=this;this.g=e,this.m=t,this.u=n,this.l=null,this.j=function(){return r.l==null&&(r.l=i()),r.l},this.o=!1,this.h=new vt,this.i=new Gl(e),vi(this.g,HTMLMediaElement.HAVE_METADATA,this.h,function(){zl(r,r.j())})}Bd.prototype.release=function(){this.h&&(this.h.release(),this.h=null),this.i!=null&&(this.i.release(),this.i=null),this.m=function(){},this.g=null};function Xs(e){return e.o?e.g.currentTime:e.j()}function hf(e,t){0<e.g.readyState?Tu(e.i,t):vi(e.g,HTMLMediaElement.HAVE_METADATA,e.h,function(){zl(e,e.j())})}function zl(e,t){.001>Math.abs(e.g.currentTime-t)?Di(e):(e.h.ma(e.g,"seeking",function(){Di(e)}),Tu(e.i,e.g.currentTime&&e.g.currentTime!=0?e.g.currentTime:t))}function Di(e){e.o=!0,e.h.D(e.g,"seeking",function(){return e.m()}),e.u(e.g.currentTime)}function Gl(e){var t=this;this.g=e,this.m=10,this.j=this.l=this.i=0,this.h=new dt(function(){0>=t.i||t.g.currentTime!=t.l||t.g.currentTime===t.j?t.h.stop():(t.g.currentTime=t.j,t.i--)})}Gl.prototype.release=function(){this.h&&(this.h.stop(),this.h=null),this.g=null};function Tu(e,t){e.l=e.g.currentTime,e.j=t,e.i=e.m,e.g.currentTime=t,e.h.ua(.1)}function xu(e){this.h=e,this.j=!1,this.g=null,this.i=new vt}h=xu.prototype,h.ready=function(){function e(){if(t.g==null||t.g==0&&t.h.duration!=1/0)t.j=!0;else{var n=t.h.currentTime,i=t.g;0>t.g&&(i=Math.max(0,n+t.g)),n!=i?(t.i.ma(t.h,"seeking",function(){t.j=!0}),t.h.currentTime=i):t.j=!0}}var t=this;vi(this.h,HTMLMediaElement.HAVE_CURRENT_DATA,this.i,function(){e()})},h.release=function(){this.i&&(this.i.release(),this.i=null),this.h=null},h.af=function(e){this.g=this.j?this.g:e},h.Od=function(){return(this.j?this.h.currentTime:this.g)||0},h.Ag=function(){return 0},h.zg=function(){return 0},h.ih=function(){};function Vd(e,t,n,i,r,l){var c=this;this.i=e,this.g=t.presentationTimeline,this.l=n,this.u=r,this.o=null,this.j=new el(e,t.presentationTimeline,n,l),this.h=new Bd(e,function(){e:{var f=c.j;f.l=!0,f.A=!1,f.i&&f.i.ua(f.h.gapJumpTimerTime),xo(f);var y=Xs(c.h);if(f=zh(c,y),!rs()&&.001<Math.abs(f-y)){if(y=!1,!ir()||ir()&&yl())y=!0;else{var m=Date.now()/1e3,T=ir()&&es()?3:1;(!c.o||c.o<m-T)&&(c.o=m,y=!0)}if(y){hf(c.h,f),f=void 0;break e}}c.u(),f=void 0}return f},function(f){var y=c.j;y.g.seeking&&!y.l&&(y.l=!0,y.j=f),y.i&&y.i.ua(y.h.gapJumpTimerTime),xo(y)},function(){var f=i;return f==null?f=1/0>c.g.getDuration()?c.g.Hb():c.g.ob():0>f&&(f=c.g.ob()+f),Hd(c,Ys(c,f))}),this.m=new dt(function(){if(c.i.readyState!=0&&!c.i.paused){var f=Xs(c.h),y=c.g.Hb(),m=c.g.ob();3>m-y&&(y=m-3),f<y&&(f=zh(c,f),c.i.currentTime=f)}})}h=Vd.prototype,h.ready=function(){this.m.ua(.25)},h.release=function(){this.h&&(this.h.release(),this.h=null),this.j&&(this.j.release(),this.j=null),this.m&&(this.m.stop(),this.m=null),this.i=this.h=this.g=this.l=null,this.u=function(){}},h.af=function(e){hf(this.h,e)},h.Od=function(){var e=Xs(this.h);return 0<this.i.readyState&&!this.i.paused?Ys(this,e):e},h.Ag=function(){return this.j.G},h.zg=function(){return this.j.C},h.ih=function(){this.j.qe()};function Hd(e,t){var n=e.g.getDuration();return t>=n?n-e.l.durationBackoff:t}function zh(e,t){var n=e.l.rebufferingGoal,i=e.l.safeSeekOffset,r=e.g.Hb(),l=e.g.ob(),c=e.g.getDuration();3>l-r&&(r=l-3);var f=e.g.qd(n),y=e.g.qd(i);return n=e.g.qd(n+i),t>=c?Hd(e,t):t>l?l-e.l.safeSeekEndOffset:t<r?af(e.i.buffered,y)?y:n:t>=f||af(e.i.buffered,t)?t:n}function Ys(e,t){var n=e.g.Hb();return t<n?n:(e=e.g.ob(),t>e?e:t)}function Dt(e){this.g=e,this.m=null,this.i=0,this.o=!1}h=Dt.prototype,h.getNumReferences=function(){return this.g.length},h.getNumEvicted=function(){return this.i},h.release=function(){this.o||(this.g=[],this.m&&this.m.stop(),this.m=null)},h.bj=function(){this.o=!0},h.Eb=function(e){for(var t=b(this.g),n=t.next();!n.done;n=t.next())e(n.value)};function Hn(e){return e.g[0]||null}h.find=function(e){for(var t=this.g.length-1,n=t;0<=n;--n){var i=this.g[n],r=n<t?this.g[n+1].startTime:i.endTime;if(e>=i.startTime&&e<r)return n+this.i}return this.g.length&&e<this.g[0].startTime?this.i:null},h.get=function(e){return this.g.length==0?null:(e-=this.i,0>e||e>=this.g.length?null:this.g[e])},h.offset=function(e){if(!this.o)for(var t=b(this.g),n=t.next();!n.done;n=t.next())n.value.offset(e)},h.ke=function(e){if(!this.o&&e.length){var t=Math.round(1e3*e[0].startTime)/1e3;this.g=this.g.filter(function(n){return Math.round(1e3*n.startTime)/1e3<t}),this.g.push.apply(this.g,J(e))}},h.Bd=function(e,t){var n=this;e=e.filter(function(i){return i.endTime>t&&(n.g.length==0||i.endTime>n.g[0].startTime)}),this.ke(e),this.Oa(t)},h.Oa=function(e){if(!this.o){var t=this.g.length;this.g=this.g.filter(function(n){return n.endTime>e}),this.i+=t-this.g.length}},h.Oc=function(e,t,n){if(n=n===void 0?!1:n,!this.o){for(;this.g.length&&this.g[this.g.length-1].startTime>=t;)this.g.pop();for(;this.g.length&&this.g[0].endTime<=e;)this.g.shift(),n||this.i++;this.g.length!=0&&(e=this.g[this.g.length-1],t=new qe(e.startTime,t,e.C,e.Sa,e.wa,e.Y,e.timestampOffset,e.appendWindowStart,e.appendWindowEnd,e.g,e.tilesLayout,e.B,e.h,e.status,e.aesKey),t.mimeType=e.mimeType,t.codecs=e.codecs,t.i=e.i,this.g[this.g.length-1]=t)}},h.Ie=function(e,t){var n=this;this.o||(this.m&&this.m.stop(),this.m=new dt(function(){var i=t();i?n.g.push.apply(n.g,J(i)):(n.m.stop(),n.m=null)}),this.m.ua(e))},Dt.prototype[Symbol.iterator]=function(){return this.Gb(0)},Dt.prototype.Gb=function(e,t,n){t=t===void 0?!1:t,n=n===void 0?!1:n;var i=this.find(e);if(i==null)return null;var r=this.get(i);n?i++:i--;var l=-1;if(r&&0<r.g.length)for(var c=r.g.length-1;0<=c;--c){var f=r.g[c];if(e>=f.startTime&&e<f.endTime){if(!t){for(;c&&!f.l;)c--,f=r.g[c];if(!f.l)return no("No independent partial segment found!"),null}n?i--:i++,l=c-1;break}}return new Pn(this,i,l,n)};function yf(e,t,n){return e=new qe(e,e+t,function(){return n},0,null,null,e,e,e+t),new Dt([e])}Pe("shaka.media.SegmentIndex",Dt),Dt.forSingleSegment=yf,Dt.prototype.getIteratorForTime=Dt.prototype.Gb,Dt.prototype.updateEvery=Dt.prototype.Ie,Dt.prototype.fit=Dt.prototype.Oc,Dt.prototype.evict=Dt.prototype.Oa,Dt.prototype.mergeAndEvict=Dt.prototype.Bd,Dt.prototype.offset=Dt.prototype.offset,Dt.prototype.get=Dt.prototype.get,Dt.prototype.find=Dt.prototype.find,Dt.prototype.markImmutable=Dt.prototype.bj,Dt.prototype.release=Dt.prototype.release,Dt.prototype.getNumEvicted=Dt.prototype.getNumEvicted,Dt.prototype.getNumReferences=Dt.prototype.getNumReferences;function Pn(e,t,n,i){this.i=e,this.h=t,this.g=n,this.reverse=i}h=Pn.prototype,h.ed=function(e){this.reverse=e},h.di=function(){return this.h},h.current=function(){var e=this.i.get(this.h);return e&&0<e.g.length&&e.A&&this.g>=e.g.length&&(this.h++,this.g=0,e=this.i.get(this.h)),e&&0<e.g.length?e.g[this.g]:e},h.next=function(){var e=this.i.get(this.h);return this.reverse?e&&0<e.g.length?(this.g--,0>this.g&&(this.h--,this.g=(e=this.i.get(this.h))&&0<e.g.length?e.g.length-1:0)):(this.h--,this.g=0):e&&0<e.g.length?(this.g++,e.A&&this.g==e.g.length&&(this.h++,this.g=0)):(this.h++,this.g=0),e=this.current(),{value:e,done:!e}},h.dg=function(){var e=this.current();if(e.o&&!e.l&&(e=this.i.get(this.h))&&0<e.g.length)for(var t=e.g[this.g];t.l&&!(0>=this.g);)this.g--,t=e.g[this.g]},Pe("shaka.media.SegmentIterator",Pn),Pn.prototype.resetToLastIndependent=Pn.prototype.dg,Pn.prototype.next=Pn.prototype.next,Pn.prototype.current=Pn.prototype.current,Pn.prototype.currentPosition=Pn.prototype.di,Pn.prototype.setReverse=Pn.prototype.ed;function sn(){Dt.call(this,[]),this.h=[]}ot(sn,Dt),h=sn.prototype,h.clone=function(){var e=new sn;return e.h=this.h.slice(),e.i=this.i,e},h.release=function(){for(var e=b(this.h),t=e.next();!t.done;t=e.next())t.value.release();this.h=[]},h.Eb=function(e){for(var t=b(this.h),n=t.next();!n.done;n=t.next())n.value.Eb(e)},h.find=function(e){for(var t=this.i,n=b(this.h),i=n.next();!i.done;i=n.next()){i=i.value;var r=i.find(e);if(r!=null)return r+t;t+=i.getNumEvicted()+i.getNumReferences()}return null},h.get=function(e){for(var t=this.i,n=b(this.h),i=n.next();!i.done;i=n.next()){i=i.value;var r=i.get(e-t);if(r)return r;r=i.getNumReferences(),t+=i.getNumEvicted()+r}return null},h.offset=function(){},h.ke=function(){},h.Oa=function(e){for(var t=b(this.h),n=t.next();!n.done;n=t.next())n.value.Oa(e);for(;1<this.h.length&&this.h[0].getNumReferences()==0;)e=this.h.shift(),this.i+=e.getNumEvicted(),e.release()},h.Bd=function(){},h.Oc=function(){},h.Ie=function(){},Pe("shaka.media.MetaSegmentIndex",sn),sn.prototype.updateEvery=sn.prototype.Ie,sn.prototype.fit=sn.prototype.Oc,sn.prototype.mergeAndEvict=sn.prototype.Bd,sn.prototype.evict=sn.prototype.Oa,sn.prototype.merge=sn.prototype.ke,sn.prototype.offset=sn.prototype.offset,sn.prototype.get=sn.prototype.get,sn.prototype.find=sn.prototype.find,sn.prototype.forEachTopLevelReference=sn.prototype.Eb,sn.prototype.release=sn.prototype.release;function Ws(e){var t=this;this.g=e,this.j=!1,this.i=this.g.$d(),this.h=new dt(function(){t.g.gh(.25*t.i)})}Ws.prototype.release=function(){this.set(this.sc()),this.h&&(this.h.stop(),this.h=null),this.g=null},Ws.prototype.set=function(e){this.i=e,Gh(this)},Ws.prototype.sc=function(){return this.g.sc()};function Gh(e){e.h.stop();var t=e.j?0:e.i;if(0<=t)try{e.g.$d()!=t&&e.g.mg(t);return}catch{}e.h.ua(.25),e.g.$d()!=0&&e.g.mg(0)}function tl(e){var t=this;this.j=e,this.h=new vt,this.g=new Set,this.i=new dt(function(){gf(t,!1)}).sb(),e.paused||this.i.ua(.25),this.h.D(e,"playing",function(){t.i.sb().ua(.25)}),this.h.D(e,"pause",function(){t.i.stop()})}tl.prototype.release=function(){this.h&&(this.h.release(),this.h=null),this.i.stop();for(var e=b(this.g),t=e.next();!t.done;t=e.next())t.value.release();this.g.clear()};function gf(e,t){var n=e.j.currentTime;e=b(e.g);for(var i=e.next();!i.done;i=e.next())i.value.j(n,t)}function Qs(e){Ut.call(this),this.g=new Map,this.h=e}ot(Qs,Ut),Qs.prototype.release=function(){this.g.clear(),Ut.prototype.release.call(this)};function Js(e,t){var n=e.g.get(t);return n||(n={Jd:[],mf:null,contentType:t},e.g.set(t,n)),n}function mm(e,t,n){var i=Js(e,t.contentType);vm(e,i),e={Wc:t,position:n},i=i.Jd,t=i.findIndex(function(r){return r.position>=n}),0<=t?i.splice(t,i[t].position==n?1:0,e):i.push(e)}Qs.prototype.j=function(e){for(var t=b(this.g.values()),n=t.next();!n.done;n=t.next()){n=n.value;var i=n.mf;e:{for(var r=n.Jd,l=r.length-1;0<=l;l--){var c=r[l];if(c.position<=e){r=c.Wc;break e}}r=null}l=r&&!(i===r||i&&r&&i.bandwidth==r.bandwidth&&i.audioSamplingRate==r.audioSamplingRate&&i.codecs==r.codecs&&i.contentType==r.contentType&&i.frameRate==r.frameRate&&i.height==r.height&&i.mimeType==r.mimeType&&i.channelsCount==r.channelsCount&&i.pixelAspectRatio==r.pixelAspectRatio&&i.width==r.width),c=r&&i&&r.label&&i.label&&i.label!==r.label;var f=r&&i&&r.language&&i.language&&i.language!==r.language;i=r&&i&&r.roles&&i.roles&&!us(i.roles,r.roles),(c||f||i)&&Xh(this,e,r.contentType)&&(n.mf=r,i=new ke("audiotrackchange",new Map([["quality",r],["position",e]])),this.dispatchEvent(i)),l&&Xh(this,e,r.contentType)&&(n.mf=r,JSON.stringify(r),n=new ke("qualitychange",new Map([["quality",r],["position",e]])),this.dispatchEvent(n))}};function Xh(e,t,n){return!!((e=e.h()[n])&&0<e.length&&(n=e[e.length-1].end,t>=e[0].start&&t<n))}function vm(e,t){if((e=e.h()[t.contentType])&&0<e.length){var n=e[0].start,i=e[e.length-1].end,r=t.Jd;t.Jd=r.filter(function(l,c){return!(l.position<=n&&c+1<r.length&&r[c+1].position<=n||l.position>=i)})}else t.Jd=[]}function Zs(e){var t={bandwidth:e.bandwidth||0,audioSamplingRate:null,codecs:e.codecs,contentType:e.type,frameRate:null,height:null,mimeType:e.mimeType,channelsCount:null,pixelAspectRatio:null,width:null,label:null,roles:e.roles,language:null};return e.type=="video"&&(t.frameRate=e.frameRate||null,t.height=e.height||null,t.pixelAspectRatio=e.pixelAspectRatio||null,t.width=e.width||null),e.type=="audio"&&(t.audioSamplingRate=e.audioSamplingRate,t.channelsCount=e.channelsCount,t.label=e.label||null,t.language=e.language),t}function Eu(e){Ut.call(this),this.h=new Map,this.i=e,this.g=null}ot(Eu,Ut),Eu.prototype.release=function(){this.h.clear(),this.g&&(this.g.stop(),this.g=null),Ut.prototype.release.call(this)};function Yh(e,t){var n=t.schemeIdUri+"_"+t.id+"_"+(t.startTime.toFixed(1)+"_"+t.endTime.toFixed(1));e.h.has(n)||(e.h.set(n,t),t=new ke("regionadd",new Map([["region",t]])),e.dispatchEvent(t),B0(e))}function B0(e){e.g||(e.g=new dt(function(){for(var t=e.i(),n=b(e.h),i=n.next();!i.done;i=n.next()){var r=b(i.value);i=r.next().value,r=r.next().value,r.endTime<t.start&&(e.h.delete(i),i=new ke("regionremove",new Map([["region",r]])),e.dispatchEvent(i))}!e.h.size&&e.g&&(e.g.stop(),e.g=null)}).ua(2))}function Kd(e,t,n,i){this.m=e,this.i=t,this.l=n,this.h=new Map,this.j=new Map,this.g=null,this.o=i}function Sm(e,t){e.l=t,e=b(e.h.values());for(var n=e.next();!n.done;n=e.next())n.value.g=t}function $s(e,t,n){if(n=n===void 0?!1:n,!e.i.segmentIndex||(e.g||(e.g=e.i.segmentIndex.Gb(t,!0,e.o)),!e.g))return Promise.resolve();for(n&&e.g.next(),t=[];e.h.size<e.m&&(n=e.g.next().value,!!n);){var i=!0;n.isPreload()&&n.wa!=null&&(i=!1),n.dc()==2&&(i=!1),n.Ib(!1)&&(i=!1),i&&n.Y&&t.push(Au(e,n.Y)),i&&!e.h.has(n)&&(i=new Fd(e.l),t.push(vf(i,n,e.i)),e.h.set(n,i))}return qd(e),Promise.all(t)}function Au(e,t){if(!e.i.segmentIndex||t.Ib()||Array.from(e.j.keys()).some(function(r){return Us(r,t)}))return Promise.resolve();var n=new Fd(e.l),i=vf(n,t,e.i);return e.j.set(t,n),i}function mf(e,t){t=b(t.keys());for(var n=t.next();!n.done;n=t.next())(n=n.value)&&ec(e,n)}function qr(e){mf(e,e.h),mf(e,e.j),e.g=null}Kd.prototype.Oa=function(e,t){t=t===void 0?!1:t;for(var n=b(this.h.keys()),i=n.next();!i.done;i=n.next())i=i.value,e>i.endTime&&ec(this,i);t&&qd(this)},Kd.prototype.ed=function(e){this.o=e,this.g&&this.g.ed(e)};function qd(e){for(var t=Array.from(e.h.keys()),n=b(e.j.keys()),i=n.next(),r={};!i.done;r={Nf:void 0},i=n.next())r.Nf=i.value,t.some(function(l){return function(c){return Us(c.Y,l.Nf)}}(r))||ec(e,r.Nf)}function Wh(e,t){e.m=t;for(var n=Array.from(e.h.keys());n.length>t;){var i=n.pop();i&&ec(e,i)}qd(e)}function wm(e,t){t&&t!==e.i&&(qr(e),e.i=t)}function ec(e,t){var n=e.h;t instanceof bi&&(n=e.j),e=n.get(t),n.delete(t),e&&e.abort()}function Fd(e){this.g=e,this.Gd=this.pg=null}function vf(e,t,n){var i=new Uint8Array(0);return e.Gd=e.g(t,n,function(r){return z(function(l){if(l.g==1)return 0<i.byteLength?i=Gt(i,r):i=r,e.pg?_(l,e.pg(i),3):l.s(0);i=new Uint8Array(0),se(l)})}),e.Gd.promise.catch(function(r){return r instanceof Y&&r.code==7001?Promise.resolve():Promise.reject(r)})}Fd.prototype.abort=function(){this.Gd&&this.Gd.abort()};function zd(e){var t=Ri(e),n=t.split("/")[0];return e=jn(e),{type:n,mimeType:t,codecs:e,language:null,height:null,width:null,channelCount:null,sampleRate:null,closedCaptions:new Map,Nd:null,colorGamut:null,frameRate:null}}function Tm(e,t,n){function i(K){j=K.name;var W=K.reader;W.skip(24);var Q=W.na(),oe=W.na();W.skip(50),D=String(Q),x=String(oe),K.reader.ta()&&$e(K)}function r(K){var W=du(K.reader);R=W.channelCount,N=W.sampleRate,l(K.name)}function l(K){switch(K=K.toLowerCase(),K){case"avc1":case"avc3":f.push(K+".42E01E"),m=!0;break;case"hev1":case"hvc1":f.push(K+".1.6.L93.90"),m=!0;break;case"dvh1":case"dvhe":f.push(K+".05.04"),m=!0;break;case"vp09":f.push(K+".00.10.08"),m=!0;break;case"av01":f.push(K+".0.01M.08"),m=!0;break;case"mp4a":c.push("mp4a.40.2"),y=!0;break;case"ac-3":case"ec-3":case"ac-4":case"opus":case"flac":c.push(K),y=!0}}var c=[],f=[],y=!1,m=!1,T=null,x=null,D=null,R=null,N=null,U=null,L=null,j;if(new jt().box("moov",$e).box("trak",$e).box("mdia",$e).R("mdhd",function(K){T=$c(K.reader,K.version).language}).box("minf",$e).box("stbl",$e).R("stsd",bn).box("mp4a",function(K){var W=du(K.reader);R=W.channelCount,N=W.sampleRate,K.reader.ta()?$e(K):l(K.name)}).box("esds",function(K){K=K.reader;for(var W="mp4a",Q,oe;K.ta();){Q=K.X();for(var ne=K.X();ne&128;)ne=K.X();if(Q==3)K.na(),ne=K.X(),ne&128&&K.na(),ne&64&&K.skip(K.X()),ne&32&&K.na();else if(Q==4)oe=K.X(),K.skip(12);else if(Q==5)break}oe&&(W+="."+ar(oe),Q==5&&K.ta()&&(Q=K.X(),oe=(Q&248)>>3,oe===31&&K.ta()&&(oe=32+((Q&7)<<3)+((K.X()&224)>>5)),W+="."+oe)),c.push(W),y=!0}).box("ac-3",r).box("ec-3",r).box("ac-4",r).box("Opus",r).box("fLaC",r).box("avc1",i).box("avc3",i).box("hev1",i).box("hvc1",i).box("dva1",i).box("dvav",i).box("dvh1",i).box("dvhe",i).box("vp09",i).box("av01",i).box("avcC",function(K){var W=j||"";switch(j){case"dvav":W="avc3";break;case"dva1":W="avc1"}K=K.reader,K.skip(1),K=W+"."+ar(K.X())+ar(K.X())+ar(K.X()),f.push(K),m=!0}).box("hvcC",function(K){var W=j||"";switch(j){case"dvh1":W="hvc1";break;case"dvhe":W="hev1"}var Q=K.reader;Q.skip(1),K=Q.X();var oe=["","A","B","C"][K>>6],ne=K&31,re=Q.S(),le=(K&32)>>5?"H":"L";K=[Q.X(),Q.X(),Q.X(),Q.X(),Q.X(),Q.X()],Q=Q.X();for(var fe=0,ye=0;32>ye&&(fe|=re&1,ye!=31);ye++)fe<<=1,re>>=1;for(W=W+("."+oe+ne)+("."+ar(fe,!0)),W+="."+le+Q,oe="",ne=K.length;ne--;)((le=K[ne])||oe)&&(oe="."+le.toString(16).toUpperCase()+oe);W+=oe,f.push(W),m=!0}).box("dvcC",function(K){var W=j||"";switch(j){case"hvc1":W="dvh1";break;case"hev1":W="dvhe";break;case"avc1":W="dva1";break;case"avc3":W="dvav";break;case"av01":W="dav1"}var Q=K.reader;Q.skip(2),K=Q.X(),Q=Q.X(),f.push(W+"."+Xn(K>>1&127)+"."+Xn(K<<5&32|Q>>3&31)),m=!0}).box("dvvC",function(K){var W=j||"";switch(j){case"hvc1":W="dvh1";break;case"hev1":W="dvhe";break;case"avc1":W="dva1";break;case"avc3":W="dvav";break;case"av01":W="dav1"}var Q=K.reader;Q.skip(2),K=Q.X(),Q=Q.X(),f.push(W+"."+Xn(K>>1&127)+"."+Xn(K<<5&32|Q>>3&31)),m=!0}).R("vpcC",function(K){var W=j||"",Q=K.reader;K=Q.X();var oe=Q.X();Q=Q.X()>>4&15,f.push(W+"."+Xn(K)+"."+Xn(oe)+"."+Xn(Q)),m=!0}).box("av1C",function(K){var W=j||"";switch(j){case"dav1":W="av01"}var Q=K.reader;Q.skip(1),K=Q.X(),Q=Q.X();var oe=K>>>5,ne=(Q&64)>>6;f.push(W+"."+oe+"."+Xn(K&31)+(Q>>>7?"H":"M")+"."+Xn(oe===2&&ne?(Q&32)>>5?12:10:ne?10:8)+"."+((Q&16)>>4)+"."+((Q&8)>>3)+((Q&4)>>2)+(Q&3)+"."+Xn(1)+"."+Xn(1)+"."+Xn(1)+".0"),m=!0}).box("enca",lu).box("encv",Mi).box("sinf",$e).box("frma",function(K){K=Nh(K.reader).codec,l(K)}).box("colr",function(K){f=f.map(function(oe){if(oe.startsWith("av01.")){var ne=K.reader,re=ne.Ba(),le=ne.Cb(4),fe=String.fromCharCode(le[0]);if(fe+=String.fromCharCode(le[1]),fe+=String.fromCharCode(le[2]),fe+=String.fromCharCode(le[3]),fe==="nclx"){le=ne.na(),fe=ne.na();var ye=ne.na(),de=ne.X()>>7,xe=oe.split(".");xe.length==10&&(xe[6]=Xn(le),xe[7]=Xn(fe),xe[8]=Xn(ye),xe[9]=String(de),oe=xe.join("."))}ne.seek(re)}return oe});var W=Hr(K.reader),Q=W.colorGamut;U=W.Nd,L=Q}).parse(e||t,!0),!c.length&&!f.length)return null;var V=y&&!m,X=new Map;if(m&&!n){n=new rr("video/mp4"),e&&n.init(e);try{n.i(t);for(var G=b(n.j()),Z=G.next();!Z.done;Z=G.next()){var q=Z.value;X.set(q,q)}}catch{}n.g()}return{type:V?"audio":"video",mimeType:V?"audio/mp4":"video/mp4",codecs:mn(c.concat(f)).join(", "),language:T,height:x,width:D,channelCount:R,sampleRate:N,closedCaptions:X,Nd:U,colorGamut:L,frameRate:null}}function mn(e){var t=new Set,n=[];e=b(e);for(var i=e.next();!i.done;i=e.next()){i=i.value;var r=li(i);t.has(r)||(n.push(i),t.add(r))}return t=td("audio",n),i=td("video",n),e=td(at,n),i=Qh(i),t=t.concat(i).concat(e),n.length&&!t.length?n:t}function Qh(e){if(1>=e.length)return e;var t=e.find(function(n){return n.startsWith("dvav.")||n.startsWith("dva1.")||n.startsWith("dvh1.")||n.startsWith("dvhe.")||n.startsWith("dav1.")||n.startsWith("dvc1.")||n.startsWith("dvi1.")});return t?Un('video/mp4; codecs="'+t+'"')?[t]:e.filter(function(n){return n!=t}):e}function V0(e){var t=null;return new jt().box("moov",$e).box("trak",$e).box("mdia",$e).box("minf",$e).box("stbl",$e).R("stsd",bn).box("encv",Mi).box("enca",lu).box("sinf",$e).box("schi",$e).R("tenc",function(n){n=n.reader,n.X(),n.X(),n.X(),n.X(),t=wr(n.Cb(16))}).parse(e,!0),t}function Gd(e,t,n){var i,r,l,c,f;return z(function(y){if(y.g==1)return i=t,i.cryptoKey?y.s(2):_(y,i.fetchKey(),3);if(r=i.iv,!r)for(r=Ze(new ArrayBuffer(16)),l=i.firstMediaSequenceNumber+n,c=r.byteLength-1;0<=c;c--)r[c]=l&255,l>>=8;return t.blockCipherMode=="CBC"?f={name:"AES-CBC",iv:r}:f={name:"AES-CTR",counter:r,length:64},y.return(w.crypto.subtle.decrypt(f,i.cryptoKey,e))})}function Sf(e,t,n,i,r){return e=cn(e,i,r),(t!=0||n!=null)&&(e.headers.Range=n?"bytes="+t+"-"+n:"bytes="+t+"-"),e}function xm(e,t){var n=this;this.g=t,this.j=e,this.h=null,this.K=new Map,this.C=1,this.u=this.l=null,this.O=0,this.i=new Map,this.I=!1,this.P=null,this.B=!1,this.m=new Is(function(){return H0(n)}),this.L=Date.now()/1e3,this.o=new Map,this.M={projection:null,hfov:null},this.W=0,this.T=1/0,this.F=null,this.A=new dt(function(){if(n.j&&n.g)if(n.j.presentationTimeline.U()){var i=n.j.presentationTimeline.Hb(),r=n.j.presentationTimeline.ob();1<r-i?qs(n.g.aa,i,r):jd(n.g.aa)}else jd(n.g.aa),n.A&&n.A.stop()}),this.G=null,this.H=new dt(function(){var i=n.g.video;!i.ended&&n.G&&(i.currentTime=n.G,n.G=null)})}h=xm.prototype,h.destroy=function(){return this.m.destroy()};function H0(e){var t,n,i,r,l,c,f;return z(function(y){if(y.g==1){for(t=[],n=b(e.i.values()),i=n.next();!i.done;i=n.next())r=i.value,Ca(r),t.push(Xl(r)),r.ba&&(qr(r.ba),r.ba=null);for(l=b(e.o.values()),c=l.next();!c.done;c=l.next())f=c.value,qr(f);return _(y,Promise.all(t),2)}e.i.clear(),e.o.clear(),e.g=null,e.j=null,e.h=null,e.A&&e.A.stop(),e.A=null,e.H&&e.H.stop(),e.H=null,e.G=null,se(y)})}h.configure=function(e){if(this.h=e,this.P=new Es({maxAttempts:Math.max(e.retryParameters.maxAttempts,2),baseDelay:e.retryParameters.baseDelay,backoffFactor:e.retryParameters.backoffFactor,fuzzFactor:e.retryParameters.fuzzFactor},!0),e.disableAudioPrefetch){var t=this.i.get("audio");t&&t.ba&&(qr(t.ba),t.ba=null),t=b(this.o.keys());for(var n=t.next();!n.done;n=t.next())n=n.value,qr(this.o.get(n)),this.o.delete(n)}for(e.disableTextPrefetch&&(t=this.i.get(at))&&t.ba&&(qr(t.ba),t.ba=null),e.disableVideoPrefetch&&(t=this.i.get("video"))&&t.ba&&(qr(t.ba),t.ba=null),t=b(this.i.keys()),n=t.next();!n.done;n=t.next())n=this.i.get(n.value),n.ba?(Wh(n.ba,e.segmentPrefetchLimit),0<e.segmentPrefetchLimit||(qr(n.ba),n.ba=null)):0<e.segmentPrefetchLimit&&(n.ba=Wd(this,n.stream));e.disableAudioPrefetch||q0(this)};function Xd(e,t,n){e.j.presentationTimeline.U()||(e.W=t,e.T=n)}h.start=function(e){var t=this;return z(function(n){if(n.g==1)return _(n,Em(t,e||new Map),2);ct(t.m),t.I=!0,se(n)})};function tc(e,t){var n,i,r,l,c,f;z(function(y){switch(y.g){case 1:return n=En,e.O++,i=e.O,pe(y,2),_(y,Su(e.g.aa,n.za),4);case 4:Ue(y,3);break;case 2:r=Me(y),e.g&&e.g.onError(r);case 3:l=hn(t.mimeType,t.codecs),sr(e.g.aa,l,e.j.sequenceMode,t.external),c=e.g.aa.ea,(c.isTextVisible()||e.h.alwaysStreamText)&&e.O==i&&(f=Tf(e,t),e.i.set(n.za,f),Oi(e,f,0)),se(y)}})}function Jh(e){var t=e.i.get(at);t&&(Ca(t),Xl(t).catch(function(){}),e.F=e.i.get(at),e.i.delete(at)),e.u=null}function nc(e,t){for(var n=0>e.g.gb(),i=b(e.i.values()),r=i.next();!r.done;r=i.next())r=r.value,r.ja&&r.ja.ed(n),r.ba&&r.ba.ed(n);for(i=b(e.o.values()),r=i.next();!r.done;r=i.next())r.value.ed(n);(n=e.i.get("video"))&&(i=n.stream)&&(t?(t=i.trickModeVideo)&&!n.fc&&(rl(e,t,!1,0,!1),n.fc=i):(t=n.fc)&&(n.fc=null,rl(e,t,!0,0,!1)))}function Yd(e,t,n,i,r,l){n=n===void 0?!1:n,i=i===void 0?0:i,r=r===void 0?!1:r,l=l===void 0?!1:l,e.l=t,e.I&&(t.video&&rl(e,t.video,n,i,r,l),t.audio&&rl(e,t.audio,n,i,r,l))}function nl(e,t){z(function(n){if(n.g==1)return e.F=null,e.u=t,e.I?t.segmentIndex?n.s(2):_(n,t.createSegmentIndex(),2):n.return();rl(e,t,!0,0,!1),se(n)})}function il(e,t){for(var n=b(e.K.entries()),i=n.next();!i.done;i=n.next()){var r=b(i.value);i=r.next().value,r=r.next().value,i.includes(t.type)&&(r(),e.K.delete(i))}}function rl(e,t,n,i,r,l){var c=e.i.get(t.type);c||t.type!=at?c&&(c.fc&&(t.trickModeVideo?(c.fc=t,t=t.trickModeVideo):c.fc=null),c.stream!=t||r)&&(e.o.has(t)?c.ba=e.o.get(t):c.ba&&wm(c.ba,t),t.type==at&&(r=hn(t.mimeType,t.codecs),sr(e.g.aa,r,e.j.sequenceMode,t.external)),!e.o.has(c.stream)&&c.stream.closeSegmentIndex&&(c.Da?(r="("+c.type+":"+c.stream.id+")",e.K.has(r)||e.K.set(r,c.stream.closeSegmentIndex)):c.stream.closeSegmentIndex()),r=c.stream.isAudioMuxedInVideo!=t.isAudioMuxedInVideo,c.stream=t,c.ja=null,c.bf=!!l,t.dependencyStream?c.nd=Tf(e,t.dependencyStream):c.nd=null,r?Yl(e,!0,!1):(n?c.nc?c.Re=!0:c.Da?(c.lc=!0,c.Vd=i,c.Re=!0):(Ca(c),xf(e,c,!0,i).catch(function(f){e.g&&e.g.onError(f)})):c.Da||c.kb||Oi(e,c,0),K0(e,c).catch(function(f){e.g&&e.g.onError(f)}))):tc(e,t)}function K0(e,t){var n,i;return z(function(r){if(r.g==1)return t.rb?(n=t.stream,i=t.rb,n.segmentIndex?r.s(2):_(r,n.createSegmentIndex(),2)):r.return();if(t.rb!=i||t.stream!=n)return r.return();var l=e.g.Rc(),c=cr(e.g.aa,t.type),f=t.stream.segmentIndex.find(t.xa?t.xa.endTime:l),y=f==null?null:t.stream.segmentIndex.get(f);f=y&&y.wa?y.wa-y.Sa:null,y&&!f&&(f=(y.endTime-y.getStartTime())*(t.stream.bandwidth||0)/8),f?((y=y.Y)&&(f+=(y.wa?y.wa-y.Sa:null)||0),y=e.g.getBandwidthEstimate(),l=8*f/y<(c||0)-l-e.h.rebufferingGoal||t.rb.h.g>f):l=!1,l&&t.rb.abort(),se(r)})}h.Fc=function(){if(this.g){for(var e=this.g.Rc(),t=b(this.i.keys()),n=t.next();!n.done;n=t.next()){var i=n.value;n=this.i.get(i);var r=this.g.aa;if(i==at?(r=r.h,r=r.g==null||r.h==null?!1:e>=r.g&&e<r.h):(r=Dr(r,i),r=af(r,e)),!r){if(this.L=0,n.ba&&(n.ba.g=null),n.type==="audio"){r=b(this.o.values());for(var l=r.next();!l.done;l=r.next())l.value.g=null}n.ja=null,(cr(this.g.aa,i)!=null||n.Da)&&wf(this,n),n.rb&&(n.rb.abort(),n.rb=null),i===at&&(i=this.g.aa,i.L&&i.L.g()),n.Fc=!0}}this.h.crossBoundaryStrategy!=="keep"&&ny(this)}};function wf(e,t){t.nc||t.lc||(t.Da?(t.lc=!0,t.Vd=0):Ud(e.g.aa,t.type)==null?t.kb==null&&Oi(e,t,0):(Ca(t),xf(e,t,!1,0).catch(function(n){e.g&&e.g.onError(n)})))}function Em(e,t){var n,i,r,l,c,f,y,m,T,x;return z(function(D){if(D.g==1){if(n=En,!e.l)throw new Y(2,5,5006);return i=new Map,r=new Set,e.l.audio&&(i.set(n.V,e.l.audio),r.add(e.l.audio)),e.l.video&&(i.set(n.la,e.l.video),r.add(e.l.video)),e.u&&(i.set(n.za,e.u),r.add(e.u)),l=e.g.aa,_(D,l.init(i,e.j.sequenceMode,e.j.type,e.j.ignoreManifestTimestampsInSegmentsMode),2)}for(ct(e.m),e.updateDuration(),c=b(i.keys()),f=c.next();!f.done;f=c.next())y=f.value,m=i.get(y),e.i.has(y)||(T=Tf(e,m),t.has(m.id)&&(x=t.get(m.id),Sm(x,function(R,N,U){return bu(R,N,U||null,e.h.retryParameters,e.g.Xb)}),T.ba=x),e.i.set(y,T),Oi(e,T,0));se(D)})}function Tf(e,t){var n={stream:t,type:t.type,ja:null,ba:Wd(e,t),xa:null,yb:null,he:null,Ac:null,zc:null,fe:null,ge:null,fc:null,endOfStream:!1,Da:!1,kb:null,lc:!1,Vd:0,Re:!1,nc:!1,Fc:!0,bf:!1,bg:!1,sd:!1,rb:null,nd:null};return t.dependencyStream&&(n.nd=Tf(e,t.dependencyStream)),n}function Wd(e,t){if(t.type==="video"&&e.h.disableVideoPrefetch||t.type==="audio"&&e.h.disableAudioPrefetch||t.type===at&&(t.mimeType=="application/cea-608"||t.mimeType=="application/cea-708")||t.type===at&&e.h.disableTextPrefetch)return null;if(e.o.has(t))return e.o.get(t);var n=e.i.get(t.type);return(n=n&&n.ba)&&t===n.i?n:0<e.h.segmentPrefetchLimit?new Kd(e.h.segmentPrefetchLimit,t,function(i,r,l){return bu(i,r,l||null,e.h.retryParameters,e.g.Xb)},0>e.g.gb()):null}function q0(e){for(var t=e.h.segmentPrefetchLimit,n=e.h.prefetchAudioLanguages,i=b(e.j.variants),r=i.next(),l={};!r.done;l={wb:void 0},r=i.next())if(l.wb=r.value,l.wb.audio)if(e.o.has(l.wb.audio)){if(r=e.o.get(l.wb.audio),Wh(r,t),!(0<t&&n.some(function(f){return function(y){return Cn(f.wb.audio.language,y)}}(l)))){var c=e.i.get(l.wb.audio.type);r!==(c&&c.ba)&&qr(r),e.o.delete(l.wb.audio)}}else 0>=t||!n.some(function(f){return function(y){return Cn(f.wb.audio.language,y)}}(l))||!(r=Wd(e,l.wb.audio))||(l.wb.audio.segmentIndex||l.wb.audio.createSegmentIndex(),e.o.set(l.wb.audio,r))}h.updateDuration=function(){var e=rs(),t=this.j.presentationTimeline.getDuration();1/0>t?(e&&(this.A&&this.A.stop(),jd(this.g.aa)),this.g.aa.bb(t)):e?(this.A&&this.A.ua(.5),this.g.aa.bb(1/0)):this.g.aa.bb(Math.pow(2,32))};function Zh(e,t){var n,i,r,l,c,f;return z(function(y){switch(y.g){case 1:if(ct(e.m),t.Da||t.kb==null||t.nc)return y.return();if(t.kb=null,!t.lc){y.s(2);break}return _(y,xf(e,t,t.Re,t.Vd),3);case 3:return y.return();case 2:if(il(e,t),t.stream.segmentIndex){y.s(4);break}return n=t.stream,pe(y,5),_(y,t.stream.createSegmentIndex(),7);case 7:Ue(y,6);break;case 5:return i=Me(y),_(y,rc(e,t,i),8);case 8:return y.return();case 6:if(n!=t.stream)return n.closeSegmentIndex&&n.closeSegmentIndex(),t.Da||t.kb||Oi(e,t,0),y.return();case 4:pe(y,9),r=Am(e,t),r!=null&&(Oi(e,t,r),t.sd=!1),Ue(y,10);break;case 9:return l=Me(y),_(y,rc(e,t,l),11);case 11:return y.return();case 10:if(c=Array.from(e.i.values()),!e.I||!c.every(function(m){return m.endOfStream})){y.s(0);break}return _(y,e.g.aa.endOfStream(),13);case 13:ct(e.m),f=e.g.aa.getDuration(),f!=0&&f<e.j.presentationTimeline.getDuration()&&e.j.presentationTimeline.bb(f),se(y)}})}function Am(e,t){if(Ht(t))return Zo(e.g.aa,t.stream.originalId||""),null;if(t.type==at&&gm(e.g.aa),t.stream.isAudioMuxedInVideo)return null;var n=e.h.updateIntervalSeconds/Math.max(1,Math.abs(e.g.gb()));if(!ur(e.g.aa)&&t.type!=at)return n/2;var i=e.g.Rc();if(t.type==="audio")for(var r=b(e.o.keys()),l=r.next();!l.done;l=r.next())l=e.o.get(l.value),l.Oa(i,!0),$s(l,i);r=t.xa?t.xa.endTime:i;var c=vu(e.g.aa,t.type,i),f=Math.max(1,Math.max(e.h.rebufferingGoal,e.h.bufferingGoal)*e.C),y=e.j.presentationTimeline.getDuration()-r;if(l=cr(e.g.aa,t.type),1e-6>y&&l)return t.endOfStream=!0,t.type=="video"&&(e=e.i.get(at))&&Ht(e)&&(e.endOfStream=!0),null;if(t.endOfStream=!1,c>=f)return n/2;if(f=!t.ja,l=Cm(e,t,i,l),!l)return n;c=!1,f&&t.bf&&(c=!0,t.bf=!1),f=1/0,y=Array.from(e.i.values()),y=b(y);for(var m=y.next();!m.done;m=y.next())m=m.value,Ht(m)||m.ja&&!m.ja.current()||(f=Math.min(f,m.xa?m.xa.endTime:i));return r>=f+e.j.presentationTimeline.h?n:(e.h.crossBoundaryStrategy!=="keep"&&X0(e,t,l)||(t.ba&&t.ja&&!e.o.has(t.stream)&&(t.ba.Oa(l.startTime+.001),$s(t.ba,l.startTime).catch(function(){})),F0(e,t,i,l,c).catch(function(){}),t.nd&&$h(e,t.nd,i)),null)}function Cm(e,t,n,i){if(t.ja)return(n=t.ja.current())&&t.xa&&.001>Math.abs(t.xa.startTime-n.startTime)&&(n=t.ja.next().value),n;if(t.xa||i)return n=t.xa?t.xa.endTime:i,e=0>e.g.gb(),t.stream.segmentIndex&&(t.ja=t.stream.segmentIndex.Gb(n,!1,e)),t.ja&&t.ja.next().value;i=e.j.sequenceMode?0:e.h.inaccurateManifestTolerance;var r=Math.max(n-i,0);e=0>e.g.gb();var l=null;return i&&(t.stream.segmentIndex&&(t.ja=t.stream.segmentIndex.Gb(r,!1,e)),l=t.ja&&t.ja.next().value),l||(t.stream.segmentIndex&&(t.ja=t.stream.segmentIndex.Gb(n,!1,e)),l=t.ja&&t.ja.next().value),l}function F0(e,t,n,i,r){var l,c,f,y,m,T,x,D,R,N,U,L,j,V,X,G,Z;return z(function(q){switch(q.g){case 1:if(l=En,c=t.stream,f=t.ja,t.Da=!0,pe(q,2),i.dc()==2)throw new Y(1,1,1011);return _(q,G0(e,t,i,r),4);case 4:return ct(e.m),e.B?q.return():(y=c.mimeType=="video/mp4"||c.mimeType=="audio/mp4",m=w.ReadableStream,e.h.lowLatencyMode&&e.j.isLowLatency&&m&&y&&(e.j.type!="HLS"||i.m)?(D=new Uint8Array(0),N=R=!1,L=function(K){var W,Q,oe;return z(function(ne){switch(ne.g){case 1:if(R||(N=!0,ct(e.m),e.B))return ne.return();if(pe(ne,2),D=ey(D,K),W=!1,Q=0,new jt().box("mdat",function(re){Q=re.size+re.start,W=!0}).parse(D,!1,!0),!W){ne.s(4);break}return oe=D.subarray(0,Q),D=D.subarray(Q),_(ne,ty(e,t,n,c,i,oe,!0,r),5);case 5:t.ba&&t.ja&&$s(t.ba,i.startTime,!0);case 4:Ue(ne,0);break;case 2:U=Me(ne),se(ne)}})},_(q,Cu(e,t,i,L),9)):(T=Cu(e,t,i),_(q,T,7)));case 7:return x=q.h,ct(e.m),e.B?q.return():(ct(e.m),t.lc?(t.Da=!1,Oi(e,t,0),q.return()):_(q,ty(e,t,n,c,i,x,!1,r),6));case 9:if(j=q.h,U)throw U;if(N){q.s(10);break}return R=!0,ct(e.m),e.B?q.return():t.lc?(t.Da=!1,Oi(e,t,0),q.return()):_(q,ty(e,t,n,c,i,j,!1,r),10);case 10:t.ba&&t.ja&&$s(t.ba,i.startTime,!0);case 6:if(ct(e.m),e.B)return q.return();t.xa=i,f.next(),t.Da=!1,t.bg=!1,V=e.g.aa.Fb(),X=V[t.type],JSON.stringify(X),t.lc||(G=null,t.type===l.la?G=e.i.get(l.V):t.type===l.V&&(G=e.i.get(l.la)),G&&G.type==l.V?e.g.qe(i,t.stream,G.stream.isAudioMuxedInVideo):e.g.qe(i,t.stream,t.stream.codecs.includes(","))),Oi(e,t,0),Ue(q,0);break;case 2:if(Z=Me(q),ct(e.m,Z),e.B)return q.return();if(t.Da=!1,Z.code==7001)t.Da=!1,Ca(t),Oi(e,t,0),q.s(0);else if(t.type==l.za&&e.h.ignoreTextStreamFailures)e.i.delete(l.za),q.s(0);else return Z.code==3017?_(q,z0(e,t,Z),0):(t.sd=!0,Z.category==1&&t.ba&&ec(t.ba,i),Z.severity=2,_(q,rc(e,t,Z),0))}})}function $h(e,t,n){var i,r,l,c,f,y,m,T;z(function(x){switch(x.g){case 1:if(i=t.stream,l=(r=i.segmentIndex.Gb(n))&&r.next().value,!l){x.s(0);break}if(c=l.Y,!c||Us(c,t.yb)){x.s(3);break}return t.yb=c,pe(x,4),_(x,Cu(e,t,c),6);case 6:f=x.h;var D=e.g.aa;D.I&&ns(D.I,f,0,i),Ue(x,3);break;case 4:throw y=Me(x),t.yb=null,y;case 3:if(t.xa&&t.xa==l){x.s(0);break}return t.xa=l,pe(x,8),_(x,Cu(e,t,l),10);case 10:m=x.h,D=e.g.aa,D.I&&ns(D.I,m,0,i),Ue(x,0);break;case 8:throw T=Me(x),t.xa=null,T}})}function ey(e,t){var n=new Uint8Array(e.length+t.length);return n.set(e),n.set(t,e.length),n}function z0(e,t,n){var i,r,l,c;return z(function(f){if(f.g==1){if(i=Array.from(e.i.values()),i.some(function(y){return y!=t&&y.bg}))return f.s(2);if(r=e.h.maxDisabledTime===0&&n.code==1011?1:e.h.maxDisabledTime,e.g.disableStream(t.stream,r))return f.return();if(e.h.avoidEvictionOnQuotaExceededError)return Oi(e,t,4),f.return();if(l=Math.round(100*e.C),20<l)e.C-=.2;else if(4<l)e.C-=.04;else return t.sd=!0,e.B=!0,e.g.onError(n),f.return();return t.bg=!0,c=e.g.Rc(),_(f,Qd(e,t,c),2)}Oi(e,t,4),se(f)})}function G0(e,t,n,i){var r,l,c,f,y,m,T,x,D,R,N,U,L,j,V,X;return z(function(G){switch(G.g){case 1:if(r=En,l=t.xa==null,c=[],f=Math.max(0,Math.max(n.appendWindowStart,e.W)-.1),y=Math.min(n.appendWindowEnd,e.T)+.01,m=n.codecs||t.stream.codecs,T=li(m),x=Ri(n.mimeType||t.stream.mimeType),D=n.timestampOffset,D==t.he&&f==t.Ac&&y==t.zc&&T==t.fe&&x==t.ge){G.s(2);break}if(R=t.fe&&t.ge&&Fs(e.g.aa,t.type,x,m),!R){G.s(3);break}if(N=null,t.type===r.la?N=e.i.get(r.V):t.type===r.V&&(N=e.i.get(r.la)),!N){G.s(3);break}return _(G,Xl(N).catch(function(){}),5);case 5:N.yb=null,N.Ac=null,N.zc=null,wf(e,N);case 3:return _(G,ic(e,t,D,f,y,n,T,x),2);case 2:return Us(n.Y,t.yb)||(t.yb=n.Y,n.l&&n.Y&&(U=Cu(e,t,n.Y),L=function(){var Z,q,K,W,Q,oe,ne;return z(function(re){switch(re.g){case 1:return pe(re,2),_(re,U,4);case 4:return Z=re.h,ct(e.m),q=null,K=new Map,W={projection:null,hfov:null},Q=new jt,Q.box("moov",$e).box("trak",$e).box("mdia",$e).R("mdhd",function(le){q=$c(le.reader,le.version).timescale}).box("hdlr",function(le){switch(le=le.reader,le.skip(8),le.Cc()){case"soun":K.set(r.V,q);break;case"vide":K.set(r.la,q)}q=null}).box("minf",$e).box("stbl",$e).R("stsd",bn).box("encv",Mi).box("avc1",Mi).box("avc3",Mi).box("hev1",Mi).box("hvc1",Mi).box("dvav",Mi).box("dva1",Mi).box("dvh1",Mi).box("dvhe",Mi).box("dvc1",Mi).box("dvi1",Mi).box("vexu",$e).box("proj",$e).R("prji",function(le){le=le.reader.Cc(),W.projection=le}).box("hfov",function(le){le=le.reader.S()/1e3,W.hfov=le}).parse(Z),t.type===r.la&&bm(e,W),K.has(t.type)?n.Y.timescale=K.get(t.type):q!=null&&(n.Y.timescale=q),oe=t.stream.closedCaptions&&0<t.stream.closedCaptions.size,_(re,e.g.Fg(t.type,Z),5);case 5:return _(re,Ks(e.g.aa,t.type,Z,null,t.stream,oe,t.Fc,i),6);case 6:Ue(re,0);break;case 2:throw ne=Me(re),t.yb=null,ne}})},j=n.startTime,l&&(V=cr(e.g.aa,t.type),V!=null&&(j=V)),e.g.fj(j,n.Y),c.push(L()))),X=t.xa?t.xa.i:null,n.i!=X&&c.push(cf(e.g.aa,t.type,n.startTime)),_(G,Promise.all(c),0)}})}function ic(e,t,n,i,r,l,c,f){var y,m,T,x;return z(function(D){if(D.g==1)return y=En,m=new Map,e.l.audio&&m.set(y.V,e.l.audio),e.l.video&&m.set(y.la,e.l.video),pe(D,2),t.Ac=i,t.zc=r,c&&(t.fe=c),f&&(t.ge=f),t.he=n,T=e.j.sequenceMode||e.j.type=="HLS",_(D,sf(e.g.aa,t.type,n,i,r,T,l.mimeType||t.stream.mimeType,l.codecs||t.stream.codecs,m),4);if(D.g!=2)return Ue(D,0);throw x=Me(D),t.Ac=null,t.zc=null,t.fe=null,t.ge=null,t.he=null,x})}function ty(e,t,n,i,r,l,c,f){c=c===void 0?!1:c,f=f===void 0?!1:f;var y,m,T,x,D,R;return z(function(N){switch(N.g){case 1:return y=i.closedCaptions&&0<i.closedCaptions.size,e.h.shouldFixTimestampOffset&&(T=i.mimeType=="video/mp4"||i.mimeType=="audio/mp4",x=null,r.Y&&(x=r.Y.timescale),(D=T&&x&&i.type==="video"&&e.j.type=="DASH")&&(m=new jt),D&&m.box("moof",$e).box("traf",$e).R("tfdt",function(U){var L,j,V,X,G,Z;return z(function(q){return L=fu(U.reader,U.version),j=L.baseMediaDecodeTime,j?(V=-j/x,X=Number(t.he)||0,X<V?(G=t.Ac,Z=t.zc,_(q,ic(e,t,V,G,Z,r),0)):q.s(0)):q.return()})}),D&&m.parse(l,!1,c)),_(N,Qd(e,t,n),2);case 2:return ct(e.m),R=t.Fc,t.Fc=!1,_(N,e.g.Fg(t.type,l),3);case 3:return _(N,Ks(e.g.aa,t.type,l,r,i,y,R,f,c),4);case 4:ct(e.m),se(N)}})}function Qd(e,t,n){var i,r,l,c,f,y,m,T;return z(function(x){if(x.g==1)return i=t.stream.segmentIndex,i instanceof sn&&i.Oa(e.j.presentationTimeline.pb()),r=Math.max(e.h.bufferBehind*e.C,e.j.presentationTimeline.h),l=Ud(e.g.aa,t.type),l==null?(e.F==t&&(e.F=null),x.return()):(c=n-l,f=e.h.evictionGoal,y=e.j.presentationTimeline.Hb(),m=e.j.presentationTimeline.ob(),T=c-r,m-y>f&&(T=Math.max(c-r,y-f-l)),T<=f?x.return():_(x,e.g.aa.remove(t.type,l,l+T),2));if(x.g!=4)return ct(e.m),e.F?_(x,Qd(e,e.F,n),4):x.s(0);ct(e.m),se(x)})}function Ht(e){return e&&e.type==at&&(e.stream.mimeType=="application/cea-608"||e.stream.mimeType=="application/cea-708")}function Cu(e,t,n,i){var r,l,c,f,y;return z(function(m){switch(m.g){case 1:if(r=n.Ib())return m.return(r);if(l=null,t.ba){var T=t.ba,x=T.h;n instanceof bi&&(x=T.j),x.has(n)?(T=x.get(n),i&&(T.pg=i),l=T.Gd):l=null}return l||(l=bu(n,t.stream,i||null,e.h.retryParameters,e.g.Xb)),c=0,t.ja&&(c=t.ja.h),t.rb=l,_(m,l.promise,2);case 2:if(f=m.h,t.rb=null,y=f.data,!n.aesKey){m.s(3);break}return _(m,Gd(y,n.aesKey,c),4);case 4:y=m.h;case 3:return m.return(y)}})}function bu(e,t,n,i,r,l){l=l===void 0?!1:l;var c=e instanceof qe?e:void 0,f=c?1:0;return e=Sf(e.N(),e.Sa,e.wa,i,n),e.contentType=t.type,r.request(Wi,e,{type:f,stream:t,segment:c,isPreload:l})}function xf(e,t,n,i){var r,l;return z(function(c){if(c.g==1)return t.lc=!1,t.Re=!1,t.Vd=0,t.nc=!0,t.xa=null,t.ja=null,t.ba&&!e.o.has(t.stream)&&qr(t.ba),i?(r=e.g.Rc(),l=e.g.aa.getDuration(),_(c,e.g.aa.remove(t.type,r+i,l),3)):_(c,Su(e.g.aa,t.type),4);if(c.g!=3)return ct(e.m),n?_(c,e.g.aa.flush(t.type),3):c.s(3);ct(e.m),t.nc=!1,t.endOfStream=!1,t.Da||t.kb||Oi(e,t,0),se(c)})}function Oi(e,t,n){var i=t.type;(i!=at||e.i.has(i))&&(t.kb=new Ic(function(){var r;return z(function(l){if(l.g==1)return pe(l,2),_(l,Zh(e,t),4);if(l.g!=2)return Ue(l,0);r=Me(l),e.g&&e.g.onError(r),se(l)})}).da(n))}function Ca(e){e.kb!=null&&(e.kb.stop(),e.kb=null)}function Xl(e){return z(function(t){return e.rb?_(t,e.rb.abort(),0):t.s(0)})}function rc(e,t,n){var i;return z(function(r){if(r.g==1)return n.code==3024?(t.Da=!1,Ca(t),Oi(e,t,0),r.return()):_(r,gh(e.P),2);if(ct(e.m),n.category===1&&n.code!=1003){if(t.fc)return nc(e,!1),r.return();i=e.h.maxDisabledTime===0&&n.code==1011?1:e.h.maxDisabledTime,n.handled=e.g.disableStream(t.stream,i),n.handled&&(n.severity=1)}(!n.handled||n.code!=1011)&&e.g.onError(n),n.handled||e.h.failureCallback(n),se(r)})}function Yl(e,t,n){t=t===void 0?!1:t,n=n===void 0?!0:n;var i,r,l,c,f,y;return z(function(m){if(m.g==1){if(i=Date.now()/1e3,r=e.h.minTimeBetweenRecoveries,!t){if(!e.h.allowMediaSourceRecoveries||i-e.L<r)return m.return(!1);e.L=i}return l=En,(c=e.i.get(l.V))&&(c.yb=null,c.Ac=null,c.zc=null,n&&wf(e,c),Xl(c).catch(function(){}),c.ja&&c.ja.dg()),(f=e.i.get(l.la))&&(f.yb=null,f.Ac=null,f.zc=null,n&&wf(e,f),Xl(f).catch(function(){}),f.ja&&f.ja.dg()),y=new Map,e.l.audio&&y.set(l.V,e.l.audio),e.l.video&&y.set(l.la,e.l.video),_(m,dn(e.g.aa,y),2)}return!f||f.nc||f.Da||f.kb||Oi(e,f,0),!c||c.nc||c.Da||c.kb||Oi(e,c,0),m.return(!0)})}function bm(e,t){if(e.M.projection!=t.projection||e.M.hfov!=t.hfov){if(t.projection!=null||t.hfov!=null){var n=new Map().set("detail",t);n=new ke("spatialvideoinfo",n)}else n=new ke("nospatialvideoinfo");n.cancelable=!0,e.g.onEvent(n),e.M=t}}function ny(e){if(e.h.crossBoundaryStrategy!=="keep"){e.H.stop();var t=e.g.Rc(),n=e.i.get("video")||e.i.get("audio");n&&(n=n.yb)&&n.g!==null&&(t=n.g-t,0>t||1<t||(e.G=n.g+.01,e.H.da(t)))}}function X0(e,t,n){if(t.type===at)return!1;var i=t.yb;if(!i)return!1;n=n.Y;var r=i.g!==n.g;if(e.h.crossBoundaryStrategy==="reset_to_encrypted"&&(i.encrypted||n.encrypted||(r=!1),i.encrypted&&(e.h.crossBoundaryStrategy="keep")),e.h.crossBoundaryStrategy==="RESET_ON_ENCRYPTION_CHANGE"&&i.encrypted==n.encrypted&&(r=!1),r&&t.Fc){var l=e.g.video,c=l.paused;Yl(e,!0).then(function(){e.g.onEvent(new ke("boundarycrossed")),c||l.play()})}return r}function Ef(){}function Jd(e,t,n,i,r){var l=r in i,c=l?n.constructor==Object&&Object.keys(i).length==0:n.constructor==Object&&Object.keys(n).length==0,f=l||c,y=!0,m;for(m in t){var T=r+"."+m,x=l?i[r]:n[m];f||m in n?t[m]===void 0?x===void 0||f?delete e[m]:e[m]=so(x):c?e[m]=t[m]:x.constructor==Object&&t[m]&&t[m].constructor==Object?(e[m]||(e[m]=so(x)),T=Jd(e[m],t[m],x,i,T),y=y&&T):typeof t[m]!=typeof x||t[m]==null||typeof t[m]!="function"&&t[m].constructor!=x.constructor?(no("Invalid config, wrong type for "+T),y=!1):(typeof n[m]=="function"&&n[m].length!=t[m].length&&bt("Unexpected number of arguments for "+T),e[m]=t[m]):(no("Invalid config, unrecognized key "+T),y=!1)}return y}function Iu(e,t){for(var n={},i=n,r=0,l=0;r=e.indexOf(".",r),!(0>r);)(r==0||e[r-1]!="\\")&&(l=e.substring(l,r).replace(/\\\./g,"."),i[l]={},i=i[l],l=r+1),r+=1;return i[e.substring(l).replace(/\\\./g,".")]=t,n}function on(e,t){return e&&t}function Zd(e,t){function n(l){for(var c=b(Object.keys(l)),f=c.next();!f.done;f=c.next())if(f=f.value,!(l[f]instanceof HTMLElement))if(r(l[f])&&Object.keys(l[f]).length===0)delete l[f];else{var y=l[f];Array.isArray(y)&&y.length===0||typeof l[f]=="function"?delete l[f]:r(l[f])&&(n(l[f]),Object.keys(l[f]).length===0&&delete l[f])}}function i(l,c){return Object.keys(l).reduce(function(f,y){var m=l[y];return c.hasOwnProperty(y)?m instanceof HTMLElement&&c[y]instanceof HTMLElement?m.isEqualNode(c[y])||(f[y]=m):r(m)&&r(c[y])?(m=i(m,c[y]),(0<Object.keys(m).length||!r(m))&&(f[y]=m)):Array.isArray(m)&&Array.isArray(c[y])?Jp(m,c[y])||(f[y]=m):Number.isNaN(m)&&Number.isNaN(c[y])||m!==c[y]&&(f[y]=m):f[y]=m,f},{})}function r(l){return l&&typeof l=="object"&&!Array.isArray(l)}return e=i(e,t),n(e),e}Pe("shaka.util.ConfigUtils",Ef),Ef.getDifferenceFromConfigObjects=Zd,Ef.convertToConfigObject=Iu,Ef.mergeConfigObjects=Jd;function ln(){}function Im(e){return e=Nr(e),new pn(e).nb}function Du(e,t,n){function i(f){Ei(l).setUint32(c,f.byteLength,!0),c+=4,l.set(Ze(f),c),c+=f.byteLength}if(!n||!n.byteLength)throw new Y(2,6,6015);var r;typeof t=="string"?r=Xp(t,!0):r=t,e=Nr(e),e=Xp(e,!0);var l=new Uint8Array(12+e.byteLength+r.byteLength+n.byteLength),c=0;return i(e),i(r),i(n),l}function Af(e,t,n){return t!=="skd"?e:(t=n.serverCertificate,n=Nr(e).split("skd://").pop(),Du(e,n,t))}function Ou(e,t){e===2&&(e=t.drmInfo)&&bc(e.keySystem)&&(t.headers["Content-Type"]="application/octet-stream")}Pe("shaka.drm.FairPlay",ln),ln.commonFairPlayResponse=function(e,t){if(e===2&&(e=t.originalRequest.drmInfo)&&bc(e.keySystem)){try{var n=nn(t.data)}catch{return}if(e=!1,n=n.trim(),n.substr(0,5)==="<ckc>"&&n.substr(-6)==="</ckc>"&&(n=n.slice(5,-6),e=!0),!e)try{var i=JSON.parse(n);i.ckc&&(n=i.ckc,e=!0),i.CkcMessage&&(n=i.CkcMessage,e=!0),i.License&&(n=i.License,e=!0)}catch{}e&&(t.data=Sr(Fi(n)))}},ln.muxFairPlayRequest=function(e,t){Ou(e,t)},ln.expressplayFairPlayRequest=function(e,t){if(e===2){var n=t.drmInfo;n&&bc(n.keySystem)&&Ou(e,t)}},ln.conaxFairPlayRequest=function(e,t){Ou(e,t)},ln.ezdrmFairPlayRequest=function(e,t){Ou(e,t)},ln.verimatrixFairPlayRequest=function(e,t){e===2&&(e=t.drmInfo)&&bc(e.keySystem)&&(e=Ze(t.body),e=Bo(e),t.headers["Content-Type"]="application/x-www-form-urlencoded",t.body=Pr("spc="+e))},ln.muxInitDataTransform=function(e,t,n){return Af(e,t,n)},ln.expressplayInitDataTransform=function(e,t,n){return Af(e,t,n)},ln.conaxInitDataTransform=function(e,t,n){if(t!=="skd")return e;t=n.serverCertificate,n=Nr(e).split("skd://").pop().split("?").shift(),n=w.atob(n);var i=new ArrayBuffer(2*n.length);i=Zu(i);for(var r=0,l=n.length;r<l;r++)i[r]=n.charCodeAt(r);return Du(e,i,t)},ln.ezdrmInitDataTransform=function(e,t,n){return t!=="skd"?e:(t=n.serverCertificate,n=Nr(e).split(";").pop(),Du(e,n,t))},ln.verimatrixInitDataTransform=function(e,t,n){return Af(e,t,n)},ln.initDataTransform=Du,ln.defaultGetContentId=Im,ln.isFairPlaySupported=function(){var e;return z(function(t){return t.g==1?(e={initDataTypes:["cenc","sinf","skd"],videoCapabilities:[{contentType:'video/mp4; codecs="avc1.42E01E"'}]},pe(t,2),_(t,navigator.requestMediaKeySystemAccess("com.apple.fps",[e]),4)):t.g!=2?t.return(!0):(Me(t),t.return(!1))})};function $d(){this.g=null}$d.prototype.configure=function(e){this.g=e},$d.prototype.create=function(e){var t;if(this.g.language){var n=Dm(e,this.g.language);n.length&&(t=n)}return t||(t=e.filter(function(i){return i.primary}),t=t.length?t:e),e=iy(t,this.g.role),e.length&&(t=e),this.g.videoLayout&&(e=km(t,this.g.videoLayout),e.length&&(t=e)),this.g.Sc&&(e=W0(t,this.g.Sc),e.length&&(t=e)),this.g.channelCount&&(e=Om(t,this.g.channelCount),e.length&&(t=e)),this.g.Kc&&(e=ry(t,this.g.Kc),e.length&&(t=e)),this.g.fd&&(e=Y0(t,this.g.fd),e.length&&(t=e)),e=Q0(t,this.g.spatialAudio),e.length&&(t=e),this.g.audioCodec&&(e=J0(t,this.g.audioCodec),e.length&&(t=e)),new Qc(t[0],t,!(this.g.codecSwitchingStrategy=="smooth"&&Sl()))};function Dm(e,t){t=It(t);var n=Bc(t,e.map(function(i){return sd(i)}));return n?e.filter(function(i){return n==sd(i)}):[]}function iy(e,t){return e.filter(function(n){return n.audio?t?n.audio.roles.includes(t):n.audio.roles.length==0:!1})}function ry(e,t){return e.filter(function(n){return n.audio&&n.audio.label?n.audio.label.toLowerCase()==t.toLowerCase():!1})}function Y0(e,t){return e.filter(function(n){return n.video&&n.video.label?n.video.label.toLowerCase()==t.toLowerCase():!1})}function Om(e,t){return e.filter(function(n){return!(n.audio&&n.audio.channelsCount&&n.audio.channelsCount>t)}).sort(function(n,i){return n.audio||i.audio?n.audio?i.audio?(i.audio.channelsCount||0)-(n.audio.channelsCount||0):1:-1:0})}function W0(e,t){if(t=="AUTO"){var n=e.some(function(i){return!!(i.video&&i.video.hdr&&i.video.hdr=="HLG")});t=Gp(n)}return e.filter(function(i){return!(i.video&&i.video.hdr&&i.video.hdr!=t)})}function km(e,t){return e.filter(function(n){return!(n.video&&n.video.videoLayout&&n.video.videoLayout!=t)})}function Q0(e,t){return e.filter(function(n){return!(n.audio&&n.audio.spatialAudio!=t)})}function J0(e,t){return e.filter(function(n){return!(n.audio&&n.audio.codecs!=t)})}function Eo(){}function ku(){var e=1/0;navigator.connection&&navigator.connection.saveData&&(e=360);var t={retryParameters:Br(),servers:{},clearKeys:{},advanced:{},delayLicenseRequestUntilPlayed:!1,persistentSessionOnlinePlayback:!1,persistentSessionsMetadata:[],initDataTransform:function(T,x,D){return w.shakaMediaKeysPolyfill==="apple"&&x=="skd"&&(x=D.serverCertificate,D=Im(T),T=Du(T,D,x)),T},logLicenseExchange:!1,updateExpirationTime:1,preferredKeySystems:[],keySystemsMapping:{},parseInbandPsshEnabled:nr(),minHdcpVersion:"",ignoreDuplicateInitData:!zt("Tizen 2"),defaultAudioRobustnessForWidevine:"SW_SECURE_CRYPTO",defaultVideoRobustnessForWidevine:"SW_SECURE_DECODE"};(nr()||Gn())&&t.preferredKeySystems.push("com.microsoft.playready");var n="reload",i=!1;!Sl()||di()||Gn()||Ha()||jo()&&Zf()===79||ir()&&!yl()&&!es()||$u()&&ra()||(n="smooth",i=!0),i={retryParameters:Br(),availabilityWindowOverride:NaN,disableAudio:!1,disableVideo:!1,disableText:!1,disableThumbnails:!1,disableIFrames:!1,defaultPresentationDelay:0,segmentRelativeVttTiming:!1,raiseFatalErrorOnManifestUpdateRequestFailure:!1,continueLoadingWhenPaused:!0,ignoreSupplementalCodecs:!1,updatePeriod:-1,ignoreDrmInfo:!1,dash:{clockSyncUri:"",disableXlinkProcessing:!0,xlinkFailGracefully:!1,ignoreMinBufferTime:!1,autoCorrectDrift:!0,initialSegmentLimit:1e3,ignoreSuggestedPresentationDelay:!1,ignoreEmptyAdaptationSet:!1,ignoreMaxSegmentDuration:!1,keySystemsByURI:{"urn:uuid:1077efec-c0b2-4d02-ace3-3c1e52e2fb4b":"org.w3.clearkey","urn:uuid:e2719d58-a985-b3c9-781a-b030af78d30e":"org.w3.clearkey","urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":"com.widevine.alpha","urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95":"com.microsoft.playready","urn:uuid:79f0049a-4098-8642-ab92-e65be0885f95":"com.microsoft.playready","urn:uuid:94ce86fb-07ff-4f43-adb8-93d2fa968ca2":"com.apple.fps","urn:uuid:3d5e6d35-9b9a-41e8-b843-dd3c6e72c42c":"com.huawei.wiseplay"},manifestPreprocessor:oc,manifestPreprocessorTXml:tp,sequenceMode:!1,multiTypeVariantsAllowed:i,useStreamOnceInPeriodFlattening:!1,enableFastSwitching:!0},hls:{ignoreTextStreamFailures:!1,ignoreImageStreamFailures:!1,defaultAudioCodec:"mp4a.40.2",defaultVideoCodec:"avc1.42E01E",ignoreManifestProgramDateTime:!1,ignoreManifestProgramDateTimeForTypes:[],mediaPlaylistFullMimeType:'video/mp2t; codecs="avc1.42E01E, mp4a.40.2"',liveSegmentsDelay:3,sequenceMode:zp(),ignoreManifestTimestampsInSegmentsMode:!1,disableCodecGuessing:!1,disableClosedCaptionsDetection:!1,allowLowLatencyByteRangeOptimization:!0,allowRangeRequestsToGuessMimeType:!1},mss:{manifestPreprocessor:oc,manifestPreprocessorTXml:tp,sequenceMode:!1,keySystemsBySystemId:{"9a04f079-9840-4286-ab92-e65be0885f95":"com.microsoft.playready","79f0049a-4098-8642-ab92-e65be0885f95":"com.microsoft.playready"}}};var r={retryParameters:Br(),failureCallback:function(T){return on([T])},rebufferingGoal:0,bufferingGoal:10,bufferBehind:30,evictionGoal:1,ignoreTextStreamFailures:!1,alwaysStreamText:!1,startAtSegmentBoundary:!1,gapDetectionThreshold:.5,gapPadding:0,gapJumpTimerTime:.25,durationBackoff:1,safeSeekOffset:5,safeSeekEndOffset:0,stallEnabled:!0,stallThreshold:1,stallSkip:.1,useNativeHlsForFairPlay:!0,inaccurateManifestTolerance:2,lowLatencyMode:!1,forceHTTP:!1,forceHTTPS:!1,minBytesForProgressEvents:16e3,preferNativeDash:!1,preferNativeHls:!1,updateIntervalSeconds:1,observeQualityChanges:!1,maxDisabledTime:30,segmentPrefetchLimit:1,prefetchAudioLanguages:[],disableAudioPrefetch:!1,disableTextPrefetch:!1,disableVideoPrefetch:!1,liveSync:{enabled:!1,targetLatency:.5,targetLatencyTolerance:.5,maxPlaybackRate:1.1,minPlaybackRate:.95,panicMode:!1,panicThreshold:60,dynamicTargetLatency:{enabled:!1,stabilityThreshold:60,rebufferIncrement:.5,maxAttempts:10,maxLatency:4,minLatency:1}},allowMediaSourceRecoveries:!0,minTimeBetweenRecoveries:5,vodDynamicPlaybackRate:!1,vodDynamicPlaybackRateLowBufferRate:.95,vodDynamicPlaybackRateBufferRatio:.5,preloadNextUrlWindow:30,loadTimeout:30,clearDecodingCache:Gn()||Ha(),dontChooseCodecs:!1,shouldFixTimestampOffset:jo()||di(),avoidEvictionOnQuotaExceededError:!1,crossBoundaryStrategy:"keep"};(jo()||di()||ir()||Oc())&&(r.stallSkip=0),(navigator.userAgent.match(/Edge\//)||nr())&&(r.gapPadding=.01),di()&&(r.gapPadding=2),hl()&&(r.crossBoundaryStrategy="reset"),lo()&&(r.crossBoundaryStrategy="reset_to_encrypted");var l={trackSelectionCallback:function(T){return z(function(x){return x.return(T)})},downloadSizeCallback:function(T){var x;return z(function(D){return D.g==1?navigator.storage&&navigator.storage.estimate?_(D,navigator.storage.estimate(),3):D.return(!0):(x=D.h,D.return(x.usage+T<.95*x.quota))})},progressCallback:function(T,x){return on([T,x])},usePersistentLicense:!0,numberOfParallelDownloads:5};e={enabled:!0,useNetworkInformation:!0,defaultBandwidthEstimate:1e6,switchInterval:8,bandwidthUpgradeTarget:.85,bandwidthDowngradeTarget:.95,restrictions:{minWidth:0,maxWidth:1/0,minHeight:0,maxHeight:e,minPixels:0,maxPixels:1/0,minFrameRate:0,maxFrameRate:1/0,minBandwidth:0,maxBandwidth:1/0,minChannelsCount:0,maxChannelsCount:1/0},advanced:{minTotalBytes:128e3,minBytes:16e3,fastHalfLife:2,slowHalfLife:5},restrictToElementSize:!1,restrictToScreenSize:!1,ignoreDevicePixelRatio:!1,clearBufferSwitch:!1,safeMarginSwitch:0,cacheLoadThreshold:20,minTimeToSwitch:oi()?.5:0,preferNetworkInformationBandwidth:!1},n={codecSwitchingStrategy:n,addExtraFeaturesToSourceBuffer:function(T){return on([T],"")},forceTransmux:!1,insertFakeEncryptionInInit:!0,modifyCueCallback:function(T,x){return on([T,x])},dispatchAllEmsgBoxes:!1};var c=!1,f=!1,y=!0;qp()&&(f=c=!0,y=!1);var m={drm:t,manifest:i,streaming:r,mediaSource:n,offline:l,abrFactory:function(){return new en},adaptationSetCriteriaFactory:function(){return new(Function.prototype.bind.apply($d,[null].concat(J(Et.apply(0,arguments)))))},abr:e,autoShowText:3,preferredAudioLanguage:"",preferredAudioLabel:"",preferredTextLanguage:"",preferredVariantRole:"",preferredTextRole:"",preferredAudioChannelCount:2,preferredVideoHdrLevel:"AUTO",preferredVideoLayout:"",preferredVideoLabel:"",preferredVideoCodecs:[],preferredAudioCodecs:[],preferredTextFormats:[],preferForcedSubs:!1,preferSpatialAudio:!1,preferredDecodingAttributes:[],restrictions:{minWidth:0,maxWidth:1/0,minHeight:0,maxHeight:1/0,minPixels:0,maxPixels:1/0,minFrameRate:0,maxFrameRate:1/0,minBandwidth:0,maxBandwidth:1/0,minChannelsCount:0,maxChannelsCount:1/0},playRangeStart:0,playRangeEnd:1/0,textDisplayer:{captionsUpdatePeriod:.25,fontScaleFactor:1},textDisplayFactory:function(){return null},cmcd:{enabled:!1,sessionId:"",contentId:"",rtpSafetyFactor:5,useHeaders:!1,includeKeys:[],version:1},cmsd:{enabled:!0,applyMaximumSuggestedBitrate:!0,estimatedThroughputWeightRatio:.5},lcevc:{enabled:!1,dynamicPerformanceScaling:!0,logLevel:0,drawLogo:!1,poster:!0},ads:{customPlayheadTracker:c,skipPlayDetection:f,supportsMultipleMediaElements:y,disableHLSInterstitial:!1,disableDASHInterstitial:!1,allowPreloadOnDomElements:!0},ignoreHardwareResolution:!1};return l.trackSelectionCallback=function(T){return z(function(x){return x.return(Z0(T,m.preferredAudioLanguage,m.preferredVideoHdrLevel))})},m}function ep(){return{streaming:{inaccurateManifestTolerance:0,segmentPrefetchLimit:2,updateIntervalSeconds:.1,maxDisabledTime:1,retryParameters:{baseDelay:100}},manifest:{dash:{autoCorrectDrift:!1},retryParameters:{baseDelay:100}},drm:{retryParameters:{baseDelay:100}}}}function ba(e,t,n){var i={".drm.keySystemsMapping":"",".drm.servers":"",".drm.clearKeys":"",".drm.advanced":{distinctiveIdentifierRequired:!1,persistentStateRequired:!1,videoRobustness:[],audioRobustness:[],sessionType:"",serverCertificate:new Uint8Array(0),serverCertificateUri:"",individualizationServer:"",headers:{}}};return Jd(e,t,n||ku(),i,"")}function Z0(e,t,n){var i=n;i=="AUTO"&&(n=e.some(function(f){return!!(f.hdr&&f.hdr=="HLG")}),i=Gp(n));var r=e.filter(function(f){return!(f.type!="variant"||f.hdr&&f.hdr!=i)});n=[];var l=Bc(t,r.map(function(f){return f.language}));l&&(n=r.filter(function(f){return It(f.language)==l})),n.length==0&&(n=r.filter(function(f){return f.primary})),n.length==0&&(r.map(function(f){return f.language}),n=r);var c=n.filter(function(f){return f.height&&480>=f.height});for(c.length&&(c.sort(function(f,y){return y.height-f.height}),n=c.filter(function(f){return f.height==c[0].height})),t=[],n.length&&(r=Math.floor(n.length/2),n.sort(function(f,y){return f.bandwidth-y.bandwidth}),t.push(n[r])),e=b(e),n=e.next();!n.done;n=e.next())n=n.value,n.type!=at&&n.type!="image"||t.push(n);return t}function oc(e){return on([e],e)}function tp(e){return on([e],e)}Pe("shaka.util.PlayerConfiguration",Eo),Eo.mergeConfigObjects=ba,Eo.createDefaultForLL=ep,Eo.createDefault=ku;function Ao(){this.g=null,this.h=[]}function Cf(e,t){var n=0;e.g&&e.g.state==t&&(n+=e.g.duration),e=b(e.h);for(var i=e.next();!i.done;i=e.next())i=i.value,n+=i.state==t?i.duration:0;return n}function Rm(e){function t(l){return{timestamp:l.timestamp,state:l.state,duration:l.duration}}for(var n=[],i=b(e.h),r=i.next();!r.done;r=i.next())n.push(t(r.value));return e.g&&n.push(t(e.g)),n}function Mm(){this.i=this.h=null,this.g=[]}function Ru(e,t,n){e.i!=t&&(e.i=t,e.g.push({timestamp:Date.now()/1e3,id:t.id,type:"text",fromAdaptation:n,bandwidth:null}))}function Qi(){this.mc=this.bh=this.u=this.A=this.I=this.B=this.o=this.j=this.H=this.C=this.i=this.P=this.T=this.L=this.M=this.O=this.l=this.m=NaN,this.K=0,this.F=this.G=NaN,this.g=new Ao,this.h=new Mm}function dr(e,t,n,i){Ut.call(this),this.O=e,this.Z=t,this.Fa=i.networkingEngine,this.B=n,this.o=null,this.ya=0,this.Ma=i.Lc,this.F=i.Zi,this.Na=i.$i,this.g=i.config,this.l=this.G=this.h=null,this.pa=!1,this.H=i.kj,this.sa=!1,this.i=null,this.ka=!1,this.j=this.C=null,this.ea=!1,this.M=new Map,this.Aa=!1,this.Ga=i.jj,this.$=new Qi,this.oa=new kt,this.m=new kt,this.P=null,this.u=!1,this.fa=i.Uh,this.W=this.K=null,this.La=i.Th,this.T=!1,this.L=[],this.I=[],this.A=!0}ot(dr,Ut);function Ia(e,t,n){(e=t?e.I:e.L)?e.push(n):n()}function Wl(e){if(e.I)for(var t=b(e.I),n=t.next();!n.done;n=t.next())n=n.value,n();e.I=null}function Nm(e,t){if(e.P=t,e.T=!0,e.L){t=b(e.L);for(var n=t.next();!n.done;n=t.next())n=n.value,n()}e.L=null}h=dr.prototype,h.getStartTime=function(){return this.B},h.Qc=function(){return this.O},h.Hf=function(){return this.h};function $0(e){return e.ea=!0,e.j}function lc(e){return e.sa=!0,e.H}h.getStats=function(){return this.$};function Pm(e){return e.ka=!0,e.i}h.Ai=function(){return this.K?eu(this.K):null},h.zi=function(){return this.W?Bn(this.W):null};function e1(e){return e.Aa=!0,e.M}h.start=function(){var e=this;(function(){var t;return z(function(n){switch(n.g){case 1:return _(n,Promise.resolve(),2);case 2:return pe(n,3),_(n,t1(e),5);case 5:if(Mu(e),w.shakaMediaKeysPolyfill==="webkit"){n.s(6);break}return _(n,Lm(e),7);case 7:Mu(e);case 6:return _(n,n1(e),8);case 8:if(Mu(e),!e.fa||!e.i){n.s(9);break}return _(n,Xg(e.i),10);case 10:Mu(e);case 9:e.m.resolve(),Ue(n,0);break;case 3:t=Me(n),t instanceof Y&&(t.code==7001||t.code==7003)||e.m.reject(t),se(n)}})})()},h.dispatchEvent=function(e){return this.P?this.P.dispatchEvent(e):Ut.prototype.dispatchEvent.call(this,e)},h.onError=function(e){e.severity===2&&(this.m.reject(e),this.destroy());var t=new Map().set("detail",e);t=new ke("error",t),this.dispatchEvent(t),t.defaultPrevented&&(e.handled=!0)};function Mu(e){if(e.u)throw new Y(2,7,7003)}function oy(e,t){e.dispatchEvent(new ke("onstatechange",new Map().set("state",t)))}function t1(e){var t,n,i,r,l,c,f,y,m;return z(function(T){switch(T.g){case 1:if(oy(e,"manifest-parser"),e.l||(e.G=_s(e.O,e.Z),e.l=e.G(),e.l.configure(e.g.manifest,function(){return e.A})),t=Date.now()/1e3,oy(e,"manifest"),e.h){T.s(2);break}return _(T,e.l.start(e.O,e.Na),3);case 3:if(e.h=T.h,e.h.variants.length!=1){T.s(2);break}for(n=[],i=e.h.variants[0],r=b([i.video,i.audio]),l=r.next();!l.done;l=r.next())(c=l.value)&&!c.segmentIndex&&n.push(c.createSegmentIndex());if(!(0<n.length)){T.s(2);break}return _(T,Promise.all(n),2);case 2:return e.oa.resolve(),f=new ke("manifestparsed",void 0),_(T,Promise.resolve(),7);case 7:if(e.dispatchEvent(f),e.h.variants.length==0)throw new Y(2,4,4036);_m(e.h),y=Date.now()/1e3,m=y-t,e.$.H=m,se(T)}})}function Lm(e,t){var n,i,r,l,c,f;return z(function(y){switch(y.g){case 1:if(!e.h||e.i)return y.return();if(oy(e,"drm-engine"),e.ya=Date.now()/1e3,e.i=e.Ma(),e.F.h=e.i,e.i.configure(e.g.drm,function(){return e.A}),n=Jc(e.F,e.h),!n){y.s(2);break}return i=new ke("trackschanged",void 0),_(y,Promise.resolve(),3);case 3:Mu(e),e.dispatchEvent(i);case 2:return r=fd(e.h.variants),l=!0,e.h&&e.h.presentationTimeline&&e.h.type!="HLS"&&(l=e.h.presentationTimeline.U()),_(y,wh(e.i,r,e.h.offlineSessionIds,l),4);case 4:if(Mu(e),!t){y.s(5);break}return _(y,e.i.Lb(t),6);case 6:Mu(e);case 5:return _(y,Dd(e.F,e.h),7);case 7:if(c=y.h,!c){y.s(0);break}return f=new ke("trackschanged",void 0),_(y,Promise.resolve(),9);case 9:e.dispatchEvent(f),se(y)}})}h.configure=function(e,t){e=Iu(e,t),ba(this.g,e)},h.getConfiguration=function(){return so(this.g)};function n1(e){var t,n,i,r,l,c,f;return z(function(y){return e.o||(e.o=e.g.adaptationSetCriteriaFactory(),e.o.configure({language:e.g.preferredAudioLanguage,role:e.g.preferredVariantRole,channelCount:e.g.preferredAudioChannelCount,Sc:e.g.preferredVideoHdrLevel,spatialAudio:e.g.preferSpatialAudio,videoLayout:e.g.preferredVideoLayout,Kc:e.g.preferredAudioLabel,fd:e.g.preferredVideoLabel,codecSwitchingStrategy:e.g.mediaSource.codecSwitchingStrategy,audioCodec:""})),e.La&&(t=e.g.abrFactory,e.C=t,e.j=t(),e.j.configure(e.g.abr)),!e.fa||(n=e.h.presentationTimeline.U(),i=fd(e.h.variants),r=e.o.create(i),e.j.configure(e.g.abr),e.j.setVariants(Array.from(r.values())),l=e.j.chooseVariant(),!l)?y.s(0):(c=[],e.K=l,l.video&&c.push(ly(e,l.video,n)),l.audio&&c.push(ly(e,l.audio,n)),(f=iu(e.h.textStreams,e.g.preferredTextLanguage,e.g.preferredTextRole,e.g.preferForcedSubs)[0]||null)&&dd(l.audio,f,e.g)&&(c.push(ly(e,f,n)),e.W=f),_(y,Promise.all(c),0))})}function ly(e,t,n){var i,r,l,c,f;return z(function(y){return y.g==1?(i=e.g.streaming.segmentPrefetchLimit||2,r=new Kd(i,t,function(m,T,x){return bu(m,T,x||null,e.g.streaming.retryParameters,e.Fa,e.A)},!1),e.M.set(t.id,r),t.segmentIndex?y.s(2):_(y,t.createSegmentIndex(),2)):(l=e.B||0,c=t.segmentIndex.Gb(l),f=null,c&&(f=c.current(),f||(f=c.next().value)),f||(f=Hn(t.segmentIndex)),f?n?f.Y?_(y,Au(r,f.Y),0):y.s(0):_(y,$s(r,f.startTime),0):y.s(0))})}h.Lj=function(){return this.m},h.destroy=function(){var e=this,t,n,i;return z(function(r){switch(r.g){case 1:if(e.u=!0,!e.l||e.pa){r.s(2);break}return _(r,e.l.stop(),2);case 2:if(!e.j||e.ea){r.s(4);break}return _(r,e.j.stop(),4);case 4:if(e.H&&!e.sa&&e.H.release(),!e.i||e.ka){r.s(6);break}return _(r,e.i.destroy(),6);case 6:if(0<e.M.size&&!e.Aa)for(t=b(e.M.values()),n=t.next();!n.done;n=t.next())i=n.value,qr(i);se(r)}})};function _m(e){function t(n){return n.video&&n.audio||n.video&&n.video.codecs.includes(",")}e.variants.some(t)&&(e.variants=e.variants.filter(t))}Pe("shaka.media.PreloadManager",dr),dr.prototype.destroy=dr.prototype.destroy,dr.prototype.waitForFinish=dr.prototype.Lj,dr.prototype.getPrefetchedTextTrack=dr.prototype.zi,dr.prototype.getPrefetchedVariantTrack=dr.prototype.Ai;function Fr(e,t){Ut.call(this);var n=this;this.i=e,this.l=t,this.g=new Map,this.m=[{Jc:null,Ic:uc,xc:function(i,r){return kr(n,"enter",i,r)}},{Jc:ac,Ic:uc,xc:function(i,r){return kr(n,"enter",i,r)}},{Jc:ol,Ic:uc,xc:function(i,r){return kr(n,"enter",i,r)}},{Jc:uc,Ic:ac,xc:function(i,r){return kr(n,"exit",i,r)}},{Jc:uc,Ic:ol,xc:function(i,r){return kr(n,"exit",i,r)}},{Jc:ac,Ic:ol,xc:function(i,r){r?kr(n,"skip",i,r):(kr(n,"enter",i,r),kr(n,"exit",i,r))}},{Jc:ol,Ic:ac,xc:function(i,r){return kr(n,"skip",i,r)}}],this.h=new vt,this.h.D(this.i,"regionremove",function(i){n.g.delete(i.region)})}ot(Fr,Ut),Fr.prototype.release=function(){this.i=null,this.g.clear(),this.h.release(),this.h=null,Ut.prototype.release.call(this)},Fr.prototype.j=function(e,t){if(!this.l||e!=0){this.l=!1;for(var n=b(this.i.h.values()),i=n.next();!i.done;i=n.next()){i=i.value;var r=this.g.get(i),l=e<i.startTime?ac:e>i.endTime?ol:uc;this.g.set(i,l);for(var c=b(this.m),f=c.next();!f.done;f=c.next())f=f.value,f.Jc==r&&f.Ic==l&&f.xc(i,t)}}};function kr(e,t,n,i){t=new ke(t,new Map([["region",n],["seeking",i]])),e.dispatchEvent(t)}var ac=1,uc=2,ol=3;function Co(e,t,n){var i,r,l,c,f,y,m;return z(function(T){switch(T.g){case 1:var x=new pn(e).ab.split("/").pop().split(".");return i=x.length==1?"":x.pop().toLowerCase(),(r=Um.get(i))?T.return(r):(l=0,c=cn([e],n),pe(T,2),c.method="HEAD",_(T,t.request(l,c).promise,4));case 4:f=T.h,r=f.headers["content-type"],Ue(T,3);break;case 2:if(y=Me(T),!y||y.code!=1002&&y.code!=1001){T.s(3);break}return c.method="GET",_(T,t.request(l,c).promise,6);case 6:m=T.h,r=m.headers["content-type"];case 3:return T.return(r?r.toLowerCase().split(";").shift():"")}})}var Um=new Map().set("mp4","video/mp4").set("m4v","video/mp4").set("m4a","audio/mp4").set("webm","video/webm").set("weba","audio/webm").set("mkv","video/webm").set("ts","video/mp2t").set("ogv","video/ogg").set("ogg","audio/ogg").set("mpg","video/mpeg").set("mpeg","video/mpeg").set("mov","video/quicktime").set("m3u8","application/x-mpegurl").set("mpd","application/dash+xml").set("ism","application/vnd.ms-sstr+xml").set("mp3","audio/mpeg").set("aac","audio/aac").set("flac","audio/flac").set("wav","audio/wav").set("sbv","text/x-subviewer").set("srt","text/srt").set("vtt","text/vtt").set("webvtt","text/vtt").set("ttml","application/ttml+xml").set("lrc","application/x-subtitle-lrc").set("ssa","text/x-ssa").set("ass","text/x-ssa").set("jpeg","image/jpeg").set("jpg","image/jpeg").set("png","image/png").set("svg","image/svg+xml").set("webp","image/webp").set("avif","image/avif").set("html","text/html").set("htm","text/html");function bf(e,t){if(e.lineBreak)return`
`;if(e.nestedCues.length)return e.nestedCues.map(function(c){return bf(c,e)}).join("");if(!e.payload)return e.payload;var n=[],i=e.fontWeight>=Qa,r=e.fontStyle==ms,l=e.textDecoration.includes(Ko);return i&&n.push(["b"]),r&&n.push(["i"]),l&&n.push(["u"]),r=e.color,r==""&&t&&(r=t.color),i="",(r=np(r))&&(i+="."+r),r=e.backgroundColor,r==""&&t&&(r=t.backgroundColor),(t=np(r))&&(i+=".bg_"+t),i&&n.push(["c",i]),n.reduceRight(function(c,f){var y=b(f);return f=y.next().value,y=y.next().value,"<"+f+(y===void 0?"":y)+">"+c+"</"+f+">"},e.payload)}function np(e){e=e.toLowerCase();var t=e.replace(/\s/g,"").match(/^rgba?\((\d+),(\d+),(\d+),?([^,\s)]+)?/i);switch(t?e="#"+(parseInt(t[1],10)|256).toString(16).slice(1)+(parseInt(t[2],10)|256).toString(16).slice(1)+(parseInt(t[3],10)|256).toString(16).slice(1):e.startsWith("#")&&7<e.length&&(e=e.slice(0,7)),e){case"white":case"#fff":case"#ffffff":return"white";case"lime":case"#0f0":case"#00ff00":return"lime";case"cyan":case"#0ff":case"#00ffff":return"cyan";case"red":case"#f00":case"#ff0000":return"red";case"yellow":case"#ff0":case"#ffff00":return"yellow";case"magenta":case"#f0f":case"#ff00ff":return"magenta";case"blue":case"#00f":case"#0000ff":return"blue";case"black":case"#000":case"#000000":return"black"}return null}function If(e,t){var n=[];e=b(Df(e));for(var i=e.next();!i.done;i=e.next())if(i=i.value,i.isContainer)n.push.apply(n,J(If(i.nestedCues,i)));else{var r=i.clone();r.nestedCues=[],r.payload=bf(i,t),n.push(r)}return n}function Df(e){var t=[];e=b(e);for(var n=e.next(),i={};!n.done;i={jf:void 0},n=e.next())i.jf=n.value,t.some(function(r){return function(l){return ca(r.jf,l)}}(i))||t.push(i.jf);return t}function jm(e){function t(i){for(var r=5381,l=i.length;l;)r=33*r^i.charCodeAt(--l);return(r>>>0).toString()}if(e.startTime>=e.endTime)return null;var n=new VTTCue(e.startTime,e.endTime,e.payload);n.id=t(e.startTime.toString())+t(e.endTime.toString())+t(e.payload),n.lineAlign=e.lineAlign,n.positionAlign=e.positionAlign,e.size&&(n.size=e.size);try{n.align=e.textAlign}catch{}return e.textAlign=="center"&&n.align!="center"&&(n.align="middle"),e.writingMode=="vertical-lr"?n.vertical="lr":e.writingMode=="vertical-rl"&&(n.vertical="rl"),e.lineInterpretation==1&&(n.snapToLines=!1),e.line!=null&&(n.line=e.line),e.position!=null&&(n.position=e.position),n}function ci(e,t){for(this.h=e,this.i=t,this.g=null,e=b(Array.from(this.h.textTracks)),t=e.next();!t.done;t=e.next())t=t.value,t.kind!=="metadata"&&t.kind!=="chapters"&&(t.mode="disabled",t.label==this.i&&(this.g=t));this.g&&(this.g.mode="hidden")}h=ci.prototype,h.configure=function(){},h.remove=function(e,t){return this.g?(ay(this.g,function(n){return n.startTime<t&&n.endTime>e}),!0):!1},h.append=function(e){if(this.g){var t=If(e),n=[];e=this.g.cues?Array.from(this.g.cues):[],t=b(t);for(var i=t.next(),r={};!i.done;r={Tc:void 0},i=t.next())r.Tc=i.value,!e.some(function(l){return function(c){return c.startTime==l.Tc.startTime&&c.endTime==l.Tc.endTime&&c.text==l.Tc.payload}}(r))&&r.Tc.payload&&(i=jm(r.Tc))&&n.push(i);for(e=n.slice().sort(function(l,c){return l.startTime!=c.startTime?l.startTime-c.startTime:l.endTime!=c.endTime?l.endTime-c.startTime:"line"in VTTCue.prototype?n.indexOf(c)-n.indexOf(l):n.indexOf(l)-n.indexOf(c)}),e=b(e),t=e.next();!t.done;t=e.next())this.g.addCue(t.value)}},h.destroy=function(){return this.g&&(ay(this.g,function(){return!0}),this.g.mode="disabled"),this.g=this.h=null,Promise.resolve()},h.isTextVisible=function(){return this.g?this.g.mode=="showing":!1},h.setTextVisibility=function(e){e&&!this.g&&Bm(this),this.g&&(this.g.mode=e?"showing":"hidden")},h.setTextLanguage=function(){},h.enableTextDisplayer=function(){Bm(this)};function Bm(e){e.h&&!e.g&&(e.g=e.h.addTextTrack("subtitles",e.i),e.g.mode="hidden")}function ay(e,t){var n=e.mode;e.mode=n=="showing"?"showing":"hidden";for(var i=b(Array.from(e.cues)),r=i.next();!r.done;r=i.next())(r=r.value)&&t(r)&&e.removeCue(r);e.mode=n}Pe("shaka.text.SimpleTextDisplayer",ci),ci.prototype.enableTextDisplayer=ci.prototype.enableTextDisplayer,ci.prototype.setTextLanguage=ci.prototype.setTextLanguage,ci.prototype.setTextVisibility=ci.prototype.setTextVisibility,ci.prototype.isTextVisible=ci.prototype.isTextVisible,ci.prototype.destroy=ci.prototype.destroy,ci.prototype.append=ci.prototype.append,ci.prototype.remove=ci.prototype.remove,ci.prototype.configure=ci.prototype.configure;function Kn(){}h=Kn.prototype,h.configure=function(){},h.remove=function(){},h.append=function(){},h.destroy=function(){},h.isTextVisible=function(){return!1},h.setTextVisibility=function(){},h.setTextLanguage=function(){},h.enableTextDisplayer=function(){},Pe("shaka.text.StubTextDisplayer",Kn),Kn.prototype.enableTextDisplayer=Kn.prototype.enableTextDisplayer,Kn.prototype.setTextLanguage=Kn.prototype.setTextLanguage,Kn.prototype.setTextVisibility=Kn.prototype.setTextVisibility,Kn.prototype.isTextVisible=Kn.prototype.isTextVisible,Kn.prototype.destroy=Kn.prototype.destroy,Kn.prototype.append=Kn.prototype.append,Kn.prototype.remove=Kn.prototype.remove,Kn.prototype.configure=Kn.prototype.configure;function Si(e,t){var n=this;document.fullscreenEnabled||bt("Using UITextDisplayer in a browser without Fullscreen API support causes subtitles to not be rendered in fullscreen"),this.A=!1,this.h=[],this.j=e,this.C=t,this.u=this.m=null,this.g=document.createElement("div"),this.g.classList.add("shaka-text-container"),this.g.style.textAlign="center",this.g.style.display="flex",this.g.style.flexDirection="column",this.g.style.alignItems="center",this.g.style.justifyContent="flex-end",this.C.appendChild(this.g),this.o=new dt(function(){n.j.paused||bo(n)}),Of(this),this.l=new Map,this.i=new vt,this.i.D(document,"fullscreenchange",function(){bo(n,!0)}),this.i.D(this.j,"seeking",function(){bo(n,!0)}),this.i.D(this.j,"ratechange",function(){Of(n)}),this.i.D(this.j,"resize",function(){var i=n.j,r=i.videoWidth;i=i.videoHeight,r&&i?n.m=r/i:n.m=null}),this.B=null,"ResizeObserver"in w&&(this.B=new ResizeObserver(function(){bo(n,!0)}),this.B.observe(this.g)),this.F=new Map}h=Si.prototype,h.configure=function(e){this.u=e,Of(this),bo(this,!0)},h.append=function(e){var t=[].concat(J(this.h));e=b(Df(e));for(var n=e.next(),i={};!n.done;i={kf:void 0},n=e.next())i.kf=n.value,t.some(function(r){return function(l){return ca(l,r.kf)}}(i))||this.h.push(i.kf);this.h.length&&Of(this),bo(this)},h.destroy=function(){return this.g&&(this.C.removeChild(this.g),this.g=null,this.A=!1,this.h=[],this.o&&(this.o.stop(),this.o=null),this.l.clear(),this.i&&(this.i.release(),this.i=null),this.B&&(this.B.disconnect(),this.B=null)),Promise.resolve()},h.remove=function(e,t){if(!this.g)return!1;var n=this.h.length;return this.h=this.h.filter(function(i){return i.startTime<e||i.endTime>=t}),bo(this,n>this.h.length),this.h.length||Of(this),!0},h.isTextVisible=function(){return this.A},h.setTextVisibility=function(e){this.A=e,bo(this,!0)},h.setTextLanguage=function(e){e&&e!="und"?this.g.setAttribute("lang",e):this.g.setAttribute("lang","")},h.enableTextDisplayer=function(){};function Of(e){e.o&&(e.h.length?e.o.ua((e.u?e.u.captionsUpdatePeriod:.25)/Math.max(1,Math.abs(e.j.playbackRate))):e.o.stop())}function i1(e,t){for(;t!=null;){if(t==e.g)return!0;t=t.parentElement}return!1}function kf(e,t,n,i,r){var l=!1,c=[],f=[];t=b(t);for(var y=t.next();!y.done;y=t.next()){y=y.value,r.push(y);var m=e.l.get(y),T=y.startTime<=i&&y.endTime>i,x=m?m.Nh:null;m&&(c.push(m.lf),m.Ec&&c.push(m.Ec),T||(l=!0,e.l.delete(y),m=null)),T&&(f.push(y),m?i1(e,x)||(l=!0):(uy(e,y,r),m=e.l.get(y),x=m.Nh,l=!0)),0<y.nestedCues.length&&x&&kf(e,y.nestedCues,x,i,r),r.pop()}if(l){for(i=b(c),r=i.next();!r.done;r=i.next())r=r.value,r.parentElement&&r.parentElement.removeChild(r);for(f.sort(function(D,R){return D.startTime!=R.startTime?D.startTime-R.startTime:D.endTime-R.endTime}),f=b(f),i=f.next();!i.done;i=f.next())i=e.l.get(i.value),i.Ec?(i.Ec.contains(n)&&i.Ec.removeChild(n),n.appendChild(i.Ec),i.Ec.appendChild(i.lf)):n.appendChild(i.lf)}}function bo(e,t){if(e.g){var n=e.j.currentTime;if(!e.A||t!==void 0&&t){t=b(e.F.values());for(var i=t.next();!i.done;i=t.next())_i(i.value);_i(e.g),e.l.clear(),e.F.clear()}e.A&&kf(e,e.h,e.g,n,[])}}function uy(e,t,n){var i=1<n.length,r=i?"span":"div";t.lineBreak&&(r="br"),t.rubyTag&&(r=t.rubyTag),i=!i&&0<t.nestedCues.length;var l=document.createElement(r);if(r!="br"&&Rf(e,l,t,n,i),n=null,t.region&&t.region.id){var c=t.region,f=e.m===4/3?2.5:1.9;if(n=c.id+"_"+c.width+"x"+c.height+(c.heightUnits==Gi?"%":"px")+"-"+c.viewportAnchorX+"x"+c.viewportAnchorY+(c.viewportAnchorUnits==Gi?"%":"px"),e.F.has(n))n=e.F.get(n);else{r=document.createElement("span");var y=c.heightUnits==Gi?"%":"px",m=c.widthUnits==Gi?"%":"px",T=c.viewportAnchorUnits==Gi?"%":"px";r.id="shaka-text-region---"+n,r.classList.add("shaka-text-region"),r.style.position="absolute";var x=c.height,D=c.width;c.heightUnits===2&&(x=5.33*c.height,y="%"),c.widthUnits===2&&(D=c.width*f,m="%"),r.style.height=x+y,r.style.width=D+m,c.viewportAnchorUnits===2?(f=c.viewportAnchorY/75*100,y=c.viewportAnchorX/(e.m===4/3?160:210)*100,f-=c.regionAnchorY*x/100,y-=c.regionAnchorX*D/100,r.style.top=f+"%",r.style.left=y+"%"):(r.style.top=c.viewportAnchorY-c.regionAnchorY*x/100+T,r.style.left=c.viewportAnchorX-c.regionAnchorX*D/100+T),c.heightUnits!==0&&c.widthUnits!==0&&c.viewportAnchorUnits!==0&&(c=Math.max(0,Math.min(100-(parseInt(r.style.width.slice(0,-1),10)||0),parseInt(r.style.left.slice(0,-1),10)||0)),r.style.top=Math.max(0,Math.min(100-(parseInt(r.style.height.slice(0,-1),10)||0),parseInt(r.style.top.slice(0,-1),10)||0))+"%",r.style.left=c+"%"),r.style.display="flex",r.style.flexDirection="column",r.style.alignItems="center",r.style.justifyContent=t.displayAlign=="before"?"flex-start":t.displayAlign=="center"?"center":"flex-end",e.F.set(n,r),n=r}}r=l,i&&(r=document.createElement("span"),r.classList.add("shaka-text-wrapper"),r.style.backgroundColor=t.backgroundColor,r.style.lineHeight="normal",l.appendChild(r)),e.l.set(t,{lf:l,Nh:r,Ec:n})}function r1(e){var t=e.direction,n=e.positionAlign;return e=e.textAlign,n!==nd?n:e==="left"||e==="start"&&t===gs||e==="end"&&t==="rtl"?"line-left":e==="right"||e==="start"&&t==="rtl"||e==="end"&&t===gs?"line-right":"center"}function Rf(e,t,n,i,r){var l=t.style,c=n.nestedCues.length==0,f=1<i.length;l.whiteSpace="pre-wrap";var y=n.payload.replace(/\s+$/g,function(T){return" ".repeat(T.length)});if(l.webkitTextStrokeColor=n.textStrokeColor,l.webkitTextStrokeWidth=n.textStrokeWidth,l.color=n.color,l.direction=n.direction,l.opacity=n.opacity,l.paddingLeft=sy(n.linePadding,n,e.C),l.paddingRight=sy(n.linePadding,n,e.C),l.textCombineUpright=n.textCombineUpright,l.textShadow=n.textShadow,n.backgroundImage)l.backgroundImage="url('"+n.backgroundImage+"')",l.backgroundRepeat="no-repeat",l.backgroundSize="contain",l.backgroundPosition="center",n.backgroundColor&&(l.backgroundColor=n.backgroundColor),l.width="100%",l.height="100%";else{if(n.nestedCues.length)var m=t;else m=document.createElement("span"),t.appendChild(m);n.border&&(m.style.border=n.border),r||((t=Vm(i,function(T){return T.backgroundColor}))?m.style.backgroundColor=t:y&&(m.style.backgroundColor="rgba(0, 0, 0, 0.8)")),y&&(m.textContent=y)}f&&!i[i.length-1].isContainer?l.display="inline":(l.display="flex",l.flexDirection="column",l.alignItems="center",n.textAlign=="left"||n.textAlign=="start"?(l.width="100%",l.alignItems="start"):(n.textAlign=="right"||n.textAlign=="end")&&(l.width="100%",l.alignItems="end"),l.justifyContent=n.displayAlign=="before"?"flex-start":n.displayAlign=="center"?"center":"flex-end"),c||(l.margin="0"),l.fontFamily=n.fontFamily,l.fontWeight=n.fontWeight.toString(),l.fontStyle=n.fontStyle,l.letterSpacing=n.letterSpacing,l.fontSize=sy(n.fontSize,n,e.C,e.u?e.u.fontScaleFactor:1),i=n.line,i!=null&&(c=n.lineInterpretation,c==Ho&&(c=1,f=16,e.m&&1>e.m&&(f=32),i=0>i?100+i/f*100:i/f*100),c==1&&(l.position="absolute",n.writingMode==xr?(l.width="100%",n.lineAlign==Al?l.top=i+"%":n.lineAlign=="end"&&(l.bottom=100-i+"%")):n.writingMode=="vertical-lr"?(l.height="100%",n.lineAlign==Al?l.left=i+"%":n.lineAlign=="end"&&(l.right=100-i+"%")):(l.height="100%",n.lineAlign==Al?l.right=i+"%":n.lineAlign=="end"&&(l.left=100-i+"%")))),l.lineHeight=n.lineHeight,e=r1(n),e=="line-left"?(l.cssFloat="left",n.position!==null&&(l.position="absolute",n.writingMode==xr?(l.left=n.position+"%",l.width="auto"):l.top=n.position+"%")):e=="line-right"?(l.cssFloat="right",n.position!==null&&(l.position="absolute",n.writingMode==xr?(l.right=100-n.position+"%",l.width="auto"):l.bottom=n.position+"%")):n.position!==null&&n.position!=50&&(l.position="absolute",n.writingMode==xr?(l.left=n.position+"%",l.width="auto"):l.top=n.position+"%"),l.textAlign=n.textAlign,l.textDecoration=n.textDecoration.join(" "),l.writingMode=n.writingMode,"writingMode"in document.documentElement.style&&l.writingMode==n.writingMode||(l.webkitWritingMode=n.writingMode),n.size&&(n.writingMode==xr?l.width=n.size+"%":l.height=n.size+"%")}function sy(e,t,n,i){i=i===void 0?1:i;var r=(r=new RegExp(/(\d*\.?\d+)([a-z]+|%+)/).exec(e))?{value:Number(r[1]),unit:r[2]}:null;if(!r)return e;switch(e=r.unit,i*=r.value,e){case"%":return i/100*n.clientHeight/t.cellResolution.rows+"px";case"c":return n.clientHeight*i/t.cellResolution.rows+"px";default:return i+e}}function Vm(e,t){for(var n=e.length-1;0<=n;n--){var i=t(e[n]);if(i||i===0)return i}return null}Pe("shaka.text.UITextDisplayer",Si),Si.prototype.enableTextDisplayer=Si.prototype.enableTextDisplayer,Si.prototype.setTextLanguage=Si.prototype.setTextLanguage,Si.prototype.setTextVisibility=Si.prototype.setTextVisibility,Si.prototype.isTextVisible=Si.prototype.isTextVisible,Si.prototype.remove=Si.prototype.remove,Si.prototype.destroy=Si.prototype.destroy,Si.prototype.append=Si.prototype.append,Si.prototype.configure=Si.prototype.configure;function Hm(e,t){function n(l){for(var c=l,f=b(t),y=f.next();!y.done;y=f.next())y=y.value,y.end&&y.start<l&&(c+=y.end-y.start);return l=Math.floor(c/3600),f=Math.floor(c/60%60),y=Math.floor(c%60),c=Math.floor(1e3*c%1e3),(10>l?"0":"")+l+":"+(10>f?"0":"")+f+":"+(10>y?"0":"")+y+"."+(100>c?10>c?"00":"0":"")+c}var i=If(e);e=`WEBVTT
`,i=b(i);for(var r=i.next();!r.done;r=i.next())r=r.value,e+=n(r.startTime)+" --> "+n(r.endTime)+function(l){var c=[];switch(l.textAlign){case"left":c.push("align:left");break;case"right":c.push("align:right");break;case Yi:c.push("align:middle");break;case"start":c.push("align:start");break;case"end":c.push("align:end")}switch(l.writingMode){case"vertical-lr":c.push("vertical:lr");break;case"vertical-rl":c.push("vertical:rl")}return c.length?" "+c.join(" "):""}(r)+`
`,e+=r.payload+`
`;return e}Pe("shaka.text.WebVttGenerator",function(){});function ip(e,t){this.h=e,this.g=t,this.i=void 0,this.u=!1,this.F=!0,this.l=this.B=!1,this.o=this.m=void 0,this.A=0,this.G=!1,this.C=new vt,this.j=null}ip.prototype.setMediaElement=function(e){this.j=e,o1(this)},ip.prototype.configure=function(e){this.g=e};function Km(e){e.u=!1,e.F=!0,e.B=!1,e.l=!1,e.m=0,e.o=0,e.A=0,e.G=!1,e.j=null,e.C.Qa()}function cy(e,t){e.l=t,e.l?e.i==Pu?e.i=Mf:e.i==up&&(e.i=Lu):e.i==Mf?e.i=Pu:e.i==Lu&&(e.i=up)}function qm(e,t){if(e.g&&e.g.enabled&&e.g.version==gy&&e.j&&e.j.autoplay){var n=e.j.play();n&&n.then(function(){e.A=t}).catch(function(){e.A=0})}}function rp(e,t,n){try{if(!e.g.enabled)return t;var i=fy(e);e:{switch(n.toLowerCase()){case"audio/mp4":case"audio/webm":case"audio/ogg":case"audio/mpeg":case"audio/aac":case"audio/flac":case"audio/wav":var r=ka;break e;case"video/webm":case"video/mp4":case"video/mpeg":case"video/mp2t":r=lp;break e;case"application/x-mpegurl":case"application/vnd.apple.mpegurl":case"application/dash+xml":case"video/vnd.mpeg.dash.mpd":case"application/vnd.ms-sstr+xml":r=sc;break e}r=void 0}i.ot=r,i.su=!0;var l=Io(i);return ll(t,l)}catch(c){return _o("CMCD_SRC_ERROR","Could not generate src CMCD data.",c),t}}function o1(e){e.C.ma(e.j,"play",function(){e.m||(e.m=Date.now())}),e.C.ma(e.j,"playing",function(){e.o||(e.o=Date.now())})}function fy(e){return e.g.sessionId||(e.g.sessionId=w.crypto.randomUUID()),{v:e.g.version,sf:e.i,sid:e.g.sessionId,cid:e.g.contentId,mtp:e.h.getBandwidthEstimate()/1e3}}function Da(e,t,n){n=n===void 0?{}:n;var i=i===void 0?e.g.useHeaders:i;if(e.g.enabled){Object.assign(n,fy(e)),n.pr=e.h.gb();var r=n.ot===Do||n.ot===lp;if(e.B&&r&&(n.bs=!0,n.su=!0,e.B=!1),n.su==null&&(n.su=e.F),n.v===gy&&(e.h.U()&&(n.ltc=e.h.Zd()),r=!e.G&&e.o&&e.m?e.o-(e.A||e.m):void 0,r!=null&&(n.msd=r,e.G=!0)),e=dy(e,n),i)i=Oa(e),Object.keys(i).length&&Object.assign(t.headers,i);else{var l=Io(e);l&&(t.uris=t.uris.map(function(c){return ll(c,l)}))}}}function dy(e,t){var n=e.g.includeKeys;return n.length?Object.keys(t).reduce(function(i,r){return n.includes(r)&&(i[r]=t[r]),i},{}):t}function op(e){if(e.type===0)return Fm;if(e=e.stream){var t=e.type;if(t=="video")return e.codecs&&e.codecs.includes(",")?lp:Do;if(t=="audio")return ka;if(t=="text")return e.mimeType==="application/mp4"?ap:Nu}}function py(e,t){if(t=e.h.Fb()[t],!t.length)return NaN;var n=e.h.getCurrentTime();return(e=t.find(function(i){return i.start<=n&&i.end>=n}))?1e3*(e.end-n):NaN}function hy(e,t){if(t=e.h.Fb()[t],!t.length)return 0;var n=e.h.getCurrentTime();return(e=t.find(function(i){return i.start<=n&&i.end>=n}))?1e3*(e.end-n):0}function yy(e,t){var n=e.h.Rb();if(!n.length)return NaN;e=n[0],n=b(n);for(var i=n.next();!i.done;i=n.next())i=i.value,i.type==="variant"&&i.bandwidth>e.bandwidth&&(e=i);switch(t){case Do:return e.videoBandwidth||NaN;case ka:return e.audioBandwidth||NaN;default:return e.bandwidth}}function Io(e){function t(x){return 100*n(x/100)}function n(x){return Math.round(x)}function i(x){return!Number.isNaN(x)&&x!=null&&x!==""&&x!==!1}var r=[],l={br:n,d:n,bl:t,dl:t,mtp:t,nor:function(x){return encodeURIComponent(x)},rtp:t,tb:n},c=Object.keys(e||{}).sort();c=b(c);for(var f=c.next();!f.done;f=c.next()){f=f.value;var y=e[f];if(i(y)&&(f!=="v"||y!==1)&&(f!="pr"||y!==1)){var m=l[f];m&&(y=m(y)),m=typeof y;var T=void 0;T=m==="string"&&f!=="ot"&&f!=="sf"&&f!=="st"?f+"="+JSON.stringify(y):m==="boolean"?f:m==="symbol"?f+"="+y.description:f+"="+y,r.push(T)}}return r.join(",")}function Oa(e){var t=Object.keys(e),n={},i=["Object","Request","Session","Status"],r=[{},{},{},{}],l={br:0,d:0,ot:0,tb:0,bl:1,dl:1,mtp:1,nor:1,nrr:1,su:1,ltc:1,cid:2,pr:2,sf:2,sid:2,st:2,v:2,msd:2,bs:3,rtp:3};t=b(t);for(var c=t.next();!c.done;c=t.next())c=c.value,r[l[c]!=null?l[c]:1][c]=e[c];for(e=0;e<r.length;e++)(l=Io(r[e]))&&(n["CMCD-"+i[e]]=l);return n}function ll(e,t){return!t||e.includes("offline:")?e:(e=new pn(e),e.g.set("CMCD",t),e.toString())}var sc="m",ka="a",Do="v",lp="av",Fm="i",Nu="c",ap="tt",gy=2,Pu="d",Mf="ld",up="h",Lu="lh";Pe("shaka.util.CmcdManager.StreamingFormat",{DASH:Pu,hk:Mf,HLS:up,ik:Lu,wk:"s",OTHER:"o"});function Bi(e){this.h=e,this.g=null}h=Bi.prototype,h.configure=function(e){this.h=e},h.Ug=function(){return this.h.enabled&&this.h.applyMaximumSuggestedBitrate&&this.g&&this.g.has(sp)?1e3*this.g.get(sp):null},h.Sg=function(){return this.h.enabled&&this.g&&this.g.has(cc)?1e3*this.g.get(cc):null},h.Ci=function(){return this.h.enabled&&this.g&&this.g.has(Nf)?this.g.get(Nf):null},h.Di=function(){return this.h.enabled&&this.g&&this.g.has(vy)?this.g.get(vy):null},h.getBandwidthEstimate=function(e){var t=this.Sg();if(!t)return e;var n=this.h.estimatedThroughputWeightRatio;return 0<n&&1>=n?e*(1-n)+t*n:e};function my(e){return e?e.toLowerCase()==="false"?!1:/^[-0-9]/.test(e)?parseInt(e,10):e.replace(/["]+/g,""):!0}Pe("shaka.util.CmsdManager",Bi),Bi.prototype.getBandwidthEstimate=Bi.prototype.getBandwidthEstimate,Bi.prototype.getRoundTripTime=Bi.prototype.Di,Bi.prototype.getResponseDelay=Bi.prototype.Ci,Bi.prototype.getEstimatedThroughput=Bi.prototype.Sg,Bi.prototype.getMaxBitrate=Bi.prototype.Ug;var cc="etp",sp="mb",Nf="rd",vy="rtt";function zm(){this.g=null,this.h=[]}function fc(e,t){return z(function(n){if(n.g==1)return e.g?_(n,new Promise(function(i){return e.h.push(i)}),2):n.s(2);e.g=t,se(n)})}zm.prototype.release=function(){0<this.h.length?this.h.shift()():this.g=null};function o(e,t,n){t=t===void 0?null:t,Ut.call(this);var i=this;this.m=Ym,this.h=null,this.ue=t,this.oa=!1,this.Qe=new vt,this.zd=new vt,this.l=new vt,this.Na=new vt,this.Sb=new vt,this.G=this.I=this.C=this.F=null,this.Te=0,this.$=new zm,this.Z=this.Pb=this.T=this.i=this.Qb=this.H=this.j=this.xd=this.O=this.yg=this.fa=this.L=this.Ga=this.Aa=this.yd=this.M=this.pa=this.K=this.La=null,this.sa=!1,this.Fa=this.o=null,this.We=1e9,this.Oe=[],this.Ve=-1,this.g=_u(this),this.Xe=ep(),this.P=null,this.Ue=-1,this.Ma=null,this.ka={width:1/0,height:1/0},this.te=new su(this.g,this.ka,null),this.Ee=[],this.B=null,this.W=this.g.adaptationSetCriteriaFactory(),this.W.configure({language:this.g.preferredAudioLanguage,role:this.g.preferredVariantRole,channelCount:this.g.preferredAudioChannelCount,Sc:this.g.preferredVideoHdrLevel,spatialAudio:this.g.preferSpatialAudio,videoLayout:this.g.preferredVideoLayout,Kc:this.g.preferredAudioLabel,fd:this.g.preferredVideoLabel,codecSwitchingStrategy:this.g.mediaSource.codecSwitchingStrategy,audioCodec:""}),this.Tb=this.g.preferredTextLanguage,this.Hd=this.g.preferredTextRole,this.Fd=this.g.preferForcedSubs,this.Cd=[],n&&n(this),this.L=Ob(this),this.fa=new Bi(this.g.cmsd),this.F=wi(this),this.F.kg(this.g.streaming.forceHTTP),this.F.lg(this.g.streaming.forceHTTPS),this.F.o=this.g.streaming.minBytesForProgressEvents,this.Ub=this.ea=this.A=null,this.Ze=!1,this.Ye=new dt(function(){return z(function(r){if(r.g==1)return i.ea?_(r,i.Lb(i.Ub,!0),3):r.s(0);if(r.g!=4)return _(r,i.load(i.ea),4);i.Ze?i.Ub.pause():i.Ub.play(),i.ea=null,i.Ze=!1,se(r)})}),Wm&&(this.A=Wm(),this.A.configure(this.g.ads),this.Sb.D(this.A,"ad-content-pause-requested",function(r){var l;return z(function(c){if(c.g==1)return i.Ye.stop(),i.ea?c.s(0):(i.Ub=i.h,i.Ze=i.Uc(),l=r.saveLivePosition||!1,_(c,i.Lg(!0,l),3));i.ea=c.h,se(c)})}),this.Sb.D(this.A,"ad-content-resume-requested",function(r){if(r=r.offset||0,i.ea){var l=i.ea;l.B&&r&&(l.B+=r)}i.Ye.da(.1)}),this.Sb.D(this.A,"ad-content-attach-requested",function(){return z(function(r){return i.h||!i.Ub?r.s(0):_(r,i.Lb(i.Ub,!0),0)})})),this.Qe.D(w,"online",function(){f1(i),i.eg()}),this.xe=new dt(function(){for(var r=Date.now()/1e3,l=!1,c=!0,f=b(i.i.variants),y=f.next();!y.done;y=f.next())y=y.value,0<y.disabledUntilTime&&y.disabledUntilTime<=r&&(y.disabledUntilTime=0,l=!0),0<y.disabledUntilTime&&(c=!1);c&&i.xe.stop(),l&&cp(i,!1,void 0,!1,!1)}),this.ya=null,e&&(Ot("Player w/ mediaElement","Please migrate from initializing Player with a mediaElement; use the attach method instead."),this.Lb(e,!0)),this.u=null}ot(o,Ut);function u(e){e.O!=null&&(is(e.O),e.O.release(),e.O=null)}function d(e,t,n){n||t.lcevc.enabled?(u(e),e.O==null&&(e.O=new uo(e.h,e.yg,t.lcevc,n),e.I&&(e.I.I=e.O))):u(e)}function g(e,t){return new ke(e,t)}h=o.prototype,h.destroy=function(){var e=this,t;return z(function(n){switch(n.g){case 1:return e.m==al?n.return():(u(e),t=e.detach(),e.m=al,_(n,t,2));case 2:return _(n,e.pf(),3);case 3:if(e.Qe&&(e.Qe.release(),e.Qe=null),e.zd&&(e.zd.release(),e.zd=null),e.l&&(e.l.release(),e.l=null),e.Na&&(e.Na.release(),e.Na=null),e.Sb&&(e.Sb.release(),e.Sb=null),e.Fa=null,e.g=null,e.B=null,e.ue=null,e.L=null,e.fa=null,!e.F){n.s(4);break}return _(n,e.F.destroy(),5);case 5:e.F=null;case 4:e.o&&(e.o.release(),e.o=null),Ut.prototype.release.call(e),se(n)}})};function C(e,t){gw.set(e,t)}function I(e,t){e.dispatchEvent(g("onstatechange",new Map().set("state",t)))}h.Lb=function(e,t){t=t===void 0?!0:t;var n=this,i,r,l;return z(function(c){switch(c.g){case 1:if(n.m==al)throw new Y(2,7,7e3);if(i=n.h&&n.h==e,!n.h||n.h==e){c.s(2);break}return _(c,n.detach(),2);case 2:return _(c,B(n,"attach"),4);case 4:if(c.h)return c.return();if(pe(c,5,6),i||(I(n,"attach"),r=function(){var f=d1(n,!1);f&&fp(n,f)},n.zd.D(e,"error",r),n.h=e,n.L&&n.L.setMediaElement(e)),!t||!oo()||n.I){c.s(6);break}return _(c,At(n),6);case 6:Te(c),n.$.release(),je(c,0);break;case 5:return l=Me(c),_(c,n.detach(),10);case 10:throw l}})},h.Vh=function(e){this.yg=e},h.detach=function(e){e=e===void 0?!1:e;var t=this;return z(function(n){if(n.g==1){if(t.m==al)throw new Y(2,7,7e3);return _(n,t.kc(!1,e),2)}if(n.g!=3)return _(n,B(t,"detach"),3);if(n.h)return n.return();try{t.h&&(t.zd.Qa(),t.h=null),I(t,"detach"),t.A&&!e&&t.A.release()}finally{t.$.release()}se(n)})};function B(e,t){var n;return z(function(i){return i.g==1?(n=++e.Te,_(i,fc(e.$,t),2)):n!=e.Te?(e.$.release(),i.return(!0)):i.return(!1)})}h.kc=function(e,t){e=e===void 0?!0:e,t=t===void 0?!1:t;var n=this,i,r,l,c,f,y,m,T,x,D;return z(function(R){switch(R.g){case 1:return n.m!=al&&(n.m=Ym),_(R,B(n,"unload"),2);case 2:return R.h?R.return():(rt(R,3),n.sa=!1,I(n,"unload"),u(n),i=n.Cd.map(function(N){return N()}),n.Cd=[],_(R,Promise.all(i),5));case 5:if(n.dispatchEvent(g("unloading")),n.yd&&(n.yd.release(),n.yd=null),n.Aa&&(n.Aa.release(),n.Aa=null),n.Ga&&(n.Ga.release(),n.Ga=null),n.h&&(n.l.Qa(),n.Na.Qa()),n.xe.stop(),n.La&&(n.La.release(),n.La=null),n.pa&&(n.pa.stop(),n.pa=null),!n.H){R.s(6);break}return _(R,n.H.stop(),7);case 7:n.H=null,n.Qb=null;case 6:if(!n.o){R.s(8);break}return _(R,n.o.stop(),8);case 8:if(!n.j){R.s(10);break}return _(R,n.j.destroy(),11);case 11:n.j=null;case 10:if(n.K&&(n.K.release(),n.K=null),n.G&&(n.G.release(),n.G=null),w.shakaMediaKeysPolyfill!=="webkit"||!n.C){R.s(12);break}return _(R,n.C.destroy(),13);case 13:n.C=null;case 12:if(!n.I){R.s(14);break}return _(R,n.I.destroy(),15);case 15:n.I=null;case 14:if(n.A&&!t&&n.A.onAssetUnload(),n.ea&&!t&&(n.ea.destroy(),n.ea=null),t||n.Ye.stop(),n.L&&Km(n.L),n.fa&&(n.fa.g=null),!n.u){R.s(16);break}return _(R,n.u.destroy(),17);case 17:n.u=null;case 16:if(n.h&&(_i(n.h),n.h.src&&(n.h.removeAttribute("src"),n.h.load())),!n.C){R.s(18);break}return _(R,n.C.destroy(),19);case 19:n.C=null;case 18:if(n.ya&&n.T!=n.ya.Qc()&&(n.ya.u||n.ya.destroy(),n.ya=null),n.T=null,n.Pb=null,n.M=null,n.i){for(r=b(n.i.variants),l=r.next();!l.done;l=r.next())for(c=l.value,f=b([c.audio,c.video]),y=f.next();!y.done;y=f.next())(m=y.value)&&m.segmentIndex&&m.segmentIndex.release();for(T=b(n.i.textStreams),x=T.next();!x.done;x=T.next())D=x.value,D.segmentIndex&&D.segmentIndex.release()}n.g&&n.g.streaming.clearDecodingCache&&(ru.clear(),ro.clear()),n.i=null,n.B=new Qi,n.Se=null,n.Ma=null,n.P=null,n.Ue=-1,n.Oe=[],n.Ve=-1,n.F&&n.F.Hg(),s1(n);case 3:Te(R),n.$.release(),je(R,4);break;case 4:if(e&&oo()&&!n.I&&n.h)return _(R,At(n),0);R.s(0)}})},h.Kj=function(e){this.Z=e},h.load=function(e,t,n){t=t===void 0?null:t;var i=this,r,l,c,f,y,m,T,x,D,R,N,U,L;return z(function(j){switch(j.g){case 1:if(i.m==al)throw new Y(2,7,7e3);if(r=null,l="",e instanceof dr){if(e.u)throw new Y(2,7,7006);r=e,l=r.Qc()||""}else l=e||"";return _(j,fc(i.$,"load"),2);case 2:if(i.$.release(),!i.h)throw new Y(2,7,7002);if(!i.T){j.s(3);break}return i.T=l,_(j,i.kc(!1),3);case 3:if(c=++i.Te,f=function(){return z(function(V){if(V.g==1)return i.Te==c?V.s(0):r?_(V,r.destroy(),3):V.s(3);throw new Y(2,7,7e3)})},y=function(V,X){return z(function(G){switch(G.g){case 1:return rt(G,2),_(G,fc(i.$,X),4);case 4:return _(G,f(),5);case 5:return _(G,V(),6);case 6:return _(G,f(),7);case 7:r&&i.g&&(r.g=i.g);case 2:Te(G),i.$.release(),je(G,0)}})},pe(j,5,6),t==null&&r&&(t=r.getStartTime()),i.Z=t,i.sa=!1,i.dispatchEvent(g("loading")),r){n=r.Z,j.s(8);break}if(n){j.s(8);break}return _(j,y(function(){return z(function(V){if(V.g==1)return _(V,Ie(i,l),2);n=V.h,se(V)})},"guessMimeType_"),8);case 8:if(m=!!r,r){Nm(r,i),i.B=r.getStats(),j.s(11);break}return _(j,me(i,l,t,n,!0),12);case 12:(r=j.h)?(r.A=!1,Nm(r,i),i.B=r.getStats(),r.start(),r.m.catch(function(){})):i.B=new Qi;case 11:return T=!r,x=Date.now()/1e3,i.B=r?r.getStats():new Qi,i.T=l,i.Pb=n||null,i.Aa=new Eu(function(){return i.Ra()}),T?_(j,y(function(){return z(function(V){return _(V,he(i,n),0)})},"initializeSrcEqualsDrmInner_"),23):(i.Ga=new Eu(function(){return i.Ra()}),_(j,y(function(){return z(function(V){if(V.g==1)return _(V,Promise.race([r.oa,r.m]),2);i.Qb=r.G;var X=r;X.pa=!0,i.H=X.l,i.i=r.Hf(),se(V)})},"waitForFinish"),15));case 15:if(i.I){j.s(16);break}return _(j,y(function(){return z(function(V){return _(V,At(i),0)})},"initializeMediaSourceEngineInner_"),16);case 16:return i.i&&i.i.textStreams.length&&(i.u.enableTextDisplayer?i.u.enableTextDisplayer():Ot("Text displayer w/ enableTextDisplayer",'Text displayer should have a "enableTextDisplayer" method!')),_(j,y(function(){return z(function(V){return _(V,r.m,0)})},"waitForFinish"),18);case 18:if(i.g=r.getConfiguration(),i.te=r.F,i.H&&i.H.setMediaElement&&i.h&&i.H.setMediaElement(i.h),i.yd=lc(r),i.xd=r.Ga,(D=r.o)&&(i.W=D),m&&i.h&&i.h.nodeName==="AUDIO"&&(H(i),i.configure("manifest.disableVideo",!0)),r.i){j.s(19);break}return _(j,y(function(){return z(function(V){return _(V,Lm(r,i.h),0)})},"drmEngine_.init"),19);case 19:return i.C=Pm(r),_(j,y(function(){return z(function(V){return _(V,i.C.Lb(i.h),0)})},"drmEngine_.attach"),21);case 21:return!(R=r.C)||i.Fa&&i.Fa==R||(i.o=$0(r),i.Fa=r.C,typeof i.o.setMediaElement!="function"&&(Ot("AbrManager w/o setMediaElement","Please use an AbrManager with setMediaElement function."),i.o.setMediaElement=function(){}),typeof i.o.setCmsdManager!="function"&&(Ot("AbrManager w/o setCmsdManager","Please use an AbrManager with setCmsdManager function."),i.o.setCmsdManager=function(){}),typeof i.o.trySuggestStreams!="function"&&(Ot("AbrManager w/o trySuggestStreams","Please use an AbrManager with trySuggestStreams function."),i.o.trySuggestStreams=function(){})),N=e1(r),U=r.K,_(j,y(function(){return z(function(V){return _(V,Sn(i,x,U,N),0)})},"loadInner_"),22);case 22:Wl(r),i.Pb&&oi()&&ad(i.Pb)&&ql(i.I,i.T,i.Pb),j.s(14);break;case 23:return _(j,y(function(){return z(function(V){return _(V,ue(i,x,n),0)})},"srcEqualsInner_"),14);case 14:i.dispatchEvent(g("loaded"));case 6:if(Te(j),!r){j.s(25);break}return _(j,r.destroy(),25);case 25:i.ya=null,je(j,0);break;case 5:if(L=Me(j),!L||L.code==7e3){j.s(27);break}return _(j,i.kc(!1),27);case 27:throw L}})};function H(e){for(var t=b(e.i.variants),n=t.next();!n.done;n=t.next())n=n.value,n.video&&(n.video.closeSegmentIndex(),n.video=null),n.bandwidth=n.audio&&n.audio.bandwidth?n.audio.bandwidth:0;e.i.variants=e.i.variants.filter(function(i){return i.audio})}h.Gj=function(e,t){e=e===void 0?!0:e,t=t===void 0?!1:t;var n=this,i;return z(function(r){return r.g==1?_(r,ie(n),2):r.g!=3?(i=r.h,_(r,n.kc(e,t),3)):r.return(i)})},h.Lg=function(e,t){e=e===void 0?!1:e,t=t===void 0?!1:t;var n=this,i;return z(function(r){return r.g==1?_(r,ie(n,t),2):r.g!=3?(i=r.h,_(r,n.detach(e),3)):r.return(i)})};function ie(e,t){t=t===void 0?!1:t;var n,i;return z(function(r){if(r.g==1)return n=null,e.i&&e.H&&e.Qb&&e.T?(i=e.h.currentTime,e.U()&&!t&&(i=null),_(r,Ae(e,e.T,i,e.Pb,!0,!1,!1),3)):r.s(2);if(r.g!=2){n=r.h,e.Ee.push(n),e.H&&e.H.setMediaElement&&e.H.setMediaElement(null);var l=n,c=e.H,f=e.Qb;l.h=e.i,l.l=c,l.G=f,l=n,c=e.Fa,l.j=e.o,l.C=c,n.o=e.W,n.start(),e.i=null,e.H=null,e.Qb=null,e.o=null,e.Fa=null}return r.return(n)})}h.preload=function(e,t,n){t=t===void 0?null:t;var i=this,r;return z(function(l){return l.g==1?_(l,me(i,e,t,n),2):((r=l.h)?r.start():fp(i,new Y(2,7,7005)),l.return(r))})},h.pf=function(){var e=this,t,n,i,r;return z(function(l){for(t=[],n=b(e.Ee),i=n.next();!i.done;i=n.next())r=i.value,r.u||t.push(r.destroy());return e.Ee=[],_(l,Promise.all(t),0)})};function me(e,t,n,i,r){r=r===void 0?!1:r;var l,c,f;return z(function(y){return y.g==1?i?y.s(2):_(y,Ie(e,t),3):(y.g!=2&&(i=y.h),Se(e,i)?y.return(null):(l=!1,c=!0,r&&(e.o&&e.Fa==e.g.abrFactory&&(c=!1),e.h&&e.h.nodeName==="AUDIO"&&(l=!0)),f=Ae(e,t,n,i||null,!r,l,c),f=r?f.then(function(m){return m.A=!1,m}):f.then(function(m){return e.Ee.push(m),m}),y.return(f)))})}function Ae(e,t,n,i,r,l,c){r=r===void 0?!0:r,l=l===void 0?!1:l,c=c===void 0?!0:c;var f,y,m,T,x,D,R,N,U,L,j,V,X,G;return z(function(Z){return Z.g==1?(f=null,y=so(e.g),l&&(y.manifest.disableVideo=!0),m=function(){return f.T&&f.u?null:f},T=function(){return m()?m().getConfiguration():e.g},e.ka.width!=1/0||e.ka.height!=1/0||e.g.ignoreHardwareResolution?Z.s(2):_(Z,Ka(),3)):(Z.g!=2&&(x=Z.h,e.ka.width=x.width,e.ka.height=x.height),D=new su(y,e.ka,null),R={networkingEngine:e.F,filter:function(q){var K,W;return z(function(Q){if(Q.g==1)return _(Q,Dd(D,q),2);if(Q.g!=4)return K=Q.h,K?(W=g("trackschanged"),_(Q,Promise.resolve(),4)):Q.s(0);f.dispatchEvent(W),se(Q)})},makeTextStreamsForClosedCaptions:function(q){return Mb(e,q)},onTimelineRegionAdded:function(q){Yh(f.H,q)},onEvent:function(q){return f.dispatchEvent(q)},onError:function(q){return f.onError(q)},isLowLatencyMode:function(){return T().streaming.lowLatencyMode},updateDuration:function(){e.j&&f.T&&e.j.updateDuration()},newDrmInfo:function(q){var K=f.i,W=K?K.h:null;W&&K.A&&Od(D,W.keySystem,q)},onManifestUpdated:function(){var q=new Map().set("isLive",e.U());f.dispatchEvent(g("manifestupdated",q)),Ia(f,!1,function(){e.A&&e.A.onManifestUpdated(e.U())})},getBandwidthEstimate:function(){return e.o.getBandwidthEstimate()},onMetadata:function(q,K,W,Q){var oe=q;q=="com.apple.hls.interstitial"&&(oe="com.apple.quicktime.HLS",q={startTime:K,endTime:W,values:Q},e.A)&&e.A.onHLSInterstitialMetadata(e,e.h,q),Q=b(Q),q=Q.next();for(var ne={};!q.done;ne={Zf:void 0},q=Q.next())ne.Zf=q.value,ne.Zf.name!="ID"&&Ia(f,!1,function(re){return function(){lt(e,K,W,oe,re.Zf)}}(ne))},disableStream:function(q){return e.disableStream(q,e.g.streaming.maxDisabledTime)},addFont:function(q,K){return e.addFont(q,K)}},N=new Eu(function(){return e.Ra()}),N.addEventListener("regionadd",function(q){var K=q.region;xy(e,"timelineregionadded",K,f),Ia(f,!1,function(){e.A&&(e.A.onDashTimedMetadata(K),e.A.onDASHInterstitialMetadata(e,e.h,K))})}),U=null,y.streaming.observeQualityChanges&&(U=new Qs(function(){return e.Fb()}),U.addEventListener("qualitychange",function(q){dw(e,q.quality,q.position)}),U.addEventListener("audiotrackchange",function(q){dw(e,q.quality,q.position,!0)})),L=!0,j={Xb:e.F,onError:function(q){return f.onError(q)},pe:function(q){Ia(f,!0,function(){e:{var K=q,W=g("keystatuschanged");e.dispatchEvent(W);var Q=Object.keys(K);Q.length==1&&Q[0]==""&&(Q=["00"],K={"00":K[""]}),W=Q.length==1&&Q[0]=="00";var oe=!1;if(Q.length){Q=e.keySystem();for(var ne=ma(e.g.drm.clearKeys),re=b(e.i.variants),le=re.next();!le.done;le=re.next()){le=le.value;var fe=[];le.audio&&fe.push(le.audio),le.video&&fe.push(le.video),fe=b(fe);for(var ye=fe.next();!ye.done;ye=fe.next()){var de=ye.value;if(ye=le.allowedByKeySystem,de.keyIds.size)if(de.drmInfos.length&&!ne.size){de=b(de.drmInfos);for(var xe=de.next();!xe.done;xe=de.next())if(xe=xe.value,xe.keyIds.size&&xe.keySystem==Q){le.allowedByKeySystem=!0,xe=b(xe.keyIds);for(var De=xe.next();!De.done;De=xe.next())De=De.value,((De=K[W?"00":De])||e.C.F)&&(le.allowedByKeySystem=le.allowedByKeySystem&&!!De&&!kd.includes(De))}}else for(le.allowedByKeySystem=!0,de=b(de.keyIds),xe=de.next();!xe.done;xe=de.next())xe=xe.value,((xe=K[W?"00":xe])||e.C.F)&&(le.allowedByKeySystem=le.allowedByKeySystem&&!!xe&&!kd.includes(xe));ye!=le.allowedByKeySystem&&(oe=!0)}}}if(oe&&(pr(e),!Pf(e)))break e;(K=e.j.l)&&!K.allowedByKeySystem&&cp(e)}})},onExpirationUpdated:function(q,K){var W=g("expirationupdated");f.dispatchEvent(W),(W=f.l)&&W.onExpirationUpdated&&W.onExpirationUpdated(q,K)},onEvent:function(q){f.dispatchEvent(q),q.type=="drmsessionupdate"&&L&&(L=!1,q=Date.now()/1e3-f.ya,(e.B||f.getStats()).j=q,e.O&&is(e.O))}},V=wi(e,m),md(e.F,V),X=function(){return e.Lc(j)},G={config:y,$i:R,kj:N,jj:U,Lc:X,Zi:D,networkingEngine:V,Uh:r,Th:c},f=new dr(t,i,n,G),Z.return(f))})}function Ie(e,t){var n,i;return z(function(r){return r.g==1?(n=e.g.manifest.retryParameters,_(r,Co(t,e.F,n),2)):(i=r.h,i=="application/x-mpegurl"&&oi()&&(i="application/vnd.apple.mpegurl"),r.return(i))})}function Se(e,t){if(!oo())return!0;if(t){if((e.h||Fp()).canPlayType(t)=="")return!1;if(!oo()||!Bl.has(t))return!0;if(ad(t))return oi()&&(e.g.drm.servers["com.apple.fps"]||e.g.drm.servers["com.apple.fps.1_0"])?e.g.streaming.useNativeHlsForFairPlay:e.g.streaming.preferNativeHls;if(t==="application/dash+xml"||t==="video/vnd.mpeg.dash.mpd")return e.g.streaming.preferNativeDash}return!1}function we(e){var t=e.g.textDisplayFactory;t!==e.Se&&(e.u=t(),e.u.configure?e.u.configure(e.g.textDisplayer):Ot("Text displayer w/ configure",'Text displayer should have a "configure" method!'),e.Se=t,e.u.setTextVisibility(e.oa))}function At(e){var t,n,i;return z(function(r){if(r.g==1)return I(e,"media-source"),e.h.removeAttribute("src"),_i(e.h),we(e),t=Db(e.h,e.u,{si:function(){return e.keySystem()},onMetadata:function(l,c,f){l=b(l);for(var y=l.next();!y.done;y=l.next())if(y=y.value,y.data&&typeof y.cueTime=="number"&&y.frames){var m=y.cueTime+c,T=f;T&&m>T&&(T=m);for(var x=b(y.frames),D=x.next();!D.done;D=x.next())lt(e,m,T,"org.id3",D.value);e.A&&e.A.onHlsTimedMetadata(y,m)}},ej:function(l){e.Ga&&Yh(e.Ga,{schemeIdUri:l.schemeIdUri,startTime:l.startTime,endTime:l.endTime,id:String(l.id),emsg:l})},onEvent:function(l){return e.dispatchEvent(l)},gj:function(){e.H&&e.H.update&&e.H.update()}},e.O),t.configure(e.g.mediaSource),n=e.g.manifest,i=n.segmentRelativeVttTiming,t.Ea=i,_(r,t.G,2);e.I=t,se(r)})}function wt(e,t,n){function i(){return c1(e)}e.l.D(t,"playing",i),e.l.D(t,"pause",i),e.l.D(t,"ended",i),e.l.D(t,"ratechange",function(){var r=e.h.playbackRate;r!=0&&(e.K&&(e.K.set(r),e.m==Vi&&e.o.playbackRateChanged(r),rw(e,r)),r=g("ratechange"),e.dispatchEvent(r))}),t.remote&&(e.l.D(t.remote,"connect",function(){return pr(e)}),e.l.D(t.remote,"connecting",function(){return pr(e)}),e.l.D(t.remote,"disconnect",function(){return z(function(r){if(r.g==1)return e.j&&t.remote.state=="disconnected"?_(r,Yl(e.j),2):r.s(2);pr(e),se(r)})})),t.audioTracks&&(e.l.D(t.audioTracks,"addtrack",function(){return pr(e)}),e.l.D(t.audioTracks,"removetrack",function(){return pr(e)}),e.l.D(t.audioTracks,"change",function(){return pr(e)})),t.textTracks&&(e.l.D(t.textTracks,"addtrack",function(r){if(r.track)switch(r=r.track,r.kind){case"metadata":it(e,r);break;case"chapters":Ct(e,r);break;default:pr(e)}}),e.l.D(t.textTracks,"removetrack",function(){return pr(e)}),e.l.D(t.textTracks,"change",function(){return pr(e)}),e.g.streaming.crossBoundaryStrategy!=="keep"&&(e.l.D(t,"waiting",function(){e.j&&ny(e.j)}),e.l.D(t,"timeupdate",function(){e.j&&ny(e.j)}))),t.preload!="none"&&e.l.ma(t,"loadedmetadata",function(){e.B.C=Date.now()/1e3-n})}function Sn(e,t,n,i){var r,l,c,f,y,m,T,x,D,R,N,U,L,j,V,X,G,Z,q,K,W,Q,oe,ne,re,le;return z(function(fe){switch(fe.g){case 1:for(I(e,"load"),r=e.h,e.K=new Ws({$d:function(){return r.playbackRate},sc:function(){return r.defaultPlaybackRate},mg:function(ye){r.playbackRate=ye},gh:function(ye){r.currentTime+=ye}}),wt(e,r,t),l=!1,c=b(e.i.variants),f=c.next();!f.done;f=c.next())y=f.value,(m=y.video&&y.video.dependencyStream)&&(l=Cg(m));d(e,e.g,l),e.Tb=e.g.preferredTextLanguage,e.Hd=e.g.preferredTextRole,e.Fd=e.g.preferForcedSubs,p1(e.i.presentationTimeline,e.g.playRangeStart,e.g.playRangeEnd),e.o.init(function(ye,de,xe){e.i&&e.j&&ye!=e.j.l&&wy(e,ye,!0,de===void 0?!1:de,xe===void 0?0:xe)}),e.o.setMediaElement(r),e.o.setCmsdManager(e.fa),e.j=kb(e),e.j.configure(e.g.streaming),e.m=Vi,e.dispatchEvent(g("streaming")),T=n;case 2:for((D=e.j.l)||T||(T=Pf(e)?e.o.chooseVariant():null),R=[],x=D||T,N=b([x.video,x.audio]),U=N.next();!U.done;U=N.next())(L=U.value)&&!L.segmentIndex&&(R.push(L.createSegmentIndex()),L.dependencyStream&&R.push(L.dependencyStream.createSegmentIndex()));if(!(0<R.length)){fe.s(4);break}return _(fe,Promise.all(R),4);case 4:if(!x||x.disabledUntilTime!=0){fe.s(2);break}if(e.H&&e.H.onInitialVariantChosen&&e.H.onInitialVariantChosen(x),e.i.isLowLatency&&(e.g.streaming.lowLatencyMode?e.configure(e.Xe):bt("Low-latency live stream detected, but low-latency streaming mode is not enabled in Shaka Player. Set streaming.lowLatencyMode configuration to true, and see https://bit.ly/3clctcj for details.")),e.L&&(cy(e.L,e.i.isLowLatency&&e.g.streaming.lowLatencyMode),qm(e.L,1e3*t)),p1(e.i.presentationTimeline,e.g.playRangeStart,e.g.playRangeEnd),Xd(e.j,e.g.playRangeStart,e.g.playRangeEnd),j=function(ye){e.G=an(e,ye),e.La=Ra(e,ye),X2(e,r,!1)},e.g.streaming.startAtSegmentBoundary||(V=e.Z,V==null&&e.i.startTime&&(V=e.i.startTime),j(V)),D){fe.s(7);break}if(!e.g.streaming.startAtSegmentBoundary){fe.s(8);break}return X=e.i.presentationTimeline,G=e.Z||e.h.currentTime,e.Z==null&&e.i.startTime&&(G=e.i.startTime),Z=X.Hb(),q=X.ob(),G<Z?G=Z:G>q&&(G=q),_(fe,Nb(T,G),9);case 9:K=fe.h,j(K);case 8:wy(e,T,!0,!1,0);case 7:return e.G.ready(),W=e.vc().find(function(ye){return ye.active}),W||((Q=iu(e.i.textStreams,e.Tb,e.Hd,e.Fd)[0]||null)&&Ru(e.B.h,Q,!0),T&&(Q?(dd(T.audio,Q,e.g)&&(e.oa=!0),e.oa&&e.u.setTextVisibility(!0),cw(e)):e.oa=!1),Q&&(e.g.streaming.alwaysStreamText||e.Pf())&&(nl(e.j,Q),Ty(e))),_(fe,e.j.start(i),10);case 10:e.g.abr.enabled&&(e.o.enable(),fw(e)),pr(e),Pf(e),e.i.variants.some(function(ye){return ye.primary}),((oe=e.U())&&(e.g.streaming.liveSync&&e.g.streaming.liveSync.enabled||e.i.serviceDescription||e.g.streaming.liveSync.panicMode)||e.g.streaming.vodDynamicPlaybackRate)&&(ne=function(){return ow(e)},e.l.D(r,"timeupdate",ne)),oe||(re=function(){return Gm(e)},e.l.D(r,"timeupdate",re),Gm(e),e.i.nextUrl&&(0<e.g.streaming.preloadNextUrlWindow&&(le=function(){var ye;return z(function(de){if(de.g==1)return ye=e.Ra().end-e.h.currentTime,isNaN(ye)||!(ye<=e.g.streaming.preloadNextUrlWindow)?de.s(0):(e.l.Ja(r,"timeupdate",le),_(de,e.preload(e.i.nextUrl),4));e.ya=de.h,se(de)})},e.l.D(r,"timeupdate",le)),e.l.D(r,"ended",function(){e.load(e.ya||e.i.nextUrl)}))),e.A&&e.A.onManifestUpdated(oe),e.sa=!0,se(fe)}})}function he(e,t){var n,i,r,l,c;return z(function(f){return f.g==1?(n=En,i=Date.now()/1e3,r=!0,e.C=e.Lc({Xb:e.F,onError:function(y){fp(e,y)},pe:function(){},onExpirationUpdated:function(){var y=g("expirationupdated");e.dispatchEvent(y)},onEvent:function(y){e.dispatchEvent(y),y.type=="drmsessionupdate"&&r&&(r=!1,e.B.j=Date.now()/1e3-i)}}),e.C.configure(e.g.drm),l={id:0,language:"und",disabledUntilTime:0,primary:!1,audio:null,video:null,bandwidth:100,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},c={id:0,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:t?Ri(t):"",codecs:t?jn(t):"",encrypted:!0,drmInfos:[],keyIds:new Set,language:"und",originalLanguage:null,label:null,type:n.la,primary:!1,trickModeVideo:null,dependencyStream:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!1,fastSwitching:!1,fullMimeTypes:new Set,isAudioMuxedInVideo:!1,baseOriginalId:null},c.fullMimeTypes.add(hn(c.mimeType,c.codecs)),t.startsWith("audio/")?(c.type=n.V,l.audio=c):l.video=c,e.C.$=!0,_(f,wh(e.C,[l],[]),2)):_(f,e.C.Lb(e.h),0)})}function ue(e,t,n){var i,r,l,c,f,y,m,T,x,D,R,N;return z(function(U){switch(U.g){case 1:if(I(e,"src-equals"),i=e.h,e.G=new xu(i),r=!1,e.Cd.push(function(){r=!0}),e.Z!=null&&e.G.af(e.Z),e.La=l1(e,e.Z||0),e.K=new Ws({$d:function(){return i.playbackRate},sc:function(){return i.defaultPlaybackRate},mg:function(L){i.playbackRate=L},gh:function(L){i.currentTime+=L}}),X2(e,i,!0),i.textTracks&&(we(e),l=function(){var L=Sy(e).find(function(j){return j.mode!=="disabled"});L&&(L.mode="showing"),(L=ew(e))&&(L.mode="hidden")},c=function(){var L=Sy(e).find(function(V){return V.mode!=="disabled"});L&&(L.mode="hidden"),L=ew(e);var j=e.u.isTextVisible();L&&j&&(L.mode="showing")},e.l.D(i,"enterpictureinpicture",function(){return l()}),e.l.D(i,"leavepictureinpicture",function(){return c()}),i.remote?(e.l.D(i.remote,"connect",function(){return c()}),e.l.D(i.remote,"connecting",function(){return c()}),e.l.D(i.remote,"disconnect",function(){return c()})):"webkitCurrentPlaybackTargetIsWireless"in i&&e.l.D(i,"webkitcurrentplaybacktargetiswirelesschanged",function(){return c()}),f=i,f.webkitSupportsFullscreen&&e.l.D(f,"webkitpresentationmodechanged",function(){f.webkitPresentationMode!="inline"?l():c()})),wt(e,i,t),y=rp(e.L,e.T,n),!y.includes("#t=")&&(0<e.g.playRangeStart||isFinite(e.g.playRangeEnd))&&(y+="#t=",0<e.g.playRangeStart&&(y+=e.g.playRangeStart),isFinite(e.g.playRangeEnd)&&(y+=","+e.g.playRangeEnd)),!e.I){U.s(2);break}return _(U,e.I.destroy(),3);case 3:e.I=null;case 2:return _i(i),i.src=y,(di()||jo())&&i.load(),i.preload!="none"&&!i.autoplay&&ad(n)&&oi()&&i.load(),e.m=zr,e.dispatchEvent(g("streaming")),m=new kt,vi(i,HTMLMediaElement.HAVE_METADATA,e.l,function(){e.G.ready(),m.resolve()}),T=function(){return new Promise(function(L){var j=new dt(L);e.l.D(i.textTracks,"change",function(){return j.da(.5)}),j.da(.5)})},vi(i,HTMLMediaElement.HAVE_CURRENT_DATA,e.l,function(){var L,j,V,X,G;return z(function(Z){if(Z.g==1)return _(Z,T(),2);if(r)return Z.return();for(ge(e),L=Sy(e),L.some(function(q){return q.mode==="showing"})&&(e.oa=!0,e.u.setTextVisibility(!0)),L.length&&(e.u.enableTextDisplayer?e.u.enableTextDisplayer():Ot("Text displayer w/ enableTextDisplayer",'Text displayer should have a "enableTextDisplayer" method!')),j=!1,V=b(L),X=V.next();!X.done;X=V.next())G=X.value,G.mode!=="disabled"&&(j?(G.mode="disabled",bt("Found more than one enabled text track, disabling it",G)):($2(e,G),j=!0));Ce(e),se(Z)})}),i.error?m.reject(d1(e)):i.preload=="none"&&(bt('With <video preload="none">, the browser will not load anything until play() is called. We are unable to measure load latency in a meaningful way, and we cannot provide track info yet. Please do not use preload="none" with Shaka Player.'),m.resolve()),e.l.ma(i,"error",function(){m.reject(d1(e))}),_(U,$a(e.g.streaming.loadTimeout,m),4);case 4:((x=e.U())&&(e.g.streaming.liveSync&&e.g.streaming.liveSync.enabled||e.g.streaming.liveSync.panicMode)||e.g.streaming.vodDynamicPlaybackRate)&&(D=function(){return ow(e)},e.l.D(i,"timeupdate",D)),x||(R=function(){return Gm(e)},e.l.D(i,"timeupdate",R),Gm(e)),e.A&&(e.A.onManifestUpdated(x),x&&(N=e.Ra().end,e.l.D(i,"progress",function(){var L=e.Ra().end;N!=L&&(e.A.onManifestUpdated(e.U()),N=L)}))),e.sa=!0,se(U)}})}function ge(e){var t=e.g.preferredAudioLanguage;t!=""&&e.sh(t,e.g.preferredVariantRole)}function Ce(e){var t=e.g.preferredTextLanguage;t!=""&&e.hg(t,e.g.preferredTextRole,e.g.preferForcedSubs)}function it(e,t){if(t.kind=="metadata"){t.mode="hidden",e.l.D(t,"cuechange",function(){if(t.activeCues)for(var i=b(t.activeCues),r=i.next();!r.done;r=i.next())r=r.value,lt(e,r.startTime,r.endTime,r.type,r.value),e.A&&e.A.onCueMetadataChange(r.value);if(t.cues){i=[],r=b(t.cues);for(var l=r.next(),c={};!l.done;c={bc:void 0},l=r.next())c.bc=l.value,c.bc.type=="com.apple.quicktime.HLS"&&c.bc.startTime!=null&&(l=i.find(function(f){return function(y){return y.startTime==f.bc.startTime&&y.endTime==f.bc.endTime}}(c)),l||(l={startTime:c.bc.startTime,endTime:c.bc.endTime,values:[]},i.push(l)),l.values.push(c.bc.value));for(i=b(i),r=i.next();!r.done;r=i.next())r=r.value,r.values.some(function(f){return f.key=="X-ASSET-URI"||f.key=="X-ASSET-LIST"})&&e.A&&(r.values.push({key:"CUE",description:"",data:r.startTime!=0||e.U()?"ONCE":"ONCE,PRE",mimeType:null,pictureType:null}),e.A.onHLSInterstitialMetadata(e,e.h,r))}});var n=new dt(function(){var i=Rb(e);i=b(i);for(var r=i.next();!r.done;r=i.next())r.value.mode="hidden"}).sb().da(.5);e.Cd.push(function(){n.stop()})}}function Kt(e,t){t=new Map().set("startTime",t.startTime).set("endTime",t.endTime).set("metadataType",t.schemeIdUri).set("payload",t.payload),e.dispatchEvent(g("metadata",t))}function lt(e,t,n,i,r){e.Aa&&(t={schemeIdUri:i,startTime:t,endTime:n||1/0,id:"",payload:r},t.id=JSON.stringify(t),Yh(e.Aa,t))}function Ct(e,t){if(t&&t.kind=="chapters"){t.mode="hidden";var n=new dt(function(){t.mode="hidden"}).sb().da(.5);e.Cd.push(function(){n.stop()})}}h.oj=function(){for(var e=this.$;e.g;)e.release()},h.Lc=function(e){return new Wc(e)};function wi(e,t){function n(r){t()?t().dispatchEvent(r):e.dispatchEvent(r)}function i(r){t()?Ia(t(),!0,r):r()}return t||(t=function(){return null}),new Xt(function(r,l,c,f){var y=t()?t().j:e.o;y&&y.segmentDownloaded(r,l,c,f)},function(r,l,c){l=new Map().set("headers",r).set("request",l).set("requestType",c),n(g("downloadheadersreceived",l)),i(function(){if(e.fa){var f=e.fa;if(f.h.enabled){var y=r["cmsd-static"];if(y)try{var m=new Map,T=y.split(",");for(y=0;y<T.length;y++){var x=T[y].split("=");m.set(x[0],my(x[1]))}}catch{}if(m=r["cmsd-dynamic"]){try{var D=new Map,R=m.split(";");for(m=1;m<R.length;m++){var N=R[m].split("=");D.set(N[0],my(N[1]))}var U=D}catch{U=null}U&&(f.g=U)}}}})},function(r,l){r=new Map().set("request",r).set("response",l),n(g("downloadcompleted",r))},function(r,l,c,f){r=new Map().set("request",r).set("error",l).set("httpResponseCode",c).set("aborted",f),n(g("downloadfailed",r))},function(r,l,c){i(function(){var f=e.L,y=c;if(y=y===void 0?{}:y,f.g.enabled)if(l.method==="HEAD")Da(f,l);else switch(r){case 0:try{if(f.g.enabled){if(y.type){e:{switch(y.type){case 4:var m=f.l?Mf:Pu;break e;case 3:case 2:m=f.l?Lu:up;break e;case 5:m="s";break e}m=void 0}f.i=m}Da(f,l,{ot:sc,su:!f.u})}}catch(fe){_o("CMCD_MANIFEST_ERROR","Could not generate manifest CMCD data.",fe)}break;case Wi:try{if(f.g.enabled){var T=y.segment;m=0,T&&(m=T.endTime-T.startTime);var x={d:1e3*m,st:f.h.U()?"l":"v"};x.ot=op(y);var D=x.ot===Do||x.ot===ka||x.ot===lp||x.ot===ap,R=y.stream;if(R){var N=f.h.gb();if(D&&(x.bl=py(f,R.type),x.ot!==ap)){var U=hy(f,R.type);x.dl=N?U/Math.abs(N):U}if(R.bandwidth&&(x.br=R.bandwidth/1e3),R.segmentIndex&&T){var L=R.segmentIndex.Gb(T.endTime,!0,0>N);if(L){var j=L.next().value;if(j&&j!=T){if(!us(T.N(),j.N())){var V=j.N()[0],X=l.uris[0],G=new URL(V),Z=new URL(X);if(G.origin!==Z.origin)var q=V;else{for(var K=G.pathname.split("/").slice(1),W=Z.pathname.split("/").slice(1,-1);K[0]===W[0];)K.shift(),W.shift();for(;W.length;)W.shift(),K.unshift("..");q=K.join("/")}x.nor=q}if((j.Sa||j.wa)&&(T.Sa!=j.Sa||T.wa!=j.wa)){var Q=j.Sa+"-";j.wa&&(Q+=j.wa),x.nrr=Q}}}var oe=f.h.gb()||1,ne=hy(f,R.type)||500,re=R.bandwidth,le=re?re*(T.endTime-T.startTime)/1e3/(ne/oe/1e3)*f.g.rtpSafetyFactor:NaN;isNaN(le)||(x.rtp=le)}}D&&x.ot!==ap&&(x.tb=yy(f,x.ot)/1e3),Da(f,l,x)}}catch(fe){_o("CMCD_SEGMENT_ERROR","Could not generate segment CMCD data.",fe)}break;case 2:case 5:case 6:Da(f,l,{ot:"k"});break;case 4:Da(f,l,{ot:"o"})}})},function(r,l,c,f){(r=t()?t().l:e.H)&&r.banLocation&&r.banLocation(f)},function(r,l){if(l.data){l=l.data.byteLength;var c=t()?t().getStats():e.B;c&&(c.mc=isNaN(c.mc)?l:c.mc+l,r===0&&(c.bh=l))}})}function an(e,t){return new Vd(e.h,e.i,e.g.streaming,t,function(){e.La&&gf(e.La,!0),e.j&&e.j.Fc(),e.M&&Ma(e)},function(n){return e.dispatchEvent(n)})}function Ra(e,t){var n=e.U()||0<t;t=new Fr(e.yd,n),t.addEventListener("enter",function(l){xy(e,"timelineregionenter",l.region)}),t.addEventListener("exit",function(l){xy(e,"timelineregionexit",l.region)}),t.addEventListener("skip",function(l){var c=l.region;l.seeking||(xy(e,"timelineregionenter",c),xy(e,"timelineregionexit",c))});var i=new Fr(e.Aa,n);i.addEventListener("enter",function(l){Kt(e,l.region)}),n=new Fr(e.Ga,n),n.addEventListener("enter",function(l){l=new Map().set("detail",l.region.emsg),e.dispatchEvent(g("emsg",l))});var r=new tl(e.h);return r.g.add(t),r.g.add(i),r.g.add(n),e.xd&&r.g.add(e.xd),r}function l1(e,t){t=new Fr(e.Aa,0<t),t.addEventListener("enter",function(i){Kt(e,i.region)});var n=new tl(e.h);return n.g.add(t),n}function X2(e,t,n){e.M=new L0,e.M.g=Ms,Y2(e),s1(e),e.pa=new dt(function(){Ma(e)}),e.g.streaming.rebufferingGoal&&e.pa.ua(.25),e.l.D(t,"waiting",function(){return Ma(e)}),e.l.D(t,"canplaythrough",function(){return Ma(e)}),e.l.D(t,"playing",function(){return Ma(e)}),e.l.D(t,"seeked",function(){return Ma(e)}),n&&(e.l.D(t,"stalled",function(){return Ma(e)}),e.l.D(t,"progress",function(){return Ma(e)}),e.l.D(t,"timeupdate",function(){return Ma(e)}))}function Y2(e){var t=e.g.streaming.rebufferingGoal;e.M.i.set(Ns,Math.min(.5,t/2)).set(Ms,t)}function Ma(e){switch(e.m){case zr:if(e.Uc())var t=!0;else{var n=Nd(e.h.buffered);t=n!=null&&n>=e.h.duration-1}break;case Vi:e:if(e.Uc()||Ea(e.I))t=!0;else{if(e.i.presentationTimeline.U()){n=e.i.presentationTimeline.cc();var i=Nd(e.h.buffered);if(i!=null&&i>=n){t=!0;break e}}t=!1}break;default:t=!1}i=jh(e.h.buffered,e.h.currentTime),n=e.M;var r=t,l=n.i.get(n.g);t=n.g,i=r||i>=l&&0<i?Ns:Ms,n.g=i,(t=t!=i)&&i===Ns&&(n.h=Date.now()),t&&s1(e)}function Db(e,t,n,i){return new Nn(e,t,n,i)}function Ob(e){return new ip({getBandwidthEstimate:function(){return e.o?e.o.getBandwidthEstimate():NaN},Fb:function(){return e.Fb()},getCurrentTime:function(){return e.h?e.h.currentTime:0},gb:function(){return e.gb()},xb:function(){return e.xb()},Rb:function(){return e.Rb()},U:function(){return e.U()},Zd:function(){return e.Zd()}},e.g.cmcd)}function kb(e){return new xm(e.i,{Rc:function(){return e.G?e.G.Od():0},getBandwidthEstimate:function(){return e.o.getBandwidthEstimate()},gb:function(){return e.gb()},video:e.h,aa:e.I,Xb:e.F,onError:function(t){return fp(e,t)},onEvent:function(t){return e.dispatchEvent(t)},qe:function(t,n,i){var r=t.startTime;if(t=t.endTime,n=n.type,n!=at){if(e.G){e.G.ih();var l=Ud(e.I,n);!e.U()&&e.h.paused&&!e.h.seeking&&l!=null&&0<l&&e.G.Od()<l&&e.G.af(l)}Ma(e)}i=new Map().set("start",r).set("end",t).set("contentType",n).set("isMuxed",i),e.dispatchEvent(g("segmentappended",i))},fj:function(t,n){(n=n.Wc)&&e.xd&&mm(e.xd,n,t)},Fg:function(t,n){var i=e.C;if(i.g.parseInbandPsshEnabled&&!i.F&&["audio","video"].includes(t)){t=new xd(Ze(n)),n=0;for(var r=b(t.data),l=r.next();!l.done;l=r.next())n+=l.value.length;if(n==0)i=Promise.resolve();else{for(n=new Uint8Array(n),r=0,t=b(t.data),l=t.next();!l.done;l=t.next())l=l.value,n.set(l,r),r+=l.length;Ds(i,"cenc",n),i=i.m}}else i=Promise.resolve();return i},disableStream:function(t,n){return e.disableStream(t,n)}})}h.configure=function(e,t){if(arguments.length==2&&typeof e=="string"&&(e=Iu(e,t)),e.streaming&&"forceTransmuxTS"in e.streaming&&(Ot("streaming.forceTransmuxTS configuration","Please Use mediaSource.forceTransmux instead."),e.mediaSource.mediaSource=e.streaming.forceTransmuxTS,delete e.streaming.forceTransmuxTS),e.streaming&&"forceTransmux"in e.streaming&&(Ot("streaming.forceTransmux configuration","Please Use mediaSource.forceTransmux instead."),e.mediaSource.mediaSource=e.streaming.forceTransmux,delete e.streaming.forceTransmux),e.streaming&&"useNativeHlsOnSafari"in e.streaming&&(Ot("streaming.useNativeHlsOnSafari configuration","Please Use streaming.useNativeHlsForFairPlay or streaming.preferNativeHls instead."),e.streaming.preferNativeHls=e.streaming.useNativeHlsOnSafari&&oi(),delete e.streaming.useNativeHlsOnSafari),e.streaming&&typeof e.streaming.liveSync=="boolean"){Ot("streaming.liveSync","Please Use streaming.liveSync.enabled instead.");var n=e.streaming.liveSync;e.streaming.liveSync={},e.streaming.liveSync.enabled=n}if(e.streaming&&!(e.streaming.liveSync&&"targetLatency"in e.streaming.liveSync)&&("liveSyncMinLatency"in e.streaming||"liveSyncMaxLatency"in e.streaming)){n=e.streaming.liveSyncMinLatency||0;var i=Math.abs((e.streaming.liveSyncMaxLatency||1)-n)/2;e.streaming.liveSync=e.streaming.liveSync||{},e.streaming.liveSync.targetLatency=n+i,e.streaming.liveSync.targetLatencyTolerance=i}if(e.streaming&&"liveSyncMaxLatency"in e.streaming&&(Ot("streaming.liveSyncMaxLatency","Please Use streaming.liveSync.targetLatency and streaming.liveSync.targetLatencyTolerance instead. Or, set the values in your DASH manifest"),delete e.streaming.liveSyncMaxLatency),e.streaming&&"liveSyncMinLatency"in e.streaming&&(Ot("streaming.liveSyncMinLatency","Please Use streaming.liveSync.targetLatency and streaming.liveSync.targetLatencyTolerance instead. Or, set the values in your DASH manifest"),delete e.streaming.liveSyncMinLatency),e.streaming&&"liveSyncTargetLatency"in e.streaming&&(Ot("streaming.liveSyncTargetLatency","Please Use streaming.liveSync.targetLatency instead."),e.streaming.liveSync=e.streaming.liveSync||{},e.streaming.liveSync.targetLatency=e.streaming.liveSyncTargetLatency,delete e.streaming.liveSyncTargetLatency),e.streaming&&"liveSyncTargetLatencyTolerance"in e.streaming&&(Ot("streaming.liveSyncTargetLatencyTolerance","Please Use streaming.liveSync.targetLatencyTolerance instead."),e.streaming.liveSync=e.streaming.liveSync||{},e.streaming.liveSync.targetLatencyTolerance=e.streaming.liveSyncTargetLatencyTolerance,delete e.streaming.liveSyncTargetLatencyTolerance),e.streaming&&"liveSyncPlaybackRate"in e.streaming&&(Ot("streaming.liveSyncPlaybackRate","Please Use streaming.liveSync.maxPlaybackRate instead."),e.streaming.liveSync=e.streaming.liveSync||{},e.streaming.liveSync.maxPlaybackRate=e.streaming.liveSyncPlaybackRate,delete e.streaming.liveSyncPlaybackRate),e.streaming&&"liveSyncMinPlaybackRate"in e.streaming&&(Ot("streaming.liveSyncMinPlaybackRate","Please Use streaming.liveSync.minPlaybackRate instead."),e.streaming.liveSync=e.streaming.liveSync||{},e.streaming.liveSync.minPlaybackRate=e.streaming.liveSyncMinPlaybackRate,delete e.streaming.liveSyncMinPlaybackRate),e.streaming&&"liveSyncPanicMode"in e.streaming&&(Ot("streaming.liveSyncPanicMode","Please Use streaming.liveSync.panicMode instead."),e.streaming.liveSync=e.streaming.liveSync||{},e.streaming.liveSync.panicMode=e.streaming.liveSyncPanicMode,delete e.streaming.liveSyncPanicMode),e.streaming&&"liveSyncPanicThreshold"in e.streaming&&(Ot("streaming.liveSyncPanicThreshold","Please Use streaming.liveSync.panicThreshold instead."),e.streaming.liveSync=e.streaming.liveSync||{},e.streaming.liveSync.panicThreshold=e.streaming.liveSyncPanicThreshold,delete e.streaming.liveSyncPanicThreshold),e.mediaSource&&"sourceBufferExtraFeatures"in e.mediaSource){Ot("mediaSource.sourceBufferExtraFeatures configuration","Please Use mediaSource.addExtraFeaturesToSourceBuffer() instead.");var r=e.mediaSource.sourceBufferExtraFeatures;e.mediaSource.addExtraFeaturesToSourceBuffer=function(){return r},delete e.mediaSource.sourceBufferExtraFeatures}if(e.manifest&&e.manifest.hls&&"useSafariBehaviorForLive"in e.manifest.hls&&(Ot("manifest.hls.useSafariBehaviorForLive configuration","Please Use liveSync config to keep on live Edge instead."),delete e.manifest.hls.useSafariBehaviorForLive),e.streaming&&"parsePrftBox"in e.streaming&&(Ot("streaming.parsePrftBox configuration","Now fired without needing a configuration."),delete e.streaming.parsePrftBox),e.manifest&&e.manifest.dash&&"enableAudioGroups"in e.manifest.dash&&(Ot("manifest.dash.enableAudioGroups configuration","It is now enabled by default and cannot be disabled."),delete e.manifest.dash.enableAudioGroups),e.streaming&&"dispatchAllEmsgBoxes"in e.streaming&&(Ot("streaming.dispatchAllEmsgBoxes configuration","Please Use mediaSource.dispatchAllEmsgBoxes instead."),e.mediaSource.dispatchAllEmsgBoxes=e.streaming.dispatchAllEmsgBoxes,delete e.streaming.dispatchAllEmsgBoxes),e.streaming&&"autoLowLatencyMode"in e.streaming&&(Ot("streaming.autoLowLatencyMode configuration","Please Use streaming.lowLatencyMode instead."),e.streaming.lowLatencyMode=e.streaming.autoLowLatencyMode,delete e.streaming.autoLowLatencyMode),e.manifest&&e.manifest.dash&&"ignoreSupplementalCodecs"in e.manifest.dash&&(Ot("manifest.dash.ignoreSupplementalCodecs configuration","Please Use manifest.ignoreSupplementalCodecs instead."),e.manifest.ignoreSupplementalCodecs=e.manifest.dash.ignoreSupplementalCodecs,delete e.manifest.dash.ignoreSupplementalCodecs),e.manifest&&e.manifest.hls&&"ignoreSupplementalCodecs"in e.manifest.hls&&(Ot("manifest.hls.ignoreSupplementalCodecs configuration","Please Use manifest.ignoreSupplementalCodecs instead."),e.manifest.ignoreSupplementalCodecs=e.manifest.hls.ignoreSupplementalCodecs,delete e.manifest.hls.ignoreSupplementalCodecs),e.manifest&&e.manifest.dash&&"updatePeriod"in e.manifest.dash&&(Ot("manifest.dash.updatePeriod configuration","Please Use manifest.updatePeriod instead."),e.manifest.updatePeriod=e.manifest.dash.updatePeriod,delete e.manifest.dash.updatePeriod),e.manifest&&e.manifest.hls&&"updatePeriod"in e.manifest.hls&&(Ot("manifest.hls.updatePeriod configuration","Please Use manifest.updatePeriod instead."),e.manifest.updatePeriod=e.manifest.hls.updatePeriod,delete e.manifest.hls.updatePeriod),e.manifest&&e.manifest.dash&&"ignoreDrmInfo"in e.manifest.dash&&(Ot("manifest.dash.ignoreDrmInfo configuration","Please Use manifest.ignoreDrmInfo instead."),e.manifest.ignoreDrmInfo=e.manifest.dash.ignoreDrmInfo,delete e.manifest.dash.ignoreDrmInfo),e.drm&&e.drm.advanced){n=!1;for(var l in e.drm.advanced){var c=e.drm.advanced[l];i=c.videoRobustness,c=c.audioRobustness,"videoRobustness"in e.drm.advanced[l]&&!Array.isArray(e.drm.advanced[l].videoRobustness)&&(e.drm.advanced[l].videoRobustness=[i],n=!0),"audioRobustness"in e.drm.advanced[l]&&!Array.isArray(e.drm.advanced[l].audioRobustness)&&(e.drm.advanced[l].audioRobustness=[c],n=!0)}n&&Ot("AdvancedDrmConfiguration's videoRobustness and audioRobustness","These properties are no longer strings but array of strings, please update your usage of these properties.")}return e.streaming&&"crossBoundaryStrategy"in e.streaming&&e.streaming.crossBoundaryStrategy!="keep"&&(e.streaming.inaccurateManifestTolerance=0),l=ba(this.g,e,_u(this)),W2(this),l},h.ci=function(e){this.Xe=e};function W2(e){if(e.te=new su(e.g,e.ka,e.C),e.H){var t=so(e.g.manifest);e.h&&e.h.nodeName==="AUDIO"&&(t.disableVideo=!0),e.H.configure(t)}if(e.C&&e.C.configure(e.g.drm),e.j){e.j.configure(e.g.streaming);try{e.m!=al&&Mh(e.te,e.i)&&pr(e)}catch(r){fp(e,r)}e.o&&Pf(e),t=e.j.l,!t||t.allowedByApplication&&t.allowedByKeySystem||cp(e)}if(e.F&&(e.F.kg(e.g.streaming.forceHTTP),e.F.lg(e.g.streaming.forceHTTPS),e.F.o=e.g.streaming.minBytesForProgressEvents),e.I&&(e.I.configure(e.g.mediaSource),e.I.Ea=e.g.manifest.segmentRelativeVttTiming),e.u)if(t=e.g.textDisplayFactory,e.Se!=t){var n=e.u;if(e.u=t(),e.u.configure?e.u.configure(e.g.textDisplayer):Ot("Text displayer w/ configure",'Text displayer should have a "configure" method!'),e.u.setTextLanguage||Ot("Text displayer w/ setTextLanguage",'Text displayer should have a "setTextLanguage" method!'),e.u.setTextVisibility(n.isTextVisible()),n.destroy(),e.I){n=e.I;var i=e.u;n.ea=i,n.h&&(n.h.j=i)}e.Se=t,e.j&&(t=e.j,(n=t.i.get(at))&&rl(t,n.stream,!0,0,!0))}else e.u.configure&&e.u.configure(e.g.textDisplayer);e.o&&(e.o.configure(e.g.abr),e.g.abr.enabled?e.o.enable():e.o.disable(),fw(e)),e.M&&Y2(e),e.pa&&(e.g.streaming.rebufferingGoal?e.pa.ua(.25):e.pa.stop()),e.i&&p1(e.i.presentationTimeline,e.g.playRangeStart,e.g.playRangeEnd),e.A&&e.A.configure(e.g.ads),e.L&&e.L.configure(e.g.cmcd),e.fa&&e.fa.configure(e.g.cmsd)}h.getConfiguration=function(){var e=_u(this);return ba(e,this.g,_u(this)),e},h.ki=function(){return this.Xe},h.Vg=function(){var e=_u(this);return ba(e,this.g,_u(this)),Zd(this.g,_u(this))},h.Qg=function(){if(this.h){var e=this.h.buffered.length;e=e?this.h.buffered.end(e-1):0;var t=this.getConfiguration().streaming.bufferingGoal;if(t=Math.min(this.h.currentTime+t,this.Ra().end),e>=t)return 1;if(!(e<=this.h.currentTime)&&e<t)return(e-this.h.currentTime)/(t-this.h.currentTime)}return 0},h.sj=function(){for(var e in this.g)delete this.g[e];ba(this.g,_u(this),_u(this)),W2(this)},h.ti=function(){return this.m},h.Tg=function(){return this.i?this.i.type:null},h.xi=function(){return this.h},h.xb=function(){return this.F},h.Qc=function(){return this.T},h.Pg=function(){return this.A?this.A:null},h.U=function(){return this.i&&!this.Pa()?this.i.presentationTimeline.U():this.h&&this.h.src?this.h.duration==1/0:!1},h.yc=function(){return this.i?this.i.presentationTimeline.yc():!1},h.Qi=function(){if(this.i&&!this.Pa()){var e=this.i.variants;return e.length?!e[0].video:!1}return this.h&&this.h.src?this.h.videoTracks?this.h.videoTracks.length==0:this.h.videoHeight==0:!1},h.Ra=function(){if(this.i&&!this.Pa()){if(!this.sa&&this.i.type=="HLS")return{start:0,end:0};var e=this.i.presentationTimeline;return{start:e.Hb(),end:e.ob()}}if(this.h&&this.h.src&&(e=this.h.seekable)&&e.length){var t=this.g?this.g.playRangeStart:0;t=Math.max(e.start(0),t);var n=this.g?this.g.playRangeEnd:1/0;return e=Math.min(e.end(e.length-1),n),{start:t,end:e}}return{start:0,end:0}},h.Ni=function(){this.U()&&(this.h.currentTime=this.Ra().end)},h.Ri=function(){return this.sa},h.keySystem=function(){var e=this.drmInfo();return e?e.keySystem:""},h.drmInfo=function(){return this.C?this.C.h:null},h.pd=function(){return this.C?this.C.pd():1/0},h.Gf=function(){return this.C?this.C.Gf():[]},h.Yd=function(){return this.C?this.C.Yd():{}},h.Of=function(){return this.M?this.M.g==Ms:!1},h.gb=function(){return this.h?this.K?this.K.i:1:0},h.Md=function(e,t){t=t===void 0?!0:t,e==0?bt("A trick play rate of 0 is unsupported!"):(this.K.set(e),this.m==Vi&&(this.o.playbackRateChanged(e),nc(this.j,t&&1<Math.abs(e))),rw(this,e))},h.gd=function(){var e=this.K.sc();this.m==zr&&this.K.set(e),this.m==Vi&&(this.K.set(e),this.o.playbackRateChanged(e),nc(this.j,!1)),this.Na.Qa()},h.Rb=function(){if(this.i&&!this.Pa()){for(var e=this.j?this.j.l:null,t=[],n=0,i=b(this.i.variants),r=i.next();!r.done;r=i.next())if(r=r.value,Go(r)){var l=eu(r);l.active=r==e,l.active||n==1||e==null||r.video!=e.video||r.audio!=e.audio||(l.active=!0),l.active&&n++,t.push(l)}return t}return this.h&&this.h.audioTracks?Array.from(this.h.audioTracks).map(function(c){return Fc(c)}):[]},h.vc=function(){if(this.i&&!this.Pa()){for(var e=this.j?this.j.u:null,t=[],n=b(this.i.textStreams),i=n.next();!i.done;i=n.next()){i=i.value;var r=Bn(i);r.active=i==e,t.push(r)}return t}return this.h&&this.h.src&&this.h.textTracks?Sy(this).map(function(l){return xs(l)}):[]},h.pi=function(){var e=this.Oe;return this.i&&(e=this.i.imageStreams),e.map(function(t){return qc(t)})},h.fi=function(e){var t=this,n,i;return z(function(r){return r.g==1?_(r,J2(t,e),2):(n=r.h,n?(i=[],n.segmentIndex.Eb(function(l){var c=Q2(l.tilesLayout||n.tilesLayout);if(c){c=c.rows*c.oc;for(var f=l.j-l.startTime,y=0;y<c;y++){var m=Z2(n,l.startTime+f*y/c);m&&i.push(m)}}}),n.closeSegmentIndex&&n.closeSegmentIndex(),r.return(i)):r.return(null))})};function Q2(e){return e&&(e=/(\d+)x(\d+)/.exec(e))?{oc:parseInt(e[1],10),rows:parseInt(e[2],10)}:null}h.Hi=function(e,t){var n=this,i;return z(function(r){return r.g==1?_(r,J2(n,e),2):(i=r.h)?r.return(Z2(i,t)):r.return(null)})};function J2(e,t){var n,i;return z(function(r){return r.g==1?e.m!=Vi&&e.m!=zr||(n=e.Oe,e.i&&(n=e.i.imageStreams),i=n[0],!i)?r.return(null):(t!=null&&(i=n.find(function(l){return l.id==t})),i?i.segmentIndex?r.s(2):_(r,i.createSegmentIndex(),2):r.return(null)):r.return(i)})}function Z2(e,t){var n=e.segmentIndex.find(t);if(n==null)return null;n=e.segmentIndex.get(n);var i=Q2(n.tilesLayout||e.tilesLayout);if(!i)return null;var r=e.width||0,l=e.height||0,c=r/i.oc,f=l/i.rows,y=i.oc*i.rows,m=n.j-n.startTime;m=n.B||m/y;var T=n.startTime,x=0,D=0;return 1<y&&(t=Math.floor((t-n.startTime)/m),T=n.startTime+t*m,x=t%i.oc*c,D=Math.floor(t/i.oc)*f),t=!1,(i=n.thumbnailSprite)&&(t=!0,f=i.height,x=i.positionX,D=i.positionY,c=i.width),{segment:n,imageHeight:l,imageWidth:r,height:f,positionX:x,positionY:D,startTime:T,duration:m,uris:n.N(),width:c,sprite:t,mimeType:n.mimeType||e.mimeType,codecs:n.codecs||e.codecs}}h.th=function(e){function t(){var i=n.i.textStreams.find(function(r){return r.id==e.id});i&&i!=n.j.u&&(Ru(n.B.h,i,!1),nl(n.j,i),Xm(n),Ty(n),n.Tb=i.language)}var n=this;this.i&&this.G&&(t(),!this.Pa())||function(){if(n.h&&n.h.textTracks){var i=Sy(n),r=i.find(function(l){return l.mode!=="disabled"});(i=i.find(function(l){return tu(l)===e.id}))&&(r!==i&&(r&&(r.mode="disabled",n.l.Ja(r,"cuechange"),n.u.remove(0,1/0)),i&&$2(n,i)),Xm(n),Ty(n))}}()};function $2(e,t){e.l.D(t,"cuechange",function(){e.u.remove(0,Math.max(0,e.h.currentTime-e.g.streaming.bufferBehind));var n={periodStart:0,segmentStart:0,segmentEnd:e.h.duration,vttOffset:0},i=[],r=Array.from(t.activeCues||[]);r=b(r);for(var l=r.next();!l.done;l=r.next()){if(l=l.value,l.endTime===1/0||l.endTime<l.startTime)l=null;else{var c=new Qt(l.startTime,l.endTime,l.text);c.line=typeof l.line=="number"?l.line:null,l.lineAlign&&(c.lineAlign=l.lineAlign),c.lineInterpretation=l.snapToLines?Ho:1,c.position=typeof l.position=="number"?l.position:null,l.positionAlign&&(c.positionAlign=l.positionAlign),c.size=l.size,c.textAlign=l.align,l.vertical==="lr"?c.writingMode="vertical-lr":l.vertical==="rl"&&(c.writingMode="vertical-rl"),l.region&&(c.region.id=l.region.id,c.region.height=l.region.lines,c.region.heightUnits=2,c.region.regionAnchorX=l.region.regionAnchorX,c.region.regionAnchorY=l.region.regionAnchorY,c.region.scroll=l.region.scroll,c.region.viewportAnchorX=l.region.viewportAnchorX,c.region.viewportAnchorY=l.region.viewportAnchorY,c.region.viewportAnchorUnits=Gi,c.region.width=l.region.width,c.region.widthUnits=Gi),Pc(c),l=c}l&&((c=e.g.mediaSource.modifyCueCallback)&&c(l,null,n),i.push(l))}e.u.append(i)}),t.mode=document.pictureInPictureElement?"showing":"hidden"}h.Be=function(e,t,n){function i(){var l=r.i.variants.find(function(f){return f.id==e.id});if(l&&Go(l)){var c=r.j.l;r.g.abr.enabled&&(c.video!=l.video||c.audio&&l.audio&&c.audio.language==l.audio.language&&c.audio.channelsCount==l.audio.channelsCount&&c.audio.label==l.audio.label)&&bt("Changing tracks while abr manager is enabled will likely result in the selected track being overridden. Consider disabling abr before calling selectVariantTrack()."),r.Pa()?wy(r,l,!1,!1,0):wy(r,l,!1,t||!1,n||0),r.W.configure({language:l.language,role:l.audio&&l.audio.roles&&l.audio.roles[0]||"",channelCount:l.audio&&l.audio.channelsCount?l.audio.channelsCount:0,Sc:l.video&&l.video.hdr?l.video.hdr:"",spatialAudio:l.audio&&l.audio.spatialAudio?l.audio.spatialAudio:!1,videoLayout:l.video&&l.video.videoLayout?l.video.videoLayout:"",Kc:l.audio&&l.audio.label?l.audio.label:"",fd:"",codecSwitchingStrategy:r.g.mediaSource.codecSwitchingStrategy,audioCodec:l.audio&&l.audio.codecs?l.audio.codecs:""}),Pf(r)}}var r=this;t=t===void 0?!1:t,n=n===void 0?0:n,!(this.i&&this.G&&(i(),!this.Pa()))&&function(){if(r.h&&r.h.audioTracks){var l=Array.from(r.h.audioTracks);l=b(l);for(var c=l.next();!c.done;c=l.next())if(c=c.value,tu(c)==e.id){lw(r,c);break}}}()},h.xj=function(e,t){t=t===void 0?0:t;var n=this.Rb();if(n.length){var i=n.find(function(r){return r.active});i&&(n=n.find(function(r){return r.videoId===i.videoId&&r.language==e.language&&r.label==e.label&&r.audioMimeType==e.mimeType&&r.audioCodec==e.codecs&&r.primary==e.primary&&us(r.audioRoles,e.roles)&&r.accessibilityPurpose==e.accessibilityPurpose&&r.channelsCount==e.channelsCount&&r.audioSamplingRate==e.audioSamplingRate&&r.spatialAudio==e.spatialAudio}))&&!n.active&&this.Be(n,!0,t)}},h.getAudioTracks=function(){var e=this.Rb();if(!e.length)return[];var t=e.find(function(l){return l.active});if(!t)return[];var n=e;if(this.m==Vi&&(n=e.filter(function(l){return l.originalVideoId===t.originalVideoId&&l.audioCodec})),!n.length)return[];e=new Map,n=b(n);for(var i=n.next();!i.done;i=n.next()){i=i.value;var r=i.originalAudioId;r||i.audioId==null||(r=String(i.audioId)),r&&e.set(r,{active:i.active,language:i.language,label:i.label,mimeType:i.audioMimeType,codecs:i.audioCodec,primary:i.primary,roles:i.audioRoles||[],accessibilityPurpose:i.accessibilityPurpose,channelsCount:i.channelsCount,audioSamplingRate:i.audioSamplingRate,spatialAudio:i.spatialAudio,originalLanguage:i.originalLanguage})}return Array.from(e.values())},h.hi=function(){return hw(this.Rb())},h.Fi=function(){return hw(this.vc())},h.gi=function(){return Array.from(pw(this.Rb()))},h.Ei=function(){return Array.from(pw(this.vc()))},h.sh=function(e,t,n,i,r,l,c){function f(){function m(N,U){return N.video||U.video?N.video&&U.video?Math.abs((N.video.height||0)-(U.video.height||0))+Math.abs((N.video.width||0)-(U.video.width||0)):1/0:0}y.W=y.g.adaptationSetCriteriaFactory(),y.W.configure({language:e,role:t||"",channelCount:n||0,Sc:"",spatialAudio:l||!1,videoLayout:"",Kc:c||"",fd:"",codecSwitchingStrategy:y.g.mediaSource.codecSwitchingStrategy,audioCodec:r||""});var T=y.j.l,x=y.W.create(y.i.variants),D=null;x=b(x.values());for(var R=x.next();!R.done;R=x.next())R=R.value,Go(R)&&(!D||m(D,T)>m(R,T))&&(D=R);D!=T&&(D?(T=eu(D),y.Be(T,!0,i||0)):cp(y))}var y=this;n=n===void 0?0:n,i=i===void 0?0:i,r=r===void 0?"":r,l=l===void 0?!1:l,c=c===void 0?"":c,!(this.i&&this.G&&(f(),!this.Pa()))&&function(){if(y.h&&y.h.audioTracks){var m=iu(y.Rb(),e,t||"",!1)[0];m&&y.Be(m)}}()},h.hg=function(e,t,n){function i(){r.Tb=e,r.Hd=t||"",r.Fd=n||!1;var l=iu(r.i.textStreams,r.Tb,r.Hd,r.Fd)[0]||null;l&&l!=r.j.u&&(Ru(r.B.h,l,!1),r.g.streaming.alwaysStreamText||r.Pf())&&(nl(r.j,l),Xm(r),Ty(r))}var r=this;n=n===void 0?!1:n,!(this.i&&this.G&&(i(),!this.Pa()))&&function(){var l=iu(r.vc(),e,t||"",n||!1)[0];l&&r.th(l)}()},h.yj=function(e,t,n){function i(){for(var l=null,c=b(r.i.variants),f=c.next();!f.done;f=c.next())if(f=f.value,f.audio.label==e){l=f;break}l!=null&&(r.W=r.g.adaptationSetCriteriaFactory(),r.W.configure({language:l.language,role:"",channelCount:0,Sc:"",spatialAudio:!1,videoLayout:"",fd:"",Kc:e,codecSwitchingStrategy:r.g.mediaSource.codecSwitchingStrategy,audioCodec:""}),cp(r,t,n))}var r=this;t=t===void 0?!0:t,n=n===void 0?0:n,!(this.i&&this.G&&(i(),!this.Pa()))&&function(){if(r.h&&r.h.audioTracks){var l=Array.from(r.h.audioTracks),c=null;l=b(l);for(var f=l.next();!f.done;f=l.next())f=f.value,f.label==e&&(c=f);c&&lw(r,c)}}()},h.Pf=function(){var e=this.oa;return this.u?this.u.isTextVisible():e},h.Rg=function(){return this.h&&this.h.currentSrc&&this.h.textTracks?tw(this).map(function(e){return xs(e)}):[]},h.ji=function(e){if(!this.h||!this.h.currentSrc||!this.h.textTracks)return[];var t=It(e),n=tw(this).filter(function(f){return It(f.language)==t});if(!n||!n.length)return[];e=[];var i=new Set;n=b(n);for(var r=n.next();!r.done;r=n.next())if((r=r.value)&&r.cues){r=b(r.cues);for(var l=r.next();!l.done;l=r.next()){var c=l.value;(l=c.id)&&l!=""||(l=c.startTime+"-"+c.endTime+"-"+c.text),c={id:l,title:c.text,startTime:c.startTime,endTime:c.endTime},i.has(l)||(e.push(c),i.add(l))}}return e};function Sy(e){return Array.from(e.h.textTracks).filter(function(t){return t.kind!="metadata"&&t.kind!="chapters"&&t.label!="Shaka Player TextTrack"})}function ew(e){return Array.from(e.h.textTracks).find(function(t){return t.label=="Shaka Player TextTrack"})}function Rb(e){return Array.from(e.h.textTracks).filter(function(t){return t.kind=="metadata"})}function tw(e){return Array.from(e.h.textTracks).filter(function(t){return t.kind=="chapters"})}h.zh=function(e){e=!!e,this.oa!=e&&(this.oa=e,this.m==Vi?(this.u.setTextVisibility(e),this.g.streaming.alwaysStreamText||(e?this.j.u||(e=iu(this.i.textStreams,this.Tb,this.Hd,this.Fd),0<e.length&&(nl(this.j,e[0]),Xm(this),Ty(this))):Jh(this.j))):this.h&&this.h.src&&this.h.textTracks&&this.u.setTextVisibility(e),cw(this))},h.yi=function(){if(this.G)var e=this.G.Od();else{if(this.Z==null)return new Date;e=this.Z}if(this.i&&!this.Pa()){var t=this.i.presentationTimeline;return new Date(1e3*((t.m||t.i)+e))}return this.h&&this.h.getStartDate?(t=this.h.getStartDate(),isNaN(t.getTime())?null:new Date(t.getTime()+1e3*e)):null},h.Wg=function(){if(this.i&&!this.Pa()){var e=this.i.presentationTimeline;return new Date(1e3*(e.m||e.i))}return this.h&&this.h.getStartDate?(e=this.h.getStartDate(),isNaN(e.getTime())?null:e):null},h.ae=function(){return this.U()&&this.i?this.i.presentationTimeline.ae():null},h.Fb=function(){if(this.m==Vi)return this.I.Fb();var e={total:[],audio:[],video:[],text:[]};return this.m==zr&&(e.total=wo(this.h.buffered)),e},h.Zd=function(){if(!this.h||!this.h.currentTime)return null;var e=this.Wg().getTime()+1e3*this.h.currentTime;return Math.floor(Date.now()-e)},h.getStats=function(){if(this.m!=Vi&&this.m!=zr)return{width:NaN,height:NaN,streamBandwidth:NaN,decodedFrames:NaN,droppedFrames:NaN,corruptedFrames:NaN,stallsDetected:NaN,gapsJumped:NaN,estimatedBandwidth:NaN,completionPercent:NaN,loadLatency:NaN,manifestTimeSeconds:NaN,drmTimeSeconds:NaN,playTime:NaN,pauseTime:NaN,bufferingTime:NaN,licenseTime:NaN,liveLatency:NaN,maxSegmentDuration:NaN,manifestSizeBytes:NaN,bytesDownloaded:NaN,nonFatalErrorCount:NaN,manifestPeriodCount:NaN,manifestGapCount:NaN,switchHistory:[],stateHistory:[]};c1(this);var e=this.h,t=e.currentTime/e.duration;if(!isNaN(t)&&!this.U()){var n=this.B;t=Math.round(100*t),n.i=isNaN(n.i)?t:Math.max(n.i,t)}if(this.G&&(this.B.P=this.G.zg(),this.B.T=this.G.Ag()),e.getVideoPlaybackQuality){n=e.getVideoPlaybackQuality(),t=this.B;var i=Number(n.totalVideoFrames);t.O=Number(n.droppedVideoFrames),t.M=i,this.B.L=Number(n.corruptedVideoFrames)}if(this.C?(n=this.C,n=n.H?n.H:NaN):n=NaN,this.B.o=n,this.m==Vi){if(n=this.j.l,t=this.j.u,n){i=this.K?this.K.i:1;var r=i*n.bandwidth;t&&t.bandwidth&&(r+=i*t.bandwidth),this.B.A=r}n&&n.video&&(t=this.B,i=n.video.height||NaN,t.m=n.video.width||NaN,t.l=i),this.U()&&(n=this.Zd()||0,this.B.B=n/1e3),this.i&&(this.B.G=this.i.periodCount,this.B.F=this.i.gapCount,this.i.presentationTimeline&&(this.B.I=this.i.presentationTimeline.h)),n=this.o.getBandwidthEstimate(),this.B.u=n}this.m==zr&&(n=this.B,n.mc=isNaN(n.mc)?NaN:n.mc+NaN,n=this.B,t=e.videoHeight||NaN,n.m=e.videoWidth||NaN,n.l=t);var l=this.B;e=l.m,n=l.l,t=l.A,i=l.M,r=l.O;var c=l.L,f=l.T,y=l.P,m=l.u,T=l.i,x=l.C,D=l.H,R=l.j,N=Cf(l.g,"playing"),U=Cf(l.g,"paused"),L=Cf(l.g,"buffering"),j=l.o,V=l.B,X=l.I,G=l.bh,Z=l.mc,q=l.K,K=l.G,W=l.F,Q=Rm(l.g),oe=[];l=b(l.h.g);for(var ne=l.next();!ne.done;ne=l.next())ne=ne.value,oe.push({timestamp:ne.timestamp,id:ne.id,type:ne.type,fromAdaptation:ne.fromAdaptation,bandwidth:ne.bandwidth});return{width:e,height:n,streamBandwidth:t,decodedFrames:i,droppedFrames:r,corruptedFrames:c,stallsDetected:f,gapsJumped:y,estimatedBandwidth:m,completionPercent:T,loadLatency:x,manifestTimeSeconds:D,drmTimeSeconds:R,playTime:N,pauseTime:U,bufferingTime:L,licenseTime:j,liveLatency:V,maxSegmentDuration:X,manifestSizeBytes:G,bytesDownloaded:Z,nonFatalErrorCount:q,manifestPeriodCount:K,manifestGapCount:W,stateHistory:Q,switchHistory:oe}},h.Rh=function(e,t,n,i,r,l,c){c=c===void 0?!1:c;var f=this,y,m,T,x,D,R,N,U,L,j,V,X,G;return z(function(Z){switch(Z.g){case 1:if(f.m!=Vi&&f.m!=zr)throw new Y(1,7,7004);if(n!="subtitles"&&n!="captions"&&bt("Using a kind value different of `subtitles` or `captions` can cause unwanted issues."),i){Z.s(2);break}return _(Z,a1(f,e),3);case 3:i=Z.h;case 2:if(y=[],f.A&&(y=f.A.getCuePoints()),f.m!=zr){Z.s(4);break}return c&&(n="forced"),_(Z,nw(f,e,t,n,i,l||"",y),5);case 5:if(m=It(t),T=f.vc(),x=T.find(function(q){return It(q.language)==m&&q.label==(l||"")&&q.kind==n}))return pr(f),Z.return(x);throw new Y(1,2,2012);case 4:if(D=En,R=f.Ra(),N=R.end-R.start,f.i&&(N=f.i.presentationTimeline.getDuration()),N==1/0)throw new Y(1,4,4033);if(!y.length){Z.s(6);break}return _(Z,u1(f,e,f.F,f.g.streaming.retryParameters),7);case 7:U=Z.h,L=iw(f,U,i,y),j=new Blob([L],{type:"text/vtt"}),e=pf(j),i="text/vtt";case 6:if(V={id:f.We++,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:yf(0,N,[e]),mimeType:i||"",codecs:r||"",kind:n,encrypted:!1,drmInfos:[],keyIds:new Set,language:t,originalLanguage:t,label:l||null,type:D.za,primary:!1,trickModeVideo:null,dependencyStream:null,emsgSchemeIdUris:null,roles:[],forced:!!c,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!0,fastSwitching:!1,fullMimeTypes:new Set([hn(i||"",r||"")]),isAudioMuxedInVideo:!1,baseOriginalId:null},X=hn(V.mimeType,V.codecs),G=Dl(X),!G)throw new Y(2,2,2014,i);return f.i.textStreams.push(V),pr(f),Z.return(Bn(V))}})},h.Sh=function(e,t){var n=this,i,r,l,c,f,y,m,T,x,D,R,N,U,L,j,V,X,G;return z(function(Z){switch(Z.g){case 1:if(n.m!=Vi&&n.m!=zr)throw new Y(1,7,7004);if(t){Z.s(2);break}return _(Z,a1(n,e),3);case 3:t=Z.h;case 2:if(t!="text/vtt")throw new Y(1,2,2017,e);if(i=En,r=n.Ra(),l=r.end-r.start,n.i&&(l=n.i.presentationTimeline.getDuration()),l==1/0)throw new Y(1,4,4045);return _(Z,u1(n,e,n.F,n.g.streaming.retryParameters),4);case 4:if(c=Z.h,f=Il(t),!f)throw new Y(2,2,2014,t);for(y=f(),m={periodStart:0,segmentStart:0,segmentEnd:l,vttOffset:0},T=Ze(c),x=y.parseMedia(T,m,e,[]),D=[],R=b(x),N=R.next(),U={};!N.done;U={Ne:void 0,Mc:void 0},N=R.next())U.Mc=N.value,U.Ne=null,L=function(q){return function(){return q.Ne==null&&(q.Ne=_n([e],[q.Mc.payload])),q.Ne||[]}}(U),j=new qe(U.Mc.startTime,U.Mc.endTime,L,0,null,null,0,0,1/0),U.Mc.payload.includes("#xywh")&&(V=U.Mc.payload.split("#xywh=")[1].split(","),V.length===4&&j.De({height:parseInt(V[3],10),positionX:parseInt(V[0],10),positionY:parseInt(V[1],10),width:parseInt(V[2],10)})),D.push(j);if(X=t,!D.length){Z.s(5);break}return _(Z,Co(D[0].N()[0],n.F,n.g.manifest.retryParameters),6);case 6:X=Z.h;case 5:return G={id:n.We++,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new Dt(D),mimeType:X||"",codecs:"",kind:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:"und",originalLanguage:null,label:null,type:i.$e,primary:!1,trickModeVideo:null,dependencyStream:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,tilesLayout:"1x1",accessibilityPurpose:null,external:!0,fastSwitching:!1,fullMimeTypes:new Set([hn(X||"","")]),isAudioMuxedInVideo:!1,baseOriginalId:null},n.m==zr?n.Oe.push(G):n.i.imageStreams.push(G),pr(n),Z.return(qc(G))}})},h.Qh=function(e,t,n){var i=this,r,l,c,f;return z(function(y){switch(y.g){case 1:if(i.m!=Vi&&i.m!=zr)throw new Y(1,7,7004);if(n){y.s(2);break}return _(y,a1(i,e),3);case 3:n=y.h;case 2:return r=[],i.A&&(r=i.A.getCuePoints()),_(y,nw(i,e,t,"chapters",n,"",r),4);case 4:if(l=y.h,c=i.Rg(),f=c.find(function(m){return m.language==t}),!f){y.s(5);break}return _(y,new Promise(function(m,T){i.l.ma(l,"load",m),i.l.ma(l,"error",function(){T(new Y(1,2,2015))})}),6);case 6:return pr(i),y.return(f);case 5:throw new Y(1,2,2012)}})};function a1(e,t){var n;return z(function(i){switch(i.g){case 1:return pe(i,2),_(i,Co(t,e.F,e.g.streaming.retryParameters),4);case 4:n=i.h,Ue(i,3);break;case 2:Me(i);case 3:if(n)return i.return(n);throw new Y(1,2,2011,t)}})}function nw(e,t,n,i,r,l,c){var f,y,m,T;return z(function(x){if(x.g==1)return r!="text/vtt"||c.length?_(x,u1(e,t,e.F,e.g.streaming.retryParameters),3):x.s(2);x.g!=2&&(f=x.h,y=iw(e,f,r,c),m=new Blob([y],{type:"text/vtt"}),t=pf(m),r="text/vtt"),T=document.createElement("track");var D=e.L,R=t;try{if(D.g.enabled){var N=fy(D);N.ot=Nu,N.su=!0;var U=Io(N),L=ll(R,U)}else L=R}catch(j){_o("CMCD_TEXT_TRACK_ERROR","Could not generate text track CMCD data.",j),L=R}return T.src=L,T.label=l,T.kind=i,T.srclang=n,e.h.getAttribute("crossorigin")||e.h.setAttribute("crossorigin","anonymous"),e.h.appendChild(T),x.return(T)})}function u1(e,t,n,i){var r,l,c;return z(function(f){if(f.g==1){r=Wi,l=cn([t],i),l.method="GET";var y=e.L;try{y.g.enabled&&Da(y,l,{ot:Nu,su:!0})}catch(m){_o("CMCD_TEXT_ERROR","Could not generate text CMCD data.",m)}return _(f,n.request(r,l).promise,2)}return c=f.h,f.return(c.data)})}function iw(e,t,n,i){var r=Il(n);if(r)return n=r(),e={periodStart:0,segmentStart:0,segmentEnd:e.h.duration,vttOffset:0},t=Ze(t),t=n.parseMedia(t,e,null,[]),Hm(t,i);throw new Y(2,2,2014,n)}h.Dj=function(e,t){this.ka.width=e,this.ka.height=t},h.eg=function(e){if(this.m==Vi){var t=this.j;if(e=e===void 0?.1:e,t.m.g)t=!1;else if(t.B)t=!1;else{for(var n=b(t.i.values()),i=n.next();!i.done;i=n.next())i=i.value,!i.sd||i.Da||i.kb||(i.sd=!1,Oi(t,i,e));t=!0}}else t=!1;return t},h.Hf=function(){return bt("Shaka Player's internal Manifest structure is NOT covered by semantic versioning compatibility guarantees. It may change at any time! Please consider filing a feature request for whatever you use getManifest() for."),this.i},h.ui=function(){return this.Qb},h.ni=function(){var e={video:null,audio:null,text:null};if(this.m!=Vi)return e;var t=this.j.l,n=this.h.currentTime;t=b([t.video,t.audio,this.j.u]);for(var i=t.next();!i.done;i=t.next())if((i=i.value)&&i.segmentIndex){var r=i.segmentIndex.find(n);r=i.segmentIndex.get(r),r={codecs:r.codecs||i.codecs,mimeType:r.mimeType||i.mimeType,bandwidth:r.bandwidth||i.bandwidth},i.type=="video"?(r.width=i.width,r.height=i.height,e.video=r):i.type=="audio"?e.audio=r:i.type==at&&(e.text=r)}return e};function _u(e){var t=ku();return t.streaming.failureCallback=function(n){if(e.U()){var i=null;n.code==1001||n.code==1002?(i=1,e.g.streaming.lowLatencyMode&&(i=.1)):n.code==1003&&(i=.1),i!=null&&(n.severity=1,e.eg(i))}},t.textDisplayFactory=function(){return!e.ue||oi()&&!document.fullscreenEnabled?"addTextTrack"in e.h?new ci(e.h,"Shaka Player TextTrack"):new Kn:new Si(e.h,e.ue)},t}h.Ch=function(e){this.ue=e};function Mb(e,t){for(var n=new Set,i=b(t.textStreams),r=i.next();!r.done;r=i.next())r=r.value,r.mimeType!="application/cea-608"&&r.mimeType!="application/cea-708"||n.add(r.originalId);for(i=b(t.variants),r=i.next();!r.done;r=i.next())if((r=r.value.video)&&r.closedCaptions){for(var l=b(r.closedCaptions.keys()),c=l.next();!c.done;c=l.next())if(c=c.value,!n.has(c)){var f=c.startsWith("CC")?"application/cea-608":"application/cea-708",y=new sn,m=r.closedCaptions.get(c);f={id:e.We++,originalId:c,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:y,mimeType:f,codecs:"",kind:"caption",encrypted:!1,drmInfos:[],keyIds:new Set,language:m,originalLanguage:m,label:null,type:at,primary:!1,trickModeVideo:null,dependencyStream:null,emsgSchemeIdUris:null,roles:r.roles,forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!1,fastSwitching:!1,fullMimeTypes:new Set([hn(f,"")]),isAudioMuxedInVideo:!1,baseOriginalId:null},t.textStreams.push(f),n.add(c)}}}function Nb(e,t){var n,i,r,l,c;return z(function(f){return f.g==1?(n=e.audio,i=e.video,r=function(y,m){var T,x,D;return z(function(R){return R.g==1?y?y.segmentIndex?R.s(2):_(R,y.createSegmentIndex(),2):R.return(null):(x=(T=y.segmentIndex.Gb(m))?T.next().value:null,x?(D=x.startTime,R.return(D)):R.return(null))})},_(f,r(n,t),2)):f.g!=3?(l=f.h,_(f,r(i,t),3)):(c=f.h,c!=null&&l!=null?f.return(Math.max(c,l)):c!=null?f.return(c):l!=null?f.return(l):f.return(t))})}function s1(e){var t=e.Of();if(e.B&&e.M&&e.G){if(e.g.streaming.rebufferingGoal==0){var n=e.K;n.j=!1,Gh(n)}else n=e.K,n.j=t,Gh(n);if(e.L&&(n=e.L,t||n.u||(n.u=!0),n.u&&t&&(n.B=!0),n.F=t),c1(e),n=e.g.streaming.liveSync.dynamicTargetLatency.maxAttempts,e.g.streaming.liveSync.dynamicTargetLatency.enabled&&t&&e.Ue<n){n=e.g.streaming.liveSync.dynamicTargetLatency.maxLatency;var i=e.g.streaming.liveSync.targetLatencyTolerance,r=e.g.streaming.liveSync.dynamicTargetLatency.rebufferIncrement;e.P&&(e.P=Math.min(e.P+ ++e.Ue*r,n-i))}}t=new Map().set("buffering",t),e.dispatchEvent(g("buffering",t))}function rw(e,t){e.Na.Qa(),e.Na.D(e.h,"timeupdate",function(){var n=e.h.currentTime,i=e.Ra(),r=e.U()?e.g.streaming.safeSeekOffset:0;0<t?Math.floor(n)>=Math.floor(i.end)&&e.gd():Math.floor(n)<=Math.floor(i.start+r)&&e.gd()})}function c1(e){if(e.B&&e.M){var t=e.B.g,n="playing";e.M.g==Ms?n="buffering":e.Uc()?n="ended":e.h.paused&&(n="paused");var i=n;if(t.g==null)t.g={timestamp:Date.now()/1e3,state:i,duration:0},t=!0;else{var r=Date.now()/1e3;t.g.duration=r-t.g.timestamp,t.g.state==i?t=!1:(t.h.push(t.g),t.g={timestamp:r,state:i,duration:0},t=!0)}t&&(n=new Map().set("newstate",n),e.dispatchEvent(g("statechanged",n)))}}function ow(e){var t=e.h.playbackRate,n=e.U();if(e.g.streaming.vodDynamicPlaybackRate&&!n){var i=e.g.streaming.vodDynamicPlaybackRateLowBufferRate,r=e.Qg();r<=e.g.streaming.vodDynamicPlaybackRateBufferRatio?t!=i&&e.Md(i,!1):r==1&&t!==e.K.sc()&&e.gd()}if(n&&(n=e.Ra(),Number.isFinite(n.end)&&!(e.h.currentTime<n.start||e.h.paused))){i=e.g.streaming.liveSync.targetLatencyTolerance,r=e.g.streaming.liveSync.dynamicTargetLatency.enabled;var l=e.g.streaming.liveSync.dynamicTargetLatency.stabilityThreshold;if(e.g.streaming.liveSync&&e.g.streaming.liveSync.enabled)var c=e.g.streaming.liveSync.targetLatency,f=c+i,y=Math.max(0,c-i),m=e.g.streaming.liveSync.maxPlaybackRate,T=e.g.streaming.liveSync.minPlaybackRate;else e.i&&e.i.serviceDescription&&(c=e.i.serviceDescription.targetLatency,e.i.serviceDescription.targetLatency!=null?f=e.i.serviceDescription.targetLatency+i:e.i.serviceDescription.maxLatency!=null&&(f=e.i.serviceDescription.maxLatency),e.i.serviceDescription.targetLatency!=null?y=Math.max(0,e.i.serviceDescription.targetLatency-i):e.i.serviceDescription.minLatency!=null&&(y=e.i.serviceDescription.minLatency),m=e.i.serviceDescription.maxPlaybackRate||e.g.streaming.liveSync.maxPlaybackRate,T=e.i.serviceDescription.minPlaybackRate||e.g.streaming.liveSync.minPlaybackRate);e.P||typeof c!="number"||(e.P=c);var x=e.g.streaming.liveSync.dynamicTargetLatency.maxAttempts;r&&e.Ma&&e.P!==null&&typeof c=="number"&&e.Ue<x&&Date.now()-e.Ma>1e3*l&&(l=e.g.streaming.liveSync.dynamicTargetLatency.minLatency,e.P=Math.max(e.P-(c-l)/2,l+i),e.Ma=Date.now()),r&&e.P!==null&&(f=e.P+i,y=e.P-i),c=n.end-e.h.currentTime,i=0,e.m==zr&&(r=e.h.buffered,0<r.length&&(i=r.end(r.length-1),i=Math.max(m,i-n.end))),n=e.g.streaming.liveSync.panicMode,r=1e3*e.g.streaming.liveSync.panicThreshold,l=Date.now()-e.M.h,n&&!T&&(T=e.g.streaming.liveSync.minPlaybackRate),n&&T&&l<=r?t!=T&&e.Md(T,!1):f!=null&&m&&c-i>f?(t!=m&&e.Md(m,!1),e.Ma=null):y!=null&&T&&c-i<y?(t!=T&&e.Md(T,!1),e.Ma=null):t!==e.K.sc()&&(e.gd(),e.Ma=Date.now())}}function Gm(e){if(e.h){var t=function(r,l){var c=c===void 0?Number.EPSILON:c;if(r===l)c=!0;else{var f=Math.abs(r-l);c=f<=c?!0:c!==Number.EPSILON?Math.abs(f-c)<=Number.EPSILON:!1}return(c||l>r)&&e.Ve<r?(e.Ve=r,!0):!1},n=e.Ra();if(n=n.end-n.start,n=0<n?e.h.currentTime/n:0,!isNaN(n)){if(n*=100,t(0,n))var i=g("started");else t(25,n)?i=g("firstquartile"):t(50,n)?i=g("midpoint"):t(75,n)?i=g("thirdquartile"):(t(100,n)&&(i=g("complete")),e.g&&e.g.playRangeEnd!=1/0&&e.Uc()&&e.h.pause());i&&e.dispatchEvent(i)}}}function Pf(e){try{Zc(e.te,e.i)}catch(n){return fp(e,n),!1}var t=fd(e.i.variants);return t=e.W.create(t),e.o.setVariants(Array.from(t.values())),!0}function cp(e,t,n,i,r){t=t===void 0?!0:t,n=n===void 0?0:n,i=i===void 0?!1:i,r=r===void 0?!0:r;var l;(l=Pf(e)?e.o.chooseVariant():null)&&wy(e,l,r,t,n,i)}function wy(e,t,n,i,r,l){l=l===void 0?!1:l;var c=e.j.l;if(t==c)i&&Yd(e.j,t,i,r,!0);else{var f=e.B.h;if(f.h!=t&&(f.h=t,f.g.push({timestamp:Date.now()/1e3,id:t.id,type:"variant",fromAdaptation:n,bandwidth:t.bandwidth})),Yd(e.j,t,i,r,l,n),i=null,c&&(i=eu(c)),c=eu(t),c.active=!0,e.O&&(r=e.O,t=t.video)){switch(t.dependencyStream&&(t=t.dependencyStream),l=0,f=-1,t.mimeType){case"video/webm":l=1;break;case"video/mp4":l=2}switch(e.Tg()){case"DASH":f=1;break;case"HLS":f=0}r.g&&(r.g.setLevelSwitching(t.id,!0),r.g.setContainerFormat(l),r.j||r.g.setStreamingFormat(f))}n?(n=new Map().set("oldTrack",i).set("newTrack",c),n=g("adaptation",n),Lf(e,n)):aw(e,i,c),uw(e,i,c)}}function lw(e,t){var n=Array.from(e.h.audioTracks).find(function(i){return i.enabled});t.enabled=!0,n&&(t.id!==n.id&&(n.enabled=!1),n=Fc(n),t=Fc(t),aw(e,n,t),uw(e,n,t))}function pr(e){var t=g("trackschanged");Lf(e,t),sw(e)}function aw(e,t,n){t=new Map().set("oldTrack",t).set("newTrack",n),t=g("variantchanged",t),Lf(e,t)}function uw(e,t,n){var i=!1;t&&t.audioId==n.audioId&&t.audioGroupId==n.audioGroupId||(i=!0),i&&sw(e)}function sw(e){var t=g("audiotrackschanged");Lf(e,t)}function Xm(e){var t=g("textchanged");Lf(e,t)}function cw(e){var t=g("texttrackvisibility");Lf(e,t)}function fw(e){e.g.abr.enabled||f1(e);var t=new Map().set("newStatus",e.g.abr.enabled);Lf(e,g("abrstatuschanged",t))}function Ty(e){var t=e.vc().find(function(n){return n.active});t&&e.u&&e.u.setTextLanguage&&e.u.setTextLanguage(t.language)}function f1(e,t){if(t=t===void 0?!0:t,e.m==Vi){e.xe.stop();for(var n=b(e.i.variants),i=n.next();!i.done;i=n.next())i.value.disabledUntilTime=0;t&&Pf(e)}}h.disableStream=function(e,t){if(!this.g.abr.enabled||this.m===al||!navigator.onLine||t==0||!this.i)return!1;if(this.i.variants.some(function(f){var y=f[e.type];return y&&y.id!==e.id&&!f.disabledUntilTime?e.type=="audio"?e.language===y.language:!0:!1})){for(var n=!1,i=!1,r=b(this.i.variants),l=r.next();!l.done;l=r.next()){l=l.value;var c=l[e.type];c&&(c.id===e.id?(l.disabledUntilTime=Date.now()/1e3+t,n=!0):c.trickModeVideo&&c.trickModeVideo.id==e.id&&(i=!0))}return!n&&i?!1:(this.xe.ua(1),t=this.Fb().video.reduce(function(f,y){return f+y.end-y.start},0),cp(this,!1,t,!0,!1),!0)}return!1};function fp(e,t){var n,i,r,l;return z(function(c){switch(c.g){case 1:if(e.m==al)return c.return();if(t.severity===1&&e.B.K++,n=!0,!(e.sa&&e.i&&e.j)||t.code!=3016&&t.code!=3014&&t.code!=3015&&t.code!=3018){c.s(2);break}return oi()&&t.code==3016?c.return():(pe(c,3),_(c,Yl(e.j),5));case 5:i=c.h,n=!i,i&&(r=g("mediasourcerecovered"),e.dispatchEvent(r)),Ue(c,2);break;case 3:Me(c),n=!0;case 2:if(!n)return c.return();t.severity===2&&f1(e,!1),l=g("error",new Map().set("detail",t)),e.dispatchEvent(l),l.defaultPrevented&&(t.handled=!0),se(c)}})}h.addFont=function(e,t){var n,i,r,l,c;return z(function(f){if(f.g==1)return"fonts"in document&&"FontFace"in w?_(f,document.fonts.ready,3):f.s(0);if(!("entries"in document.fonts))return f.return();for(n=function(y){y=y.entries();for(var m=[],T=y.next();T.done===!1;)m.push(T.value),T=y.next();return m},i=b(n(document.fonts)),r=i.next();!r.done;r=i.next())if(l=r.value,l.family==e&&l.display=="swap")return f.return();c=new FontFace(e,"url("+t+")",{display:"swap"}),document.fonts.add(c),se(f)})};function xy(e,t,n,i){i=i===void 0?e:i,e=new Map().set("detail",{schemeIdUri:n.schemeIdUri,value:n.value,startTime:n.startTime,endTime:n.endTime,id:n.id,timescale:n.timescale,eventElement:n.eventElement,eventNode:n.eventNode}),i.dispatchEvent(g(t,e))}function dw(e,t,n,i){i=i===void 0?!1:i,t=new Map().set("mediaQuality",{bandwidth:t.bandwidth,audioSamplingRate:t.audioSamplingRate,codecs:t.codecs,contentType:t.contentType,frameRate:t.frameRate,height:t.height,mimeType:t.mimeType,channelsCount:t.channelsCount,pixelAspectRatio:t.pixelAspectRatio,width:t.width,label:t.label,roles:t.roles,language:t.language}).set("position",n),e.dispatchEvent(g(i?"audiotrackchanged":"mediaqualitychanged",t))}function d1(e,t){if(t=t===void 0?!0:t,!e.h.error)return t?new Y(2,3,3016):null;var n=e.h.error.code;return!t&&n==1?null:((t=e.h.error.msExtendedCode)&&(0>t&&(t+=Math.pow(2,32)),t=t.toString(16)),new Y(2,3,3016,n,t,e.h.error.message))}function p1(e,t,n){0<t&&(e.U()||e.Bh(t)),t=e.getDuration(),n<t&&(e.U()||e.bb(n))}function Lf(e,t){z(function(n){if(n.g==1)return _(n,Promise.resolve(),2);e.m!=al&&e.dispatchEvent(t),se(n)})}function pw(e){var t=new Set;e=b(e);for(var n=e.next();!n.done;n=e.next())n=n.value,n.language?t.add(It(n.language)):t.add("und");return t}function hw(e){var t=new Map,n=new Map;e=b(e);for(var i=e.next();!i.done;i=e.next()){i=i.value;var r="und",l=[];i.language&&(r=It(i.language)),i.type=="variant"?l=i.audioRoles:l=i.roles,l&&l.length||(l=[""]),t.has(r)||t.set(r,new Set),l=b(l);for(var c=l.next();!c.done;c=l.next())c=c.value,t.get(r).add(c),i.label&&(n.has(r)||n.set(r,new Map),n.get(r).set(c,i.label))}var f=[];return t.forEach(function(y,m){y=b(y);for(var T=y.next();!T.done;T=y.next()){T=T.value;var x=null;n.has(m)&&n.get(m).has(T)&&(x=n.get(m).get(T)),f.push({language:m,role:T,label:x})}}),f}h.Pa=function(){return this.h&&this.h.remote?this.h.remote.state!="disconnected":!1},h.Uc=function(){return!this.h||this.h.ended?!0:this.sa&&!this.U()&&this.h.currentTime>=this.Ra().end},Pe("shaka.Player",o),o.prototype.isEnded=o.prototype.Uc,o.prototype.isRemotePlayback=o.prototype.Pa,o.prototype.addFont=o.prototype.addFont,o.prototype.setVideoContainer=o.prototype.Ch,o.prototype.getFetchedPlaybackInfo=o.prototype.ni,o.prototype.getManifestParserFactory=o.prototype.ui,o.prototype.getManifest=o.prototype.Hf,o.prototype.retryStreaming=o.prototype.eg,o.prototype.setMaxHardwareResolution=o.prototype.Dj,o.prototype.addChaptersTrack=o.prototype.Qh,o.prototype.addThumbnailsTrack=o.prototype.Sh,o.prototype.addTextTrackAsync=o.prototype.Rh,o.prototype.getStats=o.prototype.getStats,o.prototype.getBufferedInfo=o.prototype.Fb,o.prototype.getSegmentAvailabilityDuration=o.prototype.ae,o.prototype.getPresentationStartTimeAsDate=o.prototype.Wg,o.prototype.getPlayheadTimeAsDate=o.prototype.yi,o.prototype.setTextTrackVisibility=o.prototype.zh,o.prototype.getChapters=o.prototype.ji,o.prototype.getChaptersTracks=o.prototype.Rg,o.prototype.isTextTrackVisible=o.prototype.Pf,o.prototype.selectVariantsByLabel=o.prototype.yj,o.prototype.selectTextLanguage=o.prototype.hg,o.prototype.selectAudioLanguage=o.prototype.sh,o.prototype.getTextLanguages=o.prototype.Ei,o.prototype.getAudioLanguages=o.prototype.gi,o.prototype.getTextLanguagesAndRoles=o.prototype.Fi,o.prototype.getAudioLanguagesAndRoles=o.prototype.hi,o.prototype.getAudioTracks=o.prototype.getAudioTracks,o.prototype.selectAudioTrack=o.prototype.xj,o.prototype.selectVariantTrack=o.prototype.Be,o.prototype.selectTextTrack=o.prototype.th,o.prototype.getThumbnails=o.prototype.Hi,o.prototype.getAllThumbnails=o.prototype.fi,o.prototype.getImageTracks=o.prototype.pi,o.prototype.getTextTracks=o.prototype.vc,o.prototype.getVariantTracks=o.prototype.Rb,o.prototype.cancelTrickPlay=o.prototype.gd,o.prototype.trickPlay=o.prototype.Md,o.prototype.getPlaybackRate=o.prototype.gb,o.prototype.isBuffering=o.prototype.Of,o.prototype.getKeyStatuses=o.prototype.Yd,o.prototype.getActiveSessionsMetadata=o.prototype.Gf,o.prototype.getExpiration=o.prototype.pd,o.prototype.drmInfo=o.prototype.drmInfo,o.prototype.keySystem=o.prototype.keySystem,o.prototype.isFullyLoaded=o.prototype.Ri,o.prototype.goToLive=o.prototype.Ni,o.prototype.seekRange=o.prototype.Ra,o.prototype.isAudioOnly=o.prototype.Qi,o.prototype.isInProgress=o.prototype.yc,o.prototype.isLive=o.prototype.U,o.prototype.getAdManager=o.prototype.Pg,o.prototype.getAssetUri=o.prototype.Qc,o.prototype.getNetworkingEngine=o.prototype.xb,o.prototype.getMediaElement=o.prototype.xi,o.prototype.getManifestType=o.prototype.Tg,o.prototype.getLoadMode=o.prototype.ti,o.prototype.resetConfiguration=o.prototype.sj,o.prototype.getBufferFullness=o.prototype.Qg,o.prototype.getNonDefaultConfiguration=o.prototype.Vg,o.prototype.getConfigurationForLowLatency=o.prototype.ki,o.prototype.getConfiguration=o.prototype.getConfiguration,o.prototype.configurationForLowLatency=o.prototype.ci,o.prototype.configure=o.prototype.configure,o.prototype.releaseAllMutexes=o.prototype.oj,o.prototype.destroyAllPreloads=o.prototype.pf,o.prototype.preload=o.prototype.preload,o.prototype.detachAndSavePreload=o.prototype.Lg,o.prototype.unloadAndSavePreload=o.prototype.Gj,o.prototype.load=o.prototype.load,o.prototype.updateStartTime=o.prototype.Kj,o.prototype.unload=o.prototype.kc,o.prototype.detach=o.prototype.detach,o.prototype.attachCanvas=o.prototype.Vh,o.prototype.attach=o.prototype.Lb,o.probeSupport=function(e){e=e===void 0?!0:e;var t,n,i,r,l,c;return z(function(f){switch(f.g){case 1:if(t={},!e){f.s(2);break}return _(f,Wg(),3);case 3:t=f.h;case 2:return n=Ls(),i=ym(),_(f,Ka(),4);case 4:return r=f.h,l={manifest:n,media:i,drm:t,hardwareResolution:r},c=gw,c.forEach(function(y,m){l[m]=y()}),f.return(l)}})},o.isBrowserSupported=function(){return w.Promise||bt("A Promise implementation or polyfill is required"),w.Promise&&w.Uint8Array&&Array.prototype.forEach&&!zt("Trident/")?oo()?!0:Dc("application/x-mpegurl"):!1},o.setAdManagerFactory=function(e){Wm=e},o.registerSupportPlugin=C,o.prototype.destroy=o.prototype.destroy;var al=0,Ym=1,Vi=2,zr=3;o.LoadMode={DESTROYED:al,NOT_LOADED:Ym,MEDIA_SOURCE:Vi,SRC_EQUALS:zr},o.version="v4.14.9";var yw=["4","14"];Tc=new function(e){this.g=e,this.i=Wf,this.h=ja}(new Hp(Number(yw[0]),Number(yw[1])));var gw=new Map,Wm=null;function mw(){this.g=[],this.i=this.m=this.l=this.j=this.h=0}function Pb(e){return e.g.length?e.g.reduce(function(t,n){return t+n},0)/e.g.length:0}function Xe(e,t,n){var i=this;this.g=e,this.h=t,this.j=n,this.i=!1,this.l=this.h.getVolume(),this.m=new vt,this.m.D(this.h,google.ima.AdEvent.Type.PAUSED,function(){i.i=!0}),this.m.D(this.h,google.ima.AdEvent.Type.RESUMED,function(){i.i=!1})}h=Xe.prototype,h.needsSkipUI=function(){return!1},h.isClientRendering=function(){return!0},h.hasCustomClick=function(){return!0},h.isUsingAnotherMediaElement=function(){return!0},h.getDuration=function(){return this.g.getDuration()},h.getMinSuggestedDuration=function(){return this.g.getMinSuggestedDuration()},h.getRemainingTime=function(){return this.h.getRemainingTime()},h.isPaused=function(){return this.i},h.isSkippable=function(){return 0<=this.g.getSkipTimeOffset()},h.getTimeUntilSkippable=function(){var e=this.g.getSkipTimeOffset();return e=this.getRemainingTime()-e,Math.max(e,0)},h.canSkipNow=function(){return this.h.getAdSkippableState()},h.skip=function(){return this.h.skip()},h.pause=function(){return this.h.pause()},h.play=function(){return this.h.resume()},h.getVolume=function(){return this.h.getVolume()},h.setVolume=function(e){return this.j.volume=e,this.h.setVolume(e)},h.isMuted=function(){return this.h.getVolume()==0},h.isLinear=function(){return this.g.isLinear()},h.resize=function(e,t){var n=!1,i=this.j;document.fullscreenEnabled?n=!!document.fullscreenElement:i.webkitSupportsFullscreen&&(n=i.webkitDisplayingFullscreen),this.h.resize(e,t,n?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)},h.setMuted=function(e){(this.j.muted=e)?(this.l=this.getVolume(),this.h.setVolume(0)):this.h.setVolume(this.l)},h.getSequenceLength=function(){var e=this.g.getAdPodInfo();return e==null?1:e.getTotalAds()},h.getPositionInSequence=function(){var e=this.g.getAdPodInfo();return e==null?1:e.getAdPosition()},h.getTitle=function(){return this.g.getTitle()},h.getDescription=function(){return this.g.getDescription()},h.getVastMediaBitrate=function(){return this.g.getVastMediaBitrate()},h.getVastMediaHeight=function(){return this.g.getVastMediaHeight()},h.getVastMediaWidth=function(){return this.g.getVastMediaWidth()},h.getAdId=function(){return this.g.getAdId()},h.getCreativeAdId=function(){return this.g.getCreativeAdId()},h.getAdvertiserName=function(){return this.g.getAdvertiserName()},h.getMediaUrl=function(){return this.g.getMediaUrl()},h.getTimeOffset=function(){var e=this.g.getAdPodInfo();return e==null?0:e.getTimeOffset()},h.getPodIndex=function(){var e=this.g.getAdPodInfo();return e==null?0:e.getPodIndex()},h.release=function(){this.h=this.g=null},Pe("shaka.ads.ClientSideAd",Xe),Xe.prototype.release=Xe.prototype.release,Xe.prototype.getPodIndex=Xe.prototype.getPodIndex,Xe.prototype.getTimeOffset=Xe.prototype.getTimeOffset,Xe.prototype.getMediaUrl=Xe.prototype.getMediaUrl,Xe.prototype.getAdvertiserName=Xe.prototype.getAdvertiserName,Xe.prototype.getCreativeAdId=Xe.prototype.getCreativeAdId,Xe.prototype.getAdId=Xe.prototype.getAdId,Xe.prototype.getVastMediaWidth=Xe.prototype.getVastMediaWidth,Xe.prototype.getVastMediaHeight=Xe.prototype.getVastMediaHeight,Xe.prototype.getVastMediaBitrate=Xe.prototype.getVastMediaBitrate,Xe.prototype.getDescription=Xe.prototype.getDescription,Xe.prototype.getTitle=Xe.prototype.getTitle,Xe.prototype.getPositionInSequence=Xe.prototype.getPositionInSequence,Xe.prototype.getSequenceLength=Xe.prototype.getSequenceLength,Xe.prototype.setMuted=Xe.prototype.setMuted,Xe.prototype.resize=Xe.prototype.resize,Xe.prototype.isLinear=Xe.prototype.isLinear,Xe.prototype.isMuted=Xe.prototype.isMuted,Xe.prototype.setVolume=Xe.prototype.setVolume,Xe.prototype.getVolume=Xe.prototype.getVolume,Xe.prototype.play=Xe.prototype.play,Xe.prototype.pause=Xe.prototype.pause,Xe.prototype.skip=Xe.prototype.skip,Xe.prototype.canSkipNow=Xe.prototype.canSkipNow,Xe.prototype.getTimeUntilSkippable=Xe.prototype.getTimeUntilSkippable,Xe.prototype.isSkippable=Xe.prototype.isSkippable,Xe.prototype.isPaused=Xe.prototype.isPaused,Xe.prototype.getRemainingTime=Xe.prototype.getRemainingTime,Xe.prototype.getMinSuggestedDuration=Xe.prototype.getMinSuggestedDuration,Xe.prototype.getDuration=Xe.prototype.getDuration,Xe.prototype.isUsingAnotherMediaElement=Xe.prototype.isUsingAnotherMediaElement,Xe.prototype.hasCustomClick=Xe.prototype.hasCustomClick,Xe.prototype.isClientRendering=Xe.prototype.isClientRendering,Xe.prototype.needsSkipUI=Xe.prototype.needsSkipUI;function un(){}function vw(e,t){var n=[];e=b(Lt(e,"Ad"));for(var i=e.next();!i.done;i=e.next())if((i=An(i.value,"InLine"))&&(i=An(i,"Creatives"))){i=b(Lt(i,"Creative"));for(var r=i.next();!r.done;r=i.next()){r=r.value;var l=An(r,"Linear");if(l&&Lb(n,t,l),r=An(r,"NonLinearAds")){r=Lt(r,"NonLinear"),r=b(r);for(var c=r.next();!c.done;c=r.next())e:{l=n;var f=t,y=c.value,m=An(y,"StaticResource");if(m)c=m.attributes.creativeType;else{if(m=An(y,"HTMLResource"),!m)break e;c="text/html"}if(m=Xi(m)){c==="text/html"&&(m="data:text/html;charset=UTF-8,"+encodeURIComponent(m));var T=Ge(y,"width",Zn)||Ge(y,"expandedWidth",Zn),x=Ge(y,"height",Zn)||Ge(y,"expandedHeight",Zn);if(T||x){var D=null;(y=y.attributes.minSuggestedDuration)&&(D=fs(y)),y=0,f!=null&&(y=f),l.push({id:null,groupId:null,startTime:y,endTime:null,uri:m,mimeType:c,isSkippable:!1,skipOffset:null,skipFor:null,canJump:!1,resumeOffset:0,playoutLimit:D,once:!0,pre:f==null,post:f==1/0,timelineRange:!1,loop:!1,overlay:{viewport:{x:0,y:0},topLeft:{x:0,y:0},size:{x:T||0,y:x||0}},displayOnBackground:!1,currentVideo:null,background:null})}}}}}}return n}function Lb(e,t,n){var i=0;t!=null&&(i=t);var r=null;if(n.attributes.skipoffset&&(r=fs(n.attributes.skipoffset),isNaN(r)&&(r=null)),n=An(n,"MediaFiles")){var l=Lt(n,"MediaFile");for(n=l,l=l.filter(function(f){return f.attributes.delivery=="streaming"}),l.length&&(n=l),n=n.sort(function(f,y){return(parseInt(y.attributes.height,10)||0)-(parseInt(f.attributes.height,10)||0)}),n=b(n),l=n.next();!l.done;l=n.next())if(l=l.value,!l.attributes.apiFramework){var c=Xi(l);if(c){e.push({id:null,groupId:null,startTime:i,endTime:null,uri:c,mimeType:l.attributes.type||null,isSkippable:r!=null,skipOffset:r,skipFor:null,canJump:!1,resumeOffset:0,playoutLimit:null,once:!0,pre:t==null,post:t==1/0,timelineRange:!1,loop:!1,overlay:null,displayOnBackground:!1,currentVideo:null,background:null});break}}}}Pe("shaka.ads.Utils",un),un.ADS_LOADED="ads-loaded",un.AD_STARTED="ad-started",un.AD_FIRST_QUARTILE="ad-first-quartile",un.AD_MIDPOINT="ad-midpoint",un.AD_THIRD_QUARTILE="ad-third-quartile",un.AD_COMPLETE="ad-complete",un.AD_STOPPED="ad-stopped",un.AD_SKIPPED="ad-skipped",un.AD_VOLUME_CHANGED="ad-volume-changed",un.AD_MUTED="ad-muted",un.AD_PAUSED="ad-paused",un.AD_RESUMED="ad-resumed",un.AD_SKIP_STATE_CHANGED="ad-skip-state-changed",un.CUEPOINTS_CHANGED="ad-cue-points-changed",un.IMA_AD_MANAGER_LOADED="ima-ad-manager-loaded",un.IMA_STREAM_MANAGER_LOADED="ima-stream-manager-loaded",un.AD_CLICKED="ad-clicked",un.AD_PROGRESS="ad-progress",un.AD_BUFFERING="ad-buffering",un.AD_IMPRESSION="ad-impression",un.AD_DURATION_CHANGED="ad-duration-changed",un.AD_CLOSED="ad-closed",un.AD_LOADED="ad-loaded",un.ALL_ADS_COMPLETED="all-ads-completed",un.AD_LINEAR_CHANGED="ad-linear-changed",un.AD_METADATA="ad-metadata",un.AD_RECOVERABLE_ERROR="ad-recoverable-error",un.AD_ERROR="ad-error",un.AD_BREAK_READY="ad-break-ready",un.AD_INTERACTION="ad-interaction",un.AD_CONTENT_PAUSE_REQUESTED="ad-content-pause-requested",un.AD_CONTENT_RESUME_REQUESTED="ad-content-resume-requested",un.AD_CONTENT_ATTACH_REQUESTED="ad-content-attach-requested";function Qm(e,t,n,i,r){var l=this;this.u=e,this.i=t,this.F=!1,this.A=this.o=null,this.G=NaN,this.l=r,this.j=null,this.h=new vt,google.ima.settings.setLocale(n),google.ima.settings.setDisableCustomPlaybackForIOS10Plus(!0),this.C=new google.ima.AdDisplayContainer(this.u,this.i),this.C.initialize(),this.m=new google.ima.AdsLoader(this.C),this.m.getSettings().setPlayerType("shaka-player"),this.m.getSettings().setPlayerVersion("v4.14.9"),this.g=null,this.B=i||new google.ima.AdsRenderingSettings,this.h.D(this.m,google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,function(c){_b(l,c)}),this.h.D(this.m,google.ima.AdErrorEvent.Type.AD_ERROR,function(c){Sw(l,c)}),this.h.D(this.i,"ended",function(){l.m.contentComplete()}),this.h.ma(this.i,"play",function(){l.F=!0})}Qm.prototype.configure=function(e){this.o=e},Qm.prototype.stop=function(){this.g&&this.g.stop(),this.u&&_i(this.u)},Qm.prototype.release=function(){this.stop(),this.A&&this.A.disconnect(),this.h&&this.h.release(),this.g&&this.g.destroy(),this.m.destroy(),this.C.destroy()};function Sw(e,t){t.getError(),t=new Map().set("originalEvent",t),e.l(new ke("ad-error",t)),Zm(e,null),e.l(new ke("ad-cue-points-changed",new Map().set("cuepoints",[])))}function _b(e,t){if(e.l(new ke("ads-loaded",new Map().set("loadTime",Date.now()/1e3-e.G))),e.o.customPlayheadTracker){var n={currentTime:e.i.currentTime};e.g=t.getAdsManager(n,e.B),e.i.muted?e.g.setVolume(0):e.g.setVolume(e.i.volume),e.h.D(e.i,"timeupdate",function(){e.i.duration&&(n.currentTime=e.i.currentTime)}),e.h.D(e.i,"volumechange",function(){e.j&&(e.j.setVolume(e.i.volume),e.i.muted&&e.j.setMuted(!0))})}else e.g=t.getAdsManager(e.i,e.B);e.l(new ke("ima-ad-manager-loaded",new Map().set("imaAdManager",e.g)));var i=e.g.getCuePoints();if(i.length){t=[],i=b(i);for(var r=i.next();!r.done;r=i.next())t.push({start:r.value,end:null});e.l(new ke("ad-cue-points-changed",new Map().set("cuepoints",t)))}Ub(e);try{e.g.init(e.i.offsetWidth,e.i.offsetHeight,Jm(e)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL),e.h.D(e.i,"loadeddata",function(){e.g.resize(e.i.offsetWidth,e.i.offsetHeight,Jm(e)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),"ResizeObserver"in w?(e.A=new ResizeObserver(function(){e.g.resize(e.i.offsetWidth,e.i.offsetHeight,Jm(e)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),e.A.observe(e.i)):e.h.D(document,"fullscreenchange",function(){e.g.resize(e.i.offsetWidth,e.i.offsetHeight,Jm(e)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),e.F||e.o.skipPlayDetection?e.g.start():e.h.ma(e.i,"play",function(){e.F=!0,e.g.start()})}catch{Zm(e,null)}}function Jm(e){return document.fullscreenEnabled?!!document.fullscreenElement:(e=e.i,e.webkitSupportsFullscreen?e.webkitDisplayingFullscreen:!1)}function Ub(e){function t(n,i){n=new Map().set("originalEvent",n),e.l(new ke(i,n))}e.h.D(e.g,google.ima.AdErrorEvent.Type.AD_ERROR,function(n){Sw(e,n)}),e.h.D(e.g,google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED,function(n){ww(e,n)}),e.h.D(e.g,google.ima.AdEvent.Type.STARTED,function(n){ww(e,n)}),e.h.D(e.g,google.ima.AdEvent.Type.FIRST_QUARTILE,function(n){t(n,"ad-first-quartile")}),e.h.D(e.g,google.ima.AdEvent.Type.MIDPOINT,function(n){t(n,"ad-midpoint")}),e.h.D(e.g,google.ima.AdEvent.Type.THIRD_QUARTILE,function(n){t(n,"ad-third-quartile")}),e.h.D(e.g,google.ima.AdEvent.Type.COMPLETE,function(n){t(n,"ad-complete")}),e.h.D(e.g,google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED,function(n){Zm(e,n)}),e.h.D(e.g,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,function(n){Zm(e,n)}),e.h.D(e.g,google.ima.AdEvent.Type.SKIPPED,function(n){t(n,"ad-skipped")}),e.h.D(e.g,google.ima.AdEvent.Type.VOLUME_CHANGED,function(n){t(n,"ad-volume-changed")}),e.h.D(e.g,google.ima.AdEvent.Type.VOLUME_MUTED,function(n){t(n,"ad-muted")}),e.h.D(e.g,google.ima.AdEvent.Type.PAUSED,function(n){e.j&&(e.j.i=!0,t(n,"ad-paused"))}),e.h.D(e.g,google.ima.AdEvent.Type.RESUMED,function(n){e.j&&(e.j.i=!1,t(n,"ad-resumed"))}),e.h.D(e.g,google.ima.AdEvent.Type.SKIPPABLE_STATE_CHANGED,function(n){e.j&&t(n,"ad-skip-state-changed")}),e.h.D(e.g,google.ima.AdEvent.Type.CLICK,function(n){t(n,"ad-clicked")}),e.h.D(e.g,google.ima.AdEvent.Type.AD_PROGRESS,function(n){t(n,"ad-progress")}),e.h.D(e.g,google.ima.AdEvent.Type.AD_BUFFERING,function(n){t(n,"ad-buffering")}),e.h.D(e.g,google.ima.AdEvent.Type.IMPRESSION,function(n){t(n,"ad-impression")}),e.h.D(e.g,google.ima.AdEvent.Type.DURATION_CHANGE,function(n){t(n,"ad-duration-changed")}),e.h.D(e.g,google.ima.AdEvent.Type.USER_CLOSE,function(n){t(n,"ad-closed")}),e.h.D(e.g,google.ima.AdEvent.Type.LOADED,function(n){t(n,"ad-loaded")}),e.h.D(e.g,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,function(n){t(n,"all-ads-completed")}),e.h.D(e.g,google.ima.AdEvent.Type.LINEAR_CHANGED,function(n){t(n,"ad-linear-changed")}),e.h.D(e.g,google.ima.AdEvent.Type.AD_METADATA,function(n){t(n,"ad-metadata")}),e.h.D(e.g,google.ima.AdEvent.Type.LOG,function(n){t(n,"ad-recoverable-error")}),e.h.D(e.g,google.ima.AdEvent.Type.AD_BREAK_READY,function(n){t(n,"ad-break-ready")}),e.h.D(e.g,google.ima.AdEvent.Type.INTERACTION,function(n){t(n,"ad-interaction")})}function ww(e,t){var n=t.getAd();n?(e.j=new Xe(n,e.g,e.i),t.type!=google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED||e.o.supportsMultipleMediaElements||e.l(new ke("ad-content-pause-requested")),t=new Map().set("ad",e.j).set("sdkAdObject",n).set("originalEvent",t),e.l(new ke("ad-started",t)),e.j.isLinear()&&(e.u.setAttribute("ad-active","true"),e.o.customPlayheadTracker||e.i.pause(),e.i.muted?(t=e.j,t.l=e.i.volume,t.h.setVolume(0)):e.j.setVolume(e.i.volume))):bt("The IMA SDK fired a "+t.type+" event with no associated ad. Unable to play ad!")}function Zm(e,t){t&&t.type==google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED&&!e.o.supportsMultipleMediaElements&&e.l(new ke("ad-content-resume-requested")),e.l(new ke("ad-stopped",new Map().set("originalEvent",t))),e.j&&e.j.isLinear()&&(e.u.removeAttribute("ad-active"),e.o.customPlayheadTracker||e.i.ended||e.i.play())}function Ye(e,t,n,i,r,l){this.g=e,this.i=t,this.j=(this.h=t.isSkippable)?t.skipOffset||0:t.skipOffset,this.l=t.skipFor,this.A=n,this.o=i,this.m=r,this.u=l,this.B=t.overlay}h=Ye.prototype,h.needsSkipUI=function(){return!0},h.isClientRendering=function(){return!0},h.hasCustomClick=function(){return!1},h.isUsingAnotherMediaElement=function(){return this.u},h.getDuration=function(){var e=this.g.duration;return isNaN(e)?-1:e},h.getMinSuggestedDuration=function(){return this.getDuration()},h.getRemainingTime=function(){var e=this.g.duration;return isNaN(e)?-1:e-this.g.currentTime},h.isPaused=function(){return this.g.paused},h.isSkippable=function(){return this.h&&this.l!=null?this.getDuration()-this.getRemainingTime()<this.j+this.l:this.h},h.getTimeUntilSkippable=function(){if(this.isSkippable()){var e=this.getRemainingTime()+this.j-this.getDuration();return Math.max(e,0)}return Math.max(this.getRemainingTime(),0)},h.canSkipNow=function(){return this.h&&this.getTimeUntilSkippable()==0},h.skip=function(){this.canSkipNow()&&this.A()},h.pause=function(){return this.g.pause()},h.play=function(){return this.g.play()},h.getVolume=function(){return this.g.volume},h.setVolume=function(e){this.g.volume=e},h.isMuted=function(){return this.g.muted},h.isLinear=function(){return this.B==null},h.resize=function(){},h.setMuted=function(e){this.g.muted=e},h.getSequenceLength=function(){return this.o},h.getPositionInSequence=function(){return this.m},h.getTitle=function(){return""},h.getDescription=function(){return""},h.getVastMediaBitrate=function(){return 0},h.getVastMediaHeight=function(){return 0},h.getVastMediaWidth=function(){return 0},h.getAdId=function(){return this.i.id||""},h.getCreativeAdId=function(){return""},h.getAdvertiserName=function(){return""},h.getMediaUrl=function(){return this.i.uri},h.getTimeOffset=function(){return 0},h.getPodIndex=function(){return 0},h.release=function(){this.g=null},Pe("shaka.ads.InterstitialAd",Ye),Ye.prototype.release=Ye.prototype.release,Ye.prototype.getPodIndex=Ye.prototype.getPodIndex,Ye.prototype.getTimeOffset=Ye.prototype.getTimeOffset,Ye.prototype.getMediaUrl=Ye.prototype.getMediaUrl,Ye.prototype.getAdvertiserName=Ye.prototype.getAdvertiserName,Ye.prototype.getCreativeAdId=Ye.prototype.getCreativeAdId,Ye.prototype.getAdId=Ye.prototype.getAdId,Ye.prototype.getVastMediaWidth=Ye.prototype.getVastMediaWidth,Ye.prototype.getVastMediaHeight=Ye.prototype.getVastMediaHeight,Ye.prototype.getVastMediaBitrate=Ye.prototype.getVastMediaBitrate,Ye.prototype.getDescription=Ye.prototype.getDescription,Ye.prototype.getTitle=Ye.prototype.getTitle,Ye.prototype.getPositionInSequence=Ye.prototype.getPositionInSequence,Ye.prototype.getSequenceLength=Ye.prototype.getSequenceLength,Ye.prototype.setMuted=Ye.prototype.setMuted,Ye.prototype.resize=Ye.prototype.resize,Ye.prototype.isLinear=Ye.prototype.isLinear,Ye.prototype.isMuted=Ye.prototype.isMuted,Ye.prototype.setVolume=Ye.prototype.setVolume,Ye.prototype.getVolume=Ye.prototype.getVolume,Ye.prototype.play=Ye.prototype.play,Ye.prototype.pause=Ye.prototype.pause,Ye.prototype.skip=Ye.prototype.skip,Ye.prototype.canSkipNow=Ye.prototype.canSkipNow,Ye.prototype.getTimeUntilSkippable=Ye.prototype.getTimeUntilSkippable,Ye.prototype.isSkippable=Ye.prototype.isSkippable,Ye.prototype.isPaused=Ye.prototype.isPaused,Ye.prototype.getRemainingTime=Ye.prototype.getRemainingTime,Ye.prototype.getMinSuggestedDuration=Ye.prototype.getMinSuggestedDuration,Ye.prototype.getDuration=Ye.prototype.getDuration,Ye.prototype.isUsingAnotherMediaElement=Ye.prototype.isUsingAnotherMediaElement,Ye.prototype.hasCustomClick=Ye.prototype.hasCustomClick,Ye.prototype.isClientRendering=Ye.prototype.isClientRendering,Ye.prototype.needsSkipUI=Ye.prototype.needsSkipUI;function We(e,t,n){this.g=e,this.j=t,this.h=n,this.i=e.overlay==null}h=We.prototype,h.needsSkipUI=function(){return!0},h.isClientRendering=function(){return!0},h.hasCustomClick=function(){return!1},h.isUsingAnotherMediaElement=function(){return!1},h.getDuration=function(){return-1},h.getMinSuggestedDuration=function(){return this.getDuration()},h.getRemainingTime=function(){return-1},h.isPaused=function(){return!1},h.isSkippable=function(){return!1},h.getTimeUntilSkippable=function(){return 0},h.canSkipNow=function(){return!1},h.skip=function(){},h.pause=function(){},h.play=function(){},h.getVolume=function(){return 1},h.setVolume=function(){},h.isMuted=function(){return!1},h.isLinear=function(){return this.i},h.resize=function(){},h.setMuted=function(){},h.getSequenceLength=function(){return this.j},h.getPositionInSequence=function(){return this.h},h.getTitle=function(){return""},h.getDescription=function(){return""},h.getVastMediaBitrate=function(){return 0},h.getVastMediaHeight=function(){return 0},h.getVastMediaWidth=function(){return 0},h.getAdId=function(){return this.g.id||""},h.getCreativeAdId=function(){return""},h.getAdvertiserName=function(){return""},h.getMediaUrl=function(){return this.g.uri},h.getTimeOffset=function(){return 0},h.getPodIndex=function(){return 0},h.release=function(){},Pe("shaka.ads.InterstitialStaticAd",We),We.prototype.release=We.prototype.release,We.prototype.getPodIndex=We.prototype.getPodIndex,We.prototype.getTimeOffset=We.prototype.getTimeOffset,We.prototype.getMediaUrl=We.prototype.getMediaUrl,We.prototype.getAdvertiserName=We.prototype.getAdvertiserName,We.prototype.getCreativeAdId=We.prototype.getCreativeAdId,We.prototype.getAdId=We.prototype.getAdId,We.prototype.getVastMediaWidth=We.prototype.getVastMediaWidth,We.prototype.getVastMediaHeight=We.prototype.getVastMediaHeight,We.prototype.getVastMediaBitrate=We.prototype.getVastMediaBitrate,We.prototype.getDescription=We.prototype.getDescription,We.prototype.getTitle=We.prototype.getTitle,We.prototype.getPositionInSequence=We.prototype.getPositionInSequence,We.prototype.getSequenceLength=We.prototype.getSequenceLength,We.prototype.setMuted=We.prototype.setMuted,We.prototype.resize=We.prototype.resize,We.prototype.isLinear=We.prototype.isLinear,We.prototype.isMuted=We.prototype.isMuted,We.prototype.setVolume=We.prototype.setVolume,We.prototype.getVolume=We.prototype.getVolume,We.prototype.play=We.prototype.play,We.prototype.pause=We.prototype.pause,We.prototype.skip=We.prototype.skip,We.prototype.canSkipNow=We.prototype.canSkipNow,We.prototype.getTimeUntilSkippable=We.prototype.getTimeUntilSkippable,We.prototype.isSkippable=We.prototype.isSkippable,We.prototype.isPaused=We.prototype.isPaused,We.prototype.getRemainingTime=We.prototype.getRemainingTime,We.prototype.getMinSuggestedDuration=We.prototype.getMinSuggestedDuration,We.prototype.getDuration=We.prototype.getDuration,We.prototype.isUsingAnotherMediaElement=We.prototype.isUsingAnotherMediaElement,We.prototype.hasCustomClick=We.prototype.hasCustomClick,We.prototype.isClientRendering=We.prototype.isClientRendering,We.prototype.needsSkipUI=We.prototype.needsSkipUI;function Tw(e,t,n,i){var r=this;this.T=null,this.A=e,this.H=t,this.g=n,this.F=null,this.B=!0,this.h=this.g,this.i=i,this.W=new Set,this.G=new Set,this.C=new Map,this.L=new Map,this.j=new o,m1(this),this.I=new vt,this.l=new vt,this.K=!1,this.ea=this.m=this.u=this.o=null,this.fa=!1,this.O=-1,this.$=function(){if(!r.K&&r.o&&!r.H.Pa()){r.o=r.g.currentTime,r.u&&!r.u.pre&&!r.u.post&&r.o<r.u.startTime&&(r.u=null);var l=Ay(r);l&&$m(r,l,1,1,Date.now())}},this.Z=function(){if(!(r.K||r.o||r.H.Pa())){r.o=r.g.currentTime;var l=Ay(r,!0);l&&$m(r,l,1,1,Date.now())}},this.P=new dt(this.$),this.M=new dt(function(){var l,c,f,y,m,T,x,D,R,N,U;return z(function(L){switch(L.g){case 1:if(!r.G.size||r.o==null){L.s(0);break}if(l=r.H.m,l==al||l==Ym)return L.return();c=!1,f=Array.from(r.G),y=r.H.Ra(),m=b(f),T=m.next();case 3:if(T.done){L.s(5);break}if(x=T.value,x==r.u){L.s(4);break}if(D=x.endTime||x.startTime,!(1<=y.start-D)){R=x.startTime-r.o,0<R&&10>=R&&(!r.C.has(x)&&Ew(x)&&r.C.set(x,r.j.preload(x.uri,null,x.mimeType||void 0)),Aw(r,x)),L.s(4);break}if(!r.C.has(x)){L.s(7);break}return _(L,r.C.get(x),8);case 8:(N=L.h)&&N.destroy(),r.C.delete(x);case 7:Cw(r,x),U=JSON.stringify(x),r.W.has(U)&&r.W.delete(U),r.G.delete(x),h1(r),x.overlay||(c=!0);case 4:T=m.next(),L.s(3);break;case 5:c&&ev(r),se(L)}})})}h=Tw.prototype,h.configure=function(e){this.T=e,y1(this)};function jb(e){if(!e.fa&&e.G.size){if(e.I.D(e.g,"playing",e.Z),e.I.D(e.g,"timeupdate",e.Z),e.I.D(e.g,"ended",e.$),"requestVideoFrameCallback"in e.g&&!qp()){var t=e.g,n=function(){e.O!=-1&&(e.$(),e.O!=-1&&(e.O=t.requestVideoFrameCallback(n)))};e.O=t.requestVideoFrameCallback(n)}else e.P.ua(.025);e.M&&e.M.ua(1),e.fa=!0}}function h1(e){e.fa&&!e.G.size&&(e.I.Ja(e.g,"playing",e.Z),e.I.Ja(e.g,"timeupdate",e.Z),e.I.Ja(e.g,"ended",e.$),e.O!=-1&&(e.g.cancelVideoFrameCallback(e.O),e.O=-1),e.P&&e.P.stop(),e.M&&e.M.stop(),e.fa=!1)}function y1(e){if(e.A&&e.T&&!e.K){var t=e.T.supportsMultipleMediaElements,n=e.g;n.webkitSupportsFullscreen&&n.webkitDisplayingFullscreen&&(t=!1),e.B==t&&(e.B=!t,e.B?(e.h=e.g,e.F&&(e.F.parentElement&&e.A.removeChild(e.F),e.F=null)):(e.F||(t=document.createElement(e.g.tagName),t.autoplay=!0,t.style.position="absolute",t.style.top="0",t.style.left="0",t.style.width="100%",t.style.height="100%",t.style.display="none",t.setAttribute("playsinline",""),e.F=t),e.h=e.F))}}h.stop=function(){if(this.l&&this.l.Qa(),this.W.clear(),this.G.clear(),this.j.pf(),this.C.size){var e=Array.from(this.C.values());e=b(e);for(var t=e.next();!t.done;t=e.next())(t=t.value)&&t.then(function(n){n&&n.destroy()})}if(this.C.clear(),this.L.size)for(e=Array.from(this.L.keys()),e=b(e),t=e.next();!t.done;t=e.next())Cw(this,t.value);this.L.clear(),this.j.detach(),this.K=!1,this.u=this.o=null,this.B=!0,this.h=this.g,this.F=null,g1(this),h1(this),this.A&&_i(this.A),this.m&&(this.m.stop(),this.m=null)},h.release=function(){this.stop(),this.I&&this.I.release(),this.l&&this.l.release(),this.P&&(this.P.stop(),this.P=null),this.M&&(this.M.stop(),this.M=null),this.j.destroy()},h.If=function(){return this.j};function Bb(e,t){var n;z(function(i){if(i.g==1)return m1(e),_(i,qb(e,t),2);n=i.h,n.length?Ey(e,n):bt("Unsupported HLS interstitial",t),se(i)})}function Vb(e,t){var n=An(t.eventNode,"OverlayEvent"),i=n.attributes.uri,r=n.attributes.mimeType,l=n.attributes.loop=="true",c=Ge(n,"z",Zn);if(i&&c!=0){var f={viewport:{x:1920,y:1080},topLeft:{x:0,y:0},size:{x:1920,y:1080}},y=An(n,"Viewport"),m=An(n,"TopLeft"),T=An(n,"Size");if(y&&m&&T){if(f=Ge(y,"x",Zn),f==null||(y=Ge(y,"y",Zn),y==null))return;var x=Ge(m,"x",Zn);if(x==null||(m=Ge(m,"y",Zn),m==null))return;var D=Ge(T,"x",Zn);if(D==null||(T=Ge(T,"y",Zn),T==null))return;f={viewport:{x:f,y},topLeft:{x,y:m},size:{x:D,y:T}}}T=An(n,"SqueezeCurrent"),n=null,T&&(T=Ge(T,"percentage",hs))&&(n={viewport:{x:1920,y:1080},topLeft:{x:0,y:0},size:{x:1920*T,y:1080*T}}),Ey(e,[{id:t.id,groupId:null,startTime:t.startTime,endTime:t.endTime,uri:i,mimeType:r,isSkippable:!1,skipOffset:null,skipFor:null,canJump:!0,resumeOffset:null,playoutLimit:null,once:!1,pre:!1,post:!1,timelineRange:!0,loop:l,overlay:f,displayOnBackground:c==-1,currentVideo:n,background:null}])}}h.addAdUrlInterstitial=function(e){var t=this,n,i,r,l,c,f,y,m,T;return z(function(x){switch(x.g){case 1:return n={type:12},_(x,v1(t,e,n),2);case 2:if(i=x.h,r=Mc(i,"VAST,vmap:VMAP"),!r)throw new Y(2,10,10007);if(l=[],r.tagName=="VAST"){l=vw(r,t.o),x.s(3);break}if(r.tagName!="vmap:VMAP"){x.s(3);break}for(var D=[],R=b(Lt(r,"vmap:AdBreak")),N=R.next();!N.done;N=R.next()){var U=N.value,L=U.attributes.timeOffset;L&&(N=null,L=="start"?N=0:L=="end"?N=1/0:N=fs(L),(U=An(U,"vmap:AdSource"))&&(U=An(U,"vmap:AdTagURI"))&&(U=In(U))&&D.push({time:N,uri:U}))}c=b(D),f=c.next();case 5:if(f.done){x.s(3);break}return y=f.value,_(x,v1(t,y.uri,n),8);case 8:if(m=x.h,T=Mc(m,"VAST"),!T)throw new Y(2,10,10007);l.push.apply(l,J(vw(T,y.time))),f=c.next(),x.s(5);break;case 3:Ey(t,l),se(x)}})};function Ey(e,t){var n,i,r,l,c,f,y,m;z(function(T){switch(T.g){case 1:n=!1,i=b(t),r=i.next();case 2:if(r.done){T.s(4);break}if(l=r.value,!l.uri){bt("Missing URL in interstitial",l),T.s(3);break}if(l.mimeType){T.s(5);break}return pe(T,6),c=e.j.xb(),_(T,Co(l.uri,c,e.H.getConfiguration().streaming.retryParameters),8);case 8:l.mimeType=T.h,Ue(T,5);break;case 6:Me(T);case 5:if(f=l.id||JSON.stringify(l),e.W.has(f)){T.s(3);break}l.loop&&!l.overlay&&bt("Loop is only supported in overlay interstitials",l),l.overlay||(n=!0),e.W.add(f),e.G.add(l),y=!1,l.pre&&e.o==null?y=!0:l.startTime!=0||l.canJump?e.o!=null&&(m=l.startTime-e.o,0<m&&10>=m&&(y=!0)):y=!0,y&&(!e.C.has(l)&&Ew(l)&&e.C.set(l,e.j.preload(l.uri,null,l.mimeType||void 0)),Aw(e,l));case 3:r=i.next(),T.s(2);break;case 4:n&&ev(e),jb(e),se(T)}})}function Ay(e,t,n){t=t===void 0?!1:t,n=n===void 0?null:n;var i=0,r=null;if(e.G.size&&e.o!=null){var l=e.g.ended,c=Array.from(e.G).sort(function(T,x){return x.startTime-T.startTime}),f=c;for(f=t?c.filter(function(T){return T.pre}):l?c.filter(function(T){return T.post}):c.filter(function(T){return!T.pre&&!T.post}),c=b(f),f=c.next();!f.done;f=c.next()){f=f.value;var y=!1;if(t)y=f.pre;else if(l)y=f.post;else if(!f.pre&&!f.post){var m=e.o-Math.round(1e3*f.startTime)/1e3;0<m&&(1>=m||!f.canJump)&&(y=!(n==null&&e.u&&!e.u.pre&&!e.u.post&&e.u.startTime>=f.startTime))}y&&(!e.u||f.startTime>=e.u.startTime)&&(i==(n||0)?r=f:r&&!f.canJump&&.001<Math.round(1e3*f.startTime)/1e3-Math.round(1e3*r.startTime)/1e3&&(r=f,i=0),i++)}}return r}function $m(e,t,n,i,r,l){l=l===void 0?0:l,e.u=t,y1(e),!e.h.parentElement&&e.A&&e.A.appendChild(e.h),i==1&&n==1&&(n=Array.from(e.G).filter(function(c){return t.pre?c.pre==t.pre:t.post?c.post==t.post:.001>Math.abs(c.startTime-t.startTime)}).length),t.once&&(l++,e.G.delete(t),h1(e),t.overlay||ev(e)),t.mimeType&&(t.mimeType.startsWith("image/")||t.mimeType==="text/html")?t.overlay?Hb(e,t,n,i,l):bt("Unsupported interstitial",t):e.B&&t.overlay?bt("Unsupported interstitial",t):Kb(e,t,n,i,r,l)}function Hb(e,t,n,i,r){function l(){e.m&&(e.m.stop(),e.m=null),e.A.removeChild(y),g1(e,t),e.i(new ke("ad-stopped"));var D=Ay(e,t.pre,i-r);D?(e.l.Qa(),$m(e,D,n,++i,Date.now(),r)):e.K=!1}var c=t.overlay,f=t.mimeType=="text/html"?"iframe":"img",y=document.createElement(f);y.style.objectFit="contain",y.style.position="absolute",y.style.border="none",xw(e,t),e.i(new ke("ad-started",new Map().set("ad",new We(t,n,i)))),f=="iframe"?y.src=t.uri:(y.src=t.uri,y.onerror=function(D){e.i(new ke("ad-error",new Map().set("originalEvent",D))),l()});var m=c.viewport,T=c.topLeft;c=c.size,m.x==0&&m.y==0?(y.width=t.overlay.size.x,y.height=t.overlay.size.y,y.style.bottom="10%",y.style.left="0",y.style.right="0",y.style.width="100%",t.overlay.size.y||f!="iframe"||(y.style.height="auto")):(y.style.height=c.y/m.y*100+"%",y.style.left=T.x/m.x*100+"%",y.style.top=T.y/m.y*100+"%",y.style.width=c.x/m.x*100+"%"),e.A.appendChild(y);var x=Date.now();e.m&&e.m.stop(),e.m=new dt(function(){t.playoutLimit&&(Date.now()-x)/1e3>t.playoutLimit?(e.i(new ke("ad-complete")),l()):t.endTime&&e.g.currentTime>t.endTime?(e.i(new ke("ad-complete")),l()):e.g.currentTime<t.startTime&&(e.i(new ke("ad-skipped")),l())}),t.playoutLimit&&!t.endTime?e.m.da(t.playoutLimit):t.endTime&&e.m.ua(.025),e.l.D(e.g,"seeked",function(){var D=e.g.currentTime;(D<t.startTime||t.endTime&&D>t.endTime)&&(e.m&&e.m.stop(),e.i(new ke("ad-skipped")),l())})}function Kb(e,t,n,i,r,l){var c,f,y,m,T,x,D,R,N,U,L,j,V,X,G,Z,q;z(function(K){switch(K.g){case 1:if(c=Date.now(),e.K=!0,!e.B||i!=1){K.s(2);break}return e.i(new ke("ad-content-pause-requested",new Map().set("saveLivePosition",!0))),f=new kt,y=function(W){return z(function(Q){if(Q.g==1)return W.state!="detach"?Q.s(0):qp()?_(Q,new Promise(function(oe){return new dt(oe).da(.1)}),3):Q.s(3);f.resolve(),e.l.Ja(e.H,"onstatechange",y),se(Q)})},e.l.D(e.H,"onstatechange",y),_(K,f,2);case 2:return xw(e,t),e.B||(e.h.style.display="",t.overlay?(e.h.loop=t.loop,m=t.overlay.viewport,T=t.overlay.topLeft,x=t.overlay.size,e.h.style.height=x.y/m.y*100+"%",e.h.style.left=T.x/m.x*100+"%",e.h.style.top=T.y/m.y*100+"%",e.h.style.width=x.x/m.x*100+"%"):(e.g.pause(),t.resumeOffset!=null&&t.resumeOffset!=0&&(e.g.currentTime+=t.resumeOffset),e.h.loop=!1,e.h.style.height="100%",e.h.style.left="0",e.h.style.top="0",e.h.style.width="100%")),D=!1,R=function(){if(!e.B&&!t.overlay&&t.resumeOffset==null)if(t.timelineRange&&t.endTime&&t.endTime!=1/0)e.g.currentTime!=t.endTime&&(e.g.currentTime=t.endTime);else{var W=Date.now();e.g.currentTime+=(W-r)/1e3,r=W}},N=function(W){var Q,oe;return z(function(ne){if(ne.g==1){if(R(),Q=Ay(e,t.pre,i-l),W&&t.groupId)for(;Q&&Q.groupId==t.groupId;)i++,Q=Ay(e,t.pre,i-l);return e.m&&(!t.groupId||Q&&Q.groupId!=t.groupId)&&(e.m.stop(),e.m=null),g1(e,t),Q&&!Q.overlay?ne.s(2):(t.post&&(e.o=null,e.u=null),e.B?_(ne,e.j.detach(),4):_(ne,e.j.kc(),4))}ne.g!=2&&(e.B&&(oe=t.resumeOffset,oe==null&&(oe=t.timelineRange&&t.endTime&&t.endTime!=1/0?t.endTime-(e.o||0):(Date.now()-r)/1e3),e.i(new ke("ad-content-resume-requested",new Map().set("offset",oe)))),e.i(new ke("ad-stopped")),e.l.Qa(),e.K=!1,e.B?ev(e):(e.h.style.display="none",R(),e.g.ended||e.g.play())),y1(e),Q&&(e.i(new ke("ad-stopped")),e.l.Qa(),$m(e,Q,n,++i,r,l)),se(ne)})},U=function(W){return z(function(Q){return D?Q.return():(D=!0,e.i(new ke("ad-error",new Map().set("originalEvent",W))),_(Q,N(!1),0))})},L=function(){return z(function(W){if(W.g==1)return D?W.return():(D=!0,_(W,N(!1),2));e.i(new ke("ad-complete")),se(W)})},e.ea=function(){return z(function(W){return D?W.return():(D=!0,e.i(new ke("ad-skipped")),_(W,N(!0),0))})},j=new Ye(e.h,t,e.ea,n,i,!e.B),e.B||(j.setMuted(e.g.muted),j.setVolume(e.g.volume)),e.i(new ke("ad-started",new Map().set("ad",j))),(V=j.canSkipNow())&&e.i(new ke("ad-skip-state-changed")),e.l.ma(e.j,"error",U),e.l.D(e.h,"timeupdate",function(){if(e.h.duration){var W=j.canSkipNow();V!=W&&0<j.getRemainingTime()&&0<j.getDuration()&&e.i(new ke("ad-skip-state-changed")),V=W}}),e.l.ma(e.j,"firstquartile",function(){R(),e.i(new ke("ad-first-quartile"))}),e.l.ma(e.j,"midpoint",function(){R(),e.i(new ke("ad-midpoint"))}),e.l.ma(e.j,"thirdquartile",function(){R(),e.i(new ke("ad-third-quartile"))}),e.l.ma(e.j,"complete",L),e.l.D(e.h,"play",function(){e.i(new ke("ad-resumed"))}),e.l.D(e.h,"pause",function(){var W=e.j.getConfiguration();e.h.currentTime>=W.playRangeEnd?L():e.i(new ke("ad-paused"))}),e.l.D(e.h,"volumechange",function(){e.h.muted?e.i(new ke("ad-muted")):e.i(new ke("ad-volume-changed"))}),pe(K,4),m1(e),t.startTime&&t.endTime&&t.endTime!=1/0&&t.startTime!=t.endTime&&(X=t.endTime-t.startTime,0<X&&e.j.configure("playRangeEnd",X)),t.playoutLimit&&!e.m&&(e.m=new dt(function(){e.ea()}).da(t.playoutLimit),e.j.configure("playRangeEnd",t.playoutLimit)),_(K,e.j.Lb(e.h),6);case 6:return e.C.has(t)?_(K,e.C.get(t),10):_(K,e.j.load(t.uri,null,t.mimeType||void 0),8);case 10:return G=K.h,e.C.delete(t),G?_(K,e.j.load(G),8):_(K,e.j.load(t.uri,null,t.mimeType||void 0),8);case 8:e.h.play(),Z=(Date.now()-c)/1e3,e.i(new ke("ads-loaded",new Map().set("loadTime",Z))),e.B&&e.g.play(),t.overlay&&(e.l.D(e.g,"seeking",function(){var W=e.g.currentTime-t.startTime;.1<Math.abs(W-e.h.currentTime)&&(e.h.currentTime=W)}),e.l.D(e.g,"seeked",function(){var W=e.g.currentTime;(W<t.startTime||t.endTime&&W>t.endTime)&&e.ea()})),Ue(K,0);break;case 4:if(q=Me(K),!e.K)return K.return();U(q),se(K)}})}function xw(e,t){if(t.displayOnBackground&&(e.g.style.zIndex="1"),t.currentVideo!=null){var n=t.currentVideo;e.g.style.transformOrigin="top left";var i=!0,r=[],l=n.topLeft.x/n.viewport.x*100;0<l&&100>=l&&(r.push("translateX("+l+"%)"),i=!1),l=n.topLeft.y/n.viewport.y*100,0<l&&100>=l&&(r.push("translateY("+l+"%)"),i=!1),l=n.size.x/n.viewport.x,1>l&&r.push("scaleX("+l+")"),n=n.size.y/n.viewport.y,1>l&&r.push("scaleY("+n+")"),r.length&&(e.g.style.transform=r.join(" ")),i&&(e.g.style.transition="transform 250ms")}e.A&&(e.A.style.pointerEvents="none",t.background&&(e.A.style.background=t.background)),e.F&&(e.F.style.background=t.overlay?"":"rgb(0, 0, 0)")}function g1(e,t){(!t||t.displayOnBackground)&&(e.g.style.zIndex=""),t&&t.currentVideo==null||(e.g.style.transformOrigin="",e.g.style.transition="",e.g.style.transform=""),e.A&&(e.A.style.pointerEvents="",!t||t.background)&&(e.A.style.background=""),e.F&&(e.F.style.background="")}function qb(e,t){var n,i,r,l,c,f,y,m,T,x,D,R,N,U,L,j,V,X,G,Z,q,K,W,Q,oe,ne,re,le,fe,ye,de,xe,De,Je,Ve,Pt,Tt,ft,gt,Mt,ut,xt;return z(function(nt){switch(nt.g){case 1:if(n=[],!t||(i=t.values.find(function(st){return st.key=="X-ASSET-URI"}),r=t.values.find(function(st){return st.key=="X-ASSET-LIST"}),!i&&!r))return nt.return(n);if(l=null,(c=t.values.find(function(st){return st.key=="ID"}))&&(l=c.data),f=l==null?Math.floor(10*t.startTime)/10:t.startTime,(y=t.endTime)&&t.endTime!=1/0&&typeof t.endTime=="number"&&(y=l==null?Math.floor(10*t.endTime)/10:t.endTime),m=t.values.find(function(st){return st.key=="X-RESTRICT"}),x=T=!0,m&&m.data&&(D=m.data,T=!D.includes("SKIP"),x=!D.includes("JUMP")),R=T?0:null,(N=t.values.find(function(st){return st.key=="X-ENABLE-SKIP-AFTER"}))&&(U=N.data,R=parseFloat(U),isNaN(R)&&(R=T?0:null)),L=null,(j=t.values.find(function(st){return st.key=="X-ENABLE-SKIP-FOR"}))&&(V=j.data,L=parseFloat(V),isNaN(R)&&(L=null)),X=null,(G=t.values.find(function(st){return st.key=="X-RESUME-OFFSET"}))&&(Z=G.data,X=parseFloat(Z),isNaN(X)&&(X=null)),q=null,(K=t.values.find(function(st){return st.key=="X-PLAYOUT-LIMIT"}))&&(W=K.data,q=parseFloat(W),isNaN(q)&&(q=null)),ne=oe=Q=!1,(re=t.values.find(function(st){return st.key=="CUE"}))&&(le=re.data,Q=le.includes("ONCE"),oe=le.includes("PRE"),ne=le.includes("POST")),fe=!1,(ye=t.values.find(function(st){return st.key=="X-TIMELINE-OCCUPIES"}))?(de=ye.data,fe=de.includes("RANGE")):!G&&e.H.U()&&(fe=!oe&&!ne),i){if(xe=i.data,!xe)return nt.return(n);n.push({id:l,groupId:null,startTime:f,endTime:y,uri:xe,mimeType:null,isSkippable:T,skipOffset:R,skipFor:L,canJump:x,resumeOffset:X,playoutLimit:q,once:Q,pre:oe,post:ne,timelineRange:fe,loop:!1,overlay:null,displayOnBackground:!1,currentVideo:null,background:null}),nt.s(2);break}if(!r){nt.s(2);break}return De=r.data,De?(pe(nt,4),Je={type:11},_(nt,v1(e,De,Je),6)):nt.return(n);case 6:for(Ve=nt.h,Pt=nn(Ve),Tt=JSON.parse(Pt),(ft=Tt["SKIP-CONTROL"])&&(gt=ft["ENABLE-SKIP-AFTER"],typeof gt=="number"&&(R=parseFloat(gt),isNaN(gt)&&(R=T?0:null)),Mt=ft["ENABLE-SKIP-FOR"],typeof Mt=="number"&&(L=parseFloat(Mt),isNaN(Mt)&&(L=null))),ut=0;ut<Tt.ASSETS.length;ut++)xt=Tt.ASSETS[ut],xt.URI&&n.push({id:l+"_shaka_asset_"+ut,groupId:l,startTime:f,endTime:y,uri:xt.URI,mimeType:null,isSkippable:T,skipOffset:R,skipFor:L,canJump:x,resumeOffset:X,playoutLimit:q,once:Q,pre:oe,post:ne,timelineRange:fe,loop:!1,overlay:null,displayOnBackground:!1,currentVideo:null,background:null});Ue(nt,2);break;case 4:Me(nt);case 2:return nt.return(n)}})}function ev(e){for(var t=[],n=b(e.G),i=n.next(),r={};!i.done;r={$b:void 0},i=n.next())i=i.value,i.overlay||(r.$b={start:i.startTime,end:null},i.pre?(r.$b.start=0,r.$b.end=null):i.post?(r.$b.start=-1,r.$b.end=null):i.timelineRange&&(r.$b.end=i.endTime),t.find(function(l){return function(c){return l.$b.start==c.start&&l.$b.end==c.end}}(r))||t.push(r.$b));e.i(new ke("ad-cue-points-changed",new Map().set("cuepoints",t)))}function m1(e){e.j.configure(e.H.Vg()),e.j.configure("ads.disableHLSInterstitial",!0),e.j.configure("ads.disableDASHInterstitial",!0),e.j.configure("playRangeEnd",1/0),md(e.H.xb(),e.j.xb())}function v1(e,t,n){var i,r,l;return z(function(c){return c.g==1?(i=cn([t],Br()),r=e.H.xb().request(7,i,n),_(c,r.promise,2)):(l=c.h,c.return(l.data))})}function Ew(e){return(e=e.mimeType)?!e.startsWith("image/")&&e!=="text/html":!0}function Aw(e,t){if(!(e.L.has(t)||e.T&&!e.T.allowPreloadOnDomElements)){var n=function(l){var c=document.createElement("link");return c.rel="preload",c.href=l,c.as="image",document.head.appendChild(c),c},i=[];if(t.background){var r=t.background.match(/url\(('|")?([^'"()]+)('|")\)?/);r&&i.push(n(r[2]))}t.mimeType.startsWith("image/")&&i.push(n(t.uri)),e.L.set(t,i)}}function Cw(e,t){if(e.L.has(t)){var n=e.L.get(t);n=b(n);for(var i=n.next();!i.done;i=n.next())i=i.value,i.parentNode.removeChild(i);e.L.delete(t)}}function ze(e,t,n,i,r){this.h=e,this.j=fs(this.h.skipOffset),this.g=r,this.i=t,this.l=n,this.o=i,this.m=!1}h=ze.prototype,h.needsSkipUI=function(){return!0},h.isClientRendering=function(){return!1},h.hasCustomClick=function(){return!1},h.isUsingAnotherMediaElement=function(){return!1},h.getDuration=function(){return this.h.durationInSeconds},h.getMinSuggestedDuration=function(){return this.getDuration()},h.getRemainingTime=function(){return this.h.startTimeInSeconds+this.h.durationInSeconds-this.g.currentTime},h.isPaused=function(){return this.g.paused},h.isSkippable=function(){return typeof this.j=="number"},h.getTimeUntilSkippable=function(){if(typeof this.j!="number")return this.getRemainingTime();var e=this.getRemainingTime()+this.j-this.getDuration();return Math.max(e,0)},h.canSkipNow=function(){return this.getTimeUntilSkippable()==0},h.skip=function(){this.m=!0,this.g.currentTime+=this.getRemainingTime()},h.pause=function(){return this.g.pause()},h.play=function(){return this.g.play()},h.getVolume=function(){return this.g.volume},h.setVolume=function(e){this.g.volume=e},h.isMuted=function(){return this.g.muted},h.isLinear=function(){return this.o},h.resize=function(){},h.setMuted=function(e){this.g.muted=e},h.getSequenceLength=function(){return this.l?this.l:1},h.getPositionInSequence=function(){return this.i?this.i:1},h.getTitle=function(){return this.h.adTitle},h.getDescription=function(){return""},h.getVastMediaBitrate=function(){return 0},h.getVastMediaHeight=function(){return 0},h.getVastMediaWidth=function(){return 0},h.getAdId=function(){return this.h.adId},h.getCreativeAdId=function(){return this.h.creativeId},h.getAdvertiserName=function(){return""},h.getMediaUrl=function(){return null},h.getTimeOffset=function(){return 0},h.getPodIndex=function(){return 0},h.release=function(){this.l=this.i=this.g=this.h=null},Pe("shaka.ads.MediaTailorAd",ze),ze.prototype.release=ze.prototype.release,ze.prototype.getPodIndex=ze.prototype.getPodIndex,ze.prototype.getTimeOffset=ze.prototype.getTimeOffset,ze.prototype.getMediaUrl=ze.prototype.getMediaUrl,ze.prototype.getAdvertiserName=ze.prototype.getAdvertiserName,ze.prototype.getCreativeAdId=ze.prototype.getCreativeAdId,ze.prototype.getAdId=ze.prototype.getAdId,ze.prototype.getVastMediaWidth=ze.prototype.getVastMediaWidth,ze.prototype.getVastMediaHeight=ze.prototype.getVastMediaHeight,ze.prototype.getVastMediaBitrate=ze.prototype.getVastMediaBitrate,ze.prototype.getDescription=ze.prototype.getDescription,ze.prototype.getTitle=ze.prototype.getTitle,ze.prototype.getPositionInSequence=ze.prototype.getPositionInSequence,ze.prototype.getSequenceLength=ze.prototype.getSequenceLength,ze.prototype.setMuted=ze.prototype.setMuted,ze.prototype.resize=ze.prototype.resize,ze.prototype.isLinear=ze.prototype.isLinear,ze.prototype.isMuted=ze.prototype.isMuted,ze.prototype.setVolume=ze.prototype.setVolume,ze.prototype.getVolume=ze.prototype.getVolume,ze.prototype.play=ze.prototype.play,ze.prototype.pause=ze.prototype.pause,ze.prototype.skip=ze.prototype.skip,ze.prototype.canSkipNow=ze.prototype.canSkipNow,ze.prototype.getTimeUntilSkippable=ze.prototype.getTimeUntilSkippable,ze.prototype.isSkippable=ze.prototype.isSkippable,ze.prototype.isPaused=ze.prototype.isPaused,ze.prototype.getRemainingTime=ze.prototype.getRemainingTime,ze.prototype.getMinSuggestedDuration=ze.prototype.getMinSuggestedDuration,ze.prototype.getDuration=ze.prototype.getDuration,ze.prototype.isUsingAnotherMediaElement=ze.prototype.isUsingAnotherMediaElement,ze.prototype.hasCustomClick=ze.prototype.hasCustomClick,ze.prototype.isClientRendering=ze.prototype.isClientRendering,ze.prototype.needsSkipUI=ze.prototype.needsSkipUI;function Cy(e,t,n,i){this.B=e,this.K=t,this.h=n,this.l=null,this.P=NaN,this.i=i,this.I=!1,this.A=null,this.j=[],this.M=[],this.L=this.C=this.g=null,this.F=new Map,this.m=[],this.u=[],this.G="",this.O=!0,this.H="",this.o=new vt}Cy.prototype.stop=function(){for(var e=b(this.m),t=e.next();!t.done;t=e.next())t=t.value,this.o.Ja(t.target,t.type,t.listener);dp(this),this.m=[],this.u=[],this.G="",this.O=!0,this.H="",this.A=null,this.j=[],this.M=[],this.F.clear()},Cy.prototype.release=function(){this.stop(),this.o&&this.o.release()},Cy.prototype.onManifestUpdated=function(e){this.I=e,this.G!=""&&(zb(this,this.G,this.O),this.O=!1)},Cy.prototype.getCuePoints=function(){for(var e=[],t=b(this.j),n=t.next();!n.done;n=t.next()){n=b(n.value.ads);for(var i=n.next();!i.done;i=n.next())i=i.value,e.push({start:i.startTimeInSeconds,end:i.startTimeInSeconds+i.durationInSeconds})}return e};function Fb(e,t,n){var i,r,l,c,f,y,m,T,x,D,R,N;z(function(U){if(U.g==1)return i={type:7},r=cn([t],Br()),r.method="POST",n&&(l=JSON.stringify(n),r.body=Pr(l)),c=e.K.request(7,r,i),pe(U,2),_(U,c.promise,4);if(U.g!=2){if(f=U.h,y=nn(f.data),m=JSON.parse(y),m.manifestUrl&&m.trackingUrl)T=new pn(t),x=new pn(m.trackingUrl),e.G=T.resolve(x).toString(),D=Date.now()/1e3,R=D-e.P,e.i(new ke("ads-loaded",new Map().set("loadTime",R))),N=new pn(m.manifestUrl),e.l.resolve(T.resolve(N).toString()),e.l=null;else throw Error("Insufficient data from MediaTailor.");return Ue(U,0)}if(Me(U),!e.H.length)return e.l.reject("MediaTailor request returned an error and there was no backup asset uri provided."),e.l=null,U.return();e.l.resolve(e.H),e.l=null,se(U)})}function zb(e,t,n){var i,r,l,c,f,y,m,T,x,D,R,N,U,L,j,V;z(function(X){if(X.g==1)return i={type:8},r=cn([t],Br()),l=e.K.request(7,r,i),pe(X,2),_(X,l.promise,4);if(X.g!=2){if(c=X.h,f=[],y=nn(c.data),m=JSON.parse(y),0<m.avails.length){if(JSON.stringify(e.j)!=JSON.stringify(m.avails)){for(e.j=m.avails,T=b(e.j),x=T.next();!x.done;x=T.next())for(D=x.value,R=b(D.nonLinearAdsList),N=R.next();!N.done;N=R.next())for(U=N.value,L=b(U.nonLinearAdList),j=L.next();!j.done;j=L.next())V=j.value,Gb(e,V);f=e.getCuePoints(),e.i(new ke("ad-cue-points-changed",new Map().set("cuepoints",f)))}}else e.j.length&&e.i(new ke("ad-cue-points-changed",new Map().set("cuepoints",f))),dp(e),e.j=[];return n&&(e.I||0<f.length)&&Xb(e),Ue(X,0)}Me(X),se(X)})}function Gb(e,t){var n,i,r,l,c,f,y,m;z(function(T){if(T.g==1)return!t.staticResource||(n=bw(t),e.F.get(n))?T.return():(i={type:9},r=cn([t.staticResource],Br()),l=e.K.request(7,r,i),pe(T,2),e.F.set(n,[]),_(T,l.promise,4));if(T.g!=2)return c=T.h,f=nn(c.data),y=JSON.parse(f),m=y.apps,e.F.set(n,m),Ue(T,0);Me(T),e.F.delete(n),se(T)})}function bw(e){return[e.adId,e.adParameters,e.adSystem,e.adTitle,e.creativeAdId,e.creativeId,e.creativeSequence,e.height,e.width,e.staticResource].join("")}function Xb(e){Dw(e),e.I||(Iw(e),e.o.D(e.h,"seeked",function(){Iw(e)}),e.o.D(e.h,"ended",function(){dp(e)})),e.o.D(e.h,"timeupdate",function(){Dw(e)})}function Iw(e){var t=e.h.currentTime;if(t!=0&&e.A==null){for(var n,i,r=b(e.j),l=r.next();!l.done;l=r.next()){l=l.value;for(var c=b(l.ads),f=c.next();!f.done;f=c.next())if(f=f.value,!i)f.startTimeInSeconds<t&&(i=f,n=l);else if(f.startTimeInSeconds<t&&f.startTimeInSeconds>i.startTimeInSeconds+i.durationInSeconds){i=f,n=l;break}}n&&i&&!e.M.includes(i.adId)&&(e.A=t,e.h.currentTime=n.startTimeInSeconds)}}function Dw(e){if(e.h.duration&&(e.g||e.j.length)){var t=e.h.currentTime,n=!1;if(e.g){n=!0;var i=e.C,r=i.startTimeInSeconds+.5*i.durationInSeconds,l=i.startTimeInSeconds+.75*i.durationInSeconds;t>=i.startTimeInSeconds+.25*i.durationInSeconds&&!e.u.includes("firstQuartile")?(e.u.push("firstQuartile"),Ji(e,"firstQuartile")):t>=r&&!e.u.includes("midpoint")?(e.u.push("midpoint"),Ji(e,"midpoint")):t>=l&&!e.u.includes("thirdQuartile")&&(e.u.push("thirdQuartile"),Ji(e,"thirdQuartile")),i=e.g.getRemainingTime(),r=e.g.getDuration(),e.g.canSkipNow()&&0<i&&0<r&&Ji(e,"skipStateChanged"),0<r&&(0>=i||i>r)&&dp(e)}if(!e.g||!e.g.isLinear()){e:for(i=b(e.j),r=i.next();!r.done&&(r=r.value,!(e.g&&e.g.isLinear()));r=i.next())for(l=0;l<r.ads.length;l++){var c=r.ads[l],f=c.startTimeInSeconds+c.durationInSeconds;if(c.startTimeInSeconds<=t&&f>t){if(e.M.includes(c.adId)){if(e.h.ended)continue;e.h.currentTime=f;break e}dp(e),e.L=r,e.g=new ze(c,l+1,r.ads.length,!0,e.h),e.C=c,l===0&&Ji(e,"breakStart"),Ow(e);break}}if(!e.g){for(i=b(e.j),r=i.next();!r.done&&(r=r.value,!e.g);r=i.next())for(l=0;l<r.nonLinearAdsList.length;l++)if(c=r.nonLinearAdsList[l],c.nonLinearAdList.length){f=r.startTimeInSeconds;var y=e.F.get(bw(c.nonLinearAdList[0]));if(f<=t&&y&&y.length){dp(e),f=e,y=b(y);for(var m=y.next();!m.done;m=y.next())if(m=m.value,m.data.source.length){var T=document.createElement("img");T.src=m.data.source[0].url,T.style.top=(m.placeholder.top||0)+"%",T.style.height=100-(m.placeholder.top||0)+"%",T.style.left=(m.placeholder.left||0)+"%",T.style.maxWidth=100-(m.placeholder.left||0)+"%",T.style.objectFit="contain",T.style.position="absolute",f.B.appendChild(T)}e.L=r,e.g=new ze(c,l+1,r.ads.length,!1,e.h),e.C=c,l===0&&Ji(e,"breakStart"),Ow(e);break}}}n&&!e.g&&(t=e.h.currentTime,e.A&&e.A>t&&(e.h.currentTime=e.A),e.A=null)}}}function dp(e){if(e.g){for(;e.B.lastChild;)e.B.removeChild(e.B.firstChild);e.I||e.M.push(e.C.adId);var t=e.g.m;t!==void 0&&t?Ji(e,"skip"):Ji(e,"complete"),t=b(e.m);for(var n=t.next();!n.done;n=t.next())n=n.value,e.o.Ja(n.target,n.type,n.listener);e.m=[],e.u=[],t=e.g.getPositionInSequence(),n=e.g.getSequenceLength(),t===n&&Ji(e,"breakEnd"),e.g=null,e.C=null,e.L=null}}function Ow(e){var t=!1;e.h.paused?t=!0:(Ji(e,"impression"),Ji(e,"start")),e.m.push({target:e.h,type:"volumechange",listener:function(){e.h.muted&&Ji(e,"mute")}}),e.m.push({target:e.h,type:"volumechange",listener:function(){e.h.muted||Ji(e,"unmute")}}),e.m.push({target:e.h,type:"play",listener:function(){t?(Ji(e,"impression"),Ji(e,"start"),t=!1):Ji(e,"resume")}}),e.m.push({target:e.h,type:"pause",listener:function(){Ji(e,"pause")}});for(var n=b(e.m),i=n.next();!i.done;i=n.next())i=i.value,e.o.D(i.target,i.type,i.listener)}function Ji(e,t){var n=e.C.trackingEvents.find(function(l){return l.eventType==t});if(n||(n=e.L.adBreakTrackingEvents.find(function(l){return l.eventType==t})),n){var i={type:10};n=b(n.beaconUrls);for(var r=n.next();!r.done;r=n.next())(r=r.value)&&r!=""&&(r=cn([r],Br()),r.method="POST",e.K.request(7,r,i))}switch(t){case"impression":e.i(new ke("ad-impression"));break;case"start":e.i(new ke("ad-started",new Map().set("ad",e.g)));break;case"mute":e.i(new ke("ad-muted"));break;case"unmute":e.i(new ke("ad-volume-changed"));break;case"resume":e.i(new ke("ad-resumed"));break;case"pause":e.i(new ke("ad-paused"));break;case"firstQuartile":e.i(new ke("ad-first-quartile"));break;case"midpoint":e.i(new ke("ad-midpoint"));break;case"thirdQuartile":e.i(new ke("ad-third-quartile"));break;case"complete":e.i(new ke("ad-complete")),e.i(new ke("ad-stopped"));break;case"skip":e.i(new ke("ad-skipped")),e.i(new ke("ad-stopped"));break;case"breakStart":e.B.setAttribute("ad-active","true");break;case"breakEnd":e.B.removeAttribute("ad-active");break;case"skipStateChanged":e.i(new ke("ad-skip-state-changed"))}}function Qe(e,t){this.g=e,this.i=null,this.h=t}h=Qe.prototype,h.needsSkipUI=function(){return!0},h.isClientRendering=function(){return!1},h.hasCustomClick=function(){return!0},h.isUsingAnotherMediaElement=function(){return!1},h.getDuration=function(){return this.i?this.i.duration:-1},h.getMinSuggestedDuration=function(){return this.getDuration()},h.getRemainingTime=function(){return this.i?this.i.duration-this.i.currentTime:-1},h.isPaused=function(){return this.h.paused},h.isSkippable=function(){return this.g.isSkippable()},h.getTimeUntilSkippable=function(){var e=this.g.getSkipTimeOffset();return e=this.getRemainingTime()-e,Math.max(e,0)},h.canSkipNow=function(){return this.getTimeUntilSkippable()==0},h.skip=function(){this.h.currentTime+=this.getRemainingTime()},h.pause=function(){return this.h.pause()},h.play=function(){return this.h.play()},h.getVolume=function(){return this.h.volume},h.setVolume=function(e){this.h.volume=e},h.isMuted=function(){return this.h.muted},h.isLinear=function(){return!0},h.resize=function(){},h.setMuted=function(e){this.h.muted=e},h.getSequenceLength=function(){var e=this.g.getAdPodInfo();return e==null?1:e.getTotalAds()},h.getPositionInSequence=function(){var e=this.g.getAdPodInfo();return e==null?1:e.getAdPosition()},h.getTitle=function(){return this.g.getTitle()},h.getDescription=function(){return this.g.getDescription()},h.getVastMediaBitrate=function(){return 0},h.getVastMediaHeight=function(){return this.g.getVastMediaHeight()},h.getVastMediaWidth=function(){return this.g.getVastMediaWidth()},h.getAdId=function(){return this.g.getAdId()},h.getCreativeAdId=function(){return this.g.getCreativeAdId()},h.getAdvertiserName=function(){return this.g.getAdvertiserName()},h.getMediaUrl=function(){return null},h.getTimeOffset=function(){var e=this.g.getAdPodInfo();return e==null?0:e.getTimeOffset()},h.getPodIndex=function(){var e=this.g.getAdPodInfo();return e==null?0:e.getPodIndex()},h.release=function(){this.h=this.i=this.g=null},Pe("shaka.ads.ServerSideAd",Qe),Qe.prototype.release=Qe.prototype.release,Qe.prototype.getPodIndex=Qe.prototype.getPodIndex,Qe.prototype.getTimeOffset=Qe.prototype.getTimeOffset,Qe.prototype.getMediaUrl=Qe.prototype.getMediaUrl,Qe.prototype.getAdvertiserName=Qe.prototype.getAdvertiserName,Qe.prototype.getCreativeAdId=Qe.prototype.getCreativeAdId,Qe.prototype.getAdId=Qe.prototype.getAdId,Qe.prototype.getVastMediaWidth=Qe.prototype.getVastMediaWidth,Qe.prototype.getVastMediaHeight=Qe.prototype.getVastMediaHeight,Qe.prototype.getVastMediaBitrate=Qe.prototype.getVastMediaBitrate,Qe.prototype.getDescription=Qe.prototype.getDescription,Qe.prototype.getTitle=Qe.prototype.getTitle,Qe.prototype.getPositionInSequence=Qe.prototype.getPositionInSequence,Qe.prototype.getSequenceLength=Qe.prototype.getSequenceLength,Qe.prototype.setMuted=Qe.prototype.setMuted,Qe.prototype.resize=Qe.prototype.resize,Qe.prototype.isLinear=Qe.prototype.isLinear,Qe.prototype.isMuted=Qe.prototype.isMuted,Qe.prototype.setVolume=Qe.prototype.setVolume,Qe.prototype.getVolume=Qe.prototype.getVolume,Qe.prototype.play=Qe.prototype.play,Qe.prototype.pause=Qe.prototype.pause,Qe.prototype.skip=Qe.prototype.skip,Qe.prototype.canSkipNow=Qe.prototype.canSkipNow,Qe.prototype.getTimeUntilSkippable=Qe.prototype.getTimeUntilSkippable,Qe.prototype.isSkippable=Qe.prototype.isSkippable,Qe.prototype.isPaused=Qe.prototype.isPaused,Qe.prototype.getRemainingTime=Qe.prototype.getRemainingTime,Qe.prototype.getMinSuggestedDuration=Qe.prototype.getMinSuggestedDuration,Qe.prototype.getDuration=Qe.prototype.getDuration,Qe.prototype.isUsingAnotherMediaElement=Qe.prototype.isUsingAnotherMediaElement,Qe.prototype.hasCustomClick=Qe.prototype.hasCustomClick,Qe.prototype.isClientRendering=Qe.prototype.isClientRendering,Qe.prototype.needsSkipUI=Qe.prototype.needsSkipUI;function kw(e,t,n,i){var r=this;this.u=e,this.l=t,this.j=null,this.F=NaN,this.i=i,this.G=!1,this.A=this.m=this.o=null,this.B="",this.C=[],this.h=new vt,e=new google.ima.dai.api.UiSettings,e.setLocale(n),this.g=new google.ima.dai.api.StreamManager(this.l,this.u,e),this.i(new ke("ima-stream-manager-loaded",new Map().set("imaStreamManager",this.g))),this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.LOADED,function(l){Yb(r,l)}),this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.ERROR,function(){r.B.length?r.j.resolve(r.B):r.j.reject("IMA Stream request returned an error and there was no backup asset uri provided."),r.j=null}),this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.AD_BREAK_STARTED,function(){}),this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.STARTED,function(l){l=l.getAd(),r.m=new Qe(l,r.l),r.A&&(r.m.i=r.A),r.i(new ke("ad-started",new Map().set("ad",r.m))),r.u.setAttribute("ad-active","true")}),this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.AD_BREAK_ENDED,function(){r.u.removeAttribute("ad-active");var l=r.l.currentTime;r.o&&r.o>l&&(r.l.currentTime=r.o,r.o=null)}),this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.AD_PROGRESS,function(l){r.A=l.getStreamData().adProgressData,r.m&&(r.m.i=r.A)}),this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.FIRST_QUARTILE,function(){r.i(new ke("ad-first-quartile"))}),this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.MIDPOINT,function(){r.i(new ke("ad-midpoint"))}),this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.THIRD_QUARTILE,function(){r.i(new ke("ad-third-quartile"))}),this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.COMPLETE,function(){r.i(new ke("ad-complete")),r.i(new ke("ad-stopped")),r.u.removeAttribute("ad-active"),r.m=null}),this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.SKIPPED,function(){r.i(new ke("ad-skipped")),r.i(new ke("ad-stopped"))}),this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.CUEPOINTS_CHANGED,function(l){var c=l.getStreamData();l=[],c=b(c.cuepoints);for(var f=c.next();!f.done;f=c.next())f=f.value,l.push({start:f.start,end:f.end});r.C=l,r.i(new ke("ad-cue-points-changed",new Map().set("cuepoints",l)))})}h=kw.prototype,h.configure=function(){},h.stop=function(){this.B="",this.o=null,this.C=[]},h.release=function(){this.stop(),this.h&&this.h.release()},h.onCueMetadataChange=function(e){if(e.key&&e.data){var t={};t[e.key]=e.data,this.g.onTimedMetadata(t)}},h.getCuePoints=function(){return this.C};function Yb(e,t){e.i(new ke("ads-loaded",new Map().set("loadTime",Date.now()/1e3-e.F))),t=t.getStreamData().url,e.j.resolve(t),e.j=null,e.G||e.h.D(e.l,"seeked",function(){var n=e.l.currentTime;if(n!=0){e.g.streamTimeForContentTime(n);var i=e.g.previousCuePointForStreamTime(n);i&&!i.played&&(e.o=n,e.l.currentTime=i.start)}})}function Be(){Ut.call(this),this.h=this.i=this.j=this.g=null,this.m=new mw,this.o=navigator.language,this.l=null}ot(Be,Ut),h=Be.prototype,h.setLocale=function(e){this.o=e},h.configure=function(e){this.l=e,this.g&&this.g.configure(this.l),this.j&&this.j.configure(this.l),this.h&&this.h.configure(this.l)},h.initInterstitial=function(e,t,n){var i=this;this.g&&this.g.release(),this.g=new Tw(e,t,n,function(r){return tv(i,r)}),this.g.configure(this.l)},h.initClientSide=function(e,t,n){var i=this;if(!w.google||!google.ima||!google.ima.AdsLoader)throw new Y(2,10,1e4);this.j&&this.j.release(),this.j=new Qm(e,t,this.o,n,function(r){return tv(i,r)}),this.j.configure(this.l)},h.release=function(){this.g&&(this.g.release(),this.g=null),this.j&&(this.j.release(),this.j=null),this.i&&(this.i.release(),this.i=null),this.h&&(this.h.release(),this.h=null),Ut.prototype.release.call(this)},h.onAssetUnload=function(){this.g&&this.g.stop(),this.j&&this.j.stop(),this.i&&this.i.stop(),this.h&&this.h.stop(),this.dispatchEvent(new ke("ad-stopped")),this.dispatchEvent(new ke("ad-content-attach-requested")),this.m=new mw},h.requestClientSideAds=function(e){if(!this.j)throw new Y(1,10,10001);var t=this.j;t.g&&t.g.destroy(),t.m&&t.m.contentComplete(),t.G=Date.now()/1e3,t.m.requestAds(e)},h.updateClientSideAdsRenderingSettings=function(e){if(!this.j)throw new Y(1,10,10001);var t=this.j;t.B=e,t.g&&t.g.updateAdsRenderingSettings(t.B)},h.initMediaTailor=function(e,t,n){var i=this;this.i&&this.i.release(),this.i=new Cy(e,t,n,function(r){return tv(i,r)})},h.requestMediaTailorStream=function(e,t,n){if(!this.i)throw new Y(1,10,10005);var i=this.i;return n=n===void 0?"":n,i.l?e=Promise.reject(new Y(1,10,10004)):(i.l=new kt,Fb(i,e,t),i.H=n||"",i.P=Date.now()/1e3,e=i.l),e},h.addMediaTailorTrackingUrl=function(e){if(!this.i)throw new Y(1,10,10005);var t=this.i;t.G=e,t.i(new ke("ads-loaded",new Map().set("loadTime",0)))},h.initServerSide=function(e,t){var n=this;if(!w.google||!google.ima||!google.ima.dai)throw new Y(2,10,10002);this.h&&this.h.release(),this.h=new kw(e,t,this.o,function(i){return tv(n,i)}),this.h.configure(this.l)},h.requestServerSideStream=function(e,t){if(t=t===void 0?"":t,!this.h)throw new Y(1,10,10003);e.adTagParameters||(e.adTagParameters={});var n=e.adTagParameters;return(n.mpt||n.mpv)&&bt('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overridden.'),e.adTagParameters.mpt="shaka-player",e.adTagParameters.mpv="v4.14.9",n=this.h,n.j?e=Promise.reject(new Y(1,10,10004)):(e instanceof google.ima.dai.api.LiveStreamRequest&&(n.G=!0),n.j=new kt,n.g.requestStream(e),n.B=t||"",n.F=Date.now()/1e3,e=n.j),e},h.replaceServerSideAdTagParameters=function(e){if(!this.h)throw new Y(1,10,10003);(e.mpt||e.mpv)&&bt('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overridden.'),e.mpt="Shaka Player",e.mpv="v4.14.9",this.h.g.replaceAdTagParameters(e)},h.getServerSideCuePoints=function(){return Ot("AdManager.getServerSideCuePoints","Please use getCuePoints function."),this.getCuePoints()},h.getCuePoints=function(){var e=[];return this.h&&(e=e.concat(this.h.getCuePoints())),this.i&&(e=e.concat(this.i.getCuePoints())),e},h.getStats=function(){var e=this.m;return{loadTimes:e.g,averageLoadTime:Pb(e),started:e.h,overlayAds:e.j,playedCompletely:e.l,skipped:e.m,errors:e.i}},h.onManifestUpdated=function(e){this.i&&this.i.onManifestUpdated(e)},h.onDashTimedMetadata=function(e){this.h&&e.schemeIdUri=="urn:google:dai:2018"&&this.h.g.processMetadata(e.schemeIdUri,e.eventNode?e.eventNode.attributes.messageData:null,e.startTime)},h.onHlsTimedMetadata=function(e,t){this.h&&this.h.g.processMetadata("ID3",e.data,t)},h.onCueMetadataChange=function(e){this.h&&this.h.onCueMetadataChange(e)},h.onHLSInterstitialMetadata=function(e,t,n){this.l&&this.l.disableHLSInterstitial||(this.g||this.initInterstitial(null,e,t),this.g&&Bb(this.g,n))},h.onDASHInterstitialMetadata=function(e,t,n){if(!this.l||!this.l.disableDASHInterstitial){var i=n.schemeIdUri;if(i=="urn:mpeg:dash:event:alternativeMPD:insert:2025"||i=="urn:mpeg:dash:event:alternativeMPD:replace:2025"){if(this.g||this.initInterstitial(null,e,t),this.g&&(e=this.g,t=n.schemeIdUri=="urn:mpeg:dash:event:alternativeMPD:replace:2025",i=n.schemeIdUri=="urn:mpeg:dash:event:alternativeMPD:insert:2025",t||i)){for(var r=n.startTime,l=n.endTime,c=null,f=0,y,m=b(n.eventNode.children),T=m.next();!T.done;T=m.next())if(T=T.value,T.tagName=="AlternativeMPD"){if(T=T.attributes.uri){y=T;break}}else if(T.tagName=="InsertPresentation"||T.tagName=="ReplacePresentation"){var x=T.attributes.url;if(x){y=x,(m=Ge(T,"maxDuration",Zn))&&(c=m/n.timescale),(m=Ge(T,"returnOffset",Zn))&&(f=m/n.timescale),t&&f&&(l=r+f);break}}y&&Ey(e,[{id:n.id,groupId:null,startTime:r,endTime:l,uri:y,mimeType:null,isSkippable:!1,skipOffset:null,skipFor:null,canJump:!0,resumeOffset:i?f:null,playoutLimit:c,once:!1,pre:!1,post:!1,timelineRange:t&&!i,loop:!1,overlay:null,displayOnBackground:!1,currentVideo:null,background:null}])}}else(i=="urn:mpeg:dash:event:2012"||i=="urn:scte:dash:scte214-events")&&n.eventNode&&An(n.eventNode,"OverlayEvent")&&(this.g||this.initInterstitial(null,e,t),this.g&&Vb(this.g,n))}},h.addCustomInterstitial=function(e){if(!this.g)throw new Y(1,10,10006);Ey(this.g,[e])},h.addAdUrlInterstitial=function(e){if(!this.g)throw new Y(1,10,10006);return this.g.addAdUrlInterstitial(e)},h.getInterstitialPlayer=function(){if(!this.g)throw new Y(1,10,10006);return this.g.If()};function tv(e,t){if(t&&t.type)switch(t.type){case"ads-loaded":e.m.g.push(t.loadTime);break;case"ad-started":e.m.h++;var n=t.ad;n&&!n.isLinear()&&e.m.j++;break;case"ad-complete":e.m.l++;break;case"ad-skipped":e.m.m++;break;case"ad-error":e.m.i++}e.dispatchEvent(t)}Pe("shaka.ads.AdManager",Be),Be.prototype.getInterstitialPlayer=Be.prototype.getInterstitialPlayer,Be.prototype.addAdUrlInterstitial=Be.prototype.addAdUrlInterstitial,Be.prototype.addCustomInterstitial=Be.prototype.addCustomInterstitial,Be.prototype.onDASHInterstitialMetadata=Be.prototype.onDASHInterstitialMetadata,Be.prototype.onHLSInterstitialMetadata=Be.prototype.onHLSInterstitialMetadata,Be.prototype.onCueMetadataChange=Be.prototype.onCueMetadataChange,Be.prototype.onHlsTimedMetadata=Be.prototype.onHlsTimedMetadata,Be.prototype.onDashTimedMetadata=Be.prototype.onDashTimedMetadata,Be.prototype.onManifestUpdated=Be.prototype.onManifestUpdated,Be.prototype.getStats=Be.prototype.getStats,Be.prototype.getCuePoints=Be.prototype.getCuePoints,Be.prototype.getServerSideCuePoints=Be.prototype.getServerSideCuePoints,Be.prototype.replaceServerSideAdTagParameters=Be.prototype.replaceServerSideAdTagParameters,Be.prototype.requestServerSideStream=Be.prototype.requestServerSideStream,Be.prototype.initServerSide=Be.prototype.initServerSide,Be.prototype.addMediaTailorTrackingUrl=Be.prototype.addMediaTailorTrackingUrl,Be.prototype.requestMediaTailorStream=Be.prototype.requestMediaTailorStream,Be.prototype.initMediaTailor=Be.prototype.initMediaTailor,Be.prototype.updateClientSideAdsRenderingSettings=Be.prototype.updateClientSideAdsRenderingSettings,Be.prototype.requestClientSideAds=Be.prototype.requestClientSideAds,Be.prototype.onAssetUnload=Be.prototype.onAssetUnload,Be.prototype.release=Be.prototype.release,Be.prototype.initClientSide=Be.prototype.initClientSide,Be.prototype.initInterstitial=Be.prototype.initInterstitial,Be.prototype.configure=Be.prototype.configure,Be.prototype.setLocale=Be.prototype.setLocale,Be.ADS_LOADED="ads-loaded",Be.AD_STARTED="ad-started",Be.AD_FIRST_QUARTILE="ad-first-quartile",Be.AD_MIDPOINT="ad-midpoint",Be.AD_THIRD_QUARTILE="ad-third-quartile",Be.AD_COMPLETE="ad-complete",Be.AD_STOPPED="ad-stopped",Be.AD_SKIPPED="ad-skipped",Be.AD_VOLUME_CHANGED="ad-volume-changed",Be.AD_MUTED="ad-muted",Be.AD_PAUSED="ad-paused",Be.AD_RESUMED="ad-resumed",Be.AD_SKIP_STATE_CHANGED="ad-skip-state-changed",Be.CUEPOINTS_CHANGED="ad-cue-points-changed",Be.IMA_AD_MANAGER_LOADED="ima-ad-manager-loaded",Be.IMA_STREAM_MANAGER_LOADED="ima-stream-manager-loaded",Be.AD_CLICKED="ad-clicked",Be.AD_PROGRESS="ad-progress",Be.AD_BUFFERING="ad-buffering",Be.AD_IMPRESSION="ad-impression",Be.AD_DURATION_CHANGED="ad-duration-changed",Be.AD_CLOSED="ad-closed",Be.AD_LOADED="ad-loaded",Be.ALL_ADS_COMPLETED="all-ads-completed",Be.AD_LINEAR_CHANGED="ad-linear-changed",Be.AD_METADATA="ad-metadata",Be.AD_RECOVERABLE_ERROR="ad-recoverable-error",Be.AD_ERROR="ad-error",Be.AD_BREAK_READY="ad-break-ready",Be.AD_INTERACTION="ad-interaction",Be.AD_CONTENT_PAUSE_REQUESTED="ad-content-pause-requested",Be.AD_CONTENT_RESUME_REQUESTED="ad-content-resume-requested",Be.AD_CONTENT_ATTACH_REQUESTED="ad-content-attach-requested",Wm=function(){return new Be};function Rw(e){return JSON.stringify(e,function(t,n){if(typeof n!="function"){if(n instanceof Event||n instanceof ke){var i={};for(r in n)(t=n[r])&&typeof t=="object"?r=="detail"&&(i[r]=t):r in Event||(i[r]=t);return i}if(n instanceof Error){var r=new Set(["name","message","stack"]);for(i in n)r.add(i);for(i=b(Object.getOwnPropertyNames(n)),t=i.next();!t.done;t=i.next())r.add(t.value);for(i={},r=b(r),t=r.next();!t.done;t=r.next())t=t.value,i[t]=n[t];n={__type__:"Error",contents:i}}else if(n instanceof TimeRanges){for(r={__type__:"TimeRanges",length:n.length,start:[],end:[]},n=b(wo(n)),i=n.next();!i.done;i=n.next())i=i.value,t=i.end,r.start.push(i.start),r.end.push(t);n=r}else n=ArrayBuffer.isView(n)&&n.BYTES_PER_ELEMENT===1?{__type__:"Uint8Array",entries:Array.from(n)}:typeof n=="number"?isNaN(n)?"NaN":isFinite(n)?n:0>n?"-Infinity":"Infinity":n;return n}})}function S1(e){return JSON.parse(e,function(t,n){if(n=="NaN")var i=NaN;else if(n=="-Infinity")i=-1/0;else if(n=="Infinity")i=1/0;else if(n&&typeof n=="object"&&n.__type__=="TimeRanges")i=Wb(n);else if(n&&typeof n=="object"&&n.__type__=="Uint8Array")i=new Uint8Array(n.entries);else if(n&&typeof n=="object"&&n.__type__=="Error"){t=n.contents,n=Error(t.message);for(i in t)n[i]=t[i];i=n}else i=n;return i})}function Wb(e){return{length:e.length,start:function(t){return e.start[t]},end:function(t){return e.end[t]}}}var Mw="ended play playing pause pausing ratechange seeked seeking timeupdate volumechange".split(" "),Qb="buffered currentTime duration ended loop muted paused playbackRate seeking videoHeight videoWidth volume".split(" "),w1=["loop","playbackRate"],Jb=["pause","play"],T1=new Map().set("getAssetUri",2).set("getAudioLanguages",4).set("getAudioLanguagesAndRoles",4).set("getBufferFullness",1).set("getBufferedInfo",2).set("getExpiration",2).set("getKeyStatuses",2).set("getPlaybackRate",2).set("getTextLanguages",4).set("getTextLanguagesAndRoles",4).set("getImageTracks",2).set("getThumbnails",2).set("isAudioOnly",10).set("isBuffering",1).set("isInProgress",1).set("isLive",10).set("isTextTrackVisible",1).set("keySystem",10).set("seekRange",1).set("getLoadMode",10).set("getManifestType",10).set("isFullyLoaded",1).set("isEnded",1),x1=new Map().set("getConfiguration",4).set("getConfigurationForLowLatency",4).set("getStats",5).set("getAudioTracks",2).set("getTextTracks",2).set("getVariantTracks",2),Nw=new Map().set("getPlayheadTimeAsDate",1).set("getPresentationStartTimeAsDate",20).set("getSegmentAvailabilityDuration",20),Pw=[["getConfiguration","configure","getConfigurationForLowLatency","configurationForLowLatency"]],Lw=[["isTextTrackVisible","setTextTrackVisibility"]],Zb="addChaptersTrack addTextTrackAsync addThumbnailsTrack cancelTrickPlay configure configurationForLowLatency getChapters getChaptersTracks resetConfiguration retryStreaming selectAudioLanguage selectAudioTrack selectTextLanguage selectTextTrack selectVariantTrack selectVariantsByLabel setTextTrackVisibility trickPlay updateStartTime goToLive".split(" "),$b=["attach","attachCanvas","detach","load","unload"];function E1(e,t,n,i,r,l,c){var f=this;this.G=e,this.K=c,this.l=new dt(t),this.L=n,this.u=!1,this.A=i,this.F=r,this.M=l,this.i=this.m=!1,this.I="",this.o=null,this.B=function(){return A1(f)},this.C=function(y,m){switch(y=S1(m),y.type){case"event":var T=y.targetName,x=Cs(y.event);f.A(T,x);break;case"update":T=y.update;for(x in T){y=f.g[x]||{};for(var D in T[x])y[D]=T[x][D]}f.u&&(f.L(),f.u=!1);break;case"asyncComplete":if(x=y.id,D=y.error,y=f.h.get(x),f.h.delete(x),y)if(D){x=new Y(D.severity,D.category,D.code);for(T in D)x[T]=D[T];y.reject(x)}else y.resolve()}},this.g={video:{},player:{}},this.H=0,this.h=new Map,this.j=null,Iy.add(this)}h=E1.prototype,h.destroy=function(){return Iy.delete(this),C1(this),ul&&Uw(this),this.l&&(this.l.stop(),this.l=null),this.F=this.A=null,this.i=this.m=!1,this.C=this.B=this.j=this.h=this.g=this.o=null,Promise.resolve()},h.qb=function(){return this.i},h.ag=function(){return this.I},h.init=function(){if(this.G.length)if(w.chrome&&chrome.cast&&chrome.cast.isAvailable){this.m=!0,this.l.sb();var e=new chrome.cast.SessionRequest(this.G,[],null,this.K,null);e=new chrome.cast.ApiConfig(e,function(t){for(var n=b(Iy),i=n.next();!i.done;i=n.next()){i=i.value;var r=t;i.j=new kt,i.u=!0,nv(i,r)}},function(t){for(var n=b(Iy),i=n.next();!i.done;i=n.next())i=i.value,iv=t=="available",i.l.sb()},"origin_scoped"),chrome.cast.initialize(e,function(){},function(){}),iv&&this.l.da(t3),(e=ul)&&e.status!=chrome.cast.SessionStatus.STOPPED?(this.j=new kt,this.u=!0,nv(this,e)):ul=null}else w.__onGCastApiAvailable!==jw&&(rv=w.__onGCastApiAvailable||null,w.__onGCastApiAvailable=jw)},h.ig=function(e){this.o=e,this.i&&by(this,{type:"appData",appData:this.o})},h.cast=function(){var e=this;return z(function(t){if(!e.m)throw new Y(1,8,8e3);if(!iv)throw new Y(1,8,8001);if(e.i)throw new Y(1,8,8002);return e.j=new kt,chrome.cast.requestSession(function(n){return nv(e,n)},function(n){return _w(e,n)}),_(t,e.j,0)})};function e3(e){e.i&&chrome.cast.requestSession(function(t){return nv(e,t)},function(t){return _w(e,t)})}h.Pc=function(){if(this.i){if(C1(this),ul){Uw(this);try{ul.stop(function(){},function(){})}catch{}ul=null}A1(this)}},h.get=function(e,t){var n=this;if(e=="video"){if(Jb.includes(t))return function(){return n.oh.apply(n,[e,t].concat(J(Et.apply(0,arguments))))}}else if(e=="player"){if(Nw.has(t)&&!this.get("player","isLive")())return function(){};if(Zb.includes(t))return function(){return n.oh.apply(n,[e,t].concat(J(Et.apply(0,arguments))))};if($b.includes(t))return function(){return n.pj.apply(n,[e,t].concat(J(Et.apply(0,arguments))))};if(T1.has(t)||x1.has(t))return function(){return n.g[e][t]}}return this.g[e][t]},h.set=function(e,t,n){this.g[e][t]=n,by(this,{type:"set",targetName:e,property:t,value:n})};function nv(e,t){var n=e.M();ul=t,t.addUpdateListener(e.B),t.addMessageListener("urn:x-cast:com.google.shaka.v2",e.C),A1(e),by(e,{type:"init",initState:n,appData:e.o}),e.j.resolve()}function _w(e,t){var n=8003;switch(t.code){case"cancel":n=8004;break;case"timeout":n=8005;break;case"receiver_unavailable":n=8006}e.j.reject(new Y(2,8,n,t))}h.oh=function(e,t){by(this,{type:"call",targetName:e,methodName:t,args:Et.apply(2,arguments)})},h.pj=function(e,t){var n=Et.apply(2,arguments),i=new kt,r=this.H.toString();this.H++,this.h.set(r,i);try{by(this,{type:"asyncCall",targetName:e,methodName:t,args:n,id:r})}catch(l){i.reject(l)}return i};function Uw(e){var t=ul;t.removeUpdateListener(e.B),t.removeMessageListener("urn:x-cast:com.google.shaka.v2",e.C)}function A1(e){var t=ul?ul.status=="connected":!1;if(e.i&&!t){e.F();for(var n in e.g)e.g[n]={};C1(e)}e.i=t,e.I=t?ul.receiver.friendlyName:"",e.l.sb()}function C1(e){if(e.h)for(var t=b(e.h.keys()),n=t.next();!n.done;n=t.next()){n=n.value;var i=e.h.get(n);e.h.delete(n),i.reject(new Y(1,7,7e3))}}function by(e,t){t=Rw(t);var n=ul;try{n.sendMessage("urn:x-cast:com.google.shaka.v2",t,function(){},b0)}catch(i){throw t=new Y(2,8,8005,i),n=new ke("error",new Map().set("detail",t)),e.A("player",n),e.Pc(),t}}var t3=.02,iv=!1,ul=null,rv=null,Iy=new Set;function jw(e){if(rv?w.__onGCastApiAvailable=rv:delete w.__onGCastApiAvailable,rv=null,e)for(var t=b(Iy),n=t.next();!n.done;n=t.next())n.value.init();typeof w.__onGCastApiAvailable=="function"&&w.__onGCastApiAvailable(e)}function qn(e,t,n,i){i=i===void 0?!1:i,Ut.call(this);var r=this;this.i=e,this.h=t,this.m=this.o=this.l=this.u=this.j=null,this.C=n,this.B=i,this.A=new Map,this.g=null,w.chrome?(this.g=new E1(n,function(){return Hw(r)},function(){return Kw(r)},function(l,c){return Fw(r,l,c)},function(){return qw(r)},function(){return Vw(r)},i),n3(this)):(this.j=this.i,this.u=this.h)}ot(qn,Ut),h=qn.prototype,h.destroy=function(e){return this.g&&e&&this.g.Pc(),this.m&&(this.m.release(),this.m=null),e=[],this.h&&(e.push(this.h.destroy()),this.h=null),this.g&&(e.push(this.g.destroy()),this.g=null),this.u=this.j=this.i=null,Ut.prototype.release.call(this),Promise.all(e)},h.Li=function(){return this.j},h.If=function(){return this.u},h.Xh=function(){return this.g?this.g.m&&iv:!1},h.qb=function(){return this.g?this.g.qb():!1},h.ag=function(){return this.g?this.g.ag():""},h.cast=function(){var e=this;return z(function(t){return t.g==1?e.g?_(t,e.g.cast(),2):t.return():e.h?_(t,e.h.kc(),0):t.return()})},h.ig=function(e){this.g&&this.g.ig(e)},h.Ej=function(){this.g&&e3(this.g)},h.Pc=function(){this.g&&this.g.Pc()},h.Yh=function(e,t){t=t===void 0?!1:t;var n=this;return z(function(i){if(i.g==1)return e==n.C&&t==n.B||(n.C=e,n.B=t,!n.g)?i.return():(n.g.Pc(),_(i,n.g.destroy(),2));n.g=null,n.g=new E1(e,function(){return Hw(n)},function(){return Kw(n)},function(r,l){return Fw(n,r,l)},function(){return qw(n)},function(){return Vw(n)},t),n.g.init(),se(i)})};function n3(e){e.g.init(),e.m=new vt;for(var t=b(Mw),n=t.next();!n.done;n=t.next())e.m.D(e.i,n.value,function(l){e.g.qb()||(l=Cs(l),e.l.dispatchEvent(l))});for(var i in zc)e.m.D(e.h,zc[i],function(l){e.g.qb()||e.o.dispatchEvent(l)});e.j={},t={};for(var r in e.i)t={wd:t.wd},t.wd=r,Object.defineProperty(e.j,t.wd,{configurable:!1,enumerable:!0,get:function(l){return function(){return r3(e,l.wd)}}(t),set:function(l){return function(c){var f=l.wd;e.g.qb()?e.g.set("video",f,c):e.i[f]=c}}(t)});e.u={},Bw(e,function(l){Object.defineProperty(e.u,l,{configurable:!1,enumerable:!0,get:function(){return o3(e,l)}})}),i3(e),e.l=new Ut,e.l.Ge=e.j,e.o=new Ut,e.o.Ge=e.u}function i3(e){var t=new Map;Bw(e,function(n,i){t.has(i)?(i=t.get(i),n.length<i.length?e.A.set(n,i):e.A.set(i,n)):t.set(i,n)})}function Bw(e,t){function n(y){return y=="constructor"||typeof i[y]!="function"?!1:!r.has(y)}var i=e.h,r=new Set,l;for(l in i)n(l)&&(r.add(l),t(l,i[l]));for(e=Object.getPrototypeOf(i),l=Object.getPrototypeOf({});e&&e!=l;){for(var c=b(Object.getOwnPropertyNames(e)),f=c.next();!f.done;f=c.next())f=f.value,n(f)&&(r.add(f),t(f,i[f]));e=Object.getPrototypeOf(e)}}function Vw(e){var t={video:{},player:{},playerAfterLoad:{},manifest:e.h.Qc(),startTime:null};e.i.pause();for(var n=b(w1),i=n.next();!i.done;i=n.next())i=i.value,t.video[i]=e.i[i];for(e.i.ended||(t.startTime=e.i.currentTime),n=b(Pw),i=n.next();!i.done;i=n.next()){var r=i.value;i=r[1],r=e.h[r[0]](),t.player[i]=r}for(n=b(Lw),i=n.next();!i.done;i=n.next())r=i.value,i=r[1],r=e.h[r[0]](),t.playerAfterLoad[i]=r;return t}function Hw(e){var t=new ke("caststatuschanged");e.dispatchEvent(t)}function Kw(e){var t=new ke(e.j.paused?"pause":"play");e.l.dispatchEvent(t)}function qw(e){for(var t=b(Pw),n=t.next();!n.done;n=t.next()){var i=n.value;n=i[1],i=e.g.get("player",i[0])(),e.h[n](i)}var r=e.g.get("player","getAssetUri")();i=e.g.get("video","ended"),t=Promise.resolve();var l=e.i.autoplay;n=null,i||(n=e.g.get("video","currentTime"));var c;(i=e.g.get("player","getTextTracks")())&&i.length&&(c=i.find(function(m){return m.active}));var f=e.g.get("player","isTextTrackVisible")();r&&(e.i.autoplay=!1,t=e.h.load(r,n));var y={};for(n=b(w1),i=n.next();!i.done;i=n.next())i=i.value,y[i]=e.g.get("video",i);t.then(function(){if(e.i){for(var m=b(w1),T=m.next();!T.done;T=m.next())T=T.value,e.i[T]=y[T];for(m=b(Lw),T=m.next();!T.done;T=m.next()){var x=T.value;T=x[1],x=e.g.get("player",x[0])(),e.h[T](x)}e.h.zh(f),c&&e.h.hg(c.language,c.roles,c.forced),e.i.autoplay=l,r&&e.i.play()}},function(m){m=new Map().set("detail",m),m=new ke("error",m),e.h.dispatchEvent(m)})}function r3(e,t){if(t=="addEventListener")return function(i,r,l){return e.l.addEventListener(i,r,l)};if(t=="removeEventListener")return function(i,r,l){return e.l.removeEventListener(i,r,l)};if(e.g.qb()&&Object.keys(e.g.g.video).length==0){var n=e.i[t];if(typeof n!="function")return n}return e.g.qb()?e.g.get("video",t):(t=e.i[t],typeof t=="function"&&(t=t.bind(e.i)),t)}function o3(e,t){if(e.A.has(t)&&(t=e.A.get(t)),t=="addEventListener")return function(n,i,r){return e.o.addEventListener(n,i,r)};if(t=="removeEventListener")return function(n,i,r){return e.o.removeEventListener(n,i,r)};if(t=="getMediaElement")return function(){return e.j};if(t=="getSharedConfiguration")return e.g.get("player","getConfiguration");if(t=="getNetworkingEngine")return function(){return e.h.xb()};if(t=="getDrmEngine")return function(){return e.h.C};if(t=="getAdManager")return function(){return e.h.Pg()};if(t=="setVideoContainer")return function(n){return e.h.Ch(n)};if(e.g.qb()){if(t=="getManifest"||t=="drmInfo")return function(){return bt(t+"() does not work while casting!"),null};if(t=="attach"||t=="detach")return function(){return bt(t+"() does not work while casting!"),Promise.resolve()}}return e.g.qb()&&Object.keys(e.g.g.video).length==0&&(T1.has(t)||x1.has(t))||!e.g.qb()?e.h[t].bind(e.h):e.g.get("player",t)}function Fw(e,t,n){e.g.qb()&&(t=="video"?e.l.dispatchEvent(n):t=="player"&&e.o.dispatchEvent(n))}Pe("shaka.cast.CastProxy",qn),qn.prototype.changeReceiverId=qn.prototype.Yh,qn.prototype.forceDisconnect=qn.prototype.Pc,qn.prototype.suggestDisconnect=qn.prototype.Ej,qn.prototype.setAppData=qn.prototype.ig,qn.prototype.cast=qn.prototype.cast,qn.prototype.receiverName=qn.prototype.ag,qn.prototype.isCasting=qn.prototype.qb,qn.prototype.canCast=qn.prototype.Xh,qn.prototype.getPlayer=qn.prototype.If,qn.prototype.getVideo=qn.prototype.Li,qn.prototype.destroy=qn.prototype.destroy;function Pi(e,t,n,i){Ut.call(this);var r=this;this.g=e,this.h=t,this.j=new vt,this.H={video:e,player:t},this.F=n||function(){},this.I=i||function(l){return l},this.i=null,this.G=!1,this.o=!0,this.m=0,this.B=!1,this.A=!0,this.u=this.l=null,this.C=new dt(function(){b1(r)}),l3(this)}ot(Pi,Ut),h=Pi.prototype,h.isConnected=function(){return this.G},h.Si=function(){return this.o},h.Bj=function(e){this.i=e},h.bi=function(){this.i=null},h.Cj=function(e){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC}),this.i.title=e},h.Aj=function(e){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC}),this.i.images=[{url:e}]},h.zj=function(e){this.i||(this.i={}),this.i.artist=e,this.i.metadataType=cast.receiver.media.MetadataType.MUSIC_TRACK},h.destroy=function(){var e=this,t,n;return z(function(i){if(i.g==1)return e.j&&(e.j.release(),e.j=null),t=[],e.h&&(t.push(e.h.destroy()),e.h=null),e.C&&(e.C.stop(),e.C=null),e.g=null,e.H=null,e.F=null,e.G=!1,e.o=!0,e.l=null,e.u=null,Ut.prototype.release.call(e),_(i,Promise.all(t),2);n=cast.receiver.CastReceiverManager.getInstance(),n.stop(),se(i)})};function l3(e){var t=cast.receiver.CastReceiverManager.getInstance();t.onSenderConnected=function(){return zw(e)},t.onSenderDisconnected=function(){return zw(e)},t.onSystemVolumeChanged=function(){var r=cast.receiver.CastReceiverManager.getInstance().getSystemVolume();r&&Uu(e,{type:"update",update:{video:{volume:r.level,muted:r.muted}}},e.l),Uu(e,{type:"event",targetName:"video",event:{type:"volumechange"}},e.l)},e.u=t.getCastMessageBus("urn:x-cast:com.google.cast.media"),e.u.onMessage=function(r){return s3(e,r)},e.l=t.getCastMessageBus("urn:x-cast:com.google.shaka.v2"),e.l.onMessage=function(r){return u3(e,r)},t.start(),t=b(Mw);for(var n=t.next();!n.done;n=t.next())e.j.D(e.g,n.value,function(r){return Gw(e,"video",r)});for(var i in zc)e.j.D(e.h,zc[i],function(r){return Gw(e,"player",r)});e.j.D(e.g,"loadeddata",function(){e.B=!0}),e.j.D(e.h,"loading",function(){e.o=!1,pp(e)}),e.j.D(e.g,"playing",function(){e.o=!1,pp(e)}),e.j.D(e.g,"pause",function(){pp(e)}),e.j.D(e.h,"unloading",function(){e.o=!0,pp(e)}),e.j.D(e.g,"ended",function(){new dt(function(){e.g&&e.g.ended&&(e.o=!0,pp(e))}).da(f3)})}function zw(e){e.m=0,e.A=!0,e.G=cast.receiver.CastReceiverManager.getInstance().getSenders().length!=0,pp(e)}function pp(e){var t;z(function(n){if(n.g==1)return _(n,Promise.resolve(),2);if(!e.h)return n.return();t=new ke("caststatuschanged"),e.dispatchEvent(t),Xw(e)||ju(e),se(n)})}function a3(e,t,n){var i,r,l,c,f,y,m,T,x,D;z(function(R){switch(R.g){case 1:for(i in t.player)r=t.player[i],e.h[i](r);return e.F(n),l=e.g.autoplay,t.manifest?(e.g.autoplay=!1,pe(R,5),_(R,e.h.load(t.manifest,t.startTime),7)):_(R,Promise.resolve(),3);case 7:Ue(R,3);break;case 5:return c=Me(R),f=new Map().set("detail",c),y=new ke("error",f),e.h&&e.h.dispatchEvent(y),R.return();case 3:if(!e.h)return R.return();for(m in t.video)T=t.video[m],e.g[m]=T;for(x in t.playerAfterLoad)D=t.playerAfterLoad[x],e.h[x](D);e.g.autoplay=l,t.manifest&&(e.g.play(),ju(e)),se(R)}})}function Gw(e,t,n){e.h&&(b1(e),Uu(e,{type:"event",targetName:t,event:n},e.l))}function b1(e){e.C.da(c3);for(var t={video:{},player:{}},n=b(Qb),i=n.next();!i.done;i=n.next())i=i.value,t.video[i]=e.g[i];e.h.U()&&Nw.forEach(function(r,l){e.m%r==0&&(t.player[l]=e.h[l]())}),T1.forEach(function(r,l){e.m%r==0&&(t.player[l]=e.h[l]())}),(n=cast.receiver.CastReceiverManager.getInstance().getSystemVolume())&&(t.video.volume=n.level,t.video.muted=n.muted),Uu(e,{type:"update",update:t},e.l),x1.forEach(function(r,l){e.m%r==0&&(r={player:{}},r.player[l]=e.h[l](),Uu(e,{type:"update",update:r},e.l))}),e.B&&(e.m+=1),Xw(e)}function Xw(e){return e.A&&(e.g.duration||e.h.U())?(I1(e),e.A=!1,!0):!1}function I1(e,t){var n={contentId:e.h.Qc(),streamType:e.h.U()?"LIVE":"BUFFERED",contentType:""};e.h.U()||(n.duration=e.g.duration),e.i&&(n.metadata=e.i),ju(e,t===void 0?0:t,n)}function u3(e,t){var n=S1(t.data);switch(n.type){case"init":e.m=0,e.B=!1,e.A=!0,a3(e,n.initState,n.appData),b1(e);break;case"appData":e.F(n.appData);break;case"set":var i=n.targetName,r=n.property;if(n=n.value,i=="video"){if(t=cast.receiver.CastReceiverManager.getInstance(),r=="volume"){t.setSystemVolumeLevel(n);break}else if(r=="muted"){t.setSystemVolumeMuted(n);break}}e.H[i][r]=n;break;case"call":i=e.H[n.targetName],i[n.methodName].apply(i,n.args);break;case"asyncCall":i=n.targetName,r=n.methodName,i=="player"&&r=="load"&&(e.m=0,e.B=!1);var l=n.id,c=t.senderId;t=e.H[i],n=t[r].apply(t,n.args),i=="player"&&r=="load"&&(n=n.then(function(){e.A=!0})),n.then(function(){return Yw(e,c,l,null)},function(f){return Yw(e,c,l,f)})}}function s3(e,t){var n=S1(t.data);switch(n.type){case"PLAY":e.g.play(),ju(e);break;case"PAUSE":e.g.pause(),ju(e);break;case"SEEK":t=n.currentTime;var i=n.resumeState;t!=null&&(e.g.currentTime=Number(t)),i&&i=="PLAYBACK_START"?(e.g.play(),ju(e)):i&&i=="PLAYBACK_PAUSE"&&(e.g.pause(),ju(e));break;case"STOP":e.h.kc().then(function(){e.h&&ju(e)});break;case"GET_STATUS":I1(e,Number(n.requestId));break;case"VOLUME":i=n.volume,t=i.level,i=i.muted;var r=e.g.volume,l=e.g.muted;t!=null&&(e.g.volume=Number(t)),i!=null&&(e.g.muted=i),r==e.g.volume&&l==e.g.muted||ju(e);break;case"LOAD":e.m=0,e.B=!1,e.A=!1,t=n.media,i=n.currentTime,r=e.I(t.contentId),l=n.autoplay||!0,e.F(t.customData),l&&(e.g.autoplay=!0),e.h.load(r,i).then(function(){e.h&&I1(e)}).catch(function(c){var f="LOAD_FAILED";c.category==7&&c.code==7e3&&(f="LOAD_CANCELLED"),Uu(e,{requestId:Number(n.requestId),type:f},e.u)});break;default:Uu(e,{requestId:Number(n.requestId),type:"INVALID_REQUEST",reason:"INVALID_COMMAND"},e.u)}}function Yw(e,t,n,i){e.h&&Uu(e,{type:"asyncComplete",id:n,error:i},e.l,t)}function Uu(e,t,n,i){e.G&&(e=Rw(t),i?n.getCastChannel(i).send(e):n.broadcast(e))}function ju(e,t,n){n=n===void 0?null:n;var i={mediaSessionId:0,playbackRate:e.g.playbackRate,playerState:e.o?d3:e.h.Of()?h3:e.g.paused?y3:p3,currentTime:e.g.currentTime,supportedMediaCommands:63,volume:{level:e.g.volume,muted:e.g.muted}};n&&(i.media=n),Uu(e,{requestId:t===void 0?0:t,type:"MEDIA_STATUS",status:[i]},e.u)}Pe("shaka.cast.CastReceiver",Pi),Pi.prototype.destroy=Pi.prototype.destroy,Pi.prototype.setContentArtist=Pi.prototype.zj,Pi.prototype.setContentImage=Pi.prototype.Aj,Pi.prototype.setContentTitle=Pi.prototype.Cj,Pi.prototype.clearContentMetadata=Pi.prototype.bi,Pi.prototype.setContentMetadata=Pi.prototype.Bj,Pi.prototype.isIdle=Pi.prototype.Si,Pi.prototype.isConnected=Pi.prototype.isConnected;var c3=.5,f3=5,d3="IDLE",p3="PLAYING",h3="BUFFERING",y3="PAUSED";function Ww(e,t,n,i,r){if(i>=r)return null;for(var l=-1,c=-1,f=0;f<n.length;f++)if(n[f].some(function(G){return G!=null&&G.g.trim()!=""})){l=f;break}for(f=n.length-1;0<=f;f--)if(n[f].some(function(G){return G!=null&&G.g.trim()!=""})){c=f;break}if(l===-1||c===-1)return null;for(var y=f=!1,m="white",T="black",x=D1(i,r,f,y,m,T);l<=c;l++){for(var D=n[l],R=-1,N=-1,U=0;U<D.length;U++)if(D[U]!=null&&D[U].g.trim()!==""){R=U;break}for(U=D.length-1;0<=U;U--)if(D[U]!=null&&D[U].g.trim()!==""){N=U;break}if(R===-1||N===-1)D=Qw(i,r),e.nestedCues.push(D);else{for(;R<=N;R++)if(U=D[R]){var L=U.l,j=U.i,V=U.j,X=U.h;(L!=f||j!=y||V!=m||X!=T)&&(x.payload&&e.nestedCues.push(x),x=D1(i,r,L,j,V,X),f=L,y=j,m=V,T=X),x.payload+=U.g}else x.payload+=" ";x.payload&&e.nestedCues.push(x),l!==c&&(x=Qw(i,r),e.nestedCues.push(x)),x=D1(i,r,f,y,m,T)}}return e.nestedCues.length?{cue:e,stream:t}:null}function D1(e,t,n,i,r,l){return e=new Qt(e,t,""),n&&e.textDecoration.push(Ko),i&&(e.fontStyle=ms),e.color=r,e.backgroundColor=l,e}function Qw(e,t){return e=new Qt(e,t,""),e.lineBreak=!0,e}function Jw(e,t,n,i,r){this.g=e,this.l=t,this.i=n,this.h=i,this.j=r}function O1(e,t){this.i=[],this.g=1,this.h=0,this.C=e,this.B=t,this.j=this.m=!1,this.l="white",this.o="black",this.u=this.A=null,Dy(this)}function ov(e,t,n){var i="CC"+((e.C<<1|e.B)+1),r=new Qt(t,n,"");r.lineInterpretation=1;var l=eT.get(e.g);return l&&(r.line=l),e.u!=null&&e.A!=null&&(r.position=10+Math.min(70,10*e.u)+2.5*e.A),(t=Ww(r,i,e.i,t,n))&&15<e.g+t.cue.nestedCues.length-3&&(l=eT.get(e.g+3-t.cue.nestedCues.length))&&(r.line=l),t}function Dy(e){Bu(e,0,15),e.g=1}function hp(e,t,n){if(!(32>n||127<n)){var i="";switch(t){case 0:i=$w.has(n)?$w.get(n):String.fromCharCode(n);break;case 1:i=g3.get(n);break;case 2:e.i[e.g].pop(),i=m3.get(n);break;case 3:e.i[e.g].pop(),i=v3.get(n)}i&&e.i[e.g].push(new Jw(i,e.m,e.j,e.o,e.l))}}function Zw(e,t,n,i){if(!(0>n||0>t))if(t>=n)for(--i;0<=i;i--)e.i[t+i]=e.i[n+i].map(function(l){return l});else for(var r=0;r<i;r++)e.i[t+r]=e.i[n+r].map(function(l){return l})}function Bu(e,t,n){for(var i=0;i<=n;i++)e.i[t+i]=[]}var $w=new Map([[39,""],[42,"á"],[92,"é"],[92,"é"],[94,"í"],[95,"ó"],[96,"ú"],[123,"ç"],[124,"÷"],[125,"Ñ"],[126,"ñ"],[127,"█"]]),g3=new Map([[48,"®"],[49,"°"],[50,"½"],[51,"¿"],[52,"™"],[53,"¢"],[54,"£"],[55,"♪"],[56,"à"],[57," "],[58,"è"],[59,"â"],[60,"ê"],[61,"î"],[62,"ô"],[63,"û"]]),m3=new Map([[32,"Á"],[33,"É"],[34,"Ó"],[35,"Ú"],[36,"Ü"],[37,"ü"],[38,""],[39,"¡"],[40,"*"],[41,"'"],[42,"─"],[43,"©"],[44,"℠"],[45,"·"],[46,"“"],[47,"”"],[48,"À"],[49,"Â"],[50,"Ç"],[51,"È"],[52,"Ê"],[53,"Ë"],[54,"ë"],[55,"Î"],[56,"Ï"],[57,"ï"],[58,"Ô"],[59,"Ù"],[60,"ù"],[61,"Û"],[62,"«"],[63,"»"]]),v3=new Map([[32,"Ã"],[33,"ã"],[34,"Í"],[35,"Ì"],[36,"ì"],[37,"Ò"],[38,"ò"],[39,"Õ"],[40,"õ"],[41,"{"],[42,"}"],[43,"\\"],[44,"^"],[45,"_"],[46,"|"],[47,"~"],[48,"Ä"],[49,"ä"],[50,"Ö"],[51,"ö"],[52,"ß"],[53,"¥"],[54,"¤"],[55,"│"],[56,"Å"],[57,"å"],[58,"Ø"],[59,"ø"],[60,"┌"],[61,"┐"],[62,"└"],[63,"┘"]]),eT=new Map([[1,10],[2,15.33],[3,20.66],[4,26],[5,31.33],[6,36.66],[7,42],[8,47.33],[9,52.66],[10,58],[11,63.33],[12,68.66],[13,74],[14,79.33],[15,84.66]]);function lv(e,t){this.h=0,this.o=new O1(e,t),this.i=new O1(e,t),this.g=this.j=new O1(e,t),this.l=0,this.m=null}function k1(e,t,n){e.g=e.i;var i=e.g,r=null;return e.h!==3&&e.h!==4&&(r=ov(i,e.l,n),n=e.i,n.g=0<n.h?n.h:0,Bu(n,0,15),n=e.j,n.g=0<n.h?n.h:0,Bu(n,0,15),i.g=15),e.h=3,i.h=t,r}function tT(e){e.h=1,e.g=e.j,e.g.h=0}function nT(e){_o("Cea608DataChannel","CEA-608 text mode entered, but is unsupported"),e.g=e.o,e.h=4}var S3="black green blue cyan red yellow magenta black".split(" "),iT="white green blue cyan red yellow magenta white_italics".split(" ");function R1(e,t){this.I=t,this.M=e,this.K=this.l=!1,this.m=this.o=this.G=this.L=this.H=0,this.F=2,this.i=[],this.g=this.h=this.j=0,this.C=this.A=!1,this.B="white",this.u="black",M1(this)}function M1(e){e.i=[];for(var t=0;16>t;t++)e.i.push(N1())}function N1(){for(var e=[],t=0;42>t;t++)e.push(null);return e}function dc(e,t){rT(e)&&(e.i[e.h][e.g]=new Jw(t,e.C,e.A,e.u,e.B),e.g++)}function rT(e){var t=e.g<e.m&&0<=e.g;return e.h<e.o&&0<=e.h&&t}R1.prototype.isVisible=function(){return this.l};function w3(e){for(var t=0,n=1;16>n;n++,t++)e.i[t]=e.i[n];for(n=0;1>n;n++,t++)e.i[t]=N1()}function _f(e,t,n){var i=new Qt(e.j,t,"");i.textAlign=e.F===0?"left":e.F===1?"right":Yi;var r=i.region;switch(e.I&&(r.id+="svc"+e.I),r.id+="win"+e.M,r.height=e.o,r.width=e.m,r.heightUnits=2,r.widthUnits=2,r.viewportAnchorX=e.H,r.viewportAnchorY=e.L,r.viewportAnchorUnits=e.K?Gi:2,e.G){case 0:r.regionAnchorX=0,r.regionAnchorY=0;break;case 1:r.regionAnchorX=50,r.regionAnchorY=0;break;case 2:r.regionAnchorX=100,r.regionAnchorY=0;break;case 3:r.regionAnchorX=0,r.regionAnchorY=50;break;case 4:r.regionAnchorX=50,r.regionAnchorY=50;break;case 5:r.regionAnchorX=100,r.regionAnchorY=50;break;case 6:r.regionAnchorX=0,r.regionAnchorY=100;break;case 7:r.regionAnchorX=50,r.regionAnchorY=100;break;case 8:r.regionAnchorX=100,r.regionAnchorY=100}return(n=Ww(i,"svc"+n,e.i,e.j,t))&&(e.j=t),n}R1.prototype.display=function(){this.l=!0};function T3(){this.i=[],this.h=null,this.g=0}function x3(e,t){t.type===3?(e.g=2*(t.value&63)-1,e.h=[]):e.h&&(0<e.g&&(e.h.push(t),e.g--),e.g===0&&(e.i.push(new Oy(e.h)),e.h=null,e.g=0))}function Oy(e){this.g=0,this.h=e}Oy.prototype.ta=function(){return this.g<this.h.length},Oy.prototype.Ba=function(){return this.g};function ei(e){if(!e.ta())throw new Y(2,2,3e3);return e.h[e.g++]}Oy.prototype.skip=function(e){if(this.g+e>this.h.length)throw new Y(2,2,3e3);this.g+=e},Oy.prototype.qh=function(e){if(0>this.g-e)throw new Y(2,2,3e3);this.g-=e};function E3(e){this.i=e,this.h=[null,null,null,null,null,null,null,null],this.g=null}function A3(e,t,n,i){if(!e.g)return[];if(n==24)return n=ei(t).value,i=ei(t).value,n=function(l){return l.map(function(c){return("0"+(c&255).toString(16)).slice(-2)}).join("")}([n,i]),dc(e.g,String.fromCharCode(parseInt(n,16))),[];t=e.g;var r=null;switch(n){case 8:!rT(t)||0>=t.g&&0>=t.h||(0>=t.g?(t.g=t.m-1,t.h--):t.g--,t.i[t.h][t.g]=null);break;case 13:t.isVisible()&&(r=_f(t,i,e.i)),t.h+1>=t.o?w3(t):t.h++,t.g=0;break;case 14:t.isVisible()&&(r=_f(t,i,e.i)),t.i[t.h]=N1(),t.g=0;break;case 12:t.isVisible()&&(r=_f(t,i,e.i)),M1(t),t.h=0,t.g=0}return r?[r]:[]}function C3(e,t,n,i){if(128<=n&&135>=n)i=n&7,e.h[i]&&(e.g=e.h[i]);else{if(n===136){n=ei(t).value,t=[],n=b(ky(e,n));for(var r=n.next();!r.done;r=n.next()){if(r=e.h[r.value],r.isVisible()){var l=_f(r,i,e.i);l&&t.push(l)}M1(r)}return t}if(n===137)for(t=ei(t).value,t=b(ky(e,t)),n=t.next();!n.done;n=t.next())n=e.h[n.value],n.isVisible()||(n.j=i),n.display();else{if(n===138){for(n=ei(t).value,t=null,n=b(ky(e,n)),r=n.next();!r.done;r=n.next())r=e.h[r.value],r.isVisible()&&(t=_f(r,i,e.i)),r.l=!1;return t?[t]:[]}if(n===139){for(n=ei(t).value,t=null,n=b(ky(e,n)),r=n.next();!r.done;r=n.next())r=e.h[r.value],r.isVisible()?t=_f(r,i,e.i):r.j=i,r.l=!r.l;return t?[t]:[]}if(n===140)return t=ei(t).value,oT(e,t,i);if(n===143)return i=oT(e,255,i),lT(e),i;if(n===144)t.skip(1),i=ei(t).value,e.g&&(e.g.A=0<(i&128),e.g.C=0<(i&64));else if(n===145)i=ei(t).value,n=ei(t).value,t.skip(1),e.g&&(t=aT((n&48)>>4,(n&12)>>2,n&3),e.g.B=aT((i&48)>>4,(i&12)>>2,i&3),e.g.u=t);else if(n===146)i=ei(t).value,t=ei(t).value,e.g&&(e=e.g,e.h=i&15,e.g=t&63);else if(n===151)t.skip(1),t.skip(1),i=ei(t).value,t.skip(1),e.g&&(e.g.F=i&3);else if(152<=n&&159>=n){n=(n&15)-8,r=e.h[n]!==null,r||(l=new R1(n,e.i),l.j=i,e.h[n]=l),i=ei(t).value,l=ei(t).value;var c=ei(t).value,f=ei(t).value,y=ei(t).value;t=ei(t).value,r&&(t&7)===0||(t=e.h[n],t.h=0,t.g=0,t.C=!1,t.A=!1,t.B="white",t.u="black"),t=e.h[n],t.l=0<(i&32),t.L=l&127,t.H=c,t.G=(f&240)>>4,t.K=0<(l&128),t.o=(f&15)+1,t.m=(y&63)+1,e.g=e.h[n]}}}return[]}function ky(e,t){for(var n=[],i=0;8>i;i++)(t&1)===1&&e.h[i]&&n.push(i),t>>=1;return n}function oT(e,t,n){var i=[];t=b(ky(e,t));for(var r=t.next();!r.done;r=t.next()){r=r.value;var l=e.h[r];l.isVisible()&&(l=_f(l,n,e.i))&&i.push(l),e.h[r]=null}return i}function lT(e){e.g=null,e.h=[null,null,null,null,null,null,null,null]}function aT(e,t,n){var i={0:0,1:0,2:1,3:1};return e=i[e],t=i[t],n=i[n],b3[e<<2|t<<1|n]}var uT=new Map([[32," "],[33," "],[37,"…"],[42,"Š"],[44,"Œ"],[48,"█"],[49,""],[50,""],[51,"“"],[52,"”"],[53,"•"],[57,"™"],[58,"š"],[60,"œ"],[61,"℠"],[63,"Ÿ"],[118,"⅛"],[119,"⅜"],[120,"⅝"],[121,"⅞"],[122,"│"],[123,"┐"],[124,"└"],[125,"─"],[126,"┘"],[127,"┌"]]),b3="black blue green cyan red magenta yellow white".split(" ");function yp(){this.h=[],this.g=[],this.i=new T3,this.l=0,this.m=new Map([["CC1",new lv(0,0)],["CC2",new lv(0,1)],["CC3",new lv(1,0)],["CC4",new lv(1,1)]]),this.u=this.o=0,this.j=new Map,this.B=!0,this.A=new Set,P1(this)}yp.prototype.clear=function(){this.l=0,this.h=[],this.g=[];var e=this.i;e.i=[],e.h=[],e.g=0,P1(this),e=b(this.j.values());for(var t=e.next();!t.done;t=e.next())lT(t.value)};function P1(e){e.o=0,e.u=0;for(var t=b(e.m.values()),n=t.next();!n.done;n=t.next())n=n.value,n.h=0,n.g=n.j,n.m=null,Dy(n.i),Dy(n.j),Dy(n.o);e.B=!0}yp.prototype.extract=function(e,t){if(this.B){for(var n=b(this.m.values()),i=n.next();!i.done;i=n.next())i.value.l=t;this.B=!1}if(e=new Zt(e,0),!(8>e.getLength())&&e.X()===181&&e.na()===49&&e.S()===1195456820&&e.X()===3&&(n=e.X(),(n&64)!==0))for(n&=31,e.skip(1),i=0;i<n;i++){var r=e.X(),l=(r&4)>>2,c=e.X(),f=e.X();l&&(r&=3,r===0||r===1?this.h.push({pts:t,type:r,mb:c,Mb:f,order:this.h.length}):(this.g.push({pts:t,type:r,value:c,order:this.g.length}),this.g.push({pts:t,type:2,value:f,order:this.g.length})))}},yp.prototype.decode=function(){function e(r,l){return r.pts-l.pts||r.order-l.order}var t=[];this.h.sort(e),this.g.sort(e);for(var n=b(this.h),i=n.next();!i.done;i=n.next())(i=I3(this,i.value))&&t.push(i);for(n=b(this.g),i=n.next();!i.done;i=n.next())x3(this.i,i.value);for(n=b(this.i.i),i=n.next();!i.done;i=n.next())i=D3(this,i.value),t.push.apply(t,J(i));return this.i.i=[],this.h=[],this.g=[],t};function I3(e,t){var n=t.type;if((t.mb&112)===16){var i=t.mb>>3&1;n===0?e.o=i:e.u=i}if(i="CC"+((n<<1|(n?e.u:e.o))+1),n=e.m.get(i),t.mb===255&&t.Mb===255||!t.mb&&!t.Mb||!sT(t.mb)||!sT(t.Mb))return 45<=++e.l&&P1(e),null;e.l=0,t.mb&=127,t.Mb&=127;var r=t.mb;if(1<=r&&15>=r||!t.mb&&!t.Mb)return null;if(r=null,(t.mb&112)===16)e:{if(e.A.add(i),i=t.mb,e=t.Mb,n.m===(i<<8|e))n.m=null;else if(n.m=i<<8|e,(i&240)===16&&(e&192)===64){t=[11,11,1,2,3,4,12,13,14,15,5,6,7,8,9,10][(i&7)<<1|e>>5&1],i="white",r=!1;var l=null,c=95<e?e-96:e-64;13>=c?i=iT[Math.floor(c/2)]:15>=c?r=!0:l=Math.floor((c-16)/2),e=(e&1)===1,n.h!==4&&(c=n.g,n.h===3&&t!==c.g&&(n=1+t-c.h,Zw(c,n,1+c.g-c.h,c.h),Bu(c,0,n-1),Bu(c,t+1,15-t)),c.g=t,c.m=e,c.j=r,c.l=i,c.u=l,c.o="black")}else if((i&247)===17&&(e&240)===32)n.g.m=!1,n.g.j=!1,n.g.l="white",hp(n.g,0,32),i=!1,t=iT[(e&14)>>1],t==="white_italics"&&(t="white",i=!0),n.g.m=(e&1)===1,n.g.j=i,n.g.l=t;else if((i&247)===16&&(e&240)===32||(i&247)===23&&(e&255)===45)t="black",(i&7)===0&&(t=S3[(e&14)>>1]),n.g.o=t;else if((i&247)===17&&(e&240)===48)hp(n.g,1,e);else if((i&246)===18&&(e&224)===32)hp(n.g,i&1?3:2,e);else{if((i&246)===20&&(e&240)===32){switch(e=t.pts,i=null,t.Mb){case 32:tT(n);break;case 33:n=n.g,n.i[n.g].pop();break;case 37:i=k1(n,2,e);break;case 38:i=k1(n,3,e);break;case 39:i=k1(n,4,e);break;case 40:hp(n.g,0,32);break;case 41:n.h=2,n.g=n.i,n.g.h=0,n.l=e;break;case 42:Dy(n.o),nT(n);break;case 43:nT(n);break;case 44:t=n.i,i=null,n.h!==4&&(i=ov(t,n.l,e)),Bu(t,0,15);break;case 45:t=n.g,n.h!==3?i=null:(i=ov(t,n.l,e),r=t.g-t.h+1,Zw(t,r-1,r,t.h),Bu(t,0,r-1),Bu(t,t.g,15-t.g),n.l=e);break;case 46:Bu(n.j,0,15);break;case 47:t=null,n.h!==4&&(t=ov(n.i,n.l,e)),i=n.j,n.j=n.i,n.i=i,tT(n),n.l=e,i=t}r=i;break e}(i==23||i==31)&&33<=e&&35>=e&&(n.g.A=e-32)}r=null}else e=t.Mb,hp(n.g,0,t.mb),hp(n.g,0,e);return r}function D3(e,t){var n=[];try{for(;t.ta();){var i=ei(t).value,r=(i&224)>>5,l=i&31;if(r===7&&l!=0&&(r=ei(t).value&63),r!=0){e.A.add("svc"+r),e.j.has(r)||e.j.set(r,new E3(r));for(var c=e.j.get(r),f=t.Ba();t.Ba()-f<l;){r=c;var y=t,m=ei(y),T=m.value,x=m.pts;if(T===16){var D=ei(y);T=T<<16|D.value}if(0<=T&&31>=T)var R=A3(r,y,T,x);else if(128<=T&&159>=T)R=C3(r,y,T,x);else{if(4096<=T&&4127>=T)r=y,y=T&255,8<=y&&15>=y?r.skip(1):16<=y&&23>=y?r.skip(2):24<=y&&31>=y&&r.skip(3);else if(4224<=T&&4255>=T)r=y,y=T&255,128<=y&&135>=y?r.skip(4):136<=y&&143>=y&&r.skip(5);else if(32<=T&&127>=T)y=T,r.g&&(y===127?dc(r.g,"♪"):dc(r.g,String.fromCharCode(y)));else if(160<=T&&255>=T)r.g&&dc(r.g,String.fromCharCode(T));else if(4128<=T&&4223>=T){if(y=T&255,r.g)if(uT.has(y)){var N=uT.get(y);dc(r.g,N)}else dc(r.g,"_")}else 4256<=T&&4351>=T&&r.g&&((T&255)!=160?dc(r.g,"_"):dc(r.g,"[CC]"));R=[]}n.push.apply(n,J(R))}}}}catch(U){if(U instanceof Y&&U.code===3e3)_o("CEA708_INVALID_DATA","Buffer read out of bounds / invalid CEA-708 Data.");else throw U}return n}function sT(e){for(var t=0;e;)t^=e&1,e>>=1;return t===1}yp.prototype.getStreams=function(){return Array.from(this.A)},Pe("shaka.cea.CeaDecoder",yp),as=function(){return new yp};function cT(e){for(var t=[],n=e,i=e=0;i<n.length;)e==2&&n[i]==3?(e=0,n=[].concat(J(n)),n.splice(i,1),n=new Uint8Array(n)):n[i]==0?e++:e=0,i++;for(e=n,i=0;i<e.length;){for(n=0;e[i]==255;)n+=255,i++;n+=e[i++];for(var r=0;e[i]==255;)r+=255,i++;r+=e[i++],n==4&&t.push(e.subarray(i,i+r)),i+=r}return t}function av(){this.j=new Map,this.i=this.h=0,this.g=L1}av.prototype.init=function(e){function t(l){l=l.name,uv.has(l)&&(n.g=uv.get(l))}var n=this,i=[],r=[];if(new jt().box("moov",$e).box("mvex",$e).R("trex",function(l){var c=l.reader;c.skip(4),c.skip(4),l=c.S(),c=c.S(),n.h=l,n.i=c}).box("trak",$e).R("tkhd",function(l){var c=l.reader;l=l.version,l==1?(c.skip(8),c.skip(8)):(c.skip(4),c.skip(4));var f=c.S();l==1?c.skip(8):c.skip(4),c.skip(4),c.skip(8),c.skip(2),c.skip(2),c.skip(2),c.skip(2),c.skip(36),c.na(),c.na(),c.na(),c.na(),i.push(f)}).box("mdia",$e).R("mdhd",function(l){l=$c(l.reader,l.version),r.push(l.timescale)}).box("minf",$e).box("stbl",$e).R("stsd",bn).box("avc1",t).box("avc3",t).box("dvav",t).box("dva1",t).box("hev1",t).box("hvc1",t).box("dvh1",t).box("dvhe",t).box("vvc1",t).box("vvi1",t).box("dvc1",t).box("dvi1",t).box("encv",Mi).box("sinf",$e).box("frma",function(l){l=Nh(l.reader).codec,uv.has(l)&&(n.g=uv.get(l))}).parse(e,!0),!i.length||!r.length||i.length!=r.length)throw new Y(2,2,2010);this.g==L1&&bt("Unable to determine bitstream format for CEA parsing!"),i.forEach(function(l,c){n.j.set(l,r[c])})},av.prototype.parse=function(e){var t=this;if(this.g==L1)return[];var n=[],i=0,r=[];return new jt().box("moof",function(l){i=l.start,r=[],$e(l)}).box("traf",function(l){r.push({baseMediaDecodeTime:null,ld:t.h,md:t.i,lh:[],timescale:9e4}),$e(l)}).R("trun",function(l){var c=r[r.length-1];l=ef(l.reader,l.version,l.flags),c.lh.push(l)}).R("tfhd",function(l){var c=r[r.length-1];l=va(l.reader,l.flags),c.ld=l.ld||t.h,c.md=l.md||t.i,l=l.trackId,t.j.has(l)&&(c.timescale=t.j.get(l))}).R("tfdt",function(l){var c=r[r.length-1];l=fu(l.reader,l.version),c.baseMediaDecodeTime=l.baseMediaDecodeTime}).box("mdat",function(l){for(var c=i-l.start-8,f=l.reader.Ba(),y=b(r),m=y.next();!m.done;m=y.next()){if(m=m.value,m.baseMediaDecodeTime===null)throw bt("Unable to find base media decode time for CEA captions!"),new Y(2,2,2010);l.reader.seek(f),O3(t,l.reader,m.baseMediaDecodeTime,m.timescale,m.ld,m.md,c,m.lh,n)}}).parse(e,!1),n};function O3(e,t,n,i,r,l,c,f,y){var m=0,T=l,x=f.map(function(N){return N.fg});for(x=[].concat.apply([],J(x)),x.length&&(T=x[0].sampleSize||l),t.skip(c+f[0].nf);t.ta();){c=t.S();var D=t.X(),R=null;switch(R=!1,f=1,e.g){case Ry:R=D&31,R=R==6;break;case My:f=2,t.skip(1),R=D>>1&63,R=R==39||R==40;break;case Ny:f=2,t.skip(1),R=D>>1&63,R=R==23||R==24;break;default:return}if(R)for(D=0,m<x.length&&(D=x[m].ye||0),D=(n+D)/i,f=b(cT(t.Cb(c-f))),R=f.next();!R.done;R=f.next())y.push({packet:R.value,pts:D});else try{t.skip(c-f)}catch{break}T-=c+4,T==0&&(n=m<x.length?n+(x[m].gg||r):n+r,m++,m<x.length?T=x[m].sampleSize||l:T=l)}}Pe("shaka.cea.Mp4CeaParser",av);var L1=0,Ry=1,My=2,Ny=3,uv=new Map().set("avc1",Ry).set("avc3",Ry).set("dvav",Ry).set("dva1",Ry).set("hev1",My).set("hvc1",My).set("dvh1",My).set("dvhe",My).set("vvc1",Ny).set("vvi1",Ny).set("dvc1",Ny).set("dvi1",Ny);Rc("video/mp4",function(){return new av});function sv(){this.g=null}sv.prototype.init=function(){},sv.prototype.parse=function(e){this.g?this.g.clearData():this.g=new $t;var t=[];if(e=Ze(e),!Vs(e))return t;e=this.g.parse(e);var n=e.od(),i=e.be();switch(e=[],n.video){case"avc":e.push(6);break;case"hvc":e.push(39),e.push(40)}if(!e.length)return t;for(n=b(i),i=n.next();!i.done;i=n.next())if(i=i.value,e.includes(i.type)&&i.time!=null)for(var r=b(cT(i.data)),l=r.next();!l.done;l=r.next())t.push({packet:l.value,pts:i.time});return t},Pe("shaka.cea.TsCeaParser",sv),Rc("video/mp2t",function(){return new sv});function k3(e){var t=0,n=Ei(e),i=n.getUint32(t,!0);if(i!=e.byteLength)return[];e:{for(e=t+6,t=[];e<n.byteLength-1;){i=n.getUint16(e,!0),e+=2;var r=n.getUint16(e,!0);if(e+=2,(r&1)!=0||r+e>n.byteLength){n=[];break e}var l=Ze(n,e,r);t.push({type:i,value:l}),e+=r}n=t}return n}function fT(e){return e=Fi(In(e)),e=k3(e).filter(function(t){return t.type===R3})[0],e?(e=gl(e.value,!0),(e=Ya(e,"WRMHEADER"))?e:null):null}function cv(e){try{var t=fT(e);if(t)e:{for(var n=b(Ur(t,"DATA")),i=n.next();!i.done;i=n.next()){var r=i.value;if(r.children)for(var l=b(r.children),c=l.next();!c.done;c=l.next()){var f=c.value;if(f.tagName=="LA_URL"){var y=In(f);break e}}}y=""}else y="";return y}catch{return""}}var R3=1;function dT(e,t,n){var i=P3(e),r=null;e=[];var l=[],c=null,f=new Set(i.map(function(m){return m.keyId}));f.delete(null);var y="cenc";if(1<f.size)throw new Y(2,4,4010);if(!t){if(l=i.filter(function(m){return m.cd=="urn:mpeg:dash:sea:2012"}),1<l.length)throw new Y(2,4,4050);l.length&&(c=_3(l[0])),(l=i.find(function(m){return m.cd=="urn:mpeg:dash:mp4protection:2011"}))&&l.encryptionScheme&&(y=l.encryptionScheme),l=i.filter(function(m){return m.cd=="urn:mpeg:dash:mp4protection:2011"?(r=m.init||r,!1):m.cd!="urn:mpeg:dash:sea:2012"}),l.length&&(e=N3(r,y,l,n,f),e.length==0&&(e=[Lr("",y,r)]))}if(i.length&&!c&&(t||!l.length))for(e=[],t=b(Object.values(n)),n=t.next();!n.done;n=t.next())n=n.value,n!="org.w3.clearkey"&&e.push(Lr(n,y,r));if(f=Array.from(f)[0]||null)for(y=b(e),t=y.next();!t.done;t=y.next())for(t=b(t.value.initData),n=t.next();!n.done;n=t.next())n.value.keyId=f;return{Jg:f,Pk:r,drmInfos:e,cf:c,Og:!0}}function M3(e,t,n,i){var r=dT(e,n,i);if(t.Og)e=t.drmInfos.length==1&&!t.drmInfos[0].keySystem,n=r.drmInfos.length==0,(t.drmInfos.length==0||e&&!n)&&(t.drmInfos=r.drmInfos),t.Og=!1;else if(0<r.drmInfos.length&&(t.drmInfos=t.drmInfos.filter(function(l){return r.drmInfos.some(function(c){return c.keySystem==l.keySystem})}),t.drmInfos.length==0))throw new Y(2,4,4008);return r.Jg||t.Jg}function fv(e){var t=Tr(e.node,"https://dashif.org/CPS","Laurl");if(t&&(t=In(t)))return t;if((t=Tr(e.node,"urn:microsoft:playready","pro"))&&In(t))return cv(t);if((e=Tr(e.node,"urn:mpeg:cenc:2013","pssh"))&&(e=In(e))){t=Fi(e),e=8,t=Ei(t);var n=t.getUint8(e);return e+=20,0<n&&(e+=4+16*t.getUint32(e)),e=Ze(t,e+4),e=ml(e),e=Ya("<pro>"+e+"</pro>"),cv(e)}return""}function N3(e,t,n,i,r){var l=[];n=b(n);for(var c=n.next();!c.done;c=n.next()){c=c.value;var f=i[c.cd];if(f){var y;if((y=Tr(c.node,"urn:microsoft:playready","pro"))&&In(y)){y=In(y),y=Fi(y);var m=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);y=[{initData:Yc(y,m,new Set,0),initDataType:"cenc",keyId:c.keyId}]}else y=null;if(m=null,c.cd==="urn:uuid:e2719d58-a985-b3c9-781a-b030af78d30e"){m=c;var T=r;if(T.size==0)m=null;else{var x=new Uint8Array([16,119,239,236,192,178,77,2,172,227,60,30,82,226,251,75]),D=new Uint8Array([]);m=[{initData:Yc(D,x,T,1),initDataType:"cenc",keyId:m.keyId}]}}y=Lr(f,t,c.init||e||y||m),(f=U3.get(f))&&(y.licenseServerUri=f(c)),l.push(y)}}return l}function P3(e){var t=[];e=b(e);for(var n=e.next();!n.done;n=e.next())(n=L3(n.value))&&t.push(n);return t}function L3(e){var t=e.attributes.schemeIdUri,n=wl(e,"urn:mpeg:cenc:2013","default_KID"),i=Dg(e,"urn:mpeg:cenc:2013","pssh").map(Xi),r=e.attributes.value;if(!t)return null;if(t=t.toLowerCase(),n&&(n=n.replace(/-/g,"").toLowerCase(),n.includes(" ")))throw new Y(2,4,4009);var l=[];try{l=i.map(function(c){return{initDataType:"cenc",initData:Fi(c),keyId:null}})}catch{throw new Y(2,4,4007)}return{node:e,cd:t,keyId:n,init:0<l.length?l:null,encryptionScheme:r}}function _3(e){if(!w.crypto||!w.crypto.subtle)throw bt("Web Crypto API is not available to decrypt AES-128. (Web Crypto only exists in secure origins like https)"),new Y(2,4,4042);var t=Tr(e.node,"urn:mpeg:dash:schema:sea:2012","SegmentEncryption");if(!t)throw new Y(2,4,4051);if(t.attributes.schemeIdUri!="urn:mpeg:dash:sea:aes128-cbc:2013")throw new Y(2,4,4051);if(t=Tr(e.node,"urn:mpeg:dash:schema:sea:2012","CryptoPeriod"),!t)throw new Y(2,4,4051);if(e=t.attributes.IV,t=Ai(t.attributes.keyUriTemplate),!e||!t)throw new Y(2,4,4051);if(e=la(e.substr(2)),e.byteLength!=16)throw new Y(2,4,4048);return{Xi:t,iv:e}}var U3=new Map().set("com.apple.fps",function(e){if(w.shakaMediaKeysPolyfill==="apple")throw new Y(2,4,4054);return(e=Tr(e.node,"https://dashif.org/CPS","Laurl"))&&(e=In(e))?e:""}).set("com.widevine.alpha",function(e){var t=Tr(e.node,"https://dashif.org/CPS","Laurl");return t&&(t=In(t))?t:(e=Tr(e.node,"urn:microsoft","laurl"))&&Ai(e.attributes.licenseUrl)||""}).set("com.microsoft.playready",fv).set("com.microsoft.playready.recommendation",fv).set("com.microsoft.playready.software",fv).set("com.microsoft.playready.hardware",fv).set("org.w3.clearkey",function(e){var t=Tr(e.node,"https://dashif.org/CPS","Laurl");return t&&(t=In(t))?t:(e=Tr(e.node,"http://dashif.org/guidelines/clearKey","Laurl"))&&e.attributes.Lic_type==="EME-1.0"&&e&&(e=In(e))?e:""});function Py(e,t,n,i,r,l){var c=new Map().set("RepresentationID",t).set("Number",n).set("SubNumber",i).set("Bandwidth",r).set("Time",l);return e.replace(/\$(RepresentationID|Number|SubNumber|Bandwidth|Time)?(?:%0([0-9]+)([diouxX]))?\$/g,function(f,y,m,T){if(f=="$$")return"$";var x=c.get(y);if(x==null)return f;switch(y=="RepresentationID"&&m&&(m=void 0),y=="Time"&&typeof x!="bigint"&&(.2<=Math.abs(x-Math.round(x))&&bt("Calculated $Time$ values must be close to integers"),x=Math.round(x)),T){case void 0:case"d":case"i":case"u":f=x.toString();break;case"o":f=x.toString(8);break;case"x":f=x.toString(16);break;case"X":f=x.toString(16).toUpperCase();break;default:f=x.toString()}return m=w.parseInt(m,10)||1,Array(Math.max(0,m-f.length)+1).join("0")+f})}function pT(e,t){var n=sl(e,t,"timescale"),i=1;n&&(i=xl(n)||1),n=sl(e,t,"duration");var r=(n=xl(n||""))?n/i:null,l=sl(e,t,"startNumber"),c=Number(sl(e,t,"presentationTimeOffset"))||0,f=$n(l||"");if((l==null||f==null)&&(f=1),l=null,t=gp(e,t,"SegmentTimeline")){t=Lt(t,"S"),l=i,e=e.ha.duration||1/0;for(var y=f,m=[],T=-c,x=0;x<t.length;++x){var D=t[x],R=t[x+1],N=Ge(D,"t",$n),U=Ge(D,"d",$n),L=Ge(D,"r",Zn);if(D=Ge(D,"k",Zn)||0,N!=null&&(N-=c),U){if(N=N??T,L=L||0,0>L)if(R){if(R=Ge(R,"t",$n),R==null)break;if(N>=R)break;L=Math.ceil((R-N)/U)-1}else{if(e==1/0)break;if(N/l>=e)break;L=Math.ceil((e*l-N)/U)-1}for(0<m.length&&N!=T&&(m[m.length-1].end=N/l),R=0;R<=L;++R)T=N+U,m.push({start:N/l,end:T/l,xg:N,Jb:D,wj:m.length+y}),N=T}}l=m}return{timescale:i,He:n,Wa:r,Ld:f,hc:c/i||0,wg:c,timeline:l}}function hT(e,t){return[t(e.J),t(e.ga),t(e.qa)].filter(Fo)}function sl(e,t,n){t=hT(e,t),e=null,t=b(t);for(var i=t.next();!i.done&&!(e=i.value.attributes[n]);i=t.next());return e}function gp(e,t,n){t=hT(e,t),e=null,t=b(t);for(var i=t.next();!i.done&&!(e=An(i.value,n));i=t.next());return e}function j3(e,t,n,i,r,l){for(var c=wl(e,"http://www.w3.org/1999/xlink","href"),f=wl(e,"http://www.w3.org/1999/xlink","actuate")||"onRequest",y=b(Object.keys(e.attributes)),m=y.next();!m.done;m=y.next()){m=m.value;var T=m.split(":"),x=$p("http://www.w3.org/1999/xlink");T[0]==x&&delete e.attributes[m]}if(5<=l)return _l(new Y(2,4,4028));if(f!="onLoad")return _l(new Y(2,4,4027));var D=_n([i],[c]);return r.request(0,cn(D,t)).Ha(function(R){if(R=Mc(R.data,e.tagName),!R)return _l(new Y(2,4,4001,c));for(e.children=[];R.children.length;){var N=R.children.shift();e.children.push(N)}N=b(Object.keys(R.attributes));for(var U=N.next();!U.done;U=N.next())U=U.value,e.attributes[U]=R.attributes[U];return dv(e,t,n,D[0],r,l+1)})}function dv(e,t,n,i,r,l){if(l=l===void 0?0:l,wl(e,"http://www.w3.org/1999/xlink","href")){var c=j3(e,t,n,i,r,l);return n&&(c=c.Ha(void 0,function(){return dv(e,t,n,i,r,l)})),c}c=[];for(var f=b(ps(e)),y=f.next(),m={};!y.done;m={hd:void 0},y=f.next())m.hd=y.value,wl(m.hd,"http://www.w3.org/1999/xlink","href")=="urn:mpeg:dash:resolve-to-zero:2013"?e.children=e.children.filter(function(T){return function(x){return x!==T.hd}}(m)):m.hd.tagName!="SegmentTimeline"&&c.push(dv(m.hd,t,n,i,r,l));return gd(c).Ha(function(){return e})}function B3(e,t,n,i,r,l,c){var f,y=new jt().R("sidx",function(m){f=V3(t,i,r,l,c,n,m)});if(e&&y.parse(e),f)return f;throw new Y(2,3,3004)}function V3(e,t,n,i,r,l,c){var f=[];c.reader.skip(4);var y=c.reader.S();if(y==0)throw new Y(2,3,3005);if(c.version==0)var m=c.reader.S(),T=c.reader.S();else m=c.reader.bd(),T=c.reader.bd();c.reader.skip(2);var x=c.reader.na();for(e=e+c.size+T,T=0;T<x;T++){var D=c.reader.S(),R=(D&2147483648)>>>31;D&=2147483647;var N=c.reader.S();if(c.reader.skip(4),R==1)throw new Y(2,3,3006);f.push(new qe(m/y+n,(m+N)/y+n,function(){return l},e,e+D-1,t,n,i,r)),m+=N,e+=D}return c.parser.stop(),f}function pc(e){this.h=Ei(e),this.g=new Zt(this.h,0)}pc.prototype.ta=function(){return this.g.ta()};function Vu(e){var t=yT(e);if(7<t.length)throw new Y(2,3,3002);var n=0;t=b(t);for(var i=t.next();!i.done;i=t.next())n=256*n+i.value;t=yT(e);e:{i=b(H3);for(var r=i.next();!r.done;r=i.next())if(dl(t,new Uint8Array(r.value))){i=!0;break e}i=!1}if(i)t=e.h.byteLength-e.g.Ba();else{if(t.length==8&&t[1]&224)throw new Y(2,3,3001);for(r=i=0;r<t.length;r++){var l=t[r];i=r==0?l&(1<<8-t.length)-1:256*i+l}t=i}return t=e.g.Ba()+t<=e.h.byteLength?t:e.h.byteLength-e.g.Ba(),i=Ei(e.h,e.g.Ba(),t),e.g.skip(t),new K3(n,i)}function yT(e){var t=e.g.Ba(),n=e.g.X();if(n==0)throw new Y(2,3,3002);return n=8-Math.floor(Math.log2(n)),e.g.skip(n-1),Ze(e.h,t,n)}var H3=[[255],[127,255],[63,255,255],[31,255,255,255],[15,255,255,255,255],[7,255,255,255,255,255],[3,255,255,255,255,255,255],[1,255,255,255,255,255,255,255]];function K3(e,t){this.id=e,this.g=t}function _1(e){if(8<e.g.byteLength)throw new Y(2,3,3002);if(e.g.byteLength==8&&e.g.getUint8(0)&224)throw new Y(2,3,3001);for(var t=0,n=0;n<e.g.byteLength;n++){var i=e.g.getUint8(n);t=256*t+i}return t}function q3(e,t,n,i,r,l,c,f,y){function m(){return r}var T=[];e=new pc(e.g);for(var x=null,D=null;e.ta();){var R=Vu(e);if(R.id==187){var N=F3(R);N&&(R=n*N.Jj,N=t+N.nj,x!=null&&T.push(new qe(x+c,R+c,m,D,N-1,l,c,f,y)),x=R,D=N)}}return x!=null&&T.push(new qe(x+c,i+c,m,D,null,l,c,f,y)),T}function F3(e){var t=new pc(e.g);if(e=Vu(t),e.id!=179)throw new Y(2,3,3013);if(e=_1(e),t=Vu(t),t.id!=183)throw new Y(2,3,3012);t=new pc(t.g);for(var n=0;t.ta();){var i=Vu(t);if(i.id==241){n=_1(i);break}}return{Jj:e,nj:n}}function gT(e,t,n){if(t=gp(e,t,"Initialization"),!t)return null;var i=e.J.Ua(),r=t.attributes.sourceURL;r&&(i=_n(i,[Ai(r)],e.vb())),r=0;var l=null;return(t=Ge(t,"range",sa))&&(r=t.start,l=t.end),n=new bi(function(){return i},r,l,wT(e),null,null,n,e.ga.encrypted),n.codecs=e.J.codecs,n.mimeType=e.J.mimeType,e.ha&&(n.g=e.ha.start+e.ha.duration),n}function z3(e,t,n){var i=Number(sl(e,mp,"presentationTimeOffset"))||0,r=sl(e,mp,"timescale"),l=1;r&&(l=xl(r)||1);var c=i/l||0,f=gT(e,mp,n);G3(e,f);var y=Xa(e);return{rc:function(){var m=gp(y,mp,"RepresentationIndex"),T=y.J.Ua();return m&&(m=Ai(m.attributes.sourceURL))&&(T=_n(T,[m],y.vb())),m=vT(y),mT(y,t,f,T,m.start,m.end,c)}}}function mT(e,t,n,i,r,l,c){var f,y,m,T,x,D,R,N,U,L,j,V,X,G,Z,q,K,W;return z(function(Q){if(Q.g==1)return f=e.presentationTimeline,y=!e.Ob||!e.ha.$g,m=e.ha.start,T=e.ha.duration,x=e.J.mimeType.split("/")[1],D=t,R=null,N=[D(i,r,l,!1),x=="webm"?D(n.N(),n.Sa,n.wa,!0):null],D=null,_(Q,Promise.all(N),2);if(U=Q.h,L=U[0],j=U[1]||null,V=null,X=m-c,G=m,Z=T?m+T:1/0,x=="mp4")var oe=B3(L,r,i,n,X,G,Z);else{oe=L;var ne=new pc(j);if(Vu(ne).id!=440786851)throw new Y(2,3,3008);var re=Vu(ne);if(re.id!=408125543)throw new Y(2,3,3009);ne=re.g.byteOffset,re=new pc(re.g);for(var le=null;re.ta();){var fe=Vu(re);if(fe.id==357149030){le=fe;break}}if(!le)throw new Y(2,3,3010);for(le=new pc(le.g),fe=1e6,re=null;le.ta();){var ye=Vu(le);if(ye.id==2807729)fe=_1(ye);else if(ye.id==17545)if(ye.g.byteLength==4)re=ye.g.getFloat32(0);else if(ye.g.byteLength==8)re=ye.g.getFloat64(0);else throw new Y(2,3,3003)}if(re==null)throw new Y(2,3,3011);if(le=fe/1e9,re*=le,oe=Vu(new pc(oe)),oe.id!=475249515)throw new Y(2,3,3007);oe=q3(oe,ne,le,re,i,n,X,G,Z)}for(V=oe,q=b(V),K=q.next();!K.done;K=q.next())W=K.value,W.codecs=e.J.codecs,W.mimeType=e.J.mimeType,W.bandwidth=e.bandwidth;return f.Ed(V),R=new Dt(V),y&&R.Oc(G,Z,!0),Q.return(R)})}function mp(e){return e.dd}function vT(e){var t=gp(e,mp,"RepresentationIndex");return e=sl(e,mp,"indexRange"),e=sa(e||""),t&&(e=Ge(t,"range",sa,e)),e}function G3(e,t){if(ST(e,t),!vT(e))throw new Y(2,4,4002)}function ST(e,t){var n=e.J.mimeType.split("/")[1];if(e.J.contentType!=at&&n!="mp4"&&n!="webm")throw new Y(2,4,4006);if(n=="webm"&&!t)throw new Y(2,4,4005)}function wT(e){var t=e.J;return{bandwidth:e.bandwidth,audioSamplingRate:t.audioSamplingRate,codecs:t.codecs,contentType:t.contentType,frameRate:t.frameRate||null,height:t.height||null,mimeType:t.mimeType,channelsCount:t.oe,pixelAspectRatio:t.pixelAspectRatio||null,width:t.width||null,label:e.ga.label||null,roles:e.roles||null,language:e.ga.language||null}}function X3(e,t,n){var i=gT(e,TT,n),r=Y3(e);if(!r.Wa&&!r.timeline&&1<r.Xc.length)throw new Y(2,4,4002);if(!r.Wa&&!e.ha.duration&&!r.timeline&&r.Xc.length==1)throw new Y(2,4,4002);if(r.timeline&&r.timeline.length==0)throw new Y(2,4,4002);var l=null,c=null;e.qa.id&&e.J.id&&(c=t.get(e.qa.id+","+e.J.id))&&(l=c.segmentIndex);var f=W3(e.ha.start,e.ha.duration,e.J.Ua,r,i,n,e.J.mimeType,e.J.codecs,e.bandwidth,e.vb);return t=!l,l?l.Bd(f,e.presentationTimeline.pb()):l=new Dt(f),e.presentationTimeline.Ed(f),e.Ob&&e.ha.$g||l.Oc(e.ha.start,e.ha.duration?e.ha.start+e.ha.duration:1/0,t),c&&(c.segmentIndex=l),{rc:function(){return l&&l.getNumReferences()!=0||l.ke(f),Promise.resolve(l)}}}function TT(e){return e.Zb}function Y3(e){var t=Q3(e);e=pT(e,TT);var n=e.Ld;n==0&&(n=1);var i=0;return e.Wa?i=e.Wa*(n-1):e.timeline&&0<e.timeline.length&&(i=e.timeline[0].start),{Wa:e.Wa,startTime:i,Ld:n,hc:e.hc,timeline:e.timeline,Xc:t}}function W3(e,t,n,i,r,l,c,f,y,m){var T=i.Xc.length;i.timeline&&i.timeline.length!=i.Xc.length&&(T=Math.min(i.timeline.length,i.Xc.length));for(var x=e-i.hc,D=t?e+t:1/0,R=[],N=i.startTime,U={},L=0;L<T;U={Je:void 0,ze:void 0},L++){U.ze=i.Xc[L];var j=N;N=void 0,N=i.Wa!=null?j+i.Wa:i.timeline?i.timeline[L].end:j+t,U.Je=null,U=new qe(e+j,e+N,function(V){return function(){return V.Je==null&&(V.Je=_n(n(),[V.ze.cj],m())),V.Je}}(U),U.ze.start,U.ze.end,r,x,e,D,[],"",null,null,So,l),U.codecs=f,U.mimeType=c,U.bandwidth=y,R.push(U)}return R}function Q3(e){return[e.J.Zb,e.ga.Zb,e.qa.Zb].filter(Fo).map(function(t){return Lt(t,"SegmentURL")}).reduce(function(t,n){return 0<t.length?t:n}).map(function(t){t.attributes.indexRange&&!e.Lf&&(e.Lf=!0);var n=Ai(t.attributes.media);return t=Ge(t,"mediaRange",sa,{start:0,end:null}),{cj:n,start:t.start,end:t.end}})}function xT(e,t,n,i,r,l,c,f,y){y||e.J.de||(e.J.de=sl(e,hc,"initialization"));var m=e.J.de?eI(e,c):null,T=J3(e);Z3(T);var x=Xa(e);if(T.vd)return ST(e,m),{rc:function(){var U=Py(T.vd,x.J.originalId,null,null,x.bandwidth||null,null);return U=_n(x.J.Ua(),[U]),mT(x,t,m,U,0,null,T.hc)}};if(T.Wa)return i||e.ga.contentType==="image"||e.ga.contentType==="text"||(n=e.ha.start,i=e.qa.id,y=e.ha.duration,i=(i=i!=null&&l.get(i)||y)?n+i:1/0,e.presentationTimeline.Tf(T.Wa),e.presentationTimeline.jh(n,i)),{rc:function(){return $3(x,T,r,m,l,c,f,e.J.Ae)}};var D=null;i=i=null,e.qa.id&&e.J.id&&(i=e.qa.id+","+e.J.id,i=n.get(i))&&(D=i.segmentIndex);var R=e.ha.start,N=e.ha.duration?R+e.ha.duration:1/0;return D?(n=D,ET(n,T,R,N,m),n.Oa(e.presentationTimeline.pb())):D=new pv(T,e.J.originalId,e.bandwidth,e.J.Ua,e.vb,R,N,m,c,e.J.Ae),T.timeline&&e.ga.contentType!=="image"&&e.ga.contentType!=="text"&&e.presentationTimeline.kh(D.h?D.h.timeline:[],R),i&&e.Ob&&(i.segmentIndex=D),{rc:function(){return D instanceof pv&&D.getNumReferences()==0&&ET(D,T,R,N,m),Promise.resolve(D)}}}function hc(e){return e.ic}function J3(e){var t=pT(e,hc),n=sl(e,hc,"media"),i=sl(e,hc,"index"),r=sl(e,hc,"k"),l=0;return r&&(l=parseInt(r,10)),{He:t.He,Wa:t.Wa,timescale:t.timescale,Ld:t.Ld,hc:t.hc,wg:t.wg,timeline:t.timeline,ec:n&&Ai(n),vd:i,mimeType:e.J.mimeType,codecs:e.J.codecs,bandwidth:e.bandwidth,dj:l}}function Z3(e){var t=e.vd?1:0;if(t+=e.timeline?1:0,t+=e.Wa?1:0,t==0)throw new Y(2,4,4002);if(t!=1&&(e.vd&&(e.timeline=null),e.He=null,e.Wa=null),!e.vd&&!e.ec)throw new Y(2,4,4002)}function $3(e,t,n,i,r,l,c,f){function y(re){var le=re-L,fe=le*U,ye=t.He,de=le*ye;"BigInt"in w&&de>Number.MAX_SAFE_INTEGER&&(de=BigInt(le)*BigInt(ye)),fe+=D,le=fe+U,ye=Math.min(le,T());var xe=[],De=t.dj;if(De)for(var Je=(ye-fe)/De,Ve={},Pt=0;Pt<De;Ve={Eh:void 0},Pt++){var Tt=fe+Je*Pt,ft=Tt+Je;Ve.Eh=Pt+1,Ve=new qe(Tt,ft,function(gt){return function(){var Mt=Py(j,X,re,gt.Eh,V,de);return _n(G(),[Mt],Z())}}(Ve),0,null,i,q,D,T(),[],"",null,null,So,l),Ve.codecs=e.J.codecs,Ve.mimeType=e.J.mimeType,f==0?0<Pt&&Ve.Vc():Pt%f!=0&&Ve.Vc(),xe.push(Ve)}return fe=new qe(fe,ye,function(){if(De)return[];var gt=Py(j,X,re,null,V,de);return _n(G(),[gt],Z())},0,null,i,q,D,T(),xe,"",null,null,So,l,0<xe.length),fe.codecs=e.J.codecs,fe.mimeType=e.J.mimeType,fe.bandwidth=e.bandwidth,fe.j=le,fe}function m(){var re=[Math.max(x.pb(),D),Math.min(x.cc(),T())].map(function(le){return le-D});return re=[Math.ceil(re[0]/U),Math.ceil(re[1]/U)-1],e.J.cb&&re[1]++,re.map(function(le){return le+L})}function T(){var re=R!=null&&r.get(R)||N;return re?D+re:1/0}var x=e.presentationTimeline,D=e.ha.start,R=e.qa.id,N=e.ha.duration,U=t.Wa,L=t.Ld,j=t.ec,V=e.bandwidth||null,X=e.J.id,G=e.J.Ua,Z=e.vb,q=D-t.hc,K=m();n=e.Ob?Math.max(K[0],K[1]-n+1):K[0],c=c||K[1],K=[];for(var W=n;W<=c;++W){var Q=y(W);K.push(Q)}var oe=new Dt(K);if(K=x.cc()<T(),W=x.U(),K||W){var ne=Math.max(n,c+1);n=U,e.J.cb&&(n=.1),oe.Ie(n,function(){var re=x.pb();oe.Oa(re);var le=b(m());le.next(),le=le.next().value;for(var fe=[];ne<=le;){var ye=y(ne);fe.push(ye),ne++}return re>T()&&!fe.length?null:fe})}return Promise.resolve(oe)}function eI(e,t){var n=e.J.de;if(n||(n=sl(e,hc,"initialization")),!n)return null;n=Ai(n);var i=e.J.originalId,r=e.bandwidth||null,l=e.J.Ua,c=e.vb;return t=new bi(function(){var f=Py(n,i,null,null,r,null);return _n(l(),[f],c())},0,null,wT(e),null,null,t,e.ga.encrypted),t.codecs=e.J.codecs,t.mimeType=e.J.mimeType,e.ha&&(t.g=e.ha.start+e.ha.duration),t}function pv(e,t,n,i,r,l,c,f,y,m){Dt.call(this,[]),this.h=e,this.F=t,this.B=n,this.C=i,this.H=r,this.j=l,this.l=c,this.u=f,this.A=y,this.G=m,U1(this)}ot(pv,Dt),h=pv.prototype,h.getNumReferences=function(){return this.h?this.h.timeline.length:0},h.release=function(){Dt.prototype.release.call(this),this.h=null},h.Oa=function(e){if(this.h){for(var t=0,n=this.h.timeline,i=0;i<n.length&&n[i].end+this.j<=e;i+=1)t+=1;0<t&&(this.h.timeline=n.slice(t),this.g.length>=t&&(this.g=this.g.slice(t)),this.i+=t,this.getNumReferences()===0&&this.release())}};function ET(e,t,n,i,r){if(tI(e,r),e.h){if(n=e.h.timeline,e.h.ec!==t.ec&&(e.h.ec=t.ec),n.length){var l=n[n.length-1];t=t.timeline.filter(function(c){return c.end>l.end})}else t=t.timeline.slice();0<t.length&&e.h.timeline.push.apply(e.h.timeline,J(t)),e.l!==i&&(e.l=i)}else e.h=t,e.j=n,e.l=i;U1(e)}function tI(e,t){if(e.u!==t){e.u=t,e=b(e.g);for(var n=e.next();!n.done;n=e.next())(n=n.value)&&Uh(n,t)}}function U1(e){if(e.h&&!e.o){for(var t=[],n=b(e.h.timeline),i=n.next();!i.done;i=n.next())i=i.value,i.start>=e.l||0>=i.end||t.push(i);e.h.timeline=t,e.Oa(e.j)}}h.find=function(e){if(this.h&&this.h.timeline&&this.h.timeline.length&&e<this.h.timeline[0].start+this.j)return this.i;if(!this.h)return null;var t=this.h.timeline;if(e<this.j||e>=this.l)return null;for(var n=t.length-1,i=0;i<t.length;i++){var r=t[i],l=r.start+this.j;if(r=i<n?t[i+1].start+this.j:this.l===1/0?r.end+this.j:this.l,e>=l&&e<r)return i+this.i}return null},h.get=function(e){var t=this;if(e-=this.i,0>e||e>=this.getNumReferences()||!this.h)return null;var n=this.g[e];if(!n){var i=this.h.timeline[e],r=i.wj,l=i.xg+this.h.wg;n=this.j-this.h.hc;var c=this.j+i.end,f=c;e===this.getNumReferences()-1&&this.l!==1/0&&(f=this.l);for(var y=this.h.codecs,m=this.h.mimeType,T=this.h.bandwidth,x=[],D=(i.end-i.start)/i.Jb,R={},N=0;N<i.Jb;R={Ke:void 0,Fh:void 0},N++){var U=i.start+D*N,L=U+D;R.Fh=N+1,R.Ke=null,R=new qe(this.j+U,this.j+L,function(j){return function(){return t.h?(j.Ke==null&&(j.Ke=AT(t.h.ec,t.F,r,t.B,l,j.Fh,t.C,t.H)),j.Ke):[]}}(R),0,null,this.u,n,this.j,this.l,[],"",null,null,So,this.A),R.codecs=y,R.mimeType=m,R.bandwidth=T,this.G==0?0<N&&R.Vc():N%this.G!=0&&R.Vc(),x.push(R)}n=new qe(this.j+i.start,f,function(){return 0<i.Jb||!t.h?[]:AT(t.h.ec,t.F,r,t.B,l,null,t.C,t.H)},0,null,this.u,n,this.j,this.l,x,"",null,null,So,this.A,0<i.Jb),n.codecs=y,n.mimeType=m,n.j=c,n.bandwidth=T,this.g[e]=n}return n},h.Eb=function(e){U1(this);for(var t=0;t<this.getNumReferences();t++){var n=this.get(t+this.i);n&&e(n)}};function AT(e,t,n,i,r,l,c,f){return e=Py(e,t,n,l,i||null,r),_n(c(),[e],f()).map(function(y){return y.toString()})}function vp(e){this.o=null,this.A=e,this.G=new yo,this.i=[],this.h=null,this.m=[],this.B=null,this.F=[],this.C=300,this.l=new Map,this.j=new Map,this.g=null,this.u="UNKNOWN"}vp.prototype.configure=function(e){this.o=e},vp.prototype.destroy=function(){return this.A=this.o=null,this.i=[],this.h=null,this.m=[],this.F=[],this.l.clear(),this.g!=null&&(this.g.stop(),this.g=null),this.G.destroy()},vp.prototype.setManifestType=function(e){this.u=e};function Ly(e,t){var n,i,r,l,c,f,y;return z(function(m){if(m.g==1)return n=_n(e.i,[nI(e,t)]),i=cn(n,e.o.retryParameters),r=e.A.networkingEngine.request(8,i),Yo(e.G,r),pe(m,2),_(m,r.promise,4);if(m.g!=2)return l=m.h,c=nn(l.data),f=JSON.parse(c),f.VERSION==1&&iI(e,f,l.uri),Ue(m,0);if((y=Me(m))&&y.code==7001)return m.return();e.g!=null&&(e.g.stop(),e.g=null),e.g=new dt(function(){Ly(e,t)}),e.g.da(e.C),se(m)})}function nI(e,t){if(!e.m.length)return t;t=new pn(t);var n=e.B||e.m[0],i=Math.round(e.A.getBandwidthEstimate()),r=t.g;return e.u=="DASH"?(r.add("_DASH_pathway",n),r.add("_DASH_throughput",String(i))):e.u=="HLS"&&(r.add("_HLS_pathway",n),r.add("_HLS_throughput",String(i))),Ba(r)&&io(t,r),t.toString()}function iI(e,t,n){e.g!=null&&(e.g.stop(),e.g=null);var i=t["RELOAD-URI"]||n;e.g=new dt(function(){Ly(e,i)}),(n=t.TTL)&&(e.C=n),e.g.da(e.C),e.m=t["PATHWAY-PRIORITY"]||[],e.F=t["PATHWAY-CLONES"]||[]}function Sp(e,t,n,i){var r=e.l.get(t);r||(r=new Map),r.set(n,i),e.l.set(t,r)}vp.prototype.banLocation=function(e){this.j.set(e,Date.now()+6e4)};function _y(e,t,n){n=n===void 0?!1:n,t=e.l.get(t)||new Map;for(var i=[],r=b(e.m),l=r.next(),c={};!l.done;c={Zc:void 0},l=r.next())if(c.Zc=l.value,l=t.get(c.Zc))i.push({Yf:c.Zc,location:l});else if(l=e.F.find(function(y){return function(m){return m.ek==y.Zc}}(c))){var f=t.get(l["BASE-ID"]);f&&(l["URI-REPLACEMENT"].Oh?(f=new pn(f),Ac(f,l["URI-REPLACEMENT"].Oh),i.push({Yf:c.Zc,location:f.toString()})):i.push({Yf:c.Zc,location:f}))}for(r=Date.now(),c=b(e.j.keys()),l=c.next();!l.done;l=c.next())l=l.value,f=e.j.get(l),r>f&&e.j.delete(l);if(i=i.filter(function(y){for(var m=b(e.j.keys()),T=m.next();!T.done;T=m.next())if(T.value.includes(new pn(y.location).nb))return!1;return!0}),i.length&&(e.B=i[0].Yf),i=i.map(function(y){return y.location}),!i.length&&e.h)for(r=b(e.h.split(",")),c=r.next();!c.done;c=r.next())(c=t.get(c.value))&&(e.B=e.h,i.push(c));if(!i.length)for(t=b(t.values()),r=t.next();!r.done;r=t.next())i.push(r.value);return n?i:_n(e.i,i)}function Hi(){this.l=[],this.h=[],this.g=[],this.j=[],this.i=[],this.u=this.o=!1,this.m=new Set}h=Hi.prototype,h.release=function(){for(var e=b(this.h.concat(this.g,this.j,this.i)),t=e.next();!t.done;t=e.next())t=t.value,t.segmentIndex&&t.segmentIndex.release();this.h=[],this.g=[],this.j=[],this.i=[],this.l=[],this.u=this.o=!1,this.m.clear()},h.Ki=function(){return this.l},h.Jf=function(){return this.j.slice()},h.oi=function(){return this.i},h.Kg=function(e,t){if(e){if(e.type=="audio")for(var n=b(this.h),i=n.next();!i.done;i=n.next())i=i.value,i.matchedStreams=i.matchedStreams.filter(function(r){return r!==e});else if(e.type=="video")for(n=b(this.g),i=n.next();!i.done;i=n.next())i=i.value,i.matchedStreams=i.matchedStreams.filter(function(r){return r!==e}),i.trickModeVideo&&(i.trickModeVideo.matchedStreams=i.trickModeVideo.matchedStreams.filter(function(r){return r!==e})),i.dependencyStream&&(i.dependencyStream.matchedStreams=i.dependencyStream.matchedStreams.filter(function(r){return r!==e}));else if(e.type==at)for(n=b(this.j),i=n.next();!i.done;i=n.next())i=i.value,i.matchedStreams=i.matchedStreams.filter(function(r){return r!==e});else if(e.type=="image")for(n=b(this.i),i=n.next();!i.done;i=n.next())i=i.value,i.matchedStreams=i.matchedStreams.filter(function(r){return r!==e});e.segmentIndex&&e.closeSegmentIndex(),this.m.delete(t)}};function CT(e,t){var n=[],i=[],r=[],l=[];e=b(e);for(var c=e.next();!c.done;c=e.next()){var f=c.value;c=new Map(f.audioStreams.map(function(x){return[H1(x),x]}));var y=new Map(f.videoStreams.map(function(x){return[V1(x),x]})),m=new Map(f.textStreams.map(function(x){return[By(x),x]}));if(f=new Map(f.imageStreams.map(function(x){return[Vy(x),x]})),t){var T=RT(at);m.set(By(T),T),T=RT("image"),f.set(Vy(T),T)}n.push(c),i.push(y),r.push(m),l.push(f)}return{Dg:n,Mh:i,Ih:r,Yg:l}}h.gf=function(e,t,n){n=n===void 0?!1:n;var i=this,r,l,c,f,y,m,T,x,D,R,N,U,L,j,V,X,G,Z,q,K,W,Q,oe,ne,re,le,fe,ye,de,xe,De,Je;return z(function(Ve){if(Ve.g==1){if(r=En,!t&&e.length==1)return l=CT(e,!1),c=l.Dg,f=l.Mh,y=l.Ih,m=l.Yg,i.h=Array.from(c[0].values()),i.g=Array.from(f[0].values()),i.j=Array.from(y[0].values()),i.i=Array.from(m[0].values()),Ve.s(2);for(T=n?i.m.size:0,x=-1,D=0;D<e.length;D++)R=e[D],i.m.has(R.id)||(i.m.add(R.id),x==-1&&(x=D));return x==-1?Ve.return():(N=CT(e,!0),U=N.Dg,L=N.Mh,j=N.Ih,V=N.Yg,_(Ve,Promise.all([yc(i,i.h,U,x,wp,gc,T),yc(i,i.g,L,x,wp,gc,T),yc(i,i.j,j,x,wp,gc,T),yc(i,i.i,V,x,wp,gc,T)]),2))}if(X=0,G=[],i.g.length&&i.h.length)for(ne=b(i.h),re=ne.next();!re.done;re=ne.next())for(le=re.value,fe=b(i.g),ye=fe.next();!ye.done;ye=fe.next())de=ye.value,xe=ri(le.drmInfos,de.drmInfos),le.drmInfos.length&&de.drmInfos.length&&!xe.length||(De=(le.bandwidth||0)+(de.bandwidth||0),le.dependencyStream&&(De+=le.dependencyStream.bandwidth||0),de.dependencyStream&&(De+=de.dependencyStream.bandwidth||0),Je=X++,G.push({id:Je,language:le.language,disabledUntilTime:0,primary:le.primary,audio:le,video:de,bandwidth:De,drmInfos:xe,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]}));else for(Z=i.g.length?i.g:i.h,q=b(Z),K=q.next();!K.done;K=q.next())W=K.value,Q=X++,oe=W.bandwidth||0,W.dependencyStream&&(oe+=W.dependencyStream.bandwidth||0),G.push({id:Q,language:W.language,disabledUntilTime:0,primary:W.primary,audio:W.type==r.V?W:null,video:W.type==r.la?W:null,bandwidth:oe,drmInfos:W.drmInfos,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});i.l=G,se(Ve)})};function bT(e){var t,n,i,r,l,c,f,y,m,T,x,D,R,N,U,L,j,V,X,G,Z,q,K,W,Q,oe,ne,re,le,fe;return z(function(ye){switch(ye.g){case 1:if(t=En,e.length==1)return ye.return(e[0]);for(n=e.map(function(de){return new Map(de.filter(function(xe){return xe.type===t.V}).map(function(xe){return[H1(xe),xe]}))}),i=e.map(function(de){return new Map(de.filter(function(xe){return xe.type===t.la}).map(function(xe){return[V1(xe),xe]}))}),r=e.map(function(de){return new Map(de.filter(function(xe){return xe.type===t.za}).map(function(xe){return[By(xe),xe]}))}),l=e.map(function(de){return new Map(de.filter(function(xe){return xe.type===t.$e}).map(function(xe){return[Vy(xe),xe]}))}),c=b(r),f=c.next();!f.done;f=c.next())y=f.value,m=kT(t.za),y.set(By(m),m);for(T=b(l),x=T.next();!x.done;x=T.next())D=x.value,R=kT(t.$e),D.set(Vy(R),R);return N=new Hi,_(ye,yc(N,[],n,0,hv,yv,0),2);case 2:return U=ye.h,_(ye,yc(N,[],i,0,hv,yv,0),3);case 3:return L=ye.h,_(ye,yc(N,[],r,0,hv,yv,0),4);case 4:return j=ye.h,_(ye,yc(N,[],l,0,hv,yv,0),5);case 5:if(V=ye.h,X=0,L.length&&U.length)for(W=b(U),Q=W.next();!Q.done;Q=W.next())for(oe=Q.value,ne=b(L),re=ne.next();!re.done;re=ne.next())le=re.value,fe=X++,le.variantIds.push(fe),oe.variantIds.push(fe);else for(G=L.concat(U),Z=b(G),q=Z.next();!q.done;q=Z.next())K=q.value,K.variantIds=[X++];return ye.return(L.concat(U).concat(j).concat(V))}})}function yc(e,t,n,i,r,l,c){var f,y,m,T,x,D,R,N,U,L,j,V,X,G,Z,q,K,W,Q;return z(function(oe){switch(oe.g){case 1:for(f=[],y=0;y<n.length;y++)y>=i?f.push(new Set(n[y].values())):f.push(new Set);m=b(t),T=m.next();case 2:if(T.done){oe.s(4);break}return x=T.value,_(oe,rI(e,x,n,i,l,f,c),5);case 5:if(D=oe.h,!D)throw new Y(2,4,4037);T=m.next(),oe.s(2);break;case 4:for(R=b(f),N=R.next();!N.done;N=R.next())for(U=N.value,L=b(U),j=L.next();!j.done;j=L.next())V=j.value,(X=oI(e,V,n,r,l,f))&&t.push(X);for(G=b(f),Z=G.next();!Z.done;Z=G.next())for(q=Z.value,K=b(q),W=K.next(),Q={};!W.done;Q={ng:void 0},W=K.next())if(Q.ng=W.value,!B1(Q.ng)&&t.some(function(ne){return function(re){return j1(e,ne.ng,re)}}(Q)))throw new Y(2,4,4037);return oe.return(t)}})}function rI(e,t,n,i,r,l,c){return z(function(f){return f.g==1?(OT(e,n,t,0<c),t.matchedStreams?t.segmentIndex?_(f,IT(t,i+c),2):f.s(2):f.return(!1)):(DT(t,i,r,l,c),f.return(!0))})}function IT(e,t){var n,i,r,l,c,f;return z(function(y){if(y.g==1){for(n=[],i=e.matchedStreams,r=t;r<i.length;r++)l=i[r],n.push(l.createSegmentIndex()),l.trickModeVideo&&!l.trickModeVideo.segmentIndex&&n.push(l.trickModeVideo.createSegmentIndex()),l.dependencyStream&&!l.dependencyStream.segmentIndex&&n.push(l.dependencyStream.createSegmentIndex());return _(y,Promise.all(n),2)}if(e.segmentIndex instanceof sn)for(c=t;c<i.length;c++)f=i[c],f.segmentIndex&&e.segmentIndex.h.push(f.segmentIndex);se(y)})}function oI(e,t,n,i,r,l){if(B1(t))return null;var c=i(t);return OT(e,n,c),c.createSegmentIndex&&(c.createSegmentIndex=function(){return z(function(f){return c.segmentIndex?f.s(0):(c.segmentIndex=new sn,_(f,IT(c,0),0))})}),!c.matchedStreams||!c.matchedStreams.length?null:(DT(c,0,r,l,0),c)}function DT(e,t,n,i,r){var l=e.matchedStreams;for(t+=r;t<l.length;t++){var c=l[t];n(e,c);var f=!0;if(e.type=="audio"&&Rl(e.language,c.language)==0&&(f=!1),f&&(i[t-r].delete(c),c.fullMimeTypes))for(c=b(c.fullMimeTypes.values()),f=c.next();!f.done;f=c.next())e.fullMimeTypes.add(f.value)}}function wp(e){var t=Object.assign({},e);return t.originalId=null,t.createSegmentIndex=function(){return Promise.resolve()},t.closeSegmentIndex=function(){if(t.segmentIndex&&(t.segmentIndex.release(),t.segmentIndex=null),t.matchedStreams)for(var n=b(t.matchedStreams),i=n.next();!i.done;i=n.next())i=i.value,i.segmentIndex&&(i.segmentIndex.release(),i.segmentIndex=null)},t.roles=t.roles.slice(),t.segmentIndex=null,t.emsgSchemeIdUris=[],t.keyIds=new Set(e.keyIds),t.closedCaptions=e.closedCaptions?new Map(e.closedCaptions):null,t.trickModeVideo=null,t.dependencyStream=null,t}function hv(e){var t=Object.assign({},e);return t.roles=t.roles.slice(),t.keyIds=new Set(e.keyIds),t.segments=[],t.variantIds=[],t.closedCaptions=e.closedCaptions?new Map(e.closedCaptions):null,t}function gc(e,t){function n(c,f){c||(c=[]),f=b(f);for(var y=f.next();!y.done;y=f.next())y=y.value,c.includes(y)||c.push(y);return c}e.roles=n(e.roles,t.roles),t.emsgSchemeIdUris&&(e.emsgSchemeIdUris=n(e.emsgSchemeIdUris,t.emsgSchemeIdUris));for(var i=b(t.keyIds),r=i.next();!r.done;r=i.next())e.keyIds.add(r.value);if(e.originalId==null?e.originalId=t.originalId:(i=t.originalId||"")&&!e.originalId.endsWith(i)&&(e.originalId+=","+i),i=ri(e.drmInfos,t.drmInfos),t.drmInfos.length&&e.drmInfos.length&&!i.length)throw new Y(2,4,4038);if(e.drmInfos=i,e.encrypted=e.encrypted||t.encrypted,t.closedCaptions)for(e.closedCaptions||(e.closedCaptions=new Map),i=b(t.closedCaptions),r=i.next();!r.done;r=i.next()){var l=b(r.value);r=l.next().value,l=l.next().value,e.closedCaptions.set(r,l)}e.bandwidth&&t.bandwidth&&(e.bandwidth=Math.max(e.bandwidth,t.bandwidth)),t.trickModeVideo?(e.trickModeVideo||(e.trickModeVideo=wp(t.trickModeVideo),e.trickModeVideo.matchedStreams=[],e.trickModeVideo.createSegmentIndex=function(){if(e.trickModeVideo.segmentIndex)return Promise.resolve();for(var c=new sn,f=b(e.trickModeVideo.matchedStreams),y=f.next();!y.done;y=f.next())c.h.push(y.value.segmentIndex);return e.trickModeVideo.segmentIndex=c,Promise.resolve()}),e.trickModeVideo.matchedStreams.push(t.trickModeVideo),gc(e.trickModeVideo,t.trickModeVideo)):e.trickModeVideo&&(e.trickModeVideo.matchedStreams.push(t),gc(e.trickModeVideo,t)),t.dependencyStream?(e.dependencyStream||(e.dependencyStream=wp(t.dependencyStream),e.dependencyStream.matchedStreams=[],e.dependencyStream.createSegmentIndex=function(){if(e.dependencyStream.segmentIndex)return Promise.resolve();for(var c=new sn,f=b(e.dependencyStream.matchedStreams),y=f.next();!y.done;y=f.next())c.h.push(y.value.segmentIndex);return e.dependencyStream.segmentIndex=c,Promise.resolve()}),e.dependencyStream.matchedStreams.push(t.dependencyStream),gc(e.dependencyStream,t.dependencyStream)):e.dependencyStream&&(e.dependencyStream.matchedStreams.push(t),gc(e.dependencyStream,t))}function yv(e,t){var n=e.roles;n||(n=[]);for(var i=b(t.roles),r=i.next();!r.done;r=i.next())r=r.value,n.includes(r)||n.push(r);for(e.roles=n,n=b(t.keyIds),i=n.next();!i.done;i=n.next())e.keyIds.add(i.value);if(e.encrypted=e.encrypted&&t.encrypted,e.segments.push.apply(e.segments,J(t.segments)),t.closedCaptions)for(e.closedCaptions||(e.closedCaptions=new Map),t=b(t.closedCaptions),n=t.next();!n.done;n=t.next())i=b(n.value),n=i.next().value,i=i.next().value,e.closedCaptions.set(n,i)}function OT(e,t,n,i){i=i!==void 0&&i?n.matchedStreams:[],t=b(t);for(var r=t.next();!r.done;r=t.next()){if(r=lI(e,r.value,n),!r)return;i.push(r)}n.matchedStreams=i}function lI(e,t,n){var i={audio:H1,video:V1,text:By,image:Vy}[n.type],r=null,l=i(n);if(t.has(l))r=t.get(l);else{l={audio:function(m,T){return j1(e,m,T)},video:function(m,T){return j1(e,m,T)},text:aI,image:uI}[n.type];for(var c={audio:sI,video:cI,text:fI,image:dI}[n.type],f=b(t.values()),y=f.next();!y.done;y=f.next())y=y.value,!l(n,y)||n.fastSwitching!=y.fastSwitching||r&&!c(n,r,y)||(r=y)}return e.u&&!B1(r)&&t.delete(i(r)),r}function Uy(e,t){return e.mimeType!=t.mimeType?!1:gv(e.codecs)===gv(t.codecs)}h.uh=function(e){this.o=e},h.Ah=function(e){this.u=e};function j1(e,t,n){return!(!Uy(t,n)&&!e.o||t.drmInfos&&!Va(t.drmInfos,n.drmInfos))}function aI(e,t){return t.language?!(e.forced!==t.forced||Rl(e.language,t.language)==0||t.kind!=e.kind):!0}function uI(){return!0}function sI(e,t,n){var i=Uy(e,t),r=Uy(e,n);if(i&&!r)return!1;if(!i&&r||(i=Rl(e.language,t.language),r=Rl(e.language,n.language),r>i))return!0;if(r<i)return!1;if(t.label!==n.label){if(e.label===t.label)return!1;if(e.label===n.label)return!0}if(e.roles.length){if(i=t.roles.filter(function(l){return e.roles.includes(l)}),r=n.roles.filter(function(l){return e.roles.includes(l)}),r.length>i.length)return!0;if(r.length<i.length)return!1;if(n.roles.length!==t.roles.length)return n.roles.length<t.roles.length}else{if(!n.roles.length&&t.roles.length)return!0;if(n.roles.length&&!t.roles.length)return!1}return!t.primary&&n.primary?!0:t.primary&&!n.primary?!1:(i=jy(e.channelsCount,t.channelsCount,n.channelsCount),i==Ql?!0:i==Hu?!1:(i=jy(e.audioSamplingRate,t.audioSamplingRate,n.audioSamplingRate),i==Ql?!0:i==Hu?!1:!!(e.bandwidth&&MT(e.bandwidth,t.bandwidth,n.bandwidth)==Ql)))}function cI(e,t,n){var i=Uy(e,t),r=Uy(e,n);if(i&&!r)return!1;if(!i&&r||(i=jy(e.width*e.height,t.width*t.height,n.width*n.height),i==Ql))return!0;if(i==Hu)return!1;if(e.frameRate){if(i=jy(e.frameRate,t.frameRate,n.frameRate),i==Ql)return!0;if(i==Hu)return!1}return!!(e.bandwidth&&MT(e.bandwidth,t.bandwidth,n.bandwidth)==Ql)}function fI(e,t,n){var i=Rl(e.language,t.language),r=Rl(e.language,n.language);if(r>i)return!0;if(r<i)return!1;if(!t.primary&&n.primary)return!0;if(t.primary&&!n.primary)return!1;if(t.label!==n.label){if(e.label===t.label)return!1;if(e.label===n.label)return!0}if(e.roles.length){if(i=t.roles.filter(function(l){return e.roles.includes(l)}),r=n.roles.filter(function(l){return e.roles.includes(l)}),r.length>i.length)return!0;if(r.length<i.length)return!1}else{if(!n.roles.length&&t.roles.length)return!0;if(n.roles.length&&!t.roles.length)return!1}return!(n.mimeType!=e.mimeType||n.codecs!=e.codecs||t.mimeType==e.mimeType&&t.codecs==e.codecs)}function dI(e,t,n){return jy(e.width*e.height,t.width*t.height,n.width*n.height)==Ql}function kT(e){return{id:0,originalId:"",groupId:null,primary:!1,type:e,mimeType:"",codecs:"",language:"",originalLanguage:null,label:null,width:null,height:null,encrypted:!1,keyIds:new Set,segments:[],variantIds:[],roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,external:!1,fastSwitching:!1,isAudioMuxedInVideo:!1,baseOriginalId:null}}function RT(e){return{id:0,originalId:"",groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new Dt([]),mimeType:"",codecs:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:"",originalLanguage:null,label:null,type:e,primary:!1,trickModeVideo:null,dependencyStream:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!1,fastSwitching:!1,fullMimeTypes:new Set,isAudioMuxedInVideo:!1,baseOriginalId:null}}function jy(e,t,n){if(t==e&&e!=n)return Hu;if(n==e&&e!=t)return Ql;if(t>e){if(n<=e||n-e<t-e)return Ql;if(n-e>t-e)return Hu}else{if(n>e)return Hu;if(e-n<e-t)return Ql;if(e-n>e-t)return Hu}return NT}function MT(e,t,n){return t=Math.abs(e-t),e=Math.abs(e-n),e<t?Ql:t<e?Hu:NT}function B1(e){switch(e.type){case at:return!e.language;case"image":return!e.tilesLayout;default:return!1}}function V1(e){return JSON.stringify([e.fastSwitching,e.width,e.frameRate,gv(e.codecs),e.mimeType,e.label,e.roles,e.closedCaptions?Array.from(e.closedCaptions.entries()):null,e.bandwidth,e.dependencyStream?e.dependencyStream.baseOriginalId:null,Array.from(e.keyIds)])}function H1(e){return JSON.stringify([e.fastSwitching,e.channelsCount,e.language,e.bandwidth,e.label,gv(e.codecs),e.mimeType,e.roles,e.audioSamplingRate,e.primary,e.dependencyStream?e.dependencyStream.baseOriginalId:null,Array.from(e.keyIds)])}function By(e){return JSON.stringify([e.language,e.label,e.codecs,e.mimeType,e.bandwidth,e.roles])}function Vy(e){return JSON.stringify([e.width,e.codecs,e.mimeType])}function gv(e){if(!K1.has(e)){var t=gi(e);K1.set(e,t)}return K1.get(e)}Pe("shaka.util.PeriodCombiner",Hi),Hi.prototype.setUseStreamOnce=Hi.prototype.Ah,Hi.prototype.setAllowMultiTypeVariants=Hi.prototype.uh,Hi.prototype.combinePeriods=Hi.prototype.gf,Hi.prototype.deleteStream=Hi.prototype.Kg,Hi.prototype.getImageStreams=Hi.prototype.oi,Hi.prototype.getTextStreams=Hi.prototype.Jf,Hi.prototype.getVariants=Hi.prototype.Ki;var Ql=1,NT=0,Hu=-1,K1=new Map;function pI(e,t){var n=new DOMParser,i=hI.value()(e);e=null;try{e=n.parseFromString(i,"text/xml")}catch{return null}if(n=e.documentElement,!n||n.getElementsByTagName("parsererror").length||n.tagName!=t)return null;if(!("createNodeIterator"in document))return n;for(t=document.createNodeIterator(e,NodeFilter.SHOW_ALL);e=t.nextNode();)if(e instanceof HTMLElement||e instanceof SVGElement)return null;return n}function PT(e,t){try{var n=Nr(e);return pI(n,t)}catch{return null}}var hI=new pl(function(){if(typeof trustedTypes<"u"){var e=trustedTypes.createPolicy("shaka-player#xml",{createHTML:function(t){return t}});return function(t){return e.createHTML(t)}}return function(t){return t}});function mv(){var e=this;this.j=this.g=null,this.A=[],this.i=null,this.pa=1,this.F=[],this.l={me:"",type:"",profiles:[],Wb:null,cb:0,Ua:null,Id:0},this.u=new Map,this.o=new Map,this.B=new Map,this.ka=new Map,this.m=new Hi,this.I=0,this.oa=new Wu(5),this.K=new dt(function(){if(e.H&&!e.g.continueLoadingWhenPaused&&(e.G.Ja(e.H,"timeupdate"),e.H.paused)){e.G.ma(e.H,"timeupdate",function(){return HT(e)});return}HT(e)}),this.O=new yo,this.M=null,this.C=[],this.$=1/0,this.fa=!1,this.h=null,this.L=0,this.P=!1,this.G=new vt,this.H=null,this.T=!1,this.Z="",this.ea=function(){return!1},this.W=[]}h=mv.prototype,h.configure=function(e,t){var n=this.j&&e.updatePeriod!=this.g.updatePeriod&&0<=e.updatePeriod;this.g=e,t&&(this.ea=t),n&&this.i&&this.i.presentationTimeline.U()&&this.K.sb(),this.h&&this.h.configure(this.g),this.m&&(this.m.uh(this.g.dash.multiTypeVariantsAllowed&&Sl()),this.m.Ah(this.g.dash.useStreamOnceInPeriodFlattening))},h.start=function(e,t){var n=this,i;return z(function(r){if(r.g==1)return n.fa=t.isLowLatencyMode(),n.A=[e],n.j=t,_(r,q1(n),2);if(i=r.h,n.j&&F1(n,i),!n.j)throw new Y(2,7,7001);return r.return(n.i)})},h.stop=function(){for(var e=b(this.o.values()),t=e.next();!t.done;t=e.next())t=t.value,t.segmentIndex&&t.segmentIndex.release();return this.m&&this.m.release(),this.g=this.j=null,this.A=[],this.i=null,this.o.clear(),this.B.clear(),this.u.clear(),this.l={me:"",type:"",profiles:[],Wb:null,cb:0,Ua:null,Id:0},this.m=null,this.K!=null&&(this.K.stop(),this.K=null),this.h&&this.h.destroy(),this.G&&(this.G.release(),this.G=null),this.O.destroy()},h.update=function(){var e=this,t;return z(function(n){if(n.g==1)return pe(n,2),_(n,q1(e),4);if(n.g!=2)return Ue(n,0);if(t=Me(n),!e.j||!t)return n.return();e.j.onError(t),se(n)})},h.onExpirationUpdated=function(){},h.onInitialVariantChosen=function(e){if(this.i&&this.i.presentationTimeline.U()){var t=e.video||e.audio;if(t&&t.segmentIndex){e=this.i.presentationTimeline.cc();var n=t.segmentIndex.find(e);n!=null&&(t=t.segmentIndex.get(n))&&(this.I=t.endTime-e,F1(this,0))}}},h.banLocation=function(e){this.h&&this.h.banLocation(e)},h.setMediaElement=function(e){this.H=e};function q1(e){var t,n,i,r,l,c,f,y,m,T,x;return z(function(D){return D.g==1?(t=4,n="MPD",i=kI(e),r=e.A,i.length?(r=i,n="Patch",t=6):1<e.A.length&&e.h&&(l=_y(e.h,"Location",!0),l.length&&(r=l)),c=cn(r,e.g.retryParameters),f=Date.now(),_(D,G1(e,c,0,{type:t}),2)):D.g!=3?(y=D.h,e.j?(y.uri&&y.uri!=y.originalUri&&!e.A.includes(y.uri)&&e.A.unshift(y.uri),m=new pn(y.uri),e.Z=m.g.toString(),_(D,yI(e,y.data,y.uri,n),3)):D.return(0)):(T=Date.now(),x=(T-f)/1e3,e.oa.sample(1,x),D.return(x))})}function yI(e,t,n,i){var r,l,c,f,y,m,T,x,D,R;return z(function(N){if(N.g==1){if(r=t,l=e.g.dash.manifestPreprocessor,c=oc,l!=c){if(Ot("manifest.dash.manifestPreprocessor configuration","Please Use manifest.dash.manifestPreprocessorTXml instead."),f=PT(r,i),!f)throw new Y(2,4,4001,n);l(f),r=Pr(f.outerHTML)}if(y=Mc(r,i),!y)throw new Y(2,4,4001,n);return m=e.g.dash.manifestPreprocessorTXml,T=tp,m!=T&&m(y),i==="Patch"?N.return(gI(e,y)):e.g.dash.disableXlinkProcessing?N.return(LT(e,y,n)):(x=e.g.dash.xlinkFailGracefully,D=dv(y,e.g.retryParameters,x,n,e.j.networkingEngine),Yo(e.O,D),_(N,D.promise,2))}return R=N.h,N.return(LT(e,R,n))})}function LT(e,t,n){var i,r,l,c,f,y,m,T,x,D,R,N,U,L,j,V,X,G,Z,q,K,W,Q,oe,ne,re,le,fe,ye,de,xe,De,Je,Ve,Pt,Tt,ft,gt,Mt,ut,xt,nt,st,Wt,ni,vn,wn,Fn,fi,Vf,qu,vc;return z(function(Lo){switch(Lo.g){case 1:for(e.h&&e.h.l.clear(),i=[n],r=[],l=new Map,c=Lt(t,"Location"),f=b(c),y=f.next();!y.done;y=f.next())m=y.value,T=m.attributes.serviceLocation,(x=Xi(m))&&(D=_n(i,[x])[0],T&&(e.h?Sp(e.h,"Location",T,D):l.set(T,D)),r.push(D));if(e.h?(R=_y(e.h,"Location",!0),0<R.length&&(i=e.A=R)):r.length&&(i=e.A=r),e.l.me=t.attributes.id||"",e.l.Id=Ge(t,"publishTime",Tl)||0,e.F=Lt(t,"PatchLocation"),N=Promise.resolve(),(U=An(t,"ContentSteering"))&&e.j)for(L=U.attributes.defaultServiceLocation,e.h?(e.h.i=i,e.h.h=L):(e.h=new vp(e.j),e.h.configure(e.g),e.h.setManifestType("DASH"),e.h.i=i,e.h.h=L,(j=Xi(U))&&(Ge(U,"queryBeforeStart",Nc,!1)?N=Ly(e.h,j):Ly(e.h,j))),V=b(l.keys()),X=V.next();!X.done;X=V.next())G=X.value,Z=l.get(G),Sp(e.h,"Location",G,Z);if(q=Lt(t,"BaseURL"),K=!1,e.h)for(W=b(q),Q=W.next();!Q.done;Q=W.next())oe=Q.value,ne=oe.attributes.serviceLocation,re=Xi(oe),ne&&re&&(Sp(e.h,"BaseURL",ne,re),K=!0);if(e.W=null,K&&e.h||(le=q.map(Xi),e.W=_n(i,le)),fe=function(){return e.h&&K?_y(e.h,"BaseURL"):e.W?e.W:[]},e.l.Ua=fe,ye=0,q&&q.length&&(ye=Ge(q[0],"availabilityTimeOffset",hs)||0),e.l.cb=ye,e.I=Ge(t,"minimumUpdatePeriod",co,-1),de=Ge(t,"availabilityStartTime",Tl),xe=Ge(t,"timeShiftBufferDepth",co),De=e.g.dash.ignoreSuggestedPresentationDelay,Je=null,De||(Je=Ge(t,"suggestedPresentationDelay",co)),Ve=e.g.dash.ignoreMaxSegmentDuration,Pt=null,Ve||(Pt=Ge(t,"maxSegmentDuration",co)),Tt=t.attributes.type||"static",e.i&&e.i.presentationTimeline&&(e.T=e.i.presentationTimeline.U()&&Tt=="static"),e.l.type=Tt,e.i)for(ft=e.i.presentationTimeline,gt=ft.pb(),Mt=b(e.o.values()),ut=Mt.next();!ut.done;ut=Mt.next())xt=ut.value,xt.segmentIndex&&xt.segmentIndex.Oa(gt);else nt=e.g.dash.ignoreMinBufferTime,st=0,nt||(st=Ge(t,"minBufferTime",co)||0),Wt=0,Wt=Je!=null?Math.min(Je,xe||1/0):0<e.g.defaultPresentationDelay?e.g.defaultPresentationDelay:Math.min(1.5*st,xe||1/0),ft=new _e(de,Wt,e.g.dash.autoCorrectDrift);return ft.Gc(Tt=="static"),ft.U()&&!isNaN(e.g.availabilityWindowOverride)&&(xe=e.g.availabilityWindowOverride),xe==null&&(xe=1/0),ft.Ce(xe),ni=t.attributes.profiles||"",e.l.profiles=ni.split(","),vn={Ob:Tt!="static",presentationTimeline:ft,qa:null,ha:null,ga:null,J:null,bandwidth:0,Lf:!1,cb:ye,Wb:null,profiles:ni.split(","),roles:null,vb:function(){return""}},_(Lo,N,2);case 2:return e.L=0,wn=BT(e,vn,fe,t,!1),Fn=wn.duration,fi=wn.periods,(Tt!="static"||e.T)&&wn.Mg||ft.bb(Fn||1/0),e.P&&e.fa&&ft.vh(e.$),ft.Tf(Pt||1),e.P&&e.fa&&(Vf=Je??e.g.defaultPresentationDelay,ft.jg(Vf)),e.i?(e.i.periodCount=fi.length,e.i.gapCount=e.L,_(Lo,_T(e,fi,!1),4)):_(Lo,e.m.gf(fi,vn.Ob),6);case 6:if(e.i={presentationTimeline:ft,variants:e.m.l,textStreams:e.m.Jf(),imageStreams:e.m.i,offlineSessionIds:[],sequenceMode:e.g.dash.sequenceMode,ignoreManifestTimestampsInSegmentsMode:!1,type:"DASH",serviceDescription:SI(t),nextUrl:wI(t),periodCount:fi.length,gapCount:e.L,isLowLatency:e.P,startTime:null},!ft.Kh()){Lo.s(7);break}return qu=Lt(t,"UTCTiming"),_(Lo,DI(e,fe,qu),8);case 8:if(vc=Lo.h,!e.j)return Lo.return();ft.wh(vc);case 7:ft.ie(),e.m&&!e.i.presentationTimeline.U()&&e.m.release();case 4:e.j.makeTextStreamsForClosedCaptions(e.i),TI(e),se(Lo)}})}function _T(e,t,n){var i;return z(function(r){if(r.g==1)return _(r,e.m.gf(t,!0,n),2);e.i.variants=e.m.l,i=e.m.Jf(),0<i.length&&(e.i.textStreams=i),e.i.imageStreams=e.m.i,e.j.filter(e.i),se(r)})}function gI(e,t){var n,i,r,l,c,f,y,m,T,x,D,R,N,U,L,j,V,X,G,Z,q,K,W,Q,oe,ne,re;return z(function(le){if(le.g==1){if(n=t.attributes.mpdId,i=Ge(t,"originalPublishTime",Tl),!n||n!==e.l.me||i!==e.l.Id)throw e.F=[],new Y(1,4,4052);for(r=[],l=[],c=new Set,f=b(ps(t)),y=f.next();!y.done;y=f.next())if(m=y.value,T=ys(m.attributes.sel||""),x=T[T.length-1],D=Xi(m)||"",x.name==="MPD")if(x.ac==="mediaPresentationDuration"){R=Xi(m)||"";var fe=co(R);if(fe!=null){e.l.Wb=fe;for(var ye=b(e.u.values()),de=ye.next();!de.done;de=ye.next())de.value.Wb=fe}}else if(x.ac==="type"){for(e.i.presentationTimeline.Gc(D=="static"),e.l.type=D,fe=b(e.u.values()),ye=fe.next();!ye.done;ye=fe.next())ye.value.Ob=D=="dynamic";D=="static"&&(e.I=-1)}else x.ac==="publishTime"?e.l.Id=Tl(D)||0:x.ac===null&&m.tagName==="add"&&l.push(m);else if(x.name==="PatchLocation")th(e.F,m);else if(x.name==="Period")m.tagName==="add"?l.push(m):m.tagName==="remove"&&x.id&&vI(e,x.id);else if(x.name==="SegmentTemplate"){if(ye=ys(m.attributes.sel||""),fe=ye[ye.length-1],fe.ac){ye=UT(e,ye),de=Xi(m)||"";for(var xe=b(ye),De=xe.next();!De.done;De=xe.next())De=e.u.get(De.value),ih(De.J.ic,m.tagName,fe.ac,de);fe=ye}else fe=[];for(N=fe,U=b(N),L=U.next();!L.done;L=U.next())j=L.value,c.add(j)}else if(x.name==="SegmentTimeline"||x.name==="S"){for(fe=ys(m.attributes.sel||""),fe=UT(e,fe),ye=b(fe),de=ye.next();!de.done;de=ye.next())de=e.u.get(de.value),de=gp(de,hc,"SegmentTimeline"),xe=Lt(de,"S"),th(xe,m),de.children=xe;for(V=fe,X=b(V),G=X.next();!G.done;G=X.next())Z=G.value,c.add(Z)}for(q=b(c),K=q.next();!K.done;K=q.next())W=K.value,jT(e,W);for(Q=b(l),oe=Q.next();!oe.done;oe=Q.next())ne=oe.value,r.push.apply(r,J(mI(e,ne)));return r.length?(e.i.periodCount+=r.length,e.i.gapCount=e.L,_(le,_T(e,r,!0),2)):le.s(2)}e.l.type=="static"&&(re=e.l.Wb,e.i.presentationTimeline.bb(re||1/0)),se(le)})}function mI(e,t){return BT(e,{Ob:e.l.type=="dynamic",presentationTimeline:e.i.presentationTimeline,qa:null,ha:null,ga:null,J:null,bandwidth:0,Lf:!1,cb:e.l.cb,profiles:e.l.profiles,Wb:e.l.Wb,roles:null,vb:function(){return""}},e.l.Ua,t,!0).periods}function vI(e,t){e.i.periodCount--;for(var n=b(e.u.keys()),i=n.next();!i.done;i=n.next())if(i=i.value,i.startsWith(t)){var r=e.u.get(i);gp(r,hc,"SegmentTimeline").children=[],jT(e,i),e.u.delete(i)}e.C=e.C.filter(function(l){return l!==t})}function UT(e,t){var n="",i="",r=-1,l="";t=b(t);for(var c=t.next();!c.done;c=t.next())c=c.value,c.name==="Period"?n=c.id:c.name==="AdaptationSet"?(i=c.id,c.position!==null&&(r=c.position)):c.name==="Representation"&&(l=c.id);if(t=[],l)t.push(n+","+l);else if(i)for(r=b(e.u.values()),e=r.next();!e.done;e=r.next())e=e.value,e.qa.id===n&&e.ga.id===i&&e.J.id&&t.push(n+","+e.J.id);else if(-1<r)for(i=b(e.u.values()),e=i.next();!e.done;e=i.next())e=e.value,e.qa.id===n&&e.ga.position===r&&e.J.id&&t.push(n+","+e.J.id);return t}function jT(e,t){var n=e.u.get(t),i=e.o.get(t);i.segmentIndex&&i.segmentIndex.Oa(e.i.presentationTimeline.pb());try{var r=xT(n,function(l,c,f,y){return qT(e,l,c,f,y)},e.o,!0,e.g.dash.initialSegmentLimit,e.ka,n.J.aesKey,null,!0);i.createSegmentIndex=function(){return z(function(l){if(l.g==1)return i.segmentIndex?l.s(0):_(l,r.rc(),3);i.segmentIndex=l.h,se(l)})}}catch(l){if(t=n.J.contentType,t!=at&&t!="application"&&t!="image"||l.code!=4002)throw l}}function SI(e){var t=An(e,"ServiceDescription");if(!t||(e=An(t,"Latency"),t=An(t,"PlaybackRate"),!e&&!t))return null;var n={};return e&&("target"in e.attributes&&(n.targetLatency=parseInt(e.attributes.target,10)/1e3),"max"in e.attributes&&(n.maxLatency=parseInt(e.attributes.max,10)/1e3),"min"in e.attributes&&(n.minLatency=parseInt(e.attributes.min,10)/1e3)),t&&("max"in t.attributes&&(n.maxPlaybackRate=parseFloat(t.attributes.max)),"min"in t.attributes&&(n.minPlaybackRate=parseFloat(t.attributes.min))),n}function wI(e){if(e=Lt(e,"SupplementalProperty"),!e.length)return null;e=b(e);for(var t=e.next();!t.done;t=e.next())if(t=t.value,t.attributes.schemeIdUri=="urn:mpeg:dash:chaining:2016")return t.attributes.value;return null}function BT(e,t,n,i,r){var l=t.Wb;l||(l=Ge(i,"mediaPresentationDuration",co),e.l.Wb=l);var c=0;e.i&&e.i.presentationTimeline&&e.T&&(c=e.i.presentationTimeline.Hb());var f=[],y=c;i=Lt(i,"Period");for(var m=0;m<i.length;m++){var T=i[m],x=i[m+1],D=Ge(T,"start",co,y),R=T.attributes.id,N=Ge(T,"duration",co);D=m==0&&D==0&&e.T?c:D;var U=null;if(x){var L=Ge(x,"start",co);L!=null&&(U=L-D+c)}else l!=null&&(U=l-D+c);if(L=Ag,U&&N&&Math.abs(U-N)>L&&U>N&&e.L++,U==null&&(U=N),!(e.M!==null&&R!==null&&D!==null&&D<e.M)||e.C.includes(R)||m+1==i.length){if(D!==null&&(e.M===null||D>e.M)&&(e.M=D),y=xI(e,t,n,{start:D,duration:U,node:T,$g:U==null||!x}),f.push(y),t.qa.id&&U&&e.ka.set(t.qa.id,U),U==null){y=null;break}y=D+U}}if(r)for(t=b(f),n=t.next();!n.done;n=t.next())n=n.value.id,e.C.includes(n)||e.C.push(n);else e.C=f.map(function(j){return j.id});return l!=null?{periods:f,duration:l+c,Mg:!1}:{periods:f,duration:y,Mg:!0}}function TI(e){var t=Array.from(e.B.keys()).filter(function(f){return!e.C.includes(f)});t=b(t);for(var n=t.next();!n.done;n=t.next()){n=n.value;for(var i=!0,r=b(e.B.get(n)),l=r.next();!l.done;l=r.next()){l=l.value;var c=e.o.get(l);c&&(c.segmentIndex&&c.segmentIndex.getNumReferences()!=0?i=!1:(e.m&&e.m.Kg(c,n),e.o.delete(l)))}i&&e.B.delete(n)}}function xI(e,t,n,i){t.qa=z1(e,i.node,null,n),t.ha=i,t.qa.cb=t.cb,t.qa.id||(t.qa.id="__shaka_period_"+i.start);var r=Lt(i.node,"EventStream");n=t.presentationTimeline.pb(),r=b(r);for(var l=r.next();!l.done;l=r.next())OI(e,i.start,i.duration,l.value,n);for(n=Lt(i.node,"SupplementalProperty"),n=b(n),r=n.next();!r.done;r=n.next())r=r.value,r.attributes.schemeIdUri=="urn:mpeg:dash:urlparam:2014"&&(r=Hy(e,r))&&(t.vb=r);if(n=Lt(i.node,"AdaptationSet").map(function(R,N){return VT(e,t,N,R)}).filter(Fo),t.Ob){r=[],l=b(n);for(var c=l.next();!c.done;c=l.next()){c=b(c.value.rj);for(var f=c.next();!f.done;f=c.next())r.push(f.value)}if(r.length!=new Set(r).size)throw new Y(2,4,4018)}for(r=new Map,l=b(n),c=l.next();!c.done;c=l.next())for(c=b(c.value.ei),f=c.next();!f.done;f=c.next()){var y=b(f.value);f=y.next().value,y=y.next().value,r.set(f,y)}if(r.size)for(l=null,c=b(n),f=c.next();!f.done;f=c.next()){f=f.value,y=[];for(var m=b(f.streams),T=m.next(),x={};!T.done;x={og:void 0},T=m.next())if(x.og=T.value,r.has(x.og.originalId)){l||(l=Lt(i.node,"AdaptationSet").map(function(R,N){return VT(e,t,N,R)}).filter(Fo)),T=b(l);for(var D=T.next();!D.done;D=T.next())(D=D.value.streams.find(function(R){return function(N){return N.originalId==R.og.originalId}}(x)))&&(D.dependencyStream=r.get(D.originalId),y.push(D))}y.length&&f.streams.push.apply(f.streams,J(y))}if(i=n.filter(function(R){return!R.vg}),n=n.filter(function(R){return R.vg}),!e.g.disableIFrames){for(n=b(n),r=n.next();!r.done;r=n.next())for(r=r.value,l=r.vg.split(" "),c=b(i),f=c.next();!f.done;f=c.next())if(f=f.value,l.includes(f.id))for(f=b(f.streams),y=f.next();!y.done;y=f.next())yh(y.value,r.streams)}if(n=vv(e.g.disableAudio,i,"audio"),r=vv(e.g.disableVideo,i,"video"),l=vv(e.g.disableText,i,at),i=vv(e.g.disableThumbnails,i,"image"),r.length===0&&n.length===0)throw new Y(2,4,4004);return{id:t.qa.id,audioStreams:n,videoStreams:r,textStreams:l,imageStreams:i}}function vv(e,t,n){return e||!t.length?[]:t.reduce(function(i,r){return r.contentType!=n||i.push.apply(i,J(r.streams)),i},[])}function VT(e,t,n,i){function r(re){var le=re.attributes["dvb:fontFamily"];re=re.attributes["dvb:url"],le&&re&&(re=_n(t.ga.Ua(),[re],t.vb()),e.j.addFont(le,re[0]))}function l(re){switch(re){case 1:case 5:case 6:case 7:return"srgb";case 9:return"rec2020";case 11:case 12:return"p3"}}function c(re){switch(re){case 1:case 6:case 13:case 14:case 15:return"SDR";case 16:return"PQ";case 18:return"HLG"}}t.ga=z1(e,i,t.qa,null),t.ga.position=n;var f=!1;n=Lt(i,"Role");var y=n.map(function(re){return re.attributes.value}).filter(Fo),m=void 0,T=t.ga.contentType==at;T&&(m="subtitle"),n=b(n);for(var x=n.next();!x.done;x=n.next()){x=x.value;var D=x.attributes.schemeIdUri;if(D==null||D=="urn:mpeg:dash:role:2011")switch(x=x.attributes.value,x){case"main":f=!0;break;case"caption":case"subtitle":m=x}}var R=Lt(i,"EssentialProperty");n=null;var N=!1;x=null,D=!1,R=b(R);for(var U=R.next();!U.done;U=R.next()){U=U.value;var L=U.attributes.schemeIdUri;if(L=="http://dashif.org/guidelines/trickmode")n=U.attributes.value;else if(L=="urn:mpeg:mpegB:cicp:TransferCharacteristics")var j=c(parseInt(U.attributes.value,10));else if(L=="urn:mpeg:mpegB:cicp:ColourPrimaries")var V=l(parseInt(U.attributes.value,10));else L!="urn:mpeg:mpegB:cicp:MatrixCoefficients"&&(L=="urn:mpeg:dash:ssr:2023"&&e.g.dash.enableFastSwitching?N=!0:L=="urn:dvb:dash:fontdownload:2014"?r(U):L=="urn:mpeg:dash:urlparam:2014"&&(x=Hy(e,U))||(D=!0))}if(D)return null;var X=null;for(D=Lt(i,"SupplementalProperty"),D=b(D),R=D.next();!R.done;R=D.next())R=R.value,U=R.attributes.schemeIdUri,U=="http://dashif.org/guidelines/last-segment-number"?X=parseInt(R.attributes.value,10)-1:U=="urn:mpeg:mpegB:cicp:TransferCharacteristics"?j=c(parseInt(R.attributes.value,10)):U=="urn:mpeg:mpegB:cicp:ColourPrimaries"?V=l(parseInt(R.attributes.value,10)):U=="urn:dvb:dash:fontdownload:2014"?r(R):U=="urn:mpeg:dash:urlparam:2014"&&(x=Hy(e,R));x&&(t.vb=x),x=Lt(i,"Accessibility");var G=new Map,Z;for(x=b(x),D=x.next();!D.done;D=x.next())if(R=D.value,D=R.attributes.schemeIdUri,R=R.attributes.value,D!="urn:scte:dash:cc:cea-608:2015"||e.g.disableText)if(D!="urn:scte:dash:cc:cea-708:2015"||e.g.disableText)D=="urn:mpeg:dash:role:2011"?R!=null&&(y.push(R),R=="captions"&&(m="caption")):D=="urn:tva:metadata:cs:AudioPurposeCS:2007"&&(R=="1"?Z="visually impaired":R=="2"&&(Z="hard of hearing"));else if(D=1,R!=null)for(R=b(R.split(";")),U=R.next();!U.done;U=R.next()){L=U.value;var q=U=void 0;L.includes("=")?(L=L.split("="),U="svc"+L[0],q=L[1].split(",")[0].split(":").pop()):(U="svc"+D,D++,q=L),G.set(U,It(q))}else G.set("svc1","und");else if(D=1,R!=null)for(R=R.split(";"),U=b(R),L=U.next();!L.done;L=U.next()){q=L.value;var K=L=void 0;q.includes("=")?(q=q.split("="),L=q[0].startsWith("CC")?q[0]:"CC"+q[0],K=q[1]||"und"):(L="CC"+D,R.length==2?D+=2:D++,K=q),G.set(L,It(K))}else G.set("CC1","und");x=Lt(i,"ContentProtection");var W=dT(x,e.g.ignoreDrmInfo,e.g.dash.keySystemsByURI);t.ga.encrypted=0<x.length;var Q=It(t.ga.language||"und"),oe=t.ga.label,ne=new Map;if(i=Lt(i,"Representation"),!e.g.ignoreSupplementalCodecs){for(x=[],D=b(i),R=D.next();!R.done;R=D.next())U=R.value,(R=wl(U,"urn:scte:dash:scte214-extensions","supplementalCodecs"))&&(U=so(U),U.attributes.codecs=R.split(" ").join(","),U.attributes.id&&(U.attributes.supplementalId=U.attributes.id+"_supplementalCodecs"),x.push(U));i.push.apply(i,J(x))}if(x=i.map(function(re){var le=EI(e,t,W,m,Q,oe,f,y,G,re,Z,X);return le&&(le.hdr=le.hdr||j,le.colorGamut=le.colorGamut||V,le.fastSwitching=N,re=re.attributes.dependencyId)?(le.baseOriginalId=re,ne.set(re,le),null):le}).filter(function(re){return!!re}),x.length==0&&ne.size==0){if(n=t.ga.contentType=="image",e.g.dash.ignoreEmptyAdaptationSet||T||n)return null;throw new Y(2,4,4003)}if(!t.ga.contentType||t.ga.contentType=="application")for(t.ga.contentType=FT(x[0].mimeType,x[0].codecs),T=b(x),D=T.next();!D.done;D=T.next())D.value.type=t.ga.contentType;for(T=t.ga.id||"__fake__"+e.pa++,D=b(x),R=D.next();!R.done;R=D.next()){for(R=R.value,U=b(W.drmInfos),L=U.next();!L.done;L=U.next())L=L.value,L.keyIds=L.keyIds&&R.keyIds?new Set([].concat(J(L.keyIds),J(R.keyIds))):L.keyIds||R.keyIds;R.groupId=T}return i=i.map(function(re){return re.attributes.supplementalId||re.attributes.id}).filter(Fo),{id:T,contentType:t.ga.contentType,language:Q,Qk:f,streams:x,drmInfos:W.drmInfos,vg:n,rj:i,ei:ne}}function Hy(e,t){if((t=Tr(t,"urn:mpeg:dash:schema:urlparam:2014","UrlQueryInfo"))&&Ge(t,"useMPDUrlQuery",Nc,!1)){var n=t.attributes.queryTemplate;if(n)return function(){return n=="$querypart$"?e.Z:n.split("&").map(function(i){if(i=="$querypart$")return e.Z;var r=/\$query:(.*?)\$/g.exec(i);if(r&&r.length==2){r=r[1];var l=new Jn(e.Z).get(r);if(l.length)return r+"="+l[0]}return i}).join("&")}}return null}function EI(e,t,n,i,r,l,c,f,y,m,T,x){t.J=z1(e,m,t.ga,null);var D=t.J.id;if(e.$=Math.min(e.$,t.J.cb),e.P=0<e.$,!II(t.J))return null;var R=t.ha.start;t.bandwidth=Ge(m,"bandwidth",xl)||0,t.roles=f;var N=Lt(m,"SupplementalProperty"),U=Lt(m,"EssentialProperty"),L=Lt(m,"ContentProtection");m=null;var j=U.find(function(ye){return ye.attributes.schemeIdUri=="urn:mpeg:dash:urlparam:2014"});(j||(j=N.find(function(ye){return ye.attributes.schemeIdUri=="urn:mpeg:dash:urlparam:2014"})))&&(m=Hy(e,j)),m&&(t.vb=m),j=t.J.contentType,m=j==at||j=="application",j=j=="image",L.length&&(t.ga.encrypted=!0);try{var V=void 0;if(n.cf){var X=t.J.Ua,G=t.vb,Z=_n(X(),[n.cf.Xi],G()),q=cn(Z,e.g.retryParameters);V={bitsKey:128,blockCipherMode:"CBC",iv:n.cf.iv,firstMediaSequenceNumber:0,fetchKey:function(){var ye,de,xe;return z(function(De){if(De.g==1)return _(De,G1(e,q,6),2);if(De.g!=3){if(ye=De.h,!ye.data||ye.data.byteLength!=16)throw new Y(2,4,4049);return de={name:"AES-CBC"},xe=V,_(De,w.crypto.subtle.importKey("raw",ye.data,de,!0,["decrypt"]),3)}xe.cryptoKey=De.h,V.fetchKey=void 0,se(De)})}}}if(t.J.aesKey=V,X=function(ye,de,xe,De){return qT(e,ye,de,xe,De)},t.J.dd)var K=z3(t,X,V);else if(t.J.Zb)K=X3(t,e.o,V);else if(t.J.ic)K=xT(t,X,e.o,!!e.i,e.g.dash.initialSegmentLimit,e.ka,V,x,!1);else{var W=t.ha.duration||0,Q=t.J.Ua,oe=t.J.mimeType,ne=t.J.codecs;K={rc:function(){var ye=yf(R,W,Q());return ye.Eb(function(de){de.mimeType=oe,de.codecs=ne}),Promise.resolve(ye)}}}}catch(ye){if((m||j)&&ye.code==4002)return null;throw ye}x=M3(L,n,e.g.ignoreDrmInfo,e.g.dash.keySystemsByURI),x=new Set(x?[x]:[]),L=!1,N.some(function(ye){return ye.attributes.schemeIdUri=="tag:dolby.com,2018:dash:EC3_ExtensionType:2018"&&ye.attributes.value=="JOC"})&&(L=!0),N=!1,m&&(N=f.includes("forced_subtitle")||f.includes("forced-subtitle"));var re;if(j&&((U=U.find(function(ye){return["http://dashif.org/thumbnail_tile","http://dashif.org/guidelines/thumbnail_tile"].includes(ye.attributes.schemeIdUri)}))&&(re=U.attributes.value),!re))return null;var le;m=t.J.codecs,t.profiles.includes("http://dashif.org/guidelines/dash-if-uhd#hevc-hdr-pq10")&&(m.includes("hvc1.2.4.L153.B0")||m.includes("hev1.2.4.L153.B0"))&&(le="PQ"),U=t.J.id?t.qa.id+","+t.J.id:"",e.F.length&&D&&e.u.set(t.qa.id+","+D,AI(t));var fe=U&&e.o.has(U)?e.o.get(U):{id:e.pa++,originalId:t.J.id,groupId:null,createSegmentIndex:function(){return Promise.resolve()},closeSegmentIndex:function(){fe.segmentIndex&&(fe.segmentIndex.release(),fe.segmentIndex=null)},segmentIndex:null,mimeType:t.J.mimeType,codecs:m,frameRate:t.J.frameRate,pixelAspectRatio:t.J.pixelAspectRatio,bandwidth:t.bandwidth,width:t.J.width,height:t.J.height,kind:i,encrypted:0<n.drmInfos.length,drmInfos:n.drmInfos,keyIds:x,language:r,originalLanguage:t.ga.language,label:l,type:t.ga.contentType,primary:c,trickModeVideo:null,dependencyStream:null,emsgSchemeIdUris:t.J.emsgSchemeIdUris,roles:f,forced:N,channelsCount:t.J.oe,audioSamplingRate:t.J.audioSamplingRate,spatialAudio:L,closedCaptions:y,hdr:le,colorGamut:void 0,videoLayout:void 0,tilesLayout:re,accessibilityPurpose:T,external:!1,fastSwitching:!1,fullMimeTypes:new Set([hn(t.J.mimeType,t.J.codecs)]),isAudioMuxedInVideo:!1,baseOriginalId:null};return fe.createSegmentIndex=function(){var ye;return z(function(de){if(de.g==1)return fe.segmentIndex?de.s(0):(ye=fe,_(de,K.rc(),3));ye.segmentIndex=de.h,se(de)})},U&&t.Ob&&!e.o.has(U)&&(t=t.qa.id||"",e.B.has(t)||e.B.set(t,[]),e.o.set(U,fe),e.B.get(t).push(U)),fe}function AI(e){function t(n){return n?(n=Xa(n),n.dd=null,n.Zb=null,n.ic=rh(n.ic),n):null}return e=Xa(e),e.qa=t(e.qa),e.ga=t(e.ga),e.J=t(e.J),e.ha&&(e.ha=Xa(e.ha),e.ha.node=null),e}function HT(e){var t,n;return z(function(i){switch(i.g){case 1:return t=0,pe(i,2),_(i,q1(e),4);case 4:t=i.h,Ue(i,3);break;case 2:if(n=Me(i),e.j){if(e.g.raiseFatalErrorOnManifestUpdateRequestFailure)return e.j.onError(n),i.return();n.severity=1,e.j.onError(n)}case 3:if(!e.j)return i.return();e.j.onManifestUpdated(),F1(e,t),se(i)}})}function F1(e,t){if(!(0>e.I)){var n=e.I;0<=e.g.updatePeriod&&(n=e.g.updatePeriod),e.K.da(Math.max(n-t,Yf(e.oa)))}}function z1(e,t,n,i){n=n||{contentType:"",mimeType:"",codecs:"",emsgSchemeIdUris:[],frameRate:void 0,pixelAspectRatio:void 0,oe:null,audioSamplingRate:null,cb:0,Ae:0,encrypted:!1},i=i||n.Ua;var r=t.attributes.id,l=t.attributes.supplementalId,c=Lt(t,"BaseURL"),f,y=!1;if(e.h)for(var m=b(c),T=m.next();!T.done;T=m.next()){var x=T.value;T=x.attributes.serviceLocation,x=Xi(x),T&&x&&(Sp(e.h,r,T,x),y=!0)}y&&e.h||(f=c.map(Xi)),m=t.attributes.contentType||n.contentType,T=t.attributes.mimeType||n.mimeType,x=mn([t.attributes.codecs||n.codecs]).join(",");var D=Ge(t,"frameRate",eh)||n.frameRate,R=t.attributes.sar||n.pixelAspectRatio,N=CI(Lt(t,"InbandEventStream"),n.emsgSchemeIdUris),U=Lt(t,"AudioChannelConfiguration");U=bI(U)||n.oe;var L=Ge(t,"audioSamplingRate",$n)||n.audioSamplingRate;m||(m=FT(T,x));var j=An(t,"SegmentBase"),V=An(t,"SegmentTemplate"),X=j&&Ge(j,"availabilityTimeOffset",hs)||0,G=V&&Ge(V,"availabilityTimeOffset",hs)||0,Z=c&&c.length&&Ge(c[0],"availabilityTimeOffset",hs)||0;X=n.cb+Z+X+G,G=null,(Z=An(t,"SegmentSequenceProperties"))&&(Z=An(Z,"SAP"))&&(G=Ge(Z,"cadence",Zn)),Z=t.attributes.label;var q=Lt(t,"Label");return q&&q.length&&(q=q[0],In(q)&&(Z=In(q))),{Ua:function(){return _n(i(),c.length?e.h&&y?_y(e.h,r):f||[]:[])},dd:j||n.dd,Zb:An(t,"SegmentList")||n.Zb,ic:V||n.ic,width:Ge(t,"width",$n)||n.width,height:Ge(t,"height",$n)||n.height,contentType:m,mimeType:T,codecs:x,frameRate:D,pixelAspectRatio:R,emsgSchemeIdUris:N,id:l||r,originalId:r,language:t.attributes.lang,oe:U,audioSamplingRate:L,cb:X,de:null,Ae:G||n.Ae,label:Z||null,encrypted:!1}}function CI(e,t){t=t.slice(),e=b(e);for(var n=e.next();!n.done;n=e.next())n=n.value.attributes.schemeIdUri,t.includes(n)||t.push(n);return t}function bI(e){e=b(e);for(var t=e.next();!t.done;t=e.next()){t=t.value;var n=t.attributes.schemeIdUri;if(n&&(t=t.attributes.value))switch(n){case"urn:mpeg:dash:outputChannelPositionList:2012":return t.trim().split(/ +/).length;case"urn:mpeg:dash:23003:3:audio_channel_configuration:2011":case"urn:dts:dash:audio_channel_configuration:2012":if(t=parseInt(t,10),!t)continue;return t;case"tag:dolby.com,2015:dash:audio_channel_configuration:2015":if(n=[2,1,2,2,2,2,1,2,2,1,1,1,1,2,1,1,2,2],t=parseInt(t,16),!t)continue;for(var i=0,r=0;r<n.length;r++)t&1<<r&&(i+=n[r]);if(i)return i;continue;case"tag:dolby.com,2014:dash:audio_channel_configuration:2011":case"urn:dolby:dash:audio_channel_configuration:2011":if(n=[1,1,1,1,1,2,2,1,1,2,2,2,1,2,1,1].reverse(),t=parseInt(t,16),!t)continue;for(r=i=0;r<n.length;r++)t&1<<r&&(i+=n[r]);if(i)return i;continue;case"urn:mpeg:mpegB:cicp:ChannelConfiguration":if(n=[0,1,2,3,4,5,6,8,2,3,4,7,8,24,8,12,10,12,14,12,14],(t=parseInt(t,10))&&0<t&&t<n.length)return n[t]}}return null}function II(e){var t=e.dd?1:0;return t+=e.Zb?1:0,t+=e.ic?1:0,t==0?e.contentType==at||e.contentType=="application":(t!=1&&(e.dd&&(e.Zb=null),e.ic=null),!0)}function KT(e,t,n,i){var r,l,c,f,y,m,T;return z(function(x){if(x.g==1)return r=[Ai(n)],l=_n(t(),r),c=cn(l,e.g.retryParameters),c.method=i,f=e.j.networkingEngine.request(4,c,{isPreload:e.ea()}),Yo(e.O,f),_(x,f.promise,2);if(y=x.h,i=="HEAD"){if(!y.headers||!y.headers.date)return x.return(0);m=y.headers.date}else m=nn(y.data);return T=Date.parse(m),isNaN(T)?x.return(0):x.return(T-Date.now())})}function DI(e,t,n){var i,r,l,c,f,y,m,T;return z(function(x){switch(x.g){case 1:i=n.map(function(D){return{scheme:D.attributes.schemeIdUri,value:D.attributes.value}}),r=e.g.dash.clockSyncUri,!i.length&&r&&i.push({scheme:"urn:mpeg:dash:utc:http-head:2014",value:r}),l=b(i),c=l.next();case 2:if(c.done){x.s(4);break}switch(f=c.value,pe(x,5),y=f.scheme,m=f.value,y){case"urn:mpeg:dash:utc:http-head:2014":case"urn:mpeg:dash:utc:http-head:2012":return x.s(7);case"urn:mpeg:dash:utc:http-xsdate:2014":case"urn:mpeg:dash:utc:http-iso:2014":case"urn:mpeg:dash:utc:http-xsdate:2012":case"urn:mpeg:dash:utc:http-iso:2012":return x.s(8);case"urn:mpeg:dash:utc:direct:2014":case"urn:mpeg:dash:utc:direct:2012":return T=Date.parse(m),x.return(isNaN(T)?0:T-Date.now());case"urn:mpeg:dash:utc:http-ntp:2014":case"urn:mpeg:dash:utc:ntp:2014":case"urn:mpeg:dash:utc:sntp:2014":bt("NTP UTCTiming scheme is not supported");break;default:bt("Unrecognized scheme in UTCTiming element",y)}x.s(9);break;case 7:return _(x,KT(e,t,m,"HEAD"),10);case 10:return x.return(x.h);case 8:return _(x,KT(e,t,m,"GET"),11);case 11:return x.return(x.h);case 9:Ue(x,3);break;case 5:Me(x);case 3:c=l.next(),x.s(2);break;case 4:return bt("A UTCTiming element should always be given in live manifests! This content may not play on clients with bad clocks!"),x.return(0)}})}function OI(e,t,n,i,r){var l=i.attributes.schemeIdUri||"",c=i.attributes.value||"",f=Ge(i,"timescale",$n)||1,y=Ge(i,"presentationTimeOffset",$n)||0;i=b(Lt(i,"Event"));for(var m=i.next();!m.done;m=i.next()){m=m.value;var T=Ge(m,"presentationTime",$n)||0,x=Ge(m,"duration",$n)||0;T=Math.max((T-y)/f+t,t),x=T+x/f,n!=null&&(T=Math.min(T,t+n),x=Math.min(x,t+n)),x<r||(m={schemeIdUri:l,value:c,startTime:T,endTime:x,id:m.attributes.id||"",timescale:f,eventElement:Og(m),eventNode:rh(m)},e.j.onTimelineRegionAdded(m))}}function qT(e,t,n,i,r){var l,c,f,y;return z(function(m){return m.g==1?(l=Wi,c=r?0:1,f=Sf(t,n,i,e.g.retryParameters),_(m,G1(e,f,l,{type:c}),2)):(y=m.h,m.return(y.data))})}function FT(e,t){return t=hn(e,t),Dl(t)?at:e.split("/")[0]}function G1(e,t,n,i){return i||(i={}),i.isPreload=e.ea(),t=e.j.networkingEngine.request(n,t,i),Yo(e.O,t),t.promise}function kI(e){var t=e.l.Id;if(!e.l.me||!t||!e.F.length)return[];var n=Date.now()/1e3,i=e.F.filter(function(r){return r=$n(r.attributes.ttl),!r||t+r>n}).map(Xi).filter(Fo);return i.length?_n(e.A,i):[]}Pe("shaka.dash.DashParser",mv),cu("application/dash+xml",function(){return new mv}),cu("video/vnd.mpeg.dash.mpd",function(){return new mv});function Sv(){}Pe("shaka.dependencies",Sv),Sv.has=function(e){return X1.has(e)},Sv.add=function(e,t){if(!GT[e])throw Error(e+" is not supported");e==zT?Ot("mux.js","mux.js is no longer used in Shaka Player."):X1.set(e,function(){return t})};var zT="muxjs",GT={Rk:zT,ISOBoxer:"ISOBoxer"};Sv.Allowed=GT;var X1=new Map([["ISOBoxer",function(){return w.ISOBoxer}]]);function XT(e,t,n){this.type=e,this.ca=t,this.segments=n||null}function wv(e,t,n,i){this.id=e,this.name=t,this.attributes=n,this.value=i===void 0?null:i}wv.prototype.toString=function(e){function t(r){return r.name+"="+(isNaN(Number(r.value))?'"'+r.value+'"':r.value)}var n="#"+this.name,i=this.attributes?this.attributes.filter(function(r){return e?!e.has(r.name):!0}).map(t):[];return this.value&&i.unshift(this.value),0<i.length&&(n+=":"+i.join(",")),n};function YT(e,t){return t?e.toString():(t=new Set().add("AUDIO").add("VIDEO").add("SUBTITLES").add("PATHWAY-ID").add("GROUP-ID").add("URI"),e.toString(t))}function Tp(e,t){return e=e.attributes.filter(function(n){return n.name==t}),e.length?e[0]:null}function He(e,t,n){return(e=Tp(e,t))?e.value:n||null}function Ft(e,t){if(e=Tp(e,t),!e)throw new Y(2,4,4023,t);return e.value}function WT(e,t,n){n=n===void 0?[]:n,this.ca=t,this.g=e,this.Jb=n}function Tv(e,t){this.name=e,this.value=t}function Oo(e,t){return e.filter(function(n){return n.name==t})}function QT(e,t){return e.filter(function(n){return Ft(n,"TYPE")==t})}function Ti(e,t){e=b(e);for(var n=e.next();!n.done;n=e.next())if(n=n.value,n.name===t)return n;return null}function xp(e,t,n){return n=n===void 0?0:n,(e=Ti(e,t))?Number(e.value):n}function mc(e,t,n){return t?JT(e,[t],n):[]}function JT(e,t,n){if(!t.length)return[];var i=t;return n&&n.size&&(i=t.map(function(r){return ZT(r,n)})),_n(e,i)}function ZT(e,t){if(!t||!t.size)return e;e=String(e).replace(/%7B/g,"{").replace(/%7D/g,"}");var n=e.match(/{\$\w*}/g);if(n){n=b(n);for(var i=n.next();!i.done;i=n.next()){i=i.value;var r=i.slice(2,i.length-1),l=t.get(r);if(l)e=e.replace(i,l);else throw new Y(2,4,4039,r)}}return e}function RI(){this.g=0}function Y1(e,t){t=nn(t),t=t.replace(/\r\n|\r(?=[^\n]|$)/gm,`
`).trim();var n=t.split(/\n+/m);if(!/^#EXTM3U($|[ \t\n])/m.test(n[0]))throw new Y(2,4,4015);t=0;for(var i=!0,r=b(n),l=r.next();!l.done;l=r.next())if(l=l.value,/^#(?!EXT)/m.test(l)||i)i=!1;else if(l=W1(e,l),--e.g,$T.includes(l.name)){t=1;break}else l.name=="EXT-X-STREAM-INF"&&(i=!0);for(r=[],i=!0,l=0;l<n.length;l++){var c=n[l],f=n[l+1];if(/^#(?!EXT)/m.test(c)||i)i=!1;else{if(c=W1(e,c),MI.includes(c.name)){if(t!=1)throw new Y(2,4,4017);c=n.splice(l,n.length-l),n=[],i=[],l=[],f=null,c=b(c);for(var y=c.next();!y.done;y=c.next())y=y.value,/^(#EXT)/.test(y)?(y=W1(e,y),$T.includes(y.name)?r.push(y):y.name=="EXT-X-MAP"?f=y:y.name=="EXT-X-PART"?l.push(y):y.name=="EXT-X-PRELOAD-HINT"?He(y,"TYPE")=="PART"?l.push(y):He(y,"TYPE")=="MAP"&&(y.name="EXT-X-MAP",f=y):i.push(y)):/^#(?!EXT)/m.test(y)||(y=y.trim(),f&&i.push(f),n.push(new WT(y,i,l)),i=[],l=[]);return l.length&&(f&&i.push(f),n.push(new WT("",i,l))),new XT(t,r,n)}r.push(c),c.name=="EXT-X-STREAM-INF"&&(c.attributes.push(new Tv("URI",f)),i=!0)}}return new XT(t,r)}function W1(e,t){e=e.g++;var n=t.match(/^#(EXT[^:]*)(?::(.*))?$/);if(!n)throw new Y(2,4,4016,t);t=n[1];var i=n[2];n=[];var r;if(i){i=new ua(i);var l;(l=za(i,/^([^,=]+)(?:,|$)/g))&&(r=l[1]);for(var c=/([^=]+)=(?:"([^"]*)"|([^",]*))(?:,|$)/g;l=za(i,c);)n.push(new Tv(l[1],l[2]||l[3])),ss(i)}return new wv(e,t,n,r)}var $T="EXT-X-TARGETDURATION EXT-X-MEDIA-SEQUENCE EXT-X-DISCONTINUITY-SEQUENCE EXT-X-PLAYLIST-TYPE EXT-X-I-FRAMES-ONLY EXT-X-ENDLIST EXT-X-SERVER-CONTROL EXT-X-SKIP EXT-X-PART-INF EXT-X-DATERANGE".split(" "),MI="EXTINF EXT-X-BYTERANGE EXT-X-DISCONTINUITY EXT-X-PROGRAM-DATE-TIME EXT-X-KEY EXT-X-DATERANGE EXT-X-MAP EXT-X-GAP EXT-X-TILES".split(" ");function ex(){}function tx(e,t){try{var n=xv(e);return Cr({uri:e,originalUri:e,data:n.data,headers:{"content-type":n.contentType},originalRequest:t})}catch(i){return _l(i)}}function xv(e){var t=e.split(":");if(2>t.length||t[0]!="data")throw new Y(2,1,1004,e);if(t=t.slice(1).join(":").split(","),2>t.length)throw new Y(2,1,1004,e);var n=t[0];e=w.decodeURIComponent(t.slice(1).join(",")),t=n.split(";"),n=t[0];var i=!1;1<t.length&&t[t.length-1]=="base64"&&(i=!0,t.pop());var r;return i?r=Fi(e):r=Pr(e),{data:r,contentType:n}}Pe("shaka.net.DataUriPlugin",ex),ex.parse=tx,go("data",tx);function Ev(){var e=this;this.g=this.h=null,this.F=1,this.A=new Map,this.I=new Map,this.M=new Map,this.M.set("video",new Map),this.M.set("audio",new Map),this.M.set(at,new Map),this.M.set("image",new Map),this.Sb=new Map().set("com.apple.streamingkeydelivery",function(t,n,i){return nD(e,t,n,i)}).set("urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed",function(t){var n=Ft(t,"METHOD");if(["SAMPLE-AES","SAMPLE-AES-CTR"].includes(n)){var i="cenc";n=="SAMPLE-AES"&&(i="cbcs"),n=Ft(t,"URI"),n=xv(n.split("?")[0]),n=Ze(n.data),i=Lr("com.widevine.alpha",i,[{initDataType:"cenc",initData:n}]),(t=He(t,"KEYID"))&&i.keyIds.add(t.toLowerCase().substr(2)),t=Promise.resolve(i)}else t=Promise.resolve(null);return t}).set("com.microsoft.playready",function(t){var n=Ft(t,"METHOD");if(["SAMPLE-AES","SAMPLE-AES-CTR"].includes(n)){var i="cenc";n=="SAMPLE-AES"&&(i="cbcs"),t=Ft(t,"URI"),t=xv(t.split("?")[0]),t=Ze(t.data),n=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]),n=Yc(t,n,new Set,0),i=Lr("com.microsoft.playready",i,[{initDataType:"cenc",initData:n}]),(t=Ya(["<PLAYREADY>",Bo(t),"</PLAYREADY>"].join(`
`)))&&(i.licenseServerUri=cv(t)),i=Promise.resolve(i)}else i=Promise.resolve(null);return i}).set("urn:uuid:3d5e6d35-9b9a-41e8-b843-dd3c6e72c42c",function(t){var n=Ft(t,"METHOD");if(["SAMPLE-AES","SAMPLE-AES-CTR"].includes(n)){var i="cenc";n=="SAMPLE-AES"&&(i="cbcs"),n=Ft(t,"URI"),n=xv(n.split("?")[0]),n=Ze(n.data),i=Lr("com.huawei.wiseplay",i,[{initDataType:"cenc",initData:n}]),(t=He(t,"KEYID"))&&i.keyIds.add(t.toLowerCase().substr(2)),t=Promise.resolve(i)}else t=Promise.resolve(null);return t}),this.Na=new Set,this.i=new Map,this.l=null,this.C="",this.Ga=new RI,this.K=-1,this.ea=1/0,this.$=this.Ub=this.Ma=!1,this.B=new dt(function(){if(e.W&&!e.g.continueLoadingWhenPaused&&(e.T.Ja(e.W,"timeupdate"),e.W.paused)){e.T.ma(e.W,"timeupdate",function(){return xx(e)});return}xx(e)}),this.Ea=Dv,this.m=null,this.La=0,this.o=1/0,this.Fa=this.Aa=this.P=0,this.Z=new yo,this.G=new Map,this.H=new Map,this.sa=new Map,this.ka=new Map,this.L=new Map,this.oa=new Map,this.pa=new Map,this.Tb=this.fa=!1,this.Pb=new Wu(5),this.j=null,this.O=!0,this.ya=new Set,this.T=new vt,this.u=this.W=null,this.Qb=function(){return!1}}h=Ev.prototype,h.configure=function(e,t){var n=this.h&&e.updatePeriod!=this.g.updatePeriod&&0<=e.updatePeriod;this.g=e,t&&(this.Qb=t),this.j&&this.j.configure(this.g),n&&this.m&&this.m.presentationTimeline.U()&&this.B.sb()},h.start=function(e,t){var n=this,i;return z(function(r){return r.g==1?(n.h=t,n.fa=t.isLowLatencyMode(),_(r,iS(n,[e]).promise,2)):r.g!=3?(i=r.h,n.C=i.uri,_(r,LI(n,i.data),3)):r.return(n.m)})},h.stop=function(){this.B&&(this.B.stop(),this.B=null);var e=[];return this.Z&&(e.push(this.Z.destroy()),this.Z=null),this.g=this.h=null,this.Na.clear(),this.m=null,this.i.clear(),this.I.clear(),this.H.clear(),this.A.clear(),this.sa.clear(),this.ka.clear(),this.L.clear(),this.oa.clear(),this.pa.clear(),this.ya.clear(),this.j&&this.j.destroy(),this.T&&(this.T.release(),this.T=null),Promise.all(e)},h.update=function(){var e=this,t,n,i,r,l,c,f,y,m,T,x,D;return z(function(R){if(R.g==1){if(!Zi(e))return R.return();for(t=[],n=Array.from(e.i.values()),e.o=1/0,e.m.gapCount=0,i=n.filter(function(N){return N.stream.segmentIndex}),r=b(i),l=r.next();!l.done;l=r.next())c=l.value,t.push(NI(e,c));return _(R,Promise.all(t),2)}for(sx(e,i.map(function(N){return N.stream})),f=i.some(function(N){return N.rd==0}),i.length&&!f&&(y=aD,bv(e,y.Ph),m=i.map(function(N){return N.Vb}),e.l.bb(Math.min.apply(Math,J(m))),e.h.updateDuration()),f&&J1(e),T=b(i),x=T.next();!x.done;x=T.next())D=x.value,D.stream.isAudioMuxedInVideo||!D.stream.segmentIndex||Hn(D.stream.segmentIndex)||e.h.disableStream(D.stream);se(R)})};function Q1(e,t){return Zi(e)?e.M.get(t.type):t.je}function NI(e,t){var n,i,r,l,c,f,y,m,T,x,D,R,N,U,L,j,V,X,G,Z,q,K,W,Q,oe,ne,re,le,fe,ye,de,xe,De,Je,Ve,Pt;return z(function(Tt){switch(Tt.g){case 1:if(t.stream.isAudioMuxedInVideo)return Tt.return();for(n=[],i=b(t.N()),r=i.next();!r.done;r=i.next())l=r.value,c=new pn(l),f=c.g,t.Td&&(0<=t.Ab&&f.add("_HLS_msn",String(t.Ab)),0<=t.Bb&&f.add("_HLS_part",String(t.Bb))),t.Ud&&f.add("_HLS_skip","YES"),Ba(f)&&io(c,Qu(f.toString())),n.push(c.toString());return pe(Tt,2),_(Tt,iS(e,n,!0).promise,4);case 4:y=Tt.h,Ue(Tt,3);break;case 2:throw m=Me(Tt),e.h&&e.h.disableStream(t.stream),m;case 3:if(!t.stream.segmentIndex)return Tt.return();if(T=Y1(e.Ga,y.data),T.type!=1)throw new Y(2,4,4017);return x=y.uri,x==y.originalUri||t.N().includes(x)||t.ve.push(x),D=Oo(T.ca,"EXT-X-DEFINE"),R=Z1(e,D,x),N=t.stream,U=Q1(e,t),_(Tt,px(e,T,N.mimeType,t.N,R),5);case 5:for(L=Tt.h,j=L.keyIds,V=L.drmInfos,X=L.encrypted,G=L.Bg,N.encrypted||!X||G||(N.encrypted=!0),Z=function(ft,gt){return ft.size===gt.size&&[].concat(J(ft)).every(function(Mt){return gt.has(Mt)})},Z(N.keyIds,j)||(N.keyIds=j,N.drmInfos=V,e.h.newDrmInfo(N)),q=Sx(e,T,U,R,t.N,t.type),K=q.segments,(W=q.bandwidth)&&(N.bandwidth=W),Q=Zs(N),oe=b(K),ne=oe.next();!ne.done;ne=oe.next())re=ne.value,re.Y&&(re.Y.Wc=Q);N.segmentIndex.Bd(K,e.l.pb()),K.length&&(le=xp(T.ca,"EXT-X-MEDIA-SEQUENCE",0),ye=(fe=Ti(T.ca,"EXT-X-SKIP"))?Number(He(fe,"SKIPPED-SEGMENTS")):0,de=fx(le,K),xe=de.Ab,De=de.Bb,t.Ab=xe+ye,t.Bb=De,Je=U.get(le),N.segmentIndex.Oa(Je)),(Ve=Hn(N.segmentIndex))&&(t.Bc=Ve.startTime,Pt=K[K.length-1],t.Vb=Pt.endTime),Ti(T.ca,"EXT-X-ENDLIST")&&(t.rd=!0),eS(e,T),tS(e,T.ca,N.type,R,t.N),se(Tt)}})}h.onExpirationUpdated=function(){},h.onInitialVariantChosen=function(){},h.banLocation=function(e){this.j&&this.j.banLocation(e)},h.setMediaElement=function(e){this.W=e};function nx(e,t,n){n=n===void 0?!1:n;for(var i=e.K==-1,r=b(t),l=r.next();!l.done;l=r.next()){l=l.value;var c=l.stream.segmentIndex,f=Q1(e,l);if(c=Hn(c)){f=b(f);for(var y=f.next();!y.done;y=f.next()){y=b(y.value);var m=y.next().value;if(y.next().value==c.startTime){i&&(e.K=Math.max(e.K,m)),l.qf=m;break}}}}if(!(0>e.K))for(t=b(t),i=t.next();!i.done;i=t.next())i=i.value,(Ky(e,i.type)||n)&&(r=i.stream.segmentIndex)&&(l=e.K-i.qf,0<l&&(r.g.splice(0,l),r=Hn(r))&&(r=-r.startTime,i.stream.segmentIndex.offset(r),ix(e,i,r)))}function PI(e,t){if(e.ea==1/0){t=b(t);for(var n=t.next();!n.done;n=t.next())n=Hn(n.value.stream.segmentIndex),n!=null&&n.h!=null&&(e.ea=Math.min(e.ea,n.h))}if(t=e.ea,t!=1/0){n=b(e.i.values());for(var i=n.next();!i.done;i=n.next())if(i=i.value,!Ky(e,i.type)){var r=i.stream.segmentIndex;if(r!=null){var l=Hn(r);if(l)if(l.h==null)no("Missing EXT-X-PROGRAM-DATE-TIME for stream",i.N(),"Expect AV sync issues!");else for(ix(e,i,l.h-t-l.startTime),i=b(r),r=i.next();!r.done;r=i.next())r.value.qg(t)}}}}function ix(e,t,n){if(!(.001>Math.abs(n))){t.Bc+=n,t.Vb+=n,e=Q1(e,t);for(var i=b(e),r=i.next();!r.done;r=i.next()){var l=b(r.value);r=l.next().value,l=l.next().value,e.set(r,l+n)}t.N()}}function LI(e,t){var n,i,r,l,c,f,y,m,T,x,D,R,N,U,L,j,V,X,G,Z,q,K,W,Q,oe,ne,re,le,fe,ye,de,xe,De,Je,Ve,Pt,Tt,ft,gt,Mt,ut,xt;return z(function(nt){switch(nt.g){case 1:return n=En,i=Y1(e.Ga,t),r=Oo(i.ca,"EXT-X-DEFINE"),l=[],c=[],f=[],e.l=new _e(null,0),e.l.Gc(!0),y=function(){return[e.C]},m=null,T=new Map,i.type==1?(e.O=!1,xe=Oo(i.ca,"EXT-X-DEFINE"),T=Z1(e,xe,e.C),m=n.la,De="",Je=new Map,_(nt,cx(e,e.F++,T,i,y,"",m,De,!0,"Media Playlist",null,Je,null,!1,null,!1),7)):(UI(e,r),x=Oo(i.ca,"EXT-X-MEDIA"),D=Oo(i.ca,"EXT-X-STREAM-INF"),R=Oo(i.ca,"EXT-X-IMAGE-STREAM-INF"),N=Oo(i.ca,"EXT-X-I-FRAME-STREAM-INF"),U=Oo(i.ca,"EXT-X-SESSION-KEY"),L=Oo(i.ca,"EXT-X-SESSION-DATA"),j=Oo(i.ca,"EXT-X-CONTENT-STEERING"),BI(e,L),_(nt,VI(e,j),4));case 4:if(!e.g.ignoreSupplementalCodecs){for(V=[],X=b(D),G=X.next(),Z={};!G.done;Z={Gh:void 0},G=X.next())q=G.value,(K=He(q,"SUPPLEMENTAL-CODECS"))&&(Z.Gh=K.split(/\s*,\s*/).map(function(st){return st.split("/")[0]}),W=q.attributes.map(function(st){return function(Wt){var ni=Wt.name,vn=Wt.value;return ni=="CODECS"&&(vn=st.Gh.join(","),Wt=Wt.value.split(","),1<Wt.length&&(Wt=pi("audio",Wt))&&(vn+=","+Wt)),new Tv(ni,vn)}}(Z)),V.push(new wv(q.id,q.name,W,null)));for(D.push.apply(D,J(V)),Q=[],oe=b(N),ne=oe.next(),re={};!ne.done;re={Hh:void 0},ne=oe.next())le=ne.value,(fe=He(le,"SUPPLEMENTAL-CODECS"))&&(re.Hh=fe.split(/\s*,\s*/).map(function(st){return st.split("/")[0]}),ye=le.attributes.map(function(st){return function(Wt){var ni=Wt.name;return Wt=Wt.value,ni=="CODECS"&&(Wt=st.Hh.join(",")),new Tv(ni,Wt)}}(re)),Q.push(new wv(le.id,le.name,ye,null)));N.push.apply(N,J(Q))}return jI(e,D),YI(e,x),de=FI(e,N),_(nt,zI(e,D,U,x,y,e.A,de),5);case 5:return l=nt.h,c=HI(e,x),_(nt,KI(e,R,N),6);case 6:f=nt.h,nt.s(3);break;case 7:Ve=nt.h,e.i.set(e.C,Ve),Ve.stream&&(Pt=Zs(Ve.stream),Ve.stream.segmentIndex.Eb(function(st){st.Y&&(st.Y.Wc=Pt)})),m=Ve.stream.type,l.push({id:0,language:It(De||"und"),disabledUntilTime:0,primary:!0,audio:m=="audio"?Ve.stream:null,video:m=="video"?Ve.stream:null,bandwidth:Ve.stream.bandwidth||0,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});case 3:if(!e.h)throw new Y(2,7,7001);if(yx(e,i),i.type==1&&(Zi(e)&&(gx(e,i),Tt=e.o,e.B.da(Tt)),ft=Array.from(e.i.values()),$1(e,ft),J1(e),tS(e,i.ca,m,T,y)),e.m={presentationTimeline:e.l,variants:l,textStreams:c,imageStreams:f,offlineSessionIds:[],sequenceMode:e.g.hls.sequenceMode,ignoreManifestTimestampsInSegmentsMode:e.g.hls.ignoreManifestTimestampsInSegmentsMode,type:"HLS",serviceDescription:null,nextUrl:null,periodCount:1,gapCount:0,isLowLatency:!1,startTime:e.u},e.$||!e.g.hls.disableCodecGuessing){nt.s(8);break}for(gt=[],Mt=b(e.m.variants),ut=Mt.next();!ut.done;ut=Mt.next())xt=ut.value,xt.audio&&xt.audio.codecs===""&&gt.push(xt.audio.createSegmentIndex()),xt.video&&xt.video.codecs===""&&gt.push(xt.video.createSegmentIndex());return _(nt,Promise.all(gt),8);case 8:e.h.makeTextStreamsForClosedCaptions(e.m),se(nt)}})}function _I(e,t){var n,i,r,l,c,f,y,m,T,x,D,R,N,U,L,j,V;return z(function(X){if(X.g==1)return n=zd(e.g.hls.mediaPlaylistFullMimeType),t.length?(i=wx(e,t),r=i.segment,l=i.segmentIndex,c=r.N(),f=c[0],y=new pn(f),m=y.ab.split(".").pop(),(T=rS.get(m))?X.return(zd(T)):_(X,Promise.all([rx(e,r.Y,0),rx(e,r,l)]),2)):X.return(n);if(x=X.h,D=x[1].mimeType,R=x[0].data,N=x[1].data,U="mp4 mp4a m4s m4i m4a m4f cmfa mp4v m4v cmfv fmp4".split(" "),L=["audio/mp4","video/mp4","video/iso.segment"],Vs(Ze(N))){var G=N,Z=e.g.disableAudio,q=e.g.disableVideo,K=e.g.disableText,W=Ze(G),Q=new $t().parse(W),oe=Q.od();W=Q.Kf();var ne=[],re=!1,le=!1;if(!Z)switch(oe.audio){case"aac":case"aac-loas":Q.fb().length&&(ne.push("mp4a.40.2"),re=!0);break;case"mp3":Q.fb().length&&(ne.push("mp4a.40.34"),re=!0);break;case"ac3":Q.fb().length&&(ne.push("ac-3"),re=!0);break;case"ec3":Q.fb().length&&(ne.push("ec-3"),re=!0);break;case"opus":Q.fb().length&&(ne.push("opus"),re=!0)}if(!q)switch(oe.video){case"avc":W.codec?ne.push(W.codec):ne.push("avc1.42E01E"),le=!0;break;case"hvc":W.codec?ne.push(W.codec):ne.push("hvc1.1.6.L93.90"),le=!0;break;case"av1":ne.push("av01.0.01M.08"),le=!0}if(ne.length){if(Z=re&&!le,q=new Map,le&&!K){for(K=new rr("video/mp2t"),K.i(G),G=b(K.j()),le=G.next();!le.done;le=G.next())le=le.value,q.set(le,le);K.g()}W={type:Z?"audio":"video",mimeType:"video/mp2t",codecs:ne.join(", "),language:null,height:W.height,width:W.width,channelCount:null,sampleRate:null,closedCaptions:q,Nd:null,colorGamut:null,frameRate:W.frameRate}}else W=null;if(j=W)return X.return(j)}else if((r.Y||U.includes(m)||L.includes(D))&&(V=Tm(R,N,e.g.disableText)))return X.return(V);return D?X.return(zd(D)):X.return(n)})}function rx(e,t,n){var i,r,l,c,f,y;return z(function(m){switch(m.g){case 1:return t?(i=Wi,r=Sf(t.N(),t.uc(),t.tc(),e.g.retryParameters),l=t instanceof qe?1:0,_(m,Ku(e,r,i,{type:l}).promise,2)):m.return({mimeType:null,data:null});case 2:if(c=m.h,f=c.data,!t.aesKey){m.s(3);break}return _(m,Gd(f,t.aesKey,n),4);case 4:f=m.h;case 3:return t instanceof qe?t.Kd(f,!0):t.Kd(f),(y=c.headers["content-type"])&&(y=y.split(";")[0].toLowerCase()),m.return({mimeType:y,data:f})}})}function J1(e){if(Zi(e)){if(e.Ea==Ov){for(var t=1/0,n=1/0,i=b(e.i.values()),r=i.next();!r.done;r=i.next())r=r.value,r.stream.segmentIndex&&r.stream.type!="text"&&!r.stream.isAudioMuxedInVideo&&(t=Math.min(t,r.Vb),n=Math.min(n,r.Bc));t=t-n||0,isNaN(e.g.availabilityWindowOverride)||(t=e.g.availabilityWindowOverride),e.l.Ce(t)}}else e.l.bb(ux(e));if(!e.l.u)for(t=b(e.i.values()),n=t.next();!n.done;n=t.next())n=n.value,!n.stream.segmentIndex||n.type!="audio"&&n.type!="video"||(n=Hn(n.stream.segmentIndex))&&n.h&&e.l.xh(n.h);e.l.ie()}function UI(e,t){var n=new pn(e.C).g;t=b(t);for(var i=t.next();!i.done;i=t.next()){var r=i.value;i=He(r,"NAME");var l=He(r,"VALUE");r=He(r,"QUERYPARAM"),i&&l&&(e.A.has(i)||e.A.set(i,l)),r&&(i=n.get(r)[0])&&!e.A.has(i)&&e.A.set(r,i)}}function Z1(e,t,n){n=new pn(n).g;var i=new Map;t=b(t);for(var r=t.next();!r.done;r=t.next()){var l=r.value,c=He(l,"NAME"),f=He(l,"VALUE");r=He(l,"QUERYPARAM"),l=He(l,"IMPORT"),c&&f&&(i.has(c)||i.set(c,f)),r&&(c=n.get(r)[0])&&!i.has(c)&&i.set(r,c),l&&(r=e.A.get(l))&&i.set(l,r)}return i}function jI(e,t){t=b(t);for(var n=t.next();!n.done;n=t.next()){var i=n.value,r=He(i,"AUDIO");n=He(i,"VIDEO");var l=He(i,"SUBTITLES");if(i=ox(e,i),l){var c=pi(at,i);e.H.set(l,c),_r(i,c)}r&&(l=pi("audio",i),l||(l=e.g.hls.defaultAudioCodec),e.H.set(r,l)),n&&(r=pi("video",i),r||(r=e.g.hls.defaultVideoCodec),e.H.set(n,r))}}function BI(e,t){t=b(t);for(var n=t.next();!n.done;n=t.next()){var i=n.value,r=He(i,"DATA-ID");n=He(i,"URI");var l=He(i,"LANGUAGE");i=He(i,"VALUE"),r=new Map().set("id",r),n&&r.set("uri",mc([e.C],n,e.A)[0]),l&&r.set("language",l),i&&r.set("value",i),n=new ke("sessiondata",r),e.h&&e.h.onEvent(n)}}function VI(e,t){var n,i,r,l,c,f;return z(function(y){if(!e.h||!e.g)return y.return();for(i=b(t),r=i.next();!r.done;r=i.next())if(l=r.value,c=He(l,"PATHWAY-ID"),f=He(l,"SERVER-URI"),c&&f){e.j=new vp(e.h),e.j.configure(e.g),e.j.i=[e.C],e.j.setManifestType("HLS"),e.j.h=c,n=Ly(e.j,f);break}return _(y,n,0)})}function HI(e,t){var n=QT(t,"SUBTITLES");t=n.map(function(c){if(e.g.disableText)return null;try{return lx(e,[c],new Map).stream}catch(f){if(e.g.hls.ignoreTextStreamFailures)return null;throw f}}),n=b(n);for(var i=n.next();!i.done;i=n.next()){var r=Ft(i.value,"GROUP-ID");if((i=e.H.get(r))&&(r=e.I.get(r))){r=b(r);for(var l=r.next();!l.done;l=r.next())l=l.value,l.stream.codecs=i,l.stream.mimeType=nS(at,i)||Cv(at),Uf(l.stream)}}return t.filter(function(c){return c})}function Uf(e){var t=new Set([hn(e.mimeType,e.codecs)]);e.segmentIndex&&e.segmentIndex.Eb(function(n){n.mimeType&&t.add(hn(n.mimeType,e.codecs))}),e.fullMimeTypes=t}function KI(e,t,n){var i,r;return z(function(l){return l.g==1?(i=t.map(function(c){var f,y;return z(function(m){if(m.g==1)return e.g.disableThumbnails?m.return(null):(pe(m,2),_(m,WI(e,c),4));if(m.g!=2)return f=m.h,m.return(f.stream);if(y=Me(m),e.g.hls.ignoreImageStreamFailures)return m.return(null);throw y})}).concat(n.map(function(c){if(e.g.disableThumbnails)return null;try{var f=ax(e,c);return f.stream.type!=="image"?null:f.stream}catch(y){if(e.g.hls.ignoreImageStreamFailures)return null;throw y}})),_(l,Promise.all(i),2)):(r=l.h,l.return(r.filter(function(c){return c})))})}function qI(e,t,n){t=t.filter(function(f){var y=He(f,"URI")||"";return f=He(f,"TYPE"),f!="SUBTITLES"&&(y!=""||f=="AUDIO")});var i={};t=b(t);for(var r=t.next();!r.done;r=t.next()){r=r.value;var l=YT(r,!e.j);i[l]?i[l].push(r):i[l]=[r]}for(var c in i)lx(e,i[c],n,!1)}function FI(e,t){return t.map(function(n){return n=ax(e,n),n.stream.type!=="video"?null:n.stream}).filter(function(n){return n})}function zI(e,t,n,i,r,l,c){var f,y,m,T,x,D,R,N,U,L,j,V,X,G,Z,q,K,W,Q,oe,ne,re,le,fe,ye,de,xe,De,Je,Ve,Pt,Tt,ft,gt,Mt,ut;return z(function(xt){switch(xt.g){case 1:if(f=[],y=new Set,e.g.ignoreDrmInfo||!(0<n.length)){xt.s(2);break}m=b(n),T=m.next();case 3:if(T.done){xt.s(2);break}if(x=T.value,D=Ft(x,"METHOD"),R=He(x,"KEYFORMAT")||"identity",N=null,D=="NONE"){xt.s(4);break}if(Iv(D)){U=mc(r(),Ft(x,"URI"),l),L=U.sort().join(""),e.L.has(L)||(j=cn(U,e.g.retryParameters),V=Ku(e,j,6).promise,e.L.set(L,V)),xt.s(4);break}if(R=="identity")return _(xt,Ex(e,x,"",r,null,l),12);if(X=e.Sb.get(R),!X){G=null,xt.s(10);break}return _(xt,X(x,"",null),11);case 11:G=xt.h;case 10:N=G,xt.s(6);break;case 12:N=xt.h;case 6:if(N){if(N.keyIds)for(Z=b(N.keyIds),q=Z.next();!q.done;q=Z.next())K=q.value,y.add(K);f.push(N)}case 4:T=m.next(),xt.s(3);break;case 2:for(W={},Q=b(t),oe=Q.next();!oe.done;oe=Q.next())ne=oe.value,re=YT(ne,!e.j),W[re]?W[re].push(ne):W[re]=[ne];le=[];for(fe in W)ye=W[fe],de=ye[0],xe=He(de,"FRAME-RATE"),De=Number(He(de,"AVERAGE-BANDWIDTH"))||Number(Ft(de,"BANDWIDTH")),Je=He(de,"RESOLUTION"),Ve=b(Je?Je.split("x"):[null,null]),Pt=Ve.next().value,Tt=Ve.next().value,ft=He(de,"VIDEO-RANGE"),(gt=He(de,"REQ-VIDEO-LAYOUT"))&&gt.includes(",")&&(Mt=gt.split(",").filter(function(nt){return nt=="CH-STEREO"||nt=="CH-MONO"}),gt=Mt[0]),gt=gt||"CH-MONO",ut=GI(e,ye,i),le.push.apply(le,J(XI(e,ut.audio,ut.video,De,Pt,Tt,xe,ft,gt,f,y,c)));return xt.return(le.filter(function(nt){return nt!=null}))}})}function GI(e,t,n){for(var i={audio:[],video:[]},r=new Map,l=[],c=!1,f=!1,y=b(t),m=y.next();!m.done;m=y.next()){var T=m.value;m=He(T,"AUDIO");var x=He(T,"VIDEO"),D=m||x;D&&(l.includes(D)||l.push(D),(T=He(T,"PATHWAY-ID"))&&r.set(D,T),m?c=!0:x&&(f=!0))}l.length&&n.length&&(n=n.filter(function(N){return l.includes(Ft(N,"GROUP-ID"))}),qI(e,n,r)),n=(r=l.sort().join(","))&&e.I.has(r)?e.I.get(r):[],c?i.audio.push.apply(i.audio,J(n)):f&&i.video.push.apply(i.video,J(n)),c=!1;var R=t.map(function(N){return Ft(N,"URI")});return m=i.audio.find(function(N){return N&&N.N().find(function(U){return R.includes(U)})}),f=ox(e,t[0]),n=pi("video",f),(y=pi("audio",f))&&!n?(m="audio",c=0<i.audio.length):!i.audio.length&&!i.video.length&&y&&n?(m="video",f=[[n,y].join()]):i.audio.length&&m?(m="audio",c=!0):m=i.video.length&&!i.audio.length?"audio":"video",c||(e=QI(e,t,f,m),r&&(e.stream.groupId=r),i[e.stream.type]=[e]),i}function ox(e,t){return t=He(t,"CODECS")||"",e.$=0<t.length,e.$||e.g.hls.disableCodecGuessing||(t=[],e.g.disableVideo||t.push(e.g.hls.defaultVideoCodec),e.g.disableAudio||t.push(e.g.hls.defaultAudioCodec),t=t.join(",")),mn(t.split(/\s*,\s*/))}function XI(e,t,n,i,r,l,c,f,y,m,T,x){for(var D=b(n),R=D.next();!R.done;R=D.next())Tx(R.value.stream,r,l,c,f,y,null);for(r=e.g.disableAudio,(!t.length||r)&&(t=[null]),r=e.g.disableVideo,(!n.length||r)&&(n=[null]),r=[],t=b(t),l=t.next();!l.done;l=t.next())for(l=l.value,c=b(n),f=c.next();!f.done;f=c.next()){var N=f.value;(f=l?l.stream:null)&&(f.drmInfos=m,f.keyIds=T),(y=N?N.stream:null)&&(y.drmInfos=m,y.keyIds=T,e.g.disableIFrames||yh(y,x)),y&&!f&&(y.bandwidth=i),!y&&f&&(f.bandwidth=i),D=l?l.stream.drmInfos:null,R=N?N.stream.drmInfos:null,N=N?N.N().sort().join(","):"";var U=l?l.N().sort().join(","):"",L=[];f&&f.codecs&&L.push(f.codecs),y&&y.codecs&&L.push(y.codecs),N=[N,U,L.sort()].join("-"),f&&y&&!Va(D,R)||e.Na.has(N)||(f={id:e.F++,language:f?f.language:"und",disabledUntilTime:0,primary:!!f&&f.primary||!!y&&y.primary,audio:f,video:y,bandwidth:i,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},r.push(f),e.Na.add(N))}return r}function YI(e,t){t=QT(t,"CLOSED-CAPTIONS"),e.O=t.length==0,t=b(t);for(var n=t.next();!n.done;n=t.next()){var i=n.value,r=He(i,"LANGUAGE");n=It(r||"und"),r||(r=He(i,"NAME"))&&(n=r),r=Ft(i,"GROUP-ID"),i=Ft(i,"INSTREAM-ID").replace("SERVICE","svc"),e.G.get(r)||e.G.set(r,new Map),e.G.get(r).set(i,n)}}function lx(e,t,n,i){i=i===void 0?!0:i;for(var r=[],l=[],c=new Map,f=b(t),y=f.next();!y.done;y=f.next()){var m=y.value;y=i?Ft(m,"URI"):He(m,"URI")||"shaka://hls-muxed",m=Ft(m,"GROUP-ID"),r.push(y),l.push(m),c.set(m,y)}if(i=l.sort().join(","),y=t[0],t="",f=Ft(y,"TYPE").toLowerCase(),f=="subtitles"&&(f=at),f==at)t=He(y,"CODECS")||"";else for(l=b(l),m=l.next();!m.done;m=l.next())if(m=m.value,e.H.has(m)){t=e.H.get(m);break}if(l=r.sort().join(","),e.i.has(l))return e.i.get(l);if(m=e.F++,e.j){c=b(c);for(var T=c.next();!T.done;T=c.next()){var x=b(T.value);T=x.next().value,x=x.next().value,(T=n.get(T))&&Sp(e.j,m,T,x)}}n=He(y,"LANGUAGE"),c=He(y,"NAME"),T=He(y,"DEFAULT")=="YES",f=="audio"?x=(x=He(y,"CHANNELS"))?parseInt(x.split("/")[0],10):null:x=null;var D;f=="audio"&&(D=He(y,"CHANNELS"))?(D=D.split("/"),D=D.length!=2?!1:D[1]==="JOC"||D[1].includes("ATMOS")):D=!1;var R=He(y,"CHARACTERISTICS"),N=He(y,"FORCED")=="YES";return f=="audio"?y=(y=He(y,"SAMPLE-RATE"))?parseInt(y,10):null:y=null,r=Av(e,m,r,t,f,n,T,c,x,null,R,N,y,D),r.stream&&(r.stream.groupId=i),e.I.has(i)?e.I.get(i).push(r):e.I.set(i,[r]),e.i.set(l,r),r}function WI(e,t){var n,i,r,l,c,f,y,m,T,x;return z(function(D){return D.g==1?(n=Ft(t,"URI"),i=He(t,"CODECS","jpeg")||"",e.i.has(n)?D.return(e.i.get(n)):(r=He(t,"LANGUAGE"),l=He(t,"NAME"),c=He(t,"CHARACTERISTICS"),f=Av(e,e.F++,[n],i,"image",r,!1,l,null,null,c,!1,null,!1),(y=He(t,"RESOLUTION"))?_(D,f.stream.createSegmentIndex(),3):D.s(2))):(D.g!=2&&(m=Hn(f.stream.segmentIndex),T=m.tilesLayout)&&(f.stream.width=Number(y.split("x")[0])*Number(T.split("x")[0]),f.stream.height=Number(y.split("x")[1])*Number(T.split("x")[1])),(x=He(t,"BANDWIDTH"))&&(f.stream.bandwidth=Number(x)),e.i.set(n,f),D.return(f))})}function ax(e,t){var n="video",i=Ft(t,"URI"),r=He(t,"CODECS")||"";if(r=="mjpg"&&(n="image"),e.i.has(i))return e.i.get(i);var l=He(t,"LANGUAGE"),c=He(t,"NAME"),f=He(t,"CHARACTERISTICS");return n=Av(e,e.F++,[i],r,n,l,!1,c,null,null,f,!1,null,!1),r=He(t,"RESOLUTION"),l=b(r?r.split("x"):[null,null]),r=l.next().value,l=l.next().value,n.stream.width=Number(r)||void 0,n.stream.height=Number(l)||void 0,(t=He(t,"BANDWIDTH"))&&(n.stream.bandwidth=Number(t)),e.i.set(i,n),n}function QI(e,t,n,i){for(var r=e.F++,l=[],c=b(t),f=c.next();!f.done;f=c.next()){var y=f.value;f=Ft(y,"URI"),y=He(y,"PATHWAY-ID"),e.j&&y&&Sp(e.j,r,y,f),l.push(f)}if(c=l.sort().join(",")+n.sort().join(","),e.i.has(c))return e.i.get(c);f=l.join(",");e:{if(t=He(t[0],"CLOSED-CAPTIONS"),i=="video"){if(e.g.disableText){e.O=!1,t=null;break e}if(t){if(t!="NONE"){t=e.G.get(t);break e}e.O=!1}else if(!t&&e.G.size)for(t=b(e.G.keys()).next();!t.done;){t=e.G.get(t.value);break e}}t=null}return n=aa(i,n),i=Av(e,r,l,n,i,null,!1,f,null,t,null,!1,null,!1),e.i.set(c,i),i}function Av(e,t,n,i,r,l,c,f,y,m,T,x,D,R){function N(G){var Z,q,K,W,Q,oe,ne,re,le,fe,ye,de,xe,De,Je,Ve,Pt,Tt,ft,gt,Mt,ut,xt;return z(function(nt){switch(nt.g){case 1:return Z=En,pe(nt,2),_(nt,G.promise,4);case 4:if(q=nt.h,G.aborted)return nt.return();if(K=q.uri,K!=q.originalUri&&(W=j.N(),W.includes(K)||j.ve.push(K)),Q=Y1(e.Ga,q.data),Q.type!=1)throw new Y(2,4,4017);return oe=Oo(Q.ca,"EXT-X-DEFINE"),ne=Z1(e,oe,K),re=!1,(!e.$&&e.g.hls.disableCodecGuessing||e.O&&r==Z.la&&!e.g.hls.disableClosedCaptionsDetection)&&0<Q.segments.length&&(e.O=!1,re=!0),le=!e.$&&e.g.hls.disableCodecGuessing,fe=Zi(e),_(nt,cx(e,0,ne,Q,U,i,r,l,c,f,y,m,T,x,D,R,void 0,re,le),5);case 5:if(ye=nt.h,G.aborted)return nt.return();if(de=ye.stream,yx(e,Q),Zi(e)&&!fe&&gx(e,Q),j.Bc=ye.Bc,j.Vb=ye.Vb,j.Ud=ye.Ud,j.Td=ye.Td,j.rd=ye.rd,j.je=ye.je,j.Ab=ye.Ab,j.Bb=ye.Bb,j.Rf=!0,L.segmentIndex=de.segmentIndex,L.encrypted=de.encrypted,L.drmInfos=de.drmInfos,L.keyIds=de.keyIds,L.mimeType=de.mimeType,L.bandwidth=L.bandwidth||de.bandwidth,L.codecs=L.codecs||de.codecs,L.closedCaptions=L.closedCaptions||de.closedCaptions,L.width=L.width||de.width,L.height=L.height||de.height,L.hdr=L.hdr||de.hdr,L.colorGamut=L.colorGamut||de.colorGamut,L.frameRate=L.frameRate||de.frameRate,L.language=="und"&&de.language!="und"&&(L.language=de.language),L.language=L.language||de.language,L.channelsCount=L.channelsCount||de.channelsCount,L.audioSamplingRate=L.audioSamplingRate||de.audioSamplingRate,Uf(L),L.drmInfos.length&&e.h.newDrmInfo(L),xe=!1,(!m&&L.closedCaptions||m&&L.closedCaptions&&m.size!=L.closedCaptions.size)&&(xe=!0),e.m&&xe&&e.h.makeTextStreamsForClosedCaptions(e.m),r==Z.la||r==Z.V)for(De=b(e.i.values()),Je=De.next();!Je.done;Je=De.next())Ve=Je.value,Ve.Rf||Ve.type!=r||(Ve.stream.mimeType=de.mimeType,Uf(Ve.stream));r==Z.za&&(Pt=Hn(de.segmentIndex))&&Pt.Y&&(L.mimeType="application/mp4",Uf(L)),Tt=Zs(L),L.segmentIndex.Eb(function(st){st.Y&&(st.Y.Wc=Tt)}),JI(e)&&(e.Ub?$1(e,[j]):(e.Ub=!0,ft=Array.from(e.i.values()),gt=ft.filter(function(st){return st.stream.segmentIndex}),$1(e,gt),J1(e),Mt=e.o,0<Mt&&e.B.da(Mt))),tS(e,Q.ca,L.type,ne,U),e.m&&(e.m.startTime=e.u),Ue(nt,0);break;case 2:if(ut=Me(nt),L.closeSegmentIndex(),ut.code===7001)return nt.return();if(xt=e.h.disableStream(L),!xt)throw ut;se(nt)}})}function U(){return e.j&&1<n.length?_y(e.j,t):j.ve.concat(JT([e.C],n,e.A))}var L=dx(e,i,r,l,c,f,y,m,T,x,D,R);n.includes("shaka://hls-muxed")&&(L.isAudioMuxedInVideo=!0,L.mimeType="video/mp2t",Uf(L));var j={stream:L,type:r,ve:[],Bc:0,Vb:0,je:new Map,Ud:!1,Td:!1,rd:!1,qf:-1,Ab:-1,Bb:-1,Rf:!1,N:U},V=null,X;return L.createSegmentIndex=function(){return V||(L.isAudioMuxedInVideo?(L.segmentIndex=new Dt([]),Promise.resolve()):(X=iS(e,j.N(),!0),V=new Promise(function(G){G(N(X))})))},L.closeSegmentIndex=function(){V&&!L.segmentIndex&&X.abort(),L.segmentIndex&&(L.segmentIndex.release(),L.segmentIndex=null),V=null},j}function ux(e){var t=1/0;e=b(e.i.values());for(var n=e.next();!n.done;n=e.next())n=n.value,n.stream.segmentIndex&&n.stream.type!="text"&&!n.stream.isAudioMuxedInVideo&&(t=Math.min(t,n.Vb));return t}function sx(e,t){var n=[];t=b(t);for(var i=t.next();!i.done;i=t.next())i=i.value,i.segmentIndex&&i.segmentIndex.Eb(function(r){n.push(r)});e.l.Ed(n)}function $1(e,t){if(!Zi(e))for(var n=ux(e),i=b(t),r=i.next();!r.done;r=i.next())r.value.stream.segmentIndex.Oc(0,n);sx(e,t.map(function(l){return l.stream})),i=Array.from(e.i.values()).filter(function(l){return l.stream.segmentIndex}),n=i.some(function(l){return l.stream.type=="audio"}),r=i.some(function(l){return l.stream.type=="video"}),i=Zi(e)&&!e.Ma,n=!Zi(e)&&e.Ma&&!(n&&r),e.g.hls.ignoreManifestProgramDateTime||i||n?nx(e,t,i):(PI(e,t),0<e.g.hls.ignoreManifestProgramDateTimeForTypes.length&&nx(e,t))}function Ky(e,t){return e.g.hls.ignoreManifestProgramDateTime?!0:e.g.hls.ignoreManifestProgramDateTimeForTypes.includes(t)}function JI(e){if(!e.m)return!1;var t=[],n=[];e=b(e.m.variants);for(var i=e.next();!i.done;i=e.next())i=i.value,i.video&&t.push(i.video),i.audio&&n.push(i.audio);return!(0<t.length&&!t.some(function(r){return r.segmentIndex})||0<n.length&&!n.some(function(r){return r.segmentIndex}))}function cx(e,t,n,i,r,l,c,f,y,m,T,x,D,R,N,U,L,j,V){j=j===void 0?!0:j,V=V===void 0?!0:V;var X,G,Z,q,K,W,Q,oe,ne,re,le,fe,ye,de,xe,De,Je,Ve,Pt,Tt,ft,gt,Mt,ut,xt,nt,st,Wt,ni;return z(function(vn){switch(vn.g){case 1:if(X=i.segments||[],G=X.every(function(wn){return!!Ti(wn.ca,"EXT-X-GAP")}),!X.length||G)throw new Y(2,4,4053);if(ZI(e,i),Zi(e)&&eS(e,i),Z=Zi(e)?e.M.get(c):new Map,q=Sx(e,i,Z,n,r,c),K=q.segments,W=q.bandwidth,le=re=ne=oe=Q=null,!(0<K.length&&j)){vn.s(2);break}return _(vn,_I(e,K),3);case 3:fe=vn.h,c=fe.type,f=fe.language,T=fe.channelCount,N=fe.sampleRate,e.g.disableText||(x=fe.closedCaptions),oe=fe.height,Q=fe.width,ne=fe.Nd,re=fe.colorGamut,le=fe.frameRate,V&&(L=fe.mimeType,l=fe.codecs);case 2:if(L){vn.s(4);break}return _(vn,tD(e,c,l,K),5);case 5:L=vn.h,c!=at||l||L!="application/mp4"||!K[0]||K[0].Y||(L="text/vtt");case 4:return _(vn,px(e,i,L,r,n),6);case 6:if(ye=vn.h,de=ye.drmInfos,xe=ye.keyIds,De=ye.encrypted,Je=ye.Bg,De&&!de.length&&!Je)throw new Y(2,4,4026);return Ve=dx(e,l,c,f,y,m,T,x,D,R,N,U),Ve.encrypted=De&&!Je,Ve.drmInfos=de,Ve.keyIds=xe,Ve.mimeType=L,W&&(Ve.bandwidth=W),Uf(Ve),c=="video"&&(Q||oe||ne||re)&&Tx(Ve,Q,oe,le,ne,null,re),Zi(e)&&eS(e,i),Pt=K[0].startTime,Tt=K[K.length-1],ft=Tt.endTime,gt=new Dt(K),Ve.segmentIndex=gt,ut=(Mt=Ti(i.ca,"EXT-X-SERVER-CONTROL"))?Tp(Mt,"CAN-SKIP-UNTIL")!=null:!1,xt=Mt?Tp(Mt,"CAN-BLOCK-RELOAD")!=null:!1,nt=xp(i.ca,"EXT-X-MEDIA-SEQUENCE",0),st=fx(nt,K),Wt=st.Ab,ni=st.Bb,vn.return({stream:Ve,type:c,ve:[],N:r,Bc:Pt,Vb:ft,Ud:ut,Td:xt,rd:!1,qf:-1,Ab:Wt,Bb:ni,je:Z,Rf:!1})}})}function fx(e,t){e=e+t.length-1;var n=-1;if(!t.length)return e++,{Ab:e,Bb:n};t=t[t.length-1];var i=t.g;return t.g.length?(n=i.length-1,i[i.length-1].isPreload()||(e++,n=0),{Ab:e,Bb:n}):(e++,t.m&&(n=0),{Ab:e,Bb:n})}function dx(e,t,n,i,r,l,c,f,y,m,T,x){var D=nS(n,t)||Cv(n),R=[];if(y){y=b(y.split(","));for(var N=y.next();!N.done;N=y.next())R.push(N.value)}return y=void 0,N=null,n==at?y=R.includes("public.accessibility.transcribes-spoken-dialog")&&R.includes("public.accessibility.describes-music-and-sound")?"caption":"subtitle":R.includes("public.accessibility.describes-video")&&(N="visually impaired"),R.length||y!=="subtitle"||R.push("subtitle"),e={id:e.F++,originalId:l,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:D,codecs:t,kind:n==at?"subtitle":void 0,encrypted:!1,drmInfos:[],keyIds:new Set,language:It(i||"und"),originalLanguage:i,label:l,type:n,primary:r,trickModeVideo:null,dependencyStream:null,emsgSchemeIdUris:null,frameRate:void 0,pixelAspectRatio:void 0,width:void 0,height:void 0,bandwidth:void 0,roles:R,forced:m,channelsCount:c,audioSamplingRate:T,spatialAudio:x,closedCaptions:f,hdr:void 0,colorGamut:void 0,videoLayout:void 0,tilesLayout:void 0,accessibilityPurpose:N,external:!1,fastSwitching:!1,fullMimeTypes:new Set,isAudioMuxedInVideo:!1,baseOriginalId:null},Uf(e),e}function px(e,t,n,i,r){var l,c,f,y,m,T,x,D,R,N,U,L,j,V,X,G,Z,q,K,W,Q,oe,ne,re,le,fe,ye,de,xe;return z(function(De){switch(De.g){case 1:if(l=new Map,!e.g.ignoreDrmInfo&&t.segments){for(c=b(t.segments),f=c.next();!f.done;f=c.next())if(y=f.value,m=Oo(y.ca,"EXT-X-KEY"),T=null,m.length)for(T=mx(e,t,y.ca,i,r),x=b(m),D=x.next();!D.done;D=x.next())R=D.value,l.set(R,T)}U=N=!1,L=[],j=new Set,V=b(l),X=V.next();case 2:if(X.done){De.s(4);break}if(G=X.value,Z=b(G),q=Z.next().value,K=Z.next().value,W=q,Q=K,oe=Ft(W,"METHOD"),oe=="NONE"){De.s(3);break}if(N=!0,ne=He(W,"KEYFORMAT")||"identity",re=null,Iv(oe)){U=!0,De.s(3);break}if(ne=="identity")return _(De,Ex(e,W,n,i,Q,r),11);if(le=e.Sb.get(ne),!le){fe=null,De.s(9);break}return _(De,le(W,n,Q),10);case 10:fe=De.h;case 9:re=fe,De.s(6);break;case 11:re=De.h;case 6:if(re){if(re.keyIds)for(ye=b(re.keyIds),de=ye.next();!de.done;de=ye.next())xe=de.value,j.add(xe);L.push(re)}case 3:X=V.next(),De.s(2);break;case 4:return De.return({drmInfos:L,keyIds:j,encrypted:N,Bg:U})}})}function hx(e,t,n,i,r){if(!w.crypto||!w.crypto.subtle)throw bt("Web Crypto API is not available to decrypt AES. (Web Crypto only exists in secure origins like https)"),new Y(2,4,4042);var l=0,c=He(t,"IV","");if(c){var f=la(c.substr(2));if(f.byteLength!=16)throw new Y(2,4,4048)}else l=xp(n.ca,"EXT-X-MEDIA-SEQUENCE",0);var y=mc(i(),Ft(t,"URI"),r),m=y.sort().join("");if(n=t.toString()+"-"+l+"-"+m,!e.ka.has(n)){var T={bitsKey:128,blockCipherMode:"CBC",iv:f,firstMediaSequenceNumber:l};switch(Ft(t,"METHOD")){case"AES-256":T.bitsKey=256;break;case"AES-256-CTR":T.bitsKey=256,T.blockCipherMode="CTR"}T.fetchKey=function(){var x,D,R,N;return z(function(U){if(U.g==1)return e.L.has(m)||(x=cn(y,e.g.retryParameters),D=Ku(e,x,6).promise,e.L.set(m,D)),_(U,e.L.get(m),2);if(U.g!=3){if(R=U.h,!R.data||R.data.byteLength!=T.bitsKey/8)throw new Y(2,4,4049);return N={name:T.blockCipherMode=="CTR"?"AES-CTR":"AES-CBC",length:T.bitsKey},_(U,w.crypto.subtle.importKey("raw",R.data,N,!0,["decrypt"]),3)}T.cryptoKey=U.h,T.fetchKey=void 0,se(U)})},e.ka.set(n,T)}return e.ka.get(n)}function yx(e,t){e.u==null&&(t=Ti(t.ca,"EXT-X-START"))&&(e.u=Number(Ft(t,"TIME-OFFSET")))}function ZI(e,t){var n=Ti(t.ca,"EXT-X-PLAYLIST-TYPE");t=Ti(t.ca,"EXT-X-ENDLIST"),t=n&&n.value=="VOD"||t,n=n&&n.value=="EVENT"&&!t,n=!t&&!n,t?bv(e,Dv):n?bv(e,Ov):bv(e,bx)}function eS(e,t){var n=1/0,i=t.segments;if(i.length)for(var r=i.length-1;0<=r;){var l=Ti(i[r].ca,"EXTINF");if(l){n=Number(l.value.split(",")[0]);break}r--}if(i=Ti(t.ca,"EXT-X-TARGETDURATION"),!i)throw new Y(2,4,4024,"EXT-X-TARGETDURATION");i=Number(i.value),(r=Ti(t.ca,"EXT-X-PART-INF"))&&(e.P=Number(Ft(r,"PART-TARGET"))),t=Ti(t.ca,"EXT-X-SERVER-CONTROL"),e.fa&&e.P?(e.o=e.Tb?5*e.P<=n?Math.min(e.P,e.o):Math.min(n,e.o):Math.min(e.P,e.o),e.Fa=t?Number(Ft(t,"PART-HOLD-BACK")):0):(e.o=Math.min(n,e.o),n=t?Tp(t,"HOLD-BACK"):null,e.Aa=n?Number(n.value):0),e.La=Math.max(i,e.La)}function gx(e,t){var n=0;if(e.g.defaultPresentationDelay)n=e.g.defaultPresentationDelay;else if(e.Fa)n=e.Fa;else if(e.Aa)n=e.Aa;else{var i=t.segments.length,r=e.g.hls.liveSegmentsDelay;for(r>i-2&&(r=Math.max(1,i-2)),r=i-r;r<i;r++){var l=Ti(t.segments[r].ca,"EXTINF");n=l?n+Math.ceil(Number(l.value.split(",")[0])):n+e.La}}e.u&&0>e.u&&(n=Math.min(-e.u,n),e.u+=n),e.l.yh(0),e.l.jg(n),e.l.Gc(!1)}function mx(e,t,n,i,r){var l=Ti(n,"EXT-X-MAP");if(!l)return null;var c=Ft(l,"URI"),f=mc(i(),c,r);if(c=[f.toString(),He(l,"BYTERANGE","")].join("-"),!e.sa.has(c)){var y=void 0,m=null,T=!1;n=b(n);for(var x=n.next();!x.done;x=n.next())x=x.value,x.name=="EXT-X-KEY"?(T=Ft(x,"METHOD"),Iv(T)&&x.id<l.id?(T=!1,y=hx(e,x,t,i,r)):T=T!="NONE"):x.name=="EXT-X-BYTERANGE"&&x.id<l.id&&(m=x);t=$I(f,l,m,y,T),e.sa.set(c,t)}return e.sa.get(c)}function $I(e,t,n,i,r){var l=0,c=null;return t=He(t,"BYTERANGE"),!t&&n&&(t=n.value),t&&(l=t.split("@"),c=Number(l[0]),l=Number(l[1]),c=l+c-1,i&&(n=c+1-l,n%16&&(c+=16-n%16))),new bi(function(){return e},l,c,null,null,null,i,r)}function eD(e,t,n,i,r,l,c,f,y){function m(De){De=new pn(De).ab.split(".").pop();var Je=oS.get(c).get(De);return Je||(Je=rS.get(De)),Je}var T=i.ca,x=Ti(T,"EXTINF"),D=0,R=0,N=null;i.Jb.length&&(e.m.isLowLatency=!0);var U=null;if(!e.g.hls.ignoreManifestProgramDateTime){var L=Ti(T,"EXT-X-PROGRAM-DATE-TIME");L&&L.value&&(U=Tl(L.value),e.Ma=!0)}var j=So;if(Ti(T,"EXT-X-GAP")&&(e.m.gapCount++,j=2),!x){if(i.Jb.length==0)throw new Y(2,4,4024,"EXTINF");if(!e.fa)return null}var V=[];L=!1;var X=null,G=!1,Z=!1;if(e.fa&&i.Jb.length){D=t&&w.ReadableStream&&e.g.hls.allowLowLatencyByteRangeOptimization;for(var q=U,K={},W=0;W<i.Jb.length;K={Le:void 0,re:void 0},W++){var Q=i.Jb[W],oe=W==0?n:V[V.length-1],ne=W==0?r:oe.endTime,re=Number(He(Q,"DURATION"))||e.P;if(re){var le=ne+re,fe=0,ye=null;if(Q.name=="EXT-X-PRELOAD-HINT"?(fe=(fe=He(Q,"BYTERANGE-START"))?Number(fe):0,(oe=He(Q,"BYTERANGE-LENGTH"))?ye=fe+Number(oe)-1:fe&&(ye=Number.MAX_SAFE_INTEGER)):(fe=He(Q,"BYTERANGE"),ye=b(vx(oe,fe)),fe=ye.next().value,ye=ye.next().value),K.re=He(Q,"URI"),K.re){oe=So,He(Q,"GAP")=="YES"&&(e.m.gapCount++,oe=2,G=!0),K.Le=null;var de=function(De){return function(){return De.Le==null&&(De.Le=mc(f(),De.re,l)),De.Le}}(K);D&&0<=fe&&ye!=null&&(X=de,L=!0),ne=new qe(ne,le,de,fe,ye,t,0,0,1/0,[],"",null,q,oe,y),Q.name=="EXT-X-PRELOAD-HINT"&&(ne.Sf(),Z=!0),He(Q,"INDEPENDENT")!="YES"&&0<W&&ne.Vc(),(K=m(K.re))&&(ne.mimeType=K,Cx.has(K)&&(ne.Y=null)),V.push(ne),q&&(q+=re)}}}}if(x){if(x=Number(x.value.split(",")[0]),x==0)return null;D=r+x}else if(V.length)D=V[V.length-1].endTime;else return null;L&&(G||V[0].Sa!=0?(L=!1,X=null):V=[]),(x=Ti(T,"EXT-X-BYTERANGE"))?(N=b(vx(n,x.value)),R=N.next().value,N=N.next().value):V.length&&(R=V[0].Sa,N=V[V.length-1].wa),n="",x=null,c=="image"&&(n="1x1",T=Ti(T,"EXT-X-TILES"))&&(n=Ft(T,"LAYOUT"),(T=He(T,"DURATION"))&&(x=Number(T)));var xe=null;return t=new qe(r,D,function(){return X?X():(xe==null&&(xe=mc(f(),i.g,l)),xe||[])},R,N,t,0,0,1/0,V,n,x,U,j,y,0<V.length&&!!i.g),(r=m(i.g))&&(t.mimeType=r,Cx.has(r)&&(t.Y=null)),L&&(e.Tb=!0,t.dh(),Z&&t.Sf()),t}function vx(e,t){var n=0,i=null;return t&&(n=t.split("@"),t=Number(n[0]),n=n[1]?Number(n[1]):e.wa+1,i=n+t-1),[n,i]}function tS(e,t,n,i,r){if(n=="video"||n=="audio"){var l=e.l.m;if(l&&!Ky(e,n))for(t=Oo(t,"EXT-X-DATERANGE"),t=t.filter(function(ne){return Tp(ne,"START-DATE")!=null}).sort(function(ne,re){return ne=Ft(ne,"START-DATE"),re=Ft(re,"START-DATE"),ne<re?-1:ne>re?1:0}),n=0;n<t.length;n++){var c=t[n];try{var f=Ft(c,"ID");if(!e.ya.has(f)){var y=Ft(c,"START-DATE"),m=Tl(y);if(!isNaN(m)){var T=Math.max(0,m-l),x=null,D=He(c,"END-DATE");if(D){var R=Tl(D);if(!isNaN(R)&&(x=R-l,0>x))continue}if(x==null){var N=He(c,"DURATION")||He(c,"PLANNED-DURATION");if(N){var U=parseFloat(N);if(isNaN(U)||(x=T+U),0>m-l+U)continue}}var L=He(c,"CLASS")||"com.apple.quicktime.HLS",j=He(c,"END-ON-NEXT")=="YES";if(x==null&&j){for(var V=n+1;V<t.length;V++){var X=He(t[V],"CLASS")||"com.apple.quicktime.HLS";if(L==X){var G=Ft(t[V],"START-DATE"),Z=Tl(G);if(!isNaN(Z)&&Z&&Z>m){x=Math.max(0,Z-l);break}}}if(x==null)continue}V=["CLASS","START-DATE","END-DATE","DURATION","END-ON-NEXT"];for(var q=[],K=b(c.attributes),W=K.next();!W.done;W=K.next()){var Q=W.value;if(!V.includes(Q.name)){var oe=ZT(Q.value,i);(Q.name=="X-ASSET-URI"||Q.name=="X-ASSET-LIST")&&(oe=mc(r(),Q.value,i)[0]),q.push({key:Q.name,description:"",data:oe,mimeType:null,pictureType:null})}}1<q.length&&e.h.onMetadata(L,T,x,q),e.ya.add(f)}}}catch{}}}}function Sx(e,t,n,i,r,l){var c=t.segments,f=void 0,y=xp(t.ca,"EXT-X-DISCONTINUITY-SEQUENCE",-1),m=xp(t.ca,"EXT-X-MEDIA-SEQUENCE",0),T=Ti(t.ca,"EXT-X-SKIP"),x=T?Number(He(T,"SKIPPED-SEGMENTS")):0,D=m+x,R=0;Zi(e)&&n.has(D)&&(R=n.get(D)),R===0&&e.Ea==Ov&&0<n.size&&!n.has(D)&&e.l.i!=null&&(R=e.l.pb());var N=[],U=null;T=[];for(var L=0;L<c.length;L++){var j=c[L],V=L==0?R:U.endTime;D=m+x+L,Ti(j.ca,"EXT-X-DISCONTINUITY")&&(y++,U&&U.Y&&(U.Y.g=V));for(var X=b(j.ca),G=X.next();!G.done;G=X.next())G=G.value,G.name=="EXT-X-KEY"&&(Iv(Ft(G,"METHOD"))?f=hx(e,G,t,r,i):f=void 0);n.set(D,V),X=mx(e,t,j.ca,r,i),(V=eD(e,X,U,j,V,i,l,r,f))&&((U=xp(j.ca,"EXT-X-BITRATE"))?T.push({bitrate:U,duration:V.endTime-V.startTime}):T.length&&(U=T.pop(),U.duration+=V.endTime-V.startTime,T.push(U)),U=V,V.i=y,Ky(e,l)&&e.K!=null&&D<e.K||N.push(V))}if(t=void 0,T.length&&(t=T.reduce(function(Z,q){return Z+q.duration},0),t=Math.round(T.reduce(function(Z,q){return Z+q.bitrate*q.duration},0)/t*1e3)),T=N.some(function(Z){return Z.h!=null})){for(n={},i=0;i<N.length;n={Xd:void 0,Wd:void 0,Qd:void 0,Dc:void 0,Pd:void 0},i++)if(n.Dc=N[i],n.Dc.h==null)for(n.Wd=0,n.Xd=i,r=function(Z){return function(){var q=N[Z.Xd];if(q){if(q.h!=null)return q.h+Z.Wd;Z.Wd-=q.endTime-q.startTime,Z.Xd+=1}return null}}(n),n.Pd=0,n.Qd=i,c=function(Z){return function(){var q=N[Z.Qd];if(q){if(q!=Z.Dc&&(Z.Pd+=q.endTime-q.startTime),q.h!=null)return q.h+Z.Pd;--Z.Qd}return null}}(n);n.Dc.h==null;)n.Dc.h=c(),n.Dc.h==null&&(n.Dc.h=r())}if(T)for(n=b(N),i=n.next();!i.done;i=n.next())for(r=i.value,i=r.h,r=b(r.g),c=r.next();!c.done;c=r.next())c=c.value,c.h=i,i+=c.endTime-c.startTime;if(n=e.ea,T&&n!=1/0&&!Ky(e,l))for(e=b(N),l=e.next();!l.done;l=e.next())l.value.qg(n);return{segments:N,bandwidth:t}}function nS(e,t){if(e==at){if(t=="vtt"||t=="wvtt")return"text/vtt";if(t&&t!=="")return"application/mp4"}return e!="image"||t&&t!="jpeg"?e=="audio"&&t=="mp4a.40.34"?"audio/mpeg":t=="mjpg"?"application/mp4":null:"image/jpeg"}function Cv(e){return e==at?"text/vtt":oS.get(e).get("mp4")}function wx(e,t){e=Zi(e)?Math.trunc((t.length-1)/2):0;for(var n=t[e];n.dc()==2&&e+1<t.length;)e++,n=t[e];return{segment:n,segmentIndex:e}}function tD(e,t,n,i){var r,l,c,f,y,m,T,x,D,R,N,U,L;return z(function(j){switch(j.g){case 1:return r=Wi,l=wx(e,i),c=l.segment,c.status==2?j.return(Cv(t)):(f=c.N(),y=new pn(f[0]),m=y.ab.split(".").pop(),T=oS.get(t),(x=T.get(m))||(x=rS.get(m))||(x=nS(t,n))?j.return(x):(R=1,N=cn(f,e.g.retryParameters),pe(j,2),N.method="HEAD",_(j,Ku(e,N,r,{type:R}).promise,4)));case 4:U=j.h,D=U.headers["content-type"],Ue(j,3);break;case 2:if(L=Me(j),!L||L.code!=1002&&L.code!=1001){j.s(3);break}return N.method="GET",e.g.hls.allowRangeRequestsToGuessMimeType&&(N.headers.Range="bytes=0-0"),_(j,Ku(e,N,r,{type:R}).promise,6);case 6:U=j.h,D=U.headers["content-type"];case 3:if(!D){j.s(7);break}if(x=D.toLowerCase().split(";")[0],x!="application/octet-stream"){j.s(8);break}if(U.data.byteLength){j.s(9);break}return N.method="GET",_(j,Ku(e,N,r,{type:R}).promise,10);case 10:U=j.h;case 9:Vs(Ze(U.data))&&(x="video/mp2t");case 8:if(x!="application/octet-stream")return j.return(x);case 7:return j.return(Cv(t))}})}function Tx(e,t,n,i,r,l,c){e&&(e.width=Number(t)||void 0,e.height=Number(n)||void 0,e.frameRate=Number(i)||void 0,e.hdr=r||void 0,e.videoLayout=l||void 0,e.colorGamut=c||void 0)}function iS(e,t,n){return Ku(e,cn(t,e.g.retryParameters),0,{type:n?2:3})}function xx(e){var t,n,i,r,l,c;return z(function(f){switch(f.g){case 1:return e.h?(pe(f,2),t=Date.now(),_(f,e.update(),4)):f.return();case 4:n=Date.now(),Zi(e)&&(i=(n-t)/1e3,e.Pb.sample(1,i),r=0<e.g.updatePeriod?e.g.updatePeriod:e.o,l=Math.max(0,r-Yf(e.Pb)),e.B.da(l)),Ue(f,3);break;case 2:if(c=Me(f),!e.h)return f.return();if(e.g.raiseFatalErrorOnManifestUpdateRequestFailure)return e.h.onError(c),f.return();c.severity=1,e.h.onError(c),e.B.da(.1);case 3:if(!e.h)return f.return();e.h.onManifestUpdated(),se(f)}})}function Zi(e){return e.Ea!=Dv}function bv(e,t){e.Ea=t,e.l&&e.l.Gc(!Zi(e)),Zi(e)||e.B.stop()}function Ku(e,t,n,i){if(!e.Z)throw new Y(2,7,7001);return i||(i={}),i.isPreload=e.Qb(),t=e.h.networkingEngine.request(n,t,i),Yo(e.Z,t),t}function Iv(e){return e=="AES-128"||e=="AES-256"||e=="AES-256-CTR"}function nD(e,t,n,i){var r,l,c,f,y,m;return z(function(T){if(T.g==1){if(n=="video/mp2t")throw new Y(2,4,4040);if(w.shakaMediaKeysPolyfill==="apple")throw new Y(2,4,4041);if(r=Ft(t,"METHOD"),l=["SAMPLE-AES","SAMPLE-AES-CTR"],!l.includes(r))return T.return(null);c="cenc",r=="SAMPLE-AES"&&(c="cbcs"),f=Ft(t,"URI"),y=Lr("com.apple.fps",c,[{initDataType:"sinf",initData:new Uint8Array(0),keyId:null}],f);var x=new pn(f).nb.replace(/-/g,"").toLowerCase();return(m=x.length===32&&/^[0-9a-f]+$/.test(x)?x:null)||!i?T.s(2):_(T,Ax(e,i),3)}return T.g!=2&&(m=T.h),m&&y.keyIds.add(m),T.return(y)})}function Ex(e,t,n,i,r,l){var c,f,y,m,T,x,D,R,N,U,L,j;return z(function(V){switch(V.g){case 1:if(n=="video/mp2t")throw new Y(2,4,4040);if(w.shakaMediaKeysPolyfill==="apple")throw new Y(2,4,4041);if(c=Ft(t,"METHOD"),f=["SAMPLE-AES","SAMPLE-AES-CTR"],!f.includes(c))return V.return(null);if(y=mc(i(),Ft(t,"URI"),l),y[0].startsWith("data:text/plain;base64,")){m=wr(Fi(y[0].split("data:text/plain;base64,").pop())),V.s(2);break}return T=y.sort().join(""),e.oa.has(T)||(x=cn(y,e.g.retryParameters),D=Ku(e,x,6).promise,e.oa.set(T,D)),_(V,e.oa.get(T),3);case 3:R=V.h,m=wr(R.data);case 2:if(N="00000000000000000000000000000000",!r){V.s(4);break}return _(V,Ax(e,r),5);case 5:(U=V.h)&&(N=U);case 4:return L=new Map,L.set(N,m),j="cenc",c=="SAMPLE-AES"&&(j="cbcs"),V.return(vl(L,j))}})}function Ax(e,t){var n,i,r,l;return z(function(c){return c.g==1?(n=null,e.pa.has(t)?(n=e.pa.get(t),c.s(2)):(i=Sf(t.N(),t.uc(),t.tc(),e.g.retryParameters),r=Wi,_(c,Ku(e,i,r,{type:0}).promise,3))):(c.g!=2&&(l=c.h,t.Kd(l.data),n=V0(l.data),e.pa.set(t,n)),c.return(n))})}Pe("shaka.hls.HlsParser",Ev);var rS=new Map().set("aac","audio/aac").set("ac3","audio/ac3").set("ec3","audio/ec3").set("mp3","audio/mpeg"),iD=new Map().set("mp4","audio/mp4").set("mp4a","audio/mp4").set("m4s","audio/mp4").set("m4i","audio/mp4").set("m4a","audio/mp4").set("m4f","audio/mp4").set("cmfa","audio/mp4").set("ts","video/mp2t").set("tsa","video/mp2t"),rD=new Map().set("mp4","video/mp4").set("mp4v","video/mp4").set("m4s","video/mp4").set("m4i","video/mp4").set("m4v","video/mp4").set("m4f","video/mp4").set("cmfv","video/mp4").set("ts","video/mp2t").set("tsv","video/mp2t"),oD=new Map().set("mp4","application/mp4").set("m4s","application/mp4").set("m4i","application/mp4").set("m4f","application/mp4").set("cmft","application/mp4").set("vtt","text/vtt").set("webvtt","text/vtt").set("ttml","application/ttml+xml"),lD=new Map().set("jpg","image/jpeg").set("png","image/png").set("svg","image/svg+xml").set("webp","image/webp").set("avif","image/avif"),oS=new Map().set("audio",iD).set("video",rD).set("text",oD).set("image",lD),Cx=new Set(["video/mp2t"].concat(J(po))),Dv="VOD",bx="EVENT",Ov="LIVE",aD={Ph:Dv,Zj:bx,gk:Ov};cu("application/x-mpegurl",function(){return new Ev}),cu("application/vnd.apple.mpegurl",function(){return new Ev});function kv(e){return cv(e)}var uD=new Map().set("com.microsoft.playready",kv).set("com.microsoft.playready.recommendation",kv).set("com.microsoft.playready.software",kv).set("com.microsoft.playready.hardware",kv);function lS(){var e=this;this.h=this.g=null,this.l=[],this.j=null,this.u=1,this.i=null,this.C=new Wu(5),this.o=new dt(function(){sD(e)}),this.B=new yo,this.m=new Map,this.A=function(){return!1}}h=lS.prototype,h.configure=function(e,t){this.g=e,t&&(this.A=t)},h.start=function(e,t){var n=this;return z(function(i){if(i.g==1)return n.l=[e],n.h=t,_(i,aS(n),2);if(!n.h)throw new Y(2,7,7001);return i.return(n.j)})};function sD(e){var t;z(function(n){switch(n.g){case 1:return pe(n,2),_(n,aS(e),4);case 4:Ue(n,3);break;case 2:t=Me(n),e.h&&(t.severity=1,e.h.onError(t));case 3:if(!e.h)return n.return();se(n)}})}h.stop=function(){return this.g=this.h=null,this.l=[],this.j=null,this.o!=null&&(this.o.stop(),this.o=null),this.m.clear(),this.B.destroy()},h.update=function(){var e=this,t;return z(function(n){if(n.g==1)return pe(n,2),_(n,aS(e),4);if(n.g!=2)return Ue(n,0);if(t=Me(n),!e.h||!t)return n.return();e.h.onError(t),se(n)})},h.onExpirationUpdated=function(){},h.onInitialVariantChosen=function(){},h.banLocation=function(){},h.setMediaElement=function(){};function aS(e){var t,n,i,r,l,c,f;return z(function(y){if(y.g==1)return t=cn(e.l,e.g.retryParameters),n=e.h.networkingEngine,i=Date.now(),r=n.request(0,t,{type:5,isPreload:e.A()}),Yo(e.B,r),_(y,r.promise,2);if(l=y.h,!e.h)return y.return();l.uri&&!e.l.includes(l.uri)&&e.l.unshift(l.uri);var m=l.uri,T=l.data,x=e.g.mss.manifestPreprocessor;if(x!=oc){if(Ot("manifest.mss.manifestPreprocessor configuration","Please Use manifest.mss.manifestPreprocessorTXml instead."),T=PT(T,"SmoothStreamingMedia"),!T)throw new Y(2,4,4046,m);x(T),T=Pr(T.outerHTML)}var D=Mc(T,"SmoothStreamingMedia");if(!D)throw new Y(2,4,4046,m);if(m=e.g.mss.manifestPreprocessorTXml,m!=tp&&m(D),e.i||(e.i=new _e(null,0)),m=Ge(D,"IsLive",Nc,!1))throw new Y(2,4,4047);e.i.Gc(!m),x=Ge(D,"TimeScale",$n,1e7),T=Ge(D,"DVRWindowLength",$n),m&&(T===0||isNaN(T))&&(T=1/0);var R=Ge(D,"CanSeek",Nc,!1);T===0&&R&&(T=1/0),R=null,T&&0<T&&(R=T/x),m&&!isNaN(e.g.availabilityWindowOverride)&&(R=e.g.availabilityWindowOverride),R==null&&(R=1/0),e.i.Ce(R),T=Ge(D,"Duration",$n,1/0),m||e.i.bb(T/x),m={variants:[],textStreams:[],timescale:x,duration:T/x};var N;for(R=Lt(D,"Protection"),x=e.g.mss.keySystemsBySystemId,T=[],R=b(R),N=R.next();!N.done;N=R.next())T=T.concat(Lt(N.value,"ProtectionHeader"));if(T.length){for(R=[],N=0;N<T.length;N++){var U=T[N],L=U.attributes.SystemID.toLowerCase(),j=x[L];if(j){var V;e:{if(V=fT(U)){V=b(Ur(V,"DATA"));for(var X=V.next();!X.done;X=V.next())if(X=An(X.value,"KID")){V=Fi(In(X)),V=new Uint8Array([V[3],V[2],V[1],V[0],V[5],V[4],V[7],V[6]].concat(J(V.slice(8)))),V=wr(V);break e}}V=null}X=Fi(In(U)),L=la(L.replace(/-/g,"")),L=[{initData:Yc(X,L,new Set,0),initDataType:"cenc",keyId:V}],L=Lr(j,"cenc",L),V&&L.keyIds.add(V),(j=uD.get(j))&&(L.licenseServerUri=j(U)),R.push(L)}}x=R}else x=[];for(N=x,R=[],x=[],T=[],D=Lt(D,"StreamIndex"),D=b(D),U=D.next();!U.done;U=D.next()){U=U.value,j=Lt(U,"QualityLevel"),L=m.timescale,V=m.duration,X=Lt(U,"c");for(var G=[],Z=0,q=0;q<X.length;++q){var K=X[q],W=X[q+1],Q=Ge(K,"t",$n),oe=Ge(K,"d",$n);if(K=Ge(K,"r",Zn),!oe)break;if(Q=Q??Z,(K=K||0)&&K--,0>K)if(W){if(W=Ge(W,"t",$n),W==null)break;if(Q>=W)break;K=Math.ceil((W-Q)/oe)-1}else{if(V==1/0)break;if(Q/L>=V)break;K=Math.ceil((V*L-Q)/oe)-1}for(W=0;W<=K;++W)Z=Q+oe,G.push({start:Q/L,end:Z/L,xg:Q}),Q=Z}for(L=G,j=b(j),V=j.next();!V.done;V=j.next())(V=cD(e,U,V.value,L,N,m))&&(V.type!="audio"||e.g.disableAudio?V.type!="video"||e.g.disableVideo?V.type!=at||e.g.disableText||T.push(V):x.push(V):R.push(V))}for(D=[],R=b(0<R.length?R:[null]),N=R.next();!N.done;N=R.next())for(N=N.value,U=b(0<x.length?x:[null]),G=U.next();!G.done;G=U.next())j=D,L=j.push,V=e,X=N,G=G.value,q=0,X&&X.bandwidth&&0<X.bandwidth&&(q+=X.bandwidth),G&&G.bandwidth&&0<G.bandwidth&&(q+=G.bandwidth),V={id:V.u++,language:X?X.language:"und",disabledUntilTime:0,primary:!!X&&X.primary||!!G&&G.primary,audio:X,video:G,bandwidth:q,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},L.call(j,V);m.variants=D,m.textStreams=T,e.j?(e.j.variants=m.variants,e.j.textStreams=m.textStreams,e.h.filter(e.j)):(e.j={presentationTimeline:e.i,variants:m.variants,textStreams:m.textStreams,imageStreams:[],offlineSessionIds:[],sequenceMode:e.g.mss.sequenceMode,ignoreManifestTimestampsInSegmentsMode:!1,type:"MSS",serviceDescription:null,nextUrl:null,periodCount:1,gapCount:0,isLowLatency:!1,startTime:null},e.i.ie()),Promise.resolve(),c=Date.now(),f=(c-i)/1e3,e.C.sample(1,f),se(y)})}function cD(e,t,n,i,r,l){var c=t.attributes.Type;if(c!=="audio"&&c!=="video"&&c!=="text")return bt("Ignoring unrecognized type:",c),null;var f=t.attributes.Language,y=e.u++,m=Ge(n,"Bitrate",xl),T=Ge(n,"MaxWidth",xl),x=Ge(n,"MaxHeight",xl),D=Ge(n,"Channels",xl),R=Ge(n,"SamplingRate",xl),N=l.duration;i.length&&(N=i[i.length-1].end-i[0].start);var U=e.i.getDuration();e.i.bb(Math.min(N,U));var L={id:y,originalId:t.attributes.Name||String(y),groupId:null,createSegmentIndex:function(){return Promise.resolve()},closeSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:"",codecs:"",frameRate:void 0,pixelAspectRatio:void 0,bandwidth:m||0,width:T||void 0,height:x||void 0,kind:"",encrypted:0<r.length,drmInfos:r,keyIds:new Set,language:It(f||"und"),originalLanguage:f,label:"",type:"",primary:!1,trickModeVideo:null,dependencyStream:null,emsgSchemeIdUris:[],roles:[],forced:!1,channelsCount:D,audioSamplingRate:R,spatialAudio:!1,closedCaptions:null,hdr:void 0,colorGamut:void 0,videoLayout:void 0,tilesLayout:void 0,matchedStreams:[],mssPrivateData:{duration:N,timescale:l.timescale,codecPrivateData:null},accessibilityPurpose:null,external:!1,fastSwitching:!1,fullMimeTypes:new Set,isAudioMuxedInVideo:!1,baseOriginalId:null};if((r=t.attributes.Subtype)&&((r=gD.get(r))&&L.roles.push(r),r==="main"&&(L.primary=!0)),r=n.attributes.FourCC,(r===null||r==="")&&(r=t.attributes.FourCC),!r){if(c==="audio")r="AAC";else if(c==="video")return bt('FourCC is not defined whereas it is required for a QualityLevel element for a StreamIndex of type "video"'),null}if(!yD.includes(r.toUpperCase()))return bt("Codec not supported:",r),null;switch(n=fD(n,c,r,L),L.mssPrivateData.codecPrivateData=n,c){case"audio":if(!n)return bt("Quality unsupported without CodecPrivateData",c),null;L.type="audio",L.mimeType="mss/audio/mp4",L.codecs=dD(r,n);break;case"video":if(!n)return bt("Quality unsupported without CodecPrivateData",c),null;L.type="video",L.mimeType="mss/video/mp4",L.codecs=pD(n);break;case"text":L.type=at,L.mimeType="application/mp4",(r==="TTML"||r==="DFXP")&&(L.codecs="stpp")}return L.fullMimeTypes.add(hn(L.mimeType,L.codecs)),L.createSegmentIndex=function(){if(L.segmentIndex)return Promise.resolve();if(e.m.has(L.id))var j=e.m.get(L.id);else j=[],L.type=="video"&&(j=L.mssPrivateData.codecPrivateData.split("00000001").slice(1)),j={id:L.id,type:L.type,codecs:L.codecs,encrypted:L.encrypted,timescale:L.mssPrivateData.timescale,duration:L.mssPrivateData.duration,lb:j,ra:new Uint8Array([]),Ca:new Uint8Array([]),Ia:0,Ka:0,data:null,stream:L},j=br(new Sa([j])),e.m.set(L.id,j);return j=hD(e,new bi(function(){return[]},0,null,Zs(L),L.mssPrivateData.timescale,j,null,L.encrypted),L,t,i),L.segmentIndex=new Dt(j),Promise.resolve()},L.closeSegmentIndex=function(){L.segmentIndex&&(L.segmentIndex.release(),L.segmentIndex=null)},L}function fD(e,t,n,i){if(e=e.attributes.CodecPrivateData)return e;if(t!=="audio")return null;t=i.channelsCount||2,e=i.audioSamplingRate||44100;var r={96e3:0,88200:1,64e3:2,48e3:3,44100:4,32e3:5,24e3:6,22050:7,16e3:8,12e3:9,11025:10,8e3:11,7350:12};return i=r[e],n==="AACH"?(n=new Uint8Array(4),e=r[2*e],n[0]=40|i>>1,n[1]=i<<7|t<<3|e>>1,n[2]=e<<7|8,n[3]=0,t=new Uint16Array(2),t[0]=(n[0]<<8)+n[1],t[1]=(n[2]<<8)+n[3],t[0].toString(16)+t[1].toString(16)):(n=new Uint8Array(2),n[0]=16|i>>1,n[1]=i<<7|t<<3,t=new Uint16Array(1),t[0]=(n[0]<<8)+n[1],t[0].toString(16))}function dD(e,t){var n=0;return e==="AACH"&&(n=5),t?n===0&&(n=(parseInt(t.substr(0,2),16)&248)>>3):(n=2,e==="AACH"&&(n=5)),"mp4a.40."+n}function pD(e){var t=/00000001[0-9]7/.exec(e);return t.length&&e?"avc1."+e.substr(e.indexOf(t[0])+10,6):""}function hD(e,t,n,i,r){var l=i.attributes.Url.replace("{bitrate}",String(n.bandwidth));i=[],r=b(r);for(var c=r.next(),f={};!c.done;f={Fe:void 0},c=r.next())f.Fe=c.value,i.push(new qe(f.Fe.start,f.Fe.end,function(y){return function(){return _n(e.l,[l.replace("{start time}",String(y.Fe.xg))])}}(f),0,null,t,0,0,n.mssPrivateData.duration));return i}Pe("shaka.mss.MssParser",lS);var yD="AAC AACL AACH AACP AVC1 H264 TTML DFXP".split(" "),gD=new Map().set("CAPT","main").set("SUBT","alternate").set("DESC","main");cu("application/vnd.ms-sstr+xml",function(){return new lS});function Ix(e,t,n,i,r,l,c){if(200<=n&&299>=n&&n!=202||n==304)return{uri:r||i,originalUri:i,data:t,status:n,headers:e,fromCache:!!e["x-shaka-from-cache"],originalRequest:l};l=null;try{l=Nr(t)}catch{}throw new Y(n==401||n==403?2:1,1,1001,i,n,l,e,c,r||i)}function uS(){}function Rv(e,t,n,i,r,l){var c=new TD;ma(t.headers).forEach(function(T,x){c.append(x,T)});var f=new SD,y={Gg:!1,Jh:!1};if(e=mD(e,t,n,{body:t.body||void 0,headers:c,method:t.method,signal:f.signal,credentials:t.allowCrossSiteCredentials?"include":void 0},y,i,r,t.streamDataCallback,l.minBytesForProgressEvents||0),e=new yn(e,function(){return y.Gg=!0,f.abort(),Promise.resolve()}),t=t.retryParameters.timeout){var m=new dt(function(){y.Jh=!0,f.abort()});m.da(t/1e3),e.finally(function(){m.stop()})}return e}function mD(e,t,n,i,r,l,c,f,y){var m,T,x,D,R,N,U,L,j,V,X,G,Z,q;return z(function(K){switch(K.g){case 1:return m=vD,T=wD,D=new ArrayBuffer(0),N=R=0,U=Date.now(),pe(K,2),_(K,m(e,i),4);case 4:if(x=K.h,c(Dx(x.headers)),i.method=="HEAD"){K.s(5);break}return j=(L=x.headers.get("Content-Length"))?parseInt(L,10):0,x.body?(V=x.clone().body.getReader(),X=function(W){function Q(){var oe,ne,re,le;return z(function(fe){switch(fe.g){case 1:return pe(fe,2),_(fe,V.read(),4);case 4:oe=fe.h,Ue(fe,3);break;case 2:return Me(fe),fe.return();case 3:if(oe.done){fe.s(5);break}if(R+=oe.value.byteLength,!f){fe.s(5);break}return _(fe,f(oe.value),5);case 5:ne=Date.now(),re=R-N,(100<ne-U&&re>=y||oe.done)&&(le=oe.done?0:j-R,l(ne-U,re,le),N=R,U=ne),oe.done?W.close():(W.enqueue(oe.value),Q()),se(fe)}})}Q()},new T({start:X}),_(K,x.arrayBuffer(),8)):_(K,x.arrayBuffer(),9);case 8:D=K.h,K.s(5);break;case 9:D=K.h,G=Date.now(),l(G-U,D.byteLength,0);case 5:Ue(K,3);break;case 2:throw Z=Me(K),r.Gg?new Y(1,1,7001,e,n):r.Jh?new Y(1,1,1003,e,n):new Y(1,1,1002,e,Z,n);case 3:return q=Dx(x.headers),K.return(Ix(q,D,x.status,e,x.url,t,n))}})}function Dx(e){var t={};return e.forEach(function(n,i){t[i.trim()]=n}),t}function Ox(){if(w.ReadableStream)try{new ReadableStream({})}catch{return!1}else return!1;if(w.Response){if(!new Response("").body)return!1}else return!1;return!(!w.fetch||"polyfill"in w.fetch||!w.AbortController)}Pe("shaka.net.HttpFetchPlugin",uS),uS.isSupported=Ox,uS.parse=Rv;var vD=w.fetch,SD=w.AbortController,wD=w.ReadableStream,TD=w.Headers;Ox()&&(go("http",Rv,2,!0),go("https",Rv,2,!0),go("blob",Rv,2,!0));function kx(){}function Mv(e,t,n,i,r,l){var c=new xD,f=Date.now(),y=0,m=new Promise(function(T,x){c.open(t.method,e,!0),c.responseType="arraybuffer",c.timeout=t.retryParameters.timeout,c.withCredentials=t.allowCrossSiteCredentials,c.onabort=function(){x(new Y(1,1,7001,e,n))};var D=!1;c.onreadystatechange=function(){if(c.readyState==2&&!D){var N=Rx(c);r(N),D=!0}},c.onload=function(N){var U=Rx(c),L=c.response;try{i(Date.now()-f,N.loaded-y,0);var j=Ix(U,L,c.status,e,c.responseURL,t,n);T(j)}catch(V){x(V)}},c.onerror=function(N){x(new Y(1,1,1002,e,N,n))},c.ontimeout=function(){x(new Y(1,1,1003,e,n))},c.onprogress=function(N){var U=Date.now(),L=l.minBytesForProgressEvents||0,j=N.loaded-y;(100<U-f&&j>=L||N.lengthComputable&&N.loaded==N.total)&&(i(U-f,j,c.readyState==4?0:N.total-N.loaded),y=N.loaded,f=U)};for(var R in t.headers)c.setRequestHeader(R.toLowerCase(),t.headers[R]);c.send(t.body)});return new yn(m,function(){return c.abort(),Promise.resolve()})}function Rx(e){var t=e.getAllResponseHeaders().trim().split(`\r
`);e={},t=b(t);for(var n=t.next();!n.done;n=t.next())n=n.value.split(": "),e[n[0].toLowerCase()]=n.slice(1).join(": ");return e}Pe("shaka.net.HttpXHRPlugin",kx),kx.parse=Mv;var xD=w.XMLHttpRequest;go("http",Mv,1,!0),go("https",Mv,1,!0),go("blob",Mv,1,!0);function Mx(e,t,n,i,r){this.g=e,this.i=t,this.groupId=n,this.h=i,this.j=r}function sS(e){var t=e.Ib(!1);return t?Bo(t):e.N().map(function(n){return"{"+encodeURI(n.split("#xywh=")[0])+"}"}).join("")+":"+e.Sa+":"+e.wa}function ED(e,t){return Sf(e.g.N(),e.g.Sa,e.g.wa,t.streaming.retryParameters)}function Nx(){this.g=this.j=this.i=0,this.h=new Map,this.l=0}function Px(e,t){e.i+=t;var n=e.l;return e.l++,e.h.set(n,t),n}Nx.prototype.close=function(e,t){if(this.h.has(e)){var n=this.h.get(e);this.h.delete(e),this.j+=n,this.g+=t}};function Lx(e){return e.i==0?0:e.j/e.i}function _x(e){var t=this;this.u=e,this.i=new Map,this.h=new Is(function(){return cS(t).catch(function(){})}),this.j=[],this.o=function(){},this.m=function(){},this.g=new Nx,this.l=!1}_x.prototype.destroy=function(){return this.h.destroy()};function AD(e,t,n){e.o=t,e.m=n}function cS(e){e.l=!0;var t=e.j.map(function(n){return n()});return e.j=[],Promise.all(t)}function CD(e,t,n,i,r,l){ct(e.h);var c=(e.i.get(t)||Promise.resolve()).then(function(){var f,y,m,T,x,D,R;return z(function(N){if(N.g==1)return _(N,DD(e,n),2);if(f=N.h,e.h.g)throw new Y(2,9,7001);if(r)for(T in y=Ze(f),m=new xd(y),m.data)x=Number(T),D=m.data[x],R=m.g[x],e.m(D,R);return e.g.close(i,f.byteLength),e.o(Lx(e.g),e.g.g),N.return(l(f))})});e.i.set(t,c)}function bD(e,t,n,i,r,l){ct(e.h);var c=(e.i.get(t)||Promise.resolve()).then(function(){if(e.h.g)throw new Y(2,9,7001);if(r){var f=Ze(n);f=new xd(f);for(var y in f.data){var m=Number(y);e.m(f.data[m],f.g[m])}}return e.g.close(i,n.byteLength),e.o(Lx(e.g),e.g.g),l(n)});e.i.set(t,c)}function ID(e){return z(function(t){return t.g==1?_(t,Promise.all(e.i.values()),2):t.return(e.g.g)})}function DD(e,t){var n,i,r,l;return z(function(c){return c.g==1?(n=Wi,i=e.u.request(n,t),r=function(){return i.abort()},e.j.push(r),_(c,i.promise,2)):(l=c.h,_r(e.j,r),c.return(l.data))})}function Nv(e,t){var n=this;this.i=e,this.h=e.objectStore(t),this.g=new kt,e.onabort=function(i){i.preventDefault(),n.g.reject()},e.onerror=function(i){i.preventDefault(),n.g.reject()},e.oncomplete=function(){n.g.resolve()}}Nv.prototype.abort=function(){var e=this;return z(function(t){if(t.g==1){try{e.i.abort()}catch{}return pe(t,2),_(t,e.g,4)}if(t.g!=2)return Ue(t,0);Me(t),se(t)})};function fS(e,t){return new Promise(function(n,i){var r=e.h.openCursor();r.onerror=i,r.onsuccess=function(){var l;return z(function(c){if(c.g==1)return r.result==null?(n(),c.return()):(l=r.result,_(c,t(l.key,l.value,l),2));l.continue(),se(c)})}})}Nv.prototype.store=function(){return this.h},Nv.prototype.promise=function(){return this.g};function dS(e){this.h=e,this.g=[]}dS.prototype.destroy=function(){return Promise.all(this.g.map(function(e){return e.abort()}))};function jf(e,t){return Pv(e,t,"readwrite")}function Pv(e,t,n){n=e.h.transaction([t],n);var i=new Nv(n,t);return e.g.push(i),i.promise().then(function(){_r(e.g,i)},function(){_r(e.g,i)}),i}function Bf(e,t,n){this.h=new dS(e),this.i=t,this.g=n}h=Bf.prototype,h.destroy=function(){return this.h.destroy()},h.hasFixedKeySpace=function(){return!0},h.addSegments=function(){return Ux(this.i)},h.removeSegments=function(e,t){return jx(this,this.i,e,t)},h.getSegments=function(e){var t=this,n;return z(function(i){return i.g==1?_(i,Bx(t,t.i,e),2):(n=i.h,i.return(n.map(function(r){return t.Ig(r)})))})},h.addManifests=function(){return Ux(this.g)},h.updateManifest=function(){return Promise.reject(new Y(2,9,9016,"Cannot modify values in "+this.g))};function OD(e,t,n){e=jf(e.h,e.g);var i=e.store();return i.get(t).onsuccess=function(){i.put(n,t)},e.promise()}h.updateManifestExpiration=function(e,t){var n=jf(this.h,this.g),i=n.store();return i.get(e).onsuccess=function(r){(r=r.target.result)&&(r.expiration=t,i.put(r,e))},n.promise()},h.removeManifests=function(e,t){return jx(this,this.g,e,t)},h.getManifests=function(e){var t=this,n;return z(function(i){return i.g==1?_(i,Bx(t,t.g,e),2):(n=i.h,i.return(Promise.all(n.map(function(r){return t.jd(r)}))))})},h.getAllManifests=function(){var e=this,t,n;return z(function(i){return i.g==1?(t=Pv(e.h,e.g,"readonly"),n=new Map,_(i,fS(t,function(r,l){var c;return z(function(f){if(f.g==1)return _(f,e.jd(l),2);c=f.h,n.set(r,c),se(f)})}),2)):i.g!=3?_(i,t.promise(),3):i.return(n)})},h.Ig=function(e){return e},h.jd=function(e){return Promise.resolve(e)};function Ux(e){return Promise.reject(new Y(2,9,9011,"Cannot add new value to "+e))}h.add=function(e,t){var n=this,i,r,l,c,f,y,m;return z(function(T){if(T.g==1){for(i=jf(n.h,e),r=i.store(),l=[],c=b(t),f=c.next(),y={};!f.done;y={cg:void 0},f=c.next())m=f.value,y.cg=r.add(m),y.cg.onsuccess=function(x){return function(){l.push(x.cg.result)}}(y);return _(T,i.promise(),2)}return T.return(l)})};function jx(e,t,n,i){e=jf(e.h,t),t=e.store(),n=b(n);for(var r=n.next(),l={};!r.done;l={Qf:void 0},r=n.next())l.Qf=r.value,t.delete(l.Qf).onsuccess=function(c){return function(){return i(c.Qf)}}(l);return e.promise()}function Bx(e,t,n){var i,r,l,c,f,y,m;return z(function(T){if(T.g==1){for(i=Pv(e.h,t,"readonly"),r=i.store(),l={},c=[],f=b(n),y=f.next(),m={};!y.done;m={we:void 0,ee:void 0},y=f.next())m.ee=y.value,m.we=r.get(m.ee),m.we.onsuccess=function(x){return function(){x.we.result==null&&c.push(x.ee),l[x.ee]=x.we.result}}(m);return _(T,i.promise(),2)}if(c.length)throw new Y(2,9,9012,"Could not find values for "+c);return T.return(n.map(function(x){return l[x]}))})}function qy(e){this.g=new dS(e)}qy.prototype.destroy=function(){return this.g.destroy()},qy.prototype.getAll=function(){var e=this,t,n;return z(function(i){return i.g==1?(t=Pv(e.g,"session-ids","readonly"),n=[],_(i,fS(t,function(r,l){n.push(l)}),2)):i.g!=3?_(i,t.promise(),3):i.return(n)})},qy.prototype.add=function(e){var t=jf(this.g,"session-ids"),n=t.store();e=b(e);for(var i=e.next();!i.done;i=e.next())n.add(i.value);return t.promise()},qy.prototype.remove=function(e){var t=this,n;return z(function(i){return i.g==1?(n=jf(t.g,"session-ids"),_(i,fS(n,function(r,l,c){e.includes(l.sessionId)&&c.delete()}),2)):_(i,n.promise(),0)})};function hr(){this.g=new Map}hr.prototype.destroy=function(){for(var e=[],t=b(this.g.values()),n=t.next();!n.done;n=t.next())e.push(n.value.destroy());return this.g.clear(),Promise.all(e)},hr.prototype.init=function(){var e=this;Fy.forEach(function(r,l){(r=r())&&e.g.set(l,r)});for(var t=[],n=b(this.g.values()),i=n.next();!i.done;i=n.next())t.push(i.value.init());return Promise.all(t)};function Vx(e){var t=null;if(e.g.forEach(function(n,i){n.getCells().forEach(function(r,l){r.hasFixedKeySpace()||t||(t={path:{zb:i,Ta:l},Ta:r})})}),t)return t;throw new Y(2,9,9013,"Could not find a cell that supports add-operations")}function kD(e,t){e.g.forEach(function(n,i){n.getCells().forEach(function(r,l){t({zb:i,Ta:l},r)})})}function Lv(e,t,n){if(e=e.g.get(t),!e)throw new Y(2,9,9013,"Could not find mechanism with name "+t);if(t=e.getCells().get(n),!t)throw new Y(2,9,9013,"Could not find cell with name "+n);return t}function RD(e,t){e.g.forEach(function(n){t(n.getEmeSessionCell())})}function MD(e){var t=Array.from(e.g.keys());if(!t.length)throw new Y(2,9,9e3,"No supported storage mechanisms found");return e.g.get(t[0]).getEmeSessionCell()}function ND(e){var t,n,i;return z(function(r){return r.g==1?(t=Array.from(e.g.values()),n=0<t.length,n||(i=Fy,i.forEach(function(l){(l=l())&&t.push(l)})),_(r,Promise.all(t.map(function(l){return l.erase()})),2)):n?r.s(0):_(r,Promise.all(t.map(function(l){return l.destroy()})),0)})}function Hx(e,t){Fy.set(e,t)}Pe("shaka.offline.StorageMuxer",hr),hr.unregister=function(e){Fy.delete(e)},hr.register=Hx,hr.prototype.destroy=hr.prototype.destroy;var Fy=new Map;function zy(){Bf.apply(this,arguments)}ot(zy,Bf),zy.prototype.updateManifestExpiration=function(e,t){var n=this,i,r,l;return z(function(c){return i=jf(n.h,n.g),r=i.store(),l=new kt,r.get(e).onsuccess=function(f){(f=f.target.result)?(f.expiration=t,r.put(f),l.resolve()):l.reject(new Y(2,9,9012,"Could not find values for "+e))},_(c,Promise.all([i.promise(),l]),0)})},zy.prototype.jd=function(e){var t,n,i,r,l,c;return z(function(f){if(f.g==1){for(t=[],n=0;n<e.periods.length;++n)i=n==e.periods.length-1?e.duration:e.periods[n+1].startTime,r=i-e.periods[n].startTime,l=PD(e.periods[n],r),t.push(l);return _(f,bT(t),2)}return c=f.h,f.return({creationTime:0,originalManifestUri:e.originalManifestUri,duration:e.duration,size:e.size,expiration:e.expiration==null?1/0:e.expiration,streams:c,sessionIds:e.sessionIds,drmInfo:e.drmInfo,appMetadata:e.appMetadata,sequenceMode:!1})})};function PD(e,t){_D(e);for(var n=b(e.streams),i=n.next();!i.done;i=n.next());return e.streams.map(function(r){return LD(r,e.startTime,t)})}function LD(e,t,n){var i=e.initSegmentUri?Kx(e.initSegmentUri):null,r=t+e.presentationTimeOffset,l=t+n;return{id:e.id,originalId:null,groupId:null,primary:e.primary,type:e.contentType,mimeType:e.mimeType,codecs:e.codecs,frameRate:e.frameRate,pixelAspectRatio:void 0,hdr:void 0,colorGamut:void 0,videoLayout:void 0,kind:e.kind,language:e.language,originalLanguage:e.language||null,label:e.label,width:e.width,height:e.height,initSegmentKey:i,encrypted:e.encrypted,keyIds:new Set([e.keyId]),segments:e.segments.map(function(c){var f=Kx(c.uri);return{startTime:t+c.startTime,endTime:t+c.endTime,dataKey:f,initSegmentKey:i,appendWindowStart:t,appendWindowEnd:l,timestampOffset:r,tilesLayout:"",mimeType:null,codecs:null,thumbnailSprite:null}}),variantIds:e.variantIds,roles:[],forced:!1,audioSamplingRate:null,channelsCount:null,spatialAudio:!1,closedCaptions:null,tilesLayout:void 0,external:!1,fastSwitching:!1,isAudioMuxedInVideo:!1}}zy.prototype.Ig=function(e){return{data:e.data}};function Kx(e){var t;if((t=/^offline:[0-9]+\/[0-9]+\/([0-9]+)$/.exec(e))||(t=/^offline:segment\/([0-9]+)$/.exec(e)))return Number(t[1]);throw new Y(2,9,9004,"Could not parse uri "+e)}function _D(e){var t=e.streams.filter(function(f){return f.contentType=="audio"});if(e=e.streams.filter(function(f){return f.contentType=="video"}),!t.every(function(f){return f.variantIds})||!e.every(function(f){return f.variantIds})){for(var n=b(t),i=n.next();!i.done;i=n.next())i.value.variantIds=[];for(n=b(e),i=n.next();!i.done;i=n.next())i.value.variantIds=[];if(n=0,e.length&&!t.length){i=n++;for(var r=b(e),l=r.next();!l.done;l=r.next())l.value.variantIds.push(i)}if(!e.length&&t.length)for(i=n++,r=b(t),l=r.next();!l.done;l=r.next())l.value.variantIds.push(i);if(e.length&&t.length)for(t=b(t),i=t.next();!i.done;i=t.next())for(i=i.value,r=b(e),l=r.next();!l.done;l=r.next()){l=l.value;var c=n++;i.variantIds.push(c),l.variantIds.push(c)}}}function _v(){Bf.apply(this,arguments)}ot(_v,Bf),_v.prototype.jd=function(e){var t,n,i,r,l,c;return z(function(f){if(f.g==1){for(t=[],n=0;n<e.periods.length;++n){i=n==e.periods.length-1?e.duration:e.periods[n+1].startTime,r=i-e.periods[n].startTime;for(var y=e.periods[n],m=[],T=b(y.streams),x=T.next();!x.done;x=T.next())x=x.value,x.variantIds.length!=0&&m.push(UD(x,y.startTime,y.startTime+r));l=m,t.push(l)}return _(f,bT(t),2)}return c=f.h,f.return({appMetadata:e.appMetadata,creationTime:0,drmInfo:e.drmInfo,duration:e.duration,expiration:e.expiration==null?1/0:e.expiration,originalManifestUri:e.originalManifestUri,sessionIds:e.sessionIds,size:e.size,streams:c,sequenceMode:!1})})};function UD(e,t,n){return{id:e.id,originalId:e.originalId,groupId:null,primary:e.primary,type:e.contentType,mimeType:e.mimeType,codecs:e.codecs,frameRate:e.frameRate,pixelAspectRatio:e.pixelAspectRatio,hdr:void 0,colorGamut:void 0,videoLayout:void 0,kind:e.kind,language:e.language,originalLanguage:e.language||null,label:e.label,width:e.width,height:e.height,encrypted:e.encrypted,keyIds:new Set([e.keyId]),segments:e.segments.map(function(i){return{startTime:t+i.startTime,endTime:t+i.endTime,initSegmentKey:e.initSegmentKey,appendWindowStart:t,appendWindowEnd:n,timestampOffset:t-e.presentationTimeOffset,dataKey:i.dataKey,tilesLayout:"",mimeType:null,codecs:null,thumbnailSprite:null}}),variantIds:e.variantIds,roles:[],forced:!1,audioSamplingRate:null,channelsCount:null,spatialAudio:!1,closedCaptions:null,tilesLayout:void 0,external:!1,fastSwitching:!1,isAudioMuxedInVideo:!1}}function pS(){Bf.apply(this,arguments)}ot(pS,Bf),h=pS.prototype,h.hasFixedKeySpace=function(){return!1},h.addSegments=function(e){return this.add(this.i,e)},h.addManifests=function(e){return this.add(this.g,e)},h.updateManifest=function(e,t){return OD(this,e,t)},h.jd=function(e){return e.expiration==null&&(e.expiration=1/0),Promise.resolve(e)};function qx(){this.m=this.j=this.i=this.h=this.g=this.l=null}h=qx.prototype,h.init=function(){var e=this,t=new kt,n=!1,i=new dt(function(){n=!0,t.reject(new Y(2,9,9017))});i.da(5);var r=w.indexedDB.open("shaka_offline_db",5);return r.onsuccess=function(){if(!n){var l=r.result;e.l=l;var c=l.objectStoreNames;c=c.contains("manifest")&&c.contains("segment")?new zy(l,"segment","manifest"):null,e.g=c,c=l.objectStoreNames,c=c.contains("manifest-v2")&&c.contains("segment-v2")?new _v(l,"segment-v2","manifest-v2"):null,e.h=c,c=l.objectStoreNames,c=c.contains("manifest-v3")&&c.contains("segment-v3")?new _v(l,"segment-v3","manifest-v3"):null,e.i=c,c=l.objectStoreNames,c=c.contains("manifest-v5")&&c.contains("segment-v5")?new pS(l,"segment-v5","manifest-v5"):null,e.j=c,l=l.objectStoreNames.contains("session-ids")?new qy(l):null,e.m=l,i.stop(),t.resolve()}},r.onupgradeneeded=function(){for(var l=r.result,c=b(["segment-v5","manifest-v5","session-ids"]),f=c.next();!f.done;f=c.next())f=f.value,l.objectStoreNames.contains(f)||l.createObjectStore(f,{autoIncrement:!0})},r.onerror=function(l){n||(t.reject(new Y(2,9,9001,r.error)),i.stop(),l.preventDefault())},t},h.destroy=function(){var e=this;return z(function(t){switch(t.g){case 1:if(!e.g){t.s(2);break}return _(t,e.g.destroy(),2);case 2:if(!e.h){t.s(4);break}return _(t,e.h.destroy(),4);case 4:if(!e.i){t.s(6);break}return _(t,e.i.destroy(),6);case 6:if(!e.j){t.s(8);break}return _(t,e.j.destroy(),8);case 8:if(!e.m){t.s(10);break}return _(t,e.m.destroy(),10);case 10:e.l&&e.l.close(),se(t)}})},h.getCells=function(){var e=new Map;return this.g&&e.set("v1",this.g),this.h&&e.set("v2",this.h),this.i&&e.set("v3",this.i),this.j&&e.set("v5",this.j),e},h.getEmeSessionCell=function(){return this.m},h.erase=function(){var e=this;return z(function(t){switch(t.g){case 1:if(!e.g){t.s(2);break}return _(t,e.g.destroy(),2);case 2:if(!e.h){t.s(4);break}return _(t,e.h.destroy(),4);case 4:if(!e.i){t.s(6);break}return _(t,e.i.destroy(),6);case 6:if(!e.j){t.s(8);break}return _(t,e.j.destroy(),8);case 8:return e.l&&e.l.close(),_(t,jD(),10);case 10:return e.l=null,e.g=null,e.h=null,e.i=null,e.j=null,_(t,e.init(),0)}})};function jD(){var e=new kt,t=w.indexedDB.deleteDatabase("shaka_offline_db");return t.onblocked=function(){},t.onsuccess=function(){e.resolve()},t.onerror=function(n){e.reject(new Y(2,9,9001,t.error)),n.preventDefault()},e}Hx("idb",function(){return(!ir()||ir()&&yl())&&!nr()&&w.indexedDB?new qx:null});function Na(e,t,n,i){this.g=e,this.i=t,this.h=n,this.l=i,this.j=["offline:",e,"/",t,"/",n,"/",i].join("")}Na.prototype.zb=function(){return this.i},Na.prototype.Ta=function(){return this.h},Na.prototype.key=function(){return this.l},Na.prototype.toString=function(){return this.j};function hS(e){if(e=/^offline:([a-z]+)\/([^/]+)\/([^/]+)\/([0-9]+)$/.exec(e),e==null)return null;var t=e[1];if(t!="manifest"&&t!="segment")return null;var n=e[2];if(!n)return null;var i=e[3];return i&&t!=null?new Na(t,n,i,Number(e[4])):null}function Fx(e,t){this.h=e,this.g=t}function zx(e,t){var n=new _e(null,0);n.bb(t.duration);var i=t.streams.filter(function(m){return m.type=="audio"}),r=t.streams.filter(function(m){return m.type=="video"});i=BD(e,i,r,n),r=t.streams.filter(function(m){return m.type==at}).map(function(m){return Uv(e,m,n)});var l=t.streams.filter(function(m){return m.type=="image"}).map(function(m){return Uv(e,m,n)}),c=t.drmInfo?[t.drmInfo]:[];if(t.drmInfo)for(var f=b(i.values()),y=f.next();!y.done;y=f.next())y=y.value,y.audio&&y.audio.encrypted&&(y.audio.drmInfos=c),y.video&&y.video.encrypted&&(y.video.drmInfos=c);return{presentationTimeline:n,offlineSessionIds:t.sessionIds,variants:Array.from(i.values()),textStreams:r,imageStreams:l,sequenceMode:t.sequenceMode||!1,ignoreManifestTimestampsInSegmentsMode:!1,type:t.type||"UNKNOWN",serviceDescription:null,nextUrl:null,periodCount:1,gapCount:0,isLowLatency:!1,startTime:null}}function BD(e,t,n,i){for(var r=new Set,l=b(t),c=l.next();!c.done;c=l.next()){c=b(c.value.variantIds);for(var f=c.next();!f.done;f=c.next())r.add(f.value)}for(l=b(n),c=l.next();!c.done;c=l.next())for(c=b(c.value.variantIds),f=c.next();!f.done;f=c.next())r.add(f.value);for(l=new Map,r=b(r),c=r.next();!c.done;c=r.next())c=c.value,l.set(c,{id:c,language:"",disabledUntilTime:0,primary:!1,audio:null,video:null,bandwidth:0,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});for(t=b(t),r=t.next();!r.done;r=t.next())for(c=r.value,r=Uv(e,c,i),c=b(c.variantIds),f=c.next();!f.done;f=c.next())f=l.get(f.value),f.language=r.language,f.primary=f.primary||r.primary,f.audio=r;for(n=b(n),t=n.next();!t.done;t=n.next())for(r=t.value,t=Uv(e,r,i),r=b(r.variantIds),c=r.next();!c.done;c=r.next())c=l.get(c.value),c.primary=c.primary||t.primary,c.video=t;return l}function Uv(e,t,n){var i=t.segments.map(function(r){return VD(e,r,t)});return n.Ed(i),{id:t.id,originalId:t.originalId,groupId:t.groupId,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new Dt(i),mimeType:t.mimeType,codecs:t.codecs,width:t.width||void 0,height:t.height||void 0,frameRate:t.frameRate,pixelAspectRatio:t.pixelAspectRatio,hdr:t.hdr,colorGamut:t.colorGamut,videoLayout:t.videoLayout,kind:t.kind,encrypted:t.encrypted,drmInfos:[],keyIds:t.keyIds,language:t.language,originalLanguage:t.originalLanguage||null,label:t.label,type:t.type,primary:t.primary,trickModeVideo:null,dependencyStream:null,emsgSchemeIdUris:null,roles:t.roles,forced:t.forced,channelsCount:t.channelsCount,audioSamplingRate:t.audioSamplingRate,spatialAudio:t.spatialAudio,closedCaptions:t.closedCaptions,tilesLayout:t.tilesLayout,mssPrivateData:t.mssPrivateData,accessibilityPurpose:null,external:t.external,fastSwitching:t.fastSwitching,fullMimeTypes:new Set([hn(t.mimeType,t.codecs)]),isAudioMuxedInVideo:!1,baseOriginalId:null}}function VD(e,t,n){var i=new Na("segment",e.h,e.g,t.dataKey);return e=new qe(t.startTime,t.endTime,function(){return[i.toString()]},0,null,t.initSegmentKey!=null?HD(e,t.initSegmentKey):null,t.timestampOffset,t.appendWindowStart,t.appendWindowEnd,[],t.tilesLayout||""),e.mimeType=t.mimeType||n.mimeType||"",e.codecs=t.codecs||n.codecs||"",t.thumbnailSprite&&e.De(t.thumbnailSprite),e}function HD(e,t){var n=new Na("segment",e.h,e.g,t);return new bi(function(){return[n.toString()]},0,null)}function Gx(){this.g=null}h=Gx.prototype,h.configure=function(){},h.start=function(e,t){var n=this,i,r,l,c,f,y,m;return z(function(T){switch(T.g){case 1:if(i=hS(e),n.g=i,i==null||i.g!="manifest")throw new Y(2,1,9004,e);return r=new hr,rt(T,2),_(T,r.init(),4);case 4:return _(T,Lv(r,i.zb(),i.Ta()),5);case 5:return l=T.h,_(T,l.getManifests([i.key()]),6);case 6:return c=T.h,f=c[0],y=new Fx(i.zb(),i.Ta()),m=zx(y,f),t.makeTextStreamsForClosedCaptions(m),T.return(m);case 2:return Te(T),_(T,r.destroy(),7);case 7:je(T,0)}})},h.stop=function(){return Promise.resolve()},h.update=function(){},h.onExpirationUpdated=function(e,t){var n=this,i,r,l,c,f,y,m;return z(function(T){switch(T.g){case 1:return i=n.g,r=new hr,pe(T,2,3),_(T,r.init(),5);case 5:return _(T,Lv(r,i.zb(),i.Ta()),6);case 6:return l=T.h,_(T,l.getManifests([i.key()]),7);case 7:if(c=T.h,f=c[0],y=f.sessionIds.includes(e),m=f.expiration==null||f.expiration>t,!y||!m){T.s(3);break}return _(T,l.updateManifestExpiration(i.key(),t),3);case 3:return Te(T),_(T,r.destroy(),10);case 10:je(T,0);break;case 2:Me(T),T.s(3)}})},h.onInitialVariantChosen=function(){},h.banLocation=function(){},h.setMediaElement=function(){},cu("application/x-offline-manifest",function(){return new Gx});function Xx(){}function Yx(e,t){var n=hS(e);return n&&n.g=="manifest"?(e={uri:e,originalUri:e,data:new ArrayBuffer(0),headers:{"content-type":"application/x-offline-manifest"},originalRequest:t},e=Cr(e)):e=n&&n.g=="segment"?KD(n.key(),n,t):_l(new Y(2,1,9004,e)),e}function KD(e,t,n){var i=new hr;return Cr(void 0).Ha(function(){return i.init()}).Ha(function(){return Lv(i,t.zb(),t.Ta())}).Ha(function(r){return r.getSegments([t.key()])}).Ha(function(r){return{uri:t,data:r[0].data,headers:{},originalRequest:n}}).finally(function(){return i.destroy()})}Pe("shaka.offline.OfflineScheme",Xx),Xx.plugin=Yx,go("offline",Yx);function Wx(e,t,n){var i,r,l,c,f,y;return z(function(m){switch(m.g){case 1:i=[];for(var T=[],x=b(n),D=x.next();!D.done;D=x.next()){D=D.value;for(var R=!1,N=b(T),U=N.next();!U.done;U=N.next())if(U=U.value,FD(U.info,D)){U.sessionIds.push(D.sessionId),R=!0;break}R||T.push({info:D,sessionIds:[D.sessionId]})}r=b(T),l=r.next();case 2:if(l.done){m.s(4);break}return c=l.value,f=qD(e,t,c),_(m,f,5);case 5:y=m.h,i=i.concat(y),l=r.next(),m.s(2);break;case 4:return m.return(i)}})}function qD(e,t,n){var i,r;return z(function(l){switch(l.g){case 1:return i=new Wc({Xb:t,onError:function(){},pe:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),pe(l,2),i.configure(e),_(l,Th(i,n.info.keySystem,n.info.licenseUri,n.info.serverCertificate,n.info.audioCapabilities,n.info.videoCapabilities),4);case 4:Ue(l,3);break;case 2:return Me(l),_(l,i.destroy(),5);case 5:return l.return([]);case 3:return r=[],_(l,Promise.all(n.sessionIds.map(function(c){return z(function(f){if(f.g==1)return pe(f,2),_(f,Fg(i,c),4);if(f.g!=2)return r.push(c),Ue(f,0);Me(f),se(f)})})),6);case 6:return _(l,i.destroy(),7);case 7:return l.return(r)}})}function FD(e,t){function n(i,r){return i.robustness==r.robustness&&i.contentType==r.contentType}return e.keySystem==t.keySystem&&e.licenseUri==t.licenseUri&&Jp(e.audioCapabilities,t.audioCapabilities,n)&&Jp(e.videoCapabilities,t.videoCapabilities,n)}function zD(e,t,n){var i=t.presentationTimeline.getDuration();return t=Qx(t),{offlineUri:null,originalManifestUri:e,duration:i,size:0,expiration:1/0,tracks:t,appMetadata:n,isIncomplete:!1}}function yS(e,t){var n=zx(new Fx(e.zb(),e.Ta()),t),i=t.appMetadata||{};return n=Qx(n),{offlineUri:e.toString(),originalManifestUri:t.originalManifestUri,duration:t.duration,size:t.size,expiration:t.expiration,tracks:n,appMetadata:i,isIncomplete:t.isIncomplete||!1}}function Qx(e){var t=[],n=fd(e.variants);n=b(n);for(var i=n.next();!i.done;i=n.next())t.push(eu(i.value));for(e=b(e.textStreams),n=e.next();!n.done;n=e.next())t.push(Bn(n.value));return t}function GD(){this.g=new Map}function XD(e,t){var n=t.audio,i=t.video;if(n&&!i&&e.g.set(n.id,n.bandwidth||t.bandwidth),!n&&i&&e.g.set(i.id,i.bandwidth||t.bandwidth),n&&i){var r=n.bandwidth||393216,l=i.bandwidth||t.bandwidth-r;0>=l&&(l=t.bandwidth),e.g.set(n.id,r),e.g.set(i.id,l)}}function YD(e,t){e.g.set(t.id,t.bandwidth||2048)}function Jx(e,t){return e=e.g.get(t),e==null&&(e=0),e}function xi(e){var t=this;if(e&&e.constructor!=o)throw new Y(2,9,9008);this.g=this.h=null,e?(this.h=e.g,this.g=e.xb()):(this.h=ku(),this.g=new Xt),this.i=[],this.l=[];var n=!e;this.j=new Is(function(){var i,r,l,c,f;return z(function(y){switch(y.g){case 1:return _(y,Promise.all(t.l.map(function(m){return cS(m)})),2);case 2:for(i=function(){},r=[],l=b(t.i),c=l.next();!c.done;c=l.next())f=c.value,r.push(f.then(i,i));return _(y,Promise.all(r),3);case 3:if(!n){y.s(4);break}return _(y,t.g.destroy(),4);case 4:t.h=null,t.g=null,se(y)}})}),this.m=1e9}function gS(){if(oo())e:{for(var e=b(Fy.values()),t=e.next();!t.done;t=e.next())if(t=t.value,t=t()){t.destroy(),e=!0;break e}e=!1}else e=!1;return e}h=xi.prototype,h.destroy=function(){return this.j.destroy()},h.configure=function(e,t){return arguments.length==2&&typeof e=="string"&&(e=Iu(e,t)),ba(this.h,e)},h.getConfiguration=function(){var e=ku();return ba(e,this.h,ku()),e},h.xb=function(){return this.g},h.store=function(e,t,n,i,r){var l=this,c=this.getConfiguration(),f=new _x(this.g);return this.l.push(f),t=WD(this,e,t||{},i||[],r||[],function(){var y;return z(function(m){return m.g==1?n?m.s(2):_(m,Co(e,l.g,c.manifest.retryParameters),3):(m.g!=2&&(n=m.h),y=_s(e,n||null),m.return(y()))})},c,f),t=new yn(t,function(){return cS(f)}),t.finally(function(){_r(l.l,f)}),fO(this,t)};function WD(e,t,n,i,r,l,c,f){var y,m,T,x,D,R,N,U,L,j,V,X,G,Z,q,K,W,Q,oe,ne,re,le,fe,ye;return z(function(de){switch(de.g){case 1:return jv(),m=y=null,T=new hr,R=D=x=null,pe(de,2,3),_(de,l(),5);case 5:return y=de.h,_(de,rO(e,t,y,c),6);case 6:if(N=de.h,Gr(e),U=!N.presentationTimeline.U()&&!N.presentationTimeline.yc(),!U)throw new Y(2,9,9005,t);L=b(i),j=L.next();case 7:if(j.done){de.s(9);break}return V=j.value,_(de,oO(e,V,N),10);case 10:X=de.h,N.imageStreams.push(X),Gr(e),j=L.next(),de.s(7);break;case 9:G=b(r),Z=G.next();case 11:return Z.done?(Oh(c.drm.clearKeys,N.variants),W=N.variants.some(function(xe){if(xe.audio){for(var De=b(xe.audio.drmInfos),Je=De.next();!Je.done;Je=De.next())if(Je.value.licenseServerUri.startsWith("data:"))return!0}if(xe.video){for(xe=b(xe.video.drmInfos),De=xe.next();!De.done;De=xe.next())if(De.value.licenseServerUri.startsWith("data:"))return!0}return!1}),Q=c.offline.usePersistentLicense,W&&(Q=!1),_(de,e.Lc(N,function(xe){R=R||xe},c,Q),15)):(q=Z.value,_(de,lO(e,N,q.uri,q.language,q.kind,q.mime,q.codecs),14));case 14:K=de.h,N.textStreams.push(K),Gr(e),Z=G.next(),de.s(11);break;case 15:if(m=de.h,Gr(e),R)throw R;return _(de,JD(N,m,c,Q),16);case 16:return _(de,T.init(),17);case 17:return Gr(e),_(de,Vx(T),18);case 18:return x=de.h,Gr(e),oe=ZD(m,N,t,n,c,f,Q),ne=oe.Yi,re=oe.tg,_(de,x.Ta.addManifests([ne]),19);case 19:if(le=de.h,Gr(e),D=le[0],Gr(e),R)throw R;return _(de,QD(e,re,D,ne,f,c,x.Ta,N,m,Q),20);case 20:return Gr(e),tE(N,ne,m,Q),_(de,x.Ta.updateManifest(D,ne),21);case 21:return Gr(e),fe=new Na("manifest",x.path.zb,x.path.Ta,D),de.return(yS(fe,ne));case 3:return Te(de),_(de,T.destroy(),22);case 22:if(!y){de.s(23);break}return _(de,y.stop(),23);case 23:if(!m){de.s(25);break}return _(de,m.destroy(),25);case 25:je(de,0);break;case 2:if(ye=Me(de),D==null){de.s(27);break}return _(de,Zx(D),27);case 27:throw R||ye}})}function QD(e,t,n,i,r,l,c,f,y,m){var T,x,D,R,N,U,L,j,V,X,G;return z(function(Z){switch(Z.g){case 1:if(T={},x=0,D=function(){if(e.j.g||r.l)throw new Y(2,9,7001)},R=function(q,K){var W,Q,oe,ne,re,le,fe,ye,de;return z(function(xe){if(xe.g==1){for(W=b(q),Q=W.next(),oe={};!Q.done;oe={Nb:void 0},Q=W.next())oe.Nb=Q.value,D(),ne=ED(oe.Nb,l),re=oe.Nb.i,le=oe.Nb.h,fe=function(De){return function(Je){var Ve,Pt,Tt,ft;return z(function(gt){switch(gt.g){case 1:if(Ve=De.Nb.g,Pt=Ve.Ib(!1),!Ve.aesKey||Pt){gt.s(2);break}return _(gt,Gd(Je,Ve.aesKey,De.Nb.j),3);case 3:Je=gt.h;case 2:return Tt=sS(Ve),_(gt,c.addSegments([{data:Je}]),4);case 4:ft=gt.h,D(),T[Tt]=ft[0],x+=Je.byteLength,se(gt)}})}}(oe),ye=oe.Nb.g,(de=ye.Ib(!1))?bD(r,oe.Nb.groupId,de,re,le,fe):CD(r,oe.Nb.groupId,ne,re,le,fe);return _(xe,ID(r),2)}return D(),!K||r.l?xe.s(0):(tE(f,i,y,m),_(xe,c.updateManifest(n,i),0))})},N=!1,pe(Z,2),!mS(f)||!N||eE(f)){Z.s(4);break}return _(Z,R(t.filter(function(q){return q.h}),!0),5);case 5:return D(),t=t.filter(function(q){return!q.h}),U=T,L=x,T={},x=0,_(Z,$x(c,n,i,U,L,function(){return Gr(e)}),6);case 6:D();case 4:if(N){Z.s(7);break}return _(Z,R(t,!1),8);case 8:return D(),j=T,V=x,T={},x=0,_(Z,$x(c,n,i,j,V,function(){return D()}),9);case 9:D();case 7:Ue(Z,0);break;case 2:return X=Me(Z),G=Object.values(T),_(Z,c.removeSegments(G,function(){}),10);case 10:throw X}})}function Zx(e){var t,n,i,r;return z(function(l){switch(l.g){case 1:return t=new hr,_(l,t.init(),2);case 2:return _(l,Vx(t),3);case 3:return n=l.h,i=new Na("manifest",n.path.zb,n.path.Ta,e),_(l,t.destroy(),4);case 4:return r=new xi,_(l,r.remove(i.toString()),0)}})}function $x(e,t,n,i,r,l){var c,f,y,m,T,x,D,R,N,U,L;return z(function(j){switch(j.g){case 1:for(c=!1,pe(j,2),f=!0,y=b(n.streams),m=y.next();!m.done;m=y.next())for(T=m.value,x=b(T.segments),D=x.next();!D.done;D=x.next())R=D.value,N=R.pendingSegmentRefId?i[R.pendingSegmentRefId]:null,N!=null&&(R.dataKey=N,R.pendingSegmentRefId=void 0),N=R.pendingInitSegmentRefId?i[R.pendingInitSegmentRefId]:null,N!=null&&(R.initSegmentKey=N,R.pendingInitSegmentRefId=void 0),R.pendingSegmentRefId&&(f=!1),R.pendingInitSegmentRefId&&(f=!1);return n.size+=r,f&&(n.isIncomplete=!1),_(j,e.updateManifest(t,n),4);case 4:c=!0,l(),Ue(j,0);break;case 2:return U=Me(j),_(j,Zx(t),5);case 5:if(c){j.s(6);break}return L=Object.values(i),_(j,e.removeSegments(L,function(){}),6);case 6:throw U}})}function JD(e,t,n,i){var r,l,c,f,y,m,T,x,D,R,N,U,L,j,V,X,G,Z,q,K,W,Q,oe,ne,re,le,fe,ye,de,xe;return z(function(De){switch(De.g){case 1:return r={width:1/0,height:1/0},ph(e,n.restrictions,r),_(De,Pl(t,e,i,n.drm.preferredKeySystems,n.drm.keySystemsMapping),2);case 2:for(l=[],c=n.preferredDecodingAttributes,f=n.preferredVideoCodecs,y=n.preferredAudioCodecs,m=n.preferredTextFormats,dh(e,f,y,c,m),T=b(e.variants),x=T.next();!x.done;x=T.next())D=x.value,l.push(eu(D));for(R=b(e.textStreams),N=R.next();!N.done;N=R.next())U=N.value,l.push(Bn(U));for(L=b(e.imageStreams),j=L.next();!j.done;j=L.next())V=j.value,l.push(qc(V));return _(De,n.offline.trackSelectionCallback(l),3);case 3:for(X=De.h,G=e.presentationTimeline.getDuration(),Z=0,q=b(X),K=q.next();!K.done;K=q.next())W=K.value,Q=W.bandwidth*G/8,Z+=Q;return pe(De,4),_(De,n.offline.downloadSizeCallback(Z),6);case 6:if(oe=De.h,!oe)throw new Y(2,9,9014);Ue(De,5);break;case 4:throw ne=Me(De),ne instanceof Y?ne:new Y(2,9,9015);case 5:for(re=new Set,le=new Set,fe=new Set,ye=b(X),de=ye.next();!de.done;de=ye.next())xe=de.value,xe.type=="variant"&&re.add(xe.id),xe.type=="text"&&le.add(xe.id),xe.type=="image"&&fe.add(xe.id);e.variants=e.variants.filter(function(Je){return re.has(Je.id)}),e.textStreams=e.textStreams.filter(function(Je){return le.has(Je.id)}),e.imageStreams=e.imageStreams.filter(function(Je){return fe.has(Je.id)}),hO(e),se(De)}})}function ZD(e,t,n,i,r,l,c){var f=zD(n,t,i),y=r.offline.progressCallback;AD(l,function(N,U){f.size=U,y(f,N)},function(N,U){m&&c&&T==U&&Ds(e,"cenc",N)});var m=mS(t)&&!eE(t),T=null;m&&(T=yO.get(e.h.keySystem));for(var x=new GD,D=b(t.textStreams),R=D.next();!R.done;R=D.next())x.g.set(R.value.id,52);for(D=b(t.imageStreams),R=D.next();!R.done;R=D.next())YD(x,R.value);for(D=b(t.variants),R=D.next();!R.done;R=D.next())XD(x,R.value);return l=uO(l,x,t,r),r=l.streams,l=l.tg,(x=e.h)&&c&&(x.initData=[]),{Yi:{creationTime:Date.now(),originalManifestUri:n,duration:t.presentationTimeline.getDuration(),size:0,expiration:e.pd(),streams:r,sessionIds:c?Eh(e):[],drmInfo:x,appMetadata:i,isIncomplete:!0,sequenceMode:t.sequenceMode,type:t.type},tg:l}}function mS(e){return e.variants.some(function(t){var n=t.audio&&t.audio.encrypted;return t.video&&t.video.encrypted||n})}function eE(e){return e.variants.some(function(t){return(t.video?t.video.drmInfos:[]).concat(t.audio?t.audio.drmInfos:[]).some(function(n){return n.initData&&n.initData.length})})}function tE(e,t,n,i){if(t.expiration=n.pd(),n=Eh(n),t.sessionIds=i?n:[],mS(e)&&i&&!n.length)throw new Y(2,9,9007)}h.remove=function(e){return vS(this,$D(this,e))};function $D(e,t){var n,i,r,l,c,f;return z(function(y){switch(y.g){case 1:if(jv(),n=hS(t),n==null||n.g!="manifest")throw new Y(2,9,9004,t);return i=n,r=new hr,rt(y,2),_(y,r.init(),4);case 4:return _(y,Lv(r,i.zb(),i.Ta()),5);case 5:return l=y.h,_(y,l.getManifests([i.key()]),6);case 6:return c=y.h,f=c[0],_(y,Promise.all([eO(e,f,r),tO(l,i,f)]),2);case 2:return Te(y),_(y,r.destroy(),8);case 8:je(y,0)}})}function nE(e,t){for(var n=[],i=b(e.streams),r=i.next();!r.done;r=i.next())r=r.value,t&&r.type=="video"?n.push({contentType:hn(r.mimeType,r.codecs),robustness:e.drmInfo.videoRobustness}):t||r.type!="audio"||n.push({contentType:hn(r.mimeType,r.codecs),robustness:e.drmInfo.audioRobustness});return n}function eO(e,t,n){return z(function(i){return _(i,pO(e.g,e.h.drm,n,t),0)})}function tO(e,t,n){function i(){}var r=dO(n);return yS(t,n),Promise.all([e.removeSegments(r,i),e.removeManifests([t.key()],i)])}h.qj=function(){return vS(this,nO(this))};function nO(e){var t,n,i,r,l,c,f,y,m,T;return z(function(x){switch(x.g){case 1:return jv(),t=e.g,n=e.h.drm,i=new hr,r=!1,rt(x,2),_(x,i.init(),4);case 4:l=[],RD(i,function(D){return l.push(D)}),c=b(l),f=c.next();case 5:if(f.done){x.s(2);break}return y=f.value,_(x,y.getAll(),8);case 8:return m=x.h,_(x,Wx(n,t,m),9);case 9:return T=x.h,_(x,y.remove(T),10);case 10:T.length!=m.length&&(r=!0),f=c.next(),x.s(5);break;case 2:return Te(x),_(x,i.destroy(),11);case 11:je(x,3);break;case 3:return x.return(!r)}})}h.list=function(){return vS(this,iO())};function iO(){var e,t,n;return z(function(i){switch(i.g){case 1:return jv(),e=[],t=new hr,rt(i,2),_(i,t.init(),4);case 4:return n=Promise.resolve(),kD(t,function(r,l){n=n.then(function(){var c;return z(function(f){if(f.g==1)return _(f,l.getAllManifests(),2);c=f.h,c.forEach(function(y,m){y=yS(new Na("manifest",r.zb,r.Ta,m),y),e.push(y)}),se(f)})})}),_(i,n,2);case 2:return Te(i),_(i,t.destroy(),6);case 6:je(i,3);break;case 3:return i.return(e)}})}function rO(e,t,n,i){var r,l,c,f,y;return z(function(m){if(m.g==1)return r=null,l=e.g,c={networkingEngine:l,filter:function(){return Promise.resolve()},makeTextStreamsForClosedCaptions:function(){},onTimelineRegionAdded:function(){},onEvent:function(){},onError:function(T){r=T},isLowLatencyMode:function(){return!1},updateDuration:function(){},newDrmInfo:function(){},onManifestUpdated:function(){},getBandwidthEstimate:function(){return i.abr.defaultBandwidthEstimate},onMetadata:function(){},disableStream:function(){},addFont:function(){}},n.configure(i.manifest),Gr(e),_(m,n.start(t,c),2);if(m.g!=3)return f=m.h,Gr(e),y=rE(f),_(m,Promise.all(Xc(y,function(T){return T.createSegmentIndex()})),3);if(Gr(e),r)throw r;return m.return(f)})}function oO(e,t,n){var i,r,l,c,f,y,m,T,x,D,R,N,U,L,j;return z(function(V){switch(V.g){case 1:return _(V,iE(e,t),2);case 2:if(i=V.h,i!="text/vtt")throw new Y(1,2,2017,t);return _(V,aO(t,e.g,e.h.streaming.retryParameters),3);case 3:if(r=V.h,l=Il(i),!l)throw new Y(2,2,2014,i);for(c=l(),f={periodStart:0,segmentStart:0,segmentEnd:n.presentationTimeline.getDuration(),vttOffset:0},y=Ze(r),m=c.parseMedia(y,f,t,[]),T=[],x=b(m),D=x.next(),R={};!D.done;R={Me:void 0,Nc:void 0},D=x.next())R.Nc=D.value,R.Me=null,N=function(X){return function(){return X.Me==null&&(X.Me=_n([t],[X.Nc.payload])),X.Me||[]}}(R),U=new qe(R.Nc.startTime,R.Nc.endTime,N,0,null,null,0,0,1/0),R.Nc.payload.includes("#xywh")&&(L=R.Nc.payload.split("#xywh=")[1].split(","),L.length===4&&U.De({height:parseInt(L[3],10),positionX:parseInt(L[0],10),positionY:parseInt(L[1],10),width:parseInt(L[2],10)})),T.push(U);if(j=i,!T.length){V.s(4);break}return _(V,Co(T[0].N()[0],e.g,e.h.manifest.retryParameters),5);case 5:j=V.h;case 4:return V.return({id:e.m++,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new Dt(T),mimeType:j||"",codecs:"",kind:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:"und",originalLanguage:null,label:null,type:"image",primary:!1,trickModeVideo:null,dependencyStream:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,tilesLayout:"1x1",accessibilityPurpose:null,external:!0,fastSwitching:!1,fullMimeTypes:new Set([hn(j||"","")]),isAudioMuxedInVideo:!1,baseOriginalId:null})}})}function lO(e,t,n,i,r,l,c){var f,y,m;return z(function(T){if(T.g==1)return l?T.s(2):_(T,iE(e,n),3);if(T.g!=2&&(l=T.h),f={id:e.m++,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:yf(0,t.presentationTimeline.getDuration(),[n]),mimeType:l||"",codecs:c||"",kind:r,encrypted:!1,drmInfos:[],keyIds:new Set,language:i,originalLanguage:i,label:null,type:at,primary:!1,trickModeVideo:null,dependencyStream:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!0,fastSwitching:!1,fullMimeTypes:new Set([hn(l||"",c||"")]),isAudioMuxedInVideo:!1,baseOriginalId:null},y=hn(f.mimeType,f.codecs),m=Dl(y),!m)throw new Y(2,2,2014,l);return T.return(f)})}function iE(e,t){var n;return z(function(i){switch(i.g){case 1:return pe(i,2),_(i,Co(t,e.g,e.h.streaming.retryParameters),4);case 4:n=i.h,Ue(i,3);break;case 2:Me(i);case 3:if(n)return i.return(n);throw new Y(1,2,2011,t)}})}function aO(e,t,n){var i,r,l;return z(function(c){return c.g==1?(i=Wi,r=cn([e],n),r.method="GET",_(c,t.request(i,r).promise,2)):(l=c.h,c.return(l.data))})}h.Lc=function(e,t,n,i){var r=this,l;return z(function(c){return c.g==1?(l=new Wc({Xb:r.g,onError:t,pe:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),l.configure(n.drm),_(c,Vg(l,e.variants,i),2)):c.g!=3?_(c,Ed(l),3):c.return(l)})};function uO(e,t,n,i){var r=new Map,l=rE(n),c=new Map;l=b(l);for(var f=l.next();!f.done;f=l.next()){f=f.value;var y=sO(e,t,n,f,i,r);c.set(f.id,y)}for(e=b(n.variants),t=e.next();!t.done;t=e.next())t=t.value,t.audio&&c.get(t.audio.id).variantIds.push(t.id),t.video&&c.get(t.video.id).variantIds.push(t.id);return{streams:Array.from(c.values()),tg:Array.from(r.values())}}function sO(e,t,n,i,r,l){var c={id:i.id,originalId:i.originalId,groupId:i.groupId,primary:i.primary,type:i.type,mimeType:i.mimeType,codecs:i.codecs,frameRate:i.frameRate,pixelAspectRatio:i.pixelAspectRatio,hdr:i.hdr,colorGamut:i.colorGamut,videoLayout:i.videoLayout,kind:i.kind,language:i.language,originalLanguage:i.originalLanguage,label:i.label,width:i.width||null,height:i.height||null,encrypted:i.encrypted,keyIds:i.keyIds,segments:[],variantIds:[],roles:i.roles,forced:i.forced,channelsCount:i.channelsCount,audioSamplingRate:i.audioSamplingRate,spatialAudio:i.spatialAudio,closedCaptions:i.closedCaptions,tilesLayout:i.tilesLayout,mssPrivateData:i.mssPrivateData,external:i.external,fastSwitching:i.fastSwitching,isAudioMuxedInVideo:i.isAudioMuxedInVideo},f=r.offline.numberOfParallelDownloads,y=f===0?i.id:0;return cO(i,n.presentationTimeline.pb(),function(m,T){var x=sS(m),D=void 0;if(!l.has(x)){var R=m.endTime-m.startTime;R=Jx(t,i.id)*R,R=Px(e.g,R),l.set(x,new Mx(m,R,y,!1,T))}m.Y&&(D=sS(m.Y),l.has(D)||(R=.5*Jx(t,i.id),R=Px(e.g,R),l.set(D,new Mx(m.Y,R,y,!0,T)))),c.segments.push({pendingInitSegmentRefId:D,initSegmentKey:D?0:null,startTime:m.startTime,endTime:m.endTime,appendWindowStart:m.appendWindowStart,appendWindowEnd:m.appendWindowEnd,timestampOffset:m.timestampOffset,tilesLayout:m.tilesLayout,pendingSegmentRefId:x,dataKey:0,mimeType:m.mimeType,codecs:m.codecs,thumbnailSprite:m.thumbnailSprite}),f!==0&&(y=(y+1)%f)}),c}function cO(e,t,n){if(t=e.segmentIndex.find(t),t!=null)for(var i=e.segmentIndex.get(t);i;)n(i,t),i=e.segmentIndex.get(++t)}function Gr(e){if(e.j.g)throw new Y(2,9,7001)}function jv(){if(!gS())throw new Y(2,9,9e3)}function vS(e,t){return z(function(n){return n.g==1?(e.i.push(t),rt(n,2),_(n,t,4)):n.g!=2?n.return(n.h):(Te(n),_r(e.i,t),je(n,0))})}function fO(e,t){var n=t.promise;return e.i.push(n),t.finally(function(){_r(e.i,n)})}function dO(e){var t=new Set;e=b(e.streams);for(var n=e.next();!n.done;n=e.next()){n=b(n.value.segments);for(var i=n.next();!i.done;i=n.next())i=i.value,i.initSegmentKey!=null&&t.add(i.initSegmentKey),t.add(i.dataKey)}return Array.from(t)}function pO(e,t,n,i){var r,l,c;return z(function(f){return f.g==1?i.drmInfo?(r=MD(n),l=i.sessionIds.map(function(y){return{sessionId:y,keySystem:i.drmInfo.keySystem,licenseUri:i.drmInfo.licenseServerUri,serverCertificate:i.drmInfo.serverCertificate,audioCapabilities:nE(i,!1),videoCapabilities:nE(i,!0)}}),_(f,Wx(t,e,l),2)):f.return():f.g!=3?(c=f.h,_(f,r.remove(c),3)):_(f,r.add(l.filter(function(y){return!c.includes(y.sessionId)})),0)})}function rE(e){for(var t=new Set,n=b(e.variants),i=n.next();!i.done;i=n.next())i=i.value,i.audio&&t.add(i.audio),i.video&&t.add(i.video);for(n=b(e.textStreams),i=n.next();!i.done;i=n.next())t.add(i.value);for(e=b(e.imageStreams),n=e.next();!n.done;n=e.next())t.add(n.value);return t}function hO(e){e.variants.map(function(l){return l.video});var t=new Set(e.variants.map(function(l){return l.audio}));e=e.textStreams;for(var n=b(t),i=n.next();!i.done;i=n.next()){i=b(t);for(var r=i.next();!r.done;r=i.next());}for(t=b(e),n=t.next();!n.done;n=t.next())for(n=b(e),i=n.next();!i.done;i=n.next());}Pe("shaka.offline.Storage",xi),xi.deleteAll=function(){var e;return z(function(t){return t.g==1?(e=new hr,rt(t,2),_(t,ND(e),2)):t.g!=5?(Te(t),_(t,e.destroy(),5)):je(t,0)})},xi.prototype.list=xi.prototype.list,xi.prototype.removeEmeSessions=xi.prototype.qj,xi.prototype.remove=xi.prototype.remove,xi.prototype.store=xi.prototype.store,xi.prototype.getNetworkingEngine=xi.prototype.xb,xi.prototype.getConfiguration=xi.prototype.getConfiguration,xi.prototype.configure=xi.prototype.configure,xi.prototype.destroy=xi.prototype.destroy,xi.support=gS;var yO=new Map().set("org.w3.clearkey","1077efecc0b24d02ace33c1e52e2fb4b").set("com.widevine.alpha","edef8ba979d64acea3c827dcd51d21ed").set("com.microsoft.playready","9a04f07998404286ab92e65be0885f95").set("com.microsoft.playready.recommendation","9a04f07998404286ab92e65be0885f95").set("com.microsoft.playready.software","9a04f07998404286ab92e65be0885f95").set("com.microsoft.playready.hardware","9a04f07998404286ab92e65be0885f95").set("com.huawei.wiseplay","3d5e6d359b9a41e8b843dd3c6e72c42c");C("offline",gS);function Ki(){}function yr(e,t){for(e={priority:t||0,callback:e},t=0;t<Gy.length;t++)if(Gy[t].priority<e.priority){Gy.splice(t,0,e);return}Gy.push(e)}Pe("shaka.polyfill",Ki),Ki.register=yr,Ki.installAll=function(){for(var e=b(Gy),t=e.next();!t.done;t=e.next()){t=t.value;try{t.callback()}catch(n){bt("Error installing polyfill!",n)}}};var Gy=[];function oE(){}function lE(){if(!Object.getOwnPropertyDescriptor(Element.prototype,"ariaHidden"))for(var e=b(["ariaHidden","ariaLabel","ariaPressed","ariaSelected"]),t=e.next();!t.done;t=e.next())gO(t.value)}function gO(e){var t="aria-"+e.toLowerCase().replace(/^aria/,"");Object.defineProperty(Element.prototype,e,{get:function(){return this.getAttribute(t)},set:function(n){n==null||n==null?this.removeAttribute(t):this.setAttribute(t,n)}})}Ki.Aria=oE,oE.install=lE,yr(lE);function aE(){}function uE(){Gn()||zt("Sky_STB")||TA()}Ki.EncryptionScheme=aE,aE.install=uE,yr(uE,-2);function sE(){}function cE(){if(w.Document){var e=Element.prototype;e.requestFullscreen=e.requestFullscreen||e.mozRequestFullScreen||e.msRequestFullscreen||e.webkitRequestFullscreen,e=Document.prototype,e.exitFullscreen=e.exitFullscreen||e.mozCancelFullScreen||e.msExitFullscreen||e.webkitCancelFullScreen,"fullscreenElement"in document||(Object.defineProperty(document,"fullscreenElement",{get:function(){return document.mozFullScreenElement||document.msFullscreenElement||document.webkitCurrentFullScreenElement||document.webkitFullscreenElement}}),Object.defineProperty(document,"fullscreenEnabled",{get:function(){return document.mozFullScreenEnabled||document.msFullscreenEnabled||document.webkitFullscreenEnabled}})),document.addEventListener("webkitfullscreenchange",Ep),document.addEventListener("webkitfullscreenerror",Ep),document.addEventListener("mozfullscreenchange",Ep),document.addEventListener("mozfullscreenerror",Ep),document.addEventListener("MSFullscreenChange",Ep),document.addEventListener("MSFullscreenError",Ep)}}function Ep(e){var t=e.type.replace(/^(webkit|moz|MS)/,"").toLowerCase(),n=document.createEvent("Event");n.initEvent(t,e.bubbles,e.cancelable),e.target.dispatchEvent(n)}Ki.Fullscreen=sE,sE.install=cE,yr(cE);function SS(){}function fE(){var e=!0;(ir()&&!yl()&&!es()||oi()||Ha()||Gn()||jo()||di()||Oc()||oa()&&!oi())&&(e=!1),e&&navigator.mediaCapabilities||(navigator.mediaCapabilities||(navigator.mediaCapabilities={}),dE=navigator.mediaCapabilities,navigator.mediaCapabilities.decodingInfo=mO)}function mO(e){var t,n,i,r,l,c,f,y,m,T,x;return z(function(D){switch(D.g){case 1:if(t={supported:!1,powerEfficient:!0,smooth:!0,keySystemAccess:null,configuration:e},n=e.video,i=e.audio,e.type!="media-source"){if(e.type=="file"){if(n&&(r=n.contentType,l=Dc(r),!l)||i&&(c=i.contentType,f=Dc(c),!f))return D.return(t)}else return D.return(t);D.s(2);break}if(!oo())return D.return(t);if(!n){D.s(3);break}return _(D,vO(n),4);case 4:if(y=D.h,!y)return D.return(t);case 3:if(i){var R=i.contentType;if(ir()&&i.spatialRendering&&(R+="; spatialRendering=true"),m=Un(R),!m)return D.return(t)}case 2:return e.keySystemConfiguration?(T=e.keySystemConfiguration,_(D,SO(n,i,T),6)):(t.supported=!0,D.return(t));case 6:(x=D.h)&&(t.supported=!0,t.keySystemAccess=x);case 5:return D.return(t)}})}function vO(e){var t,n;return z(function(i){return i.g==1?ir()?_(i,wO(e),3):di()?(t=e.contentType,e.width&&e.height&&(t+="; width="+e.width,t+="; height="+e.height),e.framerate&&(t+="; framerate="+e.framerate),e.bitrate&&(t+="; bitrate="+e.bitrate),i.return(Un(t))):i.s(2):i.g!=2?(n=i.h,i.return(n)):i.return(Un(e.contentType))})}function SO(e,t,n){var i,r,l,c,f,y,m,T,x,D,R;return z(function(N){switch(N.g){case 1:if(i=[],r=[],n.audio&&(l={robustness:n.audio.robustness||"",contentType:t.contentType},di()&&t.contentType.includes('codecs="ac-3"')&&(l.contentType='audio/mp4; codecs="ec-3"'),n.audio.encryptionScheme&&(l.encryptionScheme=n.audio.encryptionScheme),i.push(l)),n.video&&(c={robustness:n.video.robustness||"",contentType:e.contentType},n.video.encryptionScheme&&(c.encryptionScheme=n.video.encryptionScheme),r.push(c)),f={initDataTypes:[n.initDataType],distinctiveIdentifier:n.distinctiveIdentifier,persistentState:n.persistentState,sessionTypes:n.sessionTypes},i.length&&(f.audioCapabilities=i),r.length&&(f.videoCapabilities=r),y=e?e.contentType:"",m=t?t.contentType:"",T=Ri(y)+";"+li(y),x=Ri(m)+";"+li(m),D=n.keySystem,R=null,pe(N,2),ro.has(T+"#"+x+"#"+D)){R=ro.get(T+"#"+x+"#"+D)||null,N.s(4);break}return _(N,navigator.requestMediaKeySystemAccess(n.keySystem,[f]),5);case 5:R=N.h,ro.set(T+"#"+x+"#"+D,R);case 4:Ue(N,3);break;case 2:Me(N);case 3:return N.return(R)}})}function wO(e){var t,n,i,r,l;return z(function(c){if(c.g==1){if(!(w.cast&&cast.__platform__&&cast.__platform__.canDisplayType))return c.return(Un(e.contentType));switch(t=e.contentType,e.width&&e.height&&1280<e.width&&720<e.height&&(t+="; width="+e.width+"; height="+e.height),e.framerate&&(n=Math.round(e.framerate),24>n||30<n)&&(t+="; framerate="+e.framerate),i=e.transferFunction||"",i){case"":case"srgb":break;case"pq":t+="; eotf=smpte2084";break;case"hlg":t+="; eotf=arib-std-b67";break;default:return c.return(!1)}return r=!1,l=TO,l.has(t)?(r=l.get(t),c.s(2)):_(c,cast.__platform__.canDisplayType(t),3)}return c.g!=2&&(r=c.h,l.set(t,r)),c.return(r)})}Ki.MediaCapabilities=SS,SS.install=fE;var dE=null;SS.originalMcap=dE;var TO=new Map;yr(fE,-1);function pE(){}function hE(){var e=Eg();(w.MediaSource||w.ManagedMediaSource)&&(e&&w.MediaSource?12>=e?(wS(),yE()):15>=e&&wS():zt("DT_STB_BCM")?(wS(),yE()):(zt("Tizen 2")||lo()||zt("Tizen 4"))&&EO()),(w.MediaSource||w.ManagedMediaSource)&&xO(),w.MediaSource&&MediaSource.isTypeSupported('video/webm; codecs="vp9"')&&!MediaSource.isTypeSupported('video/webm; codecs="vp09.00.10.08"')&&AO()}function wS(){var e=MediaSource.prototype.addSourceBuffer;MediaSource.prototype.addSourceBuffer=function(){var t=e.apply(this,Et.apply(0,arguments));return t.abort=function(){},t}}function yE(){var e=SourceBuffer.prototype.remove;SourceBuffer.prototype.remove=function(t,n){return e.call(this,t,n-.001)}}function xO(){if(w.MediaSource){var e=MediaSource.isTypeSupported.bind(MediaSource);MediaSource.isTypeSupported=function(n){return bl(n)!="mp2t"&&e(n)}}if(w.ManagedMediaSource){var t=ManagedMediaSource.isTypeSupported.bind(ManagedMediaSource);w.ManagedMediaSource.isTypeSupported=function(n){return bl(n)!="mp2t"&&t(n)}}}function EO(){var e=MediaSource.isTypeSupported.bind(MediaSource);if(MediaSource.isTypeSupported=function(n){return li(n)!="opus"&&e(n)},w.ManagedMediaSource){var t=ManagedMediaSource.isTypeSupported.bind(ManagedMediaSource);w.ManagedMediaSource.isTypeSupported=function(n){return li(n)!="opus"&&t(n)}}}function AO(){var e=MediaSource.isTypeSupported;jo()||(MediaSource.isTypeSupported=function(t){var n=t.split(/ *; */),i=n.findIndex(function(c){return c.startsWith("codecs=")});if(0>i)return e(t);var r=n[i].replace("codecs=","").replace(/"/g,"").split(/\s*,\s*/),l=r.findIndex(function(c){return c.startsWith("vp09")});return 0<=l&&(r[l]="vp9",n[i]='codecs="'+r.join(",")+'"',t=n.join("; ")),e(t)})}Ki.MediaSource=pE,pE.install=hE,yr(hE);function gE(){}function mE(){screen.orientation&&screen.orientation.unlock||(screen.orientation!=null?CO():w.orientation!=null&&bO())}function CO(){screen.orientation.lock===void 0&&(screen.orientation.lock=function(){return Promise.resolve()}),screen.orientation.unlock===void 0&&(screen.orientation.unlock=function(){})}function bO(){function e(){switch(w.orientation){case-90:t.type="landscape-secondary",t.angle=270;break;case 0:t.type="portrait-primary",t.angle=0;break;case 90:t.type="landscape-primary",t.angle=90;break;case 180:t.type="portrait-secondary",t.angle=180}}var t=new Bv;screen.orientation=t,e(),w.addEventListener("orientationchange",function(){e();var n=new ke("change");t.dispatchEvent(n)})}Ki.Orientation=gE,gE.install=mE;function Bv(){Ut.call(this),this.type="",this.angle=0}ot(Bv,Ut),Bv.prototype.lock=function(e){function t(i){return screen.lockOrientation?screen.lockOrientation(i):screen.mozLockOrientation?screen.mozLockOrientation(i):screen.msLockOrientation?screen.msLockOrientation(i):!1}var n=!1;switch(e){case"natural":n=t("default");break;case"any":n=!0,this.unlock();break;default:n=t(e)}return n?Promise.resolve():(e=Error("screen.orientation.lock() is not available on this device"),e.name="NotSupportedError",e.code=DOMException.NOT_SUPPORTED_ERR,Promise.reject(e))},Bv.prototype.unlock=function(){screen.unlockOrientation?screen.unlockOrientation():screen.mozUnlockOrientation?screen.mozUnlockOrientation():screen.msUnlockOrientation&&screen.msUnlockOrientation()},yr(mE);function TS(){}var xS,ES,AS,CS,bS,IS;function vE(e){w.HTMLVideoElement&&w.WebKitMediaKeys&&(e!==void 0&&e&&(xS=!0,ES=Object.getOwnPropertyDescriptor(HTMLMediaElement.prototype,"mediaKeys"),AS=HTMLMediaElement.prototype.setMediaKeys,CS=w.MediaKeys,bS=w.MediaKeySystemAccess,IS=navigator.requestMediaKeySystemAccess),delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=DO,w.MediaKeys=Xy,w.MediaKeySystemAccess=Vv,navigator.requestMediaKeySystemAccess=IO,w.shakaMediaKeysPolyfill=kO,ru.clear(),ro.clear())}function IO(e,t){try{var n=new Vv(e,t);return Promise.resolve(n)}catch(i){return Promise.reject(i)}}function DO(e){var t=this.mediaKeys;return t&&t!=e&&SE(t,null),delete this.mediaKeys,(this.mediaKeys=e)?SE(e,this):Promise.resolve()}function OO(e){if(e=Ze(e.initData),Ei(e).getUint32(0,!0)+4!=e.byteLength)throw new RangeError("Malformed FairPlay init data");e=gl(e.subarray(4),!0),e=Pr(e);var t=new Event("encrypted");t.initDataType="skd",t.initData=Sr(e),this.dispatchEvent(t)}Ki.PatchedMediaKeysApple=TS,TS.uninstall=function(){xS&&(xS=!1,Object.defineProperty(HTMLMediaElement.prototype,"mediaKeys",ES),HTMLMediaElement.prototype.setMediaKeys=AS,w.MediaKeys=CS,w.MediaKeySystemAccess=bS,navigator.requestMediaKeySystemAccess=IS,ES=IS=AS=bS=CS=null,w.shakaMediaKeysPolyfill="",ru.clear(),ro.clear())},TS.install=vE;function Vv(e,t){if(this.keySystem=e,e.startsWith("com.apple.fps"))for(e=b(t),t=e.next();!t.done;t=e.next()){var n=t.value;if(n.persistentState=="required")t=null;else{t={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:n.initDataTypes,sessionTypes:["temporary"],label:n.label};var i=!1,r=!1;if(n.audioCapabilities)for(var l=b(n.audioCapabilities),c=l.next();!c.done;c=l.next())c=c.value,c.contentType&&(i=!0,WebKitMediaKeys.isTypeSupported(this.keySystem,c.contentType.split(";")[0])&&(t.audioCapabilities.push(c),r=!0));if(n.videoCapabilities)for(n=b(n.videoCapabilities),l=n.next();!l.done;l=n.next())l=l.value,l.contentType&&(i=!0,WebKitMediaKeys.isTypeSupported(this.keySystem,l.contentType.split(";")[0])&&(t.videoCapabilities.push(l),r=!0));i||(r=WebKitMediaKeys.isTypeSupported(this.keySystem,"video/mp4")),t=r?t:null}if(t){this.g=t;return}}throw e=Error("Unsupported keySystem"),e.name="NotSupportedError",e.code=DOMException.NOT_SUPPORTED_ERR,e}Vv.prototype.createMediaKeys=function(){var e=new Xy(this.keySystem);return Promise.resolve(e)},Vv.prototype.getConfiguration=function(){return this.g};function Xy(e){this.h=new WebKitMediaKeys(e),this.g=new vt}Xy.prototype.createSession=function(e){if(e=e||"temporary",e!="temporary")throw new TypeError("Session type "+e+" is unsupported on this platform.");return new DS(this.h)},Xy.prototype.setServerCertificate=function(){return Promise.resolve(!1)};function SE(e,t){if(e.g.Qa(),!t)return Promise.resolve();e.g.D(t,"webkitneedkey",OO);try{return vi(t,HTMLMediaElement.HAVE_METADATA,e.g,function(){t.webkitSetMediaKeys(e.h)}),Promise.resolve()}catch(n){return Promise.reject(n)}}Xy.prototype.getStatusForPolicy=function(){return Promise.resolve("usable")};function DS(e){Ut.call(this),this.i=null,this.l=e,this.g=this.h=null,this.j=new vt,this.sessionId="",this.expiration=NaN,this.closed=new kt,this.keyStatuses=new wE}ot(DS,Ut),h=DS.prototype,h.generateRequest=function(e,t){var n=this;this.h=new kt;try{var i=this.l.createSession("video/mp4",Ze(t));this.i=i,this.sessionId=i.sessionId||"",this.j.D(this.i,"webkitkeymessage",function(r){n.h&&(n.h.resolve(),n.h=null),r=new Map().set("messageType",n.keyStatuses.dc()==null?"license-request":"license-renewal").set("message",Sr(r.message)),r=new ke("message",r),n.dispatchEvent(r)}),this.j.D(i,"webkitkeyadded",function(){n.g&&(Hv(n,"usable"),n.g.resolve(),n.g=null)}),this.j.D(i,"webkitkeyerror",function(){var r=Error("EME PatchedMediaKeysApple key error");if(r.errorCode=n.i.error,n.h!=null)n.h.reject(r),n.h=null;else if(n.g!=null)n.g.reject(r),n.g=null;else switch(n.i.error.code){case WebKitMediaKeyError.MEDIA_KEYERR_OUTPUT:case WebKitMediaKeyError.MEDIA_KEYERR_HARDWARECHANGE:Hv(n,"output-not-allowed");break;default:Hv(n,"internal-error")}}),Hv(this,"status-pending")}catch(r){this.h.reject(r)}return this.h},h.load=function(){return Promise.reject(Error("MediaKeySession.load not yet supported"))},h.update=function(e){this.g=new kt;try{this.i.update(Ze(e))}catch(t){this.g.reject(t)}return this.g},h.close=function(){try{this.i.close(),this.closed.resolve(),this.j.Qa()}catch(e){this.closed.reject(e)}return this.closed},h.remove=function(){return Promise.reject(Error("MediaKeySession.remove is only applicable for persistent licenses, which are not supported on this platform"))};function Hv(e,t){var n=e.keyStatuses;n.size=t==null?0:1,n.g=t,t=new ke("keystatuseschange"),e.dispatchEvent(t)}function wE(){this.size=0,this.g=void 0}h=wE.prototype,h.dc=function(){return this.g},h.forEach=function(e){this.g&&e(this.g,Uo.value())},h.get=function(e){if(this.has(e))return this.g},h.has=function(e){var t=Uo.value();return!!(this.g&&dl(e,t))},h.entries=function(){},h.keys=function(){},h.values=function(){};var kO="apple";yr(function(){w.HTMLVideoElement&&w.WebKitMediaKeys&&(navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||vE())});function TE(){}function xE(){w.MediaKeys&&(!MediaKeys.prototype.setServerCertificate||lo()||zt("Tizen 4")||zt("Tizen 5.0")||hl())&&(MediaKeys.prototype.setServerCertificate=RO)}function RO(){return Promise.resolve(!1)}Ki.PatchedMediaKeysCert=TE,TE.install=xE,yr(xE);function EE(){}function AE(){if(!(!w.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration)){if(HTMLMediaElement.prototype.webkitGenerateKeyRequest)NS="webkit";else if(!HTMLMediaElement.prototype.generateKeyRequest)return;navigator.requestMediaKeySystemAccess=MO,delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=NO,w.MediaKeys=Yy,w.MediaKeySystemAccess=Kv,w.shakaMediaKeysPolyfill=PO}}function OS(e){var t=NS;return t?t+e.charAt(0).toUpperCase()+e.slice(1):e}function MO(e,t){try{var n=new Kv(e,t);return Promise.resolve(n)}catch(i){return Promise.reject(i)}}function NO(e){var t=this.mediaKeys;return t&&t!=e&&CE(t,null),delete this.mediaKeys,(this.mediaKeys=e)&&CE(e,this),Promise.resolve()}Ki.PatchedMediaKeysWebkit=EE,EE.install=AE;function Kv(e,t){this.g=this.keySystem=e;var n=!1;e=="org.w3.clearkey"&&(this.g="webkit-org.w3.clearkey",n=!1);var i=!1,r=document.getElementsByTagName("video");r=r.length?r[0]:document.createElement("video"),t=b(t);for(var l=t.next();!l.done;l=t.next()){l=l.value;var c={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:l.initDataTypes,sessionTypes:["temporary"],label:l.label},f=!1;if(l.audioCapabilities)for(var y=b(l.audioCapabilities),m=y.next();!m.done;m=y.next())m=m.value,m.contentType&&(f=!0,r.canPlayType(m.contentType.split(";")[0],this.g)&&(c.audioCapabilities.push(m),i=!0));if(l.videoCapabilities)for(y=b(l.videoCapabilities),m=y.next();!m.done;m=y.next())m=m.value,m.contentType&&(f=!0,r.canPlayType(m.contentType,this.g)&&(c.videoCapabilities.push(m),i=!0));if(f||(i=r.canPlayType("video/mp4",this.g)||r.canPlayType("video/webm",this.g)),l.persistentState=="required"&&(n?(c.persistentState="required",c.sessionTypes=["persistent-license"]):i=!1),i){this.h=c;return}}throw n="Unsupported keySystem",(e=="org.w3.clearkey"||e=="com.widevine.alpha")&&(n="None of the requested configurations were supported."),e=Error(n),e.name="NotSupportedError",e.code=DOMException.NOT_SUPPORTED_ERR,e}Kv.prototype.createMediaKeys=function(){var e=new Yy(this.g);return Promise.resolve(e)},Kv.prototype.getConfiguration=function(){return this.h};function Yy(e){this.l=e,this.h=null,this.g=new vt,this.i=[],this.j=new Map}function CE(e,t){e.h=t,e.g.Qa();var n=NS;t&&(e.g.D(t,n+"needkey",function(i){var r=new CustomEvent("encrypted");r.initDataType="cenc",r.initData=Sr(i.initData),e.h.dispatchEvent(r)}),e.g.D(t,n+"keymessage",function(i){var r=kS(e,i.sessionId);r&&(i=new Map().set("messageType",r.keyStatuses.dc()==null?"licenserequest":"licenserenewal").set("message",i.message),i=new ke("message",i),r.h&&(r.h.resolve(),r.h=null),r.dispatchEvent(i))}),e.g.D(t,n+"keyadded",function(i){(i=kS(e,i.sessionId))&&i.ready()}),e.g.D(t,n+"keyerror",function(i){var r=kS(e,i.sessionId);if(r){var l=Error("EME v0.1b key error"),c=i.errorCode;c.systemCode=i.systemCode,l.errorCode=c,!i.sessionId&&r.h?(i.systemCode==45&&(l.message="Unsupported session type."),r.h.reject(l),r.h=null):i.sessionId&&r.g?(r.g.reject(l),r.g=null):(l=i.systemCode,i.errorCode.code==MediaKeyError.MEDIA_KEYERR_OUTPUT?qv(r,"output-restricted"):l==1?qv(r,"expired"):qv(r,"internal-error"))}}))}Yy.prototype.createSession=function(e){if(e=e||"temporary",e!="temporary"&&e!="persistent-license")throw new TypeError("Session type "+e+" is unsupported on this platform.");var t=this.h||document.createElement("video");return t.src||(t.src="about:blank"),e=new RS(t,this.l,e),this.i.push(e),e},Yy.prototype.setServerCertificate=function(){return Promise.resolve(!1)},Yy.prototype.getStatusForPolicy=function(){return Promise.resolve("usable")};function kS(e,t){var n=e.j.get(t);return n||((n=e.i.shift())?(n.sessionId=t,e.j.set(t,n),n):null)}function RS(e,t,n){Ut.call(this),this.j=e,this.m=!1,this.g=this.h=null,this.i=t,this.l=n,this.sessionId="",this.expiration=NaN,this.closed=new kt,this.keyStatuses=new IE}ot(RS,Ut),h=RS.prototype,h.ready=function(){qv(this,"usable"),this.g&&this.g.resolve(),this.g=null};function bE(e,t,n){if(e.m)return Promise.reject(Error("The session is already initialized."));e.m=!0;try{if(e.l=="persistent-license")if(n)var i=Ze(Pr("LOAD_SESSION|"+n));else{var r=Pr("PERSISTENT|");i=Gt(r,t)}else i=Ze(t)}catch(c){return Promise.reject(c)}e.h=new kt;var l=OS("generateKeyRequest");try{e.j[l](e.i,i)}catch(c){if(c.name!="InvalidStateError")return e.h=null,Promise.reject(c);new dt(function(){try{e.j[l](e.i,i)}catch(f){e.h.reject(f),e.h=null}}).da(.01)}return e.h}function MS(e,t,n){if(e.g)e.g.then(function(){return MS(e,t,n)}).catch(function(){return MS(e,t,n)});else{if(e.g=t,e.i=="webkit-org.w3.clearkey"){var i=nn(n),r=JSON.parse(i);r.keys[0].kty!="oct"&&(e.g.reject(Error("Response is not a valid JSON Web Key Set.")),e.g=null),i=Fi(r.keys[0].k),r=Fi(r.keys[0].kid)}else i=Ze(n),r=null;var l=OS("addKey");try{e.j[l](e.i,i,r,e.sessionId)}catch(c){e.g.reject(c),e.g=null}}}function qv(e,t){var n=e.keyStatuses;n.size=t==null?0:1,n.g=t,t=new ke("keystatuseschange"),e.dispatchEvent(t)}h.generateRequest=function(e,t){return bE(this,t,null)},h.load=function(e){return this.l=="persistent-license"?bE(this,null,e):Promise.reject(Error("Not a persistent session."))},h.update=function(e){var t=new kt;return MS(this,t,e),t},h.close=function(){if(this.l!="persistent-license"){if(!this.sessionId)return this.closed.reject(Error("The session is not callable.")),this.closed;var e=OS("cancelKeyRequest");try{this.j[e](this.i,this.sessionId)}catch{}}return this.closed.resolve(),this.closed},h.remove=function(){return this.l!="persistent-license"?Promise.reject(Error("Not a persistent session.")):this.close()};function IE(){this.size=0,this.g=void 0}h=IE.prototype,h.dc=function(){return this.g},h.forEach=function(e){this.g&&e(this.g,Uo.value())},h.get=function(e){if(this.has(e))return this.g},h.has=function(e){var t=Uo.value();return!!(this.g&&dl(e,t))},h.entries=function(){},h.keys=function(){},h.values=function(){};var NS="",PO="webkit";yr(AE);function DE(){}function OE(){if(w.HTMLVideoElement){var e=HTMLVideoElement.prototype;e.requestPictureInPicture&&document.exitPictureInPicture||!e.webkitSupportsPresentationMode||(document.pictureInPictureEnabled=!0,document.pictureInPictureElement=null,e.requestPictureInPicture=_O,Object.defineProperty(e,"disablePictureInPicture",{get:jO,set:BO,enumerable:!0,configurable:!0}),document.exitPictureInPicture=UO,document.addEventListener("webkitpresentationmodechanged",LO,!0))}}function LO(e){if(e=e.target,e.webkitPresentationMode=="picture-in-picture"){document.pictureInPictureElement=e;var t=new Event("enterpictureinpicture");e.dispatchEvent(t)}else document.pictureInPictureElement==e&&(document.pictureInPictureElement=null),t=new Event("leavepictureinpicture"),e.dispatchEvent(t)}function _O(){return this.webkitSupportsPresentationMode("picture-in-picture")?(this.webkitSetPresentationMode("picture-in-picture"),document.pictureInPictureElement=this,Promise.resolve()):Promise.reject(Error("PiP not allowed by video element"))}function UO(){var e=document.pictureInPictureElement;return e?(e.webkitSetPresentationMode("inline"),document.pictureInPictureElement=null,Promise.resolve()):Promise.reject(Error("No picture in picture element found"))}function jO(){return this.hasAttribute("disablePictureInPicture")?!0:!this.webkitSupportsPresentationMode("picture-in-picture")}function BO(e){e?this.setAttribute("disablePictureInPicture",""):this.removeAttribute("disablePictureInPicture")}Ki.PiPWebkit=DE,DE.install=OE,yr(OE);function kE(){}function RE(){w.crypto&&("randomUUID"in w.crypto||(w.crypto.randomUUID=VO))}function VO(){var e=URL.createObjectURL(new Blob),t=e.toString();return URL.revokeObjectURL(e),t.substr(t.lastIndexOf("/")+1)}Ki.RandomUUID=kE,kE.install=RE,yr(RE);function ME(){}function NE(){var e=Symbol.prototype;"description"in e||Object.defineProperty(e,"description",{get:HO})}function HO(){var e=/\((.*)\)/.exec(this.toString());return e?e[1]:void 0}Ki.Symbol=ME,ME.install=NE,yr(NE);function PE(){}function LE(){if(w.HTMLMediaElement){var e=HTMLMediaElement.prototype.play;HTMLMediaElement.prototype.play=function(){var t=e.apply(this);return t&&t.catch(function(){}),t}}}Ki.VideoPlayPromise=PE,PE.install=LE,yr(LE);function _E(){}function UE(){if(w.HTMLVideoElement){var e=HTMLVideoElement.prototype;!e.getVideoPlaybackQuality&&("webkitDroppedFrameCount"in e||hl())&&(e.getVideoPlaybackQuality=KO)}}function KO(){return{droppedVideoFrames:this.webkitDroppedFrameCount,totalVideoFrames:this.webkitDecodedFrameCount,corruptedVideoFrames:0,creationTime:NaN,totalFrameDelay:0}}Ki.VideoPlaybackQuality=_E,_E.install=UE,yr(UE);function jE(){}function BE(){if(!w.VTTCue&&w.TextTrackCue){var e=null,t=TextTrackCue.length;if(t==3)e=PS;else if(t==6)e=qO;else{try{var n=!!PS(1,2,"")}catch{n=!1}n&&(e=PS)}e&&(w.VTTCue=function(i,r,l){return e(i,r,l)})}}function PS(e,t,n){return new w.TextTrackCue(e,t,n)}function qO(e,t,n){return new w.TextTrackCue(e+"-"+t+"-"+n,e,t,n)}Ki.VTTCue=jE,jE.install=BE,yr(BE);function Xr(){}Xr.prototype.parseInit=function(){},Xr.prototype.setSequenceMode=function(){},Xr.prototype.setManifestType=function(){},Xr.prototype.parseMedia=function(e,t){var n=null,i=[];e=nn(e).split(/\r?\n/),e=b(e);for(var r=e.next();!r.done;r=e.next())if((r=r.value)&&!/^\s+$/.test(r)&&(r=FO.exec(r))){var l=zO.exec(r[1]);l=60*parseInt(l[1],10)+parseFloat(l[2].replace(",",".")),r=new Qt(l,t.segmentEnd?t.segmentEnd:l+2,r[2]),n&&(n.endTime=l,i.push(n)),n=r}return n&&i.push(n),i},Pe("shaka.text.LrcTextParser",Xr),Xr.prototype.parseMedia=Xr.prototype.parseMedia,Xr.prototype.setManifestType=Xr.prototype.setManifestType,Xr.prototype.setSequenceMode=Xr.prototype.setSequenceMode,Xr.prototype.parseInit=Xr.prototype.parseInit;var FO=/^\[(\d{1,2}:\d{1,2}(?:[.,]\d{1,3})?)\](.*)/,zO=/^(\d+):(\d{1,2}(?:[.,]\d{1,3})?)$/;kn("application/x-subtitle-lrc",function(){return new Xr});function Rr(){}Rr.prototype.parseInit=function(){},Rr.prototype.setSequenceMode=function(){},Rr.prototype.setManifestType=function(){},Rr.prototype.parseMedia=function(e,t,n,i){var r=nn(e);if(e=[],r=="")return e;var l=Ya(r,"tt",!0);if(!l)throw new Y(2,2,2005,"Failed to parse TTML.");if(r=Ur(l,"body")[0],!r)return[];var c=Vo(l,Wy,"frameRate"),f=Vo(l,Wy,"subFrameRate"),y=Vo(l,Wy,"frameRateMultiplier"),m=Vo(l,Wy,"tickRate"),T=Vo(l,Wy,"cellResolution"),x=l.attributes["xml:space"]||"default",D=Vo(l,Gv,"extent");if(x!="default"&&x!="preserve")throw new Y(2,2,2005,"Invalid xml:space value: "+x);x=x=="default",c=new QO(c,f,y,m),T=WO(T),f=Ur(l,"metadata")[0],f=(f?f.children:[]).filter(function(U){return U!=`
`}),y=Ur(l,"style"),l=Ur(l,"region"),m=[];for(var R=b(l),N=R.next();!N.done;N=R.next())(N=GO(N.value,y,D))&&m.push(N);if(Lt(r,"p").length)throw new Y(2,2,2001,"<p> can only be inside <div> in TTML");for(D=b(Lt(r,"div")),R=D.next();!R.done;R=D.next())if(Lt(R.value,"span").length)throw new Y(2,2,2001,"<span> can only be inside <p> in TTML");return(t=VE(r,t,c,f,y,l,m,x,T,null,!1,n,i))&&(t.backgroundColor||(t.backgroundColor="transparent"),e.push(t)),e};function VE(e,t,n,i,r,l,c,f,y,m,T,x,D){var R=m;if(ds(e)){if(!T)return null;var N={tagName:"span",children:[In(e)],attributes:{},parent:null}}else N=e;for(var U=null,L=b(QE),j=L.next();!j.done&&!(U=zv(N,"backgroundImage",i,"#",j.value)[0]);j=L.next());L=null,j=Vo(N,QE,"backgroundImage");var V=/^(urn:)(mpeg:[a-z0-9][a-z0-9-]{0,31}:)(subs:)([0-9]+)$/;if(j&&V.test(j)){if(L=parseInt(j.split(":").pop(),10)-1,L>=D.length)return null;L=D[L]}else x&&j&&!j.startsWith("#")&&(V=new pn(x),j=new pn(j),(j=V.resolve(j).toString())&&(L=j));if((e.tagName=="p"||U||L)&&(T=!0),e=T,j=(N.attributes["xml:space"]||(f?"default":"preserve"))=="default",V=N.children.every(ds),f=[],!V)for(var X=b(N.children),G=X.next();!G.done;G=X.next())(G=VE(G.value,t,n,i,r,l,c,j,y,N,T,x,D))&&f.push(G);if(i=m!=null,x=In(N),x=N.children.length&&x&&/\S/.test(x),X=N.attributes.begin||N.attributes.end||N.attributes.dur,!(X||x||N.tagName=="br"||f.length!=0||i&&!j))return null;for(D=qE(N,n),x=D.start,D=D.end;R&&R.tagName&&R.tagName!="tt";)D=YO(R,n,x,D),x=D.start,D=D.end,R=R.parent;if(x==null&&(x=0),x+=t.periodStart,D=D==null?1/0:D+t.periodStart,x=Math.max(x,t.segmentStart),D=Math.min(D,t.segmentEnd),!X&&0<f.length)for(x=1/0,D=0,t=b(f),n=t.next();!n.done;n=t.next())n=n.value,x=Math.min(x,n.startTime),D=Math.max(D,n.endTime);if(N.tagName=="br")return r=new Qt(x,D,""),r.lineBreak=!0,r;if(t="",V&&(t=Ai(In(N)||""),j&&(t=t.replace(/\s+/g," "))),t=new Qt(x,D,t),t.nestedCues=f,T||(t.isContainer=!0),y&&(t.cellResolution=y),y=zv(N,"region",l,"")[0],N.attributes.region&&y&&y.attributes["xml:id"]){var Z=y.attributes["xml:id"];t.region=c.filter(function(q){return q.id==Z})[0]}return c=y,m&&i&&!N.attributes.region&&!N.attributes.style&&(c=zv(m,"region",l,"")[0]),XO(t,N,c,U,L,r,e,f.length==0),t}function GO(e,t,n){var i=new Fa,r=e.attributes["xml:id"];if(!r)return null;i.id=r,r=null,n&&(r=BS.exec(n)||VS.exec(n)),n=r?Number(r[1]):null,r=r?Number(r[2]):null;var l,c=Fv(e,t,"extent");if(c){var f=(l=BS.exec(c))||VS.exec(c);f!=null&&(i.width=Number(f[1]),i.height=Number(f[2]),l||(n!=null&&(i.width=100*i.width/n),r!=null&&(i.height=100*i.height/r)),i.widthUnits=l||n!=null?Gi:0,i.heightUnits=l||r!=null?Gi:0)}return(e=Fv(e,t,"origin"))&&(f=(l=BS.exec(e))||VS.exec(e),f!=null&&(i.viewportAnchorX=Number(f[1]),i.viewportAnchorY=Number(f[2]),l?c||(i.width=100-i.viewportAnchorX,i.widthUnits=Gi,i.height=100-i.viewportAnchorY,i.heightUnits=Gi):(r!=null&&(i.viewportAnchorY=100*i.viewportAnchorY/r),n!=null&&(i.viewportAnchorX=100*i.viewportAnchorX/n)),i.viewportAnchorUnits=l||n!=null?Gi:0)),i}function LS(e){var t=e.match(/rgba\(([^)]+)\)/);return t&&(t=t[1].split(","),t.length==4)?(t[3]=String(Number(t[3])/255),"rgba("+t.join(",")+")"):e}function XO(e,t,n,i,r,l,c,f){if(c=c||f,Li(t,n,l,"direction",c)=="rtl"&&(e.direction="rtl"),f=Li(t,n,l,"writingMode",c),f=="tb"||f=="tblr"?e.writingMode="vertical-lr":f=="tbrl"?e.writingMode="vertical-rl":f=="rltb"||f=="rl"?e.direction="rtl":f&&(e.direction=gs),(f=Li(t,n,l,"textAlign",!0))?(e.positionAlign=$O.get(f),e.lineAlign=ZO.get(f),e.textAlign=Lc[f.toUpperCase()]):e.textAlign=Yi,(f=Li(t,n,l,"displayAlign",!0))&&(e.displayAlign=id[f.toUpperCase()]),(f=Li(t,n,l,"color",c))&&(e.color=LS(f)),(f=Li(t,n,l,"backgroundColor",c))&&(e.backgroundColor=LS(f)),(f=Li(t,n,l,"border",c))&&(e.border=f),f=Li(t,n,l,"fontFamily",c))switch(f){case"monospaceSerif":e.fontFamily="Courier New,Liberation Mono,Courier,monospace";break;case"proportionalSansSerif":e.fontFamily="Arial,Helvetica,Liberation Sans,sans-serif";break;case"sansSerif":e.fontFamily="sans-serif";break;case"monospaceSansSerif":e.fontFamily="Consolas,monospace";break;case"proportionalSerif":e.fontFamily="serif";break;default:e.fontFamily=f.split(",").filter(function(y){return y!="default"}).join(",")}switch((f=Li(t,n,l,"fontWeight",c))&&f=="bold"&&(e.fontWeight=Qa),f=Li(t,n,l,"wrapOption",c),e.wrapLine=!(f&&f=="noWrap"),(f=Li(t,n,l,"lineHeight",c))&&f.match(Ap)&&(e.lineHeight=f),(f=Li(t,n,l,"fontSize",c))&&(f.match(Ap)||f.match(JO))&&(e.fontSize=f),(f=Li(t,n,l,"fontStyle",c))&&(e.fontStyle=Rg[f.toUpperCase()]),i?(r=i.attributes.imageType||i.attributes.imagetype,f=i.attributes.encoding,i=In(i).trim(),r=="PNG"&&f=="Base64"&&i&&(e.backgroundImage="data:image/png;base64,"+i)):r&&(e.backgroundImage=r),(i=Li(t,n,l,"textOutline",c))&&(i=i.split(" "),i[0].match(Ap)?e.textStrokeColor=e.color:(e.textStrokeColor=LS(i[0]),i.shift()),i[0]&&i[0].match(Ap)?e.textStrokeWidth=i[0]:e.textStrokeColor=""),(i=Li(t,n,l,"letterSpacing",c))&&i.match(Ap)&&(e.letterSpacing=i),(i=Li(t,n,l,"linePadding",c))&&i.match(Ap)&&(e.linePadding=i),(i=Li(t,n,l,"opacity",c))&&(e.opacity=parseFloat(i)),(i=Fv(n,l,"textDecoration"))&&HE(e,i),(i=_S(t,l,"textDecoration"))&&HE(e,i),(i=Li(t,n,l,"textCombine",c))&&(e.textCombineUpright=i),Li(t,n,l,"ruby",c)){case"container":e.rubyTag="ruby";break;case"text":e.rubyTag="rt"}}function HE(e,t){t=b(t.split(" "));for(var n=t.next();!n.done;n=t.next())switch(n.value){case"underline":e.textDecoration.includes(Ko)||e.textDecoration.push(Ko);break;case"noUnderline":e.textDecoration.includes(Ko)&&_r(e.textDecoration,Ko);break;case"lineThrough":e.textDecoration.includes("lineThrough")||e.textDecoration.push("lineThrough");break;case"noLineThrough":e.textDecoration.includes("lineThrough")&&_r(e.textDecoration,"lineThrough");break;case"overline":e.textDecoration.includes("overline")||e.textDecoration.push("overline");break;case"noOverline":e.textDecoration.includes("overline")&&_r(e.textDecoration,"overline")}}function Li(e,t,n,i,r){return r=r===void 0?!0:r,(e=_S(e,n,i))?e:r?Fv(t,n,i):null}function Fv(e,t,n){if(!e)return null;var i=Vo(e,Gv,n);return i||KE(e,t,n)}function _S(e,t,n){var i=Vo(e,Gv,n);return i||KE(e,t,n)}function KE(e,t,n){e=zv(e,"style",t,"");for(var i=null,r=0;r<e.length;r++){var l=wl(e[r],"urn:ebu:tt:style",n);l||(l=Vo(e[r],Gv,n)),l||(l=_S(e[r],t,n)),l&&(i=l)}return i}function zv(e,t,n,i,r){var l=[];if(!e||1>n.length)return l;var c=e;for(e=null;!e&&!(e=r?wl(c,r,t):c.attributes[t])&&(c=c.parent,c););if(t=e){for(t=b(t.split(" ")),r=t.next();!r.done;r=t.next())for(r=r.value,e=b(n),c=e.next();!c.done;c=e.next())if(c=c.value,i+c.attributes["xml:id"]==r){l.push(c);break}}return l}function YO(e,t,n,i){return e=qE(e,t),n==null?n=e.start:e.start!=null&&(n+=e.start),i==null?i=e.end:e.start!=null&&(i+=e.start),{start:n,end:i}}function qE(e,t){var n=US(e.attributes.begin,t),i=US(e.attributes.end,t);return e=US(e.attributes.dur,t),i==null&&e!=null&&(i=n+e),{start:n,end:i}}function US(e,t){var n=null;if(FE.test(e)){e=FE.exec(e),n=Number(e[1]);var i=Number(e[2]),r=Number(e[3]),l=Number(e[4]);l+=(Number(e[5])||0)/t.h,r+=l/t.frameRate,n=r+60*i+3600*n}else if(zE.test(e))n=jS(zE,e);else if(GE.test(e))n=jS(GE,e);else if(XE.test(e))e=XE.exec(e),n=Number(e[1])/t.frameRate;else if(YE.test(e))e=YE.exec(e),n=Number(e[1])/t.g;else if(WE.test(e))n=jS(WE,e);else if(e)throw new Y(2,2,2001,"Could not parse cue time range in TTML");return n}function jS(e,t){return e=e.exec(t),e==null||e[0]==""?null:(Number(e[4])||0)/1e3+(Number(e[3])||0)+60*(Number(e[2])||0)+3600*(Number(e[1])||0)}function WO(e){return e&&(e=/^(\d+) (\d+)$/.exec(e))?{oc:parseInt(e[1],10),rows:parseInt(e[2],10)}:null}Pe("shaka.text.TtmlTextParser",Rr),Rr.prototype.parseMedia=Rr.prototype.parseMedia,Rr.prototype.setManifestType=Rr.prototype.setManifestType,Rr.prototype.setSequenceMode=Rr.prototype.setSequenceMode,Rr.prototype.parseInit=Rr.prototype.parseInit;function QO(e,t,n,i){this.frameRate=Number(e)||30,this.h=Number(t)||1,this.g=Number(i),this.g==0&&(this.g=e?this.frameRate*this.h:1),n&&(e=/^(\d+) (\d+)$/g.exec(n))&&(this.frameRate*=Number(e[1])/Number(e[2]))}var BS=/^(\d{1,2}(?:\.\d+)?|100(?:\.0+)?)% (\d{1,2}(?:\.\d+)?|100(?:\.0+)?)%$/,JO=/^(\d{1,4}(?:\.\d+)?|100)%$/,Ap=/^(\d+px|\d+em|\d*\.?\d+c)$/,VS=/^(\d+)px (\d+)px$/,FE=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,zE=/^(?:(\d{2,}):)?(\d{2}):(\d{2})$/,GE=/^(?:(\d{2,}):)?(\d{2}):(\d{2}\.\d+)$/,XE=/^(\d*(?:\.\d*)?)f$/,YE=/^(\d*(?:\.\d*)?)t$/,WE=RegExp("^(?:(\\d*(?:\\.\\d*)?)h)?(?:(\\d*(?:\\.\\d*)?)m)?(?:(\\d*(?:\\.\\d*)?)s)?(?:(\\d*(?:\\.\\d*)?)ms)?$"),ZO=new Map().set("left",Al).set("center","center").set("right","end").set("start",Al).set("end","end"),$O=new Map().set("left","line-left").set("center","center").set("right","line-right"),Wy=["http://www.w3.org/ns/ttml#parameter","http://www.w3.org/2006/10/ttaf1#parameter"],Gv=["http://www.w3.org/ns/ttml#styling","http://www.w3.org/2006/10/ttaf1#styling"],QE=["http://www.smpte-ra.org/schemas/2052-1/2010/smpte-tt","http://www.smpte-ra.org/schemas/2052-1/2013/smpte-tt"];kn("application/ttml+xml",function(){return new Rr});function ti(){this.g=new Rr}ti.prototype.parseInit=function(e){var t=!1;if(new jt().box("moov",$e).box("trak",$e).box("mdia",$e).box("minf",$e).box("stbl",$e).R("stsd",bn).box("stpp",function(n){t=!0,n.parser.stop()}).parse(e),!t)throw new Y(2,2,2007)},ti.prototype.setSequenceMode=function(){},ti.prototype.setManifestType=function(){},ti.prototype.parseMedia=function(e,t,n){var i=[],r=null,l=[],c=new Map,f=[];if(new jt().box("moof",$e).box("traf",$e).R("tfhd",function(j){r=va(j.reader,j.flags).md}).R("trun",function(j){j=ef(j.reader,j.version,j.flags),j=b(j.fg);for(var V=j.next();!V.done;V=j.next())f.push(V.value.sampleSize||r||0)}).R("subs",function(j){for(var V=j.reader,X=V.S(),G=-1,Z=0;Z<X;Z++){var q=V.S();G+=q,q=V.na();for(var K=[],W=0;W<q;W++)j.version==1?K.push(V.S()):K.push(V.na()),V.X(),V.X(),V.S();c.set(G,K)}}).box("mdat",jl(function(j){l.push(j)})).parse(e,!1),l.length==0)throw new Y(2,2,2007);for(var y=Gt.apply(Ln,J(l)),m=0,T=0;T<f.length;T++){var x=Ze(y,m,f[T]);m+=f[T];var D=c.get(T);if(D&&D.length){x=Ze(x,0,D[0]);for(var R=[],N=D[0],U=1;U<D.length;U++){var L=Ze(e,N,D[U]);L=ml(L),R.push("data:image/png;base64,"+L),N+=D[U]}i=i.concat(this.g.parseMedia(x,t,n,R))}else i=i.concat(this.g.parseMedia(x,t,n,[]))}return i},Pe("shaka.text.Mp4TtmlParser",ti),ti.prototype.parseMedia=ti.prototype.parseMedia,ti.prototype.setManifestType=ti.prototype.setManifestType,ti.prototype.setSequenceMode=ti.prototype.setSequenceMode,ti.prototype.parseInit=ti.prototype.parseInit,kn('application/mp4; codecs="stpp"',function(){return new ti}),kn('application/mp4; codecs="stpp.ttml"',function(){return new ti}),kn('application/mp4; codecs="stpp.ttml.im1i"',function(){return new ti}),kn('application/mp4; codecs="stpp.ttml.im1t"',function(){return new ti}),kn('application/mp4; codecs="stpp.ttml.im2i"',function(){return new ti}),kn('application/mp4; codecs="stpp.ttml.im2t"',function(){return new ti}),kn('application/mp4; codecs="stpp.ttml.etd1"',function(){return new ti}),kn('application/mp4; codecs="stpp.ttml.etd1|im1t"',function(){return new ti}),kn('application/mp4; codecs="stpp.ttml.im1t|etd1"',function(){return new ti}),kn('application/mp4; codecs="stpp.TTML.im1t"',function(){return new ti});function $i(){this.g="UNKNOWN"}$i.prototype.parseInit=function(){},$i.prototype.setSequenceMode=function(){},$i.prototype.setManifestType=function(e){this.g=e},$i.prototype.parseMedia=function(e,t){e=nn(e),e=e.replace(/\r\n|\r(?=[^\n]|$)/gm,`
`);var n=e.split(/\n{2,}/m);if(!/^WEBVTT($|[ \t\n])/m.test(n[0]))throw new Y(2,2,2e3);if(e=t.vttOffset,this.g=="HLS")if(n[0].includes("X-TIMESTAMP-MAP")){var i=n[0];if(e=i.match(/LOCAL:((?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{3}))/m),i=i.match(/MPEGTS:(\d+)/m),!e||!i)throw new Y(2,2,2e3);if(e=fs(e[1]),e==null)throw new Y(2,2,2e3);i=Number(i[1]);for(var r=t.segmentStart-t.periodStart;95443.7176888889<=r;)r-=95443.7176888889,i+=8589934592;e=t.periodStart+i/9e4-e}else t.periodStart&&t.vttOffset==t.periodStart&&(e=0);for(t=[],i=b(n[0].split(`
`)),r=i.next();!r.done;r=i.next())if(r=r.value,/^Region:/.test(r)){r=new ua(r);var l=new Fa;Ga(r),ss(r);for(var c=Ga(r);c;){var f=l,y=c;(c=/^id=(.*)$/.exec(y))?f.id=c[1]:(c=/^width=(\d{1,2}|100)%$/.exec(y))?f.width=Number(c[1]):(c=/^lines=(\d+)$/.exec(y))?(f.height=Number(c[1]),f.heightUnits=2):(c=/^regionanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(y))?(f.regionAnchorX=Number(c[1]),f.regionAnchorY=Number(c[2])):(c=/^viewportanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(y))?(f.viewportAnchorX=Number(c[1]),f.viewportAnchorY=Number(c[2])):/^scroll=up$/.exec(y)&&(f.scroll="up"),ss(r),c=Ga(r)}t.push(l)}for(i=new Map,ah(i),r=[],n=b(n.slice(1)),l=n.next();!l.done;l=n.next()){if(l=l.value.split(`
`),(l.length!=1||l[0])&&!/^NOTE($|[ \t])/.test(l[0])&&l[0]=="STYLE"){for(f=[],c=-1,y=1;y<l.length;y++)l[y].includes("::cue")&&(f.push([]),c=f.length-1),c!=-1&&(f[c].push(l[y]),l[y].includes("}")&&(c=-1));for(f=b(f),c=f.next();!c.done;c=f.next()){var m=c.value;c="global",(y=m[0].match(/\((.*)\)/))&&(c=y.pop()),y=m.slice(1,-1),m[0].includes("}")&&(m=/\{(.*?)\}/.exec(m[0]))&&(y=m[1].split(";")),(m=i.get(c))||(m=new Qt(0,0,""));for(var T=!1,x=0;x<y.length;x++){var D=/^\s*([^:]+):\s*(.*)/.exec(y[x]);if(D){var R=D[2].trim().replace(";","");switch(D[1].trim()){case"background-color":case"background":T=!0,m.backgroundColor=R;break;case"color":T=!0,m.color=R;break;case"font-family":T=!0,m.fontFamily=R;break;case"font-size":T=!0,m.fontSize=R;break;case"font-weight":(700<=parseInt(R,10)||R=="bold")&&(T=!0,m.fontWeight=Qa);break;case"font-style":switch(R){case"normal":T=!0,m.fontStyle=fh;break;case"italic":T=!0,m.fontStyle=ms;break;case"oblique":T=!0,m.fontStyle="oblique"}break;case"opacity":T=!0,m.opacity=parseFloat(R);break;case"text-combine-upright":T=!0,m.textCombineUpright=R;break;case"text-shadow":T=!0,m.textShadow=R;break;case"white-space":T=!0,m.wrapLine=R!="noWrap"}}}T&&i.set(c,m)}}if(m=l,T=e,m.length==1&&!m[0]||/^NOTE($|[ \t])/.test(m[0])||m[0]=="STYLE"||m[0]=="REGION")l=null;else if(l=null,m[0].includes("-->")||(l=m[0],m.splice(0,1)),f=new ua(m[0]),c=cs(f),x=za(f,/[ \t]+--\x3e[ \t]+/g),y=cs(f),c==null||x==null||y==null)bt("Failed to parse VTT time code. Cue skipped:",l,m),l=null;else{for(c+=T,y+=T,T=m.slice(1).join(`
`).trim(),i.has("global")?(m=i.get("global").clone(),m.startTime=c,m.endTime=y,m.payload=T):m=new Qt(c,y,T),ss(f),c=Ga(f);c;)JE(m,c,t),ss(f),c=Ga(f);Pc(m,i),l!=null&&(m.id=l),l=m}l&&r.push(l)}return r};function JE(e,t,n){var i;(i=/^align:(start|middle|center|end|left|right)$/.exec(t))?(t=i[1],t=="middle"?e.textAlign=Yi:e.textAlign=Lc[t.toUpperCase()]):(i=/^vertical:(lr|rl)$/.exec(t))?e.writingMode=i[1]=="lr"?"vertical-lr":"vertical-rl":(i=/^size:([\d.]+)%$/.exec(t))?e.size=Number(i[1]):(i=/^position:([\d.]+)%(?:,(line-left|line-right|middle|center|start|end|auto))?$/.exec(t))?(e.position=Number(i[1]),i[2]&&(t=i[2],e.positionAlign=t=="line-left"||t=="start"?"line-left":t=="line-right"||t=="end"?"line-right":t=="center"||t=="middle"?"center":nd)):(i=/^region:(.*)$/.exec(t))?(t=ek(n,i[1]))&&(e.region=t):(n=/^line:([\d.]+)%(?:,(start|end|center))?$/.exec(t))?(e.lineInterpretation=1,e.line=Number(n[1]),n[2]&&(e.lineAlign=rd[n[2].toUpperCase()])):(n=/^line:(-?\d+)(?:,(start|end|center))?$/.exec(t))&&(e.lineInterpretation=Ho,e.line=Number(n[1]),n[2]&&(e.lineAlign=rd[n[2].toUpperCase()]))}function ek(e,t){return e=e.filter(function(n){return n.id==t}),e.length?e[0]:null}Pe("shaka.text.VttTextParser",$i),$i.prototype.parseMedia=$i.prototype.parseMedia,$i.prototype.setManifestType=$i.prototype.setManifestType,$i.prototype.setSequenceMode=$i.prototype.setSequenceMode,$i.prototype.parseInit=$i.prototype.parseInit,kn("text/vtt",function(){return new $i}),kn('text/vtt; codecs="vtt"',function(){return new $i}),kn('text/vtt; codecs="wvtt"',function(){return new $i});function Yr(){this.g=null}Yr.prototype.parseInit=function(e){var t=this,n=!1;if(new jt().box("moov",$e).box("trak",$e).box("mdia",$e).R("mdhd",function(i){i=$c(i.reader,i.version),t.g=i.timescale}).box("minf",$e).box("stbl",$e).R("stsd",bn).box("wvtt",function(){n=!0}).parse(e),!this.g)throw new Y(2,2,2008);if(!n)throw new Y(2,2,2008)},Yr.prototype.setSequenceMode=function(){},Yr.prototype.setManifestType=function(){},Yr.prototype.parseMedia=function(e,t){if(!e.length)return[];if(!this.g)throw new Y(2,2,2008);var n=0,i=[],r,l=[],c=!1,f=!1,y=!1,m=null;if(new jt().box("moof",$e).box("traf",$e).R("tfdt",function(X){c=!0,n=fu(X.reader,X.version).baseMediaDecodeTime}).R("tfhd",function(X){m=va(X.reader,X.flags).ld}).R("trun",function(X){f=!0,i=ef(X.reader,X.version,X.flags).fg}).box("mdat",jl(function(X){y=!0,r=X})).parse(e,!1),!y&&!c&&!f)throw new Y(2,2,2008);e=n;for(var T=new Zt(r,0),x=b(i),D=x.next();!D.done;D=x.next()){D=D.value;var R=D.gg||m,N=D.ye?n+D.ye:e;e=N+(R||0);var U=0;do{var L=T.S();U+=L;var j=T.S(),V=null;Vr(j)=="vttc"?8<L&&(V=T.Cb(L-8)):T.skip(L-8),R&&V&&(L=tk(V,t.periodStart+N/this.g,t.periodStart+e/this.g),l.push(L))}while(D.sampleSize&&U<D.sampleSize)}return l.filter(Fo)};function tk(e,t,n){var i,r,l;return new jt().box("payl",jl(function(c){i=nn(c)})).box("iden",jl(function(c){r=nn(c)})).box("sttg",jl(function(c){l=nn(c)})).parse(e),i?nk(i,r,l,t,n):null}function nk(e,t,n,i,r){if(e=new Qt(i,r,e),Pc(e),t&&(e.id=t),n)for(t=new ua(n),n=Ga(t);n;)JE(e,n,[]),ss(t),n=Ga(t);return e}Pe("shaka.text.Mp4VttParser",Yr),Yr.prototype.parseMedia=Yr.prototype.parseMedia,Yr.prototype.setManifestType=Yr.prototype.setManifestType,Yr.prototype.setSequenceMode=Yr.prototype.setSequenceMode,Yr.prototype.parseInit=Yr.prototype.parseInit,kn('application/mp4; codecs="wvtt"',function(){return new Yr});function Wr(){}Wr.prototype.parseInit=function(){},Wr.prototype.setSequenceMode=function(){},Wr.prototype.setManifestType=function(){},Wr.prototype.parseMedia=function(e){var t=nn(e).replace(/\r+/g,"");if(t=t.trim(),e=[],t=="")return e;t=b(t.split(`
`));for(var n=t.next();!n.done;n=t.next()){n=n.value.split(`
`);var i=new ua(n[0]),r=cs(i),l=za(i,/,/g);if(i=cs(i),r==null||l==null||i==null)throw new Y(2,2,2001,"Could not parse cue time range in SubViewer");e.push(new Qt(r,i,n.slice(1).join(`
`).trim()))}return e},Pe("shaka.text.SbvTextParser",Wr),Wr.prototype.parseMedia=Wr.prototype.parseMedia,Wr.prototype.setManifestType=Wr.prototype.setManifestType,Wr.prototype.setSequenceMode=Wr.prototype.setSequenceMode,Wr.prototype.parseInit=Wr.prototype.parseInit,kn("text/x-subviewer",function(){return new Wr});function Mr(){this.g=new $i}Mr.prototype.parseInit=function(){},Mr.prototype.setSequenceMode=function(){},Mr.prototype.setManifestType=function(){},Mr.prototype.parseMedia=function(e,t,n){return e=nn(e),e=ZE(e),e=Ze(Pr(e)),this.g.parseMedia(e,t,n,[])};function ZE(e){var t=`WEBVTT
`;if(e=="")return t;e=e.replace(/\r+/g,""),e=e.trim(),e=b(e.split(`
`));for(var n=e.next();!n.done;n=e.next())n=n.value.split(/\n/),n[0].match(/\d+/)&&n.shift(),n[0]=n[0].replace(/,/g,"."),t+=n.join(`
`).replace(/{b}/g,"<b>").replace(/{\/b}/g,"</b>").replace(/{i}/g,"<i>").replace(/{\/i}/g,"</i>").replace(/{u}/g,"<u>").replace(/{\/u}/g,"</u>")+`
`;return t}Pe("shaka.text.SrtTextParser",Mr),Mr.srt2webvtt=ZE,Mr.prototype.parseMedia=Mr.prototype.parseMedia,Mr.prototype.setManifestType=Mr.prototype.setManifestType,Mr.prototype.setSequenceMode=Mr.prototype.setSequenceMode,Mr.prototype.parseInit=Mr.prototype.parseInit,kn("text/srt",function(){return new Mr});function Qr(){}Qr.prototype.parseInit=function(){},Qr.prototype.setSequenceMode=function(){},Qr.prototype.setManifestType=function(){},Qr.prototype.parseMedia=function(e){var t="",n="",i=null,r=null;for(r=nn(e).split(/\r?\n\s*\r?\n/),e=b(r),r=e.next();!r.done;r=e.next()){var l=r.value;r=l,(l=rk.exec(l))&&(i=l[1],r=l[2]),i=="V4 Styles"||i=="V4+ Styles"?(t=r,t=n?t+(`
`+r):r):i=="Events"&&(n=n?n+(`
`+r):r)}for(i=[],r=null,t=b(t.split(/\r?\n/)),e=t.next();!e.done;e=t.next())if(e=e.value,!/^\s*;/.test(e)&&(l=tA.exec(e))){if(e=l[1].trim(),l=l[2].trim(),e=="Format")r=l.split(Xv);else if(e=="Style"){e=l.split(Xv),l={};for(var c=0;c<r.length&&c<e.length;c++)l[r[c]]=e[c];i.push(l)}}for(r=[],t=null,n=b(n.split(/\r?\n/)),l=n.next(),e={};!l.done;e={Dh:void 0},l=n.next())if(l=l.value,!/^\s*;/.test(l)&&(c=tA.exec(l))){if(l=c[1].trim(),c=c[2].trim(),l=="Format")t=c.split(Xv);else if(l=="Dialogue"){c=c.split(Xv),l={};for(var f=0;f<t.length&&f<c.length;f++)l[t[f]]=c[f];f=eA(l.Start);var y=eA(l.End);c=new Qt(f,y,c.slice(t.length-1).join(",").replace(/\\N/g,`
`).replace(/\{[^}]+\}/g,"")),e.Dh=l.Style,(e=i.find(function(m){return function(T){return T.Name==m.Dh}}(e)))&&ik(c,e),r.push(c)}}return r};function ik(e,t){var n=t.Fontname;if(n&&(e.fontFamily=n),(n=t.Fontsize)&&(e.fontSize=n+"px"),(n=t.PrimaryColour)&&(n=$E(n))&&(e.color=n),(n=t.BackColour)&&(n=$E(n))&&(e.backgroundColor=n),t.Bold&&(e.fontWeight=Qa),t.Italic&&(e.fontStyle=ms),t.Underline&&e.textDecoration.push(Ko),(n=t.Spacing)&&(e.letterSpacing=n+"px"),n=t.Alignment)switch(parseInt(n,10)){case 1:e.displayAlign=El,e.textAlign="start";break;case 2:e.displayAlign=El,e.textAlign=Yi;break;case 3:e.displayAlign=El,e.textAlign="end";break;case 5:e.displayAlign="before",e.textAlign="start";break;case 6:e.displayAlign="before",e.textAlign=Yi;break;case 7:e.displayAlign="before",e.textAlign="end";break;case 9:e.displayAlign="center",e.textAlign="start";break;case 10:e.displayAlign="center",e.textAlign=Yi;break;case 11:e.displayAlign="center",e.textAlign="end"}(t=t.AlphaLevel)&&(e.opacity=parseFloat(t))}function $E(e){return e=parseInt(e.replace("&H",""),16),0<=e?"rgba("+(e&255)+","+(e>>8&255)+","+(e>>16&255)+","+(e>>24&255^255)/255+")":null}function eA(e){return e=ok.exec(e),3600*(e[1]?parseInt(e[1].replace(":",""),10):0)+60*parseInt(e[2],10)+parseFloat(e[3])}Pe("shaka.text.SsaTextParser",Qr),Qr.prototype.parseMedia=Qr.prototype.parseMedia,Qr.prototype.setManifestType=Qr.prototype.setManifestType,Qr.prototype.setSequenceMode=Qr.prototype.setSequenceMode,Qr.prototype.parseInit=Qr.prototype.parseInit;var rk=/^\s*\[([^\]]+)\]\r?\n([\s\S]*)/,tA=/^\s*([^:]+):\s*(.*)/,Xv=/\s*,\s*/,ok=/^(\d+:)?(\d{1,2}):(\d{1,2}(?:[.]\d{1,3})?)?$/;kn("text/x-ssa",function(){return new Qr});function nA(e,t){var n=e[t+1]&1?7:9;return t+n<=e.length&&(e=((e[t+3]&3)<<11|e[t+4]<<3|(e[t+5]&224)>>>5)-n,0<e)?{ud:n,ia:e}:null}function iA(e,t){var n=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350],i=(e[t+2]&60)>>>2;if(i>n.length-1)return null;var r=((e[t+2]&192)>>>6)+1,l=(e[t+2]&1)<<2;return l|=(e[t+3]&192)>>>6,{sampleRate:n[i],channelCount:l,codec:"mp4a.40."+r}}function rA(e,t){if(t+1<e.length&&e[t]===255&&(e[t+1]&246)===240){var n=e[t+1]&1?7:9;if(t+n>=e.length)return!1;var i=(e[t+3]&3)<<11|e[t+4]<<3|(e[t+5]&224)>>>5;return i<=n?!1:(t+=i,t===e.length||t+1<e.length&&e[t]===255&&(e[t+1]&246)===240)}return!1}function lk(e,t){switch(e){case"mp4a.40.2":if(t===1)return new Uint8Array([0,200,0,128,35,128]);if(t===2)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(t===3)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(t===4)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(t===5)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,56]);if(t===6)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,0,178,0,32,8,224]);break;default:if(t===1)return new Uint8Array([1,64,34,128,163,78,230,128,186,8,0,0,0,28,6,241,193,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(t===2||t===3)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94])}return null}function Jr(e){this.j=e,this.h=0,this.g=new Map,this.i=null}h=Jr.prototype,h.destroy=function(){this.g.clear()},h.isSupported=function(e){return e.toLowerCase().split(";")[0]=="audio/aac"?Un(this.convertCodecs("audio",e)):!1},h.convertCodecs=function(e,t){return t.toLowerCase().split(";")[0]=="audio/aac"?'audio/mp4; codecs="'+(jn(t)||"mp4a.40.2")+'"':t},h.getOriginalMimeType=function(){return this.j},h.transmux=function(e,t,n,i){for(var r=Ze(e),l=gu(r),c=l.length;c<r.length&&!rA(r,c);c++);if(e=1e3*n.endTime,l=yu(l),l.length&&n&&(l=l.find(function(T){return T.description==="com.apple.streaming.transportStreamTimestamp"}))&&(e=l.data),l=iA(r,c),!l)return Promise.reject(new Y(2,3,3018,n?n.N()[0]:null));t.audioSamplingRate=l.sampleRate,t.channelsCount=l.channelCount;for(var f=[];c<r.length;){var y=nA(r,c);if(!y)return Promise.reject(new Y(2,3,3018,n?n.N()[0]:null));var m=y.ud+y.ia;c+m<=r.length&&f.push({data:r.subarray(c+y.ud,c+m),size:y.ia,duration:1024,eb:0,flags:{hb:0,$a:0,Za:0,Xa:0,Ya:2,ib:0}}),c+=m}return r=l.sampleRate,e=Math.floor(e*r/1e3),i={id:t.id,type:"audio",codecs:l.codec,encrypted:t.encrypted&&0<t.drmInfos.length,timescale:r,duration:i,lb:[],ra:new Uint8Array([]),Ca:new Uint8Array([]),Ia:0,Ka:0,data:{Db:this.h,baseMediaDecodeTime:e,jb:f},stream:t},i=new Sa([i]),n=t.id+"_"+n.i,this.g.has(n)?t=this.g.get(n):(t=br(i),this.g.set(n,t)),n=this.i!==t,i=pu(i),this.i=t,this.h++,n?(t=Gt(t,i),Promise.resolve(t)):Promise.resolve(i)},Pe("shaka.transmuxer.AacTransmuxer",Jr),Jr.prototype.transmux=Jr.prototype.transmux,Jr.prototype.getOriginalMimeType=Jr.prototype.getOriginalMimeType,Jr.prototype.convertCodecs=Jr.prototype.convertCodecs,Jr.prototype.isSupported=Jr.prototype.isSupported,Jr.prototype.destroy=Jr.prototype.destroy,hi("audio/aac",function(){return new Jr("audio/aac")},yi);function oA(e,t){if(t+8>e.length||e[t]!==11||e[t+1]!==119)return null;var n=e[t+4]>>6;if(3<=n)return null;var i=e[t+4]&63,r=2*[64,69,96,64,70,96,80,87,120,80,88,120,96,104,144,96,105,144,112,121,168,112,122,168,128,139,192,128,140,192,160,174,240,160,175,240,192,208,288,192,209,288,224,243,336,224,244,336,256,278,384,256,279,384,320,348,480,320,349,480,384,417,576,384,418,576,448,487,672,448,488,672,512,557,768,512,558,768,640,696,960,640,697,960,768,835,1152,768,836,1152,896,975,1344,896,976,1344,1024,1114,1536,1024,1115,1536,1152,1253,1728,1152,1254,1728,1280,1393,1920,1280,1394,1920][3*i+n];if(t+r>e.length)return null;var l=e[t+6]>>5,c=0;l===2?c+=2:(l&1&&l!==1&&(c+=2),l&4&&(c+=2)),c=(e[t+6]<<8|e[t+7])>>12-c&1;var f=e[t+5]&7;return e=new Uint8Array([n<<6|e[t+5]>>3<<1|f>>2,(f&3)<<6|l<<3|c<<2|i>>4,i<<4&224]),{sampleRate:[48e3,44100,32e3][n],channelCount:[2,1,2,3,3,4,4,5][l]+c,ra:e,ia:r}}function ak(e,t){if(e[t]===11&&e[t+1]===119){var n=0,i=5;t+=i;for(var r,l;0<i;){l=e[t];var c=Math.min(i,8),f=8-c;r=4278190080>>>24+f<<f,r=(l&r)>>f,n=n?n<<c|r:r,t+=1,i-=c}if(16>n)return!0}return!1}function ko(e){this.j=e,this.h=0,this.g=new Map,this.i=null}h=ko.prototype,h.destroy=function(){this.g.clear()},h.isSupported=function(e){return e.toLowerCase().split(";")[0]=="audio/ac3"?Un(this.convertCodecs("audio",e)):!1},h.convertCodecs=function(e,t){return t.toLowerCase().split(";")[0]=="audio/ac3"?lo()?'audio/mp4; codecs="ec-3"':'audio/mp4; codecs="ac-3"':t},h.getOriginalMimeType=function(){return this.j},h.transmux=function(e,t,n,i){e=Ze(e);for(var r=gu(e),l=r.length;l<e.length&&!ak(e,l);l++);var c=1e3*n.endTime;r=yu(r),r.length&&n&&(r=r.find(function(T){return T.description==="com.apple.streaming.transportStreamTimestamp"}))&&(c=r.data),r=0;for(var f=new Uint8Array([]),y=[];l<e.length;){var m=oA(e,l);if(!m)return Promise.reject(new Y(2,3,3018,n?n.N()[0]:null));t.audioSamplingRate=m.sampleRate,t.channelsCount=m.channelCount,r=m.sampleRate,f=m.ra,y.push({data:e.subarray(l,l+m.ia),size:m.ia,duration:1536,eb:0,flags:{hb:0,$a:0,Za:0,Xa:0,Ya:2,ib:0}}),l+=m.ia}return e=Math.floor(c*r/1e3),i={id:t.id,type:"audio",codecs:"ac-3",encrypted:t.encrypted&&0<t.drmInfos.length,timescale:r,duration:i,lb:[],ra:f,Ca:new Uint8Array([]),Ia:0,Ka:0,data:{Db:this.h,baseMediaDecodeTime:e,jb:y},stream:t},i=new Sa([i]),n=t.id+"_"+n.i,this.g.has(n)?t=this.g.get(n):(t=br(i),this.g.set(n,t)),n=this.i!==t,i=pu(i),this.i=t,this.h++,n?(t=Gt(t,i),Promise.resolve(t)):Promise.resolve(i)},Pe("shaka.transmuxer.Ac3Transmuxer",ko),ko.prototype.transmux=ko.prototype.transmux,ko.prototype.getOriginalMimeType=ko.prototype.getOriginalMimeType,ko.prototype.convertCodecs=ko.prototype.convertCodecs,ko.prototype.isSupported=ko.prototype.isSupported,ko.prototype.destroy=ko.prototype.destroy,hi("audio/ac3",function(){return new ko("audio/ac3")},yi);function lA(e,t){if(t+8>e.length||(e[t]<<8|e[t+1]<<0)!==2935)return null;var n=new Ir(e.subarray(t+2));Ui(n,2),Ui(n,3);var i=mt(n,11)+1<<1,r=mt(n,2);if(r==3){r=mt(n,2),r=[24e3,22060,16e3][r];var l=3}else r=[48e3,44100,32e3][r],l=mt(n,2);var c=mt(n,3),f=mt(n,1);return n=mt(n,5),t+i>e.byteLength?null:(e=Math.floor(i*r/(16*[1,2,3,6][l])),e=new Uint8Array([(e&8160)>>5,(e&31)<<3,r<<6|n<<1|0,0|c<<1|f<<0,0]),{sampleRate:r,channelCount:[2,1,2,3,3,4,4,5][c]+f,ra:e,ia:i})}function Ro(e){this.j=e,this.h=0,this.g=new Map,this.i=null}h=Ro.prototype,h.destroy=function(){this.g.clear()},h.isSupported=function(e){return e.toLowerCase().split(";")[0]=="audio/ec3"?Un(this.convertCodecs("audio",e)):!1},h.convertCodecs=function(e,t){return t.toLowerCase().split(";")[0]=="audio/ec3"?'audio/mp4; codecs="ec-3"':t},h.getOriginalMimeType=function(){return this.j},h.transmux=function(e,t,n,i){e=Ze(e);for(var r=gu(e),l=r.length;l<e.length&&(e[l]<<8|e[l+1]<<0)!==2935;l++);var c=1e3*n.endTime;r=yu(r),r.length&&n&&(r=r.find(function(T){return T.description==="com.apple.streaming.transportStreamTimestamp"}))&&(c=r.data),r=0;for(var f=new Uint8Array([]),y=[];l<e.length;){var m=lA(e,l);if(!m)return Promise.reject(new Y(2,3,3018,n?n.N()[0]:null));t.audioSamplingRate=m.sampleRate,t.channelsCount=m.channelCount,r=m.sampleRate,f=m.ra,y.push({data:e.subarray(l,l+m.ia),size:m.ia,duration:1536,eb:0,flags:{hb:0,$a:0,Za:0,Xa:0,Ya:2,ib:0}}),l+=m.ia}return e=Math.floor(c*r/1e3),i={id:t.id,type:"audio",codecs:"ec-3",encrypted:t.encrypted&&0<t.drmInfos.length,timescale:r,duration:i,lb:[],ra:f,Ca:new Uint8Array([]),Ia:0,Ka:0,data:{Db:this.h,baseMediaDecodeTime:e,jb:y},stream:t},i=new Sa([i]),n=t.id+"_"+n.i,this.g.has(n)?t=this.g.get(n):(t=br(i),this.g.set(n,t)),n=this.i!==t,i=pu(i),this.i=t,this.h++,n?(t=Gt(t,i),Promise.resolve(t)):Promise.resolve(i)},Pe("shaka.transmuxer.Ec3Transmuxer",Ro),Ro.prototype.transmux=Ro.prototype.transmux,Ro.prototype.getOriginalMimeType=Ro.prototype.getOriginalMimeType,Ro.prototype.convertCodecs=Ro.prototype.convertCodecs,Ro.prototype.isSupported=Ro.prototype.isSupported,Ro.prototype.destroy=Ro.prototype.destroy,hi("audio/ec3",function(){return new Ro("audio/ec3")},yi);function uk(e){if(!e.length)return null;var t=e.find(function(U){return U.type==7});if(e=e.find(function(U){return U.type==8}),!t||!e)return null;var n=new Ir(t.data),i=Rt(n);if(Rt(n),Rt(n),Mn(n),ck.includes(i)&&(i=Le(n),i===3&&Ui(n,1),Mn(n),Mn(n),Ui(n,1),Ke(n))){i=i!==3?8:12;for(var r=0;r<i;r++)Ke(n)&&(6>r?Bs(n,16):Bs(n,64))}if(Mn(n),i=Le(n),i===0)Le(n);else if(i===1)for(Ui(n,1),Mn(n),Mn(n),i=Le(n),r=0;r<i;r++)Mn(n);Mn(n),Ui(n,1);var l=Le(n),c=Le(n),f=mt(n,1);f===0&&Ui(n,1),Ui(n,1);var y=0,m=0,T=0,x=0;if(Ke(n)&&(y=Le(n),m=Le(n),T=Le(n),x=Le(n)),r=i=1,Ke(n)&&Ke(n)){var D=Rt(n),R=[1,12,10,16,40,24,20,32,80,18,15,64,160,4,3,2],N=[1,11,11,11,33,11,11,11,33,11,11,33,99,3,2,1];0<D&&16>=D?(i=R[D-1],r=N[D-1]):D===255&&(i=mt(n,16),r=mt(n,16))}return n=(2-f)*(c+1)*16-2*T-2*x,l=16*(l+1)-2*y-2*m,y=[],t=t.fullData,y.push(t.byteLength>>>8&255),y.push(t.byteLength&255),y=y.concat.apply(y,J(t)),t=[],e=e.fullData,t.push(e.byteLength>>>8&255),t.push(e.byteLength&255),t=t.concat.apply(t,J(e)),e=new Uint8Array([1,y[3],y[4],y[5],255,225].concat(y,[1],t)),{height:n,width:l,Ca:e,Ia:i,Ka:r}}function sk(e){function t(N){r={data:new Uint8Array([]),frame:!1,isKeyframe:!1,pts:N.pts,dts:N.dts,nalus:[]}}function n(){if(r&&r.nalus.length&&r.frame){for(var N=[],U=b(r.nalus),L=U.next();!L.done;L=U.next()){L=L.value;var j=L.fullData.byteLength,V=new Uint8Array(4);V[0]=j>>24&255,V[1]=j>>16&255,V[2]=j>>8&255,V[3]=j&255,N.push(V),N.push(L.fullData)}r.data=Gt.apply(Ln,J(N)),i.push(r)}}for(var i=[],r=null,l=!1,c=0;c<e.length;c++){var f=e[c],y=f.nalus,m=!1;r&&y.length&&!l&&(n(),t(f)),y=b(f.nalus);for(var T=y.next();!T.done;T=y.next()){T=T.value;var x=!1;switch(T.type){case 1:var D=!1;x=!0;var R=T.data;m&&4<R.length&&(R=Ld(new Ir(R)),R===2||R===4||R===7||R===9)&&(D=!0),D&&r&&r.frame&&!r.isKeyframe&&(n(),r=null),r||t(f),r.frame=!0,r.isKeyframe=D;break;case 5:x=!0,r&&r.frame&&!r.isKeyframe&&(n(),r=null),r||t(f),r.frame=!0,r.isKeyframe=!0;break;case 6:x=!0;break;case 7:m=x=!0;break;case 8:x=!0;break;case 9:l=x=!0,r&&r.frame&&(n(),r=null),r||t(f);break;case 12:x=!0;break;default:x=!1}r&&x&&r.nalus.push(T)}}return n(),i}var ck=[100,110,122,244,44,83,86,118,128,138,139,134];function fk(e){if(!e.length)return null;var t=e.find(function(c){return c.type==32}),n=e.find(function(c){return c.type==33}),i=e.find(function(c){return c.type==34});if(!t||!n||!i)return null;var r=dk(t.fullData);e=pk(n.fullData);var l=hk(i.fullData);return t=yk(t.fullData,n.fullData,i.fullData,{Uf:r.Uf,rg:r.rg,Ef:e.Ef,Ff:e.Ff,yf:e.yf,Df:e.Df,zf:e.zf,Af:e.Af,Bf:e.Bf,Cf:e.Cf,rf:e.rf,tf:e.tf,uf:e.uf,vf:e.vf,wf:e.wf,xf:e.xf,hf:e.hf,le:e.le,ff:e.ff,ef:e.ef,df:e.df,Wf:l.Wf}),{height:e.height,width:e.width,Ca:t,Ia:e.vj,Ka:e.uj}}function dk(e){var t=new Ir(e,!0);return Rt(t),Rt(t),mt(t,4),mt(t,2),mt(t,6),e=mt(t,3),t=Ke(t),{Uf:e+1,rg:t}}function pk(e){e=new Ir(e,!0),Rt(e),Rt(e);var t=0,n=0,i=0,r=0;mt(e,4);var l=mt(e,3);Ke(e);for(var c=mt(e,2),f=mt(e,1),y=mt(e,5),m=Rt(e),T=Rt(e),x=Rt(e),D=Rt(e),R=Rt(e),N=Rt(e),U=Rt(e),L=Rt(e),j=Rt(e),V=Rt(e),X=Rt(e),G=[],Z=[],q=0;q<l;q++)G.push(Ke(e)),Z.push(Ke(e));if(0<l)for(q=l;8>q;q++)mt(e,2);for(q=0;q<l;q++)G[q]&&mt(e,88),Z[q]&&Rt(e);Le(e),G=Le(e),G==3&&mt(e,1),Z=Le(e),q=Le(e),Ke(e)&&(t+=Le(e),n+=Le(e),i+=Le(e),r+=Le(e));var K=Le(e),W=Le(e),Q=Le(e);if(Ke(e))for(var oe=0;oe<=l;oe++)Le(e),Le(e),Le(e);else Le(e),Le(e),Le(e);if(Le(e),Le(e),Le(e),Le(e),Le(e),Le(e),Ke(e)&&Ke(e))for(oe=0;4>oe;oe++)for(var ne=0;ne<(oe===3?2:6);ne++)if(Ke(e)){var re=Math.min(64,1<<4+(oe<<1));1<oe&&xa(e);for(var le=0;le<re;le++)xa(e)}else Le(e);for(Ke(e),Ke(e),Ke(e)&&(Rt(e),Le(e),Le(e),Ke(e)),oe=Le(e),re=ne=0;re<oe;re++)if(le=!1,re!==0&&(le=Ke(e)),le){re===oe&&Le(e),Ke(e),Le(e);for(var fe=le=0;fe<=ne;fe++){var ye=Ke(e),de=!1;ye||(de=Ke(e)),(ye||de)&&le++}ne=le}else{for(fe=Le(e),le=Le(e),ne=fe+le,ye=0;ye<fe;ye++)Le(e),Ke(e);for(fe=0;fe<le;fe++)Le(e),Ke(e)}if(Ke(e))for(oe=Le(e),ne=0;ne<oe;ne++){for(re=0;re<Q+4;re++)mt(e,1);mt(e,1)}if(oe=Q=1,ne=0,Ke(e),Ke(e),Ke(e)){if(Ke(e)&&(re=Rt(e),le=[1,12,10,16,40,24,20,32,80,18,15,64,160,4,3,2],fe=[1,11,11,11,33,11,11,11,33,11,11,33,99,3,2,1],0<re&&16>=re?(Q=le[re-1],oe=fe[re-1]):re===255&&(Q=mt(e,16),oe=mt(e,16))),Ke(e)&&Ke(e),Ke(e)&&(mt(e,3),Ke(e),Ke(e)&&(Rt(e),Rt(e),Rt(e))),Ke(e)&&(Le(e),Le(e)),Ke(e),Ke(e),Ke(e),(re=Ke(e))&&(Le(e),Le(e),Le(e),Le(e)),Ke(e)&&(mt(e,32),mt(e,32),Ke(e)&&Le(e),Ke(e)))for(fe=!1,re=Ke(e),le=Ke(e),(re||le)&&((fe=Ke(e))&&(Rt(e),mt(e,5),Ke(e),mt(e,5)),mt(e,4),mt(e,4),fe&&mt(e,4),mt(e,5),mt(e,5),mt(e,5)),ye=0;ye<=l;ye++){var xe=!0;de=1,Ke(e)||(xe=Ke(e));var De=!1;if(xe?Le(e):De=Ke(e),De||(de=Le(e)+1),re){for(xe=0;xe<de;xe++)Le(e),Le(e),fe&&(Le(e),Le(e));Ke(e)}if(le){for(xe=0;xe<de;xe++)Le(e),Le(e),fe&&(Le(e),Le(e));Ke(e)}}Ke(e)&&(Ke(e),Ke(e),Ke(e),ne=Le(e),Le(e),Le(e),Le(e),Le(e))}return{yf:X,Ef:c,Ff:f,Df:y,zf:m,Af:T,Bf:x,Cf:D,rf:R,tf:N,uf:U,vf:L,wf:j,xf:V,le:ne,hf:0,ff:G,ef:K,df:W,width:Z-(t+n)*(G===1||G===2?2:1),height:q-(i+r)*(G===1?2:1),vj:Q,uj:oe}}function hk(e){var t=new Ir(e,!0);Rt(t),Rt(t),Le(t),Le(t),Ke(t),Ke(t),mt(t,3),Ke(t),Ke(t),Le(t),Le(t),xa(t),Ke(t),Ke(t),Ke(t)&&Le(t),xa(t),xa(t),Ke(t),Ke(t),Ke(t),Ke(t),e=Ke(t),t=Ke(t);var n=1;return t&&e?n=0:t?n=3:e&&(n=2),{Wf:n}}function yk(e,t,n,i){var r=new Uint8Array(23+(5+e.byteLength)+(5+t.byteLength)+(5+n.byteLength));return r[0]=1,r[1]=(i.Ef&3)<<6|(i.Ff?1:0)<<5|i.Df&31,r[2]=i.zf,r[3]=i.Af,r[4]=i.Bf,r[5]=i.Cf,r[6]=i.rf,r[7]=i.tf,r[8]=i.uf,r[9]=i.vf,r[10]=i.wf,r[11]=i.xf,r[12]=i.yf,r[13]=240|(i.le&3840)>>8,r[14]=i.le&255,r[15]=252|i.Wf&3,r[16]=252|i.ff&3,r[17]=248|i.ef&7,r[18]=248|i.df&7,r[19]=0,r[20]=0,r[21]=(i.hf&3)<<6|(i.Uf&7)<<3|(i.rg?1:0)<<2|3,r[22]=3,r[23]=160,r[24]=0,r[25]=1,r[26]=(e.byteLength&65280)>>8,r[27]=(e.byteLength&255)>>0,r.set(e,28),r[23+(5+e.byteLength)]=161,r[e.byteLength+29]=0,r[e.byteLength+30]=1,r[e.byteLength+31]=(t.byteLength&65280)>>8,r[e.byteLength+32]=(t.byteLength&255)>>0,r.set(t,e.byteLength+33),r[23+(e.byteLength+10+t.byteLength)]=162,r[e.byteLength+10+t.byteLength+24]=0,r[e.byteLength+10+t.byteLength+25]=1,r[e.byteLength+10+t.byteLength+26]=(n.byteLength&65280)>>8,r[e.byteLength+10+t.byteLength+27]=(n.byteLength&255)>>0,r.set(n,e.byteLength+10+t.byteLength+28),r}function Yv(e,t){var n=e[t+1]>>3&3,i=e[t+1]>>1&3,r=e[t+2]>>4&15,l=e[t+2]>>2&3;if(n!==1&&r!==0&&r!==15&&l!==3){var c=e[t+3]>>6;r=1e3*gk[14*(n===3?3-i:i===3?3:4)+r-1],l=mk[3*(n===3?0:n===2?1:2)+l],n=vk[n][i];var f=Sk[i],y=Math.floor(n*r/l+(e[t+2]>>1&1))*f,m=(navigator.userAgent||"").match(/Chrome\/(\d+)/i);return(m=m?parseInt(m[1],10):0)&&87>=m&&i===2&&224e3<=r&&c===0&&(e[t+3]|=128),{sampleRate:l,channelCount:c===3?1:2,ia:y,tj:8*n*f}}return null}function aA(e,t){return e[t]===255&&(e[t+1]&224)===224&&(e[t+1]&6)!==0}function uA(e,t){if(t+1<e.length&&aA(e,t)){var n=Yv(e,t),i=4;return n&&n.ia&&(i=n.ia),t+=i,t===e.length||t+1<e.length&&aA(e,t)}return!1}var gk=[32,64,96,128,160,192,224,256,288,320,352,384,416,448,32,48,56,64,80,96,112,128,160,192,224,256,320,384,32,40,48,56,64,80,96,112,128,160,192,224,256,320,32,48,56,64,80,96,112,128,144,160,176,192,224,256,8,16,24,32,40,48,56,64,80,96,112,128,144,160],mk=[44100,48e3,32e3,22050,24e3,16e3,11025,12e3,8e3],vk=[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],Sk=[0,1,1,4];function Mo(e){this.j=e,this.h=0,this.g=new Map,this.i=null}h=Mo.prototype,h.destroy=function(){this.g.clear()},h.isSupported=function(e){return e.toLowerCase().split(";")[0]=="audio/mpeg"?Un(this.convertCodecs("audio",e)):!1},h.convertCodecs=function(e,t){return t.toLowerCase().split(";")[0]=="audio/mpeg"?'audio/mp4; codecs="mp3"':t},h.getOriginalMimeType=function(){return this.j},h.transmux=function(e,t,n,i){for(var r=Ze(e),l=gu(r).length;l<r.length&&!uA(r,l);l++);var c;for(e=[];l<r.length;){var f=Yv(r,l);if(!f)return Promise.reject(new Y(2,3,3018,n?n.N()[0]:null));c||(c=f),l+f.ia<=r.length&&e.push({data:r.subarray(l,l+f.ia),size:f.ia,duration:1152,eb:0,flags:{hb:0,$a:0,Za:0,Xa:0,Ya:2,ib:0}}),l+=f.ia}return c?(r=9e4*c.tj/c.sampleRate*this.h,i={id:t.id,type:"audio",codecs:"mp3",encrypted:t.encrypted&&0<t.drmInfos.length,timescale:c.sampleRate,duration:i,lb:[],ra:new Uint8Array([]),Ca:new Uint8Array([]),Ia:0,Ka:0,data:{Db:this.h,baseMediaDecodeTime:r,jb:e},stream:t},i=new Sa([i]),n=t.id+"_"+n.i,this.g.has(n)?t=this.g.get(n):(t=br(i),this.g.set(n,t)),n=this.i!==t,i=pu(i),this.i=t,this.h++,n?(t=Gt(t,i),Promise.resolve(t)):Promise.resolve(i)):Promise.reject(new Y(2,3,3018,n?n.N()[0]:null))},Pe("shaka.transmuxer.Mp3Transmuxer",Mo),Mo.prototype.transmux=Mo.prototype.transmux,Mo.prototype.getOriginalMimeType=Mo.prototype.getOriginalMimeType,Mo.prototype.convertCodecs=Mo.prototype.convertCodecs,Mo.prototype.isSupported=Mo.prototype.isSupported,Mo.prototype.destroy=Mo.prototype.destroy,hi("audio/mpeg",function(){return new Mo("audio/mpeg")},yi);function No(e){this.h=e,this.g=null}h=No.prototype,h.destroy=function(){},h.isSupported=function(e){if(e.toLowerCase().split(";")[0]!="video/mp2t")return!1;var t=jn(e).split(","),n=pi("audio",t);return t=pi("video",t),!n||t||gi(n)!="mp3"?!1:Un(this.convertCodecs("audio",e))},h.convertCodecs=function(e,t){return t.toLowerCase().split(";")[0]=="video/mp2t"?"audio/mpeg":t},h.getOriginalMimeType=function(){return this.h},h.transmux=function(e,t,n,i,r){if(this.g?this.g.clearData():this.g=new $t,e=Ze(e),e=this.g.parse(e),e.od().audio!="mp3"||r!="audio")return Promise.reject(new Y(2,3,3018,n?n.N()[0]:null));for(n=new Uint8Array([]),r=b(e.fb()),e=r.next();!e.done;e=r.next())if(e=e.value.data)for(t=0;t<e.length;)(i=Yv(e,t))?(t+i.ia<=e.length&&(n=Gt(n,e.subarray(t,t+i.ia))),t+=i.ia):t++;return Promise.resolve(n)},Pe("shaka.transmuxer.MpegTsTransmuxer",No),No.prototype.transmux=No.prototype.transmux,No.prototype.getOriginalMimeType=No.prototype.getOriginalMimeType,No.prototype.convertCodecs=No.prototype.convertCodecs,No.prototype.isSupported=No.prototype.isSupported,No.prototype.destroy=No.prototype.destroy,hi("video/mp2t",function(){return new No("video/mp2t")},da);/*
@license
MSS Transmuxer
Copyright 2015 Dash Industry Forum
SPDX-License-Identifier: BSD-3-Clause
*/function Zr(e){this.h=e,(this.g=X1.get("ISOBoxer")())&&wk(this)}function wk(e){function t(){this._procFullBox(),this.flags&1&&(this._procField("AlgorithmID","uint",24),this._procField("IV_size","uint",8),this._procFieldArray("KID",16,"uint",8)),this._procField("sample_count","uint",32),this._procEntries("entry",this.sample_count,function(n){this._procEntryField(n,"InitializationVector","data",8),this.flags&2&&(this._procEntryField(n,"NumberOfEntries","uint",16),this._procSubEntries(n,"clearAndCryptedData",n.NumberOfEntries,function(i){this._procEntryField(i,"BytesOfClearData","uint",16),this._procEntryField(i,"BytesOfEncryptedData","uint",32)}))})}e.g.addBoxProcessor("saio",function(){this._procFullBox(),this.flags&1&&(this._procField("aux_info_type","uint",32),this._procField("aux_info_type_parameter","uint",32)),this._procField("entry_count","uint",32),this._procFieldArray("offset",this.entry_count,"uint",this.version===1?64:32)}),e.g.addBoxProcessor("saiz",function(){this._procFullBox(),this.flags&1&&(this._procField("aux_info_type","uint",32),this._procField("aux_info_type_parameter","uint",32)),this._procField("default_sample_info_size","uint",8),this._procField("sample_count","uint",32),this.default_sample_info_size===0&&this._procFieldArray("sample_info_size",this.sample_count,"uint",8)}),e.g.addBoxProcessor("senc",t),e.g.addBoxProcessor("uuid",function(){for(var n=!0,i=0;16>i;i++)this.usertype[i]!==Tk[i]&&(n=!1);n&&(this._parsing&&(this.type="sepiff"),t.call(this))})}h=Zr.prototype,h.destroy=function(){},h.isSupported=function(e,t){var n=e.startsWith("mss/");return!this.g||!n?!1:t?Un(this.convertCodecs(t,e)):(t=this.convertCodecs("audio",e),e=this.convertCodecs("video",e),Un(t)||Un(e))},h.convertCodecs=function(e,t){return t.replace("mss/","")},h.getOriginalMimeType=function(){return this.h},h.transmux=function(e,t,n){if(!n)return Promise.resolve(Ze(e));if(!t.mssPrivateData)return Promise.reject(new Y(2,3,3020,n?n.N()[0]:null));try{var i,r=this.g.parseBuffer(e),l=r.fetch("tfhd");l.track_ID=t.id+1;var c=r.fetch("tfdt"),f=r.fetch("traf");c===null&&(c=this.g.createFullBox("tfdt",f,l),c.version=1,c.flags=0,c.baseMediaDecodeTime=Math.floor(n.startTime*t.mssPrivateData.timescale));var y=r.fetch("trun"),m=r.fetch("tfxd");m&&m._parent.boxes.splice(m._parent.boxes.indexOf(m),1);var T=r.fetch("tfrf");T&&T._parent.boxes.splice(T._parent.boxes.indexOf(T),1);var x=r.fetch("sepiff");if(x!==null){x.type="senc",x.usertype=void 0;var D=r.fetch("saio");if(D===null){D=this.g.createFullBox("saio",f),D.version=0,D.flags=0,D.entry_count=1,D.offset=[0];var R=this.g.createFullBox("saiz",f);if(R.version=0,R.flags=0,R.sample_count=x.sample_count,R.default_sample_info_size=0,R.sample_info_size=[],x.flags&2)for(i=0;i<x.sample_count;i+=1)R.sample_info_size[i]=10+6*x.entry[i].NumberOfEntries;else R.default_sample_info_size=8}}l.flags&=16777214,l.flags|=131072,y.flags|=1;var N=r.fetch("moof");y.data_offset=N.getLength()+8;var U=r.fetch("saio");U!==null&&(U.offset[0]=sA(N,"traf")+sA(f,"senc")+16);var L=Ze(r.write());return Promise.resolve(L)}catch(j){return j instanceof Y?Promise.reject(j):Promise.reject(new Y(2,3,3022,n?n.N()[0]:null))}};function sA(e,t){for(var n=8,i=0;i<e.boxes.length&&e.boxes[i].type!==t;i++)n+=e.boxes[i].size;return n}Pe("shaka.transmuxer.MssTransmuxer",Zr),Zr.prototype.transmux=Zr.prototype.transmux,Zr.prototype.getOriginalMimeType=Zr.prototype.getOriginalMimeType,Zr.prototype.convertCodecs=Zr.prototype.convertCodecs,Zr.prototype.isSupported=Zr.prototype.isSupported,Zr.prototype.destroy=Zr.prototype.destroy;var Tk=new Uint8Array([162,57,79,82,90,155,79,20,162,68,108,66,124,100,141,244]);hi("mss/audio/mp4",function(){return new Zr("mss/audio/mp4")},yi),hi("mss/video/mp4",function(){return new Zr("mss/video/mp4")},yi);function Po(e){this.m=e,this.g=0,this.i=new Map,this.l=this.h=this.j=null}h=Po.prototype,h.destroy=function(){this.i.clear(),this.h&&this.h.destroy()},h.isSupported=function(e,t){if(e.toLowerCase().split(";")[0]!="video/mp2t")return!1;var n=e;t&&(n=this.convertCodecs(t,e));var i=jn(n).split(",");return n=pi("audio",i),i=pi("video",i),n&&(n=gi(n),!xk.includes(n))||i&&(n=gi(i),!Ek.includes(n))?!1:t?Un(this.convertCodecs(t,e)):(t=this.convertCodecs("audio",e),e=this.convertCodecs("video",e),Un(t)||Un(e))},h.convertCodecs=function(e,t){return t.toLowerCase().split(";")[0]=="video/mp2t"?(t=jn(t).replace("mp4a.40.34","mp3").split(",").map(function(n){return ai(n,"audio/mp4")}).map(Ts).join(","),e=="audio"?'audio/mp4; codecs="'+t+'"':'video/mp4; codecs="'+t+'"'):t},h.getOriginalMimeType=function(){return this.m},h.transmux=function(e,t,n,i,r){var l=Ze(e);if(r=="audio"&&!Vs(l)){for(var c=gu(l),f=c.length;f<l.length;f++)if(uA(l,f))return Promise.reject(new Y(2,3,3018,n?n.N()[0]:null));for(f=c.length;f<l.length;f++)if(rA(l,f))return this.h||(this.h=new Jr("audio/aac")),this.h.transmux(e,t,n,i,r);return Promise.reject(new Y(2,3,3018,n?n.N()[0]:null))}this.j?this.j.clearData():this.j=new $t;var y=this.j.parse(l),m=[],T=y.od();try{var x=null;if(r=="video"){switch(T.video){case"avc":var D=[],R=null,N=y.wc(),U=sk(N);if(!U.length)throw new Y(2,3,3023,n?n.N()[0]:null);for(var L=0;L<U.length;L++){var j=U[L];R==null&&(R=j.dts);var V=void 0;V=L+1<U.length?(U[L+1].dts||0)-(j.dts||0):1<U.length?(j.dts||0)-(U[L-1].dts||0):9e4*(n.endTime-n.startTime),D.push({data:j.data,size:j.data.byteLength,duration:V,eb:Math.round((j.pts||0)-(j.dts||0)),flags:{hb:0,$a:0,Za:0,Xa:0,Ya:j.isKeyframe?2:1,ib:j.isKeyframe?0:1}})}for(var X=[],G=b(N),Z=G.next();!Z.done;Z=G.next())X.push.apply(X,J(Z.value.nalus));var q=uk(X);if(!q||R==null)throw new Y(2,3,3018,n?n.N()[0]:null);t.height=q.height,t.width=q.width,x={id:t.id,type:"video",codecs:"avc1",encrypted:t.encrypted&&0<t.drmInfos.length,timescale:9e4,duration:i,lb:[],ra:new Uint8Array([]),Ca:q.Ca,Ia:q.Ia,Ka:q.Ka,data:{Db:this.g,baseMediaDecodeTime:R,jb:D},stream:t};break;case"hvc":var K=[],W=null,Q=[],oe=y.wc();if(!oe.length)throw new Y(2,3,3023,n?n.N()[0]:null);for(var ne=0;ne<oe.length;ne++){var re=oe[ne],le=re.nalus;Q.push.apply(Q,J(le));for(var fe=!1,ye=[],de=!1,xe=b(le),De=xe.next();!De.done;De=xe.next()){var Je=De.value;switch(Je.type){case 1:case 0:var Ve=de=!0;break;case 19:case 20:case 21:fe=Ve=de=!0;break;case 32:Ve=!0;break;case 33:Ve=!0;break;case 34:Ve=!0;break;case 35:de=Ve=!0;break;case 39:case 40:Ve=!0;break;default:Ve=!1}if(de&&Ve){var Pt=Je.fullData.byteLength,Tt=new Uint8Array(4);Tt[0]=Pt>>24&255,Tt[1]=Pt>>16&255,Tt[2]=Pt>>8&255,Tt[3]=Pt&255,ye.push(Tt),ye.push(Je.fullData)}}var ft=ye.length?{data:Gt.apply(Ln,J(ye)),isKeyframe:fe}:null;if(ft){W==null&&re.dts!=null&&(W=re.dts);var gt=void 0;gt=ne+1<oe.length?(oe[ne+1].dts||0)-(re.dts||0):1<oe.length?(re.dts||0)-(oe[ne-1].dts||0):9e4*(n.endTime-n.startTime),K.push({data:ft.data,size:ft.data.byteLength,duration:gt,eb:Math.round((re.pts||0)-(re.dts||0)),flags:{hb:0,$a:0,Za:0,Xa:0,Ya:ft.isKeyframe?2:1,ib:ft.isKeyframe?0:1}})}}var Mt=fk(Q);if(!Mt||W==null)throw new Y(2,3,3018,n?n.N()[0]:null);t.height=Mt.height,t.width=Mt.width,x={id:t.id,type:"video",codecs:"hvc1",encrypted:t.encrypted&&0<t.drmInfos.length,timescale:9e4,duration:i,lb:[],ra:new Uint8Array([]),Ca:Mt.Ca,Ia:Mt.Ia,Ka:Mt.Ka,data:{Db:this.g,baseMediaDecodeTime:W,jb:K},stream:t}}x&&(m.push(x),x=null)}if(r=="audio"){switch(T.audio){case"aac":for(var ut=[],xt,nt=null,st=null,Wt=null,ni=b(y.fb()),vn=ni.next();!vn.done;vn=ni.next()){var wn=vn.value,Fn=wn.data;if(Fn){var fi=0;if(st==-1&&Wt)Fn=Gt(Wt,wn.data),st=null;else if(st!=null&&Wt){fi=Math.max(0,st);var Vf=Gt(Wt,Fn.subarray(0,fi));ut.push({data:Vf,size:Vf.byteLength,duration:1024,eb:0,flags:{hb:0,$a:0,Za:0,Xa:0,Ya:2,ib:0}}),st=Wt=null}if(xt=iA(Fn,fi),!xt)throw new Y(2,3,3018,n?n.N()[0]:null);for(t.audioSamplingRate=xt.sampleRate,t.channelsCount=xt.channelCount,nt==null&&wn.pts!==null&&(nt=wn.pts);fi<Fn.length;){var qu=nA(Fn,fi);if(!qu){Wt=Fn.subarray(fi,Fn.length),st=-1;break}var vc=qu.ud+qu.ia;st=Math.max(0,fi+vc-Fn.length),st!=0?Wt=Fn.subarray(fi+qu.ud,fi+vc):fi+vc<=Fn.length&&ut.push({data:Fn.subarray(fi+qu.ud,fi+vc),size:qu.ia,duration:1024,eb:0,flags:{hb:0,$a:0,Za:0,Xa:0,Ya:2,ib:0}}),fi+=vc}}}if(!xt||nt==null){if(!y.wc().length)throw new Y(2,3,3018,n?n.N()[0]:null);nt=9e4*n.startTime;var Lo=pi("audio",t.codecs.split(","));if(!Lo||!t.channelsCount||!t.audioSamplingRate)throw new Y(2,3,3018,n?n.N()[0]:null);xt={sampleRate:t.audioSamplingRate,channelCount:t.channelsCount,codec:Lo};var FS=lk(Lo,t.channelsCount);if(!FS)throw new Y(2,3,3018,n?n.N()[0]:null);for(var Ok=nt+9e4*(n.endTime-n.startTime),AA=nt;AA<Ok;)ut.push({data:FS,size:FS.byteLength,duration:1024,eb:0,flags:{hb:0,$a:0,Za:0,Xa:0,Ya:2,ib:0}}),AA+=1024/xt.sampleRate*9e4}var CA=xt.sampleRate,kk=nt/9e4*CA;x={id:t.id,type:"audio",codecs:xt.codec,encrypted:t.encrypted&&0<t.drmInfos.length,timescale:CA,duration:i,lb:[],ra:new Uint8Array([]),Ca:new Uint8Array([]),Ia:0,Ka:0,data:{Db:this.g,baseMediaDecodeTime:kk,jb:ut},stream:t};break;case"ac3":for(var bA=[],Qv=0,zS=new Uint8Array([]),Jv=null,IA=b(y.fb()),GS=IA.next();!GS.done;GS=IA.next()){var XS=GS.value,YS=XS.data;Jv==null&&XS.pts!==null&&(Jv=XS.pts);for(var Cp=0;Cp<YS.length;){var Sc=oA(YS,Cp);Sc?(t.audioSamplingRate=Sc.sampleRate,t.channelsCount=Sc.channelCount,Qv=Sc.sampleRate,zS=Sc.ra,bA.push({data:YS.subarray(Cp,Cp+Sc.ia),size:Sc.ia,duration:1536,eb:0,flags:{hb:0,$a:0,Za:0,Xa:0,Ya:2,ib:0}}),Cp+=Sc.ia):Cp++}}if(Qv==0||zS.byteLength==0||Jv==null)throw new Y(2,3,3018,n?n.N()[0]:null);var Rk=Jv/9e4*Qv;x={id:t.id,type:"audio",codecs:"ac-3",encrypted:t.encrypted&&0<t.drmInfos.length,timescale:Qv,duration:i,lb:[],ra:zS,Ca:new Uint8Array([]),Ia:0,Ka:0,data:{Db:this.g,baseMediaDecodeTime:Rk,jb:bA},stream:t};break;case"ec3":for(var DA=[],Zv=0,WS=new Uint8Array([]),$v=null,OA=b(y.fb()),QS=OA.next();!QS.done;QS=OA.next()){var JS=QS.value,ZS=JS.data;$v==null&&JS.pts!==null&&($v=JS.pts);for(var bp=0;bp<ZS.length;){var wc=lA(ZS,bp);wc?(t.audioSamplingRate=wc.sampleRate,t.channelsCount=wc.channelCount,Zv=wc.sampleRate,WS=wc.ra,DA.push({data:ZS.subarray(bp,bp+wc.ia),size:wc.ia,duration:1536,eb:0,flags:{hb:0,$a:0,Za:0,Xa:0,Ya:2,ib:0}}),bp+=wc.ia):bp++}}if(Zv==0||WS.byteLength==0||$v==null)throw new Y(2,3,3018,n?n.N()[0]:null);var Mk=$v/9e4*Zv;x={id:t.id,type:"audio",codecs:"ec-3",encrypted:t.encrypted&&0<t.drmInfos.length,timescale:Zv,duration:i,lb:[],ra:WS,Ca:new Uint8Array([]),Ia:0,Ka:0,data:{Db:this.g,baseMediaDecodeTime:Mk,jb:DA},stream:t};break;case"mp3":for(var kA=[],e0,t0=null,RA=b(y.fb()),$S=RA.next();!$S.done;$S=RA.next()){var e2=$S.value,Zy=e2.data;if(Zy){t0==null&&e2.pts!==null&&(t0=e2.pts);for(var Hf=0;Hf<Zy.length;){var Ip=Yv(Zy,Hf);Ip?(e0||(e0=Ip),Hf+Ip.ia<=Zy.length&&kA.push({data:Zy.subarray(Hf,Hf+Ip.ia),size:Ip.ia,duration:1152,eb:0,flags:{hb:0,$a:0,Za:0,Xa:0,Ya:2,ib:0}}),Hf+=Ip.ia):Hf++}}}if(!e0||t0==null)throw new Y(2,3,3018,n?n.N()[0]:null);var MA=e0.sampleRate,Nk=t0/9e4*MA;x={id:t.id,type:"audio",codecs:"mp3",encrypted:t.encrypted&&0<t.drmInfos.length,timescale:MA,duration:i,lb:[],ra:new Uint8Array([]),Ca:new Uint8Array([]),Ia:0,Ka:0,data:{Db:this.g,baseMediaDecodeTime:Nk,jb:kA},stream:t};break;case"opus":var NA=[],n0=null,Pa=y.F;if(!Pa)throw new Y(2,3,3018,n?n.N()[0]:null);var er=[];switch(Pa.Zh){case 1:case 2:er=[0];break;case 0:er=[255,1,1,0,1];break;case 128:er=[255,2,0,0,1];break;case 3:er=[1,2,1,0,2,1];break;case 4:er=[1,2,2,0,1,2,3];break;case 5:er=[1,3,2,0,4,1,2,3];break;case 6:er=[1,4,2,0,4,1,2,3,5];break;case 7:er=[1,4,2,0,4,1,2,3,5,6];break;case 8:er=[1,5,3,0,6,1,2,3,4,5,7];break;case 130:er=[1,1,2,0,1];break;case 131:er=[1,1,3,0,1,2];break;case 132:er=[1,1,4,0,1,2,3];break;case 133:er=[1,1,5,0,1,2,3,4];break;case 134:er=[1,1,6,0,1,2,3,4,5];break;case 135:er=[1,1,7,0,1,2,3,4,5,6];break;case 136:er=[1,1,8,0,1,2,3,4,5,6,7]}for(var PA=new Uint8Array([0,Pa.channelCount,0,0,Pa.sampleRate>>>24&255,Pa.sampleRate>>>17&255,Pa.sampleRate>>>8&255,Pa.sampleRate>>>0&255,0,0].concat(J(er))),LA=Pa.sampleRate,_A=b(y.fb()),t2=_A.next();!t2.done;t2=_A.next()){var n2=t2.value,Dp=n2.data;n0==null&&n2.pts!==null&&(n0=n2.pts);for(var $y=0;$y<Dp.length;){for(var Pk=(Dp[$y+1]&16)!==0,Lk=(Dp[$y+1]&8)!==0,Fu=$y+2,i0=0;Dp[Fu]===255;)i0+=255,Fu+=1;i0+=Dp[Fu],Fu+=1,Fu+=Pk?2:0,Fu+=Lk?2:0;var UA=Dp.slice(Fu,Fu+i0);NA.push({data:UA,size:UA.byteLength,duration:960,eb:0,flags:{hb:0,$a:0,Za:0,Xa:0,Ya:2,ib:0}}),$y=Fu+i0}}if(PA.byteLength==0||n0==null)throw new Y(2,3,3018,n?n.N()[0]:null);t.audioSamplingRate=Pa.sampleRate,t.channelsCount=Pa.channelCount;var _k=n0/9e4*LA;x={id:t.id,type:"audio",codecs:"opus",encrypted:t.encrypted&&0<t.drmInfos.length,timescale:LA,duration:i,lb:[],ra:PA,Ca:new Uint8Array([]),Ia:0,Ka:0,data:{Db:this.g,baseMediaDecodeTime:_k,jb:NA},stream:t}}x&&(m.push(x),x=null)}}catch(r2){return r2&&r2.code==3023?Promise.resolve(new Uint8Array([])):Promise.reject(r2)}if(!m.length)return Promise.reject(new Y(2,3,3018,n?n.N()[0]:null));var jA=new Sa(m),i2=t.id+"_"+n.i;if(this.i.has(i2))var eg=this.i.get(i2);else eg=br(jA),this.i.set(i2,eg);var Uk=this.l!==eg,BA=pu(jA);if(this.l=eg,this.g++,Uk){var jk=Gt(eg,BA);return Promise.resolve(jk)}return Promise.resolve(BA)},Pe("shaka.transmuxer.TsTransmuxer",Po),Po.prototype.transmux=Po.prototype.transmux,Po.prototype.getOriginalMimeType=Po.prototype.getOriginalMimeType,Po.prototype.convertCodecs=Po.prototype.convertCodecs,Po.prototype.isSupported=Po.prototype.isSupported,Po.prototype.destroy=Po.prototype.destroy;var xk=["aac","ac-3","ec-3","mp3","opus"],Ek=["avc","hevc"];hi("video/mp2t",function(){return new Po("video/mp2t")},_c);function cA(){}ot(cA,ln),Pe("shaka.util.FairPlayUtils",cA);/*
@license
EME Encryption Scheme Polyfill
Copyright 2019 Google LLC
SPDX-License-Identifier: Apache-2.0
*/function fA(){}var Qy;function dA(){Qy||navigator.emeEncryptionSchemePolyfilled?console.debug("EmeEncryptionSchemePolyfill: Already installed."):navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration?(Qy=navigator.requestMediaKeySystemAccess,console.debug("EmeEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.requestMediaKeySystemAccess=Ak,navigator.emeEncryptionSchemePolyfilled=!0):console.debug("EmeEncryptionSchemePolyfill: EME not found")}function Ak(e,t){var n=this,i;return z(function(r){return r.g==1?(console.assert(n==navigator,'bad "this" for requestMediaKeySystemAccess'),_(r,Qy.call(n,e,t),2)):(i=r.h,wA(i)?(console.debug("EmeEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.requestMediaKeySystemAccess=Qy,r.return(i)):(console.debug("EmeEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support."),navigator.requestMediaKeySystemAccess=pA,r.return(pA.call(n,e,t))))})}function pA(e,t){var n=this,i,r,l,c,f,y,m,T,x,D,R,N;return z(function(U){if(U.g==1){for(console.assert(n==navigator,'bad "this" for requestMediaKeySystemAccess'),i=SA(e),r=[],l=b(t),c=l.next();!c.done;c=l.next())f=c.value,y=hA(f.videoCapabilities,i),m=hA(f.audioCapabilities,i),f.videoCapabilities&&f.videoCapabilities.length&&!y.length||f.audioCapabilities&&f.audioCapabilities.length&&!m.length||(T=Object.assign({},f),T.videoCapabilities=y,T.audioCapabilities=m,r.push(T));if(!r.length)throw x=Error("Unsupported keySystem or supportedConfigurations."),x.name="NotSupportedError",x.code=DOMException.NOT_SUPPORTED_ERR,x;return _(U,Qy.call(n,e,r),2)}return D=U.h,N=R=null,r[0]&&(r[0].videoCapabilities&&(R=r[0].videoCapabilities[0].encryptionScheme),r[0].audioCapabilities&&(N=r[0].audioCapabilities[0].encryptionScheme)),U.return(new Wv(D,R,N))})}function hA(e,t){return e&&e.filter(function(n){return HS(n.encryptionScheme,t)})}Pe("EmeEncryptionSchemePolyfill",fA),fA.install=dA;function yA(){}var Jy;function gA(){Jy||navigator.mediaCapabilitiesEncryptionSchemePolyfilled?console.debug("McEncryptionSchemePolyfill: Already installed."):navigator.mediaCapabilities?(Jy=navigator.mediaCapabilities.decodingInfo,console.debug("McEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.mediaCapabilities.decodingInfo=Ck,navigator.mediaCapabilitiesEncryptionSchemePolyfilled=!0):console.debug("McEncryptionSchemePolyfill: MediaCapabilities not found")}function Ck(e){var t=this,n,i;return z(function(r){switch(r.g){case 1:return console.assert(t==navigator.mediaCapabilities,'bad "this" for decodingInfo'),_(r,Jy.call(t,e),2);case 2:if(n=r.h,!n.supported||!e.keySystemConfiguration)return r.return(n);if((i=n.keySystemAccess)&&wA(i))return console.debug("McEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.mediaCapabilities.decodingInfo=Jy,r.return(n);if(console.debug("McEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support."),navigator.mediaCapabilities.decodingInfo=mA,i){r.s(3);break}return _(r,vA(e),4);case 4:return n.keySystemAccess=r.h,r.return(n);case 3:return r.return(mA.call(t,e))}})}function mA(e){var t=this,n,i,r,l,c,f,y;return z(function(m){switch(m.g){case 1:return console.assert(t==navigator.mediaCapabilities,'bad "this" for decodingInfo'),i=n=null,!e.keySystemConfiguration||(r=e.keySystemConfiguration,l=r.keySystem,i=r.audio&&r.audio.encryptionScheme,n=r.video&&r.video.encryptionScheme,c=SA(l),f={powerEfficient:!1,smooth:!1,supported:!1,keySystemAccess:null,configuration:e},HS(i,c)&&HS(n,c))?_(m,Jy.call(t,e),2):m.return(f);case 2:if(y=m.h,y.keySystemAccess){y.keySystemAccess=new Wv(y.keySystemAccess,n,i),m.s(3);break}if(!e.keySystemConfiguration){m.s(3);break}return _(m,vA(e),5);case 5:y.keySystemAccess=m.h;case 3:return m.return(y)}})}function vA(e){var t,n;return z(function(i){if(i.g==1){var r=e.keySystemConfiguration,l=[],c=[];return r.audio&&l.push({robustness:r.audio.robustness||"",contentType:e.audio.contentType,encryptionScheme:r.audio.encryptionScheme}),r.video&&c.push({robustness:r.video.robustness||"",contentType:e.video.contentType,encryptionScheme:r.video.encryptionScheme}),r={initDataTypes:r.initDataType?[r.initDataType]:[],distinctiveIdentifier:r.distinctiveIdentifier,persistentState:r.persistentState,sessionTypes:r.sessionTypes},l.length&&(r.audioCapabilities=l),c.length&&(r.videoCapabilities=c),t=r,_(i,navigator.requestMediaKeySystemAccess(e.keySystemConfiguration.keySystem,[t]),2)}return n=i.h,i.return(n)})}Pe("McEncryptionSchemePolyfill",yA),yA.install=gA;function Wv(e,t,n){this.g=e,this.i=t||null,this.h=n||null,this.keySystem=e.keySystem}Wv.prototype.getConfiguration=function(){var e=this.g.getConfiguration();if(e.videoCapabilities)for(var t=b(e.videoCapabilities),n=t.next();!n.done;n=t.next())n.value.encryptionScheme=this.i;if(e.audioCapabilities)for(t=b(e.audioCapabilities),n=t.next();!n.done;n=t.next())n.value.encryptionScheme=this.h;return e},Wv.prototype.createMediaKeys=function(){return this.g.createMediaKeys()};function SA(e){return e.startsWith("com.widevine")||e.startsWith("com.microsoft")||e.startsWith("com.chromecast")||e.startsWith("com.adobe")||e.startsWith("org.w3")?"cenc":e.startsWith("com.apple")?"cbcs":e.startsWith("com.huawei")?"cenc":(console.warn("EmeEncryptionSchemePolyfill: Unknown key system:",e,"Please contribute!"),null)}function wA(e){e=e.getConfiguration();var t=e.audioCapabilities&&e.audioCapabilities[0];return!!((e=e.videoCapabilities&&e.videoCapabilities[0]||t)&&e.encryptionScheme!==void 0)}function HS(e,t){return!!(!e||e==t||(e=="cbcs"||e=="cbcs-1-9")&&(Ik||Dk||bk))}function KS(){}function TA(){dA(),gA()}Pe("EncryptionSchemePolyfills",KS),KS.install=TA;var bk=navigator.userAgent.includes("CrKey"),Ik=100<=parseInt(navigator.userAgent.split("Firefox/").pop(),10),qS,xA=navigator.userAgent||"";if(xA.includes("Web0S")){var EA=xA.match(/Chrome\/(\d+)/);qS=EA?79<=parseInt(EA[1],10):!1}else qS=!1;var Dk=qS;typeof O<"u"&&O.exports&&(O.exports=KS)}).call(k,A,A,void 0);for(var S in k.shaka)E[S]=k.shaka[S]})()}(T2)),T2}var SM=vM();const pC=Np(SM);function wM(){const[E,A]=ve.useState(""),[k,S]=ve.useState(""),[w,P]=ve.useState(""),[O,h]=ve.useState(""),s=ve.useRef(null),a=ve.useRef(null),p=$=>{A($.target.value)},v=$=>{S($.target.value)},M=$=>{P($.target.value)},F=$=>{h($.target.value)},b=()=>{if(s.current&&!a.current){const $=new pC.Player(s.current);a.current=$,$.addEventListener("error",ce=>{console.error("Error code",ce.detail.code,"object",ce.detail)})}},J=()=>{if(E&&k&&w){const $=k.split(`
`).map(be=>be.trim()),ce=w.split(`
`).map(be=>be.trim());if($.length!==ce.length){console.error("The number of KIDs and Keys must be the same.");return}const Re=new pC.Player(s.current),ee={drm:{clearKeys:{}}};$.forEach((be,Oe)=>{ee.drm.clearKeys[be]=ce[Oe]}),console.log("Configuring player with the following DRM config and headers:",ee),Re.configure(ee),Re.load(E).then(()=>{console.log("Video loaded")}).catch(be=>{console.error("Error loading the video",be)})}else console.error("MPD URL, KIDs, and Keys are required.")};return ve.useEffect(()=>{b()},[]),te.jsxs("div",{className:"flex flex-col items-center w-full p-4",children:[te.jsx(Mp,{children:te.jsx("title",{children:"Test Player"})}),te.jsxs("div",{className:"w-full flex flex-col",children:[te.jsx("video",{ref:s,width:"100%",height:"auto",controls:!0,className:"h-96"}),te.jsx("input",{type:"text",value:E,onChange:p,placeholder:"MPD URL",className:"border-2 border-rose-700/50 mt-2 text-white p-1 rounded transition-all ease-in-out focus:outline-none focus:ring-2 focus:ring-rose-700/50 duration-200"}),te.jsx("textarea",{placeholder:"KIDs (one per line)",value:k,onChange:v,className:"border-2 border-rose-700/50 mt-2 text-white p-1 overflow-y-auto rounded transition-all ease-in-out focus:outline-none focus:ring-2 focus:ring-rose-700/50 duration-200"}),te.jsx("textarea",{placeholder:"Keys (one per line)",value:w,onChange:M,className:"border-2 border-rose-700/50 mt-2 text-white p-1 overflow-y-auto rounded transition-all ease-in-out focus:outline-none focus:ring-2 focus:ring-rose-700/50 duration-200"}),te.jsx("textarea",{placeholder:"Headers (one per line)",value:O,onChange:F,className:"border-2 border-rose-700/50 mt-2 text-white p-1 overflow-y-auto rounded transition-all ease-in-out focus:outline-none focus:ring-2 focus:ring-rose-700/50 duration-200"}),te.jsx("button",{onClick:J,className:"mt-4 p-2 bg-blue-500 text-white rounded",children:"Submit"})]})]})}const WC="data:image/svg+xml,%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3c!--%20Uploaded%20to:%20SVG%20Repo,%20www.svgrepo.com,%20Transformed%20by:%20SVG%20Repo%20Mixer%20Tools%20--%3e%3csvg%20width='800px'%20height='800px'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%20stroke='%23ffffff'%3e%3cg%20id='SVGRepo_bgCarrier'%20stroke-width='0'/%3e%3cg%20id='SVGRepo_tracerCarrier'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cg%20id='SVGRepo_iconCarrier'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M8%200L0%206V8H1V15H4V10H7V15H15V8H16V6L14%204.5V1H11V2.25L8%200ZM9%2010H12V13H9V10Z'%20fill='%23ffffff'/%3e%3c/g%3e%3c/svg%3e",QC="data:image/svg+xml,%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3c!--%20Uploaded%20to:%20SVG%20Repo,%20www.svgrepo.com,%20Transformed%20by:%20SVG%20Repo%20Mixer%20Tools%20--%3e%3csvg%20height='800px'%20width='800px'%20version='1.1'%20id='_x32_'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20viewBox='0%200%20512%20512'%20xml:space='preserve'%20fill='%23000000'%3e%3cg%20id='SVGRepo_bgCarrier'%20stroke-width='0'/%3e%3cg%20id='SVGRepo_tracerCarrier'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cg%20id='SVGRepo_iconCarrier'%3e%3cstyle%20type='text/css'%3e%20.st0{fill:%23ffffff;}%20%3c/style%3e%3cg%3e%3cpath%20class='st0'%20d='M0,17.067V153.6h512V17.067H0z%20M110.933,110.925h-51.2v-51.2h51.2V110.925z'/%3e%3cpath%20class='st0'%20d='M0,324.267h512V187.733H0V324.267z%20M59.733,230.391h51.2v51.2h-51.2V230.391z'/%3e%3cpath%20class='st0'%20d='M0,494.933h512V358.4H0V494.933z%20M59.733,401.058h51.2v51.2h-51.2V401.058z'/%3e%3c/g%3e%3c/g%3e%3c/svg%3e",JC="data:image/svg+xml,%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3c!--%20Uploaded%20to:%20SVG%20Repo,%20www.svgrepo.com,%20Transformed%20by:%20SVG%20Repo%20Mixer%20Tools%20--%3e%3csvg%20width='800px'%20height='800px'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20id='SVGRepo_bgCarrier'%20stroke-width='0'/%3e%3cg%20id='SVGRepo_tracerCarrier'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cg%20id='SVGRepo_iconCarrier'%3e%3cpath%20d='M7%208L3%2011.6923L7%2016M17%208L21%2011.6923L17%2016M14%204L10%2020'%20stroke='%23ffffff'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/g%3e%3c/svg%3e",ZC="data:image/svg+xml,%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3c!--%20Uploaded%20to:%20SVG%20Repo,%20www.svgrepo.com,%20Transformed%20by:%20SVG%20Repo%20Mixer%20Tools%20--%3e%3csvg%20fill='%23ffffff'%20height='800px'%20width='800px'%20version='1.1'%20id='Layer_1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20viewBox='0%200%20491.52%20491.52'%20xml:space='preserve'%3e%3cg%20id='SVGRepo_bgCarrier'%20stroke-width='0'/%3e%3cg%20id='SVGRepo_tracerCarrier'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cg%20id='SVGRepo_iconCarrier'%3e%3cg%3e%3cg%3e%3cpath%20d='M0,0v327.68h491.52V0H0z%20M471.04,307.2H20.48V20.48h450.56V307.2z'/%3e%3c/g%3e%3c/g%3e%3cg%3e%3cg%3e%3cpath%20d='M194.56,87.77v141.9l122.88-70.95L194.56,87.77z%20M215.04,123.25l61.44,35.47l-61.44,35.47V123.25z'/%3e%3c/g%3e%3c/g%3e%3cg%3e%3cg%3e%3cpath%20d='M183.285,430.08c-4.758-23.34-25.441-40.96-50.165-40.96s-45.407,17.62-50.165,40.96H0v20.48h82.955%20c4.758,23.34,25.441,40.96,50.165,40.96s45.407-17.62,50.165-40.96H491.52v-20.48H183.285z%20M133.12,471.04%20c-16.94,0-30.72-13.78-30.72-30.72s13.78-30.72,30.72-30.72s30.72,13.78,30.72,30.72S150.06,471.04,133.12,471.04z'/%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/svg%3e",$C="data:image/svg+xml,%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3c!--%20Uploaded%20to:%20SVG%20Repo,%20www.svgrepo.com,%20Transformed%20by:%20SVG%20Repo%20Mixer%20Tools%20--%3e%3csvg%20width='800px'%20height='800px'%20viewBox='0%200%2024%2024'%20id='Layer_1'%20data-name='Layer%201'%20xmlns='http://www.w3.org/2000/svg'%20fill='%23000000'%3e%3cg%20id='SVGRepo_bgCarrier'%20stroke-width='0'/%3e%3cg%20id='SVGRepo_tracerCarrier'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cg%20id='SVGRepo_iconCarrier'%3e%3cdefs%3e%3cstyle%3e.cls-1{fill:none;stroke:%23ffffff;stroke-miterlimit:10;stroke-width:1.91px;}%3c/style%3e%3c/defs%3e%3ccircle%20class='cls-1'%20cx='12'%20cy='7.25'%20r='5.73'/%3e%3cpath%20class='cls-1'%20d='M1.5,23.48l.37-2.05A10.3,10.3,0,0,1,12,13h0a10.3,10.3,0,0,1,10.13,8.45l.37,2.05'/%3e%3c/g%3e%3c/svg%3e",eb="data:image/svg+xml,%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3c!--%20Uploaded%20to:%20SVG%20Repo,%20www.svgrepo.com,%20Transformed%20by:%20SVG%20Repo%20Mixer%20Tools%20--%3e%3csvg%20width='800px'%20height='800px'%20viewBox='0%200%2048%2048'%20xmlns='http://www.w3.org/2000/svg'%20fill='%23ffffff'%3e%3cg%20id='SVGRepo_bgCarrier'%20stroke-width='0'/%3e%3cg%20id='SVGRepo_tracerCarrier'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cg%20id='SVGRepo_iconCarrier'%3e%3cg%20id='Layer_2'%20data-name='Layer%202'%3e%3cg%20id='invisible_box'%20data-name='invisible%20box'%3e%3crect%20width='48'%20height='48'%20fill='none'/%3e%3c/g%3e%3cg%20id='Icons'%3e%3cg%3e%3cpath%20d='M20.1,20.5a2.3,2.3,0,0,0-2.2,2.4,2.3,2.3,0,0,0,2.2,2.4,2.4,2.4,0,0,0,0-4.8Z'/%3e%3cpath%20d='M28,20.5a2.4,2.4,0,1,0,2.2,2.4A2.3,2.3,0,0,0,28,20.5Z'/%3e%3cpath%20d='M38.5,2H9.5A4.5,4.5,0,0,0,5,6.5V36.3a4.5,4.5,0,0,0,4.5,4.5H34.1l-1.2-4.1,2.8,2.7,2.6,2.4L43,46V6.5A4.5,4.5,0,0,0,38.5,2ZM30.2,30.7l-1.5-1.8a6.9,6.9,0,0,0,4-2.6,15.1,15.1,0,0,1-2.5,1.3,14.6,14.6,0,0,1-3.2,1,15,15,0,0,1-5.6,0,20.2,20.2,0,0,1-3.2-1l-1.6-.7h-.2c0-.1,0-.1-.1-.1l-.6-.4a6.9,6.9,0,0,0,3.8,2.6l-1.4,1.8a8,8,0,0,1-6.7-3.3,29,29,0,0,1,3.2-12.8,10.3,10.3,0,0,1,6.1-2.3l.2.2a15.4,15.4,0,0,0-5.7,2.9l1.3-.6a12.7,12.7,0,0,1,4.9-1.4h.4a20.6,20.6,0,0,1,4.3,0,16.3,16.3,0,0,1,6.6,2.1,13.5,13.5,0,0,0-5.4-2.8l.3-.3a10.3,10.3,0,0,1,6.1,2.3,29.7,29.7,0,0,1,3.1,12.8S35,30.6,30.2,30.7Z'/%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/svg%3e",tb="data:image/svg+xml,%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3c!--%20Uploaded%20to:%20SVG%20Repo,%20www.svgrepo.com,%20Transformed%20by:%20SVG%20Repo%20Mixer%20Tools%20--%3e%3csvg%20fill='%23ffffff'%20width='800px'%20height='800px'%20viewBox='0%200%2032%2032'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20id='SVGRepo_bgCarrier'%20stroke-width='0'/%3e%3cg%20id='SVGRepo_tracerCarrier'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cg%20id='SVGRepo_iconCarrier'%3e%3ctitle%3etelegram%3c/title%3e%3cpath%20d='M22.122%2010.040c0.006-0%200.014-0%200.022-0%200.209%200%200.403%200.065%200.562%200.177l-0.003-0.002c0.116%200.101%200.194%200.243%200.213%200.403l0%200.003c0.020%200.122%200.031%200.262%200.031%200.405%200%200.065-0.002%200.129-0.007%200.193l0-0.009c-0.225%202.369-1.201%208.114-1.697%2010.766-0.21%201.123-0.623%201.499-1.023%201.535-0.869%200.081-1.529-0.574-2.371-1.126-1.318-0.865-2.063-1.403-3.342-2.246-1.479-0.973-0.52-1.51%200.322-2.384%200.221-0.23%204.052-3.715%204.127-4.031%200.004-0.019%200.006-0.040%200.006-0.062%200-0.078-0.029-0.149-0.076-0.203l0%200c-0.052-0.034-0.117-0.053-0.185-0.053-0.045%200-0.088%200.009-0.128%200.024l0.002-0.001q-0.198%200.045-6.316%204.174c-0.445%200.351-1.007%200.573-1.619%200.599l-0.006%200c-0.867-0.105-1.654-0.298-2.401-0.573l0.074%200.024c-0.938-0.306-1.683-0.467-1.619-0.985q0.051-0.404%201.114-0.827%206.548-2.853%208.733-3.761c1.607-0.853%203.47-1.555%205.429-2.010l0.157-0.031zM15.93%201.025c-8.302%200.020-15.025%206.755-15.025%2015.060%200%208.317%206.742%2015.060%2015.060%2015.060s15.060-6.742%2015.060-15.060c0-8.305-6.723-15.040-15.023-15.060h-0.002q-0.035-0-0.070%200z'/%3e%3c/g%3e%3c/svg%3e",nb="data:image/svg+xml,%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3c!--%20Uploaded%20to:%20SVG%20Repo,%20www.svgrepo.com,%20Transformed%20by:%20SVG%20Repo%20Mixer%20Tools%20--%3e%3csvg%20fill='%23ffffff'%20width='800px'%20height='800px'%20viewBox='0%200%2024%2024'%20role='img'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20id='SVGRepo_bgCarrier'%20stroke-width='0'/%3e%3cg%20id='SVGRepo_tracerCarrier'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cg%20id='SVGRepo_iconCarrier'%3e%3cpath%20d='M4.209%204.603c-.247%200-.525.02-.84.088-.333.07-1.28.283-2.054%201.027C-.403%207.25.035%209.685.089%2010.052c.065.446.263%201.687%201.21%202.768%201.749%202.141%205.513%202.092%205.513%202.092s.462%201.103%201.168%202.119c.955%201.263%201.936%202.248%202.89%202.367%202.406%200%207.212-.004%207.212-.004s.458.004%201.08-.394c.535-.324%201.013-.893%201.013-.893s.492-.527%201.18-1.73c.21-.37.385-.729.538-1.068%200%200%202.107-4.471%202.107-8.823-.042-1.318-.367-1.55-.443-1.627-.156-.156-.366-.153-.366-.153s-4.475.252-6.792.306c-.508.011-1.012.023-1.512.027v4.474l-.634-.301c0-1.39-.004-4.17-.004-4.17-1.107.016-3.405-.084-3.405-.084s-5.399-.27-5.987-.324c-.187-.011-.401-.032-.648-.032zm.354%201.832h.111s.271%202.269.6%203.597C5.549%2011.147%206.22%2013%206.22%2013s-.996-.119-1.641-.348c-.99-.324-1.409-.714-1.409-.714s-.73-.511-1.096-1.52C1.444%208.73%202.021%207.7%202.021%207.7s.32-.859%201.47-1.145c.395-.106.863-.12%201.072-.12zm8.33%202.554c.26.003.509.127.509.127l.868.422-.529%201.075a.686.686%200%200%200-.614.359.685.685%200%200%200%20.072.756l-.939%201.924a.69.69%200%200%200-.66.527.687.687%200%200%200%20.347.763.686.686%200%200%200%20.867-.206.688.688%200%200%200-.069-.882l.916-1.874a.667.667%200%200%200%20.237-.02.657.657%200%200%200%20.271-.137%208.826%208.826%200%200%201%201.016.512.761.761%200%200%201%20.286.282c.073.21-.073.569-.073.569-.087.29-.702%201.55-.702%201.55a.692.692%200%200%200-.676.477.681.681%200%201%200%201.157-.252c.073-.141.141-.282.214-.431.19-.397.515-1.16.515-1.16.035-.066.218-.394.103-.814-.095-.435-.48-.638-.48-.638-.467-.301-1.116-.58-1.116-.58s0-.156-.042-.27a.688.688%200%200%200-.148-.241l.516-1.062%202.89%201.401s.48.218.583.619c.073.282-.019.534-.069.657-.24.587-2.1%204.317-2.1%204.317s-.232.554-.748.588a1.065%201.065%200%200%201-.393-.045l-.202-.08-4.31-2.1s-.417-.218-.49-.596c-.083-.31.104-.691.104-.691l2.073-4.272s.183-.37.466-.497a.855.855%200%200%201%20.35-.077z'/%3e%3c/g%3e%3c/svg%3e";function TM(){const[E,A]=ve.useState({discord:"#",telegram:"#",gitea:"#"});return ve.useEffect(()=>{fetch("/api/links").then(k=>k.json()).then(k=>A(k)).catch(k=>console.error("Error fetching links:",k))},[]),te.jsxs("div",{className:"flex flex-col w-full h-full bg-white/1",children:[te.jsx("div",{children:te.jsx("p",{className:"text-white text-2xl font-bold p-3 text-center mb-5",children:te.jsx("a",{href:"/",children:"CDRM-Project"})})}),te.jsxs("div",{className:"overflow-y-auto grow flex flex-col",children:[te.jsxs(Jl,{to:"/",className:({isActive:k})=>`flex flex-row p-3 border-l-3 ${k?"border-l-sky-500/50 bg-black/50":"hover:border-l-sky-500/50 hover:bg-white/5"}`,children:[te.jsx("button",{className:"w-1/3 p-3 flex flex-col items-center justify-center cursor-pointer",children:te.jsx("img",{src:WC,alt:"Home",className:"w-1/2 cursor-pointer"})}),te.jsx("p",{className:"grow text-white md:text-2xl font-bold flex items-center justify-start",children:"Home"})]}),te.jsxs(Jl,{to:"/cache",className:({isActive:k})=>`flex flex-row p-3 border-l-3 ${k?"border-l-emerald-500/50 bg-black/50":"hover:border-l-emerald-500/50 hover:bg-white/5"}`,children:[te.jsx("button",{className:"w-1/3 p-3 flex flex-col items-center justify-center cursor-pointer",children:te.jsx("img",{src:QC,alt:"Cache",className:"w-1/2 cursor-pointer"})}),te.jsx("p",{className:"grow text-white md:text-2xl font-bold flex items-center justify-start",children:"Cache"})]}),te.jsxs(Jl,{to:"/api",className:({isActive:k})=>`flex flex-row p-3 border-l-3 ${k?"border-l-indigo-500/50 bg-black/50":"hover:border-l-indigo-500/50 hover:bg-white/5"}`,children:[te.jsx("button",{className:"w-1/3 p-3 flex flex-col items-center justify-center cursor-pointer",children:te.jsx("img",{src:JC,alt:"API",className:"w-1/2 cursor-pointer"})}),te.jsx("p",{className:"grow text-white md:text-2xl font-bold flex items-center justify-start",children:"API"})]}),te.jsxs(Jl,{to:"/testplayer",className:({isActive:k})=>`flex flex-row p-3 border-l-3 ${k?"border-l-rose-500/50 bg-black/50":"hover:border-l-rose-500/50 hover:bg-white/5"}`,children:[te.jsx("button",{className:"w-1/3 p-3 flex flex-col items-center justify-center cursor-pointer",children:te.jsx("img",{src:ZC,alt:"Test Player",className:"w-1/2 cursor-pointer"})}),te.jsx("p",{className:"grow text-white md:text-2xl font-bold flex items-center justify-start",children:"Test Player"})]}),te.jsx("div",{className:"mt-auto",children:te.jsxs(Jl,{to:"/account",className:({isActive:k})=>`flex flex-row p-3 border-l-3 ${k?"border-l-yellow-500/50 bg-black/50":"hover:border-l-yellow-500/50 hover:bg-white/5"}`,children:[te.jsx("button",{className:"w-1/3 p-3 flex flex-col items-center justify-center cursor-pointer",children:te.jsx("img",{src:$C,alt:"Account",className:"w-1/2 cursor-pointer"})}),te.jsx("p",{className:"grow text-white md:text-2xl font-bold flex items-center justify-start",children:"My Account"})]})})]}),te.jsxs("div",{className:"flex flex-row w-full h-16 bg-black/25",children:[te.jsx("a",{href:E.discord,target:"_blank",rel:"noopener noreferrer",className:"w-1/3 p-3 flex flex-col items-center justify-center cursor-pointer hover:bg-blue-950 group",children:te.jsx("img",{src:eb,alt:"Discord",className:"w-1/2 group-hover:animate-bounce"})}),te.jsx("a",{href:E.telegram,target:"_blank",rel:"noopener noreferrer",className:"w-1/3 p-3 flex flex-col items-center justify-center cursor-pointer hover:bg-blue-400 group",children:te.jsx("img",{src:tb,alt:"Telegram",className:"w-1/2 group-hover:animate-bounce"})}),te.jsx("a",{href:E.gitea,target:"_blank",rel:"noopener noreferrer",className:"w-1/3 p-3 flex flex-col items-center justify-center cursor-pointer hover:bg-green-700 group",children:te.jsx("img",{src:nb,alt:"Gitea",className:"w-1/2 group-hover:animate-bounce"})})]})]})}const xM="data:image/svg+xml,%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3c!--%20Uploaded%20to:%20SVG%20Repo,%20www.svgrepo.com,%20Transformed%20by:%20SVG%20Repo%20Mixer%20Tools%20--%3e%3csvg%20width='800px'%20height='800px'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20id='SVGRepo_bgCarrier'%20stroke-width='0'/%3e%3cg%20id='SVGRepo_tracerCarrier'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cg%20id='SVGRepo_iconCarrier'%3e%3cpath%20d='M20%207L4%207'%20stroke='%23ffffff'%20stroke-width='1.5'%20stroke-linecap='round'/%3e%3cpath%20d='M20%2012L4%2012'%20stroke='%23ffffff'%20stroke-width='1.5'%20stroke-linecap='round'/%3e%3cpath%20d='M20%2017L4%2017'%20stroke='%23ffffff'%20stroke-width='1.5'%20stroke-linecap='round'/%3e%3c/g%3e%3c/svg%3e";function EM({setIsMenuOpen:E}){const A=()=>{E(k=>!k)};return te.jsxs("div",{className:"flex flex-row w-full h-full bg-white/1",children:[te.jsx("button",{className:"w-24 p-4",onClick:A,children:te.jsx("img",{src:xM,alt:"Menu",className:"w-full h-full cursor-pointer"})}),te.jsx("p",{className:"grow text-white md:text-2xl font-bold text-center flex items-center justify-center p-4",children:"CDRM-Project"}),te.jsx("div",{className:"w-24 p-4"})]})}const AM="data:image/svg+xml,%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3c!--%20Uploaded%20to:%20SVG%20Repo,%20www.svgrepo.com,%20Transformed%20by:%20SVG%20Repo%20Mixer%20Tools%20--%3e%3csvg%20width='800px'%20height='800px'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20id='SVGRepo_bgCarrier'%20stroke-width='0'/%3e%3cg%20id='SVGRepo_tracerCarrier'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cg%20id='SVGRepo_iconCarrier'%3e%3ccircle%20cx='12'%20cy='12'%20r='10'%20stroke='%23ffffff'%20stroke-width='1.5'/%3e%3cpath%20d='M14.5%209.50002L9.5%2014.5M9.49998%209.5L14.5%2014.5'%20stroke='%23ffffff'%20stroke-width='1.5'%20stroke-linecap='round'/%3e%3c/g%3e%3c/svg%3e";function CM({isMenuOpen:E,setIsMenuOpen:A}){const[k,S]=ve.useState({discord:"#",telegram:"#",gitea:"#"});return ve.useEffect(()=>{fetch("/api/links").then(w=>w.json()).then(w=>S(w)).catch(w=>console.error("Failed to fetch links:",w))},[]),te.jsx("div",{className:`flex flex-col fixed top-0 left-0 w-full h-full bg-black transition-transform transform ${E?"translate-x-0":"-translate-x-full"} z-50`,style:{transitionDuration:"0.3s"},children:te.jsxs("div",{className:"flex flex-col bg-gray-950/55 h-full",children:[te.jsxs("div",{className:"h-16 w-full border-b-2 border-white/5 flex flex-row",children:[te.jsx("div",{className:"w-1/4 h-full"}),te.jsx("p",{className:"grow text-white md:text-2xl font-bold text-center flex items-center justify-center p-4",children:"CDRM-Project"}),te.jsx("div",{className:"w-1/4 h-full",children:te.jsx("button",{className:"w-full h-full flex items-center justify-center",onClick:()=>A(!1),children:te.jsx("img",{src:AM,alt:"Close",className:"w-1/2 h-1/2 cursor-pointer"})})})]}),te.jsxs("div",{className:"overflow-y-auto flex flex-col p-5 w-full flex-grow",children:[te.jsxs("div",{className:"flex flex-col space-y-2",children:[te.jsxs(Jl,{to:"/",className:({isActive:w})=>`flex flex-row items-center gap-3 p-3 border-l-4 ${w?"border-l-sky-500/50 bg-black/50 text-white":"border-transparent hover:border-l-sky-500/50 hover:bg-white/5 text-white/80"}`,onClick:()=>A(!1),children:[te.jsx("img",{src:WC,alt:"Home",className:"w-5 h-5"}),te.jsx("span",{className:"text-lg",children:"Home"})]}),te.jsxs(Jl,{to:"/cache",className:({isActive:w})=>`flex flex-row items-center gap-3 p-3 border-l-4 ${w?"border-l-emerald-500/50 bg-black/50 text-white":"border-transparent hover:border-l-emerald-500/50 hover:bg-white/5 text-white/80"}`,onClick:()=>A(!1),children:[te.jsx("img",{src:QC,alt:"Cache",className:"w-5 h-5"}),te.jsx("span",{className:"text-lg",children:"Cache"})]}),te.jsxs(Jl,{to:"/api",className:({isActive:w})=>`flex flex-row items-center gap-3 p-3 border-l-4 ${w?"border-l-indigo-500/50 bg-black/50 text-white":"border-transparent hover:border-l-indigo-500/50 hover:bg-white/5 text-white/80"}`,onClick:()=>A(!1),children:[te.jsx("img",{src:JC,alt:"API",className:"w-5 h-5"}),te.jsx("span",{className:"text-lg",children:"API"})]}),te.jsxs(Jl,{to:"/testplayer",className:({isActive:w})=>`flex flex-row items-center gap-3 p-3 border-l-4 ${w?"border-l-rose-700/50 bg-black/50 text-white":"border-transparent hover:border-l-rose-700/50 hover:bg-white/5 text-white/80"}`,onClick:()=>A(!1),children:[te.jsx("img",{src:ZC,alt:"Test Player",className:"w-5 h-5"}),te.jsx("span",{className:"text-lg",children:"Test Player"})]})]}),te.jsx("div",{className:"mt-auto pt-4",children:te.jsxs(Jl,{to:"/account",className:({isActive:w})=>`flex flex-row items-center gap-3 p-3 border-l-4 ${w?"border-l-yellow-500/50 bg-black/50 text-white":"border-transparent hover:border-l-yellow-500/50 hover:bg-white/5 text-white/80"}`,onClick:()=>A(!1),children:[te.jsx("img",{src:$C,alt:"My Account",className:"w-5 h-5"}),te.jsx("span",{className:"text-lg",children:"My Account"})]})})]}),te.jsxs("div",{className:"h-16 w-full flex flex-row bg-black/5",children:[te.jsx("a",{href:k.discord,target:"_blank",rel:"noopener noreferrer",className:"w-1/3 h-full flex items-center justify-center hover:bg-blue-950 group",children:te.jsx("img",{src:eb,alt:"Discord",className:"w-full h-2/3 p-1 cursor-pointer group-hover:animate-bounce"})}),te.jsx("a",{href:k.telegram,target:"_blank",rel:"noopener noreferrer",className:"w-1/3 h-full flex items-center justify-center hover:bg-blue-400 group",children:te.jsx("img",{src:tb,alt:"Telegram",className:"w-full h-2/3 p-1 cursor-pointer group-hover:animate-bounce"})}),te.jsx("a",{href:k.gitea,target:"_blank",rel:"noopener noreferrer",className:"w-1/3 h-full flex items-center justify-center hover:bg-green-700 group",children:te.jsx("img",{src:nb,alt:"Gitea",className:"w-full h-2/3 p-1 cursor-pointer group-hover:animate-bounce"})})]})]})})}function bM(){const[E,A]=ve.useState(""),[k,S]=ve.useState(""),[w,P]=ve.useState(""),O=p=>/^[A-Za-z0-9_-]+$/.test(p),h=p=>/^\S+$/.test(p),s=async()=>{if(!O(E)){P("Invalid username. Use only letters, numbers, hyphens, or underscores.");return}if(!h(k)){P("Invalid password. Spaces are not allowed.");return}try{const v=await(await fetch("/register",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({username:E,password:k})})).json();v.message?P(v.message):v.error&&P(v.error)}catch{P("An error occurred while registering.")}},a=async()=>{if(!O(E)){P("Invalid username. Use only letters, numbers, hyphens, or underscores.");return}if(!h(k)){P("Invalid password. Spaces are not allowed.");return}try{const v=await(await fetch("/login",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({username:E,password:k})})).json();v.message?window.location.reload():v.error&&P(v.error)}catch{P("An error occurred while logging in.")}};return te.jsx("div",{className:"flex flex-col w-full h-full items-center justify-center p-4",children:te.jsxs("div",{className:"flex flex-col w-full h-full lg:w-1/2 lg:h-96 border-2 border-yellow-500/50 rounded-2xl p-4 overflow-x-auto justify-center items-center",children:[te.jsxs("div",{className:"flex flex-col w-full",children:[te.jsx("label",{htmlFor:"username",className:"text-lg font-bold mb-2 text-white",children:"Username:"}),te.jsx("input",{type:"text",value:E,onChange:p=>A(p.target.value),placeholder:"Username",className:"mb-4 p-2 border border-gray-300 rounded text-white bg-transparent"}),te.jsx("label",{htmlFor:"password",className:"text-lg font-bold mb-2 text-white",children:"Password:"}),te.jsx("input",{type:"password",value:k,onChange:p=>S(p.target.value),placeholder:"Password",className:"mb-4 p-2 border border-gray-300 rounded text-white bg-transparent"})]}),te.jsxs("div",{className:"flex flex-col lg:flex-row w-8/10 items-center lg:justify-between mt-4",children:[te.jsx("button",{onClick:a,className:"bg-yellow-500 hover:bg-yellow-600 text-white font-bold py-2 px-4 rounded mt-4 w-1/3",children:"Login"}),te.jsx("button",{onClick:s,className:"bg-yellow-500 hover:bg-yellow-600 text-white font-bold py-2 px-4 rounded mt-4 w-1/3",children:"Register"})]}),w&&te.jsx("p",{className:"text-sm text-white mt-4 p-4",children:w})]})})}function ib(E,A){return function(){return E.apply(A,arguments)}}const{toString:IM}=Object.prototype,{getPrototypeOf:q2}=Object,{iterator:v0,toStringTag:rb}=Symbol,S0=(E=>A=>{const k=IM.call(A);return E[k]||(E[k]=k.slice(8,-1).toLowerCase())})(Object.create(null)),$l=E=>(E=E.toLowerCase(),A=>S0(A)===E),w0=E=>A=>typeof A===E,{isArray:_p}=Array,pg=w0("undefined");function DM(E){return E!==null&&!pg(E)&&E.constructor!==null&&!pg(E.constructor)&&eo(E.constructor.isBuffer)&&E.constructor.isBuffer(E)}const ob=$l("ArrayBuffer");function OM(E){let A;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?A=ArrayBuffer.isView(E):A=E&&E.buffer&&ob(E.buffer),A}const kM=w0("string"),eo=w0("function"),lb=w0("number"),T0=E=>E!==null&&typeof E=="object",RM=E=>E===!0||E===!1,u0=E=>{if(S0(E)!=="object")return!1;const A=q2(E);return(A===null||A===Object.prototype||Object.getPrototypeOf(A)===null)&&!(rb in E)&&!(v0 in E)},MM=$l("Date"),NM=$l("File"),PM=$l("Blob"),LM=$l("FileList"),_M=E=>T0(E)&&eo(E.pipe),UM=E=>{let A;return E&&(typeof FormData=="function"&&E instanceof FormData||eo(E.append)&&((A=S0(E))==="formdata"||A==="object"&&eo(E.toString)&&E.toString()==="[object FormData]"))},jM=$l("URLSearchParams"),[BM,VM,HM,KM]=["ReadableStream","Request","Response","Headers"].map($l),qM=E=>E.trim?E.trim():E.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function mg(E,A,{allOwnKeys:k=!1}={}){if(E===null||typeof E>"u")return;let S,w;if(typeof E!="object"&&(E=[E]),_p(E))for(S=0,w=E.length;S<w;S++)A.call(null,E[S],S,E);else{const P=k?Object.getOwnPropertyNames(E):Object.keys(E),O=P.length;let h;for(S=0;S<O;S++)h=P[S],A.call(null,E[h],h,E)}}function ab(E,A){A=A.toLowerCase();const k=Object.keys(E);let S=k.length,w;for(;S-- >0;)if(w=k[S],A===w.toLowerCase())return w;return null}const Kf=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,ub=E=>!pg(E)&&E!==Kf;function M2(){const{caseless:E}=ub(this)&&this||{},A={},k=(S,w)=>{const P=E&&ab(A,w)||w;u0(A[P])&&u0(S)?A[P]=M2(A[P],S):u0(S)?A[P]=M2({},S):_p(S)?A[P]=S.slice():A[P]=S};for(let S=0,w=arguments.length;S<w;S++)arguments[S]&&mg(arguments[S],k);return A}const FM=(E,A,k,{allOwnKeys:S}={})=>(mg(A,(w,P)=>{k&&eo(w)?E[P]=ib(w,k):E[P]=w},{allOwnKeys:S}),E),zM=E=>(E.charCodeAt(0)===65279&&(E=E.slice(1)),E),GM=(E,A,k,S)=>{E.prototype=Object.create(A.prototype,S),E.prototype.constructor=E,Object.defineProperty(E,"super",{value:A.prototype}),k&&Object.assign(E.prototype,k)},XM=(E,A,k,S)=>{let w,P,O;const h={};if(A=A||{},E==null)return A;do{for(w=Object.getOwnPropertyNames(E),P=w.length;P-- >0;)O=w[P],(!S||S(O,E,A))&&!h[O]&&(A[O]=E[O],h[O]=!0);E=k!==!1&&q2(E)}while(E&&(!k||k(E,A))&&E!==Object.prototype);return A},YM=(E,A,k)=>{E=String(E),(k===void 0||k>E.length)&&(k=E.length),k-=A.length;const S=E.indexOf(A,k);return S!==-1&&S===k},WM=E=>{if(!E)return null;if(_p(E))return E;let A=E.length;if(!lb(A))return null;const k=new Array(A);for(;A-- >0;)k[A]=E[A];return k},QM=(E=>A=>E&&A instanceof E)(typeof Uint8Array<"u"&&q2(Uint8Array)),JM=(E,A)=>{const S=(E&&E[v0]).call(E);let w;for(;(w=S.next())&&!w.done;){const P=w.value;A.call(E,P[0],P[1])}},ZM=(E,A)=>{let k;const S=[];for(;(k=E.exec(A))!==null;)S.push(k);return S},$M=$l("HTMLFormElement"),eN=E=>E.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(k,S,w){return S.toUpperCase()+w}),hC=(({hasOwnProperty:E})=>(A,k)=>E.call(A,k))(Object.prototype),tN=$l("RegExp"),sb=(E,A)=>{const k=Object.getOwnPropertyDescriptors(E),S={};mg(k,(w,P)=>{let O;(O=A(w,P,E))!==!1&&(S[P]=O||w)}),Object.defineProperties(E,S)},nN=E=>{sb(E,(A,k)=>{if(eo(E)&&["arguments","caller","callee"].indexOf(k)!==-1)return!1;const S=E[k];if(eo(S)){if(A.enumerable=!1,"writable"in A){A.writable=!1;return}A.set||(A.set=()=>{throw Error("Can not rewrite read-only method '"+k+"'")})}})},iN=(E,A)=>{const k={},S=w=>{w.forEach(P=>{k[P]=!0})};return _p(E)?S(E):S(String(E).split(A)),k},rN=()=>{},oN=(E,A)=>E!=null&&Number.isFinite(E=+E)?E:A;function lN(E){return!!(E&&eo(E.append)&&E[rb]==="FormData"&&E[v0])}const aN=E=>{const A=new Array(10),k=(S,w)=>{if(T0(S)){if(A.indexOf(S)>=0)return;if(!("toJSON"in S)){A[w]=S;const P=_p(S)?[]:{};return mg(S,(O,h)=>{const s=k(O,w+1);!pg(s)&&(P[h]=s)}),A[w]=void 0,P}}return S};return k(E,0)},uN=$l("AsyncFunction"),sN=E=>E&&(T0(E)||eo(E))&&eo(E.then)&&eo(E.catch),cb=((E,A)=>E?setImmediate:A?((k,S)=>(Kf.addEventListener("message",({source:w,data:P})=>{w===Kf&&P===k&&S.length&&S.shift()()},!1),w=>{S.push(w),Kf.postMessage(k,"*")}))(`axios@${Math.random()}`,[]):k=>setTimeout(k))(typeof setImmediate=="function",eo(Kf.postMessage)),cN=typeof queueMicrotask<"u"?queueMicrotask.bind(Kf):typeof process<"u"&&process.nextTick||cb,fN=E=>E!=null&&eo(E[v0]),Ee={isArray:_p,isArrayBuffer:ob,isBuffer:DM,isFormData:UM,isArrayBufferView:OM,isString:kM,isNumber:lb,isBoolean:RM,isObject:T0,isPlainObject:u0,isReadableStream:BM,isRequest:VM,isResponse:HM,isHeaders:KM,isUndefined:pg,isDate:MM,isFile:NM,isBlob:PM,isRegExp:tN,isFunction:eo,isStream:_M,isURLSearchParams:jM,isTypedArray:QM,isFileList:LM,forEach:mg,merge:M2,extend:FM,trim:qM,stripBOM:zM,inherits:GM,toFlatObject:XM,kindOf:S0,kindOfTest:$l,endsWith:YM,toArray:WM,forEachEntry:JM,matchAll:ZM,isHTMLForm:$M,hasOwnProperty:hC,hasOwnProp:hC,reduceDescriptors:sb,freezeMethods:nN,toObjectSet:iN,toCamelCase:eN,noop:rN,toFiniteNumber:oN,findKey:ab,global:Kf,isContextDefined:ub,isSpecCompliantForm:lN,toJSONObject:aN,isAsyncFn:uN,isThenable:sN,setImmediate:cb,asap:cN,isIterable:fN};function Bt(E,A,k,S,w){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=E,this.name="AxiosError",A&&(this.code=A),k&&(this.config=k),S&&(this.request=S),w&&(this.response=w,this.status=w.status?w.status:null)}Ee.inherits(Bt,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:Ee.toJSONObject(this.config),code:this.code,status:this.status}}});const fb=Bt.prototype,db={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(E=>{db[E]={value:E}});Object.defineProperties(Bt,db);Object.defineProperty(fb,"isAxiosError",{value:!0});Bt.from=(E,A,k,S,w,P)=>{const O=Object.create(fb);return Ee.toFlatObject(E,O,function(s){return s!==Error.prototype},h=>h!=="isAxiosError"),Bt.call(O,E.message,A,k,S,w),O.cause=E,O.name=E.name,P&&Object.assign(O,P),O};const dN=null;function N2(E){return Ee.isPlainObject(E)||Ee.isArray(E)}function pb(E){return Ee.endsWith(E,"[]")?E.slice(0,-2):E}function yC(E,A,k){return E?E.concat(A).map(function(w,P){return w=pb(w),!k&&P?"["+w+"]":w}).join(k?".":""):A}function pN(E){return Ee.isArray(E)&&!E.some(N2)}const hN=Ee.toFlatObject(Ee,{},null,function(A){return/^is[A-Z]/.test(A)});function x0(E,A,k){if(!Ee.isObject(E))throw new TypeError("target must be an object");A=A||new FormData,k=Ee.toFlatObject(k,{metaTokens:!0,dots:!1,indexes:!1},!1,function(J,$){return!Ee.isUndefined($[J])});const S=k.metaTokens,w=k.visitor||p,P=k.dots,O=k.indexes,s=(k.Blob||typeof Blob<"u"&&Blob)&&Ee.isSpecCompliantForm(A);if(!Ee.isFunction(w))throw new TypeError("visitor must be a function");function a(b){if(b===null)return"";if(Ee.isDate(b))return b.toISOString();if(!s&&Ee.isBlob(b))throw new Bt("Blob is not supported. Use a Buffer instead.");return Ee.isArrayBuffer(b)||Ee.isTypedArray(b)?s&&typeof Blob=="function"?new Blob([b]):Buffer.from(b):b}function p(b,J,$){let ce=b;if(b&&!$&&typeof b=="object"){if(Ee.endsWith(J,"{}"))J=S?J:J.slice(0,-2),b=JSON.stringify(b);else if(Ee.isArray(b)&&pN(b)||(Ee.isFileList(b)||Ee.endsWith(J,"[]"))&&(ce=Ee.toArray(b)))return J=pb(J),ce.forEach(function(ee,be){!(Ee.isUndefined(ee)||ee===null)&&A.append(O===!0?yC([J],be,P):O===null?J:J+"[]",a(ee))}),!1}return N2(b)?!0:(A.append(yC($,J,P),a(b)),!1)}const v=[],M=Object.assign(hN,{defaultVisitor:p,convertValue:a,isVisitable:N2});function F(b,J){if(!Ee.isUndefined(b)){if(v.indexOf(b)!==-1)throw Error("Circular reference detected in "+J.join("."));v.push(b),Ee.forEach(b,function(ce,Re){(!(Ee.isUndefined(ce)||ce===null)&&w.call(A,ce,Ee.isString(Re)?Re.trim():Re,J,M))===!0&&F(ce,J?J.concat(Re):[Re])}),v.pop()}}if(!Ee.isObject(E))throw new TypeError("data must be an object");return F(E),A}function gC(E){const A={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(E).replace(/[!'()~]|%20|%00/g,function(S){return A[S]})}function F2(E,A){this._pairs=[],E&&x0(E,this,A)}const hb=F2.prototype;hb.append=function(A,k){this._pairs.push([A,k])};hb.toString=function(A){const k=A?function(S){return A.call(this,S,gC)}:gC;return this._pairs.map(function(w){return k(w[0])+"="+k(w[1])},"").join("&")};function yN(E){return encodeURIComponent(E).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function yb(E,A,k){if(!A)return E;const S=k&&k.encode||yN;Ee.isFunction(k)&&(k={serialize:k});const w=k&&k.serialize;let P;if(w?P=w(A,k):P=Ee.isURLSearchParams(A)?A.toString():new F2(A,k).toString(S),P){const O=E.indexOf("#");O!==-1&&(E=E.slice(0,O)),E+=(E.indexOf("?")===-1?"?":"&")+P}return E}class mC{constructor(){this.handlers=[]}use(A,k,S){return this.handlers.push({fulfilled:A,rejected:k,synchronous:S?S.synchronous:!1,runWhen:S?S.runWhen:null}),this.handlers.length-1}eject(A){this.handlers[A]&&(this.handlers[A]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(A){Ee.forEach(this.handlers,function(S){S!==null&&A(S)})}}const gb={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},gN=typeof URLSearchParams<"u"?URLSearchParams:F2,mN=typeof FormData<"u"?FormData:null,vN=typeof Blob<"u"?Blob:null,SN={isBrowser:!0,classes:{URLSearchParams:gN,FormData:mN,Blob:vN},protocols:["http","https","file","blob","url","data"]},z2=typeof window<"u"&&typeof document<"u",P2=typeof navigator=="object"&&navigator||void 0,wN=z2&&(!P2||["ReactNative","NativeScript","NS"].indexOf(P2.product)<0),TN=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",xN=z2&&window.location.href||"http://localhost",EN=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:z2,hasStandardBrowserEnv:wN,hasStandardBrowserWebWorkerEnv:TN,navigator:P2,origin:xN},Symbol.toStringTag,{value:"Module"})),mr={...EN,...SN};function AN(E,A){return x0(E,new mr.classes.URLSearchParams,Object.assign({visitor:function(k,S,w,P){return mr.isNode&&Ee.isBuffer(k)?(this.append(S,k.toString("base64")),!1):P.defaultVisitor.apply(this,arguments)}},A))}function CN(E){return Ee.matchAll(/\w+|\[(\w*)]/g,E).map(A=>A[0]==="[]"?"":A[1]||A[0])}function bN(E){const A={},k=Object.keys(E);let S;const w=k.length;let P;for(S=0;S<w;S++)P=k[S],A[P]=E[P];return A}function mb(E){function A(k,S,w,P){let O=k[P++];if(O==="__proto__")return!0;const h=Number.isFinite(+O),s=P>=k.length;return O=!O&&Ee.isArray(w)?w.length:O,s?(Ee.hasOwnProp(w,O)?w[O]=[w[O],S]:w[O]=S,!h):((!w[O]||!Ee.isObject(w[O]))&&(w[O]=[]),A(k,S,w[O],P)&&Ee.isArray(w[O])&&(w[O]=bN(w[O])),!h)}if(Ee.isFormData(E)&&Ee.isFunction(E.entries)){const k={};return Ee.forEachEntry(E,(S,w)=>{A(CN(S),w,k,0)}),k}return null}function IN(E,A,k){if(Ee.isString(E))try{return(A||JSON.parse)(E),Ee.trim(E)}catch(S){if(S.name!=="SyntaxError")throw S}return(k||JSON.stringify)(E)}const vg={transitional:gb,adapter:["xhr","http","fetch"],transformRequest:[function(A,k){const S=k.getContentType()||"",w=S.indexOf("application/json")>-1,P=Ee.isObject(A);if(P&&Ee.isHTMLForm(A)&&(A=new FormData(A)),Ee.isFormData(A))return w?JSON.stringify(mb(A)):A;if(Ee.isArrayBuffer(A)||Ee.isBuffer(A)||Ee.isStream(A)||Ee.isFile(A)||Ee.isBlob(A)||Ee.isReadableStream(A))return A;if(Ee.isArrayBufferView(A))return A.buffer;if(Ee.isURLSearchParams(A))return k.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),A.toString();let h;if(P){if(S.indexOf("application/x-www-form-urlencoded")>-1)return AN(A,this.formSerializer).toString();if((h=Ee.isFileList(A))||S.indexOf("multipart/form-data")>-1){const s=this.env&&this.env.FormData;return x0(h?{"files[]":A}:A,s&&new s,this.formSerializer)}}return P||w?(k.setContentType("application/json",!1),IN(A)):A}],transformResponse:[function(A){const k=this.transitional||vg.transitional,S=k&&k.forcedJSONParsing,w=this.responseType==="json";if(Ee.isResponse(A)||Ee.isReadableStream(A))return A;if(A&&Ee.isString(A)&&(S&&!this.responseType||w)){const O=!(k&&k.silentJSONParsing)&&w;try{return JSON.parse(A)}catch(h){if(O)throw h.name==="SyntaxError"?Bt.from(h,Bt.ERR_BAD_RESPONSE,this,null,this.response):h}}return A}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:mr.classes.FormData,Blob:mr.classes.Blob},validateStatus:function(A){return A>=200&&A<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};Ee.forEach(["delete","get","head","post","put","patch"],E=>{vg.headers[E]={}});const DN=Ee.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),ON=E=>{const A={};let k,S,w;return E&&E.split(`
`).forEach(function(O){w=O.indexOf(":"),k=O.substring(0,w).trim().toLowerCase(),S=O.substring(w+1).trim(),!(!k||A[k]&&DN[k])&&(k==="set-cookie"?A[k]?A[k].push(S):A[k]=[S]:A[k]=A[k]?A[k]+", "+S:S)}),A},vC=Symbol("internals");function ag(E){return E&&String(E).trim().toLowerCase()}function s0(E){return E===!1||E==null?E:Ee.isArray(E)?E.map(s0):String(E)}function kN(E){const A=Object.create(null),k=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let S;for(;S=k.exec(E);)A[S[1]]=S[2];return A}const RN=E=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(E.trim());function x2(E,A,k,S,w){if(Ee.isFunction(S))return S.call(this,A,k);if(w&&(A=k),!!Ee.isString(A)){if(Ee.isString(S))return A.indexOf(S)!==-1;if(Ee.isRegExp(S))return S.test(A)}}function MN(E){return E.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(A,k,S)=>k.toUpperCase()+S)}function NN(E,A){const k=Ee.toCamelCase(" "+A);["get","set","has"].forEach(S=>{Object.defineProperty(E,S+k,{value:function(w,P,O){return this[S].call(this,A,w,P,O)},configurable:!0})})}let to=class{constructor(A){A&&this.set(A)}set(A,k,S){const w=this;function P(h,s,a){const p=ag(s);if(!p)throw new Error("header name must be a non-empty string");const v=Ee.findKey(w,p);(!v||w[v]===void 0||a===!0||a===void 0&&w[v]!==!1)&&(w[v||s]=s0(h))}const O=(h,s)=>Ee.forEach(h,(a,p)=>P(a,p,s));if(Ee.isPlainObject(A)||A instanceof this.constructor)O(A,k);else if(Ee.isString(A)&&(A=A.trim())&&!RN(A))O(ON(A),k);else if(Ee.isObject(A)&&Ee.isIterable(A)){let h={},s,a;for(const p of A){if(!Ee.isArray(p))throw TypeError("Object iterator must return a key-value pair");h[a=p[0]]=(s=h[a])?Ee.isArray(s)?[...s,p[1]]:[s,p[1]]:p[1]}O(h,k)}else A!=null&&P(k,A,S);return this}get(A,k){if(A=ag(A),A){const S=Ee.findKey(this,A);if(S){const w=this[S];if(!k)return w;if(k===!0)return kN(w);if(Ee.isFunction(k))return k.call(this,w,S);if(Ee.isRegExp(k))return k.exec(w);throw new TypeError("parser must be boolean|regexp|function")}}}has(A,k){if(A=ag(A),A){const S=Ee.findKey(this,A);return!!(S&&this[S]!==void 0&&(!k||x2(this,this[S],S,k)))}return!1}delete(A,k){const S=this;let w=!1;function P(O){if(O=ag(O),O){const h=Ee.findKey(S,O);h&&(!k||x2(S,S[h],h,k))&&(delete S[h],w=!0)}}return Ee.isArray(A)?A.forEach(P):P(A),w}clear(A){const k=Object.keys(this);let S=k.length,w=!1;for(;S--;){const P=k[S];(!A||x2(this,this[P],P,A,!0))&&(delete this[P],w=!0)}return w}normalize(A){const k=this,S={};return Ee.forEach(this,(w,P)=>{const O=Ee.findKey(S,P);if(O){k[O]=s0(w),delete k[P];return}const h=A?MN(P):String(P).trim();h!==P&&delete k[P],k[h]=s0(w),S[h]=!0}),this}concat(...A){return this.constructor.concat(this,...A)}toJSON(A){const k=Object.create(null);return Ee.forEach(this,(S,w)=>{S!=null&&S!==!1&&(k[w]=A&&Ee.isArray(S)?S.join(", "):S)}),k}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([A,k])=>A+": "+k).join(`
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(A){return A instanceof this?A:new this(A)}static concat(A,...k){const S=new this(A);return k.forEach(w=>S.set(w)),S}static accessor(A){const S=(this[vC]=this[vC]={accessors:{}}).accessors,w=this.prototype;function P(O){const h=ag(O);S[h]||(NN(w,O),S[h]=!0)}return Ee.isArray(A)?A.forEach(P):P(A),this}};to.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);Ee.reduceDescriptors(to.prototype,({value:E},A)=>{let k=A[0].toUpperCase()+A.slice(1);return{get:()=>E,set(S){this[k]=S}}});Ee.freezeMethods(to);function E2(E,A){const k=this||vg,S=A||k,w=to.from(S.headers);let P=S.data;return Ee.forEach(E,function(h){P=h.call(k,P,w.normalize(),A?A.status:void 0)}),w.normalize(),P}function vb(E){return!!(E&&E.__CANCEL__)}function Up(E,A,k){Bt.call(this,E??"canceled",Bt.ERR_CANCELED,A,k),this.name="CanceledError"}Ee.inherits(Up,Bt,{__CANCEL__:!0});function Sb(E,A,k){const S=k.config.validateStatus;!k.status||!S||S(k.status)?E(k):A(new Bt("Request failed with status code "+k.status,[Bt.ERR_BAD_REQUEST,Bt.ERR_BAD_RESPONSE][Math.floor(k.status/100)-4],k.config,k.request,k))}function PN(E){const A=/^([-+\w]{1,25})(:?\/\/|:)/.exec(E);return A&&A[1]||""}function LN(E,A){E=E||10;const k=new Array(E),S=new Array(E);let w=0,P=0,O;return A=A!==void 0?A:1e3,function(s){const a=Date.now(),p=S[P];O||(O=a),k[w]=s,S[w]=a;let v=P,M=0;for(;v!==w;)M+=k[v++],v=v%E;if(w=(w+1)%E,w===P&&(P=(P+1)%E),a-O<A)return;const F=p&&a-p;return F?Math.round(M*1e3/F):void 0}}function _N(E,A){let k=0,S=1e3/A,w,P;const O=(a,p=Date.now())=>{k=p,w=null,P&&(clearTimeout(P),P=null),E.apply(null,a)};return[(...a)=>{const p=Date.now(),v=p-k;v>=S?O(a,p):(w=a,P||(P=setTimeout(()=>{P=null,O(w)},S-v)))},()=>w&&O(w)]}const p0=(E,A,k=3)=>{let S=0;const w=LN(50,250);return _N(P=>{const O=P.loaded,h=P.lengthComputable?P.total:void 0,s=O-S,a=w(s),p=O<=h;S=O;const v={loaded:O,total:h,progress:h?O/h:void 0,bytes:s,rate:a||void 0,estimated:a&&h&&p?(h-O)/a:void 0,event:P,lengthComputable:h!=null,[A?"download":"upload"]:!0};E(v)},k)},SC=(E,A)=>{const k=E!=null;return[S=>A[0]({lengthComputable:k,total:E,loaded:S}),A[1]]},wC=E=>(...A)=>Ee.asap(()=>E(...A)),UN=mr.hasStandardBrowserEnv?((E,A)=>k=>(k=new URL(k,mr.origin),E.protocol===k.protocol&&E.host===k.host&&(A||E.port===k.port)))(new URL(mr.origin),mr.navigator&&/(msie|trident)/i.test(mr.navigator.userAgent)):()=>!0,jN=mr.hasStandardBrowserEnv?{write(E,A,k,S,w,P){const O=[E+"="+encodeURIComponent(A)];Ee.isNumber(k)&&O.push("expires="+new Date(k).toGMTString()),Ee.isString(S)&&O.push("path="+S),Ee.isString(w)&&O.push("domain="+w),P===!0&&O.push("secure"),document.cookie=O.join("; ")},read(E){const A=document.cookie.match(new RegExp("(^|;\\s*)("+E+")=([^;]*)"));return A?decodeURIComponent(A[3]):null},remove(E){this.write(E,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function BN(E){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(E)}function VN(E,A){return A?E.replace(/\/?\/$/,"")+"/"+A.replace(/^\/+/,""):E}function wb(E,A,k){let S=!BN(A);return E&&(S||k==!1)?VN(E,A):A}const TC=E=>E instanceof to?{...E}:E;function zf(E,A){A=A||{};const k={};function S(a,p,v,M){return Ee.isPlainObject(a)&&Ee.isPlainObject(p)?Ee.merge.call({caseless:M},a,p):Ee.isPlainObject(p)?Ee.merge({},p):Ee.isArray(p)?p.slice():p}function w(a,p,v,M){if(Ee.isUndefined(p)){if(!Ee.isUndefined(a))return S(void 0,a,v,M)}else return S(a,p,v,M)}function P(a,p){if(!Ee.isUndefined(p))return S(void 0,p)}function O(a,p){if(Ee.isUndefined(p)){if(!Ee.isUndefined(a))return S(void 0,a)}else return S(void 0,p)}function h(a,p,v){if(v in A)return S(a,p);if(v in E)return S(void 0,a)}const s={url:P,method:P,data:P,baseURL:O,transformRequest:O,transformResponse:O,paramsSerializer:O,timeout:O,timeoutMessage:O,withCredentials:O,withXSRFToken:O,adapter:O,responseType:O,xsrfCookieName:O,xsrfHeaderName:O,onUploadProgress:O,onDownloadProgress:O,decompress:O,maxContentLength:O,maxBodyLength:O,beforeRedirect:O,transport:O,httpAgent:O,httpsAgent:O,cancelToken:O,socketPath:O,responseEncoding:O,validateStatus:h,headers:(a,p,v)=>w(TC(a),TC(p),v,!0)};return Ee.forEach(Object.keys(Object.assign({},E,A)),function(p){const v=s[p]||w,M=v(E[p],A[p],p);Ee.isUndefined(M)&&v!==h||(k[p]=M)}),k}const Tb=E=>{const A=zf({},E);let{data:k,withXSRFToken:S,xsrfHeaderName:w,xsrfCookieName:P,headers:O,auth:h}=A;A.headers=O=to.from(O),A.url=yb(wb(A.baseURL,A.url,A.allowAbsoluteUrls),E.params,E.paramsSerializer),h&&O.set("Authorization","Basic "+btoa((h.username||"")+":"+(h.password?unescape(encodeURIComponent(h.password)):"")));let s;if(Ee.isFormData(k)){if(mr.hasStandardBrowserEnv||mr.hasStandardBrowserWebWorkerEnv)O.setContentType(void 0);else if((s=O.getContentType())!==!1){const[a,...p]=s?s.split(";").map(v=>v.trim()).filter(Boolean):[];O.setContentType([a||"multipart/form-data",...p].join("; "))}}if(mr.hasStandardBrowserEnv&&(S&&Ee.isFunction(S)&&(S=S(A)),S||S!==!1&&UN(A.url))){const a=w&&P&&jN.read(P);a&&O.set(w,a)}return A},HN=typeof XMLHttpRequest<"u",KN=HN&&function(E){return new Promise(function(k,S){const w=Tb(E);let P=w.data;const O=to.from(w.headers).normalize();let{responseType:h,onUploadProgress:s,onDownloadProgress:a}=w,p,v,M,F,b;function J(){F&&F(),b&&b(),w.cancelToken&&w.cancelToken.unsubscribe(p),w.signal&&w.signal.removeEventListener("abort",p)}let $=new XMLHttpRequest;$.open(w.method.toUpperCase(),w.url,!0),$.timeout=w.timeout;function ce(){if(!$)return;const ee=to.from("getAllResponseHeaders"in $&&$.getAllResponseHeaders()),Oe={data:!h||h==="text"||h==="json"?$.responseText:$.response,status:$.status,statusText:$.statusText,headers:ee,config:E,request:$};Sb(function(et){k(et),J()},function(et){S(et),J()},Oe),$=null}"onloadend"in $?$.onloadend=ce:$.onreadystatechange=function(){!$||$.readyState!==4||$.status===0&&!($.responseURL&&$.responseURL.indexOf("file:")===0)||setTimeout(ce)},$.onabort=function(){$&&(S(new Bt("Request aborted",Bt.ECONNABORTED,E,$)),$=null)},$.onerror=function(){S(new Bt("Network Error",Bt.ERR_NETWORK,E,$)),$=null},$.ontimeout=function(){let be=w.timeout?"timeout of "+w.timeout+"ms exceeded":"timeout exceeded";const Oe=w.transitional||gb;w.timeoutErrorMessage&&(be=w.timeoutErrorMessage),S(new Bt(be,Oe.clarifyTimeoutError?Bt.ETIMEDOUT:Bt.ECONNABORTED,E,$)),$=null},P===void 0&&O.setContentType(null),"setRequestHeader"in $&&Ee.forEach(O.toJSON(),function(be,Oe){$.setRequestHeader(Oe,be)}),Ee.isUndefined(w.withCredentials)||($.withCredentials=!!w.withCredentials),h&&h!=="json"&&($.responseType=w.responseType),a&&([M,b]=p0(a,!0),$.addEventListener("progress",M)),s&&$.upload&&([v,F]=p0(s),$.upload.addEventListener("progress",v),$.upload.addEventListener("loadend",F)),(w.cancelToken||w.signal)&&(p=ee=>{$&&(S(!ee||ee.type?new Up(null,E,$):ee),$.abort(),$=null)},w.cancelToken&&w.cancelToken.subscribe(p),w.signal&&(w.signal.aborted?p():w.signal.addEventListener("abort",p)));const Re=PN(w.url);if(Re&&mr.protocols.indexOf(Re)===-1){S(new Bt("Unsupported protocol "+Re+":",Bt.ERR_BAD_REQUEST,E));return}$.send(P||null)})},qN=(E,A)=>{const{length:k}=E=E?E.filter(Boolean):[];if(A||k){let S=new AbortController,w;const P=function(a){if(!w){w=!0,h();const p=a instanceof Error?a:this.reason;S.abort(p instanceof Bt?p:new Up(p instanceof Error?p.message:p))}};let O=A&&setTimeout(()=>{O=null,P(new Bt(`timeout ${A} of ms exceeded`,Bt.ETIMEDOUT))},A);const h=()=>{E&&(O&&clearTimeout(O),O=null,E.forEach(a=>{a.unsubscribe?a.unsubscribe(P):a.removeEventListener("abort",P)}),E=null)};E.forEach(a=>a.addEventListener("abort",P));const{signal:s}=S;return s.unsubscribe=()=>Ee.asap(h),s}},FN=function*(E,A){let k=E.byteLength;if(k<A){yield E;return}let S=0,w;for(;S<k;)w=S+A,yield E.slice(S,w),S=w},zN=async function*(E,A){for await(const k of GN(E))yield*FN(k,A)},GN=async function*(E){if(E[Symbol.asyncIterator]){yield*E;return}const A=E.getReader();try{for(;;){const{done:k,value:S}=await A.read();if(k)break;yield S}}finally{await A.cancel()}},xC=(E,A,k,S)=>{const w=zN(E,A);let P=0,O,h=s=>{O||(O=!0,S&&S(s))};return new ReadableStream({async pull(s){try{const{done:a,value:p}=await w.next();if(a){h(),s.close();return}let v=p.byteLength;if(k){let M=P+=v;k(M)}s.enqueue(new Uint8Array(p))}catch(a){throw h(a),a}},cancel(s){return h(s),w.return()}},{highWaterMark:2})},E0=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",xb=E0&&typeof ReadableStream=="function",XN=E0&&(typeof TextEncoder=="function"?(E=>A=>E.encode(A))(new TextEncoder):async E=>new Uint8Array(await new Response(E).arrayBuffer())),Eb=(E,...A)=>{try{return!!E(...A)}catch{return!1}},YN=xb&&Eb(()=>{let E=!1;const A=new Request(mr.origin,{body:new ReadableStream,method:"POST",get duplex(){return E=!0,"half"}}).headers.has("Content-Type");return E&&!A}),EC=64*1024,L2=xb&&Eb(()=>Ee.isReadableStream(new Response("").body)),h0={stream:L2&&(E=>E.body)};E0&&(E=>{["text","arrayBuffer","blob","formData","stream"].forEach(A=>{!h0[A]&&(h0[A]=Ee.isFunction(E[A])?k=>k[A]():(k,S)=>{throw new Bt(`Response type '${A}' is not supported`,Bt.ERR_NOT_SUPPORT,S)})})})(new Response);const WN=async E=>{if(E==null)return 0;if(Ee.isBlob(E))return E.size;if(Ee.isSpecCompliantForm(E))return(await new Request(mr.origin,{method:"POST",body:E}).arrayBuffer()).byteLength;if(Ee.isArrayBufferView(E)||Ee.isArrayBuffer(E))return E.byteLength;if(Ee.isURLSearchParams(E)&&(E=E+""),Ee.isString(E))return(await XN(E)).byteLength},QN=async(E,A)=>{const k=Ee.toFiniteNumber(E.getContentLength());return k??WN(A)},JN=E0&&(async E=>{let{url:A,method:k,data:S,signal:w,cancelToken:P,timeout:O,onDownloadProgress:h,onUploadProgress:s,responseType:a,headers:p,withCredentials:v="same-origin",fetchOptions:M}=Tb(E);a=a?(a+"").toLowerCase():"text";let F=qN([w,P&&P.toAbortSignal()],O),b;const J=F&&F.unsubscribe&&(()=>{F.unsubscribe()});let $;try{if(s&&YN&&k!=="get"&&k!=="head"&&($=await QN(p,S))!==0){let Oe=new Request(A,{method:"POST",body:S,duplex:"half"}),ot;if(Ee.isFormData(S)&&(ot=Oe.headers.get("content-type"))&&p.setContentType(ot),Oe.body){const[et,pt]=SC($,p0(wC(s)));S=xC(Oe.body,EC,et,pt)}}Ee.isString(v)||(v=v?"include":"omit");const ce="credentials"in Request.prototype;b=new Request(A,{...M,signal:F,method:k.toUpperCase(),headers:p.normalize().toJSON(),body:S,duplex:"half",credentials:ce?v:void 0});let Re=await fetch(b);const ee=L2&&(a==="stream"||a==="response");if(L2&&(h||ee&&J)){const Oe={};["status","statusText","headers"].forEach(Nt=>{Oe[Nt]=Re[Nt]});const ot=Ee.toFiniteNumber(Re.headers.get("content-length")),[et,pt]=h&&SC(ot,p0(wC(h),!0))||[];Re=new Response(xC(Re.body,EC,et,()=>{pt&&pt(),J&&J()}),Oe)}a=a||"text";let be=await h0[Ee.findKey(h0,a)||"text"](Re,E);return!ee&&J&&J(),await new Promise((Oe,ot)=>{Sb(Oe,ot,{data:be,headers:to.from(Re.headers),status:Re.status,statusText:Re.statusText,config:E,request:b})})}catch(ce){throw J&&J(),ce&&ce.name==="TypeError"&&/Load failed|fetch/i.test(ce.message)?Object.assign(new Bt("Network Error",Bt.ERR_NETWORK,E,b),{cause:ce.cause||ce}):Bt.from(ce,ce&&ce.code,E,b)}}),_2={http:dN,xhr:KN,fetch:JN};Ee.forEach(_2,(E,A)=>{if(E){try{Object.defineProperty(E,"name",{value:A})}catch{}Object.defineProperty(E,"adapterName",{value:A})}});const AC=E=>`- ${E}`,ZN=E=>Ee.isFunction(E)||E===null||E===!1,Ab={getAdapter:E=>{E=Ee.isArray(E)?E:[E];const{length:A}=E;let k,S;const w={};for(let P=0;P<A;P++){k=E[P];let O;if(S=k,!ZN(k)&&(S=_2[(O=String(k)).toLowerCase()],S===void 0))throw new Bt(`Unknown adapter '${O}'`);if(S)break;w[O||"#"+P]=S}if(!S){const P=Object.entries(w).map(([h,s])=>`adapter ${h} `+(s===!1?"is not supported by the environment":"is not available in the build"));let O=A?P.length>1?`since :
`+P.map(AC).join(`
`):" "+AC(P[0]):"as no adapter specified";throw new Bt("There is no suitable adapter to dispatch the request "+O,"ERR_NOT_SUPPORT")}return S},adapters:_2};function A2(E){if(E.cancelToken&&E.cancelToken.throwIfRequested(),E.signal&&E.signal.aborted)throw new Up(null,E)}function CC(E){return A2(E),E.headers=to.from(E.headers),E.data=E2.call(E,E.transformRequest),["post","put","patch"].indexOf(E.method)!==-1&&E.headers.setContentType("application/x-www-form-urlencoded",!1),Ab.getAdapter(E.adapter||vg.adapter)(E).then(function(S){return A2(E),S.data=E2.call(E,E.transformResponse,S),S.headers=to.from(S.headers),S},function(S){return vb(S)||(A2(E),S&&S.response&&(S.response.data=E2.call(E,E.transformResponse,S.response),S.response.headers=to.from(S.response.headers))),Promise.reject(S)})}const Cb="1.9.0",A0={};["object","boolean","number","function","string","symbol"].forEach((E,A)=>{A0[E]=function(S){return typeof S===E||"a"+(A<1?"n ":" ")+E}});const bC={};A0.transitional=function(A,k,S){function w(P,O){return"[Axios v"+Cb+"] Transitional option '"+P+"'"+O+(S?". "+S:"")}return(P,O,h)=>{if(A===!1)throw new Bt(w(O," has been removed"+(k?" in "+k:"")),Bt.ERR_DEPRECATED);return k&&!bC[O]&&(bC[O]=!0,console.warn(w(O," has been deprecated since v"+k+" and will be removed in the near future"))),A?A(P,O,h):!0}};A0.spelling=function(A){return(k,S)=>(console.warn(`${S} is likely a misspelling of ${A}`),!0)};function $N(E,A,k){if(typeof E!="object")throw new Bt("options must be an object",Bt.ERR_BAD_OPTION_VALUE);const S=Object.keys(E);let w=S.length;for(;w-- >0;){const P=S[w],O=A[P];if(O){const h=E[P],s=h===void 0||O(h,P,E);if(s!==!0)throw new Bt("option "+P+" must be "+s,Bt.ERR_BAD_OPTION_VALUE);continue}if(k!==!0)throw new Bt("Unknown option "+P,Bt.ERR_BAD_OPTION)}}const c0={assertOptions:$N,validators:A0},La=c0.validators;let Ff=class{constructor(A){this.defaults=A||{},this.interceptors={request:new mC,response:new mC}}async request(A,k){try{return await this._request(A,k)}catch(S){if(S instanceof Error){let w={};Error.captureStackTrace?Error.captureStackTrace(w):w=new Error;const P=w.stack?w.stack.replace(/^.+\n/,""):"";try{S.stack?P&&!String(S.stack).endsWith(P.replace(/^.+\n.+\n/,""))&&(S.stack+=`
`+P):S.stack=P}catch{}}throw S}}_request(A,k){typeof A=="string"?(k=k||{},k.url=A):k=A||{},k=zf(this.defaults,k);const{transitional:S,paramsSerializer:w,headers:P}=k;S!==void 0&&c0.assertOptions(S,{silentJSONParsing:La.transitional(La.boolean),forcedJSONParsing:La.transitional(La.boolean),clarifyTimeoutError:La.transitional(La.boolean)},!1),w!=null&&(Ee.isFunction(w)?k.paramsSerializer={serialize:w}:c0.assertOptions(w,{encode:La.function,serialize:La.function},!0)),k.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?k.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:k.allowAbsoluteUrls=!0),c0.assertOptions(k,{baseUrl:La.spelling("baseURL"),withXsrfToken:La.spelling("withXSRFToken")},!0),k.method=(k.method||this.defaults.method||"get").toLowerCase();let O=P&&Ee.merge(P.common,P[k.method]);P&&Ee.forEach(["delete","get","head","post","put","patch","common"],b=>{delete P[b]}),k.headers=to.concat(O,P);const h=[];let s=!0;this.interceptors.request.forEach(function(J){typeof J.runWhen=="function"&&J.runWhen(k)===!1||(s=s&&J.synchronous,h.unshift(J.fulfilled,J.rejected))});const a=[];this.interceptors.response.forEach(function(J){a.push(J.fulfilled,J.rejected)});let p,v=0,M;if(!s){const b=[CC.bind(this),void 0];for(b.unshift.apply(b,h),b.push.apply(b,a),M=b.length,p=Promise.resolve(k);v<M;)p=p.then(b[v++],b[v++]);return p}M=h.length;let F=k;for(v=0;v<M;){const b=h[v++],J=h[v++];try{F=b(F)}catch($){J.call(this,$);break}}try{p=CC.call(this,F)}catch(b){return Promise.reject(b)}for(v=0,M=a.length;v<M;)p=p.then(a[v++],a[v++]);return p}getUri(A){A=zf(this.defaults,A);const k=wb(A.baseURL,A.url,A.allowAbsoluteUrls);return yb(k,A.params,A.paramsSerializer)}};Ee.forEach(["delete","get","head","options"],function(A){Ff.prototype[A]=function(k,S){return this.request(zf(S||{},{method:A,url:k,data:(S||{}).data}))}});Ee.forEach(["post","put","patch"],function(A){function k(S){return function(P,O,h){return this.request(zf(h||{},{method:A,headers:S?{"Content-Type":"multipart/form-data"}:{},url:P,data:O}))}}Ff.prototype[A]=k(),Ff.prototype[A+"Form"]=k(!0)});let eP=class bb{constructor(A){if(typeof A!="function")throw new TypeError("executor must be a function.");let k;this.promise=new Promise(function(P){k=P});const S=this;this.promise.then(w=>{if(!S._listeners)return;let P=S._listeners.length;for(;P-- >0;)S._listeners[P](w);S._listeners=null}),this.promise.then=w=>{let P;const O=new Promise(h=>{S.subscribe(h),P=h}).then(w);return O.cancel=function(){S.unsubscribe(P)},O},A(function(P,O,h){S.reason||(S.reason=new Up(P,O,h),k(S.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(A){if(this.reason){A(this.reason);return}this._listeners?this._listeners.push(A):this._listeners=[A]}unsubscribe(A){if(!this._listeners)return;const k=this._listeners.indexOf(A);k!==-1&&this._listeners.splice(k,1)}toAbortSignal(){const A=new AbortController,k=S=>{A.abort(S)};return this.subscribe(k),A.signal.unsubscribe=()=>this.unsubscribe(k),A.signal}static source(){let A;return{token:new bb(function(w){A=w}),cancel:A}}};function tP(E){return function(k){return E.apply(null,k)}}function nP(E){return Ee.isObject(E)&&E.isAxiosError===!0}const U2={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(U2).forEach(([E,A])=>{U2[A]=E});function Ib(E){const A=new Ff(E),k=ib(Ff.prototype.request,A);return Ee.extend(k,Ff.prototype,A,{allOwnKeys:!0}),Ee.extend(k,A,null,{allOwnKeys:!0}),k.create=function(w){return Ib(zf(E,w))},k}const zn=Ib(vg);zn.Axios=Ff;zn.CanceledError=Up;zn.CancelToken=eP;zn.isCancel=vb;zn.VERSION=Cb;zn.toFormData=x0;zn.AxiosError=Bt;zn.Cancel=zn.CanceledError;zn.all=function(A){return Promise.all(A)};zn.spread=tP;zn.isAxiosError=nP;zn.mergeConfig=zf;zn.AxiosHeaders=to;zn.formToJSON=E=>mb(Ee.isHTMLForm(E)?new FormData(E):E);zn.getAdapter=Ab.getAdapter;zn.HttpStatusCode=U2;zn.default=zn;const{Axios:cP,AxiosError:fP,CanceledError:dP,isCancel:pP,CancelToken:hP,VERSION:yP,all:gP,Cancel:mP,isAxiosError:vP,spread:SP,toFormData:wP,AxiosHeaders:TP,HttpStatusCode:xP,formToJSON:EP,getAdapter:AP,mergeConfig:CP}=zn;function iP(){const[E,A]=ve.useState([]),[k,S]=ve.useState([]),[w,P]=ve.useState(!1),[O,h]=ve.useState(""),[s,a]=ve.useState(""),[p,v]=ve.useState(""),[M,F]=ve.useState(""),[b,J]=ve.useState(""),[$,ce]=ve.useState(""),Re=async()=>{try{const et=await zn.post("/userinfo");A(et.data.Widevine_Devices||[]),S(et.data.Playready_Devices||[]),h(et.data.Styled_Username||""),a(et.data.API_Key||"")}catch(et){console.error("Failed to fetch user info",et)}};ve.useEffect(()=>{Re()},[]);const ee=async(et,pt)=>{const Nt=et.target.files[0];if(!Nt)return;const _=Nt.name.split(".").pop();if(pt==="PR"&&_!=="prd"||pt==="WV"&&_!=="wvd"){alert(`Please upload a .${pt==="PR"?"prd":"wvd"} file.`);return}const se=new FormData;se.append("file",Nt),P(!0);try{await zn.post(`/upload/${pt}`,se),await Re()}catch(pe){console.error("Upload failed",pe),alert("Upload failed")}finally{P(!1)}},be=async()=>{try{await zn.post("/logout"),window.location.reload()}catch(et){console.error("Logout failed:",et),alert("Logout failed!")}},Oe=async()=>{var et;if(M||p===""){alert("Please enter a valid password.");return}try{(await zn.post("/user/change_password",{new_password:p})).data.message==="True"?(alert("Password changed successfully."),v("")):alert("Failed to change password.")}catch(pt){pt.response&&((et=pt.response.data)==null?void 0:et.message)==="Invalid password format"?alert("Password format is invalid. Please try again."):alert("Error occurred while changing password.")}},ot=async()=>{if($||b===""){alert("Please enter a valid API key.");return}try{(await zn.post("/user/change_api_key",{new_api_key:b})).data.message==="True"?(alert("API key changed successfully."),a(b),J("")):alert("Failed to change API key.")}catch(et){alert("Error occurred while changing API key."),console.error(et)}};return te.jsxs("div",{id:"myaccount",className:"flex flex-col lg:flex-row gap-4 w-full min-h-full overflow-y-auto p-4",children:[te.jsxs("div",{className:"flex-col w-full min-h-164 lg:h-full lg:w-96 border-2 border-yellow-500/50 rounded-2xl p-4 flex items-center overflow-y-auto",children:[te.jsx("h1",{className:"text-2xl font-bold text-white border-b-2 border-white p-2 w-full text-center mb-2",children:O?`${O}`:"My Account"}),te.jsxs("div",{className:"w-full flex flex-col items-center",children:[te.jsx("label",{htmlFor:"apiKey",className:"text-white font-semibold mb-1",children:"API Key"}),te.jsx("input",{id:"apiKey",type:"text",value:s,readOnly:!0,className:"w-full p-2 mb-4 rounded bg-gray-800 text-white border border-gray-600 text-center"}),te.jsx("label",{htmlFor:"newApiKey",className:"text-white font-semibold mt-4 mb-1",children:"New API Key"}),te.jsx("input",{id:"newApiKey",type:"text",value:b,onChange:et=>{const pt=et.target.value,Nt=/^[^\s]+$/.test(pt);ce(Nt?"":"API key must not contain spaces."),J(pt)},placeholder:"Enter new API key",className:"w-full p-2 mb-1 rounded bg-gray-800 text-white border border-gray-600 text-center"}),$&&te.jsx("p",{className:"text-red-500 text-sm mb-3",children:$}),te.jsx("button",{className:"w-full h-12 bg-yellow-500/50 rounded-2xl text-2xl text-white",onClick:ot,children:"Change API Key"}),te.jsx("label",{htmlFor:"password",className:"text-white font-semibold mt-4 mb-1",children:"Change Password"}),te.jsx("input",{id:"password",type:"password",value:p,onChange:et=>{const pt=et.target.value,Nt=/^[A-Za-z0-9!@#$%^&*()_+\-=[\]{};':"\\|,.<>/?`~]*$/.test(pt);F(Nt?"":"Password must not contain spaces or invalid characters."),v(pt)},placeholder:"New Password",className:"w-full p-2 mb-1 rounded bg-gray-800 text-white border border-gray-600 text-center"}),M&&te.jsx("p",{className:"text-red-500 text-sm mb-3",children:M}),te.jsx("button",{className:"w-full h-12 bg-yellow-500/50 rounded-2xl text-2xl text-white",onClick:Oe,children:"Change Password"})]}),te.jsx("button",{onClick:be,className:"mt-auto w-full h-12 bg-yellow-500/50 rounded-2xl text-2xl text-white",children:"Log out"})]}),te.jsxs("div",{className:"flex flex-col w-full lg:ml-2 mt-2 lg:mt-0",children:[te.jsxs("div",{className:"border-2 border-yellow-500/50 flex flex-col w-full min-h-1/2 text-center rounded-2xl lg:p-4 p-2 overflow-y-auto",children:[te.jsx("h1",{className:"bg-black text-2xl font-bold text-white border-b-2 border-white p-2",children:"Widevine CDMs"}),te.jsx("div",{className:"flex flex-col w-full grow p-2 bg-white/5 rounded-2xl mt-2 text-white text-left",children:E.length===0?te.jsx("div",{className:"text-white text-center font-bold",children:"No Widevine CDMs uploaded."}):E.map((et,pt)=>te.jsx("div",{className:`text-center font-bold text-white p-2 rounded ${pt%2===0?"bg-black/30":"bg-black/60"}`,children:et},pt))}),te.jsxs("label",{className:"bg-yellow-500 text-white w-full min-h-16 lg:min-h-16 mt-4 rounded-2xl flex items-center justify-center cursor-pointer",children:[w?"Uploading...":"Upload CDM",te.jsx("input",{type:"file",accept:".wvd",hidden:!0,onChange:et=>ee(et,"WV")})]})]}),te.jsxs("div",{className:"border-2 border-yellow-500/50 flex flex-col w-full min-h-1/2 text-center rounded-2xl p-2 mt-2 lg:mt-2 overflow-y-auto",children:[te.jsx("h1",{className:"text-2xl font-bold text-white border-b-2 border-white p-2 bg-black",children:"Playready CDMs"}),te.jsx("div",{className:"flex flex-col w-full bg-white/5 grow rounded-2xl mt-2 text-white text-left p-2",children:k.length===0?te.jsx("div",{className:"text-white text-center font-bold",children:"No Playready CDMs uploaded."}):k.map((et,pt)=>te.jsx("div",{className:`text-center font-bold text-white p-2 rounded ${pt%2===0?"bg-black/30":"bg-black/60"}`,children:et},pt))}),te.jsxs("label",{className:"bg-yellow-500 text-white w-full min-h-16 lg:min-h-16 mt-4 rounded-2xl flex items-center justify-center cursor-pointer",children:[w?"Uploading...":"Upload CDM",te.jsx("input",{type:"file",accept:".prd",hidden:!0,onChange:et=>ee(et,"PR")})]})]})]})]})}function rP(){const[E,A]=ve.useState(null);return ve.useEffect(()=>{fetch("/login/status",{method:"POST",credentials:"include"}).then(k=>k.json()).then(k=>{k.message==="True"?A(!0):A(!1)}).catch(k=>{console.error("Error checking login status:",k),A(!1)})},[]),E===null?te.jsx("div",{children:"Loading..."}):te.jsx("div",{id:"accountpage",className:"w-full h-full flex",children:E?te.jsx(iP,{}):te.jsx(bM,{})})}function oP(){const[E,A]=ve.useState(!1);return te.jsxs("div",{id:"appcontainer",className:"flex flex-row w-full h-full bg-black",children:[te.jsx(CM,{isMenuOpen:E,setIsMenuOpen:A}),te.jsx("div",{id:"navbarcontainer",className:"hidden lg:flex lg:w-2xs bg-gray-950/55 border-r border-white/5 shrink-0",children:te.jsx(TM,{})}),te.jsxs("div",{id:"maincontainer",className:"w-full lg:w-5/6 bg-gray-950/50 flex flex-col grow",children:[te.jsx("div",{id:"navbarmaincontainer",className:"w-full lg:hidden h-16 bg-gray-950/10 border-b border-white/5 sticky top-0 z-10",children:te.jsx(EM,{setIsMenuOpen:A})}),te.jsx("div",{id:"maincontentcontainer",className:"w-full grow overflow-y-auto",children:te.jsxs(HR,{children:[te.jsx(kp,{path:"/",element:te.jsx(hM,{})}),te.jsx(kp,{path:"/cache",element:te.jsx(yM,{})}),te.jsx(kp,{path:"/api",element:te.jsx(mM,{})}),te.jsx(kp,{path:"/testplayer",element:te.jsx(wM,{})}),te.jsx(kp,{path:"/account",element:te.jsx(rP,{})})]})})]})]})}Qk.createRoot(document.getElementById("root")).render(te.jsx(ve.StrictMode,{children:te.jsx(f4,{children:te.jsx(oP,{})})}))});export default lP();